/* Desk — trading UI in the Variational register, type from extended.exchange.
   Hairline-bordered panels, one blue accent, Inter (Display cut for headings), Geist Mono for every figure.
   Two themes: dark (default) and light. The theme follows the OS until the user picks one;
   the pick is a cookie the server echoes as <html data-theme>, so there is no flash on load.
   Every colour lives in the tokens below — no raw colours further down. */

:root {
  --bg: #010612;
  --surface: #050b1a;
  --surface-2: #0a1224;
  --border: rgba(255, 255, 255, .08);
  --border-strong: #1f2938;
  --text: #ffffff;
  --text-2: #a0aec0;
  --text-3: #7d8aa0;
  --accent: #4c9af8;
  --accent-soft: rgba(76, 154, 248, .12);
  --up: #34d399;
  --down: #f87171;
  --up-soft: rgba(52, 211, 153, .12);
  --down-soft: rgba(248, 113, 113, .12);
  --warn: #f5b84a;
  --shadow: 0 1px 0 rgba(255, 255, 255, .02) inset;
  --nav: rgba(1, 6, 18, .82);
  --tint: rgba(255, 255, 255, .025);    /* row hover */
  --tint-2: rgba(255, 255, 255, .06);   /* tracks, gridlines */
  --tint-3: rgba(255, 255, 255, .07);
  --accent-line: rgba(76, 154, 248, .45);
  --accent-ring: rgba(76, 154, 248, .25);
  --warn-soft: rgba(245, 184, 74, .1);
  --warn-ring: rgba(245, 184, 74, .25);
  --ref: #a78bfa;                       /* reference lines: average entry, period average */
  --dots: rgba(120, 140, 255, .55);
  --glow: rgba(110, 86, 255, .22);
  --glow-2: rgba(76, 154, 248, .10);
  --pop-shadow: 0 18px 40px -12px rgba(0, 0, 0, .7);
  --on-tag: #010612;

  --f: "Inter", system-ui, -apple-system, sans-serif;
  --f-display: "Inter", system-ui, sans-serif;  /* with opsz 32 = Inter Display */
  --gut: clamp(16px, 3vw, 40px);
  --r: 12px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f5f6f8;
    --surface: #ffffff;
    --surface-2: #f0f2f5;
    --border: rgba(12, 20, 38, .09);
    --border-strong: #d6dbe3;
    --text: #0b1220;
    --text-2: #4a5568;
    --text-3: #687385;
    --accent: #1f6fe0;
    --accent-soft: rgba(31, 111, 224, .09);
    --up: #059669;
    --down: #dc2626;
    --up-soft: rgba(5, 150, 105, .10);
    --down-soft: rgba(220, 38, 38, .08);
    --warn: #b26b00;
    --shadow: 0 1px 2px rgba(16, 24, 40, .04);
    --nav: rgba(245, 246, 248, .85);
    --tint: rgba(12, 20, 38, .025);
    --tint-2: rgba(12, 20, 38, .06);
    --tint-3: rgba(12, 20, 38, .07);
    --accent-line: rgba(31, 111, 224, .4);
    --accent-ring: rgba(31, 111, 224, .25);
    --warn-soft: rgba(178, 107, 0, .08);
    --warn-ring: rgba(178, 107, 0, .25);
    --ref: #7c3aed;
    --dots: rgba(31, 111, 224, .28);
    --glow: rgba(110, 86, 255, .10);
    --glow-2: rgba(31, 111, 224, .06);
    --pop-shadow: 0 18px 40px -16px rgba(16, 24, 40, .22);
    --on-tag: #ffffff;
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f0f2f5;
  --border: rgba(12, 20, 38, .09);
  --border-strong: #d6dbe3;
  --text: #0b1220;
  --text-2: #4a5568;
  --text-3: #687385;
  --accent: #1f6fe0;
  --accent-soft: rgba(31, 111, 224, .09);
  --up: #059669;
  --down: #dc2626;
  --up-soft: rgba(5, 150, 105, .10);
  --down-soft: rgba(220, 38, 38, .08);
  --warn: #b26b00;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04);
  --nav: rgba(245, 246, 248, .85);
  --tint: rgba(12, 20, 38, .025);
  --tint-2: rgba(12, 20, 38, .06);
  --tint-3: rgba(12, 20, 38, .07);
  --accent-line: rgba(31, 111, 224, .4);
  --accent-ring: rgba(31, 111, 224, .25);
  --warn-soft: rgba(178, 107, 0, .08);
  --warn-ring: rgba(178, 107, 0, .25);
  --ref: #7c3aed;
  --dots: rgba(31, 111, 224, .28);
  --glow: rgba(110, 86, 255, .10);
  --glow-2: rgba(31, 111, 224, .06);
  --pop-shadow: 0 18px 40px -16px rgba(16, 24, 40, .22);
  --on-tag: #ffffff;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font: 14.5px/1.5 var(--f); font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
.src-link { color: inherit; text-decoration: underline; text-decoration-color: var(--accent-line); text-underline-offset: 2px; }
.src-link:hover { color: var(--accent); text-decoration-color: currentColor; }
code { font: 12.5px/1.4 ui-monospace, "SF Mono", Menlo, monospace; background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.figure { font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.tone[data-tone="down"] { color: var(--down); }
.tone[data-tone="up"] { color: var(--up); }

@keyframes tick { from { background: var(--accent-soft); } to { background: transparent; } }
.is-flash { animation: tick 1.2s var(--ease); border-radius: 4px; }
@media (prefers-reduced-motion: reduce) { .is-flash { animation: none; } }

/* ---------- top bar ---------- */
.masthead { background: var(--nav); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.masthead__row { display: flex; align-items: center; gap: 24px; max-width: 1360px; margin: 0 auto; padding: 12px var(--gut) 0; }
.wordmark { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.wordmark__seal { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--text); color: var(--bg); font: 700 14px/1 var(--f); }
.wordmark__text { font-weight: 650; font-size: 16px; letter-spacing: -.01em; }
.tape { display: flex; gap: 18px; flex: 1; min-width: 0; overflow: hidden; font-size: 13px; color: var(--text-2); }
.tape__item { display: inline-flex; gap: 6px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tape__item b { color: var(--text); font-weight: 600; }
.freshness { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-2); white-space: nowrap; }
.freshness__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--up); }
.freshness__note { color: var(--text-3); }
.freshness.is-offline .freshness__dot { background: var(--warn); }
.account { position: relative; }
.theme-toggle { display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0; color: var(--text-2); background: transparent; border: 1px solid var(--border-strong); border-radius: 8px; cursor: pointer; transition: color .15s, background .15s; }
.theme-toggle:hover { color: var(--text); background: var(--surface-2); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-toggle__moon { display: none; }
:root[data-theme="light"] .theme-toggle__sun { display: none; }
:root[data-theme="light"] .theme-toggle__moon { display: block; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme-toggle__sun { display: none; }
  :root:not([data-theme="dark"]) .theme-toggle__moon { display: block; }
}
.account summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 8px; font-size: 13.5px; color: var(--text-2); border: 1px solid var(--border); }
.account summary::-webkit-details-marker { display: none; }
.account summary:hover { background: var(--surface-2); color: var(--text); }
.account__menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; width: 230px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 8px; box-shadow: 0 12px 32px -8px rgba(0, 0, 0, .18); }
.account__role { margin: 4px 8px 10px; font-size: 12.5px; color: var(--text-2); }
.account__logout { margin-top: 6px; width: 100%; text-align: left; padding: 7px 8px; font: inherit; font-size: 13.5px; color: var(--down); background: none; border: 0; border-top: 1px solid var(--border); border-radius: 0 0 6px 6px; cursor: pointer; }
.account__logout:hover { background: var(--down-soft); }
.tabs { display: flex; gap: 2px; max-width: 1360px; margin: 0 auto; padding: 6px var(--gut) 0; overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 10px 12px 11px; font-size: 14px; font-weight: 500; text-decoration: none; color: var(--text-2); border-bottom: 2px solid transparent; white-space: nowrap; transition: color .15s; }
.tabs a:hover { color: var(--text); }
.tabs a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }

