/* panjia.app — one stylesheet for the landing page and the legal pages.
   The look is the app's: the wordmark's green (#449E6D / #306F4C), the
   misted-landscape mint of the splash, Nunito for display, Inter for text and
   LXGW WenKai GB (the app's Kai face) for the few Hanzi on the page. Every
   face is self-hosted under assets/fonts — the site makes no third-party
   request at all, which is what the privacy page promises. */

@font-face { font-family: "Nunito"; font-weight: 800; font-display: swap; src: url("/assets/fonts/nunito-800.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 900; font-display: swap; src: url("/assets/fonts/nunito-900.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("/assets/fonts/inter-400.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url("/assets/fonts/inter-500.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("/assets/fonts/inter-600.woff2") format("woff2"); }
@font-face { font-family: "PanJia Kai"; font-weight: 500; font-display: swap; src: url("/assets/fonts/wenkai-site.woff2") format("woff2"); }

:root {
  color-scheme: light;
  --ink: #15302a;
  --ink-soft: #4a6158;
  --ink-faint: #7d9188;
  --green: #449e6d;
  --green-deep: #306f4c;
  --green-ink: #22553a;
  --mint: #e4f5ea;
  --mint-deep: #cfeedd;
  --sky: #dff3f6;
  --paper: #fbfdf9;
  --card: #ffffff;
  --rule: #d9e9df;
  --gold: #e0a326;
  --gold-soft: #fff4d6;
  --seal: #c4402f;
  --shadow: 0 1px 2px rgba(21, 48, 42, .06), 0 10px 30px -12px rgba(21, 48, 42, .18);

  --display: "Nunito", ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  --text: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --kai: "PanJia Kai", "Kaiti SC", "STKaiti", "KaiTi", serif;

  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
  --radius: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.62 var(--text);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-deep); text-underline-offset: 3px; }
a:hover { color: var(--green-ink); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { font-family: var(--display); font-weight: 900; line-height: 1.12; letter-spacing: -0.015em; text-wrap: balance; margin: 0; }
p { margin: 0; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 50; background: var(--card); padding: 8px 14px; border-radius: 10px; }

/* ─────────────────────────── header ─────────────────────────── */

.site-head {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(251, 253, 249, .86);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-head.scrolled { border-bottom-color: var(--rule); }
.site-head .wrap { display: flex; align-items: center; gap: 18px; min-height: 64px; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--green); }
.brand img { width: 36px; height: 36px; border-radius: 10px; box-shadow: 0 2px 6px rgba(21, 48, 42, .15); }
.brand span { font: 900 23px/1 var(--display); letter-spacing: -0.02em; }

.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { font: 600 15px/1 var(--text); color: var(--ink-soft); text-decoration: none; padding: 10px 12px; border-radius: 999px; }
.nav a:hover { background: var(--mint); color: var(--green-ink); }

.langs { position: relative; display: inline-flex; align-items: center; }
.langs::before {
  /* A globe, so the picker reads as "language" in any script. */
  content: "";
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2322553a' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3c2.5 2.6 3.8 5.6 3.8 9s-1.3 6.4-3.8 9c-2.5-2.6-3.8-5.6-3.8-9S9.5 5.6 12 3z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.langs select {
  -webkit-appearance: none;
  appearance: none;
  font: 600 14px/1 var(--text);
  color: var(--green-ink);
  background: var(--mint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2322553a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 12px center / 11px no-repeat;
  border: 0;
  border-radius: 999px;
  padding: 10px 32px 10px 36px;
  cursor: pointer;
  max-width: 190px;
}
.langs select:hover { background-color: var(--mint-deep); }

@media (max-width: 760px) {
  .nav { display: none; }
  .langs { margin-left: auto; }
}

/* ─────────────────────────── buttons ─────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 800 16px/1 var(--display);
  letter-spacing: .01em;
  text-decoration: none;
  border-radius: 16px;
  padding: 15px 22px;
  border: 0;
  cursor: pointer;
}
.btn-primary { background: var(--green); color: #fff; box-shadow: 0 4px 0 var(--green-deep); }
.btn-primary:hover { color: #fff; background: #3f9666; }
.btn-primary:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--green-deep); }

.store {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 190px;
  padding: 11px 18px 11px 15px;
  border-radius: 14px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  line-height: 1.15;
}
.store:hover { color: #fff; background: #0c211c; }
.store svg { width: 26px; height: 26px; flex: none; fill: currentColor; }
.store small { display: block; font: 500 11.5px/1.2 var(--text); opacity: .8; }
.store b { display: block; font: 800 18px/1.15 var(--display); }
.store[aria-disabled="true"] { background: #2d463f; cursor: default; }
.store[aria-disabled="true"]:hover { background: #2d463f; }

/* ─────────────────────────── hero ─────────────────────────── */

.hero {
  position: relative;
  overflow: hidden;
  background: #d9f2e5 url("/assets/img/hero.webp") center top / cover no-repeat;
  min-height: min(720px, 86vh);
  display: flex;
  align-items: flex-end;
}
.hero::after {
  /* The art fades into mist at its foot; carry it down into the page. */
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 38%;
  background: linear-gradient(to bottom, rgba(251, 253, 249, 0), var(--paper) 92%);
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; width: 100%; padding-block: 120px 56px; }
.hero-copy { position: relative; max-width: 560px; }
.hero-copy::before {
  /* A pool of mist behind the words, so the lede reads over the hills. */
  content: "";
  position: absolute;
  inset: -60px -90px -50px -140px;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(251, 253, 249, .88), rgba(251, 253, 249, .55) 60%, rgba(251, 253, 249, 0));
  pointer-events: none;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 700 13px/1 var(--text);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--green-ink);
}
.eyebrow::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: currentColor; }

