/* ===== Design tokens — mirror the app's "cozy pastel" identity =====
   Source of truth: ChinoApp app_theme.dart (light palette) + pinyin_tones.dart.
   Warm cream backgrounds, soft coral primary, sage/honey accents, warm-brown
   text (never pure black). Fonts: Nunito (UI) + Noto Sans SC (hanzi). */
:root {
  /* Brand — soft peach / warm coral pastel */
  --red: #E8836B;            /* primary (app C.primary light) */
  --red-dark: #D9694F;       /* hover */
  --red-dim: #FDE8E2;        /* tinted surface (chips/badges) */
  /* Accents */
  --green: #52B98A;          /* success / correct */
  --green-bg: #DFF1E6;
  --amber: #D4AA5C;          /* honey — badges / tips */
  --amber-bg: #FFF5E1;
  --rose: #E07777;           /* gentle error */
  /* Text — warm brown tones */
  --ink: #4A3F35;            /* C.text */
  --ink-soft: #7D7168;       /* C.textSub */
  --muted: #B5AAA0;          /* C.textDim */
  /* Surfaces */
  --bg: #FFF8F0;             /* C.bg cream */
  --bg-soft: #FFF1E6;        /* C.cardLight */
  --card: #FFFDFA;           /* C.card */
  --line: #EDE5DA;           /* C.border */
  --divider: #F5F0E8;
  /* Warm espresso for inverted sections (counters/stores/footer) */
  --espresso: #241A14;       /* app onAccent / dark ink */
  --espresso-soft: #C7BBB0;
  /* Pinyin tone colours (from pinyin_tones.dart) */
  --t1: #CB5B4C; --t2: #3F9E63; --t3: #3C7DBF; --t4: #9163B0; --t0: #A89C90;

  --shadow: 0 8px 26px rgba(74,63,53,.07);
  --shadow-hover: 0 18px 44px rgba(74,63,53,.13);
  --radius: 20px;
  --radius-sm: 14px;
  --maxw: 1180px;
  --sans: 'Nunito', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --cjk: 'Noto Sans SC', var(--sans);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

section { padding: 76px 0; position: relative; }

/* Skip link (accessibility) */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 2000;
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }

/* ===== Shared bits ===== */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .78rem; letter-spacing: .12em; text-transform: uppercase;
  font-weight: 800; color: var(--red); margin-bottom: 14px;
}
.eyebrow .han { font-family: var(--cjk); font-weight: 700; letter-spacing: 0; text-transform: none; }

h1, h2, h3, h4 { font-family: var(--sans); }
h2.section-title {
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  font-weight: 800; line-height: 1.18; margin-bottom: 14px; letter-spacing: -.01em;
}
.section-head { text-align: center; max-width: 660px; margin: 0 auto 48px; }
.section-head p { color: var(--ink-soft); font-size: 1.04rem; font-weight: 500; }

/* hanzi helper */
.hz { font-family: var(--cjk); }

