/*
 * Design System - The Archive of American Radio
 * Based on iopictures.com styling
 * Breakpoints: 570px, 1024px
 * Rule: never use the important override in CSS.
 */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --font: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --black: #000;
  --dark: #030104;
  --dark-card: #0d0d0d;
  --light-bg: #f9f9f9;
  --white: rgba(255, 255, 255, 0.95);
  --white-90: rgba(255, 255, 255, 0.95);
  --gray: #5d5d5d;
  /* 44-based spacing: 44 / 22 / 11 / 5.5 */
  --unit: 44px;
  --unit-half: 22px;
  --unit-quarter: 11px;
  --unit-eighth: 5.5px;
  --header-height: var(--unit);

  /* Brand */
  --accent-color: #0A84FF;

  /* Apple System Colors */
  --system-blue: #63b6f7;
  --link-color: #63b6f7;
  --system-yellow: #FFCC00;
  --system-red: #FF3B30;
  --system-green: #34C759;
  --system-orange: #FF9500;

  /* Apple System Grays - Light Mode */
  --system-gray: #8E8E93;
  --system-gray2: #AEAEB2;
  --system-gray3: #C7C7CC;
  --system-gray4: #D1D1D6;
  --system-gray5: #E5E5EA;
  --system-gray6: #F2F2F7;

  /* Typography - fluid hero/subtitle, fixed body (320px min breakpoint) */
  --text-hero: clamp(1.5rem, 6vw, 3rem);
  --text-title: 2rem;
  --text-subtitle: clamp(0.875rem, 2.5vw, 1.25rem);
  --text-nav: 1rem;
  --text-body: 1rem;
  --text-small: 0.875rem;

  /* Fluid Spacing */
  --space-xs: clamp(0.5rem, 1vw, 0.75rem);
  --space-sm: clamp(0.75rem, 2vw, 1rem);
  --space-md: clamp(1rem, 3vw, 1.5rem);
  --space-lg: clamp(1.5rem, 4vw, 2.5rem);
  --space-xl: clamp(2rem, 6vw, 4rem);

  /* Fixed Layout */
  --space-nav: 12px;
  --space-ticker: clamp(2rem, 6vw, 4rem);
  --row-height: 35px;

  /* Default theme (light) - prevents flash before JS runs */
  color-scheme: light;
  --color-fill: #0d0d0d;
  --color-fill-heading: #0d0d0d;
  --color-fill-secondary: #5d5d5d;
  --color-background: #fff;
  --color-background-secondary: #f9f9f9;
  /* Separator color matches x.com (light). */
  --color-border: rgb(239, 243, 244);
  --header-bg: rgba(255, 255, 255, 0.8);
}

