/* Tick Data Download — 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 a serif subset: each Chinese page
   has its own file in fonts/serif/, and its "Tick Serif" @font-face in its head; the other
   languages use the Latin subset below (rebuild them with scripts/site/subset_fonts.py after
   changing headings). Geist and Geist Mono hold weights 400 to 600 only
   (scripts/site/subset_geist.py). */

@font-face {
  font-family: Geist;
  src: url("../fonts/Geist-Variable.woff2?v=1fc14b8b") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("../fonts/GeistMono-Variable.woff2?v=4600d952") format("woff2");
  font-weight: 400 600;
  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=1de4c4ca") 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;
}
/* Geist with the six letters Turkish adds, in files of their own so no other page pays for them. */
@font-face {
  font-family: "Geist TR";
  src: url("../fonts/Geist-Variable-tr.woff2?v=9a6e16e8") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono TR";
  src: url("../fonts/GeistMono-Variable-tr.woff2?v=1f832344") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

: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);
  --field-line: #85807a;
  --error: #b3261e;
  --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);
  /* A card at rest: a hairline of depth; --shadow is for what is raised or hovered. */
  --shadow-sm: 0 1px 1px rgba(22, 21, 19, 0.03), 0 2px 6px -2px rgba(22, 21, 19, 0.07);
  --btn-shadow: 0 1px 2px rgba(22, 21, 19, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  --row-hover: rgba(22, 21, 19, 0.028);
  /* The chart-paper ruling behind the first screen, and the accent's light on it. */
  --grid-line: rgba(22, 21, 19, 0.04);
  --glow: rgba(47, 122, 90, 0.11);
  --selection: #d3e2d8;

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

  /* Type scale: the display sizes grow with the window between a phone and a wide screen; the
     text sizes are fixed steps. Spacing follows the same steps: --card-pad inside every card. */
  --fs-display: clamp(31px, 3.6vw + 16px, 70px);
  --fs-h1: clamp(32px, 2.9vw + 18px, 58px);
  --fs-h2: clamp(26px, 1.9vw + 17px, 42px);
  --fs-h3: 19px;
  --fs-lede: clamp(17px, 0.3vw + 15px, 19px);
  --fs-body: 15px;
  --fs-sm: 14px;
  --fs-xs: 13px;
  --fs-2xs: 12px;
  --card-pad: clamp(22px, 2.2vw, 28px);

  --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);
    --field-line: #77726a;
    --error: #f2a093;
    --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);
    --shadow-sm: 0 1px 1px rgba(0, 0, 0, 0.25), 0 2px 8px -2px rgba(0, 0, 0, 0.4);
    --btn-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    --row-hover: rgba(240, 236, 227, 0.035);
    --grid-line: rgba(240, 236, 227, 0.04);
    --glow: rgba(143, 199, 170, 0.09);
    --selection: #2c4a3b;
  }
  /* The client's screenshots are light: dimmed so they are not the brightest thing on a dark page. */
  .showcase img, .prose figure img { filter: brightness(0.86); }
}

/* Pages in other languages (deploy/www/<lang>/, from scripts/site/build_i18n.py). */
:root:lang(en), :root:lang(es), :root:lang(pt), :root:lang(id) {
  --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;
}
/* Turkish: the serif subset lacks six of its letters, and a heading must not mix two faces. */
:root:lang(tr) {
  --serif: Georgia, "Noto Serif", "Times New Roman", serif;
  --sans: "Geist TR", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono TR", ui-monospace, "Cascadia Mono", Consolas, monospace;
}
/* Vietnamese: most of its letters are in neither web font, so system fonts throughout, and only
   ones that have them all (Georgia does not). */
:root:lang(vi) {
  --serif: "Noto Serif", Cambria, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "Noto Sans Mono", monospace;
}
/* Traditional Chinese: the serif subsets hold no hanzi for it, so system fonts throughout. The sans
   closes the serif stack: a PC with no Traditional serif draws a whole heading in it, not half in
   the browser's default serif. What the client shows, quoted in Simplified, keeps the Simplified
   fonts where it is a whole block (legal/terms.html). */
