:root {
  --bg: oklch(0.993 0.002 162);
  --surface: oklch(1 0 0);
  --sunk: oklch(0.966 0.009 162);
  --hero-bg: oklch(0.975 0.012 162);
  --ink: oklch(0.25 0.026 162);
  --ink-2: oklch(0.46 0.018 162);
  --rule: oklch(0.905 0.012 162);
  --rule-strong: oklch(0.76 0.025 162);
  --accent: oklch(0.45 0.10 162);
  --accent-soft: oklch(0.94 0.032 162);
  --on-accent: oklch(0.99 0.01 162);
  --mark: oklch(0.92 0.09 95);
  --mark-line: oklch(0.66 0.14 70);
  --warn-bg: oklch(0.95 0.05 85);
  --warn-ink: oklch(0.42 0.09 70);
  --neg: oklch(0.52 0.16 25);
  --shadow: 0 2px 4px oklch(0.25 0.026 162 / 0.03), 0 16px 48px -16px oklch(0.25 0.026 162 / 0.15);
  --r: 8px;
  --r-lg: 16px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --z-sticky: 20;
  --z-menu: 30;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: oklch(0.2 0.012 245);
    --surface: oklch(0.235 0.013 245);
    --sunk: oklch(0.18 0.01 245);
    --hero-bg: oklch(0.21 0.019 162);
    --ink: oklch(0.93 0.008 240);
    --ink-2: oklch(0.76 0.012 240);
    --rule: oklch(0.34 0.012 245);
    --rule-strong: oklch(0.5 0.015 245);
    --accent: oklch(0.74 0.12 162);
    --accent-soft: oklch(0.3 0.04 162);
    --on-accent: oklch(0.18 0.03 162);
    --mark: oklch(0.42 0.08 90);
    --mark-line: oklch(0.78 0.13 80);
    --warn-bg: oklch(0.32 0.05 80);
    --warn-ink: oklch(0.88 0.08 85);
    --neg: oklch(0.72 0.14 25);
    --shadow: 0 1px 2px oklch(0 0 0 / 0.3);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 100px; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1rem/1.65 var(--font);
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { line-height: 1.2; text-wrap: balance; margin: 0 0 0.5em; letter-spacing: -0.012em; }
h1 { font-size: 2.75rem; font-weight: 700; letter-spacing: -0.035em; }
h2 { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.025em; }
h3 { font-size: 1.15rem; font-weight: 600; }
p { margin: 0 0 1em; }
.mono { font-family: var(--mono); font-size: 0.92em; }
.small { font-size: 0.875rem; color: var(--ink-2); }
.wrap { width: min(1180px, 100% - 80px); margin-inline: auto; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: var(--z-menu); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
::selection { color: var(--ink); background: var(--accent-soft); }
.icon { display: inline-block; flex: none; width: 20px; height: 20px; background: currentColor; mask: var(--icon) center / contain no-repeat; vertical-align: middle; }
.icon--arrow-right { --icon: url("icons/arrow-right.svg"); }
.icon--arrow-up-right { --icon: url("icons/arrow-up-right.svg"); }
.icon--file-input { --icon: url("icons/file-input.svg"); }
.icon--layers { --icon: url("icons/layers.svg"); }
.icon--arrow-left-right { --icon: url("icons/arrow-left-right.svg"); }
.icon--scan-line { --icon: url("icons/scan-line.svg"); }
.icon--shield-check { --icon: url("icons/shield-check.svg"); }
.icon--upload { --icon: url("icons/upload.svg"); }
.icon--lock-keyhole { --icon: url("icons/lock-keyhole.svg"); }
.icon--check { --icon: url("icons/check.svg"); }

.masthead { border-bottom: 1px solid var(--rule); background: var(--surface); position: sticky; top: 0; z-index: var(--z-sticky); }
.masthead__row { display: flex; align-items: center; gap: 24px; min-height: 80px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; letter-spacing: -0.04em; font-size: 1.4rem; }
.brand__mark { width: 32px; height: 32px; flex: none; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a { color: var(--ink-2); text-decoration: none; padding: 10px 13px; border-radius: var(--r); font-size: 0.875rem; font-weight: 500; transition: color 180ms, background 180ms; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--sunk); color: var(--accent); }
.nav .nav__rates { display: inline-flex; align-items: center; gap: 14px; margin-left: 22px; padding-inline: 16px; border: 1px solid var(--rule-strong); color: var(--ink); }
.nav__rates .icon { width: 16px; height: 16px; }
.menu-btn { display: none; min-height: 44px; margin-left: auto; background: none; border: 1px solid var(--rule); border-radius: var(--r); padding: 8px 14px; font: 500 0.9rem var(--font); color: var(--ink); cursor: pointer; }
@media (max-width: 760px) {
  .menu-btn { display: inline-block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--rule); flex-direction: column; align-items: stretch; padding: 8px 20px 20px; z-index: var(--z-menu); box-shadow: var(--shadow); }
  .nav[data-open="true"] { display: flex; }
  .nav .nav__rates { margin: 8px 0 0; justify-content: space-between; }
}

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 48px; padding: 12px 20px; border-radius: var(--r); font: 600 0.875rem/1.35 var(--font); text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: transform 160ms cubic-bezier(0.22, 1, 0.36, 1), background 180ms, box-shadow 180ms; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: color-mix(in oklch, var(--accent) 88%, var(--ink)); }
.btn--ghost { background: transparent; border-color: var(--rule-strong); color: var(--ink); }
.btn--ghost:hover { background: var(--sunk); }
.btn:disabled { cursor: not-allowed; opacity: 0.55; transform: none; }
.btn .icon { width: 17px; height: 17px; }
.text-link { display: inline-flex; align-items: center; gap: 12px; font-size: 0.875rem; font-weight: 600; text-decoration: none; }
.text-link:hover { text-decoration: underline; }

