/* Legacy component geometry. v4 semantic colours live in tokens.css; studio.css owns the current visual finish. */

/* ──────────────────────────────────────────────────────────────────────────
   0. RE-ASSERT tokens that mobile.css :root hardcodes after tokens.css loads
   ────────────────────────────────────────────────────────────────────────── */
:root {
  --app-header-h: 70px;
  --glass-bg:     var(--surface-glass);
  --glass-border: var(--border);
  --transition-slide: var(--dur-3) var(--ease-in-out);
  --_mx: 0%;
}
[dir="rtl"] { --_mx: 100%; }

/* ──────────────────────────────────────────────────────────────────────────
   1. BASE + EDITORIAL TYPOGRAPHY
   ────────────────────────────────────────────────────────────────────────── */
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  line-height: var(--lh-normal);
  background: var(--surface);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-synthesis-weight: none;
  transition: background var(--dur-3) var(--ease-in-out),
              color var(--dur-3) var(--ease-in-out);
}

/* Display face on every heading. This single rule does most of the work of
   turning a dashboard into a magazine. */
h1, h2, h3,
.hero-h1, .page-hero-title, .radio-hero-title, .search-page-title,
.section-title-v2, .podcast-title, .episode-title, .comments-title,
.footer-v2-brand .brand-text, .navbar-brand .brand-text, .drawer-brand {
  font-family: var(--font-display);
  font-variation-settings: var(--font-display-settings);
  font-weight: var(--fw-display);
  letter-spacing: var(--ls-tighter);
  line-height: var(--lh-tight);
  text-wrap: balance;
}
h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: var(--fw-bold);
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-tight);
}

/* Arabic: the stack falls through per glyph, so this also fixes Arabic
   podcast titles sitting inside French/English pages. Fraunces has no Arabic
   coverage at all, so Arabic headings correctly land on IBM Plex Sans Arabic
   — we just make sure the metrics follow. */
[lang="ar"], [dir="rtl"], .is-arabic {
  font-family: var(--font-arabic);
  line-height: var(--lh-normal);
  letter-spacing: 0;
}
[lang="ar"] h1, [dir="rtl"] h1,
[lang="ar"] h2, [dir="rtl"] h2,
[lang="ar"] h3, [dir="rtl"] h3,
[dir="rtl"] .hero-h1, [dir="rtl"] .section-title-v2,
[dir="rtl"] .page-hero-title, [dir="rtl"] .podcast-title {
  font-family: var(--font-arabic);
  font-weight: var(--fw-bold);
  line-height: var(--lh-snug);
  letter-spacing: 0;
}
/* Arabic has no case — never uppercase it, and never letterspace it. */
[lang="ar"] [class*="label"], [dir="rtl"] [class*="label"],
[dir="rtl"] .section-eyebrow, [dir="rtl"] .hero-eyebrow,
[dir="rtl"] .footer-v2-col h4, [dir="rtl"] .ec-podcast,
[dir="rtl"] .drawer-section-label, [dir="rtl"] .ads-label {
  text-transform: none;
  letter-spacing: 0;
}

/* The editorial kicker — used on eyebrows, section labels, ad labels. */
.hero-eyebrow, .section-eyebrow, .widget-title,
.drawer-section-label, .footer-v2-col h4, .ec-podcast, .hero-stat-l {
  font-family: var(--font-sans);
  font-size: var(--fs-3xs);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
}

::-webkit-scrollbar { inline-size: 10px; block-size: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: var(--r-pill); }
::-webkit-scrollbar-track { background: transparent; }

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--accent-ring);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

/* ──────────────────────────────────────────────────────────────────────────
   2. MOTION SYSTEM
   Rules: transform + opacity only (never a layout-triggering property),
   IntersectionObserver drives reveal (motion.js) — no scroll handlers,
   and prefers-reduced-motion switches everything off completely.
   ────────────────────────────────────────────────────────────────────────── */

/* Scroll reveal. motion.js adds .reveal, then .is-in when the element
   crosses the viewport. Without JS the element is simply visible. */
.reveal {
  opacity: 0;
  transform: translate3d(0, 22px, 0);
  transition: opacity var(--dur-4) var(--ease-out),
              transform var(--dur-4) var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: transform, opacity;
}
.reveal.is-in { opacity: 1; transform: none; will-change: auto; }
.reveal--left  { transform: translate3d(-28px, 0, 0); }
.reveal--right { transform: translate3d(28px, 0, 0); }
.reveal--scale { transform: scale(.94); }

/* Hero entrance — TRANSFORM ONLY, never opacity. The masthead and the lead
   cover art are the LCP candidates; fading them in would push LCP out by the
   length of the animation. Sliding them does not. */
@keyframes pm-rise   { from { transform: translate3d(0, 26px, 0); } to { transform: none; } }
@keyframes pm-fan-a  { from { transform: translate3d(0, 40px, 0) rotate(0deg); } to { transform: translate3d(0,0,0) rotate(-2.2deg); } }
@keyframes pm-fan-b  { from { transform: translate3d(0, 40px, 0) rotate(0deg); } to { transform: translate3d(0,0,0) rotate(2.6deg); } }
@keyframes pm-fan-c  { from { transform: translate3d(0, 40px, 0) rotate(0deg); } to { transform: translate3d(0,0,0) rotate(-1.4deg); } }
@keyframes pm-fade   { from { opacity: 0; transform: translate3d(0, 14px, 0); } to { opacity: 1; transform: none; } }
@keyframes pm-spin   { to { transform: rotate(360deg); } }
@keyframes pm-drift  { 0% { transform: translate3d(0,0,0) scale(1); } 100% { transform: translate3d(2%, -3%, 0) scale(1.08); } }
@keyframes pm-shimmer{ 100% { transform: translate3d(200%, 0, 0); } }
@keyframes pm-eq     { 0%,100% { transform: scaleY(.35); } 50% { transform: scaleY(1); } }
@keyframes pm-pulse  { 0% { transform: scale(1); opacity: .55; } 70%,100% { transform: scale(2.4); opacity: 0; } }
@keyframes pm-underline { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.hero-h1        { animation: pm-rise var(--dur-5) var(--ease-out) both; }
.hero-eyebrow   { animation: pm-fade var(--dur-4) var(--ease-out) both; }
.hero-sub-v2    { animation: pm-fade var(--dur-4) 90ms var(--ease-out) both; }
.hero-search-v2 { animation: pm-fade var(--dur-4) 160ms var(--ease-out) both; }
.hero-stats     { animation: pm-fade var(--dur-4) 230ms var(--ease-out) both; }
.hero-cats-strip{ animation: pm-fade var(--dur-4) 300ms var(--ease-out) both; }

/* Outbound page transition: motion.js sets .pm-leaving on <html> when an
   internal link is followed, so navigation reads as a cross-fade instead of
   a white flash. Fading OUT cannot affect the next page's LCP. */
html.pm-leaving .main-content {
  opacity: 0;
  transform: translate3d(0, -8px, 0);
  transition: opacity 160ms var(--ease-in-out), transform 160ms var(--ease-in-out);
}
/* Never fade the persistent player or the app shell — they survive the nav. */
html.pm-leaving .player-bar,
html.pm-leaving .site-header,
html.pm-leaving #bottom-nav { opacity: 1; transform: none; }

/* Thin top progress bar during navigation. Fixed + transform-only: it is
   painted on its own layer and cannot shift a single pixel of content. */
.pm-progress {
  position: fixed;
  inset-block-start: 0; inset-inline: 0;
  block-size: 3px;
  z-index: var(--z-toast);
  background: linear-gradient(90deg, var(--accent), var(--secondary));
  transform: scaleX(0);
  transform-origin: 0 50%;
  opacity: 0;
  pointer-events: none;
  transition: transform var(--dur-4) var(--ease-out), opacity var(--dur-2) linear;
}
[dir="rtl"] .pm-progress { transform-origin: 100% 50%; }
.pm-progress.is-on { opacity: 1; transform: scaleX(.7); }
.pm-progress.is-done { opacity: 0; transform: scaleX(1); }

/* Skeleton shimmer for media that has not decoded yet. Applied to the
   CONTAINER, which already has a reserved aspect-ratio, so it cannot move
   anything: zero CLS contribution. */
.pc-img, .hero-visual-card, .podcast-header-img, .episode-header-thumb,
.station-card .sc-logo, .player-thumb {
  position: relative;
  overflow: hidden;
  background: var(--surface-sunken);
}
/* .ec-bg is already an absolutely positioned fill in design-v2.css — never
   promote it to `relative`, that drops the cover art into normal flow and
   pushes the scrim + title out of the card. */
.ec-bg { position: absolute; inset: 0; overflow: hidden; background: var(--surface-sunken); }
/* Isolate every media wrapper: the shimmer sits at z-index 0 and the image at
   1, and without a stacking context that 1 would paint OVER .ec-overlay and
   .ec-body, which are later siblings of .ec-bg inside the card. */
.pc-img, .ec-bg, .hero-visual-card, .station-card .sc-logo { isolation: isolate; }
/* The header art wrappers hold a plain <img>; make it fill the reserved box. */
.podcast-header-img > img, .episode-header-thumb > img {
  inline-size: 100%; block-size: 100%; object-fit: cover; display: block; border-radius: 0;
}
.pc-img::before, .ec-bg::before, .hero-visual-card::before,
.station-card .sc-logo::before {
  content: '';
  position: absolute;
  inset-block: 0;
  inset-inline-start: -60%;
  inline-size: 60%;
  background: linear-gradient(90deg, transparent, var(--motif-ink), transparent);
  animation: pm-shimmer 1.6s var(--ease-in-out) infinite;
  pointer-events: none;
  z-index: 0;
}
/* As soon as an image has painted, kill the shimmer under it. */
.pc-img:has(img), .ec-bg:has(img), .hero-visual-card:has(img),
.station-card .sc-logo:has(img) { --_shim: none; }
.pc-img:has(img)::before, .ec-bg:has(img)::before,
.hero-visual-card:has(img)::before, .station-card .sc-logo:has(img)::before {
  animation-play-state: paused;
  opacity: 0;
  transition: opacity var(--dur-2) linear;
}
.pc-img img, .ec-bg img, .hero-visual-card img { position: relative; z-index: 1; }

/* THE reduced-motion contract: everything above goes away. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;      /* !reduced-motion guard */
    animation-iteration-count: 1 !important;
    animation-delay: 0ms !important;
    transition-duration: .01ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
  .hero-visual-card { transform: none !important; }
  .pm-progress { display: none; }
  html.pm-leaving .main-content { opacity: 1; transform: none; }
}

/* ──────────────────────────────────────────────────────────────────────────
   3. ZELLIGE — used with intent, at a weight you can actually see.
   Mask-based so one asset serves both themes.
   ────────────────────────────────────────────────────────────────────────── */
.hero-v2, .page-hero, .radio-hero, .footer-v2, .search-empty,
.has-motif { position: relative; isolation: isolate; }

