/* ============================================================
   Integrity Bench — calibration benchmark site
   ============================================================ */

:root {
  --bg:        #FBF6EF;   /* slightly warm off-white */
  --bg-2:      #F4EBDF;
  --surface:   #FFFFFF;
  --ink:       #1F1B16;
  --ink-soft:  #6B6155;
  --ink-faint: #9A8F80;
  --line:      #ECE2D4;
  --line-2:    #E1D5C3;

  --accent:      #E2772F;   /* orange */
  --accent-deep: #C75F1C;
  --accent-tint: #FBEBDC;

  --over:   #D85A39;   /* overconfident (warm) */
  --under:  #3E8E84;   /* underconfident (cool) */
  --acc:    #3E8E84;   /* accuracy bar */
  --conf:   #E8A04A;   /* confidence bar */
  --neutral:#B9AB98;
  --new-bg:   #4D4D4D;   /* neutral dark grey, the New badge */
  --new-text: #FFFFFF;   /* white text on it */

  --radius:   16px;
  --radius-sm:10px;
  --shadow:   0 1px 2px rgba(60,40,20,.05), 0 10px 30px -12px rgba(80,50,20,.18);
  --shadow-sm:0 1px 2px rgba(60,40,20,.06), 0 4px 14px -8px rgba(80,50,20,.16);
  --maxw: 1120px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* macOS rubber-band overscroll paints the root background-COLOUR (a gradient image is
     ignored there), so use the banner colour solid — the top edge blends seamlessly and
     the footer at the bottom is near-identical anyway. */
  background-color: #f1e8db;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* faint warm wash */
  background-image:
    radial-gradient(1200px 600px at 78% -8%, #FCEBD9 0%, rgba(252,235,217,0) 60%),
    radial-gradient(900px 500px at -5% 0%, #F6EDE0 0%, rgba(246,237,224,0) 55%);
  background-attachment: fixed;
}

h1, h2, h3 { letter-spacing: -0.02em; line-height: 1.15; }

a { color: inherit; }

/* ───────────── Title + snapshot intro ───────────── */
.site-intro {
  margin: 0 auto; padding: 46px 24px 30px; text-align: center;
  background: #f1e8db;   /* a little darker + slightly more saturated orange than --bg */
}
.site-title {
  font-size: clamp(2.2rem, 5.5vw, 3.2rem); font-weight: 800; letter-spacing: -0.03em;
  margin: 0 0 14px;
}
.site-tagline {
  font-size: clamp(1.25rem, 2.4vw, 1.55rem); line-height: 1.5; margin: 0 auto; max-width: 44ch;
}
.site-tagline strong { color: var(--ink); }
.site-byline {
  font-size: .95rem; color: var(--ink-faint); margin: 12px auto 0;
}
.draft-note { color: var(--ink-faint); font-weight: 600; }

/* ───────────── Overconfidence examples (real samples, chat-style) ───────────── */
.example-controls {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; max-width: 70ch; margin: 4px auto 18px;
}
.ex-pager { display: inline-flex; align-items: center; gap: 10px; }
.ex-pager button {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line-2); background: var(--surface);
  color: var(--ink-soft); font-size: 1rem; line-height: 1;
  cursor: pointer; box-shadow: var(--shadow-sm);
}
.ex-pager button:hover:not(:disabled) { border-color: var(--accent); color: var(--ink); }
.ex-pager button:disabled { opacity: .35; cursor: default; }
.ex-counter { font-size: .85rem; color: var(--ink-faint); min-width: 42px; text-align: center; }
.example-card { max-width: 70ch; margin-inline: auto; text-align: left; }
.ex-bubble {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 14px 18px; margin: 0 0 12px;
  box-shadow: var(--shadow-sm);
}
.ex-user { background: #f1e8db; margin-right: 46px; border-bottom-left-radius: 4px; }
.ex-ai {
  margin-left: auto; width: fit-content; max-width: calc(100% - 46px);
  border-bottom-right-radius: 4px;
}
.ex-who {
  display: block; text-transform: uppercase; letter-spacing: .12em;
  font-size: .68rem; font-weight: 700; color: var(--ink-faint); margin-bottom: 6px;
}
/* provider logo before the model name in an AI bubble — inline, undoing the block +
   full-width styling .ex-bubble img applies to scene screenshots */
.ex-who .ex-logo {
  display: inline-block; width: 18px; height: 18px; border-radius: 4px;
  vertical-align: -5px; margin: 0 7px 0 0; border: 0;
}
/* the "[Model Reasons about the question]" chip between the model name and its answer —
   carries .ex-mono .ex-mono-block so it matches the answer's font/colour/background.
   Both it and the answer render as blocks so the two always share the same width. */
.ex-thinks { display: block; margin: 0 0 8px; }
.example-card .ex-ai .ex-mono { display: block; }
.ex-bubble p { font-size: .95rem; margin: 0 0 10px; max-width: none; }
.ex-bubble p:last-child { margin-bottom: 0; }
.ex-note { color: var(--ink-faint); font-size: .85rem; }
.ex-bubble img { width: 100%; border-radius: 8px; margin-top: 4px; display: block; border: 1px solid var(--line); }
.ex-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .88rem !important; background: #f6efe4; border-radius: 8px;
  padding: 8px 12px; display: inline-block;
}
.ex-mono-block { font-size: .8rem !important; line-height: 1.45; }
.example-card .ex-verdict { font-size: .92rem; color: var(--ink-soft); margin: 22px 0 0; }
.ex-verdict b { color: var(--ink); }

/* ───────────── Per-level accuracy vs confidence plot (methodology) ───────────── */
.level-plot { max-width: 75%; margin: 26px auto; padding: 16px 18px 12px; }
.lp-title { text-align: center; font-size: 1.1rem; margin: 4px 0 14px; }
.level-plot .lp-domain-desc {
  text-align: center; font-size: .85rem; color: var(--ink-faint);
  max-width: 58ch; margin: 0 auto 10px;
}
.lp-controls { display: flex; gap: 26px; flex-wrap: wrap; margin-bottom: 12px; justify-content: center; text-align: left; }
.level-plot-svg { width: 100%; height: auto; display: block; }
.lp-band { fill: rgba(226, 119, 47, .10); }
.lp-band-label {
  font-size: 11px; fill: var(--accent-deep, #B85A1E);
  text-transform: uppercase; letter-spacing: .12em; font-weight: 700;
}
.lp-grid { stroke: var(--line); stroke-width: 1; }
.lp-grid-50 { stroke: var(--ink-faint); stroke-dasharray: 4 4; }
.lp-axis { font-size: 12px; fill: var(--ink-faint); }
.lp-axis-title { font-size: 12.5px; }
.lp-dot { stroke: #fff; stroke-width: 1.5; }
.lp-legend { margin-top: 6px; }
.lp-legend-band {
  background: rgba(226, 119, 47, .18) !important;
  border: 1px solid rgba(226, 119, 47, .5);
}
.level-plot .lp-caption { font-size: .78rem; color: var(--ink-faint); margin: 8px 2px 0; line-height: 1.5; max-width: none; text-align: center; }
.level-plot .lp-caption b { color: inherit; font-weight: 700; }
.plot-empty {
  padding: 60px 24px; text-align: center; color: var(--ink-faint); font-size: .95rem;
}

/* overconfidence-through-time view (timeplot.js) + the hero Table ⇄ Chart switch.
   That switch sits in .table-controls where the Reasoning arm slider used to be (left of
   Domain) and reuses the .arm-slider look. It replaced the tabs that stuck out of the panel's
   top-left; the arm slider is gone because both arms are now listed in the one table. */
.table-controls[hidden] { display: none; }   /* .table-controls{display:flex} beats the UA [hidden] rule */
.table-controls > *[hidden] { display: none; }   /* same override for the groups hidden per view */
.time-controls {
  display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center;
  justify-content: center; margin-top: 14px;
}
.time-controls[hidden] { display: none; }   /* display:flex beats the UA [hidden] rule */
.tp-legacy {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  font-size: .85rem; font-weight: 600; color: var(--ink-soft); user-select: none;
}
.tp-legacy input { accent-color: var(--accent); width: 15px; height: 15px; cursor: pointer; }
.time-plot-caption {
  font-size: .78rem; color: var(--ink-faint); margin: 10px 2px 0;
  line-height: 1.5; text-align: center;
}

/* calibration curve (calplot.js) — narrower panel so the plot stays near-square */
#cal-plot { max-width: 58%; }
.cp-diag { stroke: var(--ink-faint); stroke-width: 1.5; stroke-dasharray: 5 5; }
.cp-corner {
  font-size: 11px; fill: var(--ink-faint);
  text-transform: uppercase; letter-spacing: .12em; font-weight: 700;
}
.cp-legend-diag {
  background: transparent !important;
  border-top: 2px dashed var(--ink-faint);
  height: 0 !important; width: 18px !important; border-radius: 0 !important;
}
.cp-obs { stroke: var(--ink-soft); stroke-width: 3.5; stroke-linecap: round; }
.cp-legend-obs {
  background: var(--ink-soft) !important;
  height: 3px !important; width: 18px !important; border-radius: 2px !important;
}
.cp-legend-box {
  background: transparent !important;
  border: 1.6px solid; border-radius: 2px !important;
  width: 14px !important; height: 14px !important;
}

/* Whole-site ~85% zoom (Pablo's preferred density). Applied to main + footer, NOT body,
   so the #tooltip (a body child, position:fixed) keeps exact cursor-space coordinates. */
main, .site-footer { zoom: 0.85; }

/* ───────────── Layout primitives ───────────── */
.hero, .prose-section, .team-section {
  max-width: var(--maxw); margin: 0 auto; padding: 0 24px;
}
.hero { padding-top: 24px; padding-bottom: 36px; }

.eyebrow {
  text-transform: uppercase; letter-spacing: .14em; font-size: .74rem;
  font-weight: 700; color: var(--accent-deep); margin: 0 0 14px;
}
.hero-head h1 {
  font-size: clamp(2.1rem, 5vw, 3.2rem); margin: 0 0 18px; max-width: 16ch;
}
.lede {
  font-size: 1.12rem; color: var(--ink-soft); max-width: 62ch; margin: 0 auto 0 0;
}
.lede strong { color: var(--ink); }

/* ───────────── Panels ───────────── */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.chart-panel { margin-top: 0; padding: 18px 22px 18px; }

/* ───────────── Controls (sit underneath the chart) ───────────── */
.controls {
  display: flex; flex-wrap: wrap; gap: 18px 26px; align-items: flex-start;
  margin-top: 10px;
}
.control-group { display: flex; flex-direction: column; gap: 7px; }
.domain-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.domain-blurb { font-size: .85rem; color: var(--ink-faint); line-height: 1.4; max-width: 46ch; }
.control-group[data-hidden="true"] { display: none; }
.lp-check {
  display: flex; align-items: center; gap: 7px; align-self: flex-end;
  font-size: .85rem; color: var(--ink-soft); cursor: pointer; padding-bottom: 9px;
}
.lp-check input { accent-color: var(--accent); cursor: pointer; }
.control-label {
  font-size: .7rem; text-transform: uppercase; letter-spacing: .1em;
  font-weight: 700; color: var(--ink-faint);
}
.segmented {
  display: inline-flex; flex-wrap: wrap; background: var(--bg-2); border: 1px solid var(--line-2);
  border-radius: 11px; padding: 3px; gap: 2px;
}
.segmented button {
  border: 0; background: transparent; cursor: pointer;
  font: inherit; font-size: .86rem; font-weight: 600; color: var(--ink-soft);
  padding: 6px 13px; border-radius: 8px; transition: all .14s; white-space: nowrap;
}
.segmented button:hover { color: var(--ink); }
.segmented button.active {
  background: var(--surface); color: var(--accent-deep);
  box-shadow: var(--shadow-sm);
}
/* ───────────── Custom domain dropdown ───────────── */
.dropdown { position: relative; }
.dd-toggle {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 10px;
  min-width: 196px; font: inherit; font-size: .86rem; font-weight: 600; color: var(--ink);
  background: white; border: 1px solid var(--line-2);
  border-radius: 10px; padding: 8px 12px; cursor: pointer; transition: border-color .14s;
}
.dd-toggle:hover { border-color: var(--accent-soft); }
.dd-caret { color: var(--ink-faint); transition: transform .16s; flex: none; }
.dropdown.open .dd-caret { transform: rotate(180deg); }
.dd-menu {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 30;
  margin: 0; padding: 6px; list-style: none; min-width: 100%; max-height: 300px; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line-2);
  border-radius: 12px; box-shadow: var(--shadow); display: none;
}
.dropdown.open .dd-menu { display: block; }
.dd-menu li {
  padding: 8px 12px; border-radius: 8px; white-space: nowrap; cursor: pointer;
  font-size: .86rem; font-weight: 600; color: var(--ink-soft); transition: background .12s;
}
.dd-menu li:hover { background: var(--bg-2); color: var(--ink); }
.dd-menu li.selected { color: var(--accent-deep); background: var(--accent-tint); }
.dd-menu li.empty { opacity: .42; }

/* ───────────── Advanced (collapsible) ───────────── */
.advanced { flex-basis: 100%; margin-top: 4px; }
.advanced summary {
  cursor: pointer; list-style: none; user-select: none;
  font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700;
  color: var(--ink-faint); display: inline-flex; align-items: center; gap: 7px;
}
.advanced summary::-webkit-details-marker { display: none; }
.adv-caret { display: inline-block; transition: transform .16s; font-size: .7rem; }
.advanced[open] .adv-caret { transform: rotate(90deg); }
.adv-grid { display: flex; flex-wrap: wrap; gap: 16px 26px; padding-top: 16px; }

/* ───────────── Charts ───────────── */
/* minmax(0,1fr) gives the column a DEFINITE width = the container, so the SVG's width:100%
   resolves to full width instead of collapsing to its 300px intrinsic default. */
.charts { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
/* single chart: centred with side margins, ~60% of the panel so the whole thing reads smaller */
.charts:not(.compare) .chart-card { width: 100%; max-width: 620px; margin-inline: auto; }
.charts.compare { grid-template-columns: 1fr 1fr; }
@media (max-width: 820px) { .charts.compare { grid-template-columns: 1fr; } }

.chart-heading {
  font-size: clamp(1.3rem, 2.4vw, 1.7rem); font-weight: 800; letter-spacing: -0.02em;
  color: var(--ink); text-align: center; margin: 2px 0 6px;
}
.chart-subtitle {
  font-size: .95rem; color: var(--ink-soft); text-align: center;
  max-width: 60ch; margin: 0 auto 16px;
}

/* download button — bottom-right of the chart panel */
.chart-actions { display: flex; justify-content: flex-end; margin-top: 10px; }
.download-btn {
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  color: var(--ink-soft);
  background: var(--bg-2); border: 1px solid var(--line-2);
  border-radius: 9px; padding: 8px; transition: all .14s;
}
.download-btn:hover { color: var(--accent-deep); border-color: var(--accent); }

.chart-card { min-width: 0; }
.chart-title {
  font-size: .9rem; font-weight: 700; color: var(--ink);
  margin: 0 0 2px; text-align: center;
}
.chart-sub {
  font-size: .76rem; color: var(--ink-faint); text-align: center; margin: 0 0 6px;
}
.chart-svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart-empty {
  display: grid; place-items: center; min-height: 280px;
  color: var(--ink-faint); font-size: .9rem; text-align: center;
  border: 1px dashed var(--line-2); border-radius: var(--radius-sm);
  background: repeating-linear-gradient(45deg, #fcfaf6, #fcfaf6 10px, #faf6ef 10px, #faf6ef 20px);
}

/* svg bits */
.bar { transition: opacity .12s; cursor: default; }
.bar:hover { opacity: .82; }
/* extrapolated (Fable) bars — faded fill + dashed outline so they read as an estimate */
.bar-est { fill-opacity: .42; stroke-width: 2.5; stroke-dasharray: 6 4; }
.grid-line { stroke: var(--line); stroke-width: 1; }
.zero-line { stroke: var(--ink-faint); stroke-width: 1.4; }
.axis-text { fill: var(--ink-faint); font-size: 17px; font-family: inherit; }
.axis-text.model { fill: var(--ink-soft); font-weight: 600; font-size: 16px; }
.axis-text.model-sub { fill: var(--ink-faint); font-weight: 500; font-size: 12px; }
/* placeholder bars — "No data yet" / "Text only model" */
.placeholder-col { fill: var(--bg-2); stroke: var(--line-2); stroke-width: 1.5; stroke-dasharray: 5 5; }
.placeholder-text { fill: var(--ink-faint); font-size: 16px; font-weight: 600; font-family: inherit; }
.bar-label { fill: var(--ink-soft); font-size: 12px; font-weight: 700; font-family: inherit; }
.y-title { fill: var(--ink-faint); font-size: 17px; font-weight: 600; }

.legend { display: flex; gap: 18px; justify-content: center; padding-top: 4px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--ink-soft); }
.legend i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }

.chart-note {
  margin: 18px 2px 4px; font-size: .86rem; color: var(--ink-soft); max-width: 78ch;
}
.chart-note b { color: var(--ink); }

/* tooltip */
.tooltip {
  position: fixed; z-index: 100; pointer-events: none;
  background: #221d17; color: #fff; padding: 9px 12px; border-radius: 9px;
  font-size: .8rem; line-height: 1.5; box-shadow: 0 8px 24px -8px rgba(0,0,0,.5);
  max-width: min(420px, calc(100vw - 16px)); transition: opacity .1s;
}
.tooltip .tt-title { font-weight: 700; margin-bottom: 3px; }
.tooltip .tt-row { color: #d8cfc2; white-space: nowrap; }
.tooltip .tt-row i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; margin-right: 6px; }
.tooltip .tt-row b { color: #fff; font-weight: 700; }
.tooltip .tt-meta {
  margin-top: 6px; padding-top: 6px; border-top: 1px solid rgba(255,255,255,.16);
  color: #b6ab9c; font-size: .74rem;
}
.tooltip .tt-warn {
  margin-top: 6px; color: #E8A04A; font-size: .74rem; font-weight: 600;
}
/* the louder variant under the "X of 900 band questions" row */
.tooltip .tt-warn-strong { color: #E07A2E; font-weight: 700; max-width: 260px; }
/* footer section of the hover: question counts, split from the stats by a divider */
.tooltip .tt-foot { margin-top: 7px; padding-top: 6px; border-top: 1px solid rgba(255,255,255,.2); }

/* ───────────── Prose sections ───────────── */
/* Everything centre-aligned: headings/text centred, constrained blocks centred with auto
   margins (cards keep left-aligned text inside for readability). */
.prose-section { padding-top: 32px; text-align: center; }
.examples-section { padding-top: 16px; }   /* sits right under the hero table — keep the gap tight */
.team-section { text-align: center; }
/* Headings + sub-headings left-aligned, but constrained to the same centred column as the
   paragraphs so their left edge lines up with the text below. --colw = the paragraphs'
   70ch at 1.05rem, in px, since ch would resolve against each heading's own font. */
:root { --colw: 741px; }
.prose-section h2, .team-section h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.1rem); margin: 0 auto 20px;
  max-width: var(--colw); text-align: left;
}
.prose-section .domain-heading { max-width: var(--colw); margin-left: auto; margin-right: auto; text-align: left; }
.prose-section p { font-size: 1.05rem; color: var(--ink); max-width: 70ch; margin: 0 auto 18px; }
/* Paragraph text left-aligned for readability — the 70ch block itself stays centred above.
   Scoped to DIRECT section children so text inside cards/bubbles/captions keeps its own alignment. */
.prose-section > p { text-align: left; }
/* the Integrity-score calculation steps — same measure and alignment as the prose column */
.integrity-steps {
  font-size: 1.05rem; color: var(--ink); max-width: 70ch;
  margin: 0 auto 18px; padding-left: 26px; text-align: left;
}
.integrity-steps li { margin-bottom: 8px; }
.prose-section p strong { color: var(--ink); }

/* worked-example strip (placeholder tiles until the new-object renders drop in) */
.example-strip {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  margin: 28px 0 30px;
}
@media (max-width: 760px) { .example-strip { grid-template-columns: repeat(2,1fr); } }
.example-strip figure {
  margin: 0; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow-sm);
}
.example-strip img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }
/* placeholder appearance — a dashed, captioned slot where a render will go */
.example-tile {
  aspect-ratio: 16/9; display: flex; flex-direction: column; gap: 6px;
  align-items: center; justify-content: center;
  border-style: dashed !important; border-color: var(--line-2) !important;
  background: repeating-linear-gradient(45deg, #fcfaf6, #fcfaf6 10px, #f7f1e8 10px, #f7f1e8 20px) !important;
}
.example-tile .tile-level {
  font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent-deep); background: var(--accent-tint); padding: 3px 9px; border-radius: 6px;
}
.example-tile .tile-note { font-size: .72rem; color: var(--ink-faint); }

