/* ═══════════════════════════════════════════════════════════════════════════
   The Feed — EDITORIAL UI mode stylesheet.

   The Feed's sole UI (the former classic/gruvbox mode + ui_mode toggle were
   removed 2026-07-18): loaded by index.html / article.html. Print-broadsheet
   look: paper ground, ink, one accent, hairline grid, mono labels, display
   headlines, serif body.

   Rules (EDITORIAL_UI_BRIEF): CDN-free (no @import of web fonts — system/free
   stacks only), motion via CSS scroll-driven animations + IntersectionObserver
   only, honor prefers-reduced-motion.

   Phase 0.5 = design tokens + base ground/typography. Token NAMES mirror The
   Hunt's editorial.css so the suite has one editorial dialect; The Feed adds
   --ed-serif for the newspaper body/hero-drop-cap exception the brief allows.
   Layout (Phases 1–2) and motion (Phase 3) build on these.

   THEME NEUTRALIZATION (Hunt 3.4a precedent, finalized here): editorial has ONE
   deliberate look — paper-light. The editorial templates omit #themeToggle
   entirely (kaepora-core.js null-guards it, so no error). kaepora-core still
   stamps html[data-theme] from localStorage, so we must NOT depend on classic's
   theme vars: the editorial ground/ink below are set on `.feed-editorial`
   directly and win over kaepora-base's `body` rule regardless of data-theme.
   ═══════════════════════════════════════════════════════════════════════════ */

.feed-editorial {
  /* ── Grounds ─────────────────────────────────────────────────────────────*/
  --ed-paper: #efefec;        /* page ground — warm paper gray, never pure white */
  --ed-panel: #f6f6f3;        /* raised panel ground */
  --ed-plate: #e4e4df;        /* media / annotation-plate ground */
  --ed-bar: #121212;          /* section bars, ticker */
  --ed-bar-muted: #9a9a94;    /* secondary bar */

  /* ── Ink ─────────────────────────────────────────────────────────────────*/
  --ed-ink: #161616;
  --ed-ink-soft: #3a3a36;
  --ed-ink-faint: #75756e;
  --ed-on-bar: #f5f5f2;       /* text on the black bars/ticker */
  --ed-on-ink: #f5f5f2;       /* text on an ink-colored chip (active pills etc.) */

  /* ── Accent (one, orange family) ───────────────────────────────────────────
     --ed-accent = the vivid mark; --ed-accent-text = same hue darkened to
     >=4.5:1 on paper for accent TEXT on light grounds (a11y). */
  --ed-accent: #ff4d00;
  --ed-accent-text: #c03a00;

  /* ── Structure ─────────────────────────────────────────────────────────────*/
  --ed-hairline: #c8c8c1;
  --ed-hair: 1px solid var(--ed-hairline);
  --ed-gutter: clamp(16px, 3vw, 48px);

  /* ── Type stacks (free/system only — no CDN fonts) ─────────────────────────*/
  --ed-mono: ui-monospace, "Cascadia Mono", "Cascadia Code", Consolas,
             "SFMono-Regular", "Liberation Mono", Menlo, monospace;
  --ed-display: "Archivo", "Inter", "Segoe UI Variable Display", "Segoe UI",
                system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --ed-serif: Georgia, "Iowan Old Style", "Times New Roman", "Liberation Serif",
              serif;                       /* broadsheet body + hero drop cap */

  /* ── Type sizes ────────────────────────────────────────────────────────────*/
  --ed-fs-label: 0.6875rem;                     /* 11px mono-caps chrome */
  --ed-fs-body: 1rem;                            /* reading text (serif runs larger) */
  --ed-fs-h: clamp(1.75rem, 3.5vw, 2.75rem);    /* section headings */
  --ed-fs-hero: clamp(2.5rem, 6vw, 5rem);       /* front-page lead headline */
  --ed-fs-marquee: clamp(3.5rem, 10vw, 9.2rem); /* divider marquees */

  /* ── Chrome metrics ────────────────────────────────────────────────────────*/
  --ed-ticker-h: 2.05rem;

  /* ── Motion (IntersectionObserver reveals; overridden under reduced-motion) ─*/
  --ed-reveal-dist: 20px;
  --ed-reveal-dur: 320ms;
  --ed-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-reduced-motion: reduce) {
  .feed-editorial {
    --ed-reveal-dist: 0px;
    --ed-reveal-dur: 0ms;
  }
}

/* ═══════════════════════════════ Color themes ═════════════════════════════════
   The broadsheet LAYOUT is fixed; only the palette (the --ed-* tokens) changes.
   The chosen theme is stamped on <html data-ed-theme="…"> (no-flash inline head
   script + editorial.js). "default" = the base tokens above. Selector wins over
   the base .feed-editorial rule by specificity. */
html[data-ed-theme="dark"] .feed-editorial {           /* Dark — gruvbox palette */
  --ed-paper: #282828;
  --ed-panel: #3c3836;
  --ed-plate: #504945;
  --ed-bar: #1d2021;
  --ed-bar-muted: #928374;
  --ed-ink: #ebdbb2;
  --ed-ink-soft: #d5c4a1;
  --ed-ink-faint: #a89984;
  --ed-on-bar: #ebdbb2;
  --ed-on-ink: #282828;       /* ink flips light in gruvbox — chip text goes dark */
  --ed-accent: #fe8019;
  --ed-accent-text: #fe8019;    /* light-on-dark; already high contrast */
  --ed-hairline: #665c54;
}
html[data-ed-theme="hyrule"] .feed-editorial {         /* Hyrule — parchment, green & gold */
  --ed-paper: #f4ecd6;
  --ed-panel: #ece2c4;
  --ed-plate: #e2d6b2;
  /* Darkened from #1c3b2a (2026-08-25): that green was light enough that no
     per-desk accent could clear 4.5:1 as text or chip fill on it — the house
     orange itself only managed 3.7:1. Still hyrule green, just a night green.
     Its own on-bar parchment reads 12.5:1. */
  --ed-bar: #12281a;
  --ed-bar-muted: #7f9a86;
  --ed-ink: #1b2a1f;
  --ed-ink-soft: #33463a;
  --ed-ink-faint: #6a7c6d;
  --ed-on-bar: #f0e6c8;
  --ed-on-ink: #f0e6c8;
  --ed-accent: #c8a13a;
  --ed-accent-text: #7a5c12;    /* darkened gold for AA text on parchment */
  --ed-hairline: #c9bda0;
}

/* ═══════════════════════ Per-desk accent (2026-08-25) ═════════════════════════
   The accent is no longer one orange for the whole paper — it is the DESK's
   colour, and every place the accent is used (ticker mark + number, active desk
   chip, marquee, rules, section bar, briefing keyline, focus ring) picks it up
   for free because they all already read --ed-accent / --ed-accent-text.

   Two tokens per desk, same contract as the base palette:
     --ed-accent       the vivid mark. It is TEXT on the black/green bar AND the
                       fill behind the active desk chip, so it must clear 4.5:1
                       on every bar ground: #121212, #1d2021, #12281a — and on
                       gruvbox's #282828 "paper", since the rule at the bottom
                       re-points that theme's accent-text at it.
     --ed-accent-text  the same hue darkened for accent TEXT on a light ground,
                       ≥4.5:1 on both #efefec paper and #f4ecd6 parchment.
   Both columns were SOLVED against those grounds, not eyeballed — the first
   hand-picked set missed on six of them. Worst measured ratios: 4.62 (general
   vivid on #282828) and 4.61 (security text on parchment).

   Hues are spread so no two desks read alike; `general` is deliberately
   desaturated to a slate so it does not become a second blue beside `tech`, and
   `ai` sits at chartreuse (h88) — between endpoint's gold (h43) and finance's
   green (h135), 45° from each — after Jesse vetoed the original magenta.

   `body` + two classes = (0,2,2), which beats the html[data-ed-theme] palette
   rules at (0,2,1), so one table serves all three themes. signal.js stamps
   body.section-<key>. */
