/* Nexus Tracker: site styles
   Theme: near-black with periwinkle and magenta, white pill buttons, deep-navy cards.
   Every color lives in :root. Gold survives only in the logo mark. */

:root {
  color-scheme: dark;
  --bg: #101115;
  --surface: #161a26;
  --surface-2: #1f2435;
  --card: linear-gradient(165deg, #1c2133 0%, #151926 100%);
  --ink: #eef1f8;
  --muted: #8d96ad;
  --line: #222738;
  --line-strong: #323951;

  --accent: #96b2ff;          /* periwinkle: links, focus, active states */
  --accent-strong: #b4c8ff;
  --on-accent: #101115;
  --up: var(--accent);        /* price rising */
  --down: #e167df;            /* price falling (magenta) */

  --font-display: "Commissioner", "Segoe UI", system-ui, sans-serif;
  --font-body: "Commissioner", "Segoe UI", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.55 var(--font-body);
  font-variant-numeric: tabular-nums;
}

a { color: inherit; }
a:hover { text-decoration-color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

h1, h2, h3 { font-family: var(--font-display); margin: 0; line-height: 1.15; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.7rem, 1.2rem + 2vw, 2.3rem); font-weight: 700; }
h2 { font-size: 1.35rem; font-weight: 700; }
h3 { font-size: 1.05rem; font-weight: 600; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--on-accent); padding: 8px 12px; border-radius: 6px; z-index: 10; }
.skip:focus { left: 8px; }

/* ---------- header ---------- */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.bar { display: flex; align-items: center; gap: 12px 32px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 700 1.3rem var(--font-display); letter-spacing: -0.02em; text-decoration: none; white-space: nowrap; }
.brand-mark { display: block; width: 28px; height: 28px; flex: none; }
.main-nav { display: flex; gap: 24px; }
.acct { display: flex; align-items: center; gap: 20px; margin-left: auto; }
.main-nav a, .acct a:not(.btn) { text-decoration: none; color: var(--muted); font-weight: 500; padding: 6px 0; border-bottom: 2px solid transparent; }
.main-nav a:hover, .acct a:not(.btn):hover { color: var(--ink); }
.btn .short { display: none; }
.acct a.help-btn { display: none; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--ink); font-weight: 700; }
.main-nav a[aria-current="page"], .acct a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

/* ---------- movers ladder ---------- */
.movers {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  margin: 28px 0 40px;
  padding: 24px 28px 20px;
}
.movers-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 24px; margin-bottom: 8px; }
.fresh { display: flex; align-items: center; margin: 0; color: var(--muted); font-size: 0.9rem; }
.live-dot { display: inline-block; width: 8px; height: 8px; margin-right: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(150, 178, 255, 0.2); }

.ladder { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--line); }
.mover {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px 112px;
  align-items: center;
  gap: 8px 32px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.mover:first-child { border-top: 0; }
.mover.up { color: var(--up); }
.mover.down { color: var(--down); }
.mover.flat { color: var(--muted); }

.mover-q { color: var(--ink); }
.mover-q a { font-weight: 500; font-size: 1.05rem; line-height: 1.35; text-decoration: none; display: block; }
.mover-q a:hover { text-decoration: underline; }
.cat { display: block; margin-top: 2px; color: var(--muted); font-size: 0.85rem; }

/* the probability track: 0% to 100%, hollow dot = a day ago, solid dot = now */
.track { position: relative; height: 28px; margin: 0 7px; }
.track::before {
  content: ""; position: absolute; left: -7px; right: -7px; top: 50%;
  height: 4px; margin-top: -2px; background: var(--line); border-radius: 2px;
}
.tick { position: absolute; top: 50%; width: 1px; height: 12px; margin-top: -6px; background: var(--line-strong); }
.seg { position: absolute; top: 50%; height: 4px; margin-top: -2px; background: currentColor; }
.dot { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; }
.dot.prev { background: var(--surface); border: 2px solid currentColor; }
.dot.now { background: currentColor; }

.mover-now { text-align: right; }
.mover-now .price { display: block; font: 700 1.9rem/1 var(--font-display); color: var(--ink); }
.mover-now .delta { display: block; margin-top: 4px; }

.price { font-weight: 600; }
.unit { color: var(--muted); font-weight: 500; }
.delta { font-weight: 600; font-size: 0.9rem; }
.delta.up { color: var(--up); }
.delta.down { color: var(--down); }
.delta.flat { color: var(--muted); font-weight: 500; }

.explain { margin: 0; padding-top: 14px; color: var(--muted); font-size: 0.9rem; max-width: 70ch; }

/* ---------- signals ---------- */
.signals { margin: 0 0 48px; }
.signals-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 24px; }
.sub { margin: 0; color: var(--muted); font-size: 0.95rem; }

