:root {
  --teal: #0f6b6a;
  --teal-deep: #0b5554;
  --teal-mid: #3f8f8b;
  --teal-light: #8cc4be;
  --teal-tint: #e3efee;
  --persimmon: #ff7a45;
  --persimmon-tint: #ffe9df;
  --stone: #ede6dd;
  --stone-soft: #f6f2ec;
  --ink: #101010;
  --ink-soft: #57534d;
  --ink-faint: #9a948b;
  --paper: #ffffff;
  --line: rgba(16, 16, 16, 0.09);

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-optical-sizing: auto;
  font-feature-settings: "cv11", "ss03";
  -webkit-font-smoothing: antialiased;
  font-size: 17px;
  line-height: 1.55;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: var(--persimmon); color: #fff; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* Inline shortcut keys: a small version of the keycaps (soft top on a two-tone wall). */
kbd {
  --d: 0.2em;
  display: inline-flex; align-items: center; justify-content: center; gap: 1px;
  min-width: 1.85em; height: 1.65em; padding: 0 0.48em; margin: 0 0.06em var(--d); vertical-align: 0.12em;
  border: 0; border-radius: 0.42em;
  background: linear-gradient(180deg, #ffffff, #f4efe8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 calc(var(--d) * 0.45) 0 #ddd3c6, 0 var(--d) 0 #c8bcac, 0 calc(var(--d) + 1px) 1px rgba(0, 0, 0, 0.08), 0 6px 10px -6px rgba(16, 16, 16, 0.35);
  font-family: var(--font); font-size: 0.8em; font-weight: 550; line-height: 1; color: #3b3631; white-space: nowrap;
}

/* ---------- type ---------- */

.display {
  font-weight: 500;
  font-size: clamp(44px, 7.4vw, 104px);
  line-height: 0.98;
  letter-spacing: -0.045em;
  margin: 0;
}
.h2 {
  font-weight: 500;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.04em;
  margin: 0;
}
.label { font-size: 13px; font-weight: 450; letter-spacing: -0.005em; line-height: 1.25; white-space: nowrap; }
.lede { font-size: clamp(17px, 1.6vw, 20px); color: var(--ink-soft); max-width: 34ch; margin: 0; letter-spacing: -0.01em; }
.statement {
  font-size: clamp(26px, 3.6vw, 46px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.12;
  margin: 0;
  max-width: 22ch;
}
.statement em { font-style: normal; color: var(--ink-faint); }
.statement mark { background: none; color: var(--teal); }
.muted { color: var(--ink-soft); }

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(1.6) blur(16px);
  -webkit-backdrop-filter: saturate(1.6) blur(16px);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.logo { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font-weight: 600; font-size: 21px; letter-spacing: -0.035em; }
.logo img { width: 28px; height: 28px; }
.nav-links { display: flex; align-items: center; gap: 28px; font-size: 14.5px; }
.nav-links a { text-decoration: none; color: var(--ink-soft); transition: color 0.15s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); }
@media (max-width: 720px) { .nav-links a:not(.btn) { display: none; } }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 20px; border-radius: 999px; border: 0;
  font-size: 15.5px; font-weight: 550; letter-spacing: -0.01em;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background 0.15s, transform 0.1s;
}
.btn:active { transform: scale(0.97); }
.btn.primary { background: var(--teal); color: #fff !important; }
.btn.primary:hover { background: var(--teal-deep); }
.btn.ghost { background: var(--stone-soft); color: var(--ink); }
.btn.ghost:hover { background: var(--stone); }
.btn.small { padding: 9px 15px; font-size: 14px; }
.btn svg { width: 16px; height: 16px; }

/* ---------- poster (the Surety-style composition) ---------- */

.poster { padding-block: clamp(40px, 7vw, 96px) clamp(56px, 8vw, 120px); }
.poster-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: clamp(18px, 2.4vw, 32px); }
.poster-top .label { padding-bottom: 0.6em; text-align: right; }
.panel { margin: 0; background: var(--stone); overflow: hidden; aspect-ratio: 5 / 3; }
.panel img { width: 100%; height: 100%; object-fit: cover; }
.poster-bottom { display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; margin-top: clamp(18px, 2.4vw, 32px); }
.poster-bottom .display { text-align: right; margin-left: auto; }
.hero-cta { display: flex; flex-direction: column; gap: 22px; padding-top: 10px; }
.hero-cta .row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
@media (max-width: 760px) {
  .poster-bottom { flex-direction: column-reverse; }
  .poster-top { flex-direction: column-reverse; align-items: flex-start; }
  .poster-top .label { text-align: left; padding-bottom: 0; color: var(--ink-faint); }
}


/* ---------- sections ---------- */

section { scroll-margin-top: 64px; }
.section { padding-block: clamp(64px, 9vw, 140px); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: clamp(28px, 4vw, 56px); }
.section-head .label { padding-bottom: 0.5em; }
.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* ---------- live demo ---------- */

.demo { background: var(--stone); border-radius: 0; padding: clamp(18px, 4vw, 56px); position: relative; overflow: hidden; }
.demo-tabs { display: flex; gap: 4px; margin-bottom: 18px; flex-wrap: wrap; }
.demo-tabs button {
  border: 0; background: rgba(255, 255, 255, 0.5); padding: 7px 14px; border-radius: 999px;
  font-size: 13.5px; font-weight: 500; cursor: pointer; color: var(--ink-soft);
}
.demo-tabs button[aria-selected="true"] { background: var(--ink); color: #fff; }

.fake-app {
  background: #fff; border-radius: var(--radius-md); min-height: 440px;
  display: grid; grid-template-rows: auto 1fr auto;
  box-shadow: 0 30px 60px -30px rgba(16, 16, 16, 0.35);
  position: relative;
}
.fake-bar { display: flex; align-items: center; gap: 7px; padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--ink-faint); }
.fake-bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--stone); display: inline-block; }
.fake-bar span { margin-left: 10px; }
.fake-thread { padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; justify-content: flex-end; }
.bubble { max-width: min(460px, 85%); padding: 10px 14px; border-radius: 16px; background: var(--stone-soft); font-size: 15px; line-height: 1.45; }
.bubble.them { border-bottom-left-radius: 4px; }
.bubble small { display: block; font-size: 11.5px; color: var(--ink-faint); margin-bottom: 2px; }
.composer { margin: 0 14px 14px; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; min-height: 76px; font-size: 15px; line-height: 1.5; white-space: pre-wrap; }
.composer .sel { background: rgba(15, 107, 106, 0.18); border-radius: 2px; }
.composer .caret { display: inline-block; width: 2px; height: 1.1em; background: var(--persimmon); vertical-align: -0.2em; animation: blink 1s steps(1) infinite; }
.composer.done { border-color: var(--teal); }
@keyframes blink { 50% { opacity: 0; } }

