/* ==========================================================================
   Webnerd News (Labs) — Google News & CNN Wire Clustered Edition
   Modern CSS Architecture:
   - color-scheme + light-dark() with @media (prefers-color-scheme: dark) fallback
   - Full 14-theme Webnerd.ai palette support (Essentials, Soft Palettes, Retro Classics)
   - @container queries on story cluster cards
   - CSS Grid + subgrid with preceding explicit track fallback on Topic Desks
   - overflow: clip (no accidental scroll containers)
   - Unified Webnerd News sans-serif headline typography
   ========================================================================== */

:root {
  color-scheme: light dark;

  /* Raw Light Mode Palette */
  --bg-canvas-light: #f3f6fb;
  --surface-card-light: #ffffff;
  --surface-elevated-light: #f8fafc;
  --surface-subtle-light: #eef2f7;
  --text-primary-light: #0f172a;
  --text-secondary-light: #334155;
  --text-muted-light: #64748b;
  --border-subtle-light: #e2e8f0;
  --border-strong-light: #cbd5e1;
  --accent-primary-light: #1a73e8;
  --accent-hover-light: #1557b0;
  --accent-soft-light: rgba(26, 115, 232, 0.1);
  --shadow-card-light: 0 1px 3px rgba(15, 23, 42, 0.06), 0 4px 12px rgba(15, 23, 42, 0.04);
  --shadow-hover-light: 0 8px 24px rgba(15, 23, 42, 0.1);
  --scrollbar-thumb-light: #94a3b8;
  --scrollbar-track-light: #e2e8f0;

  /* Raw Dark Mode Palette */
  --bg-canvas-dark: #090d16;
  --surface-card-dark: #111827;
  --surface-elevated-dark: #182234;
  --surface-subtle-dark: #1e293b;
  --text-primary-dark: #f1f5f9;
  --text-secondary-dark: #cbd5e1;
  --text-muted-dark: #94a3b8;
  --border-subtle-dark: #1e293b;
  --border-strong-dark: #334155;
  --accent-primary-dark: #38bdf8;
  --accent-hover-dark: #7dd3fc;
  --accent-soft-dark: rgba(56, 189, 248, 0.14);
  --shadow-card-dark: 0 2px 6px rgba(0, 0, 0, 0.35), 0 8px 20px rgba(0, 0, 0, 0.25);
  --shadow-hover-dark: 0 10px 28px rgba(0, 0, 0, 0.5);
  --scrollbar-thumb-dark: #475569;
  --scrollbar-track-dark: #0f172a;

  /* Semantic tokens: fallback first, then prefers-color-scheme, then light-dark() */
  --bg-canvas: var(--bg-canvas-light);
  --surface-card: var(--surface-card-light);
  --surface-elevated: var(--surface-elevated-light);
  --surface-subtle: var(--surface-subtle-light);
  --text-primary: var(--text-primary-light);
  --text-secondary: var(--text-secondary-light);
  --text-muted: var(--text-muted-light);
  --border-subtle: var(--border-subtle-light);
  --border-strong: var(--border-strong-light);
  --accent-primary: var(--accent-primary-light);
  --accent-hover: var(--accent-hover-light);
  --accent-soft: var(--accent-soft-light);
  --shadow-card: var(--shadow-card-light);
  --shadow-hover: var(--shadow-hover-light);
  --scrollbar-thumb: var(--scrollbar-thumb-light);
  --scrollbar-track: var(--scrollbar-track-light);

  @media (prefers-color-scheme: dark) {
    --bg-canvas: var(--bg-canvas-dark);
    --surface-card: var(--surface-card-dark);
    --surface-elevated: var(--surface-elevated-dark);
    --surface-subtle: var(--surface-subtle-dark);
    --text-primary: var(--text-primary-dark);
    --text-secondary: var(--text-secondary-dark);
    --text-muted: var(--text-muted-dark);
    --border-subtle: var(--border-subtle-dark);
    --border-strong: var(--border-strong-dark);
    --accent-primary: var(--accent-primary-dark);
    --accent-hover: var(--accent-hover-dark);
    --accent-soft: var(--accent-soft-dark);
    --shadow-card: var(--shadow-card-dark);
    --shadow-hover: var(--shadow-hover-dark);
    --scrollbar-thumb: var(--scrollbar-thumb-dark);
    --scrollbar-track: var(--scrollbar-track-dark);
  }

  @supports (color: light-dark(white, black)) {
    --bg-canvas: light-dark(var(--bg-canvas-light), var(--bg-canvas-dark));
    --surface-card: light-dark(var(--surface-card-light), var(--surface-card-dark));
    --surface-elevated: light-dark(var(--surface-elevated-light), var(--surface-elevated-dark));
    --surface-subtle: light-dark(var(--surface-subtle-light), var(--surface-subtle-dark));
    --text-primary: light-dark(var(--text-primary-light), var(--text-primary-dark));
    --text-secondary: light-dark(var(--text-secondary-light), var(--text-secondary-dark));
    --text-muted: light-dark(var(--text-muted-light), var(--text-muted-dark));
    --border-subtle: light-dark(var(--border-subtle-light), var(--border-subtle-dark));
    --border-strong: light-dark(var(--border-strong-light), var(--border-strong-dark));
    --accent-primary: light-dark(var(--accent-primary-light), var(--accent-primary-dark));
    --accent-hover: light-dark(var(--accent-hover-light), var(--accent-hover-dark));
    --accent-soft: light-dark(var(--accent-soft-light), var(--accent-soft-dark));
    --shadow-card: light-dark(var(--shadow-card-light), var(--shadow-card-dark));
    --shadow-hover: light-dark(var(--shadow-hover-light), var(--shadow-hover-dark));
    --scrollbar-thumb: light-dark(var(--scrollbar-thumb-light), var(--scrollbar-thumb-dark));
    --scrollbar-track: light-dark(var(--scrollbar-track-light), var(--scrollbar-track-dark));
  }

  /* Typography & Radii — headlines use the same font as Webnerd News */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-headline: var(--font-sans);
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 9999px;
  --max-width: 1440px;

  accent-color: var(--accent-primary);
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

/* ==========================================================================
   Webnerd.ai Proper 14-Theme Palettes
   ========================================================================== */

/* 1. Essentials: louisgray.com (Midnight Cobalt & Orange Accent Lines) */
html[data-theme="louisgray"] {
  color-scheme: dark;
  --font-sans: "Inter", Arial, "Arimo", Tahoma, Helvetica, sans-serif;
  --font-headline: "Inter", Arial, "Arimo", Tahoma, Helvetica, sans-serif;
  --bg-canvas: #090e1a;
  --surface-card: #111827;
  --surface-elevated: #0b1528;
  --surface-subtle: #16243d;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --border-subtle: #1f3659;
  --border-strong: #3b5984;
  --accent-primary: #f97316;
  --accent-hover: #fb923c;
  --accent-soft: rgba(249, 115, 22, 0.16);
  --shadow-card: 0 6px 22px rgba(4, 9, 20, 0.5);
  --shadow-hover: 0 10px 28px rgba(4, 9, 20, 0.68);
  --scrollbar-thumb: #3b5984;
  --scrollbar-track: #090e1a;
}

html[data-theme="louisgray"] .masthead {
  background: linear-gradient(90deg, #09192c 0%, #123158 55%, #163e6c 100%);
  border-block-end: 2px solid #f97316;
}

html[data-theme="louisgray"] .desk-nav {
  background: #0b1528;
  border-block-start: 1px solid #1f3659;
}

html[data-theme="louisgray"] :is(.hero-cluster-card, .briefing-cluster-card, .desk-card, .sidebar-widget) {
  border-block-start: 2px solid #f97316;
}

/* 2. Essentials: Classic Light (google-light / light) */
html[data-theme="google-light"],
html[data-theme="light"] {
  color-scheme: light;
  --bg-canvas: var(--bg-canvas-light);
  --surface-card: var(--surface-card-light);
  --surface-elevated: var(--surface-elevated-light);
  --surface-subtle: var(--surface-subtle-light);
  --text-primary: var(--text-primary-light);
  --text-secondary: var(--text-secondary-light);
  --text-muted: var(--text-muted-light);
  --border-subtle: var(--border-subtle-light);
  --border-strong: var(--border-strong-light);
  --accent-primary: var(--accent-primary-light);
  --accent-hover: var(--accent-hover-light);
  --accent-soft: var(--accent-soft-light);
  --shadow-card: var(--shadow-card-light);
  --shadow-hover: var(--shadow-hover-light);
}

/* 3. Essentials: Midnight Dark */
html[data-theme="dark"] {
  color-scheme: dark;
  --bg-canvas: var(--bg-canvas-dark);
  --surface-card: var(--surface-card-dark);
  --surface-elevated: var(--surface-elevated-dark);
  --surface-subtle: var(--surface-subtle-dark);
  --text-primary: var(--text-primary-dark);
  --text-secondary: var(--text-secondary-dark);
  --text-muted: var(--text-muted-dark);
  --border-subtle: var(--border-subtle-dark);
  --border-strong: var(--border-strong-dark);
  --accent-primary: var(--accent-primary-dark);
  --accent-hover: var(--accent-hover-dark);
  --accent-soft: var(--accent-soft-dark);
  --shadow-card: var(--shadow-card-dark);
  --shadow-hover: var(--shadow-hover-dark);
}

/* 4. Essentials: Warm Sepia */
html[data-theme="sepia"] {
  color-scheme: light;
  --bg-canvas: #f4ece1;
  --surface-card: #fbf7ee;
  --surface-elevated: #f8f3ea;
  --surface-subtle: #ebdccb;
  --text-primary: #2d261e;
  --text-secondary: #655443;
  --text-muted: #96816c;
  --border-subtle: #ded1be;
  --border-strong: #c8b69e;
  --accent-primary: #a05a2c;
  --accent-hover: #86461d;
  --accent-soft: rgba(160, 90, 44, 0.12);
  --shadow-card: 0 4px 20px rgba(80, 50, 20, 0.08);
  --shadow-hover: 0 8px 26px rgba(80, 50, 20, 0.14);
}

/* 5. Essentials: OLED Black */
html[data-theme="oled"] {
  color-scheme: dark;
  --bg-canvas: #000000;
  --surface-card: #080808;
  --surface-elevated: #101010;
  --surface-subtle: #161616;
  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --text-muted: #666666;
  --border-subtle: #1a1a1a;
  --border-strong: #2a2a2a;
  --accent-primary: #6366f1;
  --accent-hover: #818cf8;
  --accent-soft: rgba(99, 102, 241, 0.16);
  --shadow-card: 0 2px 10px rgba(0, 0, 0, 0.6);
  --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.8);
}

/* 6. Soft Palette: Lavender Haze */
html[data-theme="lavender"] {
  color-scheme: light;
  --bg-canvas: #f3effc;
  --surface-card: #ffffff;
  --surface-elevated: #fbf9ff;
  --surface-subtle: #e8e1f8;
  --text-primary: #2a2340;
  --text-secondary: #5d5478;
  --text-muted: #9188ad;
  --border-subtle: #e2dbf3;
  --border-strong: #cec3eb;
  --accent-primary: #7c5cd6;
  --accent-hover: #6845c7;
  --accent-soft: rgba(124, 92, 214, 0.12);
}

/* 7. Soft Palette: Mint Sorbet */
html[data-theme="mint"] {
  color-scheme: light;
  --bg-canvas: #eaf8f1;
  --surface-card: #ffffff;
  --surface-elevated: #f6fdfa;
  --surface-subtle: #d8f1e5;
  --text-primary: #173a2f;
  --text-secondary: #4b6e62;
  --text-muted: #86a69b;
  --border-subtle: #d3ece0;
  --border-strong: #b8e0cd;
  --accent-primary: #1a9a72;
  --accent-hover: #148261;
  --accent-soft: rgba(26, 154, 114, 0.12);
}

/* 8. Soft Palette: Peach Fuzz */
html[data-theme="peach"] {
  color-scheme: light;
  --bg-canvas: #fff0e6;
  --surface-card: #ffffff;
  --surface-elevated: #fffaf6;
  --surface-subtle: #ffe2d1;
  --text-primary: #3d261b;
  --text-secondary: #7a5646;
  --text-muted: #b08e7e;
  --border-subtle: #f6dccb;
  --border-strong: #ecc3a8;
  --accent-primary: #e8643a;
  --accent-hover: #d2522a;
  --accent-soft: rgba(232, 100, 58, 0.12);
}

/* 9. Soft Palette: Cloud Nine (Sky) */
html[data-theme="sky"] {
  color-scheme: light;
  --bg-canvas: #ebf4fe;
  --surface-card: #ffffff;
  --surface-elevated: #f7fbff;
  --surface-subtle: #d9eafc;
  --text-primary: #1a2b40;
  --text-secondary: #4f6580;
  --text-muted: #8aa0ba;
  --border-subtle: #d6e5f5;
  --border-strong: #b9d2ee;
  --accent-primary: #3d84de;
  --accent-hover: #2b6fc6;
  --accent-soft: rgba(61, 132, 222, 0.12);
}

/* 10. Soft Palette: Rose Quartz */
html[data-theme="rose"] {
  color-scheme: light;
  --bg-canvas: #fdeef3;
  --surface-card: #ffffff;
  --surface-elevated: #fff8fa;
  --surface-subtle: #fadbe5;
  --text-primary: #3d1f2a;
  --text-secondary: #7a5160;
  --text-muted: #b38d9b;
  --border-subtle: #f3d6e0;
  --border-strong: #e8b9ca;
  --accent-primary: #d64d78;
  --accent-hover: #c03b65;
  --accent-soft: rgba(214, 77, 120, 0.12);
}

/* 11. Retro Classic: Mac Classic (Mac OS 9 Platinum) */
html[data-theme="macos9"] {
  color-scheme: light;
  --bg-canvas: #dcdcdc;
  --surface-card: #ffffff;
  --surface-elevated: #eeeeee;
  --surface-subtle: #cccccc;
  --text-primary: #000000;
  --text-secondary: #222222;
  --text-muted: #555555;
  --border-subtle: #999999;
  --border-strong: #555555;
  --accent-primary: #5a5ab4;
  --accent-hover: #44449c;
  --accent-soft: rgba(90, 90, 180, 0.16);
  --radius-sm: 3px;
  --radius-md: 4px;
  --radius-lg: 4px;
  --shadow-card: 2px 2px 0 rgba(0, 0, 0, 0.3);
}

/* 12. Retro Classic: Mac OS X (Aqua) */
html[data-theme="aqua"] {
  color-scheme: light;
  --bg-canvas: #ececec;
  --surface-card: #ffffff;
  --surface-elevated: #f6f6f6;
  --surface-subtle: #e0e0e0;
  --text-primary: #000000;
  --text-secondary: #3f3f3f;
  --text-muted: #707070;
  --border-subtle: #c3c3c3;
  --border-strong: #9a9a9a;
  --accent-primary: #3875d7;
  --accent-hover: #2a62c0;
  --accent-soft: rgba(56, 117, 215, 0.15);
}

/* 13. Retro Classic: BeOS */
html[data-theme="beos"] {
  color-scheme: light;
  --bg-canvas: #336698;
  --surface-card: #ffffff;
  --surface-elevated: #eaeaea;
  --surface-subtle: #d8d8d8;
  --text-primary: #000000;
  --text-secondary: #262626;
  --text-muted: #555555;
  --border-subtle: #989898;
  --border-strong: #6e6e6e;
  --accent-primary: #336698;
  --accent-hover: #24507c;
  --accent-soft: rgba(255, 203, 0, 0.28);
  --radius-sm: 2px;
  --radius-md: 3px;
  --radius-lg: 3px;
  --shadow-card: 3px 3px 0 rgba(0, 0, 0, 0.32);
}

/* 14. Retro Classic: Green Android */
html[data-theme="android"] {
  color-scheme: light;
  --bg-canvas: #eef6ef;
  --surface-card: #ffffff;
  --surface-elevated: #fbfdf9;
  --surface-subtle: #dcefe1;
  --text-primary: #0b1f16;
  --text-secondary: #3b5247;
  --text-muted: #6b8276;
  --border-subtle: #cfe3d5;
  --border-strong: #a7cbb3;
  --accent-primary: #1e9e5a;
  --accent-hover: #178049;
  --accent-soft: rgba(61, 220, 132, 0.2);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
}

@supports not (scrollbar-color: auto) {
  ::-webkit-scrollbar {
    width: 10px;
    height: 10px;
  }
  ::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 5px;
  }
  ::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
  }
}

