/* ============================================================================
   Design tokens
   Palette is cool paper + ink, with two semantic colours that carry meaning
   rather than decoration: eucalypt = confirmed, ochre = reported/unverified.
   Type: Bricolage Grotesque (display), Newsreader (body), IBM Plex Mono (data).
   ========================================================================= */
:root {
  --paper:      #EFF1EF;
  --card:       #F7F8F7;
  --ink:        #14181A;
  --muted:      #6B7377;
  --rule:       #D6DBD8;
  --confirmed:  #0F6B5C;   /* verified figures, published state */
  --reported:   #B26B00;   /* reported but unconfirmed — always visible as such */
  --rejected:   #B23A2E;   /* editorial only: killed, never public */
  --company-tint:  #ECEDFF;   /* review queue: publishes as a company page */
  --investor-tint: #ECFFEC;   /* review queue: publishes as an investor page */
  --person-tint:   #FFF3E4;   /* a name, not an organisation */

  --display: "Bricolage Grotesque", "Helvetica Neue", sans-serif;
  --body: "Newsreader", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;

  --measure: 68ch;
  --gap: 1.5rem;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  font-optical-sizing: auto;
}

a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible { outline: 2px solid var(--confirmed); outline-offset: 3px; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 1.25rem; }
.narrow { max-width: 640px; }

/* --- Masthead ------------------------------------------------------------ */
.masthead { border-bottom: 1px solid var(--rule); background: var(--paper);
  position: sticky; top: 0; z-index: 20; }
.masthead-inner { display: flex; align-items: baseline; gap: 2rem;
  padding: 1rem 0 0.9rem; flex-wrap: wrap; }
.wordmark { font-family: var(--display); font-weight: 800; font-size: 1.35rem;
  letter-spacing: -0.03em; font-stretch: 115%; }
.wordmark span { color: var(--confirmed); }
.tagline { font-family: var(--mono); font-size: 0.68rem; text-transform: uppercase;
  letter-spacing: 0.14em; color: var(--muted); }
nav.primary { margin-left: auto; display: flex; gap: 1.4rem; align-items: baseline;
  font-family: var(--mono); font-size: 0.75rem; text-transform: uppercase;
  letter-spacing: 0.09em; }
nav.primary a { color: var(--muted); padding-bottom: 2px; border-bottom: 1px solid transparent; }
nav.primary a:hover, nav.primary a.active { color: var(--ink); border-color: var(--ink); }
nav.primary a.tip-link { color: var(--confirmed); }
nav.primary a.staff-link { color: var(--reported); }

/* Backlog badge: any drafts awaiting review flag the Review link and Draft tab. */
.count-badge { display: inline-block; min-width: 1.6em; margin-left: 0.45em;
  padding: 0.05rem 0.4em; border-radius: 999px; background: var(--rejected);
  color: var(--card); font-size: 0.62rem; letter-spacing: 0; text-align: center;
  vertical-align: 0.12em; }

/* --- Section headers ----------------------------------------------------- */
.eyebrow { font-family: var(--mono); font-size: 0.68rem; text-transform: uppercase;
  letter-spacing: 0.16em; color: var(--muted); margin: 2.5rem 0 0.75rem; }
h1 { font-family: var(--display); font-weight: 800; letter-spacing: -0.035em;
  font-size: clamp(1.9rem, 4vw, 2.8rem); line-height: 1.05; margin: 0 0 0.4rem; font-stretch: 110%; }
h2 { font-family: var(--display); font-weight: 700; letter-spacing: -0.02em;
  font-size: 1.15rem; margin: 2rem 0 0.75rem; }
h3 { font-family: var(--display); font-weight: 600; font-size: 0.95rem; margin: 1.25rem 0 0.4rem; }

/* ============================================================================
   THE STAGE RAIL — the signature element.
   Every feed entry carries a marker whose horizontal position encodes round
   stage, pre-seed at the left through Series D+ at the right. Scroll the feed
   and the shape of the market becomes visible in the left margin.
   ========================================================================= */
