/* Chaaya. A calm editorial surface: warm paper, ink, one rust accent, and a
   dark panel for the containment moment. No web fonts, no images, no motion
   that ignores the reader's reduced-motion setting. */

:root {
  color-scheme: light;
  --paper: #f5f1e8;
  --paper-2: #ece6da;
  --paper-3: #e4ddd0;
  --ink: #171a1c;
  --ink-2: #3f4347;
  --muted: #64615b;
  --rule: #d6d0c4;
  --rule-strong: #b9b1a2;
  --accent: #8d3b2d;
  --accent-dark: #6f2c21;
  --pass: #1f5a46;
  --fail: #8d2f2f;
  --dark: #15191c;
  --dark-2: #1d2226;
  --dark-ink: #f2eee5;
  --dark-muted: #b9b3a8;
  --dark-rule: #3a4045;
  --opinion-bg: #e9e4ee;
  --opinion-ink: #3b3345;
  --opinion-rule: #c9c0d4;
  --warning-bg: #f2e5d3;
  --warning-rule: #c39a6b;
  --font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-serif: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  --measure: 68ch;
  --page: min(74rem, calc(100vw - 3rem));
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--accent);
  color: var(--paper);
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

a:hover {
  color: var(--accent-dark);
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

code,
pre,
.run-id,
.session-id {
  font-family: var(--font-mono);
}

code {
  font-size: 0.88em;
  background: var(--paper-2);
  border-radius: 2px;
  padding: 0.08em 0.28em;
  overflow-wrap: anywhere;
}

pre {
  font-size: 0.8rem;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  padding: 0.75rem 1rem;
  text-decoration: none;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* Fixture mode is injected by web/fixture/server.py. The published app has no
   fixture banner, because the static file never carries data-fixture. */
.fixture-banner {
  display: none;
}

html[data-fixture="true"] .fixture-banner {
  display: block;
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--accent);
  color: #fff8f0;
  text-align: center;
  padding: 0.7rem 1rem;
  font-size: 0.88rem;
  line-height: 1.4;
  letter-spacing: 0.01em;
}

.fixture-banner strong {
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.site-head {
  max-width: var(--page);
  margin: 0 auto;
  padding: 1.5rem 0 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid var(--rule);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.wordmark svg {
  width: 1.9rem;
  height: 1.9rem;
  color: var(--accent);
  flex: none;
}

.site-subtitle {
  margin: 0 0 0 0.5rem;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--muted);
}

.site-nav {
  margin-left: auto;
}

.site-nav a {
  font-size: 0.85rem;
  color: var(--ink-2);
  text-decoration-color: var(--rule-strong);
}

.site-nav a[aria-current="page"] {
  color: var(--accent-dark);
  font-weight: 600;
}

.app {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 0 4rem;
}

.loading {
  padding: 5rem 0;
  color: var(--muted);
}

.noscript {
  max-width: var(--page);
  margin: 2rem auto;
  padding: 1rem;
  border: 1px solid var(--rule);
  background: var(--paper-2);
}

/* Typography ------------------------------------------------------------ */

h1,
h2,
h3,
h4,
h5,
p,
ul,
ol,
dl,
figure,
blockquote {
  margin-top: 0;
}

h1,
h2 {
  font-family: var(--font-serif);
  font-weight: 600;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.6rem, 7vw, 5.6rem);
  line-height: 0.96;
  letter-spacing: -0.04em;
  margin-bottom: 1.25rem;
}

h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.2rem;
  line-height: 1.3;
  font-weight: 650;
  margin-bottom: 0.6rem;
}

h4 {
  font-size: 1rem;
  line-height: 1.35;
  font-weight: 650;
  margin-bottom: 0.4rem;
}

h5 {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 1.25rem 0 0.5rem;
}

p {
  max-width: var(--measure);
  margin-bottom: 1rem;
}

.muted {
  color: var(--muted);
}

.fine-print {
  font-size: 0.85rem;
  color: var(--muted);
  max-width: 72ch;
}

/* Judges hero ----------------------------------------------------------- */

