/* MarketsOnDeck — Site Design System v2 (2026-09-09 redesign)
   Bright, editorial-financial look — closer to a real financial media site
   (crisp white ground, warm accent, confident type) than a dark trading
   terminal. Dark mode is now opt-in only (data-theme="dark"), never forced
   by OS preference, so the site reads bright and inviting by default the
   way Keith asked for. Semantic green/red for gains/losses always stays
   separate from the brand accent so profit/loss color never collides with
   brand color. */

:root {
  --bg: #FFFFFF;
  --bg-tint: #F7F8FC;
  --surface: #FFFFFF;
  --surface-raised: #F3F5FA;
  --border: #E3E7EF;
  --border-strong: #CBD2E1;
  --text: #12151C;
  --text-muted: #5C6475;
  --accent: #1E2A6B;
  --accent-2: #F2A93B;
  --accent-tint: #E8EAF4;
  --accent-ink: #FFFFFF;
  --gain: #0F9D58;
  --gain-bg: #E7F7EE;
  --loss: #D93B3B;
  --loss-bg: #FCEAEA;
  --focus: #1E2A6B;
  --font-display: "Oswald", ui-sans-serif, sans-serif;
  --font-body: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --container: 1160px;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(18, 21, 28, 0.06), 0 1px 1px rgba(18, 21, 28, 0.04);
  --shadow-md: 0 10px 24px -12px rgba(18, 21, 28, 0.18), 0 2px 6px rgba(18, 21, 28, 0.06);
  --shadow-lg: 0 24px 48px -20px rgba(18, 21, 28, 0.26), 0 4px 12px rgba(18, 21, 28, 0.06);
}

/* Dark mode is opt-in only — set data-theme="dark" on <html> to use it.
   Not driven by prefers-color-scheme, so the site never looks "too dark"
   just because a visitor's OS happens to be in dark mode. */
:root[data-theme="dark"] {
  --bg: #12161F;
  --bg-tint: #161B25;
  --surface: #1A202C;
  --surface-raised: #212837;
  --border: #2C3345;
  --border-strong: #3A4258;
  --text: #ECEEF3;
  --text-muted: #9AA3B7;
  --accent: #7C8BE0;
  --accent-2: #F2B75C;
  --accent-tint: #262B4A;
  --accent-ink: #12161F;
  --gain: #34D07A;
  --gain-bg: #16291F;
  --loss: #F16A6A;
  --loss-bg: #301C1F;
  --focus: #7C8BE0;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 10px 24px -12px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 24px 48px -20px rgba(0, 0, 0, 0.55);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; }
img, svg, video { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1.06;
  text-wrap: balance;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(34px, 5.6vw, 58px); }
h2 { font-size: clamp(24px, 3.6vw, 33px); }
h3 { font-size: clamp(19px, 2.8vw, 22px); }
p { margin: 0 0 1em; max-width: 68ch; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: "";
  width: 7px; height: 7px; border-radius: 999px;
  background: var(--accent-2);
  display: inline-block;
}
.text-muted { color: var(--text-muted); }
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.gain { color: var(--gain); }
.loss { color: var(--loss); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
::selection { background: var(--accent-tint); color: var(--text); }

.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.section { padding: 68px 0; }
.section-tight { padding: 36px 0; }
.row { display: flex; align-items: center; }
.gap-xs { gap: 8px; }
.gap-sm { gap: 12px; }
.gap-md { gap: 20px; }
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 860px) { .grid-3 { grid-template-columns: 1fr; } .grid-2 { grid-template-columns: 1fr; } .grid-4 { grid-template-columns: 1fr; } }
.divider {
  border: none; height: 1px; margin: 44px 0;
  background: linear-gradient(90deg, transparent, var(--border) 15%, var(--border) 85%, transparent);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 600; font-size: 15px; padding: 13px 22px; border-radius: 999px;
  text-decoration: none; border: 1px solid var(--border-strong); color: var(--text);
  background: var(--surface); cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease;
}
.btn:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 78%, var(--accent-2)));
  color: var(--accent-ink); border-color: transparent; box-shadow: var(--shadow-sm);
}
.btn-primary:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 9px;
  box-shadow: var(--shadow-sm);
  display: block; object-fit: cover; flex-shrink: 0;
}
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 19px; text-transform: uppercase; letter-spacing: 0.01em; }
.nav-links { display: flex; gap: 30px; list-style: none; margin: 0; padding: 0; font-size: 14.5px; font-weight: 500; }
.nav-links a { text-decoration: none; color: var(--text-muted); position: relative; padding-bottom: 2px; transition: color .15s ease; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px;
  background: var(--accent-2); border-radius: 999px;
}
.nav-toggle {
  display: none; background: none; border: 1px solid var(--border); border-radius: 8px;
  width: 40px; height: 40px; align-items: center; justify-content: center; color: var(--text);
}
@media (max-width: 780px) {
  .nav-links { position: absolute; top: 100%; left: 0; right: 0; background: var(--surface);
    border-bottom: 1px solid var(--border); box-shadow: var(--shadow-md);
    flex-direction: column; padding: 16px 20px; gap: 16px; display: none; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }
}