.keys-overlay {
  position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%) scale(0.9);
  display: flex; gap: 10px; opacity: 0; transition: opacity 0.2s, transform 0.2s; pointer-events: none; z-index: 3;
}
.keys-overlay.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* the popover, mirroring the desktop app */
.pop {
  position: absolute; left: 50%; top: 50%; width: min(560px, calc(100% - 24px));
  transform: translate(-50%, -46%) scale(0.97); opacity: 0; pointer-events: none;
  background: #fff; border-radius: var(--radius-lg); padding: 14px 16px 12px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 30px 70px -20px rgba(16, 16, 16, 0.45), 0 2px 6px rgba(16, 16, 16, 0.08);
  display: flex; flex-direction: column; gap: 12px; z-index: 4;
  transition: opacity 0.18s, transform 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.pop.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.pop-bar { display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: 14px; letter-spacing: -0.01em; }
.pop-bar .brand { display: flex; align-items: center; gap: 8px; }
.pop-bar .brand img { width: 20px; height: 20px; }
.pop-tone { font-weight: 450; font-size: 12.5px; color: var(--ink-soft); display: flex; align-items: center; gap: 6px; }
.pop-tone::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--persimmon); }
.pop-modes { display: flex; gap: 4px; flex-wrap: wrap; }
.pop-modes span { padding: 5px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 500; color: var(--ink-soft); transition: background 0.15s, color 0.15s; }
.pop-modes span.on { background: var(--teal); color: #fff; }
.pop-input, .pop-output { border-radius: var(--radius-md); padding: 11px 13px; font-size: 14.5px; line-height: 1.5; white-space: pre-wrap; min-height: 64px; }
.pop-input { background: var(--stone-soft); }
.pop-output { background: var(--teal-tint); }
.pop-note { font-size: 13px; color: var(--ink-soft); display: flex; gap: 8px; padding: 0 6px; min-height: 1.5em; }
.pop-note::before { content: "+"; color: var(--persimmon); font-weight: 600; }
.pop-note:empty::after { content: "anything specific?"; color: var(--ink-faint); }
.pop-working { display: none; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-soft); padding: 0 6px; }
.pop-working::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--persimmon); animation: pulse 0.9s ease-in-out infinite alternate; }
.pop.working .pop-working { display: flex; }
.pop.working .pop-input { opacity: 0.6; }
@keyframes pulse { from { transform: scale(0.6); opacity: 0.5; } to { transform: scale(1.15); opacity: 1; } }
.pop-sorted { font-size: 12.5px; font-weight: 600; color: var(--teal); padding: 0 4px; margin-bottom: -4px; }
.pop .is-result { display: none; }
.pop.result .is-result { display: block; }
.pop.result .is-compose { display: none; }
.pop-foot { display: flex; justify-content: space-between; align-items: center; font-size: 11.5px; color: var(--ink-faint); }
.pop-foot .act { display: flex; gap: 6px; }
.pop-foot b { font-weight: 550; font-size: 13px; padding: 6px 11px; border-radius: 10px; background: var(--teal); color: #fff; transition: transform 0.08s; }
.pop-foot b.ghost { background: var(--stone-soft); color: var(--ink); }
.pop-foot b.press { transform: scale(0.94); }
@media (max-width: 560px) {
  .fake-app { min-height: 440px; }
  .pop-modes span:nth-child(n + 5) { display: none; }
}

/* ---------- showreel ---------- */

.reel { background: #121212; color: #fff; padding: clamp(64px, 8vw, 120px) 0 clamp(48px, 6vw, 88px); overflow: hidden; }
.reel .section-head .label { color: rgba(255, 255, 255, 0.55); }
.reel-stage { position: relative; height: clamp(440px, 62vw, 620px); perspective: 1600px; touch-action: pan-y; user-select: none; }
.reel-card {
  position: absolute; left: 50%; top: 0; width: min(440px, 74vw); aspect-ratio: 4 / 5;
  margin-left: calc(min(440px, 74vw) / -2);
  background: #fff; color: var(--ink); padding: 9% 8%; display: flex; flex-direction: column; justify-content: center; gap: 4%;
  transition: transform 0.7s cubic-bezier(0.22, 0.8, 0.2, 1), opacity 0.7s, filter 0.7s;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.7);
  cursor: pointer;
}
.reel-card .top { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; }
.reel-card h3 { margin: 0; font-weight: 500; font-size: clamp(22px, 3.2vw, 34px); letter-spacing: -0.04em; line-height: 1; }
.reel-card .no { font-size: 10.5px; line-height: 1.2; text-align: right; }
.reel-card .art { background: var(--stone); aspect-ratio: 10 / 7; overflow: hidden; }
.reel-card .art svg, .reel-card .art img { width: 100%; height: 100%; object-fit: cover; }
.reel-card .bottom { margin: 0; text-align: right; font-weight: 500; font-size: clamp(20px, 2.8vw, 30px); letter-spacing: -0.04em; line-height: 1.02; }
.reel-nav { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 28px; }
.reel-nav button { width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.1); color: #fff; cursor: pointer; display: grid; place-items: center; }
.reel-nav button:hover { background: rgba(255, 255, 255, 0.18); }
.reel-dots { display: flex; gap: 6px; }
.reel-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, 0.25); transition: width 0.3s, background 0.3s; }
.reel-dots i.on { width: 22px; border-radius: 3px; background: var(--persimmon); }

/* ---------- modes ---------- */

