/* ============================================================================
   币算 · ngneo.com — "Precision instrument" design system
   A calculator-and-gauges language (after Braun's ET66): warm graphite or
   paper, one signal orange, tick-mark rulers, needles and recessed readouts.
   ========================================================================== */

/* ---------- tokens ---------- */
:root {
  color-scheme: dark;
  --bg: #0d0d0b;
  --bg-2: #11110f;
  --surface: #161614;
  --surface-2: #1c1c19;
  --surface-3: #24241f;
  --line: #2a2a25;
  --line-2: #3a3a33;
  --text-1: #f2efe6;
  --text-2: #b1ada1;
  --text-3: #8b887d;
  --accent: #ff6a1f;
  --accent-hover: #ff8547;
  --accent-text: #ff8a4c;
  --accent-ink: #1a0b02;
  --accent-soft: rgba(255, 106, 31, .12);
  --accent-glow: rgba(255, 106, 31, .35);
  --up: #2fbf71;
  --down: #f2443a;
  --warn: #f0a020;
  --screen: #0a0a09;
  --screen-line: #23231f;
  --screen-text: #f2efe6;
  --screen-text-2: #8d897e;
  --series-1: #ea5c16;
  --series-2: #4a90e2;
  --series-3: #22a57b;
  --grid: #20201c;
  --zone-a: rgba(74, 144, 226, .14);
  --zone-b: rgba(34, 165, 123, .12);
  --zone-c: rgba(160, 155, 140, .05);
  --zone-d: rgba(242, 68, 58, .14);
  --band-0: #184f95; --band-1: #2a78d6; --band-2: #5598e7; --band-3: #9ec5f4;
  --band-4: #f2b8b5; --band-5: #e66767; --band-6: #d33f3f; --band-7: #9e2828;
  --grain-opacity: .05;
  --wordmark: #1a1a17;

  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: "Instrument Sans", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --display: "Instrument Sans", "Noto Sans SC", -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --serif: "Instrument Serif", "Songti SC", "STSong", serif;

  --r-xs: 4px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --wrap: 1360px;
  --gutter: clamp(16px, 4vw, 48px);
  --sec-gap: clamp(72px, 9vw, 136px);

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-spring: cubic-bezier(.34, 1.36, .64, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  --t-fast: 160ms;
  --t-med: 420ms;
  --t-slow: 900ms;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #ecebe5; --bg-2: #e5e3dc; --surface: #f6f5f1; --surface-2: #fbfaf7; --surface-3: #efede7;
    --line: #dcd8ce; --line-2: #c8c3b6;
    --text-1: #121210; --text-2: #4b4840; --text-3: #6a665c;
    --accent: #f05a12; --accent-hover: #d84c08; --accent-text: #b43f00; --accent-ink: #1a0b02;
    --accent-soft: rgba(240, 90, 18, .1); --accent-glow: rgba(240, 90, 18, .28);
    --up: #12894f; --down: #d42f25; --warn: #b26b00;
    --series-1: #e05a10; --series-2: #2a78d6; --series-3: #16996b;
    --grid: #e6e3db;
    --zone-a: rgba(42, 120, 214, .10); --zone-b: rgba(22, 153, 107, .10);
    --zone-c: rgba(120, 115, 100, .05); --zone-d: rgba(212, 47, 37, .10);
    --band-0: #104281; --band-1: #256abf; --band-2: #6da7ec; --band-3: #b7d3f6;
    --band-4: #f6c9c7; --band-5: #ec8a89; --band-6: #e34948; --band-7: #a82a2a;
    --grain-opacity: .06;
    --wordmark: #e2dfd6;
  }
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #ecebe5; --bg-2: #e5e3dc; --surface: #f6f5f1; --surface-2: #fbfaf7; --surface-3: #efede7;
  --line: #dcd8ce; --line-2: #c8c3b6;
  --text-1: #121210; --text-2: #4b4840; --text-3: #6a665c;
  --accent: #f05a12; --accent-hover: #d84c08; --accent-text: #b43f00; --accent-ink: #1a0b02;
  --accent-soft: rgba(240, 90, 18, .1); --accent-glow: rgba(240, 90, 18, .28);
  --up: #12894f; --down: #d42f25; --warn: #b26b00;
  --series-1: #e05a10; --series-2: #2a78d6; --series-3: #16996b;
  --grid: #e6e3db;
  --zone-a: rgba(42, 120, 214, .10); --zone-b: rgba(22, 153, 107, .10);
  --zone-c: rgba(120, 115, 100, .05); --zone-d: rgba(212, 47, 37, .10);
  --band-0: #104281; --band-1: #256abf; --band-2: #6da7ec; --band-3: #b7d3f6;
  --band-4: #f6c9c7; --band-5: #ec8a89; --band-6: #e34948; --band-7: #a82a2a;
  --grain-opacity: .06;
  --wordmark: #e2dfd6;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-rendering: optimizeLegibility; scroll-padding-top: 120px; }
body {
  margin: 0; background: var(--bg); color: var(--text-1);
  font: 400 16px/1.75 var(--sans); letter-spacing: .005em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
/* analog grain over everything, never intercepting input */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
::selection { background: var(--accent); color: var(--accent-ink); }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.num, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.up { color: var(--up); }
.down { color: var(--down); }
:root[data-updown="red-up"] .up { color: var(--down); }
:root[data-updown="red-up"] .down { color: var(--up); }
.muted { color: var(--text-3); }
.dim { color: var(--text-2); }
.skip { position: absolute; left: 12px; top: -48px; z-index: 60; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: var(--r-sm); font-weight: 600; }
.skip:focus { top: 12px; }

/* ---------- type ---------- */
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 900; letter-spacing: -.02em; text-wrap: balance; }
.t-hero, .t-h1, .t-h2 { font-family: var(--display); font-weight: 900; }
.t-hero { font-size: clamp(40px, 6.4vw, 92px); line-height: .98; letter-spacing: -.035em; }
.t-h1 { font-size: clamp(34px, 4.6vw, 64px); line-height: 1.04; }
.t-h2 { font-size: clamp(26px, 3vw, 40px); line-height: 1.12; }
h3, .t-h3 { font-family: var(--sans); font-weight: 650; font-size: 19px; line-height: 1.4; letter-spacing: -.005em; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px;
  font: 500 11.5px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--text-3);
}
.eyebrow b { color: var(--accent-text); font-weight: 500; }
.lede { margin: 20px 0 0; max-width: 40em; color: var(--text-2); font-size: clamp(16px, 1.3vw, 18.5px); line-height: 1.75; text-wrap: pretty; }
.label { font: 500 11px/1.2 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }
.serif { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: 0; }

/* ---------- header ---------- */
.hdr { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent; transition: border-color var(--t-med) var(--ease-out), background var(--t-med) var(--ease-out); }
.hdr.is-scrolled { border-bottom-color: var(--line); }
.hdr-in { display: flex; align-items: center; gap: clamp(16px, 3vw, 40px); height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 11px; flex: none; }
.logo-key { width: 30px; height: 30px; transition: transform var(--t-med) var(--ease-spring); }
.logo:hover .logo-key { transform: rotate(-90deg); }
.logo-word { font: 900 21px/1 var(--display); letter-spacing: .02em; }
.logo-sub { font: 500 10px/1 var(--mono); letter-spacing: .16em; color: var(--text-3); padding: 4px 6px; border: 1px solid var(--line); border-radius: 999px; }
.nav { display: flex; align-items: center; gap: 4px; flex: 1; }
.nav a { position: relative; padding: 9px 13px; font-size: 14.5px; font-weight: 500; color: var(--text-2); border-radius: 999px; transition: color var(--t-fast), background var(--t-fast); }
.nav a:hover { color: var(--text-1); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--text-1); }
.nav a[aria-current="page"]::before { content: ""; position: absolute; left: 50%; bottom: 1px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent-glow); }
.hdr-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.tool-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; min-width: 36px; padding: 0 12px;
  border: 1px solid var(--line); background: var(--surface); border-radius: 999px; cursor: pointer; color: var(--text-2);
  font: 500 12.5px/1 var(--sans); transition: border-color var(--t-fast), color var(--t-fast), transform var(--t-fast) var(--ease-out);
}
.tool-btn:hover { border-color: var(--line-2); color: var(--text-1); }
.tool-btn:active { transform: translateY(1px) scale(.97); }
.tool-btn.icon { padding: 0; width: 36px; }
.tool-btn svg { width: 16px; height: 16px; }
.ud-dots { display: inline-flex; gap: 3px; }
.ud-dots i { width: 6px; height: 6px; border-radius: 50%; }
.ud-dots i:first-child { background: var(--up); }
.ud-dots i:last-child { background: var(--down); }
:root[data-updown="red-up"] .ud-dots i:first-child { background: var(--down); }
:root[data-updown="red-up"] .ud-dots i:last-child { background: var(--up); }
.theme-sun, :root[data-theme="light"] .theme-moon { display: none; }
:root[data-theme="light"] .theme-sun { display: block; }
@media (prefers-color-scheme: light) { :root:not([data-theme]) .theme-sun { display: block; } :root:not([data-theme]) .theme-moon { display: none; } }
.menu-btn { display: none; flex-direction: column; }
.menu-btn span { display: block; width: 14px; height: 1.5px; background: currentColor; border-radius: 2px; transition: transform var(--t-med) var(--ease-out); }
.menu-btn span + span { margin-top: 4px; }
.menu-btn[aria-expanded="true"] span:first-child { transform: translateY(2.75px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-2.75px) rotate(-45deg); }