/* Footer disclosure — kept minimal by design (small site, per Keith 2026-09-16):
   present on every page, legible, but quiet rather than a loud top banner. */
.footer-disclosure {
  font-size: 11px; color: var(--text-muted); text-align: center;
  margin: 14px 0 0; padding-top: 14px; border-top: 1px solid var(--border);
}
.footer-disclosure a { color: var(--text-muted); text-decoration: underline; }

.hero {
  padding: 76px 0 56px;
  background:
    radial-gradient(1100px 480px at 12% -10%, var(--accent-tint), transparent 60%),
    radial-gradient(900px 420px at 100% 0%, color-mix(in srgb, var(--accent-2) 12%, transparent), transparent 60%);
}
.hero-sub { font-size: 18px; color: var(--text-muted); max-width: 56ch; margin-bottom: 26px; }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; display: flex; flex-direction: column; gap: 12px;
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
a.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.card h3 { margin-bottom: 4px; text-transform: none; letter-spacing: normal; font-weight: 700; }
.card p { font-size: 14.5px; color: var(--text-muted); margin-bottom: 0; }
.card-link { margin-top: auto; font-size: 14px; font-weight: 600; color: var(--accent); text-decoration: none; }
.card-eyebrow {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-muted); font-weight: 600;
}
.badge {
  display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono);
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border); color: var(--text-muted); width: fit-content;
}
.badge-gain { color: var(--gain); border-color: color-mix(in srgb, var(--gain) 45%, var(--border)); background: var(--gain-bg); }
.badge-loss { color: var(--loss); border-color: color-mix(in srgb, var(--loss) 45%, var(--border)); background: var(--loss-bg); }
.badge-accent { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); background: var(--accent-tint); }

.stat-row { display: flex; gap: 32px; flex-wrap: wrap; margin-top: 36px; }
.stat-row-link { text-decoration: none; color: inherit; }
.stat-row-link .stat-card { transition: transform .15s ease, box-shadow .15s ease; }
.stat-row-link:hover .stat-card { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--accent); }
.stat-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 22px; box-shadow: var(--shadow-sm);
}
.stat-num { font-family: var(--font-mono); font-weight: 600; font-size: 27px; font-variant-numeric: tabular-nums; }
.stat-label { font-size: 12.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 2px; }