/* 3a. Section ground — the outline lattice, at 3x v2's presence. */
.has-motif::before,
.page-hero::after,
.radio-hero::after,
.search-empty::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: var(--z-below);
  pointer-events: none;
  background-color: var(--motif-ink);
  -webkit-mask-image: var(--motif-lattice);
  mask-image: var(--motif-lattice);
  -webkit-mask-size: var(--motif-size) var(--motif-size);
  mask-size: var(--motif-size) var(--motif-size);
  -webkit-mask-repeat: repeat;
  mask-repeat: repeat;
  opacity: .55;
}
.page-hero::after, .radio-hero::after {
  --fade: radial-gradient(120% 160% at var(--_mx) 0%, #000 0%, rgba(0,0,0,.55) 42%, transparent 78%);
  -webkit-mask-image: var(--motif-lattice), var(--fade);
  mask-image: var(--motif-lattice), var(--fade);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
  -webkit-mask-size: var(--motif-size) var(--motif-size), cover;
  mask-size: var(--motif-size) var(--motif-size), cover;
  -webkit-mask-repeat: repeat, no-repeat;
  mask-repeat: repeat, no-repeat;
}
.search-empty::before { opacity: .4; }

/* 3b. THE MEDALLION — a single oversized khatem star bleeding off the
   inline-end edge of the hero. This is the hero's signature, not a texture. */
.hero-v2::after {
  content: '';
  position: absolute;
  z-index: var(--z-below);
  pointer-events: none;
  inset-block-start: -14%;
  inset-inline-end: -16%;
  inline-size: min(78vw, 720px);
  aspect-ratio: 1;
  background-color: var(--motif-ink);
  -webkit-mask-image: var(--motif-star);
  mask-image: var(--motif-star);
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  opacity: .75;
  animation: pm-spin 140s linear infinite;
  transform-origin: 50% 50%;
}
/* Second, smaller medallion low on the opposite side — the asymmetry. */
.hero-v2 .aurora {
  position: absolute;
  inset: auto auto -22% -10%;
  inline-size: min(46vw, 400px);
  block-size: min(46vw, 400px);
  z-index: var(--z-below);
  pointer-events: none;
  background:
    radial-gradient(circle at 40% 40%, var(--accent-soft) 0%, transparent 68%),
    radial-gradient(circle at 70% 70%, var(--secondary-soft) 0%, transparent 62%);
  animation: pm-drift 22s var(--ease-in-out) infinite alternate;
  opacity: 1;
}
[dir="rtl"] .hero-v2 .aurora { inset-inline: auto -10%; }

/* 3c. THE BAND — a tiled zellige rule. Section punctuation + footer cap. */
.section-header-v2::after {
  content: '';
  flex: 1;
  block-size: 16px;
  min-inline-size: var(--sp-8);
  margin-inline-start: var(--sp-5);
  align-self: center;
  background-color: var(--motif-ink);
  -webkit-mask-image: var(--motif-band), linear-gradient(to var(--_dir, right), #000 0%, #000 55%, transparent 100%);
  mask-image: var(--motif-band), linear-gradient(to var(--_dir, right), #000 0%, #000 55%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
  -webkit-mask-size: var(--motif-band-size) 16px, cover;
  mask-size: var(--motif-band-size) 16px, cover;
  -webkit-mask-repeat: repeat-x, no-repeat;
  mask-repeat: repeat-x, no-repeat;
  order: 2;
}
[dir="rtl"] .section-header-v2::after { --_dir: left; }

.footer-v2::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  block-size: 16px;
  z-index: var(--z-raised);
  pointer-events: none;
  background-color: var(--motif-ink-strong);
  -webkit-mask-image: var(--motif-band);
  mask-image: var(--motif-band);
  -webkit-mask-size: var(--motif-band-size) 16px;
  mask-size: var(--motif-band-size) 16px;
  -webkit-mask-repeat: repeat-x;
  mask-repeat: repeat-x;
  opacity: .9;
}

/* HARD RULE: the motif never enters an ad container or a cover-art surface.
   These are the only places the design system overrides ads.css, and it does
   it by REMOVING decoration, never by changing box metrics. */
.ads-unit::before, .ads-unit::after,
.ads-anchor::before, .ads-anchor::after,
.adsbygoogle::before, .adsbygoogle::after,
.ads-unit .has-motif::before,
.pc-img::after, .ec-bg::after { content: none !important; }  /* !motif opt-out */
.ads-unit, .ads-anchor, .adsbygoogle { background-image: none; }

/* ──────────────────────────────────────────────────────────────────────────
   4. LAYOUT SHELL — generous, editorial rhythm
   ────────────────────────────────────────────────────────────────────────── */
.container, .container-xl {
  inline-size: 100%;
  max-inline-size: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.main-content {
  /* design-v2.css caps this at 1400px, which stops the hero / page-hero
     plaster grounds from bleeding to the viewport edge. Every block inside
     is already capped at --content-max by its own container, so releasing
     the cap here is safe and is what makes the feature bands full-width. */
  max-inline-size: none;
  margin-inline: 0;
  padding-top: 0;
  padding-bottom: var(--sp-16);
  min-block-size: 60vh;
}
.page-sections-v2 { padding-top: var(--sp-10); }
.section-v2, .home-section { margin-block-end: var(--sp-16); }
@media (min-width: 768px) {
  .section-v2, .home-section { margin-block-end: var(--sp-24); }
  .main-content { padding-bottom: var(--sp-24); }
  .page-sections-v2 { padding-top: var(--sp-16); }
}

/* ──────────────────────────────────────────────────────────────────────────
   5. HEADER / NAVBAR
   ────────────────────────────────────────────────────────────────────────── */
.site-header {
  block-size: var(--app-header-h);
  background: var(--surface-glass);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  backdrop-filter: blur(20px) saturate(150%);
  border-block-end: 1px solid var(--border);
  box-shadow: none;
  transition: background var(--dur-3) var(--ease-in-out),
              border-color var(--dur-3) var(--ease-in-out),
              box-shadow var(--dur-3) var(--ease-in-out);
}
.site-header.scrolled {
  background: var(--surface-glass) !important;  /* !override: design-v2.css hardcodes rgba(8,7,18,.97) */
  box-shadow: var(--shadow-2) !important;       /* !override: same rule */
  border-block-end-color: var(--border-strong);
}
.navbar-v2 {
  block-size: var(--app-header-h);
  /* Pleine largeur : le logo se cale à gauche, les contrôles à droite.
     La gouttière suit la largeur de la fenêtre au lieu d'un cadre fixe. */
  max-inline-size: none;
  margin-inline: 0;
  padding-inline: clamp(16px, 3vw, 40px);
  gap: var(--sp-4);
}
.navbar-brand { display: inline-flex; align-items: center; gap: var(--sp-2); min-block-size: var(--tap-min); }
.navbar-brand .brand-text {
  font-size: 1.35rem;
  letter-spacing: var(--ls-tighter);
  color: var(--text-primary);
}
.brand-dot { color: var(--accent-text); }
.navbar-center { gap: var(--sp-1); }

/* Nav links: the underline is drawn with transform, so hover costs nothing. */
.nav-link {
  position: relative;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text-secondary);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-xs);
  min-block-size: 38px;
  display: inline-flex;
  align-items: center;
  transition: color var(--dur-1) var(--ease-out);
}
.nav-link::after {
  content: '';
  position: absolute;
  inset-inline: var(--sp-3);
  inset-block-end: 6px;
  block-size: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform var(--dur-2) var(--ease-out);
}
[dir="rtl"] .nav-link::after { transform-origin: 100% 50%; }
.nav-link:hover { color: var(--text-primary); }
.nav-link:hover::after { transform: scaleX(1); }
.nav-link.active { color: var(--accent-text); font-weight: var(--fw-bold); }
.nav-link.active::after { transform: scaleX(1); }
.navbar-end { gap: var(--sp-2); }

.btn-icon {
  inline-size: var(--tap-min);
  block-size: var(--tap-min);
  border-radius: var(--r-sm);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  transition: background var(--dur-1) var(--ease-out),
              color var(--dur-1) var(--ease-out),
              transform var(--dur-1) var(--ease-out);
}
.btn-icon:hover { background: var(--surface-raised); color: var(--text-primary); border-color: var(--border); }
.btn-icon:active { transform: scale(.94); }
.btn-icon svg { inline-size: 19px; block-size: 19px; }
/* The theme toggle swaps its glyph with a rotate — a micro-interaction that
   makes the (now working) persistence legible. */
#theme-toggle svg { transition: transform var(--dur-3) var(--ease-spring); }
#theme-toggle:hover svg { transform: rotate(22deg); }

.nav-submit-pill {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  min-block-size: 38px;
  padding-inline: var(--sp-4);
  border-radius: var(--r-sm);
  background: var(--accent);
  color: var(--text-on-accent);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  border: 0;
  box-shadow: var(--shadow-accent);
  transition: background var(--dur-1) var(--ease-out), transform var(--dur-2) var(--ease-spring);
}
.nav-submit-pill:hover { background: var(--accent-hover); transform: translateY(-2px); }
.nav-submit-pill:active { transform: translateY(0) scale(.97); }

.lang-switcher { display: inline-flex; gap: 2px; padding: 3px; background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--r-sm); }
.lang-btn {
  min-inline-size: 34px;
  min-block-size: 32px;
  padding-inline: var(--sp-2);
  border: 0;
  border-radius: var(--r-xs);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  cursor: pointer;
  position: relative;
  transition: background var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out);
}
.lang-btn::after { content: ''; position: absolute; inset: -6px; }  /* 44px hit area */
.lang-btn:hover { color: var(--text-primary); }
.lang-btn--active, .lang-btn.active { background: var(--accent); color: var(--text-on-accent); }

.nav-live-dot { color: var(--danger); position: relative; }
.nav-live-dot::before, .dot-pulse { background: var(--danger); }
.nav-link--radio .nav-live-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: var(--danger);
  animation: pm-pulse 2s var(--ease-out) infinite;
}

.hamburger span { transition: transform var(--dur-2) var(--ease-out), opacity var(--dur-1) linear; }

/* ──────────────────────────────────────────────────────────────────────────
   6. DRAWER + BOTTOM NAV  (mobile app shell — restyled, not dismantled)
   ────────────────────────────────────────────────────────────────────────── */
