/* Narrative vs. Numbers
   Serif carries what management said. Tabular sans carries what the numbers did.
   Mono carries machine identifiers. That distinction is the product. */

:root {
  --paper: #e7e9e4;
  --sheet: #fcfcfb;
  --ink: #14201e;
  --ink-soft: #5c6764;
  --ink-faint: #8b938f;
  --rule: #cbcfc8;
  --rule-soft: #dee1da;

  --supports: #1e6b58;
  --refutes: #a6382a;
  --absent: #98a09a;
  --select: #1d3f6b;

  --serif: "Newsreader", Iowan Old Style, Georgia, serif;
  --sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --gutter: 2.25rem;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}

h1, h2, h3 { font-weight: 500; letter-spacing: -0.01em; margin: 0; }

a { color: var(--select); text-decoration-thickness: 1px; text-underline-offset: 2px; }

.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.mono { font-family: var(--mono); font-size: 0.86em; letter-spacing: -0.01em; }
.up { color: var(--supports); }
.down { color: var(--refutes); }

button, input, select { font: inherit; color: inherit; }

button {
  background: var(--ink);
  color: var(--sheet);
  border: 1px solid var(--ink);
  border-radius: 2px;
  padding: 0.5rem 1.4rem;
  cursor: pointer;
  font-weight: 500;
}
button:hover { background: #223330; }
button:disabled { background: var(--ink-faint); border-color: var(--ink-faint); cursor: progress; }

input, select {
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 0.45rem 0.6rem;
}
input:focus-visible, select:focus-visible, button:focus-visible, tr:focus-visible {
  outline: 2px solid var(--select);
  outline-offset: 1px;
}

/* ---------- masthead ---------- */

.masthead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  padding: 1.1rem var(--gutter) 0.9rem;
  border-bottom: 1px solid var(--ink);
}

.wordmark { font-family: var(--serif); font-size: 1.4rem; }
.wordmark em { font-style: italic; }

.masthead-sub {
  color: var(--ink-soft);
  font-size: 0.8rem;
  margin-left: 0.9rem;
  border-left: 1px solid var(--rule);
  padding-left: 0.9rem;
}

.masthead-nav { display: flex; gap: 1.4rem; font-size: 0.83rem; }
.masthead-nav a { color: var(--ink-soft); text-decoration: none; }
.masthead-nav a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- opening exhibit ---------- */

.intro { padding: 0 var(--gutter) 3rem; max-width: 1320px; }

.exhibit {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  border-bottom: 1px solid var(--ink);
}

.exhibit-said { padding: 2.6rem 3rem 2.4rem 0; }
.exhibit-did { padding: 2.6rem 0 2.4rem 3rem; border-left: 1px solid var(--rule); }

.exhibit-label { color: var(--ink-soft); font-size: 0.8rem; margin: 0 0 1rem; }

.exhibit blockquote {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  line-height: 1.34;
  margin: 0;
  text-indent: -0.42em;
}
.exhibit blockquote::before { content: "\201C"; }
.exhibit blockquote::after { content: "\201D"; }

.exhibit-cite { color: var(--ink-soft); font-size: 0.8rem; margin: 1.1rem 0 0; }

.exhibit-table { width: 100%; border-collapse: collapse; }
.exhibit-table th {
  text-align: left;
  font-weight: 400;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--rule-soft);
}
.exhibit-table td {
  text-align: right;
  font-size: 1.15rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--rule-soft);
}

.exhibit-note { color: var(--ink-soft); font-size: 0.88rem; margin: 1.2rem 0 0; max-width: 46ch; }
.exhibit-note .num { color: var(--ink); }

/* ---------- run form ---------- */

.run-form {
  display: grid;
  grid-template-columns: 7rem 8rem max-content 1fr;
  gap: 0.9rem 1.2rem;
  align-items: end;
  padding-top: 2rem;
}

.field { display: flex; flex-direction: column; gap: 0.35rem; }
.field label { color: var(--ink-soft); font-size: 0.8rem; }
#ticker { font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.04em; }

