:root {
  --gold: #FFC72C;
  --gold-deep: #E5A800;
  --ink: #202530;
  --ink-2: #4A5160;
  --ink-3: #7A8191;
  --paper: #F3F5F2;
  --surface: #FFFFFF;
  --line: #DDE1DC;
  --red: #D7263D;
  --green: #00754A;
  --radius-img: 6px;
  --gutter: 16px;
  --max: 1200px;
  --font: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #E9ECF2; --ink-2: #B4BAC6; --ink-3: #868D9B;
    --paper: #151922; --surface: #1C212C; --line: #2B3240; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #E9ECF2; --ink-2: #B4BAC6; --ink-3: #868D9B;
  --paper: #151922; --surface: #1C212C; --line: #2B3240; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font); font-size: 16px; line-height: 1.5;
  font-optical-sizing: auto; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
:focus-visible { outline: 3px solid var(--gold-deep); outline-offset: 2px; border-radius: 3px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Masthead: the one loud thing ---------- */
.mast { background: var(--gold); color: #202530; position: relative; z-index: 30; }
.mast .wrap { display: flex; align-items: center; gap: 12px; height: 60px; }
.logo { display: flex; align-items: baseline; gap: 2px; font-weight: 800; font-size: 30px; letter-spacing: -0.04em; line-height: 1; font-stretch: 85%; }
.logo b { font-weight: 800; }
.logo span { font-size: 15px; font-weight: 800; background: #202530; color: var(--gold); padding: 3px 6px 2px; border-radius: 4px; letter-spacing: 0; transform: translateY(-3px); }
.mast-tag { font-size: 14px; font-weight: 600; opacity: .8; margin-left: 10px; display: none; }
.mast-tools { margin-left: auto; display: flex; gap: 4px; }
.icon-btn { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; }
.icon-btn:hover { background: rgba(32,37,48,.1); }
.icon-btn svg { width: 22px; height: 22px; }
@media (min-width: 760px) { .mast .wrap { height: 72px; } .logo { font-size: 38px; } .mast-tag { display: block; } }

/* ---------- Section nav ---------- */
.nav { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 25; }
.nav ul { list-style: none; margin: 0; padding: 0 var(--gutter); display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; max-width: var(--max); margin: 0 auto; }
.nav ul::-webkit-scrollbar { display: none; }
.nav li { position: relative; flex: none; }
.nav a.top { display: block; padding: 13px 11px 11px; font-weight: 700; font-size: 15px; color: var(--ink-2); border-bottom: 3px solid transparent; white-space: nowrap; }
.nav a.top:hover { color: var(--ink); }
.nav a.top[aria-current] { color: var(--ink); border-bottom-color: var(--sec, var(--gold-deep)); }
.dropdown { display: none; }
@media (hover: hover) and (min-width: 900px) {
  .nav ul { overflow: visible; }
  .dropdown {
    position: absolute; top: 100%; left: 0; min-width: 220px; background: var(--surface); border: 1px solid var(--line);
    border-top: 3px solid var(--sec); padding: 6px; border-radius: 0 0 8px 8px; box-shadow: 0 12px 30px rgba(20,24,32,.14);
  }
  .nav li:hover .dropdown, .nav li:focus-within .dropdown { display: block; }
  .dropdown a { display: block; padding: 8px 10px; border-radius: 5px; font-size: 15px; color: var(--ink-2); }
  .dropdown a:hover { background: var(--paper); color: var(--ink); }
}

/* ---------- Latest strip ---------- */
.latest { border-bottom: 1px solid var(--line); background: var(--surface); }
.latest .wrap { display: flex; align-items: center; gap: 10px; height: 44px; font-size: 15px; }
.latest-label { display: flex; align-items: center; gap: 7px; font-weight: 800; flex: none; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 0 rgba(215,38,61,.5); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(215,38,61,0); } 100% { box-shadow: 0 0 0 0 rgba(215,38,61,0); } }
.latest-item { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); transition: opacity .35s; }
.latest-item:hover { color: var(--ink); text-decoration: underline; }
.latest-item.fade { opacity: 0; }

/* ---------- Shared story bits ---------- */
.meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; color: var(--ink-3); font-weight: 500; }
.meta .src { color: var(--ink-2); font-weight: 700; }
.tag { display: inline-block; font-size: 13px; font-weight: 700; color: var(--sec); }
.covered { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 700; color: var(--green); }
.covered::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: currentColor; }
.h { font-weight: 750; letter-spacing: -0.015em; line-height: 1.18; margin: 0; text-wrap: balance; }
.story-link:hover .h { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }

.thumb { position: relative; aspect-ratio: 16 / 10; border-radius: var(--radius-img); overflow: hidden; background: var(--sec, var(--ink-2)); }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* Painted card: stories without a photo get a flat sign-painted panel */
.painted { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 10%; color: #fff; background: var(--sec, #4A5160); }
.painted b { font-size: clamp(18px, 6cqw, 34px); font-weight: 800; letter-spacing: -0.03em; line-height: 1; font-stretch: 85%; }
.painted small { font-size: 12px; font-weight: 600; opacity: .85; margin-top: 6px; }
.thumb { container-type: inline-size; }
.painted::before { content: ""; position: absolute; right: -12%; top: -20%; width: 70%; aspect-ratio: 1; border-radius: 50%; border: 14px solid rgba(255,255,255,.14); }

/* ---------- Home ---------- */
main { padding-bottom: 40px; }
.lead-grid { display: grid; gap: 24px; padding-top: 20px; }
.lead .thumb { aspect-ratio: 16 / 10; border-radius: 0; margin: 0 calc(-1 * var(--gutter)); }
.lead .h { font-size: clamp(27px, 7.4vw, 46px); line-height: 1.06; letter-spacing: -0.03em; font-weight: 800; margin: 14px 0 10px; }
.lead p { margin: 0 0 12px; font-size: 17px; color: var(--ink-2); max-width: 62ch; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
@media (min-width: 760px) { .lead .thumb { border-radius: var(--radius-img); margin: 0; } }

.top-list { display: grid; gap: 0; }
.row { display: grid; grid-template-columns: 1fr 112px; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); align-items: start; }
.row .h { font-size: 17px; margin: 4px 0 6px; }
.row .thumb { aspect-ratio: 1 / 1; }
.row .painted b { font-size: 15px; }
.row .painted small { display: none; }

.panel-title { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 800; letter-spacing: -0.02em; margin: 36px 0 4px; }
.panel-title a.more { margin-left: auto; font-size: 15px; font-weight: 700; color: var(--ink-2); }
.panel-title a.more:hover { color: var(--ink); text-decoration: underline; }
.panel-note { margin: 0 0 8px; color: var(--ink-3); font-size: 14px; }

.covered-list { list-style: none; margin: 0; padding: 0; counter-reset: c; }
.covered-list li { counter-increment: c; display: grid; grid-template-columns: 34px 1fr; gap: 10px; padding: 13px 0; border-top: 1px solid var(--line); }
.covered-list li::before { content: counter(c); font-size: 28px; font-weight: 800; line-height: 1; color: var(--gold-deep); font-stretch: 80%; }
.covered-list .h { font-size: 16px; margin-bottom: 5px; }

/* Section blocks: painted tab heading in the section's colour */
.sec-block { margin-top: 40px; }
.sec-head { display: flex; align-items: flex-end; gap: 12px; border-bottom: 3px solid var(--sec); margin-bottom: 16px; }
.sec-head h2 { margin: 0; background: var(--sec); color: #fff; font-size: 20px; font-weight: 800; letter-spacing: -0.02em; padding: 8px 14px 6px; border-radius: 6px 6px 0 0; }
.sec-head a { margin-left: auto; padding-bottom: 6px; font-weight: 700; font-size: 15px; color: var(--ink-2); }
.sec-head a:hover { color: var(--ink); text-decoration: underline; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 0 14px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 6px 13px; border-radius: 999px; border: 1.5px solid var(--line); font-size: 14px; font-weight: 600; color: var(--ink-2); background: var(--surface); }
.chip:hover { border-color: var(--sec, var(--ink-3)); color: var(--ink); }
.chip[aria-current] { background: var(--sec, var(--ink)); border-color: var(--sec, var(--ink)); color: #fff; }

.sec-grid { display: grid; gap: 18px; }
.feature .h { font-size: 22px; margin: 12px 0 8px; }
.feature p { margin: 0 0 10px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

/* Cards grid (section pages, latest) */
.grid { display: grid; gap: 26px 20px; grid-template-columns: 1fr; }
.card .h { font-size: 18px; margin: 10px 0 6px; }
.card p { margin: 0 0 8px; color: var(--ink-2); font-size: 15px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@media (min-width: 600px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .grid { grid-template-columns: repeat(3, 1fr); } }

@media (min-width: 980px) {
  .lead-grid { grid-template-columns: minmax(0, 1fr) 360px; gap: 36px; }
  .home-cols { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 36px; }
  .sec-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 28px; }
  .side { position: sticky; top: 64px; align-self: start; }
}

.load-more { display: block; margin: 30px auto 0; padding: 13px 26px; border-radius: 999px; background: var(--ink); color: var(--paper); font-weight: 700; }
.load-more:hover { background: var(--ink-2); }
.load-more[disabled] { opacity: .5; cursor: default; }

/* ---------- Section page ---------- */
.page-head { padding: 26px 0 6px; }
.page-head h1 { margin: 0; font-size: clamp(34px, 9vw, 60px); font-weight: 800; letter-spacing: -0.04em; line-height: 1; font-stretch: 85%; }
.page-head h1::after { content: ""; display: block; width: 64px; height: 7px; background: var(--sec); margin-top: 12px; border-radius: 2px; }
.page-head p { color: var(--ink-3); margin: 12px 0 14px; }

/* ---------- Story page ---------- */
.story { max-width: 760px; padding-top: 22px; }
.crumbs { display: flex; gap: 8px; font-size: 14px; font-weight: 700; color: var(--ink-3); margin-bottom: 12px; }
.crumbs a { color: var(--sec); }
.crumbs a:hover { text-decoration: underline; }
.story h1 { font-size: clamp(28px, 6.6vw, 46px); line-height: 1.08; letter-spacing: -0.03em; font-weight: 800; margin: 0 0 14px; text-wrap: balance; }
.story .meta { font-size: 14px; margin-bottom: 18px; }
.story .thumb { aspect-ratio: 16 / 9; margin-bottom: 18px; }
.standfirst { font-size: 20px; line-height: 1.55; color: var(--ink); margin: 0 0 22px; max-width: 65ch; }
.cta { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 16px 20px; border-radius: 10px; background: var(--ink); color: var(--paper); font-weight: 800; font-size: 17px; }
.cta:hover { background: var(--ink-2); }
.cta svg { width: 18px; height: 18px; }
@media (min-width: 600px) { .cta { width: auto; display: inline-flex; } }
.attribution { color: var(--ink-3); font-size: 14px; margin: 12px 0 0; }
.share { display: flex; gap: 10px; margin: 24px 0 8px; flex-wrap: wrap; }
.share a, .share button { display: inline-flex; align-items: center; gap: 8px; padding: 10px 15px; border-radius: 999px; border: 1.5px solid var(--line); font-weight: 700; font-size: 14px; background: var(--surface); }
.share a:hover, .share button:hover { border-color: var(--ink-3); }
.share .wa { background: #1FAF55; border-color: #1FAF55; color: #fff; }
.share .wa:hover { background: #179446; border-color: #179446; }
.also { margin-top: 30px; padding: 16px 18px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); }
.also h2 { font-size: 17px; margin: 0 0 6px; font-weight: 800; }
.also ul { list-style: none; margin: 0; padding: 0; }
.also li { padding: 10px 0; border-top: 1px solid var(--line); }
.also li:first-child { border-top: 0; }
.also a:hover { text-decoration: underline; }
.also .src { font-weight: 700; display: block; font-size: 13px; color: var(--ink-3); }

/* ---------- Search & drawer ---------- */
.search-bar { display: none; background: var(--gold); padding: 0 0 12px; }
.search-bar.open { display: block; }
.search-bar form { display: flex; gap: 8px; }
.search-bar input { flex: 1; min-width: 0; height: 46px; border-radius: 8px; border: 2px solid #202530; padding: 0 14px; font: inherit; font-size: 16px; background: #fff; color: #202530; }
.search-bar button { height: 46px; padding: 0 18px; border-radius: 8px; background: #202530; color: var(--gold); font-weight: 800; }

.drawer { position: fixed; inset: 0; z-index: 50; display: none; }
.drawer.open { display: block; }
.drawer-bg { position: absolute; inset: 0; background: rgba(10,12,18,.5); }
.drawer-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(88vw, 380px); background: var(--surface); overflow-y: auto; padding: 14px 18px 40px; animation: slide .22s ease-out; }
@keyframes slide { from { transform: translateX(30px); opacity: 0; } }
.drawer-panel header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.drawer details { border-top: 1px solid var(--line); }
.drawer summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 14px 0; font-weight: 800; font-size: 18px; cursor: pointer; }
.drawer summary::-webkit-details-marker { display: none; }
.drawer summary i { width: 12px; height: 12px; border-radius: 3px; background: var(--sec); }
.drawer summary::after { content: "+"; margin-left: auto; font-size: 22px; color: var(--ink-3); }
.drawer details[open] summary::after { content: "–"; }
.drawer .subs { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 10px; padding: 0 0 14px 22px; }
.drawer .subs a { padding: 6px 0; color: var(--ink-2); font-size: 15px; }
.drawer .subs a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- Footer & misc ---------- */
footer.site { margin-top: 50px; background: var(--ink); color: var(--paper); padding: 34px 0 40px; }
footer.site .logo { color: var(--paper); }
footer.site .logo span { background: var(--gold); color: #202530; }
footer.site p { color: color-mix(in srgb, var(--paper) 72%, transparent); max-width: 60ch; font-size: 15px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 18px 0; font-weight: 600; }
.foot-links a:hover { text-decoration: underline; }
.status-line { font-size: 14px; display: flex; align-items: center; gap: 8px; }

.empty { padding: 40px 0; color: var(--ink-2); }
.skeleton { background: linear-gradient(90deg, var(--line), color-mix(in srgb, var(--line) 40%, var(--paper)), var(--line)); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 6px; }
@keyframes shimmer { to { background-position: -200% 0; } }

.prose { max-width: 680px; padding-top: 26px; }
.prose h1 { font-size: clamp(32px, 8vw, 52px); letter-spacing: -0.04em; line-height: 1.02; margin: 0 0 16px; }
.prose h2 { font-size: 22px; margin: 32px 0 8px; letter-spacing: -0.02em; }
.prose p, .prose li { color: var(--ink-2); font-size: 17px; line-height: 1.6; }
.health { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.health li { display: flex; align-items: center; gap: 8px; font-size: 14px; padding: 9px 12px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); }
.health li i { width: 9px; height: 9px; border-radius: 50%; background: var(--green); flex: none; }
.health li.down i { background: var(--red); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