.app-drawer {
  inline-size: 300px;
  background: var(--surface-overlay);
  border-inline-end: 1px solid var(--border);
  box-shadow: var(--shadow-4);
  color: var(--text-primary);
}
[dir="rtl"] .app-drawer { border-inline-end: 0; border-inline-start: 1px solid var(--border); }
.drawer-overlay { background: var(--scrim); }
.drawer-header { padding: var(--sp-5); border-block-end: 1px solid var(--border); }
.drawer-brand { font-size: 1.3rem; min-block-size: var(--tap-min); display: inline-flex; align-items: center; color: var(--text-primary); }
.drawer-close { inline-size: var(--tap-min); block-size: var(--tap-min); border-radius: var(--r-sm); background: var(--surface-raised); border: 1px solid var(--border); color: var(--text-secondary); }
.drawer-section { padding-block: var(--sp-3); border-block-end: 1px solid var(--border); }
.drawer-section:last-of-type { border-block-end: 0; }
.drawer-section-label { color: var(--text-muted); padding-inline: var(--sp-5); margin-block-end: var(--sp-2); }
.drawer-link {
  display: flex; align-items: center; gap: var(--sp-3);
  min-block-size: var(--tap-min);
  padding-inline: var(--sp-5);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--text-secondary);
  border-inline-start: 3px solid transparent;
  transition: background var(--dur-1) var(--ease-out),
              color var(--dur-1) var(--ease-out),
              border-color var(--dur-1) var(--ease-out);
}
.drawer-link:hover { background: var(--surface-raised); color: var(--text-primary); border-inline-start-color: var(--border-strong); }
.drawer-link.active { color: var(--accent-text); background: var(--accent-soft); border-inline-start-color: var(--accent); }
.drawer-lang { display: flex; gap: var(--sp-2); padding: var(--sp-2) var(--sp-5) var(--sp-4); }
.drawer-lang-btn {
  flex: 1; min-block-size: var(--tap-min);
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface-raised);
  color: var(--text-secondary);
  font-family: var(--font-sans); font-size: var(--fs-sm); font-weight: var(--fw-bold);
}
.drawer-lang-btn.lang-btn--active, .drawer-lang-btn.active { background: var(--accent); color: var(--text-on-accent); border-color: var(--accent); }
.drawer-lang-btn::after { content: none; }

#bottom-nav, .bottom-nav {
  background: var(--surface-glass);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  backdrop-filter: blur(24px) saturate(150%);
  border-block-start: 1px solid var(--border);
}
.bnav-item {
  position: relative;
  min-block-size: var(--tap-min);
  color: var(--text-muted);
  gap: 3px;
  transition: color var(--dur-1) var(--ease-out);
}
.bnav-item .bnav-icon { transition: transform var(--dur-2) var(--ease-spring); }
.bnav-item:active .bnav-icon { transform: scale(.86); }
.bnav-item.active, .bnav-item[aria-current="page"] { color: var(--accent-text); }
.bnav-item.active .bnav-icon { transform: translateY(-2px); }
/* Active tab marker — a small zellige diamond, drawn with transform. */
.bnav-item::before {
  content: '';
  position: absolute;
  inset-block-start: 4px; inset-inline-start: 50%;
  inline-size: 6px; block-size: 6px;
  margin-inline-start: -3px;
  background: var(--accent);
  transform: rotate(45deg) scale(0);
  transition: transform var(--dur-2) var(--ease-spring);
}
.bnav-item.active::before, .bnav-item[aria-current="page"]::before { transform: rotate(45deg) scale(1); }
#bottom-nav .bnav-item, .bottom-nav .bnav-item { min-inline-size: 0; flex: 1 1 0; padding-inline: 2px; overflow: hidden; }
.bnav-label {
  font-size: var(--fs-3xs); font-weight: var(--fw-semibold); letter-spacing: 0; color: inherit;
  display: block; text-align: center; line-height: 1.2;
  max-inline-size: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.bnav-icon { inline-size: 22px; block-size: 22px; }

/* ──────────────────────────────────────────────────────────────────────────
   7. THE HERO — the single biggest structural change.
   Was: a symmetric 1fr/1fr split with a neat 2x2 cover mosaic.
   Now: an asymmetric 7/5 editorial spread on a plaster ground, with an
   oversized zellige medallion behind, a masthead running to 7.5rem, and the
   cover art fanned at three different scales and angles.
   ────────────────────────────────────────────────────────────────────────── */
.hero-v2 {
  min-block-size: 0;
  justify-content: flex-start;
  padding-block: var(--sp-12) var(--sp-10);
  padding-inline: 0;
  overflow: hidden;
  background: var(--surface-feature);
  border-block-end: 1px solid var(--border);
}
.hero-v2::before { opacity: 0; }   /* kills design-v2.css's film-grain layer */
@media (min-width: 768px) { .hero-v2 { padding-block: var(--sp-20) var(--sp-16); } }
@media (max-width: 767px) { .hero-v2 { padding-block: var(--sp-8) var(--sp-10); } }

.hero-split {
  max-inline-size: var(--content-max);
  margin-inline: auto;
  inline-size: 100%;
  padding-inline: var(--gutter);
  grid-template-columns: minmax(0, 1fr);
  gap: var(--sp-10);
  align-items: center;
}
@media (min-width: 900px) {
  .hero-split {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: var(--sp-12);
    align-items: center;
  }
}
.hero-text-col { text-align: start; position: relative; z-index: var(--z-raised); }

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: var(--sp-3);
  color: var(--text-on-secondary);
  background: var(--secondary);
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--r-xs);
  margin-block-end: var(--sp-6);
}
.hero-eyebrow .eyebrow-dot {
  inline-size: 7px; block-size: 7px;
  background: var(--text-on-secondary);
  border-radius: 0;
  transform: rotate(45deg);
}

/* THE MASTHEAD */
.hero-h1 {
  font-size: var(--fs-display);
  font-weight: var(--fw-display);
  line-height: var(--lh-poster);
  letter-spacing: var(--ls-tighter);
  margin-block-end: var(--sp-6);
  color: var(--text-primary);
}
/* v2 painted this with a purple→violet gradient fill. v3 sets it solid in
   terracotta and hangs a saffron zellige rule under it instead — a magazine
   device, and it survives forced-colors and print. */
.hero-h1 .gradient-text, .gradient-text {
  background: none;
  -webkit-background-clip: initial; background-clip: initial;
  -webkit-text-fill-color: currentColor;
  color: var(--accent-text);
  position: relative;
  display: inline-block;
}
.hero-h1 .gradient-text::after {
  content: '';
  position: absolute;
  inset-inline: 0;
  inset-block-end: .06em;
  block-size: .1em;
  background: var(--secondary);
  transform: scaleX(0);
  transform-origin: 0 50%;
  animation: pm-underline var(--dur-5) 420ms var(--ease-out) forwards;
}
[dir="rtl"] .hero-h1 .gradient-text::after { transform-origin: 100% 50%; }
@media (forced-colors: active), print {
  .gradient-text { -webkit-text-fill-color: currentColor; color: var(--text-primary); }
}

.hero-sub-v2 {
  font-size: var(--fs-lg);
  line-height: var(--lh-relaxed);
  color: var(--text-secondary);
  max-inline-size: 44ch;
  margin-block-end: var(--sp-8);
  border-inline-start: 3px solid var(--accent);
  padding-inline-start: var(--sp-5);
}
.hero-search-v2 { max-inline-size: 520px; margin-block-end: var(--sp-8); }

#hero-search, #search-page-input, .navbar-search input,
.hero-search-v2 input, .search-page-bar input, .search-overlay-input {
  inline-size: 100%;
  min-block-size: 56px;
  padding-block: var(--sp-3);
  padding-inline: var(--sp-12) var(--sp-4);
  border-radius: var(--r-sm);
  background: var(--surface-raised);
  border: 1px solid var(--border-interactive);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  transition: border-color var(--dur-1) var(--ease-out), box-shadow var(--dur-2) var(--ease-out);
}
.hero-search-v2 input::placeholder,
.search-page-bar input::placeholder,
.search-overlay-input::placeholder { color: var(--text-muted); }
#hero-search:focus, #search-page-input:focus,
.hero-search-v2 input:focus, .search-page-bar input:focus, .search-overlay-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
  outline: none;
}
.hero-search-v2 svg { inset-inline-start: var(--sp-4); inset-inline-end: auto; color: var(--text-muted); }

/* Stats become an editorial masthead strip: display numerals, hairline rules. */
.hero-stats, .hero-stats-v2 {
  display: flex; gap: 0; flex-wrap: nowrap;
  overflow-x: auto; scrollbar-width: none;
  border-block-start: 1px solid var(--border-strong);
  padding-block-start: var(--sp-5);
}
.hero-stats::-webkit-scrollbar, .hero-stats-v2::-webkit-scrollbar { display: none; }
.hero-stat { flex: 0 0 auto; padding-inline: var(--sp-6); border-inline-start: 1px solid var(--border); }
.hero-stat:first-child { padding-inline-start: 0; border-inline-start: 0; }
.hero-stat-n {
  font-family: var(--font-display);
  font-variation-settings: var(--font-display-settings);
  font-size: clamp(1.75rem, 1.2rem + 1.8vw, 2.5rem);
  font-weight: var(--fw-display);
  color: var(--accent-text);
  letter-spacing: var(--ls-tighter);
  line-height: 1;
}
.hero-stat-l { color: var(--text-muted); margin-block-start: var(--sp-2); }

/* THE FAN — three covers at three scales and three angles. */
.hero-visual {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(6, minmax(0, 1fr));
  block-size: clamp(340px, 42vw, 520px);
  gap: 0;
  position: relative;
  z-index: var(--z-raised);
}
.hero-visual-card {
  border-radius: var(--r-lg);
  overflow: hidden;
  position: relative;
  background: var(--surface-raised);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-4);
  transition: transform var(--dur-3) var(--ease-spring), box-shadow var(--dur-3) var(--ease-out);
}
.hero-visual-card img { inline-size: 100%; block-size: 100%; object-fit: cover; }
.hero-visual-card:nth-child(1) {
  grid-column: 1 / 5; grid-row: 1 / 6;
  z-index: 3;
  animation: pm-fan-a var(--dur-5) var(--ease-spring) both;
}
.hero-visual-card:nth-child(2) {
  grid-column: 3 / 6; grid-row: 4 / 7;
  z-index: 4;
  animation: pm-fan-b var(--dur-5) 120ms var(--ease-spring) both;
}
.hero-visual-card:nth-child(3) {
  grid-column: 4 / 6; grid-row: 1 / 4;
  z-index: 2;
  animation: pm-fan-c var(--dur-5) 240ms var(--ease-spring) both;
}
.hero-visual-card:nth-child(n+4) { display: none; }
.hero-visual-card:hover { transform: rotate(0deg) scale(1.03) translateY(-6px); z-index: 5; box-shadow: var(--shadow-4), var(--shadow-accent); }
@media (max-width: 899px) {
  .hero-visual { display: grid; block-size: clamp(240px, 54vw, 360px); }
}
@media (max-width: 599px) { .hero-visual { display: none; } }

/* Category strip: chips become editorial tags with a hairline. */
.hero-cats-strip {
  max-inline-size: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
  margin-block-start: var(--sp-10);
  position: relative; z-index: var(--z-raised);
}
.hero-cats-v2 { display: flex; gap: var(--sp-2); overflow-x: auto; scrollbar-width: none; padding-block: var(--sp-1); }
.hero-cats-v2::-webkit-scrollbar, .hero-cats-strip::-webkit-scrollbar { display: none; }
.cat-pill-v2 {
  min-block-size: 42px;
  padding-inline: var(--sp-4);
  border-radius: var(--r-xs);
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  white-space: nowrap;
  transition: background var(--dur-1) var(--ease-out),
              border-color var(--dur-1) var(--ease-out),
              color var(--dur-1) var(--ease-out),
              transform var(--dur-2) var(--ease-spring);
}
.cat-pill-v2:hover { background: var(--accent); border-color: var(--accent); color: var(--text-on-accent); transform: translateY(-2px); }