@media (max-width: 900px) {
  .menu-btn { display: inline-flex; }
  .nav {
    position: fixed; inset: 68px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px var(--gutter) 24px; background: var(--bg); border-bottom: 1px solid var(--line);
    clip-path: inset(0 0 100% 0); opacity: 0; pointer-events: none;
    transition: clip-path var(--t-med) var(--ease-out), opacity var(--t-med) var(--ease-out);
  }
  .nav.open { clip-path: inset(0 0 0 0); opacity: 1; pointer-events: auto; }
  .nav a { padding: 16px 4px; font: 900 26px/1.1 var(--display); color: var(--text-1); border-radius: 0; border-bottom: 1px solid var(--line); }
  .nav a:hover { background: transparent; color: var(--accent-text); }
  .nav a[aria-current="page"]::before { left: auto; right: 6px; top: 50%; bottom: auto; width: 8px; height: 8px; margin: -4px 0 0; }
  .hdr-tools .ud-label { display: none; }
}

/* ---------- ticker tape ---------- */
.tape { position: relative; border-block: 1px solid var(--line); background: var(--bg-2); overflow: hidden; height: 38px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.tape-track { display: flex; width: max-content; height: 100%; align-items: center; animation: tape 70s linear infinite; }
.tape:hover .tape-track { animation-play-state: paused; }
.tape-set { display: flex; align-items: center; }
.tape-item { display: inline-flex; align-items: baseline; gap: 9px; padding: 0 22px; white-space: nowrap; font: 500 12.5px/1 var(--mono); }
.tape-item::after { content: ""; width: 4px; height: 4px; margin-left: 22px; transform: rotate(45deg) translateY(-2px); background: var(--line-2); }
.tape-item .k { color: var(--text-3); letter-spacing: .06em; }
.tape-item .v { color: var(--text-1); font-variant-numeric: tabular-nums; }
.tape-item .z { color: var(--text-3); font-family: var(--sans); font-size: 12px; }
a.tape-item:hover .v { color: var(--accent-text); }
@keyframes tape { to { transform: translateX(-50%); } }

/* ---------- page scaffolding ---------- */
main { display: block; }
.sec { padding-top: var(--sec-gap); }
.sec-tight { padding-top: clamp(40px, 5vw, 72px); }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; font: 500 12px/1.4 var(--mono); color: var(--text-3); letter-spacing: .04em; }
.crumbs a:hover { color: var(--accent-text); }
.crumbs span { opacity: .5; }
.page-hero { padding-top: clamp(40px, 6vw, 88px); padding-bottom: clamp(32px, 4vw, 56px); }
.page-hero .t-h1 { max-width: 15em; }
.page-hero .keys { margin-top: 32px; }

.sec-head { display: flex; align-items: flex-end; gap: 18px; margin-bottom: clamp(24px, 3vw, 40px); }
.sec-no { font: 500 12px/1 var(--mono); color: var(--accent-text); letter-spacing: .08em; padding-bottom: 9px; }
.sec-head h2 { flex: 0 1 auto; min-width: 0; }
.sec-rule { flex: 1; height: 10px; margin-bottom: 10px; min-width: 24px;
  background: linear-gradient(var(--line-2), var(--line-2)) left bottom / 100% 1px no-repeat,
              repeating-linear-gradient(90deg, var(--line-2) 0 1px, transparent 1px 8px) left bottom / 100% 6px no-repeat; opacity: .8; }
.sec-link { flex: none; display: inline-flex; align-items: center; gap: 6px; padding-bottom: 7px; font: 500 13px/1 var(--mono); color: var(--text-2); }
.sec-link:hover { color: var(--accent-text); }
.sec-link svg { width: 14px; height: 14px; transition: transform var(--t-med) var(--ease-out); }
.sec-link:hover svg { transform: translate(2px, -2px); }
@media (max-width: 640px) { .sec-head { flex-wrap: wrap; gap: 10px 14px; } .sec-head h2 { flex: 1 1 0; } .sec-rule { display: none; } .sec-link { margin-left: auto; } }

/* ---------- panels ---------- */
.panel { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.panel-pad { padding: clamp(20px, 2.6vw, 36px); }
.panel-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px clamp(18px, 2.2vw, 28px); border-bottom: 1px solid var(--line); }
/* the short right-hand label stays on one line; the title takes the rest */
.panel-h > :last-child:not(:first-child) { flex-shrink: 0; white-space: nowrap; }
.panel-h > :first-child { min-width: 0; line-height: 1.5; }
.panel-h > .wrap-ok { flex-shrink: 1; white-space: normal; text-align: right; line-height: 1.5; }
.panel-f { padding: 14px clamp(18px, 2.2vw, 28px); border-top: 1px solid var(--line); font-size: 13px; color: var(--text-3); line-height: 1.6; }
.reg::before, .reg::after { content: ""; position: absolute; width: 9px; height: 9px; pointer-events: none; opacity: .7; }
.reg::before { top: 10px; left: 10px; border-top: 1px solid var(--text-3); border-left: 1px solid var(--text-3); }
.reg::after { bottom: 10px; right: 10px; border-bottom: 1px solid var(--text-3); border-right: 1px solid var(--text-3); }

/* ---------- LED, chips ---------- */
.led { width: 7px; height: 7px; border-radius: 50%; background: var(--up); box-shadow: 0 0 0 3px color-mix(in srgb, var(--up) 18%, transparent), 0 0 12px color-mix(in srgb, var(--up) 60%, transparent); animation: led 2.4s var(--ease-io) infinite; flex: none; }
.led.off { background: var(--text-3); box-shadow: none; animation: none; }
@keyframes led { 50% { opacity: .35; } }
.chip { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); font: 600 12.5px/1 var(--sans); color: var(--text-1); white-space: nowrap; background: var(--surface); }
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--chip, var(--text-3)); box-shadow: 0 0 10px color-mix(in srgb, var(--chip, transparent) 70%, transparent); }
.chip[data-zone="bottom"], .chip[data-zone="xfear"] { --chip: var(--series-2); }
.chip[data-zone="fear"] { --chip: var(--band-2); }
.chip[data-zone="dca"] { --chip: var(--series-3); }
.chip[data-zone="neutral"], .chip[data-zone="hold"] { --chip: var(--text-3); }
.chip[data-zone="greed"] { --chip: var(--band-5); }
.chip[data-zone="top"], .chip[data-zone="xgreed"] { --chip: var(--band-6); }
.chip.plain::before { display: none; }

/* ---------- readouts & odometer ---------- */
.readout { display: flex; align-items: flex-start; gap: .06em; font-family: var(--mono); font-weight: 500; font-variant-numeric: tabular-nums; line-height: 1; letter-spacing: -.055em; }
.readout .cur { font-size: .34em; font-weight: 400; color: var(--text-3); letter-spacing: 0; margin-top: .22em; margin-right: .2em; }
.readout-xl { font-size: clamp(64px, 13.5vw, 216px); }
/* Readouts sized by their character count so any value fills, never overflows, its panel. */
.fitbox { container-type: inline-size; }
.readout-xl.fitlen { font-size: clamp(48px, calc(100cqi / (var(--len, 6) * .58 + .3)), 216px); }
.readout-lg { font-size: clamp(52px, 7vw, 104px); }
.readout-md { font-size: clamp(36px, 4vw, 56px); letter-spacing: -.045em; }
.readout-sm { font-size: 30px; letter-spacing: -.04em; }
.odo-on { display: inline-flex; }
.odo-d { display: inline-block; height: 1.04em; overflow: hidden; }
.odo-s { display: flex; flex-direction: column; transform: translateY(calc(var(--n, 0) * -1.04em)); transition: transform 1.1s var(--ease-out); transition-delay: var(--d, 0ms); }
.odo-s > span, .odo-c { display: block; height: 1.04em; line-height: 1.04; }
.odo-c { display: inline-block; }

