/* Tick Data — public site.
   Plain CSS, no build step. Tokens first; every color below reads a token so the
   dark palette only redefines the tokens. Display type is the serif subset in
   fonts/ (rebuild it with scripts/site/subset_fonts.py after changing headings). */

@font-face {
  font-family: Geist;
  src: url("../fonts/Geist-Variable.woff2?v=46525b05") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("../fonts/GeistMono-Variable.woff2?v=3ef2c50d") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Tick Serif";
  src: url("../fonts/TickSerif-500.woff2?v=4d819e65") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
/* The same face's Latin subset, for pages in other languages: their kanji, kana and hangul
   come from a font of that language instead of the Chinese subset. */
@font-face {
  font-family: "Tick Serif Latin";
  src: url("../fonts/TickSerif-Latin-500.woff2?v=c0a2efd6") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0020-007E, U+00A0-00FF, U+2013-2014, U+2018-201D, U+2026, U+2190-2192;
}

:root {
  color-scheme: light;
  --bg: #f4f1ea;
  --bg-sunk: #ebe6dc;
  --surface: #fbfaf6;
  --surface-2: #f0ece3;
  --ink: #161513;
  --ink-2: #34312d;
  --muted: #5e5a54;
  --faint: #6e6962;
  --line: rgba(22, 21, 19, 0.11);
  --line-strong: rgba(22, 21, 19, 0.24);
  --accent: #1c4a38;
  --accent-hover: #153a2c;
  --accent-text: #1c4a38;
  --accent-soft: #e2ebe5;
  --on-accent: #f4f1ea;
  --invert-bg: #161513;
  --invert-ink: #f4f1ea;
  --invert-muted: #b9b2a6;
  --invert-line: rgba(244, 241, 234, 0.14);
  --chart-bid: #161513;
  --chart-ask: #2f7a5a;
  --chart-spread: rgba(47, 122, 90, 0.2);
  --chart-grid: rgba(22, 21, 19, 0.08);
  --nav-bg: rgba(244, 241, 234, 0.82);
  --shadow: 0 1px 2px rgba(22, 21, 19, 0.04), 0 12px 32px -12px rgba(22, 21, 19, 0.14);
  --selection: #d3e2d8;

  --max: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --nav-h: 64px;
  --radius: 10px;
  --radius-lg: 16px;
  --ease: cubic-bezier(.2, .7, .2, 1);

  --serif: "Tick Serif", "Noto Serif SC", "Source Han Serif SC", "Songti SC", Georgia, serif;
  --sans: Geist, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "Cascadia Mono", Consolas, "Microsoft YaHei UI", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #11100f;
    --bg-sunk: #0b0b0a;
    --surface: #1a1917;
    --surface-2: #222120;
    --ink: #f0ece3;
    --ink-2: #d9d4ca;
    --muted: #a7a095;
    --faint: #958e83;
    --line: rgba(240, 236, 227, 0.1);
    --line-strong: rgba(240, 236, 227, 0.22);
    --accent: #8fc7aa;
    --accent-hover: #a7d6bd;
    --accent-text: #9fd3b7;
    --accent-soft: rgba(143, 199, 170, 0.12);
    --on-accent: #0f1d16;
    --invert-bg: #1d3a2c;
    --invert-ink: #f0ece3;
    --invert-muted: #b7c7bd;
    --invert-line: rgba(240, 236, 227, 0.14);
    --chart-bid: #f0ece3;
    --chart-ask: #8fc7aa;
    --chart-spread: rgba(143, 199, 170, 0.22);
    --chart-grid: rgba(240, 236, 227, 0.08);
    --nav-bg: rgba(17, 16, 15, 0.8);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 16px 40px -16px rgba(0, 0, 0, 0.6);
    --selection: #2c4a3b;
  }
}

/* Pages in other languages (deploy/www/<lang>/, from scripts/site/build_i18n.py). */
:root:lang(en), :root:lang(es) {
  --serif: "Tick Serif Latin", "Noto Serif", Georgia, "Times New Roman", serif;
  --sans: Geist, system-ui, -apple-system, "Segoe UI", sans-serif;
}
:root:lang(ja) {
  --serif: "Tick Serif Latin", "Noto Serif JP", "Yu Mincho", YuMincho, "Hiragino Mincho ProN", serif;
  --sans: Geist, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", Meiryo, "Noto Sans JP", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "Cascadia Mono", Consolas, "Yu Gothic UI", monospace;
}
:root:lang(ko) {
  --serif: "Tick Serif Latin", "Noto Serif KR", "Nanum Myeongjo", AppleMyungjo, Batang, serif;
  --sans: Geist, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "Cascadia Mono", Consolas, "Malgun Gothic", monospace;
}
/* Korean breaks between words, not inside them. */
:lang(ko) body { word-break: keep-all; overflow-wrap: break-word; }
/* Japanese headings break between phrases (Chromium), not inside a word. */
:lang(ja) :is(h1, h2, h3, .display) { word-break: auto-phrase; }

