:root {
  --space-3xs: 2px; --space-2xs: 4px; --space-xs: 8px; --space-sm: 12px; --space-md: 16px; --space-lg: 24px; --space-xl: 40px; --space-2xl: 64px; --space-3xl: 96px; --space-4xl: 144px;
  --text-xs: 0.875rem; --text-sm: 1rem; --text-md: 1.125rem; --text-lg: 1.25rem; --text-xl: 1.5rem; --text-2xl: 1.875rem; --text-3xl: 2.25rem;
  --text-display: clamp(2.375rem, 2.6vw + 1.2rem, 3.625rem);
  --text-section: clamp(1.875rem, 2vw + 1.2rem, 3rem); --text-title: clamp(1.25rem, 0.5vw + 1rem, 1.5rem); --text-lead: clamp(1.125rem, 0.35vw + 1rem, 1.3125rem);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1); --ease-in: cubic-bezier(0.7, 0, 0.84, 0); --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-micro: 120ms; --dur-short: 180ms; --dur-long: 420ms;
  --color-error: #b3261e; --color-success: #2f6b3a;
  --container: 1200px; --measure: 68ch; --gutter: 48px; --gap-columns: 40px; --section-gap-s: 88px; --section-gap: 120px; --section-gap-l: 144px;
  --z-base: 1; --z-raised: 10; --z-sticky-nav: 300;
  --color-paper: #f7f1e8; --color-paper-2: #f1e9dc; --color-paper-3: #ebe1d1; --color-surface: #fffdf9;
  --color-ink: #1c1b1a; --color-ink-2: #4a4741; --color-muted: #6b6762;
  --color-rule: #e1dcd3; --color-rule-strong: #cfc7ba;
  --color-accent: #a8321c; --color-accent-hover: #8e2814; --color-accent-ink: #fffdf9; --color-focus: #a8321c;
  --color-gold: #af751b; --color-gold-deep: #684d07; --color-gold-tint: #f3e6c4; --color-clay: #6b443d;
  --color-band: #19191c; --color-band-ink: #f7f1e8; --color-band-muted: #b9b4ab;
  --font-display: "Newsreader", ui-serif, Georgia, serif; --font-body: "Hanken Grotesk", ui-sans-serif, system-ui, sans-serif; --font-zh: "Noto Serif SC", "Songti SC", "SimSun", serif; --font-outlier: var(--font-body);
  --radius-sm: 6px; --radius-card: 12px; --radius-image: 20px; --radius-pill: 999px; --rule-hair: 1px;
  --shadow-card: none;
  --tracking-display: -0.015em;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { scrollbar-color: var(--color-muted) var(--color-paper); scroll-padding-top: var(--space-3xl); }
