/* ════════════════════════════════════════════════════════════════════════════════════════════════
   رعد الخبر — design system
   Layout concept: a digital front page. One dominant lead, a live "الآن" rail, and sections that each
   get their own treatment. The red tile of the official logo is the recurring brand device: section
   labels, the live marker and the reading-progress bar all come from it.
   ════════════════════════════════════════════════════════════════════════════════════════════════ */

:root {
  /* colour — light (warm paper, deep editorial red) */
  --paper: #faf7f3;
  --surface: #ffffff;
  --surface-2: #f3eee8;
  --ink: #17120f;
  --ink-2: #4a423d;
  --muted: #7d7169;
  --hair: #e6ded5;
  --red: #c4121f;
  --red-ink: #a80f1a;          /* red text on paper: 6.6:1 */
  --red-soft: #fbe9e9;
  --tile: #c4121f;              /* label tiles: white text 5.9:1 */
  --green: #0b6b4f;            /* AI summaries: Moroccan green, used only there */
  --green-soft: #e6f2ed;
  --band: #141110;             /* dark bands (sport, live) in both themes */
  --band-ink: #f5f0eb;
  --band-muted: #b3a79e;
  --focus: #1f5fd1;
  --shadow: 0 1px 2px rgb(23 18 15 / 6%), 0 8px 24px -12px rgb(23 18 15 / 18%);
  --img-ph: linear-gradient(135deg, #ece5dd, #e2d9cf);

  /* type */
  --font-display: "Noto Kufi Arabic", "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  --font-ui: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  --font-read: "Noto Naskh Arabic", "IBM Plex Sans Arabic", "Times New Roman", serif;
  --fs-xs: 0.8125rem;
  --fs-sm: 0.9375rem;
  --fs-md: 1.0625rem;
  --fs-lg: 1.25rem;
  --fs-xl: clamp(1.375rem, 1.1rem + 0.9vw, 1.75rem);
  --fs-2xl: clamp(1.625rem, 1.2rem + 1.6vw, 2.375rem);
  --fs-3xl: clamp(1.875rem, 1.3rem + 2.4vw, 3.125rem);

  /* space, shape, motion */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --gutter-end: max(16px, env(safe-area-inset-right, 0px));
  --max: 1280px;
  --read: 42rem;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --t-fast: 140ms;
  --t-med: 260ms;
  --header-h: 0px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0f0d0c; --surface: #191614; --surface-2: #221e1b; --ink: #f3eee9; --ink-2: #cfc6be; --muted: #9c9087;
    --hair: #2f2925; --red: #e8323e; --tile: #c41e2a; --red-ink: #ff6b74; --red-soft: #2e1416; --green: #4cc39b; --green-soft: #0f2a21;
    --band: #050404; --focus: #7fa8ff; --shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 10px 30px -14px rgb(0 0 0 / 70%);
    --img-ph: linear-gradient(135deg, #221e1b, #2a2522);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0f0d0c; --surface: #191614; --surface-2: #221e1b; --ink: #f3eee9; --ink-2: #cfc6be; --muted: #9c9087;
  --hair: #2f2925; --red: #e8323e; --tile: #c41e2a; --red-ink: #ff6b74; --red-soft: #2e1416; --green: #4cc39b; --green-soft: #0f2a21;
  --band: #050404; --focus: #7fa8ff; --shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 10px 30px -14px rgb(0 0 0 / 70%);
  --img-ph: linear-gradient(135deg, #221e1b, #2a2522);
  color-scheme: dark;
}

/* ── base ──────────────────────────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--fs-md)/1.75 var(--font-ui);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--red-ink); }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.45; margin: 0; text-wrap: balance; font-weight: 700; overflow-wrap: break-word; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: var(--r-sm); }
.skip-link:focus { top: 12px; color: var(--paper); }
.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter) var(--gutter-end); }
.num { font-variant-numeric: tabular-nums; }
.icon { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ── brand ─────────────────────────────────────────────────────────────────────────────────────── */
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-tile { width: 42px; height: 42px; border-radius: 8px; flex: none; }
.brand-word { font: 800 1.5rem/1 var(--font-display); letter-spacing: 0; white-space: nowrap; }
.brand-word b { color: var(--red); font-weight: 800; }
.brand-latin { display: block; font: 600 0.75rem/1 var(--font-ui); letter-spacing: 0.14em; color: var(--muted); margin-top: 6px; text-transform: uppercase; }

/* the red tile label: the logo's square, reused as the section marker */
.tile-label {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--tile); color: #fff;
  font: 700 var(--fs-xs)/1 var(--font-display);
  padding: 7px 10px 8px; border-radius: 4px;
}
.tile-label:hover { color: #fff; }
.tag { font: 600 var(--fs-xs)/1.2 var(--font-ui); color: var(--red-ink); }
.tag:hover { text-decoration: underline; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; color: var(--muted); font-size: var(--fs-xs); line-height: 1.4; }
.meta .src { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-weight: 600; min-height: 24px; }
.meta .src img { width: 20px; height: 20px; border-radius: 50%; background: #fff; object-fit: contain; border: 1px solid var(--hair); }
.meta .dot::before { content: "•"; color: var(--hair); }

/* ── header ────────────────────────────────────────────────────────────────────────────────────── */
.topbar { border-bottom: 1px solid var(--hair); font-size: var(--fs-xs); color: var(--muted); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); min-height: 44px; }
.topbar nav { display: flex; gap: var(--s5); }
.topbar a { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-weight: 500; min-height: 44px; }
.topbar a:hover { color: var(--red-ink); }
.live-dot { width: 8px; height: 8px; border-radius: 2px; background: var(--red); display: inline-block; }
@media (prefers-reduced-motion: no-preference) {
  .live-dot { animation: pulse 1.8s var(--ease) infinite; }
  @keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
}

.masthead .wrap { display: flex; align-items: center; gap: var(--s5); min-height: 84px; }
.masthead .brand { margin-inline-end: auto; }
.search-form { position: relative; width: min(420px, 36vw); }
.search-form input {
  width: 100%; height: 44px; border-radius: 999px; border: 1px solid var(--hair); background: var(--surface);
  padding-inline: 44px 16px; font: inherit; font-size: var(--fs-sm); color: var(--ink);
}
.search-form input::placeholder { color: var(--muted); }
.search-form input:focus { outline: none; border-color: var(--ink-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 25%, transparent); }
.search-form .icon { position: absolute; inset-inline-start: 16px; top: 50%; translate: 0 -50%; color: var(--muted); pointer-events: none; }
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 999px;
  border: 1px solid var(--hair); background: var(--surface); color: var(--ink);
  transition: background var(--t-fast), border-color var(--t-fast);
}
.icon-btn:hover { border-color: var(--ink-2); color: var(--ink); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border-radius: 999px; font: 600 var(--fs-sm)/1 var(--font-ui); border: 1px solid transparent; white-space: nowrap;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.btn-red { background: var(--tile); color: #fff; }
.btn-red:hover { background: var(--red-ink); color: #fff; }
.btn-line { border-color: var(--hair); background: var(--surface); color: var(--ink); }
.btn-line:hover { border-color: var(--ink); color: var(--ink); }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { color: var(--paper); opacity: .9; }
.theme-toggle .moon, :root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .moon { display: block; }
}

.catnav {
  position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-block: 1px solid var(--hair);
  padding-top: env(safe-area-inset-top, 0px);
}
.catnav .wrap { display: flex; align-items: center; gap: var(--s3); min-height: 52px; }
.catnav .mini-tile { width: 30px; height: 30px; border-radius: 6px; display: none; flex: none; }
.catnav.is-stuck .mini-tile { display: block; }
.catnav ul {
  list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none;
  overscroll-behavior-x: contain; flex: 1; mask-image: linear-gradient(to left, #000 92%, transparent);
}
.catnav ul::-webkit-scrollbar { display: none; }
.catnav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; white-space: nowrap;
  font: 600 var(--fs-sm)/1 var(--font-ui); color: var(--ink-2); border-radius: 6px; position: relative;
}
.catnav a:hover { color: var(--ink); background: var(--surface-2); }
.catnav a[aria-current="page"] { color: var(--ink); }
.catnav a[aria-current="page"]::after { content: ""; position: absolute; inset-inline: 12px; bottom: 4px; height: 3px; background: var(--red); border-radius: 2px; }
.catnav .menu-btn { display: none; }

/* breaking: a solid red band, static (no marquee) */
.breaking { background: var(--tile); color: #fff; }
.breaking .wrap { display: flex; align-items: center; gap: var(--s4); min-height: 52px; }
.breaking strong { font: 800 var(--fs-sm)/1 var(--font-display); background: #fff; color: #b0101c; padding: 7px 10px 8px; border-radius: 4px; flex: none; }
.breaking a { color: #fff; font-weight: 600; line-height: 1.5; }
.breaking a:hover { text-decoration: underline; color: #fff; }
.breaking ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; padding-block: 10px; }

/* ── images ────────────────────────────────────────────────────────────────────────────────────── */
.media { position: relative; overflow: hidden; background: var(--img-ph); border-radius: var(--r-md); aspect-ratio: 16 / 10; }
.media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-med) var(--ease); }
.media.is-broken img, .media.is-empty img { display: none; }
.media.is-broken::after, .media.is-empty::after {
  content: ""; position: absolute; inset: 0; margin: auto; width: 34%; max-width: 120px; aspect-ratio: 1;
  background: url("/img/placeholder.svg") center / contain no-repeat; opacity: .5;
}
a:hover .media img { transform: scale(1.025); }
@media (prefers-reduced-motion: reduce) { a:hover .media img { transform: none; } * { scroll-behavior: auto !important; } }

/* ── story units ───────────────────────────────────────────────────────────────────────────────── */
.story { display: flex; flex-direction: column; gap: var(--s3); min-width: 0; }
.story h3 { font-size: var(--fs-lg); line-height: 1.55; }
.story h3 a:hover { color: var(--red-ink); }
.story .excerpt { color: var(--ink-2); font-size: var(--fs-sm); line-height: 1.85; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.story-row { display: grid; grid-template-columns: minmax(0, 1fr) 120px; gap: var(--s4); align-items: start; }
.story-row > div { min-width: 0; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.story-tag { display: flex; }
.story-row .media { aspect-ratio: 4 / 3; border-radius: var(--r-sm); }
.story-row h3 { font-size: var(--fs-md); line-height: 1.6; }

/* ── sections ──────────────────────────────────────────────────────────────────────────────────── */
main { display: block; }
.section { padding-block: var(--s7); }
.section + .section { border-top: 1px solid var(--hair); }
.section-head { display: flex; align-items: center; gap: var(--s3); margin-bottom: var(--s5); flex-wrap: wrap; }
.section-head h2 { font-size: var(--fs-xl); }
.section-head .count { color: var(--muted); font-size: var(--fs-xs); }
.section-head .see-all { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 6px; font: 600 var(--fs-sm)/1 var(--font-ui); color: var(--ink-2); min-height: 44px; }
.section-head .see-all:hover { color: var(--red-ink); }

/* hero: lead (6) · secondary (3) · now rail (3) */
.front { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 3fr) minmax(0, 3fr); gap: var(--s6); padding-block: var(--s6) var(--s7); }
.lead .media { aspect-ratio: 16 / 10; border-radius: var(--r-lg); }
.lead h2 { font-size: var(--fs-3xl); line-height: 1.38; font-weight: 800; }
.lead h2 a:hover { color: var(--red-ink); }
.lead .excerpt { font-size: var(--fs-md); -webkit-line-clamp: 3; }
.secondary { display: flex; flex-direction: column; gap: var(--s5); }
.secondary .story + .story { padding-top: var(--s5); border-top: 1px solid var(--hair); }
.secondary h3 { font-size: var(--fs-md); line-height: 1.6; }
.now { border-inline-start: 1px solid var(--hair); padding-inline-start: var(--s5); }
.now-head { display: flex; align-items: center; gap: 10px; margin-bottom: var(--s4); }
.now-head h2 { font-size: var(--fs-lg); }
.now ol { list-style: none; margin: 0; padding: 0; }
.now li { position: relative; padding: 0 0 var(--s4); padding-inline-start: 18px; }
.now li::before { content: ""; position: absolute; inset-inline-start: 0; top: 9px; width: 7px; height: 7px; border-radius: 2px; background: var(--red); }
.now li::after { content: ""; position: absolute; inset-inline-start: 3px; top: 22px; bottom: 2px; width: 1px; background: var(--hair); }
.now li:last-child::after { display: none; }
.now time { display: block; font: 600 var(--fs-xs)/1.4 var(--font-ui); color: var(--red-ink); }
.now a { font: 600 var(--fs-sm)/1.7 var(--font-ui); display: block; }
.now .more { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; font-size: var(--fs-sm); color: var(--ink-2); min-height: 44px; }

/* treatment: lead + list */
.t-lead-list { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s6); }
.t-lead-list-alt { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.t-lead-list-alt > .story:first-child { order: 2; }
.t-lead-list .story-big h3 { font-size: var(--fs-2xl); line-height: 1.45; }
.t-lead-list .stack { display: flex; flex-direction: column; }
.t-lead-list .stack .story-row { padding-block: var(--s4); border-top: 1px solid var(--hair); }
.t-lead-list .stack .story-row:first-child { border-top: 0; padding-top: 0; }

/* treatment: text columns */
.t-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s5) var(--s6); }
.t-columns .story { padding-top: var(--s4); border-top: 3px solid var(--ink); }
.t-columns .story:nth-child(n+4) { border-top-width: 1px; border-top-color: var(--hair); }
.t-columns h3 { font-size: var(--fs-lg); }

/* treatment: dark band with image overlays */
.band { background: var(--band); color: var(--band-ink); }
.band .section-head h2, .band .section-head .see-all { color: var(--band-ink); }
.band .section-head .count { color: var(--band-muted); }
.band + .section, .section + .band { border-top: 0; }
.t-band { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: auto auto; gap: var(--s4); }
.overlay { position: relative; display: block; border-radius: var(--r-md); overflow: hidden; color: #fff; min-height: 220px; isolation: isolate; }
.overlay .media { position: absolute; inset: 0; aspect-ratio: auto; border-radius: 0; }
.overlay::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgb(0 0 0 / 88%) 0%, rgb(0 0 0 / 40%) 45%, rgb(0 0 0 / 0%) 75%); z-index: 1; }
.overlay .body { position: absolute; inset-inline: 0; bottom: 0; padding: var(--s5); z-index: 2; display: flex; flex-direction: column; gap: 8px; }
.overlay h3 { font-size: var(--fs-lg); line-height: 1.55; color: #fff; }
.overlay .meta { color: rgb(255 255 255 / 75%); }
.overlay .meta .src { color: #fff; }
.overlay:hover { color: #fff; }
.t-band .overlay:first-child { grid-row: span 2; min-height: 460px; }
.t-band .overlay:first-child h3 { font-size: var(--fs-2xl); }

/* treatment: horizontal strip */
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: var(--s5); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: var(--s3); scrollbar-width: thin; }
.strip > * { scroll-snap-align: start; }
.strip .story h3 { font-size: var(--fs-md); line-height: 1.6; }

/* treatment: compact 4-up */
.t-compact { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s5); }
.t-compact h3 { font-size: var(--fs-md); line-height: 1.6; }

/* AI summary feature */
.ai-feature { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s6); align-items: center; background: var(--green-soft); border-radius: var(--r-lg); padding: var(--s6); }
.ai-feature .media { border-radius: var(--r-md); aspect-ratio: 4 / 3; }
.ai-badge { display: inline-flex; align-items: center; gap: 8px; color: var(--green); font: 700 var(--fs-xs)/1.3 var(--font-ui); }
.ai-badge .icon { width: 18px; height: 18px; }
.ai-feature h2 { font-size: var(--fs-2xl); margin-block: 10px 12px; }
.ai-feature p { color: var(--ink-2); line-height: 1.95; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--hair); font: 500 var(--fs-xs)/1 var(--font-ui); color: var(--ink-2); }
a.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip b { color: var(--ink); font-weight: 700; }
.logos { display: flex; align-items: center; }
.logos img { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--surface); background: #fff; object-fit: contain; margin-inline-start: -8px; }
.logos img:first-child { margin-inline-start: 0; }
.ai-note { font-size: var(--fs-xs); color: var(--muted); line-height: 1.7; }

/* live teaser */
.live-teaser { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--s6); align-items: center; }
.live-teaser h2 { font-size: var(--fs-2xl); color: var(--band-ink); margin-block: 12px; }
.live-teaser p { color: var(--band-muted); }
.channel-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s4); list-style: none; margin: 0; padding: 0; }
.channel-row a { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; font: 600 var(--fs-xs)/1.4 var(--font-ui); color: var(--band-ink); padding: 10px 4px; border-radius: var(--r-md); }
.channel-row a:hover { background: rgb(255 255 255 / 6%); color: #fff; }
.channel-row img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: #fff; }
.on-air { display: inline-flex; align-items: center; gap: 8px; font: 700 var(--fs-xs)/1 var(--font-display); color: #fff; background: var(--tile); padding: 7px 10px 8px; border-radius: 4px; }
.on-air .live-dot { background: #fff; }

/* videos rail */
.reel-rail { display: grid; grid-auto-flow: column; grid-auto-columns: 180px; gap: var(--s4); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: var(--s3); list-style: none; margin: 0; padding-inline: 0; }
.reel-rail li { scroll-snap-align: start; }
.reel-thumb { position: relative; display: block; border-radius: var(--r-md); overflow: hidden; aspect-ratio: 9 / 16; background: var(--img-ph); color: #fff; }
.reel-thumb img { width: 100%; height: 100%; object-fit: cover; }
.reel-thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgb(0 0 0 / 85%), transparent 55%); }
.reel-thumb .body { position: absolute; inset-inline: 0; bottom: 0; padding: 12px; z-index: 1; display: flex; flex-direction: column; gap: 6px; }
.reel-thumb h3 { font: 600 var(--fs-sm)/1.55 var(--font-ui); color: #fff; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.reel-thumb .play { position: absolute; top: 10px; inset-inline-end: 10px; z-index: 1; width: 34px; height: 34px; border-radius: 50%; background: rgb(0 0 0 / 45%); display: grid; place-items: center; }
.reel-thumb:hover { color: #fff; }
.reel-thumb small { color: rgb(255 255 255 / 80%); font-size: var(--fs-xs); }

/* categories activity */
.activity { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: var(--s3); list-style: none; margin: 0; padding: 0; }
.activity a { display: flex; flex-direction: column; gap: 4px; padding: var(--s4); border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--hair); min-height: 88px; }
.activity a:hover { border-color: var(--ink); color: var(--ink); }
.activity strong { font: 700 var(--fs-md)/1.3 var(--font-display); }
.activity span { color: var(--muted); font-size: var(--fs-xs); }
.activity .bar { height: 4px; border-radius: 2px; background: var(--surface-2); overflow: hidden; margin-top: auto; }
.activity .bar i { display: block; height: 100%; background: var(--red); border-radius: 2px; }

/* app promo */
.app-promo { display: flex; align-items: center; gap: var(--s5); background: var(--surface); border: 1px solid var(--hair); border-radius: var(--r-lg); padding: var(--s5); }
.app-promo img { width: 64px; height: 64px; border-radius: 14px; flex: none; }
.app-promo div { flex: 1; }
.app-promo h2 { font-size: var(--fs-lg); }
.app-promo p { color: var(--ink-2); font-size: var(--fs-sm); }

/* ── feed pages ────────────────────────────────────────────────────────────────────────────────── */
.page-head { padding-block: var(--s6) var(--s5); border-bottom: 1px solid var(--hair); }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0 0 var(--s4); padding: 0; font-size: var(--fs-xs); color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-inline-end: 6px; color: var(--hair); }
.crumbs a:hover { color: var(--red-ink); }
.page-head h1 { font-size: var(--fs-3xl); font-weight: 800; margin-top: 10px; }
.page-head p { color: var(--ink-2); max-width: 60ch; margin-top: 8px; }
.page-head .facts { display: flex; flex-wrap: wrap; gap: var(--s5); margin-top: var(--s4); color: var(--muted); font-size: var(--fs-sm); }
.page-head .facts b { color: var(--ink); font-weight: 700; }
.pub-head { display: flex; gap: var(--s5); align-items: center; }
.pub-head img { width: 84px; height: 84px; border-radius: 50%; background: #fff; border: 1px solid var(--hair); object-fit: contain; flex: none; }

.feed-top { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s6); padding-block: var(--s6); border-bottom: 1px solid var(--hair); }
.feed-top .story-big h2 { font-size: var(--fs-2xl); line-height: 1.45; }
.feed-top .stack { display: flex; flex-direction: column; gap: var(--s5); }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s6) var(--s5); padding-block: var(--s6); list-style: none; margin: 0; padding-inline: 0; }
.card-grid > li { display: contents; }
.load-more { display: flex; justify-content: center; padding-bottom: var(--s7); }
.load-more[hidden] { display: none; }
.empty { padding: var(--s8) 0; text-align: center; color: var(--ink-2); display: flex; flex-direction: column; align-items: center; gap: var(--s4); }
.empty h2 { font-size: var(--fs-xl); }
.empty img { width: 72px; opacity: .6; }