.judges-hero {
  padding: 4.5rem 0 3rem;
  max-width: 64rem;
}

.judges-hero h1 {
  max-width: 12ch;
}

.deck {
  font-size: clamp(1.15rem, 1.9vw, 1.45rem);
  line-height: 1.45;
  color: var(--ink-2);
  max-width: 52ch;
  margin-bottom: 1rem;
}

.hero-copy {
  color: var(--muted);
  max-width: 58ch;
}

.status-line {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: var(--muted);
  margin: 1rem 0 0;
}

.status-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--muted);
  flex: none;
}

.status-dot.is-pilot {
  background: var(--accent);
}

.status-dot.is-live {
  background: var(--pass);
}

.reading-path {
  margin-top: 2.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
}

.reading-path ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.reading-path a {
  font-size: 0.9rem;
  color: var(--ink-2);
  text-decoration-color: var(--rule-strong);
}

.reading-path a:hover {
  color: var(--accent);
}

/* Sections and notices --------------------------------------------------- */

.section {
  padding: 3.5rem 0;
  border-top: 1px solid var(--rule);
}

.section--comparison {
  padding-top: 2.5rem;
}

.subsection {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
}

.subsection:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.notice {
  padding: 1.5rem;
  border: 1px solid var(--rule);
  background: var(--paper-2);
  border-radius: 2px;
  max-width: 62rem;
}

.notice h2,
.notice h3 {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.notice p:last-child {
  margin-bottom: 0;
}

.notice--pending {
  border-color: var(--rule-strong);
  background: var(--paper-2);
}

.notice--quiet {
  background: transparent;
  border-style: dashed;
}

.notice--warning {
  background: var(--warning-bg);
  border-color: var(--warning-rule);
  margin: 1.5rem 0;
}

.notice--warning h2 {
  font-size: 1.25rem;
  font-family: var(--font-sans);
  letter-spacing: 0;
}

.notice--warning ul {
  padding-left: 1.25rem;
}

/* The measured contrast -------------------------------------------------- */

.contrast {
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--rule);
}

.contrast h3 {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.contrast-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.contrast-column {
  padding: 1.5rem;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: 2px;
}

.contrast-column h4 {
  margin-top: 0;
  font-family: var(--font-serif);
  font-size: 1.35rem;
  letter-spacing: -0.015em;
}

.contrast-note {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.caveat {
  font-size: 0.92rem;
  color: var(--muted);
  max-width: 68ch;
}

.caveat--last {
  margin-top: 1rem;
}

.tally {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0.4rem;
  display: flex;
  gap: 0.4rem;
}

.tally-dot {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 1px solid var(--rule-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: var(--paper);
  transition: transform 120ms ease-out;
}

.tally-dot:hover {
  transform: translateY(-1px);
}

.tally-dot.is-pass {
  background: var(--pass);
  border-color: var(--pass);
}

.tally-dot.is-fail {
  background: var(--fail);
  border-color: var(--fail);
}

.tally-dot.is-missing {
  border-style: dashed;
  background: transparent;
}

.tally-dot.is-first {
  box-shadow: inset 0 0 0 2px var(--paper);
}

.tally-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  color: var(--paper);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1;
}

.tally-dot.is-pass .tally-mark::after {
  content: "✓";
}

.tally-dot.is-fail .tally-mark::after {
  content: "×";
}

.tally-note {
  font-size: 0.95rem;
  color: var(--ink-2);
  margin-bottom: 0.75rem;
}

.median-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--rule);
  padding-top: 0.55rem;
  margin: 0.55rem 0;
  font-size: 0.92rem;
  max-width: none;
}

.median-label {
  color: var(--muted);
}

.median-value {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  text-align: right;
}

.loss-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.loss-grid h4 {
  margin-top: 0;
}

/* Conditions and tables -------------------------------------------------- */

.condition-list {
  margin-top: 1.5rem;
}

.condition {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
}

.condition-list > .condition:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.condition-head {
  max-width: 62ch;
}

.condition-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.condition-title h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  letter-spacing: -0.02em;
}

