/* The marketing sites' one stylesheet — Vietnamese Buddy, Confident Dutch and
 * Confident German share it, because they share the app's look.
 *
 * The tokens are the app's (design-system/project/tokens): warm-grey neutrals,
 * five jewel accents, Space Grotesk for display, Be Vietnam Pro for reading,
 * IBM Plex Mono for codes and intervals. The signature is the app's OFFSET
 * BLOCK — a crisp surface on a flat, solid-colour shadow — so a visitor who
 * signs up recognises the product they were shown.
 *
 * No framework and no build step: this file is copied as-is. Mobile first; the
 * layout widens at 720px and 1024px. */

@import url("fonts.css");

:root {
  color-scheme: light;

  --canvas: #f6f4f1;
  --surface: #ffffff;
  --surface-sunk: #efece7;
  --border: #e5e1db;
  --border-strong: #26292b;
  --divider: #efe9e0;

  --ink-strong: #26292b;
  --ink: #3a3d40;
  --ink-mid: #55514a;
  --ink-soft: #6c665e;
  --muted: #736c61;   /* 4.7:1 on the canvas — small labels must pass WCAG AA */

  --coral: #c24b45;  --coral-deep: #992f2a;  --coral-tint: #f4e0df;  --coral-text: #b13f39;
  --teal: #2c7a73;   --teal-deep: #1f5a55;   --teal-tint: #daebe9;   --teal-text: #236761;
  --slate: #3f5e7a;  --slate-deep: #2e485e;  --slate-tint: #dee5ec;  --slate-text: #3f5e7a;
  --gold: #d19a2e;   --gold-deep: #a5761c;   --gold-tint: #f2e9d4;   --gold-text: #8a6619;
  --plum: #8e4a63;   --plum-deep: #6e374c;   --plum-tint: #efe0e8;   --plum-text: #8e4a63;

  --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-sans: "Be Vietnam Pro", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-xl: 14px;
  --offset: 6px;
  --offset-sm: 4px;

  --wrap: 1160px;
  --gutter: clamp(20px, 5vw, 40px);
  --section: clamp(72px, 10vw, 128px);
}

/* ── Base ───────────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a { color: var(--coral-text); text-underline-offset: 3px; }
a:hover { color: var(--coral-deep); }
button { font: inherit; color: inherit; }
::selection { background: var(--gold-tint); color: var(--ink-strong); }

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

h1, h2, h3, h4 {
  margin: 0;
  color: var(--ink-strong);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.08;
}

p { margin: 0; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  padding: 10px 14px; border-radius: var(--radius-sm);
  background: var(--ink-strong); color: #fff; text-decoration: none;
  font-family: var(--font-display); font-weight: 600;
}
.skip-link:focus { top: 12px; color: #fff; }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin: 0 auto;
  padding-inline: var(--gutter);
}

/* ── Type ───────────────────────────────────────────────────────────────── */

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  margin-bottom: 18px;
  color: var(--coral-text);
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 18px; height: 2px;
  background: currentColor;
}
.eyebrow--teal { color: var(--teal-text); }
.eyebrow--slate { color: var(--slate-text); }
.eyebrow--gold { color: var(--gold-text); }
.eyebrow--plum { color: var(--plum-text); }