.signal-list {
  list-style: none; margin: 16px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px;
}
.signal { padding: 20px 22px 22px; background: var(--card); border: 1px solid var(--line); border-radius: 22px; }

.strength { display: flex; align-items: center; gap: 5px; font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.strength i { display: block; width: 18px; height: 6px; border-radius: 3px; background: var(--line-strong); }
.strength i.on { background: var(--accent); }
.strength span { margin-left: 5px; }

.lean { margin: 12px 0 4px; font: 700 1.2rem/1.2 var(--font-display); }
.signal.up .lean { color: var(--up); }
.signal.down .lean { color: var(--down); }
.sig-q { display: block; font-weight: 500; line-height: 1.4; text-decoration: none; }
.sig-q:hover { text-decoration: underline; }
.sig-facts { margin: 8px 0 0; color: var(--muted); font-size: 0.92rem; }

.how { margin-top: 14px; }
.how summary { cursor: pointer; font-weight: 500; }
.how p { margin: 8px 0 0; max-width: 72ch; color: var(--muted); font-size: 0.92rem; }

.disclaimer {
  margin: 16px 0 0; padding: 14px 18px; max-width: 84ch;
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent);
  border-radius: 16px; font-size: 0.9rem;
}

/* ---------- main layout ---------- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 56px; align-items: start; padding-bottom: 56px; }

.board-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-bottom: 16px; }
.search input {
  width: 240px; max-width: 100%; padding: 10px 18px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  background: var(--surface); color: var(--ink); font: inherit; font-size: 0.95rem;
}
.search input::placeholder { color: var(--muted); }

.tabs { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 4px; padding-bottom: 4px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: none; background: none; border: 1px solid transparent; border-radius: 999px;
  padding: 8px 15px; font: 500 0.95rem var(--font-body); color: var(--muted); cursor: pointer;
}
.tab:hover { color: var(--ink); }
.tab[aria-pressed="true"] { background: var(--surface-2); border-color: var(--line-strong); color: var(--ink); font-weight: 600; }
.tab .n { margin-left: 4px; font-weight: 400; color: var(--muted); }

.group { margin-top: 28px; }
.group h3 { padding: 0 4px 10px; }
.rows { list-style: none; margin: 0; padding: 2px 22px; background: var(--card); border: 1px solid var(--line); border-radius: 22px; }
.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px 56px 72px;
  align-items: center;
  gap: 4px 20px;
  padding: 14px 0;
}
.row:not([hidden]) ~ .row:not([hidden]) { border-top: 1px solid var(--line); }
.row-q { text-decoration: none; line-height: 1.4; }
.row-q:hover { text-decoration: underline; }
.row .price { text-align: right; font-size: 1.05rem; }
.row .delta { text-align: right; }

.spark { display: block; width: 96px; height: 28px; }
.spark polyline { fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.spark.up { color: var(--up); }
.spark.down { color: var(--down); }
.spark.flat { color: var(--muted); }

/* ---------- sidebar ---------- */
.rail section + section { margin-top: 40px; }
.rail h2 { margin-bottom: 8px; padding-bottom: 10px; border-bottom: 1px solid var(--line-strong); }
.posts, .traded { list-style: none; margin: 0; padding: 0; }
.posts li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.posts a { font-weight: 600; line-height: 1.35; text-decoration: none; }
.posts a:hover { text-decoration: underline; }
.posts .when { display: block; margin-top: 2px; color: var(--muted); font-size: 0.85rem; }
.posts p { margin: 6px 0 0; color: var(--muted); font-size: 0.92rem; }
.traded li { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.traded a { text-decoration: none; line-height: 1.4; }
.traded a:hover { text-decoration: underline; }
.traded .price { flex: none; }

.empty { color: var(--muted); max-width: 60ch; }
code { font-size: 0.9em; background: var(--surface); padding: 1px 5px; border-radius: 4px; border: 1px solid var(--line); }

/* ---------- market page ---------- */
.back { display: inline-block; margin-top: 24px; color: var(--muted); font-weight: 500; text-decoration: none; }
.back:hover { color: var(--ink); text-decoration: underline; }
.mhead { margin: 12px 0 24px; }
.mhead .cat { margin: 0 0 6px; font-size: 0.95rem; }
.mhead h1 { max-width: 34ch; }
.badge {
  display: inline-block; margin-left: 10px; padding: 1px 9px; border: 1px solid var(--line-strong);
  border-radius: 999px; font-size: 0.8rem; font-weight: 600; color: var(--muted);
}
.mprice { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-top: 16px; }
.mprice .big { font: 700 clamp(2.6rem, 2rem + 3vw, 3.6rem)/1 var(--font-display); }
.mprice .delta { font-size: 1.1rem; }
.mprice .when { color: var(--muted); }

.chart-panel {
  background: var(--card); border: 1px solid var(--line); border-radius: 24px;
  padding: 18px 26px 22px; margin-bottom: 40px;
}
.chart-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 24px; }
.range { display: flex; gap: 6px; }
.range a { padding: 7px 15px; border: 1px solid transparent; border-radius: 999px; color: var(--muted); font-weight: 500; text-decoration: none; }
.range a:hover { color: var(--ink); }
.range a[aria-current="true"] { background: var(--surface-2); border-color: var(--line-strong); color: var(--ink); font-weight: 600; }
.readout { margin: 0; color: var(--muted); font-size: 0.9rem; }

