/* Contrast pass: keep the mint research canvas, add deep visual anchors. */
:root {
  --contrast-ink: #174d4f;
  --contrast-teal: #286763;
  --contrast-mint: #bfe8de;
  --contrast-soft: #edf7f3;
  --contrast-blue: #2c5e70;
  --contrast-gold: #6b5a2e;
}

body { background: var(--contrast-soft); }
.statement, #method { background: #fbfdfc; }

/* Keep the opening statement's canvas full-bleed while its content stays on the
   same readable grid. Otherwise laptop widths expose two abrupt side strips
   because this section is also the `.shell` element. */
.statement {
  width: 100%;
  padding-inline: max(48px, calc((100vw - 1360px) / 2));
}

/* Hero: a dark metadata card closes the light introduction. */
.paper-meta {
  margin-top: 46px;
  padding: 20px 24px;
  border-top: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--contrast-ink), var(--contrast-teal));
  box-shadow: 0 18px 45px rgba(16, 52, 59, .15);
}
.paper-meta .authors { color: #f4fbf9; }
.paper-meta .authors sup, .paper-meta .affiliations sup { color: #7bd2c4; }
.paper-meta .affiliations { color: #b9d5d0; }

/* Central idea: each card has a dark editorial title field and a light body. */
.idea-grid article {
  --idea-dark: var(--contrast-ink);
  border-color: rgba(16, 52, 59, .14);
  background: linear-gradient(180deg, var(--idea-dark) 0 128px, #fff 128px);
  box-shadow: 0 16px 38px rgba(16, 52, 59, .09);
}
.idea-grid article:nth-child(2) { --idea-dark: var(--contrast-blue); }
.idea-grid article:nth-child(3) { --idea-dark: var(--contrast-gold); }
.idea-grid article > span {
  position: relative;
  z-index: 1;
  color: #fff;
  background: var(--idea-color);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, .08);
}
.idea-grid h3 { position: relative; z-index: 1; color: #fff; }

/* Walkthrough: use one strong header instead of another pale container. */
.opening-demo .od-header {
  border-radius: 25px 25px 0 0;
  background: linear-gradient(135deg, var(--contrast-ink), var(--contrast-teal));
}
.opening-demo .od-header h2 { color: #f5fbf9; }
.opening-demo .od-header .od-eyebrow { color: #7bd2c4; }

/* Recorded cases: repeat the opening green / blue / gold language by column. */
.cases-section .section-intro { margin-bottom: 30px; }
.ce-toolbar {
  background: linear-gradient(100deg, #e3f2ed, #eef6f3);
  border-bottom-color: #bdd8d1;
  box-shadow: none;
}
.ce-toolbar .ce-case-title { color: #173f48; }
.ce-toolbar .ce-progress-labels { color: #466a70; }
.ce-toolbar #ceCount { color: #5d7d80; }
.ce-toolbar .ce-play { border-color: #17a99d; background: #078c83; }
.ce-toolbar .ce-play:hover { background: #0aa096; }
.ce-toolbar .ce-control, .ce-toolbar .ce-speed {
  border-color: #a9c9c2;
  color: #315f64;
  background: rgba(255, 255, 255, .78);
}
.ce-toolbar .ce-control:hover:not(:disabled), .ce-toolbar .ce-speed:hover {
  border-color: #55aa9f;
  color: #08786f;
  background: #fff;
}
.ce-query {
  border-left: 4px solid #55cdbd;
  background: linear-gradient(135deg, #1b5757, #286d67);
  box-shadow: 0 10px 24px rgba(16, 52, 59, .12);
}
.ce-query label { color: #78d5c7; }
.ce-query p { color: #f3fbf8; }
#ceChoices p { color: #c2dcd7; }
.ce-panel:nth-child(1) .ce-panel-header {
  border-bottom-color: #a9d7cf;
  box-shadow: inset 0 -2px #168f85;
}
.ce-panel:nth-child(1) .ce-panel-header h3 { color: #146b67; }
.ce-panel:nth-child(2) .ce-panel-header {
  border-bottom-color: #b2ccdc;
  box-shadow: inset 0 -2px #3d84ad;
}
.ce-panel:nth-child(2) .ce-panel-header h3 { color: #2c6785; }
.ce-panel:nth-child(3) .ce-panel-header {
  border-bottom-color: #dfd0a3;
  box-shadow: inset 0 -2px #c69721;
}
.ce-panel:nth-child(3) .ce-panel-header h3 { color: #6e5a20; }
.ce-code-card header {
  border-bottom-color: #315765;
  color: #c5dcdf;
  background: var(--contrast-blue);
}
.ce-output-card > header {
  padding: 11px 15px;
  color: #fff8e5;
  background: #6b5a2e;
}
.ce-output-card > header .ce-output-icon { color: #f0c85a; }
.ce-output-card.kind-error > header { color: #ffe6e1; background: #693b38; }
.ce-output-card.kind-error > header .ce-output-icon { color: #ffb5aa; }
.ce-output-card.kind-answer > header { color: #e4f8ee; background: #184a39; }
.ce-output-card.kind-answer > header .ce-output-icon { color: #8cdfb5; }
.ce-statebar {
  border-top-color: #c4ddd7;
  background: linear-gradient(100deg, #e8f4f0, #f1f7f5);
}
.ce-state-label { color: #2f5d61; }
.ce-state-label > span + span { color: #6d8b8b; }
.ce-node::after { background: #b8d2cd; }
.ce-node strong { color: #486b70; }
.ce-node small { color: #6f8a8e; }
.ce-node.is-active strong { color: #17464a; }
.ce-node.is-active small { color: #2f6f6d; }
.ce-node-progress { background: #c9ded9; }

/* Method figure: blue marks system structure; the diagram owns all three stage colors. */
body #evipilot-figure2 .f2-eyebrow {
  display: inline-flex;
  padding: 7px 11px;
  border-left: 0;
  border-radius: 999px;
  color: #d8edf7;
  background: var(--contrast-blue);
}
body #evipilot-figure2 .f2-canvas {
  border: 1px solid #adcbd8;
  border-top: 5px solid #3d84ad;
  background: #f2f8f6;
  box-shadow: 0 18px 48px rgba(16, 52, 59, .10);
}
body #evipilot-figure2 .f2-heading { margin-bottom: 34px; }

/* Training: gold data pool, green SFT, blue RL — all integrated into the light board. */
.training-composition {
  border-top: 4px solid #c69721;
  background: linear-gradient(180deg, #faf7eb, #f5f9f7 38%);
}
.training-donut-wrap {
  padding: 24px 16px 20px;
  border: 1px solid #dfd0a3;
  border-radius: 14px;
  background: linear-gradient(145deg, #f4edcf, #fbf8ec);
}
.training-donut-guide { stroke: #e3d9b8; }
.training-center-value { fill: #645422; }
.training-center-label { fill: #81754e; }
.training-donut-wrap figcaption strong { color: #574b27; }
.training-donut-wrap figcaption span { color: #817755; }
.training-stage > header {
  padding: 17px 18px;
  border: 1px solid #bddbd3;
  border-radius: 12px;
  background: linear-gradient(145deg, #e3f3ee, #eff7f4);
  box-shadow: none;
}
.training-stage-rl > header { border-color: #c1d8e5; background: linear-gradient(145deg, #e8f1f7, #f2f6f9); }
.training-stage > header > span { color: #087b73; }
.training-stage-rl > header > span { color: #2d7197; }
.training-stage > header strong { color: #174d4f; }
.training-stage-rl > header strong { color: #285a71; }
.training-stage > header small { color: #5d7c7c; }
.trace-row em::before { transform: translateY(1px) rotate(-45deg); }

/* Results: dark title bars and table headers make the evidence hierarchy explicit. */
#native-results .nv-bench-head {
  margin: -21px -24px 18px;
  padding: 19px 24px;
  border-radius: 20px 20px 0 0;
  background: linear-gradient(110deg, var(--contrast-ink), var(--contrast-teal));
}
#native-results .nv-bench-head h3 { color: #fff; }
#native-results .nv-bench-head .nv-eyebrow { color: #7bd2c4; }
#native-results .nv-datasets,
#detailed-scores .ds-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 250px;
  gap: 4px;
  padding: 4px;
  border: 1px solid #55737b;
  border-radius: 8px;
  background: rgba(7, 39, 45, .72);
}
#native-results .nv-datasets button,
#detailed-scores .ds-tabs button {
  min-height: 40px;
  padding: 8px 14px;
  border: 0;
  border-radius: 5px;
  color: #c1d4d5;
  background: transparent;
  font: 600 14px/1.4 'Source Sans 3', system-ui, sans-serif;
  white-space: nowrap;
}
#native-results .nv-datasets button.active,
#detailed-scores .ds-tabs button[aria-selected=true] {
  color: #154b49;
  background: #dff2ed;
}
#native-results .nv-datasets button:hover,
#detailed-scores .ds-tabs button:hover {
  color: #f3fbf9;
  background: rgba(255, 255, 255, .08);
}
#native-results .nv-datasets button.active:hover,
#detailed-scores .ds-tabs button[aria-selected=true]:hover {
  color: #154b49;
  background: #dff2ed;
}

#detailed-scores .ds-heading {
  margin: -21px -24px 14px;
  padding: 18px 24px;
  border-radius: 20px 20px 0 0;
  background: linear-gradient(110deg, var(--contrast-ink), var(--contrast-blue));
}
#detailed-scores .ds-heading h3 { color: #fff; }
#detailed-scores .ds-eyebrow { color: #8bd9ce; }
.ds-table thead th, .ds-table thead .ds-model {
  color: #eef7f5;
  background: #173f46;
}
.ds-table thead th > span { color: #aac6c3; }

@media (max-width: 1150px) {
  .statement { padding-inline: 28px; }
}

@media (max-width: 650px) {
  .statement { padding-inline: 16px; }
  .paper-meta { padding: 18px; border-radius: 13px; }
  .idea-grid article { background: linear-gradient(180deg, var(--idea-dark) 0 116px, #fff 116px); }
  .idea-grid h3 { margin-top: 29px; }
  body #evipilot-figure2 .f2-canvas { border-width: 1px; border-top-width: 4px; }
  .training-donut-wrap { padding-inline: 12px; }
  #native-results .nv-bench-head { margin: -19px -14px 18px; padding: 18px 14px; border-radius: 17px 17px 0 0; }
  #detailed-scores .ds-heading { margin: -18px -14px 14px; padding: 17px 14px; border-radius: 17px 17px 0 0; }
  #native-results .nv-datasets, #detailed-scores .ds-tabs { width: 100%; }
}
