html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { font-feature-settings: "ss01","cv11"; }

/* probe cells */
.probe-cell {
  display: flex; flex-direction: column; gap: 8px;
  margin: 0;
}
.probe-cell figcaption {
  font-size: 12px;
  letter-spacing: .04em;
  color: #6b7280;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 0 2px;
}
.probe-image {
  position: relative; overflow: hidden;
  border-radius: 14px; background: #0b0d12;
  aspect-ratio: 16 / 9;
}
.probe-image img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: opacity .25s ease;
}
.probe-cell .dot { width: 8px; height: 8px; border-radius: 999px; display:inline-block; }

/* mode buttons */
.mode-btn { transition: background .2s ease, color .2s ease, border-color .2s ease; }


/* gallery card */
.gallery-card { position: relative; aspect-ratio: 16/9; overflow:hidden; border-radius: 18px; background:#0b0d12; }
.gallery-card .main-video { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.gallery-card .main-label {
  position:absolute; top:10px; left:10px;
  padding: 4px 9px; border-radius: 4px;
  color:#fafaf7; font-family:"JetBrains Mono",ui-monospace,monospace;
  font-size:10px; letter-spacing:.18em; text-transform:uppercase;
  backdrop-filter: blur(4px);
  text-shadow:0 1px 3px rgba(0,0,0,.6);
  pointer-events: none;
  transition: background-color .2s ease;
}
.gallery-card[data-state="ours"] .main-label { background: rgba(124, 92, 255, 0.85); }
.gallery-card[data-state="base"]  .main-label { background: rgba(11, 13, 18, 0.65); }
.gallery-card .pip {
  position:absolute; top:10px; right:10px;
  width:28%; aspect-ratio: 16/9;
  border-radius: 10px; overflow: hidden;
  border: 2px solid rgba(255,255,255,.75);
  box-shadow: 0 4px 14px rgba(0,0,0,.5);
  padding:0; background:#0b0d12; cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.gallery-card .pip:hover {
  transform: scale(1.05);
  border-color: #fff;
  box-shadow: 0 6px 18px rgba(0,0,0,.6);
}
.gallery-card .pip-video {
  position:absolute; inset:0; width:100%; height:100%; object-fit:cover;
  pointer-events: none;
}
.gallery-card .pip-label {
  position:absolute; bottom:2px; left:0; right:0;
  text-align: center;
  color:#fafaf7; font-family:"JetBrains Mono",ui-monospace,monospace;
  font-size:8px; letter-spacing:.14em; text-transform:uppercase;
  text-shadow:0 1px 2px rgba(0,0,0,.9);
  pointer-events: none;
}
.gallery-card .prompt {
  position:absolute; left:12px; right:12px; bottom:10px;
  color:#fafaf7; font-size: 12px; line-height:1.3;
  text-shadow:0 1px 3px rgba(0,0,0,.7);
}
[data-pip="off"] .gallery-card .pip { display: none; }
/* Nudge legend dots up so they look centered against uppercase text. */
.pip-toggle .pip-label-text > span {
  position: relative;
  top: -1px;
  vertical-align: middle;
}

/* method diagram svg */
#diagram .node {
  fill: #ffffff; stroke: #0b0d12; stroke-width: 1.5;
  transition: opacity .35s ease, transform .35s ease;
}
#diagram .node-fade { opacity: 0.12; }
#diagram .node-text { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 11px; fill: #0b0d12; }
#diagram .arrow { stroke: #0b0d12; stroke-width: 1.5; fill: none; marker-end: url(#arrowhead); transition: opacity .35s ease; }
#diagram .arrow-fade { opacity: 0.1; }
#diagram .arrow-foresight { stroke: #FF0000; stroke-dasharray: 4 3; }
#diagram .arrow-causal    { stroke: #00B0F0; }
#diagram .label-loss { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 11px; fill: #FF0000; }
#diagram .badge { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 10px; fill: #6b7280; }

/* placeholder shimmer for missing images */
.shimmer {
  background: linear-gradient(90deg, #1a1d24 0%, #2a2e36 50%, #1a1d24 100%);
  background-size: 200% 100%;
  animation: shimmer 1.6s linear infinite;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* table */
#results-tbody tr.ours { background: #f6f4ff; }
#results-tbody tr.ours td:first-child { color: #7C5CFF; font-weight: 600; }
#results-tbody td { padding: 10px 20px; }
#results-tbody td:first-child { font-family: "Inter", sans-serif; }
#results-tbody .bold { font-weight: 700; }

/* prompt buttons */
.prompt-chip {
  padding: 6px 12px; border-radius: 999px; border: 1px solid #e5e7eb;
  font-size: 12px; cursor: pointer; transition: all .15s ease;
  background: #fff;
}
.prompt-chip:hover { border-color: #0b0d12; }
.prompt-chip.active { background: #0b0d12; color: #fafaf7; border-color: #0b0d12; }

/* range styling */
input[type="range"] { height: 4px; }

/* ====================== Rollout demo (Demo · Readout vs. Rollout Average) ====================== */
.rollout-figure-wrap {
  width: 100%;
  overflow: hidden;
  background: #ffffff;
}

#rollout-demo.rollout-figure-canvas {
  position: relative;
  width: 100%;
  min-width: 0;
  aspect-ratio: 1680 / 660;
  background: #ffffff;
  container-type: inline-size;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;

  --gray: #6b7280;
  --border-gray: #0b0d12;
  --purple: #7C5CFF;
  --purple-soft: rgba(124, 92, 255, 0.18);
  --purple-glow: rgba(124, 92, 255, 0.45);
}

#rollout-demo .rollout-shift {
  position: absolute;
  inset: 0;
  transform: translateX(-0.3%);
}

#rollout-demo .rollout-img-box {
  position: absolute;
  width: 23.2%;
  height: 33.2%;
  background: #0b0d12;
  border: 2px solid var(--border-gray);
  border-radius: 14px;
  box-sizing: border-box;
  overflow: hidden;
  z-index: 1;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

#rollout-demo .rollout-img-box img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

#rollout-demo .readout-img,
#rollout-demo .rollout-img {
  cursor: pointer;
}

#rollout-demo .rollout-label {
  position: absolute;
  z-index: 3;
  white-space: nowrap;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  color: var(--gray);
  letter-spacing: 0.02em;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

#rollout-demo .rollout-top-label {
  font-size: 13px;
  font-size: clamp(12px, 0.86cqw, 15px);
  font-weight: 500;
  transform: translateX(-50%);
}

#rollout-demo .rollout-readout-text,
#rollout-demo .rollout-sample-text {
  font-size: 13px;
  font-size: clamp(12px, 0.8cqw, 14px);
  font-style: italic;
  font-weight: 600;
}