.condition-head p {
  color: var(--muted);
  margin-top: 0.5rem;
}

.upgrade-block {
  margin-top: 1.75rem;
  padding: 1.5rem;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: 2px;
}

.upgrade-head h4 {
  margin-top: 0;
  font-family: var(--font-serif);
  font-size: 1.3rem;
  letter-spacing: -0.015em;
}

.upgrade-head p {
  font-size: 0.92rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.format {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--rule-strong);
  border-radius: 2px;
  padding: 0.08rem 0.35rem;
  vertical-align: middle;
  font-weight: 400;
}

.table-wrap {
  overflow-x: auto;
  margin: 1rem 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  line-height: 1.4;
}

th {
  text-align: left;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 650;
  padding: 0.6rem 0.5rem;
  border-bottom: 1px solid var(--rule-strong);
  white-space: nowrap;
}

td {
  padding: 0.65rem 0.5rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}

tbody tr:last-child td {
  border-bottom: 0;
}

th.num,
td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.run-cell code {
  font-size: 0.8rem;
  background: transparent;
  padding: 0;
  color: var(--ink-2);
}

.run-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-color: var(--rule-strong);
  text-decoration-thickness: 1px;
}

.run-link:hover {
  color: var(--accent-dark);
  text-decoration-style: solid;
}

.measure-unknown,
.measure-missing,
.measure-unavailable {
  color: var(--muted);
  font-style: italic;
  font-size: 0.85rem;
}

.verdict {
  font-weight: 650;
}

.verdict.is-pass {
  color: var(--pass);
}

.verdict.is-fail {
  color: var(--fail);
}

.behaviour-code {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.behaviour-upgrade {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
}

.more {
  margin: 1rem 0 0;
  border-top: 1px solid var(--rule);
  padding-top: 0.75rem;
}

.more summary {
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--ink-2);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-color: var(--rule-strong);
}

.more-body {
  padding-top: 0.75rem;
}

.subsection--invalid h3 {
  color: var(--fail);
}

/* The containment moment ------------------------------------------------- */

.containment {
  margin: 4rem 0;
  padding: clamp(2rem, 5vw, 4.5rem);
  background: var(--dark);
  color: var(--dark-ink);
  border-radius: 2px;
}

.containment h2 {
  font-size: clamp(2.2rem, 4.8vw, 4rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  max-width: 15ch;
  color: var(--dark-ink);
  margin-bottom: 0.75rem;
}

.containment-context {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dark-muted);
  margin-bottom: 1rem;
}

.containment-lede {
  max-width: 56ch;
  color: var(--dark-muted);
  font-size: 1.1rem;
}

.containment-measures {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
  border-top: 1px solid var(--dark-rule);
  border-bottom: 1px solid var(--dark-rule);
  padding: 2rem 0;
  margin: 2rem 0;
}

.containment-measure {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.containment-measure-label {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dark-muted);
}

.containment-measure-value {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.containment-measure-value .run-link {
  color: var(--dark-ink);
  text-decoration-color: var(--dark-rule);
}

.containment-measure-value .run-link:hover {
  color: #f0c9bd;
}

.containment-note {
  max-width: 62ch;
  color: var(--dark-muted);
  font-size: 0.95rem;
}

.containment-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.1rem;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.88rem;
  font-weight: 650;
  text-decoration: none;
}

.button:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--paper);
}

.button--light {
  background: var(--paper);
  border-color: var(--paper);
  color: var(--ink);
}

.button--light:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--paper);
}

.quiet-link {
  font-size: 0.9rem;
  color: inherit;
  text-decoration-color: var(--rule-strong);
}

.quiet-link--light {
  color: var(--dark-ink);
  text-decoration-color: var(--dark-rule);
}

.quiet-link--light:hover {
  color: #f0c9bd;
}

.containment :focus-visible {
  outline-color: var(--dark-ink);
}

/* Every run -------------------------------------------------------------- */

.run-groups {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  gap: 1.5rem 2rem;
  margin-top: 1.5rem;
}