/* ==========================================================================
   Reset & Base Elements
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-block-size: 100dvh;
  display: flex;
  flex-direction: column;
}

/* Remove inline baseline gap on replaced media elements */
img,
svg,
video {
  display: block;
  max-inline-size: 100%;
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ==========================================================================
   1. Top Labs Experiment Ribbon
   ========================================================================== */
.labs-ribbon {
  background: #0b1120;
  color: #e2e8f0;
  border-block-end: 1px solid rgba(56, 189, 248, 0.22);
  font-size: 0.78rem;
  padding-block: 6px;
  padding-inline: clamp(12px, 2.5vw, 28px);
}

.labs-ribbon-inner {
  max-inline-size: var(--max-width);
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: safe center;
  justify-content: space-between;
  gap: 10px;
}

.labs-ribbon-left,
.labs-ribbon-right {
  display: flex;
  flex-wrap: wrap;
  align-items: safe center;
  gap: 8px;
}

.back-reader-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 700;
  color: #38bdf8;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: rgba(56, 189, 248, 0.12);
  transition: background-color 0.15s ease;
}

.back-reader-link:hover {
  background: rgba(56, 189, 248, 0.24);
}

.labs-divider {
  opacity: 0.3;
}

.labs-pill {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, #0284c7, #6366f1);
  color: #ffffff;
}