/* ---------- ruler instrument ---------- */
.ruler { position: relative; padding-top: 44px; user-select: none; }
.ruler-track { position: relative; height: 34px; }
.ruler-ticks { position: absolute; inset: 0; color: var(--text-3);
  background:
    repeating-linear-gradient(90deg, currentColor 0 1px, transparent 1px calc(100% / var(--minor, 24))) left top / 100% 10px no-repeat,
    repeating-linear-gradient(90deg, currentColor 0 1px, transparent 1px calc(100% / var(--major, 6))) left top / 100% 20px no-repeat;
  opacity: .55; }
.ruler-ticks::after { content: ""; position: absolute; right: 0; top: 0; width: 1px; height: 20px; background: currentColor; }
.ruler-base { position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--line-2); }
.ruler-zone { position: absolute; top: 0; height: 6px; border-radius: 0 0 3px 3px; }
.ruler-fill { position: absolute; top: 0; height: 3px; background: var(--accent); box-shadow: 0 0 14px var(--accent-glow); }
.ruler-mark { position: absolute; top: 0; width: 1px; height: 12px; margin-left: -.5px; background: var(--text-3); opacity: .7; }
.ruler-mark.strong { height: 18px; background: var(--text-2); opacity: 1; }
.ruler-mid { position: absolute; top: -8px; bottom: -2px; width: 1px; background: var(--text-2); }
.ruler-labels { position: relative; height: 18px; margin-top: 4px; font: 500 11px/1 var(--mono); color: var(--text-3); }
.ruler-labels span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.ruler-labels span:first-child { transform: none; }
.ruler-labels span:last-child { transform: translateX(-100%); }
.ruler-labels .z { color: var(--text-2); }
.needle { position: absolute; top: -40px; bottom: 0; left: var(--x); width: 0; z-index: 2; }
.needle::before { content: ""; position: absolute; left: -1px; top: 26px; bottom: 0; width: 2px; background: var(--accent); border-radius: 2px; box-shadow: 0 0 12px var(--accent-glow); }
.needle-tag { position: absolute; top: 0; left: 0; transform: translateX(-50%); padding: 5px 9px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font: 600 12px/1 var(--mono); white-space: nowrap; letter-spacing: -.01em; }
.needle[data-edge="l"] .needle-tag { transform: translateX(-12px); }
.needle[data-edge="r"] .needle-tag { transform: translateX(calc(-100% + 12px)); }
.ruler-cap { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; font-size: 13px; color: var(--text-2); }

/* ---------- dial (fear & greed) ---------- */
.dial { position: relative; width: 100%; max-width: 420px; aspect-ratio: 2 / 1.12; margin-inline: auto; }
.dial svg { width: 100%; height: 100%; overflow: visible; }
.dial .arc { fill: none; stroke-width: 14; }
.dial .tick { stroke: var(--text-3); stroke-width: 1; opacity: .6; }
.dial .tick.major { stroke-width: 1.5; opacity: 1; }
.dial .dial-n { fill: var(--text-3); font: 500 10px var(--mono); }
.dial .hand { transform-origin: 160px 160px; transform: rotate(var(--a)); transition: transform 1.4s var(--ease-spring); }
.dial .hand line { stroke: var(--accent); stroke-width: 3; stroke-linecap: round; }
.dial .hub { fill: var(--accent); }
.dial .hub-ring { fill: var(--surface); stroke: var(--accent); stroke-width: 2; }
.dial-read { text-align: center; margin-top: 2px; }
.dial-read .readout { justify-content: center; }
.dial-read .chip { margin-top: 12px; }
.dial.mini { max-width: 210px; }
.dial.mini .arc { stroke-width: 18; }