/* ---------- page ---------- */
.page { max-width: 1360px; margin: 0 auto; padding: 28px var(--gut) 80px; }
.page-h { font-size: 24px; font-weight: 650; letter-spacing: -.02em; margin: 0 0 20px; }
.section-h { font-size: 14px; font-weight: 600; margin: 0 0 14px; letter-spacing: -.005em; }
.empty { color: var(--text-2); margin: 0; max-width: 62ch; }
.notice { color: var(--warn); font-size: 13.5px; margin: 8px 0 0; }
.more { display: inline-block; margin-top: 12px; font-size: 13.5px; font-weight: 500; color: var(--accent); text-decoration: none; }
.more:hover { text-decoration: underline; }

.stamp { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 550; padding: 3px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.stamp--stage-watch { background: rgba(154, 98, 0, .1); color: var(--warn); }
.stamp--stage-closed { background: var(--surface-2); color: var(--text-2); }
.stamp--fired { background: var(--down-soft); color: var(--down); }
.stamp--rule { background: var(--surface-2); color: var(--text-2); }
.stamp--date { background: transparent; color: var(--text-2); padding: 0; font-weight: 400; font-variant-numeric: tabular-nums; }
.stamp__k { font-weight: 400; }
.stamp--date .stamp__k:first-child { display: none; }
.stamp--date .stamp__k:last-child::before { content: "· "; }
.tag { font-size: 12px; font-weight: 500; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); }

