/* Learning controls stay local to the two exam articles. */
.exam-lab { margin:32px 0; padding:28px 0; border-block:1px solid var(--line); font-variant-numeric:tabular-nums; }
.exam-lab h3 { margin-top:0; }
.exam-lab fieldset { border:0; padding:0; margin:0; min-width:0; }
.exam-lab legend { margin-bottom:18px; font-weight:600; }
.exam-lab__controls { display:grid; grid-template-columns:1fr 1fr; gap:20px 28px; }
.exam-lab label { display:block; font-size:16px; line-height:1.5; }
.exam-lab label output { font-weight:600; }
.exam-lab input[type=range] { display:block; width:100%; min-height:44px; accent-color:var(--green); cursor:pointer; margin:4px 0 0; }
.exam-lab select,.exam-lab button { font:inherit; font-size:16px; color:var(--ink); background:#fff; border:1px solid var(--input-border,#b3c0b6); border-radius:8px; min-height:44px; padding:8px 12px; max-width:100%; }
.exam-lab select { width:100%; margin-top:8px; }
.exam-lab button { cursor:pointer; }
.exam-lab button:hover { background:var(--light); }
.exam-lab :is(input,select,button):focus-visible { outline:3px solid var(--green); outline-offset:4px; }
.exam-lab fieldset:disabled { opacity:.65; }
.exam-lab__actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:20px; }
.exam-lab__result { margin:24px 0 12px; padding-block:18px; border-block:1px solid var(--line); font-size:22px; line-height:1.5; font-weight:600; }
.exam-lab__hint { font-size:14px; color:var(--muted); line-height:1.6; }
.exam-lab__chart { display:grid; grid-template-columns:repeat(11,minmax(0,1fr)); gap:7px; margin:24px 0 12px; height:200px; }
.exam-lab__column { min-width:0; display:flex; flex-direction:column; gap:6px; text-align:center; font-size:13px; line-height:1.4; }
.exam-lab__track { flex:1; position:relative; border-bottom:1px solid var(--line); }
.exam-lab__bar { position:absolute; inset:0; background:var(--muted); transform-origin:bottom; transition:transform 220ms cubic-bezier(.16,1,.3,1),background-color 150ms ease; }
.exam-lab__column.is-selected .exam-lab__bar { background:var(--green); }
.exam-lab__column.is-selected .exam-lab__label { font-weight:700; text-decoration:underline; text-underline-offset:3px; }
.exam-lab__bits { display:grid; grid-template-columns:repeat(8,minmax(0,1fr)); gap:8px; margin:24px 0 12px; }
.exam-lab__bits span { padding:16px 0; text-align:center; border:1px solid var(--line); color:var(--muted); transition:background-color 180ms ease,color 180ms ease; font-size:16px; }
.exam-lab__bits span.is-active { color:#fff; background:var(--green); border-color:var(--green); }
.exam-lab__calculation { font-size:17px; overflow-wrap:anywhere; }
.exam-lab ::selection { background:var(--green); color:#fff; }
@media(max-width:600px) { .exam-lab__controls { grid-template-columns:1fr; gap:12px; } .exam-lab__chart { gap:4px; height:170px; } .exam-lab__bits { gap:4px; } .exam-lab__bits span { font-size:13px; padding:14px 0; } .exam-lab__result { font-size:20px; } }
@media(prefers-reduced-motion:reduce) { .exam-lab__bar,.exam-lab__bits span { transition:none; } }