/* ──────────────────────────────────────────────────────────────────────────
   8. SECTION HEADERS — magazine department heads
   ────────────────────────────────────────────────────────────────────────── */
.section-header-v2 {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-block-end: var(--sp-8);
  padding-inline: 0;
}
.section-title-v2 {
  font-size: var(--fs-3xl);
  font-weight: var(--fw-display);
  letter-spacing: var(--ls-tighter);
  line-height: var(--lh-tight);
  color: var(--text-primary);
  display: inline-flex; align-items: center; gap: var(--sp-3);
  flex: 0 0 auto;
  max-inline-size: min(100%, 22ch);
  order: 1;
}
.section-title-v2 .section-emoji { font-size: .7em; }
.section-link-v2 {
  order: 3;
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: var(--sp-2);
  min-block-size: var(--tap-min);
  padding-inline: var(--sp-3);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-xs);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--accent-text);
  white-space: nowrap;
  transition: background var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out),
              border-color var(--dur-1) var(--ease-out);
}
.section-link-v2:hover { background: var(--accent); border-color: var(--accent); color: var(--text-on-accent); }
/* Below the tablet breakpoint the zellige rule has no room and pushes the
   "voir tout" control off-screen. Drop the rule, let the title flex. */
@media (max-width: 899px) {
  .section-header-v2::after { display: none; }
  .section-title-v2 { flex: 1 1 auto; min-inline-size: 0; max-inline-size: none; }
  .section-link-v2 { margin-inline-start: auto; }
}

/* ──────────────────────────────────────────────────────────────────────────
   9. CARDS — square-cornered, editorial, with a featured lead card
   ────────────────────────────────────────────────────────────────────────── */
.scroll-row {
  gap: var(--sp-4);
  padding-block-end: var(--sp-3);
  padding-inline: 0;
  /* flex-start, not stretch: the oversized lead card should read as taller
     than the ones after it. Stretch gave every card the lead card's height
     and left a slab of empty body under each. */
  align-items: flex-start;
  scroll-padding-inline-start: var(--gutter);
}
@media (min-width: 768px) { .scroll-row { gap: var(--sp-5); } }
.scroll-row .podcast-card-v2 { inline-size: 172px; }
.scroll-row .episode-card-v2 { inline-size: 280px; }
@media (min-width: 768px) {
  .scroll-row .podcast-card-v2 { inline-size: 200px; }
  .scroll-row .episode-card-v2 { inline-size: 330px; }
}
/* Bloc « lead card » retiré par fix-header-cards.sh : le client veut des
   cartes de taille identique dans chaque rail. La 1re carte suit désormais
   la règle de base (.scroll-row .podcast-card-v2). */

.podcast-card-v2 {
  border-radius: var(--r-md);
  background: var(--surface-raised);
  border: 1px solid var(--border);
  box-shadow: none;
  position: relative;
  overflow: hidden;
  transition: transform var(--dur-2) var(--ease-out),
              box-shadow var(--dur-2) var(--ease-out),
              border-color var(--dur-2) var(--ease-out);
}
/* Hover: the card lifts, the art zooms, and a saffron rule wipes across the
   bottom edge. All transform/opacity — no layout work. */
.podcast-card-v2::after {
  content: '';
  position: absolute;
  inset-inline: 0; inset-block-end: 0;
  block-size: 3px;
  background: var(--secondary);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform var(--dur-2) var(--ease-out);
  z-index: 2;
}
[dir="rtl"] .podcast-card-v2::after { transform-origin: 100% 50%; }
.podcast-card-v2:hover {
  transform: translateY(-6px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-3);
}
.podcast-card-v2:hover::after { transform: scaleX(1); }
.podcast-card-v2 .pc-img { background: var(--surface-sunken); }
.podcast-card-v2 .pc-img img { transition: transform var(--dur-4) var(--ease-out); }
.podcast-card-v2:hover .pc-img img { transform: scale(1.07); }
.pc-body { padding: var(--sp-4); gap: var(--sp-2); }
.pc-title {
  font-family: var(--font-display);
  font-variation-settings: var(--font-display-settings);
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-tight);
  color: var(--text-primary);
}
.pc-author { font-size: var(--fs-2xs); color: var(--text-muted); }
.pc-count {
  font-size: var(--fs-3xs); font-weight: var(--fw-bold);
  letter-spacing: var(--ls-wide); text-transform: uppercase;
  color: var(--secondary-text);
}
.pc-play-overlay { background: var(--scrim); }
.pc-play-btn, .ec-play-btn, .episode-play-btn, .episode-list-play-btn {
  background: var(--accent);
  border: 0;
  color: var(--text-on-accent);
  box-shadow: var(--shadow-accent);
  transition: transform var(--dur-2) var(--ease-spring), background var(--dur-1) var(--ease-out);
}
.pc-play-btn:hover, .ec-play-btn:hover, .episode-list-play-btn:hover { background: var(--accent-hover); }
.pc-play-btn svg, .ec-play-btn svg, .episode-play-btn svg, .episode-list-play-btn svg { fill: currentColor; }

.episode-card-v2 {
  border-radius: var(--r-md);
  background: var(--surface-sunken);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform var(--dur-2) var(--ease-out), box-shadow var(--dur-2) var(--ease-out);
}
.episode-card-v2:hover { transform: translateY(-6px); box-shadow: var(--shadow-3); }
.episode-card-v2 .ec-bg img { transition: transform var(--dur-4) var(--ease-out); }
.episode-card-v2:hover .ec-bg img { transform: scale(1.06); }
.ec-overlay { background: var(--media-scrim); }
.ec-body { padding: var(--sp-4); }
.ec-podcast { color: var(--pm-saffron-300); }
.ec-title {
  font-family: var(--font-display);
  font-variation-settings: var(--font-display-settings);
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-tight);
  color: var(--text-on-media);
}
.ec-meta { font-size: var(--fs-2xs); color: rgba(255,255,255,.86); margin-block-start: var(--sp-2); }
.ec-duration {
  inset-block-start: var(--sp-3);
  inset-inline-end: var(--sp-3); inset-inline-start: auto;
  border-radius: var(--r-xs);
  background: var(--secondary);
  color: var(--text-on-secondary);
  font-size: var(--fs-3xs); font-weight: var(--fw-bold);
  letter-spacing: var(--ls-wide);
  padding: 3px var(--sp-2);
  font-variant-numeric: tabular-nums;
}
.ec-placeholder, .pc-placeholder {
  background-color: var(--surface-sunken);
  -webkit-mask-image: none; mask-image: none;
  background-image: var(--motif-lattice);
  background-size: var(--motif-size) var(--motif-size);
}

/* Episode rows */
.episodes-list { display: flex; flex-direction: column; gap: 0; inline-size: 100%; }
.episode-list-item, .episode-list-row {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  inline-size: 100%;
  min-inline-size: 0;
  box-sizing: border-box;
  padding: var(--sp-4) var(--sp-3);
  border-radius: 0;
  border: 0;
  border-block-end: 1px solid var(--border);
  background: transparent;
  color: var(--text-primary);
  position: relative;
  transition: background var(--dur-1) var(--ease-out), transform var(--dur-2) var(--ease-out);
}
.episode-list-item:hover, .episode-list-row:hover { background: var(--surface-raised); transform: translateX(4px); }
[dir="rtl"] .episode-list-item:hover, [dir="rtl"] .episode-list-row:hover { transform: translateX(-4px); }
.episode-list-img, .episode-list-row-img { inline-size: 60px; block-size: 60px; border-radius: var(--r-sm); flex: 0 0 auto; background: var(--surface-sunken); }
.episode-list-info, .episode-list-row-info { flex: 1 1 0; min-inline-size: 0; }
.episode-list-title, .episode-list-row-title {
  font-family: var(--font-display);
  font-variation-settings: var(--font-display-settings);
  font-size: var(--fs-lg); font-weight: var(--fw-bold); line-height: var(--lh-snug);
  letter-spacing: var(--ls-tight);
  color: var(--text-primary);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  white-space: normal;
}
.episode-list-podcast, .episode-list-row-meta {
  font-size: var(--fs-2xs); color: var(--text-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  margin-block-start: var(--sp-1);
}
.episode-list-comments { margin-inline-start: auto; font-size: var(--fs-2xs); color: var(--text-muted); flex: 0 0 auto; }
/* Big editorial rank numerals, magazine chart style. */
.episode-rank {
  font-family: var(--font-display);
  font-variation-settings: var(--font-display-settings);
  font-size: 2.25rem; font-weight: var(--fw-display);
  color: var(--border-strong);
  min-inline-size: 48px; text-align: center; flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  transition: color var(--dur-2) var(--ease-out);
}
.episode-list-item:hover .episode-rank { color: var(--accent-text); }
.episode-list-item:nth-child(-n+3) .episode-rank { color: var(--secondary-text); }

.recent-podcasts { display: flex; flex-direction: column; gap: 0; }
.recent-podcast-item {
  display: flex; align-items: center; gap: var(--sp-3);
  inline-size: 100%; box-sizing: border-box;
  padding: var(--sp-3);
  border-radius: var(--r-sm);
  transition: background var(--dur-1) var(--ease-out);
}
.recent-podcast-item:hover { background: var(--surface-sunken); }
.recent-podcast-count { font-size: var(--fs-2xs); color: var(--text-muted); }

.cat-tile {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  min-block-size: var(--tap-min);
  transition: border-color var(--dur-1) var(--ease-out),
              background var(--dur-1) var(--ease-out),
              transform var(--dur-2) var(--ease-spring);
}
.cat-tile:hover { border-color: var(--accent); background: var(--accent-soft); box-shadow: none; transform: translateY(-3px); }
.cat-tile-name { font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--text-secondary); }
.cat-tag {
  display: inline-flex; align-items: center;
  min-block-size: 28px; padding-inline: var(--sp-3);
  border-radius: var(--r-xs);
  background: var(--accent-soft); color: var(--accent-text);
  border: 1px solid var(--border);
  font-size: var(--fs-3xs); font-weight: var(--fw-bold);
  letter-spacing: var(--ls-wide); text-transform: uppercase;
}

/* ──────────────────────────────────────────────────────────────────────────
   10. PAGE HEROES / GRIDS / PAGINATION
   ────────────────────────────────────────────────────────────────────────── */
.page-hero, .radio-hero {
  padding-block: var(--sp-12) var(--sp-10);
  padding-inline: var(--gutter);
  overflow: hidden;
  background: var(--surface-feature);
  border-block-end: 1px solid var(--border);
  margin-block-end: var(--sp-10);
}
@media (min-width: 768px) { .page-hero, .radio-hero { padding-block: var(--sp-20) var(--sp-12); } }
.page-hero-title, .radio-hero-title, .search-page-title {
  font-size: var(--fs-4xl);
  font-weight: var(--fw-display);
  letter-spacing: var(--ls-tighter);
  line-height: var(--lh-poster);
  color: var(--text-primary);
  max-inline-size: 16ch;
}
.page-hero-sub, .radio-hero-sub {
  font-size: var(--fs-lg); color: var(--text-secondary);
  max-inline-size: 52ch; margin-block-start: var(--sp-5);
  border-inline-start: 3px solid var(--accent);
  padding-inline-start: var(--sp-5);
}
.page-info { padding-inline: var(--gutter); color: var(--text-muted); font-size: var(--fs-sm); }