.run-hint {
  grid-column: 1 / -1;
  color: var(--ink-soft);
  font-size: 0.83rem;
  margin: 0.3rem 0 0;
  max-width: 78ch;
}

.premise {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 2.6rem;
  margin-top: 3.4rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--rule);
}
.premise-col p { font-size: 0.87rem; color: var(--ink-soft); margin: 0; }
.premise-col .premise-label { color: var(--ink); font-size: 0.8rem; margin-bottom: 0.5rem; }

.progress { padding-top: 2.4rem; max-width: 62ch; }
.progress-line { font-size: 1.05rem; margin: 0 0 1rem; }
.progress-line .num { color: var(--ink-soft); }

.dots::after {
  content: "...";
  display: inline-block;
  width: 1.2em;
  text-align: left;
  clip-path: inset(0 1.2em 0 0);
  animation: dots 1.4s steps(4) infinite;
  margin-right: 0.4rem;
}
@keyframes dots { to { clip-path: inset(0 0 0 0); } }

.progress-steps {
  margin: 0;
  padding-left: 1.6rem;
  color: var(--ink-soft);
  font-size: 0.88rem;
}
.progress-steps li { padding: 0.18rem 0; }
.progress-id { color: var(--ink-faint); font-size: 0.8rem; margin-top: 1rem; }

.failure { padding-top: 2.4rem; max-width: 62ch; border-top: 2px solid var(--refutes); margin-top: 2.4rem; }
.failure-head { color: var(--refutes); font-weight: 500; margin: 0 0 0.4rem; }
.failure-body { margin: 0; color: var(--ink-soft); }

/* ---------- company strip ---------- */

.company {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  padding: 1.6rem var(--gutter) 1.2rem;
  border-bottom: 1px solid var(--ink);
}

.company h1 { font-family: var(--serif); font-size: 1.9rem; line-height: 1.1; }

.company-facts { display: flex; gap: 2rem; flex-wrap: wrap; margin: 0; }
.company-facts dt { color: var(--ink-soft); font-size: 0.75rem; }
.company-facts dd { margin: 0.1rem 0 0; font-size: 0.9rem; }

/* A caveat that changes how the whole report should be read belongs above it,
   not in a list at the bottom. */
.caveat {
  margin: 0;
  padding: 0.7rem var(--gutter);
  background: rgba(166, 56, 42, 0.09);
  border-bottom: 1px solid var(--ink);
  font-size: 0.85rem;
}

/* ---------- verdict ---------- */

.verdict {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 0.7fr) minmax(0, 1.3fr);
  background: var(--sheet);
  border-bottom: 1px solid var(--ink);
}

.verdict > div { padding: 1.8rem var(--gutter); }
.verdict-confidence, .verdict-legend { border-left: 1px solid var(--rule); }

.verdict-label { color: var(--ink-soft); font-size: 0.8rem; margin: 0 0 0.7rem; }

.verdict-number { margin: 0; display: flex; align-items: baseline; gap: 0.9rem; }
.verdict-number .num { font-size: 3.4rem; line-height: 0.95; letter-spacing: -0.03em; font-weight: 450; }
.verdict-band { font-family: var(--serif); font-size: 1.1rem; color: var(--ink-soft); }
.verdict-gloss { color: var(--ink-soft); font-size: 0.85rem; margin: 0.7rem 0 0; max-width: 26ch; }

.ruler { margin-top: 1.5rem; max-width: 30rem; }
.ruler-track { position: relative; height: 12px; display: flex; }
.ruler-band { height: 100%; border-right: 1px solid var(--sheet); }
.ruler-band:last-child { border-right: 0; }
.ruler-mark {
  position: absolute;
  top: -7px;
  bottom: -7px;
  width: 2px;
  background: var(--ink);
  transform: translateX(-1px);
  transition: left 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.ruler-scale {
  position: relative;
  height: 1.4rem;
  margin-top: 0.5rem;
  font-size: 0.72rem;
  color: var(--ink-faint);
}
.ruler-tick { position: absolute; transform: translateX(-50%); }
.ruler-names {
  display: flex;
  font-size: 0.7rem;
  color: var(--ink-faint);
  margin-top: -0.2rem;
}
.ruler-names span { text-align: center; overflow: hidden; white-space: nowrap; }

.legend-row { font-size: 0.85rem; color: var(--ink-soft); margin: 0 0 0.7rem; }
.legend-row:last-child { margin-bottom: 0; }
.legend-said { font-family: var(--serif); font-style: italic; color: var(--ink); }
.legend-did { color: var(--ink); }

/* ---------- docket ---------- */

.docket { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 31rem); }