@media (prefers-color-scheme: light) {
  :root { --accent-color: #007AFF; }
}
@media (prefers-contrast: more) and (prefers-color-scheme: light) {
  :root { --accent-color: #1E6EF4; }
}
@media (prefers-contrast: more) and (prefers-color-scheme: dark) {
  :root { --accent-color: #5CB8FF; }
}

/* Light theme */
[data-theme="light"] {
  color-scheme: light;
  --color-fill: #0d0d0d;
  --color-fill-heading: #0d0d0d;
  --color-fill-secondary: #5d5d5d;
  --color-background: #fff;
  --color-background-secondary: #f9f9f9;
  --color-border: rgb(239, 243, 244);
  --header-bg: rgba(255, 255, 255, 0.8);
}

/* Dark theme */
[data-theme="dark"] {
  color-scheme: dark;
  --color-fill: #ececec;
  --color-fill-heading: #ececec;
  --color-fill-secondary: #9b9b9b;
  --color-background: #000;
  --color-background-secondary: #1a1a1a;
  /* Separator color matches x.com (dark). */
  --color-border: rgb(47, 51, 54);
  --header-bg: rgba(0, 0, 0, 0.8);
  --link-color: #63b6f7;

  /* Apple System Grays - Dark Mode */
  --system-gray: #8E8E93;
  --system-gray2: #636366;
  --system-gray3: #48484A;
  --system-gray4: #3A3A3C;
  --system-gray5: #2C2C2E;
  --system-gray6: #1C1C1E;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-y: scroll;
  background-color: var(--color-background);
}

/* Global Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  height: 36px;
  padding: 0 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  border: none;
}

.btn-primary {
  background: #0d0d0d;
  color: #fff;
}

[data-theme="dark"] .btn-primary {
  background: #ececec;
  color: #0d0d0d;
}

.btn-primary:hover {
  opacity: 0.85;
}

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

.btn-secondary {
  background: transparent;
  color: var(--color-fill-heading);
  border: 2px solid rgba(13,13,13,0.15);
}

[data-theme="dark"] .btn-secondary {
  border-color: rgba(255,255,255,0.15);
}

.btn-secondary:hover {
  border-color: var(--color-fill-secondary);
}


body {
  min-height: 100vh;
  background: var(--color-background);
  font-family: var(--font);
  font-size: 17px;
  color: var(--color-fill);
  line-height: 1.47059;
  font-weight: 400;
  font-style: normal;
  font-synthesis: none;
  -moz-font-feature-settings: 'kern';
  text-align: left;
  display: flex;
  flex-direction: column;
  padding-top: 0;
}

html[data-page="home"] body {
  padding-top: 0;
  min-height: 100vh;
}


img {
  max-width: 100%;
  height: auto;
}

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

/* ============================================
   Theme Toggle (in nav bar)
   ============================================ */

/* ============================================
   Dev Controls (Zoom-style floating bar)
   ============================================ */


.theme-toggle {
  border: none;
  background: transparent;
  color: var(--color-fill-secondary);
  cursor: pointer;
  font-size: 16px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  margin-left: 0.5rem;
  flex-shrink: 0;
}

.theme-toggle:hover {
  color: var(--color-fill);
  background: var(--color-background-secondary);
}

.dev-controls {
  position: fixed;
  bottom: 12px;
  right: 12px;
  z-index: 10000;
  display: flex;
  flex-direction: row;
  gap: 0;
  background: var(--color-background);
  border: 1px solid var(--color-fill-secondary);
  border-radius: 8px;
  padding: 4px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Horizontal/landscape layouts: bottom center */
@media (min-aspect-ratio: 1/1) {
  .dev-controls {
    right: auto;
    left: 50%;
    transform: translateX(-50%);
  }
}

[data-theme="dark"] .dev-controls {
  background: var(--color-background-secondary);
}

.dev-controls button {
  border: none;
  background: transparent;
  color: var(--color-fill);
  cursor: pointer;
  font-size: 14px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.dev-controls button:hover {
  background: var(--color-background-secondary);
}

.nav-spacer {
  flex: 1;
  height: 48px;
}

.title-text {
  display: inline-block;
  transform: scale(1.03) scaleX(0.75);
  transform-origin: center center;
  white-space: nowrap;
}

.title-radio,
.title-index {
  font-family: var(--font);
  font-weight: 900;
  font-size: 3rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: inherit;
}

.title-radio {
  margin-right: 0.25em;
}

.title-radio .l1 { -webkit-text-stroke: 1.5px currentColor; }
.title-radio .l2 { -webkit-text-stroke: 0.9px currentColor; }
.title-radio .l3 { -webkit-text-stroke: 0.6px currentColor; }
.title-radio .l4 { -webkit-text-stroke: 0.3px currentColor; }
.title-radio .l5 { -webkit-text-stroke: 0px currentColor; }

/* Subtle baseline wobble and weight variation */
.title-radio span,
.title-index span {
  display: inline-block;
}
.l1 { transform: translateY(0.2px) scale(1.03); }
.l2 { transform: translateY(-0.15px) scale(1.02); }
.l3 { transform: translateY(0.1px) scale(1.01); }
.l4 { transform: translateY(-0.2px) scale(0.99); }
.l5 { transform: translateY(0.1px) scale(0.98); }
.l6 { transform: translateY(-0.1px) scale(0.98); }
.l7 { transform: translateY(0.15px) scale(0.99); }
.l8 { transform: translateY(-0.1px) scale(0.99); }
.l9 { transform: translateY(0.2px) scale(1.02); }
.l10 { transform: translateY(-0.15px) scale(1.03); }

/* ============================================
   Header (iopictures style)
   ============================================ */

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 220; /* ensure header dropdowns sit above fixed home tabs */
  height: var(--unit);
  background: transparent;
  padding-top: env(safe-area-inset-top, 0px);
  pointer-events: none;
  overflow: visible;
  will-change: transform;
  transition: transform 180ms ease;
}

header > * {
  pointer-events: auto;
}

.header-spacer {
  display: none;
}

/* safe-area handled by header padding-top */

.company-name-row {
  min-height: var(--row-height);
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.legal-row,
.copyright-row {
  min-height: var(--row-height);
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.nav-row {
  height: var(--unit);
  width: 100%;
  display: flex;
  background: var(--color-background);
  position: relative;
  border-bottom: 1px solid var(--color-border);
}


/* Single-row nav bar */
.nav-bar {
  display: flex;
  align-items: center;
  gap: 11px;
  height: 44px;
  width: 100%;
  padding: 0;
  position: relative;
}

.nav-bar > * {
  flex-shrink: 0;
}

.nav-bar .nav-logo-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0;
  text-decoration: none;
  cursor: pointer;
}

.nav-bar .nav-logo-link:hover {
  text-decoration: none;
}

.nav-bar .logo-icon-circle.nav-size {
  width: 24px;
  min-width: 24px;
  height: 24px;
  min-height: 24px;
  padding: 4px;
}

.nav-bar .nav-wordmark-ri {
  font-size: 22px;
  font-weight: 600;
  line-height: 28px;
}

.nav-bar .nav-wordmark-aar {
  font-size: 0.65rem;
}

/* ChatGPT-style model picker button */
.nav-model-picker {
  position: relative;
}

.nav-model-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 36px;
  padding: 0 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--color-fill-heading);
  cursor: pointer;
  font-family: inherit;
  font-size: 18px;
  font-weight: 600;
  line-height: 28px;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

@media (hover: hover) {
  .nav-model-btn:hover {
    background: rgba(0, 0, 0, 0.07);
  }
  [data-theme="dark"] .nav-model-btn:hover {
    background: rgba(255, 255, 255, 0.1);
  }
}

.nav-model-chevron {
  color: var(--color-fill-heading);
  opacity: 1;
  font-size: 22px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.nav-model-picker .nav-more-dropdown {
  left: 50px;
  right: auto;
  transform: none;
}

/* Archive model picker: transparent, no pill */
body[data-site="archive"] .nav-model-btn {
  background: transparent;
  padding: 0;
  gap: 6px;
}

body[data-site="archive"] .nav-model-btn:hover {
  background: transparent;
}

[data-theme="dark"] body[data-site="archive"] .nav-model-btn,
[data-theme="dark"] body[data-site="archive"] .nav-model-btn:hover {
  background: transparent;
}

/* Archive header Radio Index button */
.nav-header-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 9999px;
  text-decoration: none;
  white-space: nowrap;
  background: transparent;
  color: var(--color-fill-heading);
  border: 1px solid rgba(128, 128, 128, 0.25);
  flex-shrink: 0;
}

.nav-header-link:hover {
  border-color: rgba(128, 128, 128, 0.5);
  text-decoration: none;
}

@media (max-width: 400px) {
  .nav-header-link {
    display: none;
  }
}

/* Archive support button — matches .nav-login-btn style */
.nav-support-btn,
a.nav-support-btn,
a.nav-support-btn:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 9999px;
  border: none;
  text-decoration: none;
  white-space: nowrap;
  background: #0d0d0d;
  color: #fff;
  flex-shrink: 0;
}

[data-theme="dark"] a.nav-support-btn,
[data-theme="dark"] a.nav-support-btn:visited {
  background: #ececec;
  color: #0d0d0d;
}

.nav-support-btn:hover {
  opacity: 0.85;
  text-decoration: none;
}

@media (max-width: 600px) {
  .nav-support-btn,
  a.nav-support-btn {
    display: none;
  }
}

.nav-links-inline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
  font-weight: 500;
}

.nav-links-inline a {
  display: flex;
  align-items: center;
  padding: 6px 12px;
  color: var(--color-fill-secondary);
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  white-space: nowrap;
  text-decoration: none;
}

.nav-links-inline a.active {
  color: var(--color-fill-heading);
}

.nav-links-inline .nav-toggle.is-open {
  color: var(--color-fill-heading);
}

.nav-links-inline a:hover {
  color: var(--color-fill-heading);
  text-decoration: none;
}

.nav-bar a:hover {
  text-decoration: none;
}

/* More menu (...) */
.nav-more {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-more-btn {
  background: none;
  border: none;
  color: var(--color-fill-secondary);
  cursor: pointer;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  border-radius: 999px;
}

.nav-more-btn svg {
  display: block;
}

.nav-more-btn:hover {
  color: var(--color-fill-heading);
}

.nav-more-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  pointer-events: auto;
  min-width: 180px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  padding: 4px 0;
  z-index: 200;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

[data-theme="dark"] .nav-more-dropdown {
  background: #0a0a0a;
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
}

.nav-more-dropdown .dropdown-group {
  padding: 4px 0;
}

.nav-more-dropdown .dropdown-group + .dropdown-group {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .nav-more-dropdown .dropdown-group + .dropdown-group {
  border-top-color: rgba(255, 255, 255, 0.06);
}

.nav-more-dropdown a,
.nav-more-dropdown button,
.nav-more-dropdown .nav-disabled {
  display: block;
  width: 100%;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 400;
  color: var(--color-fill-heading);
  text-decoration: none;
  white-space: nowrap;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}

.nav-disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

.nav-more-dropdown a:hover {
  background: rgba(0, 0, 0, 0.04);
  text-decoration: none;
}

[data-theme="dark"] .nav-more-dropdown a:hover {
  background: rgba(255, 255, 255, 0.05);
}

.nav-row .row-container {
  flex: 1;
  min-width: 0;
  padding: 0 16px;
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
  border-left: none;
  border-right: none;
  box-sizing: border-box;
  width: 100%;
}

/* Theme toggle icon */
.nav-theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  color: var(--color-fill-heading);
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}

.nav-theme-toggle:hover {
  background: rgba(128, 128, 128, 0.2);
  color: var(--color-fill-heading);
}

/* Show icon matching current theme mode */
.theme-icon { display: none; }

/* Default: system mode */
html[data-theme-mode="system"] .theme-icon-system { display: block; }
html[data-theme-mode="light"] .theme-icon-light { display: block; }
html[data-theme-mode="dark"] .theme-icon-dark { display: block; }

/* Fallback before JS sets data-theme-mode */
html:not([data-theme-mode]) .theme-icon-system { display: block; }

/* Right-side group (theme toggle + pill button) */
.nav-toolbar {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-left: auto;
  min-width: 0;
}

/* Nav pill buttons (BetaList style - padding based) */
.nav-pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 6px 14px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 24px;
  user-select: none;
}

a.nav-pill-filled,
a.nav-pill-filled:visited {
  background: var(--color-fill-heading);
  color: var(--color-background);
}

[data-theme="dark"] a.nav-pill-filled,
[data-theme="dark"] a.nav-pill-filled:visited {
  background: #fff;
  color: #000;
}

.nav-pill-filled:hover {
  opacity: 0.85;
  text-decoration: none;
}

/* ChatGPT-style header auth buttons */
.nav-login-btn,
a.nav-login-btn,
a.nav-login-btn:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
  background: #0d0d0d;
  color: #fff;
  flex-shrink: 0;
}

[data-theme="dark"] a.nav-login-btn,
[data-theme="dark"] a.nav-login-btn:visited {
  background: #ececec;
  color: #0d0d0d;
}

.nav-login-btn:hover {
  opacity: 0.85;
  text-decoration: none;
}

.nav-signup-btn,
a.nav-signup-btn,
a.nav-signup-btn:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
  background: transparent;
  color: var(--color-fill-heading);
  border: 2px solid rgba(0,0,0,0.15);
}

[data-theme="dark"] a.nav-signup-btn,
[data-theme="dark"] a.nav-signup-btn:visited {
  border-color: rgba(255,255,255,0.15);
  color: #ececec;
}

.nav-signup-btn:hover {
  border-color: var(--color-fill-secondary);
  text-decoration: none;
}

@media (max-width: 500px) {
  a.nav-signup-btn {
    display: none;
  }
}

.nav-pill-btn .nav-wordmark-ri {
  font-size: 0.85rem;
}

/* Hamburger button - hidden on desktop */
.nav-hamburger {
  display: none;
  align-items: center;
  gap: 6px;
  border: none;
  background: transparent;
  color: var(--color-fill-secondary);
  cursor: pointer;
  padding: 6px 0;
  margin-left: auto;
}

.nav-hamburger:hover {
  color: var(--color-fill-heading);
}

.hamburger-icon { display: block; }
.hamburger-close { display: none; }
.nav-hamburger.is-open .hamburger-open { display: none; }
.nav-hamburger.is-open .hamburger-close { display: block; }

/* Mobile menu - fullscreen overlay below nav */
.nav-mobile-menu {
  display: none;
}

/* Responsive: collapse nav under 1024px */
@media (max-width: 1023px) {
  .nav-links-inline {
    display: none;
  }

  .nav-toolbar {
    display: flex;
  }

  .nav-hamburger {
    display: flex;
    margin: 0;
  }

  .nav-account {
    margin-left: auto;
  }

  /* Hide wordmark, show only circle logo on tablet (Archive site only) */
  .nav-bar .nav-logo-link .nav-wordmark-ri,
  .nav-bar .nav-logo-link .nav-wordmark-aar {
    display: none;
  }
}

/* Mobile only: show wordmark + caret hamburger */
@media (max-width: 500px) {
  .nav-bar .nav-logo-link .logo-icon-circle {
    display: none;
  }

  .nav-bar .nav-logo-link .nav-wordmark-ri,
  .nav-bar .nav-logo-link .nav-wordmark-aar {
    display: inline;
  }

  .nav-bar {
    position: relative;
  }

  .nav-bar > * {
    flex-shrink: 1;
  }

  .nav-logo-link {
    order: 0;
    min-width: 0;
  }

  .nav-hamburger {
    order: 1;
    position: static;
    width: auto;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 4px;
  }

  /* Hide three-line and X icons, show caret */
  .nav-hamburger .hamburger-icon {
    display: none;
  }

  .nav-hamburger::after {
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--color-fill-secondary);
    border-bottom: 2px solid var(--color-fill-secondary);
    transform: rotate(45deg);
    margin-top: -3px;
  }

  .nav-hamburger.is-open::after {
    transform: rotate(-135deg);
    margin-top: 3px;
  }

  .nav-account {
    order: 2;
    margin-left: auto;
  }

  .nav-toolbar {
    order: 3;
  }

}