.podcasts-grid-full, .station-grid, .categories-grid-v2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-4);
  inline-size: 100%;
  max-inline-size: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
  padding-block-end: var(--sp-16);
  box-sizing: border-box;
  align-items: start;
}
.podcasts-grid-full .podcast-card-v2,
.station-grid .station-card,
.categories-grid-v2 .cat-tile { block-size: auto; }
.podcast-card-v2 .pc-body { flex: 1 1 auto; }
.podcasts-grid-full .ads-unit--infeed-grid,
.station-grid .ads-unit--infeed-grid { align-self: start; }
@media (min-width: 600px) { .podcasts-grid-full, .station-grid, .categories-grid-v2 { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--sp-5); } }
@media (min-width: 1024px) { .podcasts-grid-full { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--sp-6); } }

.station-card {
  display: flex; flex-direction: column; align-items: center;
  justify-content: flex-start; text-align: center;
  gap: var(--sp-3);
  inline-size: 100%; min-inline-size: 0; box-sizing: border-box;
  padding: var(--sp-6) var(--sp-4);
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  position: relative; overflow: hidden;
  transition: border-color var(--dur-1) var(--ease-out),
              transform var(--dur-2) var(--ease-out),
              box-shadow var(--dur-2) var(--ease-out);
}
.station-card:hover { border-color: var(--danger); transform: translateY(-5px); box-shadow: var(--shadow-3); }
.station-card .sc-logo {
  inline-size: 84px; block-size: 84px;
  border-radius: var(--r-md);
  flex: 0 0 auto;
  background: var(--surface-sunken);
  overflow: hidden; position: relative;
}
.station-card .sc-info { inline-size: 100%; min-inline-size: 0; text-align: center; flex: 0 1 auto; }
.station-card .sc-name {
  font-family: var(--font-display);
  font-variation-settings: var(--font-display-settings);
  font-size: var(--fs-lg); font-weight: var(--fw-bold);
  color: var(--text-primary); line-height: var(--lh-snug);
  letter-spacing: var(--ls-tight);
  margin-block-end: 2px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; white-space: normal;
}
.station-card .sc-genre {
  font-size: var(--fs-2xs); color: var(--text-muted); line-height: var(--lh-snug);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.station-card .sc-badge {
  display: inline-flex; align-items: center; gap: var(--sp-1);
  padding: 3px var(--sp-2);
  border-radius: var(--r-xs);
  background: var(--danger-soft); color: var(--danger);
  font-size: var(--fs-3xs); font-weight: var(--fw-bold);
  letter-spacing: var(--ls-wide);
  flex: 0 0 auto; position: static;
}
.sc-live-ring { border-color: var(--danger); }
.radio-hero { text-align: start; }
.radio-hero-title { background: none; -webkit-text-fill-color: currentColor; color: var(--text-primary); }
.radio-hero-sub { color: var(--text-secondary); }

.pagination { display: flex; align-items: center; justify-content: center; gap: var(--sp-2); flex-wrap: wrap; padding-block: var(--sp-12); }
.page-btn, .pagination-btn {
  min-inline-size: var(--tap-min); min-block-size: var(--tap-min);
  display: inline-flex; align-items: center; justify-content: center;
  padding-inline: var(--sp-3);
  border-radius: var(--r-xs);
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
  font-family: var(--font-sans); font-size: var(--fs-sm); font-weight: var(--fw-bold);
  transition: background var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out), border-color var(--dur-1) var(--ease-out);
}
.page-btn:hover, .pagination-btn:hover { border-color: var(--accent); color: var(--accent-text); }
.page-btn.active, .pagination-btn.active { background: var(--accent); border-color: var(--accent); color: var(--text-on-accent); }
.pagination-info { font-size: var(--fs-sm); color: var(--text-muted); }

/* ──────────────────────────────────────────────────────────────────────────
   11. TWO-COLUMN + SIDEBAR  (ads.css owns .ads-unit--sidebar — untouched)
   ────────────────────────────────────────────────────────────────────────── */
.two-col-section, .episode-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--sp-8);
  inline-size: 100%;
  max-inline-size: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
  box-sizing: border-box;
}
@media (min-width: 900px) {
  .two-col-section, .episode-layout { grid-template-columns: minmax(0, 1fr) 340px; gap: var(--sp-12); }
}
.two-col-main, .episode-main { min-inline-size: 0; }
.sidebar-widget {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-5);
  margin-block-end: var(--sp-5);
}
.widget-title { color: var(--text-muted); margin-block-end: var(--sp-4); }
.sidebar-podcast-card { display: flex; gap: var(--sp-3); align-items: center; }
.sidebar-podcast-title { font-size: var(--fs-sm); font-weight: var(--fw-bold); color: var(--text-primary); }
.sidebar-podcast-count { font-size: var(--fs-2xs); color: var(--text-muted); }

/* ──────────────────────────────────────────────────────────────────────────
   12. PODCAST + EPISODE DETAIL — full editorial treatment
   ────────────────────────────────────────────────────────────────────────── */
.breadcrumb {
  font-size: var(--fs-3xs); color: var(--text-muted); padding-block: var(--sp-5);
  display: flex; gap: var(--sp-2); flex-wrap: wrap;
  letter-spacing: var(--ls-wide); text-transform: uppercase; font-weight: var(--fw-semibold);
}
.breadcrumb a { color: var(--text-secondary); }
.breadcrumb a:hover { color: var(--accent-text); }

.podcast-header, .episode-header {
  display: flex; gap: var(--sp-6); align-items: flex-start;
  padding-block: var(--sp-6) var(--sp-10);
}
@media (min-width: 768px) { .podcast-header, .episode-header { gap: var(--sp-10); } }
.podcast-header-img, .episode-header-thumb {
  inline-size: 120px; block-size: 120px; flex: 0 0 auto;
  border-radius: var(--r-md); background: var(--surface-sunken);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-3);
}
@media (min-width: 768px) { .podcast-header-img, .episode-header-thumb { inline-size: 230px; block-size: 230px; } }
.podcast-header-info, .episode-header-info { min-inline-size: 0; flex: 1 1 auto; }
.podcast-title {
  font-size: var(--fs-4xl); font-weight: var(--fw-display);
  letter-spacing: var(--ls-tighter); line-height: var(--lh-poster);
}
.episode-title {
  font-size: var(--fs-3xl); font-weight: var(--fw-display);
  letter-spacing: var(--ls-tighter); line-height: var(--lh-tight);
}
.podcast-author, .episode-podcast-link {
  font-size: var(--fs-2xs); font-weight: var(--fw-bold);
  letter-spacing: var(--ls-wide); text-transform: uppercase;
  color: var(--accent-text); margin-block-start: var(--sp-4);
  display: inline-flex; align-items: center; gap: var(--sp-2);
}
.podcast-desc, .episode-description, .episode-description-text, .episode-description-html {
  font-size: var(--fs-md); line-height: var(--lh-relaxed);
  color: var(--text-secondary); max-inline-size: var(--measure);
  margin-block-start: var(--sp-5);
}
.episode-description-html a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }
.podcast-stats, .episode-meta {
  display: flex; flex-wrap: wrap; gap: var(--sp-5);
  font-size: var(--fs-2xs); color: var(--text-muted); margin-block-start: var(--sp-5);
  letter-spacing: var(--ls-wide); text-transform: uppercase; font-weight: var(--fw-semibold);
}
.podcast-cats { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-block-start: var(--sp-4); }
.podcast-social { display: flex; gap: var(--sp-2); margin-block-start: var(--sp-5); }
.podcast-social a {
  inline-size: var(--tap-min); block-size: var(--tap-min);
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-sm); background: transparent;
  border: 1px solid var(--border-strong); color: var(--text-secondary);
  transition: border-color var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out), transform var(--dur-2) var(--ease-spring);
}
.podcast-social a:hover { border-color: var(--accent); color: var(--accent-text); transform: translateY(-2px); }
.episode-count-badge, .comment-count-badge {
  display: inline-flex; align-items: center; min-block-size: 24px; padding-inline: var(--sp-2);
  border-radius: var(--r-xs); background: var(--surface-sunken); border: 1px solid var(--border);
  font-size: var(--fs-3xs); font-weight: var(--fw-bold); color: var(--text-secondary);
}
.episode-player-section { margin-block: var(--sp-8); }

.comments-section { margin-block-start: var(--sp-16); }
.comments-title { font-size: var(--fs-2xl); font-weight: var(--fw-display); margin-block-end: var(--sp-6); }
.comment-form-wrap textarea, .comment-form-wrap input,
.form-input, .submit-form input, .submit-form textarea, .submit-form select {
  inline-size: 100%;
  min-block-size: var(--tap-min);
  padding: var(--sp-3);
  border-radius: var(--r-sm);
  background: var(--bg-input);
  border: 1px solid var(--border-interactive);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
}
.comment-form-wrap textarea:focus, .form-input:focus,
.submit-form input:focus, .submit-form textarea:focus, .submit-form select:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); outline: none;
}
.comment-login-prompt { background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--r-md); padding: var(--sp-5); color: var(--text-secondary); font-size: var(--fs-sm); }

/* ──────────────────────────────────────────────────────────────────────────
   13. BUTTONS
   ────────────────────────────────────────────────────────────────────────── */
.btn, .btn-primary, .btn-ghost, .btn-google {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  min-block-size: var(--tap-min);
  padding-inline: var(--sp-6);
  border-radius: var(--r-sm);
  font-family: var(--font-sans);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background var(--dur-1) var(--ease-out), border-color var(--dur-1) var(--ease-out), transform var(--dur-2) var(--ease-spring);
}
.btn-primary { background: var(--accent); color: var(--text-on-accent); box-shadow: var(--shadow-accent); }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-2px); }
.btn-primary:active, .btn-ghost:active, .btn-google:active { transform: translateY(0) scale(.98); }
.btn-ghost { background: transparent; border-color: var(--border-interactive); color: var(--text-primary); }
.btn-ghost:hover { background: var(--surface-raised); border-color: var(--accent); }
.btn-google { background: var(--surface-raised); border-color: var(--border-interactive); color: var(--text-primary); text-transform: none; letter-spacing: 0; font-size: var(--fs-sm); }
.btn-google:hover { background: var(--surface-overlay); }

/* ──────────────────────────────────────────────────────────────────────────
   14. SEARCH / EMPTY STATES
   ────────────────────────────────────────────────────────────────────────── */
.search-page-header { padding-block: var(--sp-12) var(--sp-6); }
.search-page-bar { max-inline-size: 640px; }
.search-overlay { background: var(--scrim); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.search-overlay-inner svg { inset-inline-start: var(--sp-6); inset-inline-end: auto; color: var(--text-muted); }
.search-overlay-close { inset-inline-end: var(--sp-5); inset-inline-start: auto; inline-size: var(--tap-min); block-size: var(--tap-min); border-radius: var(--r-sm); background: var(--surface-raised); border: 1px solid var(--border); color: var(--text-secondary); }
.search-results { background: var(--surface-overlay); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-3); }
.search-empty { text-align: center; padding: var(--sp-24) var(--gutter); color: var(--text-secondary); overflow: hidden; }
.search-empty-icon { font-size: var(--fs-3xl); opacity: .6; margin-block-end: var(--sp-4); }

