/* CAP page: the paper's own encoding is orange = CAP, gray = standard head.
   Shared components (overview, method steps, analysis cards, mosaics) live in site.css. */
.page-cap {
  --ours: #eb6834;
  --ours-2: #4a3aa7;
  --ours-ink: #b4461a;
}

/* rollouts */
.rollout-panel { padding: 14px 16px; margin-bottom: 12px; }
.rollout-selectors { display: grid; gap: 10px; }
.selector-row { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px; align-items: start; }
.selector-row > .control-label { padding-top: 7px; }
.rollout-mode { margin-bottom: 12px; }
.pair-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 14px; align-items: start; }
.pair-layout .pair-viewer { max-width: 920px; }
.pair-stats-card h4 { margin: 0 0 2px; font-size: 0.98rem; }
.pair-stats-card .chart-sub { margin-bottom: 6px; }

/* method step 2: codebooks vs heads */
.mismatch-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 14px; align-items: stretch; }
.mismatch-card { display: flex; flex-direction: column; justify-content: center; padding: 14px 16px; }
.mismatch-controls { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 6px; }

/* method step 3: prototypes */
.proto-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.proto-card { display: grid; gap: 2px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.proto-card b { font-size: 0.95rem; }
.proto-card span { color: var(--muted); font-size: 0.86rem; line-height: 1.4; }
.proto-card .proto-eq { margin-top: 4px; color: var(--ink); font-size: 0.95rem; }
.swap-figure { display: grid; grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1.1fr); gap: 8px; align-items: center; }
.swap-arrow { color: var(--ours); font-size: 2rem; font-weight: 700; text-align: center; }

/* method step 4: schematic */
#arrow-explainer { width: 100%; }
#arrow-explainer svg text.panel-title { fill: var(--ink); font-size: 14px; font-weight: 720; }
#arrow-explainer svg text.panel-sub { fill: var(--muted); font-size: 12px; }
#arrow-explainer svg text.small { fill: var(--muted); font-size: 11px; }

@media (max-width: 1000px) {
  .pair-layout { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .mismatch-grid, .proto-row, .swap-figure { grid-template-columns: 1fr; }
  .swap-arrow { transform: rotate(90deg); }
}
@media (max-width: 680px) {
  .selector-row { grid-template-columns: 1fr; }
}