.window-selector {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.06);
  padding: 2px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.ribbon-chip {
  border: 0;
  background: transparent;
  color: #cbd5e1;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.ribbon-chip:hover {
  color: #ffffff;
}

.ribbon-chip.active {
  background: #38bdf8;
  color: #090d16;
  font-weight: 700;
}

.theme-switch-btn {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
}

/* ==========================================================================
   2. Masthead & 2-Way Foundation Switcher
   ========================================================================== */
.masthead {
  position: sticky;
  inset-block-start: 0;
  z-index: 40;
  background: var(--surface-card);
  border-block-end: 1px solid var(--border-subtle);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.masthead-inner {
  max-inline-size: var(--max-width);
  margin-inline: auto;
  padding-block: 12px;
  padding-inline: clamp(12px, 2.5vw, 28px);
  display: flex;
  flex-wrap: wrap;
  align-items: safe center;
  justify-content: space-between;
  gap: 14px;
}

.brand-logo-link {
  display: flex;
  align-items: center;
  gap: 11px;
}

.brand-icon {
  inline-size: 40px;
  block-size: 40px;
  border-radius: 11px;
  background: #0b1120;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.25);
  flex-shrink: 0;
}

.brand-name {
  font-family: var(--font-headline);
  font-size: clamp(1.2rem, 1rem + 0.6vw, 1.5rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.brand-accent {
  color: var(--accent-primary);
}

.brand-subtitle {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Search Bar */
.edition-search {
  flex: 1 1 260px;
  max-inline-size: 460px;
}

.search-field-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding-inline: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search-field-wrap:focus-within {
  border-color: var(--accent-primary);
  background: var(--surface-card);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.search-svg {
  color: var(--text-muted);
  flex-shrink: 0;
}

#editionSearchInput {
  inline-size: 100%;
  border: 0;
  background: transparent;
  padding-block: 8px;
  padding-inline: 10px;
  font-size: 0.86rem;
  outline: none;
}

.search-clear {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.8rem;
  padding: 2px 6px;
}

/* 2-Way Foundation Switcher (Google News / CNN Wire) */
.layout-switcher {
  display: inline-flex;
  background: var(--surface-subtle);
  border: 1px solid var(--border-subtle);
  padding: 3px;
  border-radius: var(--radius-pill);
  gap: 2px;
}

.layout-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 13px;
  border-radius: var(--radius-pill);
  transition: all 0.15s ease;
}

.layout-btn:hover {
  color: var(--text-primary);
}

.layout-btn.active {
  background: var(--surface-card);
  color: var(--text-primary);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.layout-dot {
  inline-size: 8px;
  block-size: 8px;
  border-radius: 50%;
}

.gnews-dot {
  background: #1a73e8;
}

.cnn-dot {
  background: #dc2626;
}

/* Topic Desk Navigation Tabs */
.desk-nav {
  border-block-start: 1px solid var(--border-subtle);
  background: var(--surface-card);
}

.desk-nav-inner {
  max-inline-size: var(--max-width);
  margin-inline: auto;
  padding-inline: clamp(12px, 2.5vw, 28px);
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.desk-tab {
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 10px 13px;
  white-space: nowrap;
  border-block-end: 3px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.desk-tab:hover {
  color: var(--text-primary);
}

.desk-tab.active {
  color: var(--accent-primary);
  font-weight: 700;
  border-block-end-color: var(--accent-primary);
}

/* ==========================================================================
   3. CNN Wire Ticker Bar & Active Filter Banner
   ========================================================================== */
.wire-ticker-bar {
  background: #180909;
  color: #fef2f2;
  border-block-end: 2px solid #dc2626;
  padding-block: 8px;
  padding-inline: clamp(12px, 2.5vw, 28px);
}

.wire-ticker-inner {
  max-inline-size: var(--max-width);
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

.wire-badge {
  background: #dc2626;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 3px 9px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.wire-items {
  display: flex;
  align-items: center;
  gap: 18px;
}

.wire-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.78rem;
  white-space: nowrap;
  cursor: pointer;
}

.wire-item:hover {
  color: #fca5a5;
}

.wire-item-time {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: #f87171;
  font-weight: 700;
}

.wire-item-source {
  font-weight: 700;
  color: #cbd5e1;
}

/* Active Filter Banner */
.active-filter-banner {
  background: var(--accent-soft);
  border-block-end: 1px solid var(--border-subtle);
  padding-block: 8px;
  padding-inline: clamp(12px, 2.5vw, 28px);
}

.active-filter-inner {
  max-inline-size: var(--max-width);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.82rem;
  font-weight: 600;
}

.clear-filter-btn {
  border: 1px solid var(--border-strong);
  background: var(--surface-card);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.76rem;
  font-weight: 700;
}

/* ==========================================================================
   4. Main Edition Canvas & Section Headers
   ========================================================================== */
.edition-main {
  flex: 1;
  inline-size: 100%;
  max-inline-size: var(--max-width);
  margin-inline: auto;
  padding-block: 22px 48px;
  padding-inline: clamp(12px, 2.5vw, 28px);
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-block-end: 14px;
  padding-block-end: 8px;
  border-block-end: 2px solid var(--border-subtle);
}

.section-title {
  margin: 0;
  font-family: var(--font-headline);
  font-size: clamp(1.15rem, 1rem + 0.5vw, 1.45rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 2px 0 0;
}

.section-kicker-pill {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: var(--surface-subtle);
  color: var(--text-secondary);
}

/* ==========================================================================
   5. MODE 1: Google News Foundation ("gnews")
   ========================================================================== */
.gnews-top-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: start;
}

@media (max-width: 1040px) {
  .gnews-top-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.gnews-briefing-col {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Hero Cluster Card (#1 Top Story) */
.hero-cluster-card {
  container-type: inline-size;
  container-name: cluster-card;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: clamp(16px, 2.2vw, 24px);
  overflow: clip;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.hero-cluster-card:hover,
.hero-cluster-card.kb-focused,
.briefing-cluster-card.kb-focused {
  box-shadow: var(--shadow-hover);
  border-color: var(--accent-primary);
}

.hero-cluster-inner {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 22px;
  align-items: start;
}

@container cluster-card (inline-size < 640px) {
  .hero-cluster-inner {
    grid-template-columns: 1fr;
  }
}

.hero-media-wrap {
  position: relative;
  border-radius: var(--radius-md);
  overflow: clip;
  aspect-ratio: 16 / 10;
  background: var(--surface-subtle);
  border: 1px solid var(--border-subtle);
}

.hero-media-wrap img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.hero-cluster-card:hover .hero-media-wrap img {
  transform: scale(1.02);
}

.hero-media-badges {
  position: absolute;
  inset-block-start: 10px;
  inset-inline-start: 10px;
  inset-inline-end: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.cluster-desk-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 800;
  background: rgba(9, 13, 22, 0.82);
  color: #f8fafc;
  backdrop-filter: blur(6px);
}

.cluster-momentum-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 800;
  padding: 4px 9px;
  border-radius: var(--radius-pill);
  background: rgba(9, 13, 22, 0.82);
  color: #38bdf8;
  backdrop-filter: blur(6px);
}

.cluster-momentum-badge.breaking {
  background: #dc2626;
  color: #ffffff;
}

.cluster-momentum-badge.developing {
  background: #0284c7;
  color: #ffffff;
}

.hero-lead-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.source-meta-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.source-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: var(--text-secondary);
  background: transparent;
  border: 0;
  padding: 0;
}

.source-chip:hover {
  color: var(--accent-primary);
  text-decoration: underline;
}

.source-monogram {
  inline-size: 18px;
  block-size: 18px;
  border-radius: 5px;
  display: inline-grid;
  place-items: center;
  font-size: 0.62rem;
  font-weight: 800;
  color: #ffffff;
  flex-shrink: 0;
}

/* Headlines use the same sans-serif font as "Webnerd News" */
.hero-headline {
  margin: 0;
  font-family: var(--font-headline);
  font-size: clamp(1.32rem, 1.08rem + 0.85vw, 1.78rem);
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.hero-headline a:hover,
.briefing-headline a:hover {
  color: var(--accent-primary);
}

.hero-snippet {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  line-clamp: 3;
  overflow: clip;
}

/* Sub-articles / Perspectives Tree inside Cluster Card */
.cluster-tree {
  grid-column: 1 / -1;
  background: var(--surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.cluster-tree-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.cluster-tree-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px 16px;
}

.tree-subarticle {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding-block: 3px;
}

.tree-bullet {
  margin-block-start: 6px;
  inline-size: 6px;
  block-size: 6px;
  border-radius: 50%;
  background: var(--accent-primary);
  flex-shrink: 0;
}

.tree-subarticle-content {
  flex: 1;
  min-inline-size: 0;
}

.tree-subarticle-title {
  font-family: var(--font-headline);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.35;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: clip;
}

.tree-subarticle-title a:hover {
  color: var(--accent-primary);
}

.perspective-tag {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--surface-subtle);
  color: var(--text-secondary);
  white-space: nowrap;
}

.perspective-tag.indie {
  background: rgba(16, 185, 129, 0.14);
  color: #10b981;
}

.perspective-tag.analysis {
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
}

.perspective-tag.aggregator {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.perspective-tag.primary {
  background: rgba(14, 165, 233, 0.14);
  color: #0ea5e9;
}

/* Cluster Card Footer: Source Stack + Entity Chips + Full Coverage CTA */
.cluster-card-footer {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-block-start: 10px;
  border-block-start: 1px solid var(--border-subtle);
}

.source-avatar-stack {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.avatar-pills {
  display: inline-flex;
  align-items: center;
}

.avatar-pills .stack-monogram {
  inline-size: 22px;
  block-size: 22px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font-size: 0.6rem;
  font-weight: 800;
  color: #ffffff;
  border: 2px solid var(--surface-card);
  margin-inline-start: -6px;
}

.avatar-pills .stack-monogram:first-child {
  margin-inline-start: 0;
}

.cluster-entity-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.entity-chip {
  border: 1px solid var(--border-subtle);
  background: var(--surface-subtle);
  color: var(--text-secondary);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.entity-chip:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.full-coverage-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border-strong);
  background: var(--surface-elevated);
  color: var(--accent-primary);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 13px;
  border-radius: var(--radius-pill);
  transition: all 0.15s ease;
}

.full-coverage-btn:hover {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #ffffff;
}

.full-coverage-btn.primary {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #ffffff;
}

.full-coverage-btn.primary:hover {
  background: var(--accent-hover);
}

/* Standard Briefing Cluster Card (#2 - #8) */
.briefing-cluster-card {
  container-type: inline-size;
  container-name: briefing-card;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: clip;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.briefing-cluster-card:hover {
  box-shadow: var(--shadow-hover);
  border-color: var(--border-strong);
}

.briefing-card-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px;
  gap: 18px;
  align-items: start;
}

@container briefing-card (inline-size < 520px) {
  .briefing-card-inner {
    grid-template-columns: minmax(0, 1fr) 92px;
    gap: 12px;
  }
  .briefing-thumb-wrap {
    inline-size: 92px;
    block-size: 70px;
    aspect-ratio: 4 / 3;
    border-radius: 10px;
  }
}

.briefing-lead-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.briefing-headline {
  margin: 0;
  font-family: var(--font-headline);
  font-size: clamp(1.08rem, 0.98rem + 0.35vw, 1.28rem);
  font-weight: 800;
  letter-spacing: -0.022em;
  line-height: 1.26;
  text-wrap: balance;
}

.briefing-snippet {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: clip;
}

.briefing-thumb-wrap {
  border-radius: var(--radius-md);
  overflow: clip;
  aspect-ratio: 16 / 10;
  background: var(--surface-subtle);
  border: 1px solid var(--border-subtle);
}

.briefing-thumb-wrap img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
}

.briefing-perspectives {
  grid-column: 1 / -1;
  padding-block-start: 10px;
  border-block-start: 1px dashed var(--border-subtle);
}

.briefing-footer {
  grid-column: 1 / -1;
}

.desk-badge-inline {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 800;
}

/* ==========================================================================
   6. Right Sidebar Widgets ("Picks For You" + "Top Sources" + "Topic Cloud")
   ========================================================================== */
.gnews-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-widget {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-block-end: 10px;
  border-block-end: 1px solid var(--border-subtle);
}

.widget-title {
  margin: 0;
  font-family: var(--font-headline);
  font-size: 0.96rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 7px;
}

.widget-subtitle {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Picks For You List */
.for-you-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.for-you-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 68px;
  gap: 10px;
  align-items: start;
  padding-block-end: 12px;
  border-block-end: 1px solid var(--border-subtle);
  cursor: pointer;
}

.for-you-item:last-child {
  padding-block-end: 0;
  border-block-end: 0;
}

.for-you-reason {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--accent-primary);
  margin-block-end: 3px;
}

.for-you-headline {
  font-family: var(--font-headline);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.32;
  margin-block: 3px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: clip;
}

.for-you-item:hover .for-you-headline {
  color: var(--accent-primary);
}

.for-you-thumb {
  inline-size: 68px;
  block-size: 54px;
  border-radius: var(--radius-sm);
  overflow: clip;
  background: var(--surface-subtle);
}

.for-you-thumb img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
}

/* Top Sources Power List */
.top-sources-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.top-source-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 9px;
  border-radius: var(--radius-sm);
  background: var(--surface-elevated);
  border: 1px solid transparent;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.top-source-row:hover,
.top-source-row.active {
  border-color: var(--accent-primary);
  background: var(--accent-soft);
}

.source-rank-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-muted);
  inline-size: 18px;
  text-align: center;
}

.top-source-info {
  flex: 1;
  min-inline-size: 0;
}

.top-source-name {
  font-size: 0.8rem;
  font-weight: 700;
  overflow: clip;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-source-sub {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.power-bar-track {
  margin-block-start: 4px;
  block-size: 4px;
  border-radius: 2px;
  background: var(--border-subtle);
  overflow: clip;
}

.power-bar-fill {
  block-size: 100%;
  border-radius: 2px;
}

.top-source-metrics {
  text-align: end;
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

.metric-pill {
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--surface-card);
  font-weight: 700;
  color: var(--accent-primary);
}

/* Active Topics Cloud */
.topic-cloud-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.topic-cloud-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border-subtle);
  background: var(--surface-elevated);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  font-weight: 600;
  transition: all 0.15s ease;
}

.topic-cloud-btn:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.topic-cloud-count {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--surface-card);
  color: var(--text-muted);
}

/* ==========================================================================
   7. Topic Desks Grid (CSS Grid + Subgrid Card Alignment)
   ========================================================================== */
.topic-desks-section {
  margin-block-start: 38px;
}

.topic-desks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 20px;
}

.desk-card {
  grid-row: span 4;
  display: grid;
  /* Explicit track fallback before subgrid per modern-web-guidance */
  grid-template-rows: auto auto 1fr auto;
  grid-template-rows: subgrid;
  gap: 12px;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 18px;
  overflow: clip;
}

.desk-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-block-end: 10px;
  border-block-end: 2px solid var(--border-subtle);
}

.desk-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-headline);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.desk-explore-btn {
  border: 0;
  background: var(--surface-subtle);
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.desk-explore-btn:hover {
  background: var(--accent-primary);
  color: #ffffff;
}

.desk-lead-story {
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
}

.desk-lead-thumb {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-sm);
  overflow: clip;
  background: var(--surface-subtle);
}

.desk-lead-thumb img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
}