.chart { margin-top: 10px; color: var(--muted); }
.chart.up { color: var(--up); }
.chart.down { color: var(--down); }
.chart svg { display: block; width: 100%; height: auto; touch-action: pan-y; }
.chart .grid line { stroke: var(--line); }
.chart text { fill: var(--muted); font: 12px var(--font-body); }
.chart .area { fill: currentColor; opacity: 0.12; }
.chart .line { fill: none; stroke: currentColor; stroke-width: 2.25; stroke-linejoin: round; stroke-linecap: round; }
.chart .end, .chart .cursor-dot { fill: currentColor; stroke: var(--surface); stroke-width: 2; }
.chart .cursor { stroke: var(--line-strong); stroke-width: 1; }

.stats { display: flex; flex-wrap: wrap; gap: 8px 40px; margin: 14px 0 0; padding-top: 14px; border-top: 1px solid var(--line); }
.stats dt { color: var(--muted); font-size: 0.85rem; }
.stats dd { margin: 0; font: 600 1.2rem var(--font-display); }
.stats dd.up { color: var(--up); }
.stats dd.down { color: var(--down); }

.main-col > section + section { margin-top: 40px; }
.main-col h2 { margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line-strong); }
.main-col .disclaimer { margin-top: 40px; }
.activity-body.up .lean { color: var(--up); }
.activity-body.down .lean { color: var(--down); }
.activity-body .lean { margin-top: 10px; }
.rail .facts { margin: 0; border-top: 0; }

