/*
Theme Name: Catastrophe Atlas
Theme URI: https://thecatastropheatlas.com/
Author: The Catastrophe Atlas
Description: Standalone theme for The Catastrophe Atlas — long-form articles to go with the documentary films. Dark editorial design: near-black backgrounds, burnt-orange signal colour, IBM Plex Serif/Sans/Mono. Left-aligned throughout, one 1180px container for header, content and footer.
Version: 1.0.8
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: catastrophe-atlas
Tags: dark, editorial, serif, documentary, blog
*/

/* ============================================================
   1. Design tokens (from the approved prototype)
   ============================================================ */
:root{
  --bg:#0a0c0e;
  --bg-2:#0f1216;
  --panel:#14181e;
  --panel-2:#191e25;
  --line:#262c35;
  --line-soft:#1c2129;
  --ink:#ece9e1;
  --ink-2:#c9cdd2;
  --muted:#9aa1a9;
  --faint:#6d747d;
  --signal:#d96a4b;
  --signal-dim:#8a4430;
  --gold:#d9b45b;
  --paper-serif:"IBM Plex Serif", Georgia, serif;
  --sans:"IBM Plex Sans", -apple-system, "Segoe UI", sans-serif;
  --mono:"IBM Plex Mono", ui-monospace, monospace;
  --max:1180px;
  --read:720px;
}