/* ---------- segmented bar (rainbow) & ladder ---------- */
.segbar { display: grid; grid-template-columns: repeat(8, 1fr); gap: 3px; height: 12px; }
.segbar i { border-radius: 2px; background: var(--c); opacity: .35; transition: opacity var(--t-med), transform var(--t-med) var(--ease-spring); }
.segbar i.on { opacity: 1; transform: scaleY(1.7); box-shadow: 0 0 14px color-mix(in srgb, var(--c) 60%, transparent); }
.ladder { list-style: none; margin: 0; padding: 0; }
.ladder li { position: relative; display: grid; grid-template-columns: 6px 1fr auto; align-items: center; gap: 14px; padding: 11px clamp(16px, 2vw, 24px) 11px 0; border-bottom: 1px solid var(--line); transition: background var(--t-fast); }
.ladder li:last-child { border-bottom: 0; }
.ladder li::before { content: ""; align-self: stretch; margin: -11px 0; background: var(--c); }
.ladder .n { font-size: 14.5px; }
.ladder .p { font: 500 13px/1 var(--mono); color: var(--text-2); text-align: right; }
.ladder li.on { background: var(--accent-soft); }
.ladder li.on .n { font-weight: 700; }
.ladder li.on .p { color: var(--text-1); }
.ladder .here { margin-left: 10px; font: 600 10.5px/1 var(--mono); color: var(--accent-ink); background: var(--accent); padding: 4px 7px; border-radius: 999px; letter-spacing: .06em; }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); border-top: 1px solid var(--line); }
.stat { padding: 18px 16px 0 0; min-width: 0; }
.stat + .stat { padding-left: 16px; border-left: 1px solid var(--line); }
.stat .label { display: block; margin-bottom: 8px; }
.stat .v { font: 500 clamp(17px, 1.8vw, 22px)/1.2 var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat .s { font-size: 12.5px; color: var(--text-3); margin-top: 4px; }
@media (min-width: 521px) { .hist-stats .stat:nth-child(3n+1) { border-left: 0; padding-left: 0; } .hist-stats .stat:nth-child(n+4) { border-top: 1px solid var(--line); margin-top: 16px; } }
@media (max-width: 520px) { .hist-stats .stat:nth-child(odd) { border-left: 0; padding-left: 0; } }
@media (max-width: 520px) { .stats.wrap-sm { --cols: 2 !important; } .stats.wrap-sm .stat:nth-child(3) { border-left: 0; padding-left: 0; } .stats.wrap-sm .stat:nth-child(n+3) { border-top: 1px solid var(--line); margin-top: 16px; } }

/* ---------- keys (segmented controls) ---------- */
.keys { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
.keys a, .keys button, .keys label > span {
  display: inline-flex; align-items: center; justify-content: center; height: 34px; min-width: 52px; padding: 0 14px; border: 0; border-radius: 999px;
  background: transparent; color: var(--text-2); font: 500 12.5px/1 var(--mono); letter-spacing: .04em; cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast) var(--ease-out), box-shadow var(--t-fast);
}
.keys a:hover, .keys button:hover, .keys label > span:hover { color: var(--text-1); background: var(--surface-3); }
.keys a:active, .keys button:active, .keys label > span:active { transform: translateY(1px) scale(.97); }
.keys [aria-current="page"], .keys [aria-pressed="true"], .keys input:checked + span {
  background: var(--accent); color: var(--accent-ink); box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, 0 6px 18px -6px var(--accent-glow);
}
.keys [aria-current="page"]:hover, .keys [aria-pressed="true"]:hover, .keys input:checked + span:hover { background: var(--accent-hover); color: var(--accent-ink); }
.keys label { display: contents; }
.keys input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.keys.sm a, .keys.sm button, .keys.sm label > span { height: 30px; min-width: 44px; padding: 0 11px; font-size: 12px; }

/* ---------- buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 48px; padding: 0 24px;
  border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--text-1);
  font: 600 15px/1 var(--sans); cursor: pointer; overflow: hidden; isolation: isolate; white-space: nowrap;
  transition: border-color var(--t-fast), color var(--t-fast), transform var(--t-fast) var(--ease-out);
}
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--surface-3); transform: scaleX(0); transform-origin: left; transition: transform var(--t-med) var(--ease-out); }
.btn:hover::before { transform: scaleX(1); }
.btn:active { transform: translateY(1px) scale(.985); }
.btn svg { width: 16px; height: 16px; transition: transform var(--t-med) var(--ease-out); }
.btn:hover svg { transform: translate(3px, -3px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 10px 30px -12px var(--accent-glow); }
.btn.primary::before { background: var(--accent-hover); }
.btn.sm { height: 36px; padding: 0 14px; font-size: 13.5px; }

/* ---------- index list (guides, related) ---------- */
.ilist { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.irow { position: relative; display: grid; grid-template-columns: 64px minmax(0, 1.1fr) minmax(0, 1.4fr) 40px; align-items: center; gap: 20px; padding: 26px 8px; border-bottom: 1px solid var(--line); isolation: isolate; }
.irow::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--surface); transform: scaleY(0); transform-origin: bottom; transition: transform var(--t-med) var(--ease-out); }
.irow:hover::before { transform: scaleY(1); }
.irow .no { font: 500 12px/1 var(--mono); color: var(--text-3); padding-left: 8px; }
.irow .tt { font: 900 clamp(20px, 2.2vw, 28px)/1.2 var(--display); letter-spacing: -.015em; transition: transform var(--t-med) var(--ease-out); }
.irow:hover .tt { transform: translateX(6px); }
.irow .dd { color: var(--text-2); font-size: 14.5px; }
.irow .ar { justify-self: end; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; transition: background var(--t-med) var(--ease-out), border-color var(--t-med), color var(--t-med); }
.irow .ar svg { width: 15px; height: 15px; transition: transform var(--t-med) var(--ease-out); }
.irow:hover .ar { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.irow:hover .ar svg { transform: rotate(45deg); }
@media (max-width: 760px) { .irow { grid-template-columns: 36px minmax(0, 1fr) 36px; row-gap: 6px; padding: 20px 4px; } .irow .dd { grid-column: 2; grid-row: 2; font-size: 14px; } .irow .ar { grid-row: 1 / span 2; grid-column: 3; } .irow .no { padding-left: 0; } }

/* ---------- tool modules ---------- */
.modules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.module { position: relative; display: flex; flex-direction: column; gap: 14px; min-height: 270px; padding: clamp(22px, 2.4vw, 32px); background: var(--surface); transition: background var(--t-med) var(--ease-out); }
.module:hover { background: var(--surface-2); }
.module-top { display: flex; align-items: center; justify-content: space-between; min-height: 30px; }
.module .idx { font: 500 11.5px/1 var(--mono); color: var(--text-3); letter-spacing: .1em; transition: opacity var(--t-fast); }
.module .ico { width: 44px; height: 44px; color: var(--text-1); transition: color var(--t-med), transform var(--t-med) var(--ease-spring); }
.module:hover .ico { color: var(--accent); transform: scale(1.06) rotate(-4deg); }
.module .nm { font: 900 clamp(22px, 2vw, 27px)/1.2 var(--display); letter-spacing: -.015em; margin-top: auto; }
.module .ds { color: var(--text-2); font-size: 14px; line-height: 1.65; }
.module .fx { font: 400 12px/1.5 var(--mono); color: var(--text-3); padding-top: 14px; border-top: 1px dashed var(--line-2); }
.module .go { position: absolute; top: clamp(22px, 2.4vw, 32px); right: clamp(22px, 2.4vw, 32px); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); opacity: 0; transform: scale(.6) rotate(-45deg); transition: opacity var(--t-med), transform var(--t-med) var(--ease-spring), background var(--t-med); }
.module .go svg { width: 13px; height: 13px; }
.module:hover .go { opacity: 1; transform: none; background: var(--accent); color: var(--accent-ink); }
.module:hover .idx { opacity: 0; }
@media (max-width: 1000px) { .modules { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .modules { grid-template-columns: minmax(0, 1fr); } .module { min-height: 0; } }

/* ---------- instrument tiles (indicators strip) ---------- */
.insts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(12px, 1.4vw, 20px); }
.inst { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 22px 22px 24px; min-height: 262px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; transition: border-color var(--t-med), transform var(--t-med) var(--ease-out), opacity .8s var(--ease-out); }
.inst:hover { border-color: var(--line-2); transform: translateY(-3px); }
.inst-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.inst-h .t { font-size: 14px; font-weight: 600; color: var(--text-2); }
.inst-h .ar { width: 16px; height: 16px; color: var(--text-3); transition: transform var(--t-med) var(--ease-out), color var(--t-med); }
.inst:hover .inst-h .ar { color: var(--accent); transform: translate(2px, -2px); }
.inst .foot { margin-top: auto; }
.inst .ruler { padding-top: 34px; }
.inst .needle { top: -34px; }
.inst .needle::before { top: 22px; }
.inst .ruler .ruler-track { height: 22px; }
.inst .ruler-labels { font-size: 10px; }
.inst .dial { margin-top: -6px; }
.spark { width: 100%; height: 56px; overflow: visible; }
.spark path.l { fill: none; stroke: var(--series-1); stroke-width: 1.75; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.spark path.a { fill: var(--series-1); opacity: .1; }
@media (max-width: 1100px) { .insts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .insts { grid-template-columns: minmax(0, 1fr); } .inst { min-height: 0; } }

/* ---------- home hero ---------- */
.hh { padding-top: clamp(28px, 4vw, 56px); }
.hh-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(320px, 1fr); gap: clamp(16px, 2vw, 24px); align-items: stretch; }
.hh-main { padding: clamp(24px, 3.4vw, 48px); display: flex; flex-direction: column; }
.hh-title { font-size: clamp(22px, 2.2vw, 30px); color: var(--text-1); letter-spacing: -.015em; margin-bottom: clamp(20px, 2.6vw, 34px); }
.hh-meta { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: clamp(18px, 2vw, 26px) 0 clamp(30px, 3.4vw, 48px); font: 500 13px/1.3 var(--mono); }
.hh-meta .k { color: var(--text-3); margin-right: 8px; font-family: var(--sans); font-size: 13px; }
.hh-note { margin: 18px 0 0; color: var(--text-3); font-size: 13.5px; max-width: 36em; }
.fxl { display: flex; flex-direction: column; overflow: hidden; }
.fxl ul { list-style: none; margin: 0; padding: 0; flex: 1; display: flex; flex-direction: column; }
.fxl li { flex: 1; border-bottom: 1px solid var(--line); }
.fxl li:last-child { border-bottom: 0; }
.fxl a { position: relative; height: 100%; min-height: 76px; display: grid; grid-template-columns: minmax(0, 1fr) auto 64px; align-items: center; gap: 16px; padding: 0 clamp(18px, 2vw, 26px); isolation: isolate; }
.fxl a::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--surface-2); transform: scaleX(0); transform-origin: left; transition: transform var(--t-med) var(--ease-out); }
.fxl a:hover::before { transform: scaleX(1); }
.fxl .code { font: 600 14.5px/1.2 var(--mono); letter-spacing: .01em; }
.fxl .code small { display: block; font: 400 12.5px/1.4 var(--sans); color: var(--text-3); letter-spacing: 0; margin-top: 4px; }
.fxl .px { font: 500 21px/1 var(--mono); letter-spacing: -.03em; }
.fxl .pm { font: 500 12px/1 var(--mono); color: var(--text-2); text-align: right; }
.fxl .pm i { display: block; height: 3px; margin-top: 9px; border-radius: 2px; background: var(--line); position: relative; }
.fxl .pm i::after { content: ""; position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: var(--text-3); }
.fxl .pm i b { position: absolute; top: 0; bottom: 0; background: var(--accent); border-radius: 2px; }
@media (max-width: 1000px) { .hh-grid { grid-template-columns: minmax(0, 1fr); } }