:root:lang(zh-Hant) {
  --serif: "Noto Serif TC", "Noto Serif CJK TC", "Source Han Serif TC", "Songti TC", PMingLiU, "Microsoft JhengHei UI", "Microsoft JhengHei", serif;
  --sans: "PingFang TC", "Hiragino Sans CNS", "Microsoft JhengHei UI", "Microsoft JhengHei", "Noto Sans TC", "Noto Sans CJK TC", system-ui, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "Microsoft JhengHei UI", monospace;
}
:root:lang(zh-Hant) [lang="zh-CN"] {
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", SimSun, "Microsoft YaHei UI", "Microsoft YaHei", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  font-family: var(--sans);
}
/* 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, .next strong) { 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; }
/* No last line of one character or word: the line before gives it company (Chromium; others ignore it). */
p, li, dd, dt, td, th, figcaption, summary { text-wrap: pretty; }
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); }
::placeholder { color: var(--muted); opacity: 1; }
: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;
}
.nb { 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;
}
/* Balance does not carry across a forced line break (Chromium), so a heading with a <br> could end
   on one character; pretty keeps company on its last line instead. */
:is(.display, .h1, .h2):has(br) { text-wrap: pretty; }
.display { font-size: var(--fs-display); line-height: 1.08; }
.h1 { font-size: var(--fs-h1); line-height: 1.12; }
.h2 { font-size: var(--fs-h2); line-height: 1.18; }
.h3 { font-size: var(--fs-h3); font-weight: 600; letter-spacing: -0.01em; line-height: 1.4; }
.lede { font-size: var(--fs-lede); 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: ui-monospace, "Cascadia Mono", Consolas, var(--sans);
  font-size: var(--fs-2xs);
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--accent-text);
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: currentColor;
}
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-feature-settings: "zero"; }
.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;
  box-shadow: var(--btn-shadow);
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s var(--ease);
}
.btn:hover { --btn-bg: var(--ink-2); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline-offset: 3px; }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn.ghost { --btn-bg: transparent; --btn-fg: var(--ink); --btn-border: var(--line-strong); box-shadow: none; }
.btn.ghost:hover { --btn-bg: var(--surface); --btn-border: var(--ink); box-shadow: var(--shadow-sm); }
.btn:disabled:hover, .btn[aria-disabled="true"]:hover { transform: none; }
.btn.sm { height: 38px; padding: 0 16px; font-size: 14px; }
.btn.lg { height: 52px; padding: 0 26px; font-size: 16px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
/* Busy while a request is out (js/messages.js, js/status.js): aria-disabled, not disabled, so the
   button keeps focus. It looks as a disabled one does. */
.btn[aria-disabled="true"] { opacity: 0.45; cursor: progress; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

.link { display: inline-block; color: var(--accent-text); font-weight: 500; }
.link .arrow { margin-left: 2px; transition: transform 0.25s var(--ease); }
/* Inside a sentence its colour is too close to the words around it, so it is underlined. A link
   with an arrow has the arrow. */
a.link:not(:has(.arrow)) {
  display: inline;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a.link:not(:has(.arrow)):hover { text-decoration-thickness: 2px; }
/* The support address breaks after its @ (a <wbr> there); inside a word only if even half is too
   wide, which leaves the footer's columns their width for the domain (min-content below). */
a[href^="mailto:"] { overflow-wrap: break-word; }
.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);
  /* Taller than a phone held sideways, under a nav that stays put. */
  max-height: calc(100vh - var(--nav-h) - 16px);
  max-height: calc(100dvh - var(--nav-h) - 16px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.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) {
  .nav-inner { gap: 16px; }
  .lang > summary { padding: 0 8px; }
  .lang > summary span { display: none; }
  /* The bare domain is Chinese for everyone, so there the way out says what it is. The other
     languages have no room for a label at this width. (Not by primary subtag: that takes zh-Hant too.) */
  :root:lang(zh-CN) .lang > summary span { display: inline; }
}
/* This page in the browser's language (js/site.js). Fixed, so nothing moves when it appears. */
.lang-hint {
  position: fixed;
  right: var(--gutter);
  bottom: 16px;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 4px;
  max-width: calc(100vw - var(--gutter) * 2);
  padding: 2px 4px 2px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow);
  font-size: 14px;
  line-height: 1.3;
}
.lang-hint a { padding: 8px 0; color: var(--accent-text); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.lang-hint button {
  flex: none;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.lang-hint button:hover { color: var(--ink); background: var(--line); }

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

.section { padding-block: clamp(72px, 9vw, 128px); }
.section.tight { padding-block: clamp(48px, 6vw, 80px); }
.section.flush-top { padding-top: 0; }
/* A hairline where one section ends and the next begins; one that runs on from the last (flush-top)
   or holds a page's footnotes does not start a new one. */
.section + .section:not(.flush-top):not(.footnotes) { border-top: 1px solid var(--line); }
.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); }
/* The first screen of every page stands on chart paper: a faint ruling with the accent's light in
   the upper right, fading out before the content below. Drawn behind, so nothing moves. */
.hero, section.page-head, .lost { position: relative; isolation: isolate; }
.hero::before, section.page-head::before, .lost::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(50% 70% at 85% 0%, var(--glow), transparent 70%),
    linear-gradient(var(--grid-line) 1px, transparent 1px) center top / 56px 56px,
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) center top / 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 80% 90% at 78% 0%, #000 20%, transparent 78%);
  mask-image: radial-gradient(ellipse 80% 90% at 78% 0%, #000 20%, transparent 78%);
}
.hero .eyebrow {
  gap: 8px;
  padding: 5px 12px 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--ink-2);
}
.hero .eyebrow::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.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: var(--card-pad);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  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; }
/* The ring is drawn on the page, not on the card, so it takes the page's ink, not the card's. */
.market.invert:focus-visible { outline-color: var(--ink); }
.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(--sans); font-size: 15px; font-weight: 500; 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(--muted);
}
.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 .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); }
/* These scroll, so they take keyboard focus; .code would clip a ring drawn outside. */
.code pre:focus-visible, .table-wrap:focus-visible { outline-offset: -3px; }
.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(4, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.price {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: var(--card-pad);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.price.featured { background: var(--invert-bg); color: var(--invert-ink); border-color: transparent; box-shadow: var(--shadow); }
.price .name { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; font-size: 15px; font-weight: 600; }
/* One look for every small label: a plan's count, "planned", a release's channel. */
.badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: var(--fs-2xs);
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.price.featured .badge { background: rgba(244, 241, 234, 0.12); color: var(--invert-ink); }
.price .amt { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin-top: 18px; }
.price .amt b { font-family: var(--sans); font-size: clamp(36px, 3.4vw, 44px); 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 {
  position: relative;
  padding: 11px 0;
  padding-inline-start: 24px;
  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: "";
  position: absolute;
  inset-inline-start: 0;
  top: 15px;
  width: 14px;
  height: 14px;
  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 .pay { margin-top: auto; margin-bottom: 12px; font-size: 13px; color: var(--muted); }
.price .pay + .btn { margin-top: 0; }
.price .pay a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.price.featured .pay { color: var(--invert-muted); }
.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 var(--card-pad);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.25s ease, transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
a.callout:hover { border-color: var(--line-strong); transform: translateY(-2px); box-shadow: var(--shadow); }
.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, .token-box 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, .token-box[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; }
/* On the dark panels, links and the focus ring take the panel's ink: the accent is dark green in
   the light theme, under 2:1 on these backgrounds. */
.cta, .price.featured, .market.invert, .band { --accent: var(--invert-ink); --accent-text: var(--invert-ink); }
.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: var(--card-pad);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.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); box-shadow: var(--shadow-sm); }
.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);
  border-bottom-color: var(--line-strong);
  white-space: nowrap;
}
/* The row under the pointer, so a wide table reads across. */
.sheet tbody tr > * { transition: background-color 0.15s ease; }
.sheet tbody tr:hover > * { background-color: var(--row-hover); }
.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: normal; line-height: 1.9; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.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;
}
/* Drawn, not read: the empty alternative text keeps the "i" out of what a screen reader says. A
   browser without it keeps the first line. */