/* Tablet+: orange circle in 45px left square */
@media (min-width: 501px) {
  .nav-bar .nav-logo-link .logo-icon-circle {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    z-index: 101;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #000;
    padding: 0;
    top: 22px;
    left: 22px;
  }

  [data-theme="dark"] .nav-bar .nav-logo-link .logo-icon-circle {
    background: #fff;
  }

  .nav-bar .nav-logo-link .logo-icon-circle .logo-icon-svg {
    width: 20px;
    height: 20px;
    filter: invert(1);
  }

  [data-theme="dark"] .nav-bar .nav-logo-link .logo-icon-circle .logo-icon-svg {
    filter: invert(1);
  }

}

/* Mobile menu styles (under 1024px) */
@media (max-width: 1023px) {
  .nav-mobile-menu {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--unit);
    left: 0;
    width: 200px;
    background: var(--color-background);
    z-index: 200;
    padding: 12px 16px;
    gap: 4px;
    overflow-y: auto;
    pointer-events: auto;
    border-radius: 12px;
    border: 1px solid var(--color-border);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  }

  [data-theme="dark"] .nav-mobile-menu {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  }

  .nav-mobile-menu[hidden] {
    display: none;
  }

  body.mobile-menu-open {
    /* no longer fullscreen, don't lock scroll */
  }

  .nav-mobile-menu a,
  .nav-mobile-menu .nav-disabled {
    font-size: 16px;
    font-weight: 500;
    color: var(--color-fill-heading);
    text-decoration: none;
    padding: 6px 0;
  }

  .nav-mobile-menu a.active {
    color: var(--color-fill-heading);
  }

  .nav-mobile-close {
    display: none;
    padding: 8px;
  }

  .nav-mobile-divider {
    height: 1px;
    background: rgba(128, 128, 128, 0.15);
    margin: 8px 0;
  }

  .nav-mobile-theme {
    width: 36px;
    height: 36px;
    padding: 8px;
  }

  .nav-mobile-close:hover {
    background: rgba(128, 128, 128, 0.2);
    color: var(--color-fill-heading);
  }
}

.nav-links {
  display: flex;
  align-items: stretch;
  flex-wrap: nowrap;
  gap: 0;
  width: auto;
  padding-bottom: 12px;
  align-self: flex-start;
}



.nav-links-scroll {
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  flex: 1;
  justify-content: flex-start;
  padding-left: 16px;
}

@media (min-width: 500px) {
  .nav-links-scroll {
    padding-left: 24px;
  }
}

.nav-links-scroll::-webkit-scrollbar {
  display: none;
}

.nav-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 70px;
  padding: 12px 0.75rem;
  color: var(--color-fill);
  font-size: var(--text-small);
  font-weight: 400;
  white-space: nowrap;
  text-decoration: none;
}

.nav-links a:last-child {
  padding-right: 0;
}

.nav-links a:first-child {
  padding-left: 0;
}

@media (max-width: 499px) {
  .nav-links {
    width: 100%;
  }

  .nav-links a {
    padding: 12px 0.25rem;
    min-width: auto;
  }
}

.nav-links a span {
  position: relative;
}

.nav-links a span::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 0;
  right: 0;
  height: 2px;
  background: transparent;
}

.nav-icon {
  vertical-align: -2px;
  margin-right: 4px;
}

.nav-logo-link {
  display: flex;
  align-items: center;
  padding: 12px 0.5rem;
}

.nav-logos .nav-logo-link:first-child {
  min-width: auto;
  padding: 0;
}

.nav-logos .nav-logo-link:last-child {
  padding: 0;
}

.nav-logo-link::after {
  display: none;
}

.nav-site-svg {
  height: 24px;
  width: auto;
  display: block;
}

[data-theme="dark"] .nav-site-svg {
  filter: invert(1);
}

.nav-size {
  width: 40px;
  min-width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 8px;
}

.nav-logo-aar {
  position: relative;
  background: #000;
  border: none;
  box-shadow: none;
  overflow: hidden;
}