/* ============================================================
   2. Base — left-aligned, dark, natively (no light defaults
   to override later: every form control is dark here)
   ============================================================ */
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font-family:var(--sans);
  -webkit-font-smoothing:antialiased;
  line-height:1.55;
  text-align:left;
}
img{display:block;max-width:100%;height:auto}
a{color:inherit}
a:hover{color:#fff}
button{font-family:inherit;cursor:pointer;min-height:44px}
::selection{background:var(--signal);color:#fff}
:focus-visible{outline:2px solid var(--signal);outline-offset:2px}
.screen-reader-text{
  border:0;clip:rect(1px,1px,1px,1px);clip-path:inset(50%);
  height:1px;margin:-1px;overflow:hidden;padding:0;
  position:absolute;width:1px;word-wrap:normal!important;
}

/* One container, one left edge — header, content, footer,
   MORE POSTS and archives all share this. */
.wrap{max-width:var(--max);margin:0 auto;padding:0 20px}
@media(max-width:760px){.wrap{padding:0 16px}}

/* Neutralise WordPress core's constrained-layout centring.
   Core (and block themes) centre content in a ~650px column;
   this theme lays everything out itself, left-aligned. */
.is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){
  max-width:none!important;margin-left:0!important;margin-right:0!important;
}
.is-layout-constrained > .alignwide{max-width:none!important;margin-left:0!important;margin-right:0!important}
.entry-content{margin:0}

/* ============================================================
   3. Header — 64px band, logo flush with the content edge,
   menu right, even padding. No void below it.
   ============================================================ */
.site-header{
  position:sticky;top:0;z-index:50;
  background:rgba(10,12,14,.92);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  border-bottom:1px solid var(--line);
}
/* Logged in, WordPress adds its own 32px admin bar (46px on
   phones). The sticky header sits below it instead of sliding
   underneath — the theme itself renders identically logged in
   or logged out; only WordPress's own bar differs. */
body.admin-bar .site-header{top:32px}
@media(max-width:782px){body.admin-bar .site-header{top:46px}}
.header-in{
  max-width:var(--max);margin:0 auto;padding:0 20px;
  height:64px;display:flex;align-items:center;gap:18px;
}
.brand{display:flex;align-items:center;gap:12px;text-decoration:none;min-height:44px;flex:0 0 auto}
.brand-mark{width:44px;height:44px;overflow:hidden;flex:0 0 auto;display:grid;place-items:center}
.brand-mark img{
  width:44px;height:44px;object-fit:cover;
  /* The mark is the chain-only asset (assets/chain-mark.png),
     the exact image from the prototype. The old approach cropped the
     full lockup (chain + TCA) to a square, which showed only
     the centre oval of the chain. Zoom is scale(1.6), NOT the
     prototype's 2.1: measured chain bbox is x 230–795 of 1024
     (565px wide), and a scale of 2.1 shows only the central
     488px — the outer links are sliced at their edges. At 1.6
     the visible window is 640px, so the full chain fits with
     ~37px margin each side. Deliberate deviation from the
     prototype's scale values (user-reported distortion);
     the prototype's intent — a clean full chain mark — is
     preserved, the crop is removed. No TCA anywhere. The mark
     is 44px in the 64px bar at every width, so it can never
     exceed it. */
  transform:scale(1.6);
  max-width:100%;max-height:100%;
}
.brand-name{font-weight:700;letter-spacing:.14em;font-size:13px;line-height:1.25;text-transform:uppercase;color:var(--ink)}
.brand-name small{display:block;font-weight:500;letter-spacing:.22em;font-size:9.5px;color:var(--muted)}
nav.main{margin-left:auto;display:flex;align-items:center}
.ca-menu{display:flex;align-items:center;gap:4px;list-style:none;margin:0;padding:0}
.ca-menu li{margin:0;padding:0}
.ca-menu a{
  text-decoration:none;font-size:13.5px;font-weight:500;color:var(--ink-2);
  padding:10px 12px;min-height:44px;display:inline-flex;align-items:center;border-radius:6px;
}
.ca-menu a:hover{color:#fff;background:var(--panel)}
.ca-menu .current-menu-item a{color:#fff;background:var(--panel)}
/* The prototype's mobile header rule, exactly: under 760px
   The Chain + About hide (hide-m on those menu items), the
   brand-name small line hides, Episodes + the Watch button
   stay. The brand name itself stays visible — the old
   <=480px rule that hid it (and shrank the brand gap) is
   gone. The hide is scoped to nav.main so the footer menu
   keeps all its links on phones. */
@media(max-width:760px){
  nav.main a.hide-m{display:none}
  .header-in{padding:0 14px;gap:8px}
  .ca-menu a{padding:10px 8px}
  .brand-name small{display:none}
}

/* ============================================================
   4. Buttons — white pills are intentional (prototype)
   ============================================================ */
.btn{
  display:inline-flex;align-items:center;gap:8px;
  border:1px solid var(--line);background:var(--panel);color:var(--ink);
  border-radius:8px;padding:10px 16px;font-size:13.5px;font-weight:600;
  text-decoration:none;min-height:44px;
}
.btn:hover{border-color:#3a424e;color:var(--ink)}
.btn.primary{background:var(--ink);color:#0a0c0e;border-color:var(--ink)}
.btn.primary:hover{background:#fff;color:#0a0c0e}
.btn.signal{background:var(--signal);border-color:var(--signal);color:#fff}
.btn.signal:hover{background:#e2795c;color:#fff}
.btn .dot{width:7px;height:7px;border-radius:50%;background:currentColor;opacity:.7}

/* ============================================================
   5. Front page — the Home page's block content, re-ordered
   into the prototype's hero order with flex `order` (the
   stored block order is: eyebrow, figure, title, stats,
   intro, button; the prototype is: tags, title, standfirst,
   media, button, stats). DOM order is untouched.
   ============================================================ */
.ca-front .entry-content{display:flex;flex-direction:column;align-items:stretch}
.ca-front .entry-content > *{margin-top:0;margin-bottom:0}

/* Hero background band (prototype: radial orange glow + fade).
   Fixed-height ::before so it only covers the hero zone. */
.ca-front{position:relative;background:
  radial-gradient(900px 420px at 85% -80px, rgba(217,106,75,.10), transparent 60%),
  linear-gradient(180deg,#0d1013, var(--bg) 860px)}
.ca-front .hero-zone{padding:44px 0 0}

/* Eyebrow — first paragraph, small mono tag pill. */
.ca-front .entry-content > p:first-child{order:1;margin-bottom:18px}
/* The eyebrow paragraph is a single line of text; style it as
   a mono tag. (If an editor later splits it, the pill wraps.) */
.ca-front .entry-content > p.has-small-font-size:first-child{
  font-family:var(--mono);font-size:11px;letter-spacing:.14em;text-transform:uppercase;
  color:#ffb59f;border:1px solid var(--signal-dim);background:rgba(217,106,75,.10);
  padding:6px 10px;border-radius:999px;width:max-content;max-width:100%;
}
/* Kicker row — three tag pills (the prototype's kicker).
   Injected by front-page.php from the episode data
   (functions.php, ca_get_episode_data 'kicker'); the stored
   single-line eyebrow paragraph is replaced, not styled.
   The single-pill eyebrow rule below stays as the fallback
   for a front page with no episode data. */
.ca-front .entry-content > .ca-kicker-row{
  order:1;display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-bottom:18px;
}
.ca-front .entry-content > .ca-kicker-row .tag{
  font-family:var(--mono);font-size:11px;letter-spacing:.14em;text-transform:uppercase;
  color:var(--ink-2);border:1px solid var(--line);padding:6px 10px;border-radius:999px;
  background:var(--panel);margin:0;
}
.ca-front .entry-content > .ca-kicker-row .tag.hot{
  color:#ffb59f;border-color:var(--signal-dim);background:rgba(217,106,75,.10);
}
.ca-front .entry-content > .ca-kicker-row .tag.gold{
  color:var(--gold);border-color:#4a3f22;background:rgba(217,180,91,.07);
}

/* Hero title — the linked h2 in the page content. */
.ca-front .entry-content > h2.wp-block-heading:first-of-type{
  order:2;
  font-family:var(--paper-serif);font-weight:600;
  font-size:clamp(34px,5.4vw,58px);line-height:1.06;letter-spacing:-.01em;
  margin:0 0 16px;max-width:16ch;color:var(--ink);text-align:left;
}
.ca-front .entry-content > h2.wp-block-heading:first-of-type a{color:inherit;text-decoration:none}
.ca-front .entry-content > h2.wp-block-heading:first-of-type a:hover{color:#fff}

/* Standfirst — the paragraph directly after the stat strip. */
.entry-content > .wp-block-columns + p,
.ca-front .entry-content > .wp-block-columns + p{
  font-size:clamp(16px,2vw,19px);color:var(--ink-2);max-width:62ch;
  margin:0 0 22px;line-height:1.6;
}
.ca-front .entry-content > .wp-block-columns + p{order:3}

/* Hero meta row — injected by front-page.php after the
   standfirst (Event / Place / Film / Read, from the episode
   data). Sits between standfirst and media, as in the prototype. */
.ca-front .entry-content > .ca-hero-meta{
  order:4;display:flex;flex-wrap:wrap;gap:8px 22px;font-family:var(--mono);
  font-size:12.5px;color:var(--muted);margin-bottom:28px;
}
.ca-front .entry-content > .ca-hero-meta b{color:var(--ink-2);font-weight:500}

/* Hero media — the page's first figure, with the playbar
   overlaid at its bottom (front-page.php injects the scrim +
   playbar into the figure). Square bottom corners: the stat
   strip sits directly beneath it, as in the prototype. */
.ca-front .entry-content > figure.wp-block-image:first-of-type{
  order:5;position:relative;margin:0;
  border:1px solid var(--line);border-bottom:none;border-radius:14px 14px 0 0;
  overflow:hidden;background:#000;
}
.ca-front .entry-content > figure.wp-block-image:first-of-type img{
  width:100%;aspect-ratio:16/8.2;object-fit:cover;opacity:.94;
}
@media(max-width:760px){
  .ca-front .entry-content > figure.wp-block-image:first-of-type img{aspect-ratio:16/10}
}
.ca-front .entry-content > figure.wp-block-image:first-of-type .scrim{
  position:absolute;inset:0;background:linear-gradient(180deg,transparent 45%,rgba(5,6,7,.82));
  pointer-events:none;
}
.ca-front .entry-content > figure.wp-block-image:first-of-type .playbar{
  position:absolute;left:0;right:0;bottom:0;padding:18px;
  display:flex;flex-wrap:wrap;gap:12px;align-items:center;justify-content:space-between;
}
.ca-front .entry-content .play-left{
  display:flex;align-items:center;gap:14px;min-width:0;
  background:rgba(5,6,7,.88);border:1px solid var(--line);border-radius:12px;
  padding:10px 16px 10px 10px;
}
.ca-front .entry-content .play-btn{
  width:56px;height:56px;border-radius:50%;border:none;background:var(--signal);
  color:#fff;display:grid;place-items:center;flex:0 0 auto;
  box-shadow:0 8px 28px rgba(0,0,0,.5);text-decoration:none;min-height:56px;
}
.ca-front .entry-content .play-btn:hover{background:#e2795c;color:#fff}
.ca-front .entry-content .play-btn svg{margin-left:3px}
.ca-front .entry-content .play-txt{font-size:14px;text-align:left}
.ca-front .entry-content .play-txt b{display:block;font-size:15px;color:var(--ink)}
.ca-front .entry-content .play-txt span{color:var(--ink-2);font-family:var(--mono);font-size:12px}
.ca-front .entry-content .hero-actions{display:flex;gap:10px;flex-wrap:wrap}

/* Hero button — the stored "Read the full story" buttons block
   is hidden: the playbar carries the same link. The block stays
   in the page content, so the link survives if the theme is
   ever deactivated. */
.ca-front .entry-content > .wp-block-buttons{display:none}
.wp-block-buttons .wp-block-button__link,
.wp-block-button__link{
  display:inline-flex;align-items:center;gap:8px;
  background:var(--ink);color:#0a0c0e;border:1px solid var(--ink);
  border-radius:8px;padding:10px 16px;font-size:13.5px;font-weight:600;
  text-decoration:none;min-height:44px;
}
.wp-block-buttons .wp-block-button__link:hover,
.wp-block-button__link:hover{background:#fff;color:#0a0c0e}

/* Stat strip — the first Columns block (functions.php marks it
   .ca-stat-strip). 4 columns, left dividers, border-top only
   (the prototype has no border-bottom here). Each column is a
   big serif NUMBER + a small mono LABEL, as in the prototype
   ("583 / Lives lost — deadliest in aviation history"). The
   number's <em> is orange. See CONTENT-CHANGES.md for the
   exact column content. */
.entry-content > .wp-block-columns.ca-stat-strip{
  order:6;
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;
  border-top:1px solid var(--line);background:var(--bg-2);
  margin:0 0 52px;
}
/* Home stat strip — full-bleed to the container edges, as in
   the prototype (its strip sits in a padding:0 wrap). The
   theme's strip was a Columns block inside the padded
   .entry-content, so it ran 40px narrower and its first number
   sat 20px further right than the headings below it — a
   visible left-edge mismatch within the page itself. The
   negative side margins cancel the wrap's padding exactly
   (20px desktop, 16px at <=760px). Home only: the article
   strip is a 2×2 grid inside the 720px column and keeps its
   own margins. */
.ca-front .entry-content > .wp-block-columns.ca-stat-strip{
  margin-left:-20px;margin-right:-20px;
}
.entry-content > .wp-block-columns.ca-stat-strip .wp-block-column{
  padding:20px 22px;border-left:1px solid var(--line-soft);margin:0;
}
.entry-content > .wp-block-columns.ca-stat-strip .wp-block-column:first-child{border-left:none}
.entry-content > .wp-block-columns.ca-stat-strip .wp-block-column > :first-child{
  font-family:var(--paper-serif);font-size:clamp(26px,3.4vw,38px);font-weight:600;
  line-height:1;color:var(--ink);margin:0;text-align:left;white-space:normal;
}
.entry-content > .wp-block-columns.ca-stat-strip .wp-block-column > :first-child em{
  font-style:normal;color:var(--signal);
}
.entry-content > .wp-block-columns.ca-stat-strip .wp-block-column > :nth-child(2){
  font-family:var(--mono);font-size:11px;letter-spacing:.12em;text-transform:uppercase;
  color:var(--muted);margin:7px 0 0;line-height:1.5;
}
/* Fallback while the stored stats are still single-line h3s
   ("583 lost", "3 seconds of static"): a lone line gets the
   smaller size so it fits without colliding. Once the content
   change splits each stat into number + label, the full 38px
   number applies. */
.entry-content > .wp-block-columns.ca-stat-strip .wp-block-column > :only-child{
  font-size:clamp(22px,2.6vw,28px);line-height:1.15;
}
/* Article stat strip — 2×2 inside the 720px column. Four
   across cannot fit at the prototype's number size (the
   "61 survivors" / "2 × 747" collision). Row dividers on the
   second row keep the banded look. */
.ca-prose .entry-content > .wp-block-columns.ca-stat-strip{
  grid-template-columns:1fr 1fr;
}
.ca-prose .entry-content > .wp-block-columns.ca-stat-strip .wp-block-column{
  padding:16px 20px;
}
.ca-prose .entry-content > .wp-block-columns.ca-stat-strip .wp-block-column:nth-child(3){
  border-left:none;border-top:1px solid var(--line-soft);
}
.ca-prose .entry-content > .wp-block-columns.ca-stat-strip .wp-block-column:nth-child(4){
  border-top:1px solid var(--line-soft);
}
@media(max-width:760px){
  /* One column on phones, everywhere — a 2×2 grid clipped the
     right-hand stats mid-word at 390px. Rows divide with top
     borders; nothing is cut. */
  .entry-content > .wp-block-columns.ca-stat-strip{
    grid-template-columns:1fr;margin-bottom:40px;
  }
  /* Home strip bleed at mobile gutter width (16px), same as
     the desktop rule above. */
  .ca-front .entry-content > .wp-block-columns.ca-stat-strip{
    margin-left:-16px;margin-right:-16px;
  }
  .entry-content > .wp-block-columns.ca-stat-strip .wp-block-column{
    padding:14px 16px;border-left:none;border-top:1px solid var(--line-soft);
  }
  .entry-content > .wp-block-columns.ca-stat-strip .wp-block-column:first-child{
    border-top:none;
  }
  .ca-prose .entry-content > .wp-block-columns.ca-stat-strip{
    grid-template-columns:1fr;
  }
  .ca-prose .entry-content > .wp-block-columns.ca-stat-strip .wp-block-column{
    border-left:none;border-top:1px solid var(--line-soft);
  }
  .ca-prose .entry-content > .wp-block-columns.ca-stat-strip .wp-block-column:first-child{
    border-top:none;
  }
}

/* Chain / archive section heads — the prototype's .rule-label
   kicker ("How this site works" / "The archive") and .sec-head
   (heading + intro left, button right), injected by
   front-page.php as template chrome. The chain h2 + intro are
   wrapped in .sec-head, so the section-head nth-of-type rules
   below count the archive head as #2 and Ep. 02 as #3. The
   sec-head's bottom margin (22px) is the prototype's, and the
   strip's 52px bottom margin provides the gap above it (the
   old chain h2's 52px top margin is gone with the wrap). The
   scroll-margin-top is the sticky header's 64px plus a little
   — a functional anchor offset for the nav's /#chain link, not
   a prototype value (the prototype has no scroll-margin). */
.ca-front .entry-content > .rule-label{
  font-family:var(--mono);font-size:11px;letter-spacing:.18em;text-transform:uppercase;
  color:var(--signal);margin-bottom:10px;display:flex;align-items:center;gap:10px;
}
.ca-front .entry-content > .rule-label::after{
  content:"";height:1px;background:var(--line);flex:1;max-width:120px;
}
.ca-front .entry-content > .rule-label.ca-chain-label{order:7}
/* v1.0.5 — the hairline moved from the archive h2 (v1.0.4) to
   the kicker: the prototype's section border-top sits ABOVE the
   kicker, not below it. 52px top margin (chain section bottom)
   + 36px padding (episodes section top) = 88px from the
   chain-note to the kicker text, as in the prototype; the
   kicker's own 10px bottom margin is the kicker-to-head gap. */
.ca-front .entry-content > .rule-label.ca-archive-label{
  order:10;border-top:1px solid var(--line-soft);padding-top:36px;margin-top:52px;
}
.ca-front .entry-content > .sec-head{
  order:7;display:flex;align-items:flex-end;justify-content:space-between;
  gap:20px;margin-bottom:22px;flex-wrap:wrap;scroll-margin-top:80px;
}
/* The archive head shares the chain head's .sec-head layout
   (heading + intro left, controls right) but sits after the
   chain section, so it needs order 10, not the generic 7. */
.ca-front .entry-content > .sec-head.ca-archive-head{order:10}
.ca-front .entry-content > .sec-head h2{
  font-family:var(--paper-serif);font-size:clamp(24px,3vw,32px);font-weight:600;
  margin:0;line-height:1.15;color:var(--ink);text-align:left;
}
.ca-front .entry-content > .sec-head p{
  color:var(--muted);margin:6px 0 0;max-width:56ch;font-size:14.5px;line-height:1.55;
}
.ca-front .entry-content > .sec-head .btn{flex:0 0 auto}

/* Archive controls — the prototype's right-hand side of the
   section head: filter pills + search, in that order, in one
   flex row (the prototype's inline style as a class). The
   filter block's own 22px bottom margin is killed inside the
   row. */
.ca-front .entry-content > .sec-head .ca-archive-controls{
  display:flex;gap:10px;flex-wrap:wrap;align-items:center;
}
.ca-front .entry-content > .sec-head .ca-archive-controls .daf-block-root{margin:0}
/* The "Reset" link is plugin UI, not in the prototype — "All"
   serves the same purpose. Hidden, not removed: the layered
   v1.0.2 rules force the container to display:flex with
   !important, so this needs the same weight to win. */
html body .ca-front .ca-archive-controls .button_container{display:none!important}
/* Home search as the prototype's .searchbox pill: magnifier +
   input, no visible button (the installer also sets the Search
   block to No Button — this is belt-and-braces, and it hides
   the button even before that setting is applied). The generic
   pill + white-button rules (section 6) still govern the search
   results / 404 forms. The magnifier is a ::before flex item
   ahead of the inside-wrapper. */
.ca-front .ca-archive-controls .wp-block-search{
  border:1px solid var(--line);border-radius:999px;padding:0 14px;
  background:var(--panel);min-height:40px;max-width:none;margin:0;flex:0 0 auto;
}
.ca-front .ca-archive-controls .wp-block-search::before{
  content:"⌕";color:var(--faint);font-size:16px;line-height:1;flex:0 0 auto;
}
.ca-front .ca-archive-controls .wp-block-search__inside-wrapper{gap:0}
.ca-front .ca-archive-controls .wp-block-search__input{
  width:150px;flex:0 1 auto;min-height:38px;
}
.ca-front .ca-archive-controls .wp-block-search__button{display:none}
@media(max-width:760px){
  /* Phones: the head wraps, the controls take the full row
     and the search stretches to the container width. */
  .ca-front .entry-content > .sec-head .ca-archive-controls{flex:1 1 100%}
  .ca-front .ca-archive-controls .wp-block-search{flex:1 1 100%}
  .ca-front .ca-archive-controls .wp-block-search__input{width:auto;flex:1}
}

/* Fallback if the archive / Ep. 02 wraps ever fail (the h2s
   stay direct children of .entry-content): they still get the
   section-head size and their order, and the archive intro its
   muted style. When the wraps succeed, the h2s live inside
   .sec-head / .ca-future and these rules match nothing — except
   the Ep. 02 h2, which becomes nth-of-type(2) when the archive
   wrap succeeds but its own wrap fails; it then renders as a
   plain section head after the archive (order 10, DOM order
   after the archive sec-head) — a graceful degradation, not a
   mis-order. No hairline and no orange tick here: the hairline
   travels with the kicker (above), and the prototype's archive
   head has no tick. */
.ca-front .entry-content > h2.wp-block-heading:nth-of-type(2),
.ca-front .entry-content > h2.wp-block-heading:nth-of-type(3){
  font-family:var(--paper-serif);font-size:clamp(24px,3vw,32px);font-weight:600;
  margin:0 0 22px;line-height:1.15;color:var(--ink);text-align:left;
}
.ca-front .entry-content > h2.wp-block-heading:nth-of-type(2){order:10}
.ca-front .entry-content > h2.wp-block-heading:nth-of-type(3){order:14}
.ca-front .entry-content > h2.wp-block-heading:nth-of-type(2) + p{
  order:10;color:var(--muted);margin:6px 0 0;max-width:56ch;font-size:14.5px;line-height:1.55;
}

/* Chain — Details blocks, one component, one spacing, on
   every page (rules are NOT page-scoped). Row ≈47px desktop.
   This is the no-JS fallback and the transcript styling: when
   the theme JS runs, the chain renders as the prototype's
   horizontal card strip (home) or interactive lab (article). */
.entry-content details.wp-block-details{
  border:1px solid var(--line);background:var(--panel);border-radius:12px;
  margin:0 0 10px;padding:0;text-align:left;
}
.entry-content details.wp-block-details summary{
  list-style:none;cursor:pointer;
  font-size:15px;font-weight:600;line-height:1.3;color:var(--ink);
  padding:14px 18px;display:flex;align-items:center;gap:10px;
}
.entry-content details.wp-block-details summary::-webkit-details-marker{display:none}
.entry-content details.wp-block-details summary::marker{display:none}
.entry-content details.wp-block-details summary::after{
  content:"›";margin-left:auto;color:var(--signal);font-size:20px;line-height:1;
  transition:transform .2s ease;flex:0 0 auto;
}
.entry-content details.wp-block-details[open] summary::after{transform:rotate(90deg)}
.entry-content details.wp-block-details summary:hover{color:#fff}
.entry-content details.wp-block-details summary + p,
.entry-content details.wp-block-details > p{
  font-size:13.5px;color:var(--muted);line-height:1.6;
  padding:0 18px 16px;margin:0;
}
.ca-front .entry-content > details.wp-block-details{order:8}

/* Chain strip — the prototype's horizontal scroll of small
   cards. Built by the theme JS from the stored Details blocks
   (same content, prototype presentation). One column on phones. */
.ca-front .entry-content > .chain-scroll{
  order:8;display:flex;gap:0;align-items:stretch;overflow-x:auto;
  padding-bottom:8px;scrollbar-width:thin;
}
.ca-front .entry-content > .chain-scroll .chain-link-home{
  flex:0 0 218px;border:1px solid var(--line);background:var(--panel);
  padding:16px;margin-right:-1px;position:relative;text-align:left;
  color:var(--ink);text-decoration:none;display:block;
}
.ca-front .entry-content > .chain-scroll .chain-link-home:first-child{border-radius:12px 0 0 12px}
.ca-front .entry-content > .chain-scroll .chain-link-home:last-child{border-radius:0 12px 12px 0;margin-right:0}
.ca-front .entry-content > .chain-scroll .chain-link-home:hover{
  background:var(--panel-2);border-color:#39424e;z-index:1;
}
.ca-front .entry-content > .chain-scroll .chain-link-home .n{
  font-family:var(--mono);font-size:11px;color:var(--signal);letter-spacing:.1em;
}
.ca-front .entry-content > .chain-scroll .chain-link-home h3{
  font-size:15px;margin:8px 0 6px;font-weight:600;line-height:1.3;color:var(--ink);
}
.ca-front .entry-content > .chain-scroll .chain-link-home p{
  font-size:12.5px;color:var(--muted);margin:0;line-height:1.5;
}
.ca-front .entry-content > .chain-note{
  order:9;font-size:13px;color:var(--muted);margin:12px 0 0;line-height:1.55;
}
.ca-front .entry-content > .chain-note b{color:var(--ink-2)}
@media(max-width:760px){
  .ca-front .entry-content > .chain-scroll{
    display:grid;grid-template-columns:1fr;overflow:visible;padding-bottom:0;gap:10px;
  }
  .ca-front .entry-content > .chain-scroll .chain-link-home{
    flex:none;margin-right:0;border-radius:12px!important;
  }
}

/* Archive head row: heading + search + filter sit in the
   normal flow; the search block follows the archive head. */
.ca-front .entry-content > .wp-block-search{order:11;margin:0 0 18px;max-width:340px}
.ca-front .entry-content > .daf-block-root:has(.wpenajfi_ajax_filter_filter_posts){order:12}
.ca-front .entry-content > .daf-block-root:has(.wpenajfi_ajax_filter_archive_loop){order:13}

/* Episode 02 slot — the prototype's .card.future (dashed,
   big chain image, sans heading, muted text, "STATUS ·
   RESEARCHING" foot with no hairline). front-page.php wraps
   the stored h2 + paragraph in .ca-future; the slot stays BELOW
   the plugin grid (full-width, last in the flex order), not a
   4th cell of it — the grid is plugin-rendered and re-rendered
   on every filter change, which would wipe an injected card,
   and it would wrongly show under the "Short reads" filter. */
.ca-front .entry-content > .ca-future{
  order:15;border:1px dashed var(--line);border-radius:14px;
  background:transparent;padding:26px;margin:0 0 52px;
  display:flex;flex-direction:column;align-items:flex-start;justify-content:center;
}
.ca-front .entry-content > .ca-future .big-chain{
  width:120px;opacity:.9;margin-bottom:14px;display:block;
}
.ca-front .entry-content > .ca-future h2{
  font-family:var(--sans);font-size:16px;font-weight:600;
  margin:0;line-height:1.3;color:var(--ink);text-align:left;
}
.ca-front .entry-content > .ca-future p{
  color:var(--muted);font-size:13.5px;line-height:1.6;
  margin:8px 0 0;max-width:none;
}
.ca-front .entry-content > .ca-future .foot{
  display:flex;justify-content:space-between;align-items:center;
  font-family:var(--mono);font-size:11.5px;color:var(--faint);
  border:none;width:100%;padding-top:12px;margin-top:4px;
}

/* ============================================================
   6. Search block — pill box, dark input, white pill button
   ============================================================ */
.wp-block-search__button-outside.wp-block-search__text-button.wp-block-search,
.wp-block-search{
  display:flex;align-items:center;gap:8px;
  border:1px solid var(--line);border-radius:999px;
  padding:4px 4px 4px 16px;background:var(--panel);
  max-width:340px;
}
.wp-block-search__inside-wrapper{display:flex;align-items:center;gap:8px;flex:1;min-width:0}
.wp-block-search__input{
  background:none;border:none;outline:none;color:var(--ink);
  font-size:13.5px;font-family:inherit;min-height:38px;flex:1;min-width:0;
  padding:0;
}
.wp-block-search__input::placeholder{color:var(--faint)}
.wp-block-search__button{
  background:var(--ink);color:#0a0c0e;border:1px solid var(--ink);
  border-radius:999px;padding:8px 16px;font-size:13.5px;font-weight:600;
  min-height:38px;flex:0 0 auto;
}
.wp-block-search__button:hover{background:#fff;color:#0a0c0e}
.wp-block-search__label{display:none}

/* Core search form — the search results page uses
   get_search_form() (plain <form class="search-form">), not
   the Search block. Same pill + white button as the home
   search; without these rules the submit is a grey browser
   default. */
.search-form{
  display:flex;align-items:center;gap:8px;max-width:420px;
  border:1px solid var(--line);border-radius:999px;
  padding:4px 4px 4px 16px;background:var(--panel);
}
.search-form label{flex:1;min-width:0;display:flex}
.search-form input[type="search"],
.search-form input.search-field{
  background:none;border:none;outline:none;color:var(--ink);
  font-size:13.5px;font-family:inherit;min-height:38px;flex:1;min-width:0;padding:0;
}
.search-form input[type="search"]::placeholder,
.search-form input.search-field::placeholder{color:var(--faint)}
.search-form input[type="submit"],
.search-form .search-submit{
  background:var(--ink);color:#0a0c0e;border:1px solid var(--ink);
  border-radius:999px;padding:8px 16px;font-size:13.5px;font-weight:600;
  min-height:38px;flex:0 0 auto;cursor:pointer;
}
.search-form input[type="submit"]:hover,
.search-form .search-submit:hover{background:#fff;color:#0a0c0e}

/* ============================================================
   7. WPEnhanced Ajax Filter Blocks — pills + cards, dark.
   Global rules (NOT page-scoped): the same pills and cards
   must look identical on every page and width.
   The plugin injects per-block inline styles (ID-scoped);
   !important is used only where the plugin forces a value.
   ============================================================ */
/* Filter block: no stray margins; pills flush with the
   container's left edge. */
.daf-block-root{margin:0 0 22px}
.daf-block-root .wpenajfi_ajax_filter_filter_posts{margin:0;padding:0}
.daf-block-root .et_pb_contact_field_options_title{display:none}
.daf-block-root .divi-filter-container{margin:0;padding:0}
.daf-block-root .et_pb_contact_field_options_list{margin:0;padding:0}
.daf-block-root .et_pb_contact_field_radio{display:inline-flex;margin:0 8px 8px 0!important}
.daf-block-root .et_pb_contact_field_radio input{
  position:absolute;opacity:0;width:1px;height:1px;pointer-events:none;
}
.daf-block-root .et_pb_contact_field_radio label{
  display:inline-flex!important;align-items:center;justify-content:center;
  border:1px solid var(--line)!important;border-radius:999px!important;
  background:transparent!important;color:var(--ink-2)!important;
  padding:9px 16px!important;font-size:13px!important;font-weight:500!important;
  line-height:1.4!important;min-height:40px;cursor:pointer;
  letter-spacing:0!important;margin:0!important;
}
.daf-block-root .et_pb_contact_field_radio label:hover{
  border-color:#3a424e!important;color:#fff!important;
}
.daf-block-root .et_pb_contact_field_radio input:checked + label{
  background:var(--ink)!important;color:#0a0c0e!important;border-color:var(--ink)!important;
}
.daf-block-root .et_pb_contact_field_radio .radio-count{display:none}
/* v1.0.2 — the v1.0.1 rule (justify-content on the container
   alone) did NOT move the link: it still sat at x≈935, the
   content centre. The container itself must be centred by
   its parent (a shrink-wrapped flex item) or the plugin's
   equal-specificity rule loads later — either way, fixing
   the container alone is not enough. Cover every level:
   the parent chain is forced left, the container is forced
   to full width and self-aligned left, and the link's own
   margins are forced left — with higher specificity
   (html body …) so the theme wins regardless of load order.
   The live DOM could not be fetched from this VM to confirm
   the exact wrapper, so the rules are layered deliberately
   instead of relying on a single selector. */
html body .daf-block-root .wpenajfi_ajax_filter_filter_posts,
html body .daf-block-root .divi-filter-container{
  align-items:flex-start!important;justify-content:flex-start!important;text-align:left!important;
}
.daf-block-root .button_container{
  display:flex;justify-content:flex-start!important;align-items:center;
  text-align:left!important;width:100%!important;
  margin:0!important;padding:0!important;
}
html body .daf-block-root .button_container{
  display:flex!important;justify-content:flex-start!important;align-items:center!important;
  align-self:flex-start!important;text-align:left!important;
  width:100%!important;max-width:100%!important;min-width:0!important;
  margin-left:0!important;margin-right:auto!important;padding-left:0!important;
  float:none!important;
}
.daf-block-root .reset-filters{
  display:inline-flex;align-items:center;min-height:40px;
  color:var(--muted)!important;font-size:13px;font-weight:500;
  text-decoration:none;padding:9px 4px!important;margin:0!important;
  background:none!important;border:none!important;
}
html body .daf-block-root .reset-filters{
  margin-left:0!important;margin-right:auto!important;
}
.daf-block-root .reset-filters:hover{color:var(--ink)!important}

/* Archive loop grid — 3 columns desktop, 2 tablet, 1 phone.
   The plugin's own column rules are class-level; these
   !important rules (higher specificity) make the theme the
   authority. v1.0.5 — one documented attempt at the prototype's
   18px gaps (below): the plugin's gap rule is ID-scoped
   (#block-19c53655-… .divi-filter-archive-loop .loop-grid) with
   !important, so a class-scoped theme rule loses on specificity
   no matter the !important — the 25px gaps stay (prototype:
   18px). Beating it would mean hardcoding the block's UUID in
   the theme; not done. The theme's own .ca-grid (section 8)
   already uses 18px everywhere else. */
.daf-block-root .divi-filter-loop-container > .grid-posts.loop-grid,
.daf-block-root .divi-filter-archive-loop .grid-posts{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  row-gap:18px!important;column-gap:18px!important;
  list-style:none;margin:0;padding:0;
}
@media(max-width:960px){
  .daf-block-root .divi-filter-loop-container > .grid-posts.loop-grid,
  .daf-block-root .divi-filter-archive-loop .grid-posts{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}
@media(max-width:620px){
  .daf-block-root .divi-filter-loop-container > .grid-posts.loop-grid,
  .daf-block-root .divi-filter-archive-loop .grid-posts{
    grid-template-columns:repeat(1,minmax(0,1fr))!important;
  }
}
/* Cards — dark panel, 16/9 thumb, serif title, mono foot.
   (Also covers the plugin's .daf-blog-card template, in case
   the loop template is switched later.) */
.daf-block-root .grid-col,
.daf-block-root .daf-blog-card{
  background:var(--panel)!important;border:1px solid var(--line)!important;
  border-radius:14px!important;overflow:hidden!important;box-shadow:none!important;
  display:flex!important;flex-direction:column!important;
  text-align:left!important;height:100%;
}
.daf-block-root .grid-col:hover,
.daf-block-root .daf-blog-card:hover{border-color:#3a424e!important;background:var(--panel-2)!important}
.daf-block-root .grid-item-cont,
.daf-block-root .daf-blog-card-container{
  display:flex!important;flex-direction:column!important;
  height:100%!important;overflow:hidden!important;background:inherit!important;
}
.daf-block-root .et_pb_image_container,
.daf-block-root .daf-blog-card-image{
  position:relative;aspect-ratio:16/9;overflow:hidden;background:#000;margin:0!important;
}
.daf-block-root .et_pb_image_container img,
.daf-block-root .daf-blog-card-image img,
.daf-block-root .entry-featured-image-url img{
  width:100%!important;height:100%!important;object-fit:cover!important;
  display:block;margin:0!important;
}
.daf-block-root .post-content_cont,
.daf-block-root .daf-blog-card-body{
  padding:18px!important;display:flex!important;flex-direction:column!important;
  gap:8px!important;flex:1!important;text-align:left!important;
}
.daf-block-root .post-content_cont .entry-title,
.daf-block-root .daf-blog-card .entry-title{
  font-family:var(--paper-serif)!important;font-size:20px!important;font-weight:600!important;
  line-height:1.25!important;margin:0!important;color:var(--ink)!important;
}
.daf-block-root .post-content_cont .entry-title a,
.daf-block-root .daf-blog-card .entry-title a{color:inherit!important;text-decoration:none!important}
.daf-block-root .post-content_cont .post-meta,
.daf-block-root .daf-blog-card-extra-meta,
.daf-block-root .daf-blog-card-date{
  font-family:var(--mono)!important;font-size:11.5px!important;color:var(--faint)!important;
  letter-spacing:.04em!important;text-transform:uppercase!important;margin:0!important;
}
.daf-block-root .post-content_cont .post-meta a{color:var(--faint)!important;text-decoration:none!important}
.daf-block-root .post-content_cont .post-meta .count{display:none!important}
.daf-block-root .post-content_cont .post-content,
.daf-block-root .post-content_cont .post-content-inner,
.daf-block-root .daf-blog-card-excerpt{
  color:var(--muted)!important;font-size:13.5px!important;line-height:1.55!important;
  margin:0!important;flex:1!important;
}
.daf-block-root .post-content_cont .more-link,
.daf-block-root .daf-blog-card .et_pb_button.more-link{
  display:inline-block!important;align-self:flex-start!important;
  background:none!important;border:none!important;padding:0!important;margin:4px 0 0!important;
  color:var(--signal)!important;font-size:12px!important;font-weight:600!important;
  letter-spacing:.04em!important;text-transform:uppercase!important;
  box-shadow:none!important;border-radius:0!important;
}
.daf-block-root .post-content_cont .more-link::after,
.daf-block-root .daf-blog-card .et_pb_button.more-link::after{content:" →"}
.daf-block-root .post-content_cont .more-link:hover,
.daf-block-root .daf-blog-card .et_pb_button.more-link:hover{color:#e2795c!important}
/* v1.0.5 — the prototype's .ep / .dur pills and .foot row on the
   plugin cards. The pills and the foot are injected by the theme
   JS (the loop markup is plugin-rendered server-side, so the
   theme cannot add them in PHP); these rules style them. The
   .ep/.dur are new elements, so no !important is needed —
   nothing in the plugin targets them. The category line
   (.post-meta) is hidden only once the JS has run (html.ca-js,
   added by the script): without JS the category line stays, so
   the card still reads correctly. */
.daf-block-root .et_pb_image_container .ep{
  position:absolute;top:10px;left:10px;background:rgba(5,6,7,.85);border:1px solid var(--line);
  font-family:var(--mono);font-size:10.5px;letter-spacing:.12em;padding:5px 9px;
  border-radius:999px;text-transform:uppercase;color:var(--ink-2);z-index:1;
}
.daf-block-root .et_pb_image_container .dur{
  position:absolute;bottom:10px;right:10px;background:rgba(5,6,7,.85);
  font-family:var(--mono);font-size:11px;padding:4px 8px;border-radius:6px;color:var(--ink);z-index:1;
}
html.ca-js .daf-block-root .post-content_cont .post-meta{display:none!important}
.daf-block-root .post-content_cont .foot{
  display:flex;justify-content:space-between;align-items:center;gap:10px;
  font-family:var(--mono);font-size:11.5px;color:var(--faint);
  border-top:1px solid var(--line-soft);padding-top:12px;margin-top:4px;
}
.daf-block-root .post-content_cont .foot .date{white-space:nowrap}
.daf-block-root .post-content_cont .foot .go{
  color:var(--signal);font-weight:600;letter-spacing:.04em;white-space:nowrap;text-decoration:none;
}
.daf-block-root .post-content_cont .foot .go:hover{color:#e2795c}
.daf-block-root .divi-filter-pagination{margin:22px 0 0}
.daf-block-root .divi-filter-pagination ul{list-style:none;margin:0;padding:0;display:flex;gap:8px;flex-wrap:wrap}
.daf-block-root .divi-filter-pagination a,
.daf-block-root .divi-filter-pagination span{
  display:inline-flex;align-items:center;justify-content:center;min-width:40px;min-height:40px;
  border:1px solid var(--line);border-radius:8px;padding:8px 12px;
  color:var(--ink-2);text-decoration:none;font-size:13.5px;font-weight:500;
}
.daf-block-root .divi-filter-pagination .current{
  background:var(--ink);color:#0a0c0e;border-color:var(--ink);
}

/* ============================================================
   8. The theme's own card grid (archive / search / index /
   "More posts") — same card language as the filter loop.
   ============================================================ */
.ca-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin:0 0 52px}
@media(max-width:960px){.ca-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.ca-grid{grid-template-columns:1fr}}
.ca-card{
  border:1px solid var(--line);border-radius:14px;overflow:hidden;
  background:var(--panel);display:flex;flex-direction:column;text-align:left;
}
.ca-card:hover{border-color:#3a424e;background:var(--panel-2)}
.ca-card .thumb{position:relative;aspect-ratio:16/9;overflow:hidden;background:#000}
.ca-card .thumb img{width:100%;height:100%;object-fit:cover}
.ca-card .thumb .ep{
  position:absolute;top:10px;left:10px;background:rgba(5,6,7,.85);border:1px solid var(--line);
  font-family:var(--mono);font-size:10.5px;letter-spacing:.12em;padding:5px 9px;
  border-radius:999px;text-transform:uppercase;color:var(--ink-2);
}
.ca-card .thumb .dur{
  position:absolute;bottom:10px;right:10px;background:rgba(5,6,7,.85);
  font-family:var(--mono);font-size:11px;padding:4px 8px;border-radius:6px;color:var(--ink);
}
.ca-card .body{padding:18px;display:flex;flex-direction:column;gap:8px;flex:1}
.ca-card h3{font-family:var(--paper-serif);font-size:20px;line-height:1.25;margin:0;font-weight:600}
.ca-card h3 a{color:inherit;text-decoration:none}
.ca-card h3 a:hover{color:#fff}
.ca-card p{color:var(--muted);font-size:13.5px;margin:0;line-height:1.55;flex:1}
.ca-card .foot{
  display:flex;justify-content:space-between;align-items:center;gap:10px;
  font-family:var(--mono);font-size:11.5px;color:var(--faint);
  border-top:1px solid var(--line-soft);padding-top:12px;margin-top:4px;
}
.ca-card .foot .date{white-space:nowrap}
.ca-card .foot .go{color:var(--signal);font-weight:600;letter-spacing:.04em;white-space:nowrap}
/* v1.0.7 — the episode card's .foot row clipped at ~320px: its left
   text ("27 MAR 1977 · AVIATION · 9 MIN READ", 32 chars of 11.5px
   mono) is ~30px wider than the foot at that width, and
   .date{white-space:nowrap} plus the flex default min-width:auto
   gave it nowhere to go, so "READ →" spilled past the card's
   right edge. The explainers' shorter left text ("FROM EP. 01
   RESEARCH") always fit, which is why only the episode card
   clipped. At ≤620px only, the date takes the free space and
   wraps to a second line; the hairline, mono sizes and orange
   "READ →" are unchanged, and desktop is untouched (the rule
   lives inside the ≤620px query, and the nowrap above still
   governs wider screens). */
@media(max-width:620px){
  .daf-block-root .post-content_cont .foot .date,
  .ca-card .foot .date{flex:1 1 auto;min-width:0;white-space:normal}
}
.ca-card.no-thumb .body{padding-top:22px}

/* ============================================================
   9. Article — 720px reading column on the same left edge
   as everything else; optional rail (table of contents).
   ============================================================ */
.ca-article-head{padding:34px 0 0}
.backlink{
  display:inline-flex;align-items:center;gap:8px;color:var(--muted);
  text-decoration:none;font-size:13.5px;font-weight:500;padding:10px 0;min-height:44px;
}
.backlink:hover{color:var(--ink)}
.kicker-row{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-bottom:18px}
.tag{
  font-family:var(--mono);font-size:11px;letter-spacing:.14em;text-transform:uppercase;
  color:var(--ink-2);border:1px solid var(--line);padding:6px 10px;border-radius:999px;
  background:var(--panel);text-decoration:none;
}
.tag.hot{color:#ffb59f;border-color:var(--signal-dim);background:rgba(217,106,75,.10)}
.tag.gold{color:var(--gold);border-color:#4a3f22;background:rgba(217,180,91,.07)}
.tag:hover{color:#fff}
.ca-article-head h1{
  font-family:var(--paper-serif);font-size:clamp(32px,4.6vw,50px);line-height:1.08;
  font-weight:600;margin:10px 0 14px;max-width:20ch;color:var(--ink);text-align:left;
}
.meta-row{
  display:flex;flex-wrap:wrap;gap:8px 22px;font-family:var(--mono);
  font-size:12.5px;color:var(--muted);margin-bottom:28px;
}
.meta-row b{color:var(--ink-2);font-weight:500}
.meta-row a{color:var(--ink-2);text-decoration:none}
.meta-row a:hover{color:#fff}

/* WP YouTube Lyte facade — full content width, sharing the
   content's left edge. Lyte's inline 853px width is forced
   to 100% of the reading column; the facade scales with it. */
.entry-content .lyte-wrapper{
  width:100%!important;max-width:100%!important;margin:26px 0 8px!important;
  border:1px solid var(--line);border-radius:14px;overflow:hidden;background:#000;
}
.entry-content .lyte-wrapper .lL{
  width:100%!important;max-width:100%!important;margin:0!important;
}
.entry-content .lyte-wrapper .lyMe,
.entry-content .lyte-wrapper .pL{width:100%!important;max-width:100%!important}
.entry-content .lyte-wrapper .lyMe .pL{margin:0!important}

/* v1.0.2 — the article must never scroll sideways at phone
   width. Two root causes: (1) the comment textarea (see
   section 11); (2) long unbroken strings — bare URLs in the
   sources list — with nowhere to break. overflow-wrap is
   inherited, so the entry-content rule covers descendants;
   links get `anywhere` so URLs break anywhere. The
   overflow-x:clip safety net (not hidden, so the sticky
   header and TOC rail keep working) catches anything else
   a block or plugin renders wide. */
html,body{overflow-x:clip}
.ca-prose .entry-content{overflow-wrap:break-word}
.ca-prose .entry-content a{overflow-wrap:anywhere}
.ca-prose .entry-content li{overflow-wrap:anywhere}

/* Article layout: 720px prose + 300px rail. */
.article-layout{
  display:grid;grid-template-columns:minmax(0,var(--read)) 300px;gap:44px;
  padding:30px 0 10px;align-items:start;
}
@media(max-width:980px){.article-layout{grid-template-columns:1fr}}
.ca-prose{
  font-family:var(--paper-serif);font-size:17.5px;line-height:1.78;color:#ddd9d0;
  min-width:0;
}
.ca-prose .entry-content > p{margin:0 0 20px}
.ca-prose .entry-content > p:first-of-type{margin-top:0}
/* Drop cap on the first body paragraph (after the first h2). */
.ca-prose .entry-content > h2.wp-block-heading:first-of-type + p::first-letter{
  font-size:52px;line-height:.9;float:left;padding:6px 10px 0 0;
  font-weight:600;color:var(--ink);font-family:var(--paper-serif);
}
/* Section heads — the WP h2s are the section titles
   ("The diversion"); styled as the prototype's serif
   subhead with a short orange tick above. */
.ca-prose .entry-content > h2.wp-block-heading{
  font-family:var(--paper-serif);font-size:26px;font-weight:600;color:var(--ink);
  margin:40px 0 14px;line-height:1.25;text-align:left;
}
.ca-prose .entry-content > h2.wp-block-heading::before{
  content:"";display:block;width:28px;height:2px;background:var(--signal);margin-bottom:12px;
}
.ca-prose .entry-content > h3.wp-block-heading{
  font-family:var(--paper-serif);font-size:22px;font-weight:600;color:var(--ink);
  margin:28px 0 12px;line-height:1.3;text-align:left;
}
.ca-prose .entry-content a{color:var(--ink-2);text-decoration:underline;text-decoration-color:#3a424e;text-underline-offset:3px}
.ca-prose .entry-content a:hover{color:#fff}
.ca-prose .entry-content blockquote{
  margin:28px 0;padding:4px 0 4px 20px;border-left:3px solid var(--signal);
  font-size:20px;line-height:1.5;color:var(--ink);font-style:italic;
}
.ca-prose .entry-content blockquote cite{
  display:block;font-style:normal;font-family:var(--mono);font-size:12px;
  color:var(--muted);margin-top:10px;letter-spacing:.06em;
}
.ca-prose .entry-content figure.wp-block-image{margin:30px 0}
.ca-prose .entry-content figure.wp-block-image img{
  border-radius:12px;border:1px solid var(--line);width:100%;
}
.ca-prose .entry-content figcaption,
.ca-prose .entry-content .wp-element-caption{
  font-family:var(--sans);font-size:12.5px;color:var(--muted);
  margin-top:9px;line-height:1.55;text-align:left;
}
.ca-prose .entry-content figcaption b,
.ca-prose .entry-content .wp-element-caption b{color:var(--ink-2);font-weight:600}
.ca-prose .entry-content ul.wp-block-list,
.ca-prose .entry-content ol.wp-block-list{
  margin:0 0 20px;padding-left:22px;color:#ddd9d0;
}
.ca-prose .entry-content ul.wp-block-list li,
.ca-prose .entry-content ol.wp-block-list li{margin-bottom:9px;line-height:1.6}
.ca-prose .entry-content ul.wp-block-list li::marker{color:var(--signal)}
.ca-prose .entry-content pre,
.ca-prose .entry-content code{
  font-family:var(--mono);font-size:14px;background:var(--panel);
  border:1px solid var(--line-soft);border-radius:6px;
}
.ca-prose .entry-content pre{padding:16px;overflow-x:auto}
.ca-prose .entry-content code{padding:2px 6px}
.ca-prose .entry-content pre code{border:none;padding:0;background:none}

/* Chain lab — the prototype's interactive chain. Built by the
   theme JS from the article's stored Details blocks (same
   text, buttons + detail panel). The no-JS fallback is the
   Details rows above. */
.ca-prose .chain-lab{
  margin:34px 0;border:1px solid var(--line);border-radius:14px;
  background:var(--bg-2);padding:20px;font-family:var(--sans);
}
.ca-prose .chain-lab h4{
  font-size:16px;font-weight:600;color:var(--ink);
  margin:0 0 4px;
}
.ca-prose .chain-lab > p{
  font-size:13.5px;color:var(--muted);line-height:1.55;margin:0 0 16px;
  font-family:var(--sans);
}
.ca-prose .chain-btns{display:flex;flex-wrap:wrap;gap:7px}
.ca-prose .chain-btn{
  display:inline-flex;align-items:center;
  border:1px solid var(--line);border-radius:8px;background:var(--panel);
  color:var(--ink-2);font-family:var(--sans);font-size:12.5px;font-weight:600;
  padding:9px 12px;min-height:40px;cursor:pointer;
}
.ca-prose .chain-btn:hover{border-color:#3a424e;color:#fff}
.ca-prose .chain-btn[aria-pressed="true"]{
  background:var(--ink);color:#0a0c0e;border-color:var(--ink);
}
.ca-prose .chain-btn .n{
  font-family:var(--mono);font-size:11px;color:var(--signal);margin-right:6px;
}
.ca-prose .chain-btn[aria-pressed="true"] .n{color:var(--signal-dim)}
.ca-prose .chain-detail{
  margin-top:16px;border-top:1px solid var(--line-soft);padding-top:16px;
  display:flex;gap:16px;align-items:flex-start;
}
.ca-prose .chain-detail .big-n{
  font-family:var(--paper-serif);font-size:40px;line-height:1;color:var(--signal);
  font-weight:600;flex:0 0 auto;
}
.ca-prose .chain-detail h5{
  font-size:15.5px;font-weight:600;color:var(--ink);
  margin:0 0 5px;
}
.ca-prose .chain-detail p{
  font-size:14px;color:var(--ink-2);line-height:1.65;margin:0;
  font-family:var(--sans);
}
.ca-prose .chain-detail .src{
  /* The source line sits on its own line below the detail
     text — as an inline span it ran straight on after the
     last word ("…at Los Rodeos.Source: …"). The prototype
     has it inline after a space, but the live run-on came
     from the span inheriting no separator, so it is set
     block here. */
  display:block;margin-top:10px;
  color:var(--faint);font-size:12px;
}

/* Transcript table — the prototype's tappable time/who/line
   table. The Table block itself comes from the article
   content (class ca-transcript, see CONTENT-CHANGES.md); the
   t-head bar and the row behaviour come from the theme JS.
   Three columns (Time / Who / Line); the note rides inside
   the Line cell, the sub-line inside the Who cell. */
.ca-prose figure.wp-block-table.ca-transcript{
  margin:30px 0;border:1px solid var(--line);border-radius:14px;
  overflow:hidden;font-family:var(--sans);
}
.ca-prose figure.wp-block-table.ca-transcript .t-head{
  display:flex;flex-wrap:wrap;gap:12px;justify-content:space-between;align-items:center;
  background:var(--panel);border-bottom:1px solid var(--line);padding:14px 18px;
}
.ca-prose figure.wp-block-table.ca-transcript .t-head b{
  font-size:14px;color:var(--ink);
}
.ca-prose figure.wp-block-table.ca-transcript .t-head span{
  font-family:var(--mono);font-size:11.5px;color:var(--muted);
}
.ca-prose figure.wp-block-table.ca-transcript table{
  border-collapse:collapse;width:100%;margin:0;table-layout:fixed;
}
.ca-prose figure.wp-block-table.ca-transcript th,
.ca-prose figure.wp-block-table.ca-transcript td{
  border:none;border-bottom:1px solid var(--line-soft);
  padding:13px 6px;text-align:left;vertical-align:top;
  font-size:14px;line-height:1.55;
}
.ca-prose figure.wp-block-table.ca-transcript th:first-child,
.ca-prose figure.wp-block-table.ca-transcript td:first-child{padding-left:18px}
.ca-prose figure.wp-block-table.ca-transcript th:last-child,
.ca-prose figure.wp-block-table.ca-transcript td:last-child{padding-right:18px}
.ca-prose figure.wp-block-table.ca-transcript tbody tr{cursor:pointer}
.ca-prose figure.wp-block-table.ca-transcript tbody tr:hover td{background:var(--panel)}
.ca-prose figure.wp-block-table.ca-transcript tbody tr.sel td{
  background:rgba(217,106,75,.08);box-shadow:inset 3px 0 0 var(--signal);
}
.ca-prose figure.wp-block-table.ca-transcript tbody tr:last-child td{border-bottom:none}
.ca-prose figure.wp-block-table.ca-transcript td:nth-child(1){
  font-family:var(--mono);font-size:12.5px;color:var(--gold);
  padding-top:15px;width:86px;white-space:nowrap;
}
.ca-prose figure.wp-block-table.ca-transcript td:nth-child(2){
  font-size:12px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;
  color:var(--ink-2);padding-top:15px;width:118px;
}
.ca-prose figure.wp-block-table.ca-transcript td:nth-child(2) small{
  display:block;font-weight:500;text-transform:none;letter-spacing:0;
  color:var(--faint);font-size:11px;margin-top:2px;
}
.ca-prose figure.wp-block-table.ca-transcript td:nth-child(3){
  font-family:var(--paper-serif);font-size:15.5px;line-height:1.55;color:#ddd9d0;
}
.ca-prose figure.wp-block-table.ca-transcript td:nth-child(3) .note{
  display:block;font-family:var(--sans);font-size:12.5px;color:var(--muted);
  margin-top:4px;line-height:1.5;
}
.ca-prose figure.wp-block-table.ca-transcript .t-note{
  border-top:1px solid var(--line);padding:14px 18px;margin:0;background:var(--panel);
  font-family:var(--sans);font-size:13px;color:var(--muted);line-height:1.6;
}
.ca-prose figure.wp-block-table.ca-transcript .t-note b{color:var(--ink-2)}
@media(max-width:620px){
  /* v1.0.2 — the 70px time track was narrower than the
     "17:06:18" cell (60px text + 28px padding), so the time
     spilled into the next column. 80px + tighter padding
     fits it exactly (58px text + 20px padding). */
  .ca-prose figure.wp-block-table.ca-transcript tbody tr{
    display:grid;grid-template-columns:80px 1fr;
  }
  .ca-prose figure.wp-block-table.ca-transcript td{display:block;border-bottom:none;padding:6px 14px}
  .ca-prose figure.wp-block-table.ca-transcript td:nth-child(1){padding-top:13px;padding-left:10px;padding-right:10px}
  .ca-prose figure.wp-block-table.ca-transcript td:nth-child(2){padding-top:13px}
  .ca-prose figure.wp-block-table.ca-transcript td:nth-child(3){grid-column:2;padding-top:0;padding-bottom:13px}
}

/* Rail — table of contents, generated from the post's own h2s. */
.ca-rail{position:sticky;top:84px;display:flex;flex-direction:column;gap:16px;min-width:0}
@media(max-width:980px){.ca-rail{position:static}}
.ca-rail .factbox{
  border:1px solid var(--line);border-radius:12px;padding:18px;background:var(--panel);
}
.ca-rail .factbox h4{
  font-family:var(--mono);font-size:11px;letter-spacing:.16em;text-transform:uppercase;
  color:var(--signal);margin:0 0 12px;
}
.ca-rail .factbox dl{
  margin:0;display:grid;grid-template-columns:auto 1fr;gap:8px 14px;font-size:13px;
}
.ca-rail .factbox dt{
  color:var(--faint);font-family:var(--mono);font-size:11.5px;
  padding-top:2px;text-transform:uppercase;letter-spacing:.06em;
}
.ca-rail .factbox dd{margin:0;color:var(--ink-2);font-weight:500}
.ca-rail .factbox dd em{font-style:normal;color:var(--signal);font-weight:700}
.ca-rail .factbox p{font-size:13.5px;color:var(--muted);line-height:1.6;margin:0 0 12px}
.ca-rail .factbox .btn{width:100%;justify-content:center}
.ca-rail .toc{
  border:1px solid var(--line);border-radius:12px;padding:18px;background:var(--bg-2);
}
.ca-rail .toc h4{
  font-family:var(--mono);font-size:11px;letter-spacing:.16em;text-transform:uppercase;
  color:var(--muted);margin:0 0 10px;
}
.ca-rail .toc a{
  display:block;color:var(--ink-2);text-decoration:none;font-size:13.5px;
  padding:7px 0;min-height:36px;line-height:1.4;
}
.ca-rail .toc a:hover{color:#fff}
.ca-rail .toc a span{font-family:var(--mono);color:var(--faint);font-size:11px;margin-right:8px}

/* Next strip + tags (below the article). */
.next-strip{
  border:1px solid var(--line);border-radius:14px;padding:22px;margin:54px 0;
  display:flex;flex-wrap:wrap;gap:16px;align-items:center;justify-content:space-between;
  background:var(--panel);
}
.next-strip h3{font-family:var(--paper-serif);margin:0;font-size:20px;font-weight:600;color:var(--ink)}
.next-strip p{margin:4px 0 0;color:var(--muted);font-size:13.5px}
.ca-tags{
  display:flex;flex-wrap:wrap;gap:8px;margin:0 0 36px;
}
.ca-tags a{
  font-family:var(--mono);font-size:11px;letter-spacing:.1em;text-transform:uppercase;
  color:var(--muted);border:1px solid var(--line);border-radius:999px;
  padding:6px 10px;text-decoration:none;background:var(--panel);
}
.ca-tags a:hover{color:var(--ink);border-color:#3a424e}

/* Comments — dark form controls natively; no space reserved
   for an empty list (the list only renders when comments
   exist — see single.php). */
.ca-comments{margin:0 0 36px;max-width:var(--read)}
.ca-comments h2{
  font-family:var(--paper-serif);font-size:26px;font-weight:600;color:var(--ink);
  margin:0 0 18px;text-align:left;
}
.comment-list{list-style:none;margin:0 0 28px;padding:0}
.comment-list .comment{
  border:1px solid var(--line);border-radius:12px;background:var(--panel);
  padding:18px;margin-bottom:14px;
}
.comment-list .comment-meta{font-family:var(--mono);font-size:12px;color:var(--muted);margin-bottom:8px}
.comment-list .comment-meta a{color:var(--ink-2);text-decoration:none}
.comment-list .comment-content{font-size:14.5px;line-height:1.65;color:var(--ink-2)}
.comment-list .comment-content p{margin:0 0 10px}
.comment-list .children{list-style:none;margin:14px 0 0;padding-left:18px}
.comment-reply-title{
  font-family:var(--paper-serif);font-size:22px;font-weight:600;color:var(--ink);
  margin:0 0 6px;
}
.comment-notes,.logged-in-as{font-size:13px;color:var(--muted);margin:0 0 16px}
.comment-form label{display:block;font-size:13px;font-weight:500;color:var(--ink-2);margin-bottom:6px}
.comment-form p{margin:0 0 16px}
.comment-form .required{color:var(--signal)}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea{
  width:100%;background:var(--panel);border:1px solid var(--line);border-radius:8px;
  color:var(--ink);font-family:var(--sans);font-size:14px;padding:10px 12px;
}
.comment-form input:focus,
.comment-form textarea:focus{outline:none;border-color:var(--signal)}
.comment-form textarea{min-height:140px;resize:vertical}
.comment-form input[type="checkbox"]{accent-color:var(--signal)}
.comment-form .form-submit{margin:4px 0 0}
.comment-form input[type="submit"],
.comment-form .wp-block-button__link{
  background:var(--ink);color:#0a0c0e;border:1px solid var(--ink);
  border-radius:8px;padding:10px 16px;font-size:13.5px;font-weight:600;min-height:44px;
}
.comment-form input[type="submit"]:hover{background:#fff;color:#0a0c0e}

/* "More posts" head — same section-head language as the
   front page, left-aligned at the section's left edge. */
.ca-more{margin:0 0 52px}
.ca-more .rule-label{
  font-family:var(--mono);font-size:11px;letter-spacing:.18em;text-transform:uppercase;
  color:var(--signal);margin-bottom:10px;display:flex;align-items:center;gap:10px;
}
.ca-more .rule-label::after{content:"";height:1px;background:var(--line);flex:1;max-width:120px}
.ca-more h2{
  font-family:var(--paper-serif);font-size:clamp(24px,3vw,32px);font-weight:600;
  margin:0 0 22px;line-height:1.15;color:var(--ink);text-align:left;
}
.ca-more .ca-grid{margin-bottom:0}

/* ============================================================
   9a. About grid + follow-band — the prototype's home
   sections, rendered as template chrome (front-page.php)
   and by the About page (page.php). Copy comes from the
   About page's own content; nothing is typed here.
   ============================================================ */
.ca-about-section{
  border-top:1px solid var(--line);padding:52px 0;
}
.ca-about-section .rule-label,
.ca-about-page .rule-label{
  font-family:var(--mono);font-size:11px;letter-spacing:.18em;text-transform:uppercase;
  color:var(--signal);margin-bottom:26px;display:flex;align-items:center;gap:10px;
}
.ca-about-section .rule-label::after,
.ca-about-page .rule-label::after{content:"";height:1px;background:var(--line);flex:1;max-width:120px}
.about-grid{
  display:grid;grid-template-columns:340px 1fr;gap:36px;align-items:start;
}
.about-logo{
  border:1px solid var(--line);border-radius:14px;padding:28px;background:#050607;
  display:grid;place-items:center;text-align:center;
}
.about-logo .custom-logo{width:170px;height:auto;max-width:100%}
.about-logo .wm{
  margin-top:14px;font-size:12px;font-weight:600;letter-spacing:.34em;
  text-transform:uppercase;color:var(--muted);
}
.about-copy h2{
  font-family:var(--paper-serif);font-size:28px;font-weight:600;
  line-height:1.2;margin:0 0 14px;color:var(--ink);text-align:left;
}
.about-copy p{color:var(--ink-2);margin:0 0 14px;font-size:15.5px;line-height:1.7;max-width:68ch}
.about-copy p b{color:var(--ink)}
.principles{
  display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-top:20px;
}
.principles .principle{border-top:2px solid var(--signal);padding-top:12px}
.principles .principle h4{
  font-family:var(--sans);font-size:14.5px;font-weight:600;margin:0 0 6px;color:var(--ink);
}
.principles .principle p{font-size:13.5px;margin:0;color:var(--muted);line-height:1.55;max-width:none}
@media(max-width:820px){
  .about-grid{grid-template-columns:1fr}
  .principles{grid-template-columns:1fr}
}

/* Follow-band — below the archive on the home page. */
/* v1.0.4: padding 36px 0, as in the prototype (section.block
   .tight) — the old 52px bottom padding pushed the footer
   16px further down than the prototype (gap to footer is now
   36 + 20 = 56px). The about → follow gap is unchanged
   (52 + 36 = 88px). */
.ca-follow-section{padding:36px 0}
.follow-band{
  border:1px solid var(--line);border-radius:14px;
  background:linear-gradient(120deg,var(--panel),#101318);
  padding:26px;display:flex;flex-wrap:wrap;gap:18px;align-items:center;justify-content:space-between;
}
.follow-band h3{
  font-family:var(--paper-serif);font-size:22px;margin:0 0 4px;color:var(--ink);
}
.follow-band p{color:var(--muted);font-size:14px;margin:0;line-height:1.55}
.follow-band .follow-actions{display:flex;gap:10px;flex-wrap:wrap}
.follow-band .btn.signal{background:var(--signal);color:#fff;border-color:var(--signal)}
.follow-band .btn.signal:hover{background:#e2795c;color:#fff}

/* ============================================================
   10. Pages, archive/search heads, footer, pagination
   ============================================================ */
.ca-page-head{padding:44px 0 0}
.ca-page-head .rule-label{
  font-family:var(--mono);font-size:11px;letter-spacing:.18em;text-transform:uppercase;
  color:var(--signal);margin-bottom:10px;display:flex;align-items:center;gap:10px;
}
.ca-page-head .rule-label::after{content:"";height:1px;background:var(--line);flex:1;max-width:120px}
.ca-page-head h1{
  font-family:var(--paper-serif);font-size:clamp(32px,4.6vw,50px);line-height:1.08;
  font-weight:600;margin:0 0 14px;max-width:20ch;color:var(--ink);text-align:left;
}
.ca-page-head .archive-desc{color:var(--muted);font-size:15px;line-height:1.6;max-width:62ch;margin:0 0 28px}
.ca-page{padding:0 0 52px}
.ca-page .entry-content{max-width:var(--read)}
.ca-page .entry-content > p{margin:0 0 16px;color:var(--ink-2);font-size:15.5px;line-height:1.7}
.ca-page .entry-content > h2.wp-block-heading{
  font-family:var(--paper-serif);font-size:26px;font-weight:600;color:var(--ink);
  margin:36px 0 14px;text-align:left;
}
.ca-page .entry-content > h3.wp-block-heading{
  font-family:var(--paper-serif);font-size:22px;font-weight:600;color:var(--ink);
  margin:28px 0 12px;text-align:left;
}
.ca-page .entry-content a{color:var(--ink-2);text-decoration:underline;text-decoration-color:#3a424e;text-underline-offset:3px}
.ca-page .entry-content a:hover{color:#fff}
.ca-page .entry-content figure.wp-block-image{margin:28px 0}
.ca-page .entry-content figure.wp-block-image img{border-radius:12px;border:1px solid var(--line)}
.ca-page .entry-content figcaption{font-size:12.5px;color:var(--muted);margin-top:9px;line-height:1.55}
.ca-archive-list{padding:0 0 52px}
.ca-search-form{margin:0 0 28px;max-width:420px}

.site-footer{border-top:1px solid var(--line);background:var(--bg-2);margin-top:20px}
.footer-in{
  padding:34px 0 44px;display:flex;flex-wrap:wrap;gap:26px;
  justify-content:space-between;align-items:flex-start;
}
.footer-in .fbrand{display:flex;gap:12px;align-items:flex-start;max-width:420px}
.footer-in .fbrand .fb-mark{width:52px;height:52px;overflow:hidden;flex:0 0 auto;display:grid;place-items:center}
.footer-in .fbrand .fb-mark img{
  width:52px;height:52px;object-fit:cover;transform:scale(1.6);
}
.footer-in .fb-name{font-weight:700;letter-spacing:.14em;font-size:13px;color:var(--ink)}
.footer-in p{color:var(--faint);font-size:12.5px;line-height:1.6;margin:4px 0 0}
.footer-links{display:flex;gap:26px;flex-wrap:wrap;align-items:flex-start}
.footer-links ul{list-style:none;margin:0;padding:0;display:flex;gap:26px;flex-wrap:wrap}
.footer-links a{
  font-size:13px;color:var(--muted);text-decoration:none;padding:8px 0;
  min-height:36px;display:inline-flex;align-items:center;
}
.footer-links a:hover{color:var(--ink)}
.footer-base{
  border-top:1px solid var(--line-soft);padding:18px 0 34px;margin-top:8px;
}
.footer-base p{color:var(--faint);font-size:12.5px;margin:0}
@media(max-width:760px){
  .footer-in{flex-direction:column;gap:18px;padding-top:26px}
  .footer-links ul{gap:18px}
}

/* Pagination — left-aligned, never centred. */
.nav-links,.pagination{
  display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-start;align-items:center;
  margin:0 0 52px;
}
.nav-links .page-numbers,
.pagination .page-numbers{
  display:inline-flex;align-items:center;justify-content:center;
  min-width:40px;min-height:40px;border:1px solid var(--line);border-radius:8px;
  padding:8px 12px;color:var(--ink-2);text-decoration:none;font-size:13.5px;font-weight:500;
}
.nav-links .page-numbers:hover,
.pagination .page-numbers:hover{color:#fff;border-color:#3a424e}
.nav-links .page-numbers.current,
.pagination .page-numbers.current{background:var(--ink);color:#0a0c0e;border-color:var(--ink)}
.nav-links .page-numbers.dots{border:none;min-width:0;padding:8px 4px}

/* 404 */
.ca-404{padding:44px 0 52px}
.ca-404 h1{
  font-family:var(--paper-serif);font-size:clamp(32px,4.6vw,50px);line-height:1.08;
  font-weight:600;margin:0 0 14px;max-width:20ch;color:var(--ink);
}
.ca-404 p{color:var(--muted);font-size:15.5px;line-height:1.7;max-width:62ch;margin:0 0 22px}
.ca-404 .ca-404-actions{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:28px}

/* ============================================================
   11. Form controls — dark natively, everywhere
   (the white comment textarea was the "white section" the
   user saw; it must never come back)
   ============================================================ */
input[type="text"],input[type="email"],input[type="url"],
input[type="search"],input[type="tel"],textarea,select{
  background:var(--panel);border:1px solid var(--line);border-radius:8px;
  color:var(--ink);font-family:var(--sans);font-size:14px;padding:10px 12px;
}
/* v1.0.2 — form controls never exceed their container. The
   comment textarea (cols=45, ~340px) rendered wider than a
   320px column and scrolled the whole article sideways.
   (The search field is type="search" and keeps its flex
   sizing; it is deliberately not in this list.) */
.comment-form input[type="text"],.comment-form input[type="email"],.comment-form input[type="url"],.comment-form textarea,
input[type="text"],input[type="email"],input[type="url"],input[type="tel"],select,textarea{
  max-width:100%;box-sizing:border-box;
}
.comment-form input[type="text"],.comment-form input[type="email"],.comment-form input[type="url"],.comment-form textarea{width:100%}
input:focus,textarea:focus,select:focus{outline:none;border-color:var(--signal)}
input::placeholder,textarea::placeholder{color:var(--faint)}

/* ============================================================
   12. Core block fixes — keep blocks left-aligned and
   inside this theme's containers
   ============================================================ */
.wp-block-columns{display:flex;flex-wrap:wrap;gap:2em;margin:0 0 20px}
.wp-block-column{flex:1 1 0;min-width:0}
.wp-block-image{margin:0 0 20px}
.wp-block-image img{border-radius:12px}
.wp-block-image figcaption{font-size:12.5px;color:var(--muted);margin-top:9px;line-height:1.55;text-align:left}
.wp-block-buttons{display:flex;flex-wrap:wrap;gap:10px;justify-content:flex-start}
.wp-block-button{margin:0}
.wp-block-paragraph{margin:0 0 16px}
.wp-block-list{margin:0 0 16px;padding-left:22px}
.wp-block-list li{margin-bottom:6px}
.wp-block-quote{
  margin:28px 0;padding:4px 0 4px 20px;border-left:3px solid var(--signal);
  font-size:20px;line-height:1.5;color:var(--ink);font-style:italic;
}
.wp-block-quote cite{
  display:block;font-style:normal;font-family:var(--mono);font-size:12px;
  color:var(--muted);margin-top:10px;letter-spacing:.06em;
}
.wp-block-separator{border:none;border-top:1px solid var(--line);margin:36px 0}
.wp-block-post-featured-image{margin:0 0 22px}
.wp-block-post-featured-image img{border-radius:14px;border:1px solid var(--line);width:100%}
.has-text-align-center{text-align:left!important}
.has-text-align-right{text-align:left!important}

/* Generic page/post content wrappers share the same rules. */
.ca-main{padding:0}
.ca-main > .wrap{padding-top:0}
.ca-section{padding:52px 0}
.ca-section.tight{padding:36px 0}

/* ============================================================
   13. Palette guard — category and tag links.
   The previous theme era's Customizer CSS coloured these
   green (#a2c874). The theme's own files contain no green
   (verified by a full hex inventory of style.css), so the
   green on the live site comes from outside the theme —
   most likely that old Customizer block still being served
   from cache. These rules are deliberately more specific
   (and !important on colour) so the prototype palette —
   orange + gold + ink, never green — always wins, whatever
   stale CSS loads. The permanent fix is to clear the site
   cache and remove the old theme's Additional CSS; this
   guard makes the site correct even before that happens.
   Gold IS used now: the "Full article + film" kicker pill
   and the transcript times are gold (#d9b45b).
   ============================================================ */
.ca-article-head .kicker-row a.tag{color:var(--ink-2)!important}
.ca-article-head .kicker-row a.tag.hot{color:#ffb59f!important}
.ca-article-head .kicker-row a.tag.gold{color:var(--gold)!important}
.ca-article .ca-tags a{color:var(--muted)!important}
.ca-article .ca-tags a:hover{color:var(--ink)!important}
.ca-front .entry-content > .ca-kicker-row .tag{color:var(--ink-2)!important}
.ca-front .entry-content > .ca-kicker-row .tag.hot{color:#ffb59f!important}
.ca-front .entry-content > .ca-kicker-row .tag.gold{color:var(--gold)!important}

/* ============================================================
   14. Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce){
  html{scroll-behavior:auto}
  *{transition:none!important}
}
