html[data-locale="zh"] {
  --serif: "Noto Serif SC", "Source Serif 4", "Songti SC", Georgia, serif;
  --sans: "Noto Sans SC", Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}
html[data-locale="ja"] {
  --serif: "Noto Serif JP", "Hiragino Mincho ProN", Yu Mincho, serif;
  --sans: "Noto Sans JP", "Hiragino Kaku Gothic ProN", Meiryo, system-ui, sans-serif;
}
html[data-locale="ko"] {
  --serif: "Noto Serif KR", "Noto Serif CJK KR", Batang, serif;
  --sans: "Noto Sans KR", "Noto Sans CJK KR", Malgun Gothic, system-ui, sans-serif;
}
html[data-locale="vi"] {
  --serif: "Noto Serif", Georgia, serif;
  --sans: "Be Vietnam Pro", Inter, system-ui, sans-serif;
}
:root {
  --bg: #f3f1ec;
  --surface: #ffffff;
  --surface-2: #f5f3ef;
  --surface-3: #e9e6df;
  --paper: #faf9f6;
  --text: #1b2a41;
  --muted: #5c6a7c;
  --faint: #9aa4b1;
  --line: #e1ddd5;
  --line-strong: #cac4ba;
  --accent: #26405e;
  --accent-hover: #1a3049;
  --accent-soft: #e7ecf3;
  --brand: #d2551f;
  --brand-hover: #b8480f;
  --brand-soft: #fbeadf;
  --warning: #a9691d;
  --warning-soft: #fbf0de;
  --danger: #b3372b;
  --danger-soft: #fae7e4;
  --success: #217a54;
  --success-soft: #e2f0e9;
  --shadow: 0 18px 50px rgba(27, 42, 65, .14);
  --paper-shadow: 0 2px 16px rgba(27, 42, 65, .09), 0 0 0 1px rgba(27, 42, 65, .07);
  --serif: "Source Serif 4", "Noto Serif SC", "Songti SC", "Source Han Serif SC", Georgia, serif;
  --sans: Inter, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --wrap: 1120px;
  --nav: 64px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.i18n-pending .i18n-hide { visibility: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button, .btn { font-family: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.skip {
  position: absolute; left: 12px; top: -40px; z-index: 20;
  padding: 8px 12px; background: var(--accent); color: #fff; border-radius: 6px;
}
.skip:focus { top: 12px; }

.wrap { width: min(var(--wrap), calc(100% - 40px)); margin-inline: auto; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

.nav {
  position: sticky; top: 0; z-index: 10; height: var(--nav);
  display: flex; align-items: center;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.nav-inner { display: flex; align-items: center; gap: 28px; width: min(var(--wrap), calc(100% - 40px)); margin-inline: auto; }
.brand {
  display: flex; align-items: center; gap: 10px; text-decoration: none;
}
.brand .wordmark { height: 28px; width: auto; display: block; }
@media (max-width: 960px) {
  .brand .wordmark { height: 24px; }
}
.brand small {
  margin-left: 2px; padding: 1px 6px; border-radius: 3px;
  background: var(--brand-soft); color: var(--brand);
  font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: .04em;
}
.nav-links { display: flex; gap: 22px; margin-left: 8px; }
.nav-links a { text-decoration: none; color: var(--muted); font-size: 14px; }
.nav-links a:hover { color: var(--text); }
.nav-cta { margin-left: auto; display: flex; align-items: center; gap: 16px; }

.lang { display: flex; align-items: center; }
.lang-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.lang-select {
  appearance: none; border: 1px solid var(--line); background: var(--paper);
  color: var(--text); border-radius: 6px; height: 32px; padding: 0 28px 0 10px;
  font-size: 12px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 14px) 13px, calc(100% - 9px) 13px;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
.lang-select:hover { border-color: var(--line-strong); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: 6px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--text); text-decoration: none; font-size: 14px;
  cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); }
.btn.pri { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.btn.pri:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--accent); }
.btn.ghost:hover { background: var(--accent-soft); }
.btn[aria-disabled="true"], .btn:disabled {
  background: var(--surface-3); border-color: var(--line); color: var(--faint); cursor: not-allowed;
}

.hero { padding: 56px 0 28px; }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 540px);
  gap: 56px; align-items: center;
}
.eyebrow {
  display: inline-block; margin: 0 0 16px;
  color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
}
.hero h1 {
  margin: 0; font-family: var(--serif); font-size: clamp(34px, 4.6vw, 56px);
  font-weight: 650; letter-spacing: -.03em; line-height: 1.18;
}
.lead { margin: 18px 0 0; color: var(--muted); font-size: 18px; line-height: 1.7; max-width: 42rem; }
.english-line {
  margin: 14px 0 0; font-family: var(--serif); font-style: italic; color: var(--accent); font-size: 17px;
}
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 28px; }
.cta-note, .mac-note, .audience { margin: 10px 0 0; color: var(--faint); font-size: 13px; }
.audience { max-width: 38rem; color: var(--muted); }