.note-box::before {
  content: "i";
  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(--sans);
  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;
}
.symbols li small { margin-left: 8px; font-family: var(--sans); font-size: 13px; color: var(--muted); }
/* A chip that is a link (the symbol pages): the whole chip answers, and it shows so under the pointer. */
.symbols a { display: block; margin: -10px -12px; padding: 10px 12px; border-radius: 8px; }
.symbols li:has(a) { transition: border-color 0.2s ease, background-color 0.2s ease; }
.symbols li:has(a):hover { border-color: var(--line-strong); background: var(--surface-2); }
.symbols a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.symbols a:focus-visible { outline-offset: 2px; border-radius: 8px; }

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

/* One card, a block per build: the stable one and, while the latest release is another version,
   the test build under it (bump_version.py and js/releases.js hide that block otherwise). What
   both share sits in the foot. A build's name is not in .ver: that draws with the page's serif
   subset, which holds the digits only (scripts/site/subset_fonts.py). */
.download-card {
  padding: 0 clamp(24px, 3vw, 36px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.download-card > .note-box { margin-top: clamp(24px, 3vw, 32px); }
.download-card .build {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px 40px;
  align-items: center;
  padding: clamp(24px, 3vw, 32px) 0;
}
.download-card .build + .build, .download-card .build-foot { border-top: 1px solid var(--line); }
.download-card .build-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; }
.download-card h2 { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.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(30px, 3.2vw, 40px); 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 .lead { margin-top: 10px; color: var(--ink-2); font-size: 15px; max-width: 40em; }
.download-card .what, .download-card .note { margin-top: 6px; color: var(--muted); font-size: 14px; max-width: 44em; }
.download-card .side { display: grid; gap: 10px; justify-items: end; text-align: right; }
/* The installer's file name: one line while it fits, broken rather than pushed out of a narrow window. */
.download-card .side small { font-size: 12px; color: var(--faint); font-family: var(--mono); overflow-wrap: anywhere; }
.download-card .build-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px; padding: 18px 0 22px; }
.download-card .warn { font-size: 13px; line-height: 1.55; color: var(--muted); }
.req { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.req li { padding: 5px 10px; border-radius: 999px; background: var(--surface-2); font-size: 13px; color: var(--ink-2); }

/* The footer's link lands on the list with its heading in view above it. */
.releases { border-top: 1px solid var(--line); scroll-margin-top: calc(var(--fs-h2) * 1.2 + clamp(36px, 5vw, 56px) + 56px); }
.release {
  display: grid;
  /* The last column holds the beta row's chevron; every row keeps it, so the tags line up. */
  grid-template-columns: 96px 120px minmax(0, 1fr) auto 12px;
  gap: 8px 24px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.release b { font-family: var(--mono); font-size: 15px; font-weight: 600; }
.release time { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.release .title { color: var(--ink-2); }
.release .tag { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-size: var(--fs-2xs); font-weight: 500; line-height: 1; color: var(--accent-text); background: var(--accent-soft); justify-self: start; white-space: nowrap; }
.release .tag.retired { color: var(--muted); background: var(--surface-2); }
/* The test build is downloaded from its row in the list (owner, 2026-11-14): a <details> above the
   list whose summary is that row, with a chevron; while it shows, the list's own first row (the
   same release) is hidden, so the row appears once. */
.beta-wrap:has(> .build:not([hidden])) { border-top: 1px solid var(--line); }
.beta-wrap:has(> .build:not([hidden])) + .releases { border-top: 0; }
.beta-wrap:has(> .build:not([hidden])) + .releases > .release:first-child { display: none; }
.beta-fold > summary.release { cursor: pointer; list-style: none; }
.beta-fold > summary::-webkit-details-marker { display: none; }
.beta-fold > summary::after { content: ""; width: 9px; height: 9px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: translateY(-2px) rotate(45deg); transition: transform 0.25s var(--ease); }
.beta-fold[open] > summary::after { transform: translateY(2px) rotate(-135deg); }
.beta-fold > summary:hover .title { color: var(--ink); }
.beta-fold > summary span[data-r="test_date"] { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.beta-body { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 24px; padding: 16px 0 20px 120px; border-bottom: 1px solid var(--line); }
.beta-body .lead, .beta-body .note { font-size: 14px; color: var(--muted); max-width: 44em; }
.beta-body .note { margin-top: 6px; }
.beta-body .side { display: grid; gap: 8px; align-content: start; justify-items: end; text-align: right; }
.beta-body .side small { font-size: 12px; color: var(--faint); font-family: var(--mono); overflow-wrap: anywhere; }

/* ---------- 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); }
/* The help centre (help/index.html): its screenshots take the whole column, the text keeps the
   measure (the 42em of .prose at its 16px, the same for a smaller caption or a larger heading). */
.help .prose { max-width: none; }
.help .prose > :not(figure), .help .prose figcaption { max-width: 672px; }

/* ---------- 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: var(--card-pad) clamp(22px, 2.6vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.25s ease, box-shadow 0.35s var(--ease), transform 0.35s var(--ease);
}
.next:hover { border-color: var(--line-strong); box-shadow: var(--shadow); transform: translateY(-2px); }
.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; text-wrap: balance; }
.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 ---------- */

/* Brand and link columns; then the base line: the notice, the two MetaTrader links (their official
   emblem from img/marks/, no box: the owner wants them unobtrusive, 2026-11-14) and the language menu. */
.footer { border-top: 1px solid var(--line); background: var(--bg-sunk); }
/* The language suggestion is fixed to the bottom: room for it, so it never sits on the last footer line. */
body:has(.lang-hint) .footer { padding-bottom: 72px; }
/* And a control that Tab brings into view stops above it, not under it. */
html:has(.lang-hint) { scroll-padding-bottom: 84px; }
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(4, minmax(0, 1fr));
  gap: 40px 32px;
  padding-block: clamp(48px, 6vw, 72px) 40px;
}
.footer-brand p { margin-top: 14px; max-width: 24em; font-size: var(--fs-sm); line-height: 1.7; color: var(--muted); }
.footer h2 { margin-bottom: 14px; font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.01em; color: var(--ink); }
.footer nav { display: grid; gap: 10px; align-content: start; }
.footer nav a { font-size: var(--fs-sm); line-height: 1.5; color: var(--muted); justify-self: start; transition: color 0.2s ease; }
.footer nav a:hover { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.marks-mini { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.footer .marks-mini h2 { margin: 0; font-size: var(--fs-2xs); font-weight: 400; letter-spacing: 0; color: var(--muted); }
.marks { display: flex; flex-wrap: wrap; gap: 4px 14px; list-style: none; }
.marks a { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); white-space: nowrap; transition: color 0.2s ease; }
.marks a:hover { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.marks img { flex: none; width: 16px; height: 16px; }
.footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-block: 18px 32px;
  border-top: 1px solid var(--line);
  font-size: var(--fs-2xs);
  color: var(--muted);
}
.footer-base p { display: flex; flex-wrap: wrap; gap: 4px 20px; }
/* At the right end even when a long base line pushes it onto a line of its own, where the menu
   (right: 0, opening leftwards) has room. */
.footer-base > .lang { margin-left: auto; }
/* The footer's language menu: a bordered button with the language's full name, opening upwards. */
.footer .lang > summary { height: 36px; padding: 0 14px 0 12px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: var(--fs-xs); color: var(--ink-2); }
.footer .lang > summary span { display: inline; }
.footer .lang > summary:hover, .footer .lang[open] > summary { border-color: var(--ink); background: var(--surface); }
.footer .lang-menu {
  top: auto;
  bottom: calc(100% + 8px);
  /* Room above the button, which is near the bottom of the window, under the nav. */
  max-height: calc(100vh - var(--nav-h) - 140px);
  max-height: calc(100dvh - var(--nav-h) - 140px);
}

/* ---------- 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; }
  /* A card that came in with the scroll still lifts under the pointer, as quickly as the others. */
  .js .reveal.in:is(.market, .callout) {
    transition: opacity 0.7s var(--ease), border-color 0.25s ease, box-shadow 0.35s var(--ease), transform 0.35s var(--ease);
    transition-delay: 0s;
  }
  .js .reveal.in.market:hover { transform: translateY(-3px); }
  .js .reveal.in.callout:hover { transform: translateY(-2px); }
}
/* Only a slide: the first screen is readable from the first frame, on every page and every click. */
@keyframes rise { from { transform: translateY(16px); } to { transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  /* Nothing lifts under the pointer either: the border and shadow say it instead. */
  .btn:hover, .market:hover, a.callout:hover, .next:hover { transform: none; }
}

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

/* Below this width the curve would run through the text of the call to action. */
@media (max-width: 1180px) {
  .cta-mark { display: none; }
  .prices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@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)); }
  /* No narrower than a column's longest word: the support address keeps its domain on one line. */
  .footer-grid { grid-template-columns: repeat(4, minmax(min-content, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}

@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);
    /* Taller than a phone held sideways, under a nav that stays put and a page that does not scroll
       while it is open: it scrolls itself. */
    max-height: calc(100vh - var(--nav-h));
    max-height: calc(100dvh - var(--nav-h));
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .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, .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 .build { grid-template-columns: 1fr; }
  .download-card .side { justify-items: start; text-align: left; }
  .release { grid-template-columns: auto auto minmax(0, 1fr) 12px; }
  .release .title { grid-column: 1 / -1; grid-row: 2; }
  /* A long label (No longer supported) wraps inside its pill rather than out of a narrow window. */
  .release .tag { grid-column: 3; grid-row: 1; max-width: 100%; white-space: normal; height: auto; min-height: 24px; padding-block: 3px; line-height: 1.25; }
  .beta-fold > summary::after { grid-column: 4; grid-row: 1; }
  .beta-body { grid-template-columns: minmax(0, 1fr); padding-left: 0; }
  .beta-body .side { justify-items: start; text-align: left; }
  .sheet tbody th { white-space: normal; }
}

/* A phone held sideways: the six menu links fit without scrolling, each still 44 px to aim at. */
@media (max-width: 900px) and (max-height: 500px) {
  .nav-links { padding-bottom: 12px; }
  .nav-links a { display: flex; align-items: center; min-height: 44px; padding-block: 0; }
}

/* Tablets: three short cards side by side. Markets stay in one column and plans two by two: the
   won and yen prices would not fit in three. */
@media (min-width: 720px) and (max-width: 900px) {
  .cards:not(.four) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@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, .prices { grid-template-columns: 1fr; }
  .tree .note { display: none; }
  .tree .d1 { padding-left: 26px; }
  .tree .d2 { padding-left: 40px; }
  /* Without the notes a row is the name alone, and one too long for the window wraps instead of
     running past its edge (Turkish at 320 px). */
  .tree li { grid-template-columns: minmax(0, 1fr); }
  .tree .name { white-space: normal; overflow-wrap: anywhere; }
  .footer-grid { grid-template-columns: repeat(2, minmax(min-content, 1fr)); gap: 32px 24px; }
  .footer-base { align-items: flex-start; flex-direction: column; }
  /* Here the language button sits at the left edge: its menu opens from there. */
  .footer-base > .lang { margin-left: 0; }
  .footer .lang-menu { left: 0; right: auto; }
  .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; }
  .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; }
}

/* The format table stacks until all its columns fit. Its cells hold long headers: label on its own
   line, then the code, wrapped. */
@media (max-width: 980px) {
  .stack-sm.wide { min-width: 0; }
  .stack-sm.wide thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .stack-sm.wide, .stack-sm.wide tbody, .stack-sm.wide tr, .stack-sm.wide th, .stack-sm.wide td { display: block; width: auto; }
  .stack-sm.wide tr { padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .stack-sm.wide tbody tr:last-child { border-bottom: 0; }
  .stack-sm.wide th, .stack-sm.wide td { padding: 2px 0; border: 0; }
  .stack-sm.wide tbody th { margin-bottom: 4px; }
  .stack-sm.wide th[scope="row"] { width: auto; }
  .stack-sm.wide td { padding-top: 8px; }
  .stack-sm.wide td[data-label]::before { content: attr(data-label); display: block; color: var(--faint); font-size: 13px; }
  .stack-sm.wide td:last-child code { white-space: normal; }
}

/* The full name does not fit on one line beside the phone header's buttons (phones and windows up to
   540px), nor beside the links of a narrow desktop: there it takes two lines, "Tick Data" over "Download". The width lets the first
   two words share a line and sends the last one to the next. */
@media (max-width: 540px), (min-width: 901px) and (max-width: 1080px) {
  .nav .brand { max-width: calc(34px + 6.2em); gap: 8px; font-size: 16px; line-height: 1.05; white-space: normal; }
}

/* The narrowest phones: the header keeps the mark, not the name (the link's aria-label has it). */
@media (max-width: 358px) {
  .nav .brand { font-size: 0; gap: 0; }
  .nav-end { gap: 4px; }
  .nav-end .btn.sm { padding: 0 10px; }
  .lang-menu { min-width: 160px; }
}
@media (max-width: 359px) {
  .h1, .h2 { overflow-wrap: anywhere; }
  /* The home page's sample file names, on one line where they can be. */
  .tree { font-size: 12px; }
  .tree li { padding: 6px 8px; }
}
/* On a phone a long label wraps inside its button, not out of the page. One that fits looks as before. */
@media (max-width: 480px) {
  .btn:not(.sm) { height: auto; min-height: 46px; padding-block: 8px; line-height: 1.25; text-align: center; white-space: normal; }
  .btn.lg { min-height: 50px; }
}

/* ---------- forex coverage table ---------- */

.coverage tbody th, .coverage td:last-child { font-family: var(--mono); font-size: 13px; }
.coverage td:last-child { white-space: nowrap; }
.coverage th, .coverage td { padding-top: 10px; padding-bottom: 10px; }
.coverage .none { color: var(--faint); }
.coverage tr:target > * { background: var(--accent-soft); }

@media (max-width: 640px) {
  .coverage thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .coverage, .coverage tbody { display: block; width: auto; }
  .coverage tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 12px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
  .coverage tbody tr:last-child { border-bottom: 0; }
  .coverage tr:target { background: var(--accent-soft); }
  .coverage th, .coverage td { display: block; padding: 0; border: 0; }
  .coverage td { font-size: 13px; }
  .coverage td:nth-child(2) { grid-column: 1; grid-row: 2; }
  .coverage td:nth-child(3) { grid-column: 2; grid-row: 2; text-align: right; color: var(--muted); }
  .coverage td:nth-child(4) { grid-column: 2; grid-row: 1; text-align: right; }
  .coverage .none { display: none; }
}

/* ---------- 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 strong { font-weight: 600; }
.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, .row .path { white-space: normal; overflow-wrap: anywhere; }
.prose figure { margin: 20px 0 26px; }
.prose figure img {
  display: block;
  max-width: 100%;
  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; }
/* The product page's screenshot sits above its three step cards: a gap, not a shared edge. */
.showcase + .cards { margin-top: clamp(24px, 3vw, 32px); }
.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: var(--card-pad);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.msg-form .wide { grid-column: 1 / -1; }
/* A field for bots: out of sight, with tabindex -1 and aria-hidden in the page for keyboards and screen readers. */
.msg-extra { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.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(--field-line);
  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);
  box-shadow: var(--shadow-sm);
}
.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; }
.consent { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--muted); }
.consent input { flex: none; width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); }
/* Images on a message (js/messages.js). */
.image-attach { display: grid; gap: 8px; min-width: 0; font-size: 13px; color: var(--muted); }
.reply-form .image-attach { grid-column: 1 / -1; }
.image-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.image-slots { display: grid; gap: 8px; list-style: none; }
.image-slot { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px; border: 1px solid var(--line); border-radius: 8px; }
.image-slot img, .image-slot-blank { display: block; width: 56px; height: 42px; border-radius: 6px; background: var(--surface-2); object-fit: cover; }
.image-slot-body { display: grid; gap: 6px; justify-items: start; min-width: 0; overflow-wrap: anywhere; }
.image-error { color: var(--error); }
.image-remove { width: 28px; height: 28px; border: 0; border-radius: 6px; background: none; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; }
.image-remove:hover { background: var(--surface-2); color: var(--ink); }
.image-remove:disabled { opacity: 0.45; cursor: not-allowed; }
.msg-images { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
/* The stored shape comes with the message, so the box holds its place while the image comes in. */
.msg-image { display: inline-grid; place-items: center; height: 96px; max-width: 100%; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: zoom-in; }
.msg-image:disabled { cursor: default; }
.msg-image img { display: block; width: 100%; height: 100%; object-fit: contain; }
.msg-image.big { height: auto; cursor: zoom-out; }
.msg-image-note { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 13px; color: var(--muted); }
.msg-image-note .link { border: 0; background: none; padding: 0; cursor: pointer; }
.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 { display: flex; justify-content: space-between; align-items: center; cursor: pointer; font-weight: 500; list-style: none; }
.token-box summary::-webkit-details-marker { display: none; }
.token-box[open] summary { margin-bottom: 12px; }
.token-row { display: flex; gap: 10px; margin-top: 12px; }
.token-row input { font-family: ui-monospace, "Cascadia Mono", Consolas, var(--sans); 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) minmax(6.5em, 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); }
/* A market left out of sale on purpose (status.js): not a fault, so no warning colour. */
[data-state="paused"] { --dot: var(--faint); --dot-ring: var(--line); }
.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; }

