.core-sgd-witness { padding: clamp(18px, 3vw, 34px); }
.core-sgd-controls, .core-sgd-play-row { margin-top: 20px; }
.core-sgd-witness .controls { display: flex; flex-wrap: wrap; gap: 8px; }
.core-sgd-witness button { white-space: normal; }
.core-sgd-draw-status { min-height: 1.7em; }
.core-sgd-rate-row { display: grid; grid-template-columns: 230px minmax(140px, 1fr) auto; gap: 12px; align-items: center; }
.core-sgd-rate-row label, .core-sgd-play-row > label { font-weight: 650; }
.core-sgd-rate-row strong { display: inline-block; min-width: 9ch; font-variant-numeric: tabular-nums; }
.core-sgd-witness input[type="range"] { min-width: 0; width: 100%; }
.core-sgd-legend { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; margin-top: 12px; font-size: .94rem; }
.core-sgd-legend > span::before { content: ''; width: 26px; height: 3px; background: currentColor; display: inline-block; margin-right: 8px; vertical-align: middle; }
.core-sgd-test-key { color: #367d51; }
.core-sgd-train-key { color: #b05f3b; }
.core-sgd-arrival-key { color: #7862b2; }
.core-sgd-arrival-key::after { content: ''; display: inline-block; width: 7px; height: 7px; margin-left: 7px; border-radius: 50%; background: currentColor; }
.core-sgd-arrival-key input { margin-right: 5px; accent-color: #7862b2; }
/* Inline prompt in the explanation: same purple as the toggle; dimmed once the dots are shown. */
.core-sgd-arrival-cta { font: inherit; font-weight: 700; color: #7862b2; background: none; border: 0; padding: 0; cursor: pointer;
  text-decoration: underline dotted; text-underline-offset: 3px; }
.core-sgd-arrival-cta:hover { text-decoration-style: solid; }
.core-sgd-arrival-cta[aria-disabled="true"] { color: #8a919b; cursor: default; text-decoration: none; }
.core-sgd-plot { display: block; width: 100%; max-width:900px; height: auto; overflow: visible; margin:16px auto 0; touch-action: pan-y; }
.core-sgd-plot [data-core-sgd-scrub] { cursor: ew-resize; }
.core-sgd-plot text { font-family: inherit; font-size: 15px; fill: #526171; }
.core-sgd-plot .core-sgd-axis-title { font-size: 16px; font-weight: 650; }
.core-sgd-plot-note { margin-top: 12px; }
.core-sgd-play-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; }
.core-sgd-play-row > input { grid-column: 1 / -1; }
.core-sgd-play-row > label strong { display: inline-block; min-width: 8ch; font-variant-numeric: tabular-nums; }
.core-sgd-witness .core-sgd-scores { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top:0; }
.core-sgd-witness .core-sgd-scores > div { min-width: 0; padding: 7px 10px; }
.core-sgd-witness .core-sgd-scores span { min-height: 0; }
.core-sgd-witness .core-sgd-scores strong { font-size: clamp(1.2rem, 2.2vw, 1.6rem); min-height: 1.2em; line-height:1.2; margin-top:4px; }
#coreSgdCurrentLabel { margin: 12px 0 6px; }
.core-sgd-witness .core-sgd-scores > div:nth-child(2) strong { color: #b05f3b; }
.core-sgd-witness .core-sgd-scores > div:nth-child(3) strong { color: #7862b2; }
.core-sgd-baseline { min-height: 0; }
#coreSgdReadout { min-height: 3.1em; }
.core-sgd-return-readout { min-height: 5em; }
.core-sgd-share { margin-top: 12px; }
@media(max-width: 850px) {
  .core-sgd-rate-row { grid-template-columns: 1fr; }
  .core-sgd-play-row { grid-template-columns: 1fr; }
  .core-sgd-play-row > label { grid-row: 2; }
  .core-sgd-plot text { font-size: 16px; }
  .core-sgd-draw-status { min-height: 3.4em; }
}
@media(max-width: 540px) {
  .core-sgd-draw-status { min-height: 5.1em; }
  .core-sgd-witness .core-sgd-scores { gap: 6px; }
  .core-sgd-witness .core-sgd-scores > div { padding: 10px 7px; }
  .core-sgd-witness .core-sgd-scores span { font-size: .76rem; min-height: 2.8em; }
  .core-sgd-baseline { min-height: 0; }
  #coreSgdReadout { min-height: 6.2em; }
}

/* Compact same-experiment comparisons: preserve numeric rows on narrow screens. */
.core-predictor-comparison { width:100%; border-collapse:collapse; margin:18px 0 6px; font-size:.94rem; font-variant-numeric:tabular-nums; }
.core-predictor-comparison caption { text-align:left; font-weight:650; padding-bottom:8px; }
.core-predictor-comparison th, .core-predictor-comparison td { text-align:right; padding:9px 10px; border-bottom:1px solid #d9dfe4; }
.core-predictor-comparison th:first-child { text-align:left; }
.core-predictor-comparison tr[aria-current="true"] { background:#edf4ef; }
.core-predictor-comparison thead { font-size:.84rem; }
@media(max-width:540px) {
  .core-predictor-comparison thead { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
  .core-predictor-comparison tbody, .core-predictor-comparison tr { display:block; }
  .core-predictor-comparison tr { padding:8px 0; border-bottom:1px solid #d9dfe4; }
  .core-predictor-comparison tbody th { display:block; padding:4px 8px; border:0; }
  .core-predictor-comparison td { display:flex; justify-content:space-between; gap:12px; padding:3px 8px; border:0; }
  .core-predictor-comparison td::before { content:attr(data-label); font-size:.85rem; }
}
.traditional-threshold-note { font-size:12px; line-height:1.3; color:#536170; }