html body.feed-editorial.section-front    { --ed-accent: #f95e10; --ed-accent-text: #b83d00; }  /* orange — the house mark */
html body.feed-editorial.section-general  { --ed-accent: #5ea50d; --ed-accent-text: #417703; }  /* chartreuse (swapped with ai 2026-08-27) */
html body.feed-editorial.section-ai       { --ed-accent: #8591a3; --ed-accent-text: #536988; }  /* slate (swapped with general 2026-08-27) */
html body.feed-editorial.section-security { --ed-accent: #fe585d; --ed-accent-text: #d60007; }  /* red */
html body.feed-editorial.section-tech     { --ed-accent: #2797e7; --ed-accent-text: #096db3; }  /* blue */
html body.feed-editorial.section-endpoint { --ed-accent: #bd8c0f; --ed-accent-text: #866103; }  /* gold */
html body.feed-editorial.section-science  { --ed-accent: #12a588; --ed-accent-text: #06745e; }  /* teal */
html body.feed-editorial.section-politics { --ed-accent: #be70eb; --ed-accent-text: #9e18ec; }  /* purple */
html body.feed-editorial.section-finance  { --ed-accent: #18aa3d; --ed-accent-text: #0a7625; }  /* green */
/* Saved is a view, not a desk — it keeps the house mark. */
html body.feed-editorial.section-saved    { --ed-accent: #f95e10; --ed-accent-text: #b83d00; }

/* Dark theme's "paper" IS dark (#282828), so the paper-tuned accent-text above
   would be unreadable on it. Point it back at the vivid mark — exactly what the
   base gruvbox palette already does with its orange. (0,3,2) beats the table. */
html[data-ed-theme="dark"] body.feed-editorial[class*="section-"] {
  --ed-accent-text: var(--ed-accent);
}

/* ── Base ground + typography (wins over kaepora-base's body regardless of the
      data-theme kaepora-core stamps on <html>) ───────────────────────────────*/
body.feed-editorial {
  background: var(--ed-paper);
  color: var(--ed-ink);
  font-family: var(--ed-display);
  font-size: var(--ed-fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  margin: 0;
}

.feed-editorial h1,
.feed-editorial h2,
.feed-editorial h3,
.feed-editorial h4 {
  font-family: var(--ed-display);
  color: var(--ed-ink);
  letter-spacing: -0.01em;
  line-height: 1.08;
}

.feed-editorial a { color: var(--ed-accent-text); }

/* Overflow safety (3.4): media never exceeds its column; long unbreakable
   tokens (URLs in claims, etc.) wrap instead of forcing horizontal scroll. */
.feed-editorial img { max-width: 100%; }
.feed-editorial .sw-hero-title,
.feed-editorial .sw-pcard-headline,
.feed-editorial .sw-tcard-headline,
.feed-editorial .ed-article h1,
.feed-editorial .ed-article-body,
.feed-editorial .sw-briefing-text { overflow-wrap: break-word; }

/* Mono-caps chrome label (masthead strip, plate labels, filter labels). */
.feed-editorial .ed-label,
.feed-editorial .ed-plate-label,
.feed-editorial .ed-filter-label,
.feed-editorial .ed-last-updated {
  font-family: var(--ed-mono);
  font-size: var(--ed-fs-label);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ed-ink-faint);
}

/* Serif body — the newspaper exception (article body + reading runs). */
.feed-editorial .ed-article-body,
.feed-editorial .ed-briefing-body,
.feed-editorial .ed-hero-content p {
  font-family: var(--ed-serif);
}

/* ═══════════════════════ 1.0 Masthead (nameplate) ═════════════════════════ */
.feed-editorial .ed-masthead {
  padding: clamp(1rem, 3vw, 2rem) var(--ed-gutter) 0.75rem;
  text-align: center;
}
.feed-editorial .ed-masthead-strip {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}
.feed-editorial .ed-masthead-strip .ed-hub-brand {
  text-decoration: none;
  color: var(--ed-ink-faint);
}
.feed-editorial .ed-masthead-strip .ed-hub-brand:hover { color: var(--ed-accent-text); }
.feed-editorial .ed-masthead-rule { border-top: 2px solid var(--ed-ink); margin: 0.4rem 0; }
.feed-editorial .ed-nameplate {
  font-family: var(--ed-display);
  font-weight: 900;
  font-size: clamp(3rem, 12vw, 8rem);
  line-height: 0.9;
  letter-spacing: -0.03em;
  margin: 0.35rem 0;
  text-transform: uppercase;
}
.feed-editorial .ed-masthead-sub {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}
.feed-editorial .ed-last-updated { font-style: italic; }

/* ═══════════════════ 1.1 Sticky chrome: toolbar + ticker ══════════════════ */
.feed-editorial .ed-topchrome {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--ed-paper);
  border-bottom: var(--ed-hair);
}
/* The section nav and the toolbar controls now live INSIDE the black ticker
   row (index.html), so both are styled for the bar ground, not for paper. */
.feed-editorial .ed-section-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
}
/* Ticker-hosted nav only (index.html); base.html's .bsheet-section-nav keeps
   its own centred paper layout. The desks sit right of the title, hairlined
   off it (2026-09-03); the toolbar controls take the far right. */
.feed-editorial .ed-ticker .ed-section-nav {
  margin-left: 0.25rem;
  padding-left: 0.75rem;
  border-left: 1px solid var(--ed-bar-muted);
}
.feed-editorial .ed-ticker .ed-toolbar-controls { margin-left: auto; }
/* The bar's links fade in as the bar pins to the top of the window
   (editorial.js watchPinned sets body.ed-bar-pinned). The title itself stays. */
.feed-editorial .ed-ticker .ed-ticker-mark,
.feed-editorial .ed-ticker .ed-ticker-section,
.feed-editorial .ed-ticker .ed-section-nav,
.feed-editorial .ed-ticker .ed-toolbar-controls { opacity: 0; transition: opacity 320ms ease; }
.feed-editorial.ed-bar-pinned .ed-ticker .ed-ticker-mark,
.feed-editorial.ed-bar-pinned .ed-ticker .ed-ticker-section,
.feed-editorial.ed-bar-pinned .ed-ticker .ed-section-nav,
.feed-editorial.ed-bar-pinned .ed-ticker .ed-toolbar-controls,
.feed-editorial.search-open .ed-ticker .ed-toolbar-controls { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .feed-editorial .ed-ticker .ed-ticker-mark,
  .feed-editorial .ed-ticker .ed-ticker-section,
  .feed-editorial .ed-ticker .ed-section-nav,
  .feed-editorial .ed-ticker .ed-toolbar-controls { opacity: 1; transition: none; }
}
.feed-editorial .ed-section-btn {
  font-family: var(--ed-mono);
  font-size: var(--ed-fs-label);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: transparent;
  border: 1px solid transparent;
  color: var(--ed-bar-muted);
  padding: 0.25rem 0.45rem;
  cursor: pointer;
  white-space: nowrap;
}
.feed-editorial .ed-section-btn:hover { color: var(--ed-on-bar); }
.feed-editorial .ed-section-btn.active {
  color: var(--ed-bar);
  background: var(--ed-accent);
}
/* In the ticker the title already names the current desk, and the mark is
   the way back to the front page — so the nav shows neither (Jesse
   2026-09-04: "FRONT PAGE | FRONT PAGE"). base.html's paper nav is untouched. */
.feed-editorial .ed-ticker .ed-section-btn.active,
.feed-editorial .ed-ticker .ed-section-btn[data-section="front"] { display: none; }
.feed-editorial .ed-toolbar-controls {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.feed-editorial .ed-search {
  font-family: var(--ed-mono);
  font-size: var(--ed-fs-label);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: transparent;
  border: var(--ed-hair);
  color: var(--ed-ink);
  padding: 0.3rem 0.5rem;
  width: 8rem;
}
.feed-editorial .ed-btn {
  font-family: var(--ed-mono);
  font-size: var(--ed-fs-label);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: transparent;
  border: var(--ed-hair);
  color: var(--ed-ink);
  padding: 0.3rem 0.55rem;
  cursor: pointer;
}
.feed-editorial .ed-btn:hover { background: var(--ed-ink); color: var(--ed-on-ink); }

/* Icon buttons (search ⌕, refresh ↻) — inline SVG, no icon font in this UI. */
.feed-editorial .ed-btn-icon { display: inline-flex; align-items: center; justify-content: center; padding: 0.3rem 0.45rem; }
.feed-editorial .ed-btn svg { width: 0.95rem; height: 0.95rem; display: block; }
.feed-editorial .ed-btn.is-refreshing svg { animation: ed-spin 0.8s linear infinite; transform-origin: 50% 50%; }

/* Search form: input seams into the magnifier submit button; close hidden until
   fill-the-screen mode. */
.feed-editorial .ed-search-form { display: inline-flex; align-items: center; gap: 0; }
.feed-editorial .ed-search-form .ed-search { border-right: none; }
.feed-editorial .ed-search-close { display: none; }

/* Fill-the-screen search (Enter / ⌕): the sticky bar becomes one big full-width
   search bar; the front-page cover + section nav step aside so the query and
   its results own the screen. The bar itself must STAY (it now hosts the search
   form) — only its section furniture goes. Exit with ✕ or Esc. */
.feed-editorial.search-open #edMasthead,
.feed-editorial.search-open #edQuicknav,
.feed-editorial.search-open .ed-ticker-mark,
.feed-editorial.search-open .ed-ticker-current,
.feed-editorial.search-open .ed-section-nav,
.feed-editorial.search-open #refreshBtn,
.feed-editorial.search-open #settingsBtn,
/* Nothing above the "FROM THE OPEN WEB" banner is reachable while searching —
   hide the filter/benchmark bars and the front-page furniture so the banner is
   the top of the scroll (Jesse 2026-07-20). */
.feed-editorial.search-open #filterBar,
.feed-editorial.search-open #benchmarkPanel,
.feed-editorial.search-open #briefingPanel,
.feed-editorial.search-open #topRow,
.feed-editorial.search-open #edMarquee { display: none !important; }
/* Web lane first (right under the bar); the Feed's own matches sit below it. */
.feed-editorial.search-open .ed-page { display: flex; flex-direction: column; }
.feed-editorial.search-open #webSearchPanel { order: -1; margin-top: 0; }
.feed-editorial.search-open .ed-toolbar-controls { flex: 1; width: 100%; }
.feed-editorial.search-open .ed-search-form { flex: 1; width: 100%; }
.feed-editorial.search-open .ed-ticker-inner { flex-wrap: nowrap; }
.feed-editorial.search-open .ed-search {
  flex: 1; width: auto;
  font-size: clamp(1.1rem, 2.5vw, 1.9rem);
  letter-spacing: 0.02em;
  padding: 0.55rem 0.7rem;
}
.feed-editorial.search-open .ed-search-go { padding: 0.5rem 0.8rem; }
.feed-editorial.search-open .ed-btn.ed-search-go svg { width: 1.3rem; height: 1.3rem; }
.feed-editorial.search-open .ed-search-close {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.15rem; line-height: 1; padding: 0.5rem 0.8rem; margin-left: 0.5rem;
}
@media (prefers-reduced-motion: reduce) {
  .feed-editorial .ed-btn.is-refreshing svg { animation: none; }
}

.feed-editorial .ed-ticker {
  background: var(--ed-bar);
  color: var(--ed-on-bar);
}
.feed-editorial .ed-ticker-inner {
  display: flex;
  align-items: center;
  gap: 0.5rem 1rem;
  flex-wrap: wrap;
  padding: 0.3rem var(--ed-gutter);
  min-height: var(--ed-ticker-h);
  font-family: var(--ed-mono);
}
/* Title = accent "▲ FRONT PAGE" mark (a button back to the front page) + the
   desk name, one weight so it reads as one phrase. editorial.js shrinks the
   mark to the bare triangle on the front page itself. */
.feed-editorial .ed-ticker-mark {
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--ed-accent);
  white-space: nowrap;
  background: none; border: 0; padding: 0; cursor: pointer;
}
.feed-editorial .ed-ticker-mark:hover { color: var(--ed-on-bar); }
.feed-editorial .ed-ticker-current {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-weight: 700;
}
.feed-editorial .ed-ticker-section {
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
/* Chrome controls (search / refresh / account) on the bar ground. */
.feed-editorial .ed-ticker .ed-btn,
.feed-editorial .ed-ticker .ed-search {
  color: var(--ed-on-bar);
  border-color: var(--ed-bar-muted);
}
.feed-editorial .ed-ticker .ed-search::placeholder { color: var(--ed-bar-muted); }
.feed-editorial .ed-ticker .ed-btn:hover {
  background: var(--ed-accent);
  color: var(--ed-bar);
  border-color: var(--ed-accent);
}

/* ═══════════════════ 1.2 Quick-navigation ledger index ════════════════════ */
.feed-editorial .ed-quicknav {
  margin: 0 var(--ed-gutter) 1.25rem;
  border: var(--ed-hair);
}
/* Plain plate label. It was a disclosure <button> ("Index — Three Sections" +
   caret) back when the index survived onto section pages; it only ever renders
   on the front page now, so there is nothing to collapse (Jesse 2026-08-25). */
.feed-editorial .ed-quicknav-head {
  border-bottom: var(--ed-hair);
  padding: 0.4rem 0.75rem;
  background: var(--ed-panel);
}
.feed-editorial .ed-quicknav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.feed-editorial .ed-quicknav-row { border-right: var(--ed-hair); border-bottom: var(--ed-hair); }
/* last column / last row: drop the doubled outer hairline */
.feed-editorial .ed-quicknav-row:nth-child(3n) { border-right: none; }
.feed-editorial .ed-quicknav-row:nth-last-child(-n+3) { border-bottom: none; }
.feed-editorial .ed-quicknav-link {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "num name" "num sub";
  column-gap: 0.6rem;
  align-items: baseline;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0.6rem 0.75rem;
  color: var(--ed-ink);
}
.feed-editorial .ed-quicknav-link:hover { background: var(--ed-panel); }
.feed-editorial .ed-quicknav-link.active { background: var(--ed-ink); color: var(--ed-on-ink); }
.feed-editorial .ed-quicknav-link.active .ed-quicknav-sub,
.feed-editorial .ed-quicknav-link.active .ed-quicknav-num { color: var(--ed-accent); }
.feed-editorial .ed-quicknav-num {
  grid-area: num;
  font-family: var(--ed-mono);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ed-accent-text);
  line-height: 1;
}
.feed-editorial .ed-quicknav-name {
  grid-area: name;
  font-family: var(--ed-display);
  font-weight: 800;
  font-size: 1.1rem;
}
.feed-editorial .ed-quicknav-sub { grid-area: sub; }
.feed-editorial .ed-quicknav-foot {
  border-top: var(--ed-hair);
  padding: 0.4rem 0.75rem;
  color: var(--ed-ink-faint);
  font-style: italic;
  text-transform: none;
  letter-spacing: 0.04em;
}

@media (max-width: 720px) {
  .feed-editorial .ed-quicknav-list { grid-template-columns: 1fr; }
  .feed-editorial .ed-quicknav-row { border-right: none; }
  .feed-editorial .ed-quicknav-row:nth-last-child(-n+3) { border-bottom: var(--ed-hair); }
  .feed-editorial .ed-quicknav-row:last-child { border-bottom: none; }
}

/* ═══════════════════════ 1.3 Section bars ═════════════════════════════════
   The numbered STICKY bar above the article grid went 2026-08-26 (third
   repetition of the section name on one screen), and its slim divider
   replacement followed 2026-08-27 — the grid's 2px top rule is divider enough.
   .ed-section-bar itself survives for the web-search banner, no longer sticky. */

.feed-editorial .ed-page {
  padding: 1.25rem var(--ed-gutter) 4rem;
}
.feed-editorial .ed-section-bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  background: var(--ed-bar);
  color: var(--ed-on-bar);
  padding: 0.55rem 0.9rem;
  margin: 1.5rem 0 1rem;
}
.feed-editorial .ed-section-bar-main {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  font-family: var(--ed-mono);
  text-transform: uppercase;
}
.feed-editorial .ed-section-bar-num {
  color: var(--ed-accent);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
}
.feed-editorial .ed-section-bar-kicker {
  font-size: var(--ed-fs-label);
  letter-spacing: 0.2em;
  color: var(--ed-bar-muted);
}
.feed-editorial .ed-section-bar-name {
  font-family: var(--ed-display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.06em;
}
.feed-editorial .ed-section-bar-sub {
  font-family: var(--ed-mono);
  font-size: var(--ed-fs-label);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ed-bar-muted);
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
}
.feed-editorial .ed-section-bar-sub .ed-count { color: var(--ed-on-bar); }

/* ═══════════════════════════ 1.4 Marquee divider ══════════════════════════ */
.feed-editorial .ed-marquee {
  overflow: hidden;
  white-space: nowrap;
  border-top: 2px solid var(--ed-ink);
  border-bottom: 2px solid var(--ed-ink);
  margin: 2rem calc(-1 * var(--ed-gutter)) 1rem;  /* bleed to viewport edges */
  padding: 0.25rem 0;
  user-select: none;
}
.feed-editorial .ed-marquee-track {
  display: inline-flex;
  align-items: baseline;
  will-change: transform;
  /* Fallback pace only: editorial.js overrides animation-duration to
     track-width / 35px-per-second, so ARTIFICIAL INTELLIGENCE and AI scroll at
     the SAME speed instead of the same period (26s made wide names fly at
     ~130px/s while short ones crawled — Jesse 2026-08-26). */
  animation: ed-marquee-scroll 90s linear infinite;
}
.feed-editorial .ed-marquee-half { display: inline-flex; align-items: baseline; }
.feed-editorial .ed-marquee-word {
  font-family: var(--ed-display);
  font-weight: 900;
  font-size: var(--ed-fs-marquee);
  line-height: 1;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--ed-ink);
  padding: 0 0.15em;
}
.feed-editorial .ed-marquee-word.ed-marquee-accent {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--ed-ink);
}
.feed-editorial .ed-marquee-dot {
  font-size: calc(var(--ed-fs-marquee) * 0.4);
  color: var(--ed-accent);
  padding: 0 0.25em;
  align-self: center;
}

@keyframes ed-marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .feed-editorial .ed-marquee-track { animation: none; }
  /* Static fallback: only the first half is visible, no motion. */
  .feed-editorial .ed-marquee-half:nth-child(2) { display: none; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   2.1 FRONT PAGE — broadsheet lead + ledger rows + print score annotations.
   signal.js owns the injected markup (.sw-hero-*, .sw-card/.sw-pcard/.sw-tcard,
   .badge-trust*); editorial.css only re-dresses it. Same card markup renders
   on every section, so these ledger-row styles carry into 2.2.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Front-page top: lead column + aside ───────────────────────────────────
   The rail is sized by the lead (Jesse 2026-09-03). The Latest and Top
   Stories lists carry an explicit three-row height, so the rail's own
   contribution to the grid row is exactly "three + three" (plus Research
   where it shows); the row therefore takes the LEAD's height whenever the
   lead is taller, the grid stretches the rail to match, and the two .ed-aside-
   fill blocks grow (flex) to split the extra — each list scrolls inside
   whatever height it ends up with. A short lead still gets three and three. */
.feed-editorial .ed-top {
  --ed-latest-min: 15.4rem;   /* 3 × .sw-stack-item (56px thumb + padding) */
  --ed-top-min: 14rem;        /* 3 × .sw-top-item with a two-line title */
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 0 var(--ed-gutter);
  align-items: stretch;
}
.feed-editorial .ed-lead { border-right: var(--ed-hair); padding-right: var(--ed-gutter); }
.feed-editorial .ed-aside { display: flex; flex-direction: column; gap: 1.5rem; }
.feed-editorial .ed-aside-block {
  border-top: 2px solid var(--ed-ink); padding-top: 0.5rem;
  display: flex; flex-direction: column;
}
.feed-editorial .ed-aside-block.ed-aside-fill { flex: 1 0 auto; }
.feed-editorial .ed-aside-block .ed-plate-label { flex: 0 0 auto; }
.feed-editorial .ed-plate-label {
  display: block;
  margin-bottom: 0.6rem;
}

/* ── Hero: broadsheet lead ──────────────────────────────────────────────────*/
.feed-editorial .ed-hero .ed-plate-label { margin-bottom: 0.4rem; }
.feed-editorial .sw-hero-wrap { cursor: pointer; }
.feed-editorial .sw-hero-image-block { margin-bottom: 0.75rem; }
.feed-editorial .sw-hero-img,
.feed-editorial .sw-hero-img-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: var(--ed-hair);
  background: var(--ed-plate);
  display: block;
}
.feed-editorial .sw-hero-img-placeholder { display: grid; place-items: center; color: var(--ed-ink-faint); }
.feed-editorial .sw-hero-kicker,
.feed-editorial .sw-stack-kicker,
.feed-editorial .sw-entry-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--ed-mono);
  font-size: var(--ed-fs-label);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ed-ink-faint);
  margin-bottom: 0.35rem;
}
.feed-editorial .sw-cat-chip {
  color: var(--ed-accent-text);
  border: 1px solid var(--ed-accent-text);
  padding: 0 0.35em;
}
.feed-editorial .sw-hero-title {
  font-family: var(--ed-display);
  font-weight: 900;
  font-size: var(--ed-fs-hero);
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin: 0.3rem 0 0.6rem;
}
.feed-editorial .sw-hero-lede {
  font-family: var(--ed-serif);
  font-size: 1.08rem;
  line-height: 1.6;
  margin: 0 0 0.9rem;
}
/* Byline under the lead headline (Jesse 2026-09-03: "show the story's author").
   Only rendered when the wire carried one (signal.js renderHero). */
.feed-editorial .sw-hero-byline {
  font-family: var(--ed-mono);
  font-size: var(--ed-fs-label);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ed-ink-soft);
  margin: 0 0 0.6rem;
}
/* Serif drop cap — skeptic broadsheet heritage. */
.feed-editorial .sw-hero-lede::first-letter {
  font-family: var(--ed-serif);
  font-weight: 700;
  float: left;
  font-size: 3.4em;
  line-height: 0.72;
  padding: 0.05em 0.12em 0 0;
  color: var(--ed-accent-text);
}
.feed-editorial .sw-hero-footer {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ── "The Latest" stack (aside) — newest research papers, all labs ──────────
   Three rows minimum, then it grows with the lead (see .ed-top) and scrolls
   the rest. Was a fixed ~6-row cap (2026-07-20) that ran past the lead. */
.feed-editorial .ed-hero-stack {
  height: var(--ed-latest-min);
  flex: 1 0 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.feed-editorial .ed-hero-stack::-webkit-scrollbar { width: 6px; }
.feed-editorial .ed-hero-stack::-webkit-scrollbar-thumb {
  background: var(--ed-ink-faint); border-radius: 3px;
}
.feed-editorial .sw-stack-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  padding: 0.6rem 0;
  border-top: var(--ed-hair);
  cursor: pointer;
}
.feed-editorial .sw-stack-item:first-child { border-top: none; }
.feed-editorial .sw-stack-thumb-wrap { order: 2; }
.feed-editorial .sw-stack-thumb,
.feed-editorial .sw-stack-thumb-placeholder {
  width: 56px; height: 56px; object-fit: cover;
  border: var(--ed-hair); background: var(--ed-plate);
  display: grid; place-items: center; color: var(--ed-ink-faint);
}
.feed-editorial .sw-stack-title {
  font-family: var(--ed-display);
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.15;
}
.feed-editorial .sw-stack-item:hover .sw-stack-title { color: var(--ed-accent-text); }

/* ── Article grid (#articleFeed) — 3-column magazine layout ─────────────────
   signal.js's arrangeForGrid orders stories so the outer columns get photo
   cards (.sw-pcard, with a picture) and the middle column gets text cards
   (.sw-tcard, no picture); auto-flow across 3 columns places index%3 = 0 left,
   1 middle, 2 right. Hairline column rules keep the broadsheet feel. */
.feed-editorial #articleFeed.cols3,
.feed-editorial #articleFeed {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  /* stretch, not start: the middle text cards are half the height of the
     photo cards beside them, and top-aligned they left a ragged hole in every
     row with the hairlines out of step (Jesse 2026-09-03). Stretched, each
     row's rules line up; the cards keep their content at the top. */
  align-items: stretch;
  border-top: 2px solid var(--ed-ink);
}
.feed-editorial .sw-card {
  display: flex;
  flex-direction: column;
  padding: 0.9rem 1rem;
  border-right: var(--ed-hair);
  border-bottom: var(--ed-hair);
  cursor: pointer;
}
.feed-editorial #articleFeed .sw-card:nth-child(3n) { border-right: none; }  /* right edge */
.feed-editorial .sw-card:hover { background: var(--ed-panel); }
.feed-editorial .sw-pcard-headline,
.feed-editorial .sw-tcard-headline {
  font-family: var(--ed-display);
  font-weight: 800;
  font-size: 1.2rem;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0.35rem 0 0.3rem;
}
.feed-editorial .sw-card:hover .sw-pcard-headline,
.feed-editorial .sw-card:hover .sw-tcard-headline { color: var(--ed-accent-text); }
.feed-editorial .sw-entry-excerpt {
  font-family: var(--ed-serif);
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--ed-ink-soft);
  margin: 0.15rem 0 0.3rem;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.feed-editorial .sw-entry-dot { color: var(--ed-hairline); }
/* Outer columns: photo cards lead with a full-width picture. */
.feed-editorial .sw-pcard-img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border: var(--ed-hair);
  background: var(--ed-plate);
  margin-bottom: 0.35rem;
}
.feed-editorial .sw-pcard-img-placeholder { display: grid; place-items: center; color: var(--ed-ink-faint); }
/* Middle column: text cards carry no picture by design. */
.feed-editorial .sw-tcard .sw-pcard-img,
.feed-editorial .sw-tcard img { display: none; }