/* tag pills */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .74rem; font-weight: 800; letter-spacing: .01em;
  padding: 5px 11px; border-radius: 50px; line-height: 1;
}
.tag-red { background: var(--red-dim); color: var(--red-dark); }
.tag-gold { background: var(--amber-bg); color: #9a7320; }
.tag-green { background: var(--green-bg); color: #2e7d5b; }
.tag-ink { background: #efe9e1; color: var(--ink-soft); }

/* line-art orchid brand mark (mirrors OrchidMark CustomPainter) */
.orchid { width: 34px; height: 34px; flex: none; color: var(--red); display: block; }
.orchid svg { display: block; width: 100%; height: 100%; }
.orchid img { display: block; width: 100%; height: 100%; object-fit: contain; }

/* brush-stroke divider (kept subtle, coral) */
.brush {
  height: 22px; width: 100%;
  background: var(--red);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='22' viewBox='0 0 400 22'%3E%3Cpath d='M2 14c60-9 110 5 180-2s120-10 216-3' stroke='%23000' stroke-width='6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='22' viewBox='0 0 400 22'%3E%3Cpath d='M2 14c60-9 110 5 180-2s120-10 216-3' stroke='%23000' stroke-width='6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat;
  opacity: .7;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--sans); font-weight: 800; font-size: 1rem;
  padding: 13px 24px; border-radius: 14px; border: 2px solid transparent;
  cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--red); color: #fff; box-shadow: 0 8px 20px rgba(232,131,107,.30); }
.btn-primary:hover { background: var(--red-dark); transform: translateY(-2px); box-shadow: 0 12px 26px rgba(232,131,107,.40); }
.btn-ghost { background: var(--card); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); transform: translateY(-2px); }

/* ===== Header ===== */
header {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(255,248,240,.85);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; letter-spacing: -.01em; }
.logo .label b { color: var(--red); }

nav.menu { display: flex; align-items: center; gap: 26px; }
nav.menu a.link { font-weight: 700; color: var(--ink-soft); font-size: .96rem; transition: color .15s; }
nav.menu a.link:hover { color: var(--red); }

.nav-right { display: flex; align-items: center; gap: 14px; }

/* Language selector */
.lang { position: relative; }
.lang button {
  display: flex; align-items: center; gap: 7px;
  background: transparent; border: 1px solid var(--line);
  padding: 8px 12px; border-radius: 10px; cursor: pointer;
  font-family: inherit; font-size: .9rem; font-weight: 700; color: var(--ink);
  transition: border-color .15s;
}
.lang button:hover { border-color: var(--ink); }
.lang ul {
  position: absolute; right: 0; top: 115%;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow); list-style: none; padding: 8px;
  min-width: 180px; opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: all .18s ease; max-height: 60vh; overflow: auto;
}
.lang.open ul { opacity: 1; visibility: visible; transform: translateY(0); }
.lang ul li a { display: block; padding: 9px 12px; border-radius: 9px; font-size: .92rem; font-weight: 600; color: var(--ink-soft); }
.lang ul li a:hover { background: var(--bg-soft); color: var(--ink); }
.lang ul li a[aria-current="true"] { background: var(--bg-soft); color: var(--red); font-weight: 800; }

.burger { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--ink); }