.entry { display: grid; grid-template-columns: 132px 1fr; gap: 1.25rem;
  padding: 1.1rem 0; border-bottom: 1px solid var(--rule); }
.entry:hover { background: linear-gradient(90deg, rgba(15,107,92,0.045), transparent 45%); }

.rail { position: relative; height: 100%; min-height: 34px; }
.rail::before { content: ""; position: absolute; left: 0; right: 0; top: 11px;
  height: 1px; background: var(--rule); }
.rail-dot { position: absolute; top: 6px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--confirmed); transform: translateX(-50%);
  box-shadow: 0 0 0 3px var(--paper); }
.rail-dot.estimate { background: var(--paper); border: 2px solid var(--reported); }
.rail-amount { position: absolute; top: 22px; font-family: var(--mono); font-size: 0.7rem;
  font-weight: 500; transform: translateX(-50%); white-space: nowrap; color: var(--ink); }
.rail-stage { position: absolute; top: -2px; font-family: var(--mono); font-size: 0.58rem;
  color: var(--muted); text-transform: uppercase; letter-spacing: 0.07em; }
/* Markers at the track's left end anchor left instead of centring on their
   position, so nothing pokes past the page's content line into the margin. */
.rail-dot.flush, .rail-amount.flush { transform: none; }

.rail.no-round::before { background: transparent; }
.rail-kind { font-family: var(--mono); font-size: 0.62rem; text-transform: uppercase;
  letter-spacing: 0.11em; color: var(--muted); }

.entry-body h3 { margin: 0 0 0.25rem; font-family: var(--display); font-weight: 600;
  font-size: 1.06rem; line-height: 1.3; letter-spacing: -0.01em; }
.entry-body h3 a:hover { color: var(--confirmed); }
.entry-summary { margin: 0.2rem 0 0.45rem; color: #2C3236; font-size: 0.97rem; }
.byline { font-family: var(--mono); font-size: 0.68rem; color: var(--muted);
  display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; }
.byline .src::after { content: "·"; margin-left: 0.6rem; color: var(--rule); }
.chip { font-family: var(--mono); font-size: 0.66rem; padding: 1px 7px;
  border: 1px solid var(--rule); border-radius: 2px; color: var(--ink); background: var(--card); }
.chip:hover { border-color: var(--confirmed); color: var(--confirmed); }
/* A person's chip is tinted so a byline of five chips reads at a glance as
   "three organisations and two people" rather than as one undifferentiated
   row of names. */
.chip-person { background: var(--person-tint); }

/* The rest of the coverage of one round, under the entry that leads it. Set in
   mono at byline weight so it reads as apparatus rather than as more headlines
   — the whole point of bundling is that these are the same story. */
.also { margin: 0.35rem 0 0; font-family: var(--mono); font-size: 0.66rem;
  line-height: 1.85; color: var(--muted); }
.also-label { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.6rem;
  color: var(--muted); margin-right: 0.45rem; }
.also a { color: var(--muted); border-bottom: 1px solid var(--rule); }
.also a:hover { color: var(--confirmed); border-bottom-color: var(--confirmed); }
.also-sep { margin: 0 0.4rem; color: var(--rule); }

/* --- Data tables --------------------------------------------------------- */
table.data { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
table.data th { font-family: var(--mono); font-size: 0.63rem; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--muted); text-align: left; font-weight: 500;
  padding: 0.5rem 0.75rem 0.5rem 0; border-bottom: 1px solid var(--rule); }
table.data td { padding: 0.7rem 0.75rem 0.7rem 0; border-bottom: 1px solid var(--rule);
  vertical-align: top; }
table.data td.num { font-family: var(--mono); font-variant-numeric: tabular-nums;
  white-space: nowrap; }
table.data tr:hover td { background: rgba(15,107,92,0.03); }

/* --- Company profile ----------------------------------------------------- */
.profile-head { display: grid; grid-template-columns: 1fr auto; gap: 2rem;
  align-items: end; padding: 2.5rem 0 1.25rem; border-bottom: 2px solid var(--ink); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1px; background: var(--rule); border: 1px solid var(--rule); margin: 1.5rem 0 2rem; }
.fact { background: var(--paper); padding: 0.85rem 0.9rem; }
.fact dt { font-family: var(--mono); font-size: 0.6rem; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--muted); margin-bottom: 0.3rem; }
.fact dd { margin: 0; font-family: var(--mono); font-size: 1.05rem;
  font-variant-numeric: tabular-nums; }

