/* Minimal research page — content-first, no decoration */

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: #222;
  background: #fff;
}

a { color: #1a6b4f; }
img { max-width: 100%; display: block; }

blockquote {
  border-left: 4px solid #1a6b4f;
  margin: 1.5rem 0;
  padding: .75rem 1.5rem;
  color: #444;
  font-style: italic;
}

.full-overview-teaser {
  width: 80%;
  margin: 2rem 2rem;
}

/* Nav */
nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #eee;
  display: flex; justify-content: flex-end; gap: .25rem;
  padding: .5rem 2rem;
}
nav a {
  font-size: .85rem; font-weight: 500;
  color: #444; text-decoration: none;
  padding: .3rem .6rem; border-radius: 4px;
}
nav a:hover { background: #f5f5f5; color: #111; }

/* Centered column */
.col {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Hero */
.hero-section {
  padding: 5rem 0 3rem;
  border-bottom: 1px solid #eee;
}
.hero-section h1 {
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 1.2rem;
  letter-spacing: -.02em;
}
.hero-section .subtitle {
  font-size: 1.1rem;
  color: #555;
  line-height: 1.65;
  margin-bottom: 2rem;
}
.authors {
  font-size: .9rem;
  color: #666;
  margin-bottom: .3rem;
}
.authors a { color: #333; }
.affils {
  font-size: .82rem;
  color: #999;
  margin-bottom: 1.5rem;
}
.links {
  display: flex; gap: .6rem; flex-wrap: wrap;
}
.links a {
  font-size: .85rem; font-weight: 500;
  color: #333; text-decoration: none;
  padding: .45rem 1rem;
  border: 1px solid #ddd;
  border-radius: 5px;
}
.links a:hover { border-color: #999; }

/* Sections */
section { padding: 3.5rem 0; }
section + section { border-top: 1px solid #eee; }
h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -.01em;
}
h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 2rem 0 .6rem;
}
p + p { margin-top: .8rem; }
.muted { color: #666; }
.small { font-size: .9rem; }

/* Takeaway list */
ul.takeaways {
  list-style: none;
  padding: 0;
  margin: 0;
}
ul.takeaways li {
  padding: .8rem 0 .8rem 1.4rem;
  border-bottom: 1px solid #eee;
  position: relative;
  font-size: .95rem;
  line-height: 1.6;
}
ul.takeaways li:last-child { border-bottom: none; }
ul.takeaways li::before {
  content: '';
  position: absolute;
  left: 0; top: 1.15rem;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #1a6b4f;
}

/* Pipeline diagram */
.pipeline {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin: 2rem 0;
  font-size: .88rem;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
}
.pipeline .step {
  flex: 1;
  padding: 1.2rem 1rem;
  position: relative;
}
.pipeline .step + .step { border-left: 1px solid #e0e0e0; }
.pipeline .step-num {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #999;
  margin-bottom: .4rem;
}
.pipeline .step-title {
  font-weight: 600;
  font-size: .95rem;
  margin-bottom: .3rem;
  color: #111;
}
.pipeline .step-desc {
  font-size: .82rem;
  color: #666;
  line-height: 1.5;
}
.pipeline .step.highlight {
  background: #f0f7f4;
}
/* Arrow between steps */
.pipeline .arrow {
  display: flex; align-items: center; justify-content: center;
  width: 28px; min-width: 28px;
  color: #bbb; font-size: 1.1rem;
  background: #fafafa;
  border-left: 1px solid #e0e0e0;
  border-right: 1px solid #e0e0e0;
}

/* Key numbers */
.results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.5rem;
  margin: 2rem 0;
}
.result-num {
  text-align: center;
}
.result-num .big {
  font-size: 2.4rem;
  font-weight: 700;
  color: #1a6b4f;
  line-height: 1.1;
}
.result-num .desc {
  font-size: .82rem;
  color: #666;
  margin-top: .3rem;
  line-height: 1.4;
}

/* Chat demo */
.demo-controls {
  display: flex; gap: .8rem; margin-bottom: 1rem;
  flex-wrap: wrap; align-items: end;
}
.demo-controls label {
  font-size: .8rem;
  font-weight: 600;
  color: #666;
  display: flex;
  flex-direction: column;
  gap: .25rem;
}
.demo-controls select {
  font-size: .88rem;
  padding: .4rem .6rem;
  border: 1px solid #ddd;
  border-radius: 5px;
  background: #fff;
  color: #222;
  min-width: 180px;
}

.chat-window {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  margin: 1rem 0;
  max-height: 600px;
  overflow-y: auto;
}
.chat-round {
  border-bottom: 1px solid #eee;
}
.chat-round:last-child { border-bottom: none; }
.round-label {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #999;
  padding: .6rem 1rem .2rem;
  background: #fafafa;
}
.chat-msg {
  padding: .8rem 1rem;
}
.chat-msg + .chat-msg { border-top: 1px solid #f0f0f0; }
.chat-msg.sender { background: #fff; }
.chat-msg.receiver { background: #f8faf9; }
.chat-role {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: .3rem;
}
.chat-msg.sender .chat-role { color: #8b5e34; }
.chat-msg.receiver .chat-role { color: #1a6b4f; }
.chat-text {
  font-size: .88rem;
  line-height: 1.6;
  color: #333;
}
.chat-action {
  display: inline-block;
  margin-top: .5rem;
  font-size: .82rem;
  font-weight: 600;
  padding: .25rem .7rem;
  border-radius: 4px;
}
.chat-msg.receiver .chat-action {
  background: #e8f5e9;
  color: #2e7d32;
}
.chat-belief {
  font-size: .78rem;
  color: #888;
  margin-top: .3rem;
  font-style: italic;
}
.demo-note {
  font-size: .8rem;
  color: #999;
  margin-top: .5rem;
  text-align: center;
}

/* Comparison layout for base vs trained */
.chat-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.chat-comparison .chat-msg {
  border-right: 1px solid #f0f0f0;
}
.chat-comparison .chat-msg:last-child { border-right: none; }
.chat-comparison .chat-msg.base { background: #fff; }
.chat-comparison .chat-msg.trained { background: #f8faf9; }
.chat-msg.base .chat-role { color: #b44; }
.chat-msg.trained .chat-role { color: #1a6b4f; }
.chat-msg .belief-num {
  display: inline-block;
  font-size: .82rem;
  font-weight: 600;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', monospace;
  margin-top: .3rem;
}
.chat-msg.base .belief-num { color: #b44; }
.chat-msg.trained .belief-num { color: #1a6b4f; }
.sender-compare-label {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: .4rem 1rem;
  background: #f5f5f5;
  border-bottom: 1px solid #eee;
}

@media (max-width: 600px) {
  .chat-comparison { grid-template-columns: 1fr; }
}

/* ===== Simulacra Sprite Animation ===== */
.sim-wrapper {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  background: #fafafa;
}
.sim-stages {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.sim-stage {
  border-right: 1px solid #e0e0e0;
  background: #f7f6f3;
}
.sim-stage:last-child { border-right: none; }
.sim-stage.eq { background: #f4f8f6; }
.sim-stage-header {
  padding: .6rem .8rem;
  border-bottom: 1px solid #e8e8e8;
}
.sim-stage-title {
  font-size: .82rem; font-weight: 700; color: #333;
}
.sim-stage-sub {
  font-size: .72rem; color: #888; margin-top: .1rem;
}
.sim-arena {
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  padding: 1.5rem .5rem;
  min-height: 160px;
}
.sim-caption {
  padding: .5rem .8rem;
  font-size: .72rem;
  color: #888;
  text-align: center;
  border-top: 1px solid #e8e8e8;
  min-height: 2.4em;
  line-height: 1.4;
}

/* --- Sprite character --- */
.sprite {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 64px;
  text-align: center;
  cursor: default;
  animation: idle-bob 2.5s ease-in-out infinite;
}
.sprite:nth-child(2) { animation-delay: .4s; }
.sprite:nth-child(3) { animation-delay: .8s; }
.sprite:nth-child(4) { animation-delay: 1.2s; }
@keyframes idle-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}
/* Thought bubble */
.sprite-bubble {
  position: relative;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 1px 5px;
  font-size: .62rem;
  font-weight: 700;
  color: #555;
  white-space: nowrap;
  margin: 0 auto 3px;
  display: inline-block;
  min-width: 28px;
  text-align: center;
  transition: background .3s, color .3s, transform .3s;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Mono', Menlo, monospace;
}
.sprite-bubble::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 50%; transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid #fff;
}
/* Persona bubbles: vague, all look the same */
.sprite-bubble.persona {
  background: #f5f0e8;
  border-color: #d4c9b5;
  color: #8b7355;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-style: italic;
  font-weight: 500;
}

/* Head */
.sprite-head {
  width: 22px; height: 22px;
  border-radius: 50%;
  margin: 0 auto;
  position: relative;
  border: 2px solid rgba(0,0,0,.1);
}
/* Eyes */
.sprite-head::before,
.sprite-head::after {
  content: '';
  position: absolute;
  width: 3px; height: 3.5px;
  background: #333;
  border-radius: 50%;
  top: 8px;
}
.sprite-head::before { left: 5px; }
.sprite-head::after { right: 5px; }
/* Body */
.sprite-body {
  width: 16px; height: 10px;
  margin: 1px auto 0;
  border-radius: 3px 3px 1px 1px;
}
/* Legs */
.sprite-legs {
  display: flex; justify-content: center; gap: 3px;
  margin-top: 0;
}
.sprite-leg {
  width: 5px; height: 7px;
  background: #555;
  border-radius: 0 0 2px 2px;
}
/* Name label */
.sprite-name {
  font-size: .56rem;
  color: #555;
  margin-top: 2px;
  white-space: nowrap;
  line-height: 1.1;
  font-weight: 600;
}
.sprite-sub {
  font-size: .5rem;
  color: #999;
  white-space: nowrap;
  margin-top: 1px;
}


@media (max-width: 600px) {
  .sim-stages { grid-template-columns: 1fr; }
  .sim-stage { border-right: none; border-bottom: 1px solid #e0e0e0; }
  .sim-stage:last-child { border-bottom: none; }
  .sim-arena { flex-wrap: wrap; gap: .5rem; }
}

/* Reasoning trace blocks */
.trace-block {
  margin: .5rem 0;
  padding: .5rem .8rem;
  border-radius: 4px;
  font-size: .82rem;
  line-height: 1.55;
}
.trace-block.thinking {
  background: #f9f6ee;
  border-left: 3px solid #d4a843;
  color: #7a6520;
}
.trace-block.belief {
  background: #eef6f8;
  border-left: 3px solid #4a9bb5;
  color: #2a6070;
}
.trace-block.argument {
  background: #f0f0f8;
  border-left: 3px solid #7a7ab5;
  color: #444470;
}
.trace-block .trace-label {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: .2rem;
  opacity: .7;
}
.chat-text pre {
  white-space: pre-wrap;
  word-wrap: break-word;
  font-family: inherit;
  font-size: .85rem;
  line-height: 1.55;
  margin: 0;
}

/* Figure grid */
.fig-row {
  display: grid;
  gap: 1rem;
  margin: 1.5rem 0;
}
.fig-row.two { grid-template-columns: 1fr 1fr; }
.fig-row.three { grid-template-columns: 1fr 1fr 1fr; }
.fig-row img {
  border: 1px solid #eee;
  border-radius: 4px;
}
.fig-row .caption {
  font-size: .78rem;
  color: #888;
  margin-top: .3rem;
  text-align: center;
}

/* Details for optional depth */
details {
  margin: 1.5rem 0;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
}
details summary {
  padding: .7rem 1rem;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  color: #444;
}
details summary:hover { color: #111; }
details .inner {
  padding: .5rem 1rem 1rem;
  font-size: .9rem;
  color: #555;
  line-height: 1.65;
}
details .inner p { margin-bottom: .5rem; }

/* Inline figure inside details */
.fig-row-inner {
  margin: .8rem auto 1.2rem;
  max-width: 420px;
  text-align: center;
}
.fig-row-inner img {
  border: 1px solid #eee;
  border-radius: 4px;
  width: 100%;
}
.fig-row-inner .caption {
  font-size: .72rem;
  color: #888;
  margin-top: .3rem;
  text-align: center;
}

/* Prompt example */
.prompt-example {
  background: #f8f8f6;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 1rem 1.2rem;
  font-size: .85rem;
  line-height: 1.6;
  margin: .5rem 0;
}
.prompt-example p { margin-bottom: .5rem; }
.prompt-label {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #999;
  margin-bottom: .4rem !important;
}

/* Eq box */
.eq-box {
  background: #f7f7f7;
  border-left: 3px solid #ccc;
  padding: .6rem 1rem;
  margin: .6rem 0;
  overflow-x: auto;
}

/* Tables */
.table-wrap { overflow-x: auto; margin: 1rem 0; }
table {
  border-collapse: collapse; width: 100%;
  font-size: .85rem;
}
th {
  text-align: center; padding: .5rem .8rem;
  border-bottom: 2px solid #ddd;
  font-size: .78rem; font-weight: 600;
  color: #666; text-transform: uppercase;
  letter-spacing: .04em;
}
td {
  text-align: center; padding: .45rem .8rem;
  border-bottom: 1px solid #eee;
  color: #444;
}
td:first-child { text-align: left; font-weight: 500; color: #222; }
td.better {
  background: #e6f4ea;
  color: #14532d;
  font-weight: 600;
}

/* Bibtex */
pre.bib {
  background: #f5f5f5;
  padding: 1rem;
  border-radius: 6px;
  font-size: .78rem;
  line-height: 1.6;
  overflow-x: auto;
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  color: #555;
}

/* Footer */
footer {
  border-top: 1px solid #eee;
  padding: 2rem;
  text-align: center;
  font-size: .82rem;
  color: #aaa;
}

/* Responsive */
@media (max-width: 600px) {
  .hero-section h1 { font-size: 1.6rem; }
  .pipeline { flex-direction: column; }
  .pipeline .arrow { width: auto; height: 24px; border: none; border-top: 1px solid #e0e0e0; border-bottom: 1px solid #e0e0e0; }
  .pipeline .step + .step { border-left: none; border-top: none; }
  .results-grid { grid-template-columns: 1fr; }
  .fig-row.two, .fig-row.three { grid-template-columns: 1fr; }
}

/* Video embed */
.video-embed {
  margin: 1.5rem 0;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #e0e0e0;
}
.video-wrap {
  position: relative;
}
.video-embed video {
  display: block;
  width: 100%;
  border-radius: 6px 6px 0 0;
}
.mute-toggle {
  position: absolute;
  bottom: .6rem;
  right: .6rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: .9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
  line-height: 1;
  padding: 0;
}
.mute-toggle:hover { background: rgba(0,0,0,.75); }

/* Oyez-style audio player with synced transcript */
.audio-player {
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  overflow: hidden;
  margin-top: .8rem;
}
.audio-controls {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .5rem .8rem;
  background: #2a2a2a;
}
.audio-play-btn {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 50%;
  border: none;
  background: #1a6b4f;
  color: #fff;
  font-size: .9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
  padding: 0 0 0 2px;
  line-height: 1;
}
.audio-play-btn:hover { background: #238c68; }
.audio-progress-wrap {
  flex: 1;
  height: 4px;
  background: #555;
  border-radius: 2px;
  cursor: pointer;
  position: relative;
}
.audio-progress {
  height: 100%;
  background: #1a6b4f;
  border-radius: 2px;
  width: 0%;
  transition: width .1s linear;
  pointer-events: none;
}
.audio-time {
  font-size: .7rem;
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  color: #999;
  white-space: nowrap;
  min-width: 70px;
  text-align: right;
}

/* Synced transcript */
.transcript-box {
  position: relative;
  padding: .6rem .8rem;
  background: #fafafa;
  max-height: 300px;
  overflow-y: auto;
}
.transcript-line {
  padding: .4rem .6rem;
  margin: .2rem 0;
  border-radius: 4px;
  font-size: .82rem;
  line-height: 1.55;
  color: #aaa;
  transition: background .3s, color .3s;
}
.transcript-line.active {
  background: #f0f7f4;
  color: #222;
}
.transcript-line.past {
  color: #666;
}
.transcript-role {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-right: .4rem;
  display: inline-block;
}
.transcript-role.justice { color: #1a6b4f; }
.transcript-role.advocate { color: #8b5e34; }
.transcript-gap {
  text-align: center;
  color: #bbb;
  padding: .6rem 0;
  font-size: .9rem;
  letter-spacing: .3em;
}
.transcript-ellipsis {
  font-weight: 700;
}
.audio-caption {
  font-size: .72rem;
  color: #888;
  padding: .5rem .8rem;
  text-align: center;
  background: #fafafa;
  border-top: 1px solid #eee;
}
.audio-caption a { color: #1a6b4f; }
.video-caption {
  font-size: .78rem;
  color: #777;
  line-height: 1.5;
  padding: .6rem .8rem 0;
  text-align: center;
}
.video-caption a { color: #1a6b4f; }

/* ===== Courtroom Scene Animation ===== */
.courtroom-scene {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: visible;
  background: linear-gradient(180deg, #f7f5f0 0%, #eae6dc 100%);
  margin: 3rem 0 1.5rem;
  padding: 0;
  position: relative;
}
.courtroom-bench {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: .5rem;
  padding: 2.5rem 1rem .6rem;
  background: linear-gradient(180deg, #3d2b1f 0%, #5c3d2e 60%, #8b6f5e 100%);
  border-bottom: 3px solid #2a1a10;
  border-radius: 8px 8px 0 0;
  position: relative;
  overflow: visible;
}
.courtroom-bench::after {
  content: 'SUPREME COURT OF THE UNITED STATES';
  position: absolute;
  top: .35rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: .45rem;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: rgba(212,175,55,.5);
  white-space: nowrap;
}

/* Robot Justice */
.robot-justice {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  animation: rj-idle 3s ease-in-out infinite;
}
.robot-justice:nth-child(1) { animation-delay: 0s; }
.robot-justice:nth-child(2) { animation-delay: .6s; }
.robot-justice:nth-child(3) { animation-delay: .3s; }
.robot-justice:nth-child(4) { animation-delay: .9s; }
.robot-justice:nth-child(5) { animation-delay: 1.2s; }
.robot-justice:nth-child(6) { animation-delay: .15s; }
.robot-justice:nth-child(7) { animation-delay: .75s; }
.robot-justice:nth-child(8) { animation-delay: 1.05s; }
.robot-justice:nth-child(9) { animation-delay: .45s; }

@keyframes rj-idle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

.rj-antenna {
  width: 2px;
  height: 8px;
  background: #888;
  margin: 0 auto;
  position: relative;
}
.rj-antenna-tip {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #e74c3c;
  position: absolute;
  top: -3px;
  left: -1.5px;
  animation: blink-light 2s ease-in-out infinite;
}
.robot-justice:nth-child(2) .rj-antenna-tip { animation-delay: .4s; background: #3498db; }
.robot-justice:nth-child(3) .rj-antenna-tip { animation-delay: .8s; background: #f39c12; }
.robot-justice:nth-child(4) .rj-antenna-tip { animation-delay: 1.2s; background: #9b59b6; }
.robot-justice:nth-child(5) .rj-antenna-tip { animation-delay: 1.6s; background: #2ecc71; }
.robot-justice:nth-child(6) .rj-antenna-tip { animation-delay: .6s; background: #e74c3c; }
.robot-justice:nth-child(7) .rj-antenna-tip { animation-delay: 1.0s; background: #1abc9c; }
.robot-justice:nth-child(8) .rj-antenna-tip { animation-delay: 1.4s; background: #e67e22; }
.robot-justice:nth-child(9) .rj-antenna-tip { animation-delay: 1.8s; background: #2c3e50; }

@keyframes blink-light {
  0%, 40%, 100% { opacity: 1; }
  20% { opacity: .3; }
}

.rj-head {
  width: 28px;
  height: 22px;
  background: linear-gradient(135deg, #c0c0c0, #a0a0a0);
  border-radius: 5px 5px 3px 3px;
  position: relative;
  border: 1px solid #888;
}
.rj-visor {
  position: absolute;
  top: 6px;
  left: 4px;
  right: 4px;
  height: 7px;
  background: linear-gradient(90deg, #1a6b4f, #2ecc71);
  border-radius: 2px;
  opacity: .85;
  animation: visor-scan 3s ease-in-out infinite;
}
.robot-justice:nth-child(2) .rj-visor { background: linear-gradient(90deg, #2980b9, #3498db); animation-delay: .5s; }
.robot-justice:nth-child(3) .rj-visor { background: linear-gradient(90deg, #d4a843, #f1c40f); animation-delay: 1s; }
.robot-justice:nth-child(4) .rj-visor { background: linear-gradient(90deg, #8e44ad, #9b59b6); animation-delay: 1.5s; }
.robot-justice:nth-child(5) .rj-visor { background: linear-gradient(90deg, #e67e22, #f39c12); animation-delay: 2s; }
.robot-justice:nth-child(6) .rj-visor { background: linear-gradient(90deg, #c0392b, #e74c3c); animation-delay: .75s; }
.robot-justice:nth-child(7) .rj-visor { background: linear-gradient(90deg, #16a085, #1abc9c); animation-delay: 1.25s; }
.robot-justice:nth-child(8) .rj-visor { background: linear-gradient(90deg, #d35400, #e67e22); animation-delay: 1.75s; }
.robot-justice:nth-child(9) .rj-visor { background: linear-gradient(90deg, #2c3e50, #34495e); animation-delay: 2.25s; }

@keyframes visor-scan {
  0%, 100% { opacity: .7; }
  50% { opacity: 1; }
}

.rj-robe {
  width: 32px;
  height: 18px;
  background: #1a1a1a;
  border-radius: 2px 2px 6px 6px;
  margin-top: 1px;
  position: relative;
}
.rj-robe::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 3px;
  background: #fff;
  border-radius: 1px;
}
.robot-justice.chief .rj-robe::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 2px;
  background: #d4a843;
  border-radius: 1px;
}

.rj-nameplate {
  font-size: .5rem;
  font-weight: 700;
  color: rgba(255,255,255,.7);
  margin-top: 3px;
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* Robot speech bubbles */
.rj-speech {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: .6rem;
  font-weight: 600;
  color: #333;
  white-space: nowrap;
  opacity: 0;
  transition: opacity .3s, transform .3s;
  pointer-events: none;
  box-shadow: 0 2px 6px rgba(0,0,0,.1);
  z-index: 10;
}
.rj-speech::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #fff;
}
.rj-speech.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(-2px);
}

/* Courtroom floor & lawyer */
.courtroom-floor {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 1rem .8rem;
  position: relative;
  background: #eae6dc;
  border-radius: 0 0 8px 8px;
  overflow: visible;
}
.podium {
  width: 40px;
  height: 14px;
  background: linear-gradient(180deg, #8b6f5e, #6b4f3e);
  border-radius: 2px 2px 0 0;
  margin-bottom: 2px;
}
.lawyer {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  animation: lawyer-gesture 4s ease-in-out infinite;
}
@keyframes lawyer-gesture {
  0%, 100% { transform: translateY(0) rotate(0); }
  25% { transform: translateY(-2px) rotate(-1deg); }
  75% { transform: translateY(-1px) rotate(1deg); }
}
.lawyer-head {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #f4a261;
  border: 2px solid rgba(0,0,0,.1);
  position: relative;
}
.lawyer-head::before,
.lawyer-head::after {
  display: none;
}
.lawyer-body {
  width: 22px;
  height: 16px;
  background: #2c3e50;
  border-radius: 3px 3px 1px 1px;
  margin-top: 1px;
}
.lawyer-legs {
  display: flex;
  gap: 3px;
}
.lawyer-leg {
  width: 5px;
  height: 8px;
  background: #2c3e50;
  border-radius: 0 0 2px 2px;
}

/* Lawyer speech bubble */
.lawyer-speech {
  position: absolute;
  top: -28px;
  left: calc(50% + 20px);
  background: #fffde7;
  border: 1px solid #d4a843;
  border-radius: 8px;
  padding: 3px 8px;
  font-size: .56rem;
  font-weight: 600;
  color: #5d4e37;
  white-space: nowrap;
  opacity: 0;
  transition: opacity .4s, transform .4s;
  pointer-events: none;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.lawyer-speech::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 12px;
  border: 4px solid transparent;
  border-top-color: #fffde7;
}
.lawyer-speech.visible {
  opacity: 1;
  transform: translateY(-3px);
}

@media (max-width: 600px) {
  .courtroom-bench { gap: .3rem; padding: .8rem .5rem .4rem; }
  .rj-head { width: 22px; height: 18px; }
  .rj-robe { width: 26px; height: 14px; }
  .rj-nameplate { font-size: .42rem; }
  .rj-visor { top: 5px; height: 5px; }
  .courtroom-bench::after { font-size: .35rem; }
}

/* ===== Quiz ===== */
.quiz-progress {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #999;
  margin-bottom: .8rem;
}
.quiz-case {
  font-size: .82rem;
  color: #666;
  line-height: 1.55;
  margin-bottom: 1.2rem;
}
.quiz-case-header {
  font-size: .85rem;
  margin-bottom: .6rem;
}
.quiz-case-header strong { color: #333; }
.quiz-case-header em { color: #555; }
.quiz-case-desc {
  color: #666;
  margin-bottom: .6rem;
  font-size: .82rem;
}
.quiz-context {
  padding: .6rem .8rem;
  background: #f7f7f7;
  border-radius: 5px;
  border-left: 3px solid #ddd;
  font-size: .82rem;
  line-height: 1.6;
}
.quiz-context-label {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #999;
  margin-bottom: .4rem;
}
.quiz-context-turn {
  margin-bottom: .4rem;
}
.quiz-context-turn:last-child { margin-bottom: 0; }
.quiz-context-turn .ctx-role {
  font-weight: 700;
  color: #444;
}
.quiz-context-turn .ctx-role.ctx-justice { color: #1a6b4f; }
.quiz-context-turn .ctx-role.ctx-advocate { color: #8b5e34; }
.quiz-options {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  margin-bottom: 1rem;
}
.quiz-option {
  display: flex;
  align-items: flex-start;
  gap: .8rem;
  padding: .8rem 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: border-color .2s, background .2s;
}
.quiz-option:hover:not(:disabled) {
  border-color: #bbb;
  background: #fafafa;
}
.quiz-option:disabled { cursor: default; }
.quiz-option-label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f0f0f0;
  font-size: .8rem;
  font-weight: 700;
  color: #666;
  flex-shrink: 0;
  margin-top: 1px;
  transition: background .2s, color .2s;
}
.quiz-option-text {
  font-size: .85rem;
  line-height: 1.55;
  color: #333;
}
.quiz-option.correct {
  border-color: #1a6b4f;
  background: #f0f7f4;
}
.quiz-option.correct .quiz-option-label {
  background: #1a6b4f;
  color: #fff;
}
.quiz-option.wrong {
  border-color: #c0392b;
  background: #fdf0ef;
}
.quiz-option.wrong .quiz-option-label {
  background: #c0392b;
  color: #fff;
}
.quiz-option.reveal-correct {
  border-color: #1a6b4f;
  background: #f0f7f4;
}
.quiz-option.reveal-correct .quiz-option-label {
  background: #1a6b4f;
  color: #fff;
}
.quiz-feedback {
  font-size: .85rem;
  line-height: 1.6;
  color: #555;
  margin-bottom: 1rem;
  display: none;
}
.quiz-feedback.visible { display: block; }
.quiz-feedback strong { color: #222; }
.quiz-next {
  display: none;
  padding: .5rem 1.2rem;
  font-size: .85rem;
  font-weight: 600;
  font-family: inherit;
  border: 1px solid #ddd;
  border-radius: 5px;
  background: #fff;
  color: #333;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.quiz-next:hover { border-color: #999; background: #fafafa; }
.quiz-next.visible { display: inline-block; }

/* Quiz results */
.quiz-results {
  display: none;
  text-align: center;
  padding: 2rem 0;
}
.quiz-results.visible { display: block; }
.quiz-score-display { margin-bottom: 1.2rem; }
.quiz-score-num {
  font-size: 3.5rem;
  font-weight: 700;
  color: #1a6b4f;
  line-height: 1;
}
.quiz-score-label {
  font-size: .9rem;
  color: #888;
  margin-top: .3rem;
}
.quiz-score-msg {
  font-size: .95rem;
  color: #555;
  line-height: 1.65;
  max-width: 480px;
  margin: 0 auto 1.5rem;
}
.quiz-restart {
  padding: .5rem 1.5rem;
  font-size: .85rem;
  font-weight: 600;
  font-family: inherit;
  border: 1px solid #1a6b4f;
  border-radius: 5px;
  background: #1a6b4f;
  color: #fff;
  cursor: pointer;
  transition: background .2s;
}
.quiz-restart:hover { background: #238c68; }

#quiz-container.hidden { display: none; }

/* ===== Evaluation Framework Diagram ===== */
.eval-diagram {
  margin: 1.5rem 0;
  position: relative;
  padding: 0 0 .5rem;
}

/* Layer containers */
.eval-layer {
  position: relative;
  padding: 1rem 1.2rem;
  border-radius: 10px;
  margin-bottom: 0;
}
.eval-layer-1 {
  background: linear-gradient(135deg, #faf8f3 0%, #f5f0e6 100%);
  border: 1px solid #e8e0d0;
  box-shadow: 0 2px 12px rgba(180,160,120,.08);
}
.eval-layer-2 {
  background: linear-gradient(135deg, #f2f9f5 0%, #e8f4ed 100%);
  border: 1px solid #c8ddd4;
  box-shadow: 0 2px 12px rgba(26,107,79,.06);
}
.eval-layer-header {
  margin-bottom: .7rem;
  text-align: center;
}
.eval-layer-num {
  font-size: .58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  display: inline-block;
  padding: .15rem .5rem;
  border-radius: 3px;
  margin-bottom: .2rem;
}
.eval-layer-1 .eval-layer-num { color: #a08040; background: rgba(180,150,80,.12); }
.eval-layer-2 .eval-layer-num { color: #1a6b4f; background: rgba(26,107,79,.1); }
.eval-layer-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #222;
  margin-top: .15rem;
}
.eval-layer-sub {
  font-size: .72rem;
  color: #999;
  font-style: italic;
}

/* Branches */
.eval-branches {
  display: flex;
  gap: .5rem;
  justify-content: center;
}
.eval-branch {
  flex: 1;
  min-width: 100px;
  max-width: 180px;
  padding: .55rem .65rem;
  background: #fff;
  border-radius: 8px;
  cursor: pointer;
  transition: transform .25s, box-shadow .25s, border-color .25s;
  position: relative;
}
.eval-layer-1 .eval-branch {
  border: 1px solid #e0d8c8;
  box-shadow: 0 1px 4px rgba(160,140,100,.08);
}
.eval-layer-2 .eval-branch {
  border: 1px solid #c0d8cc;
  box-shadow: 0 1px 4px rgba(26,107,79,.06);
}
.eval-branch:hover, .eval-branch:focus {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,.08);
  z-index: 2;
}
.eval-layer-1 .eval-branch:hover, .eval-layer-1 .eval-branch:focus { border-color: #c0a860; }
.eval-layer-2 .eval-branch:hover, .eval-layer-2 .eval-branch:focus { border-color: #1a6b4f; }
.eval-branch.active {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,.1);
}
.eval-layer-1 .eval-branch.active { border-color: #c0a860; background: #fffdf5; }
.eval-layer-2 .eval-branch.active { border-color: #1a6b4f; background: #f0faf5; }

.eval-branch-title {
  font-size: .72rem;
  font-weight: 700;
  color: #333;
  margin-bottom: .1rem;
}
.eval-branch-items {
  font-size: .62rem;
  color: #999;
  line-height: 1.35;
}

/* Connecting arrow */
.eval-arrow {
  text-align: center;
  padding: .4rem 0;
  position: relative;
}
.eval-arrow::before {
  content: '';
  display: block;
  width: 1px;
  height: 16px;
  background: #ccc;
  margin: 0 auto .2rem;
}
.eval-arrow::after {
  content: '';
  display: block;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #ccc;
  margin: 0 auto;
}

/* Detail panel */
.eval-detail {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height .4s ease, opacity .3s ease, padding .3s ease;
  background: #fff;
  border-radius: 0 0 10px 10px;
  border: 1px solid #e0e0e0;
  border-top: none;
  margin-top: -6px;
  padding: 0 1rem;
  font-size: .8rem;
  line-height: 1.6;
  color: #555;
}
.eval-detail.visible {
  max-height: 400px;
  opacity: 1;
  padding: .8rem 1rem;
}
.eval-detail-hint {
  font-size: .75rem;
  color: #bbb;
  text-align: center;
  font-style: italic;
}
.eval-detail p { margin-bottom: .35rem; }
.eval-detail p:last-child { margin-bottom: 0; }
.eval-detail strong { color: #333; }
.eval-detail em { color: #888; font-size: .75rem; }

@media (max-width: 600px) {
  .eval-branches { flex-wrap: wrap; }
  .eval-branch { min-width: calc(50% - .5rem); max-width: none; }
}

/* ===== Coverage Explorer ===== */
.cov-bar-row {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .4rem;
  font-size: .78rem;
}
.cov-bar-label {
  width: 110px;
  min-width: 110px;
  text-align: right;
  font-weight: 600;
  color: #444;
  font-size: .75rem;
}
.cov-bar-track {
  flex: 1;
  height: 22px;
  background: #f0f0f0;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}
.cov-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width .4s ease;
}
.cov-bar-pct {
  width: 38px;
  min-width: 38px;
  font-size: .75rem;
  font-weight: 600;
  color: #555;
  font-family: 'SF Mono', Menlo, Consolas, monospace;
}
#coverage-bars { margin: 1rem 0; }

/* Coverage detail panel */
#coverage-detail {
  display: none;
}
#coverage-detail.visible {
  display: block;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: .8rem 1rem;
  margin-top: .8rem;
  background: #fafafa;
}
.cov-detail-title {
  font-size: .85rem;
  font-weight: 700;
  color: #333;
  margin-bottom: .4rem;
}
.cov-case-summary {
  font-size: .78rem;
  color: #666;
  line-height: 1.5;
  margin-bottom: .6rem;
  padding-bottom: .6rem;
  border-bottom: 1px solid #eee;
}
.cov-case-summary p { margin-bottom: .3rem; }
.cov-case-summary p:last-child { margin-bottom: 0; }
.cov-case-summary em { color: #888; }
.cov-issue-row {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  padding: .35rem 0;
  border-bottom: 1px solid #eee;
  font-size: .75rem;
}
.cov-issue-row:last-child { border-bottom: none; }
.cov-issue-label {
  flex: 1;
  color: #444;
  line-height: 1.4;
}
.cov-issue-models {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}
.cov-dot {
  width: 14px;
  height: 14px;
  border-radius: 2px;
  display: inline-block;
}
.cov-dot.covered { background: #1a6b4f; }
.cov-dot.missed { background: #e0e0e0; }
.cov-legend {
  display: flex;
  gap: .8rem;
  margin-bottom: .5rem;
  font-size: .65rem;
  color: #888;
  flex-wrap: wrap;
}
.cov-legend-item {
  display: flex;
  align-items: center;
  gap: .2rem;
}
.cov-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  display: inline-block;
}

/* Verdict badges for adversarial demos */
.verdict {
  display: inline-block;
  margin-top: .5rem;
  font-size: .78rem;
  font-weight: 600;
  padding: .2rem .6rem;
  border-radius: 4px;
}
.verdict.caught {
  background: #e8f5e9;
  color: #2e7d32;
}
.verdict.missed {
  background: #fff3e0;
  color: #e65100;
}