.run-group h3 {
  font-size: 0.92rem;
  margin-bottom: 0.5rem;
  color: var(--ink-2);
}

.run-index-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.run-index-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--rule);
  padding: 0.32rem 0;
  font-size: 0.82rem;
}

.run-index-list code {
  background: transparent;
  padding: 0;
  font-size: 0.8rem;
}

.run-index-verdict {
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
}

.run-index-verdict.is-pass {
  color: var(--pass);
}

.run-index-verdict.is-fail {
  color: var(--fail);
}

/* Session links ---------------------------------------------------------- */

.session-card {
  display: block;
  max-width: 48rem;
  margin-top: 1.5rem;
  padding: 2rem;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: 2px;
  color: inherit;
  text-decoration: none;
}

.session-card:hover {
  border-color: var(--accent);
  color: inherit;
}

.session-card h3 {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  letter-spacing: -0.02em;
  margin: 0.75rem 0 0.5rem;
}

.session-card p {
  color: var(--ink-2);
  max-width: 55ch;
}

.session-card-cta {
  display: inline-block;
  margin-top: 0.5rem;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 0.22em;
  text-decoration-color: var(--rule-strong);
}

/* Badges ---------------------------------------------------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 0.22rem 0.42rem;
  border: 1px solid var(--rule-strong);
  border-radius: 2px;
  color: var(--ink-2);
  background: transparent;
  white-space: nowrap;
}

.badge--pilot {
  background: var(--paper-2);
}

.badge--live,
.badge--pass {
  background: var(--pass);
  border-color: var(--pass);
  color: var(--paper);
}

.badge--fail {
  background: var(--fail);
  border-color: var(--fail);
  color: var(--paper);
}

.badge--opinion {
  background: var(--opinion-bg);
  border-color: var(--opinion-rule);
  color: var(--opinion-ink);
}

.badge--draft {
  background: var(--paper-3);
  border-color: var(--rule-strong);
  border-style: dashed;
  color: var(--ink-2);
}

.badge--kind {
  background: transparent;
}

.badge--neutral {
  background: transparent;
}

.badge-row {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

/* Page heads ------------------------------------------------------------- */

.page-head {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--rule);
}

