@font-face {
  font-family: Geist;
  src: url('/assets/fonts/Geist-Variable.woff2?v=r26') format('woff2');
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url('/assets/fonts/InstrumentSerif-Regular.woff2?v=r26') format('woff2');
  font-style: normal;
  /* One cut serves every weight: Latin keeps its true regular beside bold CJK fallback glyphs (no faux bold). */
  font-weight: 300 800;
  font-display: swap;
}

/* Liax design language (shared with r6): warm paper, ink, one ember accent, system light/dark.
   Light-mode accent/status tones are a shade deeper than r6 so 12px labels on their tinted pills meet WCAG AA (4.5:1).
   r7 changes layout only. Layers: header 40, dialog 1000 (dialog stylesheet), skip link 1100. */
:root {
  color-scheme: light dark;
  --bg: #f6f3ee;
  --surface: #fffdf9;
  --surface-soft: #efebe4;
  --surface-sunk: #e8e3da;
  --text: #1f1c19;
  --muted: #6b645c;
  --line: #e3ddd3;
  --line-strong: #8a8174;
  --strong: #1f1c19;
  --strong-text: #fffdf9;
  --strong-hover: #3a342e;
  --accent: #ad4126;
  --accent-text: #fffaf6;
  --accent-hover: #943520;
  --accent-soft: #f7e5dc;
  --live: #2a7049;
  --live-soft: #e1f1e7;
  --warn: #8a5f0e;
  --warn-soft: #f8eed8;
  --danger: #c0262e;
  --danger-soft: #f9e5e1;
  --focus: var(--strong);
  --radius-sm: .5rem;
  --radius-md: .625rem;
  --radius-lg: .875rem;
  /* Cards are outlined only (r13); on dark surfaces a 1px top highlight stands in for elevation. */
  --card-edge: none;
  /* Panels nested in a card: a lighter tint than --surface-soft, like shadcn's muted on card. */
  --surface-muted: color-mix(in srgb, var(--surface-soft) 55%, var(--surface));
  --pad: clamp(1.25rem, 4.5vw, 4rem);
  --max: 1280px;
  --font: Geist, "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  /* Display: an international editorial serif for Latin and numerals; CJK falls back to the system sans in bold. */
  --font-display: "Instrument Serif", Georgia, "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

/* Ink set: each surface level is 4–6% lighter than the one below it so depth reads without shadows. */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171412;
    --surface: #211d1a;
    --surface-soft: #2c2723;
    --surface-sunk: #110f0d;
    --text: #f3eee7;
    --muted: #ada397;
    --line: #3a342e;
    --line-strong: #6f665b;
    --strong: #f3eee7;
    --strong-text: #1c1916;
    --strong-hover: #d9d2c8;
    --accent: #ef8a63;
    --accent-text: #1c1916;
    --accent-hover: #f5a585;
    --accent-soft: #3a2419;
    --live: #7cc79a;
    --live-soft: #1b3326;
    --warn: #e5b45a;
    --warn-soft: #382c14;
    --danger: #ff7b86;
    --danger-soft: #3a2220;
    --card-edge: inset 0 1px 0 rgb(255 255 255 / .05);
    --surface-muted: color-mix(in srgb, var(--surface-soft) 55%, var(--surface));
  }
}
/* The same ink set on demand: reversed landing chapters, the photo closing and the wall screen (always dark). */
.section-ink, .closing, [data-admin-page="screen"] {
  color-scheme: dark;
  --bg: #171412;
  --surface: #211d1a;
  --surface-soft: #2c2723;
  --surface-sunk: #110f0d;
  --text: #f3eee7;
  --muted: #ada397;
  --line: #3a342e;
  --line-strong: #6f665b;
  --strong: #f3eee7;
  --strong-text: #1c1916;
  --strong-hover: #d9d2c8;
  --accent: #ef8a63;
  --accent-text: #1c1916;
  --accent-hover: #f5a585;
  --accent-soft: #3a2419;
  --live: #7cc79a;
  --live-soft: #1b3326;
  --warn: #e5b45a;
  --warn-soft: #382c14;
  --danger: #ff7b86;
  --danger-soft: #3a2220;
  --card-edge: inset 0 1px 0 rgb(255 255 255 / .05);
  --surface-muted: color-mix(in srgb, var(--surface-soft) 55%, var(--surface));
  background: var(--bg);
  color: var(--text);
}
/* In dark mode the reversed chapter drops one level below the page instead of vanishing into it. */
@media (prefers-color-scheme: dark) {
  .section-ink { --bg: #0f0d0c; --surface: #181512; --surface-soft: #231f1b; --line: #2e2924; }
}

*, *::before, *::after { box-sizing: border-box; scrollbar-width: none; }
*::-webkit-scrollbar { display: none; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.7 var(--font);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
p, li, h1, h2, h3, a, dd, dt, strong { overflow-wrap: anywhere; }
h1, h2, h3 { text-wrap: balance; }
/* Geist's tight tracking is for Latin; CJK glyphs are full-width squares and collide when tracked negative. */
html[lang="zh-CN"] :is(h1, h2, h3, .closing-quote, .summary-card strong) { letter-spacing: 0; }
p { text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
::selection { color: var(--accent-text); background: var(--accent); }
.mono { font-family: var(--mono); font-size: .875em; letter-spacing: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.skip-link {
  position: fixed; top: .75rem; left: .75rem; z-index: 1100;
  min-height: 2.75rem; padding: .65rem 1rem; border-radius: var(--radius-sm);
  background: var(--strong); color: var(--strong-text);
  transform: translateY(calc(-100% - 1rem));
}
.skip-link:focus-visible { transform: none; }

/* Brand, buttons, links (same as r6) */
.brand { display: inline-flex; align-items: center; gap: .55rem; min-width: 0; flex: none; }
.brand-mark {
  display: inline-block; flex: none; width: 2.25rem; height: 2.25rem; background: currentColor;
  -webkit-mask: url('/assets/liax-mark.svg?v=r26') center / contain no-repeat; mask: url('/assets/liax-mark.svg?v=r26') center / contain no-repeat;
}
.brand-name { font-family: var(--font-display); font-size: 1.5rem; line-height: 1; font-weight: 400; }
.lang-switch {
  min-width: 2.75rem; min-height: 2.5rem; padding: 0 .75rem; border: 1px solid var(--line); border-radius: 999px;
  background: transparent; font-size: .8125rem; font-weight: 600; cursor: pointer;
}
.lang-switch:hover { background: var(--surface-soft); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: 2.875rem; max-width: 100%; padding: .7rem 1.4rem;
  border: 1px solid transparent; border-radius: 999px;
  font: 560 .9rem/1.3 var(--font); text-align: center; white-space: nowrap; cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.btn:active { transform: scale(.98); }
.btn-sm { min-height: 2.75rem; padding: .55rem 1.15rem; font-size: .85rem; }
.btn-block { width: 100%; }
.btn-solid { background: var(--strong); color: var(--strong-text); }
.btn-solid:hover { background: var(--strong-hover); }
.btn-accent { background: var(--accent); color: var(--accent-text); }
.btn-accent:hover { background: var(--accent-hover); }
.btn-line { border-color: var(--line-strong); background: transparent; color: var(--text); }
.btn-line:hover { background: var(--surface-soft); }
.btn:disabled, .btn[aria-disabled="true"] { cursor: not-allowed; opacity: .5; }
/* The account's current plan is shown, not dimmed. */
.btn[data-plan-state="current"]:disabled { cursor: default; opacity: 1; }
.plan-note { margin: 1.25rem 0 0; padding: .75rem 0; border-top: 1px solid var(--line); font-size: .875rem; }
.text-link { display: inline-flex; align-items: center; gap: .25rem; min-height: 2.5rem; color: var(--text); font-size: .875rem; font-weight: 560; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.text-link:hover { text-decoration-color: currentColor; }
.accent-text { color: var(--accent); }

/* ---------- Landing layout (r7) ---------- */
/* --topbar is measured by landing.js; the values here are only the first-paint fallback. */
:root { --topbar: 4.25rem; }
.topbar {
  position: sticky; top: 0; z-index: 40; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem;
  padding: .7rem var(--pad);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.nav-pill { display: flex; gap: .15rem; padding: .25rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.nav-pill a {
  display: inline-flex; align-items: center; min-height: 2.5rem; padding: 0 .95rem; border-radius: 999px;
  color: var(--muted); font-size: .875rem; font-weight: 500; white-space: nowrap;
  transition: color .2s var(--ease), background-color .2s var(--ease);
}
.nav-pill a:hover { color: var(--text); background: var(--surface-soft); }
.topbar-actions { display: flex; justify-content: flex-end; align-items: center; gap: .5rem; }

/* The hero spans the viewport so the photo can bleed to the right edge; the copy keeps the shared content column. */
.hero { position: relative; display: flex; flex-direction: column; justify-content: center; gap: clamp(2rem, 4vh, 3rem); overflow: clip; width: 100%; padding: clamp(3rem, 7vh, 5rem) var(--pad); }
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: center; gap: clamp(2rem, 5vw, 4.5rem); max-width: var(--max); margin-inline: auto; }
.hero-halo {
  position: absolute; top: -8rem; left: 18%; width: min(56rem, 120vw); height: 36rem;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%); filter: blur(40px); pointer-events: none;
}
.badge {
  position: relative; display: inline-flex; align-items: center; gap: .5rem; margin: 0 0 1.5rem;
  color: var(--accent); font-size: .8125rem; font-weight: 600; letter-spacing: .04em;
}
.badge-dot { width: .5rem; height: .5rem; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.hero h1 { position: relative; margin: 0; font-family: var(--font-display); font-size: clamp(3rem, 7vw, 6.5rem); line-height: 1.1; letter-spacing: -.01em; font-weight: 600; }
.hero h1 > span { display: block; }
.hero h1 .accent-text { font-weight: 500; }
.hero-lead { position: relative; max-width: 38rem; margin: 1.5rem 0 0; color: var(--muted); font-size: 1.0625rem; line-height: 1.85; }
.hero-actions { position: relative; display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }

.hero-photo { position: relative; margin: 0 calc(-1 * max(0px, (100vw - var(--max)) / 2)) 0 0; }
.hero-photo img {
  width: 100%; height: auto; max-height: calc(100dvh - var(--topbar) - 4rem); min-height: 22rem; aspect-ratio: 10 / 11;
  object-fit: cover; object-position: 50% 30%; background: var(--surface-soft);
}

.section { width: 100%; max-width: var(--max); margin-inline: auto; padding: clamp(5.5rem, 12vw, 10rem) var(--pad); }
/* Three chapter bases alternate down the page: paper (default), ink (.section-ink) and the full-bleed photo (.closing).
   An ink chapter is viewport-wide; its side padding reproduces the paper chapters' content column. */
.section-ink { max-width: none; padding-inline: max(var(--pad), (100% - var(--max)) / 2 + var(--pad)); }
.section-intro { max-width: 46rem; margin-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.kicker { display: flex; align-items: center; gap: .75rem; margin: 0 0 1.5rem; color: var(--accent); font-size: .8125rem; font-weight: 600; letter-spacing: .04em; }
.kicker span:first-child { font-family: var(--mono); }
.kicker span:first-child::after { content: ""; display: inline-block; width: 1.75rem; height: 1px; margin-left: .75rem; vertical-align: middle; background: var(--accent); opacity: .5; }
.section h2 { white-space: pre-line; margin: 0; font-family: var(--font-display); font-size: clamp(2.25rem, 4.6vw, 4rem); line-height: 1.12; letter-spacing: -.01em; font-weight: 600; }
.section-lead { max-width: 38rem; margin: 1.25rem 0 0; color: var(--muted); font-size: 1.0625rem; line-height: 1.85; }

.section-intro-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; gap: 1.25rem 4rem; max-width: none; }
.section-intro-split .section-lead { margin: 0; }

.quiet-note { margin: 2rem 0 0; padding-left: 1rem; border-left: 2px solid var(--accent); color: var(--muted); font-size: .875rem; }

.fine-print { max-width: 56rem; margin: 1.25rem 0 0; color: var(--muted); font-size: .8125rem; line-height: 1.75; }

.faq { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.faq .section-intro { position: sticky; top: calc(var(--topbar) + 2rem); }
.faq-list { min-width: 0; height: 34rem; overflow-y: auto; overflow-anchor: none; }
.faq-list details { border-top: 1px solid var(--line); }
.faq-list details:last-child { border-bottom: 1px solid var(--line); }
.faq-list summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.75rem; padding-block: .9rem;
  font-weight: 560; cursor: pointer; list-style: none;
}
.faq-list summary:focus-visible { outline-offset: -3px; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: ""; flex: none; width: .5rem; height: .5rem; margin: 0 .25rem .25rem; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg); transition: transform .25s var(--ease); }
.faq-list details[open]:not(.is-closing) summary::after { margin-bottom: -.25rem; transform: rotate(-135deg); }
.faq-list details p { max-width: 44rem; margin: 0 0 1.25rem; color: var(--muted); font-size: .9375rem; line-height: 1.85; }

.closing {
  display: grid; justify-items: center; padding: clamp(5rem, 12vw, 9rem) var(--pad); text-align: center;
  background: linear-gradient(rgb(20 18 16 / .62), rgb(20 18 16 / .8)), url('/assets/taste-story.webp?v=r26') center / cover;
}
.closing-quote { max-width: 64rem; margin: 0; font-family: var(--font-display); font-size: clamp(1.75rem, 3.2vw, 2.75rem); line-height: 1.5; font-weight: 500; }
.closing-quote span { display: block; text-wrap: balance; }
.closing-quote span + span { margin-top: .75rem; }
.closing-quote span:nth-child(2) { color: var(--muted); }
/* Each clause of the second line stays whole, so lines break only between clauses (never inside 伙伴).
   English clauses end in a space; break-spaces keeps it as the gap between the boxes. */
.closing-quote .clause { display: inline-block; margin-top: 0; white-space: break-spaces; }
.closing .hero-actions { margin-top: 2.75rem; }

.footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1.25rem 2rem; padding: 2rem var(--pad); border-top: 1px solid var(--line); }
.footer-brand { display: flex; align-items: center; gap: .75rem; }
.footer-brand .brand-mark { width: 2rem; height: 2rem; }
.footer-brand strong { display: block; font-size: 1rem; font-weight: 600; line-height: 1.3; }
.footer-brand small { color: var(--muted); font-size: .75rem; }
.footer nav { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; }
.footer nav a { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--muted); font-size: .8125rem; }
.footer nav a:hover { color: var(--text); }
.footer-copy { margin: 0; color: var(--muted); font-size: .75rem; }

/* ---------- Content blocks (r14 editorial): no boxes — hairline rules and whitespace separate content.
   .card is a plain column; .card-inset only groups markup. ---------- */
.card { position: relative; display: flex; flex-direction: column; min-width: 0; }
.card-text { padding: 1rem 0 0; }
.card-text h3 { margin: 0 0 .5rem; font-family: var(--font-display); font-size: 1.5rem; line-height: 1.25; font-weight: 600; }
.card-text p { margin: 0; color: var(--muted); font-size: .9375rem; line-height: 1.8; }

/* Memory formation flow: a left-to-right step indicator (one-word labels, visible direction)
   where each connector names the condition for entering the next layer. */
.flow { --node: 2.75rem; --gap: 1.25rem; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); margin: 0; padding: 0; list-style: none; }
.flow-step { display: flex; flex-direction: column; gap: .9rem; min-width: 0; }
.flow-rail { position: relative; display: flex; align-items: center; height: var(--node); }
.flow-node {
  position: relative; z-index: 1; display: grid; place-items: center; flex: none; width: var(--node); height: var(--node);
  border-radius: 50%; background: var(--accent); color: var(--accent-text); box-shadow: 0 0 0 5px var(--accent-soft);
}
.flow-node svg { width: 1.3rem; height: 1.3rem; }
.flow-step:nth-child(2) .flow-node { background: color-mix(in srgb, var(--accent) 85%, var(--surface)); }
.flow-step:nth-child(3) .flow-node { background: color-mix(in srgb, var(--accent) 70%, var(--surface)); }
.flow-step:nth-child(4) .flow-node { background: var(--surface); color: var(--muted); box-shadow: 0 0 0 1px var(--line-strong), 0 0 0 5px var(--surface-soft); }
/* The connector runs from this node to the next one across the grid gap. */
.flow-gate { position: relative; display: flex; justify-content: center; flex: 1; margin-right: calc(-1 * var(--gap)); padding-inline: .5rem; }
.flow-gate::before { content: ""; position: absolute; top: 50%; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 40%, var(--line))); transform: translateY(-50%); }
.flow-gate::after { content: ""; position: absolute; top: 50%; right: .1rem; width: .5rem; height: .5rem; border-top: 2px solid color-mix(in srgb, var(--accent) 40%, var(--line)); border-right: 2px solid color-mix(in srgb, var(--accent) 40%, var(--line)); transform: translateY(-50%) rotate(45deg); }
.flow-gate span {
  position: relative; padding: .125rem .5rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  color: var(--text); font-size: .75rem; font-weight: 500; white-space: nowrap;
}
.flow-card { flex: 1; padding-top: 1rem; border-top: 1px solid var(--text); }
.flow-state { display: grid; gap: .75rem; padding: 0 0 1rem; border-bottom: 1px solid var(--line); }
.flow-state-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.flow-chips { display: flex; flex-wrap: wrap; gap: .25rem .5rem; margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: .8125rem; line-height: 1.5; }
.flow-chips li + li::before { content: "·"; margin-right: .5rem; }
.flow-no { color: var(--accent); font-family: var(--mono); font-size: .8125rem; font-weight: 650; }
.state-pill { padding: .125rem .5rem; border-radius: 999px; background: var(--surface-soft); color: var(--text); font-size: .75rem; font-weight: 500; }
.flow-step:nth-child(4) .flow-no { color: var(--muted); }
.flow-branch { margin: 0; padding: .5rem 0 0; color: var(--muted); font-size: .8125rem; line-height: 1.55; }
.flow-branch::before { content: "↳ "; color: var(--accent); }
.flow-rules {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.75rem; margin-top: 2rem; padding: 1rem 0;
  border-block: 1px solid var(--line); font-size: .875rem;
}
.flow-rules-label { padding: .125rem .5rem; border-radius: 999px; background: var(--strong); color: var(--strong-text); font-size: .75rem; font-weight: 500; }
.flow-rules strong { margin-right: .4rem; font-weight: 600; }
.flow-rules span span { color: var(--muted); }

/* Plans: three columns divided by rules; the recommended plan carries a 2px ember rule on top. */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; align-items: stretch; }
.plan { gap: 1.25rem; padding: 2rem 2rem 2rem 0; border-top: 1px solid var(--line); }
.plan + .plan { padding-left: 2rem; border-left: 1px solid var(--line); }
.plan-top { border-top-color: var(--accent); box-shadow: inset 0 1px 0 var(--accent); }
.plan h3 { margin: 0; font-family: var(--font-display); font-size: 1.5rem; font-weight: 500; }
.plan-top h3 { color: var(--accent); }
.plan-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .6rem; margin: 0; }
.plan-price .amount { font-family: var(--font-display); font-size: 4.5rem; line-height: 1; font-weight: 400; }
.plan-price .amount::before { content: "$"; margin-right: .1rem; font-size: 2rem; vertical-align: top; line-height: 1.6; color: var(--muted); }
.plan-price .unit { color: var(--muted); font-size: .8125rem; white-space: nowrap; }
/* The rows panel sits past the card's corner curve, so it takes the same small radius as other nested panels. */
.plan .plan-rows { display: grid; flex: 1; align-content: start; margin: 0; padding: 0; }
.plan-rows > div { display: grid; gap: .1rem; padding: .7rem 0; }
.plan-rows > div + div { border-top: 1px solid var(--line); }
.plan-rows dt { color: var(--muted); font-size: .75rem; }
.plan-rows dd { margin: 0; font-size: .9375rem; font-weight: 600; }
.plan-rows dd.yes::before { content: "✓ "; color: var(--live); font-weight: 700; }
.plan-rows dd.no { color: var(--muted); font-weight: 400; }
.plan .btn { align-self: start; }