/* Fact tiles that are also the navigation. Same grid, same cell — the only
   additions are the affordance (hover, cursor) and the marker on the active
   one, because a tile that reads as a static counter but behaves as a link is
   the thing this replaces. */
.tabs .tab { display: block; text-decoration: none; color: var(--ink);
  border-top: 2px solid transparent; }
.tabs .tab:hover { background: var(--card); }
.tabs .tab.active { border-top-color: var(--confirmed); background: var(--card); }
.tab-label { display: block; font-family: var(--mono); font-size: 0.6rem;
  text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted);
  margin-bottom: 0.3rem; }
.tabs .tab.active .tab-label { color: var(--confirmed); }
.tab-count { display: block; font-family: var(--mono); font-size: 1.05rem;
  font-variant-numeric: tabular-nums; }
.tab-note { margin: 0.2rem 0 1rem; color: var(--muted); font-size: 0.9rem;
  max-width: var(--measure); }

/* Portfolio grid: a company per card, sized so a fund with four holdings and a
   fund with eighty both look deliberate. */
.portfolio { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.portfolio-card { display: block; background: var(--paper); padding: 0.9rem;
  text-decoration: none; color: var(--ink); }
.portfolio-card:hover { background: var(--card); }
.portfolio-card strong { font-family: var(--display); font-weight: 600; font-size: 1rem; }
.portfolio-line { display: block; margin-top: 0.25rem; font-size: 0.88rem;
  color: #2C3236; line-height: 1.4; }
.portfolio-meta { display: block; margin-top: 0.5rem; font-family: var(--mono);
  font-size: 0.63rem; color: var(--muted); }
/* On a person's page the same grid holds both registers, so each card carries
   the tint the review queue already uses for that page type. */
.portfolio-card.kind-company { border-left: 3px solid var(--company-tint); }
.portfolio-card.kind-investor { border-left: 3px solid var(--investor-tint); }

/* Second line inside a table cell: the description under a name, at byline
   weight so it stays subordinate to the link above it. */
.row-line { display: block; margin-top: 0.15rem; font-family: var(--mono);
  font-size: 0.63rem; color: var(--muted); }

.ladder { list-style: none; padding: 0; margin: 0; }
.ladder li { position: relative; padding: 0 0 1.4rem 1.75rem; border-left: 1px solid var(--rule); }
.ladder li:last-child { border-left-color: transparent; padding-bottom: 0; }
.ladder li::before { content: ""; position: absolute; left: -5px; top: 6px; width: 9px;
  height: 9px; border-radius: 50%; background: var(--confirmed); }
.ladder .stage { font-family: var(--display); font-weight: 700; font-size: 1rem; }
.ladder .amount { font-family: var(--mono); font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.ladder .meta { font-family: var(--mono); font-size: 0.7rem; color: var(--muted); }

/* Attribution for anything reported rather than confirmed. */
.reported { color: var(--reported); border-bottom: 1px dotted var(--reported); cursor: help; }
.reported-note { font-family: var(--mono); font-size: 0.68rem; color: var(--reported);
  background: rgba(178,107,0,0.07); border-left: 2px solid var(--reported);
  padding: 0.5rem 0.7rem; margin: 0.6rem 0; }

/* --- Forms --------------------------------------------------------------- */
form.stack { display: grid; gap: 1.1rem; }
form.stack label { display: block; font-family: var(--mono); font-size: 0.68rem;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 0.35rem; }
input[type=text], input[type=email], input[type=url], textarea, select {
  width: 100%; font-family: var(--body); font-size: 1rem; padding: 0.65rem 0.75rem;
  background: var(--card); border: 1px solid var(--rule); border-radius: 2px; color: var(--ink); }
textarea { font-size: 0.97rem; }
.helptext { font-size: 0.82rem; color: var(--muted); margin-top: 0.3rem; }
.btn { display: inline-block; font-family: var(--mono); font-size: 0.75rem;
  text-transform: uppercase; letter-spacing: 0.1em; padding: 0.7rem 1.4rem;
  background: var(--ink); color: var(--paper); border: 0; border-radius: 2px; cursor: pointer; }
.btn:hover { background: var(--confirmed); }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--rule); }
.checkbox-row { display: flex; gap: 0.6rem; align-items: flex-start; }
.checkbox-row label { text-transform: none; letter-spacing: 0; font-family: var(--body);
  font-size: 0.95rem; color: var(--ink); margin: 0; }

/* ============================================================================
   REVIEW QUEUE — staff only.
   The row is the unmodified feed row, so a reviewer sees what a reader will.
   Actions sit in the right margin as a stacked column, never in the row itself.
   ========================================================================= */
.review-head { padding: 1.5rem 0 0.25rem; }
.review-lede { margin: 0.35rem 0 0; color: var(--muted); font-size: 0.97rem; }
/* Only for a lede long enough to run past a comfortable line. The queue's is one
   line at any width, so capping it there constrains nothing. */
.review-lede.measured { max-width: var(--measure); }

.review-entry { grid-template-columns: 132px 1fr minmax(160px, auto); align-items: start; }
.review-entry:hover { background: linear-gradient(90deg, rgba(178,107,0,0.05), transparent 55%); }

.review-actions { display: flex; flex-direction: column; gap: 0.35rem; }
.rbtn { font-family: var(--mono); font-size: 0.66rem; text-transform: uppercase;
  letter-spacing: 0.09em; padding: 0.45rem 0.8rem; text-align: center;
  background: var(--card); color: var(--ink); border: 1px solid var(--rule);
  border-radius: 2px; cursor: pointer; }
.rbtn:disabled { opacity: 0.32; cursor: default; }
.rbtn.publish:hover:not(:disabled) { background: var(--confirmed); border-color: var(--confirmed); color: var(--paper); }
.rbtn.reject:hover:not(:disabled) { background: var(--rejected); border-color: var(--rejected); color: var(--paper); }
.rbtn.draft:hover:not(:disabled) { background: var(--reported); border-color: var(--reported); color: var(--paper); }

.rbtn.report { display: block; margin-top: 0.35rem; border-style: dashed;
  color: var(--rejected); border-color: var(--rejected); }
.rbtn.report:hover { background: var(--rejected); border-style: solid; color: var(--paper); }

.review-edit { font-family: var(--mono); font-size: 0.62rem; text-transform: uppercase;
  letter-spacing: 0.09em; color: var(--muted); text-align: center; padding-top: 0.2rem; }
.review-edit:hover { color: var(--ink); }

/* What Publish will drag live with the row, and which chips point nowhere.
   Rendered inside the entry body, directly under the byline — the actions
   column is too narrow for a list of names. Review queue only. */
.linked-notes { margin-top: 0.4rem; }
.linked-note { margin: 0; font-family: var(--mono); font-size: 0.63rem;
  line-height: 1.9; color: var(--muted); }
.linked-note.dead { color: var(--rejected); }

/* Flip chips: the background tint says which table the page publishes from,
   and clicking flips the draft to the other one. Border and hover are the
   normal chip's. Buttons, not links: they change data. */
.chip-flip { display: inline; }
.chip-flip .chip { cursor: pointer; }
.chip.kind-company { background: var(--company-tint); }
.chip.kind-investor { background: var(--investor-tint); }
.linked-hint { margin-left: 0.25rem; }

/* An open report travels with the row it disputes, so nobody has to go looking. */
.report-flags { grid-column: 2 / -1; }
.report-flag { border-left: 2px solid var(--rejected); background: rgba(178,58,46,0.05);
  padding: 0.7rem 0.9rem; margin-top: 0.75rem; }
.report-flag-head { margin: 0 0 0.4rem; font-family: var(--mono); font-size: 0.66rem;
  color: var(--muted); display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; }
.report-badge { font-weight: 500; color: var(--rejected); text-transform: uppercase;
  letter-spacing: 0.1em; }
.report-flag-head a { border-bottom: 1px solid var(--rule); }
.report-detail { margin: 0 0 0.45rem; font-size: 0.93rem; color: #2C3236; }
/* The reporting email, verbatim. Folded away by default — it is evidence to
   check, not something to read on every pass down the queue. */
.report-email { margin: 0 0 0.5rem; }
.report-email summary { font-family: var(--mono); font-size: 0.63rem; text-transform: uppercase;
  letter-spacing: 0.09em; color: var(--muted); cursor: pointer; }
.report-email summary:hover { color: var(--ink); }
.report-email pre { margin: 0.5rem 0 0; padding: 0.7rem 0.9rem; background: var(--card);
  border: 1px solid var(--rule); font-family: var(--mono); font-size: 0.72rem;
  line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 22rem;
  overflow-y: auto; }

.report-audit { margin: 0; font-family: var(--mono); font-size: 0.63rem; color: var(--muted); }
.report-audit a { border-bottom: 1px solid var(--rule); }
.report-audit a:hover { color: var(--ink); border-color: var(--ink); }

/* Report form */
.report-form { max-width: 640px; margin-top: 1rem; }
/* The pasted email keeps its own line breaks and column alignment. */
.report-form textarea[name=email_text] { font-family: var(--mono); font-size: 0.8rem;
  line-height: 1.5; white-space: pre; overflow-wrap: normal; overflow-x: auto; }
.field.has-error input, .field.has-error textarea, .field.has-error select { border-color: var(--rejected); }
.field-error, .form-error { font-family: var(--mono); font-size: 0.7rem; color: var(--rejected);
  margin: 0.35rem 0 0; }
.form-error { border-left: 2px solid var(--rejected); background: rgba(178,58,46,0.06);
  padding: 0.7rem 0.9rem; margin: 1.25rem 0; }
.form-error ul { margin: 0; padding-left: 1rem; }
.form-actions { display: flex; gap: 0.75rem; align-items: center; }
.btn.danger { background: var(--rejected); }
.btn.danger:hover { background: #8F2C22; }
.muted { color: var(--muted); }

/* ============================================================================
   OPERATIONS DASHBOARD — staff only.
   Panels are the whole hit area, not a card with a link in it: the question a
   panel asks and the page that answers it are the same object. Figures use the
   display face at data sizes so spend, intake and freshness read at a glance
   from across the desk.
   ========================================================================= */
.panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1px; background: var(--rule); border: 1px solid var(--rule); margin: 1.5rem 0 2.5rem; }
.panels.two { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

.panel { display: flex; flex-direction: column; gap: 0.35rem; background: var(--paper);
  padding: 1.1rem 1.15rem 1rem; color: inherit; }
a.panel:hover { background: var(--card); }
a.panel:hover .panel-go { color: var(--confirmed); }

.panel-label { font-family: var(--mono); font-size: 0.62rem; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--muted); }
.panel-figure { font-family: var(--display); font-weight: 800; letter-spacing: -0.03em;
  font-size: 2.1rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.panel-figure.small { font-size: 1.3rem; letter-spacing: -0.02em; }
.panel-sub { font-family: var(--mono); font-size: 0.66rem; color: var(--muted); line-height: 1.6; }
.panel-warn { font-family: var(--mono); font-size: 0.64rem; color: var(--reported);
  border-left: 2px solid var(--reported); padding: 0.3rem 0.5rem; margin-top: 0.3rem; }
.panel-go { margin-top: auto; padding-top: 0.7rem; font-family: var(--mono); font-size: 0.66rem;
  text-transform: uppercase; letter-spacing: 0.09em; color: var(--ink); }
.panel-note { font-family: var(--mono); font-size: 0.66rem; color: var(--muted); margin-top: 0.75rem; }

.panel-facts { display: grid; gap: 0.15rem 1rem; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  margin: 0.55rem 0 0; }
.panel-facts dt { font-family: var(--mono); font-size: 0.58rem; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--muted); }
.panel-facts dd { margin: 0; font-family: var(--mono); font-size: 1rem;
  font-variant-numeric: tabular-nums; }
.panel-facts dd.small { font-size: 0.7rem; line-height: 1.5; }
.panel-facts dd.flag { color: var(--rejected); }
/* A count under its figure, never beside it: "$0.0473 46" reads as one number. */
.panel-facts dd .unit { display: block; color: var(--muted); font-size: 0.62rem; }

/* Seven days of spend. Bars are relative to the busiest day, so the shape says
   "which days were expensive", never "how much" — the figure above says that. */
.spark { display: flex; align-items: flex-end; gap: 3px; height: 34px; margin-top: 0.6rem; }
.spark-bar { flex: 1; background: var(--confirmed); min-height: 1px; }
.spark-bar.empty { background: var(--rule); height: 1px !important; }
.spark-axis { display: flex; justify-content: space-between; font-family: var(--mono);
  font-size: 0.56rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }

/* --- The fetch page's three script panels -------------------------------- */
/* The panel is the button. Nothing else on the page starts a process, so the
   thing you press is the whole card rather than a control hidden inside it. */
.panels.scripts .panel { padding: 0; }
.panel-hit { display: flex; flex-direction: column; gap: 0.3rem; width: 100%; text-align: left;
  padding: 1.1rem 1.15rem 0.9rem; background: var(--card); border: 0; border-bottom: 1px solid var(--rule);
  color: inherit; font: inherit; cursor: pointer; }
.panel-hit:hover { background: var(--paper); }
.panel-hit:hover .panel-cta { color: var(--confirmed); }
.panel-hit:disabled { opacity: 0.5; cursor: wait; }
.panel-cta { margin-top: 0.5rem; font-family: var(--mono); font-size: 0.68rem;
  text-transform: uppercase; letter-spacing: 0.1em; }
.panel-detail { padding: 0.85rem 1.15rem 1rem; display: flex; flex-direction: column; gap: 0.4rem; }
.panel-blurb { margin: 0; font-size: 0.88rem; color: #2C3236; }
.panel-cmd { display: block; font-family: var(--mono); font-size: 0.65rem; color: var(--muted);
  background: var(--card); border: 1px solid var(--rule); padding: 0.4rem 0.5rem;
  overflow-x: auto; white-space: nowrap; }

/* A live run pulls the eye without moving anything: the left edge goes green
   and the marker breathes. Reduced-motion turns the animation off globally. */
.panel.run.live { box-shadow: inset 3px 0 0 var(--confirmed); }
.panel.run.live .panel-figure::after { content: ""; display: inline-block; width: 7px; height: 7px;
  border-radius: 50%; background: var(--confirmed); margin-left: 0.5rem; vertical-align: 0.15em;
  animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

.run-state { font-family: var(--mono); font-size: 0.62rem; text-transform: uppercase;
  letter-spacing: 0.09em; }
.run-state.running   { color: var(--confirmed); }
.run-state.finished  { color: var(--confirmed); }
.run-state.failed    { color: var(--rejected); }
.run-state.stopped   { color: var(--reported); }
.run-state.abandoned { color: var(--reported); }
tr.watching td { background: rgba(15,107,92,0.06); }
.tabular-link { font-family: var(--mono); font-size: 0.66rem; color: var(--muted); white-space: nowrap; }
.tabular-link:hover { color: var(--confirmed); }

/* --- The console --------------------------------------------------------- */
.console-head { display: flex; gap: 1rem; justify-content: space-between; align-items: baseline;
  flex-wrap: wrap; padding: 0.5rem 0.75rem; background: var(--ink); color: var(--paper);
  font-family: var(--mono); font-size: 0.66rem; }
.console-head code { color: #9FD8C9; }
.console-right { display: flex; gap: 0.9rem; align-items: center; flex-wrap: wrap; }
.console-state { text-transform: uppercase; letter-spacing: 0.1em; color: #9AA3A6; }
.console-state.running { color: #7FD3A8; }
.console-state.failed { color: #E2857A; }
.console-state.stopped { color: #E0B36A; }
.console-state.abandoned { color: #E0B36A; }
.console-note { color: #9AA3A6; }

/* Stop sits in the console header, where whatever you are watching is named —
   the one control that is always pointed at the run in front of you. */
.console-stop { display: flex; }
.stop-btn { font-family: var(--mono); font-size: 0.64rem; text-transform: uppercase;
  letter-spacing: 0.09em; padding: 0.25rem 0.7rem; cursor: pointer; color: #E2857A;
  background: transparent; border: 1px solid #E2857A; border-radius: 2px; }
.stop-btn:hover:not(:disabled) { background: var(--rejected); border-color: var(--rejected);
  color: var(--paper); }
.stop-btn:disabled { opacity: 0.55; cursor: default; }
.console { margin: 0; padding: 0.9rem 0.75rem 1.2rem; background: var(--ink); color: #DFE4E2;
  font-family: var(--mono); font-size: 0.72rem; line-height: 1.55; white-space: pre-wrap;
  overflow-wrap: anywhere; max-height: 60vh; overflow-y: auto; }

/* Wide tables scroll inside their own box rather than the page. */
.scroll-x { overflow-x: auto; }
table.data.calls { min-width: 860px; }
table.data tfoot td { border-top: 1px solid var(--ink); border-bottom: 0; font-family: var(--mono);
  font-size: 0.72rem; padding-top: 0.6rem; }
table.data td.article { max-width: 30ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.data td.article a:hover { color: var(--confirmed); }
.unpriced { color: var(--reported); border-bottom: 1px dotted var(--reported); cursor: help; }

/* --- Filters, pagination, footer ---------------------------------------- */
.filters { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 1.25rem 0; }
.filters a { font-family: var(--mono); font-size: 0.68rem; text-transform: uppercase;
  letter-spacing: 0.09em; padding: 0.35rem 0.7rem; border: 1px solid var(--rule);
  border-radius: 2px; color: var(--muted); }
.filters a.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* Rule introducing the entry list — stands in for the old legend's border,
   held clear of the filters above it. */
.list-rule { border: 0; border-top: 1px solid var(--rule); margin: 1.25rem 0 0; }

.pager { display: flex; gap: 1rem; justify-content: center; padding: 2.5rem 0;
  font-family: var(--mono); font-size: 0.75rem; }

.notice { background: rgba(15,107,92,0.08); border-left: 2px solid var(--confirmed);
  padding: 0.8rem 1rem; margin: 1.25rem 0; font-size: 0.93rem; }

footer.site { border-top: 1px solid var(--rule); margin-top: 4rem; padding: 2rem 0 3rem;
  font-family: var(--mono); font-size: 0.72rem; color: var(--muted); }
footer.site a { border-bottom: 1px solid var(--rule); }
footer.site a:hover { color: var(--ink); border-color: var(--ink); }
.footer-cols { display: flex; gap: 2.5rem; flex-wrap: wrap; margin-bottom: 1.5rem; }

.empty { padding: 3rem 0; color: var(--muted); font-size: 0.97rem; }
.empty strong { display: block; font-family: var(--display); font-size: 1.1rem;
  color: var(--ink); margin-bottom: 0.35rem; }

@media (max-width: 700px) {
  .panels { grid-template-columns: 1fr; }
  .panel-figure { font-size: 1.7rem; }
  .entry { grid-template-columns: 1fr; gap: 0.5rem; }
  .review-entry { grid-template-columns: 1fr; }
  .review-actions { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .rbtn { flex: 1 1 auto; }
  .rail { min-height: 30px; }
  .profile-head { grid-template-columns: 1fr; }
  nav.primary { gap: 1rem; font-size: 0.68rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