/* ---------- base ---------- */

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  font-feature-settings: "ss01";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; }
ul, ol { margin: 0; padding: 0; }
button { font: inherit; color: inherit; }
code, kbd, samp, pre { font-family: var(--mono); }
::selection { background: var(--selection); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 100;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--bg);
  font-size: 14px;
}
.skip:focus { top: 12px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.wrap {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.narrow { max-width: calc(760px + var(--gutter) * 2); }

/* ---------- type ---------- */

.display, .h1, .h2 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.display { font-size: clamp(34px, 4.9vw, 68px); line-height: 1.1; }
.h1 { font-size: clamp(36px, 4.2vw, 58px); line-height: 1.12; }
.h2 { font-size: clamp(28px, 3vw, 42px); line-height: 1.18; }
.h3 { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.4; }
.lede { font-size: clamp(17px, 1.4vw, 19px); line-height: 1.75; color: var(--muted); max-width: 36em; text-wrap: pretty; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: currentColor;
}
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-feature-settings: "zero"; }
.num { font-variant-numeric: tabular-nums; }
.path { font-family: var(--mono); font-size: 0.92em; white-space: nowrap; }

/* ---------- buttons ---------- */

.btn {
  --btn-bg: var(--ink);
  --btn-fg: var(--bg);
  --btn-border: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 22px;
  border: 1px solid var(--btn-border);
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s var(--ease);
}
.btn:hover { --btn-bg: var(--ink-2); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn.accent { --btn-bg: var(--accent); --btn-fg: var(--on-accent); }
.btn.accent:hover { --btn-bg: var(--accent-hover); }
.btn.ghost { --btn-bg: transparent; --btn-fg: var(--ink); --btn-border: var(--line-strong); }
.btn.ghost:hover { --btn-bg: var(--surface); --btn-border: var(--ink); }
.btn.sm { height: 38px; padding: 0 16px; font-size: 14px; }
.btn.lg { height: 52px; padding: 0 26px; font-size: 16px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

.link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-text);
  font-weight: 500;
}
.link .arrow { transition: transform 0.25s var(--ease); }
.link:hover .arrow, a:hover > .arrow, a:hover .go .arrow { transform: translateX(4px); }
.arrow { display: inline-block; transition: transform 0.25s var(--ease); }

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--nav-bg);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 32px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 19px;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.mark { width: 26px; height: 26px; flex: none; }
.mark rect { fill: var(--ink); }
.mark path { stroke: var(--bg); }
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a {
  position: relative;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--muted);
  transition: color 0.2s ease, background-color 0.2s ease;
}
.nav-links a:hover { color: var(--ink); background: var(--line); }
.nav-links a[aria-current="page"] { color: var(--ink); }
.nav-links a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 2px;
  height: 1.5px;
  border-radius: 2px;
  background: var(--accent);
}
.nav-end { display: flex; align-items: center; gap: 8px; }
.menu {
  display: none;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  border: 0;
  background: transparent;
  cursor: pointer;
  place-items: center;
}
.menu i, .menu i::before, .menu i::after {
  display: block;
  width: 18px;
  height: 1.5px;
  border-radius: 2px;
  background: var(--ink);
  position: relative;
  transition: transform 0.25s var(--ease), top 0.25s var(--ease), background-color 0.2s ease;
}
.menu i::before, .menu i::after { content: ""; position: absolute; left: 0; }
.menu i::before { top: -6px; }
.menu i::after { top: 6px; }
.menu[aria-expanded="true"] i { background: transparent; }
.menu[aria-expanded="true"] i::before { top: 0; transform: rotate(45deg); }
.menu[aria-expanded="true"] i::after { top: 0; transform: rotate(-45deg); }

/* Language menu: a <details> in .nav-end (written by scripts/site/build_i18n.py). */
.lang { position: relative; }
.lang > summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
  list-style: none;
  cursor: pointer;
  user-select: none;
  transition: color 0.2s ease, background-color 0.2s ease;
}
.lang > summary::-webkit-details-marker { display: none; }
.lang > summary:hover, .lang[open] > summary { color: var(--ink); background: var(--line); }
.globe { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  min-width: 176px;
  padding: 6px;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.lang-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 14px;
  color: var(--ink-2);
}
.lang-menu a:hover { color: var(--ink); background: var(--line); }
.lang-menu a[aria-current="page"] { color: var(--ink); font-weight: 500; }
.lang-menu a[aria-current="page"]::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
@media (max-width: 480px) {
  .lang > summary { padding: 0 8px; }
  .lang > summary span { display: none; }
}

/* ---------- sections ---------- */

