/* ============================================================================
   MARGINALIA — website theme
   Editorial, dark-first. Ink & paper, one warm accent (terracotta), one yellow
   highlight, the Inter + Libre Baskerville pairing, flat geometry, hairline rules.
   Extracted from marginalia-website.html; see design.md for the brief.

   Styling convention: semantic HTML + data-attributes for section identity,
   a handful of reusable helper classes (.kicker .btn .brand .rule .wrap .lead).
   No inline styles, no per-element class soup.
   ============================================================================ */

/* --- Tokens ---------------------------------------------------------------- */
:root {
  --sans:  'Inter', system-ui, sans-serif;         /* display + UI: heavy, tight, UPPERCASE */
  --serif: 'Libre Baskerville', Georgia, serif;    /* reading + quotes: warm, italic voice */

  /* Fixed accents — the same in every mode. One move per section. */
  --red:    #E76F51;   /* THE accent: an emphasis word, a mark, corner decor */
  --red-2:  #ff5a42;   /* accent hover */
  --yellow: #E6FF00;   /* highlight / loud surface only, never a paragraph fill */
  --dark:   #15191E;   /* the ink used on yellow/red surfaces */

  --gutter: clamp(20px, 5vw, 64px);   /* section side padding */
  --measure: 40rem;                    /* readable line length */
  --w-read:  44rem;    /* long-form reading column */
  --w-focus: 1000px;   /* focused blocks (CTAs) */
  --w-page:  1200px;   /* wide section / page rail */

  /* Spacing scale — ONE fluid ramp every margin/padding/gap pulls from, so vertical
     rhythm is systematic, never hand-picked. Steps ~1.5×, each clamp(min, vw, max). */
  --sp-3xs: clamp(.25rem, .5vw, .375rem);   /*  4 →  6 */
  --sp-2xs: clamp(.5rem,  1vw,  .625rem);   /*  8 → 10 */
  --sp-xs:  clamp(.75rem, 1.5vw, 1rem);     /* 12 → 16 */
  --sp-sm:  clamp(1rem,   2.2vw, 1.5rem);   /* 16 → 24 */
  --sp-md:  clamp(1.5rem, 3.2vw, 2.25rem);  /* 24 → 36 */
  --sp-lg:  clamp(2rem,   4.5vw, 3.25rem);  /* 32 → 52 */
  --sp-xl:  clamp(3rem,   7vw,   5rem);     /* 48 → 80 */
  --sp-2xl: clamp(2.75rem, 8vw, 6.5rem);   /* 56 →104 — the section-to-section rhythm */

  /* Type scale — labels fixed (UI chrome), everything editorial fluid. */
  --fs-label: .75rem;                       /* 12px kickers/labels/meta */
  --fs-sm:    .9rem;                         /* fine print */
  --fs-base:  1.05rem;                       /* body */
  --fs-read:  1.15rem;                       /* long-form reading */
  --fs-lead:  clamp(1.05rem, 1.7vw, 1.4rem); /* lead / intro copy */
  --fs-title: clamp(1.2rem, 2.2vw, 1.6rem); /* list/card item titles */
  --fs-h3:    clamp(1.2rem,  2vw,   1.5rem);
  --fs-h2:    clamp(1.4rem,  3vw,   2.2rem);
  --fs-h1:    clamp(2rem,    5.8vw, 3.8rem);  /* single-page title */
  --fs-display: clamp(2.6rem, 8vw, 6.5rem); /* page display titles */
  --fs-hero:  clamp(3.2rem,  14vw,  10.5rem); /* home display headline */

  /* Line-height — tighter as type gets bigger. */
  --lh-display: .92;   /* hero / page-hero display */
  --lh-1:       1.0;   /* single-page h1 */
  --lh-2:       1.12;  /* h2 / section heads */
  --lh-title:   1.25;  /* serif list/card titles */
  --lh-body:    1.6;   /* running text, leads */
  --fs-page-hero: clamp(2.8rem, 12vw, 7.5rem); /* section-landing titles (variable-length names) */

  /* Breakpoints (documented; media queries use these exact px):
     --bp-sm 640px (phone)  ·  --bp-md 900px (tablet). */

  /* Dark is the brand default. */
  --bg:#15191E; --surface:#1B222A; --ink:#FAFAF8; --body:#CBD1D5; --mute:#949CA3; --faint:#6E767D;
  --line:rgba(255,255,255,.14); --line2:rgba(255,255,255,.22); --line1:rgba(255,255,255,.10);
  --navbg:rgba(21,25,30,.82); --rule:#FAFAF8; --band-bg:#1B222A; --band-bd:#E6FF00;
  --on-accent:#15191E;                 /* text on the flipping band accent (acid → dark ink) */
}
/* Light mode: honoured when the reader/OS prefers it, or via [data-theme="light"]. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg:#FAFAF8; --surface:#FFFFFF; --ink:#15191E; --body:rgba(21,25,30,.74); --mute:#6E767D; --faint:#949CA3;
    --line:rgba(0,0,0,.14); --line2:rgba(0,0,0,.20); --line1:rgba(0,0,0,.08);
    --navbg:rgba(250,250,248,.85); --rule:#15191E; --band-bg:#FFFFFF; --band-bd:#E76F51;
    --on-accent:#FAFAF8;               /* text on the flipping band accent (red → paper) */
  }
}
[data-theme="light"] {
  --bg:#FAFAF8; --surface:#FFFFFF; --ink:#15191E; --body:rgba(21,25,30,.74); --mute:#6E767D; --faint:#949CA3;
  --line:rgba(0,0,0,.14); --line2:rgba(0,0,0,.20); --line1:rgba(0,0,0,.08);
  --navbg:rgba(250,250,248,.85); --rule:#15191E; --band-bg:#FFFFFF; --band-bd:#E76F51;
  --on-accent:#FAFAF8;
}