/* ---------- paused markets (js/markets.js) ---------- */

/* Says which markets are paused, and is hidden when none is (js/markets.js). */
.paused-bar { border-bottom: 1px solid rgba(183, 121, 31, 0.32); background: rgba(183, 121, 31, 0.08); }
.paused-bar p { position: relative; padding: 12px 0 12px 20px; font-size: 14px; line-height: 1.6; color: var(--ink-2); }
.paused-bar p::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 19px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #b7791f;
}
.paused-bar .link { white-space: nowrap; }
/* Everywhere but the A-share page it sits below the first screen, inside a section's column, so
   that it moves nothing in view when it appears. */
.wrap > .paused-bar { margin-bottom: 16px; border: 1px solid rgba(183, 121, 31, 0.32); border-radius: 12px; }
.wrap > .paused-bar .wrap { padding-inline: 16px; }
.wrap > :not(.section-head) + .paused-bar { margin-top: clamp(32px, 4vw, 48px); margin-bottom: 0; }
.paused-bar:not([hidden]) + .next { margin-top: 16px; }
/* History still being loaded for some symbols (js/markets.js): shown only while the server says so. */
.preparing-note { margin-top: 12px; font-size: 13px; line-height: 1.6; color: var(--muted); }
.price.featured .preparing-note { color: var(--invert-muted); }