/* ── Score annotations — mono-caps print marks (re-dress .badge-trust) ──────
   signal.js surfaces the SCRUTINY composite (its honest headline metric); the
   brief's TRUST·FALLACY·PROPAGANDA triad is the print STYLE, applied here to
   that metric. Re-composing a raw triad on cards would need signal.js changes
   (out of bounds). Colour cue kept via the trust-* border. */
.feed-editorial .badge-trust {
  font-family: var(--ed-mono);
  font-size: var(--ed-fs-label);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: 1px solid var(--ed-hairline);
  padding: 0.1rem 0.4rem;
  white-space: nowrap;
  color: var(--ed-ink-soft);
}
.feed-editorial .badge-trust.trust-green  { border-color: #2f7d3a; color: #2f7d3a; }
.feed-editorial .badge-trust.trust-yellow { border-color: #9a7d00; color: #7a6400; }
.feed-editorial .badge-trust.trust-orange { border-color: var(--ed-accent-text); color: var(--ed-accent-text); }
.feed-editorial .badge-trust.trust-red    { border-color: #b3261e; color: #b3261e; }
.feed-editorial .badge-trust.badge-unrated { color: var(--ed-ink-faint); border-style: dashed; }

/* ── Pagination ────────────────────────────────────────────────────────────*/
.feed-editorial .ed-pagination,
.feed-editorial #pagination {
  display: flex; flex-wrap: wrap; gap: 0.25rem;
  margin-top: 1.25rem; justify-content: center;
}
.feed-editorial .sw-page-btn {
  font-family: var(--ed-mono);
  font-size: var(--ed-fs-label);
  background: transparent;
  border: var(--ed-hair);
  color: var(--ed-ink);
  padding: 0.3rem 0.6rem;
  cursor: pointer;
}
.feed-editorial .sw-page-btn.active { background: var(--ed-ink); color: var(--ed-on-ink); }
.feed-editorial .sw-page-btn:hover:not(.active) { background: var(--ed-panel); }

@media (max-width: 900px) {
  .feed-editorial .ed-top { grid-template-columns: 1fr; }
  .feed-editorial .ed-lead { border-right: none; padding-right: 0; }
  /* Stacked under the lead there is no height to match: back to a scrolling
     cap so the rail does not eat the phone. */
  .feed-editorial .ed-hero-stack { height: auto; max-height: 26rem; }
  .feed-editorial #topStories { height: auto; max-height: 23rem; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   2.2 CATEGORY SECTIONS — filter chrome (pills, search, sort) as mono-caps.
   The ledger-row treatment (2.1) already carries to every section (same
   signal.js card markup). This dresses the filter bar + benchmark chrome; all
   ids/data-attrs are untouched so signal.js keeps wiring them.
   ═══════════════════════════════════════════════════════════════════════════ */
.feed-editorial .ed-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  padding: 0.6rem var(--ed-gutter);
  border-bottom: var(--ed-hair);
}
.feed-editorial .ed-filter-group { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.feed-editorial .ed-filter-sort { margin-left: auto; }
.feed-editorial .ed-filter-label { color: var(--ed-ink-faint); }

/* Pills (lab + trust) → mono-caps print chips. Overrides kaepora-base .kae-pill
   (editorial.css loads after it). ids/data-attrs stay for signal.js. */
.feed-editorial .kae-pills { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.feed-editorial .kae-pill {
  font-family: var(--ed-mono);
  font-size: var(--ed-fs-label);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: transparent;
  border: var(--ed-hair);
  color: var(--ed-ink-soft);
  border-radius: 0;
  padding: 0.2rem 0.5rem;
  cursor: pointer;
}
.feed-editorial .kae-pill:hover { border-color: var(--ed-ink); }
.feed-editorial .kae-pill.active { background: var(--ed-ink); color: var(--ed-on-ink); border-color: var(--ed-ink); }
.feed-editorial .kae-pill.trust-red.active { background: #b3261e; border-color: #b3261e; }

.feed-editorial .ed-select {
  font-family: var(--ed-mono);
  font-size: var(--ed-fs-label);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: transparent;
  border: var(--ed-hair);
  color: var(--ed-ink);
  border-radius: 0;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
}

/* Benchmark panel (AI section) — plate with a black header bar. */
.feed-editorial .ed-benchmark-panel {
  border: var(--ed-hair);
  margin: 1rem var(--ed-gutter);
  background: var(--ed-panel);
}
.feed-editorial .ed-benchmark-header {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--ed-bar); color: var(--ed-on-bar);
  padding: 0.4rem 0.75rem;
}
.feed-editorial .ed-benchmark-title {
  font-family: var(--ed-mono); font-size: var(--ed-fs-label);
  text-transform: uppercase; letter-spacing: 0.14em;
}
.feed-editorial .ed-benchmark-body { padding: 0.75rem; }

/* ═══════════════════════════════════════════════════════════════════════════
   2.3 ARTICLE SPREAD — single-story broadsheet. Serif body + drop cap;
   print-annotation plates for scores / analyst read / flags / claims. All
   action ids (sw-analyze/score/claims-btn) are in article_editorial.html and
   driven by its inline script — this only dresses them.
   ═══════════════════════════════════════════════════════════════════════════ */
.feed-editorial .ed-article {
  max-width: 760px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 5rem;
}
.feed-editorial .ed-article-masthead {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 2px solid var(--ed-ink);
  padding-bottom: 0.5rem;
  margin-bottom: 1.25rem;
}
.feed-editorial .ed-back { text-decoration: none; color: var(--ed-ink); }
.feed-editorial .ed-back:hover { color: var(--ed-accent-text); }
.feed-editorial .ed-article-edition { color: var(--ed-ink-faint); }

.feed-editorial .ed-article-kicker {
  display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center;
  font-family: var(--ed-mono);
  font-size: var(--ed-fs-label);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ed-ink-faint);
  margin: 0.5rem 0;
}
.feed-editorial .ed-article-kicker .dot { color: var(--ed-hairline); }
.feed-editorial .ed-article h1 {
  font-family: var(--ed-display);
  font-weight: 900;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0.4rem 0 0.8rem;
}
.feed-editorial .ed-article-byline {
  font-family: var(--ed-mono);
  font-size: var(--ed-fs-label);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ed-ink-soft);
  margin-bottom: 0.5rem;
}
.feed-editorial .ed-article-hero { border: var(--ed-hair); }
.feed-editorial .ed-read-source {
  display: inline-block;
  font-family: var(--ed-mono);
  font-size: var(--ed-fs-label);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: var(--ed-accent);
  color: var(--ed-on-bar);
  text-decoration: none;
  padding: 0.45rem 0.8rem;
  margin: 0.5rem 0;
}
.feed-editorial .ed-read-source:hover { filter: brightness(0.92); }
.feed-editorial .ed-divider { border: 0; border-top: var(--ed-hair); margin: 1.25rem 0; }

/* AI action bar — the analyze/score/claims controls as chrome. */
.feed-editorial .ed-ai-bar {
  display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
  border: var(--ed-hair);
  background: var(--ed-panel);
  padding: 0.6rem 0.8rem;
  margin: 0 0 1.5rem;
  font-family: var(--ed-mono);
  font-size: var(--ed-fs-label);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.feed-editorial .ed-ai-model-pill {
  border: 1px solid var(--ed-accent-text);
  color: var(--ed-accent-text);
  padding: 0.05rem 0.4rem;
}

/* Serif body with a drop cap — the broadsheet read. */
.feed-editorial .ed-article-body {
  font-family: var(--ed-serif);
  font-size: 1.1rem;
  line-height: 1.75;
  white-space: pre-wrap;
  margin-bottom: 2rem;
}
.feed-editorial .ed-article-body::first-letter {
  font-family: var(--ed-serif);
  font-weight: 700;
  float: left;
  font-size: 3.6em;
  line-height: 0.72;
  padding: 0.05em 0.12em 0 0;
  color: var(--ed-accent-text);
}

/* Print-annotation plates. */
.feed-editorial .ed-plate {
  border: var(--ed-hair);
  border-left: 3px solid var(--ed-accent);
  background: var(--ed-panel);
  padding: 0.75rem 1rem;
  margin: 0.75rem 0;
}
.feed-editorial .ed-plate h4 {
  font-family: var(--ed-mono);
  font-size: var(--ed-fs-label);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ed-ink-faint);
  margin: 0 0 0.4rem;
}
.feed-editorial .ed-ai-summary { font-family: var(--ed-serif); line-height: 1.6; }
.feed-editorial .ed-ai-insights { list-style: none; margin: 0.5rem 0 0; padding: 0; }
.feed-editorial .ed-ai-insights li {
  padding: 0.35rem 0; border-top: var(--ed-hair);
  font-family: var(--ed-serif); line-height: 1.5;
}
.feed-editorial .ed-ai-insights li:first-child { border-top: none; }

/* ── Settings → Schedule (2026-09-05): the daily chain as a job table ────────*/
.feed-editorial .ed-sched { border: var(--ed-hair); margin-top: 0.5rem; font-size: 0.85rem; }
.feed-editorial .ed-sched-row {
  display: grid; grid-template-columns: 2.2rem minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 0.6rem; align-items: start; padding: 0.5rem 0.7rem; border-top: var(--ed-hair);
}
.feed-editorial .ed-sched-row:first-child { border-top: none; }
.feed-editorial .ed-sched-head { background: var(--ed-panel); align-items: center; }
.feed-editorial .ed-sched-bg { opacity: 0.85; }
.feed-editorial .ed-sched-what { font-size: 0.72rem; color: var(--ed-ink-faint); margin-top: 0.15rem; overflow-wrap: anywhere; }
.feed-editorial .ed-sched-foot { padding: 0.45rem 0.7rem; border-top: var(--ed-hair); }
.feed-editorial .ed-sched-ok { color: #2f7d3a; font-weight: 700; }
.feed-editorial .ed-sched-fail { color: #b3261e; font-weight: 700; }
.feed-editorial .ed-sched-pending { color: var(--ed-accent-text); font-weight: 700; }
.feed-editorial .ed-sched-none { color: var(--ed-ink-faint); }
.feed-editorial .ed-sched-run .kae-btn { white-space: nowrap; }
@media (max-width: 720px) { .feed-editorial .ed-sched-row { grid-template-columns: 2rem 1fr; } .feed-editorial .ed-sched-head { display: none; } }

/* ── Scorecard (2026-09-04): three bars, then "All scores" ───────────────────
   The fill's colour is a hue from red (0) to green (120°) driven by --good, so
   a bad reading on an inverted metric (slop 90) still reads red; the length is
   the value itself. Unrated = empty track and an em dash. */
.feed-editorial .ed-scorecard {
  border-top: 2px solid var(--ed-ink);
  margin: 1.5rem 0;
  padding-top: 0.75rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem 1.5rem;
}
.feed-editorial .ed-scorebar { min-width: 0; }
.feed-editorial .ed-scorebar-head { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; }
.feed-editorial .ed-scorebar .lbl {
  font-family: var(--ed-mono); font-size: var(--ed-fs-label); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--ed-ink-faint);
}
.feed-editorial .ed-scorebar .val {
  font-family: var(--ed-display); font-size: 1.35rem; font-weight: 800; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.feed-editorial .ed-scorebar .val small { font-size: 0.6em; font-weight: 600; opacity: 0.6; margin-left: 0.05em; }
.feed-editorial .ed-scorebar-track {
  height: 8px; margin: 0.35rem 0 0.3rem;
  background: var(--ed-plate); border: var(--ed-hair);
  overflow: hidden;
}
.feed-editorial .ed-scorebar-fill {
  height: 100%;
  width: calc(var(--val, 0) * 1%);
  background: hsl(calc(var(--good, 0) * 1.2deg) 62% 40%);
  transition: width 400ms ease;
}
.feed-editorial .ed-scorebar.unrated .ed-scorebar-fill { width: 0; }
.feed-editorial .ed-scorebar.unrated .val { color: var(--ed-ink-faint); }
.feed-editorial .ed-scorebar .sub { font-size: 0.72rem; color: var(--ed-ink-faint); }
.feed-editorial .ed-score-more { grid-column: 1 / -1; }
.feed-editorial .ed-score-more summary {
  cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.35rem 0; color: var(--ed-accent-text);
}
.feed-editorial .ed-score-more summary::-webkit-details-marker { display: none; }
.feed-editorial .ed-score-more summary::after { content: "\25BE"; font-size: 0.8em; }
.feed-editorial .ed-score-more[open] summary::after { content: "\25B4"; }
.feed-editorial .ed-scorecard-all {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.9rem 1.5rem;
  padding-top: 0.5rem; border-top: var(--ed-hair); margin-top: 0.25rem;
}
@media (max-width: 720px) {
  .feed-editorial .ed-scorecard { grid-template-columns: 1fr; }
  .feed-editorial .ed-scorecard-all { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { .feed-editorial .ed-scorebar-fill { transition: none; } }

/* Score grid — annotation cells (legacy; the article page uses the scorecard). */
.feed-editorial .ed-score-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0;
  border: var(--ed-hair);
  margin: 1.5rem 0;
}
.feed-editorial .ed-score-cell {
  border-right: var(--ed-hair);
  border-bottom: var(--ed-hair);
  padding: 0.65rem 0.9rem;
}
.feed-editorial .ed-score-cell .lbl {
  font-family: var(--ed-mono);
  font-size: var(--ed-fs-label);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ed-ink-faint);
}
.feed-editorial .ed-score-cell .val {
  font-family: var(--ed-display);
  font-size: 1.6rem;
  font-weight: 800;
  margin-top: 0.15rem;
}
.feed-editorial .ed-score-cell .sub { font-size: 0.72rem; color: var(--ed-ink-faint); }
/* Truthiness is the headline score — mark it, and flag it when claims don't hold. */
.feed-editorial .ed-score-cell-truth { background: color-mix(in srgb, var(--ed-accent) 6%, transparent); }
.feed-editorial .ed-score-cell-truth .lbl { color: var(--ed-accent-text); }
.feed-editorial .ed-score-cell-truth.flagged { background: color-mix(in srgb, #b3261e 10%, transparent); }
.feed-editorial .ed-score-cell-truth.flagged .val { color: #b3261e; }

/* ── Fact-check panel (article page) — verdicts grounded in web evidence ─────*/
.feed-editorial .fc-headline { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.3rem; }
.feed-editorial .fc-truth-score {
  font-family: var(--ed-display); font-weight: 800; font-size: 2rem; line-height: 1;
  border: 2px solid currentColor; padding: 0.15rem 0.55rem; min-width: 2.6rem; text-align: center;
}
.feed-editorial .fc-truth-score.fc-supported    { color: #2f7d3a; }
.feed-editorial .fc-truth-score.fc-unverified   { color: #7a6400; }
.feed-editorial .fc-truth-score.fc-contradicted { color: #b3261e; }
.feed-editorial .fc-truth-meta { display: flex; flex-direction: column; gap: 0.1rem; font-size: 0.9rem; }
.feed-editorial .fc-claim { margin: 0.7rem 0; padding: 0.5rem 0.7rem; border-left: 3px solid var(--ed-hairline); }
.feed-editorial .fc-claim-head { display: flex; gap: 0.5rem; align-items: baseline; flex-wrap: wrap; }
.feed-editorial .fc-claim-text { font-weight: 600; }
.feed-editorial .fc-verdict {
  font-family: var(--ed-mono); font-size: var(--ed-fs-label); text-transform: uppercase;
  letter-spacing: 0.08em; border: 1px solid currentColor; padding: 0.05rem 0.4rem; white-space: nowrap;
}
.feed-editorial .fc-verdict.fc-supported    { color: #2f7d3a; }
.feed-editorial .fc-verdict.fc-unverified   { color: #7a6400; }
.feed-editorial .fc-verdict.fc-contradicted { color: #b3261e; }
.feed-editorial .fc-rationale { font-size: 0.86rem; color: var(--ed-ink-soft); margin: 0.25rem 0; font-style: italic; }

/* Flag chips + meta foot. */
.feed-editorial .ed-flag-chips { display: flex; gap: 0.4rem; flex-wrap: wrap; margin: 0.75rem 0; }
.feed-editorial .ed-flag-chip {
  font-family: var(--ed-mono);
  font-size: var(--ed-fs-label);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 1px solid var(--ed-ink-soft);
  color: var(--ed-ink-soft);
  padding: 0.15rem 0.5rem;
}
.feed-editorial .ed-meta-foot a { color: var(--ed-accent-text); }
.feed-editorial .ed-article details summary { font-family: var(--ed-mono); }

/* ═══════════════════════════════════════════════════════════════════════════
   2.4 SETTINGS MODAL + feed management (editorial dress). The Appearance
   control (#cfgUiMode) is styled via .ed-select. The feed add/remove form is
   injected by signal.js into #feedHealth using .sw-input/.sw-select/.sw-feed-*
   classes — dressed here so it reads as editorial too. ids untouched.
   ═══════════════════════════════════════════════════════════════════════════ */
.feed-editorial .ed-modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(18, 18, 18, 0.55);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 4vh 1rem;
  overflow: auto;
}
.feed-editorial .ed-modal {
  background: var(--ed-paper);
  border: 2px solid var(--ed-ink);
  width: min(640px, 100%);
  padding: 1.25rem;
}
.feed-editorial .ed-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 2px solid var(--ed-ink);
  padding-bottom: 0.5rem; margin-bottom: 0.75rem;
}
.feed-editorial .ed-modal-title {
  font-family: var(--ed-display); font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.feed-editorial .ed-settings-section { margin: 0 0 1rem; }
.feed-editorial .ed-settings-label {
  font-family: var(--ed-mono); font-size: var(--ed-fs-label);
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--ed-ink-faint);
  border-bottom: var(--ed-hair);
  padding-bottom: 0.25rem; margin-bottom: 0.5rem;
}
.feed-editorial .ed-settings-row {
  display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap;
  margin: 0.4rem 0;
}
.feed-editorial .ed-settings-row label {
  font-family: var(--ed-mono); font-size: var(--ed-fs-label);
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--ed-ink-soft);
}
.feed-editorial .ed-admin-badge {
  font-family: var(--ed-mono); font-size: 0.6rem;
  border: 1px solid var(--ed-accent-text); color: var(--ed-accent-text);
  padding: 0 0.3em; margin-left: 0.4rem;
}
.feed-editorial .ed-modal-actions {
  display: flex; justify-content: flex-end; gap: 0.5rem;
  margin-top: 0.5rem;
}

/* Text inputs — both editorial .ed-input and signal.js-injected .sw-input. */
.feed-editorial .ed-input,
.feed-editorial .sw-input {
  font-family: var(--ed-mono); font-size: 0.85rem;
  background: var(--ed-panel);
  border: var(--ed-hair);
  color: var(--ed-ink);
  border-radius: 0;
  padding: 0.35rem 0.5rem;
}
.feed-editorial .sw-select { /* injected feed-form select */
  font-family: var(--ed-mono); font-size: var(--ed-fs-label);
  text-transform: uppercase;
  background: var(--ed-panel); border: var(--ed-hair);
  color: var(--ed-ink); border-radius: 0; padding: 0.3rem 0.5rem;
}

/* Tabs (kaepora-base .kae-tab) in the editorial modal. */
.feed-editorial .kae-tabs { display: flex; gap: 0.25rem; list-style: none; padding: 0; margin: 0 0 0.75rem; border-bottom: var(--ed-hair); }
.feed-editorial .kae-tab {
  font-family: var(--ed-mono); font-size: var(--ed-fs-label);
  text-transform: uppercase; letter-spacing: 0.08em;
  background: transparent; border: 0; color: var(--ed-ink-faint);
  padding: 0.35rem 0.6rem; cursor: pointer;
}
.feed-editorial .kae-tab.kae-tab-active { color: var(--ed-ink); border-bottom: 2px solid var(--ed-accent); }
.feed-editorial .kae-tab-panel { display: none; }
.feed-editorial .kae-tab-panel.kae-tab-panel-active { display: block; }

/* Injected feed rows + remove buttons + message. */
.feed-editorial .sw-feed-del {
  background: transparent; border: var(--ed-hair); color: var(--ed-ink-soft);
  cursor: pointer; padding: 0.15rem 0.4rem;
}
.feed-editorial .sw-feed-del:hover { color: #b3261e; border-color: #b3261e; }
.feed-editorial .sw-feed-msg { font-family: var(--ed-mono); font-size: var(--ed-fs-label); color: var(--ed-ink-faint); }
.feed-editorial .ed-status-badge { font-family: var(--ed-mono); font-size: var(--ed-fs-label); }

/* Provider API-key status rows (admin Connections) — status only, no values. */
.feed-editorial .ed-apikey-row { display: flex; align-items: baseline; gap: 0.6rem; }
.feed-editorial .ed-apikey-name { font-weight: 700; min-width: 6.5rem; }
.feed-editorial .ed-apikey-env {
  font-family: var(--ed-mono); font-size: 0.72rem;
  background: var(--ed-panel); border: var(--ed-hair); padding: 0 0.35em; color: var(--ed-ink-faint);
}
.feed-editorial .ed-apikey-set { font-family: var(--ed-mono); font-size: var(--ed-fs-label); color: #2f7d3a; margin-left: auto; }
.feed-editorial .ed-apikey-unset { font-family: var(--ed-mono); font-size: var(--ed-fs-label); color: var(--ed-ink-faint); margin-left: auto; }

/* ═══════════════════════════════════════════════════════════════════════════
   2.5 REMAINING CHROME — every remaining panel signal.js injects, dressed for
   editorial (editorial doesn't load signal.css, so these need styling here):
   briefing/digest, research workspace, top stories, loading/spinner/empty
   states, status badges, injected feed rows, benchmark carousel. ids/classes
   are signal.js's — CSS only. (Empty-state TEXT is signal.js-owned; editorial
   styles it. Bookmarks/flagged = the trust-filter path → normal ledger rows;
   no separate view exists in signal.js.)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Briefing / digest panel ───────────────────────────────────────────────*/
.feed-editorial .ed-briefing {
  border: var(--ed-hair);
  border-top: 3px solid var(--ed-accent);
  background: var(--ed-panel);
  padding: 0.9rem 1rem;
  margin-bottom: 1.5rem;
}
/* Pattern Watch: same briefing anatomy, plate ground + ink keyline so it
   reads as the analyst's margin note under the day's briefing. */
.feed-editorial .ed-pattern {
  background: var(--ed-plate);
  border-top-color: var(--ed-ink);
}
.feed-editorial .ed-pattern .sw-briefing-text + .sw-briefing-text { margin-top: 0.6em; }
/* The Week in Review: the same anatomy again, but it KEEPS the accent keyline
   (Pattern Watch swaps to ink) — the week's read belongs with the briefing,
   not with the analyst's margin note. Multi-paragraph like Pattern Watch. */
.feed-editorial .ed-weekly .sw-briefing-text + .sw-briefing-text { margin-top: 0.6em; }
/* #weekly is a link target; clear the sticky ticker when jumped to. */
.feed-editorial .ed-anchor { display: block; scroll-margin-top: 5rem; }

.feed-editorial .ed-briefing-header {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 0.5rem; margin-bottom: 0.5rem;
}
.feed-editorial .ed-briefing-header-right { display: flex; align-items: center; gap: 0.5rem; }
.feed-editorial .ed-briefing-ts { font-family: var(--ed-mono); font-size: var(--ed-fs-label); color: var(--ed-ink-faint); }
/* The briefing is the one long read on the front page — set it a notch above
   the card body so it is comfortable, not chrome (Jesse 2026-08-25). */
.feed-editorial .sw-briefing-text,
.feed-editorial .sw-briefing-fallback {
  font-family: var(--ed-serif); font-size: 1.14rem; line-height: 1.7;
}
.feed-editorial .sw-cite {
  font-family: var(--ed-mono); font-size: 0.7rem;
  background: var(--ed-ink); color: var(--ed-on-ink);
  border: 0; border-radius: 0; padding: 0 0.3em; margin: 0 0.1em; cursor: pointer;
  vertical-align: super;
}
.feed-editorial .ed-briefing-refs { margin-top: 0.75rem; }
/* Briefing references: cap at ~3 rows and scroll the rest (same pattern as
   Top Stories). */
.feed-editorial #briefingRefs {
  max-height: 8rem;        /* ≈ 3 reference rows */
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--ed-hairline) transparent;
}
.feed-editorial #briefingRefs::-webkit-scrollbar { width: 8px; }
.feed-editorial #briefingRefs::-webkit-scrollbar-thumb { background: var(--ed-hairline); }
.feed-editorial .sw-briefing-ref-item {
  display: grid; grid-template-columns: auto 1fr auto; gap: 0.5rem;
  padding: 0.35rem 0; border-top: var(--ed-hair);
  font-size: 0.85rem; cursor: pointer; align-items: baseline;
}
.feed-editorial .sw-briefing-ref-n { font-family: var(--ed-mono); color: var(--ed-accent-text); }
.feed-editorial .sw-briefing-ref-title { font-family: var(--ed-display); font-weight: 600; }
.feed-editorial .sw-briefing-ref-source { font-family: var(--ed-mono); font-size: var(--ed-fs-label); color: var(--ed-ink-faint); text-transform: uppercase; }

/* ── Inline SVG icons ──────────────────────────────────────────────────────
   Replaced the Bootstrap Icons <i class="bi bi-*"> markup, which had never
   rendered on this page — the font was never loaded and `font-src 'self'`
   would refuse a CDN copy anyway. Sized in `em` so each icon tracks the text
   it sits beside, and stroked with currentColor so the per-desk accent and
   every theme apply for free. */
.feed-editorial .sw-icon {
  width: 1.05em; height: 1.05em;
  flex: 0 0 auto;
  vertical-align: -0.15em;
}
/* Standing in for a missing image or filling an empty state, the icon IS the
   content rather than a marker beside a label. */
.feed-editorial .sw-icon-lg { width: 2rem; height: 2rem; opacity: 0.55; }

/* ── Research workspace links (aside) ──────────────────────────────────────*/
.feed-editorial .sw-workspace-link {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 0; border-top: var(--ed-hair);
  text-decoration: none; color: var(--ed-ink);
  font-family: var(--ed-mono); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em;
}
.feed-editorial .sw-workspace-link:first-child { border-top: none; }
.feed-editorial .sw-workspace-link:hover { color: var(--ed-accent-text); }
.feed-editorial .sw-workspace-badge {
  margin-left: auto; font-size: 0.6rem;
  border: 1px solid var(--ed-hairline); color: var(--ed-ink-faint); padding: 0 0.3em;
}

/* ── Top stories (aside) ───────────────────────────────────────────────────*/
.feed-editorial .sw-top-item {
  display: grid; grid-template-columns: auto 1fr; gap: 0.5rem;
  padding: 0.5rem 0; border-top: var(--ed-hair); cursor: pointer;
}
.feed-editorial .sw-top-item:first-child { border-top: none; }
.feed-editorial .sw-top-rank {
  font-family: var(--ed-display); font-weight: 900; font-size: 1.5rem;
  color: var(--ed-accent-text); line-height: 1;
}
.feed-editorial .sw-top-title { font-family: var(--ed-display); font-weight: 700; font-size: 0.95rem; line-height: 1.15; }
/* Top Stories lives in the right rail (aside): three rows minimum, grows with
   the lead (see .ed-top), scrolls the rest. Was a fixed ~6-row cap. */
.feed-editorial #topStories {
  height: var(--ed-top-min);
  flex: 1 0 auto;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--ed-hairline) transparent;
}
.feed-editorial #topStories::-webkit-scrollbar { width: 8px; }
.feed-editorial #topStories::-webkit-scrollbar-thumb { background: var(--ed-hairline); }
.feed-editorial .sw-top-item:hover .sw-top-title { color: var(--ed-accent-text); }
.feed-editorial .sw-top-meta,
.feed-editorial .sw-top-source { font-family: var(--ed-mono); font-size: var(--ed-fs-label); color: var(--ed-ink-faint); text-transform: uppercase; }

/* ── Loading / spinner / empty states ──────────────────────────────────────*/
.feed-editorial .sw-loading {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 2rem 1rem; color: var(--ed-ink-faint);
  font-family: var(--ed-mono); font-size: var(--ed-fs-label); text-transform: uppercase; letter-spacing: 0.1em;
}
.feed-editorial .sw-spinner {
  width: 1rem; height: 1rem; border: 2px solid var(--ed-hairline);
  border-top-color: var(--ed-accent); border-radius: 50%;
  animation: ed-spin 0.8s linear infinite;
}
.feed-editorial .sw-analysis-empty {
  padding: 1.5rem 1rem; text-align: center; color: var(--ed-ink-faint);
  font-family: var(--ed-mono); font-size: var(--ed-fs-label); text-transform: uppercase; letter-spacing: 0.08em;
}
/* Desk transitions (editorial.js transitionTo): the page slides in from the
   side the desk sits on. Reduced motion: the class is never applied. */
.feed-editorial .ed-page.ed-slide-right { animation: ed-slide-right 360ms cubic-bezier(.2,.7,.2,1) both; }
.feed-editorial .ed-page.ed-slide-left  { animation: ed-slide-left  360ms cubic-bezier(.2,.7,.2,1) both; }
@keyframes ed-slide-right { from { transform: translateX(6%); opacity: 0; } to { transform: none; opacity: 1; } }
/* The title words slide in the same direction, clipped by the title box. */
.feed-editorial .ed-ticker-current { overflow: hidden; }
.feed-editorial .ed-ticker-mark, .feed-editorial .ed-ticker-section { display: inline-block; }
.feed-editorial .ed-word-right { animation: ed-word-right 280ms cubic-bezier(.2,.7,.2,1) both; }
.feed-editorial .ed-word-left  { animation: ed-word-left  280ms cubic-bezier(.2,.7,.2,1) both; }
@keyframes ed-word-right { from { transform: translateX(60%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes ed-word-left  { from { transform: translateX(-60%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes ed-slide-left  { from { transform: translateX(-6%); opacity: 0; } to { transform: none; opacity: 1; } }

@keyframes ed-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .feed-editorial .sw-spinner { animation-duration: 0s; }
}

/* ── Status badges (settings test-connection) + injected feed rows ─────────*/
.feed-editorial .sw-status-badge,
.feed-editorial .sw-status-ok,
.feed-editorial .sw-status-err { font-family: var(--ed-mono); font-size: var(--ed-fs-label); }
.feed-editorial .sw-status-ok  { color: #2f7d3a; }
.feed-editorial .sw-status-err { color: #b3261e; }
.feed-editorial .sw-feed-row {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.35rem 0; border-top: var(--ed-hair);
  font-family: var(--ed-mono); font-size: 0.78rem;
}
.feed-editorial .sw-feed-name {
  font-weight: 700;
  flex: 1;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.feed-editorial .sw-feed-ok  { color: #2f7d3a; white-space: nowrap; }
.feed-editorial .sw-feed-err { color: #b3261e; white-space: nowrap; }
.feed-editorial .sw-feed-cat-head {
  margin-top: 0.6rem; padding: 0.2rem 0;
  border-bottom: 2px solid var(--ed-ink);
}
.feed-editorial .sw-feed-tier { border: var(--ed-hair); padding: 0 0.3em; }
.feed-editorial .sw-feed-count { color: var(--ed-ink-faint); min-width: 3ch; text-align: right; }
.feed-editorial .sw-feed-off { color: var(--ed-ink-faint); }
.feed-editorial .sw-feed-disabled .sw-feed-name,
.feed-editorial .sw-feed-disabled .sw-feed-tier,
.feed-editorial .sw-feed-disabled .sw-feed-count { opacity: 0.45; }
.feed-editorial .sw-feed-toggle { accent-color: var(--ed-accent); }

/* Impact chip — the visible half of scoring ASPECT 6. Accent-filled so it
   inherits the desk colour like everything else. */
.feed-editorial .sw-impact-chip {
  font-family: var(--ed-mono); font-size: 0.62rem;
  letter-spacing: 0.12em; font-weight: 700;
  background: var(--ed-accent); color: var(--ed-bar);
  padding: 0.05rem 0.35rem; margin-right: 0.35rem;
  vertical-align: middle;
}

/* ── Benchmark panel (AI section): THREE charts side by side, single row
   (Jesse 2026-07-19) ────────────────────────────────────────────────────────
   signal.js pages through the set three at a time; editorial lays the page out
   as an equal 3-up grid, with prev/next + a dot-per-page rotating the pages. */
/* Arrows flank the charts; dots sit centred beneath them (Jesse 2026-08-25).
   The middle column is minmax(0,1fr) so the track can shrink instead of pushing
   the right-hand arrow off the panel. */
.feed-editorial .sw-bench-carousel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.5rem;
}
.feed-editorial .sw-bench-flip { overflow: hidden; }
.feed-editorial .sw-bench-track {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  /* stretch, not start: `start` let every card shrink to its own content, so a
     row read 306/327/289px. --bench-card-h is the tallest card in the whole set,
     measured offscreen by signal.js measureBenchHeight(), so pages match too. */
  align-items: stretch;
  min-height: var(--bench-card-h, auto);
}
.feed-editorial .sw-bench-slot {
  opacity: 1 !important;      /* neutralize any leftover carousel fade */
  filter: none !important;
  transform: none !important;
  min-width: 0;
}
.feed-editorial .sw-bench-card {
  display: block; text-decoration: none; color: var(--ed-ink);
  border: var(--ed-hair); background: var(--ed-paper); padding: 0.6rem 0.75rem;
  height: 100%;
}
@media (max-width: 860px) {
  .feed-editorial .sw-bench-track { grid-template-columns: 1fr 1fr; }  /* 2-up on tablets */
}
@media (max-width: 560px) {
  .feed-editorial .sw-bench-track { grid-template-columns: 1fr; }  /* 1-up on phones */
}
.feed-editorial .sw-bench-card-name { font-family: var(--ed-display); font-weight: 800; }
.feed-editorial .sw-bench-card-tag,
.feed-editorial .sw-bench-card-desc { font-family: var(--ed-mono); font-size: var(--ed-fs-label); color: var(--ed-ink-faint); }
.feed-editorial .sw-bench-bar-wrap { background: var(--ed-plate); height: 6px; }
.feed-editorial .sw-bench-bar { background: var(--ed-accent); height: 6px; }
.feed-editorial .sw-bench-leader-model,
.feed-editorial .sw-bench-leader-elo { font-family: var(--ed-mono); font-size: var(--ed-fs-label); }
.feed-editorial .sw-bench-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.7rem;
}
.feed-editorial .sw-bench-dot {
  width: 8px; height: 8px; padding: 0;
  border: 1px solid var(--ed-ink-faint); background: transparent;
  display: inline-block; border-radius: 50%; cursor: pointer;
}
.feed-editorial .sw-bench-dot.active { background: var(--ed-accent); border-color: var(--ed-accent); }
.feed-editorial .sw-bench-arrow {
  display: flex; align-items: center; justify-content: center;
  width: 1.9rem; height: 2.6rem;
  background: transparent; border: var(--ed-hair); color: var(--ed-ink);
  font-family: var(--ed-mono); font-size: 1.35rem; line-height: 1;
  cursor: pointer;
}
.feed-editorial .sw-bench-arrow:hover { background: var(--ed-ink); color: var(--ed-on-ink); }
@media (max-width: 560px) {
  /* Keep them flanking — the dots alone are a poor tap target for paging. */
  .feed-editorial .sw-bench-arrow { width: 1.6rem; height: 2.2rem; font-size: 1.1rem; }
}

/* ── Web-search lane (SearXNG results, signed-in) ───────────────────────────*/
.feed-editorial .ed-websearch { margin-top: 2rem; }
.feed-editorial .ed-websearch-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0;
  border: var(--ed-hair);
  border-bottom: none;
}
.feed-editorial .ed-websearch-item {
  display: block;
  text-decoration: none;
  color: var(--ed-ink);
  border-right: var(--ed-hair);
  border-bottom: var(--ed-hair);
  padding: 0.7rem 0.9rem;
  transition: background 0.15s ease;
}
.feed-editorial .ed-websearch-item:hover { background: var(--ed-plate); }
.feed-editorial .ed-websearch-title {
  font-family: var(--ed-display);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 0.2rem;
}
.feed-editorial .ed-websearch-item:hover .ed-websearch-title { color: var(--ed-accent-text); }
.feed-editorial .ed-websearch-meta { color: var(--ed-accent-text); margin-bottom: 0.3rem; }
.feed-editorial .ed-websearch-snippet {
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--ed-ink-soft);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
@media (prefers-reduced-motion: reduce) {
  .feed-editorial .ed-websearch-item { transition: none; }
}

/* ── Alternative entry-row classes (search/list paths) ─────────────────────*/
.feed-editorial .sw-entry { border-top: var(--ed-hair); padding: 0.75rem 0; }
.feed-editorial .sw-entry-headline { font-family: var(--ed-display); font-weight: 800; font-size: 1.15rem; line-height: 1.1; }
.feed-editorial .sw-entry-thumb,
.feed-editorial .sw-entry-image,
.feed-editorial .sw-entry-thumb-placeholder { border: var(--ed-hair); background: var(--ed-plate); object-fit: cover; }

/* ═══════════════════════════════ 3.1 Scroll reveals ═══════════════════════════
   The .ed-reveal hidden state is added ONLY by editorial.js (never in markup),
   so no-JS / reduced-motion never leaves content invisible. Small distance,
   short ease-out, once per element. --ed-reveal-* are zeroed under reduced
   motion (0.5), a second safety net on top of the JS guard. */
.feed-editorial .ed-reveal {
  opacity: 0;
  transform: translateY(var(--ed-reveal-dist));
  transition: opacity var(--ed-reveal-dur) var(--ed-ease),
              transform var(--ed-reveal-dur) var(--ed-ease);
}
.feed-editorial .ed-revealed { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  /* Belt-and-suspenders: even if a .ed-reveal slips through, show it. */
  .feed-editorial .ed-reveal { opacity: 1; transform: none; transition: none; }
}

/* ═══════════════════════════ 3.3 Colophon + back-to-top ═══════════════════ */
.feed-editorial .ed-colophon {
  border-top: 2px solid var(--ed-ink);
  margin: 2rem var(--ed-gutter) 0;
  padding: 1.5rem 0 3rem;
  text-align: center;
}
.feed-editorial .ed-backtop {
  display: block;
  margin: 0 auto 1rem;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1;
  color: var(--ed-ink);
  transition: color 0.15s, transform 0.15s var(--ed-ease);
}
.feed-editorial .ed-backtop:hover { color: var(--ed-accent-text); transform: translateY(-3px); }
.feed-editorial .ed-colophon-title {
  color: var(--ed-ink-faint);
  letter-spacing: 0.3em;
  margin-bottom: 0.5rem;
}
.feed-editorial .ed-colophon-line {
  font-family: var(--ed-serif);
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--ed-ink-soft);
  max-width: 52ch;
  margin: 0 auto 0.5rem;
}
.feed-editorial .ed-colophon-sub { color: var(--ed-ink-faint); font-style: italic; text-transform: none; letter-spacing: 0.04em; }
@media (prefers-reduced-motion: reduce) {
  .feed-editorial .ed-backtop { transition: none; }
  .feed-editorial .ed-backtop:hover { transform: none; }
}

/* ═══════════════════════════════ 3.4 Responsive pass ══════════════════════════
   Tablet + phone widths: the front-page top collapses to one column (≤900, in
   2.1), the quick-nav ledger to one column (≤720, in 1.2). This block tightens
   the remaining chrome so nothing overflows sideways: the ticker sheds its
   trailing bits, ledger photo-thumbs move below the text, and the masthead
   strips stack. The marquee is already overflow:hidden with an exact
   full-bleed, so it never widens the page. */
@media (max-width: 768px) {
  .feed-editorial .ed-search { width: 6rem; }
  .feed-editorial .ed-lead { padding-right: 0; }
  .feed-editorial .ed-score-grid { grid-template-columns: repeat(2, 1fr); }
  /* Story grid: 3 → 2 columns on tablet. */
  .feed-editorial #articleFeed.cols3,
  .feed-editorial #articleFeed { grid-template-columns: repeat(2, 1fr); }
  .feed-editorial #articleFeed .sw-card:nth-child(3n) { border-right: var(--ed-hair); }
  .feed-editorial #articleFeed .sw-card:nth-child(2n) { border-right: none; }
}
@media (max-width: 560px) {
  .feed-editorial .ed-masthead-strip,
  .feed-editorial .ed-masthead-sub {
    flex-direction: column; align-items: center; gap: 0.2rem; text-align: center;
  }
  .feed-editorial .ed-ticker-mark { display: none; }  /* ticker → desk name only */
  .feed-editorial .ed-section-bar-sub { width: 100%; }
  /* Story grid: single column on phones; text cards may show their picture here
     since columns no longer distinguish outer/inner. */
  .feed-editorial #articleFeed.cols3,
  .feed-editorial #articleFeed { grid-template-columns: 1fr; }
  .feed-editorial #articleFeed .sw-card { border-right: none !important; }
  .feed-editorial .sw-stack-item { grid-template-columns: 1fr; }
  .feed-editorial .sw-stack-thumb-wrap { order: 0; }
  .feed-editorial .ed-article h1 { font-size: clamp(1.6rem, 8vw, 2.2rem); }
}

/* ═══════════════════════════ 3.5 Reduced-motion & a11y ════════════════════════
   All four editorial animations (marquee, spinner, reveal, back-to-top) already
   have explicit reduced-motion rules above; this consolidated catch-all is the
   safety net — any future/inherited animation is neutralised too, with content
   left fully visible (the .ed-reveal opacity reset lives with the reveal rules).
   Plus visible keyboard focus (kaepora-base ships none for these) and the
   contrast note. */
@media (prefers-reduced-motion: reduce) {
  .feed-editorial *,
  .feed-editorial *::before,
  .feed-editorial *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* Visible keyboard focus on every editorial interactive control. Uses the
   accent so it reads on the paper ground; :focus-visible keeps mouse clicks
   outline-free. Contrast: ink #161616 / ink-soft #3a3a36 / ink-faint #75756e
   all clear AA on the #efefec paper; --ed-accent-text #c03a00 is the a11y text
   accent (≥4.5:1); on the black bars --ed-on-bar / --ed-accent are high-contrast. */
.feed-editorial a:focus-visible,
.feed-editorial button:focus-visible,
.feed-editorial select:focus-visible,
.feed-editorial input:focus-visible,
.feed-editorial .sw-section-btn:focus-visible,
.feed-editorial .kae-pill:focus-visible,
.feed-editorial .ed-quicknav-link:focus-visible,
.feed-editorial .sw-page-btn:focus-visible {
  outline: 2px solid var(--ed-accent);
  outline-offset: 2px;
}
/* On the black bars/ticker, the accent outline still reads. */
.feed-editorial .ed-ticker :focus-visible,
.feed-editorial .ed-section-bar :focus-visible { outline-color: var(--ed-accent); }

/* ═══════════════════════════ Local sign-in page ═══════════════════════════ */
.feed-editorial .ed-login {
  max-width: 24rem;
  margin: 0 auto;
  padding: clamp(2rem, 8vh, 6rem) 1.25rem 4rem;
}
.feed-editorial .ed-login-masthead { text-align: center; margin-bottom: 1.5rem; }
.feed-editorial .ed-login-masthead .ed-nameplate { font-size: clamp(2.5rem, 12vw, 4rem); margin: 0.2rem 0; }
.feed-editorial .ed-login-card {
  border: 2px solid var(--ed-ink);
  background: var(--ed-panel);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.feed-editorial .ed-login-field { display: flex; flex-direction: column; gap: 0.25rem; }
.feed-editorial .ed-login-field .ed-input { width: 100%; padding: 0.5rem 0.6rem; }
.feed-editorial .ed-login-submit { margin-top: 0.25rem; }
.feed-editorial .ed-login-error {
  border: 1px solid #b3261e; color: #b3261e;
  font-family: var(--ed-mono); font-size: var(--ed-fs-label);
  padding: 0.4rem 0.6rem;
}
.feed-editorial .ed-login-note { color: var(--ed-ink-faint); text-transform: none; letter-spacing: 0.02em; }

/* ═══════════════════════════ Admin user management ════════════════════════ */
.feed-editorial .ed-admin-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.feed-editorial .ed-admin-table th {
  font-family: var(--ed-mono); font-size: var(--ed-fs-label); text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--ed-ink-faint); text-align: left;
  border-bottom: var(--ed-hair); padding: 0.3rem 0.4rem;
}
.feed-editorial .ed-admin-table td { padding: 0.35rem 0.4rem; border-bottom: var(--ed-hair); }
.feed-editorial .ed-admin-mini {
  font-family: var(--ed-mono); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em;
  background: transparent; border: var(--ed-hair); color: var(--ed-ink); cursor: pointer; padding: 0.15rem 0.4rem;
}
.feed-editorial .ed-admin-mini:hover { background: var(--ed-ink); color: var(--ed-on-ink); }
.feed-editorial .ed-admin-muted { color: var(--ed-ink-faint); font-family: var(--ed-mono); font-size: 0.7rem; }
.feed-editorial .ed-admin-empty, .feed-editorial .ed-admin-loading { color: var(--ed-ink-faint); padding: 0.5rem 0; }
.feed-editorial .ed-admin-invite-result { margin-top: 0.5rem; }
.feed-editorial .ed-admin-invite-link { font-size: 0.82rem; }
.feed-editorial .ed-admin-invite-link code {
  font-family: var(--ed-mono); font-size: 0.72rem; word-break: break-all;
  background: var(--ed-panel); border: var(--ed-hair); padding: 0.1rem 0.3rem; display: inline-block; margin-top: 0.2rem;
}
.feed-editorial .ed-admin-audit { max-height: 12rem; overflow-y: auto; }
.feed-editorial .ed-admin-audit-row { font-size: 0.78rem; padding: 0.2rem 0; border-bottom: var(--ed-hair); }
.feed-editorial .ed-admin-audit-ts { font-family: var(--ed-mono); font-size: 0.68rem; color: var(--ed-ink-faint); }
