/* ============================================================
   Voca project page - stylesheet
   Self-contained: system fonts only, no external requests.
   ============================================================ */

:root {
  --ink: #14161a;
  --ink-soft: #454b54;
  --ink-faint: #838a95;
  --line: #e6e9ee;
  --line-soft: #eef1f5;
  --bg: #ffffff;
  --bg-soft: #f7f8fb;
  --bg-tint: #fbfcfe;

  --accent: #c02f5c;
  --accent-deep: #9c2249;
  --accent-soft: #fdf1f5;
  --blue: #315bd4;
  --blue-soft: #eef3fe;

  --up: #197a49;
  --down: #b23a3a;

  --gold: #e0a92b;
  --silver: #a9b2bd;
  --bronze: #c98a56;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --maxw: 1040px;
  --nav-h: 60px;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20,22,26,.04), 0 8px 24px rgba(20,22,26,.06);
  --shadow-lg: 0 2px 6px rgba(20,22,26,.05), 0 18px 48px rgba(20,22,26,.10);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
}

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

/* ============================================================
   sticky nav
   ============================================================ */

.topnav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  background: rgba(255,255,255,.72);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s, background .2s;
}

.topnav.scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 1px 20px rgba(20,22,26,.05);
}

.nav-inner {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}

.brand img {
  display: block;
  width: 29px;
  height: 29px;
  border-radius: 7px;
  object-fit: cover;
}

.nav-links {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.nav-links a {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  transition: background .15s, color .15s;
}

.nav-links a:hover { background: var(--bg-soft); color: var(--ink); }
.nav-links a.active { color: var(--accent); background: var(--accent-soft); }

.nav-cta { display: flex; gap: 8px; }

.nav-note {
  margin-left: auto;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
  white-space: nowrap;
}
.nav-links + .nav-note { margin-left: 16px; }

/* ============================================================
   pills / buttons
   ============================================================ */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--line);
  transition: transform .15s, box-shadow .15s, background .15s, border-color .15s, color .15s;
}

