:root {
  color-scheme: light;
  --bg: #fff;
  --fg: #111;
  --muted: #6b6b6b;
  --faint: #e9e9e9;
  --accent: #2257d6;
  --up: #1a7f45;
  --down: #b3261e;
  --breaking: #c81e1e;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --bg: #0e0e0e;
    --fg: #ececec;
    --muted: #8d8d8d;
    --faint: #232323;
    --accent: #7ea6ff;
    --up: #4fc27f;
    --down: #ff7a70;
    --breaking: #ff6b5e;
  }
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #0e0e0e;
  --fg: #ececec;
  --muted: #8d8d8d;
  --faint: #232323;
  --accent: #7ea6ff;
  --up: #4fc27f;
  --down: #ff7a70;
  --breaking: #ff6b5e;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h2, h3, p, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 max(16px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(16px, env(safe-area-inset-left));
}

/* Header */
header { padding: 32px 0 0; border-bottom: 1px solid var(--fg); }
.brand { display: flex; align-items: center; gap: 14px; }
h1 { margin: 0; font-size: 28px; font-weight: 700; letter-spacing: -.02em; }
h1 a { display: flex; align-items: center; gap: 10px; }
.logo { width: 34px; height: 34px; flex: none; display: block; }
.date { color: var(--muted); font-size: 14px; align-self: flex-end; padding-bottom: 5px; white-space: nowrap; }
.controls { margin-left: auto; display: flex; gap: 8px; flex: none; }
.icon-btn, .home-link { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; padding: 0; cursor: pointer; }
.icon-btn { background: var(--bg); color: var(--fg); border: 1px solid var(--faint); }
.icon-btn:hover { border-color: var(--fg); }
.home-link { background: #0d0e12; color: #fff; border: 1px solid rgba(255, 255, 255, .1); }
.home-link:hover { border-color: var(--accent); }
.icon-btn svg, .home-link svg { width: 18px; height: 18px; }
.icon-btn svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.home-link svg { fill: currentColor; }
.i-moon { display: none; }
:root[data-theme='dark'] .i-sun { display: none; }
:root[data-theme='dark'] .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .i-sun { display: none; }
  :root:not([data-theme='light']) .i-moon { display: block; }
}
.tabs { display: flex; gap: 22px; margin-top: 20px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar, .sections::-webkit-scrollbar, .pick::-webkit-scrollbar { display: none; }
.tabs a { padding: 0 0 9px; font-weight: 600; color: var(--muted); border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs a:hover { color: var(--fg); }
.tabs a[aria-current='page'] { color: var(--fg); border-bottom-color: var(--accent); }
.sections { display: flex; gap: 16px; padding: 9px 0; border-top: 1px solid var(--faint); overflow-x: auto; scrollbar-width: none; }
.sections a { font-size: 13.5px; color: var(--muted); white-space: nowrap; }
.sections a:hover { color: var(--fg); }
.sections a[aria-current='page'] { color: var(--fg); font-weight: 600; }

/* Breaking */
.alert { display: flex; gap: 10px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--faint); font-size: 15px; }
.alert b { color: var(--breaking); font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; }
.alert a { font-weight: 600; min-width: 0; }
.alert a:hover { text-decoration: underline; text-underline-offset: 3px; }
.alert span { color: var(--muted); font-size: 13px; white-space: nowrap; margin-left: auto; }

/* Layout */
.columns { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; align-items: start; }
.rail { display: grid; gap: 26px; min-width: 0; }
.head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 18px 0 6px; border-bottom: 2px solid var(--fg); }
.head h2 { font-size: 16px; font-weight: 700; letter-spacing: -.005em; }
.head a, .head span { font-size: 13px; color: var(--muted); }
.head a:hover { color: var(--fg); }
.rail .head { padding-top: 0; }
.note { color: var(--muted); font-size: 13px; padding: 10px 0 0; }
.markets { display: flex; gap: 4px 18px; flex-wrap: wrap; padding: 10px 0; font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--faint); }
.markets b { color: var(--fg); font-weight: 600; font-variant-numeric: tabular-nums; }
.up { color: var(--up); }
.down { color: var(--down); }