/* ---------- touch ---------- */

/* Phones and tablets: at least 44 px to aim at. The negative margins hold the page's spacing, and
   the tabs get the rest of their height from ::after. */
@media (max-width: 900px), (pointer: coarse) {
  .btn.sm, .lang > summary { height: 44px; }
  .lang > summary { min-width: 44px; justify-content: center; }
  .brand { min-height: 44px; }
  .skip { padding-block: 12px; }
  .lang-menu a { min-height: 44px; }
  .lang-hint a { display: inline-flex; align-items: center; min-height: 44px; padding-block: 0; }
  .lang-hint button { width: 44px; height: 44px; }
  .seg button { position: relative; height: 38px; }
  .seg button::after { content: ""; position: absolute; inset: -3px 0; }
  .crumbs { margin-block: -11px 11px; }
  .crumbs a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 10px; margin-inline: -10px; }
  .crumbs span { align-self: center; }
  .toc a { display: inline-flex; align-items: center; min-height: 44px; }
  .footer nav { gap: 0; }
  .footer nav a { display: flex; align-items: center; min-height: 44px; justify-self: stretch; }
  .footer h2 { margin-bottom: 6px; }
  .footer .lang > summary { height: 44px; }
  a.link:has(.arrow), .paused-bar a.link, .token-copy { padding-block: 11px; margin-block: -11px; }
  .paused-bar a.link { display: inline-block; }
  .token-box summary { min-height: 44px; }
  .consent input { width: 22px; height: 22px; margin-top: 0; }
  .image-remove { width: 44px; height: 44px; }
  .image-slot { grid-template-columns: 56px minmax(0, 1fr) 44px; }
  .marks a { padding-block: 12px; margin-block: -12px; }
  .coverage th a { padding-block: 15px; margin-block: -15px; }
}

