/* results.css – the "Real-data results" page (results.html). Tokens, panels and the stat strip come from styles.css.
   The charts are HTML + CSS: a row is a label and a track; marks sit on the track at left: var(--x) (percent). */

.rmain { max-width: 80rem; margin: 0 auto; padding: .6rem clamp(1rem, 3vw, 2rem) 2rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.2rem; }   /* minmax(0, ...): a wide table scrolls inside its section, it does not widen the page */
.rfield { display: grid; gap: .3rem; max-width: 26rem; margin: 0 0 .8rem; font-size: .85rem; color: var(--text-muted); }
.rintro h1 {
  margin: 0 0 1rem; font-family: var(--display); font-weight: 700; color: var(--text);
  font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.05;
}
.rintro h2::after { content: ""; display: block; width: 64px; height: 4px; margin-top: .9rem; background: var(--accent); }
.rlead { margin: 0 0 1rem; max-width: 68ch; color: var(--text); font-size: clamp(1.05rem, 1.6vw, 1.25rem); line-height: 1.55; }
.rnotice {
  margin: 0 0 1rem; max-width: 72ch; padding: .8rem 1rem; font-size: .92rem; color: var(--text);
  border-left: 3px solid var(--accent); background: rgb(var(--accent-rgb) / .08); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.rintro a, .rsec a, .site-footer a { color: var(--accent-hi); }
.rintro .stats b span { font-size: inherit; letter-spacing: inherit; color: inherit; }   /* the number spans inside the big figure keep its size (styles.css .stats span is for the caption) */
.rintro .stats b { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.rstatus { margin: 0; padding: .6rem 1rem; color: var(--text-muted); font-size: .9rem; }
.rstatus[hidden] { display: none; }

.rsec { padding: clamp(1.1rem, 2.6vw, 1.8rem); }
.rsec h2 { font-family: var(--display); font-weight: 700; font-size: clamp(1.4rem, 3vw, 1.9rem); margin: 0 0 .8rem; color: var(--text); }
.rsec h3 { margin: 1.2rem 0 .4rem; font-size: 1.05rem; color: var(--text); font-weight: 600; }
.rsec p { margin: 0 0 .9rem; max-width: 74ch; color: var(--text-muted); }
.rsec p strong, .rsec li strong { color: var(--text); font-weight: 600; }
.rsec code { font-size: max(.88em, 12px); padding: .05em .35em; border-radius: 4px; background: var(--field); color: var(--text); }
p.rcaveat {
  padding: .7rem .9rem; color: var(--text); border-left: 3px solid var(--warn); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: rgb(var(--warn-rgb) / .09);
}
.rlimits { margin: 0 0 .6rem; padding-left: 1.2rem; max-width: 74ch; color: var(--text-muted); display: grid; gap: .45rem; }

.rfig { margin: 1rem 0; padding: .9rem 1rem .8rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--field); }
.rfig figcaption { margin: 0 0 .7rem; font-size: .92rem; font-weight: 600; color: var(--text); }

/* ----- one row of a chart ----- */
.rrow { display: grid; grid-template-columns: minmax(9rem, 15rem) 1fr; gap: .2rem .9rem; align-items: center; margin: .25rem 0; }
.rlabel { font-size: .88rem; color: var(--text); overflow-wrap: anywhere; }
.rtrack { position: relative; height: 1.9rem; }
.rdots .rtrack { height: calc(var(--lanes, 1) * 1.05rem + .6rem); }
.raxis .rtrack { height: 1.3rem; margin-top: .1rem; border-top: 1px solid var(--border); }
.rtick { position: absolute; left: var(--x); top: .2rem; transform: translateX(-50%); font-size: .78rem; color: var(--text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.raxis-unit { margin: .15rem 0 0 !important; font-size: .8rem !important; text-align: center; max-width: none !important; color: var(--text-muted); }
.rgrid { position: absolute; left: var(--x); top: 0; bottom: 0; width: 1px; background: var(--border); }
.rref { position: absolute; left: var(--x); top: 0; bottom: 0; border-left: 1.5px dashed var(--text); opacity: .75; }

/* bars */
.rbar { position: absolute; left: var(--x); width: var(--w); top: .3rem; bottom: .3rem; border-radius: 3px; background: var(--text-muted); }
.rbar.bad { background: var(--accent); }
.rwhisker { position: absolute; left: var(--x); width: var(--w); top: 50%; height: 2px; background: var(--text); transform: translateY(-50%); }
.rwhisker::before, .rwhisker::after { content: ""; position: absolute; top: -.3rem; height: .6rem; width: 2px; background: var(--text); }
.rwhisker::before { left: 0; } .rwhisker::after { right: 0; }
.rval {
  position: absolute; left: calc(var(--x) + .45rem); top: 50%; transform: translateY(-50%); z-index: 1;
  font-size: .85rem; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.rval.inside { left: auto; right: calc(100% - var(--x) + .45rem); color: var(--on-accent); }
.rnone { position: absolute; left: .4rem; top: 50%; transform: translateY(-50%); font-size: .85rem; font-style: italic; color: var(--text-muted); }

/* dots */
.rpt {
  position: absolute; left: var(--x); top: calc(var(--lane, 0) * 1.05rem + .3rem); width: .8rem; height: .8rem;
  transform: translateX(-50%); background: var(--text-muted);
}
.rpt.circle { border-radius: 50%; }
.rpt.diamond { width: .7rem; height: .7rem; margin-top: .05rem; transform: translateX(-50%) rotate(45deg); }
.rpt.bad { background: var(--accent); }
.rpt.target { background: var(--warn); box-shadow: 0 0 0 2px var(--field); }
.rpt.off { background: transparent; border: 2px solid var(--text-muted); }
.rpt.offR { transform: translateX(-100%); } .rpt.offL { transform: none; }
.rofftext { position: absolute; right: 1.1rem; top: -.12rem; font-size: .8rem; color: var(--text); white-space: nowrap; font-variant-numeric: tabular-nums; }
.offL .rofftext { right: auto; left: 1.1rem; }
.rrange { position: absolute; left: var(--x); width: var(--w); top: 50%; height: 3px; transform: translateY(-50%); background: var(--text-muted); opacity: .8; border-radius: 2px; }

/* legend */
.rlegend { display: flex; flex-wrap: wrap; gap: .3rem 1.3rem; margin: .7rem 0 0; padding: 0; list-style: none; font-size: .82rem; color: var(--text-muted); }
.rkey { display: inline-block; width: .75rem; height: .75rem; margin-right: .45rem; vertical-align: -1px; background: var(--text-muted); }
.rkey.circle { border-radius: 50%; }
.rkey.diamond { transform: rotate(45deg) scale(.85); }
.rkey.bad { background: var(--accent); } .rkey.target { background: var(--warn); }
.rkey.ref { width: 0; height: .9rem; background: none; border-left: 1.5px dashed var(--text); margin-right: .55rem; }
.rkey.range { width: 1.2rem; height: 3px; vertical-align: middle; }

/* the table under each chart */
.rtable { margin-top: .8rem; font-size: .85rem; }
.rtable summary { color: var(--accent-hi); cursor: pointer; }
.rtable-scroll { overflow-x: auto; margin-top: .4rem; }
.rtable table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
.rtable caption { text-align: left; padding: .2rem 0 .4rem; color: var(--text-muted); }
.rtable th, .rtable td { padding: .35rem .6rem; border-bottom: 1px solid var(--border); text-align: right; color: var(--text); }
.rtable th[scope="row"], .rtable thead th:first-child { text-align: left; }
.rtable thead th { color: var(--text-muted); font-weight: 600; white-space: nowrap; }

@media (max-width: 640px) {
  .rrow { grid-template-columns: 1fr; gap: .1rem; margin: .55rem 0; }
  .raxis { margin-top: 0; } .raxis .rlabel { display: none; }
  .rfig { padding: .8rem .75rem .7rem; }
}
@media (pointer: coarse) { .rtable summary{ min-height: 44px; display: inline-flex; align-items: center; } }
@media (prefers-reduced-motion: reduce) { .sky-bg, .brand-logo::before, .brand-logo::after { animation: none; } }

.result-links, .explorer-inputs { display: flex; flex-wrap: wrap; align-items: end; gap: .6rem 1rem; }
.result-links a, .record-button { color: var(--accent-hi); }
.rmain > * { min-width: 0; }
.rsec code { overflow-wrap: anywhere; }
.explorer h1 { margin-bottom: .6rem; font-size: clamp(1.8rem, 4vw, 2.8rem); }
.explorer h2 { margin-top: 1.2rem; }
.explorer-inputs label, #local-ai label { display: grid; gap: .3rem; font-size: .88rem; max-width: 100%; }
.explorer-inputs input, #local-ai input { min-width: 0; max-width: 100%; font: inherit; color: var(--text); }
.explorer-inputs input[type=search] { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--field); padding: .55rem; }
.explorer [hidden] { display: none; }
.explorer [role=status]:not(:empty) { margin-top: .6rem; }
.explorer-table { margin-bottom: .8rem; }
.record-button { background: transparent; border: 0; font: inherit; text-align: left; padding: .45rem; cursor: pointer; }
.record-button[aria-pressed=true] { border-inline-start: 3px solid var(--accent); color: var(--text); font-weight: 700; }
.evidence-grid { display: grid; grid-template-columns: minmax(8rem, 1fr) 1fr; max-width: 44rem; gap: .4rem 1rem; }
.evidence-grid dt { color: var(--text-muted); }
.evidence-grid dd { margin: 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
#research-assistant { margin-top: 1.3rem; border-top: 1px solid var(--border); }
#local-ai { margin-top: .6rem; }
#local-ai label { margin-bottom: .5rem; }
#report-output { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--field); padding: .75rem; border-radius: var(--radius-sm); }
#run-title, #candidate-title, #candidate-ref { overflow-wrap: anywhere; }
#centroid-plot { display: block; width: min(100%, 540px); height: auto; background: var(--field); color: var(--text); }
#candidate-samples summary { color: var(--accent-hi); cursor: pointer; }
#candidate-samples { margin: .75rem 0; }
#distribution { margin: .4rem 0 1rem; font-size: .88rem; }
#distribution summary { cursor: pointer; color: var(--accent-hi); }
#speed-bins { padding: 0; list-style: none; max-width: 34rem; }
#speed-bins li { margin-bottom: .5rem; }
.histogram-bar { display: block; height: .35rem; background: var(--accent); }

/* Under the heading of sections 1-10: which command made the numbers, and where VALIDATION.md reports it */
.rorigin { margin: -.4rem 0 1rem; font-size: .82rem; color: var(--text-muted); overflow-wrap: anywhere; max-width: 74ch; }
.rorigin:empty { display: none; }
.rsec .rorigin strong { color: var(--text-muted); }
.rsec .rorigin code { font-size: max(.9em, 12px); }

.rmain .result-links { gap: .4rem 1rem; }
.rmain table { font-variant-numeric: tabular-nums; }
.rmain .rsec { padding: clamp(1rem,2.5vw,2rem); }