/* --- Base ------------------------------------------------------------------ */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--red); text-decoration: none; }
a:hover { color: var(--red-2); }
img, video, audio, figure { max-width: 100%; }
::selection { background: var(--yellow); color: var(--dark); }
input::placeholder { color: var(--faint); }
em, i, .it { font-style: italic; }
.red { color: var(--red); }
.hl { background: var(--yellow); color: var(--dark); padding: 0 .12em; box-decoration-break: clone; }

/* The centred layout rail. Sections set their own vertical padding. */
.wrap { max-width: var(--w-page); margin-inline: auto; padding-inline: var(--gutter); }
.wrap.narrow { max-width: var(--w-focus); }
.wrap.reading { max-width: var(--measure); }
.rule { height: 1px; background: var(--line2); border: 0; margin: 0; }

/* --- Kicker (eyebrow) ------------------------------------------------------ */
/* Small uppercase Inter label. .mark = red square lead; .dot = round lead. */
.kicker {
  font-family: var(--sans); font-weight: 700; font-size: var(--fs-label);
  letter-spacing: .18em; text-transform: uppercase; color: var(--mute);
  display: inline-flex; align-items: center; gap: 10px;
}
.kicker.mark::before { content: ""; width: 7px; height: 7px; background: var(--red); flex: 0 0 auto; }
.kicker.dot::before  { content: ""; width: 10px; height: 10px; border-radius: 50%; background: currentColor; flex: 0 0 auto; }

/* --- Buttons --------------------------------------------------------------- */
.btn {
  display: inline-block; cursor: pointer; white-space: nowrap;
  font-family: var(--sans); font-weight: 800; font-size: var(--fs-label);
  letter-spacing: .1em; text-transform: uppercase;
  padding: 10px 18px; border: 0; border-radius: 0;
  background: var(--yellow); color: var(--dark);
}
.btn:hover { color: var(--dark); filter: brightness(1.06); }

/* --- Header / nav ---------------------------------------------------------- */
[data-nav] {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 16px var(--gutter);
  background: var(--navbg); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex; align-items: center; gap: 11px;
  font-family: var(--sans); font-weight: 900; font-style: italic;
  letter-spacing: -.03em; font-size: 18px; text-transform: uppercase; color: var(--ink);
}
.brand img { display: block; border-radius: 50%; flex: 0 0 auto; }
[data-nav] nav { display: flex; align-items: center; gap: var(--sp-md); }
[data-nav] nav a {
  font-family: var(--sans); font-weight: 700; font-size: 12px;
  letter-spacing: .14em; text-transform: uppercase; color: var(--mute);
}
[data-nav] nav a:hover { color: var(--ink); }
[data-nav] nav a.btn { color: var(--dark); }