.access-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0; }
.web-card { padding: 1rem 2.5rem 2rem 0; border-top: 1px solid var(--line); }
.platform-group { padding: 1rem 0 2rem 2.5rem; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.check-list { display: grid; gap: .55rem; margin: 1.25rem 0 0; padding: 1.25rem 0 0; border-top: 1px solid var(--line); list-style: none; font-size: .9375rem; }
.check-list li { display: grid; grid-template-columns: 1.1rem minmax(0, 1fr); gap: .5rem; }
.check-list li::before { content: "✓"; color: var(--live); font-weight: 700; }
.card-actions { margin-top: auto; padding-top: 1.25rem; }
.platform-table { display: grid; margin-top: 1.25rem; padding: 0; border-top: 1px solid var(--line); }
.platform-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .1rem 1rem; padding-block: .8rem; }
.platform-row + .platform-row { border-top: 1px solid var(--line); }
.platform-name { font-weight: 600; letter-spacing: -.01em; }
.platform-state {
  justify-self: end; display: inline-flex; align-items: center; gap: .375rem; padding: .125rem .5rem; border-radius: 999px;
  background: var(--warn-soft); color: var(--warn); font-size: .75rem; font-weight: 500; white-space: nowrap;
}
.platform-state::before { content: ""; width: .4rem; height: .4rem; border-radius: 50%; background: currentColor; }
.platform-state.is-live { background: var(--live-soft); color: var(--live); }
.platform-state.is-planned { background: var(--surface); color: var(--muted); }
.platform-desc { grid-column: 1 / -1; color: var(--muted); font-size: .8125rem; line-height: 1.6; }
.platform-group .fine-print { margin: 0; padding-top: 1rem; }