body { margin: 0; background: var(--color-paper); color: var(--color-ink); font-family: var(--font-body); font-size: var(--text-md); line-height: 1.55; -webkit-font-smoothing: antialiased; caret-color: var(--color-accent); }
::selection { background: color-mix(in oklab, var(--color-accent) 22%, transparent); color: var(--color-ink); }
:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.16em; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-synthesis: none; overflow-wrap: break-word; min-width: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
p:not([class]) { max-width: 65ch; }
img, video { max-width: 100%; height: auto; display: block; }
svg { display: block; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; }
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); box-sizing: border-box; }
.num, .figure, td.num { font-variant-numeric: tabular-nums; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
[data-slot] { position: relative; overflow: hidden; background: linear-gradient(160deg, var(--color-paper-2, var(--color-paper)), var(--color-paper-3, var(--color-paper))); }
[data-slot] > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
[data-slot]:has(> img) > :not(img):not([data-keep]) { display: none !important; }
@media (max-width: 60rem) { :root { --gutter: 24px; --section-gap-s: 80px; --section-gap: 96px; --section-gap-l: 120px; } }
@media (max-width: 40rem) { :root { --gutter: 16px; --section-gap-s: 56px; --section-gap: 72px; --section-gap-l: 96px; --gap-columns: 16px; } }
@media (prefers-reduced-motion: reduce) { *:not(.keep-motion), *:not(.keep-motion)::before, *:not(.keep-motion)::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; } }
html { scrollbar-color: var(--color-rule-strong) var(--color-paper); }
body { font-size: var(--text-md); line-height: 1.6; }
::selection { background: var(--color-gold-tint); color: var(--color-ink); }
a { color: var(--color-ink); text-decoration-color: var(--color-gold); text-underline-offset: 0.2em; transition: text-decoration-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out); }
a:hover { color: var(--color-accent); text-decoration-color: var(--color-accent); }
:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; border-radius: 4px; transition: none; }
.zh { font-family: var(--font-zh); font-weight: 500; }
.num { font-variant-numeric: tabular-nums; }
.skip-link { position: absolute; inset-inline-start: var(--space-md); top: -100px; z-index: var(--z-sticky-nav); background: var(--color-ink); color: var(--color-paper); padding: var(--space-sm) var(--space-md); border-radius: var(--radius-sm); text-decoration: none; }
.skip-link:focus-visible { top: var(--space-md); color: var(--color-paper); }
.skip-link:hover { color: var(--color-paper); }
.site-header { border-bottom: var(--rule-hair) solid var(--color-rule); background: var(--color-paper); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: var(--space-lg); min-height: 72px; flex-wrap: wrap; }
.wordmark { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 500; text-decoration: none; display: inline-flex; align-items: center; gap: var(--space-xs); min-height: 44px; }
.wordmark .seal { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: var(--radius-sm); background: var(--color-accent); color: var(--color-accent-ink); font-family: var(--font-zh); font-size: var(--text-sm); }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-2xs) var(--space-lg); }
.site-nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: var(--text-sm); text-decoration: none; color: var(--color-ink-2); }
.site-nav a:hover { color: var(--color-accent); }
.site-nav a[aria-current="page"] { color: var(--color-ink); text-decoration: underline; text-decoration-color: var(--color-accent); text-decoration-thickness: 2px; text-underline-offset: 0.45em; }
.breadcrumb { padding-top: var(--space-lg); font-size: var(--text-xs); color: var(--color-ink-2); }
.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs); }
.breadcrumb li { display: inline-flex; align-items: center; min-height: 44px; }
.breadcrumb li + li::before { content: "/"; margin-inline-end: var(--space-xs); color: var(--color-muted); }
.breadcrumb a { display: inline-flex; align-items: center; min-height: 44px; }
.hero { padding-block: var(--space-xl) var(--section-gap-s); }
.hero-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--space-xl) var(--gap-columns); align-items: start; }
.hero-copy { grid-column: 1 / span 7; display: grid; gap: var(--space-lg); }
.hero-art { grid-column: 8 / span 5; align-self: center; }
.hero .tool { grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-xl); align-items: start; padding: var(--space-xl); }
.tool-inputs { display: grid; gap: var(--space-lg); min-width: 0; }
.hero .result { border-top: 0; padding-top: 0; padding-inline-start: var(--space-xl); border-inline-start: var(--rule-hair) solid var(--color-rule); }
.gap-top { margin-top: var(--space-2xl); }
.stack { display: grid; gap: var(--space-md); }
.section .stack h3 { margin: 0; }
.section.first { border-top: 0; }
.section.first h1 { font-size: var(--text-display); font-weight: 300; line-height: 1.08; letter-spacing: var(--tracking-display); }
.hero h1 { font-size: var(--text-display); font-weight: 300; line-height: 1.08; letter-spacing: var(--tracking-display); max-width: 20ch; }
.lede { font-size: var(--text-lead); color: var(--color-ink-2); max-width: 56ch; }
.page-hero { padding-block: var(--space-md) var(--space-2xl); }
.page-hero h1 { font-size: var(--text-display); font-weight: 300; line-height: 1.08; letter-spacing: var(--tracking-display); max-width: 22ch; margin-bottom: var(--space-lg); }
.page-hero .lede { margin-bottom: var(--space-xl); }
.page-hero .answer { margin-bottom: var(--space-xl); }
.answer { font-size: var(--text-lead); line-height: 1.55; max-width: var(--measure); padding-inline-start: var(--space-lg); border-inline-start: 1px solid var(--color-accent); color: var(--color-ink); }
.meta-line { font-size: var(--text-xs); color: var(--color-ink-2); margin-top: var(--space-md); }
.frame { margin: 0; border-radius: var(--radius-image); overflow: hidden; background: var(--color-paper-3); }
.frame img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-long) var(--ease-out); }
.frame:hover img { transform: scale(1.02); }
.frame-wide { aspect-ratio: 16 / 9; }
.frame-32 { aspect-ratio: 3 / 2; }
.figure { margin: 0; display: grid; gap: var(--space-xs); min-width: 0; }
.figure figcaption { font-size: var(--text-xs); color: var(--color-ink-2); }
.page-hero .frame-wide { aspect-ratio: 16 / 9; }
.page-hero + .meta-line { margin-top: calc(-1 * var(--space-xl)); margin-bottom: var(--space-xl); }
.tool { background: var(--color-surface); border: var(--rule-hair) solid var(--color-rule); border-radius: var(--radius-card); box-shadow: var(--shadow-card); padding: var(--space-lg); display: grid; gap: var(--space-lg); }
.switch { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border: var(--rule-hair) solid var(--color-rule-strong); border-radius: var(--radius-pill); padding: var(--space-2xs); gap: var(--space-2xs); margin: 0; }
.switch legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.switch label { position: relative; display: flex; align-items: center; justify-content: center; gap: var(--space-xs); min-height: 44px; border-radius: var(--radius-pill); font-size: var(--text-sm); font-weight: 600; color: var(--color-ink-2); cursor: pointer; text-align: center; padding-inline: var(--space-sm); transition: background-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out); }
.switch input { appearance: none; flex: none; width: 14px; height: 14px; margin: 0; border: 1.5px solid currentColor; border-radius: 50%; background: transparent; cursor: pointer; }
.switch input:checked { background: currentColor; box-shadow: inset 0 0 0 2.5px var(--color-accent); }
.switch input:focus-visible { outline: 2px solid var(--color-accent-ink); outline-offset: 2px; }
.switch label:has(input:checked) { background: var(--color-accent); color: var(--color-accent-ink); }
.switch label:has(input:focus-visible) { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.switch label:has(input:not(:checked):focus-visible) input { outline-color: var(--color-focus); }
.switch label:hover:not(:has(input:checked)) { background: var(--color-paper-2); color: var(--color-ink); }
.fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-md); align-items: end; }
.fields .wide { grid-column: 1 / -1; }
.fields > .hint { grid-column: 1 / -1; }
.field { display: grid; gap: var(--space-2xs); min-width: 0; }
.field label { font-size: var(--text-xs); font-weight: 600; color: var(--color-ink-2); }
.field input, .field select { width: 100%; min-height: 48px; padding: var(--space-xs) var(--space-sm); border: var(--rule-hair) solid var(--color-muted); border-radius: var(--radius-sm); background: var(--color-surface); color: var(--color-ink); font-variant-numeric: tabular-nums; accent-color: var(--color-accent); transition: border-color var(--dur-micro) var(--ease-out); }
.field input:hover, .field select:hover { border-color: var(--color-ink-2); }
.field input:focus-visible, .field select:focus-visible { border-color: var(--color-accent); outline: 2px solid var(--color-focus); outline-offset: 1px; }
.field input[aria-invalid="true"] { border-color: var(--color-error); }
.hint { font-size: var(--text-xs); color: var(--color-ink-2); }
.error { font-size: var(--text-xs); color: var(--color-error); font-weight: 600; }
.actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); align-items: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs); min-height: 48px; padding: 0 var(--space-lg); border-radius: var(--radius-pill); border: var(--rule-hair) solid transparent; font-weight: 600; font-size: var(--text-sm); cursor: pointer; text-decoration: none; transition: background-color var(--dur-micro) var(--ease-out), border-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out), transform var(--dur-micro) var(--ease-out); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--color-accent); color: var(--color-accent-ink); }
.btn-primary:hover { background: var(--color-accent-hover); color: var(--color-accent-ink); }
.btn-quiet { background: transparent; color: var(--color-ink); border-color: var(--color-rule-strong); }
.btn-quiet:hover { border-color: var(--color-ink); color: var(--color-ink); background: var(--color-paper-2); }
.btn svg { width: 18px; height: 18px; flex: none; }
.result { border-top: var(--rule-hair) solid var(--color-rule); padding-top: var(--space-lg); display: grid; gap: var(--space-md); }
.result-head { display: grid; gap: var(--space-2xs); }
.result-title { font-family: var(--font-display); font-size: var(--text-2xl); font-weight: 400; line-height: 1.15; }
.result-zh { font-family: var(--font-zh); font-size: var(--text-xl); color: var(--color-clay); }
.result dl { margin: 0; display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); border-top: var(--rule-hair) solid var(--color-rule); }
.result dt, .result dd { margin: 0; padding: var(--space-sm) 0; border-bottom: var(--rule-hair) solid var(--color-rule); }
.result dt { font-size: var(--text-xs); color: var(--color-ink-2); font-weight: 600; padding-inline-end: var(--space-md); }
.result dd { font-variant-numeric: tabular-nums; }
.note { background: var(--color-gold-tint); color: var(--color-gold-deep); border-radius: var(--radius-sm); padding: var(--space-sm) var(--space-md); font-size: var(--text-sm); }
.status { font-size: var(--text-xs); color: var(--color-success); min-height: 1.5em; }
.result.is-updating { animation: settle var(--dur-short) var(--ease-out); }
@keyframes settle { from { opacity: 0.4; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.section { padding-block: var(--section-gap-s); border-top: var(--rule-hair) solid var(--color-rule); }
.section h2 { font-size: var(--text-section); font-weight: 300; line-height: 1.12; letter-spacing: var(--tracking-display); max-width: 24ch; margin-bottom: var(--space-lg); }
.section h3 { font-family: var(--font-display); font-size: var(--text-title); font-weight: 500; line-height: 1.25; margin: var(--space-xl) 0 var(--space-sm); }
.split { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--space-xl) var(--gap-columns); align-items: start; }
.split > .prose { grid-column: 1 / span 7; }
.split > .frame, .split > .figure, .split > .aside { grid-column: 8 / span 5; }
.split.flip > .prose { grid-column: 6 / span 7; grid-row: 1; }
.split.flip > .frame, .split.flip > .figure, .split.flip > .aside { grid-column: 1 / span 5; grid-row: 1; }
.prose { display: grid; gap: var(--space-md); min-width: 0; }
.prose > * { max-width: var(--measure); }
.prose h3 { margin: var(--space-md) 0 0; }
.prose ul, .prose ol { margin: 0; padding-inline-start: 0; list-style-position: inside; display: grid; gap: var(--space-xs); }
.prose li::marker { color: var(--color-gold); }
.steps { counter-reset: step; list-style: none; padding: 0 !important; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 2.25rem minmax(0, 1fr); gap: var(--space-sm); }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; border: 1px solid var(--color-gold); color: var(--color-gold-deep); font-weight: 600; font-size: var(--text-xs); }
.source { font-size: var(--text-xs); color: var(--color-ink-2); }
.more { display: flex; justify-content: space-between; align-items: center; gap: var(--space-md); margin-top: var(--space-xl); padding: var(--space-md) var(--space-lg); min-height: 64px; border: var(--rule-hair) solid var(--color-rule-strong); border-radius: var(--radius-pill); text-decoration: none; font-weight: 600; background: var(--color-surface); transition: border-color var(--dur-micro) var(--ease-out), background-color var(--dur-micro) var(--ease-out); }
.more:hover { border-color: var(--color-accent); background: var(--color-paper-2); color: var(--color-ink); }
.more svg { width: 20px; height: 20px; flex: none; color: var(--color-accent); transition: transform var(--dur-short) var(--ease-out); }
.more:hover svg { transform: translateX(3px); }
.table-wrap { overflow-x: auto; border: var(--rule-hair) solid var(--color-rule); border-radius: var(--radius-card); background: var(--color-surface); max-width: 100%; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; font-size: var(--text-sm); }
caption { text-align: start; padding: var(--space-md) var(--space-md) var(--space-xs); font-size: var(--text-xs); color: var(--color-ink-2); }
th, td { text-align: start; padding: var(--space-sm) var(--space-md); border-bottom: var(--rule-hair) solid var(--color-rule); white-space: nowrap; }
thead th { font-size: var(--text-xs); font-weight: 600; color: var(--color-ink-2); background: var(--color-paper-2); }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
tbody th { font-weight: 600; }
tr.is-current td, tr.is-current th { background: var(--color-gold-tint); }
tbody th { position: sticky; inset-inline-start: 0; background: var(--color-surface); }
.table-wrap:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.table-block { display: grid; gap: var(--space-xs); min-width: 0; }
.table-hint { display: none; font-size: var(--text-xs); font-weight: 600; color: var(--color-ink-2); }
.table-block:has(> .table-wrap[data-overflow]) > .table-hint { display: block; }
thead th:first-child { position: sticky; inset-inline-start: 0; z-index: var(--z-raised); }
.example { background: var(--color-surface); border: var(--rule-hair) solid var(--color-rule); border-radius: var(--radius-card); padding: var(--space-lg); display: grid; gap: var(--space-sm); }
.example dl { margin: 0; display: grid; grid-template-columns: minmax(0, 12rem) minmax(0, 1fr); }
.example dt, .example dd { margin: 0; padding: var(--space-xs) 0; border-bottom: var(--rule-hair) solid var(--color-rule); }
.example dt { font-size: var(--text-xs); font-weight: 600; color: var(--color-ink-2); }
.lookup { display: flex; flex-wrap: wrap; gap: var(--space-sm); align-items: end; }
.lookup .field { width: min(100%, 14rem); }
.faq { display: grid; gap: var(--space-lg); max-width: var(--measure); }
.faq h3 { margin: 0 0 var(--space-xs); }
.closing { margin-top: var(--space-2xl); }
.site-footer { background: var(--color-band); color: var(--color-band-ink); padding-block: var(--space-2xl) var(--space-xl); }
.site-footer a { color: var(--color-band-ink); text-decoration-color: var(--color-band-muted); }
.site-footer a:hover { color: var(--color-gold-tint); }
.site-footer :focus-visible { outline-color: var(--color-gold-tint); }
.footer-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--space-xl) var(--gap-columns); }
.footer-grid > div:first-child { grid-column: 1 / span 6; display: grid; gap: var(--space-sm); align-content: start; }
.footer-grid > nav { grid-column: 8 / span 5; }
.footer-grid p { color: var(--color-band-muted); font-size: var(--text-sm); max-width: 52ch; }
.footer-grid .wordmark { color: var(--color-band-ink); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2xs); }
.site-footer ul a { display: inline-flex; align-items: center; min-height: 44px; }
.footer-base { margin-top: var(--space-xl); padding-top: var(--space-lg); border-top: 1px solid color-mix(in oklab, var(--color-band-ink) 18%, transparent); font-size: var(--text-xs); color: var(--color-band-muted); }
@media (max-width: 64rem) {
  .hero-copy { grid-column: 1 / -1; }
  .hero-art { grid-column: 1 / -1; }
  .hero .tool { grid-template-columns: minmax(0, 1fr); padding: var(--space-lg); }
  .hero .result { padding-inline-start: 0; border-inline-start: 0; border-top: var(--rule-hair) solid var(--color-rule); padding-top: var(--space-lg); }
  .split > .prose, .split.flip > .prose, .split > .frame, .split > .figure, .split > .aside, .split.flip > .frame, .split.flip > .figure, .split.flip > .aside { grid-column: 1 / -1; grid-row: auto; }
  .footer-grid > div:first-child, .footer-grid > nav { grid-column: 1 / -1; }
}
@media (max-width: 40rem) {
  :root { --gutter: 16px; --text-display: clamp(1.875rem, 6vw + 0.6rem, 2.375rem); }
  .hero { padding-top: var(--space-lg); }
  .hero-grid { row-gap: var(--space-lg); }
  .hero .tool { order: 2; }
  .hero-art { order: 3; }
  .lede { font-size: var(--text-sm); }
  .hero-art .frame-wide, .page-hero .frame-wide { aspect-ratio: 4 / 3; }
  .fields { grid-template-columns: minmax(0, 1fr); }
  .tool { padding: var(--space-md); }
  .result dl, .example dl { grid-template-columns: minmax(0, 1fr); }
  .result dt, .example dt { border-bottom: 0; padding-bottom: 0; }
  .actions .btn { flex: 1 1 100%; }
  .site-header .container { padding-block: var(--space-xs); gap: 0; }
  .answer { padding-inline-start: var(--space-md); }
  table { font-size: var(--text-xs); }
  th, td { white-space: normal; padding: var(--space-xs) 6px; }
  caption { padding-inline: var(--space-sm); }
}
@media (prefers-reduced-motion: reduce) {
  .frame:hover img, .more:hover svg { transform: none; }
  .result.is-updating { animation: none; }
}