/* the ten-domain name list (names only — no task detail) */
.domain-heading { font-size: 1.44rem; margin: 30px 0 12px; }
.domain-list {
  list-style: none; padding: 0; margin: 6px auto 40px;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px;
  max-width: 70ch; text-align: left;
}
@media (max-width: 560px) { .domain-list { grid-template-columns: 1fr; } }
.domain-list li {
  display: flex; flex-direction: column; gap: 5px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 12px 15px; box-shadow: var(--shadow-sm);
}
.domain-name {
  display: flex; align-items: center; gap: 9px;
  font-size: .98rem; font-weight: 600; color: var(--ink);
}
.domain-name::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); flex: none;
}
.domain-desc {
  margin: 0; padding-left: 16px; font-size: .82rem; font-weight: 400;
  color: var(--ink-soft); line-height: 1.45;
}
.domain-tag {
  margin-left: auto; font-size: .64rem; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; color: var(--under);
  background: rgba(62,142,132,.12); padding: 2px 7px; border-radius: 5px;
}

/* scoring cards */
.scoring-cards {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 26px;
}
@media (max-width: 700px) { .scoring-cards { grid-template-columns: 1fr; } }
.scoring-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 20px 22px; box-shadow: var(--shadow-sm);
}
.scoring-card h3 { margin: 0 0 10px; font-size: 1.08rem; }
.scoring-card p { font-size: .94rem; margin: 0; }
.formula {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 8px; padding: 9px 12px; margin: 0 0 12px !important;
  font-size: .86rem !important; color: var(--accent-deep) !important;
}