.site-footer { border-top: 1px solid var(--border); padding: 52px 0 28px; margin-top: 64px; background: var(--surface-raised); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
@media (max-width: 780px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-col h4 { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 14px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { text-decoration: none; color: var(--text); font-size: 14px; }
.footer-col a:hover { color: var(--accent); }
.footer-legal { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--text-muted); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

.prose { font-size: 17px; }
.prose h2 { margin-top: 2em; text-transform: none; letter-spacing: normal; font-size: clamp(22px, 3.4vw, 28px); }
.prose table { width: 100%; border-collapse: collapse; margin: 1.6em 0; font-size: 15px; }
.prose table th, .prose table td { border: 1px solid var(--border); padding: 10px 12px; text-align: left; font-variant-numeric: tabular-nums; }
.prose table th { background: var(--surface-raised); font-family: var(--font-mono); font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.04em; }
.table-scroll { overflow-x: auto; position: relative; }
.table-scroll.has-overflow::after {
  content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 28px;
  background: linear-gradient(270deg, var(--surface-raised), transparent);
  pointer-events: none;
}
.table-scroll-hint {
  font-family: var(--font-mono); font-size: 11.5px; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 6px;
}
.article-meta { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; color: var(--text-muted); font-size: 13.5px; margin-bottom: 28px; }
.article-header { max-width: 74ch; margin: 0 auto 8px; }
.article-body { max-width: 74ch; margin: 0 auto; }

/* Brief archive — sticky side jump-list instead of an inline card, so it
   doesn't keep eating vertical space above the content as entries pile up. */
.brief-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 36px; align-items: start; }
.brief-sidebar {
  position: sticky; top: 84px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow-sm);
}
.brief-sidebar summary { cursor: pointer; list-style: none; }
.brief-sidebar summary::-webkit-details-marker { display: none; }
.brief-sidebar ul { font-size: 13.5px; }
.brief-sidebar li { margin-bottom: 4px; }
@media (max-width: 860px) {
  .brief-layout { grid-template-columns: 1fr; }
  .brief-sidebar { position: static; }
}

.theme-toggle {
  width: 38px; height: 38px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text); margin-left: 6px; transition: border-color .15s ease, transform .15s ease;
  flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--accent); transform: translateY(-1px); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }

/* Ticker system — two rows. Row 1 (.ticker-pinned) is the standing set —
   SPY/QQQ/DIA + BTC/ETH/SOL — always visible, never hidden, on every
   screen size (it horizontally swipe-scrolls on narrow viewports rather
   than disappearing — that's the fix for it going missing on mobile).
   Row 2 (.ticker-strip) is the animated scrolling strip: today's top
   movers plus Keith's own held positions, refreshed by the same
   scheduled job that writes ticker.json. */
.ticker-pinned-wrap {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.ticker-pinned {
  max-width: var(--container); margin: 0 auto;
  display: flex; align-items: stretch; justify-content: center;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.ticker-pinned::-webkit-scrollbar { display: none; }
.ticker-pinned .ticker-item { border-right: 1px solid var(--border); flex-shrink: 0; }
.ticker-pinned .ticker-item:first-child { border-left: none; }
@media (max-width: 700px) {
  .ticker-pinned { justify-content: flex-start; }
}

.ticker-strip {
  border-bottom: 1px solid var(--border);
  background: var(--surface-raised);
  position: relative;
  display: flex;
  align-items: stretch;
}
.ticker-scroll {
  flex: 1 1 auto; min-width: 0; overflow: hidden; position: relative;
}
.ticker-scroll::before, .ticker-scroll::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 36px; z-index: 2; pointer-events: none;
}
.ticker-scroll::before { left: 0; background: linear-gradient(90deg, var(--surface-raised), transparent); }
.ticker-scroll::after { right: 0; background: linear-gradient(270deg, var(--surface-raised), transparent); }
.ticker-track {
  display: flex; width: max-content;
  animation: ticker-scroll 65s linear infinite;
}
/* Only pause-on-hover on devices that actually have hover (mouse/trackpad).
   Touch browsers fake a "hover" on tap with no matching un-hover event, which
   was freezing the scroll permanently after the first touch on mobile. */
@media (hover: hover) {
  .ticker-strip:hover .ticker-track { animation-play-state: paused; }
}
.ticker-item {
  display: flex; align-items: baseline; gap: 8px;
  padding: 9px 22px; font-family: var(--font-mono); font-size: 12.5px; white-space: nowrap;
  border-right: 1px solid var(--border);
  text-decoration: none; color: inherit;
}
.ticker-symbol { font-weight: 700; color: var(--text); }
.ticker-symbol.ticker-held::after { content: "\25CF"; font-size: 6px; color: var(--accent-2); margin-left: 5px; vertical-align: middle; }
.ticker-price { color: var(--text-muted); }
.ticker-change.gain { color: var(--gain); }
.ticker-change.loss { color: var(--loss); }
.ticker-asof {
  display: flex; align-items: center; padding: 9px 16px; font-family: var(--font-mono); font-size: 11px;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; white-space: nowrap; flex-shrink: 0;
  border-right: 1px solid var(--border);
}
@keyframes ticker-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
  .ticker-scroll { overflow-x: auto; }
}