/* --- Hero (landing variants) ----------------------------------------------- */
/* Two landing variants, chosen server-side from settings.theme (home.hero) and
   rendered one at a time: 1 = left-aligned · 2 = centered. Both work in either
   light or dark theme — the theme is an independent axis (footer sun/moon toggle). */
[data-hero] { position: relative; }
[data-hero] h1 { margin: 0; font-family: var(--sans); font-weight: 900; text-transform: uppercase; overflow-wrap: break-word; }
.lead {
  margin: 0; max-width: var(--measure);
  font-size: var(--fs-lead); line-height: var(--lh-body); color: var(--body);
}

/* Variant 1 — left-aligned. Owns the section rhythm on top; the block below owns the
   gap under it (no bottom padding), so hero→next is exactly ONE rhythm step. */
.hero-a { padding: var(--sp-2xl) var(--gutter) 0; }
.hero-a .kicker { margin-bottom: var(--sp-lg); }
.hero-a h1 { letter-spacing: -.045em; line-height: var(--lh-display); font-size: var(--fs-hero); }
.hero-a .lead { margin-top: var(--sp-md); }   /* headline + lead are one unit */

/* Variant 2 — centered, big, last word highlighted. */
.hero-b {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; min-height: 74vh;
  padding: var(--sp-2xl) var(--gutter) var(--sp-md);
}
.hero-b .kicker { margin-bottom: var(--sp-lg); }
.hero-b h1 { letter-spacing: -.05em; line-height: var(--lh-display); font-size: var(--fs-hero); }
.hero-b h1 .hl { display: inline-block; line-height: .9; padding: .06em .14em .02em; margin-top: .06em; }
.hero-b .lead { margin-top: var(--sp-sm); max-width: 34rem; }
.hero-b .scorri {
  margin-top: var(--sp-lg); font-family: var(--sans); font-weight: 800;
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--mute);
}


/* --- Hero entrance: the title lifts up a few px (all at once); everything else just
   fades in. Off entirely for reduced-motion. --- */
@media (prefers-reduced-motion: no-preference) {
  [data-hero] h1     { opacity: 0; animation: hero-up .75s cubic-bezier(.2,.75,.2,1) both; animation-delay: .05s; }
  [data-hero] .kicker { opacity: 0; animation: hero-in .8s ease both; animation-delay: .3s; }
  [data-hero] .lead   { opacity: 0; animation: hero-in .8s ease both; animation-delay: .42s; }
  [data-hero] .scorri { opacity: 0; animation: hero-in .8s ease both; animation-delay: .55s; }
  [data-hero] + [data-cta="band"] { opacity: 0; animation: hero-in .8s ease both; animation-delay: .55s; }
  @keyframes hero-up { from { opacity: 0; transform: translateY(44px); } to { opacity: 1; transform: none; } }
  @keyframes hero-in { from { opacity: 0; } to { opacity: 1; } }
}

/* Footer light/dark toggle — a sun/moon icon link next to RSS. Shows the sun on
   dark (click → light) and the moon on light (click → dark). Default (auto, no
   [data-theme]) follows the OS via prefers-color-scheme. */
/* Colour is inherited from .social a (--mute → --ink on hover), so the icon
   matches the RSS/Instagram links in the row — no bespoke colour. */
.theme-toggle { display: inline-flex; align-items: center; }
.theme-toggle svg { display: block; }
.theme-toggle .moon { display: none; }
.theme-toggle .sun { display: block; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme-toggle .sun { display: none; }
  :root:not([data-theme="dark"]) .theme-toggle .moon { display: block; }
}
[data-theme="light"] .theme-toggle .sun { display: none; }
[data-theme="light"] .theme-toggle .moon { display: block; }
[data-theme="dark"] .theme-toggle .sun { display: block; }
[data-theme="dark"] .theme-toggle .moon { display: none; }