.nav-logo-aar::before,
.nav-logo-aar::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 200%;
  height: 200%;
  background:
    radial-gradient(0.5px 0.5px at 10% 20%, #fff 100%, transparent),
    radial-gradient(0.5px 0.5px at 30% 70%, #fff 100%, transparent),
    radial-gradient(0.5px 0.5px at 50% 15%, #fff 100%, transparent),
    radial-gradient(0.5px 0.5px at 70% 45%, #fff 100%, transparent),
    radial-gradient(0.5px 0.5px at 85% 75%, #fff 100%, transparent),
    radial-gradient(0.5px 0.5px at 20% 55%, #fff 100%, transparent),
    radial-gradient(0.5px 0.5px at 80% 25%, #fff 100%, transparent),
    radial-gradient(0.5px 0.5px at 45% 85%, #fff 100%, transparent),
    radial-gradient(0.5px 0.5px at 65% 35%, #fff 100%, transparent),
    radial-gradient(0.5px 0.5px at 35% 40%, #fff 100%, transparent),
    radial-gradient(0.5px 0.5px at 75% 60%, #fff 100%, transparent),
    radial-gradient(0.5px 0.5px at 15% 80%, #fff 100%, transparent),
    radial-gradient(0.5px 0.5px at 90% 30%, #fff 100%, transparent),
    radial-gradient(0.5px 0.5px at 55% 50%, #fff 100%, transparent),
    radial-gradient(0.5px 0.5px at 25% 65%, #fff 100%, transparent),
    radial-gradient(0.5px 0.5px at 60% 10%, #fff 100%, transparent),
    radial-gradient(0.5px 0.5px at 40% 90%, #fff 100%, transparent),
    radial-gradient(0.5px 0.5px at 5% 50%, #fff 100%, transparent),
    radial-gradient(0.5px 0.5px at 95% 55%, #fff 100%, transparent),
    #000;
  mask-image: radial-gradient(circle, black 30%, transparent 55%);
  -webkit-mask-image: radial-gradient(circle, black 30%, transparent 55%);
}

.nav-logo-aar::before {
  animation: starfield-warp 12s linear infinite;
}

.nav-logo-aar::after {
  animation: starfield-warp 12s linear infinite -6s;
}

@keyframes starfield-warp {
  0% {
    transform: translate(-50%, -50%) scale(0.4);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 0;
  }
}

.nav-logo-aar .logo-icon-svg {
  filter: invert(1) brightness(1);
  transform: none;
  position: relative;
  z-index: 2;
}

[data-theme="dark"] .nav-logo-aar {
  background: #000;
}

[data-theme="dark"] .nav-logo-aar .logo-icon-svg {
  filter: invert(1) brightness(1);
}

.nav-logo-aar:hover::before {
  animation-duration: 0.4s;
  opacity: 1;
}

.nav-logo-aar:hover .logo-icon-svg {
  filter: invert(1) brightness(1);
}

[data-theme="dark"] .nav-logo-aar:hover::before {
  animation-duration: 0.4s;
  opacity: 1;
}

[data-theme="dark"] .nav-logo-aar:hover .logo-icon-svg {
  filter: invert(1) brightness(1);
}

.nav-logo-wordmark {
  background: #fff;
  border: 1px solid #d2d2d7;
  padding: 4px;
  margin-left: -8px;
}

[data-theme="dark"] .nav-logo-wordmark {
  background: #000;
  border-color: #424245;
}

.logo-wordmark-svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: none;
}

[data-theme="dark"] .logo-wordmark-svg {
  filter: invert(1);
}

.nav-logo-wordmark:hover {
  background: #0d0d0d;
  border-color: #0d0d0d;
}

.nav-logo-wordmark:hover .logo-wordmark-svg {
  filter: invert(1);
}

.nav-wordmark-svg {
  width: 170px;
  height: auto;
}

.nav-wordmark-text {
  font-size: var(--text-small);
  font-weight: 600;
  line-height: 1.2;
}

.nav-wordmark-text span {
  color: var(--accent-color);
  white-space: nowrap;
}

.nav-wordmark-aar {
  font-family: 'News Cycle', sans-serif;
  font-size: 0.78rem;
  letter-spacing: 1.4pt;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1.2;
  white-space: nowrap;
}

.nav-wordmark-aar .wm-archive-of {
  font-weight: 400;
  -webkit-text-stroke: 1.3pt currentColor;
  color: var(--color-fill-heading);
}

.nav-wordmark-aar .wm-american-radio {
  font-weight: 700;
  -webkit-text-stroke: 1.3pt currentColor;
  color: var(--color-fill-heading);
}

.nav-wordmark-aar:hover {
  text-decoration: none;
}

.nav-link-heavy {
  font-weight: 800;
}

.nav-wordmark-ri {
  font-family: 'Libre Franklin', sans-serif;
  font-style: italic;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.nav-wordmark-ri .wm-radio {
  font-weight: 900;
  color: var(--color-fill-heading);
}

.nav-wordmark-ri .wm-index {
  font-weight: 700;
  color: var(--accent-color);
}

.nav-wordmark-ri:hover {
  text-decoration: none;
}

.nav-logo-rotate {
  position: relative;
  display: grid;
  align-items: center;
  height: 40px;
}

.nav-logo-rotate .rotate-img {
  grid-area: 1 / 1;
  animation: rotate-fade 10s infinite;
}

.nav-logo-rotate .rotate-img:nth-child(2) {
  animation-delay: -5s;
}

.nav-title-text {
  display: flex;
  align-items: center;
  white-space: nowrap;
  transform: scaleX(0.65);
  transform-origin: left center;
}

.nav-title-text .title-radio,
.nav-title-text .title-index {
  font-size: 2rem;
  line-height: 1;
}


.nav-logo-rotate .nav-wordmark-ri {
  height: 40px;
  min-height: 40px;
  max-height: 40px;
  margin: 0;
}

@keyframes rotate-fade {
  0%, 45% { opacity: 1; }
  50%, 95% { opacity: 0; }
  100% { opacity: 1; }
}

[data-theme="dark"] .nav-wordmark-svg {
  filter: invert(1);
}

.nav-wordmark-svg:hover {
  filter: brightness(0) saturate(100%) invert(42%) sepia(93%) saturate(1350%) hue-rotate(196deg) brightness(100%) contrast(101%);
}

.nav-links a.active {
  /* no weight change to avoid layout shift */
}

.nav-links a.active span::after {
  background: var(--color-fill);
}

.nav-links.panel-open a.active span::after {
  display: none;
}

@media (hover: hover) {
  .nav-links a:hover {
    color: var(--color-fill);
    text-decoration: none;
  }

  .nav-links a:hover span::after {
    background: var(--color-fill);
  }
}

.nav-cta {
  background: #131313;
  color: #fff;
  min-width: 140px;
  height: 48px;
  padding: 0 2rem;
  font-size: var(--text-small);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  border-radius: 999px;
  flex-shrink: 0;
  align-self: center;
  border: none;
  text-decoration: none;
}

[data-theme="dark"] .nav-cta {
  background: #131313;
  color: #fff;
}

.nav-cta-dark {
  background: #000;
  color: #fff;
}

[data-theme="dark"] .nav-cta-dark {
  background: #fff;
  color: #000;
}

.nav-cta-ri {
  background: #131313;
  color: #fff;
}

.nav-cta-ri span {
  color: var(--accent-color);
}

[data-theme="dark"] .nav-cta-ri {
  background: #131313;
  color: #fff;
}

@media (hover: hover) {
  .nav-cta:hover {
    background: #0d0d0d;
  }
}

.company-name-row {
  min-height: 96px;
}

.archive-title-svg {
  height: 48px;
  width: auto;
}

[data-theme="dark"] .archive-title-svg {
  filter: invert(1);
}

.hero-logo-svg {
  width: clamp(200px, 50%, 400px);
  height: auto;
  margin-bottom: 1.5rem;
  filter: none;
}

[data-theme="dark"] .hero-logo-svg {
  filter: invert(1);
}

.hero-title {
  font-family: var(--font);
  font-size: 48px;
  font-weight: 600;
  line-height: 1.08349;
  text-align: center;
  letter-spacing: -0.003em;
  margin-bottom: 1rem;
  color: inherit;
  max-width: 16ch;
  margin-left: auto;
  margin-right: auto;
}

.company-name-row .row-container {
  justify-content: center;
  width: 100%;
  max-width: none;
  border-left: none;
  border-right: none;
  padding: 0 24px;
}

.logo {
  font-weight: 900;
  font-size: var(--text-body);
  color: var(--color-fill);
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.archive-logo-icon {
  height: 24px;
  width: auto;
}

[data-theme="dark"] .archive-logo-icon {
  filter: invert(1);
}

.archive-logo-icon:hover {
  filter: brightness(0) saturate(100%) invert(42%) sepia(93%) saturate(1350%) hue-rotate(196deg) brightness(100%) contrast(101%);
}

[data-theme="dark"] .archive-logo-icon:hover {
  filter: brightness(0) saturate(100%) invert(42%) sepia(93%) saturate(1350%) hue-rotate(196deg) brightness(100%) contrast(101%);
}

.archive-logo-text:hover {
  color: var(--color-fill-secondary);
}

.archive-logo-text {
  font-family: var(--font);
  font-weight: 600;
  font-size: var(--text-nav);
  letter-spacing: -0.01em;
}

.logo-icon {
  width: 24px;
  height: 24px;
  background: url('/aar-icon.svg') no-repeat center / contain;
  border-radius: 4px;
}

.logo-icon-circle {
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--accent-color);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  flex-shrink: 0;
  box-shadow: none;
}

[data-theme="dark"] .logo-icon-circle {
  border: none;
  box-shadow: none;
}

@media (min-width: 576px) {
  .logo-icon-circle {
    width: 36px;
    min-width: 36px;
    height: 36px;
    min-height: 36px;
    padding: 7px;
  }
}

@media (min-width: 1025px) {
  .logo-icon-circle {
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
    padding: 8px;
  }
}


.logo-icon-svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: none;
  transform: rotate(-15deg);
}

[data-theme="dark"] .logo-icon-svg {
  filter: invert(1);
}

/* Yellow circle logos keep black text in dark mode */
[data-theme="dark"] .logo-icon-circle .logo-icon-svg {
  filter: none;
}

.logo-wordmark {
  height: 48px;
  width: auto;
}

.nav-logo-link {
  display: flex;
  align-items: center;
}

.nav-logo {
  height: 32px;
  width: auto;
  transition: filter 0.15s ease;
}

.nav-logo-link:hover .nav-logo,
.logo:hover .logo-wordmark {
  filter: invert(1);
}

.logo-icon-circle:hover {
  background: #000;
  cursor: pointer;
}

.logo-icon-circle:hover .logo-icon-svg {
  filter: invert(1);
}

[data-theme="dark"] .logo-icon-circle:hover .logo-icon-svg {
  filter: invert(1);
}

.title-text:hover .title-radio,
.title-text:hover .title-index {
  color: var(--color-fill-secondary);
}
.title-text:hover .title-radio .l1 { -webkit-text-stroke: 1.5px var(--color-fill-secondary); }
.title-text:hover .title-radio .l2 { -webkit-text-stroke: 0.9px var(--color-fill-secondary); }
.title-text:hover .title-radio .l3 { -webkit-text-stroke: 0.6px var(--color-fill-secondary); }
.title-text:hover .title-radio .l4 { -webkit-text-stroke: 0.3px var(--color-fill-secondary); }
.title-text:hover .title-radio .l5 { -webkit-text-stroke: 0px var(--color-fill-secondary); }


.ticker-item:hover {
  color: var(--color-fill-secondary);
}

a:hover {
  text-decoration: underline;
}

/* Prevent logo parent hover from triggering child hovers */
.logo:hover .archive-logo-text {
  color: var(--color-fill);
}

.logo .archive-logo-text:hover {
  color: var(--color-fill-secondary);
}

.logo:hover .archive-logo-icon:not(:hover) {
  filter: none;
}

[data-theme="dark"] .logo:hover .archive-logo-icon:not(:hover) {
  filter: invert(1);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 0;
}

.header-nav a {
  color: var(--color-fill-secondary);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0;
  padding: 0.5rem 1rem;
  transition: opacity 0.2s;
}

@media (hover: hover) {
  .header-nav a:hover {
    color: var(--color-fill);
  }
}


/* ============================================
   Homepage Hero
   ============================================ */

.homepage-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-background);
}

.homepage-main .hero {
  width: 100%;
  max-width: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 0;
  border-left: none;
  border-right: none;
}


.hero-section {
  width: 100%;
  max-width: 1040px;
  padding: 24px;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
}

.homepage-main .hero-section {
  margin: 0 auto;
  align-items: center;
  justify-content: center;
}


.section-header {
  font-family: var(--font);
  font-size: var(--text-subtitle);
  font-weight: 600;
  color: var(--color-fill);
  margin-bottom: var(--space-sm);
}


.hero-card {
  aspect-ratio: 4 / 3;
  max-height: calc(100vh - 240px);
  width: 100%;
  background: transparent;
  color: var(--color-fill);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: none;
  border: none;
}

[data-theme="dark"] .hero-card {
  background: transparent;
  color: #ececec;
}

/* Subpage cards - clean Apple style */
.subpage-card {
  background: transparent;
  color: var(--color-fill);
  padding: 0;
}

[data-theme="dark"] .subpage-card {
  background: transparent;
  color: #ececec;
}

.subpage-card-flat {
  border-radius: 0;
  border: none;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
}

[data-theme="dark"] .subpage-card-flat {
  background: transparent;
  border: none;
}

/* Page Hero - unified hero style like donate */
.page-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  padding: 2rem;
  position: relative;
  overflow: hidden;
  background: var(--color-background);
  color: var(--color-fill-heading);
}


.page-hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  width: 100%;
}

.page-logo {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: inline-block;
  white-space: nowrap;
  text-decoration: none;
  color: inherit;
}

.page-logo:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.page-logo span {
  color: var(--accent-color);
}

.page-hero h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 0.5rem;
  color: var(--color-fill-heading);
}

.page-subtitle {
  font-size: 1.25rem;
  color: var(--color-fill-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

/* Subpage Hero - legacy */
.subpage-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  padding: 4rem 2rem;
  position: relative;
  overflow: hidden;
  background: var(--color-background);
  color: var(--color-fill-heading);
}


.subpage-hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  width: 100%;
}

.hero-eyebrow {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 2rem;
  white-space: nowrap;
}

.hero-eyebrow span {
  color: var(--accent-color);
}

.subpage-hero h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--color-fill-secondary);
  line-height: 1.5;
  margin-bottom: 3rem;
}

.subpage-section {
  width: 100%;
  max-width: 100%;
  padding: 24px;
  margin: 0;
}

/* Extra left padding to account for vertical rail (non-archive only) */
body:not([data-site="archive"]) .subpage-section {
  padding-left: 40px;
}

@media (min-width: 1024px) {
  body:not([data-site="archive"]) .subpage-section {
    padding-left: 24px;
  }
}

.subpage-title {
  font-family: var(--font);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 0.5rem;
  color: var(--color-fill-heading);
}

.subpage-intro {
  font-size: 1.25rem;
  line-height: 1.5;
  font-weight: 400;
  margin-bottom: 2rem;
  color: var(--color-fill-secondary);
}

.subpage-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.subpage-content h2,
.content-block h2 {
  font-size: 19px;
  font-weight: 600;
  line-height: 1.21053;
  margin-bottom: 0.5rem;
  color: var(--color-fill-heading);
}

.subpage-content p,
.content-block p {
  font-size: 17px;
  line-height: 1.47059;
  font-weight: 400;
}

.hero-cta {
  background: #131313;
  color: #ececec;
  padding: 8px 20px;
  font-size: var(--text-small);
  font-weight: 600;
  white-space: nowrap;
  border-radius: 980px;
  border: none;
  margin-top: 1.5rem;
}

[data-theme="dark"] .hero-cta {
  background: #131313;
}

.hero-cta-dark {
  background: #000;
  color: #fff;
}

[data-theme="dark"] .hero-cta-dark {
  background: #fff;
  color: #000;
}

@media (hover: hover) {
  .hero-cta:hover {
    background: #0d0d0d;
  }
}

.works-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.works-link {
  font-size: 17px;
  font-weight: 400;
  text-decoration: none;
  color: #63b6f7;
}

.works-link:hover {
  text-decoration: underline;
}

.works-cta {
  background: #131313;
  color: #ececec;
  padding: 7px 19px;
  font-size: var(--text-small);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  border-radius: 980px;
  border: none;
}

.works-cta span {
  color: var(--accent-color);
}

@media (hover: hover) {
  .works-cta:hover {
    background: #0d0d0d;
  }
}

[data-theme="dark"] .hero-card.hero-card-light {
  background: transparent;
  color: #ececec;
}

[data-theme="dark"] .hero-badge-circle {
  background: #000;
}

[data-theme="dark"] .hero-badge-text {
  color: #fff;
}

.hero-card .ad-title {
  color: var(--color-background);
}

.hero-card .ad-subtitle {
  color: var(--color-background);
  opacity: 0.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-card .search-field {
  border-color: var(--color-background);
}

.hero-card .search-field input {
  color: var(--color-background);
}

.hero-card .search-field input::placeholder {
  color: var(--color-background);
  opacity: 0.5;
}

/* Light variant of hero-card */
.hero-card.hero-card-light {
  background: transparent;
  color: var(--color-fill);
  justify-content: center;
  align-items: center;
}

[data-theme="light"] .hero-card.hero-card-light,
[data-theme="dark"] .hero-card.hero-card-light {
  background: transparent;
  color: var(--color-fill);
}

/* Sections after first hero card get 16:9 */
.hero-section:not(:first-child) .hero-card {
  aspect-ratio: 4 / 3;
}

.hero-card-light .ad-title {
  color: var(--color-fill);
}

.hero-card-light .ad-subtitle {
  color: var(--color-fill-secondary);
  opacity: 1;
  display: block;
  -webkit-line-clamp: unset;
  line-clamp: unset;
  overflow: visible;
}

/* Separator for stacked hero sections */
.hero-section.hero-simple {
  flex-direction: row;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
}


.hero-card-centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hero-badge-circle {
  border-radius: 9999px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1.5rem;
  padding: 1rem 2.5rem;
}

.hero-badge-img {
  height: 50%;
  width: auto;
  object-fit: contain;
  filter: invert(1);
}

.hero-badge-text {
  font-family: var(--font);
  font-size: 0.75rem;
  font-weight: 700;
  color: #000;
  letter-spacing: 0.02em;
}

.hero-badge-circle:hover {
  background: #000;
  cursor: pointer;
}

.hero-badge-circle:hover .hero-badge-text {
  color: #000;
}

.testflight-link {
  margin-top: 1.5rem;
  display: inline-block;
}

.testflight-badge {
  height: 10vw;
  min-height: 40px;
  max-height: 60px;
  width: auto;
  border: none;
  border-radius: 0;
}

[data-theme="dark"] .testflight-badge {
  border-color: transparent;
}

.testflight-link:hover .testflight-badge {
  opacity: 0.8;
}


.hero-badge-circle:hover .hero-badge-img {
  filter: invert(0);
}

[data-theme="dark"] .hero-badge-circle:hover .hero-badge-img {
  filter: invert(1);
}


/* 3-column vertical cards row */
.cards-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 20px;
}

.card-vertical {
  aspect-ratio: 9 / 16;
  background: var(--color-background-secondary);
  border: 1px solid var(--color-border);
  border-radius: 24px;
  display: grid;
  grid-template-rows: 1fr auto auto;
  padding: 1.5rem;
}

.card-vertical-content {
  display: contents;
}

.card-title {
  grid-row: 2;
  align-self: end;
  font-size: var(--text-h5);
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-align: center;
}

.card-text {
  grid-row: 3;
  font-size: var(--text-small);
  color: var(--color-fill-secondary);
  text-align: center;
}


.hero-headline,
.section-title {
  font-family: var(--font);
  font-size: var(--text-hero);
  font-weight: 900;
  text-align: left;
  max-width: 14ch;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: inherit;
}

.section-subtitle {
  font-family: var(--font);
  font-size: 19px;
  font-weight: 400;
  text-align: center;
  line-height: 1.4211;
  color: var(--color-fill-secondary);
}

.section-body {
  font-family: var(--font);
  font-size: var(--text-body);
  font-weight: 500;
  color: inherit;
  text-align: center;
  line-height: 1.5;
}

.section-meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 1.5rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.section-meta div {
  display: flex;
  gap: 0.5rem;
}

.section-meta dt {
  opacity: 0.6;
}

.section-meta dd {
  margin: 0;
}

.section-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
  text-align: center;
}

.section-links a {
  font-size: 0.75rem;
  font-weight: 500;
}

/* Page layout */
.page-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

html[data-page="subpage"] .page-main {
  min-height: calc(100vh - 95px);
}

.page-content {
  width: 100%;
  display: flex;
  flex-direction: column;
}

html[data-page="subpage"] .page-content {
  width: 980px;
  max-width: 100%;
  flex: 1;
}

.page-content-footer {
  flex: 1;
}

.page-section {
  padding: 2em 20px;
}

.page-section:last-child {
}


.hero-section + .hero-section {
}

.show-ticker + .hero-section {
}

/* About section styling */
.about-details {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.about-org {
  font-size: clamp(2rem, 8vw, 4rem);
  font-weight: 600;
  line-height: 1.1;
}

.about-status {
  font-size: 1rem;
  opacity: 0.7;
}

.about-mission {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.6;
  max-width: 50ch;
  opacity: 0.85;
}

.about-ids {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 17px;
  line-height: 1.47059;
  letter-spacing: -0.022em;
  margin-top: 1.5rem;
}

.id-row {
  display: flex;
  gap: 1rem;
}

.about-ids dt {
  color: var(--color-fill-secondary);
  min-width: 120px;
}

.about-ids dd {
  margin: 0;
  color: var(--color-fill);
}

/* About in dark card inherits colors */
.hero-card .about-org,
.hero-card .about-status,
.hero-card .about-mission,
.hero-card .about-ids {
  color: var(--color-background);
}

/* About in light card */
.hero-card-light .about-org,
.hero-card-light .about-mission {
  color: var(--color-fill);
  opacity: 1;
}

.hero-card-light .about-status,
.hero-card-light .about-ids {
  color: var(--color-fill-secondary);
  opacity: 1;
}

/* Committees grid */
.committees-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 1rem;
}

@media (max-width: 768px) {
  .committees-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

.committee h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--color-fill);
}

.committee ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.committee li {
  font-size: 0.875rem;
  color: var(--color-fill-secondary);
  line-height: 1.5;
  padding-left: 1rem;
  position: relative;
  margin-bottom: 0.25rem;
}

.committee li::before {
  content: "·";
  position: absolute;
  left: 0;
  color: var(--color-fill-secondary);
}

/* Governance content styling */
.governance-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.governance-content section h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--color-fill);
}

.governance-content section p {
  font-size: 0.875rem;
  color: var(--color-fill-secondary);
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.governance-content section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.governance-content section li {
  font-size: 0.875rem;
  color: var(--color-fill-secondary);
  line-height: 1.6;
  padding-left: 1rem;
  position: relative;
  margin-bottom: 0.25rem;
}

.governance-content section li::before {
  content: "·";
  position: absolute;
  left: 0;
  color: var(--color-fill-secondary);
}

.governance-content a {
  color: var(--color-fill);
  font-weight: 500;
}

.governance-content a:hover {
  text-decoration: underline;
}

/* Program content styling */
.program-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.program-citation {
  font-size: 0.75rem;
  font-family: monospace;
  color: var(--color-fill-secondary);
  opacity: 0.7;
}

.program-description {
  font-family: var(--font);
  font-size: clamp(1rem, 3vw, 1.25rem);
  font-weight: 600;
  color: inherit;
  line-height: 1.5;
  text-align: center;
}

.hero-card .search-icon {
  color: var(--color-background);
  opacity: 0.5;
}

.show-ticker {
  width: 100%;
  min-height: var(--row-height);
  overflow: hidden;
  display: flex;
  align-items: center;
  position: relative;
}

.show-ticker::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 120px;
  background: linear-gradient(to right, transparent, var(--color-background) 70%);
  pointer-events: none;
  z-index: 5;
}

.ticker-toggle {
  position: absolute;
  right: 2px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--color-background);
  color: var(--color-fill);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  padding: 0;
  line-height: 1;
  transition: all 0.2s ease;
}

.ticker-icon-pause,
.ticker-icon-play {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}

.ticker-toggle:hover {
  border-color: var(--color-fill);
}

.ticker-icon-play {
  display: none;
  letter-spacing: 0;
}

.ticker-toggle.paused .ticker-icon-pause {
  display: none;
}

.ticker-toggle.paused .ticker-icon-play {
  display: block;
}

.ticker-track {
  display: flex;
  align-items: center;
  gap: 0;
  white-space: nowrap;
}

.ticker-track.loaded {
  animation: ticker 1800s linear infinite;
}

.ticker-item {
  display: flex;
  align-items: center;
  height: var(--row-height);
  padding: 0 var(--space-ticker);
  color: var(--color-fill);
  font-size: var(--text-nav);
  font-weight: 400;
  cursor: pointer;
}

@keyframes ticker {
  0% {
    transform: translateX(-50%);
  }
  100% {
    transform: translateX(0);
  }
}

.ad-title {
  color: var(--color-fill);
  font-size: clamp(2rem, 10vw, 5rem);
  font-weight: 600;
  padding: 0;
  line-height: 1.05;
  max-width: 16ch;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ad-subtitle {
  color: var(--color-fill-secondary);
  font-size: 1rem;
  font-weight: 600;
  padding: 0.75rem 0 2rem 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-field {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 300px;
  padding: 0.5rem 1rem;
  font-size: var(--text-small);
  border: 1px solid var(--color-fill);
  border-radius: 999px;
  background: transparent;
  transition: max-width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-field:focus-within {
  max-width: 450px;
}

.search-icon {
  color: var(--color-fill-secondary);
  order: 1;
  margin-left: 0.5rem;
  display: flex;
  align-items: center;
}

.search-field input {
  flex: 1;
  background: transparent;
  transition: opacity 0.3s ease;
  border: none;
  outline: none;
  color: var(--color-fill);
  font-size: var(--text-small);
  font-family: var(--font);
}

.search-field input::placeholder {
  color: var(--color-fill-secondary);
}

/* ============================================
   Search Page
   ============================================ */

.search-section {
  background: var(--color-background-secondary);
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--color-border);
}

.search-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1rem;
}

.main-wrapper {
  flex: 1;
  display: flex;
  justify-content: center;
}

.home-page {
  width: 1024px;
  max-width: calc(100% - 2rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px 1rem;
  min-height: 60vh;
  border-left: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);
}

.home-page .search-form {
  width: 100%;
  max-width: 580px;
  margin-bottom: 0;
}

.home-page .home-tagline {
  margin-top: 24px;
  color: var(--color-fill-secondary);
  font-size: var(--text-small);
}

.search-form {
  position: relative;
  margin-bottom: 20px;
}

.search-input-wrapper {
  display: flex;
  gap: 10px;
  align-items: center;
}

.search-input {
  flex: 1;
  padding: 14px 16px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-size: 16px;
  background-color: var(--color-background);
  color: var(--color-fill);
  font-family: var(--font);
}

.search-input:focus {
  outline: none;
  border-color: var(--color-fill);
}

.search-btn {
  padding: 14px 24px;
  background-color: var(--color-fill);
  color: var(--color-background);
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.search-btn:hover {
  opacity: 0.8;
}

.search-stats {
  font-size: var(--text-small);
  color: var(--color-fill-secondary);
}

.search-stats strong {
  color: var(--color-fill);
  font-weight: 600;
}

.clear-search-link {
  margin-left: 12px;
  color: var(--color-fill-secondary);
  font-weight: 400;
}

@media (hover: hover) {
  .clear-search-link:hover {
    color: var(--color-fill);
  }
}

/* Main Content Area */
.main-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 30px 1rem;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  border-left: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);
  min-height: calc(100vh - 220px);
}

/* Sidebar - Filters */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.filter-section {
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 20px;
  background-color: var(--color-background);
}

.filter-title {
  font-size: var(--text-small);
  font-weight: 600;
  color: var(--color-fill);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.filter-group:last-child {
  margin-bottom: 0;
}

.filter-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: var(--text-small);
  color: var(--color-fill-secondary);
}

.filter-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--color-fill);
}

@media (hover: hover) {
  .filter-label:hover {
    color: var(--color-fill);
  }
}

.filter-count {
  color: var(--color-fill-secondary);
  font-size: var(--text-xs);
  margin-left: auto;
}

.date-range-inputs {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.date-input {
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-size: var(--text-small);
  font-family: var(--font);
  background: var(--color-background);
  color: var(--color-fill);
}

.see-more-btn {
  background: none;
  border: none;
  color: var(--color-fill-secondary);
  font-size: var(--text-xs);
  cursor: pointer;
  padding: 8px 0;
  font-weight: 400;
}

@media (hover: hover) {
  .see-more-btn:hover {
    color: var(--color-fill);
  }
}

.clear-filters-btn {
  padding: 8px 12px;
  background-color: var(--color-background-secondary);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-size: var(--text-xs);
  color: var(--color-fill-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

@media (hover: hover) {
  .clear-filters-btn:hover {
    color: var(--color-fill);
  }
}

/* Results Area */
.results-area {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.sort-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background-color: var(--color-background-secondary);
  border-radius: 4px;
  border: 1px solid var(--color-border);
}

.sort-label {
  font-size: var(--text-small);
  color: var(--color-fill-secondary);
  font-weight: 500;
}

.sort-options {
  display: flex;
  gap: 16px;
}

.sort-option {
  background-color: transparent;
  border: none;
  color: var(--color-fill-secondary);
  font-size: var(--text-small);
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 4px;
  transition: all 0.2s;
}

@media (hover: hover) {
  .sort-option:hover {
    color: var(--color-fill);
  }
}

.sort-option.active {
  background-color: var(--color-fill);
  color: var(--color-background);
}

/* Result Cards */
.result-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.result-card {
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 20px;
  background-color: var(--color-background);
  transition: all 0.2s;
}

@media (hover: hover) {
  .result-card:hover {
    border-color: var(--color-fill-secondary);
  }
}

.result-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 12px;
}

.result-title-section {
  flex: 1;
}

.result-title {
  font-size: var(--text-body);
  font-weight: 600;
  color: var(--color-fill);
  margin-bottom: 6px;
  line-height: 1.4;
  display: block;
}

@media (hover: hover) {
  .result-title:hover {
    color: var(--color-fill);
  }
}

.result-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: var(--text-xs);
  color: var(--color-fill-secondary);
  margin-bottom: 8px;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.result-snippet {
  margin: 12px 0;
  font-size: var(--text-small);
  color: var(--color-fill-secondary);
  line-height: 1.6;
}

.transcript-excerpt {
  margin-top: 16px;
  padding: 12px 16px;
  border-left: 2px solid var(--color-border);
  background-color: var(--color-background-secondary);
  font-size: var(--text-small);
  color: var(--color-fill-secondary);
  line-height: 1.6;
}

.transcript-label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-fill-secondary);
  margin-bottom: 8px;
}

.transcript-timestamp {
  color: var(--color-fill);
  font-weight: 600;
}

.highlight {
  background-color: rgba(254, 240, 138, 0.5);
}

.result-play-btn {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background-color: var(--color-fill);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-background);
  font-size: 16px;
  transition: opacity 0.2s;
  flex-shrink: 0;
}

.result-play-btn:hover {
  opacity: 0.8;
}

.result-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.action-btn {
  padding: 8px 16px;
  border: 1px solid var(--color-border);
  background-color: var(--color-background);
  border-radius: 6px;
  font-size: var(--text-small);
  color: var(--color-fill-secondary);
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}

@media (hover: hover) {
  .action-btn:hover {
    border-color: var(--color-fill);
    color: var(--color-fill);
  }
}

.action-btn.saved {
  background-color: var(--color-fill);
  color: var(--color-background);
  border-color: var(--color-fill);
}

/* Quality badges */
.quality-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid;
  margin-left: 8px;
}

.quality-a-plus, .quality-a {
  background-color: rgba(34, 197, 94, 0.2);
  color: #22c55e;
  border-color: #22c55e;
}

.quality-b {
  background-color: rgba(234, 179, 8, 0.2);
  color: #eab308;
  border-color: #eab308;
}

.quality-c {
  background-color: rgba(249, 115, 22, 0.2);
  color: #f97316;
  border-color: #f97316;
}

.quality-d {
  background-color: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border-color: #ef4444;
}

/* Pagination */
.pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid var(--color-border);
}