.sources-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--s4); list-style: none; padding: var(--s6) 0 var(--s7); margin: 0; }
.sources-grid a { display: flex; align-items: center; gap: var(--s4); padding: var(--s4); border: 1px solid var(--hair); border-radius: var(--r-md); background: var(--surface); }
.sources-grid a:hover { border-color: var(--ink); color: var(--ink); }
.sources-grid img { width: 52px; height: 52px; border-radius: 50%; background: #fff; object-fit: contain; border: 1px solid var(--hair); flex: none; }
.sources-grid strong { display: block; font: 700 var(--fs-md)/1.4 var(--font-display); }
.sources-grid span { color: var(--muted); font-size: var(--fs-xs); }

/* ── article ───────────────────────────────────────────────────────────────────────────────────── */
.progress { position: fixed; inset-inline: 0; top: 0; height: 3px; z-index: 60; pointer-events: none; }
.progress i { display: block; height: 100%; width: 100%; background: var(--red); transform-origin: right center; transform: scaleX(0); }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--s7); padding-block: var(--s6) var(--s7); }
.article-head { max-width: var(--read); }
.article-head h1 { font-size: var(--fs-3xl); font-weight: 800; line-height: 1.42; margin-block: var(--s4); }
.article-head .meta { font-size: var(--fs-sm); gap: 8px 14px; }
.article-head .meta .src img { width: 28px; height: 28px; }
.article-figure { margin: var(--s5) 0 0; }
.article-figure .media { aspect-ratio: 16 / 9; border-radius: var(--r-lg); }
.article-figure figcaption { font-size: var(--fs-xs); color: var(--muted); margin-top: 8px; }
.prose { font-family: var(--font-read); font-size: 1.25rem; line-height: 2.05; max-width: var(--read); margin-top: var(--s6); color: var(--ink); }
.prose p + p { margin-top: 1.1em; }
.prose p:first-child::first-line { font-weight: 600; }
.source-card { max-width: var(--read); margin-top: var(--s6); display: flex; align-items: center; gap: var(--s4); flex-wrap: wrap; padding: var(--s5); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--hair); }
.source-card img { width: 48px; height: 48px; border-radius: 50%; object-fit: contain; background: #fff; border: 1px solid var(--hair); }
.source-card div { flex: 1; min-width: 200px; }
.source-card p { font-size: var(--fs-sm); color: var(--ink-2); }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; max-width: var(--read); margin-top: var(--s5); }
.share-label { font: 600 var(--fs-sm)/1 var(--font-ui); color: var(--muted); margin-inline-end: 4px; }
.share .icon-btn { width: 44px; height: 44px; }
.toast { position: fixed; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); inset-inline: 0; margin-inline: auto; width: max-content; max-width: calc(100% - 32px); background: var(--ink); color: var(--paper); padding: 12px 18px; border-radius: 999px; font-size: var(--fs-sm); z-index: 80; opacity: 0; translate: 0 10px; transition: opacity var(--t-med), translate var(--t-med); pointer-events: none; }
.toast.is-on { opacity: 1; translate: 0 0; }
.aside { display: flex; flex-direction: column; gap: var(--s6); }
.aside-box h2 { font-size: var(--fs-lg); padding-bottom: var(--s3); margin-bottom: var(--s4); border-bottom: 3px solid var(--ink); }
.aside-box ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s4); }
.aside-box li a { font: 600 var(--fs-sm)/1.7 var(--font-ui); display: block; }
.aside-sticky { position: sticky; top: calc(var(--header-h) + 24px); }
.related { padding-block: var(--s7); border-top: 1px solid var(--hair); }
/* excerpt pages: the publisher's text stays on the publisher's site */
.prose.is-excerpt p:not(.excerpt-label):not(.excerpt-more) { color: var(--ink-2); }
.excerpt-label { font: 600 var(--fs-xs)/1.4 var(--font-ui); color: var(--muted); letter-spacing: 0; }
.prose .excerpt-label + p { margin-top: var(--s2); }
.prose p.excerpt-more { margin-top: var(--s4); font: 600 var(--fs-md)/1.6 var(--font-ui); }
.excerpt-more a { color: var(--red-ink); text-decoration: underline; text-underline-offset: 4px; }
.excerpt-more .icon { width: 1em; height: 1em; vertical-align: -2px; }
.source-card strong a { color: inherit; text-decoration: underline; text-decoration-color: var(--hair); text-underline-offset: 4px; }
.source-card p a, .disclaimer a, .page-head p a { color: var(--red-ink); text-decoration: underline; text-underline-offset: 3px; }