/* Windows high contrast: forced colours drop what is drawn with a background. */
@media (forced-colors: active) {
  .menu i, .menu i::before, .menu i::after { background: CanvasText; forced-color-adjust: none; }
  .menu[aria-expanded="true"] i { background: transparent; }
  .price li::before { background: CanvasText; forced-color-adjust: none; }
  .seg button[aria-pressed="true"] { outline: 2px solid Highlight; outline-offset: -2px; }
}

/* Keep this last. Nothing waits for a scroll on paper, and the dark panels print as outlined white. */
@media print {
  :root {
    color-scheme: light;
    --bg: #fff; --bg-sunk: #fff; --surface: #fff; --surface-2: #f4f4f4;
    --ink: #000; --ink-2: #222; --muted: #444; --faint: #555;
    --line: #ccc; --line-strong: #999; --accent: #000; --accent-text: #000; --accent-soft: #f4f4f4;
    --invert-bg: #fff; --invert-ink: #000; --invert-muted: #333; --invert-line: #ccc;
    --grid-line: transparent; --glow: transparent; --shadow-sm: none; --btn-shadow: none;
  }
  .nav, .footer, .cta, .seg, .menu, .lang-hint, .toc, .next { display: none !important; }
  .reveal, .js .reveal, .rise { opacity: 1 !important; transform: none !important; transition: none !important; animation: none !important; }
  .legal-grid { display: block; }
  .band, .price.featured, .market.invert { border: 1px solid #999; }
  a.link { text-decoration: underline; }
  .showcase img, .prose figure img { filter: none; }
  body { background: #fff; color: #000; }
}

/* Terms a plan leaves to its footnotes, at the foot of the page. */
.fn { font-size: .72em; line-height: 0; margin-inline-start: 1px; }
.fn a { padding: 2px; color: var(--muted); text-decoration: none; }
.price.featured .fn a { color: var(--invert-muted); }
.fn a:hover { text-decoration: underline; }
/* On a touch screen the marker is a bigger target than it looks; the negative margins keep the line as it is. */
@media (max-width: 900px), (pointer: coarse) {
  .fn a { display: inline-block; line-height: 1; padding: 14px 10px; margin: -14px -8px; }
}
.section.footnotes { padding-block: 0 clamp(40px, 5vw, 64px); }
.fn-list, .fn-notes { max-width: 62em; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.fn-list { padding-inline-start: 1.5em; }
.fn-notes { padding: 0; list-style: none; }
.fn-list + .fn-notes { margin-top: 14px; }
.fn-list li, .fn-notes li { margin-block: 6px; scroll-margin-top: calc(var(--nav-h) + 16px); }
.fn-list li:target { color: var(--ink-2); }

.trial-box { display: grid; gap: 12px; justify-items: start; margin-bottom: 24px; padding: 20px; border: 1px solid var(--line); border-radius: 12px; }
.trial-box p { margin: 0; }
.trial-done { display: grid; gap: 8px; }
.trial-code { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 16px; }
/* One click or tap takes the whole code, for a browser whose clipboard is closed to Copy. */
.trial-code code { -webkit-user-select: all; user-select: all; }

/* Detail one click away, inside a rules row. */
.fold { margin-top: 10px; }
.fold summary { color: var(--muted); cursor: pointer; }
.fold p { margin-top: 8px; }
/* A label and its value: the label keeps its one line at any width, the value wraps. */
.sheet.spec tbody th { white-space: nowrap; width: 1%; }
@media (max-width: 560px) { .sheet.spec th, .sheet.spec td { padding: 12px; } }