.pagination-btn {
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  background-color: var(--color-background);
  color: var(--color-fill);
  border-radius: 4px;
  cursor: pointer;
  font-size: var(--text-small);
  transition: all 0.2s;
}

@media (hover: hover) {
  .pagination-btn:hover:not(:disabled) {
    border-color: var(--color-fill);
  }
}

.pagination-btn.active {
  background-color: var(--color-fill);
  color: var(--color-background);
  border-color: var(--color-fill);
}

.pagination-btn:disabled {
  color: var(--color-fill-secondary);
  cursor: not-allowed;
}

.pagination-ellipsis {
  color: var(--color-fill-secondary);
  padding: 0 4px;
}

/* ============================================
   Footer Directory (Apple-style columns)
   ============================================ */

.footer-directory {
  border-top: 1px solid var(--color-border);
  padding: 40px 24px;
}

.footer-directory-inner {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 24px;
}

.footer-column {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-column-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-fill-secondary);
  margin: 0 0 4px 0;
}

.footer-column a {
  font-size: 12px;
  color: var(--color-fill-secondary);
  text-decoration: none;
  line-height: 1.4;
}

@media (hover: hover) {
  .footer-column a:hover {
    text-decoration: underline;
  }
}

@media (max-width: 500px) {
  .footer-directory-inner {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px 24px;
  }
}