.section { padding-block: clamp(72px, 9vw, 128px); }
.section.tight { padding-block: clamp(48px, 6vw, 80px); }
.section.flush-top { padding-top: 0; }
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px 64px;
  align-items: end;
  margin-bottom: clamp(36px, 5vw, 56px);
}
.section-head .lede { justify-self: end; max-width: 30em; }
.section-head.stack { grid-template-columns: 1fr; }
.section-head.stack .lede { justify-self: start; }
.sunk { background: var(--bg-sunk); }

/* ---------- page header (inner pages) ---------- */

.page-head { padding-block: clamp(56px, 8vw, 104px) clamp(40px, 5vw, 64px); }
.page-head .h1 { max-width: 15em; }
.page-head .lede { margin-top: 22px; }
.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  font-size: 13px;
  color: var(--muted);
}
.crumbs a:hover { color: var(--ink); }
.crumbs span[aria-hidden] { color: var(--faint); }

/* ---------- home hero ---------- */

.hero { padding-block: clamp(48px, 7vw, 96px) clamp(40px, 5vw, 64px); }
.hero-top {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 32px 64px;
  align-items: end;
}
.hero-side { display: grid; gap: 28px; padding-bottom: 8px; }
.hero-side .lede { max-width: 26em; }
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  font-size: 13px;
  color: var(--muted);
}
.hero-meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta span::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

/* ---------- instrument (live-looking chart card, real sample data) ---------- */