/* Range tabs — Week/Month/YTD switcher for the stat row, shared by Overview
   and The Record. Plain buttons, not real tabs (no separate panels), so
   role="tab" here is a slight simplification but matches the interaction. */
.range-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 24px; }
.range-tab {
  font: inherit; font-family: var(--font-mono); font-size: 12.5px; font-weight: 600;
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text-muted); cursor: pointer;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.range-tab:hover { color: var(--text); }
.range-tab.active { background: var(--accent); border-color: var(--accent); color: var(--surface); }

/* The Record — sortable/filterable trade log */
.record-toolbar {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  margin-top: 28px; margin-bottom: 16px;
}
.record-toolbar input, .record-toolbar select {
  font: inherit; font-size: 14px; padding: 9px 12px; border-radius: 8px;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
}
.record-toolbar input { flex: 1 1 200px; min-width: 160px; }
.record-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.record-table th, .record-table td {
  padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.record-table thead th {
  font-family: var(--font-mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--text-muted); background: var(--surface-raised); cursor: pointer; user-select: none;
  position: sticky; top: 0;
}
.record-table thead th:hover { color: var(--text); }
.record-table thead th .sort-arrow { opacity: 0.35; font-size: 9px; margin-left: 3px; }
.record-table thead th.sort-active .sort-arrow { opacity: 1; color: var(--accent); }
.record-table tbody tr:hover { background: var(--surface-raised); }
.record-table tbody tr.row-flash { animation: row-flash-anim 2.2s ease-out; }
@keyframes row-flash-anim {
  0% { background: var(--accent-tint); }
  100% { background: transparent; }
}
.stat-card-clickable { cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.stat-card-clickable:hover, .stat-card-clickable:focus-visible { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.record-table .badge-type {
  font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.04em;
  padding: 2px 7px; border-radius: 999px; border: 1px solid var(--border); color: var(--text-muted);
}

/* Featured card — used to visually lead with the daily Morning Brief on the homepage */
.card-featured {
  border-color: var(--border-strong);
  background: linear-gradient(180deg, var(--surface), var(--accent-tint) 220%);
  position: relative;
  overflow: hidden;
}
.card-featured::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

/* The Wire — deliberately plain and dense (Drudge-style), a different register
   from the rest of the site on purpose: no cards, no shadows, just headlines
   that link straight out to their real source. Refreshed hourly. */
.wire-top {
  display: block; text-decoration: none; color: var(--text);
  padding: 22px 0; margin-bottom: 8px; border-bottom: 3px double var(--border-strong);
}
.wire-top-image {
  width: 100%; max-height: 340px; object-fit: cover; border-radius: 8px;
  margin-bottom: 16px; border: 1px solid var(--border-strong);
}
.wire-top-label {
  display: block; font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--loss); margin-bottom: 8px;
}
.wire-top-headline {
  display: block; font-family: var(--font-display); font-weight: 700; text-transform: uppercase;
  font-size: clamp(24px, 4.2vw, 40px); line-height: 1.08; letter-spacing: 0.005em;
}
.wire-top:hover .wire-top-headline { color: var(--accent); }
.wire-top-source {
  display: block; margin-top: 10px; font-family: var(--font-mono); font-size: 12.5px; color: var(--text-muted);
}
.wire-list {
  list-style: none; margin: 0; padding: 0;
  column-count: 3; column-gap: 40px;
}
.wire-list li {
  padding: 12px 0; border-bottom: 1px solid var(--border);
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px;
  break-inside: avoid; -webkit-column-break-inside: avoid;
}
@media (max-width: 980px) { .wire-list { column-count: 2; } }
/* Stay dense on phones instead of collapsing to one wide column — Drudge
   itself keeps a multi-column feel even at phone width by shrinking type,
   not by stacking everything into one loose list. Match that instead of
   the more typical "1 column on mobile" pattern. */
@media (max-width: 640px) {
  .wire-list { column-count: 2; column-gap: 18px; }
  .wire-list li { padding: 8px 0; gap: 5px; }
  .wire-list a { font-size: 14px; line-height: 1.3; }
  .wire-tag { font-size: 8.5px; padding: 1px 5px; }
  .wire-source { font-size: 10px; }
}
@media (max-width: 420px) {
  .wire-list a { font-size: 13px; }
  .wire-list li { padding: 7px 0; }
}
.wire-tag {
  flex-shrink: 0; font-family: var(--font-mono); font-size: 10px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent);
  border: 1px solid var(--border-strong); border-radius: 4px; padding: 2px 6px;
}
.wire-list a {
  font-size: 17px; font-weight: 600; color: var(--text); text-decoration: none; line-height: 1.35;
}
.wire-list a:hover { color: var(--accent); text-decoration: underline; }
.wire-source {
  font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); white-space: nowrap;
}
.wire-list li.wire-featured { flex-direction: column; align-items: flex-start; }
.wire-list li.wire-featured .wire-thumb {
  width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: 6px; margin-bottom: 4px;
  border: 1px solid var(--border);
}
.wire-archive-link {
  display: inline-block; margin-top: 18px; font-family: var(--font-mono); font-size: 13px;
  color: var(--text-muted); text-decoration: underline;
}
.wire-archive-link:hover { color: var(--accent); }