.modes-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.mode { background: #fff; padding: 26px 24px 28px; display: flex; flex-direction: column; gap: 14px; min-height: 260px; }
.mode-head { display: flex; justify-content: space-between; align-items: center; }
.mode h3 { margin: 0; font-size: 22px; font-weight: 550; letter-spacing: -0.03em; }
.mode .before { font-size: 14px; color: var(--ink-faint); text-decoration: line-through; text-decoration-color: rgba(255, 122, 69, 0.6); margin: 0; }
.mode .after { font-size: 15px; margin: 0; padding-left: 12px; border-left: 2px solid var(--teal); }
.mode.wide { background: var(--teal); color: #fff; justify-content: space-between; }
@media (max-width: 1000px) { .modes-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .modes-grid { grid-template-columns: 1fr; } .mode { min-height: 0; } }
.mode.wide p { margin: 0; font-size: clamp(20px, 2.4vw, 28px); font-weight: 500; letter-spacing: -0.03em; }


/* ---------- steps / engine ---------- */

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: clamp(24px, 3vw, 48px); }
.step .num { font-size: 13px; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.step h3 { margin: 10px 0 8px; font-size: 24px; font-weight: 550; letter-spacing: -0.03em; }
.step p { margin: 0; color: var(--ink-soft); font-size: 16px; }
.step .art-mini { height: 140px; background: var(--stone); margin-bottom: 18px; display: grid; place-items: center; }
.code {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 13.5px;
  background: var(--ink); color: var(--stone); padding: 12px 14px; border-radius: 10px; margin-top: 14px; overflow-x: auto;
}
.code button { flex: none; border: 0; background: rgba(255, 255, 255, 0.12); color: #fff; border-radius: 7px; padding: 4px 9px; font-size: 12px; cursor: pointer; font-family: var(--font); }

.engine { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 5vw, 80px); align-items: start; }
.engine ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.engine li { padding: 18px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 28px 1fr; gap: 10px; font-size: 16px; }
.engine li b { display: block; font-weight: 550; letter-spacing: -0.01em; }
.engine li span { color: var(--ink-soft); }
.engine li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--persimmon); margin-top: 8px; }
@media (max-width: 860px) { .engine { grid-template-columns: 1fr; } }

/* ---------- download page ---------- */

.platforms { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.platform { border: 1px solid var(--line); padding: 26px 24px; display: flex; flex-direction: column; gap: 14px; position: relative; transition: border-color 0.2s; }
.platform.mine { border-color: var(--teal); box-shadow: 0 0 0 1px var(--teal); }
.platform.mine::after { content: "your system"; position: absolute; top: -11px; left: 20px; background: var(--teal); color: #fff; font-size: 11.5px; font-weight: 550; padding: 3px 9px; border-radius: 999px; }
.platform h3 { margin: 0; font-size: 26px; font-weight: 550; letter-spacing: -0.035em; }
.platform p { margin: 0; color: var(--ink-soft); font-size: 15px; }
.platform .files { display: flex; flex-direction: column; gap: 8px; margin-top: auto; padding-top: 10px; }
.platform .files a { display: flex; justify-content: space-between; align-items: center; text-decoration: none; padding: 11px 14px; background: var(--stone-soft); border-radius: 10px; font-size: 14.5px; font-weight: 500; transition: background 0.15s; }
.platform .files a:hover { background: var(--stone); }
.platform .files a span { color: var(--ink-faint); font-size: 12.5px; font-weight: 450; }
.platform.mine .files a:first-child { background: var(--teal); color: #fff; }
.platform.mine .files a:first-child span { color: rgba(255, 255, 255, 0.7); }

.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding: 20px 0; }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 20px; font-size: clamp(18px, 2vw, 22px); font-weight: 500; letter-spacing: -0.025em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--persimmon); font-weight: 400; font-size: 1.3em; line-height: 0.8; transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 12px 0 0; color: var(--ink-soft); max-width: 62ch; }

/* ---------- footer ---------- */

.footer { padding: 40px 0 48px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-soft); }
.footer .wrap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.footer nav { display: flex; gap: 22px; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--ink); }

/* ---------- reveal on scroll ---------- */

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- hero (first screen) ---------- */

.hero {
  min-height: calc(100svh - 64px);
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  align-items: center;
  gap: clamp(28px, 4vw, 64px);
  padding-block: clamp(24px, 4vh, 56px);
}
.hero-copy { display: flex; flex-direction: column; gap: clamp(18px, 2.4vh, 26px); align-items: flex-start; }
.hero .display { font-size: clamp(44px, 6.2vw, 92px); }
.hero .row { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-hint { margin: 0; font-size: 14px; color: var(--ink-faint); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.hero-shot { margin: 0; border-radius: var(--radius-lg); overflow: hidden; background: var(--stone); box-shadow: 0 40px 80px -40px rgba(16, 16, 16, 0.35); }
.hero-shot img { width: 100%; height: auto; }
@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; padding-block: 28px 48px; }
  .hero-shot { border-radius: var(--radius-md); }
}

.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--ink-soft); background: var(--stone-soft); border: 1px solid var(--line); padding: 6px 12px; border-radius: 999px; }
.eyebrow i { width: 7px; height: 7px; border-radius: 50%; background: var(--persimmon); }

/* GitHub link in the nav: icon only on small screens */
.nav-links .gh-link { display: inline-flex !important; align-items: center; gap: 6px; }
.gh-link svg { width: 18px; height: 18px; }
@media (max-width: 720px) { .gh-link span { display: none; } }
.btn svg { width: 15px; height: 15px; }

/* ---------- mobile polish ---------- */

@media (max-width: 600px) {
  .section-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .section-head .label { padding-bottom: 0; color: var(--ink-faint); }
  .footer .wrap { flex-direction: column; align-items: flex-start; }
  .footer nav { flex-wrap: wrap; gap: 14px 22px; }
  .hero .btn { flex: 1 1 auto; justify-content: center; }
  .fake-app { min-height: 400px; }
  .reel-stage { height: clamp(420px, 120vw, 520px); }
}
@media (max-width: 420px) {
  .nav .btn.small { padding: 8px 12px; font-size: 13px; }
  .logo { font-size: 19px; }
}

/* ---------- tap targets (QA: 40px minimum on touch) ---------- */