.desk-lead-headline {
  font-family: var(--font-headline);
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.28;
  margin: 0;
}

.desk-lead-story:hover .desk-lead-headline {
  color: var(--accent-primary);
}

.desk-sub-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-block-start: 8px;
  border-block-start: 1px solid var(--border-subtle);
}

.desk-sub-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  cursor: pointer;
}

.desk-sub-headline {
  font-family: var(--font-headline);
  font-size: 0.83rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.34;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: clip;
}

.desk-sub-item:hover .desk-sub-headline {
  color: var(--accent-primary);
}

.desk-card-footer {
  padding-block-start: 8px;
  border-block-start: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ==========================================================================
   8. MODE 2: CNN Wire Foundation ("cnn")
   ========================================================================== */
.cnn-hero-stage {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-block-start: 4px solid #dc2626;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: clip;
  margin-block-end: 26px;
}

.cnn-kicker-banner {
  background: #dc2626;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 6px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cnn-hero-body {
  padding: clamp(18px, 2.5vw, 28px);
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 900px) {
  .cnn-hero-body {
    grid-template-columns: 1fr;
  }
}

.cnn-lead-headline {
  margin: 0;
  font-family: var(--font-headline);
  font-size: clamp(1.45rem, 1.18rem + 1.15vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.028em;
  line-height: 1.16;
  text-wrap: balance;
}

.cnn-hero-media {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  overflow: clip;
  background: var(--surface-subtle);
}

.cnn-hero-media img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
}

.cnn-hero-copy {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cnn-bullet-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-block-start: 10px;
  border-block-start: 1px solid var(--border-subtle);
}

.cnn-bullet-item {
  display: flex;
  gap: 8px;
  font-size: 0.85rem;
  line-height: 1.35;
}

.cnn-bullet-item::before {
  content: "■";
  color: #dc2626;
  font-size: 0.7rem;
  margin-block-start: 2px;
}

.cnn-three-col {
  display: grid;
  grid-template-columns: 1fr 1.25fr 1fr;
  gap: 22px;
  align-items: start;
}

@media (max-width: 1040px) {
  .cnn-three-col {
    grid-template-columns: 1fr;
  }
}

.cnn-col-card {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-card);
}