.hero h1 { font-size: clamp(2.35rem, 5.4vw, 3.9rem); margin-top: 16px; color: var(--ink); }
.hero h1 em { font-style: normal; color: var(--green); }
.hero .lede { margin-top: 18px; font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--ink-soft); max-width: 34em; }
.hero .stores { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero .facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 26px; padding: 0; list-style: none; font: 600 15px/1.3 var(--text); color: var(--ink-soft); }
.hero .facts li { display: inline-flex; align-items: center; gap: 8px; }
.hero .facts li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }

@media (max-width: 760px) {
  .hero { background-image: url("/assets/img/hero-sm.webp"); background-size: 180% auto; background-position: 78% 0; min-height: 0; }
  .hero .wrap { padding-block: 280px 40px; }
  .hero::after { height: 72%; background: linear-gradient(to bottom, rgba(251, 253, 249, 0), var(--paper) 46%); }
}

/* ─────────────────────────── sections ─────────────────────────── */

.section { padding-block: clamp(64px, 9vw, 112px); }
.section-head { max-width: 640px; }
.section-head h2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); margin-top: 14px; }
.section-head p { margin-top: 14px; color: var(--ink-soft); font-size: 1.08rem; }
.center { text-align: center; margin-inline: auto; }
.center .eyebrow::after { content: ""; width: 18px; height: 2px; border-radius: 2px; background: currentColor; }

/* hear it: four phrases in the app's own voice */