/* --- Section head (h2 + optional "see all") -------------------------------- */
[data-head] {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  border-bottom: 2px solid var(--rule); padding-bottom: var(--sp-xs); margin-bottom: var(--sp-md);
}
[data-head] h2 {
  margin: 0; font-family: var(--sans); font-weight: 900;
  letter-spacing: -.03em; text-transform: uppercase; font-size: var(--fs-h2); line-height: var(--lh-2);
}
[data-head] a {
  font-family: var(--sans); font-weight: 700; font-size: 12px;
  letter-spacing: .12em; text-transform: uppercase; color: var(--mute); white-space: nowrap;
}
[data-head] a:hover { color: var(--ink); }

/* --- Rows (podcast episodes / recent feed) --------------------------------- */
[data-rows] { border-top: 1px solid var(--line); }
[data-rows] > * { border-bottom: 1px solid var(--line); }
[data-row] {
  display: flex; align-items: center; gap: var(--sp-md);
  padding: var(--sp-sm) 0; color: var(--ink);
}
[data-row] .num {
  font-family: var(--sans); font-weight: 900; letter-spacing: -.04em;
  font-size: var(--fs-h2); color: var(--red); min-width: 2.4ch;
}
[data-row] .body { flex: 1; min-width: 0; }
[data-row] .title {
  display: block; font-family: var(--serif); font-weight: 700;
  font-size: var(--fs-title); color: var(--ink); line-height: var(--lh-title);
}
[data-row] .meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: var(--sp-2xs);
  font-family: var(--sans); font-weight: 600;
  font-size: var(--fs-label); letter-spacing: .06em; text-transform: uppercase; color: var(--faint);
}
[data-row] .action {
  font-family: var(--sans); font-weight: 800; font-size: var(--fs-label);
  letter-spacing: .1em; text-transform: uppercase; color: var(--mute); white-space: nowrap;
}
[data-row]:hover .title { color: var(--red); }

/* --- Cards (archive / newsletter issues) ----------------------------------- */
[data-cards] {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line);
}
[data-card] {
  display: flex; flex-direction: column; min-height: 270px;
  background: var(--bg); padding: var(--sp-md); color: var(--ink);
}
[data-card] .kicker { color: var(--red); letter-spacing: .14em; font-size: 11px; margin-bottom: auto; }
[data-card] h3 {
  margin: var(--sp-md) 0 var(--sp-xs); font-family: var(--serif); font-weight: 700;
  font-size: var(--fs-title); line-height: var(--lh-title);
}
[data-card] p { margin: 0 0 var(--sp-sm); color: var(--mute); font-size: .98rem; line-height: 1.5; }
[data-card] .more {
  font-family: var(--sans); font-weight: 600; font-size: 11px;
  letter-spacing: .1em; text-transform: uppercase; color: var(--faint);
}
[data-card]:hover h3 { color: var(--red); }
[data-card]:hover .more { color: var(--red); }
/* Tablet/mobile: drop the desktop equal-height stretch so cards hug their content
   (no tall empty gap between the kicker and the title). */
@media (max-width: 900px) {
  [data-card] { min-height: 0; }
  [data-card] .kicker { margin-bottom: 0; }
  [data-card] h3 { margin-top: var(--sp-xs); }
}