.cnn-col-title {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #dc2626;
  padding-block-end: 8px;
  margin: 0 0 14px;
  border-block-end: 2px solid #dc2626;
}

.cnn-sub-headline {
  font-family: var(--font-headline);
  font-size: 1.06rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.28;
  margin: 6px 0;
}

.cnn-sub-headline a:hover {
  color: var(--accent-primary);
}

/* ==========================================================================
   9. Native <dialog> Modals: Full Coverage, Article Reader & Themes Gallery
   ========================================================================== */
.edition-dialog {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface-card);
  color: var(--text-primary);
  padding: 0;
  inline-size: min(94vw, 960px);
  max-block-size: 88dvh;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  overflow: clip;
}

.themes-dialog {
  inline-size: min(94vw, 840px);
}

.edition-dialog::backdrop {
  background: rgba(9, 13, 22, 0.68);
  backdrop-filter: blur(4px);
}

.dialog-shell {
  display: flex;
  flex-direction: column;
  max-block-size: 88dvh;
}

.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  background: var(--surface-elevated);
  border-block-end: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.dialog-header-meta,
.reader-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fc-desk-badge {
  font-size: 0.74rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--surface-subtle);
}

.fc-momentum-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.dialog-close-btn,
.reader-action-btn {
  border: 1px solid var(--border-strong);
  background: var(--surface-card);
  color: var(--text-primary);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
}