/* ── ads (lib/ads.js): labelled, separated from content, space reserved against layout shift ─────── */
.ad { margin-block: var(--s6); padding-block: var(--s3) var(--s4); border-block: 1px solid var(--hair); text-align: center; }
.ad-label { display: block; font: 500 var(--fs-xs)/1 var(--font-ui); color: var(--muted); margin-bottom: var(--s3); }
.ad-display { min-height: calc(250px + 2rem); }
.ad-in-article { min-height: calc(200px + 2rem); }
.ad-in-feed { min-height: calc(140px + 2rem); }
.ad ins { margin-inline: auto; }
.ad .ad-box { display: grid; place-items: center; min-height: inherit; height: 200px; border: 2px dashed var(--hair); border-radius: var(--r-md); color: var(--muted); font: 500 var(--fs-xs)/1.4 var(--font-ui); padding: var(--s3); }
.ad:has(ins[data-ad-status="unfilled"]), .ads-off .ad { display: none; }
.card-grid > .ad, .points > .point-ad { grid-column: 1 / -1; margin-block: 0; }
.points > .point-ad { list-style: none; }

/* ── trust pages (about, editorial, privacy, terms, contact) ────────────────────────────────────── */
.info { max-width: var(--read); padding-block: var(--s6) var(--s7); }
.info h2 { font-size: var(--fs-xl); margin-top: var(--s7); scroll-margin-top: calc(var(--header-h) + 16px); }
.info h3 { font-size: var(--fs-lg); margin-top: var(--s5); }
.info p, .info li { font-size: 1.0625rem; line-height: 2; color: var(--ink-2); }
.info p { margin-top: var(--s3); }
.info ul, .info ol { margin: var(--s3) 0 0; padding-inline-start: 1.4em; display: grid; gap: 6px; }
.info a:not(.btn) { color: var(--red-ink); text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.info .updated { color: var(--muted); font-size: var(--fs-sm); margin-top: var(--s3); }
.info .toc { margin-top: var(--s5); padding: var(--s4) var(--s5); border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--hair); }
.info .toc ol { margin-top: var(--s2); }
.info table { width: 100%; border-collapse: collapse; margin-top: var(--s4); font-size: var(--fs-sm); }
.info th, .info td { text-align: start; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--hair); line-height: 1.8; }
.info th { color: var(--ink); background: var(--surface); }
.info .table-wrap { overflow-x: auto; }
.contact-card { margin-top: var(--s5); display: flex; flex-wrap: wrap; align-items: center; gap: var(--s4); padding: var(--s5); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--hair); }
.contact-card .mail { font: 700 var(--fs-lg)/1.4 var(--font-ui); direction: ltr; unicode-bidi: isolate; }
.footer-site { margin-top: var(--s5); padding-top: var(--s4); border-top: 1px solid var(--hair); font-size: var(--fs-sm); }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; margin: 0; padding: 0; }
.footer-links a, .footer-links button { color: var(--ink-2); font: inherit; background: none; border: 0; padding: 6px 0; cursor: pointer; min-height: 40px; display: inline-flex; align-items: center; }
.footer-links a:hover, .footer-links button:hover { color: var(--ink); text-decoration: underline; }

