/* ============================================================
   TypeNext — warm + clean evolved
   Cream paper · serif display · terracotta accent (reserved)
   ============================================================ */

:root {
  color-scheme: light;

  /* paper + surfaces */
  --paper: #f7f4ed;
  --paper-2: #f2ece0;
  --surface: #fffdf8;
  --surface-2: #ffffff;

  /* ink */
  --ink: #1c1813;
  --muted: #57503f;
  --quiet: #6b6150;

  /* lines */
  --line: #e7e1d3;
  --line-soft: rgba(28, 24, 19, 0.08);
  --line-strong: rgba(28, 24, 19, 0.14);

  /* accents */
  --terracotta: #a83c14;
  --terracotta-2: #c2521f;
  --forest: #38573f;
  --forest-2: #2f4a35;
  --blue: #2563eb;       /* used only inside app mockups */
  --green: #1f9d57;      /* used only inside app mockups */

  /* gold — the "speed" lightning spark (added with the mockup refresh) */
  --gold: #efb02f;
  --gold-2: #f7c64d;
  --gold-edge: #c08418;

  /* shadows */
  --shadow-sm: 0 6px 20px rgba(58, 44, 28, 0.06);
  --shadow: 0 18px 50px rgba(58, 44, 28, 0.10);
  --shadow-lg: 0 34px 90px rgba(58, 44, 28, 0.14);

  /* type */
  --serif: "New York", ui-serif, "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", system-ui, sans-serif;
  --mono: "SF Mono", "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;

  /* layout */
  --max: 1200px;
  --pad: clamp(20px, 5vw, 64px);
  --radius: 16px;
  --radius-lg: 24px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  background: var(--paper);
  background-image:
    radial-gradient(1200px 600px at 78% -8%, rgba(168, 60, 20, 0.05), transparent 60%),
    radial-gradient(900px 500px at -5% 4%, rgba(56, 87, 63, 0.05), transparent 55%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }

svg path { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
h1, h2, h3, h4, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }

code {
  font-family: var(--mono);
  font-size: 0.88em;
  padding: 0.1em 0.4em;
  border-radius: 6px;
  background: rgba(28, 24, 19, 0.06);
  color: var(--muted);
}
code.tok {
  background: rgba(56, 87, 63, 0.1);
  color: var(--forest-2);
}

kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 28px;
  padding: 0 9px;
  border: 1px solid rgba(28, 24, 19, 0.2);
  border-bottom-width: 2px;
  border-radius: 7px;
  background: linear-gradient(#fffefb, #efe9dc);
  box-shadow: 0 1px 0 rgba(28, 24, 19, 0.05);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

::selection { color: #fff; background: var(--terracotta); }

/* ---------- a11y helpers ---------- */
.sr-only, .skip-link {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}
.skip-link:focus {
  top: 12px; left: 12px; z-index: 200;
  width: auto; height: auto; padding: 10px 16px; margin: 0;
  clip: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  box-shadow: var(--shadow);
}

:focus-visible {
  outline: 2px solid var(--terracotta);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- layout ---------- */
.shell {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 244, 237, 0.72);
  backdrop-filter: saturate(140%) blur(16px);
  -webkit-backdrop-filter: saturate(140%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease, background 200ms ease;
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(247, 244, 237, 0.88);
}
/* fall back to a near-opaque bar where backdrop-filter isn't supported */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header { background: rgba(247, 244, 237, 0.97); }
  .site-header.is-scrolled { background: rgba(247, 244, 237, 1); }
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding: 14px var(--pad);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 23px;
  letter-spacing: -0.01em;
}
.brand img { width: 32px; height: 32px; border-radius: 8px; box-shadow: var(--shadow-sm); }

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.4vw, 34px);
  font-size: 15px;
  font-weight: 500;
}
.site-nav a:not(.nav-cta) {
  position: relative;
  color: var(--muted);
  padding-block: 6px;
  transition: color 160ms ease;
}
.site-nav a:not(.nav-cta):hover { color: var(--ink); }
.site-nav a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1.5px;
  background: var(--terracotta);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}
.site-nav a:not(.nav-cta):hover::after,
.site-nav a.is-active::after { transform: scaleX(1); }

.nav-toggle { display: none; }

/* ============================================================
   BUTTONS
   ============================================================ */
.button, .nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: var(--surface-2);
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease, color 160ms ease;
}
.button svg, .nav-cta svg { width: 18px; height: 18px; }
.button:hover, .nav-cta:hover { transform: translateY(-2px); }

.nav-cta, .button.primary {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(180deg, var(--terracotta-2), var(--terracotta));
  box-shadow: 0 10px 24px rgba(168, 60, 20, 0.26);
}
.nav-cta { min-height: 42px; padding: 0 18px; }
.button.primary:hover, .nav-cta:hover { box-shadow: 0 16px 32px rgba(168, 60, 20, 0.32); }

.button.ghost { background: rgba(255, 253, 248, 0.6); }
.button.ghost:hover { border-color: rgba(56, 87, 63, 0.5); color: var(--forest); background: var(--surface-2); }

.button.big { min-height: 54px; padding: 0 28px; font-size: 16px; border-radius: 13px; }

/* ============================================================
   HERO
   ============================================================ */
.hero { padding: clamp(40px, 7vw, 88px) 0 clamp(48px, 6vw, 80px); overflow: hidden; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.06fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.7);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.eyebrow .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--forest);
  box-shadow: 0 0 0 4px rgba(56, 87, 63, 0.16);
}

h1 {
  margin-top: 26px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(48px, 8.2vw, 104px);
  line-height: 0.96;
  letter-spacing: -0.02em;
}
h1 em { font-style: italic; color: var(--terracotta); }

.lede {
  max-width: 30em;
  margin-top: 26px;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 21px);
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 30px;
  color: var(--quiet);
  font-size: 14px;
  font-weight: 500;
}
.hero-proof li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.hero-proof li + li { position: relative; padding-left: 22px; }
.hero-proof li + li::before {
  content: "";
  position: absolute; left: 0; top: 50%;
  width: 4px; height: 4px; margin-top: -2px;
  border-radius: 50%; background: var(--line-strong);
}
.hero-proof kbd { height: 25px; min-width: 26px; }

/* ---------- hero showcase ---------- */
.hero-visual { position: relative; }
.showcase {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 7px 7px, rgba(28, 24, 19, 0.05) 1px, transparent 1.4px) 0 0 / 26px 26px,
    rgba(255, 255, 255, 0.55);
  box-shadow: var(--shadow-lg);
}
.showcase-rail {
  display: grid;
  align-content: center;
  gap: 10px;
}
.showcase-rail button {
  display: grid;
  place-items: center;
  width: 56px; height: 56px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.85);
  color: #97917f;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 160ms ease, color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}
.showcase-rail button svg { width: 26px; height: 26px; }
.showcase-rail button:hover { transform: translateY(-2px); color: var(--terracotta); }
.showcase-rail button.is-active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(180deg, var(--terracotta-2), var(--terracotta));
  box-shadow: 0 12px 24px rgba(168, 60, 20, 0.3);
}

.showcase-screen {
  position: relative;
  min-height: 430px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-2);
  overflow: hidden;
}

.scene {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 16px;
  padding: 22px;
  opacity: 0;
  transform: translateY(12px) scale(0.99);
  pointer-events: none;
  transition: opacity 360ms ease, transform 360ms ease;
}
.scene.is-active { opacity: 1; transform: none; pointer-events: auto; }