/* ============================================
   Footer Email Signup
   ============================================ */

.footer-signup {
  border-top: 1px solid var(--color-border);
  padding: 24px 24px;
}

.footer-signup-inner {
}

.footer-signup-label {
  font-size: 12px;
  color: var(--color-fill-secondary);
  margin: 0 0 8px 0;
}

.footer-signup-form {
  display: flex;
  gap: 8px;
  max-width: 360px;
}

.footer-signup-form input {
  flex: 1;
  padding: 6px 12px;
  font-size: 12px;
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  color: var(--color-fill);
}

.footer-signup-form input:focus {
  outline: none;
  border-color: var(--color-fill-secondary);
}

.footer-signup-form input::placeholder {
  color: var(--color-fill-secondary);
}

.footer-signup-form button {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  background: var(--color-fill);
  color: var(--color-background);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}

.footer-signup-form button:hover {
  opacity: 0.85;
}

.footer-signup-form button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.footer-signup-status {
  font-size: 11px;
  margin: 6px 0 0 0;
}

.footer-signup-status:empty {
  display: none;
}

.footer-signup-status.success {
  color: #34C759;
}

.footer-signup-status.error {
  color: #FF3B30;
}

/* ============================================
   Footer Org Details
   ============================================ */

.footer-org {
  border-top: 1px solid var(--color-border);
  padding: 20px 24px;
}