.docket-list { padding: 1.6rem var(--gutter) 3rem; }
.detail { border-left: 1px solid var(--ink); background: var(--sheet); padding: 1.6rem var(--gutter) 3rem; }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.section-head h2 { font-family: var(--serif); font-size: 1.3rem; }
.section-note { color: var(--ink-soft); font-size: 0.83rem; margin: 0.4rem 0 0; max-width: 72ch; }

.sort { color: var(--ink-soft); font-size: 0.8rem; }
.sort select { padding: 0.25rem 0.4rem; font-size: 0.8rem; }

.claims { width: 100%; border-collapse: collapse; margin-top: 1.1rem; }
.claims thead th {
  text-align: left;
  font-weight: 400;
  font-size: 0.75rem;
  color: var(--ink-soft);
  padding: 0 0.8rem 0.5rem 0;
  border-bottom: 1px solid var(--ink);
}
.claims .col-score { text-align: right; padding-right: 0; width: 5.5rem; }
.claims .col-evidence { width: 13rem; }

.claim-row { cursor: pointer; border-bottom: 1px solid var(--rule-soft); }
.claim-row:hover { background: var(--sheet); }
.claim-row.is-open { background: var(--sheet); box-shadow: inset 3px 0 0 var(--select); }
.claim-row td { padding: 0.85rem 0.8rem 0.85rem 0; vertical-align: top; }
.claim-row td:first-child { padding-left: 0.7rem; }
.claim-row.is-open td:first-child { padding-left: calc(0.7rem - 3px); }

.claim-label { font-family: var(--serif); font-size: 1.08rem; line-height: 1.3; }
.claim-meta { color: var(--ink-faint); font-size: 0.76rem; margin-top: 0.25rem; }

.chips { display: flex; gap: 0.35rem; align-items: flex-end; height: 2.1rem; }
.chip { width: 3.4rem; position: relative; }
.chip-fill { display: block; background: var(--absent); }
.chip-name { font-size: 0.65rem; color: var(--ink-faint); margin-top: 0.2rem; }
.chip-empty { border-bottom: 1px dashed var(--rule); }

.claim-score { text-align: right; }
.claim-score .num { font-size: 1.35rem; }
.claim-band { font-size: 0.72rem; color: var(--ink-soft); }

/* ---------- detail panel ---------- */

.detail-empty { color: var(--ink-faint); font-size: 0.9rem; }

.detail h3 { font-family: var(--serif); font-size: 1.35rem; line-height: 1.22; }
.detail-category { color: var(--ink-soft); font-size: 0.78rem; margin: 0.4rem 0 1.3rem; }
.detail-description { font-size: 0.9rem; color: var(--ink-soft); margin: 0 0 1.3rem; }

.detail-quote {
  font-family: var(--serif);
  font-size: 1.02rem;
  line-height: 1.42;
  margin: 0;
  padding-left: 0.9rem;
  border-left: 2px solid var(--rule);
}
.detail-source { color: var(--ink-faint); font-size: 0.76rem; margin: 0.6rem 0 1.6rem 0.9rem; }

.detail-sub {
  font-size: 0.75rem;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 0.4rem;
  margin: 1.8rem 0 0.7rem;
}

.build { width: 100%; border-collapse: collapse; }
.build td { padding: 0.42rem 0; border-bottom: 1px solid var(--rule-soft); font-size: 0.85rem; }
.build .build-name { width: 7.4rem; }
.build .build-weight { color: var(--ink-faint); width: 3.2rem; }
.build .build-value { text-align: right; width: 3.4rem; }
.build .build-bar { padding-left: 0.7rem; }
.build .build-contribution { text-align: right; width: 4rem; color: var(--ink-soft); }
.build tr.is-absent td { color: var(--ink-faint); }