.hear { position: relative; z-index: 2; margin-top: -36px; padding-bottom: clamp(24px, 4vw, 40px); }
.hear-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; }
.hear-head h2 { font-size: clamp(1.35rem, 2.6vw, 1.8rem); }
.phrases { margin-top: 18px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 900px) { .phrases { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) {
  .phrase { padding: 14px 44px 16px 14px; }
  .phrase .play { top: 12px; right: 10px; width: 30px; height: 30px; }
  .phrase .play svg { width: 13px; height: 13px; }
}
.phrase {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 18px 64px 18px 20px;
  text-align: left;
  border: 0;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: transform .18s ease, box-shadow .18s ease;
}
.phrase:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(21, 48, 42, .06), 0 18px 36px -14px rgba(21, 48, 42, .28); }
.phrase .zh { font: 500 clamp(1.6rem, 3vw, 2rem)/1.15 var(--kai); color: var(--ink); }
.phrase .py { font: 600 .95rem/1.3 var(--text); color: var(--green); }
.phrase .mean { font-size: .9rem; color: var(--ink-faint); }
.phrase .play {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--green);
  box-shadow: 0 3px 0 var(--green-deep);
}
.phrase .play svg { width: 16px; height: 16px; fill: #fff; margin-left: 2px; }
.phrase.playing .play { animation: ring 1s ease-out infinite; }
@keyframes ring {
  0% { box-shadow: 0 3px 0 var(--green-deep), 0 0 0 0 rgba(68, 158, 109, .45); }
  100% { box-shadow: 0 3px 0 var(--green-deep), 0 0 0 14px rgba(68, 158, 109, 0); }
}

/* the path: phone + level ladder */

.path { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
@media (max-width: 860px) { .path { grid-template-columns: 1fr; } .path .phone { order: 2; margin-inline: auto; } }

.phone {
  position: relative;
  width: min(330px, 82vw);
  aspect-ratio: 620 / 1344;
  border-radius: 46px;
  padding: 11px;
  background: #11241f;
  box-shadow: 0 30px 60px -24px rgba(21, 48, 42, .45), inset 0 0 0 2px #2f4a42;
}
.phone .screen { width: 100%; height: 100%; object-fit: cover; border-radius: 36px; }
.phone .sticker { position: absolute; width: 132px; right: -54px; bottom: 64px; filter: drop-shadow(0 10px 18px rgba(21, 48, 42, .25)); }
@media (max-width: 520px) { .phone .sticker { width: 104px; right: -18px; } }

.levels { list-style: none; margin: 34px 0 0; padding: 0; display: grid; gap: 10px; }
.level {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 12px 18px 12px 12px;
  border-radius: 18px;
  background: var(--card);
  border: 1px solid var(--rule);
}
.tian {
  /* 田字格 — the square every Chinese child learns to write in. */
  position: relative;
  width: 56px;
  height: 56px;
  border: 1.5px solid #e2a29a;
  border-radius: 6px;
  background:
    linear-gradient(#f3d2cd, #f3d2cd) center / 100% 1px no-repeat,
    linear-gradient(#f3d2cd, #f3d2cd) center / 1px 100% no-repeat,
    #fffdfa;
  display: grid;
  place-items: center;
  font: 500 34px/1 var(--kai);
  color: var(--ink);
}
.level h3 { font-size: 1.15rem; }
.level p { font-size: .95rem; color: var(--ink-soft); }
.level .count { font: 900 1.35rem/1 var(--display); color: var(--green); text-align: right; font-variant-numeric: tabular-nums; }
.level .count small { display: block; font: 600 12px/1.3 var(--text); color: var(--ink-faint); letter-spacing: .02em; }
.path-note { margin-top: 18px; font-size: .95rem; color: var(--ink-faint); }

/* one lesson, in order */

.band { background: linear-gradient(180deg, var(--mint) 0%, #eef8f1 100%); }

.steps { margin: 48px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 980px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }
.step {
  position: relative;
  padding: 22px 20px 22px;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.step h3 { font-size: 1.2rem; }
.step .demo-pic { margin-top: auto; width: 128px; align-self: flex-start; }
.step p { font-size: .95rem; color: var(--ink-soft); }
.step .demo { margin-top: auto; padding-top: 12px; font: 500 1.6rem/1.2 var(--kai); color: var(--ink); }
.step .demo small { display: block; font: 500 .82rem/1.4 var(--text); color: var(--ink-faint); letter-spacing: .01em; }
.step .demo .gap { display: inline-block; min-width: 1.3em; border-bottom: 2.5px solid var(--green); color: var(--green); text-align: center; }

.ladder {
  margin-top: 22px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px 28px;
  align-items: center;
  padding: 24px clamp(18px, 3vw, 30px);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}
.ladder img { width: 120px; }
.ladder h3 { font-size: 1.3rem; }
.ladder p { margin-top: 6px; color: var(--ink-soft); }
.rungs { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px; margin-top: 16px; padding: 0; list-style: none; }
.rungs li {
  display: grid;
  place-items: end center;
  min-width: 52px;
  padding: 6px 8px;
  border-radius: 10px;
  background: var(--mint);
  color: var(--green-ink);
  font: 900 15px/1 var(--display);
  font-variant-numeric: tabular-nums;
}
.rungs li small { font: 600 11px/1.2 var(--text); color: var(--ink-faint); }
@media (max-width: 620px) { .ladder { grid-template-columns: 1fr; } .ladder img { width: 96px; } }

/* the writing card: 学 written stroke by stroke */

.tian-lg { width: 104px; height: 104px; margin-top: auto; border-radius: 10px; }
.tian-lg .strokes { width: 88%; height: 88%; }
.strokes .ghost { fill: #ece6dc; }
.strokes .ink { fill: none; stroke: var(--ink); stroke-linecap: round; stroke-linejoin: round; }
.step .demo-cap { font: 500 .82rem/1.4 var(--text); color: var(--ink-faint); }

/* two ways to learn */

.modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 44px; }
@media (max-width: 860px) { .modes { grid-template-columns: 1fr; } }
.mode {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42%;
  min-height: 330px;
  border-radius: 28px;
  background: var(--card);
  border: 1px solid var(--rule);
}
.mode .copy { padding: 30px 8px 30px 30px; display: flex; flex-direction: column; gap: 12px; }
.mode .tag { align-self: flex-start; font: 800 12.5px/1 var(--display); letter-spacing: .08em; text-transform: uppercase; padding: 7px 11px; border-radius: 999px; background: var(--mint); color: var(--green-ink); }
.mode h3 { font-size: 1.6rem; }
.mode p { color: var(--ink-soft); font-size: .98rem; }
.mode ul { margin: 4px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: .95rem; }
.mode li { display: flex; gap: 8px; }
.mode li::before { content: "✓"; color: var(--green); font-weight: 700; }
.faces { display: flex; margin-top: auto; padding-top: 14px; }
.faces img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; border: 3px solid #f7f2e7; margin-left: -10px; box-shadow: 0 2px 6px rgba(60, 40, 10, .18); }
.faces img:first-child { margin-left: 0; }
.mode .art { position: relative; }
.mode .art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mode.hsk { background: linear-gradient(160deg, #fff 0%, #f1faf4 100%); }
.mode.hsk .art img { object-fit: contain; object-position: center bottom; padding: 18px 10px 0 0; }
.mode.real { background: #f7f2e7; border-color: #ecdfc4; }
.mode.real .tag { background: #fbe9c2; color: #7a5310; }
.mode.real .art::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, #f7f2e7 0%, rgba(247, 242, 231, 0) 34%); }
@media (max-width: 520px) {
  .mode { grid-template-columns: 1fr; }
  .mode .copy { padding: 24px 22px 8px; }
  .mode .art { height: 230px; }
  .mode.real .art::before { background: linear-gradient(180deg, #f7f2e7 0%, rgba(247, 242, 231, 0) 30%); }
}

/* stories: a slow reel of the chapters' own pictures */

.cinema {
  overflow: hidden;
  padding-block: clamp(64px, 9vw, 104px);
  background: radial-gradient(120% 80% at 50% 0%, #1d3a33 0%, #0e1d19 70%);
  color: #fff;
}
.cinema .eyebrow { color: #9fd9b8; }
.cinema h2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); margin-top: 14px; max-width: 760px; color: #fff; }
.cinema p { margin-top: 14px; max-width: 560px; color: rgba(255, 255, 255, .74); font-size: 1.08rem; }
.reel {
  margin-top: 44px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.reel-track { display: flex; gap: 18px; width: max-content; animation: reel 70s linear infinite; }
.reel:hover .reel-track { animation-play-state: paused; }
.reel img {
  width: clamp(150px, 18vw, 220px);
  aspect-ratio: 9 / 16;
  height: auto;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .7);
}
.reel img:nth-child(odd) { transform: translateY(18px); }
@keyframes reel { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .reel-track { animation: none; }
  .reel { overflow-x: auto; }
}

/* beyond the path */

.rooms { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 44px; }
@media (max-width: 980px) { .rooms { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 460px) { .rooms { grid-template-columns: 1fr; } }
.room {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 18px 20px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--rule);
}
.room .pic { height: 108px; display: grid; place-items: center; margin-bottom: 6px; border-radius: 16px; background: var(--mint); overflow: hidden; }
.room .pic img { max-height: 96px; width: auto; }
.room .pic.photo img { max-height: none; width: 100%; height: 100%; object-fit: cover; object-position: center 62%; }
.room .figure { font: 900 1.55rem/1 var(--display); color: var(--green); font-variant-numeric: tabular-nums; }
.room .figure small { font: 600 .82rem/1 var(--text); color: var(--ink-faint); margin-left: 4px; }
.room h3 { font-size: 1.08rem; }
.room p { font-size: .92rem; color: var(--ink-soft); }

/* price */

.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 44px; max-width: 920px; margin-inline: auto; }
@media (max-width: 760px) { .plans { grid-template-columns: 1fr; } }
.plan { position: relative; padding: 30px 28px; border-radius: 28px; background: var(--card); border: 1px solid var(--rule); display: flex; flex-direction: column; gap: 14px; }
.plan h3 { font-size: 1.5rem; display: flex; align-items: center; gap: 10px; }
.plan h3 img { width: 40px; }
.plan .price { font: 900 2.1rem/1 var(--display); color: var(--ink); }
.plan .price small { font: 600 .95rem/1 var(--text); color: var(--ink-faint); margin-left: 4px; }
.plan ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.plan li { display: flex; gap: 10px; font-size: .97rem; }
.plan li::before { content: ""; flex: none; width: 18px; height: 18px; margin-top: 3px; border-radius: 50%; background: var(--mint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.4l2.6 2.5L13 6.4' fill='none' stroke='%23306f4c' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat; }
.plan.pro { background: linear-gradient(165deg, #fffdf6 0%, var(--gold-soft) 100%); border-color: #f0d79a; }
.plan.pro li::before { background-color: #fbe5ad; }
.plan .periods { display: flex; flex-wrap: wrap; gap: 8px; }
.plan .periods span { font: 700 13.5px/1 var(--text); padding: 8px 12px; border-radius: 999px; background: #fff; border: 1px solid #f0d79a; color: #6d4b0d; }
.plan .fine { font-size: .86rem; color: var(--ink-faint); margin-top: auto; }

/* questions */

.faq { max-width: 780px; margin: 40px auto 0; display: grid; gap: 10px; }
.faq details { border-radius: 18px; background: var(--card); border: 1px solid var(--rule); }
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 22px;
  font: 800 1.06rem/1.35 var(--display);
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 900 1.4rem/1 var(--display); color: var(--green); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 22px 20px; color: var(--ink-soft); }

/* closing call */

.closing { padding-block: 0 clamp(64px, 9vw, 104px); }
.closing .card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: clamp(28px, 5vw, 48px);
  border-radius: 32px;
  background: var(--green-deep);
  color: #fff;
}
.closing .card::before {
  content: "学";
  position: absolute;
  right: 190px;
  top: -40px;
  font: 500 240px/1 var(--kai);
  color: rgba(255, 255, 255, .06);
  pointer-events: none;
}
.closing h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); color: #fff; }
.closing p { margin-top: 10px; color: rgba(255, 255, 255, .82); max-width: 32em; }
.closing .stores { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.closing .store { background: #fff; color: var(--ink); }
.closing .store[aria-disabled="true"] { background: rgba(255, 255, 255, .9); }
.closing img { width: 180px; position: relative; }
@media (max-width: 720px) { .closing .card { grid-template-columns: 1fr; } .closing img { width: 130px; justify-self: end; margin-top: -10px; } .closing .card::before { right: 20px; } }

/* ─────────────────────────── footer ─────────────────────────── */

.site-foot { border-top: 1px solid var(--rule); background: #f3f8f4; }
.site-foot .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; padding-block: 44px 28px; }
.site-foot h4 { margin: 0 0 12px; font: 800 13px/1 var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); }
.site-foot ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: .95rem; }
.site-foot a { color: var(--ink-soft); text-decoration: none; }
.site-foot a:hover { color: var(--green-ink); text-decoration: underline; }
.site-foot .about p { margin-top: 12px; font-size: .93rem; color: var(--ink-soft); max-width: 30em; }
.site-foot .legal-line { grid-column: 1 / -1; padding-top: 22px; border-top: 1px solid var(--rule); font-size: .86rem; color: var(--ink-faint); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.site-foot .foot-langs { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: .9rem; }
.site-foot .foot-langs span { color: var(--ink); font-weight: 700; }
@media (max-width: 760px) { .site-foot .wrap { grid-template-columns: 1fr 1fr; } .site-foot .about { grid-column: 1 / -1; } }

/* ─────────────────────────── legal pages ─────────────────────────── */

.doc-hero { background: linear-gradient(180deg, var(--mint) 0%, var(--paper) 100%); }
.doc-hero .wrap { padding-block: 56px 40px; max-width: 980px; }
.doc-hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.1rem); margin-top: 14px; }
.doc-hero .meta { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.doc-hero .meta span { font: 600 13.5px/1 var(--text); padding: 8px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--rule); color: var(--ink-soft); }

.doc { max-width: 980px; display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px; padding-block: 8px 96px; }
@media (max-width: 880px) { .doc { grid-template-columns: 1fr; gap: 0; } .toc { display: none; } }

.toc { position: sticky; top: 88px; align-self: start; font-size: .9rem; }
.toc h4 { margin: 0 0 10px; font: 800 12.5px/1 var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); }
.toc ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; counter-reset: toc; }
.toc a { display: block; padding: 6px 10px; border-radius: 10px; color: var(--ink-soft); text-decoration: none; line-height: 1.35; }
.toc a:hover, .toc a.on { background: var(--mint); color: var(--green-ink); }

.prose { max-width: 680px; }
.prose h2 { font-size: 1.4rem; margin: 44px 0 12px; scroll-margin-top: 88px; }
.prose h2:first-of-type { margin-top: 28px; }
.prose h3 { font-size: 1.08rem; margin: 22px 0 6px; }
.prose p, .prose li { color: #2a4038; }
.prose p + p { margin-top: 12px; }
.prose ul { padding-left: 20px; margin: 10px 0; }
.prose li { margin: 6px 0; }
.prose li::marker { color: var(--green); }
.prose strong { color: var(--ink); }

.summary {
  margin-top: 8px;
  padding: 22px 24px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--rule);
  box-shadow: var(--shadow);
}
.summary h2 { margin: 0 0 10px !important; font-size: 1.15rem; }
.summary ul { list-style: none; padding: 0; display: grid; gap: 10px; margin: 0; }
.summary li { display: flex; gap: 12px; margin: 0; }
.summary li::before { content: ""; flex: none; width: 20px; height: 20px; margin-top: 2px; border-radius: 50%; background: var(--mint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.4l2.6 2.5L13 6.4' fill='none' stroke='%23306f4c' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px no-repeat; }

.table { overflow-x: auto; margin: 14px 0; border: 1px solid var(--rule); border-radius: 16px; background: var(--card); }
.table table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: .93rem; }
.table th, .table td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--rule); }
.table tr:last-child td { border-bottom: 0; }
.table th { font: 700 12.5px/1.2 var(--text); letter-spacing: .05em; text-transform: uppercase; color: var(--ink-faint); background: #f5faf6; }
.table td:first-child { font-weight: 600; color: var(--ink); white-space: nowrap; }

.callout { margin: 16px 0; padding: 16px 18px; border-radius: 16px; background: var(--gold-soft); border: 1px solid #f0d79a; color: #5c430f; font-size: .95rem; }

/* Both languages are in the markup and both render with JavaScript off —
   a store reviewer must never land on a blank page; the toggle hides one. */
.lang[hidden] { display: none; }

/* The other-language offer under the header (site.js → offer). */
.lang-offer { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 14px; padding: 10px 44px 10px 16px; background: var(--ink); color: #fff; font: 500 .95rem/1.3 var(--text); position: relative; }
.lang-offer a { color: #fff; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.lang-offer button { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border: 0; border-radius: 8px; background: none; color: #fff; font-size: 20px; line-height: 1; cursor: pointer; }
.lang-offer button:hover { background: rgba(255, 255, 255, .14); }

/* ───────── numbers: the strip under the first screen ───────── */
.numbers { padding-block: clamp(20px, 4vw, 36px) 0; }
.stats { list-style: none; margin: 0; padding: clamp(18px, 3vw, 28px); display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px 12px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
@media (max-width: 980px) { .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat { display: flex; flex-direction: column; gap: 4px; text-align: center; padding-inline: 4px; }
.stat b { font: 900 clamp(1.7rem, 3.2vw, 2.4rem)/1 var(--display); color: var(--green); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.stat span { font: 500 .9rem/1.3 var(--text); color: var(--ink-soft); }
.stat + .stat { border-left: 1px solid var(--rule); }
@media (max-width: 980px) { .stat:nth-child(3n + 1) { border-left: 0; } }
@media (max-width: 520px) { .stat:nth-child(3n + 1) { border-left: 1px solid var(--rule); } .stat:nth-child(2n + 1) { border-left: 0; } }

/* ───────── who it is for ───────── */
.section-head.center { margin-inline: auto; text-align: center; }
.whos { margin-top: 44px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 980px) { .whos { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .whos { grid-template-columns: 1fr; } }
.whocard { padding: 22px 20px 24px; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 8px; transition: transform .2s ease, box-shadow .2s ease; }
.whocard:hover { transform: translateY(-4px); box-shadow: 0 2px 4px rgba(21, 48, 42, .06), 0 22px 40px -16px rgba(21, 48, 42, .3); }
.whocard img { height: 96px; width: auto; align-self: flex-start; object-fit: contain; margin-bottom: 6px; }
.whocard h3 { font-size: 1.2rem; }
.whocard p { font-size: .95rem; color: var(--ink-soft); }

/* ───────── Tiếng Trung thực chiến: the app's forest ground ───────── */
.real { padding-block: clamp(64px, 9vw, 112px); color: #fff; background: radial-gradient(120% 70% at 85% 0%, #2f6049 0%, #24493a 38%, #13291f 100%); overflow: hidden; }
.real .eyebrow { color: #a8e0bf; }
.real h2 { font-size: clamp(2rem, 4vw, 3rem); margin-top: 14px; color: #fff; }
.real h2 em { font-style: normal; color: #ffd76a; }
.real .lede { margin-top: 16px; color: rgba(255, 255, 255, .8); font-size: 1.08rem; max-width: 34em; }
.real-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: clamp(32px, 6vw, 80px); align-items: center; }
@media (max-width: 900px) { .real-top { grid-template-columns: 1fr; } .talk { margin-inline: auto; } }
.real-stats { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 14px 34px; }
.real-stats li { display: flex; flex-direction: column; gap: 2px; }
.real-stats b { font: 900 2rem/1 var(--display); color: #ffd76a; font-variant-numeric: tabular-nums; }
.real-stats span { font-size: .9rem; color: rgba(255, 255, 255, .72); }
.tracks { list-style: none; margin: 30px 0 0; padding: 0; display: grid; gap: 10px; max-width: 520px; }
.tracks li { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); }
.tracks .step-no { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font: 900 1rem/1 var(--display); background: #ffd76a; color: #13291f; }
.tracks h3 { font-size: 1.08rem; color: #fff; }
.tracks p { font-size: .92rem; color: rgba(255, 255, 255, .72); }

/* One round, drawn: they ask, you answer aloud, they reply. */
.talk { width: 100%; max-width: 420px; padding: 18px; border-radius: 28px; background: #f3faf5; color: var(--ink); box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .55); display: flex; flex-direction: column; gap: 12px; }
.talk-head { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--rule); }
.talk-head img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; object-position: 62% 18%; }
.talk-head small { display: block; font: 600 .78rem/1.3 var(--text); color: var(--ink-faint); letter-spacing: .02em; }
.talk-head b { font: 800 1.02rem/1.25 var(--display); }
.turn { position: relative; max-width: 88%; padding: 12px 46px 12px 14px; border-radius: 18px; background: #fff; box-shadow: 0 1px 2px rgba(21, 48, 42, .08); }
.turn.you { align-self: flex-end; background: #e2f5e9; border: 2px solid var(--green); }
.turn .zh { font: 500 1.45rem/1.25 var(--kai); }
.turn .zh mark { background: none; color: var(--green-deep); border-bottom: 2.5px solid var(--green); }
.turn .py { font: 600 .82rem/1.35 var(--text); color: var(--green); margin-top: 2px; }
.turn .mean { font-size: .88rem; color: var(--ink-soft); margin-top: 2px; }
.turn .say { position: absolute; right: 8px; top: 10px; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: var(--green); cursor: pointer; display: grid; place-items: center; }
.turn .say svg { width: 14px; height: 14px; fill: #fff; margin-left: 2px; }
.turn.playing { box-shadow: 0 0 0 3px rgba(68, 158, 109, .35); }
.turn.playing .say { animation: ring 1s ease-out infinite; }
.your-turn { align-self: flex-end; font: 800 .72rem/1 var(--display); letter-spacing: .08em; text-transform: uppercase; padding: 6px 10px; border-radius: 999px; background: var(--green); color: #fff; margin-bottom: -4px; }
.mic { display: flex; align-items: center; justify-content: center; gap: 5px; padding-top: 6px; }
.mic span { width: 52px; height: 52px; margin-inline: 8px; border-radius: 50%; background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M12 15a3 3 0 0 0 3-3V6a3 3 0 0 0-6 0v6a3 3 0 0 0 3 3zm5-3a5 5 0 0 1-10 0H5a7 7 0 0 0 6 6.92V22h2v-3.08A7 7 0 0 0 19 12h-2z'/%3E%3C/svg%3E") center / 26px no-repeat; box-shadow: 0 0 0 8px rgba(68, 158, 109, .16); }
.mic i { width: 4px; height: 14px; border-radius: 2px; background: var(--green); opacity: .55; }
.mic i:nth-child(2), .mic i:nth-child(6) { height: 24px; }
.mic i:nth-child(3), .mic i:nth-child(5) { height: 34px; }
.talk.live .mic i { animation: bars 1s ease-in-out infinite; }
.talk.live .mic i:nth-child(2), .talk.live .mic i:nth-child(6) { animation-delay: .15s; }
.talk.live .mic i:nth-child(3), .talk.live .mic i:nth-child(5) { animation-delay: .3s; }
@keyframes bars { 0%, 100% { transform: scaleY(.45); } 50% { transform: scaleY(1); } }
.talk-all { align-self: center; border: 0; background: none; padding: 4px 6px; font: 700 .92rem/1.2 var(--text); color: var(--green-deep); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
/* The round plays itself in once: each turn rises as its moment comes. */
.js .talk[data-talk] .turn, .js .talk[data-talk] .your-turn { opacity: 0; transform: translateY(10px); transition: opacity .45s ease, transform .45s ease; }
.js .talk[data-talk] .turn.in, .js .talk[data-talk] .your-turn.in { opacity: 1; transform: none; }

.covers { margin-top: clamp(40px, 6vw, 64px); display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 980px) { .covers { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) { .covers { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cover { border-radius: 18px; overflow: hidden; background: #1b3a2d; border: 1px solid rgba(255, 255, 255, .1); transition: transform .2s ease; }
.cover:hover { transform: translateY(-4px); }
.cover img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.cover h3 { padding: 10px 12px 14px; font: 800 .95rem/1.3 var(--display); color: #fff; letter-spacing: 0; }

.reflex { margin-top: clamp(40px, 6vw, 64px); padding: clamp(22px, 4vw, 34px); border-radius: var(--radius); background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: clamp(20px, 4vw, 44px); align-items: center; }
@media (max-width: 860px) { .reflex { grid-template-columns: 1fr; } }
.reflex-head h3 { font-size: 1.5rem; color: #fff; }
.reflex-head p { margin-top: 10px; color: rgba(255, 255, 255, .74); font-size: .98rem; }
.pairs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 520px) { .pairs { grid-template-columns: 1fr; } }
.pairs li { padding: 14px 16px; border-radius: 16px; background: #f3faf5; color: var(--ink); display: flex; flex-direction: column; gap: 2px; }
.pairs span { font-size: .86rem; color: var(--ink-soft); }
.pairs b { font: 500 1.5rem/1.25 var(--kai); }
.pairs small { font: 600 .82rem/1.3 var(--text); color: var(--green); }

/* Sections rise as they come into view (only once the script is running). */
.js .rise { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .rise.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .rise, .js .talk[data-talk] .turn, .js .talk[data-talk] .your-turn { opacity: 1; transform: none; transition: none; }
  .talk.live .mic i { animation: none; }
}

/* ─────────────────────────── guide pages (/hsk-3-0/) ─────────────────────────── */

.guide .table-scroll { overflow-x: auto; margin: 16px 0; border: 1px solid var(--rule); border-radius: 14px; background: var(--card); }
.guide table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.guide th, .guide td { padding: 11px 14px; text-align: right; white-space: nowrap; border-top: 1px solid var(--rule); color: #2a4038; }
.guide thead th { border-top: 0; background: var(--mint); color: var(--green-ink); font: 700 .82rem/1.3 var(--text); white-space: normal; vertical-align: bottom; }
.guide th:first-child { text-align: left; }
.guide tbody th { font: 800 .95rem/1.2 var(--display); color: var(--ink); }
.guide td small, .guide th small { color: var(--ink-faint); font-size: .82rem; white-space: normal; }
.guide-cta { margin-top: 28px; padding: 22px; border-radius: 18px; background: var(--mint); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.guide-cta .stores { display: flex; flex-wrap: wrap; gap: 12px; }
.guide-cta p { font: 800 1.1rem/1.3 var(--display); color: var(--green-ink); }
.guide-source { margin-top: 22px; font-size: .86rem; }
.guide-source a { color: var(--ink-faint); }

/* ─────────────────────────── 404 ─────────────────────────── */

.lost .wrap { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; padding-block: 56px; }
.lost img { width: 180px; height: auto; }
.lost h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
.lost p { color: var(--ink-soft); }
.lost-home { margin-top: 6px; padding: 12px 22px; border-radius: 999px; background: var(--green); color: #fff; font: 800 1rem/1 var(--display); text-decoration: none; }
.lost-langs { margin-top: 18px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; font-size: .9rem; }
.lost-langs a { color: var(--ink-soft); }