/* ---------- buttons, forms, account pages, prose ---------- */
.btn {
  display: inline-block; background: #fff; color: var(--bg); border: 0; border-radius: 999px;
  padding: 12px 22px; font: 600 1rem var(--font-body); text-align: center; text-decoration: none; cursor: pointer;
}
.btn:hover { background: #e4ebff; }
.btn-small { padding: 8px 16px; font-size: 0.92rem; white-space: nowrap; }
.btn-block { display: block; width: 100%; margin-top: 24px; }
.btn-quiet { background: none; color: var(--ink); border: 1px solid var(--line-strong); }
.btn-quiet:hover { background: var(--surface-2); }

.auth { max-width: 440px; margin: 48px auto 72px; }
.auth h1 { margin-bottom: 8px; }
.auth h2 { margin: 36px 0 4px; }
.auth .lead { margin: 0 0 8px; color: var(--muted); }
.field { margin-top: 18px; }
.field label { display: block; margin-bottom: 6px; font-weight: 600; }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 14px;
  background: var(--surface); color: var(--ink); font: inherit;
}
.hint { margin: 4px 0 0; color: var(--muted); font-size: 0.88rem; }
.check { display: flex; gap: 10px; align-items: flex-start; margin-top: 22px; }
.check input { flex: none; width: 18px; height: 18px; margin-top: 4px; accent-color: var(--accent); }
.check label { font-size: 0.92rem; }
.alt { margin-top: 20px; color: var(--muted); }
.alt a { color: var(--ink); }
.form-error, .form-ok {
  margin-top: 20px; padding: 12px 16px; background: var(--surface);
  border: 1px solid var(--line); border-left-width: 4px; border-radius: 14px;
}
.form-error { border-left-color: var(--down); }
.form-error ul { margin: 0; padding-left: 18px; }
.form-ok { border-left-color: var(--up); }
.facts { margin: 24px 0 0; border-top: 1px solid var(--line-strong); }
.facts div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 500; text-align: right; overflow-wrap: anywhere; }
.signout { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }

.prose { max-width: 66ch; margin: 48px 0 72px; }
.prose h1 { margin-bottom: 16px; }
.prose h2 { margin: 32px 0 6px; font-size: 1.15rem; }
.prose p { margin: 0 0 12px; }

/* ---------- guide ---------- */
.guide { display: grid; grid-template-columns: 220px minmax(0, 68ch); gap: 64px; align-items: start; margin: 40px 0 80px; }
.toc { position: sticky; top: 88px; }
.toc h2 { margin: 0 0 10px; color: var(--muted); font-size: 0.95rem; font-weight: 600; }
.toc ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc a { display: block; margin-left: -1px; padding: 7px 0 7px 14px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--ink); border-left-color: var(--accent); }
.guide-body h1 { margin-bottom: 12px; }
.guide-body .lead { margin: 0; color: var(--muted); font-size: 1.1rem; }
.guide-body section { margin-top: 48px; scroll-margin-top: 88px; }
.guide-body h2 { margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line-strong); }
.guide-body h3 { margin: 28px 0 6px; font-size: 1.1rem; scroll-margin-top: 88px; }
.guide-body p, .guide-body li, .guide-body dd { line-height: 1.65; }
.guide-body p { margin: 0 0 12px; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li { position: relative; margin: 0 0 14px; padding-left: 44px; counter-increment: step; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--line-strong); color: var(--accent);
  font-weight: 700; line-height: 28px; text-align: center;
}
.plain { margin: 0; padding-left: 1.2em; }
.plain li { margin-bottom: 10px; }
.glossary { margin: 0; }
.glossary dt { margin-top: 22px; font-weight: 700; scroll-margin-top: 88px; }
.glossary dd { margin: 4px 0 0; color: var(--muted); }
.guide-body .disclaimer { margin-top: 28px; }

/* ---------- digest ---------- */
.digest { max-width: 720px; margin: 40px 0 80px; }
.digest h1 { margin-bottom: 8px; }
.digest .lead { margin: 0 0 28px; color: var(--muted); }
.digest-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-strong); }
.entry { padding: 22px 0; border-bottom: 1px solid var(--line); }
.entry-t { font: 700 1.35rem/1.25 var(--font-display); letter-spacing: -0.01em; text-decoration: none; }
.entry-t:hover { text-decoration: underline; }
.entry .when { display: block; margin-top: 4px; color: var(--muted); font-size: 0.88rem; }
.entry p { max-width: 62ch; margin: 10px 0 0; color: var(--muted); }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 28px; color: var(--muted); font-size: 0.92rem; }
.pager a { color: var(--accent); font-weight: 600; text-decoration: none; }
.pager a:hover { text-decoration: underline; }
.digest .disclaimer { margin-top: 40px; }
.rail .more { margin: 12px 0 0; }
.rail .more a { color: var(--accent); font-weight: 600; text-decoration: none; }
.rail .more a:hover { text-decoration: underline; }