.display {
  font-size: clamp(40px, 6.2vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.035em;
}
.display em {
  font-style: normal;
  color: var(--coral);
  background: linear-gradient(transparent 62%, var(--coral-tint) 62%);
  padding: 0 0.04em;
}

.h2 {
  font-size: clamp(30px, 4.2vw, 46px);
  letter-spacing: -0.03em;
}
.h2 em { font-style: normal; color: var(--coral); }
.h3 { font-size: 20px; letter-spacing: -0.015em; line-height: 1.25; }

.lead {
  color: var(--ink-mid);
  font-size: clamp(17px, 1.7vw, 19.5px);
  line-height: 1.6;
}
.lead strong { color: var(--ink-strong); font-weight: 600; }

.muted { color: var(--ink-soft); }
.mono { font-family: var(--font-mono); }

.section-head { max-width: 720px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head .lead { margin-top: 18px; }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .eyebrow { justify-content: center; }

/* ── Buttons ────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  border: 2px solid var(--coral-deep);
  border-radius: var(--radius-sm);
  background: var(--coral);
  box-shadow: var(--offset-sm) var(--offset-sm) 0 var(--coral-deep);
  color: #fff;
  font-family: var(--font-display);
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 90ms ease, box-shadow 90ms ease, background 120ms ease;
}
.btn:hover { background: #b8433d; color: #fff; }
.btn:active { transform: translate(var(--offset-sm), var(--offset-sm)); box-shadow: 0 0 0 var(--coral-deep); }
.btn .arrow { transition: transform 150ms ease; }
.btn:hover .arrow { transform: translateX(3px); }

.btn--small { min-height: 42px; padding: 0 18px; font-size: 15px; }
.btn--ghost {
  border-color: var(--border-strong);
  background: var(--surface);
  box-shadow: var(--offset-sm) var(--offset-sm) 0 var(--border-strong);
  color: var(--ink-strong);
}
.btn--ghost:hover { background: var(--canvas); color: var(--ink-strong); }
.btn--ghost:active { box-shadow: 0 0 0 var(--border-strong); }

.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: 32px; }
.cta-note { color: var(--ink-soft); font-size: 14.5px; }
.cta-note strong { color: var(--coral-text); font-weight: 600; }

/* ── Header ─────────────────────────────────────────────────────────────── */

.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgb(246 244 241 / 0.92);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  height: 68px;
}

.brand {
  display: inline-flex; align-items: center; gap: 11px;
  color: var(--ink-strong);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.brand:hover { color: var(--ink-strong); }
.mark {
  display: grid; place-items: center;
  width: 36px; height: 36px;
  border: 2px solid var(--border-strong);
  border-radius: 9px;
  background: var(--coral);
  box-shadow: 3px 3px 0 var(--border-strong);
  color: #fff;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.nav { display: flex; align-items: center; gap: 6px; }
.nav a:not(.btn) {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--ink-mid);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}
.nav a:not(.btn):hover { background: var(--surface-sunk); color: var(--ink-strong); }
.nav .btn { margin-left: 10px; }

.nav-links { display: none; }
@media (min-width: 880px) { .nav-links { display: flex; gap: 2px; } }
.site-header .brand, .site-header .btn { white-space: nowrap; flex: none; }
@media (max-width: 400px) {
  .site-header .brand { font-size: 16px; gap: 9px; }
  .site-header .mark { width: 32px; height: 32px; font-size: 13px; }
  .site-header .btn { padding: 0 14px; font-size: 14px; min-height: 40px; }
}
/* The waitlist's "Sign in": beside the button where there is room; on a phone
   the hero's note carries it instead (sections.ts). */
.nav a.nav-signin { white-space: nowrap; }
@media (max-width: 559px) { .nav a.nav-signin { display: none; } }

/* ── Sections ───────────────────────────────────────────────────────────── */

.section { padding-block: var(--section); }
.section--tight { padding-block: calc(var(--section) * 0.7); }
.section--band { background: var(--surface); border-block: 1px solid var(--border); }
.section--ink {
  background: var(--ink-strong);
  color: #d9d4cb;
}
.section--ink h2, .section--ink h3 { color: #fff; }
.section--ink .lead { color: #c9c3b8; }

.grid { display: grid; gap: clamp(20px, 3vw, 28px); }
@media (min-width: 720px) {
  .grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ── Blocks: the offset surface ─────────────────────────────────────────── */

.block {
  --tone: var(--border-strong);
  position: relative;
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--offset) var(--offset) 0 var(--tone);
}
.block--coral { --tone: var(--coral); }
.block--teal { --tone: var(--teal); }
.block--slate { --tone: var(--slate); }
.block--gold { --tone: var(--gold); }
.block--plum { --tone: var(--plum); }

.panel {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.tag {
  display: inline-flex; align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.tag--coral { background: var(--coral-tint); color: var(--coral-text); }
.tag--teal { background: var(--teal-tint); color: var(--teal-text); }
.tag--slate { background: var(--slate-tint); color: var(--slate-text); }
.tag--gold { background: var(--gold-tint); color: var(--gold-text); }
.tag--plum { background: var(--plum-tint); color: var(--plum-text); }

.label {
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

/* ── Hero ───────────────────────────────────────────────────────────────── */

.hero { position: relative; padding-block: clamp(48px, 8vw, 104px) clamp(64px, 9vw, 120px); overflow: hidden; }
.hero::before {
  /* A faint ruled-paper field behind the demo: a notebook, not a gradient. */
  content: "";
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--divider) 1px, transparent 1px);
  background-size: 100% 34px;
  mask-image: radial-gradient(ellipse 70% 80% at 78% 45%, #000 20%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 78% 45%, #000 20%, transparent 72%);
  opacity: 0.9;
  pointer-events: none;
}
.hero .wrap { position: relative; display: grid; gap: clamp(48px, 6vw, 72px); align-items: center; }
@media (min-width: 1024px) {
  .hero .wrap { grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); }
}
.hero .lead { margin-top: 26px; max-width: 590px; }

.audience { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 30px; }
.audience .label { margin-right: 4px; }

/* ── Flashcard demos ────────────────────────────────────────────────────── */

.demo { position: relative; width: 100%; max-width: 480px; margin-inline: auto; }
.demo-meta {
  display: flex; justify-content: space-between; align-items: baseline;
  margin: 0 4px 10px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12.5px;
}

.card { padding: 30px 28px 26px; text-align: center; }
.card-word {
  display: inline-flex; align-items: center; gap: 14px;
  color: var(--ink-strong);
  font-family: var(--font-sans);
  font-size: clamp(30px, 4.4vw, 42px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.card-word > span { white-space: nowrap; }
.card-article {
  color: var(--muted);
  font-weight: 500;
  transition: color 160ms ease;
}
.card-gloss { margin-top: 10px; color: var(--ink-soft); font-size: 15.5px; }
.card-gloss .pos { color: var(--muted); }

.play {
  display: inline-grid; place-items: center; flex: none;
  width: 44px; height: 44px;
  border: 0;
  border-radius: 999px;
  background: var(--teal-tint);
  color: var(--teal-deep);
  cursor: pointer;
  transition: background 120ms ease, transform 120ms ease;
}
.play:hover { background: #c9e2df; }
.play:active { transform: scale(0.94); }
.play svg { width: 16px; height: 16px; margin-left: 2px; }
.play--sm { width: 34px; height: 34px; }
.play--sm svg { width: 12px; height: 12px; }
.play.is-playing { background: var(--teal); color: #fff; }

.card-example {
  display: flex; gap: 12px; align-items: flex-start;
  margin-top: 22px; padding-top: 18px;
  border-top: 1px solid var(--divider);
  text-align: left;
}
.card-example p { font-size: 15.5px; color: var(--ink-strong); }
.card-example p + p { margin-top: 2px; color: var(--muted); font-size: 14px; }

.picks { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.pick {
  --tone: var(--slate);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 12px 8px 10px;
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--offset-sm) var(--offset-sm) 0 var(--tone);
  color: var(--ink-strong);
  font-family: var(--font-sans);
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 90ms ease, box-shadow 90ms ease, background 140ms ease;
}
.pick kbd {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--muted);
}
.pick:hover { background: var(--canvas); }
.pick:active { transform: translate(var(--offset-sm), var(--offset-sm)); box-shadow: 0 0 0 var(--tone); }
.pick[disabled] { cursor: default; }
.pick.is-right { --tone: var(--teal-deep); background: var(--teal-tint); border-color: var(--teal-deep); }
.pick.is-wrong { --tone: var(--coral-deep); background: var(--coral-tint); border-color: var(--coral-deep); }
.pick.is-dim { opacity: 0.45; }

.verdict {
  min-height: 72px;
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--canvas);
  color: var(--ink-mid);
  font-size: 14.5px;
  line-height: 1.5;
  text-align: left;
}
.verdict strong { color: var(--ink-strong); }
.verdict.is-right { background: var(--teal-tint); color: var(--teal-deep); }
.verdict.is-wrong { background: var(--coral-tint); color: var(--coral-deep); }
.verdict-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 8px; }
.next {
  border: 0; background: none; padding: 4px 0;
  color: inherit;
  font-family: var(--font-display);
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
}

.card-reveal { display: flex; justify-content: center; margin-top: 22px; }
.card-reveal:has(> [hidden]) { display: none; }

.card-foot {
  margin-top: 16px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.ratings { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.rating {
  --tone: var(--coral);
  padding: 9px 4px 7px;
  border: 2px solid var(--tone);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--tone) 14%, white);
  box-shadow: var(--offset-sm) var(--offset-sm) 0 var(--tone);
  color: var(--ink-strong);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}
.rating small { display: block; color: var(--ink-soft); font-family: var(--font-mono); font-size: 11px; font-weight: 400; }
.rating--gold { --tone: var(--gold); }
.rating--teal { --tone: var(--teal); }
.rating--slate { --tone: var(--slate); }

/* ── Problems ───────────────────────────────────────────────────────────── */

.pains { counter-reset: pain; }
.pain { padding: 26px 24px 24px; }
.pain-num {
  display: inline-grid; place-items: center;
  width: 30px; height: 30px; margin-bottom: 18px;
  border-radius: 8px;
  background: var(--tint, var(--coral-tint));
  color: var(--ink-strong);
  font-family: var(--font-display);
  font-weight: 700;
}
.pain h3 { margin-bottom: 10px; }
.pain p { color: var(--ink-mid); font-size: 15.5px; }
.pain .fix {
  display: flex; gap: 10px; align-items: flex-start;
  margin-top: 18px; padding-top: 16px;
  border-top: 1px dashed var(--border);
  color: var(--ink-strong);
  font-size: 15px;
}
.pain .fix svg { flex: none; width: 18px; height: 18px; margin-top: 3px; color: var(--teal); }

/* ── Steps ──────────────────────────────────────────────────────────────── */

.steps { display: grid; gap: 22px; }
@media (min-width: 1024px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.step { display: flex; flex-direction: column; padding: 22px; }
.step-top { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.step-num {
  display: inline-grid; place-items: center;
  width: 28px; height: 28px;
  border-radius: 7px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
}
.step-visual {
  min-height: 150px;
  margin-bottom: 20px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--canvas);
  display: flex; flex-direction: column; justify-content: center; gap: 8px;
}
.step h3 { margin-bottom: 8px; }
.step > p { color: var(--ink-mid); font-size: 15.5px; }

.drop {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 18px 12px;
  border: 2px dashed #d8d2c8;
  border-radius: var(--radius-md);
  color: var(--ink-soft);
  font-size: 14px;
  text-align: center;
}
.files { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.file {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 9px;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
}
.file i { width: 8px; height: 8px; border-radius: 2px; background: var(--c, var(--slate)); }

.queue-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 14.5px;
}
.queue-row b { color: var(--ink-strong); font-weight: 600; }
.queue-row span.forms { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.35; }

.due { padding: 14px 16px; border-radius: var(--radius-md); background: var(--surface); border: 1.5px solid var(--border); }
.due-num { color: var(--ink-strong); font-family: var(--font-display); font-size: 40px; font-weight: 700; line-height: 1; letter-spacing: -0.03em; }
.bar { height: 6px; margin-top: 12px; border-radius: 99px; background: var(--surface-sunk); overflow: hidden; }
.bar i { display: block; height: 100%; width: var(--w, 60%); background: var(--teal); border-radius: 99px; }

/* ── Showcases (text beside a working mock) ─────────────────────────────── */

.showcase { display: grid; gap: clamp(36px, 5vw, 64px); align-items: center; }
@media (min-width: 1024px) {
  .showcase { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }
  .showcase--flip > :first-child { order: 2; }
}
.showcase + .showcase { margin-top: var(--section); }
.showcase .lead { margin-top: 18px; }
.points { margin: 26px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.points li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink); font-size: 16px; }
.points svg { flex: none; width: 20px; height: 20px; margin-top: 2px; color: var(--teal); }

.mock { padding: clamp(18px, 2.4vw, 26px); }
.mock-title {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 16px; padding-bottom: 14px;
  border-bottom: 1px solid var(--divider);
}
.mock-title .h3 { font-size: 17px; }

/* Word forms */
.entry { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 13px 2px; }
.entry + .entry { border-top: 1px solid var(--divider); }
.entry-head { color: var(--ink-strong); font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
.entry-head .art { color: var(--coral-text); }
.entry-gloss { color: var(--ink-soft); font-size: 14px; }
.entry-forms { grid-column: 1 / -1; color: var(--ink-mid); font-size: 14.5px; }
.entry-forms .mono { font-size: 13px; }
.entry .tag { align-self: start; }

/* Corrections */
.finding { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 4px 12px; padding: 16px 2px; }
.finding + .finding { border-top: 1px solid var(--divider); }
.finding-n { color: var(--muted); font-family: var(--font-mono); font-size: 12.5px; padding-top: 3px; }
.said { color: var(--ink-strong); font-size: 16.5px; line-height: 1.55; }
.said del {
  color: var(--coral-deep);
  text-decoration: line-through;
  text-decoration-color: color-mix(in srgb, var(--coral) 70%, transparent);
  text-decoration-thickness: 2px;
}
.said ins {
  padding: 1px 4px;
  border-radius: 4px;
  background: var(--teal-tint);
  color: var(--teal-deep);
  text-decoration: none;
  font-weight: 600;
}
.why { margin-top: 6px; color: var(--ink-mid); font-size: 14.5px; }
.why .tag { margin-right: 8px; vertical-align: 1px; }

/* Echo chips */
.echo-line { color: var(--ink-strong); font-size: 21px; font-weight: 600; letter-spacing: -0.01em; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.chip {
  display: inline-flex; flex-direction: column; gap: 3px;
  min-width: 64px;
  padding: 9px 12px 8px;
  border: 2px solid var(--teal);
  border-radius: var(--radius-md);
  background: var(--teal-tint);
  color: var(--teal-deep);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.2;
}
.chip small { font-size: 12px; font-weight: 500; opacity: 0.85; }
.chip--diff { border-color: var(--coral); background: var(--coral-tint); color: var(--coral-deep); }
.chip--accent { border-color: var(--gold); background: var(--gold-tint); color: var(--gold-text); }
.chip--missing { border-style: dashed; border-color: var(--muted); background: var(--canvas); color: var(--ink-soft); }
.echo-summary { margin-top: 16px; padding: 12px 14px; border-radius: var(--radius-md); background: var(--canvas); color: var(--ink-mid); font-size: 14.5px; }
.pitch { margin-top: 18px; padding: 10px 12px 6px; border-radius: var(--radius-md); background: var(--canvas); }
.pitch svg { width: 100%; height: 96px; }
.pitch-legend { display: flex; gap: 16px; margin-top: 4px; color: var(--ink-soft); font-size: 12.5px; }
.pitch-legend i { display: inline-block; width: 16px; height: 3px; margin-right: 6px; vertical-align: 3px; border-radius: 2px; background: var(--c); }

/* Reading */
.passage { color: var(--ink-strong); font-size: 18px; line-height: 1.9; }
.passage mark {
  padding: 1px 2px;
  border-radius: 4px;
  background: var(--gold-tint);
  color: inherit;
  box-shadow: inset 0 -2px 0 var(--gold);
}
.passage mark.is-open { background: var(--gold); color: #fff; box-shadow: none; }
.passage .known { box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--teal) 55%, transparent); }
.popover {
  position: relative;
  margin-top: 14px;
  padding: 16px 18px;
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--offset-sm) var(--offset-sm) 0 var(--gold);
}
.popover-word { color: var(--ink-strong); font-size: 20px; font-weight: 700; }
.popover-word .to { color: var(--muted); font-weight: 400; }
.popover-meta { margin-top: 2px; color: var(--ink-soft); font-size: 14.5px; }
.popover-actions { display: flex; gap: 10px; align-items: center; margin-top: 12px; }
.mini-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border: 2px solid var(--teal-deep);
  border-radius: 6px;
  background: var(--teal);
  color: #fff;
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 600;
}

/* ── Feature grid ───────────────────────────────────────────────────────── */

.feature { padding: 24px; }
.feature .tag { margin-bottom: 14px; }
.feature h3 { margin-bottom: 8px; }
.feature p { color: var(--ink-mid); font-size: 15.5px; }

/* ── Content (decks and guides) ─────────────────────────────────────────── */

.shelf { display: grid; gap: 12px; }
@media (min-width: 720px) { .shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.shelf-item {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}
.shelf-item b { color: var(--ink-strong); font-family: var(--font-display); font-size: 16px; }
.shelf-item span { color: var(--muted); font-size: 13.5px; }

/* ── Pricing ────────────────────────────────────────────────────────────── */

.price-card { max-width: 560px; margin: 0 auto; padding: clamp(26px, 4vw, 38px); }
.price { display: flex; align-items: baseline; gap: 10px; margin: 10px 0 4px; }
.price b { color: var(--ink-strong); font-family: var(--font-display); font-size: clamp(52px, 7vw, 64px); letter-spacing: -0.04em; line-height: 1; }
.price span { color: var(--ink-soft); font-size: 17px; }
.includes { margin: 24px 0 28px; padding: 0; list-style: none; display: grid; gap: 11px; }
.includes li { display: flex; gap: 12px; align-items: flex-start; font-size: 15.5px; }
.includes svg { flex: none; width: 19px; height: 19px; margin-top: 2px; color: var(--teal); }
.price-card .btn { width: 100%; }
.fine { margin-top: 14px; color: var(--ink-soft); font-size: 13.5px; text-align: center; }
.guarantee { max-width: 640px; margin: 28px auto 0; color: var(--ink-soft); font-size: 14.5px; text-align: center; }

/* ── FAQ ────────────────────────────────────────────────────────────────── */

.faq { max-width: 820px; margin: 0 auto; }
.faq details { border-bottom: 1.5px solid var(--border); }
.faq details:first-child { border-top: 1.5px solid var(--border); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 22px 4px;
  color: var(--ink-strong);
  font-family: var(--font-display);
  font-size: 18.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  list-style: none;
  cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  width: 12px; height: 12px;
  border-right: 2.5px solid var(--coral);
  border-bottom: 2.5px solid var(--coral);
  transform: rotate(45deg) translateY(-3px);
  transition: transform 180ms ease;
}
.faq details[open] summary::after { transform: rotate(225deg) translate(-2px, -1px); }
.faq .answer { padding: 0 4px 24px; color: var(--ink-mid); font-size: 16px; max-width: 700px; }
.faq .answer p + p { margin-top: 10px; }

/* ── Final call ─────────────────────────────────────────────────────────── */

.final { text-align: center; }
.final .h2 { color: #fff; max-width: 780px; margin: 0 auto; }
.final .lead { margin: 18px auto 0; max-width: 560px; }
.final .cta-row { justify-content: center; }
.final .btn { box-shadow: var(--offset-sm) var(--offset-sm) 0 #000; border-color: #000; }
.final .cta-note { color: #b3ab9f; }

/* ── Footer ─────────────────────────────────────────────────────────────── */

.site-footer { padding-block: 56px 40px; border-top: 1px solid var(--border); }
.site-footer .wrap { display: grid; gap: 28px; }
@media (min-width: 880px) { .site-footer .wrap { grid-template-columns: 1.3fr 1fr 1fr; } }
.site-footer p { color: var(--ink-soft); font-size: 14.5px; max-width: 360px; margin-top: 14px; }
.foot-col h4 { margin-bottom: 12px; color: var(--muted); font-size: 12px; letter-spacing: 0.09em; text-transform: uppercase; }
.foot-col ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.foot-col a { color: var(--ink-mid); font-size: 14.5px; text-decoration: none; }
.foot-col a:hover { color: var(--coral-text); text-decoration: underline; }
.copyright { color: var(--muted); font-size: 13px; padding-top: 22px; border-top: 1px solid var(--border); grid-column: 1 / -1; }

/* ── Legal pages ────────────────────────────────────────────────────────── */

.legal { max-width: 760px; margin: 0 auto; padding-block: clamp(40px, 7vw, 80px); }
.legal h1 { font-size: clamp(34px, 5vw, 48px); margin-bottom: 10px; }
.legal .updated { color: var(--muted); font-size: 14px; margin-bottom: 34px; }
.legal h2 { font-size: 22px; margin: 38px 0 12px; letter-spacing: -0.015em; }
.legal h3 { font-size: 17px; margin: 22px 0 8px; }
.legal p, .legal li { color: var(--ink); font-size: 16px; }
.legal p.lead { color: var(--ink-mid); font-size: 18px; }
.legal p + p { margin-top: 12px; }
.legal ul { padding-left: 22px; display: grid; gap: 8px; margin: 12px 0; }
.legal .note { margin: 18px 0; padding: 16px 18px; border-left: 4px solid var(--gold); border-radius: 0 var(--radius-md) var(--radius-md) 0; background: var(--gold-tint); }
.legal table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 15px; }
.legal th, .legal td { padding: 12px 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.legal th { color: var(--muted); font-family: var(--font-display); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.legal td small { display: block; color: var(--muted); }
.table-scroll { overflow-x: auto; }
/* Not sticky: it would sit on top of the sticky header. It is the first thing
   on the page, which is where it has to be seen. */
.draft-banner {
  position: relative; z-index: 60;
  padding: 10px var(--gutter);
  background: var(--gold); color: var(--ink-strong);
  font-family: var(--font-display); font-weight: 600; font-size: 14px; text-align: center;
}

/* ── Motion ─────────────────────────────────────────────────────────────── */

/* Sections rise in as they scroll into view — driven by the scroll position
   itself (a scroll-driven animation), not by a script. Where the browser
   cannot do that, nothing animates and nothing is ever hidden: printing, a
   screenshot, a crawler or find-in-page all see the whole page. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 35%;
    }
    @keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
  }
}
@media (prefers-reduced-motion: no-preference) {
  .card-swap { animation: swap 360ms ease both; }
  @keyframes swap { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ── Vietnamese Buddy only ── */
/* The demos only vietnamesebuddy.com shows (marketing/lib/mocks-vi.ts): Record's
   feedback card with a tone finding, the reading popover with tone names, the
   pronoun tables, the Hán Việt layer on a study card, and a picture card. They
   are built on the shared classes above (.mock, .finding, .said, .passage,
   .popover, .label, .play); what is added here is prefixed vb-. */

/* Hanzi: the page ships no CJK face, so the system's own. */
.vb-hanzi, .vb-hanzi-sm, [lang="zh"] {
  font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Source Han Sans SC", "Microsoft YaHei", sans-serif;
}

/* Record & Correct: the feedback card. */
.vb-fb-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px;
  margin: -4px 0 4px;
  color: var(--ink-soft);
  font-size: 13px;
}
.said mark.vb-heard {
  padding: 1px 4px;
  border-radius: 4px;
  background: var(--gold-tint);
  color: var(--gold-text);
  font-weight: 600;
}
.finding.vb-fine {
  margin-inline: -10px;
  padding-inline: 12px 10px;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--teal-tint) 55%, transparent);
}
.finding + .finding.vb-fine { border-top-color: transparent; }
.vb-keep {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
  margin-top: 10px;
  color: var(--ink-strong);
  font-size: 15px;
}
.vb-add {
  display: inline-flex; align-items: center;
  padding: 3px 10px;
  border: 1.5px solid var(--teal);
  border-radius: 6px;
  background: var(--teal-tint);
  box-shadow: 3px 3px 0 var(--teal);
  color: var(--teal-text);
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}

/* Reading: the word popover, headed by the word and its tone pattern. */
.vb-pop-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; }
.vb-tones { color: var(--gold-text); font-family: var(--font-mono); font-size: 12.5px; }

/* Pronouns: the mirror, the pair rows, the school footnote. */
.vb-mirror {
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--canvas);
}
.vb-mirror .label { margin-bottom: 8px; }
.vb-mirror-line { display: grid; gap: 1px; }
.vb-mirror-line + .vb-mirror-line { margin-top: 10px; }
.vb-mirror-line small { color: var(--muted); font-size: 12px; }
.vb-mirror-line b { color: var(--ink-strong); font-size: 17px; font-weight: 600; }
.vb-mirror-line span { color: var(--ink-soft); font-size: 13px; }
.vb-pairs { margin: 6px 0 0; padding: 0; list-style: none; }
.vb-pairs li { padding: 12px 2px; }
.vb-pairs li + li { border-top: 1px solid var(--divider); }
.vb-who { color: var(--ink-strong); font-size: 14.5px; font-weight: 500; }
.vb-words { margin-top: 3px; color: var(--ink-soft); font-size: 14px; }
.vb-words b { color: var(--ink-strong); font-size: 16px; }
.vb-hanzi-sm { color: var(--muted); font-size: 13px; }
.vb-ex { margin-top: 3px; font-size: 14px; }
.vb-ex [lang] { color: var(--ink-strong); }
.vb-ex span:not([lang]), .vb-foot span:not([lang]) { color: var(--muted); font-size: 13px; }
.vb-foot {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  color: var(--ink-soft);
  font-size: 13.5px;
}
.vb-foot [lang] { color: var(--ink-strong); font-weight: 600; }

/* Hán Việt: a study card's answer side with its extras. */
.vb-answer { padding: 6px 0 2px; text-align: center; }
.vb-answer-word {
  display: inline-flex; align-items: center; gap: 14px;
  color: var(--ink-strong);
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.vb-answer-gloss { margin-top: 6px; color: var(--ink-mid); font-size: 17px; }
.vb-extras {
  display: grid; gap: 16px 20px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--divider);
}
@media (min-width: 520px) { .vb-extras { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.vb-extra--wide { grid-column: 1 / -1; }
.vb-extra .label { margin-bottom: 4px; }
.vb-extra-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; color: var(--ink-strong); font-size: 16px; }
.vb-hanzi { color: var(--ink-strong); font-size: 22px; line-height: 1.3; }
.vb-pinyin { color: var(--ink-soft); font-family: var(--font-mono); font-size: 13px; }
.vb-note { margin-top: 3px; color: var(--ink-soft); font-size: 13.5px; line-height: 1.5; }

/* Picture cards: the word's page beside the card it makes. */
.vb-pic { display: grid; gap: 16px; }
@media (min-width: 560px) { .vb-pic { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } }
.vb-pic-page {
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--canvas);
}
.vb-pic-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.vb-pic-actions {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--divider);
}
.vb-chip {
  display: inline-flex; align-items: center;
  padding: 5px 11px;
  border: 1.5px solid var(--border-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink-strong);
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}
.vb-chip--ink { box-shadow: 3px 3px 0 var(--border-strong); }
.vb-pic-card { text-align: center; }
.vb-pic-card .label { display: block; margin-bottom: 10px; }
.vb-pic-img {
  width: 100%; max-width: 220px;
  margin: 0 auto;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
}
.vb-pic-img svg { width: 100%; height: 100%; }
.vb-pic-ask {
  margin-top: 10px;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.vb-reveal { margin-top: 12px; }
.vb-reveal summary {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--offset-sm) var(--offset-sm) 0 var(--border-strong);
  color: var(--ink-strong);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}
.vb-reveal summary::-webkit-details-marker { display: none; }
.vb-reveal[open] summary { display: none; }
.vb-pic-answer {
  display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px;
  color: var(--ink-soft);
  font-size: 15px;
}
.vb-pic-answer b { color: var(--ink-strong); font-size: 24px; }

/* Words in the copy: every Vietnamese word on the page is marked the way the
   app's Reading mode marks a word that is not in your lexicon yet — a light
   gold tint over a gold underline — and opens Reading's word popover
   (site.js). The underline is an inset shadow in em, so it scales with a
   heading; box-decoration-break keeps the mark on both halves of a word that
   wraps. Hover strengthens it only where hover exists, so a tap does not leave
   it stuck. */
.vw {
  padding: 0 1px;
  border-radius: 3px;
  background: var(--gold-tint);
  box-shadow: inset 0 -0.1em 0 var(--gold);
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
@media (hover: hover) {
  .vw:hover { background: color-mix(in srgb, var(--gold) 32%, var(--gold-tint)); }
}
/* Open: solid gold, as the reading demo's open word — with dark text, since
   white on this gold is too faint to read (about 2.4:1). */
.vw.is-open { background: var(--gold); color: var(--ink-strong); box-shadow: none; }
/* Just added, in teal, as the app marks the word that was pressed. */
.vw.is-added { background: var(--teal-tint); box-shadow: inset 0 -0.1em 0 var(--teal); }
@media (hover: hover) {
  .vw.is-added:hover { background: color-mix(in srgb, var(--teal) 22%, var(--teal-tint)); }
}
.vw.is-added.is-open { background: var(--teal); color: #fff; box-shadow: none; }

/* On the dark closing section: the same marks, translucent over the ink, with
   the heading's white text. */
.section--ink .vw { background: color-mix(in srgb, var(--gold) 26%, transparent); box-shadow: inset 0 -0.1em 0 var(--gold); }
@media (hover: hover) {
  .section--ink .vw:hover { background: color-mix(in srgb, var(--gold) 42%, transparent); }
}
.section--ink .vw.is-open { background: var(--gold); color: var(--ink-strong); box-shadow: none; }
.section--ink .vw.is-added { background: color-mix(in srgb, var(--teal) 50%, transparent); box-shadow: inset 0 -0.1em 0 var(--teal-tint); }
@media (hover: hover) {
  .section--ink .vw.is-added:hover { background: color-mix(in srgb, var(--teal) 70%, transparent); }
}
.section--ink .vw.is-added.is-open { background: var(--teal); color: #fff; box-shadow: none; }

/* The popover: one for the page, appended to <body> and placed by site.js. It
   is spans throughout (it may sit inside a heading in the markup), so each
   part is made a block here. Under the sticky header (z-index 40). */
.wpop {
  position: absolute; z-index: 30;
  display: block;
  width: min(320px, calc(100vw - 24px));
  padding: 14px 16px;
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--offset-sm) var(--offset-sm) 0 var(--gold);
  color: var(--ink);
  font: 400 14.5px/1.5 var(--font-sans);
  text-align: left;
  letter-spacing: normal;
  text-transform: none;
}
.wpop-head, .wpop-meta, .wpop-actions, .wpop-note { display: block; }
.wpop-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; }
.wpop-word { color: var(--ink-strong); font-size: 20px; font-weight: 700; }
.wpop-tones { color: var(--gold-text); font-family: var(--font-mono); font-size: 12.5px; }
.wpop-meta { margin-top: 2px; }
.wpop-pos { margin-left: 8px; color: var(--muted); font-size: 13px; }
.wpop-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }

/* The app's chips. */
.wpop-btn {
  display: inline-flex; align-items: center;
  min-height: 34px;
  padding: 4px 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink-soft);
  font: 600 13px/1.2 var(--font-display);
  text-decoration: none;
  cursor: pointer;
}
.wpop-btn:hover { background: var(--surface-sunk); color: var(--ink-strong); }
.wpop-btn--add {
  border-color: var(--teal);
  background: var(--teal-tint);
  box-shadow: 3px 3px 0 var(--teal);
  color: var(--teal-text);
}
.wpop-btn--add:hover { background: #c9e2df; color: var(--teal-text); }
.wpop-btn--add:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--teal); }
.wpop-btn--added,
.wpop-btn--added:hover {
  border-color: var(--teal);
  background: var(--teal-tint);
  color: var(--teal-text);
  cursor: default;
}

/* What the app would have done, under a dashed rule like the cards' footnotes. */
.wpop-note {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  color: var(--ink-mid);
  font-size: 13.5px;
}
.wpop-note b { color: var(--ink-strong); }
.wpop-note a { font-weight: 600; }