.breadcrumb {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.breadcrumb a {
  color: var(--ink-2);
  text-decoration-color: var(--rule-strong);
}

.page-title {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.page-title h1 {
  margin-bottom: 0;
}

.page-summary {
  max-width: 60ch;
  font-size: 1.15rem;
  color: var(--ink-2);
  margin-top: 1rem;
}

.session-id,
.run-id {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0.5rem 0;
}

.session-id code,
.run-id code {
  background: transparent;
  padding: 0;
}

.quiet-line {
  font-size: 0.9rem;
  color: var(--muted);
}

.quiet-line a {
  color: var(--ink-2);
  text-decoration-color: var(--rule-strong);
}

/* Session view ----------------------------------------------------------- */

.panel {
  margin: 2rem 0;
  padding: 2rem;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: 2px;
}

.panel--pilot {
  border-color: var(--rule-strong);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.panel-head h2 {
  margin-bottom: 0.25rem;
}

.change-list,
.lesson-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.change {
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}

.change:first-child {
  padding-top: 0;
  border-top: 0;
}

.change-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.severity {
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.severity--breaking {
  color: var(--fail);
}

.severity--non_breaking {
  color: var(--pass);
}

.change h3 {
  font-family: var(--font-serif);
  font-size: 1.55rem;
  letter-spacing: -0.02em;
  margin: 0.75rem 0 0.4rem;
}

.change-id {
  font-size: 0.8rem;
  color: var(--muted);
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.call-sites {
  margin-top: 1rem;
}

.call-sites h4 {
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.call-sites ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.call-sites li {
  padding: 1rem;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: 2px;
}

.call-sites pre {
  margin: 0.4rem 0 0;
  padding: 0;
  background: transparent;
  color: var(--ink-2);
  font-size: 0.8rem;
}

.check-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.check {
  padding: 0.8rem 1rem;
  border: 1px solid var(--rule);
  background: var(--paper);
  border-radius: 2px;
}

.check.is-pass {
  border-color: #b7cbbf;
}

.check.is-fail {
  border-color: #d8b5b0;
}

.check-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.9rem;
}

.check-head span {
  color: var(--muted);
}

.check.is-pass .check-head span {
  color: var(--pass);
}

.check.is-fail .check-head span {
  color: var(--fail);
}

.check p {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
  color: var(--ink-2);
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.run-card {
  padding: 2rem;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: 2px;
}

.run-card.is-pass {
  border-color: #b7cbbf;
}

.run-card.is-fail {
  border-color: #d8b5b0;
}

.run-card.is-none {
  border-color: var(--rule-strong);
}

.run-head {
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--rule);
}

.run-eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.run-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.run-title h3 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  letter-spacing: -0.02em;
  margin: 0;
}

.run-head .run-id {
  margin-top: 0.5rem;
}

.run-body h4 {
  margin-top: 1.5rem;
}

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0.75rem 1.5rem;
  margin: 1rem 0;
  padding: 0;
}

.facts > div {
  border-top: 1px solid var(--rule);
  padding-top: 0.5rem;
}

.facts dt {
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.facts dd {
  margin: 0.15rem 0 0;
  font-weight: 600;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}

.facts dd code {
  font-weight: 400;
}

.facts--wide {
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
}

.logs {
  margin: 0.5rem 0 0;
  border-top: 1px solid var(--rule);
  padding-top: 0.5rem;
}

.logs summary {
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-color: var(--rule-strong);
}

.logs pre,
.log {
  margin: 0.75rem 0 0;
  padding: 1rem;
  background: var(--dark);
  color: var(--dark-ink);
  border-radius: 2px;
  max-height: 24rem;
  overflow: auto;
  font-size: 0.8rem;
}

.log-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.retry {
  margin: 0;
  padding: 0.75rem 1rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--accent-dark);
  border-top: 1px dashed var(--rule-strong);
  border-bottom: 1px dashed var(--rule-strong);
}

.run-summary {
  font-size: 1.05rem;
  font-weight: 600;
}

.run-foot {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
}

.source-line {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 1.5rem;
}

/* The model's opinion ---------------------------------------------------- */

.opinion {
  margin: 1.5rem 0;
  padding: 1.5rem;
  background: var(--opinion-bg);
  border: 1px solid var(--opinion-rule);
  border-radius: 2px;
  color: var(--opinion-ink);
}

.opinion-head h4 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  letter-spacing: -0.015em;
  margin: 0.6rem 0 0.6rem;
}

.opinion-lede {
  font-size: 0.95rem;
  max-width: 66ch;
}

.opinion-choice {
  font-size: 0.95rem;
}

.probabilities {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.probabilities li {
  display: grid;
  grid-template-columns: minmax(8rem, 1fr) minmax(6rem, 2fr) 4rem;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
}

.prob-label {
  color: var(--opinion-ink);
}

.prob-bar {
  display: block;
  height: 0.5rem;
  background: rgb(59 51 69 / 12%);
  border-radius: 999px;
  overflow: hidden;
}

.prob-bar span {
  display: block;
  min-width: 1px;
  height: 100%;
  background: var(--opinion-ink);
  border-radius: inherit;
}

.prob-value {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}

.opinion-meta {
  font-size: 0.8rem;
  color: #5d5369;
  margin-bottom: 0;
}

/* Lessons ---------------------------------------------------------------- */

.lesson {
  padding: 1.5rem;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: 2px;
}

.lesson h3 {
  margin-top: 0;
  font-family: var(--font-serif);
  font-size: 1.4rem;
}

.lesson-check {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--rule);
}

.lesson-check pre {
  background: transparent;
  color: var(--ink-2);
  padding: 0;
  margin: 0.4rem 0 0;
  font-size: 0.8rem;
  max-height: none;
}

.lesson-run,
.lesson-memory {
  font-size: 0.88rem;
}

.lesson-memory {
  color: var(--muted);
}

.observed {
  margin-top: 1rem;
}

.observed h4 {
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.observed ul {
  padding-left: 1.2rem;
  margin: 0;
  font-size: 0.9rem;
}

/* Footer and errors ------------------------------------------------------ */

.judges-footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.88rem;
}

.judges-footer p {
  max-width: 62ch;
}

.site-foot {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 0 3rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.88rem;
}

.site-foot p {
  max-width: 62ch;
}

.not-run {
  margin-top: 2rem;
  padding: 1rem 1.25rem;
  border: 1px dashed var(--rule);
  border-radius: 0.5rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.not-run h3 {
  margin-top: 0;
  color: var(--ink);
  font-size: 1rem;
}

.not-run ul {
  margin: 0;
  padding-left: 1.2rem;
}

.error-page {
  max-width: 46rem;
  padding: 4rem 0;
}

.error-page h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
}

/* Small screens ---------------------------------------------------------- */

@media (max-width: 860px) {
  .site-head {
    flex-wrap: wrap;
  }

  .site-subtitle {
    order: 3;
    width: 100%;
    margin: 0;
  }

  .site-nav {
    margin-left: auto;
  }

  .judges-hero {
    padding-top: 2.5rem;
  }

  .contrast-grid,
  .loss-grid {
    grid-template-columns: 1fr;
  }

  .containment-measures {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .containment-measure {
    border-top: 1px solid var(--dark-rule);
    padding-top: 1rem;
  }

  .containment-measure:first-child {
    border-top: 0;
    padding-top: 0;
  }

  .run-groups {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  :root {
    --page: calc(100vw - 2rem);
  }

  body {
    font-size: 1rem;
  }

  .section {
    padding: 2.5rem 0;
  }

  .upgrade-block,
  .run-card,
  .panel {
    padding: 1.25rem;
  }

  /* Stacked tables: each cell keeps its label. */
  .measures-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .measures-table,
  .measures-table tbody,
  .measures-table tr,
  .measures-table td {
    display: block;
    width: 100%;
  }

  .measures-table tr {
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--rule);
  }

  .measures-table tr:last-child {
    border-bottom: 0;
  }

  .measures-table td {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    border: 0;
    padding: 0.2rem 0;
    text-align: left;
  }

  .measures-table td::before {
    content: attr(data-label);
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted);
    flex: none;
  }

  .measures-table td.run-cell {
    padding-bottom: 0.4rem;
  }

  .measures-table td.run-cell::before {
    content: "Run";
  }

  .measures-table td.num {
    text-align: left;
  }

  .facts {
    grid-template-columns: 1fr 1fr;
  }

  .probabilities li {
    grid-template-columns: 1fr 4rem;
  }

  .prob-bar {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .containment {
    margin: 2.5rem 0;
    padding: 1.75rem;
  }

  .containment h2 {
    font-size: 2.2rem;
  }

  .containment-links {
    align-items: flex-start;
    flex-direction: column;
  }

  h1 {
    font-size: clamp(2.4rem, 11vw, 3.6rem);
  }
}

@media (max-width: 480px) {
  .facts {
    grid-template-columns: 1fr;
  }

  .site-head {
    gap: 0.5rem;
  }

  .wordmark {
    font-size: 1.2rem;
  }

  .reading-path ul {
    gap: 0.5rem 1rem;
  }

  .tally-dot {
    width: 1.85rem;
    height: 1.85rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .site-nav,
  .skip-link,
  .reading-path,
  .containment-links,
  .session-card-cta {
    display: none !important;
  }

  html[data-fixture="true"] .fixture-banner {
    display: block !important;
    position: static;
    color: #000;
    background: #fff;
    border-bottom: 1px solid #000;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }

  a {
    color: #000;
  }

  .containment {
    background: #fff;
    color: #000;
    border: 1px solid #000;
  }

  .containment h2,
  .containment-lede,
  .containment-note,
  .containment-context,
  .containment-measure-label {
    color: #000;
  }

  .containment-measure-value .run-link {
    color: #000;
  }
}
