/* ═══════════════════════════════════════════════════════════════════════════
   The Feed v2 — additions on top of the ported editorial.css.
   Everything colors through the --ed-* tokens so all three themes (dark
   [gruvbox, DEFAULT], paper, hyrule) just work. Broadsheet dialect: hairline
   rules, mono-caps labels, tabular figures, one accent.
   ═══════════════════════════════════════════════════════════════════════════ */

.bsheet-main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--ed-gutter) 4rem;
}

.bsheet-section-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.25rem;
  justify-content: center;
  padding: .4rem var(--ed-gutter);
  border-top: var(--ed-hair);
  border-bottom: var(--ed-hair);
  margin-bottom: 2rem;
}
.bsheet-section-link { text-decoration: none; color: var(--ed-ink-soft); padding: .25rem 0; }
.bsheet-section-link.active {
  color: var(--ed-accent-text);
  border-bottom: 2px solid var(--ed-accent);
}
.bsheet-identity a { color: inherit; }

/* section bars */
.bsheet-bar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  background: var(--ed-bar);
  color: var(--ed-on-bar);
  padding: .3rem .6rem;
  margin: 2.2rem 0 0;
}
.bsheet-bar a { color: inherit; }
.bsheet-bar-right { opacity: .75; }

/* ── The Briefing — the mainstay ─────────────────────────────────────────── */
.bsheet-briefing-body {
  font-family: var(--ed-serif);
  font-size: 1.22rem;
  line-height: 1.65;
  background: var(--ed-panel);
  border: var(--ed-hair);
  border-top: none;
  padding: 1.4rem clamp(1rem, 4vw, 2.5rem);
}
.bsheet-briefing-body p { margin: 0 0 1em; }
.bsheet-briefing-body p:last-child { margin-bottom: 0; }
.bsheet-briefing-body p:first-child::first-letter {
  font-family: var(--ed-serif);
  font-size: 3.2em;
  float: left;
  line-height: .82;
  padding: .04em .08em 0 0;
  color: var(--ed-accent-text);
}
.bsheet-cite a {
  color: var(--ed-accent-text);
  text-decoration: none;
  font-family: var(--ed-mono);
  font-size: .72em;
}
.bsheet-refs {
  margin: 0;
  border: var(--ed-hair);
  border-top: none;
  padding: .8rem 1.2rem .8rem 2.6rem;
  background: var(--ed-panel);
}
.bsheet-refs li { margin: .3rem 0; font-family: var(--ed-display); }
.bsheet-refs li a { color: var(--ed-ink); text-decoration: none; }
.bsheet-refs li a:hover { color: var(--ed-accent-text); }
.bsheet-refs li .ed-label { margin-left: .6rem; color: var(--ed-ink-faint); }

/* quiet day: smaller, calm, unmistakably deliberate */
.bsheet-briefing-quiet .bsheet-briefing-body {
  font-size: 1.02rem;
  color: var(--ed-ink-soft);
  font-style: italic;
}
.bsheet-briefing-quiet .bsheet-briefing-body p:first-child::first-letter {
  font-size: 1em; float: none; padding: 0; color: inherit;
}
.bsheet-briefing-failed {
  border: var(--ed-hair);
  border-top: none;
  background: var(--ed-plate);
  padding: .8rem 1.2rem;
  margin: 0;
  color: var(--ed-ink-soft);
}

/* ── Benchmark carousel — 3-up track + pager ─────────────────────────────── */
.bsheet-bench-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 2rem) / 3);
  gap: 1rem;
  overflow-x: hidden;
  border: var(--ed-hair);
  border-top: none;
  background: var(--ed-panel);
  padding: 1rem;
  scroll-behavior: smooth;
}
@media (max-width: 900px) {
  .bsheet-bench-track { grid-auto-columns: 85%; overflow-x: auto; }
}
.bsheet-bench-card {
  border: var(--ed-hair);
  background: var(--ed-paper);
  padding: .8rem .9rem;
  display: flex;
  flex-direction: column;
  min-height: 240px;
}
.bsheet-bench-card h3 {
  font-family: var(--ed-display);
  font-size: 1.02rem;
  margin: .15rem 0;
  letter-spacing: .01em;
}
.bsheet-bench-tag {
  color: var(--ed-accent-text);
  border: 1px solid currentColor;
  padding: 0 .35rem;
}
/* Locked to exactly two lines. The descriptions run 49-97 chars, so an
   unclamped one wraps to 1 or 2 lines depending on the benchmark and every card
   in the row ends up a different height (Jesse 2026-08-25: same size, all of
   them). Short ones now reserve the second line; long ones ellipsize. */