/* ───────────── Team ───────────── */
.team-section { padding-top: 64px; padding-bottom: 20px; }
.team-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 8px;
}
@media (max-width: 700px) { .team-grid { grid-template-columns: 1fr; } }
.person {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm);
  text-align: center;
}
.avatar {
  width: 104px; height: 104px; border-radius: 50%; overflow: hidden;
  margin: 0 auto 16px; border: 3px solid var(--surface);
  box-shadow: 0 0 0 1px var(--line-2), var(--shadow-sm);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-logo { background: #111; }
.person h3 { margin: 0 0 4px; font-size: 1.15rem; }
.role { color: var(--accent-deep); font-weight: 600; font-size: .85rem; margin: 0 0 12px; }
.bio { color: var(--ink-soft); font-size: .94rem; margin: 0; max-width: 40ch; margin-inline: auto; }

/* ───────────── Footer ───────────── */
.site-footer {
  margin-top: 72px; border-top: 1px solid var(--line-2);
  background: var(--bg-2);            /* a touch darker than the page background */
}
.footer-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 40px 24px 52px;
  display: flex; flex-wrap: wrap; gap: 28px 40px; justify-content: space-between; align-items: flex-start;
}
.footer-contact { max-width: 46ch; }
.footer-heading { font-weight: 700; color: var(--ink); margin: 0 0 8px; font-size: 1rem; }
.footer-contact p { color: var(--ink-soft); font-size: .92rem; margin: 0 0 8px; }
.footer-contact .email { font-weight: 600; color: var(--ink); white-space: nowrap; }
.footer-note { color: var(--ink-faint); font-size: .82rem; }
.footer-meta { color: var(--ink-faint); font-size: .8rem; margin: 0; text-align: right; max-width: 50ch; line-height: 1.55; }
.role-link {
  color: var(--accent-deep); text-decoration: underline; text-underline-offset: 2px;
  font-weight: 600; transition: color .14s;
}
.role-link:hover { color: var(--accent); }

/* ───────────── Mobile ───────────── */
body { overflow-x: hidden; }

@media (max-width: 640px) {
  .site-intro { padding: 32px 18px 24px; }

  .hero { padding: 16px 10px 28px; }
  .chart-panel { padding: 14px 10px; border-radius: 14px; }

  /* the bigger viewBox + larger SVG fonts stay legible scaled to screen width, so just
     fit-to-width (no sideways scroll). */
  .chart-card { overflow-x: visible; }
  .chart-svg { width: 100%; height: auto; max-width: 100%; }
  .charts.compare { grid-template-columns: 1fr; }

  /* Hero table + chart: keep them at a readable size and scroll sideways instead of
     shrinking to fit (the Artificial Analysis pattern). */
  #cal-table-mount { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  #cal-table-mount .cal-table { min-width: 560px; }
  #time-plot-mount { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  #time-plot-mount .level-plot-svg { min-width: 780px; }

  .controls { gap: 16px 20px; }
  .control-group { width: 100%; }
  .dropdown, .dd-toggle { width: 100%; }
  .segmented { width: 100%; }
  .example-controls .segmented { width: fit-content; }   /* only 2 domain pills — don't stretch */
  .level-plot, #cal-plot { max-width: 100%; }            /* both plots full width on mobile */

  .prose-section, .team-section { padding-left: 16px; padding-right: 16px; }
  .prose-section { padding-top: 48px; }
  .example-strip { grid-template-columns: repeat(2, 1fr); }
  .scoring-cards, .team-grid { grid-template-columns: 1fr; }
  .footer-meta { text-align: left; }
}

/* ───────────────────────── Accuracy/confidence table (default view) ───────────────────────── */
.view-switch {
  display: flex;
  width: fit-content;
  margin: 18px auto 2px;
  justify-content: center;
}
.hero .panel.chart-panel { text-align: center; }
#table-view, #chart-view { text-align: left; }

.table-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  align-items: flex-end;
  justify-content: center;
  margin: 18px 0 14px;
}
.table-adv { text-align: center; }
.table-adv-cols {
  display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: center;
  padding-top: 12px;
}
.table-adv-cols label {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .85rem; color: var(--ink-soft); cursor: pointer; white-space: nowrap;
}
.table-adv-cols input { accent-color: var(--accent); cursor: pointer; }