.footer-org-inner {
}

.footer-org-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-fill-secondary);
  margin: 0 0 4px 0;
}

.footer-org-details {
  font-size: 11px;
  color: var(--color-fill-secondary);
  margin: 0;
  line-height: 1.4;
}

/* ============================================
   Footer (iopictures style - light bg)
   ============================================ */

.row-container {
  width: 1024px;
  max-width: 100%;
  height: 100%;
  padding: 0 1rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  border-left: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);
}

footer {
  background: var(--system-gray6);
  width: 100%;
  margin-top: auto;
}

[data-theme="dark"] footer {
  background: rgba(255, 255, 255, 0.03);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-row {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: -0.008em;
  height: var(--row-height);
  display: flex;
  align-items: center;
}

[data-theme="dark"] .footer-row {
}

.footer-row .row-container {
  width: 100%;
  max-width: none;
  border-left: none;
  border-right: none;
  padding: 0 24px;
  justify-content: space-between;
  align-items: center;
  align-content: center;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
}

.footer-copyright {
  color: var(--color-fill);
  line-height: 1.2;
}

.footer-copyright .mobile-break {
  display: none;
}

.footer-legal {
  display: flex;
  gap: 1rem;
  line-height: 1.2;
}

.footer-legal a {
  color: var(--color-fill);
}

@media (hover: hover) {
  .footer-legal a:hover {
    text-decoration: underline;
  }
}

@media (max-width: 570px) {
  .footer-row {
    height: auto;
    padding: 1rem 0;
  }

  .footer-row .row-container {
    flex-direction: column-reverse;
    align-items: center;
    gap: 0;
  }

  .footer-copyright {
    text-align: center;
    line-height: 2;
  }

  .footer-copyright .mobile-break {
    display: block;
  }

  .footer-legal {
    align-self: center;
    line-height: 2;
    margin-bottom: 0.25em;
  }
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--color-fill-secondary);
}

.empty-state h2 {
  font-size: 24px;
  margin-bottom: 12px;
  color: var(--color-fill);
}

/* Skeleton Loading */
.skeleton-card {
  min-height: 180px;
}

.skeleton-play, .skeleton-title, .skeleton-meta, .skeleton-snippet, .skeleton-transcript, .skeleton-actions {
  background: linear-gradient(90deg, var(--color-background-secondary) 25%, var(--color-border) 50%, var(--color-background-secondary) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
  border-radius: 4px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============================================
   Responsive: 500px, 1024px breakpoints
   ============================================ */

@media (max-width: 1024px) {
  .homepage-main .hero {
    min-height: auto;
  }

  .main-content {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .sidebar {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    order: -1;
  }

  .header-nav a {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
  }

  .hero-card {
    padding: 1.5rem;
  }
}

@media (max-width: 768px) {
  .homepage-main .hero {
    min-height: auto;
  }

  .hero-card {
    padding: 1.25rem;
    width: 100%;
    max-height: calc(100vh - 200px);
  }
}

@media (max-width: 570px) {
  .homepage-main .hero {
    min-height: auto;
  }

  .hero-card {
    padding: 1rem;
    aspect-ratio: 4 / 3;
    width: 100%;
  }

  .header-container {
    padding: 0 0.5rem;
  }

  .logo {
    font-size: var(--text-small);
  }

  .header-nav a {
    padding: 0.5rem 0.5rem;
    font-size: 0.7rem;
  }



  .search-container {
    padding: 0 0.5rem;
  }

  .search-input-wrapper {
    flex-direction: column;
    gap: 8px;
  }

  .search-input {
    width: 100%;
  }

  .search-btn {
    width: 100%;
  }

  .main-content {
    padding: 16px 0.5rem;
    gap: 16px;
  }

  .sidebar {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .result-card {
    padding: 16px;
  }

  .result-header {
    flex-direction: column;
    gap: 12px;
  }

  .sort-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .sort-options {
    flex-wrap: wrap;
    gap: 8px;
  }
}

/* Narrow mobile - hero adjustments only (nav handled above) */
@media (max-width: 350px) {
  .hero-card {
    aspect-ratio: auto;
    max-height: none;
    justify-content: flex-start;
    padding-top: 1rem;
  }
}

/* =============================================
   Shared: Today rows & Browse pages
   ============================================= */

.today-row {
  display: flex;
  flex-direction: column;
  padding: var(--unit-quarter) 0;
  margin: 0;
  position: relative;
  isolation: isolate;
  text-decoration: none;
  color: inherit;
  border-radius: 8px;
  -webkit-tap-highlight-color: transparent;
}

a.today-row:hover,
a.today-row:active {
  text-decoration: none;
}

a.today-row:active {
  background: rgba(128, 128, 128, 0.1);
}

@media (hover: hover) {
  a.today-row:hover {
    background: rgba(128, 128, 128, 0.06);
  }
}

.today-row-border {
  border-top: 0.5px solid var(--color-border);
}

.today-row-header {
  display: flex;
  align-items: center;
  gap: var(--unit-quarter);
}

.today-avatar {
  width: 40px;
  min-width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(128, 128, 128, 0.12);
  font-weight: 450;
  font-size: 14px;
  flex-shrink: 0;
}

.today-row-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.today-row-show {
  font-size: 13px;
  font-weight: 400;
  line-height: 16px;
  color: var(--color-fill-secondary);
}

.today-row-date {
  font-size: 13px;
  font-weight: 400;
  line-height: 16px;
  color: var(--color-fill-secondary);
}

.today-row-episode {
  font-size: 15px;
  font-weight: 700;
  line-height: 20px;
  margin: 0;
  padding-top: 2px;
  padding-bottom: 2px;
  padding-left: calc(40px + var(--unit-quarter));
}

.today-row-logline {
  font-size: 15px;
  font-weight: 400;
  line-height: 20px;
  margin: 0;
  padding-left: calc(40px + var(--unit-quarter));
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Legacy row structure (browse pages) */
.today-row-content {
  display: flex;
  align-items: flex-start;
  flex-grow: 1;
  gap: var(--unit-quarter);
  padding: var(--unit-half) 0;
  min-width: 0;
}

.today-row-text {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  min-width: 0;
}

.today-empty {
  font-size: 14px;
  color: var(--color-fill-secondary);
  padding: 24px 0;
}

.today-heart {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  min-width: 28px;
  background: var(--color-background-secondary);
  border-radius: 4px;
  padding: 4px;
  flex-shrink: 0;
  color: var(--color-fill-heading);
  border: none;
  cursor: pointer;
}

.today-heart:hover {
  background: var(--color-border);
}

/* Browse shared */
.browse-page {
  padding-top: var(--unit);
}

.browse-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  color: var(--color-fill-secondary);
  text-decoration: none;
  padding: var(--unit-half) var(--unit-half);
}

.browse-back:hover {
  color: var(--color-fill-heading);
}

.browse-heading {
  font-size: 28px;
  font-weight: 700;
  padding: 0 var(--unit-half) var(--unit-half);
}

.browse-hub-title {
  font-size: 28px;
  font-weight: 700;
  padding: 0 var(--unit-half) var(--unit-half);
}

.browse-group {
  padding: 0 var(--unit-half) var(--unit-half);
}

.browse-group-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--color-fill-secondary);
  margin: 0 0 var(--unit-quarter);
}

.browse-group-card {
  background: var(--system-gray6);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.browse-group-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 0 var(--unit-half);
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.browse-group-row:hover {
  background: rgba(128, 128, 128, 0.08);
}

.browse-group-row:active {
  background: rgba(128, 128, 128, 0.12);
}

/* Inset separators like iOS grouped lists (skip the icon gutter). */
.browse-group-row + .browse-group-row::before {
  content: "";
  position: absolute;
  top: 0;
  left: 54px; /* 22px padding + 20px icon + 12px gutter */
  right: 0;
  height: 1px;
  background: var(--color-border);
  opacity: 0.9;
}

.browse-group-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-fill-secondary);
  flex-shrink: 0;
}

.browse-group-icon svg {
  width: 18px;
  height: 18px;
  display: block;
  overflow: visible;
}

.browse-group-text {
  flex: 1;
  min-width: 0;
  font-size: 17px;
  line-height: 22px;
  color: var(--color-fill-heading);
}

.browse-group-sub {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  line-height: 16px;
  color: var(--color-fill-secondary);
}

.browse-group-chevron {
  width: 16px;
  height: 16px;
  color: var(--color-fill-secondary);
  flex-shrink: 0;
}

.browse-list {
  padding: 0 var(--unit-half);
}

.browse-search {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-background);
  color: var(--color-fill);
  margin: 0 0 var(--unit-half);
  font-family: inherit;
  outline: none;
  box-sizing: border-box;
}