/* ---------- surfaces ---------- */
.balance, .panel, .statement, .figures, .sheet__head, .memo, .index__list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow); }
.balance { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px 48px; padding: 28px; margin-bottom: 24px; }
.balance__label { font-size: 13.5px; font-weight: 500; color: var(--text-2); margin: 0 0 8px; }
.balance__value { font-size: clamp(38px, 5vw, 56px); font-weight: 650; line-height: 1; margin: 0; letter-spacing: -.035em; }
.balance__result { margin: 12px 0 0; color: var(--text-2); }
.balance__result .tone { font-weight: 600; }
.balance__facts { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 24px; margin: 0; align-self: center; }
.balance__facts dt { font-size: 12.5px; color: var(--text-2); }
.balance__facts dd { margin: 3px 0 0; font-size: 19px; font-weight: 600; }
.meter { grid-column: 1 / -1; position: relative; height: 8px; border-radius: 99px; background: var(--surface-2); margin-top: 18px; }
.meter__fill { position: absolute; inset: 0 auto 0 0; width: var(--p); background: var(--accent); border-radius: inherit; transform-origin: left; animation: grow .8s var(--ease) both; }
@keyframes grow { from { transform: scaleX(0); } }
@media (prefers-reduced-motion: reduce) { .meter__fill { animation: none; } }
.meter__label { position: absolute; right: 0; top: -22px; font-size: 12.5px; color: var(--text-2); }

.table-wrap { overflow-x: auto; border-radius: var(--r); }
.statement { width: 100%; border-collapse: separate; border-spacing: 0; overflow: hidden; }
.statement th, .statement td { padding: 13px 16px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--border); }
.statement tbody tr:last-child > * { border-bottom: 0; }
.statement thead th { font-size: 12px; font-weight: 500; color: var(--text-2); background: var(--surface-2); white-space: nowrap; }
.statement .num { text-align: right; white-space: nowrap; }
.statement small { font-size: 12.5px; }
.statement tbody tr:hover > * { background: var(--surface-2); }
.statement tr.is-muted > * { color: var(--text-3); }
.asset-link { text-decoration: none; display: grid; gap: 1px; }
.asset-link b { font-weight: 600; }
.asset-link span { font-size: 12.5px; color: var(--text-2); font-weight: 400; }
.row-note { display: block; font-size: 12.5px; color: var(--text-2); margin-top: 2px; max-width: 46ch; }
.entries { margin-bottom: 24px; }
.entries .section-h { margin-left: 2px; }