.hh-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
/* one line each, shrinking on phones instead of breaking into columns */
.hh-top > * { white-space: nowrap; flex-shrink: 0; }
.hh-top > .eyebrow { flex-shrink: 1; min-width: 0; }
@media (max-width: 560px) {
  .hh-top { gap: 8px; }
  .hh-top .eyebrow { font-size: clamp(9.5px, 2.9vw, 11.5px); letter-spacing: .08em; gap: 6px; }
  .hh-top .label { font-size: clamp(9.5px, 2.9vw, 11px); letter-spacing: .04em; }
  .hh-top .stale-note { display: none; }
}
.dotgrid { background-image: radial-gradient(color-mix(in srgb, var(--text-3) 34%, transparent) 1px, transparent 1.2px); background-size: 22px 22px; background-position: -11px -11px; }
.dotgrid > * { position: relative; }
.inst-big { font: 900 clamp(30px, 2.6vw, 38px)/1.1 var(--display); letter-spacing: -.02em; margin-top: 4px; }
.inst-sub { font-size: 13px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.inst-sub .sep { color: var(--text-3); margin: 0 2px; }
.segbar-cap { display: flex; justify-content: space-between; margin-top: 10px; font-size: 12px; color: var(--text-3); }

/* ---------- generic two-column layouts ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(300px, 1fr); gap: clamp(16px, 2vw, 24px); align-items: start; }
.split.stretch { align-items: stretch; }
.split.even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 1000px) { .split, .split.even { grid-template-columns: minmax(0, 1fr); } }

/* ---------- tables ---------- */
.tscroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.t { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.t th { text-align: left; padding: 14px clamp(14px, 2vw, 24px); border-bottom: 1px solid var(--line); font: 500 11px/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); white-space: nowrap; }
table.t td { padding: 16px clamp(14px, 2vw, 24px); border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t tr:last-child td { border-bottom: 0; }
table.t tbody tr { transition: background var(--t-fast); }
table.t tbody tr:hover { background: var(--surface-2); }
table.t .r { text-align: right; }
table.t td.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
table.t td.wrapc { white-space: normal; min-width: 14em; }
/* monthly returns heat table: tint follows the up/down colour preference, text stays ink */
table.heat { font-size: 13.5px; }
table.heat th, table.heat td { padding: 11px 10px; }
table.heat th:first-child, table.heat td:first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); padding-left: clamp(14px, 2vw, 24px); }
table.heat td.hc { background: color-mix(in srgb, var(--hc) calc(var(--h) * 40%), transparent); box-shadow: inset 0 0 0 1px var(--surface); }
table.heat td.hu { --hc: var(--up); }
table.heat td.hd { --hc: var(--down); }
:root[data-updown="red-up"] table.heat td.hu { --hc: var(--down); }
:root[data-updown="red-up"] table.heat td.hd { --hc: var(--up); }
table.heat tbody tr:hover { background: none; }
table.heat tfoot td { padding-block: 9px; border-bottom: 0; font-size: 12.5px; color: var(--text-2); }
table.heat tfoot tr:first-child td { border-top: 1px solid var(--line-2); padding-top: 14px; }
table.t .src { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; }
table.ftab .fcell small { display: block; margin-top: 4px; font: 500 11px/1.2 var(--mono); color: var(--text-3); }
table.ftab .ratefill { padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; border-bottom: 1px dashed currentColor; }
table.ftab .ratefill:hover { color: var(--accent-text); }
table.ftab .ratefill.up, table.ftab span.up { color: var(--up); }
table.ftab .ratefill.down, table.ftab span.down { color: var(--down); }
.pbars { list-style: none; margin: 0; padding: 8px 0; }
.pbars li { display: grid; grid-template-columns: 6.5em 1fr 5.2em; align-items: center; gap: 12px; padding: 7px clamp(18px, 2.2vw, 28px); font-size: 13.5px; }
.pbars .k { color: var(--text-2); font-family: var(--mono); font-size: 12.5px; }
.pbars .v { text-align: right; font: 500 13px var(--mono); font-variant-numeric: tabular-nums; }
.pbars .pb { position: relative; height: 10px; }
.pbars .pb::before { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--line-2); }
.pbars .pb i { position: absolute; top: 0; bottom: 0; width: calc(var(--w) / 2); border-radius: 2px; }
.pbars .pb i.pos { left: 50%; background: var(--accent); }
.pbars .pb i.neg { right: 50%; background: var(--series-2); }
.supply-bar { height: 8px; margin-top: 14px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.supply-bar i { display: block; height: 100%; width: var(--w); background: var(--accent); border-radius: inherit; }
.gloss-index .label { display: block; margin: 0 0 8px; }
.gloss-index .label + .gloss-chips { margin: 0 0 18px; }
.gloss-index .gloss-chips:last-child { margin-bottom: 0; }
.gloss-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.gloss-chips a { padding: 5px 11px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 13.5px; color: var(--text-2); transition: border-color var(--t-fast), color var(--t-fast); }
.gloss-chips a:hover { border-color: var(--accent); color: var(--accent-text); }
.gloss { margin: 0; display: grid; gap: 0; max-width: 52em; }
.gloss-item { padding: 18px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 96px; }
.gloss-item:target { background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 10%, transparent), transparent); }
.gloss dt { font: 650 18px/1.4 var(--sans); color: var(--text-1); }
.gloss dt .alias { margin-left: 10px; font: 500 12.5px/1 var(--mono); color: var(--text-3); }
.gloss dd { margin: 8px 0 0; color: var(--text-2); line-height: 1.85; font-size: 15.5px; }
.dl-note { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; margin: clamp(28px, 3vw, 40px) 0 0; font-size: 13.5px; color: var(--text-3); }
.dl-note a { font-weight: 600; white-space: nowrap; }
table.t .src-k { margin-left: -2px; padding: 2px 6px; border: 1px solid var(--line-2); border-radius: 999px; font: 500 10.5px/1.2 var(--mono); letter-spacing: .04em; color: var(--text-3); white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }

/* ---------- charts ---------- */
.chart { margin: 0; overflow: hidden; }
.chart-tools { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 14px clamp(16px, 2vw, 24px); border-bottom: 1px solid var(--line); min-height: 64px; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; color: var(--text-2); }
.legend > span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 16px; height: 2.5px; border-radius: 2px; display: inline-block; }
.chart-canvas { position: relative; height: 340px; margin: 10px 0 0; touch-action: pan-y; }
.chart-canvas.tall { height: 440px; }
@media (max-width: 720px) { .chart-canvas { height: 250px; } .chart-canvas.tall { height: 310px; } }
.chart-canvas svg { width: 100%; height: 100%; display: block; }
.chart-canvas svg text { font: 500 10.5px var(--mono); fill: var(--text-3); }
.chart-canvas .empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--text-3); font-size: 13.5px; }
.tip { position: absolute; pointer-events: none; z-index: 5; display: none; min-width: 156px; padding: 10px 12px; border-radius: var(--r-md);
  background: color-mix(in srgb, var(--surface-3) 92%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--line-2); box-shadow: 0 18px 40px -18px rgba(0,0,0,.5); font: 500 12px/1.6 var(--mono); color: var(--text-1); }
.tip .t { color: var(--text-3); margin-bottom: 4px; }
.tip .row { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.tip .row span:first-child { display: inline-flex; align-items: center; gap: 7px; color: var(--text-2); font-family: var(--sans); }
details.dtable summary { list-style: none; cursor: pointer; padding: 13px clamp(16px, 2vw, 24px); border-top: 1px solid var(--line); font: 500 12px/1 var(--mono); color: var(--text-3); letter-spacing: .04em; transition: color var(--t-fast); }
details.dtable summary::-webkit-details-marker { display: none; }
details.dtable summary::before { content: "+ "; }
details.dtable[open] summary::before { content: "− "; }
details.dtable summary:hover { color: var(--text-1); }
details.dtable .tscroll { max-height: 340px; overflow: auto; border-top: 1px solid var(--line); }

/* ---------- device (calculators) ---------- */
.device { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, 1fr); gap: clamp(16px, 2vw, 24px); align-items: start; }
.device + .device { margin-top: clamp(16px, 2vw, 24px); }
.controls { padding: clamp(20px, 2.6vw, 36px); }
.controls-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.controls-h .h { font: 650 17px/1.3 var(--sans); letter-spacing: 0; margin: 0; }
.screen { position: sticky; top: 96px; padding: clamp(22px, 2.6vw, 32px); border-radius: var(--r-lg); background: var(--screen); color: var(--screen-text); border: 1px solid var(--screen-line);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), inset 0 0 0 1px rgba(0,0,0,.4), 0 30px 60px -40px rgba(0,0,0,.6);
  background-image: radial-gradient(120% 80% at 50% -10%, rgba(255,255,255,.05), transparent 60%); }