#cal-table-mount { overflow-x: auto; }   /* narrow screens scroll instead of clipping the Gap word */
.cal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
}
.cal-table thead th {
  text-align: center;
  font-weight: 600;
  color: var(--ink-faint);
  font-size: 13px;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 8px 14px;
  border-bottom: 2px solid var(--line-2);
}
.cal-table th.num, .cal-table td.num { text-align: center; }
.cal-table tbody td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.cal-table tbody tr:last-child td { border-bottom: none; }
.cal-table .m-cell { font-weight: 600; color: var(--ink-soft); white-space: nowrap; }
/* Rank pinned at the far left (absolute, out of the flex flow so it doesn't shift the centring);
   the dot+name group centred in the cell so it sits under the centred "AI Model" heading, while
   the name text itself stays left-to-right. The left/right padding is symmetric (and wider than
   the rank) so the centre lands on the column centre AND the group never collides with the rank. */
.cal-table .m-cell {
  display: flex; align-items: center; justify-content: center; position: relative;
  padding-left: 48px; padding-right: 48px;
}
.cal-table .m-cell .m-rank {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%); margin: 0;
}
.cal-table .m-name { vertical-align: middle; }
.cal-table .m-warn-ico { vertical-align: middle; position: relative; top: -1px; margin-left: 0; color: #CB9763; }
.cal-table .m-reason {
  display: block;
  /* left-align with the model NAME: rank box (2.2em at .72rem) + its 6px margin
     + 10px dot + 9px dot margin */
  margin-left: calc(1.584rem + 25px);
  font-size: 11.5px;
  font-weight: 400;
  line-height: 1.25;
  color: var(--ink-soft);
}
/* ── Reasoning-arm slider (off/low ↔ high/max) ── */
.arm-slider {
  position: relative; display: inline-flex; background: var(--bg-2);
  border: 1px solid var(--line-2); border-radius: 11px; padding: 3px;
}
.arm-thumb {
  position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px);
  background: var(--surface); border-radius: 8px; box-shadow: var(--shadow-sm);
  transition: transform .22s cubic-bezier(.4, 0, .2, 1), width .22s cubic-bezier(.4, 0, .2, 1);
}
.arm-slider.arm-high .arm-thumb { transform: translateX(100%); }
.arm-slider.three .arm-thumb { width: calc(33.333% - 2px); }
.arm-slider.three.pos-1 .arm-thumb { transform: translateX(100%); }
.arm-slider.three.pos-2 .arm-thumb { transform: translateX(200%); }
.arm-slider .arm-opt {
  position: relative; z-index: 1; flex: 1 1 0; border: 0; background: transparent; cursor: pointer;
  font: inherit; font-size: .86rem; font-weight: 600; color: var(--ink-soft);
  padding: 6px 13px; border-radius: 8px; white-space: nowrap; transition: color .14s;
}
.arm-slider .arm-opt:hover { color: var(--ink); }
.arm-slider .arm-opt.active { color: var(--accent-deep); }