.hero { padding: 64px 0 0; border-bottom: 1px solid var(--rule); background: var(--hero-bg); }
.hero__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.hero__copy { padding: 12px 0; }
.hero__label { display: flex; align-items: center; gap: 9px; font-size: 0.8125rem; font-weight: 600; color: var(--accent); margin-bottom: 24px; }
.hero__label .icon { width: 17px; height: 17px; }
.hero h1 { font-size: clamp(2.5rem, 4.2vw, 3.5rem); line-height: 1.12; letter-spacing: -0.04em; margin-bottom: 24px; text-wrap: initial; }
.hero h1 span { color: var(--accent); }
.hero__lede { font-size: 1rem; line-height: 1.75; color: var(--ink-2); max-width: 44ch; margin-bottom: 28px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__privacy { display: flex; align-items: center; gap: 8px; font-size: 0.75rem; color: var(--ink-2); margin: 20px 0 0; }
.hero__privacy .icon { color: var(--accent); width: 17px; height: 17px; }
.hero__grid > * { min-width: 0; }
.compatibility { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 56px; padding-block: 24px; border-top: 1px solid var(--rule); }
.compatibility__label { font-size: 0.75rem; color: var(--ink-2); }
.compatibility__names { display: flex; align-items: center; flex-wrap: wrap; gap: 28px; font-size: 0.9375rem; font-weight: 600; letter-spacing: -0.02em; color: var(--ink-2); }
.compatibility__names .icon { width: 16px; height: 16px; color: var(--accent); }

.hero__panel { border: 1px solid var(--rule); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow); }
.formbox { padding: 24px; }
.formbox__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.panel-label { display: block; font-size: 0.75rem; color: var(--ink-2); margin-bottom: 4px; }
.formbox__head h2 { font-size: 1.375rem; margin: 0; }
.format-tag { font: 500 0.6875rem var(--mono); color: var(--accent); border: 1px solid var(--rule); padding: 7px 9px; border-radius: 5px; }
.formbox__row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.formbox__row:last-child { border-bottom: 0; }
.field { padding: 12px 16px; border-right: 1px solid var(--rule); min-width: 0; }
.field:last-child { border-right: 0; }
.field label, .field .field__label { display: block; font-size: 0.8125rem; font-weight: 500; color: var(--ink-2); margin-bottom: 8px; }
.field select { width: 100%; min-height: 44px; border: 1px solid var(--rule); border-radius: var(--r); background: var(--surface); font: 600 0.9375rem var(--font); color: var(--ink); padding: 9px 12px; cursor: pointer; }
.field select:hover { border-color: var(--rule-strong); }
.formbox .field { padding: 0; border: 0; }
.step-number { font: 0.6875rem var(--mono); color: var(--accent); margin-right: 4px; }
.formbox__foot { display: grid; gap: 10px; padding-top: 16px; }
.formbox__foot .btn { justify-content: space-between; }
.formbox__foot .small { font-size: 0.6875rem; text-align: center; }

.example { padding: 20px 24px 24px; background: var(--sunk); border-top: 1px solid var(--rule); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.example__heading { display: flex; justify-content: space-between; gap: 12px; font-size: 0.8125rem; font-weight: 600; margin-bottom: 16px; }
.example__label { color: var(--ink-2); font-size: 0.6875rem; font-weight: 400; }
.example__cap { display: flex; justify-content: space-between; font-size: 0.6875rem; color: var(--ink-2); margin-bottom: 8px; }
.example__cap strong { font-weight: 500; }
.example table { width: 100%; min-width: 480px; border-collapse: collapse; font: 0.75rem/1.7 var(--mono); font-variant-numeric: tabular-nums; }
.example td, .example th { border-bottom: 1px solid var(--rule); padding: 6px; text-align: left; white-space: nowrap; }
.example tbody tr:last-child td { border-bottom: 0; }
.example th { color: var(--ink-2); font-size: 0.6875rem; font-weight: 500; }
.example .dim { color: var(--ink-2); }
.example__arrow { display: flex; justify-content: center; align-items: center; gap: 6px; color: var(--accent); font-size: 0.6875rem; margin: 12px 0; }
.example__arrow .icon { width: 14px; height: 14px; }
.example .scroll { overflow-x: auto; background: var(--surface); border: 1px solid var(--rule); border-radius: 5px; }
.example .example__output { border-color: color-mix(in oklch, var(--accent) 30%, var(--rule)); }
.example__positive { color: var(--accent); }
.example__negative { color: var(--neg); }

.section { padding: 64px 0; border-bottom: 1px solid var(--rule); }
.section__head { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 28px; flex-wrap: wrap; }
.section__head h2 { font-size: 1.625rem; margin-bottom: 8px; }
.section__head p, .section-intro { color: var(--ink-2); font-size: 0.875rem; margin: 0; }

.toolrows { border-top: 1px solid var(--rule); }
.toolrow { display: grid; grid-template-columns: 48px 230px 1fr 24px; gap: 24px; padding: 26px 8px; border-bottom: 1px solid var(--rule); align-items: center; text-decoration: none; color: var(--ink); transition: background 180ms; }
.toolrow:hover { background: var(--sunk); }
.toolrow h3 { margin: 0 0 8px; font-size: 1rem; }
.toolrow__icon { width: 44px; height: 44px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); border-radius: 10px; }
.toolrow__icon .icon { width: 22px; height: 22px; }
.toolrow p { margin: 0; color: var(--ink-2); font-size: 0.875rem; line-height: 1.7; max-width: 65ch; }
.toolrow__arrow { color: var(--accent); transition: transform 180ms; }
.toolrow:hover .toolrow__arrow { transform: translate(2px, -2px); }
.status { display: inline-block; font-size: 0.6875rem; line-height: 1.5; font-weight: 500; padding: 3px 8px; border-radius: 5px; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }

.section--referral { padding: 0; border: 0; }
.refstrip { display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: center; padding: 28px 32px; background: var(--sunk); border: 1px solid var(--rule); border-radius: var(--r-lg); }
.refstrip h2 { font-size: 1.125rem; margin-bottom: 10px; }
.refstrip p { margin: 0; color: var(--ink-2); max-width: 85ch; font-size: 0.8125rem; }
.refstrip__code { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.codebox { display: inline-flex; align-items: stretch; border: 1px dashed var(--rule-strong); border-radius: var(--r); background: var(--surface); }
.codebox code { font: 500 0.875rem var(--mono); padding: 14px; letter-spacing: 0.02em; }
.codebox button { min-height: 44px; border: 0; border-left: 1px dashed var(--rule-strong); background: transparent; font: 600 0.8125rem var(--font); color: var(--ink); padding: 0 14px; cursor: pointer; }
.codebox button:hover { background: var(--accent-soft); }
.codebox--inline { vertical-align: middle; margin: 2px 0; }
.ga-switch { margin: 16px 0 8px; padding: 14px 16px; border: 1px solid var(--rule); border-radius: var(--r); background: var(--sunk); }
.ga-switch p { margin: 0 0 10px; }
.ga-switch p:last-child { margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.codebox--inline code, .prose .codebox--inline code { background: none; padding: 8px 12px; border-radius: 0; font-size: 0.875rem; }
.codebox--inline button { min-height: 36px; }
.guide-link { font-weight: 700; color: var(--ink); background: var(--mark); text-decoration: none; padding: 1px 4px; border-bottom: 2px solid var(--mark-line); }
.guide-link:hover { background: var(--mark-line); color: var(--bg); }
.footnote { font-size: 0.8rem; color: var(--ink-2); margin-top: 8px; }
.refstrip .footnote { font-size: 0.6875rem; margin-top: 10px; }
@media (max-width: 760px) { .refstrip { grid-template-columns: 1fr; } .refstrip__code { align-items: flex-start; } }

.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 32px 48px; }
.resource-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 72px; }
.resource-grid > * { min-width: 0; }
.resource-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.resource-heading .icon { color: var(--accent); }
.resource-heading h2 { font-size: 1.25rem; margin: 0; }
.resource-pairs .section-intro { margin-bottom: 24px; }
.resource-grid .linklist a { display: flex; align-items: center; justify-content: space-between; gap: 20px; width: 100%; font-size: 0.875rem; }
.resource-grid .linklist .icon { width: 15px; height: 15px; color: var(--ink-2); }
.pair-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 28px; }
.pair-list__to { color: var(--ink-2); font-weight: 400; }
.linklist { list-style: none; padding: 0; margin: 0; }
.linklist li { padding: 10px 0; border-bottom: 1px solid var(--rule); display: flex; justify-content: space-between; gap: 12px; }
.linklist a { color: var(--ink); text-decoration: none; font-weight: 500; }
.linklist a:hover { color: var(--accent); text-decoration: underline; }
.linklist .small { flex-shrink: 0; }

.page-head { padding: 44px 0 40px; border-bottom: 1px solid var(--rule); background: var(--hero-bg); }
.crumbs { font-size: 0.85rem; color: var(--ink-2); margin-bottom: 14px; }
.crumbs a { color: var(--ink-2); }
.page-head p.lede { font-size: 1rem; color: var(--ink-2); max-width: 68ch; margin: 16px 0 0; }
.meta { font-size: 0.85rem; color: var(--ink-2); margin-top: 14px; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 256px; gap: 56px; padding: 40px 0 72px; }
.layout--single { grid-template-columns: minmax(0, 1fr); }
.layout > * { min-width: 0; }
@media (max-width: 960px) { .layout { grid-template-columns: minmax(0, 1fr); gap: 32px; } }
.aside { font-size: 0.875rem; }
.aside h2 { font-size: 0.95rem; margin-bottom: 8px; }
.aside section { padding: 20px; margin-bottom: 20px; background: var(--sunk); border: 1px solid var(--rule); border-radius: var(--r); }
.aside .linklist li:last-child { border-bottom: 0; }