/* ──────────────────────────────────────────────────────────────────────────
   15. FOOTER — big display wordmark under a zellige band
   ────────────────────────────────────────────────────────────────────────── */
.footer-v2 {
  background: var(--surface-sunken);
  border-block-start: 1px solid var(--border);
  padding-block-start: var(--sp-16);
  overflow: hidden;
}
.footer-v2-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--sp-8);
  max-inline-size: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
  padding-block-end: var(--sp-10);
  position: relative; z-index: var(--z-raised);
}
@media (min-width: 640px) { .footer-v2-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); } .footer-v2-brand { grid-column: 1 / -1; } }
@media (min-width: 900px) { .footer-v2-inner { grid-template-columns: 2.4fr 1fr 1fr 1fr; } .footer-v2-brand { grid-column: auto; } }
.footer-v2-brand .brand-text { font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem); letter-spacing: var(--ls-tighter); }
.footer-v2-brand p { color: var(--text-muted); font-size: var(--fs-sm); line-height: var(--lh-normal); max-inline-size: 34ch; margin-block-start: var(--sp-3); }
.footer-v2-col h4 { color: var(--text-muted); margin-block-end: var(--sp-4); }
.footer-v2-col a {
  display: flex; align-items: center;
  min-block-size: 36px;
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  margin-block-end: 0;
  transition: color var(--dur-1) var(--ease-out), transform var(--dur-1) var(--ease-out);
}
.footer-v2-col a:hover { color: var(--accent-text); transform: translateX(3px); }
[dir="rtl"] .footer-v2-col a:hover { transform: translateX(-3px); }
.footer-v2-bottom {
  border-block-start: 1px solid var(--border);
  max-inline-size: var(--content-max);
  margin-inline: auto;
  padding: var(--sp-5) var(--gutter);
  font-size: var(--fs-3xs);
  letter-spacing: var(--ls-wide);
  color: var(--text-muted);
  position: relative; z-index: var(--z-raised);
}

/* ──────────────────────────────────────────────────────────────────────────
   16. PLAYER BAR — APPEARANCE + MOTION ONLY.
   No positioning, no z-index, no display, no ids touched: player.v2.js owns
   #player-bar geometry and its persistence across navigation.
   ────────────────────────────────────────────────────────────────────────── */
.player-bar {
  background: var(--surface-overlay);
  border-block-start: 2px solid var(--accent);
  box-shadow: 0 -10px 40px rgba(0,0,0,.36);
}
.player-thumb { border-radius: var(--r-sm); background: var(--surface-sunken); border: 1px solid var(--border); }
.player-podcast-title { font-size: var(--fs-3xs); color: var(--text-muted); letter-spacing: var(--ls-wide); text-transform: uppercase; }
.player-episode-title {
  font-family: var(--font-display);
  font-variation-settings: var(--font-display-settings);
  font-size: var(--fs-md); font-weight: var(--fw-bold); color: var(--text-primary);
  letter-spacing: var(--ls-tight);
}
.player-btn, .player-close {
  inline-size: var(--tap-min); block-size: var(--tap-min);
  border-radius: var(--r-sm);
  background: transparent; border: 0;
  color: var(--text-secondary);
  transition: background var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out), transform var(--dur-2) var(--ease-spring);
}
.player-btn:hover, .player-close:hover { background: var(--surface-raised); color: var(--text-primary); }
.player-btn:active { transform: scale(.9); }
.player-play { background: var(--accent); color: var(--text-on-accent); border-radius: 50%; }
.player-play:hover { background: var(--accent-hover); transform: scale(1.06); }
.player-progress-wrap { background: transparent; }
.player-progress { background: var(--border-strong); border-radius: var(--r-pill); }
.player-progress-fill { background: linear-gradient(90deg, var(--accent), var(--secondary)); border-radius: var(--r-pill); }
.player-progress-thumb { background: var(--secondary); box-shadow: var(--shadow-1); }
.player-time { font-size: var(--fs-3xs); color: var(--text-muted); font-variant-numeric: tabular-nums; }

/* A four-bar equaliser drawn on the player thumb whenever audio is playing.
   Pure CSS, transform-only, and it reads the class player.v2.js already
   toggles — no JS is added or changed. */
.player-bar.playing .player-thumb::after,
.player-bar.is-playing .player-thumb::after {
  content: '';
  position: absolute;
  inset-block-end: 4px; inset-inline-start: 4px;
  inline-size: 4px; block-size: 12px;
  background: var(--secondary);
  transform-origin: 50% 100%;
  animation: pm-eq .9s var(--ease-in-out) infinite;
  box-shadow: 6px 0 0 var(--secondary), 12px 0 0 var(--secondary);
}

/* ──────────────────────────────────────────────────────────────────────────
   17. MODAL — appearance only. `display` is owned by app.v2.js (.open).
   ────────────────────────────────────────────────────────────────────────── */
.modal-overlay { background: var(--scrim); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.modal-overlay.open .modal { animation: pm-fade var(--dur-3) var(--ease-spring) both; }
.modal {
  background: var(--surface-overlay);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-4);
  color: var(--text-primary);
}
.modal-body { padding: var(--sp-8); }
.modal-close { inline-size: var(--tap-min); block-size: var(--tap-min); border-radius: var(--r-sm); background: transparent; border: 0; color: var(--text-secondary); }
.modal-close:hover { background: var(--surface-raised); color: var(--text-primary); }
.modal-tabs { display: flex; gap: var(--sp-1); border-block-end: 1px solid var(--border); }
.modal-tab {
  flex: 1; min-block-size: var(--tap-min);
  background: transparent; border: 0; border-block-end: 2px solid transparent;
  color: var(--text-muted); font-family: var(--font-sans);
  font-size: var(--fs-2xs); font-weight: var(--fw-bold);
  letter-spacing: var(--ls-wide); text-transform: uppercase; cursor: pointer;
}
.modal-tab.active { color: var(--accent-text); border-block-end-color: var(--accent); }
.auth-divider { color: var(--text-muted); font-size: var(--fs-2xs); }
.auth-error { color: var(--danger); font-size: var(--fs-2xs); }

/* ──────────────────────────────────────────────────────────────────────────
   18. RADIO ROOM — colour only, geometry untouched.
   ────────────────────────────────────────────────────────────────────────── */
.rr-backdrop { background: var(--scrim); }
.rr-panel { background: var(--surface-overlay); border-inline-start: 1px solid var(--border); box-shadow: var(--shadow-4); }
.rr-live-badge { background: var(--danger-soft); color: var(--danger); font-size: var(--fs-3xs); font-weight: var(--fw-bold); letter-spacing: var(--ls-wide); border-radius: var(--r-xs); padding: 3px var(--sp-2); }
.rr-station-name, .rr-chat-title { color: var(--text-primary); font-weight: var(--fw-bold); font-family: var(--font-display); font-variation-settings: var(--font-display-settings); }
.rr-station-desc, .rr-chat-hint, .rr-msg-time, .rr-listeners { color: var(--text-muted); font-size: var(--fs-2xs); }
.rr-msg-name { color: var(--accent-text); font-size: var(--fs-2xs); font-weight: var(--fw-bold); }
.rr-msg-text { color: var(--text-secondary); font-size: var(--fs-sm); line-height: var(--lh-normal); }
.rr-input, .rr-input-msg, .rr-input-name {
  background: var(--bg-input); border: 1px solid var(--border-interactive);
  color: var(--text-primary); border-radius: var(--r-sm);
  font-family: var(--font-sans); font-size: var(--fs-sm); min-block-size: var(--tap-min);
}
.rr-send-btn, .rr-play-btn { background: var(--accent); color: var(--text-on-accent); border: 0; }
.rr-close { inline-size: var(--tap-min); block-size: var(--tap-min); border-radius: var(--r-sm); background: var(--surface-raised); border: 1px solid var(--border); color: var(--text-secondary); }

/* ──────────────────────────────────────────────────────────────────────────
   19. ADSENSE — never restyle the slot, only the chrome around it.
   Min-heights, z-index and the anchor offsets in ads.css stay authoritative.
   Nothing here changes a box metric, so CLS is unaffected.
   ────────────────────────────────────────────────────────────────────────── */
.ads-label {
  font-family: var(--font-sans);
  font-size: var(--fs-3xs);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-widest);
  color: var(--text-muted);
  opacity: 1;
  text-align: start;
  margin-block-end: var(--sp-2);
}
.ads-unit--infeed-grid, .ads-unit--infeed-list {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.ads-anchor { background: var(--surface-glass); border-block-start: 1px solid var(--border); }
.ads-anchor-close { background: var(--surface-overlay); border: 1px solid var(--border); color: var(--text-secondary); border-radius: var(--r-sm); }

/* House partner ads — ours, not AdSense. Realigned to the new palette. */
.partner-ad { border-radius: var(--r-md); }
.partner-ad--key { background: var(--accent-soft); border: 1px solid var(--border); }
.partner-ad--cle { background: var(--cool-soft); border: 1px solid var(--border); }
.partner-ad-badge { color: var(--text-muted); font-size: var(--fs-3xs); letter-spacing: var(--ls-widest); }
.partner-ad-name { color: var(--text-primary); font-size: var(--fs-sm); }
.partner-ad-desc { color: var(--text-secondary); font-size: var(--fs-2xs); }
.partner-ad-cta { color: var(--accent-text) !important; font-size: var(--fs-2xs); }  /* !override: inline <style> in layout.js hardcodes #8b5cf6 */
.partner-ad--cle .partner-ad-cta { color: var(--cool-text) !important; }             /* !override: inline <style> hardcodes #06b6d4 */
.submit-cta-banner {
  background: var(--surface-feature) !important;   /* !override: inline <style> gradient */
  border-color: var(--accent) !important;          /* !override: inline <style> */
  border-radius: var(--r-md);
}
.submit-cta-text h3 { font-family: var(--font-display); font-variation-settings: var(--font-display-settings); font-size: var(--fs-xl); }
.submit-cta-btn {
  background: var(--accent) !important;            /* !override: inline <style> */
  color: var(--text-on-accent) !important;         /* !override: inline <style> */
  border-radius: var(--r-sm);
}
.inline-partner-ad { background: var(--surface-raised); border-radius: var(--r-sm); font-size: var(--fs-2xs); }
.inline-ad-label { border-radius: var(--r-xs); }

/* ──────────────────────────────────────────────────────────────────────────
   20. ADMIN — same tokens, no editorial serif (it is a tool, not a magazine)
   ────────────────────────────────────────────────────────────────────────── */
.admin-shell, .admin-main { background: var(--surface); color: var(--text-primary); }
.admin-sidebar { background: var(--surface-raised); border-inline-end: 1px solid var(--border); }
.admin-card, .card { background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--r-md); }
.admin-shell h1, .admin-shell h2, .admin-shell h3 { font-family: var(--font-sans); font-weight: var(--fw-black); letter-spacing: var(--ls-tight); }
.form-group label, .form-grid label { color: var(--text-secondary); font-size: var(--fs-2xs); }