.pill svg {
  width: 16px; height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pill svg .fillk { fill: currentColor; stroke: none; }

.nav-cta .pill { padding: 7px 15px; font-size: 13px; }

.pill-solid {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.pill-solid:hover { background: #000; transform: translateY(-1px); box-shadow: var(--shadow); }

.pill-ghost {
  background: #fff;
  color: var(--ink-soft);
}
.pill-ghost:hover { border-color: var(--ink-faint); color: var(--ink); transform: translateY(-1px); box-shadow: var(--shadow); }

/* ============================================================
   hero
   ============================================================ */

.hero {
  position: relative;
  overflow: hidden;
  padding: 70px 0 54px;
  text-align: center;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(1100px 380px at 50% -120px, var(--accent-soft) 0%, rgba(253,241,245,0) 70%),
    linear-gradient(180deg, #fff 0%, var(--bg-tint) 100%);
}

.hero-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(520px 200px at 15% 8%, rgba(49,91,212,.06), transparent 70%),
    radial-gradient(520px 200px at 85% 4%, rgba(192,47,92,.07), transparent 70%);
  pointer-events: none;
}

.hero-inner { position: relative; }

.venue-badge {
  display: inline-block;
  padding: 6px 15px;
  margin-bottom: 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  box-shadow: var(--shadow);
}

.title {
  margin: 0 auto 16px;
  max-width: 900px;
  font-family: var(--serif);
  font-size: 46px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.title .grad {
  background: linear-gradient(120deg, var(--accent) 0%, var(--accent-deep) 55%, #7d2f8f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  margin: 0 auto 26px;
  max-width: 660px;
  font-size: 17px;
  color: var(--ink-soft);
}

.authorline {
  margin: 0 0 6px;
  font-size: 16px;
  color: var(--ink);
}

.authorline .author { margin: 0 10px; white-space: nowrap; }
.authorline sup { color: var(--accent); font-size: 11px; }

.afflist {
  margin: 0 0 30px;
  font-size: 13.5px;
  color: var(--ink-faint);
}
.afflist sup { color: var(--accent); }
.anon-note { font-style: italic; }

.hero-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  justify-content: center;
  margin-bottom: 22px;
}

.release {
  margin: 0 auto 40px;
  display: inline-block;
  padding: 8px 18px;
  border: 1px dashed var(--accent);
  border-radius: 999px;
  background: var(--accent-soft);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--accent-deep);
}

/* stats */

.stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0;
  margin: 0 auto;
  padding: 22px 10px;
  max-width: 780px;
  list-style: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.stats li {
  flex: 1 1 0;
  min-width: 120px;
  padding: 4px 20px;
  border-left: 1px solid var(--line-soft);
}
.stats li:first-child { border-left: 0; }

.stats .num {
  display: block;
  font-family: var(--serif);
  font-size: 32px;
  line-height: 1.1;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.01em;
}
.stats .lab {
  display: block;
  margin-top: 5px;
  font-size: 12.5px;
  color: var(--ink-faint);
}

/* ============================================================
   teaser
   ============================================================ */

.teaser { padding: 46px 0 8px; }

.fig { margin: 0; }

.fig img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.fig figcaption {
  margin: 16px auto 0;
  max-width: 860px;
  text-align: center;
  font-size: 14px;
  color: var(--ink-faint);
  line-height: 1.6;
}

/* ============================================================
   sections + headings
   ============================================================ */

main { padding-bottom: 20px; }

section, #top { scroll-margin-top: calc(var(--nav-h) + 16px); }

main > section {
  padding: 56px 0;
  border-bottom: 1px solid var(--line-soft);
}
main > section:last-child { border-bottom: 0; }

.section-head {
  text-align: center;
  margin-bottom: 30px;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.section-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.section-sub {
  margin: 14px auto 0;
  max-width: 720px;
  font-size: 15px;
  color: var(--ink-soft);
}

h3.sub-h {
  margin: 46px 0 12px;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 600;
  text-align: center;
}

.prose {
  max-width: 760px;
  margin: 0 auto;
}
.prose p { margin: 0; color: var(--ink-soft); font-size: 16.5px; }

.lead {
  max-width: 760px;
  margin: 0 auto 18px;
  font-size: 14.5px;
  color: var(--ink-soft);
  text-align: center;
}

.note {
  max-width: 760px;
  margin: 10px auto 0;
  font-size: 13px;
  color: var(--ink-faint);
  font-style: italic;
  text-align: center;
}

/* Content remains visible even when JavaScript or the observer is unavailable. */
[data-reveal] {
  opacity: 1;
  transform: none;
}
[data-reveal].in { animation: reveal-in .6s ease; }
@keyframes reveal-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal].in { animation: none; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   finding cards
   ============================================================ */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

/* Keep the findings readable without overflowing narrow screens. */
#findings .cards { grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }

.card {
  position: relative;
  padding: 24px 22px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  transition: transform .18s, box-shadow .18s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.card-num {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
  opacity: .55;
  margin-bottom: 10px;
}

.card h3 {
  margin: 0 0 10px;
  font-size: 16.5px;
  font-weight: 600;
  line-height: 1.4;
}
.card p { margin: 0; font-size: 14.5px; color: var(--ink-soft); }

/* ============================================================
   dimension cards
   ============================================================ */

.dims {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.dim {
  padding: 24px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--blue);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  transition: transform .18s, box-shadow .18s;
}
.dim:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.dim.accent { border-top-color: var(--accent); }

.dim .tier {
  margin: 0 0 10px;
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 700;
}

.dim h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 6px;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
}

.dim .idx {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  flex: 0 0 28px;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
}
.dim.accent .idx { background: var(--accent-soft); color: var(--accent); }

.dim .desc { margin: 0 0 14px; font-size: 14px; color: var(--ink-faint); }
.dim ul { margin: 0; padding-left: 18px; }
.dim li { font-size: 14.5px; color: var(--ink-soft); margin-bottom: 5px; }

.hint { color: var(--ink-faint); font-size: 12.5px; font-style: italic; }

/* ============================================================
   per-dimension leaders
   ============================================================ */

.leaders {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 6px 0 14px;
}

.leader {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 16px 14px;
  background: #fff;
  box-shadow: var(--shadow);
}

.leader.warn {
  border-color: #f0c9b4;
  background: linear-gradient(180deg, #fff6f1 0%, #ffffff 100%);
}

.ld-dim {
  margin: 0 0 6px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.ld-val {
  margin: 0;
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--accent);
}

.leader.warn .ld-val { color: #b85a28; }

.ld-who {
  margin: 4px 0 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
}

.ld-foot { margin: 0; font-size: 12px; line-height: 1.5; color: var(--ink-faint); }

/* ============================================================
   tables
   ============================================================ */

.tablewrap {
  overflow-x: auto;
  margin: 20px auto 8px;
  -webkit-overflow-scrolling: touch;
}

.card-surface {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  padding: 6px 6px 2px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
table.tight { font-size: 13px; }

thead th {
  padding: 9px 10px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-soft);
  text-align: center;
  vertical-align: bottom;
  border-bottom: 2px solid var(--ink);
  white-space: normal;
}

thead th[rowspan="2"] { border-bottom: 2px solid var(--ink); }
thead tr:first-child th { border-bottom: 0; }
thead tr:first-child th[rowspan="2"] { border-bottom: 2px solid var(--ink); }

thead th.group {
  border-bottom: 1px solid var(--line);
  padding-bottom: 4px;
  color: var(--ink);
}
thead th.sub { font-weight: 500; color: var(--ink-faint); }

tbody td {
  padding: 8px 10px;
  text-align: center;
  border-bottom: 1px solid var(--line-soft);
}
th.left, td.left { text-align: left; }

tbody tr:last-child td { border-bottom: 2px solid var(--ink); }
tbody tr:hover td { background: var(--bg-tint); }

tr.grp td, tr.grp:hover td {
  background: var(--bg-soft);
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding: 7px 10px;
}

tbody tr.ours td, tbody tr.ours:hover td { background: var(--accent-soft); }
tbody td b { font-weight: 700; }

.up { color: var(--up); }
.down { color: var(--down); }
.flat { color: var(--ink-faint); }
.strong { font-weight: 700; }

.delta {
  display: inline-block;
  margin-left: 5px;
  padding: 1px 7px;
  border-radius: 5px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

/* ============================================================
   agent flow diagram
   ============================================================ */

.flow {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0;
}

.flow .node {
  flex: 1 1 0;
  min-width: 150px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  background: #fff;
  box-shadow: var(--shadow);
}

.flow .node .tag {
  display: inline-block;
  margin-bottom: 8px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  background: var(--blue-soft);
  color: var(--blue);
}
.flow .node strong { display: block; font-size: 14.5px; margin-bottom: 4px; }
.flow .node p { margin: 0; font-size: 12.5px; color: var(--ink-faint); line-height: 1.5; }

.flow .node.mon, .flow .node.dm { border-color: var(--accent); }
.flow .node.mon .tag, .flow .node.dm .tag { background: var(--accent-soft); color: var(--accent); }
.flow .node.rep { background: var(--bg-soft); }

.flow .arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: var(--ink-faint);
  font-size: 20px;
}
.flow .arrow .gate {
  margin-top: 4px;
  font-size: 10px;
  color: var(--accent);
  font-weight: 700;
  max-width: 74px;
  text-align: center;
  line-height: 1.3;
}

/* ============================================================
   case studies
   ============================================================ */

.case {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 22px;
  background: #fff;
  box-shadow: var(--shadow);
}

.case-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.case-head h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 600;
}

.badge {
  display: inline-block;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  background: var(--accent-soft);
  color: var(--accent);
  white-space: nowrap;
}

.case-desc { margin: 0 0 18px; font-size: 14.5px; color: var(--ink-soft); }

.utt {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: 15.5px;
  color: var(--ink);
}

audio { width: 100%; height: 36px; }

.turn {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 15px 16px;
  border-radius: 12px;
  background: var(--blue-soft);
  margin-bottom: 16px;
}
.turn-label {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue);
  padding-top: 3px;
}
.turn-body { flex: 1 1 auto; min-width: 0; }

.replies {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.reply {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  background: var(--bg-tint);
}
.reply.ours { border-color: var(--accent); background: var(--accent-soft); }

.reply-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.reply-head .who { font-size: 13px; font-weight: 700; letter-spacing: 0.03em; }

.verdict {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.verdict.hit { background: #e4f2ea; color: var(--up); }
.verdict.miss { background: #f7e8e8; color: var(--down); }

.crit { margin: 12px 0 0; padding: 0; list-style: none; }
.crit li {
  position: relative;
  padding-left: 22px;
  font-size: 13px;
  margin-bottom: 5px;
  color: var(--ink-soft);
}
.crit li::before { position: absolute; left: 0; font-weight: 700; }
.crit li.yes::before { content: "\2713"; color: var(--up); }
.crit li.no::before { content: "\2717"; color: var(--down); }

/* ============================================================
   reliability metrics
   ============================================================ */

.metric-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 720px;
  margin: 26px auto 0;
}
.metric {
  text-align: center;
  padding: 20px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}
.metric .mnum {
  display: block;
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 700;
  color: var(--accent);
}
.metric .mlab { display: block; margin-top: 4px; font-size: 12.5px; color: var(--ink-faint); }

/* ============================================================
   citation
   ============================================================ */

pre {
  max-width: 760px;
  margin: 0 auto;
  padding: 20px 22px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-soft);
  box-shadow: var(--shadow);
}
code { font-family: var(--mono); font-size: 13px; color: var(--ink-soft); }

/* ============================================================
   footer + back to top
   ============================================================ */

footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 44px;
  background: var(--bg-soft);
}
footer p { margin: 0; font-size: 13px; color: var(--ink-faint); text-align: center; }
.foot-release { margin-top: 8px !important; font-weight: 600; color: var(--accent-deep) !important; }

.totop {
  position: fixed;
  right: 22px; bottom: 22px;
  width: 44px; height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .2s, transform .2s, visibility .2s;
  z-index: 40;
}
.totop.show { opacity: 1; visibility: visible; transform: none; }
.totop:hover { border-color: var(--ink-faint); }
.totop svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ============================================================
   responsive
   ============================================================ */

@media (max-width: 900px) {
  .leaders { grid-template-columns: repeat(2, 1fr); }
  .cards { grid-template-columns: 1fr; }
  .dims { grid-template-columns: 1fr; }
  .replies { grid-template-columns: 1fr; }
  .metric-row { grid-template-columns: 1fr; }
  .title { font-size: 34px; }
  .flow { flex-direction: column; }
  .flow .node { min-width: 0; }
  .flow .arrow { flex-direction: row; gap: 8px; transform: rotate(90deg); }
  .flow .arrow .gate { margin-top: 0; transform: rotate(-90deg); }
  .nav-links { display: none; }
}

@media (max-width: 620px) {
  .wrap { padding: 0 18px; }
  .hero { padding: 46px 0 34px; }
  .title { font-size: 27px; }
  .subtitle { font-size: 15px; }
  .stats li { border-left: 0; width: 50%; flex: 0 0 50%; padding: 10px 8px; }
  .stats .num { font-size: 26px; }
  main > section { padding: 40px 0; }
  .section-head h2 { font-size: 24px; }
  .leaders { grid-template-columns: 1fr; }
  .meter { grid-template-columns: 1fr; gap: 4px; }
  .case { padding: 18px 16px; }
  .case-head { flex-wrap: wrap; gap: 8px; }
  .nav-cta .pill:first-child { display: none; }
}

/* ============================================================
   category color coding (leaderboards)
   ============================================================ */

:root {
  --cat-e2e: #315bd4;
  --cat-rt: #0d9488;
  --cat-casc: #7c3aed;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  margin: 0 auto 4px;
  font-size: 13px;
  color: var(--ink-soft);
}
.legend .lg-item { display: inline-flex; align-items: center; gap: 7px; }
.legend .dot {
  width: 11px; height: 11px;
  border-radius: 50%;
  display: inline-block;
}
.dot.e2e { background: var(--cat-e2e); }
.dot.rt { background: var(--cat-rt); }
.dot.casc { background: var(--cat-casc); }

/* group header rows get a colored marker */
tr.grp.e2e td { box-shadow: inset 4px 0 0 var(--cat-e2e); color: var(--cat-e2e); }
tr.grp.rt td { box-shadow: inset 4px 0 0 var(--cat-rt); color: var(--cat-rt); }
tr.grp.casc td { box-shadow: inset 4px 0 0 var(--cat-casc); color: var(--cat-casc); }

/* member rows get a thin colored spine on the model cell */
tr.cat-e2e td.left { box-shadow: inset 3px 0 0 var(--cat-e2e); }
tr.cat-rt td.left { box-shadow: inset 3px 0 0 var(--cat-rt); }
tr.cat-casc td.left { box-shadow: inset 3px 0 0 var(--cat-casc); }

/* ============================================================
   examples (MCQ + criteria scoring)
   ============================================================ */

.mode-tag {
  margin-left: 10px;
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  vertical-align: middle;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  margin-right: 10px;
  border-radius: 50%;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  vertical-align: middle;
}
.chip.usu { background: var(--blue-soft); color: var(--cat-e2e); }
.chip.ei { background: #f3edfe; color: #7c3aed; }
.chip.pc { background: var(--accent-soft); color: var(--accent); }
.chip.scb { background: #fdeee5; color: #b5651d; }

.ex {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 18px;
  background: #fff;
  box-shadow: var(--shadow);
}

.ex-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.badge.usu { background: var(--blue-soft); color: var(--cat-e2e); }
.badge.ei { background: #f3edfe; color: #7c3aed; }
.badge.pc { background: var(--accent-soft); color: var(--accent); }
.badge.scb { background: #fdeee5; color: #b5651d; }

.ex-desc { margin: 0 0 14px; font-size: 14.5px; color: var(--ink-soft); }

/* MCQ */
.stim {
  padding: 15px 16px;
  border-radius: 12px;
  background: var(--blue-soft);
  margin-bottom: 14px;
}
.stim .turn-label { display: block; margin-bottom: 8px; }
.stim .utt { margin: 10px 0 0; }

.qtext { margin: 4px 0 10px; font-size: 15px; font-weight: 600; }

.opts { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.opts li {
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  font-size: 14px;
  color: var(--ink-soft);
}
.opts li.correct {
  border-color: var(--up);
  background: #eef7f1;
  color: var(--ink);
  font-weight: 600;
}
.tick {
  float: right;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--up);
}
.modelans { margin: 14px 0 0; font-size: 14px; color: var(--ink-soft); }
.modelans b { color: var(--ink); }

/* criteria mode: turns */
.turn.model { background: var(--bg-soft); }
.turn.model .turn-label { color: var(--ink-soft); }
.turn.user.a { background: #eef3fe; }
.turn.user.b { background: #f3edfe; }
.turn.user.b .turn-label { color: #7c3aed; }

.rubric {
  margin-top: 4px;
  padding: 14px 16px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: var(--bg-tint);
}
.rubric-h {
  margin: 0 0 8px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.rubric .crit { margin: 0; }

.sysbox {
  padding: 13px 16px;
  margin-bottom: 14px;
  border: 1px solid #f0dcae;
  border-left: 4px solid var(--gold);
  border-radius: 10px;
  background: #fffaea;
}
.sysbox .sys-label {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #a9791f;
}
.sysbox p { margin: 0; font-size: 14px; color: var(--ink-soft); }

/* details-based system prompt box (generated cards) */
.sysbox > summary {
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #a9791f;
}
.sysbox[open] > summary { margin-bottom: 6px; }
.sysbox > p { white-space: pre-wrap; font-family: var(--mono); font-size: 12.5px; }

/* ============================================================
   example cards: chips, scores, rubric detail
   ============================================================ */

.ex-head { flex-wrap: wrap; gap: 8px; }

.cue-chip,
.meta-chip,
.prompt-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  white-space: nowrap;
}

.cue-chip { border-color: #e5d6c2; background: #fdf7ef; color: #8a6420; }
.source-dataset, .source-subtype { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.cue-chip::before { content: "\266A"; margin-right: 5px; opacity: .7; }

.prompt-chip.def { border-color: #ccd8f7; background: var(--blue-soft); color: #23439d; }
.prompt-chip.pro { border-color: #f3ccd9; background: var(--accent-soft); color: var(--accent-deep); }

.score {
  margin-left: auto;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}
.score .of { font-size: 13px; font-weight: 600; color: var(--ink-faint); }
.score.full { color: var(--up); }
.score.part { color: #b8791f; }
.score.zero { color: var(--down); }

.crit li .why {
  display: block;
  margin-top: 3px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-faint);
}

.rubric-h .jm {
  display: inline-block;
  margin-left: 6px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-faint);
}

.rubric-lang {
  margin: -2px 0 8px;
  font-size: 12px;
  font-style: italic;
  color: var(--ink-faint);
}

.tts-style,
.history {
  margin-top: 10px;
  font-size: 13px;
}
.tts-style > summary,
.history > summary {
  cursor: pointer;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.tts-style > summary:hover,
.history > summary:hover { color: var(--accent); }
.tts-style > p {
  margin: 7px 0 0;
  padding: 10px 12px;
  border-left: 3px solid var(--line);
  background: var(--bg-tint);
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-soft);
}
.history[open] > summary { margin-bottom: 8px; }

.prov {
  margin: 12px 0 0;
  font-size: 11.5px;
  color: var(--ink-faint);
}
.prov code {
  font-family: var(--mono);
  font-size: 11px;
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--bg-soft);
}

.utt.no-speech { font-style: italic; color: var(--ink-faint); }

.mini-dialogue { margin: 10px 0 0; }
.mini-turn { margin: 0 0 6px; font-size: 14px; color: var(--ink-soft); }
.mini-turn .who {
  display: inline-block;
  min-width: 26px;
  margin-right: 6px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--blue);
}

/* speaker tinting in multi-turn cards */
.turn.user.s1 { background: #eef3fe; }
.turn.user.s2 { background: #f3edfe; }
.turn.user.s3 { background: #f3edfe; }
.turn.user.s3 .turn-label { color: #7c3aed; }
.turn.model.seeded { background: var(--bg-soft); opacity: .88; }
.turn.model.seeded .turn-label { font-weight: 600; }

.ex.item-only { border-style: dashed; }

/* ============================================================
   A/B card: same audio, two system prompts
   ============================================================ */

.sub-h.ab-h { margin-top: 4px; }

.ab-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 4px;
}

.ab-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 15px;
  background: #fff;
}

/* push the rubrics to the bottom so the two verdict lists line up */
.ab-col .crit { margin-top: auto; padding-top: 12px; }
.ab-col.def { border-color: #ccd8f7; background: linear-gradient(180deg, #f7faff 0%, #fff 60%); }
.ab-col.pro { border-color: #f3ccd9; background: linear-gradient(180deg, #fff7fa 0%, #fff 60%); }

.ab-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.ab-sub { margin: 4px 0 10px; font-size: 12.5px; color: var(--ink-faint); }
.ab-col .utt { white-space: pre-line; }
.ab-col audio { width: 100%; }
.ab-col .crit li { font-size: 13px; }

.pc-protocol {
  margin: 18px 0 24px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-soft);
}
.pc-protocol h4, .pc-explanation h4 {
  margin: 0 0 6px;
  font-size: 14px;
  color: var(--ink);
}
.pc-protocol p, .pc-explanation p {
  margin: 0 0 14px;
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.7;
}
.pc-explanation {
  margin: 16px 0 20px;
  padding: 14px 16px 2px;
  border-left: 3px solid var(--accent);
  background: var(--bg-tint);
}
.judge-analysis { margin: 10px 0 14px; font-size: 13px; }
.judge-analysis summary { cursor: pointer; font-weight: 600; color: var(--accent-deep); }
.judge-analysis p { white-space: pre-wrap; color: var(--ink-soft); }
.ab-col .rubric { margin-top: 14px; }
.ab-col .rubric .why { color: var(--ink-soft); }

@media (max-width: 620px) {
  .ab-grid { grid-template-columns: minmax(0, 1fr); }
  .ex { padding: 18px 16px; }
  .turn { flex-direction: column; gap: 8px; }
  .turn-body { width: 100%; }
  .prov, .rubric-h .jm { overflow-wrap: anywhere; }
}

/* ============================================================
   percentage meters
   ============================================================ */

.meters { margin: 4px 0 18px; }

.meter {
  display: grid;
  grid-template-columns: 200px 1fr auto;
  align-items: center;
  column-gap: 14px;
  row-gap: 2px;
  padding: 9px 0;
}

.mt-lab { font-size: 14px; font-weight: 600; color: var(--ink); }

.mt-track {
  height: 14px;
  border-radius: 4px;
  background: var(--bg-soft);
  box-shadow: inset 0 0 0 1px var(--line-soft);
  overflow: hidden;
}
.mt-fill {
  display: block;
  height: 100%;
  border-radius: 0 4px 4px 0;
}
.mt-fill.def { background: var(--blue); }
.mt-fill.pro { background: var(--accent); }

.mt-val {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
  min-width: 62px;
  text-align: right;
}
.mt-n {
  grid-column: 2 / -1;
  font-size: 12px;
  color: var(--ink-faint);
}

.meters figcaption {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-faint);
}

/* ============================================================
   released data cards
   ============================================================ */

.data-card { padding-top: 20px; }
.dc-name {
  margin: 0;
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--accent-deep);
}
.dc-sub {
  margin: 3px 0 12px;
  font-size: 13px;
  font-style: italic;
  color: var(--ink-faint);
}
.dc-list { margin: 0; padding-left: 18px; }
.dc-list li {
  margin-bottom: 7px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-soft);
}
.dc-list b { color: var(--ink); }

/* jump links inside the examples section */
.ex-jump {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 0 0 26px;
}
.ex-jump a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
  transition: border-color .15s, color .15s, box-shadow .15s;
}
.ex-jump a:hover {
  border-color: var(--ink-faint);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.ex-jump .chip { margin-right: 0; width: 22px; height: 22px; font-size: 12px; }
.sub-h[id] { scroll-margin-top: calc(var(--nav-h) + 18px); }

/* Example gallery: choose a dimension and expand a single case. */
.example-group[hidden], .example-subgroup[hidden] { display: none !important; }
.example-group, .example-choice { scroll-margin-top: calc(var(--nav-h) + 18px); }
.example-tabs a[aria-selected="true"], .subgroup-nav a[aria-selected="true"] {
  color: var(--accent-deep);
  border-color: var(--accent);
  background: var(--accent-soft);
}
.example-count { color: var(--ink-soft); font-size: 11px; }
.browse-label { margin: 20px 0 12px; color: var(--ink-soft); font-size: 13px; font-weight: 600; }
.reading-guide { margin: 0 0 16px; padding: 14px 18px; border-left: 3px solid var(--accent); border-radius: 0 10px 10px 0; background: var(--bg-tint); }
.reading-guide strong { color: var(--ink); font-size: 14px; }
.reading-guide p { margin: 5px 0 0; color: var(--ink-soft); font-size: 13px; line-height: 1.7; }
.gallery-context { flex: 1 1 100%; font-size: 12px; font-weight: 600; color: var(--ink-soft); }
.gallery-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: var(--bg-soft);
}
.gallery-tools[hidden] { display: none; }
.gallery-action {
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink-soft);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.gallery-action:hover, .gallery-action:focus-visible { border-color: var(--accent); color: var(--accent-deep); }
.gallery-status { min-height: 16px; color: var(--ink-faint); font-size: 11px; }
.gallery-status { overflow-wrap: anywhere; }
.case-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.gallery-action:focus-visible, .subgroup-nav a:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.subgroup-nav { display: flex; flex-wrap: wrap; gap: 9px; margin: 0 0 20px; scroll-margin-top: calc(var(--nav-h) + 18px); }
.subgroup-nav a { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; max-width: 100%; padding: 9px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-soft); font-size: 13px; font-weight: 600; text-decoration: none; background: #fff; }
.subgroup-nav a:hover { border-color: var(--accent); color: var(--accent-deep); }
.subgroup-nav .example-count { font-variant-numeric: tabular-nums; }
.example-subgroup { margin: 28px 0 34px; scroll-margin-top: calc(var(--nav-h) + 18px); }
.subgroup-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin: 0 0 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line-soft); }
.subgroup-kicker { display: block; margin-bottom: 4px; color: var(--accent-deep); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.subgroup-head h4 { margin: 0; font-family: var(--serif); font-size: 21px; line-height: 1.2; }
.subgroup-head p { max-width: 720px; margin: 5px 0 0; color: var(--ink-faint); font-size: 13px; line-height: 1.55; }
.subgroup-count { flex: 0 0 auto; padding-top: 18px; color: var(--ink-faint); font-size: 12px; }
main > .agent-example-placeholder { margin: 44px 0 10px; padding: 22px 24px; border: 1px dashed #c9b7bd; border-radius: 10px; background: linear-gradient(180deg, #fff9fb, #fff); scroll-margin-top: calc(var(--nav-h) + 18px); }
.placeholder-head h2 { margin: 4px 0 6px; font-family: var(--serif); font-size: 22px; }
.placeholder-head p { max-width: 760px; margin: 0; color: var(--ink-soft); font-size: 13px; line-height: 1.6; }
.placeholder-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.placeholder-grid > div { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--line-soft); border-radius: 8px; background: #fff; color: var(--ink-soft); font-size: 13px; }
.placeholder-grid strong { color: var(--ink-faint); font-size: 12px; font-weight: 600; }
.example-choice {
  margin: 12px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.example-choice > summary {
  display: list-item;
  padding: 17px 20px;
  cursor: pointer;
  color: var(--ink);
}
.example-choice > summary::marker { color: var(--accent); }
.choice-title { font-size: 15px; font-weight: 600; }
.choice-score {
  display: block;
  margin: 5px 0 0 16px;
  font-size: 12px;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}
.example-choice[open] { border-color: #d7afbc; }
.example-choice[open] > summary { background: var(--accent-soft); border-radius: var(--radius) var(--radius) 0 0; }
.example-choice > .ex { border: 0; box-shadow: none; margin: 0; }
.example-choice .ex h4 { font-size: 14px; margin: 16px 0 10px; }
.example-choice .ex p { overflow-wrap: anywhere; }
.example-choice .ex .utt { white-space: pre-wrap; }
.example-choice .note { text-align: left; margin-bottom: 12px; }
.example-choice .example-conversation > .turn { margin-top: 12px; }
.response-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin: 20px 0; }
.response-grid.paired { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.response-card { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 12px; }
.response-card.def { background: linear-gradient(180deg, #f7faff, #fff 300px); border-color: #ccd8f7; }
.response-card.pro { background: linear-gradient(180deg, #fff7fa, #fff 300px); border-color: #f3ccd9; }
.response-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.response-heading h4 { margin: 0 !important; }
.result-label { font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; }
.result-label.full { color: var(--up); }
.result-label.part { color: #946013; }
.result-label.zero { color: var(--down); }
.reference-label { display: block; font-size: 11px; color: var(--up); font-weight: 600; }
.judge-model { font-family: var(--mono); font-size: 11px; color: var(--ink-soft); }
.source-detail, .judge-analysis, .tts-style { margin: 12px 0; }
.source-detail > summary, .judge-analysis > summary, .tts-style > summary, .pc-protocol > summary { cursor: pointer; font-size: 13px; font-weight: 600; }
.detail-text { margin: 10px 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; color: var(--ink-soft); }
.source-detail .detail-text { padding: 12px; background: var(--bg-soft); border-radius: 8px; }
.expected-rules { border-left: 3px solid var(--accent); background: var(--bg-tint); padding: 1px 16px 12px; }
.expected-rules p, .expected-rules li { font-size: 13px; color: var(--ink-soft); }
.expected-rules ol { padding-left: 20px; }
.expected-rules li { margin-bottom: 7px; }
.response-card .rubric { margin-top: 20px; }
.response-card .crit li .why { color: var(--ink-soft); }
.example-tabs a:focus-visible, summary:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
@media (max-width: 760px) {
  .response-grid.paired { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 620px) {
  .subgroup-head { display: block; }
  .subgroup-count { display: block; padding-top: 6px; }
  .placeholder-grid { grid-template-columns: minmax(0, 1fr); }
  .example-choice > summary { padding: 14px; }
  .example-choice > .ex { padding: 16px 12px; }
  .response-card { padding: 12px; }
  .example-choice .rubric { padding: 12px; }
}

/* VocaAgent case gallery: two levels of guided tabs, then one expandable case. */
.agent-case-gallery { margin: 54px 0 18px; scroll-margin-top: calc(var(--nav-h) + 18px); }
.agent-case-gallery[hidden], .agent-outcome[hidden], .agent-subgroup[hidden] { display: none !important; }
.agent-reading-guide { margin: 18px 0 18px; padding: 15px 18px; border-left: 3px solid var(--accent); border-radius: 0 10px 10px 0; background: var(--bg-tint); }
.agent-reading-guide strong { color: var(--ink); font-size: 14px; }
.agent-reading-guide p { margin: 5px 0 0; color: var(--ink-soft); font-size: 13px; line-height: 1.7; }
.agent-outcome-tabs, .agent-subgroup-nav { display: flex; flex-wrap: wrap; gap: 9px; margin: 0 0 20px; scroll-margin-top: calc(var(--nav-h) + 18px); }
.agent-outcome-tabs a, .agent-subgroup-nav a { display: inline-flex; align-items: center; gap: 9px; min-height: 42px; padding: 9px 15px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-soft); font-size: 13px; font-weight: 650; text-decoration: none; background: #fff; }
.agent-outcome-tabs a:hover, .agent-subgroup-nav a:hover, .agent-outcome-tabs a[aria-selected="true"], .agent-subgroup-nav a[aria-selected="true"] { border-color: var(--accent); color: var(--accent-deep); background: var(--accent-soft); }
.agent-outcome-tabs a span { display: inline-grid; place-items: center; min-width: 25px; height: 25px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-deep); font-size: 12px; font-variant-numeric: tabular-nums; }
.agent-subgroup-nav a b { color: var(--ink-faint); font-size: 12px; font-variant-numeric: tabular-nums; }
.agent-outcome { margin: 27px 0 42px; scroll-margin-top: calc(var(--nav-h) + 18px); }
.agent-outcome > .sub-h { margin-top: 28px; }
.agent-subgroup { margin: 26px 0 34px; scroll-margin-top: calc(var(--nav-h) + 18px); }
.agent-subgroup-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin: 0 0 13px; padding-bottom: 11px; border-bottom: 1px solid var(--line-soft); }
.agent-subgroup-head h4 { margin: 0; font-family: var(--serif); font-size: 21px; line-height: 1.2; }
.agent-subgroup-head p { max-width: 720px; margin: 5px 0 0; color: var(--ink-faint); font-size: 13px; line-height: 1.55; }
.agent-case-choice { margin: 12px 0; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; scroll-margin-top: calc(var(--nav-h) + 18px); }
.agent-case-choice > summary { display: list-item; padding: 16px 20px; cursor: pointer; color: var(--ink); }
.agent-case-choice > summary::marker { color: var(--accent); }
.agent-choice-title { font-size: 15px; font-weight: 650; }
.agent-choice-score { display: block; margin: 5px 0 0 16px; color: var(--ink-soft); font-size: 12px; font-variant-numeric: tabular-nums; }
.agent-case-choice[open] { border-color: #d7afbc; }
.agent-case-choice[open] > summary { background: var(--accent-soft); border-radius: var(--radius) var(--radius) 0 0; }
.agent-case-card { padding: 20px 22px 22px; border-top: 1px solid var(--line-soft); }
.agent-case-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.agent-case-head h4 { margin: 2px 0 0; font-family: var(--serif); font-size: 23px; line-height: 1.2; }
.agent-case-kicker { color: var(--accent-deep); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.agent-tier { flex: 0 0 auto; padding: 5px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; line-height: 1.2; }
.agent-tier.strict { color: #1f7045; background: #e8f5ed; }
.agent-tier.supplemental { color: #8a5a11; background: #fff2d7; }
.agent-tier.limited { color: #8b3b51; background: #fdecef; }
.agent-meta { display: flex; flex-wrap: wrap; gap: 7px; margin: 13px 0 4px; }
.agent-case-description { margin: 12px 0; color: var(--ink-soft); line-height: 1.65; }
.agent-evidence-note { margin: 14px 0; padding: 12px 15px; border: 1px solid var(--line-soft); border-radius: 9px; background: var(--bg-soft); color: var(--ink-soft); font-size: 13px; line-height: 1.65; }
.agent-evidence-note strong { color: var(--ink); }
.agent-score-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin: 16px 0 20px; }
.agent-score-pill { padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.agent-score-pill > div { display: flex; justify-content: space-between; gap: 8px; color: var(--ink-soft); font-size: 11px; }
.agent-score-pill strong { color: var(--ink); font-size: 12px; font-variant-numeric: tabular-nums; }
.agent-score-pill.default { border-color: #ccd8f7; background: #f7faff; }
.agent-score-pill.care { border-color: #f3ccd9; background: #fff7fa; }
.agent-score-pill.voca { border-color: #bcdcc9; background: #f5fbf7; }
.score-track { display: block; height: 5px; margin-top: 8px; overflow: hidden; border-radius: 99px; background: var(--line-soft); }
.score-track > span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.agent-score-pill.default .score-track > span { background: #6d88d8; }
.agent-score-pill.care .score-track > span { background: #c66f8b; }
.agent-score-pill.voca .score-track > span { background: #459a68; }
.agent-conversation, .agent-rules { margin: 20px 0; padding: 15px 17px; border: 1px solid var(--line-soft); border-radius: 10px; background: #fff; }
.agent-conversation { background: var(--bg-soft); }
.agent-conversation h4, .agent-rules h4 { margin: 0 0 10px; font-size: 14px; }
.agent-turn { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 12px; padding: 11px 0; border-top: 1px solid var(--line-soft); }
.agent-turn:first-of-type { border-top: 0; }
.agent-turn-label { color: var(--ink-soft); font-size: 12px; font-weight: 650; }
.agent-turn-body { min-width: 0; }
.agent-turn-body audio, .agent-response-card audio { display: block; width: 100%; max-width: 100%; margin: 0 0 8px; }
.agent-turn-text, .agent-response-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink); font-size: 13.5px; line-height: 1.7; }
.agent-turn.assistant .agent-turn-body { color: var(--ink-soft); }
.agent-turn.assistant .agent-turn-text { color: var(--ink-soft); }
.agent-note { margin: 8px 0 0; color: var(--ink-faint); font-size: 12px; line-height: 1.55; }
.agent-rules { border-left: 3px solid var(--accent); background: var(--bg-tint); }
.agent-rules ol { margin: 0; padding-left: 20px; }
.agent-rules li { margin: 5px 0; color: var(--ink-soft); font-size: 13px; line-height: 1.55; }
.agent-response-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; margin: 20px 0; }
.agent-response-card { min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.agent-response-card.agent-default { border-color: #ccd8f7; background: linear-gradient(180deg, #f7faff, #fff 260px); }
.agent-response-card.agent-care { border-color: #f3ccd9; background: linear-gradient(180deg, #fff7fa, #fff 260px); }
.agent-response-card.agent-voca { border-color: #bcdcc9; background: linear-gradient(180deg, #f5fbf7, #fff 260px); }
.agent-response-card.agent-monitor { background: #fbfbfd; }
.agent-response-card.agent-agent3 { background: #fffdf7; border-color: #ead8ae; }
.agent-response-card.agent-agent3.muted { background: var(--bg-soft); border-color: var(--line-soft); }
.agent-response-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.agent-response-heading h4 { margin: 0; font-size: 15px; }
.agent-response-score { color: var(--ink-soft); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.agent-judge-line { display: flex; justify-content: space-between; gap: 10px; margin-top: 13px; padding-top: 10px; border-top: 1px solid var(--line-soft); color: var(--ink-soft); font-size: 12px; }
.agent-judge-line strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.agent-judge-detail { margin-top: 10px; }
.agent-judge-detail > summary { cursor: pointer; color: var(--accent-deep); font-size: 12px; font-weight: 650; }
.agent-criteria-check { margin: 9px 0 0; padding-left: 20px; }
.agent-criteria-check li { margin: 6px 0; color: var(--ink-soft); font-size: 12px; line-height: 1.5; }
.agent-criteria-check li::marker { color: var(--ink-faint); }
.agent-criteria-check li.yes::marker { color: var(--up); }
.agent-criteria-check li.no::marker { color: var(--down); }
.agent-criteria-check span, .agent-criteria-check small { display: block; }
.agent-criteria-check small { margin-top: 2px; color: var(--ink-faint); }
.agent-analysis { margin: 10px 0 0; padding: 9px 10px; border-radius: 7px; background: var(--bg-soft); color: var(--ink-soft); font-size: 12px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.agent-observation-label { display: inline-block; margin: 0 5px 5px 0; padding: 4px 7px; border-radius: 999px; color: var(--accent-deep); background: var(--accent-soft); font-size: 11px; font-weight: 650; }
.agent-case-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 17px; padding-top: 13px; border-top: 1px solid var(--line-soft); }
.agent-response-card .agent-note { text-align: left; }
@media (max-width: 800px) {
  .agent-response-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 620px) {
  .agent-case-head { display: block; }
  .agent-tier { display: inline-block; margin-top: 9px; }
  .agent-score-strip { grid-template-columns: minmax(0, 1fr); }
  .agent-case-card { padding: 16px 13px 18px; }
  .agent-case-choice > summary { padding: 14px; }
  .agent-turn { grid-template-columns: minmax(0, 1fr); gap: 5px; }
}

.case-page { padding-top: 30px; padding-bottom: 40px; }
.case-fragment { min-width: 0; }
.case-load-status { color: var(--ink-soft); font-size: 13px; }

/* Model filters and publication figures. */
.agent-model-filter { display: flex; flex-wrap: wrap; gap: 10px; }
.agent-model-filter button { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink-soft); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; text-align: left; }
.agent-model-filter button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-deep); border-color: var(--accent); }
.agent-model-filter button span { padding: 2px 7px; border-radius: 999px; background: var(--bg-soft); font-size: 12px; }
.agent-model-filter button:focus-visible, .figure-preview:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.agent-filter-status, .agent-empty { color: var(--ink-soft); font-size: 13px; line-height: 1.6; }
.agent-case-choice[hidden], .agent-empty[hidden] { display: none; }
.figure-preview { display: block; border-radius: 12px; }
.figure-preview img { display: block; width: 100%; height: auto; }
.figure-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 24px; margin-top: 12px; font-size: 13px; }
.figure-actions a { color: var(--accent-deep); text-decoration: underline; text-underline-offset: 3px; }
.publication-figure { margin: 20px 0 0; }
.analysis-figure + .analysis-figure { margin-top: 42px; }
@media (max-width: 620px) { .agent-model-filter button { width: 100%; } }

/* Keep navigation within reach while reading long case comparisons. */
.review-browser { position: sticky; top: calc(var(--nav-h) + 4px); z-index: 15; display: flex; flex-wrap: wrap; align-items: center; gap: 9px 14px; margin: 14px 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fffafb; box-shadow: 0 5px 18px #39202b0d; scroll-margin-top: calc(var(--nav-h) + 12px); }
.review-position { font-size: 12px; font-weight: 600; color: var(--ink-soft); }
.review-selector { flex: 1 1 300px; min-width: 0; }
.review-selector select { width: 100%; max-width: 100%; padding: 8px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--ink); font: inherit; font-size: 12px; text-overflow: ellipsis; }
.review-buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.review-browser button:disabled { opacity: .45; cursor: default; }
.review-browser :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.agent-outcome-tabs a[hidden], .agent-subgroup-nav a[hidden] { display: none; }
.judge-model { font-family: var(--sans); padding: 10px 0 0; border-top: 1px solid var(--line-soft); overflow-wrap: anywhere; }
.judge-model > strong { font-weight: 700; color: var(--ink); }
.judge-purpose { display: block; margin-top: 3px; color: var(--ink-faint); font-family: var(--sans); }
.agent-main-comparison { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.agent-pipeline-detail > summary { cursor: pointer; color: var(--accent-deep); font-weight: 600; font-size: 13px; padding: 12px 0; }
@media (max-width: 900px) { .agent-main-comparison { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 620px) {
 .review-browser { padding: 8px; gap: 6px; }
 .review-selector { flex-basis: 100%; }
 .review-buttons { gap: 4px; }
 .review-buttons button { padding: 6px 8px; font-size: 11px; }
}
.review-reading > .example-choice:not([open]), .review-reading > .agent-case-choice:not([open]) { display: none; }