.browse-search:focus {
  border-color: var(--accent-color);
}

.alpha-header {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-fill-secondary);
  padding: 12px 0 4px;
  text-transform: uppercase;
}

/* ============================================
   iOS-style list rows (used on Home and Browse)
   ============================================ */

.menu-list {
  display: flex;
  flex-direction: column;
}

.menu-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 4px; /* 44px row height */
  text-decoration: none;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
  border-bottom: 1px solid var(--color-border);
}

.menu-row:first-child {
  border-top: 1px solid var(--color-border);
}

.menu-row:hover {
  background: rgba(128, 128, 128, 0.04);
  text-decoration: none;
}

.menu-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-fill-secondary);
  flex-shrink: 0;
}

.menu-label {
  flex: 1;
  font-size: 15px;
  color: var(--color-fill-heading);
}

.menu-chevron {
  width: 16px;
  height: 16px;
  color: var(--color-fill-secondary);
  flex-shrink: 0;
}

/* Scroll chrome behavior (see BaseLayout.astro) */
body.ui-hidden header,
html.ui-hidden header {
  transform: translateY(-110%);
}

body.ui-hidden .browse-tabs-fixed,
html.ui-hidden .browse-tabs-fixed {
  transform: translateY(calc(-1 * (var(--unit) + 44px + env(safe-area-inset-top, 0px) + 8px)));
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 24px;
  font-size: 14px;
  line-height: 14px;
  color: var(--color-fill-secondary);
  text-align: center;
  background: var(--color-background);
  max-width: 1150px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}
.site-footer a {
  color: var(--color-fill-heading);
  text-decoration: underline;
}
.site-footer-archive {
  flex-direction: column;
  gap: 4px;
  padding: 24px;
  font-size: 12px;
  line-height: 1.4;
}

/* Navigation loading bar */
.nav-loading-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: var(--color-fill-heading);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
}

/* Nav Panels */
.nav-panels-container { position: relative; z-index: 100; }
.nav-panel {
  position: absolute; top: 0; left: 0; right: 0;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border-bottom: 5px solid;
  border-image: linear-gradient(90deg,rgba(100,150,255,0.3),rgba(150,200,255,0.5),rgba(100,150,255,0.3)) 1;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
[data-theme="dark"] .nav-panel {
  background: rgba(0,0,0,0.1);
  border-image: linear-gradient(90deg,rgba(80,120,200,0.4),rgba(100,150,255,0.6),rgba(80,120,200,0.4)) 1;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
.panel-inner { padding: 16px 32px 24px; }
.panel-content h2 { font-size: 15px; font-weight: 600; color: var(--color-fill-heading); margin-bottom: 8px; }
.panel-content p { font-size: 15px; color: var(--color-fill-secondary); line-height: 1.7; max-width: 700px; }
.panel-details {
  display: grid; grid-template-columns: repeat(4,1fr); gap: 24px;
  margin-top: 28px; padding-top: 28px; border-top: 1px solid #d1d5db;
}
[data-theme="dark"] .panel-details { border-color: #30363d; }
.panel-details > div { display: flex; flex-direction: column; gap: 2px; }
.detail-label { font-size: 11px; font-weight: 500; color: var(--color-fill-secondary); text-transform: uppercase; letter-spacing: 0.03em; }
.panel-details span:last-child { font-size: 13px; color: var(--color-fill-heading); }
.panel-grid { display: grid; grid-template-columns: repeat(4,1fr); border: 1px solid #d1d5db; border-radius: 6px; overflow: hidden; margin-top: 20px; }
[data-theme="dark"] .panel-grid { border-color: #30363d; }
.panel-grid-3col { grid-template-columns: repeat(3,1fr); }
.panel-item { padding: 24px 28px; }
.panel-grid-3col .panel-item { border-right: 1px solid #d1d5db; border-bottom: 1px solid #d1d5db; }
.panel-grid-3col .panel-item:nth-child(3n) { border-right: none; }
.panel-grid-3col .panel-item:nth-last-child(-n+3) { border-bottom: none; }
[data-theme="dark"] .panel-grid-3col .panel-item { border-color: #30363d; }
.panel-item h3 { font-size: 13px; font-weight: 600; color: var(--color-fill-heading); margin-bottom: 4px; }
.panel-item p { font-size: 12px; color: var(--color-fill-secondary); line-height: 1.5; }

body[data-site="archive"] .nav-model-picker .nav-more-dropdown { left: 50%; right: auto; transform: translateX(-50%); }

/* Donate panel */
.donate-row { display: flex; gap: 3rem; }
.donate-left { flex: 1; max-width: 350px; }
.donate-right { flex: 1; max-width: 400px; }
.donate-form { text-align: left; }
.donate-info { font-size: 0.875rem; color: var(--color-fill-secondary); line-height: 1.5; margin-bottom: 0.5rem; }
.donate-ein { font-size: 0.875rem; color: var(--color-fill-secondary); line-height: 1.5; margin-bottom: 1.5rem; }
.donate-frequency { display: flex; margin-bottom: 1.5rem; border: 1px solid var(--color-border); border-radius: 999px; overflow: hidden; width: 100%; }
.freq-btn { flex: 1; background: transparent; color: var(--color-fill-heading); border: none; padding: 0.75rem 1.25rem; font-size: 0.875rem; font-weight: 600; cursor: pointer; transition: all 0.2s; text-align: center; }
.freq-btn.active { background: var(--color-fill-heading); color: var(--color-background); }
.amount-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 0.5rem; margin-bottom: 1.5rem; }
@media (min-width: 500px) { .amount-grid { grid-template-columns: repeat(7,1fr); } }
.amount-pill { background: transparent; border: 1px solid rgba(128,128,128,0.3); color: var(--color-fill-heading); padding: 0.75rem 0.25rem; font-size: 0.875rem; font-weight: 600; border-radius: 999px; cursor: pointer; text-align: center; transition: all 0.2s; }
.amount-pill.selected { background: var(--color-fill-heading); color: var(--color-background); border-color: var(--color-fill-heading); }
.amount-other { display: flex; align-items: center; justify-content: center; gap: 2px; }
.amount-other input { background: transparent; border: none; font-size: 0.875rem; font-weight: 600; color: inherit; width: 40px; outline: none; text-align: left; -moz-appearance: textfield; }
.amount-other input::-webkit-outer-spin-button, .amount-other input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.donate-submit { width: 100%; }
.donate-message.success { background: rgba(52,199,89,0.2); color: #34C759; border-radius: 999px; }
.stripe-badge { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 1rem; text-decoration: none; color: var(--color-fill-secondary); opacity: 0.6; transition: opacity 0.2s; }
.stripe-badge:hover { opacity: 1; }
.stripe-badge span { font-size: 0.8125rem; }
.stripe-wordmark { height: 14px; width: auto; }
@media (max-width: 500px) { .panel-inner { padding: 16px; } .panel-details { grid-template-columns: repeat(2,1fr); } .donate-row { flex-direction: column; gap: 1.5rem; } .donate-left, .donate-right { max-width: none; } }

body.page-episode { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-rows: auto auto minmax(0,1fr) auto; }
body.page-episode > header { grid-row: 1; }
body.page-episode > .nav-panels-container { grid-row: 2; }
body.page-episode > .episode-wrap { grid-row: 3; }
body.page-episode > .site-footer { grid-row: 4; margin: 0 auto; }