/* ===== Hero ===== */
.hero {
  padding: 56px 0 70px;
  background:
    radial-gradient(900px 420px at 88% -8%, rgba(232,131,107,.16) 0%, transparent 60%),
    radial-gradient(700px 360px at 5% 20%, rgba(212,170,92,.12) 0%, transparent 55%);
}
.hero-grid { display: grid; grid-template-columns: 1.02fr .98fr; gap: 46px; align-items: center; }
.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 1.1; font-weight: 800; letter-spacing: -.02em; margin-bottom: 18px;
}
.hero h1 .hl { color: var(--red); white-space: nowrap; }
.hero p.sub { font-size: 1.12rem; color: var(--ink-soft); font-weight: 500; max-width: 520px; margin-bottom: 26px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.hero-note { font-size: .88rem; color: var(--ink-soft); font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hero-note i { color: var(--green); }

/* Hero bento cluster — app-preview feel (real content only) */
.hero-bento {
  display: grid; grid-template-columns: 1.3fr 1fr; grid-auto-rows: 1fr; gap: 14px;
  max-width: 440px; margin: 0 auto;
}
.bx {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 18px; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.bx .corner-tag { position: absolute; top: 12px; right: 12px; }
.bx-char { grid-row: span 2; background: linear-gradient(165deg, var(--red) 0%, #efa893 120%); color: #fff; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.bx-char .ch { font-family: var(--cjk); font-size: 4.6rem; font-weight: 700; line-height: 1; }
.bx-char .py { font-size: 1.15rem; margin-top: 8px; opacity: .95; font-weight: 700; }
.bx-char .mn { font-size: .92rem; opacity: .9; font-weight: 600; }
.bx .k { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 800; }
.bx-rad, .bx-phrase { display: flex; flex-direction: column; justify-content: center; text-align: center; }
.bx-rad .mini-rad { display: flex; gap: 8px; margin-top: 10px; justify-content: center; }
.bx-rad .mini-rad span { font-family: var(--cjk); font-size: 1.5rem; font-weight: 700; background: var(--bg-soft); border-radius: 8px; padding: 4px 10px; }
/* tones mini-card — tone-coloured pinyin (real feature) */
.tone-row { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; justify-content: center; }
.tone-row b { font-weight: 800; font-size: 1.02rem; }
.bx-phrase .phrase-hz { font-size: 1.7rem; font-weight: 700; line-height: 1; margin-top: 10px; }
.bx .gloss { font-size: .74rem; color: var(--muted); font-weight: 600; line-height: 1.3; margin-top: 8px; }

/* ===== Counters strip ===== */
.counters { background: var(--bg); padding: 30px 0 42px; }
.counters-grid { display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; }
.counter { position: relative; padding: 6px 16px; }
.counter + .counter::before { content: ""; position: absolute; left: 0; top: 10%; height: 80%; width: 1px; background: var(--line); }
.counter .num { font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 800; color: var(--red); line-height: 1; }
.counter .num .plus { color: var(--amber); }
.counter .label { color: var(--ink-soft); font-size: .95rem; margin-top: 8px; font-weight: 600; }

/* ===== Features (bento grid) ===== */
.features { background: var(--bg-soft); }
.bento {
  display: grid; grid-template-columns: repeat(4, 1fr); align-items: stretch;
  gap: 18px;
}
.tile {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow); position: relative; overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
  display: flex; flex-direction: column;
}
.tile:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.tile .ic {
  width: 50px; height: 50px; border-radius: 13px; display: grid; place-items: center;
  background: var(--red-dim); color: var(--red-dark); font-size: 1.35rem; margin-bottom: 16px;
}
.tile .ic.hz { font-size: 1.85rem; font-weight: 700; line-height: 1; }
.tile h3 { font-size: 1.12rem; font-weight: 800; margin-bottom: 8px; }
.tile p { color: var(--ink-soft); font-size: .94rem; font-weight: 500; }
.tile .watermark {
  position: absolute; right: -8px; bottom: -22px; font-family: var(--cjk);
  font-size: 7rem; line-height: 1; color: var(--ink); opacity: .04; pointer-events: none; font-weight: 700;
}
.tile-accent { background: linear-gradient(160deg, var(--card) 0%, #fff2ec 100%); border-color: #f3cfc6; }
.tile-accent .ic { background: var(--red); color: #fff; }
.tile .tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 16px; }

/* ===== Radicals explainer ===== */
.explain-grid { display: grid; grid-template-columns: .95fr 1.05fr; gap: 46px; align-items: center; }
.explain-card {
  background: linear-gradient(160deg, var(--card) 0%, var(--bg-soft) 100%);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 36px; text-align: center; position: relative;
}
.explain-card .big-char { font-family: var(--cjk); font-size: 6.5rem; font-weight: 700; line-height: 1; color: var(--ink); }
.explain-card .py { font-size: 1.55rem; color: var(--red); font-weight: 800; margin-top: 6px; }
.explain-card .mean { font-size: 1.1rem; color: var(--ink-soft); font-weight: 600; }
.explain-card .divider { height: 1px; background: var(--line); margin: 22px 0; }
.explain-card .lead { font-size: .82rem; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 14px; font-weight: 800; }
.explain-card .break { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }
.explain-card .break .rad { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 16px; }
.explain-card .break .rad .r { font-family: var(--cjk); font-size: 1.8rem; font-weight: 700; }
.explain-card .break .rad .t { font-size: .78rem; color: var(--muted); font-weight: 600; }
.explain p.body { color: var(--ink-soft); font-weight: 500; }
.explain ul { list-style: none; margin-top: 20px; }
.explain ul li { display: flex; gap: 12px; margin-bottom: 13px; color: var(--ink-soft); font-weight: 500; }
.explain ul li i { color: var(--red); margin-top: 5px; }
.explain ul li b { color: var(--ink); }

/* ===== Languages strip ===== */
.langs { text-align: center; background: var(--bg-soft); }
/* Languages: a compact, natural cluster under the stats (English) */
.langs-top { background: var(--bg); padding: 8px 0 60px; }
.lang-mini { text-align: center; }
.lang-mini .eyebrow { display: inline-flex; justify-content: center; margin-bottom: 14px; }
.lang-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 680px; margin: 0 auto; }
.lang-chips span {
  background: var(--card); border: 1px solid var(--line); border-radius: 50px;
  padding: 9px 18px; font-weight: 700; box-shadow: var(--shadow); font-size: .92rem; color: var(--ink-soft);
}

/* ===== Pricing ===== */
.pricing { background: var(--bg); }
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; max-width: 1000px; margin: 0 auto; align-items: stretch; }
.price-card {
  background: var(--card); border-radius: var(--radius); padding: 34px 30px;
  box-shadow: var(--shadow); border: 1px solid var(--line); position: relative;
  transition: transform .2s ease, box-shadow .2s ease;
  display: flex; flex-direction: column;
}
.price-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.price-card.featured { border: 2px solid var(--red); }
.price-card .badge {
  position: absolute; top: -13px; right: 24px; background: var(--red); color: #fff;
  font-size: .76rem; font-weight: 800; padding: 6px 14px; border-radius: 50px; letter-spacing: .03em;
}
.price-card h3 { font-size: 1.25rem; font-weight: 800; margin-bottom: 6px; }
.price-card .price { font-size: 2.4rem; font-weight: 800; letter-spacing: -.01em; }
.price-card .price small { font-size: 1rem; font-weight: 600; color: var(--muted); }
.price-card .sub { color: var(--ink-soft); margin-bottom: 20px; font-weight: 500; }
.price-card ul { list-style: none; margin: 20px 0 26px; flex: 1; }
.price-card ul li { display: flex; gap: 10px; align-items: flex-start; color: var(--ink-soft); margin-bottom: 11px; font-weight: 500; }
.price-card ul li i { color: var(--green); margin-top: 4px; }
.price-card .btn { width: 100%; justify-content: center; }

/* ===== How to start (stepper) ===== */
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 26px; box-shadow: var(--shadow); position: relative;
  transition: transform .2s ease, box-shadow .2s ease;
}
.step:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.step .n {
  font-size: 1.8rem; font-weight: 800; color: var(--red);
  width: 56px; height: 56px; border-radius: 16px; background: var(--red-dim);
  display: grid; place-items: center; margin-bottom: 18px;
}
.step .n.hz { font-size: 1.7rem; font-weight: 700; }
.step .lead { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 800; color: var(--muted); margin-bottom: 4px; }
.step h3 { font-size: 1.1rem; font-weight: 800; margin-bottom: 8px; }
.step p { color: var(--ink-soft); font-size: .94rem; font-weight: 500; }
.step .ex {
  display: inline-block; margin-top: 14px;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 12px; font-size: .86rem; font-weight: 600; color: var(--ink-soft);
}
.step .ex .hz { color: var(--ink); font-weight: 700; }

/* ===== FAQ ===== */
.faq { background: var(--bg-soft); }
/* English bg alternation: keep Method/Pricing/FAQ visually distinct from each other */
.pricing-soft { background: var(--bg-soft); }
.faq-cream { background: var(--bg); }
.faq-list { max-width: 760px; margin: 0 auto; }
.faq-item { background: var(--card); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 13px; overflow: hidden; }
.faq-q {
  width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  font-family: inherit; font-size: 1.03rem; font-weight: 800; color: var(--ink);
  padding: 19px 22px; display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq-q i { color: var(--red); transition: transform .25s ease; flex: none; }
.faq-item.open .faq-q i { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-a p { padding: 0 22px 20px; color: var(--ink-soft); font-weight: 500; }

/* ===== Stores / download ===== */
.stores { text-align: center; background: var(--espresso); color: #fff; }
.stores .eyebrow { color: var(--amber); }
.stores h2.section-title { color: #fff; }
.stores p { color: var(--espresso-soft); max-width: 560px; margin: 0 auto 28px; font-weight: 500; }
/* Warm coral variant for the closing download band (English; roll out on translate) */
.stores-warm { background: linear-gradient(135deg, var(--red) 0%, #f2a898 100%); }
.stores-warm .eyebrow { color: rgba(255,255,255,.9); }
.stores-warm p { color: rgba(255,255,255,.92); }
.store-btns { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.store-btn {
  display: inline-flex; align-items: center; gap: 12px;
  background: #fff; color: var(--ink); padding: 12px 24px; border-radius: 14px;
  transition: transform .18s ease; font-weight: 700;
}
.store-btn:hover { transform: translateY(-3px); }
.store-btn i { font-size: 2rem; }
.store-btn small { display: block; font-size: .72rem; color: var(--muted); line-height: 1; font-weight: 600; }
.store-btn b { font-size: 1.1rem; }

/* ===== Final CTA ===== */
.final-cta { text-align: center; background: linear-gradient(135deg, var(--red) 0%, #f2a898 100%); color: #fff; }
.final-cta h2 { font-size: clamp(1.8rem, 4.5vw, 2.6rem); font-weight: 800; margin-bottom: 12px; }
.final-cta p { font-size: 1.1rem; opacity: .96; max-width: 560px; margin: 0 auto 28px; font-weight: 500; }
.final-cta .btn-primary { background: #fff; color: var(--red); box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.final-cta .btn-primary:hover { background: #fff; color: var(--red-dark); }

/* ===== Footer ===== */
footer { background: var(--espresso); color: var(--espresso-soft); padding: 56px 0 28px; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 30px; margin-bottom: 38px; }
footer .logo { color: #fff; margin-bottom: 14px; }
footer .orchid { color: var(--red); }
footer p.about { font-size: .94rem; max-width: 340px; font-weight: 500; }
footer h4 { color: #fff; font-size: 1rem; margin-bottom: 16px; font-weight: 800; }
footer ul { list-style: none; }
footer ul li { margin-bottom: 10px; }
footer ul li a { font-size: .92rem; font-weight: 600; transition: color .15s; }
footer ul li a:hover { color: var(--amber); }
.foot-social { display: flex; gap: 14px; margin-top: 16px; }
.foot-social a {
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  background: rgba(255,255,255,.1); transition: background .15s; color: #fff;
}
.foot-social a:hover { background: var(--red); }
.foot-bottom {
  border-top: 1px solid rgba(255,255,255,.12); padding-top: 22px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: .86rem; font-weight: 500;
}

/* ===== Reveal animation ===== */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ===== Responsive ===== */
@media (max-width: 980px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .tile-lg { grid-column: span 2; grid-row: span 1; }
  .tile-wide { grid-column: span 2; }
  .counters-grid { grid-template-columns: repeat(2, 1fr); }
  .counter:nth-child(3)::before, .counter:nth-child(1)::before { display: none; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  section { padding: 56px 0; }
  .hero-grid, .explain-grid { grid-template-columns: 1fr; }
  .hero { text-align: center; }
  .hero p.sub { margin-left: auto; margin-right: auto; }
  .hero-cta, .hero-note { justify-content: center; }
  .hero-bento { margin-top: 8px; }
  .price-grid, .steps-grid { grid-template-columns: 1fr; }
  .explain-grid { gap: 34px; }

  nav.menu {
    position: fixed; top: 70px; left: 0; right: 0;
    background: var(--card); flex-direction: column; align-items: stretch; gap: 0;
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    max-height: 0; overflow: hidden; transition: max-height .3s ease;
  }
  nav.menu.open { max-height: 340px; }
  nav.menu a.link { padding: 16px 22px; border-bottom: 1px solid var(--line); }
  .burger { display: block; }
  /* Hide the header CTA on mobile: it overflowed the bar (the burger menu +
     hero buttons already cover this action). */
  .nav-right > a.btn { display: none; }
}
@media (max-width: 560px) {
  .bento { grid-template-columns: 1fr; }
  .tile-lg, .tile-wide { grid-column: span 1; }
  .counters-grid { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: 1fr; }
  .explain-card .big-char { font-size: 5rem; }
  .hero-bento { grid-template-columns: 1.3fr 1fr; }

  /* Full-width, stacked CTAs so long labels never overflow narrow phones */
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { width: 100%; justify-content: center; }
  /* Let long button / highlight labels wrap instead of forcing overflow */
  .btn { white-space: normal; }
  .hero h1 .hl { white-space: normal; }
  /* Wide legal tables scroll horizontally instead of stretching the page */
  .legal table { display: block; overflow-x: auto; white-space: nowrap; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { transition: none; opacity: 1; transform: none; }
  * { animation: none !important; }
}

/* ============ Legal pages (privacy / terms) ============ */
.legal-hero { padding: 110px 0 26px; background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.legal-hero h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); font-weight: 800; letter-spacing: -.01em; }
.legal-hero .updated { color: var(--muted); font-size: .9rem; margin-top: 8px; }
.legal-hero .back { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 600; font-size: .92rem; margin-bottom: 14px; }
.legal-hero .back:hover { color: var(--red); }
.legal { padding: 36px 0 70px; }
.legal .wrap { max-width: 820px; }
.legal h2 { font-size: 1.25rem; font-weight: 800; margin: 34px 0 10px; color: var(--ink); }
.legal h3 { font-size: 1.02rem; font-weight: 700; margin: 22px 0 6px; color: var(--ink); }
.legal p, .legal li { color: var(--ink-soft); line-height: 1.7; font-size: 1rem; font-weight: 500; }
.legal p { margin-bottom: 12px; }
.legal ul { margin: 6px 0 14px 22px; }
.legal li { margin-bottom: 7px; }
.legal a { color: var(--red); text-decoration: underline; }
.legal strong { color: var(--ink); }
.legal table { width: 100%; border-collapse: collapse; margin: 14px 0 18px; font-size: .95rem; }
.legal th, .legal td { text-align: left; padding: 10px 12px; border: 1px solid var(--line); vertical-align: top; }
.legal th { background: var(--bg-soft); font-weight: 700; color: var(--ink); }
.legal .note { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin: 18px 0; font-size: .95rem; }