/* Wire page layout — main headline column + a narrow sticky sidebar for
   short-lived daily content (currently just "What to Watch Today"). Stacks
   to a single column on narrower screens, sidebar content first since it's
   the most time-sensitive thing on the page. */
.wire-layout { display: grid; grid-template-columns: 1fr 300px; gap: 44px; align-items: start; }
.wire-sidebar { position: sticky; top: 20px; }
@media (max-width: 900px) {
  .wire-layout { grid-template-columns: 1fr; }
  .wire-sidebar { position: static; order: -1; margin-bottom: 28px; }
}
.watch-box {
  border: 1px solid var(--border-strong); border-radius: 10px; padding: 18px 20px;
  background: var(--surface-raised);
}
.watch-box-header {
  font-family: var(--font-display); font-weight: 700; text-transform: uppercase;
  font-size: 17px; letter-spacing: 0.01em;
}
.watch-box-date {
  font-family: var(--font-mono); font-size: 11.5px; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.05em; margin-top: 3px; margin-bottom: 14px;
}
.watch-list { list-style: none; margin: 0; padding: 0; }
.watch-list li {
  display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 8px 0; border-top: 1px solid var(--border); font-size: 14px;
}
.watch-list li:first-child { border-top: none; }
.watch-time {
  font-family: var(--font-mono); font-size: 12px; color: var(--text-muted);
  white-space: nowrap; flex-shrink: 0;
}
.watch-event { text-align: right; font-weight: 500; }
.watch-list li.watch-passed .watch-event {
  text-decoration: line-through; color: var(--text-muted); font-weight: 400;
}
.ai-strip { padding: 14px 0 4px; }
.ai-strip-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.ai-strip-title { font-size: 0.95rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; margin: 0; }
.ai-strip-source { font-size: 0.72rem; color: var(--text-muted); }
.ai-strip-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.ai-tool { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px 6px 8px; border: 1px solid var(--border, #d8dce6); border-radius: 999px; text-decoration: none; color: inherit; background: var(--surface, transparent); }
.ai-tool:hover { border-color: var(--accent, #b8860b); }
.ai-tool-rank { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; border-radius: 50%; background: var(--accent, #b8860b); color: #fff; font-size: 0.72rem; font-weight: 700; padding: 0 4px; }
.ai-tool-name { font-size: 0.85rem; font-weight: 600; }
.watch-list li.watch-passed .watch-time { color: var(--loss); text-decoration: line-through; }
.watch-list .watch-numbers { flex: 0 0 100%; display: block; font-size: 0.78em; color: var(--text-muted); margin-top: 2px; font-variant-numeric: tabular-nums; text-align: left; }
.watch-box-link {
  display: block; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border);
  font-family: var(--font-mono); font-size: 12.5px; color: var(--accent); text-decoration: none;
}
.watch-box-link:hover { text-decoration: underline; }

/* Share bar — on original content pages (Brief, Episodes, Record). Plain
   text-pill buttons to match the site's spare typographic style, not icon
   fonts. Links are populated by initShareBars() in main.js so each page only
   needs a data-title attribute, not hand-encoded URLs. */
.share-bar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border);
}
.share-label {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-muted); margin-right: 2px;
}
.share-btn {
  font: inherit; font-family: var(--font-mono); font-size: 12.5px; font-weight: 600;
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); text-decoration: none; cursor: pointer;
  transition: border-color .15s ease, color .15s ease;
}
.share-btn:hover { border-color: var(--accent); color: var(--accent); }
.share-btn.copied { border-color: var(--gain); color: var(--gain); }

/* Wire Archive page — same dense register as The Wire itself */
.archive-day { margin-top: 30px; }
.archive-day:first-of-type { margin-top: 8px; }
.archive-day-label {
  font-family: var(--font-mono); font-size: 12.5px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-muted); padding-bottom: 8px; margin-bottom: 4px;
  border-bottom: 2px solid var(--border-strong);
}
.archive-search {
  font: inherit; font-size: 15px; padding: 10px 14px; border-radius: 8px; width: 100%; max-width: 420px;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); margin: 18px 0 6px;
}
.archive-empty { color: var(--text-muted); padding: 24px 0; }