.prose { max-width: 70ch; }
.prose p, .prose li { text-wrap: pretty; }
.prose h2 { margin-top: 1.8em; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: 0.4em; }
.prose code { font-family: var(--mono); font-size: 0.9em; background: var(--sunk); padding: 1px 5px; border-radius: 4px; }
.prose blockquote { margin: 1.4em 0; padding: 14px 18px; background: var(--sunk); border-radius: var(--r); }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.95rem; margin: 1.2em 0; }
.prose th, .prose td { border-bottom: 1px solid var(--rule); padding: 8px 10px; text-align: left; vertical-align: top; }
.prose th { border-bottom: 2px solid var(--ink); }
.prose thead, .ledger thead { background: var(--sunk); }
.prose tbody tr:hover, .ledger tbody tr:hover { background: var(--sunk); }
.table-wrap { overflow-x: auto; }
.csvbtn { min-height: 40px; padding: 8px 14px; margin: 4px 0 16px; font-size: 0.8125rem; }
.prose p.ref-inline { padding: 14px 0; border-top: 1px solid var(--mark-line); border-bottom: 1px solid var(--mark-line); }
.prose a.ref-link { color: var(--ink); font-weight: 700; text-decoration: none; background: var(--mark); border-bottom: 2px solid var(--mark-line); padding: 1px 3px; }
.prose a.ref-link:hover { background: var(--mark-line); color: var(--bg); }
.prose .disclose { display: block; font-size: 0.85rem; color: var(--ink-2); margin-top: 6px; }

.tool { border: 1px solid var(--rule); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow); }
.tool__bar { display: flex; flex-wrap: wrap; gap: 0; border-bottom: 1px solid var(--rule); }
.tool__bar .field { flex: 1 1 220px; }
.drop { position: relative; display: grid; place-items: center; text-align: center; gap: 10px; padding: 44px 24px; margin: 24px; border: 1px dashed var(--rule-strong); border-radius: var(--r); background: var(--hero-bg); cursor: pointer; transition: background 180ms, border-color 180ms; }
.drop:hover, .drop[data-drag] { border-color: var(--accent); background: var(--accent-soft); }
.drop__icon { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 8px; background: var(--surface); color: var(--accent); border: 1px solid var(--rule); border-radius: 12px; }
.drop__icon .icon { width: 24px; height: 24px; }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop strong { font-size: 1rem; max-width: 40ch; }
.drop:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.privacy-line { display: flex; gap: 8px; align-items: center; font-size: 0.8125rem; color: var(--ink-2); padding: 0 24px 20px; margin: 0; }
.privacy-line .icon { width: 16px; height: 16px; color: var(--accent); }
.result { padding: 0 24px 24px; }
.result:empty { display: none; }
.result-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; padding: 16px 0; border-top: 1px solid var(--rule); }
.big-number { font: 700 2.4rem/1 var(--font); margin: 4px 0 8px; letter-spacing: -0.02em; }
.big-number span { font-size: 1rem; font-weight: 500; color: var(--ink-2); letter-spacing: 0; }
.kinds { display: flex; flex-wrap: wrap; gap: 6px 16px; list-style: none; padding: 0; margin: 0; font-size: 0.9rem; color: var(--ink-2); }
.kinds b { color: var(--ink); }
.note { background: var(--sunk); padding: 10px 14px; border-radius: var(--r); font-size: 0.92rem; }
.note--warn { background: var(--warn-bg); color: var(--warn-ink); }
.issues { list-style: none; padding: 0; margin: 0; font-size: 0.9rem; }
.issue { padding: 8px 0; border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: 130px 1fr; gap: 12px; }
.issue__where { font-family: var(--mono); font-size: 0.82rem; color: var(--ink-2); }
.issue--error .issue__where { color: var(--neg); }
.ok-line { color: var(--accent); font-weight: 600; }
.h-small { font-size: 1rem; margin-top: 20px; }
.unknown { padding: 16px 0; border-top: 1px solid var(--rule); }
.unknown-val { color: var(--ink-2); font-style: italic; }
.ledger { width: 100%; border-collapse: collapse; font-size: 0.92rem; font-variant-numeric: tabular-nums; }
.ledger caption { text-align: left; font-weight: 600; padding: 12px 0 8px; }
.ledger th, .ledger td { border-bottom: 1px solid var(--rule); padding: 8px 10px; text-align: right; white-space: nowrap; }
.ledger th:first-child, .ledger td:first-child { text-align: left; }
.ledger thead th { border-bottom: 2px solid var(--ink); font-size: 0.8rem; color: var(--ink-2); }
.ledger--dense { font-size: 0.82rem; }
.ledger .neg { color: var(--neg); }
.notes { font-size: 0.9rem; color: var(--ink-2); padding-left: 1.2em; }
.ledger tr.is-primary th, .ledger tr.is-primary td { background: var(--accent-soft); }
.country-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 32px; border-top: 1px solid var(--rule); }
.country-list a { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--rule); color: var(--ink); text-decoration: none; font-weight: 600; }
.country-list a:hover { color: var(--accent); }
.country-tool { margin-top: 40px; }
.country-note { margin: 12px 0; padding: 12px 14px; border: 1px solid var(--rule); border-radius: var(--r); background: var(--sunk); font-size: 0.95rem; }
.country-note p { margin: 0 0 6px; }
.detail summary { cursor: pointer; font-weight: 600; padding: 10px 0; }
.detail__pick { max-width: 260px; padding: 0 0 10px; border: 0; }
.detail__pick select { border: 1px solid var(--rule-strong); border-radius: var(--r); padding: 6px 8px; }
.skeleton { display: grid; gap: 8px; padding: 16px 0; }
.skeleton i { display: block; height: 14px; border-radius: 4px; background: linear-gradient(90deg, var(--sunk), var(--rule), var(--sunk)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
.skeleton i:nth-child(2) { width: 70%; }
.skeleton i:nth-child(3) { width: 45%; }
@keyframes shimmer { to { background-position: -200% 0; } }

.mapping th, .mapping td { font-size: 0.9rem; }
.badge { display: inline-block; font-size: 0.78rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--warn-bg); color: var(--warn-ink); }
.badge--ok { background: var(--accent-soft); color: var(--ink); }

.mt { margin-top: 32px; }
.prose--wide { max-width: none; }

.foot { padding: 48px 0 24px; font-size: 0.8125rem; color: var(--ink-2); background: var(--sunk); }
.foot__grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.foot h2 { font-size: 0.9rem; color: var(--ink); margin-bottom: 8px; }
.foot ul { list-style: none; padding: 0; margin: 0; }
.foot li { margin-bottom: 8px; }
.foot a { color: var(--ink-2); text-decoration: none; }
.foot a:hover { color: var(--accent); text-decoration: underline; }
.foot .brand { color: var(--ink); }
.foot__about { margin-top: 16px; max-width: 36ch; line-height: 1.8; }
.foot__bottom { display: flex; justify-content: space-between; align-items: flex-start; gap: 48px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--rule); }
.foot__legal { margin: 0; max-width: 95ch; font-size: 0.6875rem; }
.foot__legal a { text-decoration: underline; }
.foot__privacy { display: flex; align-items: center; gap: 8px; flex-shrink: 0; font-size: 0.75rem; }
.foot__privacy .icon { width: 14px; height: 14px; }
@media (max-width: 760px) { .foot__grid { grid-template-columns: 1fr 1fr; } }