.screen.reg::before, .screen.reg::after { border-color: #5a574f; }
.screen .label { color: var(--screen-text-2); }
.screen-main { padding-bottom: 22px; margin-bottom: 8px; border-bottom: 1px solid var(--screen-line); }
.screen-main .readout { color: #ff6a1f; margin-top: 14px; text-shadow: 0 0 28px rgba(255, 106, 31, .35); word-break: break-all; }
.screen-main { container-type: inline-size; }
.screen-main .readout.fit { font-size: clamp(24px, calc(100cqi / (var(--len, 8) * .6 + .2)), 46px); word-break: normal; white-space: nowrap; }
.out-row { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--screen-line); }
.out-row:last-child { border-bottom: 0; }
.out-row .k { color: var(--screen-text-2); font-size: 13.5px; }
.out-row .v { font: 500 16px/1.3 var(--mono); font-variant-numeric: tabular-nums; text-align: right; color: var(--screen-text); }
.out-row .v.up { color: #3ad17f; } .out-row .v.down { color: #ff5a4f; }
:root[data-updown="red-up"] .out-row .v.up { color: #ff5a4f; } :root[data-updown="red-up"] .out-row .v.down { color: #3ad17f; }
.screen .tick { animation: tick .45s var(--ease-out); }
@keyframes tick { from { opacity: .3; transform: translateY(3px); } }
.screen .alert { margin-top: 16px; }
@media (max-width: 1000px) { .device { grid-template-columns: minmax(0, 1fr); } .screen { position: relative; top: 0; } }

/* fields */
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 16px; }
.fields.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fields .full { grid-column: 1 / -1; }
.fields + .fields { margin-top: 18px; }
@media (max-width: 520px) { .fields.three { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .fields.three > :last-child:nth-child(odd) { grid-column: 1 / -1; } }
.field { display: grid; gap: 8px; min-width: 0; align-content: start; }
.field > label, .field .lab { font-size: 13px; font-weight: 500; color: var(--text-2); }
.field .hint { font-size: 12.5px; color: var(--text-3); line-height: 1.55; }
.inp { position: relative; display: flex; align-items: center; }
input[type="number"], input[type="text"], input[type="date"], select {
  width: 100%; height: 52px; padding: 0 16px; border-radius: var(--r-md); border: 1px solid var(--line-2);
  background: var(--surface-2); color: var(--text-1); font: 500 17px/1 var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em;
  -moz-appearance: textfield; appearance: none;
  transition: border-color var(--t-fast), box-shadow var(--t-med) var(--ease-out), background var(--t-fast);
}
select { font-family: var(--sans); font-size: 15px; letter-spacing: 0; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%237a776d' stroke-width='1.6'%3E%3Cpath d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; }
input::-webkit-outer-spin-button, input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input:hover, select:hover { border-color: var(--text-3); }
input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); background: var(--surface); }
input::placeholder { color: var(--text-3); font-family: var(--sans); font-size: 14px; }
.inp .unit { position: absolute; right: 14px; font: 500 11.5px/1 var(--mono); color: var(--text-3); pointer-events: none; letter-spacing: .06em; transition: color var(--t-fast); }
.inp input { padding-right: 62px; }
.inp:focus-within .unit { color: var(--accent-text); }
.lots { width: 100%; border-collapse: separate; border-spacing: 0 8px; margin: -8px 0 4px; }
.lots th { text-align: left; font: 500 11px/1 var(--mono); letter-spacing: .1em; color: var(--text-3); text-transform: uppercase; padding: 0 8px 0 2px; }
.lots td { padding: 0 8px 0 0; }
.lots td:last-child { padding: 0; width: 44px; }
.lots tr.row-in { animation: rowin var(--t-med) var(--ease-out); }
@keyframes rowin { from { opacity: 0; transform: translateY(-6px); } }
.x-btn { width: 44px; height: 52px; border: 0; background: transparent; color: var(--text-3); cursor: pointer; border-radius: var(--r-md); font-size: 20px; transition: color var(--t-fast), background var(--t-fast); }
.x-btn:hover { color: var(--down); background: color-mix(in srgb, var(--down) 10%, transparent); }
.add-btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; margin: 6px 0 24px; border-radius: 999px; border: 1px dashed var(--line-2); background: transparent; color: var(--text-2); cursor: pointer; font: 500 13.5px/1 var(--sans); transition: border-color var(--t-fast), color var(--t-fast); }
.add-btn:hover { border-color: var(--accent); color: var(--accent-text); border-style: solid; }
.alert { padding: 12px 14px; border-radius: var(--r-md); font-size: 13.5px; line-height: 1.6; border: 1px solid var(--line-2); color: var(--text-1); background: var(--surface-2); }
.alert.warn { border-color: color-mix(in srgb, var(--warn) 45%, transparent); background: color-mix(in srgb, var(--warn) 9%, transparent); }
.alert.bad { border-color: color-mix(in srgb, var(--down) 45%, transparent); background: color-mix(in srgb, var(--down) 9%, transparent); }
.screen .alert { color: var(--screen-text); background: rgba(255, 90, 79, .1); border-color: rgba(255, 90, 79, .4); }
.screen .alert.warn { background: rgba(240, 160, 32, .1); border-color: rgba(240, 160, 32, .4); }
.alert[hidden] { display: none; }

/* converter */
.conv { padding: clamp(20px, 2.4vw, 32px); }
.conv-swap { display: grid; place-items: center; height: 12px; position: relative; z-index: 1; }
.conv-swap span { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface); display: grid; place-items: center; color: var(--text-3); }
.conv-swap svg { width: 14px; height: 14px; }
.quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 20px; }
.quick button { height: 34px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text-2); font: 500 12.5px/1 var(--mono); cursor: pointer; transition: border-color var(--t-fast), color var(--t-fast), transform var(--t-fast) var(--ease-out); }
.quick button:hover { border-color: var(--accent); color: var(--accent-text); }
.quick button:active { transform: scale(.96); }

/* ---------- prose / articles ---------- */
.prose { max-width: 42em; font-size: 16.5px; line-height: 1.9; color: var(--text-2); }
.prose > * + * { margin-top: 1.1em; }
.prose > :first-child { margin-top: 0; }
.prose h2 { margin-top: 2.2em; color: var(--text-1); font-size: clamp(24px, 2.4vw, 32px); line-height: 1.25; }
.prose h3 { margin-top: 1.9em; color: var(--text-1); }
.prose p, .prose ul, .prose ol { margin-bottom: 0; }
.prose strong { color: var(--text-1); font-weight: 650; }
.prose a { color: var(--text-1); background: linear-gradient(var(--accent), var(--accent)) left bottom / 100% 1px no-repeat; padding-bottom: 1px; transition: background-size var(--t-med) var(--ease-out), color var(--t-fast); }
.prose a:hover { color: var(--accent-text); background-size: 100% 2px; }
.prose a.btn { background: var(--accent); padding-bottom: 0; color: var(--accent-ink); }
.prose code { font: 500 .86em var(--mono); color: var(--text-1); background: var(--surface-2); border: 1px solid var(--line); padding: 2px 7px; border-radius: 6px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .5em; }
.prose li::marker { color: var(--text-3); }
.formula { display: block; padding: 18px 20px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); font: 500 14px/1.7 var(--mono); color: var(--text-1); overflow-x: auto; }
.prose table.t { font-size: 14.5px; }
.article { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.toc { position: sticky; top: 112px; font-size: 13.5px; }
.toc .label { display: block; margin-bottom: 14px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 7px 0 7px 16px; margin-left: -1px; border-left: 1px solid transparent; color: var(--text-3); line-height: 1.45; transition: color var(--t-fast), border-color var(--t-fast); }
.toc a:hover { color: var(--text-1); }
.toc a.on { color: var(--text-1); border-left-color: var(--accent); }
.toc:empty { display: none; }
@media (max-width: 1000px) { .article { grid-template-columns: minmax(0, 1fr); } .toc { display: none; } }

/* steps */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.steps > li { position: relative; counter-increment: s; display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 6px 20px; padding: 26px 0; border-top: 1px solid var(--line); }
.steps > li:last-child { border-bottom: 1px solid var(--line); }
.steps > li::before { content: counter(s, decimal-leading-zero); font: 600 46px/1 var(--mono); letter-spacing: -.06em; color: transparent; -webkit-text-stroke: 1px var(--text-3); grid-row: 1 / span 2; transition: color var(--t-med), -webkit-text-stroke-color var(--t-med); }
.steps > li:hover::before { color: var(--accent); -webkit-text-stroke-color: var(--accent); }
.steps > li > strong { display: block; color: var(--text-1); font-size: 18px; font-weight: 650; line-height: 1.4; }
.steps > li > span { color: var(--text-2); }
.prose .steps > li + li { margin-top: 0; }

/* faq */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: minmax(0, 1fr) 34px; gap: 20px; align-items: center; padding: 24px 0; font: 650 clamp(16px, 1.4vw, 19px)/1.45 var(--sans); color: var(--text-1); transition: color var(--t-fast); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--accent-text); }
.faq summary .pm { position: relative; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-2); color: var(--text-1); transition: transform var(--t-med) var(--ease-out), background var(--t-med), border-color var(--t-med), color var(--t-med); }
.faq summary .pm::before, .faq summary .pm::after { content: ""; position: absolute; left: 50%; top: 50%; width: 11px; height: 1.5px; margin: -.75px 0 0 -5.5px; background: currentColor; border-radius: 1px; }
.faq summary .pm::after { transform: rotate(90deg); transition: transform var(--t-med) var(--ease-out); }
.faq details[open] summary .pm { transform: rotate(180deg); background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.faq details[open] summary .pm::after { transform: rotate(0); }
.faq .ans { padding: 0 54px 26px 0; color: var(--text-2); line-height: 1.85; max-width: 46em; }
.faq-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.6fr); gap: clamp(24px, 5vw, 80px); align-items: start; }
.faq-grid .t-h2 { position: sticky; top: 112px; }
@media (max-width: 900px) { .faq-grid { grid-template-columns: minmax(0, 1fr); } .faq-grid .t-h2 { position: static; } }