.cal-table .m-warn {
  margin-top: 0;
  margin-left: 19px;          /* align under the name, past the 10px dot + 9px gap */
  font-size: 11.5px;
  font-weight: 400;
  line-height: 1.25;
  color: #C4BBAD;             /* very light grey */
  white-space: normal;
  max-width: 230px;
}
.cal-table .dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  margin-right: 9px;
  vertical-align: middle;
}
.cal-table td.num { font-variant-numeric: tabular-nums; font-weight: 600; }
.cal-table th.th-sort { cursor: pointer; user-select: none; }
.cal-table th.th-sort:hover { color: var(--ink); }
.cal-table th.th-sorted { color: var(--ink); }
.cal-table .sort-arrow { margin-left: 4px; font-size: 0.75em; }
.cal-table .err { display: none; font-size: 0.72em; font-weight: 500; color: var(--ink-faint); margin-left: 2px; vertical-align: middle; }
.cal-table.show-err .err { display: inline; }

.cal-table .no-data { color: var(--ink-faint); font-weight: 500; font-style: italic; }

.gap-pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13.5px;
}
.gap-pill.over  { background: #FBE3DA; color: var(--over); }
.gap-pill.under { background: #DCEEEA; color: var(--under); }
.gap-pill.cal   { background: #FBEFC9; color: #B5872A; }   /* within ±2pp — well calibrated */

/* the coloured right/wrong words + bracketed ideal targets in the confidence headers */
.cal-table th .word-right { color: var(--under); }
.cal-table th .word-wrong { color: var(--over); }
/* the Low/High arm sub-labels in the ablation comparison tables + the gap between the two */
.cal-table th .arm-col { display: block; margin-top: 2px; color: var(--ink-soft); }
.cal-table th .ideal {
  display: block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-faint);
  margin-top: 2px;
}

.gap-help {
  display: inline-flex; align-items: center; justify-content: center;
  width: 15px; height: 15px; margin-left: 4px;
  border: 1px solid var(--line-2); border-radius: 50%;
  font-size: 9.5px; font-weight: 700; line-height: 1;
  color: var(--ink-faint); text-transform: none; cursor: help;
  vertical-align: middle; user-select: none; -webkit-tap-highlight-color: transparent;
}
.gap-help:hover, .gap-help:focus { border-color: var(--ink-faint); color: var(--ink-soft); outline: none; }
.tt-dim { color: var(--ink-faint); font-weight: 500; }
.cal-table tbody tr:hover { background: rgba(244, 235, 223, 0.5); cursor: default; }   /* half-strength bg-2 */

.extrap { color: var(--accent-deep); font-weight: 700; }
.table-note {
  margin-top: 14px;
  font-size: 13.5px;
  color: var(--ink-faint);
  line-height: 1.5;
}
.table-loading { padding: 28px; text-align: center; color: var(--ink-faint); }

/* full-prompt drop-down on the example cards */
.ex-summarised { color: var(--ink-faint); font-size: .82em; font-style: italic; }
.ex-full { margin: 2px 0 6px; }
.ex-full summary {
  cursor: pointer; font-size: .82rem; color: var(--ink-faint);
  user-select: none; width: fit-content;
}
.ex-full summary:hover { color: var(--ink-soft); text-decoration: underline; }
.ex-prompt {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .76rem; line-height: 1.5; white-space: pre-wrap;
  background: #f6efe4; border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 12px; margin: 8px 0 2px;
}
.ex-bubble .ex-extra { display: none; }
.ex-full[open] ~ .ex-extra { display: block; margin-top: 10px; }

/* small ordinal rank at the far left of each table row (ranked by the left-most column) */
.m-rank {
  display: inline-block; min-width: 2.2em; flex: none; margin-right: 6px;
  font-size: .72rem; font-weight: 700; color: var(--ink-faint);
  vertical-align: middle;
}

/* costs chart (costplot.js) */
.cost-name { font-size: 13px; fill: var(--ink-soft); }
.cost-val { font-size: 10.5px; }
.cost-foot { color: var(--ink-faint); font-size: .72rem; }

/* trailing per-row "?" column (cost/time details) */
.cal-table .m-help-cell { width: 34px; text-align: center; }
.lp-note { color: var(--ink-faint); font-weight: 500; }


/* ============ 2026-08-10 feedback batch ============ */
/* Extra air above section headings (dialled back 2026-08-12 — 72/56 was too much) */
.prose-section h2, h2.domain-heading { margin-top: 52px; }
.prose-section > h2:first-child { margin-top: 0; }
h3.domain-heading { margin-top: 40px; }
/* Sub-headings for the follow-up prompt variants: an h3.domain-heading, just smaller */
h4.abl-sub {
  font-size: 1.22rem; color: var(--ink); font-weight: 700;
  letter-spacing: -0.02em; line-height: 1.15;
  max-width: var(--colw); margin: 36px auto 10px; text-align: left;
}
/* Ablation tables sit at prose width, unlike the full-width main table */
/* Each ablation table in its own panel, wider than the prose column (like the level plot).
   overflow-x so a table that can't shrink scrolls INSIDE its panel instead of widening
   the page (on mobile that read as the whole site scrolling sideways). */
.abl-panel { max-width: 75%; margin: 20px auto 22px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.abl-panel .cal-table { width: 100%; }
/* Mobile: full width, table keeps a readable minimum and scrolls inside the panel.
   This override must sit AFTER the 75% base rule — an earlier media block loses the
   same-specificity tie and the panels stay pinned to 75% on phones. */
@media (max-width: 640px) {
  .abl-panel { max-width: 100%; }
  .abl-panel .cal-table { min-width: 480px; }
}
/* the explanation between ablation panels reads as a normal prose paragraph */
.abl-text {
  font-size: 1.05rem; color: var(--ink); max-width: 70ch;
  margin: 0 auto 18px; text-align: left; line-height: 1.6;
}
/* Explanatory text between the split ablation tables */
/* Ablation error bars are always on (the tables carry .show-err themselves) */
/* Coloured change columns */
.delta-good { color: #1E7D46; font-weight: 600; }
.delta-bad { color: #C03A2B; font-weight: 600; }
/* Quick toggles beside the domain dropdown (and the prospective table's show-all) */
.quick-toggles { display: flex; gap: 8px; }
.quick-toggle {
  font: inherit; font-size: .82rem; padding: 7px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--panel, #fff); color: var(--ink-soft);
  cursor: pointer;
}
.quick-toggle.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.prospective-toggle { margin: 12px auto 2px; display: block; }
/* Checkbox-as-pill toggles (Include all models / Legacy models): the .arm-slider look on a
   single option — flat pill when off, raised white face + accent text when on. */
.pill-toggle { position: relative; display: inline-flex; cursor: pointer; }
.table-controls .pill-toggle { align-self: flex-end; margin-bottom: 3px; }
/* the error-bars pill sat a hair high next to the Columns controls */
.quick-toggles .pill-toggle { margin-bottom: 1px; }
.pill-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.pill-toggle-face {
  display: inline-block; background: var(--bg-2); border: 1px solid var(--line-2);
  /* 9px vertical padding matches the arm-slider's total height exactly:
     slider = 3px container padding + 6px option padding; face = 9px flat */
  border-radius: 11px; padding: 9px 15px; font-size: .86rem; font-weight: 600;
  color: var(--ink-soft); white-space: nowrap; user-select: none;
  transition: color .14s, background .14s, box-shadow .14s;
}
.pill-toggle:hover .pill-toggle-face { color: var(--ink); }
.pill-toggle input:checked + .pill-toggle-face {
  background: var(--surface); color: var(--accent-deep); box-shadow: var(--shadow-sm);
}
/* Level strips (methodology): solid blocks split by level, no panel box */
.level-strip { max-width: 75%; margin: 40px auto; }
.level-strip .strip-title {
  font-size: .85rem; font-weight: 600; color: var(--ink-faint); margin: 0 2px 8px;
}
.level-strip .seg {
  flex: 1 1 0; background: #EAD8BE; color: var(--ink-soft);
  text-align: center; padding: 12px 0; font-weight: 600; font-size: .92rem;
}
.level-strip .seg .seg-sub {
  display: block; font-size: .68rem; font-weight: 500; color: var(--ink-faint); margin-top: 1px;
}
.level-strip .seg + .seg { border-left: 2px solid var(--bg); }
.level-strip .seg.dim { opacity: .55; }   /* levels outside the difficulty band */
.level-strip-block { display: flex; border-radius: 14px; overflow: hidden; }
/* second row: only the 3 band levels (nearest 50% accuracy), aligned under their columns */
.level-strip-band-row { display: flex; margin-top: 3px; }
.level-strip-band-row .spacer.s3 { flex: 3 1 0; }
.level-strip-band-row .spacer.s2 { flex: 2 1 0; }
.level-strip-band-row .band-block { flex: 3 1 0; display: flex; border-radius: 0 0 14px 14px; overflow: hidden; }
.level-strip-band-row .band-block .seg { background: #F3CFA3; color: var(--accent-deep); }
@media (max-width: 640px) {
  .level-strip { max-width: 100%; }
  .level-strip .seg { font-size: .68rem; padding: 9px 0; }
  .level-strip .seg .seg-sub { font-size: .52rem; }
}
/* Simulated conversations in the ablation prose (reuse the example bubbles) */
.convo-card { max-width: 70ch; margin: 18px auto 22px; text-align: left; }
.convo-card .ex-bubble p.ex-mono { font-size: .82rem; line-height: 1.5; }
/* Example verdicts: boxed like a bubble, spanning the card */
.example-card .ex-verdict {
  background: var(--panel, #fff); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px; margin: 22px 0 0; font-size: .95rem; color: var(--ink);
}
/* Row-hover coverage notes: quiet grey, never bold */
.tt-note { color: #E07A2E; font-weight: 700; font-size: .78rem; max-width: 260px; white-space: normal; margin-top: 6px; }
/* Chart axis titles: bold, and the added y-axis subtitle */
.lp-axis-title { font-weight: 700; font-size: 13px; fill: var(--ink-soft); }
.lp-y-sub { font-size: 11px; }
.lp-bar-value { font-size: 12px; font-weight: 700; fill: var(--ink-soft); }
.lp-model { font-size: 12.5px; font-weight: 600; fill: var(--ink-soft); }
/* hovering a bar dims it slightly so it's obvious which one the tooltip belongs to */
.lp-bar { transition: opacity .12s; }
.lp-bar:hover, .lp-bar.is-hover { opacity: .72; }
/* ±1 SE error bars (the bar view's Show error bars toggle) */
.lp-errbar { stroke: var(--ink); stroke-width: 1.4; opacity: .55; }


/* "New" badge under a recently released model's name (roster flag from the export,
   so the baked table and table.js always agree). Horizontal pill, dark on white. */
/* The name cell is a nowrap flex row, so the badge rides on the same line as the name. */
.cal-table .m-new-row {
  display: inline-block;
  margin-left: 8px;
  line-height: 1;
}
.cal-table .m-new {
  display: inline-block;
  background: var(--new-bg, #4D4D4D);
  color: var(--new-text, #FFFFFF);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 5px;
  white-space: nowrap;
  vertical-align: middle;
}

/* "New" pill drawn inside the bar chart SVG (mirrors the table badge) */
.lp-new-box { fill: var(--new-bg, #4D4D4D); }
.lp-new-text { fill: var(--new-text, #FFFFFF); font-size: 6.8px; font-weight: 800; letter-spacing: .04em; }
