/* Bitcoin Pulse styles: Instrument design (Desk layout) */
:root {
    --serif: 'DM Serif Display', Georgia, serif;
    --mono: 'DM Mono', monospace;
    --orange-dim: rgba(247,147,26,0.1);
    --orange-mid: rgba(247,147,26,0.25);
    --ink: #050505;
    --ink-mid: rgba(255,255,255,0.02);
    --ink-light: rgba(255,255,255,0.04);
    --ink-lighter: rgba(255,255,255,0.06);
    --paper: #f5f0e8;
    --paper-dim: #c9c0b0;
    --muted: #888;
    --green: #4ade80;    /* = --color-positive; green only ever means a good number */
    --red: #F87171;
}

/* ═══════════════════════════════════════════════════
   INSTRUMENT DESIGN TOKENS
   MASTER.md palette plus the redesign additions. The muted and dim text
   colors replace the old 0.25 to 0.4 alpha text, which failed contrast.
   ═══════════════════════════════════════════════════ */
:root {
    --color-primary: #f7931a;
    --color-background: #0d0d0d;
    --color-text: #f5f0e8;
    --color-text-muted: #a8a196;
    --color-text-dim: #8a8378;
    --color-positive: #4ade80;
    --color-negative: #f87171;
    --color-card-bg: #151413;
    --color-card-border: #262420;
    --color-divider: #1f1d1b;
    --color-accent-line: #f7931a;
    --color-section-rule: rgba(255,255,255,0.15);
    --color-stale-bg: #111110;
    --color-stale-border: #4a463f;
    /* Fear & Greed zones, extreme fear to extreme greed */
    --fg-extreme-fear: #ef4444;
    --fg-fear: #fb923c;
    --fg-neutral: #a8a196;
    --fg-greed: #86efac;
    --fg-extreme-greed: #22c55e;
    /* Minimum text sizes (phones raise them below) */
    --label-size: 11px;
    --body-size: 13px;
}
@media (max-width: 1023px) {
    :root { --label-size: 12px; --body-size: 14px; }
}

/* Tabular figures everywhere numbers update, so digits don't jiggle */
.dash, .monitor-bar, .compact-bar, .ticker-bar, .pulse-control-bar { font-variant-numeric:tabular-nums; }

/* ── Card anatomy: header (label + freshness), value, change, context ── */
.card-head {
    display:flex; align-items:baseline; justify-content:space-between; gap:8px;
    font-family:var(--mono); font-size:var(--label-size); letter-spacing:0.08em;
    text-transform:uppercase; color:var(--color-text-muted);
}
.card-head .card-label { margin:0; font:inherit; letter-spacing:inherit; color:inherit; }
.card-value {
    font-family:var(--sans); font-size:32px; font-weight:600; line-height:1.05;
    color:var(--color-text); font-variant-numeric:tabular-nums;
}
.card-value .unit { font-size:0.5em; font-weight:500; }
.card-context { font-size:var(--body-size); line-height:1.4; color:var(--color-text-muted); }
/* These lines fill in with the data; hold their line meanwhile so the card doesn't reflow */
#fgContext:empty::before, #feeSend:empty::before { content:'\00a0'; }

/* ── Freshness label (written by the freshness registry every 5s) ── */
.fresh {
    font-family:var(--mono); font-size:var(--label-size); font-weight:400;
    letter-spacing:0.04em; text-transform:none; white-space:nowrap;
    color:var(--color-text-dim); font-variant-numeric:tabular-nums;
}
.fresh.fresh-stale { color:var(--color-primary); text-transform:uppercase; letter-spacing:0.08em; }

/* ── Change tokens: arrow + sign + color, so direction reads without color ── */
.chg { font-weight:500; white-space:nowrap; font-variant-numeric:tabular-nums; }
.chg-up { color:var(--color-positive); }
.chg-down { color:var(--color-negative); }
.chg-flat { color:var(--color-text-muted); }
.chg-pill { display:inline-flex; align-items:center; padding:6px 12px; border-radius:8px; }
.chg-pill.chg-up { background:rgba(74,222,128,0.10); }
.chg-pill.chg-down { background:rgba(248,113,113,0.10); }
.chg-pill.chg-flat { background:var(--color-divider); }

/* ── Card states ──
   Live: no class. Loading: .is-loading (values show .skel blocks).
   Just updated: .just-updated, 0.8s orange outline. Stale: .is-stale.
   Source down: .is-down, message plus a Retry button. */
.just-updated { animation:justUpdated 0.8s ease-out; }
.just-updated .fresh { color:var(--color-primary); }
@keyframes justUpdated {
    0%, 45% { outline:1px solid rgba(247,147,26,1); outline-offset:-1px; box-shadow:0 0 0 3px rgba(247,147,26,0.18); }
    100%    { outline:1px solid rgba(247,147,26,0); outline-offset:-1px; box-shadow:0 0 0 3px rgba(247,147,26,0); }
}
@media (prefers-reduced-motion: reduce) {
    .just-updated { animation:none; }
    .just-updated .fresh { color:var(--color-text-dim); }
}

[data-feed].is-stale,
[data-feed].is-down {
    border-style:dashed !important; border-color:var(--color-stale-border) !important;
    background:var(--color-stale-bg) !important; box-shadow:none !important;
}
[data-feed].is-stale > :not(.card-head):not(.card-label):not(.card-updated):not(.state-stale):not(.state-msg):not(.flip-toggle) { opacity:0.55; }
[data-feed].is-stale .card-context { display:none; }
.state-stale { display:none; font-size:var(--body-size); line-height:1.4; color:var(--color-text-muted); }
[data-feed].is-stale > .state-stale { display:block; }

.state-msg { display:none; }
[data-feed].is-down > :not(.card-head):not(.card-label):not(.state-msg):not(.flip-toggle) { visibility:hidden; }
[data-feed].is-down > .state-msg {
    display:flex; flex-direction:column; align-items:flex-start; gap:10px;
    position:absolute; z-index:3; left:18px; right:18px; top:44px;
}
/* Flip-card faces keep their toggle row visible, so the message sits below it */
.flip-card-front[data-feed].is-down > .state-msg,
.flip-card-back[data-feed].is-down > .state-msg { top:88px; left:clamp(18px, 1.4vw, 24px); }
.state-text { font-size:15px; line-height:1.4; color:var(--color-text); }
.state-retry {
    min-height:36px; padding:0 14px; cursor:pointer;
    background:transparent; color:var(--color-text);
    border:1px solid var(--color-primary); border-radius:8px;
    font-family:var(--sans); font-size:13px; font-weight:500;
    transition:background 0.15s ease;
}
.state-retry:hover { background:rgba(247,147,26,0.08); }
.state-retry:focus-visible { outline:2px solid var(--color-primary); outline-offset:2px; }
.state-retry[disabled] { opacity:0.6; cursor:default; }
@media (max-width: 1023px) {
    .state-retry { min-height:44px; }
}

* { margin:0; padding:0; box-sizing:border-box; }

/* clip, not hidden: hidden makes body a scroll container and breaks the sticky header */
html, body { overflow-x:clip; }
body {
    font-family:var(--sans);
    background:var(--color-background);
    color:var(--color-text);
    min-height:100vh;
}
/* A fixed line height (close to the DM fonts' own) so text keeps its height
   when the web fonts replace the fallback, and the cards below don't shift */
.pbar, .desk, .desk-foot, .wall { line-height:1.28; }
body::before {
    content:'';
    position:fixed; inset:0;
    pointer-events:none; z-index:9999; opacity:0.015;
    background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
    background-repeat:repeat; background-size:256px 256px;
}
/* The Pulse header replaces the site navigation on this page; the site footer stays */
.pulse-app site-header { display:none; }

/* ═══════════════════════════════════════════════════
   DESK SCALE
   --u is one design pixel. 1px up to 1920x1080, then it grows with the screen
   (1.33px at 2560x1440, 2px at 3840x2160) so large screens scale type up
   instead of adding cards. Labels and body text use it too, so the 11px and
   13px minimums only ever grow.
   ═══════════════════════════════════════════════════ */
:root { --u:1px; }
@media (min-width:1920px) and (min-height:1080px) {
    :root { --u:max(1px, min(calc(100vw / 1920), calc(100vh / 1080))); }
}
.pbar, .desk, .desk-foot {
    --label-size:calc(11 * var(--u));
    --body-size:calc(13 * var(--u));
}