/* Design principles: six goal cards under the "different APIs, the same her" headline. */

/* Memory architecture: time-scale bars, memory-type table, retrieval pipeline and comparison table. */
.scale { padding: 0; }
.scale-axis, .scale-row { display: grid; grid-template-columns: 12.75rem 16rem minmax(0, 1fr); align-items: center; }
.scale-axis { grid-template-columns: 12.75rem repeat(4, 4rem) minmax(0, 1fr); padding-block: .5rem; border-bottom: 1px solid var(--text); color: var(--muted); font-size: .75rem; }
.scale-rows .scale-row:first-child { border-top: 0; }
.scale-axis span:nth-child(n + 2):not(:last-child) { padding-left: .375rem; border-left: 1px solid var(--line); }
.scale-rows { margin: 0; }
.scale-row { padding-block: .875rem; border-top: 1px solid var(--line); }
.scale-row dt { display: flex; flex-wrap: wrap; align-items: center; gap: .375rem .625rem; }
.scale-row dt strong { font-size: 1rem; font-weight: 600; }
.scale-row dd { margin: 0; }
.scale-row dd:last-child { padding-left: 1.75rem; color: var(--muted); font-size: .875rem; line-height: 1.7; }
.scale-bar { position: relative; height: .5rem; border-radius: 999px; background: var(--surface-soft); }
.scale-bar span { position: absolute; inset: 0 auto 0 0; width: var(--w); border-radius: inherit; background: var(--accent); transition: width 1.1s var(--ease); }
.js-reveal .scale:not(.is-playing) .scale-bar span { width: 0; transition: none; }
/* Memory steps and comparison rows float in one by one each time their chapter comes into view. */
.flow-step, .compare-table tbody tr { transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js-reveal .flow:not(.is-playing) .flow-step, .js-reveal .compare-table:not(.is-playing) tbody tr { opacity: 0; transform: translateY(1.25rem); transition: none; }
.flow-step:nth-child(2) { transition-delay: .15s; }
.flow-step:nth-child(3) { transition-delay: .3s; }
.flow-step:nth-child(4) { transition-delay: .45s; }
.compare-table tbody tr:nth-child(2) { transition-delay: .08s; }
.compare-table tbody tr:nth-child(3) { transition-delay: .16s; }
.compare-table tbody tr:nth-child(4) { transition-delay: .24s; }
.compare-table tbody tr:nth-child(5) { transition-delay: .32s; }
.compare-table tbody tr:nth-child(6) { transition-delay: .4s; }
.scale-row:nth-child(2) .scale-bar span { transition-delay: .12s; }
.scale-row:nth-child(3) .scale-bar span { transition-delay: .24s; }
.scale-row:nth-child(4) .scale-bar span { transition-delay: .36s; }
.scale-row[data-span="1"] { --w: 14%; }
.scale-row[data-span="2"] { --w: 38%; }
.scale-row[data-span="3"] { --w: 78%; }
.scale-row[data-span="4"] { --w: 100%; }
.scale-row[data-span="4"] .scale-bar span { background: var(--text); }

.store-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 1.25rem; align-items: stretch; }
.store-grid .spec-table { flex: 1 1 auto; }
.spec-card { padding: 0; overflow-x: auto; }
.spec-table { width: 100%; border-collapse: collapse; font-size: .8125rem; line-height: 1.55; }
.spec-table th, .spec-table td { padding: .65rem .75rem; border-top: 1px solid var(--line); text-align: left; vertical-align: middle; }
.spec-table thead th { border-top: 0; border-bottom: 1px solid var(--text); color: var(--muted); font-size: .75rem; font-weight: 500; white-space: nowrap; }
.spec-table tbody tr:first-child > * { border-top: 0; }
.spec-table tr > :first-child { padding-left: 0; }
.spec-table tr > :last-child { padding-right: 0; }
.spec-table tbody th { font-weight: 600; white-space: nowrap; }
.spec-table td.num { white-space: nowrap; }
.spec-table td[rowspan] { vertical-align: middle; }
.spec-note { margin: .75rem 0 0; color: var(--muted); font-size: .75rem; line-height: 1.6; }
/* Retrieval pipeline as a ruled list: question → four branches → fusion → context. */
.pipeline { display: grid; gap: 0; align-content: start; padding: 0; }
.pipe-step, .pipe-branches { position: relative; margin: 0; }
.pipe-step { padding: .7rem 0; border-top: 1px solid var(--line); font-size: .875rem; font-weight: 500; }
.pipe-start { border-top: 1px solid var(--text); font-weight: 600; }
.pipe-branches { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.5rem; padding: 0; list-style: none; }
.pipe-branches li { display: grid; gap: .125rem; padding: .7rem 0; border-top: 1px solid var(--line); }
.pipe-branches strong { font-size: .8125rem; font-weight: 600; }
.pipe-branches span { color: var(--muted); font-size: .75rem; }
.pipe-notes { display: grid; gap: .5rem; margin: 0; padding: .875rem 0 0; border-top: 1px solid var(--line); list-style: none; color: var(--muted); font-size: .75rem; line-height: 1.6; }
.compare-table tbody th { width: 7.5rem; }
.compare-table th, .compare-table td { padding-block: 1.25rem; font-size: .9375rem; }
.compare-table td { width: 50%; }
.compare-table tbody td:nth-child(2) { color: var(--muted); }
.compare-table tbody td:last-child { font-weight: 500; }
.compare-table thead th:last-child { color: var(--accent); }