.dialog-close-btn:hover,
.reader-action-btn:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.dialog-body {
  padding: clamp(18px, 2.5vw, 28px);
  overflow-y: auto;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
}

.fc-dialog-title {
  margin: 0 0 8px;
  font-family: var(--font-headline);
  font-size: clamp(1.32rem, 1.08rem + 0.75vw, 1.72rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.22;
}

.fc-hero-banner {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 18px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--surface-elevated);
  border: 1px solid var(--border-subtle);
  margin-block-end: 18px;
}

@media (max-width: 640px) {
  .fc-hero-banner {
    grid-template-columns: 1fr;
  }
}

.fc-hero-thumb {
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-sm);
  overflow: clip;
}

.fc-hero-thumb img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
}

.fc-perspective-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-block-end: 16px;
}

.fc-tab-btn {
  border: 1px solid var(--border-subtle);
  background: var(--surface-subtle);
  color: var(--text-secondary);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
}

.fc-tab-btn.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #ffffff;
}

.fc-articles-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fc-article-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--surface-elevated);
  border: 1px solid var(--border-subtle);
}

@media (max-width: 640px) {
  .fc-article-card {
    grid-template-columns: 1fr;
  }
}

.fc-article-headline {
  font-family: var(--font-headline);
  margin: 4px 0;
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.fc-article-snippet {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.fc-article-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Reader Body */
.reader-body h1,
.reader-body h2 {
  font-family: var(--font-headline);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.24;
}

.reader-byline {
  font-size: 0.82rem;
  color: var(--text-muted);
  padding-block-end: 14px;
  margin-block-end: 18px;
  border-block-end: 1px solid var(--border-subtle);
}

.reader-content-html {
  font-size: 1rem;
  line-height: 1.7;
  max-inline-size: 68ch;
}

.reader-content-html img {
  border-radius: var(--radius-sm);
  margin-block: 14px;
}

.reader-content-html a {
  color: var(--accent-primary);
  text-decoration: underline;
}

.reader-content-html blockquote {
  margin-inline: 0;
  padding-inline-start: 16px;
  border-inline-start: 3px solid var(--accent-primary);
  color: var(--text-secondary);
}

/* Themes & Style Gallery (matching Webnerd.ai proper) */
.gallery-group-title {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 16px 0 8px;
}

.gallery-group-title:first-child {
  margin-block-start: 0;
}

.theme-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(142px, 1fr));
  gap: 10px;
}

.theme-card {
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background: var(--surface-elevated);
  padding: 6px 6px 9px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: start;
  position: relative;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.theme-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-primary);
}

.theme-card.is-active {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px var(--accent-primary);
}

.theme-card.is-active::after {
  content: "✓";
  position: absolute;
  inset-block-start: -7px;
  inset-inline-end: -7px;
  inline-size: 22px;
  block-size: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-primary);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.tp {
  block-size: 66px;
  border-radius: 8px;
  overflow: clip;
  display: flex;
  background: var(--p-bg);
  border: 1px solid rgba(0, 0, 0, 0.14);
}

.tp-side {
  inline-size: 30%;
  background: var(--p-side);
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 5px 0;
}

.tp-side i {
  display: block;
  block-size: 4px;
  border-radius: 2px;
  background: var(--p-text);
  opacity: 0.35;
}

.tp-side i:first-child {
  background: var(--p-accent);
  opacity: 1;
}

.tp-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.tp-bar {
  block-size: 14px;
  background: var(--p-bar);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 4px;
}

.tp-bar b {
  inline-size: 16px;
  block-size: 6px;
  border-radius: 3px;
  background: var(--p-accent);
}

.tp-rows {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
}

.tp-rows i {
  display: block;
  block-size: 4px;
  border-radius: 2px;
  background: var(--p-text);
  opacity: 0.55;
}

.tp-rows i:nth-child(2) {
  inline-size: 75%;
  opacity: 0.35;
}

.tp-rows i:nth-child(3) {
  inline-size: 88%;
  opacity: 0.35;
}

.theme-card-name {
  font-weight: 800;
  font-size: 0.82rem;
  color: var(--text-primary);
  padding: 0 2px;
}

.theme-card-desc {
  font-size: 0.7rem;
  color: var(--text-muted);
  padding: 0 2px;
  line-height: 1.3;
}

/* ==========================================================================
   10. Skeletons, Empty State & Footer
   ========================================================================== */
.loading-skeleton {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.skeleton-hero {
  block-size: 320px;
  border-radius: var(--radius-lg);
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
}

.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.skeleton-card {
  block-size: 220px;
  border-radius: var(--radius-lg);
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
}

.empty-edition {
  text-align: center;
  padding: 56px 20px;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
}

.edition-footer {
  border-block-start: 1px solid var(--border-subtle);
  background: var(--surface-card);
  padding-block: 18px;
  padding-inline: clamp(12px, 2.5vw, 28px);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.edition-footer-inner {
  max-inline-size: var(--max-width);
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.footer-shortcuts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

kbd {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--surface-subtle);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
}

/* ==========================================================================
   11. Below-Lead Navigation Bar, 1-Click Subscribe (+ Follow) & Discovery
   ========================================================================== */
.below-lead-nav {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 6px 10px;
  margin-block: 4px;
}

.below-lead-nav .desk-nav-inner {
  padding-inline: 2px;
  gap: 6px;
}

.below-lead-nav .desk-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  font-size: 0.77rem;
  border-radius: var(--radius-pill);
  border-block-end: 0;
  border: 1px solid transparent;
  background: var(--surface-subtle);
  color: var(--text-secondary);
}

.below-lead-nav .desk-tab:hover {
  border-color: var(--accent-primary);
  color: var(--text-primary);
}

.below-lead-nav .desk-tab.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #ffffff;
}

.below-lead-nav .desk-tab.folder-pill {
  background: var(--surface-elevated);
  border-color: var(--border-subtle);
  font-size: 0.74rem;
}

.below-lead-nav .desk-tab.folder-pill.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #ffffff;
}

.desk-nav-sep {
  inline-size: 1px;
  block-size: 20px;
  background: var(--border-strong);
  margin-inline: 4px;
  flex-shrink: 0;
}

.briefing-stream {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cluster-footer-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Starter Pack & Discovery Badges + 1-Click "+ Follow" Button */
.discovery-pack-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-family: var(--font-mono);
  font-size: 0.63rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  background: rgba(16, 185, 129, 0.14);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.28);
  white-space: nowrap;
}