@media (max-width: 1100px) {
  .hero__grid { gap: 32px; }
  .nav a { padding-inline: 9px; }
  .nav .nav__rates { margin-left: 10px; }
  .compatibility__names { gap: 20px; }
  .toolrow { grid-template-columns: 44px 195px 1fr 20px; gap: 20px; }
  .resource-grid { gap: 40px; }
  .pair-list { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
  .wrap { width: min(1180px, 100% - 48px); }
  .hero__grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .hero h1 { font-size: 2.625rem; max-width: 24ch; }
  .hero__lede { max-width: 58ch; }
  .hero__actions { gap: 8px; }
  .hero__actions .btn { padding-inline: 14px; }
  .hero__privacy { align-items: flex-start; }
  .formbox, .example { padding: 20px; }
  .nav a { padding-inline: 8px; font-size: 0.8125rem; }
  .nav .nav__rates { gap: 8px; margin-left: 4px; padding-inline: 12px; }
  .masthead__row { gap: 14px; }
  .compatibility { align-items: flex-start; flex-direction: column; gap: 12px; }
  .refstrip { padding: 24px; gap: 24px; }
  .foot__bottom { flex-direction: column; gap: 16px; }
}
@media (max-width: 760px) {
  .wrap { width: calc(100% - 40px); }
  .masthead__row { min-height: 68px; }
  .brand { font-size: 1.25rem; }
  .nav a { font-size: 0.9375rem; min-height: 44px; }
  .nav .nav__rates { margin-left: 0; }
  .hero { padding-top: 36px; }
  .hero__grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .hero__copy { padding: 0; }
  .hero__label { margin-bottom: 20px; font-size: 0.8125rem; }
  .hero h1 { max-width: 19ch; font-size: 2.625rem; }
  .hero__lede { max-width: 55ch; }
  .hero__privacy { font-size: 0.8125rem; align-items: center; }
  .hero__actions .btn { padding-inline: 18px; }
  .compatibility { margin-top: 32px; padding-block: 20px; }
  .compatibility__names { gap: 10px 18px; font-size: 0.875rem; }
  .formbox__foot .small, .panel-label, .example__cap, .example__arrow, .example__label { font-size: 0.75rem; }
  .section { padding: 40px 0; }
  .section--referral { padding: 0; }
  .section__head { gap: 16px; margin-bottom: 24px; }
  .section__head h2 { font-size: 1.5rem; }
  .toolrow { grid-template-columns: 44px minmax(0, 1fr) 20px; gap: 12px 16px; padding: 24px 0; }
  .toolrow__title { grid-column: 2; }
  .toolrow p { grid-column: 2 / 4; font-size: 0.875rem; }
  .toolrow__arrow { grid-row: 1; grid-column: 3; }
  .toolrow h3 { font-size: 1rem; }
  .status { font-size: 0.75rem; }
  .resource-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .pair-list { grid-template-columns: 1fr 1fr; gap: 0 20px; }
  .refstrip { grid-template-columns: minmax(0, 1fr); padding: 24px; gap: 20px; }
  .refstrip p { font-size: 0.875rem; }
  .refstrip .footnote { font-size: 0.75rem; }
  .page-head { padding: 28px 0 32px; }
  h1 { font-size: 2.125rem; }
  h2 { font-size: 1.5rem; }
  .layout { padding-top: 28px; padding-bottom: 40px; }
  .drop { padding: 32px 16px; margin: 16px; }
  .privacy-line, .result { padding-inline: 16px; }
  .privacy-line { align-items: flex-start; }
  .privacy-line .icon { margin-top: 3px; }
  .badge { font-size: 0.75rem; }
  .foot { padding-top: 36px; font-size: 0.875rem; }
  .foot__grid { gap: 28px; }
  .foot__grid > :first-child { grid-column: 1 / -1; }
  .foot__about { max-width: 52ch; }
  .foot li a { display: inline-block; padding-block: 5px; }
  .foot__legal { font-size: 0.75rem; }
  .issue { grid-template-columns: 1fr; gap: 4px; }
}
@media (max-width: 420px) {
  .hero h1 { font-size: 2.375rem; }
  .hero__actions { gap: 8px; }
  .hero__actions .btn { padding-inline: 14px; }
  .hero__privacy { font-size: 0.75rem; }
  .formbox, .example { padding: 18px 16px; }
  .formbox__row { gap: 10px; }
  .field select { padding-inline: 8px; }
  .pair-list { grid-template-columns: 1fr; }
  .resource-grid .linklist a { min-height: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

.rateboard { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--rule-strong); border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.rateboard__cell { padding: 16px 18px; border-right: 1px solid var(--rule); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rateboard__cell:nth-child(3) { border-right: 0; }
.rateboard__label { font-size: 0.8rem; font-weight: 600; color: var(--ink-2); }
.rateboard__num { font: 700 clamp(1.5rem, 1.1rem + 1.4vw, 2.1rem)/1.1 var(--font); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.rateboard__num--muted { color: var(--ink-2); }
.rateboard__warn { grid-column: 1 / -1; margin: 0; padding: 10px 18px; background: var(--warn-bg); color: var(--warn-ink); font-size: 0.9rem; border-top: 1px solid var(--rule); }
@media (max-width: 640px) {
  .rateboard { grid-template-columns: minmax(0, 1fr); }
  .rateboard__cell { border-right: 0; border-bottom: 1px solid var(--rule); }
}
.attribution { margin-top: 20px; }
.chart { margin: 8px 0 16px; }
.chart__box { position: relative; }
.chart svg { width: 100%; height: auto; display: block; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); }
.chart svg.chart__labels { position: absolute; inset: 0; height: 100%; overflow: visible; background: none; border: 0; pointer-events: none; }
.chart__grid { stroke: var(--rule); stroke-dasharray: 3 4; }
.chart__label { fill: var(--ink-2); font: 11px var(--mono); }
.chart__buy { fill: none; stroke: var(--accent); stroke-width: 2; }
.chart__sell { fill: none; stroke: var(--mark-line); stroke-width: 2; }
.chart__dot--buy { fill: var(--accent); }
.chart__dot--sell { fill: var(--mark-line); }
.key { display: inline-block; width: 14px; height: 3px; vertical-align: middle; margin: 0 4px 0 10px; }
.key--buy { background: var(--accent); }
.key--sell { background: var(--mark-line); }
.chart-empty { padding: 16px; background: var(--sunk); border-radius: var(--r); }
.daynav { display: flex; justify-content: space-between; gap: 12px; margin: 20px 0; }
.ratetable td:first-child a { font-weight: 600; }

.livecard__table td, .livecard__table th { padding: 8px 10px; }
.livecard__table td:first-child a { font-weight: 700; }
.livecard__foot { padding: 0 14px 14px; margin: 0; }
.nextstep { margin: 16px 0 4px; padding: 12px 16px; border-left: 3px solid var(--accent); background: var(--sunk); border-radius: 0 var(--r) var(--r) 0; font-size: 0.9375rem; }
.format-tag--stale { color: var(--warn-ink); background: var(--warn-bg); border-color: transparent; }
.freshness { margin: 0 0 12px; font-size: 0.8125rem; color: var(--ink-2); }
.freshness--stale { padding: 10px 14px; background: var(--warn-bg); color: var(--warn-ink); border-radius: var(--r); }
.livecard .freshness { margin: 0; padding: 10px 14px 6px; }
.livecard .freshness--stale { margin: 10px 14px 8px; padding: 10px 12px; }
.section--taxtools { background: var(--sunk); }

html:lang(zh-Hans) body { font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC", sans-serif; }
html:lang(zh-Hans) .prose p, html:lang(zh-Hans) .prose li { line-height: 1.85; }

.cover { margin: 0 0 1.8em; }
.cover img { display: block; width: 100%; height: auto; border-radius: var(--r-lg); }
.prose figure.shot { margin: 1.8em 0; }
.prose figure.shot img { display: block; width: 100%; height: auto; border: 1px solid var(--rule); border-radius: var(--r); }
.prose figure.shot figcaption { margin-top: 8px; font-size: 0.88rem; line-height: 1.55; color: var(--ink-2); }

.monthstats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 0 0 1.8em; }
.monthstats > div { min-width: 0; padding: 14px 16px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); }
.monthstats dt { font-size: 0.82rem; color: var(--ink-2); }
.monthstats dd { margin: 4px 0 0; font-size: 1.15rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.monthstats dd span { display: block; font-size: 0.82rem; font-weight: 400; color: var(--ink-2); }
.monthstats + .prose > h2:first-child { margin-top: 0.4em; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.rateboard__size { font-size: 0.8rem; font-weight: 600; color: var(--accent); }
.rateboard__num--long { font-size: clamp(1.3rem, 1rem + 0.9vw, 1.6rem); }
.rateboard__num--none { color: var(--ink-2); font-size: clamp(1.15rem, 1rem + 0.8vw, 1.5rem); }
.toolblock { margin-top: 36px; }
.toolblock h2 { font-size: 1.375rem; margin-bottom: 14px; }
.calc { border: 1px solid var(--rule-strong); border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow); }
.calc__controls { display: grid; grid-template-columns: auto minmax(0, 1.1fr) minmax(0, 1fr); gap: 14px 18px; align-items: end; padding: 16px 18px; background: var(--sunk); border-bottom: 1px solid var(--rule); border-radius: var(--r) var(--r) 0 0; }
.seg { display: inline-flex; margin: 0; padding: 3px; min-width: 0; border: 1px solid var(--rule-strong); border-radius: var(--r); background: var(--surface); }
.seg label { position: relative; display: block; }
.seg input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.seg span { display: block; padding: 9px 14px; border-radius: 5px; font: 600 0.875rem/1.3 var(--font); color: var(--ink-2); white-space: nowrap; transition: background 160ms, color 160ms; }
.seg label:hover span { color: var(--ink); }
.seg input:checked + span { background: var(--accent); color: var(--on-accent); }
.seg input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.seg--unit { flex: none; }
.seg--unit span { padding: 8px 10px; }
.calc__field { min-width: 0; }
.calc__field .field__label { display: block; margin-bottom: 6px; font-size: 0.8125rem; font-weight: 500; color: var(--ink-2); }
.calc__amount { display: flex; gap: 8px; align-items: stretch; }
.calc__amount input { flex: 1 1 auto; width: 100%; min-width: 0; padding: 8px 10px; font: 600 1.05rem var(--font); font-variant-numeric: tabular-nums; color: var(--ink); background: var(--surface); border: 1px solid var(--rule-strong); border-radius: var(--r); }
.calc select { width: 100%; min-height: 46px; padding: 8px 10px; font: 600 0.9375rem var(--font); color: var(--ink); background: var(--surface); border: 1px solid var(--rule-strong); border-radius: var(--r); cursor: pointer; }
.calc__out { padding: 16px 18px 18px; transition: opacity 160ms; }
.calc[aria-busy="true"] .calc__out { opacity: 0.55; }
.calc__total { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0 0 4px; }
.calc__total span { font-size: 0.875rem; font-weight: 600; color: var(--ink-2); }
.calc__total strong { font: 700 clamp(1.5rem, 1.1rem + 1.4vw, 2.1rem)/1.1 var(--font); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.calc__meta { margin: 0 0 14px; font-size: 0.9rem; color: var(--ink-2); }
.calc__none { margin: 0 0 14px; padding: 10px 14px; font-size: 0.9rem; color: var(--warn-ink); background: var(--warn-bg); border-radius: var(--r); }
.calc__ads { font-size: 0.85rem; }
.calc__ads th:nth-child(2), .calc__ads td:nth-child(2) { min-width: 11em; white-space: normal; text-align: left; }
.cell-sub { display: block; font-size: 0.75rem; font-weight: 400; color: var(--ink-2); }
.ledger td.nil { font-size: 0.8125rem; white-space: normal; text-align: left; }
.nil { color: var(--ink-2); }
.sizes td:first-child { font-weight: 600; }
.matrix { margin-bottom: 4px; }
.ratetable .cell-sub a { font-weight: 500; }
.nextstep + .prose { margin-top: 18px; }
.takers + .takers { margin-top: 28px; }
@media (max-width: 760px) {
  .toolblock { margin-top: 28px; }
  .calc__controls { grid-template-columns: minmax(0, 1fr); padding: 14px; }
  .calc__controls > .seg { display: flex; }
  .calc__controls > .seg label { flex: 1 1 0; }
  .calc__controls > .seg span { text-align: center; }
  .calc__out { padding: 14px; }
  .ledger.sizes, .ledger.matrix, .ledger.calc__ads, .ledger.days, .ledger.hours, .ledger.stats { font-size: 0.8rem; }
  .ledger.sizes th, .ledger.sizes td, .ledger.matrix th, .ledger.matrix td, .ledger.calc__ads th, .ledger.calc__ads td,
  .ledger.days th, .ledger.days td, .ledger.hours th, .ledger.hours td, .ledger.stats th, .ledger.stats td { padding: 7px 5px; }
  .sizes .cell-sub, .calc__ads .cell-sub { font-size: 0.6875rem; }
  .sizes td:first-child, .matrix td:first-child, .stats td:first-child, .sizes thead th, .matrix thead th, .stats thead th, .calc__ads thead th { white-space: normal; }
  .matrix td .nil { white-space: normal; }
  .days th:nth-child(3), .days td:nth-child(3), .days th:nth-child(6), .days td:nth-child(6) { display: none; }
  .days td:first-child, .days thead th, .hours thead th { white-space: normal; }
  .calc__ads th:nth-child(2), .calc__ads td:nth-child(2) { min-width: 9em; }
}

.hero--rates { padding: 48px 0 56px; }
.hero--rates .hero__grid { align-items: start; }
.hero--rates h1 { font-size: clamp(2.25rem, 3.6vw, 3.125rem); margin-bottom: 18px; }
.hero--rates .hero__label { margin-bottom: 18px; }
.hero--rates .hero__lede { margin-bottom: 22px; }
.hero--rates .hero__actions { margin-top: 20px; }
.calc__title { font-size: 0.8125rem; font-weight: 600; letter-spacing: 0; color: var(--ink-2); margin: 0 0 8px; }
.calc--home .calc__controls { grid-template-columns: minmax(0, 1fr) auto; }
.calc--home .calc__field--amount { grid-column: 1 / -1; }
.calc--home .calc__controls > .seg { justify-self: start; }
.calc--home .calc__field--market select { min-height: 44px; }
.calc--home .calc__out { padding-bottom: 6px; }
.calc--home .calc__none { margin-bottom: 8px; }
.calc__more { margin: 0; padding: 0 18px 16px; font-size: 0.875rem; }
.livecard__more { margin: 0; padding: 4px 14px 16px; }
.livecard__table .cell-sub { white-space: nowrap; }
.trend { display: inline-flex; align-items: center; gap: 6px; }
.spark { width: 48px; height: 16px; flex: none; overflow: visible; }
.spark path { fill: none; stroke: var(--accent); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.compare { margin: 8px 0 0; }
.compare__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-bottom: 12px; }
.compare__bar h2 { font-size: 1.375rem; margin: 0; }
.seg--switch span { padding: 7px 14px; }
.ratecompare td:first-child { white-space: normal; }
.depthtable td:first-child a { font-weight: 600; }
.depthtable thead th { white-space: normal; vertical-align: bottom; min-width: 6.5em; }
.depthtable thead th:first-child { min-width: 0; }
.coingrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 470px), 1fr)); gap: 16px; align-items: start; margin: 16px 0 12px; }
.coingrid__card { min-width: 0; padding: 14px 16px 6px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); }
.coingrid__card h3 { font-size: 1rem; margin: 0 0 4px; }
.coinsum { font-size: 0.85rem; }
.coinsum th, .coinsum td { padding: 7px 6px; }
.coinsum thead th { white-space: normal; }
.depth { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 4px 0 12px; }
.depth__side { min-width: 0; padding: 14px 16px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); }
.depth__side h3 { font-size: 0.95rem; margin: 0 0 10px; }
.depth__bar { display: block; width: 100%; height: 8px; margin-bottom: 10px; border-radius: 4px; }
.depth__track { fill: var(--sunk); }
.depth__fill { fill: var(--accent); }
.depth__side--sell .depth__fill { fill: var(--mark-line); }
.depth dl { margin: 0; display: grid; gap: 6px; }
.depth dl > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-top: 1px solid var(--rule); padding-top: 6px; }
.depth dt { font-size: 0.82rem; color: var(--ink-2); }
.depth dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.chart__zero { stroke: var(--rule-strong); stroke-width: 1; }
.chart__dates { display: flex; justify-content: space-between; padding: 4px 2px 0; font: 11px var(--mono); color: var(--ink-2); }
@media (max-width: 760px) {
  .hero--rates { padding: 28px 0 36px; }
  .hero--rates h1 { font-size: 2rem; margin-bottom: 14px; }
  .hero--rates .hero__label { margin-bottom: 14px; }
  .hero--rates .hero__lede { margin-bottom: 18px; }
  .calc--home .calc__controls { grid-template-columns: minmax(0, 1fr); }
  .calc--home .calc__controls > .seg { justify-self: stretch; }
  .calc__more { padding: 0 14px 14px; }
  .compare__bar h2 { font-size: 1.2rem; }
  .depth { grid-template-columns: minmax(0, 1fr); }
  .ratecompare thead { display: none; }
  .ratecompare, .ratecompare tbody { display: block; }
  .ratecompare tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px 12px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
  .ratecompare td { display: block; padding: 4px 0; border: 0; text-align: left; white-space: normal; font-size: 0.875rem; overflow-wrap: anywhere; }
  .ratecompare td:first-child { grid-column: 1 / -1; font-size: 1rem; }
  .ratecompare td[data-label]::before { content: attr(data-label); display: block; font-size: 0.6875rem; font-weight: 500; line-height: 1.3; color: var(--ink-2); }
  .ratecompare tbody tr:hover { background: none; }
  .ratecompare .spark { width: 36px; }
  .depthtable thead { display: none; }
  .depthtable, .depthtable tbody { display: block; }
  .depthtable tr { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px 10px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
  .depthtable td { display: flex; flex-direction: column; justify-content: space-between; padding: 4px 0; border: 0; text-align: left; white-space: normal; font-size: 0.875rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
  .depthtable td:first-child { display: block; grid-column: 1 / -1; font-size: 1rem; }
  .depthtable td:nth-child(6) { grid-column: 1; }
  .depthtable td[data-label]::before { content: attr(data-label); display: block; font-size: 0.6875rem; font-weight: 500; line-height: 1.3; color: var(--ink-2); }
  .depthtable tbody tr:hover { background: none; }
  .coingrid__card { padding: 8px 0 0; border: 0; border-radius: 0; background: none; }
  .coinsum th, .coinsum td { padding: 7px 4px; font-size: 0.8rem; }
  .coinsum th:first-child, .coinsum td:first-child { padding-left: 0; white-space: nowrap; }
  .coinsum th:last-child, .coinsum td:last-child { padding-right: 0; }
  .coinsum .cell-sub { white-space: normal; }
  .livecard { padding: 18px 14px; }
  .livecard__table th, .livecard__table td { padding: 7px 4px; font-size: 0.8125rem; white-space: normal; }
  .livecard__table th:first-child, .livecard__table td:first-child { padding-left: 0; }
  .livecard__table th:last-child, .livecard__table td:last-child { padding-right: 0; }
  .livecard__table .spark { display: none; }
  .livecard .freshness, .livecard__foot { padding-inline: 0; }
  .livecard__more { padding-inline: 0; }
}