.bar { height: 7px; background: var(--rule-soft); position: relative; }
.bar-fill { position: absolute; inset: 0 auto 0 0; background: var(--supports); }

.build-total td { border-bottom: 0; padding-top: 0.7rem; font-weight: 500; }

.evidence { width: 100%; border-collapse: collapse; }
.evidence thead th {
  font-weight: 400;
  font-size: 0.7rem;
  color: var(--ink-soft);
  text-align: right;
  padding: 0 0 0.4rem 0.6rem;
  border-bottom: 1px solid var(--ink);
}
.evidence thead th:first-child { text-align: left; padding-left: 0; }
.evidence td {
  padding: 0.5rem 0 0.5rem 0.6rem;
  border-bottom: 1px solid var(--rule-soft);
  text-align: right;
  font-size: 0.84rem;
}
.evidence td:first-child { text-align: left; padding-left: 0; }
.evidence .role { color: var(--ink-faint); font-size: 0.7rem; white-space: nowrap; }
.evidence .metric-name { font-family: var(--mono); font-size: 0.78rem; }

.diverge { position: relative; height: 8px; background: var(--rule-soft); min-width: 3.4rem; }
.diverge-mid { position: absolute; top: -2px; bottom: -2px; left: 50%; width: 1px; background: var(--ink-faint); }
.diverge-fill { position: absolute; top: 0; bottom: 0; }

.history { display: flex; gap: 2px; justify-content: flex-end; }
.history-cell {
  width: 1.55rem;
  font-size: 0.68rem;
  text-align: center;
  padding: 0.1rem 0;
  background: var(--rule-soft);
  color: var(--ink-soft);
}
.history-cell.agrees { background: rgba(30, 107, 88, 0.16); color: var(--supports); }
.history-cell.disagrees { background: rgba(166, 56, 42, 0.14); color: var(--refutes); }

.detail-gaps { font-size: 0.8rem; color: var(--ink-soft); margin: 1rem 0 0; padding-left: 1.1rem; }

/* ---------- financial record ---------- */

.record { padding: 1.8rem var(--gutter) 3rem; border-top: 1px solid var(--ink); }
.record-scroll { overflow-x: auto; margin-top: 1.2rem; }

/* Columns sit close together on purpose: comparing a metric across years is the
   whole point, and values spread over a 1400px row cannot be read as a series. */
.ledger { border-collapse: collapse; min-width: 40rem; }
.ledger th, .ledger td { padding: 0.32rem 0 0.32rem 2.4rem; text-align: right; white-space: nowrap; }
.ledger tbody td { width: 7.5rem; }
.ledger thead th { border-bottom: 1px solid var(--ink); font-weight: 500; font-size: 0.82rem; }
.ledger thead th:first-child { text-align: left; }
.ledger thead .base { color: var(--ink-faint); font-weight: 400; }
.ledger .period-note { display: block; font-size: 0.68rem; color: var(--ink-faint); font-weight: 400; }

.ledger .group th {
  text-align: left;
  font-weight: 400;
  font-size: 0.74rem;
  color: var(--ink-soft);
  padding: 1.4rem 0 0.35rem;
  border-bottom: 1px solid var(--rule);
}
.ledger tbody th[scope="row"] {
  text-align: left;
  font-weight: 400;
  padding-left: 0;
  width: 17rem;
}
.ledger tbody tr:not(.group) { border-bottom: 1px solid var(--rule-soft); }
.ledger tbody tr:not(.group):hover { background: var(--sheet); }
.ledger td { font-size: 0.85rem; }
.ledger .row-key { font-family: var(--mono); font-size: 0.72rem; color: var(--ink-faint); display: block; }
.ledger .void { color: var(--ink-faint); }

/* ---------- disclosure ---------- */

.disclosure {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--ink);
  background: var(--sheet);
}
.disclosure-col { padding: 1.8rem var(--gutter) 2.6rem; }
.disclosure-col + .disclosure-col { border-left: 1px solid var(--rule); }
.disclosure h2 { font-family: var(--serif); font-size: 1.3rem; }

