/* Walk-through layout. Colours come from the tokens in style.css. */
body.wt { max-width: 64rem; }
.wt-lead { max-width: 46rem; }
.wt-progress { position: sticky; top: 0; z-index: 5; background: var(--bg); border-bottom: 1px solid var(--line);
  margin: 0 -16px; padding: .4rem 16px .45rem; }
.wt-bar { height: 3px; background: var(--shade); border-radius: 2px; overflow: hidden; }
.wt-fill { height: 100%; width: 0; background: var(--threshold); transition: width .3s ease; }
.wt-row { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: .4rem; }
.wt-steps { list-style: none; display: flex; gap: .3rem; margin: 0; padding: 0; flex-wrap: nowrap; min-width: 0; }
.wt-steps button { font: inherit; font-size: .85rem; border: 1px solid var(--line); background: var(--bg); color: var(--muted);
  border-radius: 999px; min-width: 1.9rem; height: 1.9rem; padding: 0 .55rem; cursor: pointer;
  transition: background .2s, color .2s, border-color .2s; }
.wt-steps button .wt-st { margin-left: .3rem; }
.wt-steps button[aria-current="step"] { background: var(--threshold); border-color: var(--threshold); color: #fff; }
.wt-steps button.done { color: var(--fg); border-color: var(--axis); }
.wt-pn { white-space: nowrap; }
.wt-pn:disabled { opacity: .4; cursor: default; }

.wt-ch { display: grid; grid-template-columns: 1fr; gap: .75rem 2rem; padding: 2rem 0 1.5rem;
  border-bottom: 1px solid var(--line); scroll-margin-top: 4.2rem; }
.wt-ch h2 { margin-top: .1rem; font-size: 1.3rem; }
.wt-num { margin: 0; font-size: .8rem; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.wt-text p { max-width: 38rem; }
.wt-fig { margin: 0; min-width: 0; }
.wt-svg { max-width: 560px; margin: .25rem auto; }
.wt-svg text { font-size: 12px; }
.wt-svg .small { font-size: 10.5px; }
.wt-svg .halo { paint-order: stroke; stroke: var(--bg); stroke-width: 3px; stroke-linejoin: round; }
.wt-ctl { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; font-size: .92rem; margin: .25rem 0 .4rem; }
.wt-ctl label { display: block; min-width: 0; }
.wt-ctl label input[type=range] { display: block; margin-top: .2rem; }
.wt-ctl input[type=range] { width: 100%; min-width: 10rem; accent-color: var(--threshold); }
.wt-ctl > label:first-child:last-child, .wt-ctl > label:first-child { flex: 1 1 14rem; }
.wt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
.wt-grid label { flex: none; }
output { font-variant-numeric: tabular-nums; font-weight: 600; }
.wt-seg { border: 1px solid var(--line); border-radius: 6px; padding: .2rem .6rem .35rem; margin: 0; display: flex; gap: .2rem 1rem; flex-wrap: wrap; }
.wt-seg legend { font-size: .85rem; color: var(--muted); padding: 0 .2rem; }
.wt-seg label { display: inline-flex; align-items: center; gap: .3rem; }
.wt-counts { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: .4rem; margin: .4rem 0; }
.wt-counts div { border: 1px solid var(--line); border-radius: 6px; padding: .35rem .5rem; font-size: .85rem; color: var(--muted);
  display: flex; align-items: center; gap: .45rem; }
.wt-counts b { color: var(--fg); font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.wt-counts svg { flex: none; }
.wt-legend { display: flex; flex-wrap: wrap; gap: .3rem 1rem; font-size: .85rem; color: var(--muted); margin: .2rem 0; }
.wt-legend span { display: inline-flex; align-items: center; gap: .3rem; }
.wt-table { font-size: .88rem; margin: .4rem 0; }
.wt-table td, .wt-table th { white-space: normal; }
.wt-msg { min-height: 2.6em; font-size: .95rem; }
.wt-chips { display: flex; flex-wrap: wrap; gap: .35rem; margin: .3rem 0; font-size: .82rem; }
.wt-chips span.outcome { font-weight: 500; }
.wt-det { margin: .5rem 0; }
.wt-tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .6rem; }
.wt-tabs button { font: inherit; font-size: .9rem; cursor: pointer; border: 2px solid transparent; opacity: .55;
  transition: opacity .2s, border-color .2s; }
.wt-tabs button[aria-selected="true"] { opacity: 1; border-color: var(--fg); }
.wt-panel { border: 1px solid var(--line); border-radius: 6px; padding: .6rem .85rem; }
.wt-panel h3 { margin-top: .2rem; }
.wt-panel dt { font-weight: 600; margin-top: .5rem; }
.wt-panel dd { margin: .15rem 0 0; }
.wt-end { padding: 1.5rem 0 0; }

/* marks */
.mk { transition: fill .2s ease, stroke .2s ease, opacity .2s ease; }
.mk-acc-c { fill: var(--correct); stroke: var(--correct); }
.mk-acc-w { fill: var(--wrong); stroke: var(--wrong); }
.mk-wh-c { fill: none; stroke: var(--correct); stroke-dasharray: 3 2; }
.mk-rj-w { fill: none; stroke: var(--axis); stroke-dasharray: 3 2; }
.glyph { stroke-width: 1.6; stroke-linecap: round; fill: none; }
.chart .road { fill: var(--shade); }
.chart .lane { stroke: var(--line); stroke-dasharray: 6 6; }
.chart .ego { fill: var(--ink); }
.chart .band { fill: var(--threshold); opacity: .08; }
.chart .tau { stroke: var(--threshold); stroke-width: 2; }
.chart .limit { stroke: var(--limit); stroke-width: 1.5; stroke-dasharray: 5 3; }
.chart .fapline { stroke: var(--fg); stroke-width: 1.5; }
.chart .bar { fill: var(--wrong); opacity: .75; transition: opacity .2s; }
.chart .tauT { fill: var(--threshold); font-weight: 600; }
.chart .dimmed { opacity: .3; }
.chart .curve-c { fill: none; stroke-width: 1.4; stroke-dasharray: 4 3; }
.chart .curve-u { stroke-width: 1.8; }

@media (min-width: 880px) {
  .wt-ch { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); align-items: start; padding: 2.5rem 0 2rem; }
  .wt-text { position: sticky; top: 5rem; }
}
@media (max-width: 879px) { .wt-steps button .wt-st { display: none; } }
@media (max-width: 520px) {
  .wt-pn-t { display: none; }
  .wt-steps button { min-width: 1.75rem; height: 1.75rem; padding: 0; }
  .wt-ch h2 { font-size: 1.15rem; }
  .wt-svg text { font-size: 13.5px; }
  .wt-svg .small { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .wt-fill, .mk, .wt-steps button, .wt-tabs button, .chart .bar { transition: none; }
  html { scroll-behavior: auto; }
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