@media (max-width: 1023px) {
  .store-grid { grid-template-columns: 1fr; }

  .scale-axis { display: none; }
  .scale-row:first-child { border-top: 0; }
  .scale-row { grid-template-columns: 1fr; row-gap: .5rem; }
  .scale-row dd:last-child { padding-left: 0; }
}

/* Native snap settles at chapter boundaries; oversized chapters remain freely scrollable inside. */
html:has(body.landing) { scroll-padding-top: var(--topbar); scroll-snap-type: y mandatory; }
.landing main > section { min-height: calc(100dvh - var(--topbar)); scroll-snap-align: start; }
.landing .section { padding-block: clamp(3.5rem, 6vw, 6rem); }
.landing .section-intro { margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.landing .section > :is(.flow-rules, .fine-print) { margin-bottom: 0; }
.landing .hero { padding-block: clamp(2.5rem, 5vw, 4rem); }
.landing .hero-grid { width: 100%; }
.landing .hero-photo img { max-height: 36rem; }
.landing .faq .section-intro { margin-bottom: 0; }
.landing .closing { align-content: center; padding-block: clamp(4.5rem, 8vw, 7rem); }
.landing .footer { scroll-snap-align: end; }
/* Large screens: bigger type and looser spacing, same layout. */
@media (min-width: 1024px) {
  .section-lead { font-size: 1.125rem; }
  #download .section-lead { max-width: none; }

  .hero h1 { font-size: clamp(3.25rem, min(7vw, 10vh), 7rem); }
  /* CJK glyphs are wider than Latin: keep each six-character line of the Chinese headline unbroken. */
  html[lang="zh-CN"] .hero h1 { font-size: clamp(2.75rem, min(5.6vw, 8.5vh), 5.5rem); line-height: 1.15; }
  .hero .badge { margin-bottom: clamp(1.5rem, 5vh, 3rem); font-size: .9375rem; }
  .hero-lead { max-width: 34rem; margin-top: clamp(1.5rem, 5vh, 3rem); font-size: 1.1875rem; }
  .hero-actions { margin-top: clamp(2rem, 7vh, 4rem); }

  .flow { --gap: 1.75rem; }
  .flow-state { gap: 1rem; padding: 0 0 1.25rem; }
  .flow-card .card-text { padding: 1.25rem 0 0; }
  .flow-card .card-text h3 { font-size: 1.75rem; }
  .card-text p { font-size: 1rem; }
  .flow-rules { margin-top: clamp(2rem, 5vh, 3.5rem); padding: 1.1rem 0; font-size: .9375rem; }

  .scale-row dt strong { font-size: 1.25rem; }
  .scale-row dd:last-child { font-size: 1rem; }
  .scale-bar { height: .625rem; }

  .store-grid { gap: 1.75rem; }
  .spec-table { font-size: .9375rem; }
  .pipe-step, .pipe-branches strong { font-size: .9375rem; }
  .pipe-branches span, .pipe-notes { font-size: .8125rem; }

  .plan-price .amount { font-size: 5rem; }
  .access-grid .check-list, .access-grid .platform-table { font-size: 1rem; }
  .faq-list summary { padding-block: clamp(1.1rem, 3vh, 1.75rem); font-size: 1.0625rem; }
}

/* Reveal: content is visible unless JS has opted in and motion is allowed. */
@media (prefers-reduced-motion: no-preference) {
  .js-reveal [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
  .js-reveal [data-reveal].is-in { opacity: 1; transform: none; }
}

@media (max-width: 1023px) {
  /* One-row top bar: the chapter nav is desktop-only (the chapters are a scroll away). */
  .topbar { grid-template-columns: 1fr auto; }
  .nav-pill { display: none; }
  .faq, .hero-grid, .section-intro-split { grid-template-columns: 1fr; }
  .flow { grid-template-columns: 1fr; row-gap: 0; }
  .flow-step { position: relative; display: grid; grid-template-columns: var(--node) minmax(0, 1fr); column-gap: 1rem; row-gap: .6rem; padding-bottom: 1.25rem; }
  .flow-step:not(:last-child)::before { content: ""; position: absolute; top: var(--node); bottom: 0; left: calc(var(--node) / 2 - 1px); width: 2px; background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 40%, var(--line))); }
  .flow-rail { display: contents; }
  .flow-node { grid-column: 1; grid-row: 1; }
  .flow-card { grid-column: 2; order: 1; }
  .flow-branch { grid-column: 2; order: 2; }
  .flow-gate { grid-column: 2; order: 3; justify-content: flex-start; margin: 0; padding: 0; }
  .flow-gate::before, .flow-gate::after { display: none; }
  .flow-gate span::before { content: "↓ "; color: var(--accent); }
  .flow-rules { flex-direction: column; align-items: flex-start; }
  .hero-photo { margin: 0 calc(-1 * var(--pad)); }
  .landing .hero-photo img { aspect-ratio: 4 / 3; max-height: 24rem; min-height: 0; border-radius: 0; }

  .faq .section-intro { position: static; }
  .plans, .access-grid { grid-template-columns: 1fr; }
  .plan, .plan + .plan { padding: 1.75rem 0; border-left: 0; }
  .web-card, .platform-group { padding: 1rem 0 2rem; border-left: 0; }
}
@media (max-width: 767px) {

  :root { --pad: 1.25rem; }
  .topbar-actions .btn { padding-inline: .9rem; }
  .hero h1 { font-size: clamp(2.5rem, 11.5vw, 3.5rem); }

  /* Phones: table rows stack, each cell labelled by its column header (data-label). */
  .spec-table thead { display: none; }
  .spec-table, .spec-table tbody, .spec-table tr, .spec-table th, .spec-table td { display: block; width: auto; }
  .spec-table tr { padding: .75rem 0; border-top: 1px solid var(--line); }
  .spec-table tbody th { padding: 0 0 .35rem; border: 0; white-space: normal; }
  .spec-table td[data-label] { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: .5rem; padding: .2rem 0; border: 0; }
  .spec-table td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: .75rem; }

  .closing { justify-items: start; text-align: left; }
  .closing .hero-actions { justify-content: flex-start; }
  .closing-quote { font-size: 1.25rem; }
  .footer { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .faq-list summary::after { transition: none; }
  .btn:active { transform: none; }
}
@media (forced-colors: active) {
  :focus-visible { outline-color: Highlight; }
  .btn, .plan, .flow-rules { border: 1px solid ButtonText; }
}