/* ──────────────────────────────────────────────────────────────────────────
   21. RTL — logical properties do the work; these are the leftovers.
   ────────────────────────────────────────────────────────────────────────── */
[dir="rtl"] .hero-search-v2 input,
[dir="rtl"] .search-page-bar input,
[dir="rtl"] .search-overlay-input { padding-inline: var(--sp-12) var(--sp-4); }
[dir="rtl"] .hero-search-v2 svg,
[dir="rtl"] .search-overlay-inner svg { inset-inline-start: var(--sp-4); inset-inline-end: auto; }
[dir="rtl"] .ec-duration { inset-inline-end: var(--sp-3); inset-inline-start: auto; }
[dir="rtl"] .episode-list-item,
[dir="rtl"] .episode-list-row,
[dir="rtl"] .section-header-v2,
[dir="rtl"] .footer-v2-bottom,
[dir="rtl"] .recent-podcast-item,
[dir="rtl"] .rr-msg-row { flex-direction: row; }
[dir="rtl"] .episode-list-comments { margin-inline-start: auto; margin-inline-end: 0; }
[dir="rtl"] .drawer-link { border-inline-start: 3px solid transparent; }
[dir="rtl"] .drawer-link.active { border-inline-start-color: var(--accent); }
[dir="rtl"] .hero-text-col,
[dir="rtl"] .pc-body,
[dir="rtl"] .ec-body,
[dir="rtl"] .radio-card-info { text-align: start; }
[dir="rtl"] .scroll-row, [dir="rtl"] .hero-cats-v2, [dir="rtl"] .hero-stats { direction: rtl; }
[dir="rtl"] .player-time,
[dir="rtl"] .ec-duration,
[dir="rtl"] .hero-stat-n,
[dir="rtl"] .pagination-info { direction: ltr; unicode-bidi: isolate; }

/* ──────────────────────────────────────────────────────────────────────────
   22. TOUCH TARGETS
   ────────────────────────────────────────────────────────────────────────── */
@media (pointer: coarse) {
  a:not(.podcast-card-v2):not(.episode-card-v2):not(.station-card):not(.cat-tile):not(.navbar-brand):not(.breadcrumb a),
  button:not(.lang-btn) { min-block-size: var(--tap-min); }
  /* Hover lifts are meaningless on touch and cost a repaint on tap. */
  .podcast-card-v2:hover, .episode-card-v2:hover, .station-card:hover,
  .cat-tile:hover, .cat-pill-v2:hover { transform: none; }
}

/* ──────────────────────────────────────────────────────────────────────────
   23. PRINT
   ────────────────────────────────────────────────────────────────────────── */
@media print {
  .site-header, #bottom-nav, .app-drawer, .player-bar, .footer-v2,
  .hero-search-v2, .search-overlay, .pm-progress { display: none !important; }
  body { background: #fff; color: #000; padding: 0; }
  .hero-v2::after, .hero-v2 .aurora, .footer-v2::before { display: none; }
}

/* ──────────────────────────────────────────────────────────────────────────
   24. CASCADE REPAIR — re-assert the semantic layer.
   main.css declares a legacy colour `:root` AFTER tokens.css, and
   design-v2.css declares `[data-theme="light"]` at the same specificity.
   Re-declaring here (last sheet, 0,2,0 for the theme selector) makes the
   token layer authoritative without touching either file.
   ────────────────────────────────────────────────────────────────────────── */



/* Specificity bumps: these components are painted by ID/gradient rules
   upstream, so a plain class selector never reaches them. */
.navbar-brand .brand-dot, .footer-v2-brand .brand-dot { color: var(--accent-text); }
.navbar-end .nav-submit-pill, .navbar-v2 .nav-submit-pill {
  background: var(--accent); background-image: none; color: var(--text-on-accent);
}
.navbar-end .nav-submit-pill:hover { background: var(--accent-hover); }
.lang-switcher .lang-btn--active, .lang-switcher .lang-btn.active { background: var(--accent); color: var(--text-on-accent); }
.user-avatar, .user-avatar-placeholder, .user-btn .avatar { background: var(--accent); color: var(--text-on-accent); }
.btn-primary, .submit-cta-btn, .rr-send-btn { background-image: none; }
.hero-visual-placeholder, .episode-card-v2 .ec-placeholder {
  background-image: var(--motif-lattice);
  background-size: var(--motif-size) var(--motif-size);
  background-color: var(--surface-sunken);
}

/* ──────────────────────────────────────────────────────────────────────────
   25. NAVBAR VISIBILITY — mobile.css hides these with `!important`, so this
   is one of the few places the design system must answer in kind.
   ────────────────────────────────────────────────────────────────────────── */
@media (min-width: 768px) {
  .navbar-v2 .navbar-center { display: flex !important; align-items: center; flex: 1; justify-content: center; gap: var(--sp-1); }
  .navbar-end .nav-submit-pill { display: inline-flex !important; }
  .navbar-v2 .lang-switcher, .navbar-end .lang-switcher { display: inline-flex !important; }
  .navbar-end .user-menu { display: block !important; }
  .navbar-end #theme-toggle { display: inline-flex !important; }
  .navbar-v2 .hamburger, .navbar-v2 .js-drawer-open { display: none !important; }
  #bottom-nav, .bottom-nav { display: none !important; }
}
@media (max-width: 767px) {
  .navbar-v2 .navbar-center,
  .navbar-end .nav-submit-pill,
  .navbar-end .lang-switcher, .navbar-v2 .lang-switcher,
  .navbar-end .user-menu,
  .navbar-end #theme-toggle { display: none !important; }
  .navbar-end #search-toggle, .navbar-end .search-toggle { display: inline-flex !important; }
}

/* ──────────────────────────────────────────────────────────────────────────
   26. FORM CONTROLS — element-level baseline (0,0,1 specificity).
   ────────────────────────────────────────────────────────────────────────── */
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="submit"]):not([type="button"]),
select, textarea {
  background: var(--bg-input);
  border: 1px solid var(--border-interactive);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  border-radius: var(--r-sm);
  min-block-size: var(--tap-min);
  padding: var(--sp-3);
  box-sizing: border-box;
}
textarea { min-block-size: 96px; line-height: var(--lh-normal); }
input::placeholder, textarea::placeholder { color: var(--text-muted); }
select option { background: var(--surface-overlay); color: var(--text-primary); }
input:focus, select:focus, textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); outline: none;
}
label { color: var(--text-secondary); font-size: var(--fs-2xs); font-weight: var(--fw-bold); letter-spacing: var(--ls-wide); }

/* ──────────────────────────────────────────────────────────────────────────
   27. LIGHT THEME — component overrides.
   design-v2.css ships ~70 hardcoded [data-theme="light"] rules (#0f0e1a,
   rgba(139,92,246,…), #eceaff …). Each is answered here in tokens, so light
   is a first-class build of the same system, not a partial re-skin.
   ────────────────────────────────────────────────────────────────────────── */
[data-theme="light"] .site-header,
[data-theme="light"] .site-header.scrolled { background: var(--surface-glass) !important; border-bottom: 1px solid var(--border) !important; }  /* !override: design-v2.css */
[data-theme="light"] .site-header.scrolled { box-shadow: var(--shadow-2) !important; }  /* !override: design-v2.css */
[data-theme="light"] .nav-link { color: var(--text-secondary); }
[data-theme="light"] .nav-link:hover { color: var(--text-primary); }
[data-theme="light"] .nav-link.active { color: var(--accent-text); }
[data-theme="light"] .navbar-brand, [data-theme="light"] .brand-text { color: var(--text-primary); }
[data-theme="light"] .btn-icon { background: transparent; border-color: transparent; color: var(--text-secondary); }
[data-theme="light"] .btn-icon:hover { background: var(--surface-sunken); color: var(--text-primary); border-color: var(--border); }
[data-theme="light"] .hamburger { background: var(--surface-sunken); border-color: var(--border); }
[data-theme="light"] .hamburger span { background: var(--text-secondary); }
[data-theme="light"] .hero-v2 { background: var(--surface-feature); }
[data-theme="light"] .hero-v2::before { opacity: 0; }
[data-theme="light"] .hero-h1 { color: var(--text-primary); }
[data-theme="light"] .hero-sub-v2 { color: var(--text-secondary); }
[data-theme="light"] .hero-stat-l { color: var(--text-muted); }
[data-theme="light"] .hero-stat-n { color: var(--accent-text); }
[data-theme="light"] #hero-search,
[data-theme="light"] .hero-search-v2 input,
[data-theme="light"] .search-overlay-input,
[data-theme="light"] .search-page-bar input { background: var(--surface-raised); border-color: var(--border-interactive); color: var(--text-primary); box-shadow: var(--shadow-1); }
[data-theme="light"] .hero-search-v2 input::placeholder,
[data-theme="light"] .search-overlay-input::placeholder { color: var(--text-muted); }
[data-theme="light"] .hero-search-v2 input:focus { border-color: var(--accent); background: var(--surface-raised); box-shadow: 0 0 0 4px var(--accent-soft); }
[data-theme="light"] .hero-search-v2 svg,
[data-theme="light"] .search-overlay-inner svg { color: var(--text-muted); }
[data-theme="light"] .cat-pill-v2 { background: transparent; border-color: var(--border-strong); color: var(--text-secondary); }
[data-theme="light"] .cat-pill-v2:hover { background: var(--accent); border-color: var(--accent); color: var(--text-on-accent); }
[data-theme="light"] .hero-visual-card { box-shadow: var(--shadow-4); border-color: var(--border-strong); }
[data-theme="light"] .section-title-v2 { color: var(--text-primary); }
[data-theme="light"] .section-link-v2 { color: var(--accent-text); border-color: var(--border-strong); }
[data-theme="light"] .section-link-v2:hover { color: var(--text-on-accent); }
[data-theme="light"] .podcast-card-v2 { background: var(--surface-raised); border-color: var(--border); }
[data-theme="light"] .podcast-card-v2:hover { box-shadow: var(--shadow-3); }
[data-theme="light"] .pc-title { color: var(--text-primary); }
[data-theme="light"] .pc-author { color: var(--text-muted); }
[data-theme="light"] .pc-count { color: var(--secondary-text); }
[data-theme="light"] .pc-placeholder,
[data-theme="light"] .ec-placeholder { background-color: var(--surface-sunken); background-image: var(--motif-lattice); background-size: var(--motif-size) var(--motif-size); }
[data-theme="light"] .episode-card-v2 { border-color: var(--border); background: var(--surface-sunken); }
/* The episode card art is always dark under the scrim, so its text stays white
   in BOTH themes — this pair is measured against the scrim, not the page. */