/* affiliate CTA */
.cta { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px; padding: clamp(24px, 3vw, 40px); border-radius: var(--r-lg); overflow: hidden;
  background: radial-gradient(90% 140% at 100% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%), var(--surface); border: 1px solid var(--line); }
.cta .t { font: 900 clamp(20px, 2vw, 26px)/1.3 var(--display); letter-spacing: -.01em; }
.cta .n { margin-top: 10px; font-size: 13px; color: var(--text-3); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; line-height: 1.6; }
.sponsor { font: 600 10px/1 var(--mono); letter-spacing: .14em; color: var(--text-2); border: 1px solid var(--line-2); padding: 4px 7px; border-radius: 999px; flex: none; }
.cta-off { padding: 16px 20px; border-radius: var(--r-md); border: 1px dashed var(--line-2); color: var(--text-3); font-size: 14px; }
.ctas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 760px) { .cta { grid-template-columns: minmax(0, 1fr); } .ctas { grid-template-columns: minmax(0, 1fr); } }

/* zone distribution bars & history */
.zbars { list-style: none; margin: 0; padding: 0; }
.zbars li { display: grid; grid-template-columns: 104px minmax(0, 1fr) 56px; align-items: center; gap: 14px; padding: 13px clamp(16px, 2vw, 24px); border-bottom: 1px solid var(--line); font-size: 14px; }
.zbars li:last-child { border-bottom: 0; }
.zbars .bar { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.zbars .bar i { display: block; height: 100%; width: var(--w); background: var(--c); border-radius: 3px; transform-origin: left; }
.zbars .pc { font: 500 13px/1 var(--mono); text-align: right; }
.zbars .rg { display: block; font: 400 11px/1 var(--mono); color: var(--text-3); margin-top: 5px; }
.hist { list-style: none; margin: 0; padding: 0; }
.hist li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 15px clamp(16px, 2vw, 24px); border-bottom: 1px solid var(--line); }
.hist li:last-child { border-bottom: 0; }
.hist .d { font: 400 12px/1 var(--mono); color: var(--text-3); margin-left: 8px; }
.hist .v { font: 500 17px/1 var(--mono); letter-spacing: -.02em; }

/* error pages */
.err { min-height: 60vh; display: flex; flex-direction: column; justify-content: center; padding-block: 64px 0; }
.err .readout { color: var(--accent); }
.err .acts { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 36px; }

/* ---------- footer ---------- */
.ftr { margin-top: var(--sec-gap); border-top: 1px solid var(--line); background: var(--bg-2); overflow: hidden; }
.ftr-top { display: grid; grid-template-columns: minmax(0, 1.3fr) repeat(4, minmax(0, 1fr)); gap: 40px; padding-top: clamp(48px, 6vw, 88px); }
.ftr-claim { margin: 0; font: 900 clamp(26px, 2.6vw, 38px)/1.15 var(--display); letter-spacing: -.02em; }
.ftr-claim .serif { display: block; font-size: 1.12em; color: var(--text-3); margin-bottom: 4px; }
.ftr h4 { margin: 0 0 16px; }
.ftr ul { list-style: none; margin: 0; padding: 0; }
.ftr li + li { margin-top: 10px; }
.ftr li a { font-size: 14px; color: var(--text-2); transition: color var(--t-fast); }
.ftr li a:hover { color: var(--accent-text); }
.ftr-mark { display: block; margin: clamp(40px, 6vw, 88px) 0 0; font: 900 clamp(120px, 31vw, 470px)/.8 var(--display); letter-spacing: -.06em; color: var(--wordmark); user-select: none; white-space: nowrap; transition: color 1.2s var(--ease-out); transform: translateY(.07em); }
.ftr-mark:hover { color: color-mix(in srgb, var(--accent) 26%, var(--wordmark)); }
.ftr-legal-wrap { border-top: 1px solid var(--line); position: relative; background: var(--bg-2); }
.ftr-legal { display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; padding-block: 24px 32px; font-size: 12.5px; color: var(--text-3); line-height: 1.7; position: relative; background: var(--bg-2); }
.ftr-legal p { margin: 0; max-width: 64em; }
.ftr-legal a { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 1080px) { .ftr-top { grid-template-columns: repeat(4, minmax(0, 1fr)); } .ftr-claim { grid-column: 1 / -1; } }
@media (max-width: 860px) { .ftr-top { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }

/* ---------- motion: reveal ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); transition-delay: calc(var(--i, 0) * 70ms); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
.js [data-reveal] .needle { left: var(--x0, 50%); transition: left 1.3s var(--ease-spring) .3s; }
.js [data-reveal].is-in .needle { left: var(--x); }
.js [data-reveal] .ruler-fill { opacity: 0; transition: opacity .6s var(--ease-out) .9s; }
.js [data-reveal].is-in .ruler-fill { opacity: 1; }
.js [data-reveal] .zbars .bar i { transform: scaleX(0); transition: transform 1.2s var(--ease-out) .25s; }
.js [data-reveal].is-in .zbars .bar i { transform: none; }
.js [data-reveal] .dial .hand { transform: rotate(-90deg); }
.js [data-reveal].is-in .dial .hand { transform: rotate(var(--a)); transition-delay: .25s; }
.js [data-reveal] .segbar i.on { transform: scaleY(1); }
.js [data-reveal].is-in .segbar i.on { transform: scaleY(1.7); transition-delay: .5s; }
.js [data-reveal] .spark path.l { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.6s var(--ease-out) .2s; }
.js [data-reveal].is-in .spark path.l { stroke-dashoffset: 0; }
.js .hero-line { display: block; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; }
.js .hero-line > span { display: block; transform: translateY(108%); transition: transform 1s var(--ease-out); transition-delay: calc(var(--i, 0) * 90ms + 60ms); }
.js .is-in .hero-line > span { transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0ms !important; scroll-behavior: auto !important; }
  .tape-track { animation: none; }
  .tape { overflow-x: auto; }
}

/* ---------- page-specific ---------- */
.stack > * + * { margin-top: clamp(16px, 2vw, 24px); }
.plan .t td, .plan .t th { padding-block: 13px; }
.rb-label { margin: clamp(22px, 3vw, 40px) 0 clamp(20px, 2.4vw, 32px); }
.rb-bar { margin-bottom: clamp(32px, 4vw, 56px); }
.rb-bar .segbar { height: 18px; gap: 4px; }
.rb-bar .segbar i { border-radius: 3px; }
.js [data-reveal].is-in .rb-bar .segbar i.on, .rb-bar .segbar i.on { transform: scaleY(1.45); }
.fng-main { align-items: center; text-align: center; }
.fng-main .hh-top { width: 100%; text-align: left; }
.fng-main .dial { margin-top: clamp(16px, 2vw, 28px); max-width: 460px; }
.conv .field + .conv-swap + .field { margin-top: 0; }
.conv-t td { padding: 11px 0; font-size: 14px; }
.conv-t td.r { color: var(--text-2); }
.pick { list-style: none; margin: 18px 0 0; padding: 0; }
.pick li { position: relative; padding: 12px 0 12px 26px; border-top: 1px solid var(--line); color: var(--text-2); line-height: 1.7; }
.pick li::before { content: ""; position: absolute; left: 2px; top: 22px; width: 10px; height: 2px; background: var(--accent); }
.prose .alert { font-size: 14px; }
.prose .steps { margin-top: 1.4em; }
.t-h1 .dim, .t-h2 .dim { color: var(--text-3); }
.cmp td:first-child { color: var(--text-2); }
.cmp th:not(:first-child), .cmp td:not(:first-child) { min-width: 15em; }

/* ---------- focus & touch refinements ---------- */
.module:focus-visible, .inst:focus-visible, .irow:focus-visible, .fxl a:focus-visible { outline-offset: -2px; border-radius: inherit; }
.irow:focus-visible, .fxl a:focus-visible { border-radius: var(--r-sm); }
@media (hover: none) {
  .inst:hover { transform: none; }
  .module:hover .ico { transform: none; }
  .irow:hover .tt { transform: none; }
}

/* ---------- home hero readout + C2C side figures ---------- */
.hh-read { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: clamp(20px, 3vw, 44px); }
.bs { margin: 0 0 .5em; display: grid; gap: 16px; padding-left: clamp(18px, 2vw, 28px); border-left: 1px solid var(--line); }
.bs div { display: grid; gap: 6px; }
.bs dd { margin: 0; font: 500 clamp(18px, 1.7vw, 24px)/1 var(--mono); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  .hh-read { grid-template-columns: minmax(0, 1fr); }
  .bs { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 16px 0 0; border-left: 0; border-top: 1px solid var(--line); margin: 6px 0 0; }
  .bs dd { font-size: 17px; }
}

/* ---------- page transitions (same-origin navigations) ---------- */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  .hdr { view-transition-name: hdr; }
  .tape { view-transition-name: tape; }
  ::view-transition-old(root) { animation: vt-out .22s var(--ease-io) both; }
  ::view-transition-new(root) { animation: vt-in .5s var(--ease-out) both; }
  @keyframes vt-out { to { opacity: 0; transform: translateY(-8px); } }
  @keyframes vt-in { from { opacity: 0; transform: translateY(12px); } }
}
html { scrollbar-color: var(--line-2) var(--bg); }