.follow-source-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  border: 1px solid var(--accent-primary);
  background: var(--accent-soft);
  color: var(--accent-primary);
  font-size: 0.67rem;
  font-weight: 800;
  padding: 1px 8px;
  border-radius: var(--radius-pill);
  line-height: 1.4;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
}

.follow-source-btn:hover {
  background: var(--accent-primary);
  color: #ffffff;
}

.follow-source-btn.is-subscribed {
  border-color: rgba(16, 185, 129, 0.45);
  background: rgba(16, 185, 129, 0.14);
  color: #10b981;
  cursor: default;
}

/* Discover New Voices Sidebar Widget & Showcase Strip */
.widget-link-btn {
  border: 0;
  background: transparent;
  color: var(--accent-primary);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 2px 6px;
  cursor: pointer;
}

.widget-link-btn:hover {
  text-decoration: underline;
}

.widget-Lead-note {
  margin: -4px 0 2px;
  font-size: 0.74rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.discover-sources-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.discover-source-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  background: var(--surface-elevated);
  border: 1px solid var(--border-subtle);
}

.discover-source-main {
  flex: 1;
  min-inline-size: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.discover-source-link {
  border: 0;
  background: transparent;
  padding: 0;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--text-primary);
  text-align: start;
  cursor: pointer;
}

.discover-source-link:hover {
  color: var(--accent-primary);
  text-decoration: underline;
}

.discover-row-sample {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  line-height: 1.32;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: clip;
}

.discover-row-sample:hover {
  color: var(--accent-primary);
}

.discover-row-blurb {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.discover-source-cta {
  flex-shrink: 0;
  padding-block-start: 2px;
}

.discover-showcase-strip {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.discover-strip-header div {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.discover-strip-header strong {
  font-size: 0.9rem;
}

.discover-strip-header span {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.discover-strip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
}

.discover-strip-card {
  background: var(--surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.discover-strip-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.discover-strip-meta {
  flex: 1;
  min-inline-size: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.discover-strip-blurb {
  margin: 0;
  font-size: 0.73rem;
  color: var(--text-muted);
  line-height: 1.32;
}

.discover-sample-headline {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-secondary);
  line-height: 1.32;
}

.discover-sample-headline:hover {
  color: var(--accent-primary);
}

.top-source-name {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Toast Notifications */
.edition-toast-stack {
  position: fixed;
  inset-block-end: 20px;
  inset-inline-end: 20px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.edition-toast {
  background: #0f172a;
  color: #f8fafc;
  border: 1px solid #38bdf8;
  border-radius: var(--radius-pill);
  padding: 9px 16px;
  font-size: 0.8rem;
  font-weight: 700;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.edition-toast.is-leaving {
  opacity: 0;
  transform: translateY(8px);
}

/* ==========================================================================
   12. Google News Mobile / PWA Ergonomics & Compact Density Mode
   ========================================================================== */
body[data-density="compact"] .edition-main {
  padding-block: 14px 36px;
}

body[data-density="compact"] .hero-cluster-card {
  padding: 14px 16px;
}

body[data-density="compact"] .hero-snippet {
  -webkit-line-clamp: 2;
  line-clamp: 2;
  font-size: 0.84rem;
}

body[data-density="compact"] .briefing-stream {
  gap: 10px;
}

body[data-density="compact"] .briefing-cluster-card {
  padding: 12px 14px;
  gap: 8px;
}

body[data-density="compact"] .briefing-card-inner {
  grid-template-columns: minmax(0, 1fr) 96px;
  gap: 12px;
}

body[data-density="compact"] .briefing-thumb-wrap {
  inline-size: 96px;
  block-size: 72px;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
}

body[data-density="compact"] .briefing-headline {
  font-size: 0.98rem;
  line-height: 1.24;
}

body[data-density="compact"] .briefing-snippet {
  display: none;
}

body[data-density="compact"] .briefing-cluster-card .cluster-entity-chips {
  display: none;
}

body[data-density="compact"] .briefing-perspectives {
  padding-block-start: 6px;
}

body[data-density="compact"] .cluster-tree-list {
  grid-template-columns: 1fr;
  gap: 4px;
}

body[data-density="compact"] .tree-subarticle {
  padding-block: 1px;
}

body[data-density="compact"] .tree-subarticle-title {
  font-size: 0.8rem;
  -webkit-line-clamp: 1;
  line-clamp: 1;
}

body[data-density="compact"] .cluster-card-footer {
  padding-block-start: 6px;
}

/* Phone & Mobile PWA Viewport Optimization (Google News Split-Row Density) */
@media (max-width: 680px) {
  .labs-ribbon {
    padding-block: 4px;
    padding-inline: 10px;
  }

  .labs-ribbon-inner {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    gap: 8px;
  }

  .back-reader-text {
    display: none;
  }

  .ribbon-chip {
    padding: 3px 8px;
    font-size: 0.68rem;
    white-space: nowrap;
  }

  .masthead-inner {
    padding-block: 8px;
    padding-inline: 12px;
    gap: 8px;
  }

  .brand-icon {
    inline-size: 32px;
    block-size: 32px;
    border-radius: 9px;
  }

  .brand-name {
    font-size: 1.08rem;
  }

  .brand-subtitle {
    font-size: 0.66rem;
  }

  .layout-btn {
    padding: 5px 10px;
    font-size: 0.74rem;
  }

  .edition-search {
    order: 3;
    flex: 1 1 100%;
    max-inline-size: 100%;
  }

  #editionSearchInput {
    padding-block: 6px;
    font-size: 0.8rem;
  }

  .edition-main {
    padding-block: 12px 36px;
    padding-inline: 10px;
  }

  .section-header {
    margin-block-end: 10px;
    padding-block-end: 6px;
  }

  .section-title {
    font-size: 1.08rem;
  }

  .section-subtitle {
    font-size: 0.73rem;
  }

  /* Lead Hero Card on Mobile: compact 16:9 image + 2-line snippet + 1-line sub-articles */
  .hero-cluster-card {
    padding: 13px;
    border-radius: 14px;
  }

  .hero-cluster-inner {
    gap: 12px;
  }

  .hero-media-wrap {
    aspect-ratio: 16 / 9;
    max-block-size: 185px;
  }

  .hero-headline {
    font-size: 1.16rem;
    line-height: 1.22;
  }

  .hero-snippet {
    font-size: 0.82rem;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }

  .cluster-tree {
    padding: 9px 10px;
    gap: 6px;
  }

  .cluster-tree-list {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .tree-subarticle-title {
    font-size: 0.8rem;
    -webkit-line-clamp: 1;
    line-clamp: 1;
  }

  /* Below-Lead Topic & Folder Bar on Mobile: touch-scrollable pill strip */
  .below-lead-nav {
    padding: 5px 8px;
    border-radius: 12px;
  }

  .below-lead-nav .desk-tab {
    padding: 5px 10px;
    font-size: 0.74rem;
  }

  /* Briefing Cards on Mobile: Google News Split-Row (Headline Left + 86x66 Thumb Right) */
  .briefing-stream {
    gap: 10px;
  }

  .briefing-cluster-card {
    padding: 12px 13px;
    gap: 8px;
    border-radius: 13px;
  }

  .briefing-card-inner {
    grid-template-columns: minmax(0, 1fr) 86px;
    gap: 10px;
    align-items: start;
  }

  .briefing-lead-col {
    gap: 4px;
  }

  .briefing-headline {
    font-size: 0.96rem;
    line-height: 1.24;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    line-clamp: 3;
    overflow: clip;
  }

  .briefing-snippet {
    font-size: 0.78rem;
    -webkit-line-clamp: 1;
    line-clamp: 1;
  }

  .briefing-cluster-card .cluster-entity-chips {
    display: none;
  }

  .briefing-thumb-wrap {
    inline-size: 86px;
    block-size: 66px;
    aspect-ratio: 4 / 3;
    border-radius: 9px;
  }

  .briefing-perspectives {
    padding-block-start: 6px;
  }

  .cluster-card-footer {
    padding-block-start: 6px;
    gap: 6px;
  }

  .full-coverage-btn {
    padding: 4px 10px;
    font-size: 0.72rem;
  }

  .meta-author {
    display: none;
  }
}

/* ==========================================================================
   13. Mixed-Media Video & Podcast Studio Integration
   ========================================================================== */
.hero-media-wrap,
.briefing-thumb-wrap,
.desk-lead-thumb,
.cnn-hero-media,
.fc-hero-thumb,
.media-spotlight-thumb {
  position: relative;
}

.perspective-tag.video {
  background: rgba(239, 68, 68, 0.14);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.34);
}

.perspective-tag.podcast {
  background: rgba(139, 92, 246, 0.16);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.36);
}

html[data-theme="daylight"] .perspective-tag.video,
html[data-theme="newspaper"] .perspective-tag.video,
html[data-theme="sepia"] .perspective-tag.video {
  background: rgba(220, 38, 38, 0.1);
  color: #b91c1c;
  border-color: rgba(220, 38, 38, 0.28);
}

html[data-theme="daylight"] .perspective-tag.podcast,
html[data-theme="newspaper"] .perspective-tag.podcast,
html[data-theme="sepia"] .perspective-tag.podcast {
  background: rgba(124, 58, 237, 0.1);
  color: #6d28d9;
  border-color: rgba(124, 58, 237, 0.28);
}

/* Thumbnail Play Overlay & Multi-Modal Corner Pill */
.media-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(180deg, rgba(10, 15, 29, 0.12) 0%, rgba(10, 15, 29, 0.56) 100%);
  pointer-events: none;
  transition: background-color 0.18s ease;
}

.media-play-circle {
  inline-size: 42px;
  block-size: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(220, 38, 38, 0.92);
  color: #ffffff;
  font-size: 1rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
  border: 2px solid rgba(255, 255, 255, 0.85);
}

.media-play-overlay.podcast .media-play-circle {
  background: rgba(124, 58, 237, 0.92);
}

.media-play-label {
  position: absolute;
  inset-block-end: 8px;
  inset-inline-start: 8px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: rgba(10, 15, 29, 0.84);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
}

.media-corner-pill {
  position: absolute;
  inset-block-end: 8px;
  inset-inline-end: 8px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: rgba(15, 23, 42, 0.86);
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  pointer-events: none;
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

/* Watch & Listen Spotlight Strip */
.media-spotlight-section {
  margin-block: 24px 28px;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
}

.media-spotlight-section .section-header {
  margin-block-end: 14px;
}

.media-spotlight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
  gap: 14px;
}

.media-spotlight-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-md);
  background: var(--surface-elevated);
  border: 1px solid var(--border-subtle);
  overflow: clip;
  transition: transform 0.16s ease, border-color 0.16s ease;
}

.media-spotlight-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-primary);
}

.media-spotlight-thumb {
  aspect-ratio: 16 / 9;
  background: var(--surface-subtle);
  overflow: clip;
  cursor: pointer;
}

.media-spotlight-thumb img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  display: block;
}