/* --- Quote (citation on a red surface) ------------------------------------- */
[data-quote] { background: var(--red); color: #fff; }
[data-quote] .wrap { padding-block: var(--sp-2xl); }
[data-quote] .kicker { color: #fff; margin-bottom: var(--sp-lg); letter-spacing: .24em; }
[data-quote] .lead { color: #fff; max-width: none; margin: 0 0 var(--sp-sm); font-family: var(--serif); }
[data-quote] blockquote {
  margin: 0; font-family: var(--serif);
  font-size: var(--fs-h1); line-height: 1.18;
}

/* --- Subscribe form (double opt-in: email -> code) ------------------------- */
/* Base look = the "band" surface. CTA wrappers below re-skin input + button. */
form[data-subscribe] { margin: 0; width: 100%; }
form[data-subscribe] [data-row] {
  display: flex; gap: var(--sp-2xs); flex-wrap: wrap; padding: 0; border: 0;
}
form[data-subscribe] [data-sub-label] {
  display: block; margin-bottom: var(--sp-2xs);
  font-family: var(--sans); font-weight: 800; font-size: 12px;
  letter-spacing: .12em; text-transform: uppercase; color: var(--band-bd);
}
form[data-subscribe] input {
  flex: 1 1 0; min-width: 180px; padding: 13px 16px;
  font-family: var(--serif); font-size: 1rem; border-radius: 0; outline: none;
  background: transparent; border: 1.5px solid var(--band-bd); color: var(--ink);
}
form[data-subscribe] [data-code] { flex: 0 1 10rem; text-align: center; letter-spacing: .3em; }
/* The subscribe button follows the flipping accent: acid on dark, red on light. */
form[data-subscribe] button { padding: 13px 24px; background: var(--band-bd); color: var(--on-accent); }
form[data-subscribe] button:disabled { opacity: .5; cursor: default; }
/* Mobile: stack the subscribe field + full-width button. */
@media (max-width: 640px) {
  form[data-subscribe] input { flex-basis: 100%; min-width: 0; }
  form[data-subscribe] button { flex: 1 1 100%; }
}
form[data-subscribe] [data-msg] {
  margin: var(--sp-xs) 0 0; min-height: 1.2em; font-family: var(--sans);
  font-size: 12px; letter-spacing: .04em; color: var(--mute);
}
form[data-subscribe] [data-msg][data-state="ok"]  { color: var(--red); font-weight: 700; }
form[data-subscribe] [data-msg][data-state="err"] { color: var(--red); }

/* --- CTA: band (bordered newsletter promo, mid-page) ----------------------- */
[data-cta="band"] { padding: var(--sp-lg) var(--gutter); }
[data-cta="band"] .wrap {
  max-width: var(--w-focus); padding: var(--sp-lg);
  background: var(--band-bg); border: 3px solid var(--band-bd);
  display: flex; flex-direction: column; align-items: flex-start; gap: var(--sp-sm);
}
[data-cta="band"] .kicker { color: var(--band-bd); letter-spacing: .16em; margin-bottom: var(--sp-xs); }
[data-cta="band"] p { margin: 0; max-width: var(--measure); font-size: var(--fs-lead); line-height: 1.4; color: var(--ink); }

/* --- CTA: end (full-bleed yellow closer) ----------------------------------- */
[data-cta="end"] { background: var(--yellow); color: var(--dark); }
[data-cta="end"] .wrap { max-width: var(--w-focus); padding-block: var(--sp-2xl); text-align: center; }
[data-cta="end"] .kicker { color: var(--dark); letter-spacing: .2em; margin-bottom: var(--sp-sm); }
[data-cta="end"] h2 {
  margin: 0 auto var(--sp-md); max-width: 16ch;
  font-family: var(--sans); font-weight: 900; letter-spacing: -.04em;
  line-height: var(--lh-display); text-transform: uppercase; font-size: var(--fs-display);
  overflow-wrap: break-word;
}
[data-cta="end"] form[data-subscribe] { max-width: 540px; margin-inline: auto; }
[data-cta="end"] form[data-subscribe] input {
  background: rgba(0,0,0,.06); border: 1px solid rgba(0,0,0,.25); color: var(--dark);
}
[data-cta="end"] form[data-subscribe] button { background: var(--dark); color: var(--yellow); }
[data-cta="end"] .fine {
  margin: var(--sp-sm) 0 0; font-family: var(--sans); font-size: .9rem;
  letter-spacing: .02em; color: var(--dark); opacity: .6;
}

/* --- Single page (article / episode / issue) — reading column -------------- */
article { max-width: var(--w-read); margin-inline: auto; padding: var(--sp-xl) var(--gutter) 0; }
.backlink {
  display: inline-block; margin-bottom: var(--sp-lg);
  font-family: var(--sans); font-weight: 700; font-size: 12px;
  letter-spacing: .1em; text-transform: uppercase; color: var(--mute);
}
.backlink:hover { color: var(--ink); }
article > header { margin-bottom: var(--sp-md); }
article > header .kicker {
  color: var(--red); letter-spacing: .16em; margin-bottom: var(--sp-sm);
}
article h1 {
  margin: 0 0 var(--sp-sm); font-family: var(--sans); font-weight: 900;
  letter-spacing: -.035em; line-height: var(--lh-1); text-transform: uppercase;
  font-size: var(--fs-h1); overflow-wrap: break-word;
}
article .submeta { margin: 0; font-size: var(--fs-read); color: var(--mute); }
article time { color: var(--mute); font-size: var(--fs-sm); }
article audio { display: block; width: 100%; margin: var(--sp-md) 0; }
.notes-label {
  margin: var(--sp-md) 0 var(--sp-sm); font-family: var(--sans); font-weight: 900;
  font-size: var(--fs-label); letter-spacing: .16em; text-transform: uppercase; color: var(--mute);
}
.standfirst { margin: 0 0 var(--sp-md); font-size: 1.25rem; line-height: 1.7; color: var(--ink); font-style: italic; }
article > .rule { margin: 0 0 var(--sp-md); }
.prose { color: var(--body); font-size: var(--fs-read); line-height: 1.75; overflow-wrap: break-word; }
.prose h2 { font-family: var(--sans); font-weight: 800; text-transform: uppercase; letter-spacing: -.02em;
  font-size: 1.5rem; line-height: var(--lh-2); color: var(--ink); margin: var(--sp-lg) 0 var(--sp-2xs); }
.prose h3 { font-family: var(--sans); font-weight: 700; font-size: 1.2rem; line-height: var(--lh-title); color: var(--ink); margin: var(--sp-md) 0 var(--sp-3xs); }
.prose p { margin: 0 0 var(--sp-sm); }
.prose a { text-decoration: underline; text-underline-offset: 2px; }
.prose strong { color: var(--ink); }
.prose blockquote {
  margin: var(--sp-md) 0; padding-left: 1.1rem; border-left: 3px solid var(--red);
  font-size: 1.25rem; line-height: 1.4; color: var(--ink);
}
.prose img, .prose figure { margin: var(--sp-md) 0; }
.prose figcaption { color: var(--mute); font-size: var(--fs-sm); margin-top: var(--sp-2xs); }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin: var(--sp-3xs) 0; }
.prose code { font-family: ui-monospace, monospace; font-size: .9em; background: var(--surface); padding: .1em .35em; }

/* --- Audio player --------------------------------------------------------- */
.player {
  display: flex; align-items: center; gap: 16px; padding: 18px 20px;
  border: 1px solid var(--line2); border-radius: 4px; background: var(--surface);
  margin: var(--sp-md) 0 var(--sp-lg);
}
.player audio { display: none; }
/* play/pause — accent square */
.player .pp {
  flex: none; width: 46px; height: 46px; border: 0; border-radius: 3px; cursor: pointer;
  background: var(--red); display: flex; align-items: center; justify-content: center; padding: 0;
}
/* skip / download — quiet icon buttons */
.player .sk {
  flex: none; width: auto; height: 36px; border: 0; background: transparent; cursor: pointer;
  color: var(--mute); display: flex; align-items: center; justify-content: center; padding: 0;
}
.player .sk:hover { color: var(--ink); }
/* seek: 18px hit area, a 3px track + fill, NO knob. Click/drag to seek. */
.player .bar { flex: 1 1 auto; height: 18px; position: relative; display: flex; align-items: center; cursor: pointer; touch-action: none; }
.player .bar .track { position: absolute; left: 0; right: 0; height: 3px; border-radius: 2px; background: var(--line2); }
.player .bar .fill  { position: absolute; left: 0; height: 3px; width: 0; border-radius: 2px; background: var(--ink); }
.player .time { flex: none; font-family: ui-monospace, "IBM Plex Mono", monospace; font-size: 13px; letter-spacing: .02em; color: var(--mute); white-space: nowrap; }
/* playback speed toggle */
.player .speed {
  flex: none; min-width: 46px; height: 30px; padding: 0 8px; cursor: pointer;
  border: 1px solid var(--line2); border-radius: 3px; background: transparent;
  color: var(--mute); font-family: ui-monospace, "IBM Plex Mono", monospace; font-size: 12px; font-weight: 500;
}
.player .speed:hover { color: var(--ink); border-color: var(--body); }

/* Mobile: controls on top, seek bar full-width on its own row below;
   drop the ±10s skip buttons to save room. */
@media (max-width: 640px) {
  .player { flex-wrap: wrap; gap: 14px 12px; justify-content: space-between; }
  .player .bar { order: 1; flex-basis: 100%; }
  .player [data-back], .player [data-fwd] { display: none; }
}

/* --- Chi siamo (about) ----------------------------------------------------- */
[data-abouthead] .wrap { padding-block: var(--sp-2xl) 0; }
[data-abouthead] .kicker { margin-bottom: var(--sp-sm); }
[data-abouthead] h1 {
  margin: 0; max-width: 16ch; font-family: var(--sans); font-weight: 900;
  letter-spacing: -.045em; line-height: var(--lh-display); text-transform: uppercase; font-size: var(--fs-page-hero);
  overflow-wrap: break-word;
}
[data-abouthead] .lead { margin-top: var(--sp-lg); max-width: var(--w-read); font-size: var(--fs-lead); line-height: var(--lh-body); }
article.about { max-width: var(--w-page); margin-inline: auto; padding: var(--sp-lg) var(--gutter) var(--sp-xl); }
article.about .prose { max-width: var(--w-read); }
article.about > .rule { margin: 0 0 var(--sp-lg); max-width: var(--w-read); }
article.about figure { margin: var(--sp-lg) 0; }
article.about blockquote {
  margin: 0; padding: 0; border: 0; font-family: var(--serif);
  font-size: var(--fs-h2); line-height: 1.3; color: var(--ink);
}
.do { padding-block: var(--sp-lg) var(--sp-2xl); }
.do-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--sp-lg); }
.do-title { font-family: var(--sans); font-weight: 900; font-size: var(--fs-title); line-height: var(--lh-2); letter-spacing: -.02em; text-transform: uppercase; margin-bottom: var(--sp-2xs); }
.do-grid p { margin: 0 0 var(--sp-xs); color: var(--body); line-height: 1.6; }
.do-grid a { font-family: var(--sans); font-weight: 700; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--red); }