/* ---------- answer-first summaries & guide blocks ---------- */
.answer { margin: 22px 0 0; max-width: 46em; padding: 14px 18px; border-left: 2px solid var(--accent); background: var(--accent-soft); border-radius: 0 var(--r-md) var(--r-md) 0; color: var(--text-1); font-size: clamp(15px, 1.2vw, 17px); line-height: 1.7; }
.guide-p { margin: 12px 0 0; color: var(--text-2); line-height: 1.8; }
a.ul { color: var(--text-1); background: linear-gradient(var(--accent), var(--accent)) left bottom / 100% 1px no-repeat; padding-bottom: 1px; }
a.ul:hover { color: var(--accent-text); }
.datatbl td.wrapc { min-width: 10em; }
.label.stale { color: var(--warn); }
.best { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.best > div { display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; gap: 6px 12px; padding: 16px clamp(18px, 2.2vw, 28px); }
.best > div + div { border-left: 1px solid var(--line); }
.best .label { grid-column: 1 / -1; }
.best b { font-weight: 600; }
.best .num { font: 500 20px/1 var(--mono); letter-spacing: -.02em; }
@media (max-width: 640px) { .best { grid-template-columns: minmax(0, 1fr); } .best > div + div { border-left: 0; border-top: 1px solid var(--line); } }

/* ---------- calculator sharing & quick fill ---------- */
.field { position: relative; }
.fill { position: absolute; top: -3px; right: 0; height: 24px; padding: 0 9px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text-2); font: 500 11px/1 var(--mono); cursor: pointer; transition: border-color var(--t-fast), color var(--t-fast), transform var(--t-fast) var(--ease-out); }
.fill:hover { border-color: var(--accent); color: var(--accent-text); }
.fill:active { transform: scale(.96); }
.share-btn { display: flex; width: 100%; align-items: center; justify-content: center; gap: 8px; height: 40px; margin-top: 18px; border-radius: 999px; border: 1px solid var(--screen-line); background: rgba(255,255,255,.03); color: var(--screen-text-2); font: 500 13px/1 var(--sans); cursor: pointer; transition: border-color var(--t-fast), color var(--t-fast), background var(--t-fast); }
.share-btn:hover { border-color: #ff6a1f; color: #ff8a4c; }
.share-btn.done { border-color: #3ad17f; color: #3ad17f; }

/* featured full-width module (keeps the 3-column grid complete with 7 tools) */
.module.wide { grid-column: 1 / -1; min-height: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.1fr); grid-template-rows: auto auto; column-gap: clamp(20px, 3vw, 48px); row-gap: 10px; align-items: center; }
.module.wide .module-top { grid-row: 1 / span 2; }
.module.wide .module-top .idx { display: none; }
.module.wide .ico { width: 64px; height: 64px; }
.module.wide .nm { margin-top: 0; font-size: clamp(24px, 2.4vw, 32px); }
.module.wide .ds { grid-column: 2; }
.module.wide .fx { grid-column: 3; grid-row: 1 / span 2; border-top: 0; border-left: 1px dashed var(--line-2); padding: 0 0 0 clamp(20px, 3vw, 40px); font-size: 13px; }
.module.wide .fx::before { content: attr(data-note); display: block; margin-bottom: 8px; font-family: var(--sans); color: var(--text-2); font-size: 14px; }
@media (max-width: 900px) { .module.wide { grid-template-columns: auto minmax(0, 1fr); } .module.wide .fx { grid-column: 1 / -1; grid-row: auto; border-left: 0; border-top: 1px dashed var(--line-2); padding: 14px 0 0; } }
@media (max-width: 600px) { .module.wide { display: flex; } }
input[type="date"] { font-size: 15px; }
input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(.55); cursor: pointer; }
.screen .sub-h { margin: 22px 0 4px; padding-top: 18px; border-top: 1px solid var(--screen-line); }
.screen .sub-h .label { color: #3ad17f; }
.fxl .px .sym { margin-right: .22em; font-size: .62em; font-weight: 400; color: var(--text-3); letter-spacing: 0; vertical-align: .14em; }

/* ---------- long-form article furniture ---------- */
.artmeta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 22px; font: 500 12.5px/1.4 var(--mono); color: var(--text-3); }
.artmeta b { color: var(--text-2); font-weight: 500; }
.keypoints { margin-bottom: 2.2em; padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.prose > .alert + .keypoints { margin-top: 1.6em; }
.keypoints .label { display: block; margin-bottom: 12px; color: var(--accent-text); }
.keypoints ul { margin: 0; padding-left: 1.2em; }
.keypoints li { color: var(--text-1); }
.keypoints li + li { margin-top: .45em; }
.diagram { margin: 1.6em 0; padding: 18px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.diagram svg { width: 100%; height: auto; overflow: visible; }
@media (max-width: 640px) {
  /* keep labels legible on phones: scroll the drawing instead of shrinking it */
  .diagram { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .diagram svg { min-width: 600px; }
  .diagram figcaption { position: sticky; left: 0; max-width: calc(100vw - 70px); }
}
.diagram figcaption { margin-top: 10px; font-size: 13px; color: var(--text-3); line-height: 1.6; }
.diagram .gl { stroke: var(--line-2); stroke-width: 1; }
.diagram .gt { fill: var(--text-3); font: 500 11px var(--mono); }
.diagram .path { fill: none; stroke: var(--text-1); stroke-width: 2; stroke-linejoin: round; }
.diagram .buy { fill: var(--series-2); }
.diagram .sell { fill: var(--accent); }
.diagram .box { fill: var(--surface-2); stroke: var(--line-2); }
.diagram .bt { fill: var(--text-1); font: 600 13px var(--sans); }
.diagram .bs { fill: var(--text-3); font: 400 11.5px var(--sans); }
.diagram .arw { stroke: var(--accent); stroke-width: 1.6; fill: none; marker-end: url(#ah); }
.diagram .ahd { fill: var(--accent); }
.legend-inline { display: inline-flex; align-items: center; gap: 6px; margin-right: 14px; }
.legend-inline i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.prose .callout { padding: 14px 18px; border-left: 2px solid var(--line-2); background: var(--surface); border-radius: 0 var(--r-md) var(--r-md) 0; color: var(--text-2); }