/* ---------- post page ---------- */
.post-wrap { max-width: 680px; margin: 0 0 80px; }
.post h1 { margin: 12px 0 16px; font-size: clamp(2rem, 1.5rem + 2.4vw, 2.9rem); line-height: 1.1; }
.standfirst { margin: 0 0 18px; color: var(--muted); font-size: 1.2rem; line-height: 1.5; }
.byline {
  display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 0 0 32px; padding-bottom: 20px;
  border-bottom: 1px solid var(--line-strong); color: var(--muted); font-size: 0.92rem;
}
.post-body { font-size: 1.0625rem; line-height: 1.7; }
.post-body p { margin: 0 0 1.1em; }
.post-body h2 { margin: 2em 0 0.5em; font-size: 1.5rem; }
.post-body h3 { margin: 1.6em 0 0.4em; font-size: 1.2rem; }
.post-body ul, .post-body ol { margin: 0 0 1.1em; padding-left: 1.3em; }
.post-body li { margin-bottom: 0.35em; }
.post-body blockquote { margin: 1.4em 0; padding-left: 18px; border-left: 3px solid var(--line-strong); color: var(--muted); }
.post-body blockquote p { margin: 0; }
.post-body a { color: var(--accent); text-underline-offset: 2px; }
.post-markets { margin-top: 48px; }
.post-markets h2 { margin-bottom: 8px; padding-bottom: 10px; border-bottom: 1px solid var(--line-strong); }
.traded .right { display: flex; align-items: baseline; gap: 12px; flex: none; }
.post-wrap .disclaimer { margin-top: 40px; }
.post-nav { display: flex; justify-content: space-between; gap: 24px; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line-strong); }
.post-nav a { max-width: 48%; font-weight: 600; line-height: 1.35; text-decoration: none; }
.post-nav a:hover { text-decoration: underline; }
.post-nav small { display: block; color: var(--muted); font-weight: 400; }
.post-nav .newer { margin-left: auto; text-align: right; }

/* ---------- admin ---------- */
.admin-wrap { max-width: 860px; margin: 0 0 80px; }
.admin-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin: 8px 0 20px; }
.admin-wrap .back { margin-top: 24px; }
.admin-table-wrap { margin-top: 20px; overflow-x: auto; border-top: 1px solid var(--line-strong); }
.admin-table { width: 100%; min-width: 560px; border-collapse: collapse; }
.admin-table th { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 0.88rem; font-weight: 500; text-align: left; }
.admin-table td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.admin-table .t a { font-weight: 600; text-decoration: none; }
.admin-table .t a:hover { text-decoration: underline; }
.admin-table .slug { display: block; color: var(--muted); font-size: 0.85rem; overflow-wrap: anywhere; }
.admin-table .act { white-space: nowrap; text-align: right; }
.admin-table .act a { margin-left: 14px; color: var(--accent); }
.status {
  display: inline-block; padding: 1px 9px; border: 1px solid var(--line-strong); border-radius: 999px;
  color: var(--muted); font-size: 0.8rem; font-weight: 600;
}
.status.published { border-color: var(--accent); color: var(--accent); }
.status.scheduled { color: var(--ink); }

.editor .field textarea { resize: vertical; line-height: 1.55; }
.editor .field select { appearance: auto; }
.picker { margin: 24px 0 0; padding: 0; border: 0; min-width: 0; }
.picker legend { margin-bottom: 8px; padding: 0; font-weight: 600; }
.picker input[type="search"] {
  width: 100%; padding: 11px 16px; border: 1px solid var(--line-strong); border-radius: 999px;
  background: var(--surface); color: var(--ink); font: inherit;
}
#picker-list { list-style: none; max-height: 280px; margin: 8px 0 0; padding: 0; overflow: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
#picker-list li + li { border-top: 1px solid var(--line); }
#picker-list label { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; cursor: pointer; }
#picker-list input { flex: none; width: 18px; height: 18px; margin-top: 3px; accent-color: var(--accent); }
#picker-list .q { flex: 1; min-width: 0; line-height: 1.4; }
#picker-list em { flex: none; color: var(--muted); font-style: normal; font-weight: 600; }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.actions .spacer { margin-left: auto; }
.view-link { color: var(--accent); }
.btn-danger { background: none; color: var(--down); border: 1px solid var(--down); }
.btn-danger:hover { background: rgba(225, 103, 223, 0.12); }
.preview { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line-strong); }
.preview h2 { margin-bottom: 4px; }