.scene-bar {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #6a7384;
  font-size: 13px;
  font-weight: 600;
}
.traffic { display: inline-flex; gap: 7px; }
.traffic i { width: 11px; height: 11px; border-radius: 50%; background: #f0635a; }
.traffic i:nth-child(2) { background: #f4b740; }
.traffic i:nth-child(3) { background: #45c95f; }
.app-dot { width: 24px; height: 24px; border-radius: 7px; }
.app-dot.blue { background: var(--blue); }
.app-dot.green { background: var(--green); }
.app-dot.amber { background: #e0a92b; }
.app-dot.slate { background: #3a4658; }
.app-dot.gpt { background: #0d8f6f; }
.app-dot.x { background: #1c1813; }

.scene-body { display: grid; align-content: center; gap: 14px; }

.scene-foot {
  display: flex;
  align-items: center;
  gap: 11px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  color: #6a7384;
  font-size: 12.5px;
  line-height: 1.35;
}
.scene-foot kbd { flex: none; }
.scene-foot .foot-icon { width: 18px; height: 18px; flex: none; color: var(--forest); }

/* ghost + caret (shared) */
.ghost { color: rgba(110, 102, 88, 0.4); }
.bubble.me .ghost { color: rgba(255, 255, 255, 0.55); }
.term .ghost { color: rgba(232, 238, 247, 0.4); }
.caret {
  display: inline-block;
  width: 2px; height: 1.05em;
  margin-left: 1px;
  vertical-align: -0.18em;
  background: var(--ink);
  animation: blink 1.1s steps(2, start) infinite;
}
.bubble.me .caret { background: #fff; }
.term .caret { background: #58d27c; }

/* mail */
.mail-body { gap: 14px; }
.msg {
  width: min(440px, 100%);
  padding: 15px 17px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.msg .who { display: block; margin-bottom: 6px; color: #717a8a; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.msg p { color: #1b2433; font-size: 17px; line-height: 1.45; }
.msg.out { justify-self: end; border-color: rgba(168, 60, 20, 0.22); background: #fff8f4; }

/* messages */
.chat-body { gap: 12px; }
.bubble { max-width: min(80%, 360px); padding: 12px 16px; border-radius: 18px; font-size: 18px; line-height: 1.4; }
.bubble.them { color: #1b2433; background: #eaedf3; }
.bubble.me { justify-self: end; color: #fff; background: var(--blue); }
.voice-foot { gap: 12px; }

/* notes */
.notes-body { align-content: center; }
.sticky {
  display: grid;
  gap: 8px;
  max-width: 420px;
  margin-inline: auto;
  padding: 24px 26px;
  border-radius: 14px;
  background: linear-gradient(180deg, #fff6c2, #ffef9c);
  box-shadow: 0 16px 30px rgba(120, 105, 40, 0.16);
}
.sticky .sticky-title { color: #2a2410; font-family: var(--sans); font-size: 20px; font-weight: 800; }
.sticky p { color: #2a2410; font-size: 17px; line-height: 1.4; }

/* slack */
.slack-body { gap: 20px; }
.slack-row { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: center; padding: 14px; border-radius: 12px; background: #f1f3f7; }
.avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 9px; color: #fff; background: #6a788f; font-weight: 800; }
.slack-row p { color: #2a3346; font-size: 16px; line-height: 1.4; }
.slack-row strong { margin-right: 7px; color: #131a28; }
.slack-input {
  min-height: 70px;
  padding: 16px 18px;
  border: 1px solid #dde2ea;
  border-radius: 12px;
  background: #fff;
  color: #1b2433;
  font-size: 18px;
  line-height: 1.4;
}

/* terminal */
.term-body { align-content: center; }
.term {
  max-width: 480px;
  margin-inline: auto;
  border-radius: 14px;
  background: #141f31;
  box-shadow: 0 20px 38px rgba(20, 31, 49, 0.24);
  overflow: hidden;
}
.term-bar { display: flex; align-items: center; gap: 11px; padding: 12px 15px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); color: #8190a8; font-family: var(--mono); font-size: 12px; }
.term p { padding: 22px 18px; color: #e7edf6; font-family: var(--mono); font-size: 16px; line-height: 1.55; }
.term .prompt-mark { color: #58d27c; font-weight: 700; margin-right: 8px; }

/* waveform */
.wave, .wave.long, .wave.small {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 24px;
}
.wave i { width: 2.5px; border-radius: 99px; background: var(--forest); height: 12px; animation: wave 1.2s ease-in-out infinite; }
.wave i:nth-child(2n) { height: 20px; animation-delay: 90ms; }
.wave i:nth-child(3n) { height: 9px; animation-delay: 180ms; }
.wave i:nth-child(4n) { height: 24px; animation-delay: 60ms; }
.wave i:nth-child(5n) { height: 15px; animation-delay: 240ms; }
.wave.small { height: 16px; }
.wave.small i { height: 8px; }
.wave.small i:nth-child(2n) { height: 14px; }
.wave.long { height: 40px; flex: 1; }
.wave.long i { width: 3px; height: 16px; }

/* ---------- hero scene app mockups (email, ChatGPT, X) ---------- */
/* Mail rendered as a real email */
.email-body { align-content: start; gap: 0; }
.email-head { padding-bottom: 13px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.email-row { display: flex; gap: 12px; padding: 4px 0; color: #1b2433; font-size: 15px; line-height: 1.4; }
.email-row .el { width: 62px; flex: none; color: #8a93a3; font-weight: 600; }
.email-text { font-size: 18px; line-height: 1.5; color: #1b2433; overflow-wrap: anywhere; }

/* ChatGPT prompt box */
.gpt-body { align-content: center; }
.gpt-input {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px;
  padding: 16px 16px 16px 19px;
  border: 1px solid #d7dae0; border-radius: 20px; background: #fff; box-shadow: var(--shadow-sm);
}
.gpt-text { font-size: 17px; line-height: 1.5; color: #1b2433; overflow-wrap: anywhere; }
.gpt-send { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #1c1813; flex: none; }
.gpt-send svg { width: 18px; height: 18px; }
.gpt-send svg path { stroke: #fff; }

/* X compose */
.x-body { grid-template-columns: 44px minmax(0, 1fr); gap: 14px; align-content: center; align-items: start; }
.x-avatar { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(140deg, var(--terracotta-2), var(--forest)); flex: none; }
.x-main { display: grid; gap: 16px; min-width: 0; }
.x-text { font-size: 19px; line-height: 1.4; color: #0f1419; overflow-wrap: anywhere; }
.x-bar { display: flex; justify-content: flex-end; }
.x-post { padding: 8px 20px; border-radius: 999px; background: #1c1813; color: #fff; font-size: 14px; font-weight: 700; }

/* live scene animation: ghost fade-in, just-filled highlight, rephrase swap */
.scene .ghost.in { animation: ghostIn 0.32s ease; }
.scene .just { border-radius: 4px; animation: justFilled 0.9s ease; }
@keyframes justFilled { 0% { background: rgba(56, 87, 63, 0.22); } 100% { background: transparent; } }
.scene [data-scene-typed] { transition: opacity 0.2s ease; }
.scene [data-scene-typed].swapout { opacity: 0; }

/* ============================================================
   SECTION SCAFFOLD
   ============================================================ */
section[class] { scroll-margin-top: 80px; }

.trio, .feature, .more, .usecases, .privacy, .how, .faq, .download {
  padding-block: clamp(64px, 9vw, 128px);
}

.section-head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 60px); }
.section-head.center { margin-inline: auto; text-align: center; }
.kicker {
  display: inline-block;
  margin-bottom: 16px;
  color: var(--terracotta);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(32px, 4.6vw, 56px);
  line-height: 1.02;
  letter-spacing: -0.018em;
}
.section-head .sub, .feature-copy .sub, .privacy-copy .sub {
  margin-top: 20px;
  color: var(--muted);
  font-size: clamp(17px, 1.6vw, 19px);
  line-height: 1.55;
}
.section-head.center .sub { margin-inline: auto; max-width: 50ch; }
h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(21px, 2vw, 25px); line-height: 1.1; letter-spacing: -0.01em; }

/* ============================================================
   TRIO
   ============================================================ */
.trio { border-top: 1px solid var(--line); }
.trio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.trio-card {
  position: relative;
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 30px 28px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}
.trio-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.trio-num {
  position: absolute;
  top: 24px; right: 26px;
  color: var(--line-strong);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
}
.trio-icon {
  position: relative;
  display: grid; place-items: center;
  width: 54px; height: 54px;
  border-radius: 15px;
  color: var(--forest);
  background: rgba(56, 87, 63, 0.1);
}
.trio-icon svg { width: 26px; height: 26px; }
.trio-card p { color: var(--muted); font-size: 16px; line-height: 1.5; }
.trio-card kbd { height: 24px; min-width: 26px; }
.text-link {
  margin-top: 4px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  transition: color 160ms ease;
}
.text-link span { display: inline-block; transition: transform 180ms ease; }
.text-link:hover { color: var(--terracotta); }
.text-link:hover span { transform: translateX(4px); }

/* ============================================================
   FEATURE BLOCKS
   ============================================================ */
.feature { border-top: 1px solid var(--line); }
.feature.alt { background: linear-gradient(180deg, rgba(242, 236, 224, 0.5), transparent 40%); }
.feature-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(36px, 5vw, 76px);
  align-items: center;
}
.feature-grid.reverse .feature-copy { order: 2; }
.feature-grid.reverse .feature-visual { order: 1; }

.key-list { display: grid; gap: 2px; margin-top: 30px; }
.key-row {
  display: grid;
  grid-template-columns: 54px 1fr;
  align-items: center;
  gap: 16px;
  padding: 13px 4px;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
  color: var(--ink);
}
.key-row:first-child { border-top: 1px solid var(--line); }
.key-row kbd { justify-self: start; }
.any-key {
  display: inline-grid; place-items: center;
  height: 28px; padding: 0 10px;
  border: 1px dashed var(--line-strong);
  border-radius: 7px;
  color: var(--quiet);
  font-family: var(--mono);
  font-size: 12px;
}

.check-list { display: grid; gap: 12px; margin-top: 30px; }
.check-list li {
  position: relative;
  padding-left: 32px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 1px;
  width: 20px; height: 20px;
  border-radius: 6px;
  background: rgba(56, 87, 63, 0.12)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 13l4 4 10-11' fill='none' stroke='%232f4a35' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / 13px no-repeat;
}
.check-list.big li { font-size: 17px; }

/* before/after card */
.feature-visual { display: grid; gap: 14px; }
.ba-card {
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.ba-row { padding: 26px 28px; display: grid; gap: 12px; }
.ba-tag { color: var(--quiet); font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; }
.ba-rough { font-family: var(--mono); font-size: 19px; color: var(--muted); line-height: 1.4; }
.ba-key {
  display: grid; place-items: center;
  padding: 8px;
  background: rgba(242, 236, 224, 0.6);
  border-block: 1px solid var(--line);
}
.ba-key kbd { height: 30px; }
.ba-row.finished { background: rgba(56, 87, 63, 0.05); }
.ba-clean { font-family: var(--serif); font-size: clamp(22px, 2.4vw, 30px); line-height: 1.18; color: var(--ink); }
.visual-note { color: var(--quiet); font-size: 14px; line-height: 1.5; text-align: center; }

/* voice cleanup */
.cleanup-demo {
  display: grid;
  gap: 14px;
  margin-top: 30px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.cleanup-said p { font-family: var(--mono); font-size: 16px; color: var(--quiet); line-height: 1.45; }
.cleanup-got p { font-family: var(--serif); font-size: 22px; color: var(--ink); line-height: 1.25; }
.cleanup-arrow { display: flex; align-items: center; gap: 14px; color: var(--forest); }
.cleanup-arrow svg { width: 22px; height: 22px; }

/* voice HUD mock */
.hud {
  position: relative;
  display: grid;
  gap: 16px;
  padding: 22px;
  border-radius: var(--radius);
  background: #211c16;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.hud-glow {
  position: absolute; inset: -40% -10% auto -10%; height: 70%;
  background: radial-gradient(circle at 50% 0%, rgba(56, 87, 63, 0.5), transparent 70%);
  pointer-events: none;
}
.hud-bar {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
}
.hud-rec { width: 12px; height: 12px; border-radius: 50%; background: #ef5d52; box-shadow: 0 0 0 5px rgba(239, 93, 82, 0.22); animation: pulse 1.4s ease-in-out infinite; }
.hud-bar .wave.long i { background: #8fd6a3; }
.hud-time { color: rgba(255, 255, 255, 0.66); font-family: var(--mono); font-size: 14px; }
.hud-actions { position: relative; display: flex; gap: 10px; }
.hud-btn { flex: 1; text-align: center; padding: 11px; border-radius: 10px; font-size: 13px; font-weight: 600; }
.hud-btn.cancel { color: rgba(255, 255, 255, 0.7); background: rgba(255, 255, 255, 0.07); }
.hud-btn.confirm { color: #fff; background: var(--forest); }

/* ============================================================
   AUTOCOMPLETE SHOWCASE (Tab to complete)
   ============================================================ */
.ac-section { border-top: 1px solid var(--line); padding-block: clamp(64px, 9vw, 128px); }

.ac-stage {
  max-width: 880px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.ac-screen {
  position: relative;
  padding: clamp(24px, 4vw, 40px);
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}
.ac-context {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 22px;
  color: #6a7384; font-size: 13px; font-weight: 600;
}
.ac-field {
  min-height: 2.55em;
  font-family: var(--mono);
  font-size: clamp(18px, 2.6vw, 27px);
  line-height: 1.5;
  color: var(--ink);
  border-radius: 8px;
  overflow-wrap: anywhere;
}
.ac-field.accepted { animation: acAccept 0.7s ease; }
.ac-cursor {
  display: inline-block;
  width: 2px; height: 1.05em;
  margin: 0 1px;
  vertical-align: -0.16em;
  background: var(--ink);
  animation: blink 1.1s steps(2, start) infinite;
}
.ac-controls {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px 16px;
  padding: 18px clamp(18px, 3vw, 26px) 0;
}
.ac-keys { display: flex; flex-wrap: wrap; gap: 10px; }
.ac-key {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 9px 15px 9px 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  cursor: pointer;
  font-size: 14px; font-weight: 600; color: var(--muted);
  transition: transform 140ms ease, border-color 140ms ease, color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}
.ac-key kbd { height: 26px; min-width: 28px; }
.ac-key:hover { transform: translateY(-1px); border-color: var(--line-strong); color: var(--ink); }
.ac-key.is-pressed {
  border-color: transparent; color: #fff;
  background: linear-gradient(180deg, var(--terracotta-2), var(--terracotta));
  box-shadow: 0 8px 18px rgba(168, 60, 20, 0.3);
  transform: translateY(1px) scale(0.97);
}
.ac-key.is-pressed kbd { background: rgba(255, 255, 255, 0.18); color: #fff; border-color: transparent; }
.ac-key.is-tried { border-color: rgba(56, 87, 63, 0.4); }
.ac-tried { color: var(--quiet); font-family: var(--mono); font-size: 12px; }
.ac-hint {
  padding: 12px clamp(18px, 3vw, 26px) 18px;
  color: var(--quiet); font-size: 13px; min-height: 1.4em;
}

.ac-more { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 22px; }
.ac-card {
  display: grid; align-content: start; gap: 8px;
  padding: clamp(22px, 3vw, 30px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.ac-card h3 { font-size: clamp(20px, 2vw, 24px); }
.ac-card-sub { color: var(--muted); font-size: 15px; line-height: 1.5; }

/* context demo */
.ctx-demo { display: grid; gap: 12px; margin-top: 14px; }
.ctx-msg {
  width: fit-content; max-width: 100%;
  padding: 11px 14px;
  border-radius: 12px 12px 12px 3px;
  background: #f1f3f7; color: #2a3346;
  font-size: 15px; line-height: 1.4;
}
.ctx-msg b { color: #131a28; margin-right: 6px; }
.ctx-field {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-2);
  font-family: var(--mono); font-size: 15px; line-height: 1.5;
  overflow-wrap: anywhere;
}
.ctx-toggle {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 2px;
  font-size: 14px; font-weight: 600; color: var(--muted);
  cursor: pointer; user-select: none;
}
.ctx-toggle input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.ctx-switch { position: relative; flex: none; width: 42px; height: 24px; border-radius: 999px; background: var(--line-strong); transition: background 200ms ease; }
.ctx-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.22); transition: transform 200ms ease; }
.ctx-toggle input:checked + .ctx-switch { background: var(--forest); }
.ctx-toggle input:checked + .ctx-switch::after { transform: translateX(18px); }
.ctx-toggle input:focus-visible + .ctx-switch { outline: 2px solid var(--terracotta); outline-offset: 2px; }

/* style demo */
.style-demo { display: grid; gap: 14px; margin-top: 14px; }
.style-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.style-tabs button {
  padding: 8px 15px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface-2); color: var(--muted); cursor: pointer;
  font-size: 13px; font-weight: 600;
  transition: transform 150ms ease, border-color 150ms ease, color 150ms ease, background 150ms ease;
}
.style-tabs button:hover { border-color: var(--line-strong); color: var(--ink); }
.style-tabs button.is-active { border-color: transparent; color: #fff; background: var(--ink); }
.style-out { padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.style-out.swap { animation: ghostIn 0.34s ease; }
.style-tone { display: inline-block; margin-bottom: 9px; color: var(--forest-2); font-family: var(--mono); font-size: 12px; letter-spacing: 0.05em; text-transform: uppercase; }
.style-out p { font-size: 17px; line-height: 1.5; color: var(--ink); }

.ac-foot { margin-top: 26px; text-align: center; color: var(--quiet); font-size: 14px; }

@keyframes ghostIn { from { opacity: 0; } to { opacity: 1; } }
.fade { animation: ghostIn 0.32s ease; }
@keyframes acAccept { 0% { background: rgba(56, 87, 63, 0.16); } 100% { background: transparent; } }

/* ============================================================
   VOICE SHOWCASE (dictation cleanup)
   ============================================================ */
.voice-section {
  border-top: 1px solid var(--line);
  padding-block: clamp(64px, 9vw, 128px);
  background: linear-gradient(180deg, rgba(242, 236, 224, 0.45), transparent 32%);
}
.vc-stage { max-width: 880px; margin: 0 auto; }

.vc-tabs, .lvl-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.vc-tabs { justify-content: center; margin-bottom: 18px; }
.vc-tabs button, .lvl-tabs button {
  padding: 9px 17px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface-2); color: var(--muted); cursor: pointer;
  font-size: 14px; font-weight: 600;
  transition: transform 150ms ease, border-color 150ms ease, color 150ms ease, background 150ms ease;
}
.lvl-tabs button { font-size: 13px; padding: 8px 15px; }
.vc-tabs button:hover, .lvl-tabs button:hover { border-color: var(--line-strong); color: var(--ink); }
.vc-tabs button.is-active, .lvl-tabs button.is-active { border-color: transparent; color: #fff; background: var(--ink); }

.vc-device {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.vc-appbar {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  color: #6a7384; font-size: 13px; font-weight: 600;
}
.vc-tone {
  margin-left: auto;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(56, 87, 63, 0.1); color: var(--forest-2);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase;
}
.vc-field { display: grid; padding: clamp(22px, 3.4vw, 34px); min-height: 132px; }
.vc-raw, .vc-clean {
  grid-area: 1 / 1; margin: 0;
  line-height: 1.55; overflow-wrap: anywhere;
  transition: opacity 0.5s ease;
}
.vc-raw { color: var(--muted); font-family: var(--mono); font-size: clamp(15px, 1.9vw, 19px); opacity: 0; }
.vc-clean { color: var(--ink); font-size: clamp(17px, 2.1vw, 22px); opacity: 0; }
.vc-clean b {
  font-weight: 600; color: var(--forest-2);
  background: rgba(56, 87, 63, 0.12); border-radius: 5px; padding: 0 4px;
}
.vc-raw .cut { transition: color 0.3s ease, opacity 0.3s ease; }
.vc-raw .cut.hl { text-decoration: line-through; text-decoration-color: var(--terracotta); opacity: 0.4; }
.vc-raw .fixw { border-radius: 4px; padding: 0 2px; transition: background 0.3s ease, box-shadow 0.3s ease; }
.vc-raw .fixw.hl { background: rgba(168, 60, 20, 0.14); box-shadow: 0 0 0 1px rgba(168, 60, 20, 0.28); }

.vc-hud {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 18px;
  border-top: 1px solid var(--line);
  background: #211c16;
  transition: filter 0.4s ease, opacity 0.4s ease;
}
.vc-hud.is-idle { filter: saturate(0.3); opacity: 0.62; }
.vc-mic { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; color: #fff; background: var(--terracotta); }
.vc-mic svg { width: 17px; height: 17px; }
.vc-hud .wave.long { flex: 1; height: 30px; }
.vc-hud .wave.long i { width: 3px; background: #e6b59c; }
.vc-time { flex: none; color: rgba(255, 255, 255, 0.6); font-family: var(--mono); font-size: 13px; }

.vc-chips {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
  min-height: 30px; margin-top: 18px;
}
.vc-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(56, 87, 63, 0.1); color: var(--forest-2);
  font-size: 13px; font-weight: 600;
  animation: chipIn 0.32s ease;
}
.vc-chip::before { content: "✓"; font-size: 11px; }
@keyframes chipIn { from { opacity: 0; transform: translateY(7px) scale(0.96); } to { opacity: 1; transform: none; } }
.vc-caption { margin-top: 10px; text-align: center; color: var(--quiet); font-size: 13px; min-height: 1.4em; }

/* cleanup level */
.lvl-demo { display: grid; gap: 14px; margin-top: 14px; }
.lvl-out { padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.lvl-out.swap { animation: ghostIn 0.34s ease; }
.lvl-out p { font-family: var(--mono); font-size: 15px; line-height: 1.55; color: var(--ink); }

/* voice snippets */
.vsnip-demo { display: grid; gap: 14px; margin-top: 14px; }
.vsnip-cues { display: flex; flex-wrap: wrap; gap: 8px; }
.vsnip-cues button {
  padding: 8px 13px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface-2); color: var(--muted); cursor: pointer;
  font-family: var(--mono); font-size: 13px; font-weight: 600;
  transition: border-color 150ms ease, color 150ms ease, background 150ms ease;
}
.vsnip-cues button:hover { border-color: var(--line-strong); color: var(--ink); }
.vsnip-cues button.is-active { border-color: transparent; color: #fff; background: var(--forest); }
.vsnip-out {
  min-height: 3.2em;
  padding: 16px; border: 1px dashed var(--line-strong); border-radius: 12px;
  background: var(--surface-2); color: var(--ink);
  font-size: 16px; line-height: 1.55;
}
.vsnip-out.swap { animation: ghostIn 0.3s ease; }

/* ============================================================
   MORE FEATURE DEMOS (voice sub-demos, snippets, dictionary,
   emoji, read-aloud, per-app control)
   ============================================================ */

/* shared mini app screen (snippets, emoji) */
.snip-screen {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.snip-field {
  padding: 22px;
  min-height: 124px;
  font-family: var(--mono);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* voice mini-demos: backtrack + list */
.mini-demo { margin-top: 14px; display: grid; gap: 11px; }
.mini-said { font-family: var(--mono); font-size: 14px; color: var(--quiet); line-height: 1.55; }
.bt-old { position: relative; color: var(--muted); white-space: nowrap; }
.bt-old::after {
  content: ""; position: absolute; left: 0; top: 55%;
  height: 2px; width: 100%; background: var(--terracotta); border-radius: 2px;
}
[data-backtrack].playing .bt-old::after { width: 0; animation: strike 0.5s ease forwards 0.35s; }
@keyframes strike { from { width: 0; } to { width: 100%; } }
.mini-got { font-size: 17px; color: var(--ink); }
.mini-got b, .mini-list b { background: rgba(56, 87, 63, 0.12); color: var(--forest-2); border-radius: 5px; padding: 0 4px; font-weight: 600; }
[data-backtrack].playing .mini-got { animation: rise 0.4s ease both 1s; }
@keyframes rise { from { opacity: 0.3; transform: translateY(5px); } to { opacity: 1; transform: none; } }

.mini-list { display: grid; gap: 7px; margin-top: 2px; }
.mini-list li { position: relative; padding-left: 20px; font-size: 16px; color: var(--ink); }
.mini-list li::before { content: ""; position: absolute; left: 0; top: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--forest); }
[data-listdemo].playing .mini-list li { opacity: 0; animation: listIn 0.4s ease forwards; }
[data-listdemo].playing .mini-list li:nth-child(1) { animation-delay: 0.15s; }
[data-listdemo].playing .mini-list li:nth-child(2) { animation-delay: 0.35s; }
[data-listdemo].playing .mini-list li:nth-child(3) { animation-delay: 0.55s; }
[data-listdemo].playing .mini-list li:nth-child(4) { animation-delay: 0.75s; }
@keyframes listIn { from { opacity: 0; transform: translateX(-7px); } to { opacity: 1; transform: none; } }

/* language demo */
.lang-demo { display: grid; gap: 14px; margin-top: 14px; }
.lang-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.lang-chips button {
  padding: 7px 13px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface-2); color: var(--muted); cursor: pointer;
  font-size: 13px; font-weight: 600;
  transition: border-color 150ms ease, color 150ms ease, background 150ms ease;
}
.lang-chips button:hover { border-color: var(--line-strong); color: var(--ink); }
.lang-chips button.is-active { border-color: transparent; color: #fff; background: var(--ink); }
.lang-out { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); color: var(--ink); font-size: 17px; line-height: 1.55; }
.lang-out.swap { animation: ghostIn 0.32s ease; }
.lang-out[dir="rtl"] { text-align: right; }

/* snippets practical demo */
.snip-section { border-top: 1px solid var(--line); padding-block: clamp(64px, 9vw, 128px); }
.snip-stage { max-width: 760px; margin: 0 auto; }
.snip-pick { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 18px; }
.snip-pick button {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 9px 14px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface-2); color: var(--muted); cursor: pointer;
  font-size: 14px; font-weight: 600;
  transition: transform 150ms ease, border-color 150ms ease, color 150ms ease;
}
.snip-pick button:hover { transform: translateY(-1px); border-color: var(--line-strong); color: var(--ink); }
.snip-pick button.is-active { border-color: var(--terracotta); color: var(--ink); }
.snip-pick code { background: rgba(28, 24, 19, 0.06); color: var(--muted); }
.snip-pick .is-active code { background: rgba(168, 60, 20, 0.1); color: var(--terracotta); }
.snip-mic { width: 9px; height: 9px; border-radius: 50%; background: var(--terracotta); }

/* dictionary */
.dict-section { border-top: 1px solid var(--line); padding-block: clamp(64px, 9vw, 128px); }
.dict-stage { max-width: 720px; margin: 0 auto; display: grid; gap: 20px; justify-items: center; }
.dict-words { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.dict-words span { padding: 7px 13px; border-radius: 999px; background: rgba(56, 87, 63, 0.1); color: var(--forest-2); font-family: var(--mono); font-size: 13px; font-weight: 600; }
.dict-field { width: 100%; padding: 26px 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); box-shadow: var(--shadow-sm); }
.dict-tag { display: block; margin-bottom: 12px; color: var(--quiet); font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; }
.dict-line { font-size: clamp(18px, 2.2vw, 23px); line-height: 1.45; color: var(--ink); }
.dict-line.swap { animation: ghostIn 0.32s ease; }
.dict-line b { background: rgba(56, 87, 63, 0.12); color: var(--forest-2); border-radius: 5px; padding: 0 4px; font-weight: 600; }
.dict-line .bad { color: var(--terracotta); text-decoration: underline wavy rgba(168, 60, 20, 0.5); text-underline-offset: 3px; }

/* emoji */
.emoji-demo { display: grid; gap: 14px; }
.emoji-token { color: var(--terracotta); }
.emoji-token.done { color: inherit; font-size: 20px; }
.emoji-screen2 { border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); box-shadow: var(--shadow-sm); overflow: hidden; }
.emoji-screen2 .snip-field { min-height: 84px; }

/* emoji picker dialog (light) */
.emoji-dialog {
  border: 1px solid var(--line); border-radius: 16px;
  background: var(--surface-2); box-shadow: var(--shadow-lg);
  overflow: hidden; transform-origin: top center;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.emoji-dialog.closed { opacity: 0; transform: scale(0.97) translateY(-6px); pointer-events: none; }
.ed-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.ed-query { font-family: var(--mono); font-size: 13px; color: var(--quiet); }
.ed-query b { color: var(--terracotta); font-weight: 400; }
.ed-tones { display: flex; gap: 3px; }
.ed-tones button { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid transparent; border-radius: 8px; background: transparent; cursor: pointer; font-size: 16px; transition: border-color 0.12s ease, background 0.12s ease; }
.ed-tones button:hover { background: rgba(28, 24, 19, 0.05); }
.ed-tones button.is-active { border-color: var(--terracotta); background: rgba(168, 60, 20, 0.08); }
/* fixed height so filtering never changes the dialog size (no layout jump) */
.ed-grid { display: grid; grid-template-columns: repeat(6, 1fr); grid-auto-rows: 44px; gap: 4px; padding: 8px; height: 252px; align-content: start; overflow: hidden; }
.ed-grid button { display: grid; place-items: center; border: 0; border-radius: 9px; background: transparent; cursor: pointer; font-size: 22px; line-height: 1; transition: background 0.1s ease, transform 0.1s ease; }
.ed-grid button:hover { background: rgba(28, 24, 19, 0.06); }
.ed-grid button.sel { background: rgba(168, 60, 20, 0.12); box-shadow: inset 0 0 0 1.5px rgba(168, 60, 20, 0.42); }
.ed-foot { display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--line); color: var(--quiet); font-family: var(--mono); font-size: 12px; }
.ed-foot span { white-space: nowrap; }
.emoji-menu { display: grid; gap: 2px; padding: 6px; max-width: 280px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); box-shadow: var(--shadow); }
.emoji-menu button { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; font-family: var(--mono); font-size: 14px; text-align: left; }
.emoji-menu button .em { font-size: 20px; }
.emoji-menu button:hover, .emoji-menu button.is-active { background: rgba(168, 60, 20, 0.08); color: var(--ink); }
.emoji-tones { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.emoji-tones-label { margin-right: 4px; color: var(--quiet); font-size: 13px; font-weight: 600; }
.emoji-tones button { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); cursor: pointer; font-size: 20px; transition: border-color 150ms ease, transform 150ms ease, box-shadow 150ms ease; }
.emoji-tones button:hover { transform: translateY(-1px); }
.emoji-tones button.is-active { border-color: var(--terracotta); box-shadow: 0 0 0 1px var(--terracotta); }

/* read aloud */
.read-demo { display: grid; gap: 16px; }
.read-text { padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); font-size: 19px; line-height: 1.65; color: var(--muted); }
.read-text .w { transition: color 0.15s ease, background 0.15s ease; border-radius: 3px; padding: 0 1px; }
.read-text .w.lit { color: var(--ink); background: rgba(168, 60, 20, 0.12); }
.read-player { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; background: #211c16; }
.read-play { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--terracotta); cursor: pointer; }
.read-play svg { width: 18px; height: 18px; }
.read-play svg path { fill: #fff; stroke: none; }
.read-player .wave.long { flex: 1; height: 28px; }
.read-player .wave.long i { background: #e6b59c; animation-play-state: paused; }
.read-demo.is-playing .wave.long i { animation-play-state: running; }
.read-voice { flex: none; color: rgba(255, 255, 255, 0.6); font-size: 13px; }
.read-voices { display: flex; flex-wrap: wrap; gap: 8px; }
.read-voices button { padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); color: var(--muted); cursor: pointer; font-size: 13px; font-weight: 600; transition: border-color 150ms ease, color 150ms ease, background 150ms ease; }
.read-voices button:hover { border-color: var(--line-strong); color: var(--ink); }
.read-voices button.is-active { border-color: transparent; color: #fff; background: var(--forest); }

/* ---------- attention cue: "Try this" + an arrow, from the left, pointing in ---------- */
.press-cue {
  position: absolute; z-index: 4; pointer-events: none;
  display: grid; justify-items: center; gap: 1px;
  width: clamp(78px, 8vw, 104px);
}
.press-label { color: var(--terracotta); font-weight: 800; font-size: clamp(13px, 1.4vw, 15px); transform: rotate(-4deg); white-space: nowrap; }
.press-arrow { display: block; width: 100%; filter: drop-shadow(0 5px 9px rgba(168, 60, 20, 0.2)); animation: cueNudge 1.1s ease-in-out infinite; }
.press-arrow svg { display: block; width: 100%; height: auto; }
@keyframes cueNudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(7px); } }
@keyframes cuePulse {
  0% { box-shadow: 0 0 0 0 rgba(168, 60, 20, 0.4); }
  70% { box-shadow: 0 0 0 9px rgba(168, 60, 20, 0); }
  100% { box-shadow: 0 0 0 0 rgba(168, 60, 20, 0); }
}

/* screen context: cue sits left of the card, arrow pointing right at the toggle */
.ctx-demo { position: relative; }
.ctx-cue { right: calc(100% + 8px); bottom: -6px; }
.ctx-demo:not(.touched) .ctx-switch { animation: cuePulse 1.7s ease-out infinite; }
.ctx-demo.touched .press-cue { opacity: 0; transition: opacity 0.35s ease; }

/* read aloud: cue sits left of the player, arrow pointing right at the play button */
.read-player { position: relative; }
.read-cue { right: calc(100% + 10px); top: 50%; margin-top: -34px; }
.read-demo:not(.touched) .read-play { animation: cuePulse 1.7s ease-out infinite; }
.read-demo.touched .press-cue { opacity: 0; transition: opacity 0.35s ease; }

/* the gutters vanish on narrower screens — the demos are still interactive */
@media (max-width: 1080px) { .press-cue { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .press-arrow, .ctx-switch, .read-play { animation: none !important; }
}

/* per-app control */
.ctrl-demo { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); box-shadow: var(--shadow-sm); overflow: hidden; }
.ctrl-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 14px; padding: 15px 18px; border-top: 1px solid var(--line); transition: opacity 200ms ease; }
.ctrl-row:first-child { border-top: 0; }
.ctrl-row.off { opacity: 0.55; }
.ctrl-app { font-size: 15px; font-weight: 600; color: var(--ink); }
.ctrl-tone { font-family: var(--mono); font-size: 12px; color: var(--forest-2); }
.ctrl-row.off .ctrl-tone { color: var(--quiet); }
.ctrl-sw { position: relative; flex: none; width: 42px; height: 24px; border: 0; border-radius: 999px; background: var(--line-strong); cursor: pointer; transition: background 200ms ease; }
.ctrl-sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.22); transition: transform 200ms ease; }
.ctrl-sw.on { background: var(--forest); }
.ctrl-sw.on::after { transform: translateX(18px); }

/* ============================================================
   SUB-PAGES (pricing + legal)
   ============================================================ */
.page-main { padding-top: clamp(40px, 6vw, 76px); }
.page-hero { text-align: center; padding-bottom: clamp(24px, 4vw, 40px); }
.page-hero h1 {
  margin-top: 14px;
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(38px, 6vw, 68px); line-height: 1.0; letter-spacing: -0.02em;
}
.page-hero h1 em { font-style: italic; color: var(--terracotta); }
.page-hero .lead { margin: 18px auto 0; max-width: 54ch; color: var(--muted); font-size: clamp(17px, 1.8vw, 20px); line-height: 1.55; }
.page-meta { margin-top: 14px; color: var(--quiet); font-size: 14px; }

/* legal prose */
.legal { max-width: 760px; margin: 0 auto; padding-block: clamp(28px, 4vw, 48px); }
.legal h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(23px, 3vw, 31px); margin: 46px 0 14px; letter-spacing: -0.01em; }
.legal > h2:first-child, .legal .lead + h2 { margin-top: 0; }
.legal h3 { font-family: var(--sans); font-size: 17px; font-weight: 700; margin: 26px 0 8px; }
.legal p, .legal li { color: var(--muted); font-size: 16px; line-height: 1.7; }
.legal p { margin: 0 0 14px; }
.legal .lead { color: var(--ink); font-size: 18px; }
.legal ul { display: grid; gap: 8px; margin: 0 0 18px; padding: 0; }
.legal ul li { position: relative; padding-left: 22px; list-style: none; }
.legal ul li::before { content: ""; position: absolute; left: 2px; top: 11px; width: 6px; height: 6px; border-radius: 50%; background: var(--terracotta); }
.legal a { color: var(--terracotta); text-decoration: underline; text-underline-offset: 2px; }
.legal strong { color: var(--ink); }
.legal code { font-size: 0.9em; }
.legal .callout { margin: 0 0 22px; padding: 18px 20px; border: 1px solid rgba(56, 87, 63, 0.3); border-radius: 12px; background: rgba(56, 87, 63, 0.06); }
.legal .callout p { margin: 0; color: var(--ink); }
.legal table { width: 100%; border-collapse: collapse; margin: 0 0 22px; font-size: 15px; }
.legal th, .legal td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal th { color: var(--ink); font-weight: 700; }
.legal td { color: var(--muted); }
.legal td:first-child { color: var(--ink); font-weight: 600; white-space: nowrap; }

/* pricing */
.pricing { padding-bottom: clamp(48px, 7vw, 88px); }
.bill-toggle { display: flex; justify-content: center; margin-bottom: 16px; }
.bill-toggle .seg { display: inline-flex; gap: 4px; padding: 5px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); }
.bill-toggle button { display: inline-flex; align-items: center; gap: 7px; padding: 9px 20px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; font-size: 14px; font-weight: 600; transition: color 150ms ease, background 150ms ease; }
.bill-toggle button.is-active { color: #fff; background: var(--ink); }
.bill-toggle .save { padding: 2px 7px; border-radius: 999px; background: rgba(56, 87, 63, 0.14); color: var(--forest-2); font-size: 11px; font-weight: 700; }
.bill-toggle button.is-active .save { background: rgba(255, 255, 255, 0.2); color: #fff; }
.bill-note { text-align: center; margin-bottom: 36px; color: var(--quiet); font-size: 13px; min-height: 1.3em; }

.plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
.plan { position: relative; display: grid; align-content: start; gap: 18px; padding: 32px 28px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
.plan.featured { border-color: var(--terracotta); box-shadow: var(--shadow); }
.plan-badge { position: absolute; top: -13px; left: 28px; padding: 5px 13px; border-radius: 999px; background: linear-gradient(180deg, var(--terracotta-2), var(--terracotta)); color: #fff; font-size: 12px; font-weight: 700; box-shadow: 0 8px 18px rgba(168, 60, 20, 0.26); }
.plan-name { font-family: var(--serif); font-weight: 400; font-size: 27px; }
.plan-price { display: flex; align-items: baseline; gap: 7px; min-height: 56px; }
.plan-price .amt { font-family: var(--serif); font-size: 46px; line-height: 1; letter-spacing: -0.02em; }
.plan-price .per { color: var(--quiet); font-size: 14px; }
.plan-bill { margin-top: -8px; color: var(--quiet); font-size: 13px; min-height: 1.2em; }
.plan-sub { color: var(--muted); font-size: 14.5px; line-height: 1.5; min-height: 3em; }
.plan .button, .plan .nav-cta { width: 100%; }
.plan-feats-label { color: var(--quiet); font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.plan .check-list { margin-top: 0; gap: 11px; }
.plan .check-list li { font-size: 14.5px; }
.plan-note { margin-top: 34px; text-align: center; color: var(--quiet); font-size: 14px; line-height: 1.6; }
.plan-note a { color: var(--terracotta); }

@media (max-width: 900px) {
  .plan-grid { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; }
}

/* ============================================================
   SECTION POLISH (trio quad, emoji palette, dictionary anim,
   privacy points)
   ============================================================ */

/* trio — four illustrated cards */
.trio-grid.quad { grid-template-columns: repeat(4, 1fr); }
.trio-grid.quad .trio-card { padding: 26px 24px 24px; gap: 12px; }
.trio-viz {
  display: flex; align-items: center; gap: 8px;
  min-height: 44px; margin-top: 2px; padding: 11px 13px;
  border: 1px solid var(--line); border-radius: 11px;
  background: var(--surface-2); overflow: hidden;
}
.tv-mono { font-family: var(--mono); font-size: 13px; white-space: nowrap; color: var(--ink); }
.trio-viz .ghost { color: rgba(110, 102, 88, 0.42); }
.trio-viz .caret { height: 1em; vertical-align: -0.15em; }
.tv-chip { flex: none; padding: 3px 8px; border-radius: 6px; background: rgba(168, 60, 20, 0.1); color: var(--terracotta); font-family: var(--mono); font-size: 12px; }
.tv-arrow { color: var(--quiet); }
.trio-viz .wave { height: 22px; }
.trio-viz .wave i { background: var(--forest); }
.tv-play { display: grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--terracotta); }
.tv-play svg { width: 13px; height: 13px; }
.tv-play svg path { fill: #fff; stroke: none; }
@media (max-width: 1000px) { .trio-grid.quad { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .trio-grid.quad { grid-template-columns: 1fr; } }

/* ============================================================
   ILLUSTRATIONS + LIGHTNING MOTIF (mockup refresh)
   Inline-SVG illustrations carry their own inline fills, so the
   global `svg path { fill:none }` rule never touches them.
   ============================================================ */
.megaphone-art, .keycap-art, .ac-card-art, .ti-bolt { display: block; }

/* trio — alternating sage-tile / terracotta-circle icons */
.trio-icon.tile {
  color: var(--forest-2);
  background: linear-gradient(155deg, rgba(56, 87, 63, 0.2), rgba(56, 87, 63, 0.11));
  box-shadow: inset 0 0 0 1px rgba(56, 87, 63, 0.18);
}
.trio-icon.circle {
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(155deg, var(--terracotta-2), var(--terracotta));
  box-shadow: 0 4px 10px rgba(168, 60, 20, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
/* mini TAB keycap that lives inside the autocomplete tile */
.ti-key {
  display: grid; place-items: center;
  min-width: 33px; height: 24px; padding: 0 7px;
  border-radius: 7px;
  background: linear-gradient(#fffefb, #edefe3);
  box-shadow: inset 0 0 0 1px rgba(56, 87, 63, 0.2), 0 1px 0 rgba(28, 24, 19, 0.06);
  color: var(--forest-2);
  font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 0.05em;
}
/* gold spark pinned to a tile/circle corner */
.ti-bolt {
  position: absolute;
  top: -9px; right: -9px;
  filter: drop-shadow(0 2px 3px rgba(192, 132, 24, 0.4));
}
/* size needs higher specificity than the base `.trio-icon svg` (26px) rule */
.trio-icon .ti-bolt { width: 23px; height: 23px; }
/* keep the spark a clean flat fill — the global `svg path` stroke must not apply */
.ti-bolt path { stroke: none; }

/* autocomplete — left-aligned header: 3D keycap (left) + a mate (right) */
.section-head.lead-art {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(18px, 3vw, 38px);
  max-width: 900px;
  margin-inline: auto;
  margin-bottom: clamp(30px, 4vw, 50px);
  text-align: left;
}
.keycap-art {
  width: clamp(80px, 9vw, 118px);
  filter: drop-shadow(0 16px 22px rgba(56, 87, 63, 0.2));
}
.section-head.lead-art .kicker { margin-bottom: 12px; }
.section-head.lead-art .sub { margin-inline: 0; max-width: 52ch; }

/* autocomplete cards — emoji-style art beside the title */
.ac-card-head { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 15px; }
.ac-card-art { width: 52px; height: 52px; }

@media (max-width: 620px) {
  .keycap-art { width: 66px; }
  .ac-card-art { width: 46px; height: 46px; }
}

/* ============================================================
   PHASE-2 GRAPHICS + LIVELIER DEMOS
   ============================================================ */

/* section-header flank illustrations — one graphic in each gutter, anchored to
   the centered .section-head so each auto-centers vertically on its header */
.section-head.flanked { position: relative; }
.flank-art {
  position: absolute;
  top: 50%;
  width: clamp(76px, 8vw, 116px);
  z-index: 2;
  filter: drop-shadow(0 14px 22px rgba(58, 44, 28, 0.12));
}
.flank-art svg { display: block; width: 100%; height: auto; }
.flank-art.left  { right: 100%; margin-right: clamp(6px, 2.4vw, 54px); transform: translateY(-50%) rotate(-7deg); }
.flank-art.right { left:  100%; margin-left:  clamp(6px, 2.4vw, 54px); transform: translateY(-50%) rotate(7deg); }
.trio .flank-art { width: clamp(88px, 9.5vw, 130px); }  /* megaphone reads a touch larger */
@media (max-width: 1100px) { .flank-art { display: none; } }

/* small badge graphic above a section kicker */
.head-badge { display: block; width: clamp(54px, 6vw, 64px); margin-bottom: 16px; }
.head-badge svg { display: block; width: 100%; height: auto; }
.section-head.center .head-badge { margin-inline: auto; }
.feature-copy .head-badge { margin-bottom: 14px; }
/* speaker glyph reads wider/heavier than the other badges — trim it to match the set */
#read .head-badge { width: clamp(50px, 5.4vw, 58px); }

/* read-aloud: keep it alive when idle + stronger word highlight */
.read-demo.is-preview .wave.long i { animation-play-state: running; }
.read-text { font-size: clamp(19px, 1.9vw, 22px); }
.read-text .w.lit { color: var(--ink); background: rgba(168, 60, 20, 0.17); }

/* per-app: auto-demo tone swap + row pulse */
.ctrl-tone.swap { animation: ghostIn 0.34s ease; }
.ctrl-row.pulse { animation: ctrlPulse 0.8s ease; }
@keyframes ctrlPulse { 0% { background: rgba(56, 87, 63, 0); } 28% { background: rgba(56, 87, 63, 0.1); } 100% { background: rgba(56, 87, 63, 0); } }

/* emoji — custom palette */
.emoji-demo { display: grid; gap: 16px; max-width: 380px; margin-inline: auto; }
.emoji-demo [data-emoji-out] { font-size: 20px; }
.emoji-palette {
  border: 1px solid var(--line); border-radius: 16px;
  background: var(--surface-2); box-shadow: var(--shadow);
  overflow: hidden; transform-origin: top center;
  transition: opacity 0.32s ease, transform 0.32s ease;
}
.emoji-palette.closed { opacity: 0; transform: scale(0.96) translateY(-8px); pointer-events: none; }
.ep-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px; font-weight: 600; }
.ep-head kbd { height: 24px; }
.ep-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; padding: 12px; }
.ep-grid button { display: grid; place-items: center; aspect-ratio: 1; border: 1px solid transparent; border-radius: 10px; background: transparent; cursor: pointer; font-size: 22px; transition: background 0.12s ease, transform 0.12s ease, border-color 0.12s ease; }
.ep-grid button:hover { background: rgba(168, 60, 20, 0.08); }
.ep-grid button.hot { background: rgba(168, 60, 20, 0.13); border-color: rgba(168, 60, 20, 0.3); transform: scale(1.08); }
.ep-add { display: grid; place-items: center; aspect-ratio: 1; border: 1px dashed var(--line-strong); border-radius: 10px; color: var(--quiet); font-size: 20px; }
.ep-foot { display: flex; justify-content: space-between; padding: 10px 16px; border-top: 1px solid var(--line); color: var(--quiet); font-size: 12px; }

/* dictionary — animated correction */
.dict-screen { width: 100%; max-width: 640px; margin: 0 auto; }
.dict-tag { margin-left: auto; padding: 4px 10px; border-radius: 999px; background: rgba(168, 60, 20, 0.1); color: var(--terracotta); font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; transition: background 0.3s ease, color 0.3s ease; }
.dict-tag.on { background: rgba(56, 87, 63, 0.12); color: var(--forest-2); }
.dict-line { padding: clamp(22px, 3.4vw, 34px); min-height: 3.4em; font-size: clamp(18px, 2.2vw, 24px); line-height: 1.6; color: var(--ink); overflow-wrap: anywhere; }
.fixw .bad { color: var(--terracotta); text-decoration: underline wavy rgba(168, 60, 20, 0.5); text-underline-offset: 3px; transition: opacity 0.4s ease; }
.fixw.fixing .bad { opacity: 0; }
.dict-good { color: var(--forest-2); font-weight: 600; }
.dict-good.in { animation: ghostIn 0.4s ease; }

/* read-aloud note */
.read-note { margin-top: 4px; color: var(--quiet); font-size: 13px; line-height: 1.5; }

/* privacy — icon points */
.priv-points { display: grid; gap: 18px; margin-top: 28px; }
.priv-point { display: grid; grid-template-columns: 44px 1fr; gap: 16px; align-items: start; }
.pp-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; color: var(--forest); background: rgba(56, 87, 63, 0.1); }
.pp-icon svg { width: 23px; height: 23px; }
.priv-point strong { display: block; font-size: 17px; color: var(--ink); }
.priv-point p { margin-top: 3px; color: var(--muted); font-size: 15px; line-height: 1.5; }
.priv-point kbd { height: 22px; }

/* illustrated how-it-works steps */
.steps.illustrated li { display: grid; align-content: start; gap: 12px; padding: 30px 28px; }
.step-art { width: 64px; height: 64px; color: var(--forest); }
.step-art svg { width: 64px; height: 64px; }
.step-art path, .step-art rect { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.step-art .accent { stroke: var(--terracotta); }
.step-art .ghost-stroke { stroke: var(--line-strong); }
.step-head { display: flex; align-items: center; gap: 12px; }
.steps.illustrated .step-num { width: 28px; height: 28px; font-size: 13px; box-shadow: none; }
.steps.illustrated h3 { font-size: clamp(20px, 2vw, 23px); }
.steps.illustrated p { color: var(--muted); font-size: 15.5px; line-height: 1.55; }

/* ============================================================
   SNIPPETS
   ============================================================ */
.var-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 30px;
}
.var-grid span {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
  font-size: 14px;
}
.var-grid code { background: rgba(56, 87, 63, 0.1); color: var(--forest-2); }

.snippet-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.sp-head { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.sp-trigger code { font-size: 16px; padding: 0.2em 0.5em; }
.sp-arrow { color: var(--quiet); }
.sp-label { color: var(--quiet); font-size: 13px; }
.sp-body { padding: 24px 22px; }
.sp-body p { font-size: 18px; line-height: 1.6; color: var(--ink); }
.sp-muted { color: var(--quiet); font-size: 14px; }
.sp-list { border-top: 1px solid var(--line); }
.sp-list li {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 13px 22px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 15px;
}
.sp-list li:last-child { border-bottom: 0; }
.sp-list code { font-size: 13px; }
.sp-list kbd { height: 22px; min-width: 22px; font-size: 11px; }

/* ============================================================
   MORE FEATURES GRID
   ============================================================ */
.more { border-top: 1px solid var(--line); background: linear-gradient(180deg, rgba(242, 236, 224, 0.45), transparent 30%); }
.more-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.more-grid article {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 28px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.more-grid article:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.more-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 11px; color: var(--forest); background: rgba(56, 87, 63, 0.08); }
.more-icon svg { width: 23px; height: 23px; }
.more-grid p { color: var(--muted); font-size: 15px; line-height: 1.5; }
.more-grid kbd { height: 23px; min-width: 24px; font-size: 11px; }

/* ============================================================
   USE CASES
   ============================================================ */
.usecases { border-top: 1px solid var(--line); }
.uc-layout { display: grid; gap: 22px; }
.uc-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.uc-tabs button {
  padding: 11px 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  transition: all 160ms ease;
}
.uc-tabs button:hover { border-color: var(--line-strong); color: var(--ink); }
.uc-tabs button.is-active {
  border-color: transparent;
  color: #fff;
  background: var(--ink);
}
.uc-panels { position: relative; }
.uc-panel {
  display: grid;
  gap: 18px;
  padding: clamp(34px, 5vw, 60px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 8px 8px, rgba(28, 24, 19, 0.04) 1px, transparent 1.3px) 0 0 / 24px 24px,
    var(--surface);
  box-shadow: var(--shadow-sm);
}
.uc-panel[hidden] { display: none; }
.uc-line {
  max-width: 24ch;
  font-family: var(--serif);
  font-size: clamp(26px, 3.6vw, 42px);
  line-height: 1.18;
  color: var(--ink);
}
.uc-note { color: var(--quiet); font-size: 16px; }

/* ============================================================
   PRIVACY
   ============================================================ */
.privacy { border-top: 1px solid var(--line); }
.privacy-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(36px, 5vw, 70px);
  align-items: center;
}
.ledger {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.ledger-col { padding: 26px 24px; }
.ledger-col.local { background: rgba(56, 87, 63, 0.05); border-right: 1px solid var(--line); }
.ledger-col h3 {
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.ledger-col.local h3 { color: var(--forest-2); }
.ledger-col.cloud h3 { color: var(--terracotta); }
.ledger-col ul { display: grid; gap: 12px; }
.ledger-col li { font-size: 15.5px; line-height: 1.35; color: var(--ink); }
.ledger-col small { display: block; color: var(--quiet); font-size: 12.5px; }
.ledger-col.local li { position: relative; padding-left: 22px; }
.ledger-col.local li::before {
  content: "";
  position: absolute; left: 0; top: 6px;
  width: 12px; height: 7px;
  border-left: 2px solid var(--forest); border-bottom: 2px solid var(--forest);
  transform: rotate(-45deg);
}

/* ============================================================
   HOW IT WORKS
   ============================================================ */
.how { border-top: 1px solid var(--line); }
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  counter-reset: step;
}
.steps li {
  position: relative;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 32px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.step-num {
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  color: #fff;
  background: var(--ink);
  font-family: var(--mono);
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}
.steps p { color: var(--muted); font-size: 16px; line-height: 1.5; }
.steps kbd { height: 23px; }

/* ============================================================
   FAQ
   ============================================================ */
.faq { border-top: 1px solid var(--line); }
.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
  gap: clamp(30px, 5vw, 70px);
  align-items: start;
}
.faq-grid .section-head { margin-bottom: 0; position: sticky; top: 96px; }
.faq-list { display: grid; gap: 0; }
.faq-list details {
  border-bottom: 1px solid var(--line);
  padding: 6px 0;
}
.faq-list details:first-child { border-top: 1px solid var(--line); }
.faq-list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 4px;
  cursor: pointer;
  list-style: none;
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "";
  flex: none;
  width: 12px; height: 12px;
  border-right: 2px solid var(--quiet);
  border-bottom: 2px solid var(--quiet);
  transform: rotate(45deg);
  transition: transform 220ms ease;
}
.faq-list details[open] summary::after { transform: rotate(-135deg); }
.faq-list details p {
  padding: 0 4px 20px;
  max-width: 62ch;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}
.faq-list kbd { height: 22px; min-width: 22px; font-size: 11px; }

/* ============================================================
   DOWNLOAD
   ============================================================ */
.download { border-top: 1px solid var(--line); }
.download-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
  padding: clamp(32px, 5vw, 56px);
  border: 1px solid var(--terracotta);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(700px 320px at 90% -20%, rgba(168, 60, 20, 0.08), transparent 60%),
    var(--surface);
  box-shadow: var(--shadow);
}
.dl-icon { width: 84px; height: 84px; border-radius: 20px; box-shadow: var(--shadow); }
.dl-copy h2 { font-size: clamp(30px, 4vw, 46px); }
.dl-copy h2 ~ p { margin-top: 12px; color: var(--muted); font-size: 18px; }
.download-card .hero-actions { margin-top: 26px; }
.dl-meta { margin-top: 18px; color: var(--quiet); font-size: 14px; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { border-top: 1px solid var(--line); padding-block: 44px; }
.footer-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 28px;
  align-items: center;
}
.footer-brand { display: inline-flex; align-items: center; gap: 9px; font-family: var(--serif); font-size: 21px; }
.footer-brand img { width: 26px; height: 26px; border-radius: 7px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 14px 26px; justify-content: center; color: var(--muted); font-size: 14px; }
.site-footer nav a:hover { color: var(--terracotta); }
.footer-tag { color: var(--quiet); font-size: 14px; text-align: right; }

/* ============================================================
   REVEAL ON SCROLL
   ============================================================ */
/* hidden only when JS is alive (the inline head script adds .js); content stays visible if JS is off */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 640ms ease, transform 640ms ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes blink { 0%, 45% { opacity: 1; } 46%, 100% { opacity: 0; } }
@keyframes wave { 0%, 100% { transform: scaleY(0.5); } 50% { transform: scaleY(1.15); } }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 5px rgba(239, 93, 82, 0.22); } 50% { box-shadow: 0 0 0 9px rgba(239, 93, 82, 0.08); } }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { order: 2; }
  .feature-grid, .feature-grid.reverse { grid-template-columns: 1fr; gap: 36px; }
  .feature-grid.reverse .feature-copy { order: 1; }
  .feature-grid.reverse .feature-visual { order: 2; }
  .privacy-grid { grid-template-columns: 1fr; }
  .faq-grid { grid-template-columns: 1fr; }
  .faq-grid .section-head { position: static; }
  .trio-grid { grid-template-columns: 1fr; }
  .more-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: grid;
    place-content: center;
    gap: 5px;
    width: 42px; height: 42px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface-2);
    cursor: pointer;
  }
  .nav-toggle span:not(.sr-only) { width: 18px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform 200ms ease, opacity 200ms ease; }
  .site-nav {
    position: absolute;
    top: calc(100% + 8px);
    right: var(--pad);
    left: var(--pad);
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface-2);
    box-shadow: var(--shadow-lg);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a:not(.nav-cta) { padding: 12px; border-radius: 9px; }
  .site-nav a:not(.nav-cta)::after { display: none; }
  .site-nav a:not(.nav-cta):hover { background: rgba(168, 60, 20, 0.07); }
  .nav-cta { margin-top: 6px; }

  .hero-visual { overflow: visible; }
  .showcase { grid-template-columns: 1fr; }
  .showcase-rail { grid-template-columns: repeat(7, 1fr); }
  .showcase-rail button { width: 100%; height: 50px; }
  .showcase-screen { min-height: 470px; }

  .var-grid { grid-template-columns: 1fr; }
  .more-grid { grid-template-columns: 1fr; }
  .ac-more { grid-template-columns: 1fr; }
  .ledger { grid-template-columns: 1fr; }
  .ledger-col.local { border-right: 0; border-bottom: 1px solid var(--line); }
  .button, .nav-cta { width: 100%; }
  .hero-actions, .download-card .hero-actions { width: 100%; }
  .download-card { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .footer-inner { grid-template-columns: 1fr; text-align: center; gap: 18px; }
  .footer-tag { text-align: center; }
  .cleanup-arrow { justify-content: center; }
}

@media (max-width: 420px) {
  body { font-size: 16px; }
  .scene { padding: 16px; }
  .showcase-screen { min-height: 440px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal, .js .reveal { opacity: 1; transform: none; }
}