.media-spotlight-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.media-spotlight-headline {
  margin: 0;
  font-family: var(--font-headline);
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.015em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: clip;
}

.media-spotlight-headline a {
  color: var(--text-primary);
  text-decoration: none;
}

.media-spotlight-headline a:hover {
  color: var(--accent-primary);
}

.media-spotlight-actions {
  margin-block-start: auto;
  padding-block-start: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* In-Drawer YouTube 16:9 Theater Stage */
.reader-video-stage {
  margin-block: 14px 20px;
  border-radius: var(--radius-md);
  overflow: clip;
  border: 1px solid var(--border-strong);
  background: #05070e;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.reader-video-aspect {
  position: relative;
   inline-size: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.reader-video-aspect iframe {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  border: 0;
}

.reader-media-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: var(--surface-elevated);
  border-block-start: 1px solid var(--border-subtle);
}

/* In-Drawer Studio Podcast Deck */
.reader-podcast-deck {
  margin-block: 14px 20px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.14), rgba(37, 99, 235, 0.1));
  border: 1px solid rgba(139, 92, 246, 0.35);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.podcast-deck-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.podcast-deck-art {
  inline-size: 68px;
  block-size: 68px;
  border-radius: 14px;
  overflow: clip;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28);
}

.podcast-deck-art img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
}

.podcast-deck-meta {
  min-inline-size: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.podcast-deck-show {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-secondary);
}

.podcast-deck-ep {
  font-family: var(--font-headline);
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.25;
}

.podcast-scrubber-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.podcast-scrubber {
  flex: 1;
  accent-color: #8b5cf6;
  cursor: pointer;
}

.podcast-clock {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-muted);
  min-inline-size: 38px;
}

.podcast-controls-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.podcast-play-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Equalizer Animation */
.podcast-eq {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  block-size: 14px;
}

.podcast-eq i {
  display: inline-block;
  inline-size: 3px;
  block-size: 4px;
  border-radius: 2px;
  background: #a78bfa;
  transition: block-size 0.2s ease;
}

.podcast-eq.playing i:nth-child(1) {
  animation: eqPulse 0.65s ease-in-out infinite alternate;
}
.podcast-eq.playing i:nth-child(2) {
  animation: eqPulse 0.45s ease-in-out 0.15s infinite alternate;
}
.podcast-eq.playing i:nth-child(3) {
  animation: eqPulse 0.55s ease-in-out 0.25s infinite alternate;
}
.podcast-eq.playing i:nth-child(4) {
  animation: eqPulse 0.5s ease-in-out 0.08s infinite alternate;
}

@keyframes eqPulse {
  0% {
    block-size: 3px;
  }
  100% {
    block-size: 14px;
  }
}

@media (max-width: 720px) {
  .briefing-thumb-wrap .media-play-circle {
    inline-size: 28px;
    block-size: 28px;
    font-size: 0.74rem;
  }

  .briefing-thumb-wrap .media-play-label,
  .briefing-thumb-wrap .media-corner-pill {
    font-size: 0.56rem;
    padding: 1px 5px;
    inset-block-end: 4px;
  }

  .media-spotlight-section {
    padding: 12px 13px;
    margin-block: 14px 18px;
  }

  .media-spotlight-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 12px;
    padding-block-end: 4px;
  }

  .media-spotlight-card {
    min-inline-size: 235px;
    max-inline-size: 255px;
    scroll-snap-align: start;
    flex-shrink: 0;
  }
}