/* ═══ PULSE HEADER (60px) ═══ */
.pbar {
    position:sticky; top:0; z-index:50;
    height:calc(60 * var(--u));
    padding:0 calc(28 * var(--u));
    display:flex; align-items:center; justify-content:space-between; gap:calc(16 * var(--u));
    background:var(--color-background);
    border-bottom:1px solid var(--color-card-border);
}
.pbar-logo {
    margin:0; display:flex; align-items:baseline; gap:calc(8 * var(--u));
    font-family:var(--serif); font-weight:400; font-size:calc(26 * var(--u)); line-height:1; white-space:nowrap;
}
.pbar-logo a { color:var(--color-text); text-decoration:none; }
.pbar-logo em { color:var(--color-primary); }
.pbar-logo .pbar-by {
    font-family:var(--mono); font-size:calc(12 * var(--u)); letter-spacing:0.08em; color:var(--color-text-dim);
}
.pbar-logo .pbar-by:hover { color:var(--color-text-muted); }
.pbar-live {
    display:inline-flex; align-items:center; gap:calc(8 * var(--u)); margin:0;
    font-family:var(--mono); font-size:calc(13 * var(--u)); letter-spacing:0.08em;
    color:var(--color-text-muted); white-space:nowrap; font-variant-numeric:tabular-nums;
}
.pbar-dot { width:calc(8 * var(--u)); height:calc(8 * var(--u)); border-radius:999px; background:var(--color-primary); }
.pbar-live[data-state="stale"] .pbar-dot,
.pbar-live[data-state="loading"] .pbar-dot { background:var(--color-text-dim); }
.pbar-live[data-state="down"] .pbar-dot { background:var(--color-negative); }
.pbar-actions { display:flex; align-items:center; gap:calc(10 * var(--u)); }
.pbar-btn {
    height:calc(40 * var(--u)); padding:0 calc(16 * var(--u));
    display:inline-flex; align-items:center; justify-content:center; gap:calc(6 * var(--u));
    background:transparent; color:var(--color-text);
    border:1px solid var(--color-card-border); border-radius:calc(10 * var(--u));
    font-family:var(--sans); font-size:calc(14 * var(--u)); cursor:pointer;
    transition:border-color 0.15s ease, background 0.15s ease;
}
.pbar-btn:hover { border-color:#3a3732; background:#151413; }
.pbar-icon { width:calc(40 * var(--u)); padding:0; }
.pbar-icon svg { width:calc(16 * var(--u)); height:calc(16 * var(--u)); }
.curr-btn { font-family:var(--mono); font-size:calc(13 * var(--u)); padding:0 calc(14 * var(--u)); }

/* Segmented control (Desk / Wall, chart ranges) */
.seg {
    display:flex; gap:calc(2 * var(--u)); padding:calc(3 * var(--u));
    background:var(--color-card-bg); border:1px solid var(--color-card-border); border-radius:calc(10 * var(--u));
}
.seg-btn {
    height:calc(34 * var(--u)); padding:0 calc(14 * var(--u));
    border:0; border-radius:calc(7 * var(--u)); background:transparent;
    color:var(--color-text-muted); font-family:var(--sans); font-size:calc(14 * var(--u)); cursor:pointer;
    transition:background 0.15s ease, color 0.15s ease;
}
.seg-btn:hover { color:var(--color-text); }
.seg-btn[aria-pressed="true"] { background:#2a2825; color:var(--color-text); }

/* Currency dropdown */
.curr-sel { position:relative; }
.curr-dropdown {
    display:none; position:absolute; top:calc(100% + 6px); right:0; z-index:60;
    min-width:140px; padding:4px;
    background:var(--color-card-bg); border:1px solid var(--color-card-border); border-radius:10px;
    box-shadow:0 12px 32px rgba(0,0,0,0.5);
}
.curr-dropdown.open { display:block; }
.curr-opt {
    display:flex; align-items:center; gap:0.5rem; width:100%; min-height:36px; padding:0 0.75rem;
    background:none; border:0; border-radius:6px; cursor:pointer; text-align:left; white-space:nowrap;
    color:var(--color-text-muted); font-family:var(--mono); font-size:13px;
}
.curr-opt:hover { background:#2a2825; color:var(--color-text); }
.curr-opt.active { color:var(--color-primary); }

/* Share menu */
.share-wrap { position:relative; }
.share-menu {
    position:absolute; top:calc(100% + 6px); right:0; z-index:60;
    min-width:240px; padding:6px;
    display:flex; flex-direction:column; gap:2px;
    background:var(--color-card-bg); border:1px solid var(--color-card-border); border-radius:10px;
    box-shadow:0 12px 32px rgba(0,0,0,0.5);
}
.share-menu[hidden] { display:none; }
.share-opt {
    min-height:40px; padding:0 12px; border:0; border-radius:6px; background:none; cursor:pointer;
    text-align:left; color:var(--color-text); font-family:var(--sans); font-size:14px;
}
.share-opt:hover, .share-opt:focus-visible { background:#2a2825; }
.share-opt[disabled] { color:var(--color-text-muted); cursor:default; }

/* ═══ DESK GRID ═══
   Fills one screen: 100dvh minus the 60px header and the 30px freshness footer. */
.desk {
    height:calc(100dvh - 90 * var(--u));
    padding:calc(18 * var(--u)) calc(28 * var(--u)) calc(10 * var(--u));
    display:grid; gap:calc(16 * var(--u));
    grid-template-columns:repeat(5, minmax(0, 1fr));
    grid-template-rows:repeat(4, minmax(0, 1fr));
    grid-template-areas:
        "price price  read  fg     blocks"
        "price price  etf   fees   blocks"
        "perf  supply net   next   whale"
        "news  ln     tools weekly health";
}
.c-price  { grid-area:price; }
.c-read   { grid-area:read; }
.c-fg     { grid-area:fg; }
.c-blocks { grid-area:blocks; }
.c-etf    { grid-area:etf; }
.c-fees   { grid-area:fees; }
.c-perf   { grid-area:perf; }
.c-supply { grid-area:supply; }
.c-ln     { grid-area:ln; }
.c-net    { grid-area:net; }
.c-next   { grid-area:next; }
.c-whale  { grid-area:whale; }
.c-news   { grid-area:news; }
.c-tools  { grid-area:tools; }
.c-weekly { grid-area:weekly; }
.c-health { grid-area:health; }

/* ── Card shell ── */
.dcard {
    position:relative; min-height:0; min-width:0; overflow:hidden;
    display:flex; flex-direction:column; gap:calc(8 * var(--u));
    padding:calc(16 * var(--u)) calc(18 * var(--u));
    background:var(--color-card-bg); border:1px solid var(--color-card-border);
    border-radius:calc(14 * var(--u));
}
.dcard.tier-1 { border-top:2px solid var(--color-accent-line); }
.dcard .card-head { flex:none; min-width:0; }
/* Long labels give way to the freshness slot instead of wrapping */
.dcard .card-head .card-label { min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.dcard .card-head .fresh { flex:none; }
.dcard .card-label { letter-spacing:0.08em; }
.card-value {
    font-size:calc(44 * var(--u)); line-height:1;
}
.card-value .unit { font-size:calc(18 * var(--u)); }
.dcard .card-context { flex:none; }
.card-foot {
    flex:none; font-family:var(--mono); font-size:var(--label-size); color:var(--color-text-dim);
}
.card-empty { margin:auto 0; font-size:var(--body-size); color:var(--color-text-muted); }
.k { color:var(--color-text-muted); }
.kv { display:flex; justify-content:space-between; align-items:baseline; gap:calc(10 * var(--u)); }
.kv .v { text-align:right; white-space:nowrap; }
.tone-good { color:var(--color-positive); }
.tone-bad { color:var(--color-negative); }
.tone-flat { color:var(--color-text-muted); }
.track {
    display:block; height:calc(5 * var(--u)); border-radius:999px; background:#2a2825; overflow:hidden;
}
.track-fill { display:block; height:100%; width:0; border-radius:999px; background:var(--color-primary); }

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

/* Skeleton blocks keep their space while data loads */
.skel {
    color:transparent !important; border-radius:4px;
    background:linear-gradient(90deg, var(--color-card-border) 25%, var(--color-divider) 50%, var(--color-card-border) 75%);
    background-size:200% 100%; animation:shimmer 1.5s infinite;
}
.skel * { visibility:hidden; }
@keyframes shimmer { 0% { background-position:-200% 0; } 100% { background-position:200% 0; } }
.skel-line { display:block; height:0.9em; margin:0.35em 0; }
.skel-line.short { width:60%; }

/* ── Price (2x2) ── */
.c-price { padding:calc(22 * var(--u)) calc(24 * var(--u)); gap:calc(12 * var(--u)); }
.price-top { flex:none; display:flex; flex-wrap:wrap; align-items:flex-start; justify-content:space-between; gap:calc(8 * var(--u)) calc(16 * var(--u)); }
.price-id { display:flex; flex-direction:column; gap:calc(6 * var(--u)); min-width:0; }
.price-label-row { display:flex; align-items:baseline; gap:calc(8 * var(--u)); }
.price-label-row .card-label {
    margin:0; font-size:calc(12 * var(--u)); letter-spacing:0.12em; color:var(--color-text-muted);
}
.price-big {
    align-self:flex-start;
    font-family:var(--sans); font-size:calc(64 * var(--u)); font-weight:600; line-height:1;
    letter-spacing:-0.02em; color:var(--color-text); font-variant-numeric:tabular-nums;
}
.price-chg-row {
    display:flex; align-items:center; gap:calc(10 * var(--u));
    font-size:calc(18 * var(--u)); font-weight:500; font-variant-numeric:tabular-nums;
}
.price-change.chg-pill { padding:calc(3 * var(--u)) calc(10 * var(--u)); border-radius:calc(8 * var(--u)); white-space:nowrap; }
.price-chg-when { color:var(--color-text-muted); font-weight:400; }
.range-seg { background:var(--color-background); border:0; flex:none; }
.range-seg .seg-btn {
    height:calc(32 * var(--u)); padding:0 calc(10 * var(--u));
    font-family:var(--mono); font-size:calc(12 * var(--u));
}
.sparkline-wrap { position:relative; flex:1; min-height:calc(80 * var(--u)); cursor:crosshair; }
.sparkline-wrap canvas { position:absolute; inset:0; width:100%; height:100%; display:block; }
.spark-crosshair {
    position:absolute; top:0; bottom:0; width:1px; background:rgba(245,240,232,0.2);
    pointer-events:none; opacity:0; transition:opacity 0.15s;
}
.spark-crosshair.visible { opacity:1; }
.spark-dot {
    position:absolute; width:9px; height:9px; margin:-4.5px 0 0 -4.5px; border-radius:50%;
    background:var(--color-primary); box-shadow:0 0 0 3px rgba(247,147,26,0.25);
    pointer-events:none; opacity:0; transition:opacity 0.15s;
}
.spark-dot.visible { opacity:1; }
.spark-tooltip {
    position:absolute; transform:translateX(-50%); pointer-events:none; opacity:0; transition:opacity 0.15s;
    padding:6px 10px; border-radius:8px; white-space:nowrap;
    background:#0d0d0d; border:1px solid var(--color-card-border);
    font-variant-numeric:tabular-nums;
}
.spark-tooltip.visible { opacity:1; }
.tt-price { font-size:14px; font-weight:600; color:var(--color-text); }
.tt-date { font-family:var(--mono); font-size:11px; color:var(--color-text-muted); }
.price-stats {
    flex:none; display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:calc(12 * var(--u));
    padding-top:calc(10 * var(--u)); border-top:1px solid var(--color-card-border);
}
.price-stats > div { display:flex; flex-direction:column; gap:calc(2 * var(--u)); min-width:0; }
.stat-k {
    font-family:var(--mono); font-size:var(--label-size); letter-spacing:0.08em; text-transform:uppercase;
    color:var(--color-text-dim); white-space:nowrap;
}
.stat-v { align-self:flex-start; font-size:calc(16 * var(--u)); font-variant-numeric:tabular-nums; }
.ath-track { height:calc(6 * var(--u)); margin-top:calc(6 * var(--u)); border-radius:999px; background:#2a2825; overflow:hidden; }
.ath-fill { height:100%; width:0; border-radius:999px; background:var(--color-primary); }

/* ── The read ── */
.c-read { gap:calc(10 * var(--u)); }
.c-read .card-label { letter-spacing:0.1em; }
.read-text {
    flex:1; min-height:0; overflow:hidden;
    font-family:var(--serif); font-size:calc(19 * var(--u)); line-height:1.35; color:var(--color-text);
}
.read-text strong { font-weight:400; color:var(--color-text); }
.read-text .read-price { color:var(--color-primary); }
.read-text .narrative-up { color:var(--color-positive); }
.read-text .narrative-down { color:var(--color-negative); }
.read-text .narrative-neutral { color:var(--color-text-muted); }
.read-text.is-clamped { display:-webkit-box; -webkit-box-orient:vertical; }

/* ── Fear & Greed ── */
.c-fg { justify-content:space-between; }
.fg-value { display:flex; align-items:baseline; gap:calc(8 * var(--u)); font-weight:600; }
.fg-word { font-size:calc(18 * var(--u)); font-weight:500; }
.fg-scale-wrap { display:flex; flex-direction:column; gap:calc(4 * var(--u)); }
/* Zone widths follow the index's own bands: 0-24, 25-46, 47-54, 55-75, 76-100 */
.fg-scale {
    position:relative; display:grid; gap:calc(3 * var(--u));
    grid-template-columns:25fr 22fr 8fr 21fr 24fr;
}
.fg-scale .z { height:calc(8 * var(--u)); border-radius:2px; }
.fg-scale .z1 { background:var(--fg-extreme-fear); }
.fg-scale .z2 { background:var(--fg-fear); }
.fg-scale .z3 { background:var(--fg-neutral); }
.fg-scale .z4 { background:var(--fg-greed); }
.fg-scale .z5 { background:var(--fg-extreme-greed); }
.fg-marker {
    position:absolute; top:calc(-4 * var(--u)); left:50%; margin-left:calc(-2 * var(--u));
    width:calc(4 * var(--u)); height:calc(16 * var(--u)); border-radius:2px;
    background:var(--color-text); box-shadow:0 0 0 2px var(--color-card-bg);
    transition:left 0.6s ease;
}
.c-fg:not(.is-loading) .fg-marker { display:block; }
.c-fg.is-loading .fg-marker { display:none; }
.fg-ends {
    display:flex; justify-content:space-between;
    font-family:var(--mono); font-size:var(--label-size); color:var(--color-text-dim);
}

/* ── Recent blocks (two rows tall) ── */
.blocks-list { flex:1; min-height:0; display:grid; grid-template-columns:minmax(0, 1fr); grid-template-rows:repeat(5, minmax(0, 1fr)); }
.block-row {
    min-height:0; display:flex; align-items:center; gap:calc(12 * var(--u));
    border-top:1px solid var(--color-divider); color:var(--color-text); text-decoration:none;
}
a.block-row:hover .block-h { color:var(--color-primary); }
.block-tile {
    flex:none; width:calc(40 * var(--u)); height:calc(40 * var(--u)); border-radius:calc(8 * var(--u));
    background:rgba(247,147,26,0.5);
}
.block-tile.skel { background:var(--color-card-border); }
.block-txt { flex:1; min-width:0; display:flex; flex-direction:column; gap:calc(2 * var(--u)); }
.block-line { display:flex; justify-content:space-between; align-items:baseline; gap:8px; }
.block-h { font-size:calc(16 * var(--u)); font-weight:600; font-variant-numeric:tabular-nums; }
.block-ago, .block-meta { font-size:var(--body-size); color:var(--color-text-muted); }
.block-meta { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.block-row .skel { align-self:flex-start; }

/* ── ETF flows ── */
.etf-head { flex:none; display:flex; align-items:baseline; gap:calc(12 * var(--u)); flex-wrap:wrap; }
.etf-net { font-size:calc(30 * var(--u)); font-weight:600; line-height:1; white-space:nowrap; font-variant-numeric:tabular-nums; }
.etf-sub { font-size:var(--body-size); color:var(--color-text-muted); }
.etf-bars {
    flex:1; min-height:calc(44 * var(--u));
    display:grid; grid-template-columns:repeat(7, minmax(0, 1fr)); gap:calc(6 * var(--u));
}
.etf-col { display:flex; flex-direction:column; min-height:0; }
.etf-up { flex:1; display:flex; align-items:flex-end; }
.etf-down { flex:1; display:flex; align-items:flex-start; border-top:1px solid var(--color-stale-border); }
.etf-bar { display:block; width:100%; min-height:2px; }
.etf-bar.in { background:var(--color-positive); border-radius:2px 2px 0 0; }
.etf-bar.out { background:var(--color-negative); border-radius:0 0 2px 2px; }
.etf-col.is-latest .etf-bar { box-shadow:0 0 0 2px var(--color-text); }
.etf-day {
    margin-top:calc(4 * var(--u)); text-align:center;
    font-family:var(--mono); font-size:var(--label-size); color:var(--color-text-dim);
}
.etf-col.is-latest .etf-day { color:var(--color-text); }
/* Hovering a day: its bar keeps the ring and full color, the rest dim */
.etf-bar { transition:opacity .15s; }
.etf-bars.is-scrub .etf-col:not(.is-hover) .etf-bar { opacity:.35; box-shadow:none; }
.etf-bars.is-scrub .etf-col.is-hover .etf-bar { box-shadow:0 0 0 2px var(--color-text); }
.etf-bars.is-scrub .etf-col:not(.is-hover) .etf-day { color:var(--color-text-dim); }
.etf-bars.is-scrub .etf-col.is-hover .etf-day { color:var(--color-text); }

/* ── Fees ── */
.c-fees { justify-content:space-between; }
.fee-value { display:flex; align-items:center; gap:calc(8 * var(--u)); font-weight:600; flex-wrap:wrap; }
.fee-value .unit { font-weight:500; }
.fee-badge {
    padding:calc(3 * var(--u)) calc(8 * var(--u)); border-radius:calc(6 * var(--u));
    font-size:var(--body-size); font-weight:500; letter-spacing:0.02em;
}
.fee-badge:empty { display:none; }
.fee-badge.fee-low { background:rgba(74,222,128,0.12); color:var(--color-positive); }
.fee-badge.fee-medium { background:var(--color-divider); color:var(--color-text-muted); }
.fee-badge.fee-high { background:rgba(248,113,113,0.12); color:var(--color-negative); }
.fee-bars {
    display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:calc(6 * var(--u));
    align-items:end; height:calc(34 * var(--u));
}
.fee-bars span { display:block; height:20%; border-radius:2px; transition:height 0.4s ease; }
.fee-bars span:nth-child(1) { background:rgba(247,147,26,0.35); }
.fee-bars span:nth-child(2) { background:rgba(247,147,26,0.65); }
.fee-bars span:nth-child(3) { background:var(--color-primary); }
.fee-labels {
    display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:calc(6 * var(--u));
    font-size:calc(12 * var(--u)); color:var(--color-text-muted); font-variant-numeric:tabular-nums;
}

/* ── Performance: six tiles, each with its own low-to-high range and today's marker ── */
.perf-tiles {
    flex:1; min-height:0;
    display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); grid-template-rows:repeat(2, minmax(0, 1fr));
    gap:calc(8 * var(--u));
}
.perf-tile {
    container-type:inline-size; min-width:0; min-height:0; display:flex; flex-direction:column; justify-content:center; gap:calc(4 * var(--u));
    padding:calc(6 * var(--u)) calc(8 * var(--u)); background:#1b1a18; border-radius:calc(8 * var(--u));
}
.perf-k { font-family:var(--mono); font-size:var(--label-size); line-height:1.2; color:var(--color-text-muted); }
/* The tiles narrow with the grid; the figure follows the tile's width, never under 12px */
.perf-v { align-self:flex-start; font-size:max(12px, min(calc(17 * var(--u)), 22cqi)); font-weight:600; line-height:1.15; white-space:nowrap; font-variant-numeric:tabular-nums; }
.prange { position:relative; display:block; flex:none; height:calc(3 * var(--u)); border-radius:2px; background:#3a3732; }
.prange-mark {
    position:absolute; top:calc(-3 * var(--u)); width:calc(3 * var(--u)); height:calc(9 * var(--u)); margin-left:calc(-1.5 * var(--u));
    border-radius:1px; background:var(--color-text); visibility:hidden;
}
.perf-tile.has-range .prange-mark { visibility:visible; }
@media (max-width:1679px) {
    .perf-tiles { gap:6px; }
    .perf-tile { padding-left:6px; padding-right:6px; }
}

/* ── Network rows; the funding gauge and liquidation split (Market structure) ── */
.net-rows { flex:1; min-height:0; display:flex; flex-direction:column; justify-content:space-evenly; gap:calc(6 * var(--u)); font-size:calc(14 * var(--u)); }
.gauge3 {
    position:relative; display:block; height:calc(6 * var(--u)); border-radius:999px;
    background:linear-gradient(90deg, var(--color-negative) 0 33.3%, var(--color-stale-border) 33.3% 66.7%, var(--color-positive) 66.7% 100%);
}
.gauge3-mark {
    position:absolute; top:calc(-4 * var(--u)); left:50%; margin-left:calc(-2 * var(--u));
    width:calc(4 * var(--u)); height:calc(14 * var(--u)); border-radius:2px; background:var(--color-text);
    transition:left 0.6s ease;
}
[data-feed="funding"].is-loading .gauge3-mark { display:none; }
.split { display:flex; height:calc(6 * var(--u)); border-radius:999px; overflow:hidden; background:#2a2825; }
.split-a { width:50%; background:var(--color-negative); }
.split-b { width:50%; background:var(--color-positive); }
.liq-long { color:var(--color-negative); }
.liq-short { color:var(--color-positive); }

/* ── Supply ── */
.c-supply { justify-content:space-between; gap:calc(6 * var(--u)); }
.supply-value, .ln-value { font-size:calc(30 * var(--u)); white-space:nowrap; }
.supply-value .unit, .ln-value .unit { color:var(--color-text-muted); }
.supply-bar { display:flex; flex-direction:column; gap:calc(4 * var(--u)); }
.supply-track { display:block; height:calc(8 * var(--u)); border-radius:999px; background:#2a2825; overflow:hidden; }
.supply-fill { display:block; height:100%; width:0; border-radius:999px; background:var(--color-primary); }
.supply-foot {
    display:flex; justify-content:space-between; gap:8px;
    font-family:var(--mono); font-size:var(--label-size); color:var(--color-text-dim); font-variant-numeric:tabular-nums;
}
/* Small label-over-value stats (Supply, Lightning) */
.mini-stats { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:calc(8 * var(--u)); font-size:var(--body-size); }
.mini-stats-3 { grid-template-columns:repeat(3, minmax(0, 1fr)); gap:calc(6 * var(--u)); }
.mini-stats > div { min-width:0; display:flex; flex-direction:column; gap:1px; }
.mini-stats .k { white-space:nowrap; }
.mini-stats .v { align-self:flex-start; font-size:calc(15 * var(--u)); font-weight:600; white-space:nowrap; font-variant-numeric:tabular-nums; }

/* ── Lightning ── */
.c-ln { gap:calc(6 * var(--u)); padding-top:calc(14 * var(--u)); padding-bottom:calc(14 * var(--u)); }
.c-ln .ln-value { margin-top:calc(22 * var(--u)); }
.c-ln .mini-stats { margin-top:auto; }

/* ── Network ── */
.c-net { gap:calc(6 * var(--u)); }
.net-top { flex:none; display:flex; align-items:flex-end; justify-content:space-between; gap:calc(10 * var(--u)); }
.net-value { font-size:calc(26 * var(--u)); font-weight:600; }
.net-value .unit { font-size:calc(14 * var(--u)); }
.net-spark { width:calc(120 * var(--u)); height:calc(30 * var(--u)); flex:none; }
.kv-bar { display:flex; flex-direction:column; gap:calc(4 * var(--u)); }

/* ── Next blocks ── */
.next-rows { flex:1; min-height:0; display:flex; flex-direction:column; justify-content:space-evenly; }
.next-row { display:flex; align-items:center; gap:calc(10 * var(--u)); font-size:calc(14 * var(--u)); }
.next-k { width:calc(36 * var(--u)); flex:none; color:var(--color-text-muted); }
.next-track { flex:1; min-width:0; }
.next-bar { display:block; height:calc(16 * var(--u)); border-radius:calc(4 * var(--u)); background:var(--color-primary); transition:width 0.4s ease; }
.next-bar.o1 { background:rgba(247,147,26,0.6); }
.next-bar.o2 { background:rgba(247,147,26,0.35); }
.next-v { flex:none; min-width:calc(60 * var(--u)); text-align:right; white-space:nowrap; font-variant-numeric:tabular-nums; }
.next-row .skel { display:block; height:calc(16 * var(--u)); }

/* ── Whale alerts ── */
.whale-rows { flex:1; min-height:0; display:grid; grid-template-columns:minmax(0, 1fr); grid-template-rows:repeat(3, minmax(0, 1fr)); }
.whale-row {
    flex:1; min-height:0; display:flex; flex-direction:column; justify-content:center; gap:calc(4 * var(--u));
    border-top:1px solid var(--color-divider); color:var(--color-text); text-decoration:none;
}
.whale-line { display:flex; justify-content:space-between; align-items:baseline; gap:8px; font-size:calc(15 * var(--u)); }
.whale-btc { font-weight:600; font-variant-numeric:tabular-nums; }
a.whale-row:hover .whale-btc { color:var(--color-primary); }
.whale-meta { font-size:var(--body-size); color:var(--color-text-muted); white-space:nowrap; }
.whale-bar { display:block; height:calc(4 * var(--u)); border-radius:2px; background:var(--color-primary); }
.whale-bar.o1 { background:rgba(247,147,26,0.7); }
.whale-bar.o2 { background:rgba(247,147,26,0.5); }
.whale-empty { margin:auto 0; font-size:var(--body-size); color:var(--color-text-muted); }

/* ── News ── */
.c-news { padding-top:calc(14 * var(--u)); padding-bottom:calc(14 * var(--u)); gap:calc(2 * var(--u)); }
.card-more {
    flex:none; padding:4px 0; margin:-4px 0;
    color:var(--color-primary); text-decoration:none; text-transform:none; letter-spacing:0.04em;
}
.card-more:hover { text-decoration:underline; }
.news-rows { flex:1; min-height:0; display:grid; grid-template-columns:minmax(0, 1fr); grid-template-rows:repeat(3, minmax(0, 1fr)); }
.news-row {
    min-height:0; display:flex; flex-direction:column; justify-content:center; gap:calc(2 * var(--u));
    border-bottom:1px solid var(--color-divider); color:var(--color-text); text-decoration:none;
    font-size:calc(14 * var(--u));
}
.news-row:last-child { border-bottom:0; }
a.news-row:hover .news-row-title { color:var(--color-primary); }
.news-row-title {
    flex:none; min-width:0; line-height:1.3;
    display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}
.news-row-meta { flex:none; font-family:var(--mono); font-size:var(--label-size); line-height:1.3; color:var(--color-text-dim); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.news-row .skel { align-self:flex-start; }
.ntag {
    flex:none; padding:calc(2 * var(--u)) calc(8 * var(--u)); border-radius:calc(6 * var(--u));
    font-family:var(--mono); font-size:var(--label-size); letter-spacing:0.04em; text-transform:uppercase;
    background:rgba(168,161,150,0.16); color:#cfc7ba;
}
.ntag-btc { background:rgba(247,147,26,0.14); color:var(--color-primary); }
.ntag-market { background:rgba(147,197,253,0.14); color:#93c5fd; }

/* ── Tools ── */
.c-tools { padding-top:calc(14 * var(--u)); padding-bottom:calc(14 * var(--u)); gap:calc(4 * var(--u)); }
.tool-rows { flex:1; min-height:0; display:grid; grid-template-columns:minmax(0, 1fr); grid-template-rows:repeat(4, minmax(0, 1fr)); }
.tool-row {
    flex:1; min-height:calc(36 * var(--u)); display:flex; align-items:center; gap:calc(10 * var(--u));
    border-top:1px solid var(--color-divider); color:var(--color-text); text-decoration:none;
    font-size:calc(15 * var(--u));
}
.tool-row svg { flex:none; width:calc(18 * var(--u)); height:calc(18 * var(--u)); stroke:var(--color-text-muted); }
.tool-row:first-child svg { stroke:var(--color-primary); }
.tool-row > span:first-of-type { flex:1; min-width:0; }
.tool-row:hover > span:first-of-type { color:var(--color-primary); }
.tool-new {
    flex:none; padding:calc(2 * var(--u)) calc(6 * var(--u)); border-radius:4px;
    font-family:var(--mono); font-size:var(--label-size); background:var(--color-primary); color:#140c02;
}
.tool-new[hidden] { display:none; }
/* Bitcoin Legacy keeps the nav's filled shield; no other tool uses a shield */
.tool-row .tool-ico-legacy { fill:var(--color-primary); stroke:none; }
/* Outlined so it reads differently from the filled NEW badge; the 1px border comes out of the padding to match its height */
.tool-wait {
    flex:none; padding:calc(2 * var(--u) - 1px) calc(6 * var(--u) - 1px); border:1px solid var(--color-primary); border-radius:4px;
    font-family:var(--mono); font-size:var(--label-size); background:transparent; color:var(--color-primary);
}
.tool-arrow { flex:none; color:var(--color-text-dim); }

/* ── Bitcoin Weekly ── */
.c-weekly { border-color:#3a2a14; gap:calc(6 * var(--u)); padding-top:calc(14 * var(--u)); padding-bottom:calc(14 * var(--u)); }
.weekly-head { flex:none; display:flex; align-items:center; justify-content:space-between; gap:8px; }
.weekly-brand { font-family:var(--serif); font-style:italic; font-size:calc(17 * var(--u)); color:var(--color-primary); }
.weekly-pill {
    flex:none; padding:calc(2 * var(--u)) calc(8 * var(--u)); border-radius:999px; border:1px solid #3a3732;
    font-family:var(--mono); font-size:var(--label-size); color:var(--color-text-muted); white-space:nowrap;
}
.weekly-title { margin:0; font-family:var(--serif); font-weight:400; font-size:calc(20 * var(--u)); line-height:1.15; }
.weekly-title a {
    color:var(--color-text); text-decoration:none;
    display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:3; overflow:hidden;
}
.weekly-title a:hover { color:var(--color-primary); }
.weekly-sub {
    flex:1; min-height:0; margin:0; overflow:hidden;
    font-size:var(--body-size); line-height:1.4; color:var(--color-text-muted);
}
.weekly-sub[hidden] { display:none; }
.weekly-foot {
    flex:none; margin-top:auto; display:flex; align-items:center; justify-content:space-between; gap:8px;
    padding-top:calc(6 * var(--u)); border-top:1px solid var(--color-card-border);
}
.weekly-read { font-size:calc(14 * var(--u)); font-weight:700; color:var(--color-primary); text-decoration:none; white-space:nowrap; }
.weekly-read:hover { text-decoration:underline; }
.weekly-subscribe { font-size:var(--body-size); color:var(--color-text-muted); text-decoration:none; white-space:nowrap; }
.weekly-subscribe:hover { color:var(--color-text); }

/* ── Health score ── */
.c-health { justify-content:space-between; }
.health-ctx { display:flex; justify-content:space-between; align-items:baseline; gap:8px; }
.how-link { flex:none; color:var(--color-primary); text-decoration:none; }
.how-link:hover { text-decoration:underline; }
.health-value { display:flex; align-items:baseline; gap:calc(8 * var(--u)); font-weight:600; }
.health-of { font-size:calc(18 * var(--u)); font-weight:400; color:var(--color-text-muted); }
.health-segs { display:grid; grid-template-columns:repeat(12, minmax(0, 1fr)); gap:calc(4 * var(--u)); }
.hseg { height:calc(8 * var(--u)); border-radius:2px; background:var(--color-card-border); }
.hseg.good { background:var(--color-positive); }
.hseg.weak { background:var(--color-negative); }
.hseg.mid { background:var(--color-stale-border); }

/* ── Freshness footer (30px) ── */
.desk-foot {
    height:calc(30 * var(--u)); padding:0 calc(28 * var(--u));
    display:flex; align-items:center; justify-content:space-between; gap:16px;
    font-family:var(--mono); font-size:calc(12 * var(--u)); color:var(--color-text-dim);
}
.desk-foot a { color:var(--color-text-dim); text-decoration:none; }
.desk-foot a:hover { color:var(--color-text-muted); }

/* ═══ SMALLER SCREENS ═══
   1024-1279 wide, or under 820 tall: three columns, the page may scroll. */
@media (max-width:1279px), (max-height:819px) {
    .desk {
        height:auto;
        grid-template-columns:repeat(3, minmax(0, 1fr));
        grid-template-rows:none;
        grid-auto-rows:minmax(calc(200 * var(--u)), auto);
        grid-template-areas:
            "price price read"
            "price price fg"
            "etf    fees   blocks"
            "perf   supply blocks"
            "net    next   whale"
            "news   ln     tools"
            "weekly weekly health";
    }
    .c-price { min-height:440px; }
    .c-news { min-height:220px; }
    .read-text { overflow:visible; }
    .desk-foot { height:auto; padding-top:8px; padding-bottom:8px; flex-wrap:wrap; }
}
/* 1280 to 1439 wide is the 5x4 grid's narrowest band: a smaller price, tool rows
   without icons, a two-line Weekly title and no Weekly subtitle */
@media (min-width:1280px) and (max-width:1439px) and (min-height:820px) {
    .price-big { font-size:52px; }
    .range-seg .seg-btn { padding:0 7px; }
    .c-tools { padding-top:10px; padding-bottom:10px; }
    .tool-row { font-size:14px; line-height:1.1; gap:8px; }
    .tool-row svg { display:none; }
    .tool-new { padding:1px 5px; }
    .tool-wait { padding:0 4px; }
    .weekly-title { font-size:18px; }
    .weekly-title a { -webkit-line-clamp:2; }
    .weekly-sub { display:none; }
    .weekly-foot { flex-wrap:wrap; row-gap:2px; }
    .health-value, .health-of { white-space:nowrap; }
    .health-of { font-size:15px; }
    /* Card titles: shorter forms, and the title wins over the freshness label */
    .dcard { padding-left:14px; padding-right:14px; }
    .dcard .lbl-long { display:none; }
    .dcard .lbl-short { display:inline; }
    .weekly-brand { white-space:nowrap; }
    .dcard .card-head .card-label { flex-shrink:0; max-width:100%; }
    .dcard .card-head .fresh { flex:0 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
    /* Next blocks: the mempool count moves to the card's free bottom corner */
    .c-next .card-head .fresh { position:absolute; right:14px; bottom:12px; max-width:calc(100% - 28px); }
    /* Performance: the header note keeps its full text; slimmer tiles */
    .c-perf .card-head, .c-perf .card-head .fresh { letter-spacing:0; }
    .c-perf .card-head .fresh { flex:none; }
    /* Lightning: three stats share a narrow card */
    .mini-stats-3 { gap:4px; }
    .mini-stats-3 .v { font-size:14px; }
    /* Health: "How it works" runs on after the context instead of taking its own column */
    .c-health { gap:4px; }
    .health-ctx { display:block; }
    .how-link { margin-left:6px; }
}
/* 1440 to 1535 wide: a slightly smaller price and slimmer range buttons, so the buttons stay
   beside the price (whose width is reserved in pulse.js) instead of dropping to a second row */
@media (min-width:1440px) and (max-width:1535px) and (min-height:820px) {
    .price-big { font-size:60px; }
    .range-seg .seg-btn { padding:0 7px; }
}
/* The from-ATH label is the longest price stat, so narrower Desks give it more room */
@media (max-width:1679px) {
    .price-stats { grid-template-columns:repeat(3, minmax(0, 1fr)) minmax(0, 1.45fr); }
    #athLabel { letter-spacing:0.02em; }
}
/* Under 900 tall the bottom row is short, so the four tool rows share it evenly */
@media (min-width:1280px) and (min-height:820px) and (max-height:899px) {
    .tool-row { min-height:0; }
    .etf-bars { min-height:32px; }
}
.lbl-short { display:none; }
/* Phone-only pieces stay out of the Desk */
.lbl-mob, .net-ctx, .msections, .foot-mob { display:none; }

/* ═══ PHONES AND SMALL TABLETS (below 1024) ═══
   One question first: price, change, The read. Then four vitals, a sticky
   jump bar, and collapsible sections of 48px rows. */
@media (max-width:1023px) {
    /* Phone minimums: labels 12px, body 14px */
    .pbar, .desk, .desk-foot { --label-size:12px; --body-size:14px; }

    /* Sticky header: logo, LIVE, currency */
    .pbar {
        height:auto; min-height:64px; gap:8px;
        padding:10px max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left));
        padding-top:max(10px, env(safe-area-inset-top));
    }
    .pbar-logo { font-size:22px; }
    .pbar-logo a:first-child { display:inline-block; line-height:44px; }   /* 44px target; inline-flex would eat the space */
    .pbar-logo .pbar-by, .pbar-view, #fsBtn, .share-wrap { display:none; }
    .pbar-live { font-size:12px; gap:6px; }
    .pbar-live > span:nth-child(n+3) { display:none; }   /* clocks stay on the Desk */
    .pbar-actions { gap:8px; }
    .curr-btn { min-width:64px; height:44px; font-size:13px; }
    .curr-opt { min-height:44px; }

    .desk {
        height:auto; max-width:720px; margin:0 auto;
        padding:0 max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left));
        gap:10px;
        grid-template-columns:repeat(2, minmax(0, 1fr));
        grid-template-rows:none;
        grid-auto-rows:auto;
        grid-template-areas:
            "price  price"
            "read   read"
            "fg     etf"
            "fees   net"
            "msec   msec"
            "weekly weekly";
    }
    .c-blocks, .c-perf, .c-supply, .c-next, .c-whale, .c-news, .c-ln, .c-tools, .c-health { display:none; }
    .ms-section { display:none; }

    /* Price hero: no card, range control under the chart */
    .c-price {
        min-height:0; padding:24px 0 20px; gap:10px; overflow:visible;
        background:none; border:0; border-radius:0;
    }
    .c-price.tier-1 { border-top:0; box-shadow:none; }
    .c-price.is-stale, .c-price.is-down { padding:24px 12px 20px; border-radius:12px; }
    .price-top { display:contents; }
    .price-id { order:1; }
    .sparkline-wrap { order:2; flex:none; height:116px; min-height:0; margin-top:8px; }
    .range-seg { order:3; }
    .price-stats { order:4; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:8px; padding-top:6px; border-top:0; }
    .price-stats > div:nth-child(4) { display:none; }    /* from-ATH stays on the Desk */
    .price-big { font-size:54px; }
    .price-chg-row { font-size:16px; }
    .price-change.chg-pill { padding:0; background:none; }
    .stat-v { font-size:15px; }
    .range-seg {
        display:grid; grid-template-columns:repeat(5, minmax(0, 1fr)); gap:4px; padding:4px;
        background:var(--color-card-bg); border-radius:12px;
    }
    .range-seg .seg-btn { height:44px; padding:0; border-radius:9px; font-size:13px; }
    .range-seg .seg-btn[data-range="1h"] { display:none; }

    .dcard { border-radius:12px; }
    .c-read { padding:18px; }
    /* Room for a typical read (about 145 characters) so the vitals don't jump when it arrives */
    .read-text { font-size:21px; overflow:visible; min-height:4.05em; }

    /* Vitals: four compact tiles */
    .c-fg, .c-etf, .c-fees, .c-net { padding:14px; gap:6px; justify-content:flex-start; }
    /* Narrow tiles: the freshness label drops under the card label instead of truncating it */
    .c-fg .card-head, .c-etf .card-head, .c-fees .card-head, .c-net .card-head { flex-wrap:wrap; row-gap:2px; }
    .c-fg .card-head .card-label, .c-etf .card-head .card-label, .c-fees .card-head .card-label, .c-net .card-head .card-label { overflow:visible; }
    .c-fg .card-value, .c-fees .card-value, .c-net .net-value { font-size:30px; line-height:1.05; }
    .c-fg .fg-word, .c-fees .unit, .c-net .unit { font-size:15px; }
    .fg-scale .z { height:6px; }
    .fg-marker { top:-3px; height:12px; }
    .fg-ends, .etf-bars, .fee-bars, .fee-labels, .net-spark, .net-rows, .lbl-desk { display:none; }
    .lbl-mob, .net-ctx { display:inline; }
    .net-ctx { display:block; }
    .etf-head { flex-direction:column; align-items:flex-start; gap:6px; }
    .etf-net { font-size:30px; line-height:1.05; }
    .fee-badge { font-size:12px; }
    .card-context, .etf-sub { font-size:var(--body-size); }
    [data-feed].is-down > .state-msg { left:14px; right:14px; top:40px; }
    .state-text { font-size:14px; }

    /* Jump bar and sections */
    .msections { display:block; grid-area:msec; margin:6px calc(-1 * max(16px, env(safe-area-inset-left))) 0; }
    .jumpbar {
        position:sticky; top:64px; z-index:20;
        display:flex; gap:8px; padding:10px max(16px, env(safe-area-inset-left));
        background:var(--color-background);
        border-top:1px solid var(--color-card-border); border-bottom:1px solid var(--color-card-border);
    }
    .jump {
        flex:1; min-height:44px; display:flex; align-items:center; justify-content:center;
        border-radius:999px; border:1px solid var(--color-card-border);
        color:var(--color-text); font-size:14px; text-decoration:none;
    }
    .jump.is-current { background:var(--color-text); border-color:var(--color-text); color:var(--color-background); font-weight:600; }
    .msec { padding:8px max(16px, env(safe-area-inset-left)) 0; scroll-margin-top:130px; }
    .msec + .msec .msec-btn { border-top:1px solid var(--color-card-border); }
    .msec:last-child .msec-btn[aria-expanded="false"] { border-bottom:1px solid var(--color-card-border); }
    .msec-h { margin:0; font:inherit; }
    .msec-btn {
        width:100%; min-height:56px; padding:0; display:flex; align-items:center; justify-content:space-between; gap:12px;
        background:transparent; border:0; color:var(--color-text); text-align:left; cursor:pointer;
    }
    .msec-btn[aria-expanded="false"] { min-height:64px; }
    .msec-text { display:flex; flex-direction:column; gap:2px; min-width:0; }
    .msec-title { font-family:var(--serif); font-size:24px; font-weight:400; }
    .msec-sum { font-size:13px; color:var(--color-text-muted); }
    .msec-btn[aria-expanded="true"] .msec-sum { display:none; }
    .msec-btn svg { flex:none; width:18px; height:18px; stroke:var(--color-text-muted); transition:transform 0.2s ease; }
    .msec-btn[aria-expanded="true"] svg { transform:rotate(180deg); }
    .mrows { margin:0; display:flex; flex-direction:column; }
    .mrows[hidden] { display:none; }
    /* Market structure: a collapsed group at the end of Market */
    .mgroup-btn {
        width:100%; min-height:48px; padding:0; display:flex; align-items:center; justify-content:space-between; gap:12px;
        background:transparent; border:0; border-top:1px solid var(--color-divider);
        color:var(--color-text); font-family:var(--sans); font-size:15px; text-align:left; cursor:pointer;
    }
    .mgroup-btn svg { flex:none; width:18px; height:18px; stroke:var(--color-text-muted); transition:transform 0.2s ease; }
    .mgroup-btn[aria-expanded="true"] svg { transform:rotate(180deg); }
    .mgroup-btn:focus-visible { outline:2px solid var(--color-primary); outline-offset:2px; }
    #m-ms-body .mrow { padding-left:12px; }
    .mrow {
        min-height:48px; display:flex; align-items:center; justify-content:space-between; gap:12px;
        border-top:1px solid var(--color-divider); font-size:15px;
    }
    .mrow dt { color:var(--color-text-muted); }
    .mrow dd { margin:0; text-align:right; font-variant-numeric:tabular-nums; }
    .mrow dd.row-down { color:var(--color-text-dim); }
    .mrow dd.row-stale { color:var(--color-text-dim); }
    .mrow-link { color:var(--color-text); text-decoration:none; }
    .mrow-link > span:first-child { flex:1; }
    .mrow-link:hover > span:first-child { color:var(--color-primary); }

    /* Bitcoin Weekly */
    .c-weekly { margin-top:20px; padding:16px; gap:8px; }
    .weekly-title { font-size:21px; line-height:1.2; }
    .weekly-title a { -webkit-line-clamp:4; }
    .weekly-sub { font-size:14px; line-height:1.45; flex:none; overflow:visible; }
    .weekly-foot { padding-top:8px; }
    .weekly-read, .weekly-subscribe { min-height:44px; display:flex; align-items:center; }
    .weekly-read { font-size:15px; }
    .weekly-subscribe { font-size:14px; }

    /* Freshness footer with live ages */
    .desk-foot {
        height:auto; max-width:720px; margin:20px auto 0; flex-direction:column; align-items:flex-start; gap:6px;
        padding:16px max(16px, env(safe-area-inset-left)) max(16px, env(safe-area-inset-bottom));
        font-size:12px; line-height:1.5;
    }
    .foot-desk { display:none; }
    .desk-foot a { min-height:44px; display:inline-flex; align-items:center; }
    .foot-mob { display:inline; }
}
@media (max-width:599px) { .read-text { min-height:5.4em; } }
@media (max-width:419px) { .read-text { min-height:6.75em; } }
@media (max-width:374px) {
    .read-text { min-height:8.1em; }
    .pbar-logo { font-size:20px; }
    .price-big { font-size:46px; }
    .jump { font-size:13px; }
    .c-fg .card-value, .c-fees .card-value, .c-net .net-value, .etf-net { font-size:26px; }
}

/* ═══ BITCOIN LEGACY WAITLIST CARD ═══
   Takes the Lightning and Tools spots until the visitor signs up or closes it. legacy-gate.js
   sets, before first paint: html.lg-off = the card is gone and the layout is today's;
   html.lg-joined = the Tools row reads ✓ ON THE LIST and the Legacy banner goes. Every rule
   below that changes the layout is under html:not(.lg-off), so lg-off falls back to the rules above. */
.c-legacy { grid-area:legacy; }
html.lg-off .c-legacy { display:none; }
html:not(.lg-off) .c-ln, html:not(.lg-off) .c-tools { display:none; }
html:not(.lg-off) .desk {
    grid-template-areas:
        "price  price  read  fg     blocks"
        "price  price  etf   fees   blocks"
        "perf   supply net   next   whale"
        "legacy legacy news  weekly health";
}
/* Only Legacy is accented while it shows (Health already uses the standard border) */
html:not(.lg-off) .c-weekly { border-color:var(--color-card-border); }
@media (max-width:1279px), (max-height:819px) {
    html:not(.lg-off) .desk {
        grid-template-areas:
            "price  price  read"
            "price  price  fg"
            "etf    fees   blocks"
            "perf   supply blocks"
            "net    next   whale"
            "legacy legacy news"
            "weekly weekly health";
    }
}
html.lg-joined .legacy-teaser { display:none; }
/* Tools rows (Desk card and phone section): WAITLIST becomes ✓ ON THE LIST once joined */
.tool-onlist {
    flex:none; padding:calc(2 * var(--u)) 0;
    font-family:var(--mono); font-size:var(--label-size); color:var(--color-positive); white-space:nowrap;
}
.tool-row .tool-onlist, .mrow .tool-onlist, html.lg-joined .tool-row .tool-wait, html.lg-joined .mrow .tool-wait { display:none; }
html.lg-joined .tool-row .tool-onlist, html.lg-joined .mrow .tool-onlist { display:inline; }
/* ON THE LIST is a little wider than the WAITLIST pill; this keeps "Bitcoin Legacy" on one line at 1440 */
html.lg-joined .c-tools .tool-row[data-pulse-tool="bitcoin-legacy"] { gap:calc(8 * var(--u)); }
.tool-row .tool-onlist { letter-spacing:-0.02em; }
/* Phone jump bar: Legacy while the card shows, Tools after */
html:not(.lg-off) .jump-tools, html.lg-off .jump-legacy { display:none; }
/* Footer: All free tools, always shown */
.desk-foot a.foot-tools { color:var(--color-primary); }
.desk-foot a.foot-tools:hover { color:#ffb35c; }
#hTools:focus { outline:none; }
#hTools:focus-visible { outline:2px solid var(--color-primary); outline-offset:3px; }

/* The card: 538 x 184 at 1440 x 900, three columns (letter 58, copy, form 188) */
.c-legacy {
    gap:calc(10 * var(--u)); padding:calc(14 * var(--u)) calc(18 * var(--u));
    border-color:#5a3d14; background:linear-gradient(160deg, #1d140a 0%, var(--color-card-bg) 55%);
}
.c-legacy [hidden] { display:none !important; }
.c-legacy .lg-head { align-items:center; }
.lg-tags { min-width:0; display:flex; align-items:center; gap:calc(10 * var(--u)); }
.c-legacy .card-label { color:var(--color-primary); }
.lg-close {
    flex:none; width:calc(28 * var(--u)); height:calc(28 * var(--u)); margin:calc(-6 * var(--u)) calc(-8 * var(--u)) calc(-6 * var(--u)) 0;
    display:grid; place-items:center; padding:0; border:0; border-radius:calc(8 * var(--u));
    background:transparent; color:var(--color-text-muted); cursor:pointer;
}
.lg-close svg { width:calc(14 * var(--u)); height:calc(14 * var(--u)); }
.lg-close:hover { background:rgba(255,255,255,0.06); color:var(--color-text); }
.lg-close:focus-visible { outline-offset:0; }
.lg-body {
    flex:1; min-height:0; display:grid; align-items:center; gap:calc(16 * var(--u));
    grid-template-columns:calc(58 * var(--u)) minmax(0, 1fr) calc(188 * var(--u));
    grid-template-areas:"letter copy form";
}
/* The Legacy Letter thumbnail: a small cream page drawn in CSS */
.lg-letter {
    grid-area:letter; width:calc(58 * var(--u)); height:calc(74 * var(--u)); padding:calc(6 * var(--u));
    display:flex; flex-direction:column; gap:calc(2 * var(--u));
    background:#fbf9f4; border-radius:3px; transform:rotate(-4deg);
    box-shadow:0 calc(8 * var(--u)) calc(18 * var(--u)) rgba(0,0,0,0.55);
}
.c-legacy.is-joined .lg-letter { transform:rotate(3deg); }
.lg-letter b { margin-bottom:calc(1 * var(--u)); font-family:var(--serif); font-weight:400; font-size:calc(8.1 * var(--u)); line-height:1; color:#1b1a17; }
.lg-letter i { display:block; flex:none; width:92%; height:calc(2 * var(--u)); border-radius:1px; background:#cfc7b8; }
.lg-letter i:nth-of-type(2) { width:78%; }
.lg-letter i:nth-of-type(3) { width:88%; }
.lg-letter i:nth-of-type(4) { width:60%; }
.lg-letter i.lg-hl { width:70%; height:calc(3 * var(--u)); background:#fde7b0; }
.lg-letter i:nth-of-type(6) { width:84%; }
.lg-letter i:nth-of-type(7) { width:50%; }
.lg-copy, .lg-done-copy { grid-area:copy; min-width:0; display:flex; flex-direction:column; gap:calc(6 * var(--u)); }
.lg-title {
    margin:0; font-family:var(--serif); font-weight:400; font-size:calc(18 * var(--u)); line-height:1.12;
    color:var(--color-text); text-wrap:balance;
}
.lg-done-copy .lg-title { font-size:calc(20 * var(--u)); }
.lg-title:focus, .lg-ok:focus { outline:none; }
.lg-title:focus-visible, .lg-ok:focus-visible { outline:2px solid var(--color-primary); outline-offset:3px; }
.lg-sub { margin:0; font-size:calc(11.5 * var(--u)); line-height:1.4; color:var(--color-text-muted); }
.lg-form, .lg-done-side { grid-area:form; min-width:0; display:flex; flex-direction:column; }
.lg-form { gap:calc(5 * var(--u)); margin:0; }
.lg-price { margin:0; font-size:calc(12 * var(--u)); color:var(--color-text-muted); white-space:nowrap; }
.lg-price strong { font-size:calc(15 * var(--u)); font-weight:700; color:var(--color-text); }
.lg-price s { color:var(--color-text-dim); }
.lg-input {
    width:100%; height:calc(32 * var(--u)); padding:0 calc(10 * var(--u));
    background:var(--ink); border:1px solid #3a3732; border-radius:calc(8 * var(--u));
    color:var(--color-text); font-family:var(--sans); font-size:calc(13 * var(--u));
}
.lg-input::placeholder { color:var(--color-text-dim); }
.lg-input:focus { outline:2px solid var(--color-primary); outline-offset:0; border-color:transparent; }
.lg-input[aria-invalid="true"] { border-color:var(--color-negative); }
.lg-input[aria-invalid="true"]:focus { outline-color:var(--color-negative); }
.lg-btn {
    height:calc(32 * var(--u)); padding:0 calc(10 * var(--u)); border:0; border-radius:calc(8 * var(--u));
    background:var(--color-primary); color:#140c02; cursor:pointer;
    font-family:var(--sans); font-size:calc(13 * var(--u)); font-weight:700;
}
.lg-btn:hover:not(:disabled) { background:#ffa53d; }
.lg-btn:disabled { opacity:0.7; cursor:progress; }
.lg-note { margin:0; font-size:calc(11 * var(--u)); color:var(--color-text-dim); text-align:center; }
.lg-err { margin:0; font-size:calc(12 * var(--u)); line-height:1.3; color:var(--color-negative); }
.lg-err a { color:inherit; text-decoration:underline; text-underline-offset:2px; }
/* Errors take the note's place; a failed send also drops the price line to make room */
.lg-form.is-invalid .lg-note, .lg-form.is-failed .lg-note, .lg-form.is-failed .lg-price { display:none; }
.lg-ok {
    margin:0; display:flex; align-items:center; gap:calc(6 * var(--u));
    font-size:calc(13 * var(--u)); font-weight:700; color:var(--color-positive);
}
.lg-ok svg { flex:none; width:calc(14 * var(--u)); height:calc(14 * var(--u)); }
.lg-done-side { gap:calc(10 * var(--u)); }
.lg-done-side p { margin:0; font-size:calc(12 * var(--u)); line-height:1.4; color:var(--color-text-muted); }
.lg-more { align-self:flex-start; font-size:calc(12 * var(--u)); font-weight:700; color:var(--color-primary); text-decoration:none; }
.lg-more:hover { text-decoration:underline; }

/* 1280 to 1439 wide: no thumbnail */
@media (min-width:1280px) and (max-width:1439px) and (min-height:820px) {
    .lg-body { grid-template-columns:minmax(0, 1fr) calc(188 * var(--u)); grid-template-areas:"copy form"; }
    .lg-letter { display:none; }
}
/* Under 900 tall on the Desk: no "One email" line, two lines of supporting copy */
@media (min-width:1280px) and (min-height:820px) and (max-height:899px) {
    .lg-note { display:none; }
    .lg-sub { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; }
    .c-legacy { gap:calc(8 * var(--u)); }
    .lg-form { gap:calc(4 * var(--u)); }
    .lg-price, .lg-err { line-height:1.1; }
}

/* The undo toast after closing the card */
.lg-toast { position:fixed; z-index:210; left:50%; bottom:calc(20px + var(--lg-lift, 0px)); transform:translateX(-50%); }
.lg-toast-box {
    display:flex; align-items:center; gap:14px; padding:10px 14px 10px 16px;
    background:#242220; border:1px solid #3a3732; border-radius:10px; box-shadow:0 12px 30px rgba(0,0,0,0.5);
    font-family:var(--sans); font-size:13px; line-height:1.3; color:var(--color-text); white-space:nowrap;
    animation:fb-rise 0.22s ease-out;
}
.lg-toast-box[hidden] { display:none; }
.lg-undo {
    flex:none; height:30px; padding:0 12px; border:1px solid #3a3732; border-radius:8px; cursor:pointer;
    background:transparent; color:var(--color-primary); font-family:var(--sans); font-size:13px; font-weight:700;
}
.lg-undo:hover { border-color:var(--color-primary); }
/* Reduced motion: no slide, it just appears */
@media (prefers-reduced-motion: reduce) {
    .lg-toast-box { animation:none !important; }
}

/* Phones: full width, after the sections and before Bitcoin Weekly */
@media (max-width:1023px) {
    html:not(.lg-off) .desk {
        grid-template-areas:
            "price  price"
            "read   read"
            "fg     etf"
            "fees   net"
            "msec   msec"
            "legacy legacy"
            "weekly weekly";
    }
    html:not(.lg-off) #m-tools, html:not(.lg-off) .legacy-teaser { display:none; }
    /* Network is the last visible section while Tools is away */
    html:not(.lg-off) #m-network .msec-btn[aria-expanded="false"] { border-bottom:1px solid var(--color-card-border); }
    /* The card is past the sections, where the sticky jump bar has scrolled away with them, so the
       Legacy jump link lands it just under the header (a 130px margin would leave the bar half cut) */
    .c-legacy { margin-top:20px; padding:18px; gap:12px; scroll-margin-top:80px; }
    .lg-close { width:44px; height:44px; margin:-12px -12px -12px 0; }
    .lg-close svg { width:16px; height:16px; }
    .lg-body {
        grid-template-columns:64px minmax(0, 1fr); gap:12px 16px;
        grid-template-areas:"letter title" "sub sub" "form form";
    }
    .lg-copy { display:contents; }
    .lg-copy .lg-title, .lg-done-copy { grid-area:title; }
    .lg-sub, .lg-done-side { grid-area:sub; }
    .lg-form { grid-area:form; gap:8px; }
    .lg-letter { width:64px; height:82px; }
    .lg-letter b { font-size:9px; }
    .lg-title, .lg-done-copy .lg-title { font-size:22px; }
    .lg-sub { font-size:14px; line-height:1.45; color:#cfc9bf; }
    .lg-price { margin-bottom:4px; font-size:13px; }
    .lg-price strong { font-size:inherit; }
    .lg-input, .lg-btn { height:48px; border-radius:10px; font-size:16px; }
    .lg-input { padding:0 14px; }
    .lg-note { font-size:12px; text-align:left; }
    .lg-err { font-size:14px; }
    .lg-ok { font-size:15px; }
    .lg-ok svg { width:16px; height:16px; }
    .lg-done-side { gap:4px; }
    .lg-done-side p { font-size:14px; line-height:1.45; color:#cfc9bf; }
    .lg-more { min-height:44px; display:inline-flex; align-items:center; font-size:15px; }
    .lg-toast { left:12px; right:12px; bottom:calc(12px + env(safe-area-inset-bottom) + var(--lg-lift, 0px)); transform:none; }
    .lg-toast-box { justify-content:space-between; max-width:480px; margin:0 auto; font-size:14px; white-space:normal; }
    .lg-undo { height:44px; padding:0 16px; font-size:14px; }
}

/* ═══ WALL (TV view) ═══
   A full-screen layer drawn from the same data, readable from about 3 meters.
   --w is one design pixel of the 1920x1080 reference, so every size scales
   with the screen. Small text never drops below 20px, even under 1080p. */
.wall[hidden] { display:none !important; }
body.pulse-wall { overflow:hidden; }
/* Wall shows nothing else: no header, Share, subscribe bar or page below */
body.pulse-wall > :not(.wall):not(script):not(style):not(template) { display:none !important; }
.wall {
    --w:min(calc(100vw / 1920), calc(100vh / 1080));
    position:fixed; inset:0; z-index:200; overflow:hidden;
    background:var(--color-background); color:var(--color-text);
    font-family:var(--sans); font-variant-numeric:tabular-nums;
}
.wall-frame {
    position:absolute; inset:0;
    display:flex; flex-direction:column; gap:calc(28 * var(--w));
    padding:calc(36 * var(--w)) calc(56 * var(--w)) calc(40 * var(--w));
}
/* A set line height keeps the header from growing when the web fonts swap in */
.wall-head { flex:none; display:flex; align-items:center; justify-content:space-between; gap:calc(24 * var(--w)); line-height:1.2; }
.wall-logo { font-family:var(--serif); font-size:max(20px, calc(36 * var(--w))); line-height:1.4; }
.wall-logo em { color:var(--color-primary); }
.wall-live {
    display:inline-flex; align-items:center; gap:calc(12 * var(--w));
    font-family:var(--mono); font-size:max(20px, calc(22 * var(--w))); letter-spacing:0.06em; color:var(--color-text-muted);
}
.wall-dot { width:calc(12 * var(--w)); height:calc(12 * var(--w)); border-radius:999px; background:var(--color-primary); }
.wall-live[data-state="stale"] .wall-dot, .wall-live[data-state="loading"] .wall-dot { background:var(--color-text-dim); }
.wall-live[data-state="down"] .wall-dot { background:var(--color-negative); }
.wall-pos {
    display:flex; align-items:center; gap:calc(20 * var(--w));
    font-family:var(--mono); font-size:max(20px, calc(20 * var(--w))); color:var(--color-text-dim);
}
.wall-pos-name.is-on { color:var(--color-text); }
.wall-pos-dots { display:flex; gap:calc(8 * var(--w)); }
.wall-pos-dots i { width:calc(10 * var(--w)); height:calc(6 * var(--w)); border-radius:3px; background:#3a3732; transition:width 0.4s ease, background 0.4s ease; }
.wall-pos-dots i.is-on { width:calc(28 * var(--w)); background:var(--color-primary); }
.wall.is-still .wall-pos-name:not(.is-on), .wall.is-still .wall-pos-dots { display:none; }

/* Scenes crossfade in place */
.wall-stage { position:relative; flex:1; min-height:0; }
.wall-scene {
    position:absolute; inset:0; display:flex; gap:calc(32 * var(--w));
    opacity:0; visibility:hidden; transition:opacity 0.4s ease, visibility 0s linear 0.4s;
}
.wall-scene.is-on { opacity:1; visibility:visible; transition:opacity 0.4s ease, visibility 0s; }

.wcard {
    position:relative; min-width:0; min-height:0; overflow:hidden;
    display:flex; flex-direction:column; justify-content:space-between; gap:calc(12 * var(--w));
    padding:calc(28 * var(--w)) calc(32 * var(--w));
    background:var(--color-card-bg); border:1px solid var(--color-card-border); border-radius:calc(20 * var(--w));
}
.w-col { flex:1; min-width:0; display:flex; flex-direction:column; gap:calc(24 * var(--w)); }
.w-col > .wcard { flex:1; }
.w-wide { flex:1.4; }
.w-head {
    display:flex; justify-content:space-between; gap:calc(16 * var(--w));
    font-family:var(--mono); font-size:max(20px, calc(22 * var(--w))); letter-spacing:0.08em; text-transform:uppercase; color:var(--color-text-muted);
}
.wall .fresh { font-size:max(20px, calc(22 * var(--w))); color:var(--color-text-dim); }
.w-val { font-size:calc(104 * var(--w)); font-weight:600; line-height:1; }
.w-val-mid { font-size:calc(72 * var(--w)); }
.w-val-block { font-size:calc(88 * var(--w)); }
.w-unit { font-size:calc(44 * var(--w)); font-weight:500; }
.w-ctx { font-size:max(20px, calc(26 * var(--w))); color:var(--color-text-muted); }
.w-ctx:empty::before { content:'\00a0'; }   /* holds the line until the data fills it */
.w-row { display:flex; align-items:flex-end; justify-content:space-between; gap:calc(16 * var(--w)); }

/* Overview: price panel */
.w-price { flex:1.75; padding:calc(40 * var(--w)) calc(44 * var(--w)); border-top:3px solid var(--color-accent-line); }
.w-price-top { display:flex; flex-direction:column; gap:calc(16 * var(--w)); }
.w-label { font-family:var(--mono); font-size:max(20px, calc(24 * var(--w))); letter-spacing:0.12em; color:var(--color-text-muted); }
.w-price-big { align-self:flex-start; font-size:calc(196 * var(--w)); line-height:0.95; font-weight:600; letter-spacing:-0.03em; }
.w-chg { display:flex; gap:calc(24 * var(--w)); font-size:calc(44 * var(--w)); font-weight:500; }
.w-chg-when { color:var(--color-text-muted); font-weight:400; }
.w-chart { position:relative; flex:1; min-height:calc(120 * var(--w)); max-height:calc(260 * var(--w)); }
.w-chart canvas { position:absolute; inset:0; width:100%; height:100%; }
.w-stats { display:flex; gap:calc(56 * var(--w)); font-size:max(20px, calc(26 * var(--w))); color:var(--color-text-muted); }
.w-stats b { color:var(--color-text); font-weight:500; }
/* On the Wall the scale is a plain track; the word names the zone */
.w-scale { gap:0; }
.w-scale .z { height:calc(10 * var(--w)); border-radius:0; background:#2c2925; }
.w-scale .z1 { border-radius:calc(5 * var(--w)) 0 0 calc(5 * var(--w)); }
.w-scale .z5 { border-radius:0 calc(5 * var(--w)) calc(5 * var(--w)) 0; }
.wall .is-loading .fg-marker { display:none; }
.w-scale .fg-marker { top:calc(-6 * var(--w)); width:calc(6 * var(--w)); height:calc(22 * var(--w)); margin-left:calc(-3 * var(--w)); }

/* Network: recent blocks list, next blocks bars, hashrate, difficulty */
.w-list { flex:1; min-height:0; display:grid; grid-template-columns:minmax(0, 1fr); }
.w-blocks { grid-template-rows:repeat(5, minmax(0, 1fr)); }
.w-whales { grid-template-rows:repeat(3, minmax(0, 1fr)); }
.wall .block-row { gap:calc(20 * var(--w)); }
.wall .block-tile { width:calc(64 * var(--w)); height:calc(64 * var(--w)); border-radius:calc(12 * var(--w)); }
.wall .block-h { font-size:calc(40 * var(--w)); }
.wall .block-ago, .wall .block-meta { font-size:max(20px, calc(24 * var(--w))); }
.w-next { flex:1; display:flex; flex-direction:column; justify-content:space-evenly; }
.wall .next-row { gap:calc(16 * var(--w)); font-size:max(20px, calc(26 * var(--w))); }
.wall .next-k { width:calc(64 * var(--w)); }
.wall .next-bar { height:calc(26 * var(--w)); border-radius:calc(6 * var(--w)); }
.wall .next-v { min-width:calc(150 * var(--w)); }
.w-spark { width:calc(260 * var(--w)); height:calc(70 * var(--w)); flex:none; }

/* Flows: ETF bars, whales, supply */
.w-etf-head { display:flex; align-items:baseline; gap:calc(20 * var(--w)); flex-wrap:wrap; }
.w-etf-bars { flex:1; min-height:calc(160 * var(--w)); gap:calc(16 * var(--w)); }
.wall .etf-day { font-size:max(20px, calc(22 * var(--w))); margin-top:calc(8 * var(--w)); }
.wall .etf-col.is-latest .etf-bar { box-shadow:0 0 0 calc(3 * var(--w)) var(--color-text); }
.wall .whale-row { gap:calc(8 * var(--w)); }
.wall .whale-line { font-size:max(20px, calc(30 * var(--w))); }
.wall .whale-meta { font-size:max(20px, calc(24 * var(--w))); }
.wall .whale-bar { height:calc(6 * var(--w)); }
.w-supply-track { height:calc(16 * var(--w)); }
.w-supply-foot { display:flex; justify-content:space-between; gap:calc(16 * var(--w)); font-family:var(--mono); font-variant-numeric:tabular-nums; }
.w-supply-foot > span:first-child:empty::before { content:'\00a0'; }

/* New tool: TOOL_TEASER's headline beside its QR code */
.wall-scene[hidden], .wall-pos-name[hidden], .wall-pos-dots i[hidden] { display:none; }
.w-tool {
    flex:1; flex-direction:row; align-items:center; gap:calc(64 * var(--w));
    padding:calc(56 * var(--w)) calc(72 * var(--w)); border-top:3px solid var(--color-accent-line);
}
.w-tool-text { flex:1; min-width:0; display:flex; flex-direction:column; gap:calc(24 * var(--w)); }
.w-tool-label { color:var(--color-primary); text-transform:uppercase; }
.w-tool-head { font-family:var(--serif); font-size:calc(88 * var(--w)); line-height:1.1; }
.w-tool-sub { font-size:calc(40 * var(--w)); line-height:1.3; color:var(--color-text-muted); }
.w-tool-url { font-family:var(--mono); font-size:max(20px, calc(30 * var(--w))); color:var(--color-primary); }
.w-tool-qr { flex:none; width:calc(400 * var(--w)); height:calc(400 * var(--w)); }
.w-tool-qr svg { display:block; width:100%; height:100%; border-radius:calc(12 * var(--w)); }

/* The read band, shown under every scene */
.wall-read {
    flex:none; display:flex; align-items:center; gap:calc(36 * var(--w));
    padding:calc(26 * var(--w)) calc(36 * var(--w));
    border:1px solid var(--color-card-border); border-radius:calc(20 * var(--w));
    /* Two lines of the read at full size, or three at the long size, whichever is taller */
    min-height:calc(max(2.6 * max(20px, calc(36 * var(--w))), 3.9 * max(20px, calc(24 * var(--w)))) + 52 * var(--w) + 2px);
}
.w-read-label { flex:none; font-family:var(--mono); font-size:max(20px, calc(22 * var(--w))); letter-spacing:0.1em; text-transform:uppercase; color:var(--color-primary); }
.w-read-text {
    flex:1; min-width:0; margin:0; font-family:var(--serif); font-size:max(20px, calc(36 * var(--w))); line-height:1.3;
    display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden;
}
/* A read that needs more than two lines drops to three smaller ones in the same height (fitWallRead) */
.w-read-text.is-long { font-size:max(20px, calc(24 * var(--w))); -webkit-line-clamp:3; }
/* Under 1280 wide the 20px floor holds the long size up, so the band makes room for a fourth line */
@media (max-width:1279px) {
    .wall-read { min-height:calc(4 * 1.3 * 20px + 52 * var(--w) + 2px); }
    .w-read-text.is-long { -webkit-line-clamp:4; }
}
.w-read-text strong { font-weight:400; }
.w-read-text .read-price { color:var(--color-primary); }
.w-read-text .narrative-up { color:var(--color-positive); }
.w-read-text .narrative-down { color:var(--color-negative); }
.w-read-text .narrative-neutral { color:var(--color-text-muted); }
.w-read-url { flex:none; font-family:var(--mono); font-size:max(20px, calc(20 * var(--w))); color:var(--color-text-dim); }

/* Under 800px tall the 20px text floor needs a little more room in the stacked tiles */
@media (max-height:800px) {
    .wall .w-col { gap:calc(18 * var(--w)); }
    .wall .w-col > .wcard { padding-top:calc(18 * var(--w)); padding-bottom:calc(18 * var(--w)); gap:calc(4 * var(--w)); }
}

/* Wall card states at TV size */
.wall [data-feed].is-down > .state-msg { left:calc(32 * var(--w)); right:calc(32 * var(--w)); top:calc(80 * var(--w)); gap:calc(16 * var(--w)); }
.wall .state-text { font-size:max(20px, calc(30 * var(--w))); }
.wall .state-retry { min-height:calc(56 * var(--w)); padding:0 calc(20 * var(--w)); font-size:max(20px, calc(22 * var(--w))); border-radius:calc(10 * var(--w)); }
.wall .state-stale { font-size:max(20px, calc(26 * var(--w))); }

/* Leave button: shown for 3 seconds on entry and whenever the pointer moves, then fades.
   The cursor hides with it, so an idle TV shows only data. */
.wall.is-idle, .wall.is-idle * { cursor:none; }
.wall-esc {
    position:absolute; left:50%; bottom:calc(120 * var(--w)); transform:translateX(-50%);
    min-height:44px; padding:calc(14 * var(--w)) calc(24 * var(--w)); border-radius:calc(12 * var(--w));
    background:rgba(21,20,19,0.94); border:1px solid var(--color-card-border); cursor:pointer;
    font-family:var(--mono); font-size:max(20px, calc(22 * var(--w))); color:var(--color-text-muted);
    transition:opacity 0.6s ease;
}
.wall-esc:hover { color:var(--color-text); border-color:var(--color-primary); }
.wall-esc.is-faded { opacity:0; pointer-events:none; }
.wall-esc.is-faded:focus-visible { opacity:1; pointer-events:auto; }

/* ═══ BELOW THE FOLD ═══ */
.bf-section {
    position:relative; max-width:1100px; margin:48px auto 0; padding:24px 28px;
    background:var(--color-card-bg); border:1px solid var(--color-card-border); border-radius:14px;
}
.bf-head { display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; margin-bottom:12px; }
.bf-title { margin:0; font-family:var(--serif); font-weight:400; font-size:24px; color:var(--color-text); }
.news-filters { display:flex; gap:2px; padding:3px; background:var(--color-background); border-radius:10px; }
.news-filter-btn {
    min-height:36px; padding:0 12px; border:0; border-radius:7px; background:transparent; cursor:pointer;
    font-family:var(--mono); font-size:12px; letter-spacing:0.04em; color:var(--color-text-muted);
}
.news-filter-btn:hover { color:var(--color-text); }
.news-filter-btn[aria-pressed="true"] { background:#2a2825; color:var(--color-text); }
.news-list { display:flex; flex-direction:column; }
.news-item {
    display:flex; align-items:center; gap:12px; padding:10px 0;
    border-top:1px solid var(--color-divider); color:var(--color-text); text-decoration:none; font-size:15px;
}
.news-item:hover .news-title { color:var(--color-primary); }
.news-title { flex:1; min-width:0; }
.news-source, .news-time { flex:none; font-family:var(--mono); font-size:12px; color:var(--color-text-dim); white-space:nowrap; }
.news-new {
    flex:none; padding:2px 6px; border-radius:4px; background:var(--color-primary); color:#140c02;
    font-family:var(--mono); font-size:11px;
}
.news-empty { padding:12px 0; font-size:14px; color:var(--color-text-muted); }
.ms-grid { display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:16px; }
.ms-tile {
    position:relative; min-width:0; min-height:132px; display:flex; flex-direction:column; gap:10px;
    padding:16px 18px; background:#1b1a18; border:1px solid var(--color-card-border); border-radius:12px;
}
.ms-v { align-self:flex-start; font-size:20px; font-weight:600; font-variant-numeric:tabular-nums; }
.ms-tile .card-head { flex-wrap:wrap; row-gap:2px; }
.ms-tile .card-label { white-space:nowrap; }
.ms-spark { display:block; width:100%; height:40px; }
.ms-spark[hidden] { display:none; }
.ms-note { font-size:13px; line-height:1.4; color:var(--color-text-muted); }
.ms-note:empty { display:none; }
@media (max-width:1100px) { .ms-grid { grid-template-columns:repeat(2, minmax(0, 1fr)); } }
.ln-stats { display:grid; grid-template-columns:repeat(6, minmax(0, 1fr)); gap:16px; }
.ln-stat { display:flex; flex-direction:column; gap:4px; }
.ln-stat .stat-v { font-size:20px; font-weight:600; }
@media (max-width:900px) { .ln-stats { grid-template-columns:repeat(3, minmax(0, 1fr)); } }
@media (max-width:520px) { .ln-stats { grid-template-columns:repeat(2, minmax(0, 1fr)); } }

/* Share this dashboard */
.pulse-share { max-width:1100px; margin:48px auto 0; padding:0 28px; text-align:center; }
.pulse-share-label {
    font-family:var(--mono); font-size:12px; letter-spacing:0.12em; text-transform:uppercase;
    color:var(--color-text-muted); margin-bottom:12px;
}
.pulse-share-row { display:flex; justify-content:center; gap:8px; flex-wrap:wrap; }
.pulse-share-btn {
    min-height:40px; padding:0 16px; display:inline-flex; align-items:center;
    font-family:var(--mono); font-size:13px; color:var(--color-text-muted); text-decoration:none;
    background:none; border:1px solid var(--color-card-border); border-radius:10px; cursor:pointer;
    transition:color 0.15s, border-color 0.15s, background 0.15s;
}
.pulse-share-btn:hover { color:var(--color-text); border-color:#3a3732; background:var(--color-card-bg); }
.tool-subscribe { margin-top:48px; }

/* About and FAQ */
.edu-wrapper { max-width:720px; margin:0 auto; padding:3rem 2rem 2rem; scroll-margin-top:calc(70 * var(--u)); }
.edu-section { margin-bottom:2.5rem; }
.edu-eyebrow {
    font-family:var(--mono); font-size:12px; letter-spacing:0.16em; text-transform:uppercase;
    color:var(--color-primary); margin-bottom:0.75rem;
}
.edu-title { font-family:var(--serif); font-size:clamp(1.4rem, 2.5vw, 1.8rem); font-weight:400; color:var(--color-text); margin:0 0 1rem; }
.faq-item { border-bottom:1px solid var(--color-divider); }
.faq-item:last-child { border-bottom:0; }
.faq-q {
    width:100%; min-height:48px; margin:0; padding:1rem 0; display:flex; justify-content:space-between; align-items:center; gap:1rem;
    background:none; border:0; text-align:left; line-height:1.4;
    font-family:var(--sans); font-weight:600; font-size:1rem; color:var(--color-text); cursor:pointer;
    transition:color 0.2s;
}
.faq-q:hover { color:var(--color-primary); }
.faq-q::after {
    content:'+'; content:'+' / ''; flex-shrink:0; font-family:var(--mono); font-size:1.2rem; color:var(--color-text-muted);
    transition:transform 0.25s ease;
}
.faq-item.open .faq-q::after { content:'\2212'; content:'\2212' / ''; transform:rotate(180deg); }
.faq-a {
    max-height:0; overflow:hidden; padding:0;
    font-family:var(--sans); font-size:0.95rem; line-height:1.7; color:var(--color-text-muted);
    transition:max-height 0.3s ease, padding 0.3s ease;
}
.faq-item.open .faq-a { max-height:500px; padding:0 0 1rem; }
.edu-section > .faq-a { max-height:none; overflow:visible; }
.faq-a a, .faq-more-links a { color:var(--color-primary); text-decoration:underline; text-decoration-color:rgba(247,147,26,0.45); text-underline-offset:3px; }
.faq-a a:hover, .faq-more-links a:hover { text-decoration-color:currentColor; }
.faq-more-links {
    margin-top:1rem; padding-top:0.75rem; border-top:1px solid var(--color-divider);
    font-size:0.875rem; color:var(--color-text-muted);
}
.bw-subscribe-input:focus { border-color:var(--color-primary); box-shadow:0 0 0 3px rgba(247,147,26,0.2); outline:none; }

/* Bitcoin Legacy banner: the first section below the dashboard. The vault image has #050505
   baked in, so its tile is exactly that color. Wall hides it with everything else in <main>;
   full-screen Desk hides it here. */
.legacy-teaser {
    max-width:1100px; margin:56px auto 0; padding:24px 40px 24px 24px;
    display:grid; grid-template-columns:260px minmax(0, 1fr) auto; gap:40px; align-items:center;
    background:var(--color-card-bg); border:1px solid #3a2a14; border-radius:18px;
}
body.is-fullscreen .legacy-teaser { display:none; }
.lt-art { width:260px; height:260px; border-radius:12px; overflow:hidden; background:#050505; }
.lt-art picture { display:block; height:100%; }
.lt-art img { display:block; width:100%; height:100%; object-fit:cover; }
.lt-copy { min-width:0; display:flex; flex-direction:column; gap:14px; }
.lt-eyebrow { margin:0; font-family:var(--mono); font-size:12px; letter-spacing:0.12em; text-transform:uppercase; color:var(--color-primary); }
.lt-title { margin:0; font-family:var(--serif); font-weight:400; font-size:44px; line-height:1.05; color:var(--color-text); }
.lt-body { margin:0; max-width:60ch; font-size:18px; line-height:1.5; color:#c9c2b6; }
.lt-status { margin:0; display:flex; align-items:center; gap:8px; font-size:14px; color:var(--color-text-muted); }
.lt-status::before { content:""; flex:none; width:7px; height:7px; border-radius:50%; background:var(--color-primary); }
.lt-actions { min-width:240px; display:flex; flex-direction:column; gap:12px; }
.lt-btn-primary, .lt-btn-secondary { display:flex; align-items:center; justify-content:center; border-radius:12px; text-decoration:none; }
.lt-btn-primary { height:54px; padding:0 26px; background:var(--color-primary); color:#140c02; font-size:17px; font-weight:700; }
.lt-btn-primary:hover { background:#ffa733; color:#140c02; }
.lt-btn-secondary { height:48px; padding:0 22px; border:1px solid #3a3732; color:var(--color-text); font-size:16px; }
.lt-btn-secondary:hover { border-color:var(--color-primary); color:var(--color-text); }
/* Under 1000 wide (Pulse is in its phone layout there): image band, copy, then both buttons full width */
@media (max-width:999px) {
    .legacy-teaser { margin:28px 16px 0; padding:0; grid-template-columns:minmax(0, 1fr); gap:0; border-radius:16px; overflow:hidden; }
    .lt-art { width:auto; height:190px; border-radius:0; }
    .lt-art img { object-position:center 50%; }
    .lt-copy { padding:20px 18px 0; gap:12px; }
    .lt-eyebrow { font-size:11px; }
    .lt-title { font-size:32px; }
    .lt-body { font-size:16px; }
    .lt-status { font-size:13px; }
    .lt-actions { min-width:0; padding:16px 18px 18px; }
    .lt-btn-primary { height:52px; }
    .lt-btn-secondary { height:46px; font-size:15px; }
}
/* Phones: the status line drops "for the waitlist" so it stays on one line */
@media (max-width:560px) { .lt-status-more { display:none; } }
.explore-tools { margin-top:3rem; }

@media (max-width:768px) {
    .bf-section { margin:32px 16px 0; padding:20px 16px; }
    .news-item { flex-wrap:wrap; gap:6px 10px; }
    .news-title { flex-basis:100%; order:3; }
    .pulse-share-row { flex-direction:column; }
    .pulse-share-btn { justify-content:center; min-height:44px; }
    .edu-wrapper { padding:2rem 1rem 1.5rem; }
}

/* ═══ FOCUS AND MOTION ═══ */
:focus-visible { outline:2px solid var(--color-primary); outline-offset:3px; }
.seg-btn:focus-visible, .share-opt:focus-visible, .curr-opt:focus-visible, .news-filter-btn:focus-visible { outline-offset:0; }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration:0.01ms !important;
        animation-iteration-count:1 !important;
        transition-duration:0.01ms !important;
    }
}

/* ═══ FEEDBACK: footer link, one-time invitation, survey (popover on the Desk, sheet on phones) ═══ */
.sr-only {
    position:absolute; width:1px; height:1px; padding:0; margin:-1px;
    overflow:hidden; clip:rect(0, 0, 0, 0); white-space:nowrap; border:0;
}
.foot-end { display:flex; align-items:center; gap:16px; }
.fb-link {
    display:inline-flex; align-items:center; gap:6px; padding:0; border:0; background:none; cursor:pointer;
    font:inherit; color:var(--color-primary);
}
.fb-link svg { width:13px; height:13px; flex:none; }
.fb-link:hover { color:#ffb35c; }

/* The invitation: a small bar, bottom right (bottom center on phones), never modal */
.fb-prompt {
    position:fixed; z-index:210; right:24px; bottom:calc(44px + var(--fb-lift, 0px));
    display:flex; align-items:center; gap:14px; max-width:calc(100vw - 48px);
    padding:12px 12px 12px 18px; background:var(--color-card-bg); border:1px solid #3a3732; border-radius:14px;
    box-shadow:0 8px 28px rgba(0,0,0,0.45); color:var(--color-text);
    animation:fb-rise 0.25s ease-out;
}
.fb-prompt[hidden], body.is-fullscreen .fb-prompt { display:none; }
.fb-prompt.is-tucked { visibility:hidden; pointer-events:none; }
.fb-prompt-t { margin:0; font-size:15px; line-height:1.35; }
.fb-prompt-btns { display:flex; align-items:center; gap:4px; flex:none; }
.fb-prompt-yes, .fb-prompt-no {
    height:40px; padding:0 16px; border:0; border-radius:9px; cursor:pointer;
    font-family:var(--sans); font-size:14px;
}
.fb-prompt-yes { background:var(--color-primary); color:#140c02; font-weight:700; }
.fb-prompt-yes:hover { background:#ffa53d; }
.fb-prompt-no { padding:0 12px; background:transparent; color:var(--color-text-muted); }
.fb-prompt-no:hover { color:var(--color-text); }

/* The survey */
dialog.fb {
    position:fixed; inset:auto 24px 24px auto; margin:0; padding:0; box-sizing:border-box;
    width:420px; max-width:calc(100vw - 32px); max-height:calc(100dvh - 48px); overflow:auto;
    background:var(--color-card-bg); color:var(--color-text);
    border:1px solid #3a3732; border-top:2px solid var(--color-primary); border-radius:16px;
    box-shadow:0 12px 40px rgba(0,0,0,0.5); font-family:var(--sans);
}
dialog.fb[open] { animation:fb-rise 0.22s ease-out; }
dialog.fb::backdrop { background:transparent; }
.fb-grab { display:none; }
.fb-form { display:flex; flex-direction:column; gap:18px; padding:22px; margin:0; }
.fb-form[hidden], .fb-thanks[hidden] { display:none; }
.fb-bot { position:absolute; left:-9999px; width:1px; height:1px; overflow:hidden; }
.fb-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.fb-titles { display:flex; flex-direction:column; gap:4px; }
.fb-title { margin:0; font-family:var(--serif); font-size:24px; font-weight:400; line-height:1.15; }
.fb-title:focus { outline:none; }
.fb-title:focus-visible { outline:2px solid var(--color-primary); outline-offset:3px; }
.fb-sub { margin:0; font-size:13px; color:var(--color-text-muted); }
.fb-count { display:none; font-family:var(--mono); font-size:12px; color:var(--color-text-muted); white-space:nowrap; }
.fb-close {
    flex:none; width:36px; height:36px; display:flex; align-items:center; justify-content:center; cursor:pointer;
    background:transparent; border:1px solid var(--color-card-border); border-radius:8px; color:var(--color-text-muted);
}
.fb-close svg { width:14px; height:14px; }
.fb-close:hover { color:var(--color-text); border-color:#3a3732; }
.fb-step { margin:0; padding:0; border:0; min-width:0; display:flex; flex-direction:column; gap:10px; }
.fb-q { padding:0; margin:0 0 0; font-size:15px; font-weight:600; line-height:1.35; color:var(--color-text); }
fieldset.fb-step > .fb-q { margin-bottom:10px; }
.fb-q:focus { outline:none; }
.fb-hint { font-weight:400; color:var(--color-text-muted); }
.fb-opts { display:flex; flex-wrap:wrap; gap:8px; }
/* Real radios and checkboxes, visually hidden inside their labels; the pill shows the state */
.fb-opt { position:relative; display:inline-flex; cursor:pointer; -webkit-tap-highlight-color:transparent; }
.fb-opt input { position:absolute; inset:0; width:100%; height:100%; margin:0; opacity:0; cursor:pointer; }
.fb-pill {
    display:inline-flex; align-items:center; gap:6px; min-height:36px; padding:0 12px; box-sizing:border-box;
    border:1px solid var(--color-card-border); border-radius:999px; font-size:14px; line-height:1.25; color:var(--color-text);
}
.fb-opt:hover .fb-pill { border-color:#4a463f; }
.fb-tick { display:none; width:12px; height:12px; flex:none; color:var(--color-primary); }
.fb-opt input[type="radio"]:checked + .fb-pill { background:var(--color-text); border-color:var(--color-text); color:#141210; font-weight:600; }
.fb-opt input[type="checkbox"]:checked + .fb-pill { background:rgba(247,147,26,0.16); border-color:var(--color-primary); }
.fb-opt input[type="checkbox"]:checked + .fb-pill .fb-tick { display:block; }
.fb-opt input:focus-visible + .fb-pill { outline:2px solid var(--color-primary); outline-offset:2px; }
.fb-opt input:disabled { cursor:default; }
.fb-opt input:disabled + .fb-pill { opacity:0.4; }
.fb-opt-else .fb-pill { border-style:dashed; border-color:#4a463f; color:var(--color-text-muted); }
.fb-opt-else input:checked + .fb-pill { color:var(--color-text); border-style:solid; }
.fb-else[hidden] { display:none; }
.fb-input {
    box-sizing:border-box; width:100%; padding:10px 12px; background:var(--color-background); color:var(--color-text);
    border:1px solid var(--color-card-border); border-radius:10px; font-family:var(--sans); font-size:14px;
}
.fb-input:focus { outline:2px solid var(--color-primary); outline-offset:0; border-color:transparent; }
input.fb-input { height:40px; padding:0 12px; }
textarea.fb-input { resize:vertical; min-height:76px; line-height:1.4; }
.fb-input::placeholder { color:var(--color-text-dim); }
.fb-chars { align-self:flex-end; margin-top:-4px; font-family:var(--mono); font-size:12px; color:var(--color-text-muted); }
.fb-chars:empty { display:none; }
.fb-email-l { font-size:13px; color:var(--color-text-muted); }
.fb-email-l span { color:var(--color-text-dim); }
.fb-nav { display:none; }
.fb-foot { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.fb-note { margin:0; flex:1 1 160px; font-size:12px; line-height:1.4; color:var(--color-text-dim); }
.fb-err { flex-basis:100%; order:-1; display:flex; align-items:center; justify-content:space-between; gap:12px;
    padding:10px 12px; border:1px solid var(--color-negative); border-radius:10px; font-size:14px; color:var(--color-text); }
.fb-err[hidden] { display:none; }
.fb-retry, .fb-back, .fb-next {
    height:36px; padding:0 14px; cursor:pointer; background:transparent; color:var(--color-text);
    border:1px solid var(--color-primary); border-radius:8px; font-family:var(--sans); font-size:14px; font-weight:500;
}
.fb-back { border-color:var(--color-card-border); color:var(--color-text-muted); }
.fb-send {
    flex:none; height:44px; padding:0 20px; cursor:pointer; background:var(--color-primary); color:#140c02;
    border:0; border-radius:10px; font-family:var(--sans); font-size:15px; font-weight:700;
}
.fb-send:hover:not(:disabled) { background:#ffa53d; }
.fb-send:disabled { background:#3a3732; color:var(--color-text-dim); cursor:default; }
.fb-thanks { position:relative; display:flex; flex-direction:column; gap:10px; padding:22px; }
.fb-thanks .fb-close { position:absolute; top:16px; right:16px; }
.fb-ok { width:28px; height:28px; color:var(--color-positive); }
.fb-thanks-h { margin:0; font-family:var(--serif); font-size:22px; }
.fb-thanks-h:focus { outline:none; }
.fb-thanks-p { margin:0; font-size:14px; line-height:1.5; color:var(--color-text-muted); }

/* Phones: a bottom sheet, one question per screen */
@media (max-width:1023px) {
    .foot-end { flex-direction:column; align-items:flex-start; gap:0; }
    .fb-link { min-height:44px; font-size:14px; }
    .fb-link svg { width:15px; height:15px; }
    .fb-prompt {
        left:12px; right:12px; bottom:calc(12px + env(safe-area-inset-bottom) + var(--fb-lift, 0px));
        flex-wrap:wrap; justify-content:space-between; gap:10px; margin:0 auto; max-width:480px; padding:14px 12px 12px 16px;
    }
    .fb-prompt-t { flex-basis:100%; }
    .fb-prompt-btns { margin-left:auto; }
    .fb-prompt-yes, .fb-prompt-no { height:44px; }
    dialog.fb {
        inset:auto 0 0 0; width:100%; max-width:100%; max-height:92dvh;
        border-radius:20px 20px 0 0; border-bottom:0; border-top:1px solid #3a3732;
        padding-bottom:env(safe-area-inset-bottom);
    }
    dialog.fb::backdrop { background:rgba(0,0,0,0.55); }
    .fb-grab { display:block; width:40px; height:4px; margin:12px auto 0; border-radius:2px; background:#3a3732; }
    .fb-form { padding:12px 18px 22px; gap:14px; }
    .fb-sub { display:none; }
    .fb-title { font-size:21px; }
    .fb-head { align-items:center; }
    .fb-count { display:inline; margin-left:auto; }
    .fb-close { width:44px; height:44px; }
    .fb-n { display:none; }
    /* One step at a time: the form's data-step picks it; Send waits for the last step */
    .fb-form[data-step="1"] .fb-step:not([data-step="1"]),
    .fb-form[data-step="2"] .fb-step:not([data-step="2"]),
    .fb-form[data-step="3"] .fb-step:not([data-step="3"]) { display:none; }
    .fb-form:not([data-step="3"]) .fb-foot { display:none; }
    .fb-opts { flex-direction:column; flex-wrap:nowrap; }
    .fb-opt { display:flex; }
    .fb-pill { width:100%; min-height:44px; padding:0 14px; border-radius:10px; font-size:15px; }
    .fb-nav { display:flex; justify-content:space-between; gap:12px; margin-top:4px; }
    .fb-form:not(.has-use) .fb-nav-1 { display:none; }
    .fb-retry, .fb-back, .fb-next { height:44px; padding:0 18px; }
    .fb-next { margin-left:auto; background:var(--color-primary); border-color:var(--color-primary); color:#140c02; font-weight:700; }
    input.fb-input { height:44px; font-size:16px; }
    textarea.fb-input { font-size:16px; }
    .fb-foot { flex-direction:column; align-items:stretch; }
    .fb-send { order:1; }
    .fb-note { order:2; flex:none; text-align:center; }
    .fb-send { width:100%; height:48px; }
    .fb-thanks { padding:22px 18px 28px; }
    .fb-thanks .fb-close { top:12px; right:12px; }
}

@keyframes fb-rise { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:none; } }
@keyframes fb-fade { from { opacity:0; } to { opacity:1; } }
/* Reduced motion: no slide, just a short fade */
@media (prefers-reduced-motion: reduce) {
    dialog.fb[open], .fb-prompt:not([hidden]) { animation:fb-fade 0.2s ease-out !important; }
}