[data-theme="light"] .ec-title { color: #fff; }
[data-theme="light"] .ec-podcast { color: var(--pm-saffron-300); }
[data-theme="light"] .ec-duration { background: var(--secondary); color: var(--text-on-secondary); }
[data-theme="light"] .cat-tile { background: var(--surface-raised); border-color: var(--border); }
[data-theme="light"] .cat-tile:hover { border-color: var(--accent); background: var(--accent-soft); box-shadow: none; }
[data-theme="light"] .cat-tile-name { color: var(--text-secondary); }
[data-theme="light"] .episode-list-item,
[data-theme="light"] .episode-list-row { color: var(--text-primary); border-block-end-color: var(--border); }
[data-theme="light"] .episode-list-item:hover,
[data-theme="light"] .episode-list-row:hover { background: var(--surface-raised); }
[data-theme="light"] .episode-list-podcast,
[data-theme="light"] .episode-list-row-meta { color: var(--text-muted); }
[data-theme="light"] .episode-list-title,
[data-theme="light"] .episode-list-row-title { color: var(--text-primary); }
[data-theme="light"] .episode-rank { color: var(--border-strong); }
[data-theme="light"] .episode-list-item:hover .episode-rank { color: var(--accent-text); }
[data-theme="light"] .episode-list-item:nth-child(-n+3) .episode-rank { color: var(--secondary-text); }
[data-theme="light"] .episode-list-comments { color: var(--text-muted); }
[data-theme="light"] .sidebar-widget { background: transparent; border-color: var(--border); }
[data-theme="light"] .widget-title { color: var(--text-muted); }
[data-theme="light"] .recent-podcast-title { color: var(--text-primary); }
[data-theme="light"] .recent-podcast-count { color: var(--text-muted); }
[data-theme="light"] .search-overlay { background: var(--scrim); }
[data-theme="light"] .search-overlay-close { color: var(--text-secondary); background: var(--surface-raised); border-color: var(--border); }
[data-theme="light"] .footer-v2 { background: var(--surface-sunken); border-top-color: var(--border); }
[data-theme="light"] .footer-v2-brand p { color: var(--text-muted); }
[data-theme="light"] .footer-v2-col h4 { color: var(--text-muted); }
[data-theme="light"] .footer-v2-col a { color: var(--text-secondary); }
[data-theme="light"] .footer-v2-col a:hover { color: var(--accent-text); }
[data-theme="light"] .footer-v2-bottom { color: var(--text-muted); border-top-color: var(--border); }
[data-theme="light"] .player-bar { background: var(--surface-overlay); border-top: 2px solid var(--accent); box-shadow: 0 -10px 36px rgba(33,26,19,.12); }
[data-theme="light"] #bottom-nav, [data-theme="light"] .bottom-nav { background: var(--surface-glass); border-top-color: var(--border); }
[data-theme="light"] .bnav-item, [data-theme="light"] .bottom-nav-item { color: var(--text-muted); }
[data-theme="light"] .bnav-item.active, [data-theme="light"] .bottom-nav-item.active { color: var(--accent-text); }
[data-theme="light"] .ad-container { border-color: var(--border); background: var(--surface-raised); }
[data-theme="light"] .podcast-header, [data-theme="light"] .category-header { background: transparent; border-color: var(--border); }
[data-theme="light"] .filter-pill { background: var(--surface-raised); border-color: var(--border); color: var(--text-secondary); }
[data-theme="light"] .filter-pill:hover { background: var(--accent-soft); }
[data-theme="light"] .page-btn, [data-theme="light"] .pagination-btn { background: transparent; border-color: var(--border-strong); color: var(--text-secondary); }
[data-theme="light"] .lang-switcher { background: var(--surface-sunken); border-color: var(--border); }
[data-theme="light"] .lang-btn { color: var(--text-secondary); }
[data-theme="light"] .lang-btn:hover { color: var(--text-primary); background: var(--surface-raised); }
[data-theme="light"] .lang-btn--active, [data-theme="light"] .lang-btn.active { background: var(--accent); color: var(--text-on-accent); }
[data-theme="light"] .radio-card, [data-theme="light"] .radio-mini-card, [data-theme="light"] .station-card { background: var(--surface-raised); border-color: var(--border); }
[data-theme="light"] .radio-hero { background: var(--surface-feature); }
[data-theme="light"] .radio-hero-title { color: var(--text-primary); }
[data-theme="light"] .page-hero { background: var(--surface-feature); }
[data-theme="light"] .rr-panel { background: var(--surface-overlay); }
[data-theme="light"] .rr-station { background: var(--surface-sunken); }
[data-theme="light"] .app-drawer { background: var(--surface-raised); }
[data-theme="light"] .modal { background: var(--surface-overlay); }

/* ── Hauteurs de cartes égales (fix-header-cards.sh) ── */
/* Sans cela, un titre sur 2 lignes rend sa carte plus haute que ses voisines
   (mesuré : 334px contre 311px). On réserve exactement 2 lignes pour tous. */
.scroll-row { align-items: stretch; }

.podcast-card-v2 .pc-title,
.episode-card-v2 .ec-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-block-size: calc(2 * 1.3em);
}

/* ── Heros pleine largeur + RTL (fix-rtl-hero-search.sh) ── */
/* mobile.css bride .hero-v2 à max-width:1400px + margin:auto au-delà de
   1024px. On libère la contrainte pour que la bande de fond touche les
   deux bords, comme sur /radio. */
.hero-v2 {
  max-inline-size: none;
  margin-inline: 0;
}

/* design-v2.css donne un radius de 16px à .page-hero : on l'annule pour que
   la bande soit franche, comme .radio-hero. */
.page-hero,
.radio-hero {
  border-radius: 0;
}

/* Sur /podcasts, .main-content porte container-xl (padding-inline 48px).
   Marge négative pour que la bande ressorte jusqu'aux bords. */
.container-xl > .page-hero,
.container-xl > .radio-hero {
  margin-inline: calc(-1 * var(--gutter));
}

/* Sécurité RTL : la carte radio reste en colonne dans les deux sens. */
[dir="rtl"] .station-card { flex-direction: column; }

/* Discovery refinements: native search forms and keyboard access. */
.discovery-search { position: relative; margin-inline: 0; }
.discovery-search input { padding-inline-end: 4rem !important; }
.discovery-search-submit {
  position: absolute; inset-inline-end: 6px; inset-block-start: 6px;
  inline-size: 44px; block-size: 44px; border: 1px solid var(--border-strong);
  border-radius: var(--r-sm); background: var(--accent); color: var(--surface);
  font: 700 1.4rem var(--font-sans); cursor: pointer;
}
.discovery-search-submit:hover { filter: brightness(1.12); }
.discovery-search-submit:focus-visible { outline: 3px solid var(--text-primary); outline-offset: 3px; }
.skip-link {
  position: fixed; inset-block-start: 8px; inset-inline-start: 8px;
  z-index: 10000; padding: 12px 20px; background: var(--surface);
  color: var(--text-primary); border: 2px solid var(--accent);
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }
#main-content:focus { outline: none; }
.hero-visual-card img { object-fit: cover; }
@media (max-width: 767px) {
  .hero-stats {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0; overflow: visible;
  }
  .hero-stats .hero-stat { min-inline-size: 0; padding-inline: 8px; }
  .hero-stats .hero-stat-n { font-size: clamp(1.1rem, 5vw, 1.4rem); white-space: nowrap; }
  .hero-stats .hero-stat-l { font-size: .55rem; letter-spacing: .05em; }
  .navbar-v2 { gap: 8px; }
  .navbar-brand { flex-shrink: 0; }
  .navbar-brand .brand-text { font-size: 1.1rem; }
  .navbar-end { gap: 4px; flex-shrink: 0; }
  .navbar-end #login-btn {
    font-size: .7rem !important; padding-inline: .5rem !important;
    letter-spacing: 0; white-space: nowrap;
  }
}
@media (max-width: 359px) {
  .navbar-brand > svg { display: none; }
  .navbar-brand .brand-text { font-size: 1rem; }
}

/* Score.ma: a football magazine feature, with original pitch artwork. */
.score-promo {
  position: relative; isolation: isolate; display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  margin-block: 40px; overflow: hidden; border: 1px solid #345346;
  border-radius: 20px; background: #102b24; color: #f0f3e9;
}
.score-promo-copy { padding: clamp(24px, 4vw, 48px); position: relative; z-index: 1; }
.score-promo-kicker { display:flex; align-items:center; gap:10px; margin:0 0 18px; color:#b9f56a; font:600 .72rem/1.5 var(--font-sans); letter-spacing:.08em; text-transform:uppercase; }
.score-promo-kicker > span:first-child { display:grid;place-items:center; inline-size:24px; block-size:24px; border:1px solid #55714b; border-radius:50%; font-size:1rem; }
.score-promo-title { max-inline-size:12ch; margin:0 0 20px; color:#f0f3e9; font:800 clamp(2.2rem, 4.2vw, 4rem)/.98 var(--font-sans); letter-spacing:-.055em; text-wrap:balance; }
.score-promo-description { max-inline-size:42ch; margin:0 0 24px; color:#c3d2c7; font:.95rem/1.75 var(--font-sans); }
.score-promo-link { display:inline-flex; align-items:center; gap:22px; min-block-size:48px; padding:10px 12px 10px 20px; border-radius:100px; background:#b9f56a; color:#102b24; font:700 .9rem/1.3 var(--font-sans); text-decoration:none; }
.score-promo-link:hover { background:#d0ff98; color:#102b24; }
.score-promo-link:focus-visible { outline:3px solid #fff; outline-offset:5px; }
.score-promo-arrow { display:grid;place-items:center;inline-size:30px;block-size:30px;border-radius:50%;background:#102b24;color:#b9f56a;font-size:1.3rem; }
.score-promo-new-tab { position:absolute;inline-size:1px;block-size:1px;overflow:hidden;clip-path:inset(50%); }
.score-promo-visual { position:relative;display:flex;flex-direction:column;justify-content:center;align-items:center;min-inline-size:0; padding:28px 16px; background:radial-gradient(ellipse at center,#264c35 0%,#102b24 70%); border-inline-start:1px dashed #42614d; }
.score-promo-stamp { align-self:flex-end; padding-inline:18px; color:#f0f3e9; font:900 clamp(1.6rem,3vw,2.4rem)/1 var(--font-sans); letter-spacing:-.06em; transform:rotate(-5deg); }
.score-promo-stamp span { color:#b9f56a; }
.score-promo-visual svg { inline-size:100%;block-size:auto;max-block-size:280px; }
.score-promo-topics { display:flex;gap:10px; flex-wrap:wrap;justify-content:center;color:#bfd0bd; font:600 .6rem/1.4 var(--font-sans);letter-spacing:.1em; }
.score-promo-topics span { border:1px solid #42614d;border-radius:30px;padding:5px 9px; }
[dir="rtl"] .score-promo-title { letter-spacing:0;line-height:1.25;max-inline-size:15ch; }
@media(max-width:767px) {
  .score-promo { grid-template-columns:minmax(0,1fr); }
  .score-promo-copy { padding:26px 24px; }
  .score-promo-title { font-size:2.6rem;max-inline-size:12ch; }
  .score-promo-visual { border-inline-start:0;border-block-start:1px dashed #42614d;padding:18px 18px 22px; }
  .score-promo-visual svg { max-block-size:180px; }
  .score-promo-stamp { position:absolute;inset-inline-end:22px;inset-block-start:20px;font-size:1.7rem; }
}