/* ---- First-release pass (2026-09-18) ---- */

/* Homepage record band: scoreboard + equity curve from trades.json */
.record-band {
  display: block; text-decoration: none; color: inherit;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 22px; margin: 0 0 28px; box-shadow: var(--shadow-sm);
  transition: box-shadow .15s ease, border-color .15s ease;
}
.record-band[hidden] { display: none; }
.record-band:hover { box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.record-band-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.record-band-asof { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); }
.record-band-main { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 26px; align-items: center; margin-top: 14px; }
.record-band-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.record-band-stat .stat-num { display: block; font-size: 26px; }
.record-band-stat .stat-label { display: block; }
.record-band-chart svg { width: 100%; height: auto; display: block; }
.record-band-cta { display: inline-block; margin-top: 12px; font-size: 14px; font-weight: 600; color: var(--accent); }
.record-band:hover .record-band-cta { text-decoration: underline; }
@media (max-width: 780px) {
  .record-band-main { grid-template-columns: 1fr; gap: 18px; }
  .record-band-stat .stat-num { font-size: 22px; }
}

/* Wire toolbar: category filters + freshness label */
.wire-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px 18px; flex-wrap: wrap; margin: 0 0 18px; }
.wire-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.wire-filter-btn {
  font-family: var(--font-body); font-size: 13px; font-weight: 600; line-height: 1;
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border-strong);
  background: transparent; color: var(--text-muted); cursor: pointer;
  transition: border-color .12s ease, color .12s ease, background .12s ease;
}
.wire-filter-btn:hover { border-color: var(--accent); color: var(--accent); }
.wire-filter-btn.active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.wire-updated { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.wire-time { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); white-space: nowrap; margin-left: auto; }
.wire-top-time { display: block; margin: 4px 0 0; }
@media (max-width: 640px) { .wire-time { font-size: 10px; } }

/* Pinned ticker as-of chip sits at the end of the pinned row */
.ticker-asof-pinned { border-right: none; border-left: 1px solid var(--border); margin-left: auto; text-transform: none; }

/* The Record on phones: keep Date / Symbol / Realized P&L visible without
   sideways scrolling by dropping the lower-priority columns under 700px. */
@media (max-width: 700px) {
  .record-table .col-optional { display: none; }
}

/* The top story goes text-led: the generic AI category art (rocket/globe
   stock image) undercut the receipts-first brand. The hourly Wire routine's
   markup is untouched — the image is simply not displayed. Revert this one
   rule to bring the art back. */
.wire-top-image { display: none; }
.wire-top { padding-top: 8px; }