.contradiction { border-top: 1px solid var(--rule); padding: 0.9rem 0; }
.contradiction:last-child { border-bottom: 1px solid var(--rule); }
.contradiction-claim { font-family: var(--serif); font-size: 1rem; margin: 0; }
.contradiction-obs { font-size: 0.85rem; margin: 0.35rem 0 0; }
.contradiction-meta { font-size: 0.75rem; color: var(--ink-faint); margin: 0.3rem 0 0; }
.severity-high { color: var(--refutes); font-weight: 500; }
.severity-medium { color: #8c5a20; }
.severity-low { color: var(--ink-soft); }

.none-found { color: var(--ink-faint); font-size: 0.88rem; margin-top: 1.1rem; }

.limitations { margin: 1.1rem 0 0; padding-left: 1.1rem; font-size: 0.86rem; color: var(--ink-soft); }
.limitations li { padding: 0.2rem 0; }

/* ---------- method ---------- */

.method { padding: 1.8rem var(--gutter) 3rem; border-top: 1px solid var(--ink); }
.method h2 { font-family: var(--serif); font-size: 1.3rem; }
.method-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 3rem; margin-top: 1.2rem; }

.method-flow ol { margin: 0; padding: 0; list-style: none; counter-reset: step; }
.method-flow li {
  display: grid;
  grid-template-columns: 3.1rem 1fr;
  gap: 0.8rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--rule-soft);
  font-size: 0.88rem;
}
.flow-mark { font-size: 0.7rem; color: var(--ink-faint); padding-top: 0.2rem; }
.flow-mark.said { font-family: var(--serif); font-style: italic; }
/* Where the narrative half hands over to the deterministic half. */
.method-flow li.handover { border-top: 1px solid var(--ink); }

.method-defs dl { margin: 0; }
.method-defs dt { font-size: 0.8rem; color: var(--ink-soft); margin-top: 0.9rem; }
.method-defs dd { margin: 0.15rem 0 0; font-size: 0.88rem; }
.method-defs .op { color: var(--ink-faint); }

.bands { border-collapse: collapse; margin-top: 1.8rem; }
.bands caption { text-align: left; font-size: 0.8rem; color: var(--ink-soft); padding-bottom: 0.4rem; }
.bands td { padding: 0.25rem 1.2rem 0.25rem 0; font-size: 0.85rem; border-bottom: 1px solid var(--rule-soft); }

/* ---------- footer ---------- */

.report-footer {
  border-top: 1px solid var(--ink);
  padding: 1.8rem var(--gutter) 3rem;
  display: flex;
  gap: 2rem;
  align-items: center;
  flex-wrap: wrap;
}
.report-footer p { color: var(--ink-soft); font-size: 0.82rem; margin: 0; max-width: 62ch; }

/* ---------- responsive ---------- */

@media (max-width: 1080px) {
  /* Band names crowd once the ruler narrows; the ticks and the band beside the
     score already say the same thing. */
  .ruler-names { display: none; }
  .verdict { grid-template-columns: 1fr 1fr; }
  .verdict-legend { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--rule); }
  .docket { grid-template-columns: 1fr; }
  .detail { border-left: 0; border-top: 1px solid var(--ink); }
  .method-grid { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 720px) {
  :root { --gutter: 1.25rem; }
  .exhibit { grid-template-columns: 1fr; }
  .exhibit-said { padding: 1.8rem 0 1.4rem; }
  .exhibit-did { padding: 1.4rem 0 1.8rem; border-left: 0; border-top: 1px solid var(--rule); }
  .verdict, .disclosure { grid-template-columns: 1fr; }
  .verdict-confidence, .disclosure-col + .disclosure-col { border-left: 0; border-top: 1px solid var(--rule); }
  .run-form { grid-template-columns: 1fr 1fr; }
  .run-form button { grid-column: 1 / -1; }
  .masthead-sub { display: none; }
  .claims .col-evidence { display: none; }
  .claim-row td:nth-child(2) { display: none; }
}

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