#rollout-demo .rollout-rollouts-text {
  font-size: 13px;
  font-size: clamp(12px, 0.86cqw, 15px);
  font-weight: 500;
  transform: translateX(-50%);
}

#rollout-demo .rollout-average-text {
  font-size: 13px;
  font-size: clamp(12px, 0.8cqw, 14px);
  font-style: italic;
  font-weight: 600;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: translateY(-50%);
}

#rollout-demo .rollout-approx {
  position: absolute;
  left: 67.200%;
  top: 18.800%;
  z-index: 3;
  font-size: 24px;
  font-size: clamp(20px, 1.55cqw, 26px);
  color: var(--gray);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-weight: 600;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

#rollout-demo .rollout-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

#rollout-demo .rollout-line-gray {
  stroke: var(--gray);
  transition: stroke 0.2s ease, filter 0.2s ease;
}

#rollout-demo .rollout-arrow-gray,
#rollout-demo .readout-hover-arrow,
#rollout-demo .rollout-hover-arrow {
  fill: var(--gray);
  transition: fill 0.2s ease, filter 0.2s ease;
}

#rollout-demo:has(.readout-img:hover) .readout-hover-text {
  color: var(--purple);
  text-shadow: 0 0 8px var(--purple-glow);
}

#rollout-demo:has(.readout-img:hover) .rollout-approx {
  color: var(--purple);
  text-shadow: 0 0 8px var(--purple-glow);
}

#rollout-demo:has(.readout-img:hover) .readout-hover-line {
  stroke: var(--purple);
  filter: drop-shadow(0 0 4px var(--purple-glow));
}

#rollout-demo:has(.readout-img:hover) .readout-hover-arrow {
  fill: var(--purple);
  filter: drop-shadow(0 0 4px var(--purple-glow));
}

#rollout-demo .readout-img:hover,
#rollout-demo:has(.readout-img:hover) .avg-img {
  border-color: var(--purple);
  box-shadow: 0 0 0 4px var(--purple-soft);
}

#rollout-demo .readout-img:hover,
#rollout-demo .rollout-img:hover {
  transform: translateY(-2px);
}

#rollout-demo:has(.rollout-img:hover) .rollout-hover-text {
  color: var(--purple);
  text-shadow: 0 0 8px var(--purple-glow);
}

#rollout-demo:has(.rollout-img:hover) .rollout-hover-line {
  stroke: var(--purple);
  filter: drop-shadow(0 0 4px var(--purple-glow));
}

#rollout-demo:has(.rollout-img:hover) .rollout-hover-arrow {
  fill: var(--purple);
  filter: drop-shadow(0 0 4px var(--purple-glow));
}

#rollout-demo .rollout-img:hover,
#rollout-demo:has(.rollout-img:hover) .avg-img {
  border-color: var(--purple);
  box-shadow: 0 0 0 4px var(--purple-soft);
}