.nav-links a:not(.btn) { padding: 10px 2px; }
.nav-links .gh-link { min-width: 40px; min-height: 40px; justify-content: center; }
.nav .btn.small { min-height: 40px; }
.demo-tabs button { min-height: 40px; padding-inline: 16px; }
.logo { min-height: 40px; }
.hero-shot picture { display: block; }
.footer nav a, .footer span a { display: inline-flex; align-items: center; min-height: 40px; }
.code button { min-height: 36px; min-width: 52px; padding: 6px 12px; }
.bubble small { font-size: 12px; }
.nav-links a:not(.btn) { min-width: 40px; justify-content: center; text-align: center; }
.byline a { text-decoration: none; align-self: flex-start; }
.byline a:hover b { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- keycaps (hero, steps, demo overlay, story chip) ----------
   A soft-gradient top on a two-tone side wall: the upper part of the wall is lighter, the lower
   part darker. --d is how tall the wall is; pressing slides the key down onto it.
   Every keycap on the site, big or small, comes from these rules. */

.cap {
  --t1: #ffffff; --t2: #f4efe8; --w1: #ddd3c6; --w2: #c8bcac; --g: #3b3631; --d: 7px;
  --wall: 0 calc(var(--d) * 0.45) 0 var(--w1), 0 var(--d) 0 var(--w2), 0 calc(var(--d) + 1px) 1px rgba(0, 0, 0, 0.08);
  --lift: 0 20px 28px -14px rgba(16, 16, 16, 0.5);
  display: inline-grid; place-items: center; flex: none;
  height: 56px; min-width: 58px; padding: 0 18px; margin-bottom: var(--d); border-radius: 14px;
  background: linear-gradient(180deg, var(--t1), var(--t2)); color: var(--g);
  font-size: 22px; font-weight: 550; line-height: 1; letter-spacing: -0.01em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), inset 0 -1px 0 rgba(0, 0, 0, 0.05), var(--wall), var(--lift);
  transition: transform 0.1s cubic-bezier(0.3, 0.7, 0.4, 1.4), box-shadow 0.1s;
  user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent;
}
.cap.t { --t1: #b0dcd6; --t2: #8fc6bf; --w1: #1f7d79; --w2: #0b5554; --g: #0a3d3c; }
.cap.o { --t1: #ffc9af; --t2: #ffa982; --w1: #ee6f38; --w2: #c84b1d; --g: #5a2008; }
.cap.sp { min-width: 152px; font-size: 18px; font-weight: 500; }

/* pressed: the key travels down onto its wall */
.cap.down, .keys-overlay.press .cap {
  transform: translateY(calc(var(--d) - 1px));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), inset 0 2px 4px rgba(0, 0, 0, 0.08), 0 1px 0 var(--w2), 0 2px 1px rgba(0, 0, 0, 0.08), 0 8px 12px -8px rgba(16, 16, 16, 0.45);
}

.keycaps { display: flex; gap: 10px; padding: 4px 0 8px; }
.keycaps .cap { cursor: pointer; }
@media (hover: hover) { .keycaps .cap:not(.down):hover { transform: translateY(-1px); } }
@media (max-width: 600px) {
  .cap { --d: 6px; height: 50px; min-width: 52px; padding: 0 15px; font-size: 20px; border-radius: 12px; }
  .cap.sp { min-width: 126px; font-size: 16px; }
}

/* ---------- demo cursor ---------- */

.cursor {
  position: absolute; left: 0; top: 0; width: 24px; height: 24px; z-index: 6; pointer-events: none;
  transform: translate(var(--x, 70%), var(--y, 70%)); transition: transform var(--dur, 600ms) cubic-bezier(0.45, 0, 0.2, 1), opacity 0.3s;
  filter: drop-shadow(0 2px 3px rgba(16, 16, 16, 0.3)); opacity: 0;
}
.cursor.on { opacity: 1; }
.cursor svg { position: absolute; inset: 0; width: 24px; height: 24px; transition: transform 0.12s; }
.cursor .arrow { left: -5px; top: -3px; }
.cursor .ibeam { left: -12px; top: -12px; display: none; }
.cursor.text .arrow { display: none; }
.cursor.text .ibeam { display: block; }
.cursor.click svg { transform: scale(0.82); }
.demo-tabs button { transition: background 0.2s, color 0.2s; }

/* ---------- story (sticky scroll scene) ---------- */

.story { background: #121212; color: #fff; }
/* 7 beats; the opening one is longer so the scroll hint gets a proper moment (see BEATS in site.js) */
.story-track { position: relative; height: calc(100vh + 7.8 * 56vh); height: calc(100svh + 7.8 * 56svh); }
.story-stage {
  position: sticky; top: 64px; height: calc(100vh - 64px); height: calc(100svh - 64px);
  display: flex; align-items: center; overflow: hidden;
}
.story-grid { width: 100%; display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 80px); align-items: center; }

.story-words span {
  color: rgba(255, 255, 255, 0.2);
  background: linear-gradient(var(--persimmon), var(--persimmon)) no-repeat 0 56% / 0% 0.07em;
  transition: color 0.45s, background-size 0.5s cubic-bezier(0.6, 0, 0.2, 1);
}
.story-words span.on { color: #fff; }
.story-words span.now { color: var(--persimmon); }
.story-words.struck span { color: rgba(255, 255, 255, 0.32); background-size: 100% 0.07em; }
.story-words.struck span:nth-of-type(2) { transition-delay: 0.08s; }
.story-words.struck span:nth-of-type(3) { transition-delay: 0.16s; }
.story-words.struck span:nth-of-type(4) { transition-delay: 0.24s; }
.story-words.struck span:nth-of-type(5) { transition-delay: 0.32s; }

.story-caps { display: grid; margin-top: clamp(16px, 3vh, 32px); }
.story-caps p {
  grid-area: 1 / 1; margin: 0; max-width: 32ch; text-wrap: balance;
  font-size: clamp(18px, 1.8vw, 22px); line-height: 1.4; letter-spacing: -0.015em; color: rgba(255, 255, 255, 0.72);
  opacity: 0; transform: translateY(10px); transition: opacity 0.4s, transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.story-caps p.on { opacity: 1; transform: none; }
.story-caps p[data-c="6"] { color: #fff; }

/* the little desktop */
.story-vis { position: relative; height: clamp(320px, 54vh, 440px); }
.sv-win {
  position: absolute; inset: 0; background: #fff; color: var(--ink); border-radius: 16px; overflow: hidden;
  box-shadow: 0 50px 90px -40px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.sv-bar { height: 44px; display: flex; align-items: center; gap: 7px; padding: 0 12px; background: var(--stone-soft); border-bottom: 1px solid var(--line); }
.sv-bar i { width: 11px; height: 11px; border-radius: 50%; background: #ddd3c6; }
.sv-tab { font-size: 12.5px; font-weight: 550; color: var(--ink-faint); padding: 6px 11px; border-radius: 8px; transition: background 0.3s, color 0.3s, box-shadow 0.3s; white-space: nowrap; }
.sv-tab:first-of-type { margin-left: 10px; }
.story-vis[data-app="slack"] .sv-tab[data-tab="slack"],
.story-vis[data-app="chat"] .sv-tab[data-tab="chat"] { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(16, 16, 16, 0.08); }

.sv-pane {
  position: absolute; inset: 44px 0 0; padding: clamp(14px, 2vw, 22px); display: flex; flex-direction: column; gap: 14px;
  opacity: 0; transform: translateX(14px); transition: opacity 0.35s, transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
  font-size: clamp(14px, 1.2vw, 15.5px); line-height: 1.5;
}
.story-vis[data-app="slack"] .sv-slack, .story-vis[data-app="chat"] .sv-chat { opacity: 1; transform: none; }

.sv-msg { display: flex; gap: 11px; }
.sv-av { width: 32px; height: 32px; border-radius: 9px; background: var(--teal-light); flex: none; }
.sv-msg b { font-size: 13px; display: block; }
.sv-msg p { margin: 0; color: #2b2925; }
.sv-composer { margin-top: auto; display: grid; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; min-height: 96px; transition: border-color 0.3s; }
.sv-messy, .sv-clean { grid-area: 1 / 1; transition: opacity 0.3s; }
.sv-clean { opacity: 0; }
.sv-t { border-radius: 3px; padding: 2px 0; box-decoration-break: clone; -webkit-box-decoration-break: clone; transition: background-color 0.3s; }
.story-vis[data-beat="1"] .sv-messy .sv-t, .story-vis[data-beat="6"] .sv-messy .sv-t { background-color: #ffd7c4; }
.story-vis[data-beat="5"] .sv-messy { opacity: 0; }
.story-vis[data-beat="5"] .sv-clean { opacity: 1; }
.story-vis[data-beat="5"] .sv-composer { border-color: var(--teal); }

.sv-empty { margin: auto 0; text-align: center; color: var(--ink-faint); font-size: clamp(17px, 1.6vw, 20px); font-weight: 500; letter-spacing: -0.02em; transition: opacity 0.3s; }
.sv-thread { display: none; flex-direction: column; gap: 12px; }
.story-vis[data-beat="4"] .sv-empty { display: none; }
.story-vis[data-beat="4"] .sv-thread { display: flex; animation: sv-in 0.45s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes sv-in { from { opacity: 0; transform: translateY(10px); } }
.sv-user { align-self: flex-end; max-width: 82%; background: var(--stone-soft); border-radius: 16px 16px 4px 16px; padding: 9px 13px; font-size: 0.92em; }
.sv-user span { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; color: var(--ink-soft); }
.sv-user b { font-weight: 550; }
.sv-bot small { display: block; color: var(--ink-soft); font-size: 0.92em; margin-bottom: 4px; }
.story-vis[data-beat="4"] .sv-answer .sv-t { background-color: rgba(15, 107, 106, 0.18); }

.sv-input { margin-top: auto; display: flex; align-items: flex-end; gap: 10px; background: var(--stone-soft); border-radius: 14px; padding: 10px 10px 10px 14px; min-height: 54px; }
.sv-field { flex: 1; min-width: 0; align-self: center; font-size: 0.95em; }
.sv-pasted { display: none; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sv-prompt { display: none; font-weight: 550; white-space: nowrap; overflow: hidden; width: 0; vertical-align: bottom; }
.story-vis[data-beat="2"] .sv-pasted, .story-vis[data-beat="3"] .sv-pasted { display: -webkit-box; }
.story-vis[data-beat="3"] .sv-pasted { -webkit-line-clamp: 1; }
.story-vis[data-beat="3"] .sv-prompt { display: inline-block; animation: sv-type 0.9s steps(22, end) forwards; }
@keyframes sv-type { to { width: 22ch; } }
.sv-send { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--stone); color: var(--ink-faint); flex: none; transition: background 0.3s, color 0.3s; }
.sv-send svg { width: 15px; height: 15px; }
.story-vis[data-beat="2"] .sv-send, .story-vis[data-beat="3"] .sv-send { background: var(--ink); color: #fff; }

.sv-pop {
  position: absolute; right: 14px; top: 58px; width: min(84%, 360px); z-index: 2;
  background: #fff; border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 9px;
  box-shadow: 0 30px 60px -20px rgba(16, 16, 16, 0.45), 0 0 0 1px var(--line);
  opacity: 0; transform: translateY(10px) scale(0.97); transition: opacity 0.25s, transform 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2);
  font-size: 13.5px; line-height: 1.45;
}
.story-vis[data-beat="6"] .sv-pop { opacity: 1; transform: none; transition-delay: 0.25s; }
.sv-pop-bar { display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: 13px; }
.sv-pop-bar span { display: flex; align-items: center; gap: 7px; }
.sv-pop-bar img { width: 18px; height: 18px; }
.sv-pop-bar em { font-style: normal; font-weight: 450; font-size: 12px; color: var(--ink-soft); display: flex; align-items: center; gap: 5px; }
.sv-pop-bar em::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--persimmon); }
.sv-pop-modes { display: flex; gap: 2px; }
.sv-pop-modes span { padding: 3px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 500; color: var(--ink-soft); }
.sv-pop-modes .on { background: var(--teal); color: #fff; }
.sv-pop-out { background: var(--teal-tint); border-radius: 11px; padding: 9px 11px; }
.sv-pop-foot { display: flex; justify-content: flex-end; }
.sv-pop-foot b { font-weight: 550; font-size: 12px; padding: 5px 10px; border-radius: 8px; background: var(--teal); color: #fff; }

.sv-key {
  position: absolute; left: 50%; bottom: -26px; z-index: 3; display: flex; gap: 8px;
  transform: translate(-50%, 10px); opacity: 0; transition: opacity 0.25s, transform 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.sv-key.show { opacity: 1; transform: translate(-50%, 0); }
.sv-key .cap { --d: 6px; height: 46px; min-width: 48px; font-size: 18px; padding: 0 14px; border-radius: 12px; }
.sv-key .cap.sp { min-width: 112px; font-size: 15px; }
.sv-key.tap .cap { animation: cap-tap 0.5s 0.15s both; }
@keyframes cap-tap {
  40% {
    transform: translateY(calc(var(--d) - 1px));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), inset 0 2px 4px rgba(0, 0, 0, 0.08), 0 1px 0 var(--w2), 0 2px 1px rgba(0, 0, 0, 0.08), 0 8px 12px -8px rgba(16, 16, 16, 0.45);
  }
}

.sv-cursor {
  position: absolute; left: -5px; top: -3px; width: 24px; height: 24px; z-index: 4; pointer-events: none;
  transform: translate(var(--x, 80%), var(--y, 80%)); transition: transform 0.75s cubic-bezier(0.45, 0, 0.2, 1), opacity 0.3s;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
}
.story-vis[data-beat="6"] .sv-cursor { opacity: 0; }

/* scroll hint: a small bubble that rises from the bottom of the scene, sinks away once it starts */
.story-stage { z-index: 46; } /* above the page's bottom-edge blur so the bubble stays crisp */
.story-hint {
  position: absolute; left: 50%; bottom: clamp(18px, 4vh, 36px); z-index: 2; margin: 0;
  display: flex; align-items: center; gap: 10px;
  padding: 8px 16px 8px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.14);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: 0 12px 30px -12px rgba(0, 0, 0, 0.6);
  font-size: 13.5px; font-weight: 500; letter-spacing: -0.005em; color: rgba(255, 255, 255, 0.82); white-space: nowrap;
  --hx: -50%;
  opacity: 0; transform: translate(var(--hx), 48px) scale(0.9); pointer-events: none;
  transition: opacity 0.45s, transform 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.25);
}
.story-track.near .story-hint { opacity: 1; transform: translate(var(--hx), 0) scale(1); animation: hint-bob 2.4s 0.8s ease-in-out infinite; }
.story-track.near.started .story-hint { opacity: 0; transform: translate(var(--hx), 48px) scale(0.9); animation: none; }
@keyframes hint-bob { 50% { transform: translate(var(--hx), -5px) scale(1); } }
.story-hint i { position: relative; width: 16px; height: 24px; border: 1.5px solid rgba(255, 255, 255, 0.5); border-radius: 8px; flex: none; }
.story-hint i::after {
  content: ""; position: absolute; left: 50%; top: 5px; width: 3px; height: 5px; margin-left: -1.5px; border-radius: 2px;
  background: var(--persimmon); animation: hint-wheel 1.5s cubic-bezier(0.6, 0, 0.3, 1) infinite;
}
@keyframes hint-wheel { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(8px); opacity: 0; } 100% { transform: translateY(0); opacity: 0; } }
@media (max-width: 860px) { .story-hint { font-size: 13px; padding: 7px 14px 7px 9px; } }
/* phones held sideways: the window fills the bottom right, so the hint sits under the words instead */
@media (max-height: 520px) and (orientation: landscape) {
  .story-hint { --hx: 0; left: var(--gutter); bottom: 12px; font-size: 12.5px; padding: 6px 12px 6px 8px; }
}

.story-after { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 80px); padding-block: clamp(40px, 6vw, 80px) clamp(72px, 10vw, 140px); }
.story-body { grid-column: 2; }
.story-side { display: flex; flex-direction: column; gap: clamp(20px, 3vw, 36px); align-self: start; position: sticky; top: 112px; }
.story-side .h2 { color: #fff; }
.story-side .byline { margin: 0 !important; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, 0.14); }
.story-body p { margin: 0 0 1.1em; font-size: clamp(18px, 1.7vw, 21px); line-height: 1.6; letter-spacing: -0.012em; color: rgba(255, 255, 255, 0.74); max-width: 56ch; }
.story-body p:first-child { color: #fff; }
.byline { margin: 26px 0 0 !important; display: flex; flex-direction: column; gap: 2px; }
.byline b { font-size: 16px; font-weight: 600; letter-spacing: -0.015em; color: #fff; }
.byline small { font-size: 14px; color: rgba(255, 255, 255, 0.55); }

@media (max-width: 860px) {
  .story-grid { grid-template-columns: minmax(0, 1fr); gap: clamp(18px, 3.5vh, 32px); align-content: center; }
  .story-words { font-size: clamp(34px, 9vw, 52px); }
  .story-caps p { font-size: 17px; max-width: 34ch; }
  .story-vis { height: clamp(250px, 40vh, 360px); height: clamp(250px, 40svh, 360px); margin-bottom: 26px; }
  .story-after { grid-template-columns: minmax(0, 1fr); padding-top: 24px; }
  .story-body { grid-column: auto; }
  .story-side { position: static; }
}
@media (max-width: 600px) {
  .sv-tab { padding: 5px 8px; font-size: 12px; }
  .sv-bar i { width: 9px; height: 9px; }
  .sv-pop-modes span:nth-child(4) { display: none; }
  .sv-composer { min-height: 84px; }
}
@media (max-height: 640px) and (max-width: 860px) {
  .story-words { font-size: 30px; }
  .story-vis { height: 220px; }
  .sv-msg { display: none; }
}

/* ---------- progressive blur at the bottom edge of the viewport ---------- */

.edge-blur { position: fixed; left: 0; right: 0; bottom: 0; height: clamp(56px, 9vh, 104px); pointer-events: none; z-index: 45; transition: opacity 0.4s; }
.edge-blur.off { opacity: 0; }
.edge-blur i { position: absolute; inset: 0; }
.edge-blur i:nth-child(1) { -webkit-backdrop-filter: blur(0.5px); backdrop-filter: blur(0.5px); -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 20%, #000 40%, transparent 60%); mask-image: linear-gradient(to bottom, transparent 0%, #000 20%, #000 40%, transparent 60%); }
.edge-blur i:nth-child(2) { -webkit-backdrop-filter: blur(1.5px); backdrop-filter: blur(1.5px); -webkit-mask-image: linear-gradient(to bottom, transparent 20%, #000 40%, #000 60%, transparent 80%); mask-image: linear-gradient(to bottom, transparent 20%, #000 40%, #000 60%, transparent 80%); }
.edge-blur i:nth-child(3) { -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); -webkit-mask-image: linear-gradient(to bottom, transparent 40%, #000 60%, #000 80%, transparent 100%); mask-image: linear-gradient(to bottom, transparent 40%, #000 60%, #000 80%, transparent 100%); }
.edge-blur i:nth-child(4) { -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); -webkit-mask-image: linear-gradient(to bottom, transparent 60%, #000 80%); mask-image: linear-gradient(to bottom, transparent 60%, #000 80%); }
.edge-blur i:nth-child(5) { -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); -webkit-mask-image: linear-gradient(to bottom, transparent 80%, #000 100%); mask-image: linear-gradient(to bottom, transparent 80%, #000 100%); }

/* ---------- legal pages ---------- */

.legal > * { max-width: 720px; }
.legal { padding-block: clamp(16px, 3vw, 40px) clamp(64px, 9vw, 120px); }
.legal .updated { color: var(--ink-faint); font-size: 14px; margin: 0 0 32px; }
.legal .summary { font-size: clamp(19px, 2vw, 23px); line-height: 1.5; letter-spacing: -0.02em; margin: 0 0 40px; padding: 22px 24px; background: var(--stone-soft); border-radius: var(--radius-md); }
.legal h2 { font-size: clamp(22px, 2.4vw, 28px); font-weight: 550; letter-spacing: -0.03em; margin: 48px 0 12px; line-height: 1.2; }
.legal p, .legal li { color: #2b2925; font-size: 17px; line-height: 1.65; }
.legal p { margin: 0 0 14px; }
.legal ul { margin: 0 0 14px; padding-left: 20px; }
.legal li { margin-bottom: 8px; }
.legal li::marker { color: var(--persimmon); }
.legal a { color: var(--teal); text-underline-offset: 3px; }
.legal b { font-weight: 600; color: var(--ink); }

/* short landscape phones: side by side again, sized to the screen */
@media (max-height: 520px) and (orientation: landscape) {
  .story-grid { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 24px; align-items: center; }
  .story-words { font-size: clamp(24px, 6.4vh, 32px); }
  .story-caps { margin-top: 10px; }
  .story-caps p { font-size: 14.5px; }
  .story-vis { height: calc(100vh - 64px - 64px); height: calc(100svh - 64px - 64px); margin-bottom: 0; }
  .sv-msg { display: none; }
  .sv-key { bottom: -14px; }
  .sv-key .cap { --d: 4px; height: 36px; min-width: 38px; font-size: 15px; padding: 0 11px; border-radius: 10px; }
  .sv-key .cap.sp { min-width: 84px; font-size: 13px; }
  .sv-pop { top: 50px; }
  .sv-pop-modes, .sv-pop-foot { display: none; }
}

/* ---------- demo: the plate on the screen edge ---------- */

.fake-plate {
  position: absolute; left: 0; top: calc(50% + 20px); z-index: 5; transform: translateY(-50%);
  display: flex; align-items: center; gap: 10px; overflow: hidden;
  width: 7px; height: 58px; padding-left: 0; border-radius: 0 10px 10px 0;
  background: var(--teal); box-shadow: 0 6px 18px -6px rgba(16, 16, 16, 0.35);
  opacity: 0; pointer-events: none;
  transition: width 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.1), height 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.1), background 0.2s, padding 0.22s, opacity 0.3s, border-radius 0.22s;
}
.demo.with-plate .fake-plate { opacity: 1; }
.fake-plate img { width: 22px; height: 22px; flex: none; opacity: 0; transition: opacity 0.15s; }
.fake-plate span { display: flex; flex-direction: column; white-space: nowrap; opacity: 0; transform: translateX(-6px); transition: opacity 0.15s, transform 0.22s; }
.fake-plate b { font-size: 14px; font-weight: 600; letter-spacing: -0.015em; }
.fake-plate small { font-size: 11.5px; color: var(--ink-soft); }
.fake-plate.drag, .fake-plate.got {
  width: 210px; height: 112px; padding-left: 16px; border-radius: 0 18px 18px 0;
  background: #fff; box-shadow: 0 30px 60px -20px rgba(16, 16, 16, 0.45), 0 0 0 1px var(--line);
}
.fake-plate.drag::after {
  content: ""; position: absolute; inset: 7px 7px 7px 0; border-radius: 0 12px 12px 0;
  border: 1.5px dashed var(--persimmon); border-left: 0; animation: plate-breathe 1.1s ease-in-out infinite alternate;
}
@keyframes plate-breathe { from { opacity: 0.45; } to { opacity: 1; } }
.fake-plate.got { background: var(--teal-tint); }
.fake-plate.got b { color: var(--teal); }
.fake-plate.drag img, .fake-plate.got img, .fake-plate.drag span, .fake-plate.got span { opacity: 1; transform: none; }

.drag-ghost {
  position: absolute; left: 16px; top: 20px; white-space: nowrap; pointer-events: none;
  font-size: 13px; line-height: 1.3; padding: 5px 9px; border-radius: 7px;
  background: rgba(255, 215, 196, 0.92); color: var(--ink); box-shadow: 0 8px 20px -8px rgba(16, 16, 16, 0.35);
  opacity: 0; transform: scale(0.9); transform-origin: 0 0; transition: opacity 0.18s, transform 0.18s;
}
.drag-ghost.show { opacity: 1; transform: none; }
@media (max-width: 600px) {
  .fake-plate.drag, .fake-plate.got { width: 186px; height: 100px; padding-left: 12px; }
  .drag-ghost { font-size: 12px; max-width: 46vw; overflow: hidden; text-overflow: ellipsis; }
}

/* ---------- hero: the shortcut, or the plate (a tiny screen-edge scene) ---------- */

/* keys on top, the scene under them at exactly the keys' width, one tidy block
   (side by side ran into the hero picture) */
.ways { display: grid; grid-template-columns: max-content; gap: 16px; padding: 4px 0 8px; }
.ways .keycaps { padding: 0; }
/* "or" between the two ways in: a thin rule with the word in the middle */
.ways-or { display: flex; align-items: center; gap: 12px; font-size: 13px; font-weight: 500; color: var(--ink-faint); line-height: 1; }
.ways-or::before, .ways-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.edge-scene {
  --w: 100%; --h: 124px;
  position: relative; flex: none; width: var(--w); height: var(--h); padding: 0; border: 0; cursor: pointer;
  border-radius: 16px; overflow: hidden; font: inherit; text-align: left;
  background-color: var(--stone);
  background-image: radial-gradient(rgba(16, 16, 16, 0.1) 1.1px, transparent 1.3px);
  background-size: 14px 14px;
  box-shadow: inset 0 0 0 1px rgba(16, 16, 16, 0.06), 0 16px 30px -22px rgba(16, 16, 16, 0.45);
  transition: transform 0.2s cubic-bezier(0.2, 0.9, 0.3, 1.2), box-shadow 0.2s;
}
.edge-scene:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px rgba(16, 16, 16, 0.06), 0 22px 36px -22px rgba(16, 16, 16, 0.5); }
.edge-scene:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }

/* the app window, with a selected line that turns into a rewritten one */
.es-win {
  position: absolute; left: 62px; top: 16px; right: 14px; bottom: 16px; padding: 22px 10px 0;
  background: #fff; border-radius: 9px; box-shadow: 0 10px 18px -12px rgba(16, 16, 16, 0.45), 0 0 0 1px rgba(16, 16, 16, 0.05);
}
.es-win::before { content: ""; position: absolute; left: 8px; top: 8px; width: 26px; height: 5px; background: radial-gradient(circle at 2.5px 2.5px, #ddd3c6 2.5px, transparent 3px) 0 0 / 9px 5px repeat-x; }
.es-line { display: block; height: 5px; border-radius: 3px; background: #ece5db; margin-bottom: 7px; }
.es-sel { width: 86%; background: #ffd2bd; }

/* the plate's rail on the screen edge */
.es-rail {
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 5px 5px 5px 4px;
  background: #fff; border-radius: 0 12px 12px 0; box-shadow: 0 10px 22px -10px rgba(16, 16, 16, 0.5), 0 0 0 1px rgba(16, 16, 16, 0.05);
}
.es-rail::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 2.5px; border-radius: 0 2px 2px 0; background: var(--teal); }
.es-btn { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; color: var(--ink-soft); }
.es-btn svg { width: 14px; height: 14px; }
.es-main { background: var(--teal); color: #fff; }
.es-sep { width: 14px; height: 1px; background: rgba(16, 16, 16, 0.1); margin: 1px 0; }
.es-tip {
  position: absolute; left: 42px; top: 20px; z-index: 2;
  font-size: 10.5px; font-weight: 600; letter-spacing: -0.005em; color: #fff; background: var(--ink);
  padding: 3px 7px; border-radius: 6px; white-space: nowrap; opacity: 0;
}
.es-cursor { position: absolute; left: 0; top: 0; width: 16px; height: 16px; z-index: 3; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3)); transform: translate(118px, 84px); }

/* a calm loop: pointer drifts to Rephrase, its label shows, click, the selection comes back rewritten */
.edge-scene .es-cursor { animation: es-cursor 5.6s cubic-bezier(0.45, 0, 0.2, 1) infinite; }
.edge-scene .es-tip { animation: es-tip 5.6s ease infinite; }
.edge-scene .es-main { animation: es-main 5.6s ease infinite; }
.edge-scene .es-sel { animation: es-sel 5.6s ease infinite; }
@keyframes es-cursor {
  0%, 8% { transform: translate(118px, 84px); }
  30%, 38% { transform: translate(17px, 27px) scale(1); }
  41% { transform: translate(17px, 27px) scale(0.82); }
  44%, 70% { transform: translate(17px, 27px) scale(1); }
  92%, 100% { transform: translate(118px, 84px); }
}
@keyframes es-tip { 0%, 28% { opacity: 0; transform: translateX(-4px); } 32%, 66% { opacity: 1; transform: none; } 72%, 100% { opacity: 0; } }
@keyframes es-main { 0%, 38% { background: var(--teal); } 41% { background: var(--teal-deep); transform: scale(0.9); } 46%, 100% { background: var(--teal); transform: none; } }
@keyframes es-sel { 0%, 46% { background: #ffd2bd; width: 86%; } 54%, 84% { background: #bfe0dc; width: 70%; } 92%, 100% { background: #ffd2bd; width: 86%; } }

@media (prefers-reduced-motion: reduce) {
  .edge-scene .es-cursor { transform: translate(17px, 27px); }
  .edge-scene .es-tip { opacity: 1; }
}

/* phones: the scene gets its own full-width row under the keys, so it's big enough to read */
@media (max-width: 600px) {
  .ways { grid-template-columns: 100%; gap: 14px; width: 100%; }
  .edge-scene { --h: 118px; }
  .es-win { left: 70px; right: 16px; }
  .es-sel { width: 70%; }
}
@media (max-width: 380px) {
  .ways .keycaps { gap: 8px; }
  .ways .cap.sp { min-width: 104px; }
}

/* "How it works" steps: the same keycaps, sized for the little picture boxes */
.step .art-mini .keycaps { padding: 0; cursor: default; }
.step .art-mini .cap { cursor: default; }
.cap.enter { min-width: 84px; font-size: 22px; }
@media (max-width: 380px) { .step .art-mini .cap.sp { min-width: 104px; } }

/* step 01's sample sentence: wraps inside its box instead of running off the edges */
.step-sample { padding: 0 20px; text-align: center; font-size: 16.5px; line-height: 1.6; letter-spacing: -0.01em; max-width: 26ch; }
.step-sample mark { background: #ffd7c4; color: inherit; padding: 2px 1px; border-radius: 3px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }

/* footer sign-off */
.footer .brewed { display: block; line-height: 1.5; }
.footer .brewed > span { margin-right: 2px; }
.footer .brewed a { white-space: nowrap; color: var(--ink); font-weight: 550; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; min-height: 0; display: inline; }
.footer .brewed a:hover { text-decoration-color: currentColor; }
.footer .stats { display: block; margin-top: 4px; font-variant-numeric: tabular-nums; }
.footer .stats[hidden] { display: none; }