.instrument {
  margin: clamp(40px, 5vw, 64px) 0 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.inst-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.inst-sym { display: flex; align-items: baseline; gap: 12px; }
.inst-sym b { font-family: var(--mono); font-size: 15px; font-weight: 600; letter-spacing: 0.02em; }
.inst-sym span { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.inst-quote { display: flex; align-items: baseline; gap: 10px; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.inst-quote b { font-size: 15px; font-weight: 500; }
.inst-quote span { font-size: 12px; color: var(--muted); }
.seg {
  display: inline-flex;
  margin-left: auto;
  padding: 3px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.seg button {
  min-width: 52px;
  height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 0 0 1px var(--line); }
.inst-body { position: relative; padding: 20px 76px 0 20px; }
.chart {
  position: relative;
  height: clamp(220px, 30vw, 380px);
  touch-action: pan-y;
  cursor: crosshair;
}
.chart .plot { width: 100%; height: 100%; overflow: visible; }
.plot path, .plot rect { vector-effect: non-scaling-stroke; }
.plot .grid { fill: none; stroke: var(--chart-grid); stroke-width: 1; }
.plot .spread { fill: var(--chart-spread); stroke: none; }
.plot .ask { fill: none; stroke: var(--chart-ask); stroke-width: 1; stroke-linejoin: round; }
.plot .bid { fill: none; stroke: var(--chart-bid); stroke-width: 1.4; stroke-linejoin: round; }
.plot .wick { fill: none; stroke: var(--chart-bid); stroke-width: 1; }
.plot .up rect { fill: var(--surface); stroke: var(--chart-bid); stroke-width: 1; }
.plot .down rect { fill: var(--chart-bid); stroke: var(--chart-bid); stroke-width: 1; }
.y-axis, .x-axis { position: absolute; pointer-events: none; font-family: var(--mono); font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; }
.y-axis { top: 0; bottom: 0; right: -64px; width: 56px; }
.y-axis span { position: absolute; right: 0; transform: translateY(-50%); }
.x-axis { left: 0; right: 0; top: 100%; height: 34px; }
.x-axis span { position: absolute; top: 10px; transform: translateX(-50%); }
.x-axis span:first-child { transform: none; }
.x-axis span:last-child { transform: translateX(-100%); }
.cross {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--line-strong);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.dot {
  position: absolute;
  width: 9px;
  height: 9px;
  margin: -4.5px 0 0 -4.5px;
  border-radius: 50%;
  background: var(--chart-bid);
  box-shadow: 0 0 0 2px var(--surface);
  pointer-events: none;
  opacity: 0;
}
.tip {
  position: absolute;
  top: 8px;
  z-index: 2;
  min-width: 168px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  font-family: var(--mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  line-height: 1.55;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.tip .t { color: var(--muted); margin-bottom: 4px; }
.tip .r { display: flex; align-items: center; gap: 8px; }
.tip .r b { font-weight: 600; margin-left: auto; padding-left: 12px; }
.tip .k { width: 12px; height: 2px; border-radius: 2px; background: var(--chart-bid); flex: none; }
.tip .k.ask { background: var(--chart-ask); }
.tip .k.none { background: transparent; }
.chart.hover .cross, .chart.hover .tip, .chart.hover .dot { opacity: 1; }
.inst-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
  margin-top: 34px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 14px; height: 2px; border-radius: 2px; background: var(--chart-bid); }
.legend i.ask { background: var(--chart-ask); }
.legend i.spread { height: 8px; background: var(--chart-spread); }
.legend i.up { width: 8px; height: 12px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--chart-bid); border-radius: 1px; }
.legend i.down { width: 8px; height: 12px; background: var(--chart-bid); border-radius: 1px; }
.inst-foot .note { margin-left: auto; }

/* ---------- facts strip ---------- */

.facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  list-style: none;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.facts li { padding: 22px 24px 24px 0; }
.facts li + li { padding-left: 24px; border-left: 1px solid var(--line); }
.facts b {
  display: block;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(24px, 2.4vw, 32px);
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.facts span { display: block; margin-top: 6px; font-size: 14px; color: var(--muted); }

/* ---------- market cards ---------- */

.markets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.market {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition: border-color 0.25s ease, transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.market:hover { border-color: var(--line-strong); transform: translateY(-3px); box-shadow: var(--shadow); }
.market.invert { background: var(--invert-bg); color: var(--invert-ink); border-color: transparent; }
.market .idx { font-family: var(--mono); font-size: 12px; color: var(--faint); }
.market.invert .idx, .market.invert .desc, .market.invert dt { color: var(--invert-muted); }
.market :is(h2, h3) { margin-top: 18px; font-size: 15px; font-weight: 600; }
.market .grain {
  margin-top: 6px;
  font-family: var(--serif);
  font-size: clamp(34px, 3.2vw, 44px);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.market .desc { margin-top: 14px; color: var(--muted); font-size: 15px; line-height: 1.7; }
.market dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 16px;
  margin: 24px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.market.invert dl { border-top-color: var(--invert-line); }
.market dt { font-size: 12px; color: var(--faint); }
.market dd { margin: 2px 0 0; font-family: var(--mono); font-size: 15px; font-variant-numeric: tabular-nums; }
.market .go { margin-top: auto; padding-top: 28px; font-size: 14px; font-weight: 500; display: inline-flex; gap: 6px; }
.market:hover .go .arrow { transform: translateX(4px); }

/* ---------- steps + file tree ---------- */

.how { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 48px 72px; align-items: start; }
.steps { list-style: none; counter-reset: step; }
.steps li {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 4px 16px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps li::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  grid-row: span 2;
  padding-top: 2px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--faint);
}
.steps h3 { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.steps p { color: var(--muted); font-size: 15px; }

.window {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.window-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  overflow-x: auto;
  white-space: nowrap;
}
.tree { list-style: none; padding: 14px 8px 18px; font-family: var(--mono); font-size: 13px; }
.tree li { display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr); gap: 16px; align-items: baseline; padding: 6px 12px; border-radius: 8px; }
.tree li:hover { background: var(--surface-2); }
.tree .name { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.tree .name::before {
  content: "";
  width: 14px;
  height: 11px;
  flex: none;
  border-radius: 2px;
  background: var(--line-strong);
}
.tree .file .name::before { width: 10px; height: 13px; background: transparent; box-shadow: inset 0 0 0 1.25px var(--faint); }
.tree .d1 { padding-left: 34px; }
.tree .d2 { padding-left: 56px; }
.tree .note { justify-self: end; font-family: var(--sans); font-size: 12px; color: var(--faint); text-align: right; }
.tree .hl .name { color: var(--accent-text); }
.tree .hl .name::before { background: var(--accent); }

/* ---------- formats: chips + code preview ---------- */

.split { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 48px 72px; align-items: start; }
.split .sticky { position: sticky; top: calc(var(--nav-h) + 32px); }
.chip-group + .chip-group { margin-top: 22px; }
.chip-group h3 { margin-bottom: 10px; font-size: 13px; font-weight: 500; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.chips li {
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 13px;
  line-height: 1.3;
  white-space: nowrap;
}
.chips.mono li { font-family: var(--mono); letter-spacing: 0.01em; border-radius: 8px; }

.code {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.code-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  padding: 10px 12px 10px 16px;
  border-bottom: 1px solid var(--line);
}
.code-bar .file { font-family: var(--mono); font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.code-bar .seg { margin-left: auto; }
.code pre {
  margin: 0;
  padding: 18px 20px 20px;
  overflow-x: auto;
  font-size: 12.5px;
  line-height: 1.85;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
  tab-size: 2;
}
.code pre .hd { color: var(--accent-text); }
.code-foot { padding: 12px 20px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }

/* ---------- pricing ---------- */

.prices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.price {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.price.featured { background: var(--invert-bg); color: var(--invert-ink); border-color: transparent; box-shadow: var(--shadow); }
.price .name { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 15px; font-weight: 600; }
.badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 12px;
  font-weight: 500;
}
.price.featured .badge { background: rgba(244, 241, 234, 0.12); color: var(--invert-ink); }
.price .amt { display: flex; align-items: baseline; gap: 8px; margin-top: 18px; }
.price .amt b { font-family: var(--sans); font-size: clamp(40px, 4vw, 52px); font-weight: 600; letter-spacing: -0.035em; line-height: 1; }
.price .amt span { font-size: 15px; color: var(--muted); }
.price .for { margin-top: 12px; font-size: 14px; color: var(--muted); min-height: 3.4em; }
.price.featured .amt span, .price.featured .for, .price.featured li { color: var(--invert-muted); }
.price ul { list-style: none; margin: 22px 0 28px; border-top: 1px solid var(--line); }
.price.featured ul { border-top-color: var(--invert-line); }
.price li {
  display: flex;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  color: var(--ink-2);
}
.price.featured li { border-bottom-color: var(--invert-line); }
.price li::before {
  content: "";
  flex: none;
  width: 14px;
  height: 14px;
  margin-top: 4px;
  background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3 3 7-7' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3 3 7-7' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.price.featured li::before { background: var(--invert-ink); }
.price .btn { margin-top: auto; width: 100%; }
.price.featured .btn { --btn-bg: var(--invert-ink); --btn-fg: var(--invert-bg); }
.price.featured .btn:hover { --btn-bg: #fff; }

.callout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px 40px;
  align-items: center;
  margin-top: 16px;
  padding: 24px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.callout .h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.callout p { margin-top: 4px; color: var(--muted); font-size: 15px; }

/* ---------- FAQ ---------- */

.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0;
  font-size: 17px;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  width: 12px;
  height: 12px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: translateY(-3px) rotate(45deg);
  transition: transform 0.25s var(--ease);
}
.faq details[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.faq summary:hover { color: var(--accent-text); }
.faq .answer { padding: 0 48px 24px 0; color: var(--muted); max-width: 46em; }
.faq .answer p + p { margin-top: 10px; }

/* ---------- CTA band ---------- */

.cta {
  position: relative;
  overflow: hidden;
  padding: clamp(40px, 6vw, 72px);
  border-radius: 24px;
  background: var(--invert-bg);
  color: var(--invert-ink);
}
.cta .h2 { max-width: 14em; }
.cta p { margin-top: 16px; color: var(--invert-muted); max-width: 34em; }
.cta .actions { margin-top: 32px; }
.cta .btn { --btn-bg: var(--invert-ink); --btn-fg: var(--invert-bg); }
.cta .btn:hover { --btn-bg: #fff; }
.cta .btn.ghost { --btn-bg: transparent; --btn-fg: var(--invert-ink); --btn-border: var(--invert-line); }
.cta .btn.ghost:hover { --btn-border: var(--invert-ink); --btn-bg: transparent; }
.cta-mark {
  position: absolute;
  right: -40px;
  bottom: -30px;
  width: min(520px, 60%);
  opacity: 0.16;
  pointer-events: none;
}
.cta-mark path { fill: none; stroke: currentColor; stroke-width: 6; stroke-linecap: round; vector-effect: non-scaling-stroke; }

/* ---------- cards, rows, tables (inner pages) ---------- */

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.cards.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.card .k { font-family: var(--mono); font-size: 12px; color: var(--faint); }
.card h3 { margin-top: 14px; font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.card p { margin-top: 8px; color: var(--muted); font-size: 15px; }

.rows { border-top: 1px solid var(--line); }
.row {
  display: grid;
  grid-template-columns: minmax(120px, 0.32fr) minmax(0, 1fr);
  gap: 8px 32px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}
.row > b { font-size: 14px; font-weight: 500; color: var(--muted); padding-top: 2px; }
.row :is(h2, h3) { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.row p { margin-top: 6px; color: var(--muted); font-size: 15px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.sheet { width: 100%; border-collapse: collapse; font-size: 15px; }
.sheet th, .sheet td { padding: 16px 20px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.sheet thead th {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: var(--surface-2);
  white-space: nowrap;
}
.sheet tbody tr:last-child > * { border-bottom: 0; }
.sheet tbody th { font-weight: 600; white-space: nowrap; }
.sheet td { color: var(--ink-2); }
.sheet code { font-size: 12.5px; color: var(--ink); background: var(--surface-2); padding: 2px 6px; border-radius: 5px; white-space: nowrap; }
.sheet .dim { color: var(--faint); }
.sheet.wide { min-width: 900px; }
.sheet.wide code { white-space: normal; overflow-wrap: anywhere; line-height: 1.9; }
.sheet.wide th[scope="row"] { width: 130px; }
.sheet.wide td:last-child code { white-space: nowrap; }

.note { font-size: 14px; color: var(--muted); max-width: 46em; }
.note-box {
  display: flex;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--ink-2);
  font-size: 14px;
}
.note-box::before {
  content: "i";
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--accent-text);
  color: var(--accent-text);
  font: 600 12px/17px var(--mono);
  text-align: center;
}

/* ---------- symbol catalog ---------- */

.catalog { border-top: 1px solid var(--line); }
.catalog > section {
  display: grid;
  grid-template-columns: minmax(180px, 0.3fr) minmax(0, 1fr);
  gap: 16px 40px;
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
}
.catalog h2 { display: flex; align-items: baseline; gap: 10px; font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.catalog h2 .count { font-family: var(--mono); font-size: 13px; font-weight: 400; color: var(--faint); }
.catalog .sub { margin-top: 6px; font-size: 14px; color: var(--muted); max-width: 22em; }
.symbols { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; list-style: none; align-content: start; }
.symbols.wide { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); }
.symbols li {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: border-color 0.2s ease;
}
.symbols li:hover { border-color: var(--ink); }
.symbols li small { margin-left: 8px; font-family: var(--sans); font-size: 13px; color: var(--muted); }

/* ---------- install / releases ---------- */

.download-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px 40px;
  align-items: center;
  padding: clamp(24px, 3vw, 36px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.download-card .ver { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.download-card .ver b { font-family: var(--serif); font-size: clamp(32px, 3.4vw, 44px); font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; }
.download-card .ver span { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.download-card h2 { margin-top: 10px; font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.download-card .lead { margin-top: 6px; color: var(--muted); font-size: 15px; max-width: 40em; }
.download-card .side { display: grid; gap: 10px; justify-items: end; text-align: right; }
.download-card .side small { font-size: 12px; color: var(--faint); font-family: var(--mono); }
.req { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; list-style: none; }
.req li { padding: 5px 10px; border-radius: 999px; background: var(--surface-2); font-size: 13px; color: var(--ink-2); }

.releases { border-top: 1px solid var(--line); }
.release { border-bottom: 1px solid var(--line); }
.release summary {
  display: grid;
  grid-template-columns: 96px 120px minmax(0, 1fr) auto 12px;
  gap: 8px 24px;
  align-items: center;
  padding: 20px 0;
  cursor: pointer;
  list-style: none;
}
.release summary::-webkit-details-marker { display: none; }
.release summary b { font-family: var(--mono); font-size: 15px; font-weight: 600; }
.release summary time { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.release summary .title { font-weight: 500; }
.release summary .tag { font-size: 12px; color: var(--accent-text); background: var(--accent-soft); border-radius: 999px; padding: 2px 10px; justify-self: start; }
.release summary::after {
  content: "";
  width: 10px;
  height: 10px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.25s var(--ease);
  justify-self: end;
}
.release[open] summary::after { transform: rotate(-135deg); }
.release .body { padding: 0 0 24px 240px; }
.release .body p { color: var(--muted); max-width: 42em; }
.release ul { margin-top: 12px; padding-left: 1.1em; color: var(--ink-2); font-size: 15px; max-width: 42em; }
.release li + li { margin-top: 6px; }
.release .body .btn { margin-top: 18px; }

/* ---------- legal ---------- */

.legal-grid { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 32px 72px; align-items: start; }
.toc { position: sticky; top: calc(var(--nav-h) + 32px); display: grid; border-left: 1px solid var(--line); }
.toc a { position: relative; padding: 7px 0 7px 16px; font-size: 14px; color: var(--muted); }
.toc a:hover { color: var(--ink); }
.toc a[aria-current="true"] { color: var(--ink); }
.toc a[aria-current="true"]::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  border-radius: 2px;
  background: var(--accent);
}
.prose { max-width: 42em; }
.prose h2 { margin: 44px 0 12px; font-size: 21px; font-weight: 600; letter-spacing: -0.01em; scroll-margin-top: calc(var(--nav-h) + 24px); }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--ink-2); }
.prose p + p { margin-top: 12px; }
.prose ul { padding-left: 1.2em; }
.prose li { margin: 8px 0; padding-left: 4px; }
.prose li::marker { color: var(--faint); }

/* ---------- next page ---------- */

.next {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 24px;
  margin-top: clamp(48px, 6vw, 80px);
  padding: 28px 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition: border-color 0.25s ease, box-shadow 0.35s var(--ease);
}
.next:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.next small { display: block; font-size: 13px; color: var(--muted); }
.next strong { display: block; margin-top: 4px; font-family: var(--serif); font-weight: 500; font-size: clamp(26px, 2.6vw, 34px); letter-spacing: -0.02em; line-height: 1.2; }
.next .go {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.next:hover .go { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ---------- dark band (realtime) ---------- */

.band {
  background: var(--invert-bg);
  color: var(--invert-ink);
}
.band .lede, .band .eyebrow, .band .crumbs, .band .crumbs a { color: var(--invert-muted); }
.band .crumbs a:hover { color: var(--invert-ink); }
.band .badge { background: rgba(244, 241, 234, 0.12); color: var(--invert-ink); }

/* ---------- 404 ---------- */

.lost { min-height: calc(100vh - var(--nav-h) - 220px); display: grid; align-content: center; padding-block: 96px; }
.lost .code-num { font-family: var(--mono); font-size: 13px; color: var(--muted); letter-spacing: 0.08em; }

/* ---------- footer ---------- */

.footer { border-top: 1px solid var(--line); background: var(--bg); }
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: 40px 32px;
  padding-block: 56px 40px;
}
.footer-brand p { margin-top: 14px; max-width: 24em; font-size: 14px; color: var(--muted); }
.footer h2 { margin-bottom: 14px; font-size: 13px; font-weight: 600; }
.footer nav { display: grid; gap: 10px; align-content: start; }
.footer nav a { font-size: 14px; color: var(--muted); justify-self: start; }
.footer nav a:hover { color: var(--ink); }
.footer-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 20px 32px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--faint);
}

/* ---------- motion ---------- */

@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
  .js .reveal.in { opacity: 1; transform: none; }
  .js .reveal.d1 { transition-delay: 0.06s; }
  .js .reveal.d2 { transition-delay: 0.12s; }
  .js .reveal.d3 { transition-delay: 0.18s; }
  .rise { animation: rise 0.8s var(--ease) both; }
  .rise.d1 { animation-delay: 0.06s; }
  .rise.d2 { animation-delay: 0.14s; }
  .rise.d3 { animation-delay: 0.22s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ---------- responsive ---------- */

@media (max-width: 1080px) {
  .hero-top { grid-template-columns: 1fr; }
  .hero-side { padding-bottom: 0; }
  .how, .split { grid-template-columns: 1fr; }
  .split .sticky { position: static; }
  .cards.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
  .release .body { padding-left: 0; }
}

@media (max-width: 900px) {
  .menu { display: grid; }
  .nav-links {
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 8px var(--gutter) 20px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 32px -24px rgba(0, 0, 0, 0.2);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 14px 4px; border-radius: 0; font-size: 17px; color: var(--ink); border-bottom: 1px solid var(--line); }
  .nav-links a:last-child { border-bottom: 0; }
  .nav-links a:hover { background: transparent; }
  .nav-links a[aria-current="page"]::after { left: auto; right: 4px; top: 50%; bottom: auto; width: 6px; height: 6px; border-radius: 50%; transform: translateY(-50%); }
  .nav-end { margin-left: auto; }
  body.menu-open { overflow: hidden; }
  .section-head { grid-template-columns: 1fr; }
  .section-head .lede { justify-self: start; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts li:nth-child(3) { padding-left: 0; border-left: 0; }
  .facts li:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .markets, .prices, .cards { grid-template-columns: 1fr; }
  .price .for { min-height: 0; }
  .callout { grid-template-columns: 1fr; }
  .legal-grid { grid-template-columns: 1fr; }
  .toc { position: static; display: flex; flex-wrap: wrap; gap: 4px 6px; border-left: 0; }
  .toc a { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; }
  .toc a[aria-current="true"]::before { display: none; }
  .toc a[aria-current="true"] { border-color: var(--ink); }
  .catalog > section { grid-template-columns: 1fr; }
  .row { grid-template-columns: 1fr; }
  .download-card { grid-template-columns: 1fr; }
  .download-card .side { justify-items: start; text-align: left; }
  .release summary { grid-template-columns: auto auto minmax(0, 1fr) 12px; }
  .release summary .title { grid-column: 1 / 4; grid-row: 2; }
  .release summary .tag { grid-column: 3; grid-row: 1; }
  .release summary::after { grid-column: 4; grid-row: 1 / span 2; }
}

@media (max-width: 640px) {
  .inst-bar { padding: 14px 16px; }
  .seg { margin-left: 0; }
  .inst-body { padding: 16px 60px 0 12px; }
  .y-axis { right: -54px; width: 48px; font-size: 10px; }
  .x-axis span { font-size: 10px; }
  .x-axis span:nth-child(2n) { display: none; }
  .inst-foot { padding: 12px 16px; }
  .inst-foot .note { margin-left: 0; }
  .facts li, .facts li + li { padding: 18px 12px 18px 0; }
  .facts li:nth-child(even) { padding-left: 16px; }
  .cards.four { grid-template-columns: 1fr; }
  .tree .note { display: none; }
  .tree .d1 { padding-left: 26px; }
  .tree .d2 { padding-left: 40px; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .faq .answer { padding-right: 0; }
  .next { padding: 22px; }
  .sheet th, .sheet td { padding: 14px 16px; }
  .btn.lg { height: 50px; }
  .actions .btn { flex: 1 1 auto; }
  .cta .actions .btn { flex: 1 1 auto; }
  .cta-mark { display: none; }
  .stack-sm thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .stack-sm, .stack-sm tbody, .stack-sm tr, .stack-sm th, .stack-sm td { display: block; width: auto; }
  .stack-sm tr { padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .stack-sm tbody tr:last-child { border-bottom: 0; }
  .stack-sm th, .stack-sm td { padding: 2px 0; border: 0; }
  .stack-sm tbody th { margin-bottom: 4px; }
  .stack-sm td[data-label]::before { content: attr(data-label) "　"; color: var(--faint); font-size: 13px; }
}

/* ---------- help center ---------- */

.prose h3 { margin: 28px 0 8px; font-size: 16px; font-weight: 600; }
.prose ol { padding-left: 1.4em; }
.prose ol li { margin: 8px 0; padding-left: 4px; }
.prose ol li::marker { color: var(--muted); font-family: var(--mono); font-size: 0.9em; }
.prose b { font-weight: 600; color: var(--ink); }
.prose code {
  font-family: var(--mono);
  font-size: 0.88em;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--surface-2);
  overflow-wrap: anywhere;
}
.prose .path { white-space: normal; overflow-wrap: anywhere; }
.prose figure { margin: 20px 0 26px; }
.prose figure img {
  display: block;
  width: 100%;
  max-width: max-content;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--surface);
}
.prose figcaption { margin-top: 10px; font-size: 13px; color: var(--muted); }

/* ---------- home: the client ---------- */

.showcase {
  margin: 48px 0 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.showcase img { display: block; width: 100%; height: auto; }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px 32px;
  margin: 48px 0 0;
  padding: 0;
  list-style: none;
}
.feature-grid h3 { font-size: 17px; font-weight: 600; }
.feature-grid p { margin-top: 8px; font-size: 15px; line-height: 1.7; color: var(--muted); }
@media (max-width: 960px) { .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .feature-grid { grid-template-columns: 1fr; } .showcase { margin-top: 32px; } }

/* ---------- messages ---------- */

.msg-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 20px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.msg-form .wide { grid-column: 1 / -1; }
.field { display: grid; gap: 6px; min-width: 0; align-content: start; }
.field label { font-size: 14px; font-weight: 500; }
.field .hint { font-size: 13px; color: var(--muted); }
.field input, .field select, .field textarea, .token-row input, .reply-form textarea {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
}
.field input, .field select { height: 44px; padding-block: 0; }
.field textarea, .reply-form textarea { resize: vertical; line-height: 1.6; }
.field input:focus, .field select:focus, .field textarea:focus, .token-row input:focus, .reply-form textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.form-note { font-size: 14px; color: var(--muted); }
.form-note:empty { display: none; }
.threads-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 48px; }
.threads { display: grid; gap: 16px; margin-top: 16px; }
.thread-card {
  display: grid;
  gap: 10px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.thread-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 14px; }
.thread-head .when { margin-left: auto; }
.thread-card .msg { display: grid; gap: 2px; padding: 10px 12px; border-radius: 8px; background: var(--surface-2); }
.thread-card .msg.staff { border-left: 3px solid var(--accent); background: var(--accent-soft); }
.msg-meta { display: flex; gap: 10px; align-items: baseline; font-size: 13px; }
.thread-card .msg p { white-space: pre-wrap; overflow-wrap: anywhere; }
.reply-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.reply-form .form-note { grid-column: 1 / -1; }
.small { font-size: 13px; }
.token-copy { justify-self: start; border: 0; background: none; padding: 0; cursor: pointer; }
.token-box { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); }
.token-box summary { cursor: pointer; font-weight: 500; }
.token-box[open] summary { margin-bottom: 12px; }
.token-row { display: flex; gap: 10px; margin-top: 12px; }
.token-row input { font-family: var(--mono); font-size: 14px; }
@media (max-width: 640px) {
  .msg-form { grid-template-columns: 1fr; padding: 18px; }
  .reply-form { grid-template-columns: 1fr; }
}

/* ---------- status ---------- */

.status-board { border-top: 1px solid var(--line); }
.status-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 24px;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.status-row h2 { font-size: 17px; font-weight: 600; }
.status-row p { margin-top: 4px; font-size: 14px; color: var(--muted); }
.state { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; white-space: nowrap; }
[data-state="ok"] { --dot: #2f7a5a; --dot-ring: rgba(47, 122, 90, 0.16); }
[data-state="warn"] { --dot: #b7791f; --dot-ring: rgba(183, 121, 31, 0.18); }
[data-state="down"] { --dot: #c0392b; --dot-ring: rgba(192, 57, 43, 0.18); }
.state::before, h1[data-state]::before {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--dot, var(--faint));
  box-shadow: 0 0 0 4px var(--dot-ring, transparent);
}
h1[data-state] { display: flex; align-items: center; gap: 18px; }
h1[data-state]::before { width: 16px; height: 16px; box-shadow: 0 0 0 6px var(--dot-ring, transparent); }
.status-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 16px; font-size: 14px; color: var(--muted); }
.notices { display: grid; gap: 12px; margin-top: 16px; }
.notice { padding: 16px 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.notice.warn { border-color: rgba(183, 121, 31, 0.45); background: rgba(183, 121, 31, 0.08); }
.notice h3 { font-size: 15px; font-weight: 600; }
.notice p { margin-top: 4px; font-size: 14px; color: var(--ink-2); white-space: pre-line; }

@media print {
  .nav, .footer, .cta, .seg, .menu { display: none !important; }
  body { background: #fff; color: #000; }
}