/* --- Section pages header (Podcast / Newsletter index) --------------------- */
/* kicker (red) + big Inter title + serif lead, then a page-specific extra
   (podcast: platform badges · newsletter: an inline subscribe form). */
[data-pagehead] .wrap { padding-block: var(--sp-2xl) 0; }
[data-pagehead] .kicker { color: var(--red); letter-spacing: .2em; margin-bottom: var(--sp-sm); }
[data-pagehead] h1 {
  margin: 0 0 var(--sp-sm); font-family: var(--sans); font-weight: 900;
  letter-spacing: -.04em; line-height: var(--lh-display); text-transform: uppercase; font-size: var(--fs-page-hero);
  overflow-wrap: break-word;
}
[data-pagehead] h1 .hl { padding: 0 .1em; }
[data-pagehead] .lead { max-width: var(--measure); font-size: var(--fs-read); }
[data-pagehead] form[data-subscribe] { margin-top: var(--sp-md); }

/* Podcast platform badges (fixed-colour chips). */
.badges { display: flex; gap: 14px; margin-top: var(--sp-md); flex-wrap: wrap; }
.badge {
  font-family: var(--sans); font-weight: 800; font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; padding: 9px 15px; color: #fff;
}
.badge.sp  { background: var(--yellow); color: var(--dark); }
.badge.ap  { background: var(--red); }
.badge.rss { background: #2A9D8F; }
.badge:hover { color: #fff; filter: brightness(1.05); }
.badge.sp:hover { color: var(--dark); }

/* Topic chips: the "#word" hashtags pulled from a title, shown under it. Outlined in the
   flipping band accent (acid on dark, red on light). */
.topics { display: flex; gap: 8px; margin-top: var(--sp-sm); flex-wrap: wrap; }
.topic {
  font-family: var(--sans); font-weight: 700; font-size: 12px; letter-spacing: .04em;
  line-height: 1.25; padding: 4px 11px;
  border: 1.5px solid var(--band-bd); color: var(--band-bd);
}
/* Compact inline chips inside list metas (podcast rows, issue rows, cards). */
.topics.inline { display: inline-flex; gap: 6px; margin-left: 8px; vertical-align: baseline; flex-wrap: wrap; }
.topics.inline .topic { font-size: 10px; padding: 1px 7px; border-width: 1px; }
[data-row] .meta .topics.inline { margin-left: 0; }
[data-issue] .issuemeta { display: inline-flex; align-items: baseline; gap: 12px; flex: 0 0 auto; }
[data-issue] .issuemeta .topics.inline { margin-left: 0; }

/* --- Section spacing wrappers ---------------------------------------------- */
[data-section] { padding-block: var(--sp-2xl); }
[data-section].on-surface { background: var(--surface); border-top: 1px solid var(--line); }
[data-section].tight { padding-block: var(--sp-lg) var(--sp-2xl); }

/* Small uppercase section label (e.g. "Numeri recenti"), under a 2px rule. */
.label-head {
  font-family: var(--sans); font-weight: 900; font-size: 12px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--mute);
  border-bottom: 2px solid var(--rule); padding-bottom: var(--sp-xs); margin-bottom: var(--sp-2xs);
}

/* Newsletter issue rows: N.xx · title + teaser · date (right). */
[data-issue] {
  display: flex; align-items: baseline; gap: var(--sp-sm);
  padding: var(--sp-sm) 0; border-bottom: 1px solid var(--line); color: var(--ink);
}
[data-issue] .n { font-family: var(--sans); font-weight: 900; font-size: var(--fs-read); color: var(--red); letter-spacing: .02em; min-width: 3ch; }
[data-issue] .body { flex: 1; min-width: 0; }
[data-issue] .title { display: block; font-family: var(--serif); font-weight: 700; font-size: var(--fs-title); color: var(--ink); line-height: var(--lh-title); }
[data-issue] .teaser { display: block; margin-top: var(--sp-2xs); color: var(--mute); font-size: .98rem; line-height: 1.5; }
[data-issue] time { color: var(--faint); font-family: var(--sans); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
[data-issue]:hover .title { color: var(--red); }

/* --- Podcast seasons (native <details name>, exclusive accordion, no JS) ---- */
[data-seasons] { border-top: 2px solid var(--rule); }
[data-seasons] details { border-bottom: 1px solid var(--line); }
[data-seasons] summary {
  cursor: pointer; list-style: none; display: flex; align-items: center; gap: 16px;
  padding: var(--sp-sm) 0;
}
[data-seasons] summary::-webkit-details-marker { display: none; }
[data-seasons] summary .season {
  flex: 1; font-family: var(--sans); font-weight: 900; letter-spacing: -.01em;
  text-transform: uppercase; font-size: var(--fs-title); line-height: var(--lh-2); color: var(--ink);
}
[data-seasons] summary small { font-family: var(--sans); font-weight: 600; font-size: var(--fs-label); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
[data-seasons] summary::after { content: "+"; color: var(--red); font-weight: 900; font-size: 1.5rem; line-height: 1; width: 1.2ch; text-align: center; }
[data-seasons] details[open] summary::after { content: "–"; }

/* --- Footer ---------------------------------------------------------------- */
[data-foot] { border-top: 1px solid var(--line); background: var(--bg); }
[data-foot] .cols {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--sp-xl); padding-block: var(--sp-xl);
}
[data-foot] .brand { font-size: 26px; margin-bottom: var(--sp-sm); }
[data-foot] .about { margin: 0 0 var(--sp-md); max-width: 32rem; font-size: 1.05rem; line-height: 1.6; color: var(--mute); }
[data-foot] .donate { margin-left: 8px; vertical-align: baseline; }
[data-foot] .social { display: flex; gap: 22px; font-family: var(--sans); font-weight: 700; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
[data-foot] .social a { color: var(--mute); }
[data-foot] .social a:hover { color: var(--ink); }
[data-foot] .links { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
[data-foot] .links h2 { margin: 0 0 var(--sp-sm); font-family: var(--sans); font-weight: 800; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); }
[data-foot] .links ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-xs); }
[data-foot] .links a { font-family: var(--serif); font-size: 1.05rem; color: var(--body); }
[data-foot] .links a:hover { color: var(--red); }
[data-foot] .legal { border-top: 1px solid var(--line1); }
[data-foot] .legal .wrap {
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
  padding-block: var(--sp-sm); font-family: var(--sans); font-weight: 600; font-size: 11px;
  letter-spacing: .1em; text-transform: uppercase; color: var(--faint);
}

/* --- Small screens --------------------------------------------------------- */
@media (max-width: 640px) {
  [data-nav] nav a:not(.btn) { display: none; }   /* keep logo + Iscriviti only */
  [data-row] .action { display: none; }
  [data-foot] .links { grid-template-columns: 1fr; }
}