.bsheet-bench-desc {
  font-family: var(--ed-mono);
  font-size: .72rem;
  line-height: 1.35;
  color: var(--ed-ink-faint);
  margin: 0 0 .6rem;
  height: calc(2 * 1.35 * .72rem);
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.bsheet-bench-rows { flex: 1; }
.bsheet-bench-row {
  display: grid;
  grid-template-columns: minmax(7.5rem, 1fr) minmax(2rem, 90px) auto;
  align-items: center;
  gap: .5rem;
  padding: .18rem 0;
  border-bottom: 1px dotted var(--ed-hairline);
  font-family: var(--ed-mono);
  font-size: .78rem;
}
.bsheet-bench-entity { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bsheet-bench-fill {
  height: 7px;
  background: var(--ed-bar-muted);
  opacity: .55;
  width: calc(var(--w, 4) * 1%);
}
.bsheet-bench-top .bsheet-bench-fill { background: var(--ed-accent); opacity: 1; }
.bsheet-bench-top .bsheet-bench-entity { color: var(--ed-accent-text); font-weight: 600; }
.bsheet-bench-score { font-variant-numeric: tabular-nums; text-align: right; }
.bsheet-delta.up { color: #3f7d3f; }
.bsheet-delta.down { color: var(--ed-accent-text); }
.bsheet-bench-card footer {
  display: flex;
  justify-content: space-between;
  margin-top: .6rem;
  color: var(--ed-ink-faint);
}
.bsheet-bench-card footer a { color: inherit; }
.bsheet-asof.bsheet-stale { color: var(--ed-accent-text); font-weight: 700; }
/* tracker variant (FelonyBench): corrections-box look */
.bsheet-bench-tracker { background: var(--ed-plate); }
.bsheet-bench-tracker .bsheet-bench-row { grid-template-columns: 1fr auto; }
.bsheet-bench-tracker .bsheet-bench-fill { display: none; }
.bsheet-bench-note {
  font-size: .66rem;
  color: var(--ed-ink-faint);
  padding: 0 0 .3rem;
  border-bottom: 1px dotted var(--ed-hairline);
}
.bsheet-bench-pager { text-align: center; padding: .5rem 0 0; }
.bsheet-bench-pager button {
  width: 9px; height: 9px;
  border-radius: 50%;
  border: 1px solid var(--ed-ink-faint);
  background: transparent;
  margin: 0 .25rem;
  cursor: pointer;
  padding: 0;
}
.bsheet-bench-pager button.active { background: var(--ed-accent); border-color: var(--ed-accent); }

/* ── The wire ────────────────────────────────────────────────────────────── */
.bsheet-wire-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
  border: var(--ed-hair);
  border-top: none;
  background: var(--ed-panel);
  padding: 1rem;
}
.bsheet-card {
  border: var(--ed-hair);
  background: var(--ed-paper);
  padding: .7rem .8rem;
  display: flex;
  flex-direction: column;
}
.bsheet-card h3 {
  font-family: var(--ed-display);
  font-size: .98rem;
  line-height: 1.3;
  margin: .3rem 0;
}
.bsheet-card h3 a { color: var(--ed-ink); text-decoration: none; }
.bsheet-card h3 a:hover { color: var(--ed-accent-text); }
.bsheet-card p {
  font-family: var(--ed-serif);
  font-size: .86rem;
  color: var(--ed-ink-soft);
  margin: 0 0 .5rem;
  flex: 1;
}
.bsheet-card-meta, .bsheet-card-foot {
  display: flex;
  justify-content: space-between;
  color: var(--ed-ink-faint);
}
.bsheet-trust { font-variant-numeric: tabular-nums; font-weight: 700; }
.bsheet-trust-high { color: #3f7d3f; }
.bsheet-trust-mid { color: #a07a1f; }
.bsheet-trust-low { color: var(--ed-accent-text); }

/* ── Article / auth ──────────────────────────────────────────────────────── */
.bsheet-article-hed {
  font-family: var(--ed-display);
  font-size: clamp(1.5rem, 3.5vw, 2.4rem);
  line-height: 1.12;
  margin: 1rem 0 .4rem;
}
.bsheet-article-scores { display: flex; gap: 1.2rem; color: var(--ed-ink-faint); margin: .6rem 0 1rem; }
.bsheet-synopsis {
  border-left: 3px solid var(--ed-accent);
  background: var(--ed-panel);
  padding: .7rem 1rem;
  font-family: var(--ed-serif);
  margin-bottom: 1rem;
}
.bsheet-article-body { font-family: var(--ed-serif); font-size: 1.05rem; line-height: 1.6; max-width: 46rem; }
.bsheet-auth { max-width: 22rem; margin: 3rem auto; }
.bsheet-auth-form { border: var(--ed-hair); border-top: none; background: var(--ed-panel); padding: 1.2rem; display: grid; gap: .9rem; }
.bsheet-auth-form input {
  width: 100%; padding: .45rem .5rem;
  font-family: var(--ed-mono);
  border: var(--ed-hair);
  background: var(--ed-paper);
  color: var(--ed-ink);
}
.bsheet-auth-error { color: var(--ed-accent-text); margin: 0; padding: .5rem 0; }
.bsheet-btn {
  font-family: var(--ed-mono);
  text-transform: uppercase;
  letter-spacing: .08em;
  background: var(--ed-bar);
  color: var(--ed-on-bar);
  border: none;
  padding: .55rem;
  cursor: pointer;
}
.bsheet-btn:hover { background: var(--ed-accent); }
.bsheet-theme-select {
  font-family: var(--ed-mono);
  font-size: .7rem;
  background: transparent;
  color: inherit;
  border: none;
}
.bsheet-footer {
  text-align: center;
  color: var(--ed-ink-faint);
  border-top: var(--ed-hair);
  padding: 1rem 0 2rem;
}

/* auth extras */
.bsheet-qr { background: #fff; padding: 8px; border: var(--ed-hair); }
.bsheet-backup-codes { columns: 2; font-family: var(--ed-mono); padding-left: 1.2rem; }
.bsheet-backup-codes li { margin: .2rem 0; }

/* article actions */
.bsheet-actions { display: flex; gap: .6rem; align-items: center; margin: 1rem 0; }
.bsheet-actions .bsheet-btn[disabled] { opacity: .45; cursor: default; }
.bsheet-action-result {
  font-family: var(--ed-mono); font-size: .75rem;
  background: var(--ed-panel); border: var(--ed-hair);
  padding: .8rem; white-space: pre-wrap; overflow-x: auto;
}

/* briefing archive */
.bsheet-archive-day { margin-bottom: .2rem; }
.bsheet-archive-date {
  display: flex;
  justify-content: space-between;
  border: var(--ed-hair);
  border-top: none;
  background: var(--ed-plate);
  padding: .35rem .9rem;
  color: var(--ed-ink-soft);
}
.bsheet-archive-body {
  font-family: var(--ed-serif);
  font-size: 1.02rem;
  line-height: 1.6;
  background: var(--ed-panel);
  border: var(--ed-hair);
  border-top: none;
  padding: .9rem clamp(1rem, 3vw, 1.8rem);
}
.bsheet-archive-body p { margin: 0 0 .8em; }
.bsheet-archive-body p:last-child { margin-bottom: 0; }
.bsheet-archive-quiet .bsheet-archive-body { font-style: italic; color: var(--ed-ink-soft); }
.bsheet-archive-refs { font-size: .85rem; }
.bsheet-archive-empty { padding: 2rem 0; text-align: center; }
.bsheet-archive-pager {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  padding: 1.2rem 0;
  color: var(--ed-ink-faint);
}
.bsheet-archive-pager a { color: var(--ed-accent-text); }

/* search */
.bsheet-search-form {
  display: flex;
  gap: .6rem;
  border: var(--ed-hair);
  border-top: none;
  background: var(--ed-panel);
  padding: 1rem;
}
.bsheet-search-form input[type="search"] {
  flex: 1;
  font-family: var(--ed-mono);
  font-size: .95rem;
  padding: .5rem .7rem;
  border: var(--ed-hair);
  background: var(--ed-paper);
  color: var(--ed-ink);
}
.bsheet-search-results { border: var(--ed-hair); border-top: none; background: var(--ed-panel); padding: .4rem 1rem; }
.bsheet-search-hit { padding: .7rem 0; border-bottom: 1px dotted var(--ed-hairline); }
.bsheet-search-hit:last-child { border-bottom: none; }
.bsheet-search-hit h3 { font-family: var(--ed-display); font-size: 1.02rem; margin: .25rem 0; }
.bsheet-search-hit h3 a { color: var(--ed-ink); text-decoration: none; }
.bsheet-search-hit h3 a:hover { color: var(--ed-accent-text); }
.bsheet-search-snippet { font-family: var(--ed-serif); font-size: .9rem; color: var(--ed-ink-soft); margin: 0; }
.bsheet-search-snippet mark { background: transparent; color: var(--ed-accent-text); font-weight: 700; }
.bsheet-search-none { padding: 1.2rem 0; }
.bsheet-search-link { margin-left: 1.5rem; }


/* masthead sign-in / account control (Jesse 2026-08-25: sign-in moved to the
   old Hub-link slot). The button variant inherits the link's dress. */
.feed-editorial button.ed-hub-brand {
  background: none; border: 0; cursor: pointer; padding: 0;
  font: inherit; color: inherit; letter-spacing: inherit;
  text-transform: inherit;
}
/* bench cards inside the v1 carousel slots: fill the slot */
.feed-editorial .sw-bench-slot .bsheet-bench-card { height: 100%; }

/* ── "Since yesterday" briefing diff strip ──────────────────────────────── */
.feed-editorial .sw-briefing-diff {
  border-left: 3px solid var(--ed-accent);
  background: var(--ed-plate);
  color: var(--ed-ink-soft);
  padding: .45rem .7rem;
  margin: 0 0 .8rem;
  /* .ed-label sets 11px mono-caps — fine for a chrome tag, too small for a line
     you actually read. Step it up (Jesse 2026-08-25). */
  font-size: .8rem;
  line-height: 1.55;
}
.feed-editorial .sw-diff-since {
  color: var(--ed-accent-text);
  font-weight: 700;
  margin-right: .35rem;
}
.feed-editorial .sw-diff-item {
  color: var(--ed-ink-soft);
  font-family: var(--ed-serif);
  font-size: .98rem;
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.5;
  padding-top: .2rem;
}

/* ── benchmark Δ + sparkline ────────────────────────────────────────────── */
.feed-editorial .bsheet-bench-trend { display: none; }
.feed-editorial .bsheet-has-spark .bsheet-bench-row {
  grid-template-columns: minmax(6.5rem, 1fr) minmax(2rem, 70px) 46px auto;
}
.feed-editorial .bsheet-has-spark .bsheet-bench-trend {
  display: block; line-height: 0; color: var(--ed-ink-faint);
}
.feed-editorial .bsheet-spark polyline {
  fill: none; stroke: currentColor; stroke-width: 1.25;
  stroke-linejoin: round; stroke-linecap: round;
}
.feed-editorial .bsheet-bench-top .bsheet-bench-trend { color: var(--ed-accent-text); }
.feed-editorial .bsheet-delta {
  font-family: var(--ed-mono); font-size: .62rem;
  margin-left: .25rem; vertical-align: super;
}
.feed-editorial .bsheet-delta.up { color: #3f7d3f; }
.feed-editorial .bsheet-delta.down { color: var(--ed-accent-text); }