/* Referral offer page */
.referral-deck{max-width:720px;font-size:18px;color:var(--text-muted);margin:8px 0 14px}
.referral-note{border:1px solid rgba(216,158,46,.45);background:rgba(216,158,46,.08);padding:18px 20px;margin:0 0 28px;line-height:1.6}
.referral-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin:0 0 34px}
.referral-card{border:1px solid var(--border);background:var(--surface);padding:24px;display:flex;flex-direction:column;min-height:390px;box-shadow:0 8px 24px rgba(0,0,0,.05)}
.referral-card--featured{border-top:4px solid var(--accent)}
.referral-card__top{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:18px}
.referral-label,.offer-status{font-family:"IBM Plex Mono",monospace;font-size:11px;font-weight:600;letter-spacing:.05em;text-transform:uppercase}
.referral-label{color:var(--text-muted)}
.offer-status{padding:5px 8px;border-radius:999px;white-space:nowrap}
.offer-status--verified{background:rgba(53,150,92,.13);color:#247345}
.offer-status--check{background:rgba(216,158,46,.15);color:#8a5b00}
.offer-status--pending{background:rgba(120,126,138,.14);color:var(--text-muted)}
:root[data-theme="dark"] .offer-status--verified{background:rgba(53,150,92,.22);color:#5fd39a}
:root[data-theme="dark"] .offer-status--check{background:rgba(216,158,46,.22);color:#f7d9a0}
.referral-card h2{font-size:30px;margin:0 0 8px}
.referral-fit{margin:0 0 22px;color:var(--text-muted);min-height:48px}
.referral-benefit{border-left:3px solid var(--accent);padding:0 0 0 14px;margin-bottom:16px}
.referral-benefit span{display:block;font-family:"IBM Plex Mono",monospace;font-size:11px;text-transform:uppercase;letter-spacing:.05em;color:var(--text-muted);margin-bottom:5px}
.referral-benefit strong{font-size:16px;line-height:1.45}
.referral-fine{font-size:13px;color:var(--text-muted);line-height:1.55;margin:0 0 22px}
.referral-cta{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:auto;padding:13px 15px;background:var(--accent);color:var(--accent-ink)!important;text-decoration:none!important;font-weight:700}
.referral-cta:hover{filter:brightness(1.06)}
.referral-cta--secondary{background:transparent;color:var(--text)!important;border:1px solid var(--border)}
.referral-review-box{border:1px dashed var(--border);padding:20px 22px;margin:0 0 34px;background:var(--surface)}
.referral-review-box h2{font-size:22px;margin-top:0}.referral-review-box p{margin-bottom:0}
@media(max-width:760px){.referral-grid{grid-template-columns:1fr}.referral-card{min-height:0;padding:20px}.referral-card__top{align-items:flex-start;flex-direction:column}.referral-fit{min-height:0}.referral-deck{font-size:16px}}

/* Market Pulse dial - sidebar top (2026-09-22, design delegated; colors fixed so fear/greed read the same in both themes) */
.sentiment-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px 12px;
  margin-bottom: 14px;
}
.sentiment-title { font-size: 13px; font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase; margin: 0 0 2px; color: var(--text); }
.sentiment-dial { color: var(--text); max-width: 190px; margin: 2px auto 0; }
.sentiment-dial svg { display: block; }
.sentiment-readout { display: flex; justify-content: center; align-items: baseline; gap: 8px; margin-top: -6px; }
.sentiment-score { font-size: 24px; font-weight: 700; }
.sentiment-label { font-size: 14px; font-weight: 600; }
.sentiment-note { font-size: 10.5px; color: var(--text-muted); margin-top: 6px; text-align: center; line-height: 1.45; }
.sentiment-slider { width: 100%; margin: 8px 0 0; accent-color: var(--accent); }
.sentiment-date { font-size: 11px; color: var(--text-muted); text-align: center; margin-top: 2px; }

.sentiment-periods { display:grid; grid-template-columns:repeat(6,1fr); gap:3px; margin:8px 0 1px; }
.sentiment-periods button { appearance:none; border:1px solid var(--border); background:transparent; color:var(--text-muted); border-radius:4px; padding:4px 0; font:600 9.5px/1 var(--font-sans); cursor:pointer; }
.sentiment-periods button:hover { color:var(--text); border-color:var(--text-muted); }
.sentiment-periods button.active { color:var(--bg); background:var(--text); border-color:var(--text); }