.app-frame {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); overflow: hidden; transform: translateY(8px);
}
.titlebar {
  display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 10px;
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.traffic { display: flex; gap: 6px; }
.traffic i { width: 10px; height: 10px; border-radius: 50%; display: block; }
.traffic .r { background: #ee6a5e; } .traffic .y { background: #f5bf4f; } .traffic .g { background: #62c455; }
.tproj { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tproj strong { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ver { font-family: var(--mono); font-size: 10px; color: var(--muted); background: var(--surface-3); padding: 1px 6px; border-radius: 3px; }
.credits-pill {
  margin-left: auto; font-family: var(--mono); font-size: 10.5px; color: var(--warning);
  background: var(--warning-soft); padding: 2px 7px; border-radius: 3px; white-space: nowrap;
}
.verdict {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 8px 14px; background: var(--warning-soft); border-bottom: 1px solid #e8dfc8;
  font-size: 12.5px;
}
.verdict b { font-weight: 650; }
.verdict span { color: var(--muted); font-size: 11px; white-space: nowrap; }
.app-body { display: grid; grid-template-columns: 44px 1fr; min-height: 320px; }
.rail {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 0;
  background: var(--surface-2); border-right: 1px solid var(--line); color: var(--faint); font-size: 9px;
}
.rail span { width: 100%; text-align: center; padding: 8px 0 10px; }
.rail span[aria-current="true"] { color: var(--accent); position: relative; }
.rail span[aria-current="true"]::before {
  content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 2.5px;
  background: var(--accent); border-radius: 0 2px 2px 0;
}
.paper-view { background: var(--bg); padding: 18px 18px 22px; }
.paper {
  background: var(--paper); box-shadow: var(--paper-shadow); padding: 22px 26px 26px;
  font-family: var(--serif); font-size: 13.5px; line-height: 1.85;
}
.paper h2 { margin: 0 0 10px; font-size: 18px; letter-spacing: -.02em; }
.paper h3 { margin: 16px 0 6px; font-size: 12px; font-family: var(--sans); color: var(--muted); font-weight: 650; }
.blk { position: relative; padding-left: 12px; margin: 0 0 8px; }
.gut {
  position: absolute; left: 0; top: 4px; bottom: 4px; width: 3px; border-radius: 2px;
}
.gut.ok { background: var(--success); }
.gut.warn { background: var(--warning); }
.hi-warn { background: var(--warning-soft); box-decoration-break: clone; }
.cite {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 16px; height: 16px; margin-left: 3px; padding: 0 4px; border-radius: 3px;
  font-family: var(--mono); font-size: 10px; font-style: normal; vertical-align: 1px;
}
.cite.ok { background: var(--success-soft); color: var(--success); }
.cite.warn { background: var(--warning-soft); color: var(--warning); }
.finding {
  margin-top: 14px; padding: 10px 12px; border: 1px solid var(--warning);
  background: #fff; border-radius: 6px; font-family: var(--sans);
}
.finding strong { display: block; font-size: 12px; }
.finding p { margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }

.promo {
  margin: 8px 0 12px; padding: 18px 22px;
  background: var(--brand-soft); border: 1px solid color-mix(in srgb, var(--brand) 22%, var(--line));
  border-radius: 10px; display: grid; grid-template-columns: auto 1fr; gap: 14px 18px; align-items: start;
}
.promo-mark {
  width: 42px; height: 42px; border-radius: 8px; background: var(--brand); color: #fff;
  display: grid; place-items: center; font-family: var(--mono); font-size: 12px; font-weight: 600;
}
.promo p { margin: 6px 0 0; color: var(--muted); font-size: 14px; max-width: 58rem; }
.promo h2 { margin: 0; font-size: 18px; letter-spacing: -.02em; }

section { padding: 84px 0; }
.kicker {
  margin: 0 0 10px; color: var(--brand); font-size: 12px; font-weight: 650;
  letter-spacing: .12em; text-transform: uppercase;
}
section h2, .page-head h1 {
  margin: 0; font-family: var(--serif); font-size: clamp(28px, 3.4vw, 40px);
  letter-spacing: -.03em; line-height: 1.2; max-width: 20ch;
}
.section-lead { margin: 14px 0 0; color: var(--muted); max-width: 42rem; font-size: 17px; }

.notebook {
  display: grid; grid-template-columns: 1fr 1fr; margin-top: 36px;
  background: var(--paper); box-shadow: var(--shadow); border: 1px solid var(--line);
  border-radius: 12px; overflow: hidden; position: relative;
}
.notebook::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 18px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(27,42,65,.08), transparent);
  pointer-events: none;
}
.page { padding: 28px 32px 32px; }
.page.left { background: #f6f1e6; }
.page h3 { margin: 0 0 18px; font-size: 15px; }
.page ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.page li { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: start; }
.page .mono { color: var(--warning); font-size: 12px; padding-top: 3px; }
.page .tag {
  display: inline-flex; width: fit-content; padding: 2px 7px; border-radius: 3px;
  background: var(--success-soft); color: var(--success); font-family: var(--mono);
  font-size: 11px; margin-top: 2px;
}
.page p { margin: 0; font-size: 14.5px; line-height: 1.6; }

.buys { display: grid; gap: 18px; margin-top: 36px; }
#buys { background: var(--surface); border-block: 1px solid var(--line); }
#buys .buy { background: var(--paper); }
.buy {
  background: var(--paper); border: 1px solid var(--line); border-radius: 10px;
  padding: 22px 26px 22px 28px; position: relative;
}
.buy::before {
  content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 3px; border-radius: 0 2px 2px 0;
}
.buy[data-rail="ok"]::before { background: var(--success); }
.buy[data-rail="warn"]::before { background: var(--warning); }
.buy[data-rail="brand"]::before { background: var(--brand); }
.buy h3 { margin: 0 0 8px; font-size: 20px; font-family: var(--serif); letter-spacing: -.02em; }
.buy p { margin: 0; color: var(--muted); max-width: 62rem; }
.pairs-kicker { margin-top: 48px; }
.pairs-title { max-width: 22ch; }
.pairs {
  margin-top: 24px; border: 1px solid var(--line); border-radius: 12px;
  overflow: hidden; background: var(--paper);
}
.pair {
  display: grid; grid-template-columns: 11.5rem 1fr; gap: 18px; align-items: start;
  padding: 16px 22px; border-top: 1px solid var(--line);
}
.pair:first-child { border-top: 0; }
.pair .sell { color: var(--faint); font-size: 12.5px; line-height: 1.45; padding-top: 2px; }
.pair .buy-line { margin: 0; font-size: 15.5px; line-height: 1.55; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 36px; }
.step {
  background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 22px;
  min-height: 100%;
}
.step-n {
  display: inline-block; margin-bottom: 14px; color: var(--accent);
  font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
}
.step h3 { margin: 0 0 8px; font-size: 18px; font-family: var(--serif); }
.step p { margin: 0; color: var(--muted); font-size: 14.5px; }

.not-this { background: var(--accent); color: #e7ecf3; }
.not-this .kicker { color: #f0784a; }
.not-this h2 { color: #faf9f6; }
.not-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 40px; margin-top: 32px; }
.not-grid h3 { margin: 0 0 8px; font-size: 16px; color: #fff; }
.not-grid p { margin: 0; color: #c5d0dc; font-size: 14.5px; }

.download-band { padding-bottom: 88px; }
.dl-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 16px; margin-top: 32px; }
.os-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 24px;
  display: grid; gap: 10px; align-content: start;
}
.os-card.muted { opacity: .78; }
.os-card .btn { justify-self: start; min-width: 220px; }
.os-meta { margin: 0; color: var(--muted); font-size: 13px; }
.os-file { margin: 0; color: var(--faint); font-size: 12px; word-break: break-all; }
.os-hint { margin: 4px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.sha { margin: 8px 0 0; font-size: 12px; color: var(--faint); }
.sha code { font-family: var(--mono); font-size: 11px; color: var(--text); overflow-wrap: anywhere; }

.page-head { padding: 48px 0 12px; }
.page-head p { margin: 14px 0 0; color: var(--muted); max-width: 42rem; font-size: 18px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 28px; }
.plain-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 24px 26px;
}
.plain-card h2 { font-size: 20px; max-width: none; }
.plain-card ol, .plain-card ul { margin: 14px 0 0; padding-left: 18px; color: var(--muted); }
.plain-card li { margin: 8px 0; }

.footer {
  padding: 36px 0 48px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px;
}
.footer-inner { display: flex; justify-content: space-between; gap: 24px; align-items: end; }
.footer strong { display: block; color: var(--text); font-family: var(--serif); font-size: 18px; font-weight: 650; font-style: italic; }
.footer .cat { margin-top: 4px; }
.footer .note { max-width: 28rem; text-align: right; }

@media (max-width: 1180px) {
  .nav-links { display: none; }
}

@media (max-width: 960px) {
  .hero-grid, .notebook, .steps, .not-grid, .dl-grid, .two, .footer-inner, .pair { grid-template-columns: 1fr; }
  .notebook::after { display: none; }
  .hero { padding-top: 32px; }
  .footer-inner, .footer .note { text-align: left; align-items: start; }
}

@media (max-width: 640px) {
  .wrap, .nav-inner { width: min(100% - 28px, var(--wrap)); }
  .nav-inner { gap: 10px; }
  .nav-cta { gap: 8px; }
  .nav-cta .btn { display: none; }
  .lang-select { max-width: 150px; }
  section { padding: 64px 0; }
  .hero h1 { font-size: 38px; }
  .app-frame { border-radius: 8px; }
  .verdict { align-items: flex-start; flex-direction: column; gap: 2px; }
  .verdict span { white-space: normal; }
  .paper-view { padding: 12px; }
  .paper { padding: 18px; }
  .promo { grid-template-columns: 1fr; }
  .page { padding: 24px 20px; }
  .page li { grid-template-columns: 58px 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .app-frame { transform: none; }
}
