:root {
  --bg: #f6f5f2; --surface: #fff; --ink: #16181d; --muted: #5d6470; --line: #dedbd3;
  --accent: #c8102e; --accent-ink: #fff; --link: #0b4f9c;
  --serif: Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #111317; --surface: #1a1d23; --ink: #eceef2; --muted: #9aa3b0; --line: #2c313a; --link: #7db4f5; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--sans); }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }

/* masthead */
.masthead { background: var(--surface); border-bottom: 3px solid var(--accent); position: sticky; top: 0; z-index: 10; }
.masthead-inner { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.logo { font: 800 1.6rem/1 var(--serif); letter-spacing: -.02em; }
.logo span { color: var(--accent); }
.nav { display: flex; gap: 2px; flex-wrap: wrap; margin-left: auto; font-size: .9rem; font-weight: 600; }
.nav a { padding: 6px 10px; border-radius: 4px; }
.nav a:hover, .nav a[aria-current] { background: var(--accent); color: var(--accent-ink); text-decoration: none; }
.nav-toggle { display: none; margin-left: auto; font: inherit; font-weight: 600; background: none; border: 1px solid var(--line); color: inherit; border-radius: 4px; padding: 6px 12px; }
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav { display: none; width: 100%; flex-direction: column; margin: 0; }
  .nav.open { display: flex; }
}

/* layout */
main.wrap { padding-top: 24px; padding-bottom: 40px; }
.layout { display: grid; gap: 32px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1000px) { .layout { grid-template-columns: minmax(0, 1fr) 300px; } }
.sidebar { display: flex; flex-direction: column; gap: 24px; }
.page-title { font: 800 2rem/1.1 var(--serif); margin: 0 0 8px; border-bottom: 3px solid var(--ink); padding-bottom: 8px; }
.section-title { font: 700 1.1rem/1 var(--sans); text-transform: uppercase; letter-spacing: .08em; margin: 32px 0 16px; padding-bottom: 8px; border-bottom: 2px solid var(--accent); }
.lede { color: var(--muted); margin: 8px 0 20px; }
.empty { padding: 40px 0; color: var(--muted); }

/* cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; display: flex; flex-direction: column; height: 100%; }
.card-img { display: block; aspect-ratio: 16 / 9; background: var(--line); overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.card:hover .card-img img { transform: scale(1.03); }
.card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card h3 { font: 700 1.05rem/1.25 var(--serif); margin: 0; }
.card h3 a:hover { color: var(--accent); text-decoration: none; }
.kicker { margin: 0; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); }
.kicker span { color: var(--muted); font-weight: 600; }
.meta { margin: auto 0 0; font-size: .8rem; color: var(--muted); }
.dek { margin: 0; color: var(--muted); }
.card-big h3 { font-size: clamp(1.5rem, 3.2vw, 2.2rem); line-height: 1.12; }
.top-row, .grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); margin-top: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.top-row { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
@media (min-width: 760px) { .card-big { flex-direction: row; } .card-big .card-img { width: 58%; aspect-ratio: auto; min-height: 320px; } .card-big .card-body { padding: 20px; justify-content: center; } }

/* article */
.story h1 { font: 800 clamp(1.8rem, 4vw, 2.7rem)/1.1 var(--serif); margin: 8px 0 12px; }
.crumbs { font-size: .85rem; color: var(--muted); }
.byline { color: var(--muted); margin: 0 0 16px; font-size: .95rem; }
.byline a { color: var(--link); font-weight: 600; }
.story-img img { width: 100%; border-radius: 6px; aspect-ratio: 16 / 9; object-fit: cover; background: var(--line); }
.story-img figcaption { font-size: .78rem; color: var(--muted); padding-top: 4px; }
.story-body { font: 1.12rem/1.7 var(--serif); margin-top: 20px; }
.story-body p { margin: 0 0 1em; }
.story-body a { color: var(--link); text-decoration: underline; }
.story-body img { margin: 1em auto; border-radius: 4px; }
.story-body .more { color: var(--muted); }
.read-original { margin: 24px 0; }
.btn { display: inline-block; background: var(--accent); color: var(--accent-ink); font-weight: 700; padding: 12px 20px; border-radius: 4px; }
.btn:hover { text-decoration: none; filter: brightness(1.1); }

/* sidebar / gear */
.gear-box { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: 6px; padding: 14px 16px; margin: 24px 0; }
.sidebar .gear-box { margin: 0; }
.gear-box h2 { font: 700 .85rem/1 var(--sans); text-transform: uppercase; letter-spacing: .08em; margin: 0 0 10px; }
.gear-box ul, .gear-list { list-style: none; margin: 0; padding: 0; }
.gear-box li a, .gear-list a { display: block; padding: 8px 0; border-bottom: 1px solid var(--line); font-weight: 600; color: var(--link); }
.gear-box li:last-child a { border-bottom: 0; }
.fineprint { font-size: .75rem; color: var(--muted); margin: 8px 0 0; }
.gear-list a { font-size: 1.1rem; padding: 14px 0; }
.ad { margin: 24px 0; min-height: 90px; text-align: center; }

/* pager */
.pager { display: flex; justify-content: space-between; align-items: center; margin: 32px 0 0; padding-top: 16px; border-top: 1px solid var(--line); gap: 12px; }
.pager a { font-weight: 700; color: var(--accent); }
.pager span { color: var(--muted); font-size: .9rem; }

/* prose, legal, errors */
.prose { max-width: 760px; }
.prose h2 { font: 700 1.3rem/1.2 var(--serif); margin: 28px 0 8px; }
.prose p, .prose li { color: var(--ink); }
.prose a { color: var(--link); text-decoration: underline; }
.oops { text-align: center; padding: 56px 0 24px; max-width: 640px; margin: 0 auto; }
.oops .code { font: 800 clamp(5rem, 22vw, 9rem)/1 var(--serif); color: var(--accent); letter-spacing: -.04em; }
.oops h1 { font: 800 1.8rem/1.2 var(--serif); margin: 8px 0 12px; }
.oops p { color: var(--muted); }
.oops .btn { margin-top: 16px; }
.oops-list { text-align: left; list-style: none; padding: 0; margin: 32px 0 0; }
.oops-list a { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); font-weight: 600; }

/* footer */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding: 24px 0 32px; font-size: .88rem; color: var(--muted); }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-links a { color: var(--ink); font-weight: 600; }
.disclosure, .copy { margin: 0 0 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.source-about p { margin: 0; font-size: .95rem; line-height: 1.5; }