/* Charts of stories */
.story { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 0 6px; padding: 13px 0; border-bottom: 1px solid var(--faint); }
.place { font-variant-numeric: tabular-nums; }
.rank { display: block; font-size: 15px; font-weight: 600; color: var(--muted); line-height: 1.5; }
.move { display: block; font-size: 12px; font-weight: 600; white-space: nowrap; }
.move.up { color: var(--up); }
.move.down { color: var(--down); }
.move.new { color: var(--accent); font-size: 10.5px; letter-spacing: .04em; }
.story h3 { font-size: 17px; line-height: 1.3; font-weight: 600; letter-spacing: -.01em; }
.story a:hover h3 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.story.lead h3 { font-size: 22px; line-height: 1.25; letter-spacing: -.015em; }
.summary { margin-top: 4px; color: var(--muted); font-size: 14.5px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.meta { margin-top: 4px; color: var(--muted); font-size: 13px; display: flex; flex-wrap: wrap; gap: 0 7px; }
.sections[hidden] { display: none; }
.meta b { color: var(--fg); font-weight: 600; }
.thumb-link { margin-left: 12px; flex: none; }
.thumb { display: block; width: 104px; height: 72px; object-fit: cover; border-radius: 6px; background: var(--faint); }
details.more[open] { flex-basis: 100%; order: 3; }
details.more summary { display: inline; color: var(--accent); cursor: pointer; list-style: none; }
details.more summary::-webkit-details-marker { display: none; }
.outlets { margin-top: 6px; display: grid; gap: 3px; font-size: 13px; }
.outlets a:hover { color: var(--fg); }
.outlets b { font-weight: 600; }

/* Headline lists */
.line { display: block; padding: 7px 0; border-bottom: 1px solid var(--faint); font-size: 15px; line-height: 1.3; font-weight: 500; }
.line:hover span:first-child { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.line small { display: block; color: var(--muted); font-size: 12.5px; font-weight: 400; margin-top: 2px; }
.line:last-child { border-bottom: 0; }

/* Wire */
.pick { display: flex; gap: 14px; padding: 12px 0 2px; overflow-x: auto; scrollbar-width: none; font-size: 13px; }
.pick button, .pick a { background: none; border: 0; padding: 0; color: var(--muted); cursor: pointer; white-space: nowrap; }
.pick button:hover, .pick a:hover { color: var(--fg); }
.pick [aria-pressed='true'], .pick [aria-current='true'] { color: var(--fg); font-weight: 600; }
.pick .gap { margin-left: auto; }
.wire-row { display: grid; grid-template-columns: 50px minmax(0, 1fr) auto; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--faint); font-size: 15px; line-height: 1.32; align-items: baseline; }
.wire-row time { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.wire-row a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.wire-row .by { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.wire-row.is-breaking time, .wire-row.is-breaking .flag { color: var(--breaking); font-weight: 600; }
.wire-row .flag { font-size: 11px; letter-spacing: .04em; text-transform: uppercase; margin-right: 6px; }
.wire-row.fresh { background: color-mix(in srgb, var(--accent) 9%, transparent); }
.day { font-size: 13px; font-weight: 700; padding: 16px 0 5px; border-bottom: 2px solid var(--fg); }
.rail .wire-row { grid-template-columns: 42px minmax(0, 1fr); font-size: 14px; gap: 6px; font-weight: 500; }
.rail .wire-row .by { display: block; white-space: normal; font-weight: 400; margin-top: 1px; }

/* Tables */
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th { text-align: right; font-size: 12px; font-weight: 600; color: var(--muted); padding: 8px 0 5px 12px; white-space: nowrap; border-bottom: 1px solid var(--faint); }
td { text-align: right; padding: 7px 0 7px 12px; border-bottom: 1px solid var(--faint); font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; vertical-align: baseline; }
th:first-child, td:first-child { padding-left: 0; }
th.name, td.name { text-align: left; white-space: normal; color: var(--fg); width: 100%; line-height: 1.3; }
td.name a:hover { text-decoration: underline; text-underline-offset: 2px; }
td.name small { color: var(--muted); font-size: 12.5px; margin-left: 4px; white-space: nowrap; }
td.now { color: var(--fg); font-weight: 600; }
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; }
.rail table { font-size: 14px; }

/* Trending */
.lists { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 36px; align-items: start; }
.trend { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 4px; padding: 6px 0; border-bottom: 1px solid var(--faint); font-size: 14.5px; line-height: 1.3; }
.trend .pos { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.trend a:hover { text-decoration: underline; text-underline-offset: 2px; }
.trend small { display: block; color: var(--muted); font-size: 12px; }
.trend .move { font-size: 12px; }

.empty { color: var(--muted); padding: 40px 0; text-align: center; }
footer { color: var(--muted); font-size: 12.5px; border-top: 1px solid var(--faint); padding: 16px 0 36px; margin-top: 28px; }

@media (max-width: 980px) {
  .columns { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .lists { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: minmax(0, 1fr); gap: 0; }
}
@media (max-width: 620px) {
  header { padding-top: 22px; }
  .date { display: none; }
  .tabs { gap: 16px; }
  .tabs a { font-size: 15px; }
  .lists { grid-template-columns: minmax(0, 1fr); }
  .story { grid-template-columns: 30px minmax(0, 1fr) auto; }
  .thumb-link { margin-left: 10px; }
  .thumb { width: 76px; height: 56px; }
  .story h3 { font-size: 16.5px; }
  .story.lead h3 { font-size: 20px; }
  .wire-row { grid-template-columns: 44px minmax(0, 1fr); gap: 8px; }
  .wire-row .by { grid-column: 2; margin-top: -4px; }
  .alert { flex-wrap: wrap; gap: 2px 10px; }
  .alert span { margin-left: 0; }
  .hide-small { display: none; }
}

/* ---------- Modern look: layered over the base styles above ---------- */
:root { --bg: #f6f7fb; --fg: #0e1020; --muted: #565b74; --faint: rgba(20, 24, 50, .1); --accent: #5b3df5; --surface: rgba(255, 255, 255, .78); --raised: #eceef6; --grad: linear-gradient(100deg, #5b3df5, #0ea5e9 55%, #10b981); --glow: rgba(91, 61, 245, .16); --blob-a: rgba(124, 92, 255, .2); --blob-b: rgba(14, 165, 233, .18); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) { --bg: #07080d; --fg: #f2f3fa; --muted: #a3a8bf; --faint: rgba(255, 255, 255, .09); --accent: #a78bfa; --surface: rgba(20, 22, 32, .72); --raised: #1d2030; --grad: linear-gradient(100deg, #a78bfa, #38bdf8 55%, #34d399); --glow: rgba(139, 112, 255, .22); --blob-a: rgba(124, 92, 255, .28); --blob-b: rgba(14, 165, 233, .2); }
}
:root[data-theme='dark'] { --bg: #07080d; --fg: #f2f3fa; --muted: #a3a8bf; --faint: rgba(255, 255, 255, .09); --accent: #a78bfa; --surface: rgba(20, 22, 32, .72); --raised: #1d2030; --grad: linear-gradient(100deg, #a78bfa, #38bdf8 55%, #34d399); --glow: rgba(139, 112, 255, .22); --blob-a: rgba(124, 92, 255, .28); --blob-b: rgba(14, 165, 233, .2); }
body { overflow-x: clip; }
body::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(60vmax 40vmax at 8% -8%, var(--blob-a), transparent 70%), radial-gradient(55vmax 38vmax at 96% -6%, var(--blob-b), transparent 70%); }
.wrap { max-width: 1200px; }
header { position: sticky; top: 0; z-index: 20; padding: 12px 0 0; border-bottom: 0; background: color-mix(in srgb, var(--bg) 76%, transparent); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4); }
header::after { content: ''; position: absolute; z-index: -1; top: 0; bottom: 0; left: calc(50% - 50vw); right: calc(50% - 50vw); background: inherit; backdrop-filter: inherit; -webkit-backdrop-filter: inherit; border-bottom: 1px solid var(--faint); }
h1 { font-size: 24px; letter-spacing: -.03em; font-weight: 800; }
.logo { width: 30px; height: 30px; border-radius: 8px; }
.icon-btn, .home-link { background: var(--surface); color: var(--fg); border: 1px solid var(--faint); border-radius: 12px; transition: border-color .15s, transform .15s; }
.icon-btn:hover, .home-link:hover { border-color: var(--accent); transform: translateY(-1px); }
.tabs { gap: 4px; margin-top: 10px; }
.tabs a { padding: 6px 13px; font-size: 14px; border: 0; border-radius: 10px; transition: background .15s, color .15s; }
.tabs a:hover { background: var(--faint); }
.tabs a[aria-current='page'] { color: #fff; background: linear-gradient(100deg, #5b3df5, #0e9fd8); box-shadow: 0 4px 14px -5px rgba(91, 61, 245, .8); }
.sections { gap: 4px; padding: 8px 0 9px; border-top: 0; }
.sections a { padding: 2px 10px; border-radius: 999px; }
.sections a:hover { background: var(--faint); }
.sections a[aria-current='page'] { background: var(--raised); }

.alert { margin-top: 12px; padding: 10px 14px; border: 0; border-radius: 14px; color: #fff; background: linear-gradient(100deg, #d92d4a, #f0612e); box-shadow: 0 10px 24px -14px #d92d4a; }
.alert b, .alert span { color: rgba(255, 255, 255, .92); }

.markets { margin-top: 12px; padding: 10px 14px; border: 1px solid var(--faint); border-radius: 14px; background: var(--surface); }
.columns { gap: 22px; grid-template-columns: minmax(0, 1fr) 340px; margin-top: 4px; }
.head { padding: 18px 0 8px; border-bottom: 0; }
.head h2 { font-size: 21px; font-weight: 800; letter-spacing: -.03em; }
.rail { gap: 12px; padding-top: 16px; }
.rail > section { padding: 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--faint); }
.rail .head { padding: 0 0 6px; }
.rail .head h2 { font-size: 15px; letter-spacing: -.015em; }

.story { position: relative; margin-bottom: 10px; padding: 14px; border: 1px solid var(--faint); border-radius: 18px; background: var(--surface); transition: transform .2s, border-color .2s, box-shadow .2s; }
.story:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 50%, var(--faint)); box-shadow: 0 16px 34px -24px var(--accent); }
.story.lead { padding: 20px; background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 13%, var(--surface)), var(--surface) 65%); }
.rank { font-size: 25px; line-height: 1.1; font-weight: 800; letter-spacing: -.04em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.story h3 { letter-spacing: -.015em; font-weight: 650; }
.story.lead h3 { font-size: clamp(22px, 2.6vw, 30px); line-height: 1.14; font-weight: 750; letter-spacing: -.03em; text-wrap: balance; }
.thumb { width: 124px; height: 86px; border-radius: 12px; }
.story.lead .thumb { width: 208px; height: 144px; }

.line { padding: 8px 0; }
.wire-row { padding: 8px 4px; border-radius: 8px; }
.wire-row.fresh { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.day { border-bottom: 1px solid var(--faint); }
table { border-radius: 12px; }
tbody tr:hover td { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.lists > * { padding: 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--faint); }
.lists { gap: 12px; }
footer { border-top: 1px solid var(--faint); }
@media (max-width: 980px) { .columns { grid-template-columns: minmax(0, 1fr); gap: 8px; } .rail { padding-top: 0; } }
@media (max-width: 620px) {
  header { position: relative; }
  .story { padding: 12px; }
  .story.lead { padding: 14px; }
  .thumb { width: 76px; height: 64px; }
  .story.lead .thumb { width: 92px; height: 76px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