/* ---------- 404 ---------- */
.notfound { max-width: 620px; margin: 56px 0 80px; }
.notfound h1 { margin-bottom: 12px; }
.notfound .lead { margin: 0 0 24px; color: var(--muted); }
.notfound h2 { margin: 36px 0 8px; padding-bottom: 10px; border-bottom: 1px solid var(--line-strong); font-size: 1.15rem; }
.find { display: flex; gap: 10px; }
.find input {
  flex: 1; min-width: 0; padding: 11px 18px; border: 1px solid var(--line-strong); border-radius: 999px;
  background: var(--surface); color: var(--ink); font: inherit;
}
.find .btn { flex: none; }

/* ---------- footer ---------- */
.site-footer { margin-top: 24px; border-top: 1px solid var(--line); padding: 40px 0 36px; color: var(--muted); font-size: 0.9rem; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 32px; }
.foot-brand .brand { color: var(--ink); }
.foot-brand p { margin: 12px 0 0; max-width: 32ch; }
.foot-grid h2 { margin: 0 0 12px; font: 600 0.95rem var(--font-body); letter-spacing: 0; color: var(--ink); }
.foot-grid ul { list-style: none; margin: 0; padding: 0; }
.foot-grid li { margin-bottom: 8px; }
.foot-grid a { color: var(--muted); text-decoration: none; }
.foot-grid a:hover { color: var(--ink); text-decoration: underline; }
.foot-note { margin: 32px 0 0; padding-top: 20px; border-top: 1px solid var(--line); max-width: 80ch; font-size: 0.85rem; }

/* ---------- mobile tab bar ---------- */
.tabbar { display: none; }

/* ---------- narrow screens ---------- */
@media (min-width: 721px) {
  .site-header { position: sticky; top: 0; z-index: 5; }
}
@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .signal-list { grid-template-columns: minmax(0, 1fr); }
  .chart-panel { padding: 14px 14px 18px; }
  .chart text { font-size: 18px; }
  .auth, .prose { margin-top: 32px; }
  .guide { grid-template-columns: minmax(0, 1fr); gap: 28px; margin-top: 28px; }
  .toc { position: static; }
  .toc ul { display: flex; gap: 8px; overflow-x: auto; border-left: 0; padding-bottom: 4px; scrollbar-width: none; }
  .toc ul::-webkit-scrollbar { display: none; }
  .toc a { margin: 0; padding: 7px 14px; border: 1px solid var(--line-strong); border-radius: 999px; white-space: nowrap; }
  .toc a:hover { border-left-color: var(--line-strong); }
  .pair { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  .movers { padding: 20px 18px 16px; margin-top: 16px; border-radius: 22px; }
  .rows { padding: 0 16px; }
  .mover {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "q now" "track track";
    gap: 10px 16px;
  }
  .mover-q { grid-area: q; }
  .mover-now { grid-area: now; }
  .mover-now .price { font-size: 1.6rem; }
  .track { grid-area: track; }
  .row {
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "q q q" "spark price delta";
    gap: 8px 12px;
  }
  .row-q { grid-area: q; }
  .row .spark { grid-area: spark; }
  .row .price { grid-area: price; text-align: right; }
  .row .delta { grid-area: delta; min-width: 4.5em; }
  .bar { min-height: 60px; gap: 12px; }
  .brand { gap: 8px; font-size: 1.1rem; }
  .acct { gap: 8px; }
  .acct .btn-small { padding: 9px 16px; }
  .btn .long { display: none; }
  .btn .short { display: inline; }
  .main-nav, .acct a:not(.btn) { display: none; }
  .acct a.help-btn { display: inline-flex; }
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-brand { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  body { padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    align-items: center; justify-content: space-between; gap: 6px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
    background: rgba(16, 17, 21, 0.92);
    -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
    border-top: 1px solid var(--line);
  }
  .tabbar a {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    min-width: 52px; height: 52px; padding: 0 15px; border-radius: 999px;
    color: var(--muted); font-weight: 600; text-decoration: none;
  }
  .tabbar svg { flex: none; width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar .lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .tabbar a[aria-current="page"] { background: #fff; color: var(--bg); }
  .tabbar a[aria-current="page"] .lbl { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