.split { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.split--wide { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
.stack { display: grid; gap: 24px; }
.panel { padding: 22px; min-width: 0; }
.sheet > .panel { margin-top: 24px; }
.sheet > .panel > .table-wrap .statement { box-shadow: none; }

/* ---------- chart ---------- */
.chart { margin: 0; padding-right: 64px; }
.chart__plot { position: relative; height: 220px; margin-bottom: 26px; }
.chart svg { width: 100%; height: 100%; display: block; overflow: visible; }
.chart__day { stroke: var(--border); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart__area { fill: var(--accent); opacity: .08; }
.chart__line { fill: none; stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.chart__avg { stroke: var(--text-2); stroke-width: 1; stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }
.chart__tag { position: absolute; top: var(--y); font-size: 11.5px; font-weight: 500; padding: 2px 7px; border-radius: 6px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.chart__tag--avg { left: 6px; transform: translateY(-130%); color: var(--text-2); background: var(--surface); }
.chart__tag--last { right: -6px; transform: translate(100%, -50%); background: var(--up); color: #fff; }
.chart__tag--last.is-below { background: var(--down); }
.chart__daylabel { position: absolute; left: var(--x); bottom: -20px; transform: translateX(-50%); font-size: 11.5px; color: var(--text-3); }
.chart__cap { font-size: 12.5px; color: var(--text-2); }

.source { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 14px 0 0; font-size: 12.5px; color: var(--text-2); }
.source__warn { display: none; flex-basis: 100%; color: var(--down); font-weight: 500; }
.source.is-stale .source__warn--stale, .source.is-divergent .source__warn--div { display: block; }

.feed { list-style: none; margin: 0; padding: 0; }
.feed__item { padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.feed__item:last-child { border-bottom: 0; }
.feed__item time { display: block; font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.feed__item--alert time { color: var(--down); }
.rules { list-style: none; margin: 0; padding: 0; }
.rules li { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.rules .stamp { margin-left: auto; }
.srcrow { padding: 4px 0 12px; }
.srcrow + .srcrow { border-top: 1px solid var(--border); padding-top: 12px; }

/* ---------- positions ---------- */
.desk-split { display: grid; grid-template-columns: 272px minmax(0, 1fr); gap: 24px; align-items: start; }
.index { position: sticky; top: 112px; }
.filter { display: flex; gap: 2px; padding: 3px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; margin-bottom: 16px; }
.filter a { flex: 1; text-align: center; font-size: 12.5px; font-weight: 500; padding: 6px 4px; border-radius: 7px; text-decoration: none; color: var(--text-2); }
.filter a:hover { color: var(--text); }
.filter a[aria-current] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.index__h { font-size: 11.5px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; margin: 18px 4px 8px; }
.index__list { list-style: none; margin: 0; padding: 4px; }
.index__item { display: grid; grid-template-columns: 1fr auto; gap: 1px 10px; padding: 10px 12px; text-decoration: none; border-radius: 8px; }
.index__item:hover { background: var(--surface-2); }
.index__item[aria-current] { background: var(--accent-soft); }
.index__sym { font-weight: 600; }
.index__sub { grid-column: 1; font-size: 12.5px; color: var(--text-2); }
.index__pnl { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: 13.5px; font-weight: 550; }

.sheet__head { padding: 24px; }
.sheet__tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.sheet__title { font-size: 30px; font-weight: 650; letter-spacing: -.025em; margin: 0 0 8px; }
.sheet__title span { color: var(--text-3); font-weight: 500; font-size: .7em; }
.sheet__quote { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin: 0; }
.sheet__price { font-size: 22px; font-weight: 600; }
.sheet__mkt { font-size: 13.5px; color: var(--text-2); }
.sheet__note { margin: 14px 0 0; font-size: 13px; color: var(--text-2); max-width: 78ch; padding: 10px 12px; background: var(--surface-2); border-radius: 8px; }

.figures { margin-top: 24px; overflow: hidden; }
.figures__lead { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--border); }
.fig { padding: 20px 22px; min-width: 0; }
.fig + .fig { border-left: 1px solid var(--border); }
.fig__k { margin: 0 0 8px; font-size: 12.5px; font-weight: 500; color: var(--text-2); }
.fig__v { margin: 0; font-size: clamp(22px, 2.3vw, 30px); font-weight: 650; line-height: 1.1; letter-spacing: -.03em; }
.fig__s { margin: 6px 0 0; font-size: 12.5px; color: var(--text-2); }
.fig--accent .fig__v { color: var(--accent); }
.figures__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; }
.figures__grid div { padding: 16px 22px; }
.figures__grid div:nth-child(n + 4) { border-top: 1px solid var(--border); }
.figures__grid div:not(:nth-child(3n + 1)) { border-left: 1px solid var(--border); }
.figures__grid dt { font-size: 12.5px; color: var(--text-2); }
.figures__grid dd { margin: 3px 0 0; font-size: 17px; font-weight: 600; }
.figures__grid dd.fig__s { font-size: 12px; font-weight: 400; }

.memos { display: grid; gap: 16px; max-width: 80ch; }
.memo { padding: 22px 24px; }
.panel .memo { box-shadow: none; padding: 16px 0; border: 0; border-top: 1px solid var(--border); border-radius: 0; }
.memo h2, .memo h3 { font-size: 18px; font-weight: 600; margin: 0 0 4px; letter-spacing: -.01em; }
.memo__meta { margin: 0 0 12px; font-size: 12.5px; color: var(--text-3); }
.memo__body { white-space: pre-line; line-height: 1.65; }

/* ---------- login ---------- */
body.is-login { display: grid; place-items: center; }
body.is-login .page { width: 100%; padding: 40px 16px; }
.cover { max-width: 360px; margin: 0 auto; }
.cover__emboss { width: 40px; height: 40px; border-radius: 11px; background: var(--text); color: var(--bg); display: grid; place-items: center; margin-bottom: 20px; }
.cover__seal { font-weight: 700; font-size: 19px; }
.cover__title { font-size: 24px; font-weight: 650; letter-spacing: -.02em; margin: 0; }
.cover__sub { margin: 4px 0 24px; color: var(--text-2); }
.cover__form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow); padding: 22px; }
.cover__form label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 14px; }
.cover__form input { display: block; width: 100%; margin-top: 6px; padding: 9px 11px; font: inherit; font-size: 15px; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 8px; transition: border-color .15s, box-shadow .15s; }
.cover__form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.cover__form button { width: 100%; margin-top: 6px; padding: 10px; font: inherit; font-weight: 600; color: #fff; background: var(--accent); border: 0; border-radius: 8px; cursor: pointer; transition: filter .15s; }
.cover__form button:hover { filter: brightness(1.08); }
.cover__form button:active { transform: translateY(1px); }
.form-error { margin: 0 0 14px; padding: 9px 11px; font-size: 13.5px; color: var(--down); background: var(--down-soft); border-radius: 8px; }

@media (max-width: 1100px) {
  .tape { display: none; }
  .masthead__row { justify-content: space-between; }
  .figures__lead { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fig:nth-child(3) { border-left: 0; }
  .fig:nth-child(n + 3) { border-top: 1px solid var(--border); }
}
@media (max-width: 900px) {
  .balance, .split, .split--wide { grid-template-columns: 1fr; }
  .desk-split { grid-template-columns: 1fr; }
  .index { position: static; }
  .index__list { display: flex; gap: 6px; overflow-x: auto; }
  .index__item { min-width: 200px; }
  .figures__grid { grid-template-columns: 1fr 1fr; }
  .figures__grid div { border-left: 0 !important; border-top: 1px solid var(--border); }
  .figures__grid div:nth-child(even) { border-left: 1px solid var(--border) !important; }
}
@media (max-width: 600px) {
  .masthead__row { gap: 12px; padding: 10px 16px 0; }
  .freshness__note { display: none; }
  .tabs { padding: 4px 8px 0; }
  .page { padding: 18px 16px 64px; }
  .balance { padding: 20px; }
  .figures__lead { grid-template-columns: 1fr; }
  .fig + .fig { border-left: 0; border-top: 1px solid var(--border); }
  .chart { padding-right: 0; }
  .chart__tag--last { right: 0; transform: translate(0, -150%); }
  .panel { padding: 16px; }
  .account__name { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* fixes after first inspection */
.sheet { min-width: 0; }
.row-note { min-width: 26ch; }
.filter a { white-space: nowrap; padding: 6px 2px; font-size: 12px; }
@media (max-width: 900px) { .desk-split { grid-template-columns: minmax(0, 1fr); } }
code { white-space: normal; overflow-wrap: anywhere; } .empty { overflow-wrap: anywhere; }

/* figures: monospaced (Geist Mono, as on extended.exchange) */
:root { --f-fig: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace; }
.figure, .tape__item span, .chart__tag, .chart__daylabel, .feed__item time, .memo__meta, .meter__label {
  font-family: var(--f-fig); font-weight: 400; letter-spacing: -.02em;
  font-feature-settings: "ss09";  /* plain zero, no slash — as on extended.exchange */
}
.balance__value { letter-spacing: -.05em; }
.fig__v { letter-spacing: -.04em; }
.balance__value, .fig__v.figure, .sheet__price.figure { font-weight: 500; }
.wordmark__text, .cover__title, .page-h, .section-h, .sheet__title, .memo h2, .memo h3, .balance__label, .cover__seal, .wordmark__seal {
  font-variation-settings: "opsz" 32;
}


/* ---------- Variational register ---------- */
.masthead { backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.wordmark__seal { background: transparent; color: var(--accent); border: 1.5px solid var(--accent); font-family: var(--f-display); font-weight: 500; }
.wordmark__text, .cover__title { font-family: var(--f-display); font-weight: 600; letter-spacing: -.02em; }
.page-h { font-family: var(--f-display); font-weight: 600; font-size: 30px; letter-spacing: -.02em; }
.section-h { font-family: var(--f-display); font-weight: 600; font-size: 16px; letter-spacing: -.01em; }
.sheet__title { font-family: var(--f-display); font-weight: 600; font-size: 34px; letter-spacing: -.02em; }
.memo h2, .memo h3 { font-family: var(--f-display); font-weight: 500; }
.tabs a[aria-current="page"] { border-bottom-color: var(--accent); }

/* hero balance: dotted wave field behind the number, like the protocol's landing */
.balance { position: relative; overflow: hidden; isolation: isolate; padding: 36px; }
.balance::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(circle at center, var(--dots) 1px, transparent 1.6px);
  background-size: 14px 14px;
  -webkit-mask-image: radial-gradient(120% 70% at 85% 120%, #000 0%, rgba(0, 0, 0, .35) 45%, transparent 70%);
          mask-image: radial-gradient(120% 70% at 85% 120%, #000 0%, rgba(0, 0, 0, .35) 45%, transparent 70%);
}
.balance::after {
  content: ""; position: absolute; inset: auto -10% -60% 20%; height: 120%; z-index: -2; pointer-events: none;
  background: radial-gradient(closest-side, var(--glow), var(--glow-2) 55%, transparent);
}
.balance__label { color: var(--accent); font-family: var(--f-display); font-weight: 400; font-size: 15px; }
.balance__value { font-size: clamp(44px, 6vw, 76px); }
.meter { background: var(--tint-2); }
.meter__fill { background: linear-gradient(90deg, #7c6cff, var(--accent)); }

.stamp { background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent-ring); border-radius: 6px; }
.stamp--stage-watch { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-ring); }
.stamp--date { border: 0; background: transparent; }
.tag { background: transparent; border-color: var(--border-strong); border-radius: 6px; }

.statement thead th { background: var(--surface-2); color: var(--text-3); }
.statement tbody tr:hover > * { background: var(--tint); }
.index__item[aria-current] { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent-ring); }
.filter a[aria-current] { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border-strong); }
.fig--accent .fig__v { color: var(--accent); }

.chart__area { fill: var(--accent); opacity: .12; }
.chart__day { stroke: var(--tint-2); }
.chart__avg { stroke: var(--ref); }
.chart__tag--avg { color: var(--ref); background: var(--surface); }
.chart__tag--last { color: var(--on-tag); }

code { background: var(--surface-2); border-color: var(--border-strong); color: var(--text-2); }
.account__menu { background: var(--surface-2); border-color: var(--border-strong); box-shadow: var(--pop-shadow); }

/* login */
body.is-login { background:
  radial-gradient(60% 50% at 50% 110%, var(--glow), transparent 70%),
  var(--bg); }
.cover__emboss { background: transparent; border: 1.5px solid var(--accent); color: var(--accent); }
.cover__seal { font-family: var(--f-display); font-weight: 500; }
.cover__form input { background: var(--bg); border-color: var(--border-strong); }
.cover__form button { background: var(--accent); border-radius: 6px; }
.asset-link span { white-space: nowrap; }
.statement th[scope="row"] { min-width: 140px; }
.statement--ledger th, .statement--ledger td { padding: 12px 12px; }
.row-note { min-width: 20ch; }

/* ---------- network (PoW) block ---------- */
.net__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin-bottom: 14px; }
.net__head .section-h { margin: 0; }
.net__src { margin: 0; font-size: 12px; color: var(--text-3); }
.net__kpis { display: grid; grid-template-columns: 1.3fr repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; margin-bottom: 22px; }
.kpi { background: var(--surface); padding: 16px 18px; min-width: 0; }
.kpi--lead { background: linear-gradient(180deg, var(--accent-soft), transparent 70%), var(--surface); }
.kpi__k { margin: 0 0 8px; font-size: 12.5px; color: var(--text-2); }
.kpi__v { margin: 0; font-size: 24px; line-height: 1.1; letter-spacing: -.03em; }
.kpi__v small { font-size: 12px; color: var(--text-3); letter-spacing: 0; font-family: var(--f); }
.kpi__s { margin: 6px 0 0; font-size: 12.5px; color: var(--text-2); }
.kpi__deltas { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 2px; font-size: 12.5px; color: var(--text-2); }
.net__facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 6px 0 22px; border-top: 1px solid var(--border); }
.net__facts div { padding: 14px 16px 14px 0; border-bottom: 1px solid var(--border); min-width: 0; }
.net__facts dt { font-size: 12.5px; color: var(--text-2); }
.net__facts dd { margin: 3px 0 0; font-size: 16px; }
.net__facts dd.fig__s { font-size: 12px; margin-top: 2px; }
.net__facts .is-risk dd:not(.fig__s) { color: var(--warn); }
.net__facts .is-risk .fig__s { color: var(--warn); }
.share { display: inline-flex; align-items: center; gap: 8px; min-width: 120px; }
.share__bar { position: relative; flex: 0 0 60px; height: 4px; border-radius: 4px; background: var(--tint-3); overflow: hidden; }
.share__bar::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--p); background: var(--accent); border-radius: inherit; }
.statement--pools th[scope="row"] { min-width: 120px; font-weight: 500; }
.digest__reads { list-style: none; margin: 0 0 18px; padding: 14px 18px; display: grid; gap: 6px; border: 1px solid var(--border); border-left: 2px solid var(--accent); border-radius: 10px; background: linear-gradient(90deg, var(--accent-soft), transparent 60%), var(--surface); font-size: 14px; line-height: 1.45; color: var(--text); }
.digest__note { display: block; margin-top: 2px; font-size: 12px; font-weight: 400; color: var(--text-3); }
.statement--digest { margin-bottom: 22px; }
.statement--digest th[scope="row"] { min-width: 180px; }
@media (max-width: 600px) {
  .statement--digest { min-width: 0; width: 100%; }
  .statement--digest thead { display: none; }
  .statement--digest tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
  .statement--digest tr:last-child { border-bottom: 0; }
  .statement--digest th[scope="row"], .statement--digest td { padding: 0; border: 0; min-width: 0; }
  .statement--digest th[scope="row"] { grid-column: 1 / -1; margin-bottom: 4px; }
  .statement--digest td:nth-of-type(odd) { text-align: left; }
  .statement--digest td[data-k]::before { content: attr(data-k) " "; font-family: var(--f); font-size: 12px; color: var(--text-3); }
}
.statement--venues td.is-wide { color: var(--warn); }
.venues__foot { margin-top: 10px; }
.venues__pair { display: none; font-size: 12px; font-weight: 400; color: var(--text-3); }
@media (max-width: 600px) {
  .statement--venues { min-width: 0; width: 100%; }
  .statement--venues .venues__col, .statement--venues .share__bar { display: none; }
  .venues__pair { display: block; }
  .statement--venues .share { min-width: 0; }
  .statement--venues th, .statement--venues td { padding-left: 10px; padding-right: 10px; }
}
.dev__cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 24px; }
.dev__h { margin: 0 0 8px; font-size: 12.5px; font-weight: 500; color: var(--text-2); }
.dev__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 13.5px; }
.dev__list li { min-width: 0; overflow-wrap: anywhere; }
.dev__list span { display: block; font-size: 12px; color: var(--text-3); }
.posts { list-style: none; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.post { min-width: 0; padding: 14px 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.post.is-watched { border-color: var(--accent-line); }
.post__head { margin: 0 0 6px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; font-size: 13.5px; font-weight: 500; }
.post__head span { font-size: 12px; font-weight: 400; color: var(--text-3); }
.post__text { margin: 0; font-size: 13.5px; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.post__meta { margin: 8px 0 0; font-size: 12px; color: var(--text-3); }
@media (max-width: 800px) { .posts { grid-template-columns: 1fr; } }
.brief { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 10px; }
.brief__item { padding: 14px 16px 12px; border: 1px solid var(--border); border-left: 2px solid var(--text-3); border-radius: 10px; background: var(--surface-2); min-width: 0; }
.brief__item[data-tone="up"] { border-left-color: var(--up); }
.brief__item[data-tone="down"] { border-left-color: var(--down); }
.brief__title { margin: 0 0 4px; font-size: 14.5px; font-weight: 600; }
.brief__text { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--text-2); }
.brief__src { margin-top: 8px; }
.brief__src summary { cursor: pointer; width: fit-content; font-size: 12.5px; color: var(--accent); list-style: none; }
.brief__src summary::-webkit-details-marker { display: none; }
.brief__src summary::before { content: "▸ "; }
.brief__src[open] summary::before { content: "▾ "; }
.brief__src--all { margin: 0 0 10px; }
.posts--inline { margin: 10px 0 4px; }
.brief__item .post { background: var(--surface); }
@media (max-width: 800px) { .dev__cols { grid-template-columns: 1fr; } }
@media (max-width: 1100px) { .net__kpis { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .net__kpis { grid-template-columns: 1fr; } .net__facts { grid-template-columns: 1fr 1fr; } }