/* ── summaries ─────────────────────────────────────────────────────────────────────────────────── */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: var(--s5); }
.tabs a { min-height: 40px; display: inline-flex; align-items: center; padding: 0 16px; border-radius: 999px; border: 1px solid var(--hair); font: 600 var(--fs-sm)/1 var(--font-ui); background: var(--surface); }
.tabs a[aria-current="page"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.summary-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s5); list-style: none; padding: var(--s6) 0 var(--s7); margin: 0; }
.summary-card { display: grid; grid-template-columns: 160px 1fr; gap: var(--s5); padding: var(--s5); border: 1px solid var(--hair); border-radius: var(--r-lg); background: var(--surface); height: 100%; }
.summary-card:hover { border-color: var(--green); color: var(--ink); }
.summary-card .media { aspect-ratio: 1; }
.summary-card h2 { font-size: var(--fs-lg); line-height: 1.55; margin-block: 8px; }
.summary-card p { color: var(--ink-2); font-size: var(--fs-sm); line-height: 1.85; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.period { display: inline-flex; align-items: center; gap: 6px; font: 700 var(--fs-xs)/1 var(--font-ui); color: var(--green); }
.summary-hero { background: var(--green-soft); }
.summary-hero .wrap { padding-block: var(--s6) var(--s7); }
.summary-hero h1 { font-size: var(--fs-3xl); font-weight: 800; margin-block: var(--s4); max-width: 26ch; }
.summary-overview { font-family: var(--font-read); font-size: 1.2rem; line-height: 2; max-width: var(--read); color: var(--ink); }
.summary-overview p + p { margin-top: 1em; }
.disclaimer { display: flex; gap: var(--s3); align-items: flex-start; max-width: var(--read); margin-top: var(--s5); padding: var(--s4); border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--hair); font-size: var(--fs-xs); color: var(--ink-2); line-height: 1.8; }
.disclaimer .icon { color: var(--green); margin-top: 3px; }
.points { list-style: none; margin: 0; padding: var(--s6) 0 var(--s7); counter-reset: point; display: flex; flex-direction: column; gap: var(--s6); }
.point { display: grid; grid-template-columns: 64px minmax(0, 1fr) 280px; gap: var(--s5); counter-increment: point; padding-bottom: var(--s6); border-bottom: 1px solid var(--hair); }
.point:last-child { border-bottom: 0; }
.point::before { content: counter(point); font: 800 2.25rem/1 var(--font-display); color: var(--green); font-variant-numeric: tabular-nums; }
.point h2 { font-size: var(--fs-xl); line-height: 1.5; }
.point p { margin-top: var(--s3); color: var(--ink-2); line-height: 1.95; }
.point .media { aspect-ratio: 4 / 3; }
.point-sources { list-style: none; margin: var(--s4) 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.point-sources a { display: flex; gap: 10px; align-items: flex-start; font-size: var(--fs-sm); line-height: 1.6; }
.point-sources img { width: 22px; height: 22px; border-radius: 50%; object-fit: contain; background: #fff; border: 1px solid var(--hair); flex: none; margin-top: 3px; }

/* ── live ──────────────────────────────────────────────────────────────────────────────────────── */
.live-page { background: var(--band); color: var(--band-ink); }
.live-page .crumbs, .live-page .crumbs a { color: var(--band-muted); }
.live-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--s6); padding-block: var(--s5) var(--s7); }
.player { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: var(--r-lg); overflow: hidden; }
.player iframe, .player .facade { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.facade { display: grid; place-items: center; background: #000 center / cover no-repeat; cursor: pointer; padding: 0; border: 0; }
.facade::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle, rgb(0 0 0 / 15%), rgb(0 0 0 / 65%)); }
.facade .play-big { position: relative; width: 84px; height: 84px; border-radius: 50%; background: var(--tile); display: grid; place-items: center; color: #fff; box-shadow: 0 10px 30px rgb(0 0 0 / 45%); transition: transform var(--t-fast); }
.facade:hover .play-big { transform: scale(1.06); }
.facade .play-big .icon { width: 34px; height: 34px; fill: currentColor; stroke: none; margin-inline-start: -4px; }
.player-bar { display: flex; align-items: center; gap: var(--s4); margin-top: var(--s4); flex-wrap: wrap; }
.player-bar img { width: 52px; height: 52px; border-radius: 50%; background: #fff; object-fit: cover; }
.player-bar h1 { font-size: var(--fs-xl); color: var(--band-ink); }
.player-bar .follow { color: var(--band-muted); font-size: var(--fs-xs); }
.player-bar .btn-line { background: transparent; color: var(--band-ink); border-color: rgb(255 255 255 / 25%); margin-inline-start: auto; }
.player-note { color: var(--band-muted); font-size: var(--fs-xs); margin-top: var(--s3); }
.channels { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; max-height: 70vh; overflow-y: auto; scrollbar-width: thin; }
.channels a { display: flex; align-items: center; gap: var(--s3); padding: 10px 12px; border-radius: var(--r-md); color: var(--band-ink); font-weight: 600; min-height: 60px; }
.channels a:hover { background: rgb(255 255 255 / 7%); color: #fff; }
.channels a[aria-current="true"] { background: rgb(255 255 255 / 11%); box-shadow: inset -3px 0 0 var(--red); }
.channels img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: #fff; flex: none; }
.channels small { display: block; color: var(--band-muted); font-weight: 400; font-size: var(--fs-xs); }
.channels-title { font-size: var(--fs-md); color: var(--band-muted); margin-bottom: var(--s3); }

/* ── videos (reels) ───────────────────────────────────────────────────────────────────────────── */
.reels-page { background: var(--band); color: var(--band-ink); }
.reels { list-style: none; margin: 0 auto; padding: var(--s5) 0 var(--s7); display: flex; flex-direction: column; gap: var(--s5); align-items: center; }
.reel { width: min(420px, 100%); scroll-margin-top: calc(var(--header-h) + 16px); }
.reel-frame { position: relative; aspect-ratio: 9 / 16; max-height: calc(100svh - var(--header-h) - 140px); margin-inline: auto; border-radius: var(--r-lg); overflow: hidden; background: #000; }
.reel-frame .facade { position: absolute; inset: 0; width: 100%; height: 100%; background-size: cover; }
.reel-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.reel-info { display: flex; gap: var(--s3); align-items: flex-start; padding-top: var(--s3); }
.reel-info img { width: 36px; height: 36px; border-radius: 50%; background: #fff; object-fit: contain; flex: none; }
.reel-info h2 { font: 600 var(--fs-md)/1.6 var(--font-ui); color: var(--band-ink); }
.reel-info .meta { color: var(--band-muted); }
.reel-info .meta .src { color: var(--band-ink); }
.reels-hint { color: var(--band-muted); font-size: var(--fs-xs); text-align: center; }

/* ── search ────────────────────────────────────────────────────────────────────────────────────── */
.search-page .search-form { width: 100%; max-width: 680px; margin-top: var(--s5); }
.search-page .search-form input { height: 56px; font-size: var(--fs-md); }
.search-status { color: var(--muted); font-size: var(--fs-sm); padding-top: var(--s5); min-height: 1.8em; }
mark { background: color-mix(in srgb, var(--red) 18%, transparent); color: inherit; border-radius: 3px; padding-inline: 2px; }

/* ── footer, bottom bar, drawer ────────────────────────────────────────────────────────────────── */
.site-footer { background: var(--surface); border-top: 1px solid var(--hair); margin-top: var(--s7); padding-block: var(--s7) calc(var(--s6) + 64px); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: var(--s6); }
.footer-grid h2 { font-size: var(--fs-md); margin-bottom: var(--s4); }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: var(--fs-sm); color: var(--ink-2); }
.footer-grid .cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.footer-about p { color: var(--ink-2); font-size: var(--fs-sm); margin-block: var(--s4); max-width: 46ch; }
.footer-legal { margin-top: var(--s6); padding-top: var(--s5); border-top: 1px solid var(--hair); color: var(--muted); font-size: var(--fs-xs); display: flex; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; }

.tabbar { display: none; }
.drawer { border: 0; padding: 0; margin: 0; max-width: none; max-height: none; width: min(380px, 88vw); height: 100%; inset-inline-start: auto; background: var(--paper); color: var(--ink); }
.drawer::backdrop { background: rgb(0 0 0 / 45%); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: var(--s4) var(--s5); border-bottom: 1px solid var(--hair); padding-top: max(var(--s4), env(safe-area-inset-top, 0px)); }
.drawer nav { padding: var(--s4) var(--s5) var(--s7); display: flex; flex-direction: column; gap: var(--s5); }
.drawer h2 { font-size: var(--fs-xs); color: var(--muted); font-family: var(--font-ui); font-weight: 600; margin-bottom: 6px; }
.drawer ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.drawer a { display: flex; align-items: center; min-height: 48px; padding: 0 12px; border-radius: var(--r-sm); font-weight: 600; }
.drawer a:hover { background: var(--surface-2); }

/* ── responsive ────────────────────────────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .front { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
  .now { grid-column: 1 / -1; border-inline-start: 0; padding-inline-start: 0; border-top: 1px solid var(--hair); padding-top: var(--s5); }
  .now ol { columns: 2; column-gap: var(--s6); }
  .now li { break-inside: avoid; }
  .t-compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .article-layout { grid-template-columns: minmax(0, 1fr); }
  .aside { display: none; }
  .live-layout { grid-template-columns: minmax(0, 1fr); }
  .channels { max-height: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
  .point { grid-template-columns: 52px minmax(0, 1fr); }
  .point .media { grid-column: 2; max-width: 420px; }
}
@media (max-width: 860px) {
  .topbar nav { display: none; }
  .masthead .wrap { min-height: 68px; gap: var(--s3); }
  .masthead .search-form, .masthead .app-btn { display: none; }
  .brand-tile { width: 36px; height: 36px; }
  .brand-word { font-size: 1.3rem; }
  .catnav .menu-btn { display: inline-grid; }
  .front, .t-lead-list, .t-lead-list-alt, .feed-top, .ai-feature, .live-teaser { grid-template-columns: minmax(0, 1fr); }
  .t-lead-list-alt > .story:first-child { order: 0; }
  .secondary { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); }
  .secondary .story + .story { padding-top: 0; border-top: 0; }
  .now ol { columns: 1; }
  .t-columns { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .t-columns .story { border-top: 1px solid var(--hair) !important; padding-block: var(--s4); }
  .t-columns .story:first-child { border-top: 3px solid var(--ink) !important; }
  .t-band { grid-template-columns: 1fr 1fr; }
  .t-band .overlay:first-child { grid-column: 1 / -1; grid-row: auto; min-height: 340px; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary-list { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-about { grid-column: 1 / -1; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; inset-inline: 0; bottom: 0; z-index: 50;
    background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--hair); padding: 4px max(8px, env(safe-area-inset-right, 0px)) calc(4px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px));
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; font: 600 0.75rem/1.2 var(--font-ui); color: var(--muted); border-radius: var(--r-sm); }
  .tabbar a .icon { width: 22px; height: 22px; }
  .tabbar a[aria-current="page"] { color: var(--red-ink); }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
  .site-footer { padding-bottom: var(--s6); }
  .prose { font-size: 1.1875rem; line-height: 2; }
  .summary-card { grid-template-columns: 96px 1fr; padding: var(--s4); gap: var(--s4); }
  .point { grid-template-columns: minmax(0, 1fr); gap: var(--s3); }
  .point::before { font-size: 1.75rem; }
  .point .media { grid-column: auto; }
  .section { padding-block: var(--s6); }
}
@media (max-width: 520px) {
  .lead .media { margin-inline: calc(-1 * var(--gutter)); border-radius: 0; }
  .secondary { grid-template-columns: minmax(0, 1fr); }
  .secondary .story + .story { padding-top: var(--s4); border-top: 1px solid var(--hair); }
  /* image cards become compact rows: text column + small thumbnail */
  .secondary .story:not(.story-text), .card-grid .story:not(.story-text) {
    display: grid; grid-template-columns: minmax(0, 1fr) 112px; column-gap: var(--s3); row-gap: 6px; align-content: start;
    grid-template-areas: "tag img" "title img" "meta img";
  }
  .secondary .story > .media-link, .card-grid .story > .media-link { grid-area: img; align-self: start; }
  .secondary .story .media, .card-grid .story .media { aspect-ratio: 4 / 3; border-radius: var(--r-sm); }
  .secondary .story > .story-tag, .card-grid .story > .story-tag { grid-area: tag; }
  .secondary .story > h3, .card-grid .story > h2, .card-grid .story > h3 { grid-area: title; font-size: var(--fs-md); }
  .secondary .story > .meta, .card-grid .story > .meta { grid-area: meta; }
  .secondary .story > .excerpt, .card-grid .story > .excerpt { display: none; }
  .story-row { grid-template-columns: minmax(0, 1fr) 96px; }
  .t-band { grid-template-columns: minmax(0, 1fr); }
  .t-band .overlay { min-height: 240px; }
  .t-compact, .card-grid { grid-template-columns: minmax(0, 1fr); }
  .card-grid { gap: var(--s5); }
  .card-grid .story + .story { padding-top: var(--s5); border-top: 1px solid var(--hair); }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .app-promo { flex-wrap: wrap; }
  .share-label { flex-basis: 100%; margin-bottom: 4px; }
  .pub-head img { width: 64px; height: 64px; }
  .ai-feature { padding: var(--s5); }
  .reel-rail { grid-auto-columns: 150px; }
  .channel-row { gap: var(--s2); }
  .channel-row img { width: 54px; height: 54px; }
}
@media (min-width: 1600px) {
  :root { --max: 1440px; }
}
@media print {
  .topbar, .catnav, .tabbar, .site-footer, .share, .aside, .related, .progress, .ad, .masthead .search-form { display: none !important; }
}
.aside-sticky { display: flex; flex-direction: column; gap: var(--s6); }
.masthead-search { display: none; }
@media (max-width: 860px) { .masthead-search { display: inline-grid; } }
