/* =========================================================
   Practice Tests page (site/ccna/practice-tests/). Uses the tokens and parts in site.css.
   Header with your record, the mode switch and the 18 test cards, the study list,
   and the test itself (#run), which replaces the bands while a test is open.
   ========================================================= */
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
code.c { font-family: var(--f-mono); font-size: .86em; background: var(--bg-2); color: var(--blue-ink); padding: 1px 5px; border-radius: 5px; overflow-wrap: anywhere; }
.btn-s { min-height: 44px; padding: 9px 16px; font-size: 15px; box-shadow: 3px 3px 0 var(--ink); }
.btn-s:active { box-shadow: 1px 1px 0 var(--ink); }

/* while a test is open, the page is the test: no section strip, rail or progress line */
body[data-view="run"] .now, body[data-view="run"] .rail, body[data-view="run"] .progress { display: none; }

/* ---------- header: title + your record ---------- */
.pt-head { display: grid; gap: 40px; }
@media (min-width: 1000px) { .pt-head { grid-template-columns: minmax(0, 6fr) minmax(360px, 5fr); gap: 64px; align-items: center; } }
.pt-title { font-size: clamp(40px, min(calc(10 * var(--vw)), calc(8 * var(--svh))), 72px); line-height: 1.02; letter-spacing: -.035em; max-width: 11em; text-wrap: balance; }
.pt-title em { display: block; color: var(--blue); }
.pt-sub { margin-top: 18px; font-size: 18px; color: var(--ink-2); max-width: 34em; }
.pt-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
@media (max-width: 420px) { .pt-actions .btn { flex: 1 1 100%; } }

.record { background: var(--card); border: 2px solid var(--ink); border-radius: var(--r-m); box-shadow: 6px 6px 0 var(--ink); overflow: hidden; }
.record-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; background: var(--navy); color: #fff; }
.record-t { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #fff; }
.record-n { font-size: 12px; color: #C3CEEE; }
.rec-list { list-style: none; margin: 0; padding: 6px 16px; }
.rec {
  display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; grid-template-areas: "n name pct" ". meter meter" ". sub sub";
  column-gap: 10px; row-gap: 5px; padding: 11px 0; border-bottom: 1px solid var(--hair);
}
.rec:last-child { border-bottom: 0; }
.rec-n { grid-area: n; font-size: 12px; font-weight: 700; color: var(--blue-ink); padding-top: 2px; }
.rec-name { grid-area: name; font-family: var(--f-display); font-weight: 700; font-size: 15px; letter-spacing: -.01em; line-height: 1.25; }
.rec-pct { grid-area: pct; font-size: 14px; font-weight: 700; }
.rec-meter { grid-area: meter; display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; }
.rec-meter i { height: 8px; border-radius: 2px; background: var(--bg-2); }
.rec-meter i.on { background: var(--blue); }
.rec-sub { grid-area: sub; font-size: 11.5px; color: var(--ink-3); }
.rec.none .rec-name, .rec.none .rec-pct { color: var(--ink-3); }
.rec-tag { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 5px; background: var(--ink); color: #fff; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; vertical-align: 2px; }
.rec.weak .rec-meter i.on { background: var(--ink); }
.rec-foot { padding: 14px 16px 16px; border-top: 2px solid var(--ink); background: var(--bg); font-size: 15px; color: var(--ink-2); display: grid; gap: 12px; }
.rec-foot strong { color: var(--ink); }
.rec-go { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.rec-link { font-size: 14px; color: var(--blue-ink); text-underline-offset: 3px; min-height: 44px; display: inline-flex; align-items: center; }
/* laptops: the header fits the first screen, and the record stays clear of the section rail */
@media (min-width: 1000px) and (max-height: 900px) { .rec { padding: 7px 0; row-gap: 4px; } .rec-sub { display: none; } .rec-foot { padding: 12px 16px; } }
@media (min-width: 1000px) and (max-height: 620px) { .rec { padding: 5px 0; } .rec-name { font-size: 14px; } .rec-foot { font-size: 14px; padding: 10px 16px; } }
@media (min-width: 1000px) { .pt-wrap { padding-top: clamp(40px, calc(7 * var(--svh)), 88px); padding-bottom: clamp(48px, calc(8 * var(--svh)), 96px); } }
@media (min-width: 1360px) { main > .band > .wrap { padding-right: max(var(--gutter), calc(200px - (calc(100 * var(--vw)) - var(--max)) / 2)); } }

/* ---------- mode switch ---------- */
.modes { display: grid; gap: 12px; margin-bottom: 40px; }
@media (min-width: 640px) { .modes { grid-template-columns: 1fr 1fr; gap: 16px; } }
.mode {
  position: relative; display: grid; grid-template-columns: auto 1fr; grid-template-areas: "led name" "led desc"; column-gap: 14px; row-gap: 4px;
  text-align: left; padding: 16px 18px; min-height: 44px; border-radius: var(--r-m); border: 2px solid var(--ink); background: var(--card);
  box-shadow: 4px 4px 0 var(--ink);
}
.mode:hover { background: var(--bg); }
.mode:active { box-shadow: 1px 1px 0 var(--ink); }
.mode-led { grid-area: led; width: 18px; height: 18px; margin-top: 3px; border-radius: 50%; border: 2px solid var(--ink); background: var(--bg-2); transition: background-color .25s; }
.mode-name { grid-area: name; font-family: var(--f-display); font-weight: 800; font-size: 19px; letter-spacing: -.02em; }
.mode-desc { grid-area: desc; font-size: 15px; color: var(--ink-2); line-height: 1.45; }
.mode[aria-checked="true"] { background: var(--navy); color: #fff; box-shadow: 4px 4px 0 var(--blue); }
.mode[aria-checked="true"] .mode-desc { color: #C9D4F4; }
.mode[aria-checked="true"] .mode-led { background: var(--led); border-color: #fff; }
.mode[aria-checked="true"]:focus-visible { outline-color: var(--blue); }

/* ---------- the tests, by domain ---------- */
.doms { display: grid; gap: 34px; }
.dom-head { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; row-gap: 2px; align-items: baseline; padding-bottom: 12px; margin-bottom: 14px; border-bottom: 2px solid var(--ink); }
.dom-n { grid-row: span 2; align-self: center; font-size: 13px; font-weight: 700; background: var(--blue); color: #fff; padding: 5px 8px; border-radius: 6px; }
.dom-name { font-size: clamp(20px, calc(2.6 * var(--vw)), 24px); font-weight: 800; letter-spacing: -.02em; }
.dom-w { font-size: 12px; color: var(--ink-3); }
@media (min-width: 760px) { .dom-head { grid-template-columns: auto 1fr auto; } .dom-n { grid-row: auto; } }
.dom-mix .dom-n { background: var(--ink); }
.tcards { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
@media (min-width: 760px) { .tcards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; } }
.tcard { display: flex; flex-direction: column; gap: 12px; padding: 16px; background: var(--card); border: 2px solid var(--ink); border-radius: var(--r-m); box-shadow: 4px 4px 0 var(--ink); }
.tcard[data-state="run"] { box-shadow: 4px 4px 0 var(--blue); }
.tcard[data-state="done"] { background: var(--bg); }
.tcard-mix { grid-column: 1 / -1; }
@media (min-width: 760px) {
  .tcard-mix { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); column-gap: 32px; align-items: start; }
  .tcard-mix .tc-top { grid-column: 1; }
  .tcard-mix .tc-desc { grid-column: 1; }
  .tcard-mix .tc-body { grid-column: 2; grid-row: 1 / span 2; }
}
.tc-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.tc-name { font-family: var(--f-display); font-weight: 800; font-size: 20px; letter-spacing: -.02em; }
.tc-q { font-size: 12px; color: var(--ink-3); }
.tc-desc { font-size: 15px; color: var(--ink-2); }
.tc-body { display: grid; gap: 10px; flex: 1; align-content: start; }
.tc-pips { display: flex; gap: 3px; }
.tc-pips i { flex: 1; height: 10px; border-radius: 2px; background: var(--bg-2); border: 1px solid var(--hair); }
.tc-pips i.hit { background: var(--led); border-color: #0E9B55; }
.tc-pips i.bad { background: #FBE1DE; border-color: var(--miss); }
.tc-pips i.ans { background: var(--blue); border-color: var(--blue-ink); }
.tc-status { font-size: 14px; color: var(--ink-2); min-height: 2.9em; }
.tc-chip { display: inline-block; padding: 1px 6px; margin-right: 4px; border-radius: 5px; background: var(--blue); color: #fff; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; vertical-align: 1px; }
.tc-score { font-weight: 700; font-size: 15px; color: var(--ink); margin-right: 2px; }
.tc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-top: auto; }
.tc-alt { font-size: 13.5px; }

/* ---------- study list ---------- */
.saved-empty { max-width: 640px; padding: 22px; border: 2px dashed var(--ink-3); border-radius: var(--r-m); background: var(--bg); color: var(--ink-2); display: grid; gap: 8px; }
.se-t { font-family: var(--f-display); font-weight: 800; font-size: 20px; color: var(--ink); letter-spacing: -.02em; }
.tool-mini { display: inline-flex; align-items: center; gap: 5px; padding: 0 7px; border: 1.5px solid var(--ink); border-radius: 6px; background: var(--card); font-size: 13px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.tool-mini i { width: 8px; height: 10px; background: var(--blue); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 72%, 0 100%); }
.saved-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-bottom: 18px; }
.saved-n { font-family: var(--f-display); font-weight: 800; font-size: 20px; letter-spacing: -.02em; }
.saved-n .mono { color: var(--blue); }
.saved-go { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; }

/* ---------- a question, shared by the test, the review and the study list ---------- */
.exh { margin: 0; border: 2px solid var(--ink); border-radius: var(--r-s); overflow: hidden; background: #050D2E; }
.exh figcaption { padding: 6px 12px; background: var(--navy); color: #9DB4FF; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; border-bottom: 1px solid #22357D; }
.exh pre { margin: 0; padding: 12px 14px; color: #DCE5FF; font-size: 12.5px; line-height: 1.55; overflow-x: auto; white-space: pre; --sb-thumb: #3A4F99; }
.exh pre::-webkit-scrollbar { height: 8px; }
.exh pre::-webkit-scrollbar-track { background: transparent; }
.exh pre::-webkit-scrollbar-thumb { background: #3A4F99; border-radius: 4px; }
.exh pre:focus-visible { outline-color: var(--led); outline-offset: -3px; }
@media (min-width: 760px) { .exh pre { font-size: 13px; } }

.qb-opts { display: grid; gap: 12px; }
.ans { display: grid; gap: 0; }
.opt-t { min-width: 0; overflow-wrap: anywhere; padding-top: 1px; }
.qb-opts .opt { width: 100%; line-height: 1.45; }
.opt[aria-pressed="true"] { background: var(--blue-wash); border-color: var(--blue); box-shadow: 3px 3px 0 var(--blue); }
.opt[aria-pressed="true"] .opt-l { background: var(--blue); color: #fff; }
.opt-shown { cursor: default; }
.opt-shown:hover { background: var(--card); }
/* after the answer: right options go green, your wrong pick gets a red outline, the rest step back */
.ans[data-s="hit"] .opt, .ans[data-s="hit"] .opt:hover { background: var(--led-wash); }
.ans[data-s="hit"] .opt-l, .ans[data-s="miss"] .opt-l { background: var(--led); color: var(--ink); }
.ans[data-s="miss"] .opt, .ans[data-s="miss"] .opt:hover { background: var(--card); border-style: dashed; border-color: #0E9B55; box-shadow: 3px 3px 0 var(--led); }
.ans[data-s="bad"] .opt, .ans[data-s="bad"] .opt:hover { border-color: var(--miss); box-shadow: 3px 3px 0 var(--miss); }
.ans[data-s="bad"] .opt-l { background: #FBE1DE; color: var(--miss); }
.ans[data-s="other"] .opt { color: var(--ink-2); box-shadow: none; border-color: var(--hair); }
.ans-why { margin: 0 0 0 19px; padding: 10px 0 4px 18px; border-left: 2px solid var(--hair); font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.ans[data-s="hit"] .ans-why, .ans[data-s="miss"] .ans-why { border-left-color: var(--led); color: var(--ink); }
.ans[data-s="bad"] .ans-why { border-left-color: var(--miss); }
.why-k { display: block; margin-bottom: 2px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--blue-ink); }
.ans[data-s="bad"] .why-k { color: var(--miss); }
.ans[data-s="hit"] .why-k, .ans[data-s="miss"] .why-k { color: #0B7A43; }

/* small toggles: flag and save */
.tool {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: var(--r-s);
  border: 1.5px solid var(--ink); background: var(--card); font-family: var(--f-display); font-weight: 700; font-size: 14px; white-space: nowrap;
}
.tool:hover { background: var(--bg-2); }
.tool i { width: 10px; height: 13px; flex: none; border: 1.5px solid var(--ink); }
.tool-save i { border-bottom: 0; clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 72%, 0 100%); background: var(--card); box-shadow: inset 0 -4px 0 -2px var(--ink); }
[data-flag] i { width: 10px; height: 14px; border: 0; border-left: 2px solid currentColor; background: linear-gradient(currentColor, currentColor) 0 1px / 8px 6px no-repeat; }
.tool[aria-pressed="true"] { background: var(--ink); color: #fff; }
.tool-save[aria-pressed="true"] i { background: var(--led); border-color: var(--led); box-shadow: none; }
[data-flag][aria-pressed="true"] i { background-image: linear-gradient(#FFB020, #FFB020); }

/* ---------- the test ---------- */
.run-view { min-height: calc(calc(100 * var(--svh)) - var(--tb, 64px)); background: var(--bg); border-top: 2px solid var(--ink); padding-bottom: 72px; }
.run-strip { position: sticky; top: var(--tb, 64px); z-index: 20; background: var(--navy); color: #fff; }
.run-strip-in { max-width: var(--max); margin: 0 auto; padding: 6px var(--gutter); min-height: 56px; display: flex; align-items: center; gap: 10px 14px; }
.run-exit { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px 0 8px; border-radius: var(--r-s); border: 1.5px solid #fff; background: transparent; color: #fff; font-family: var(--f-display); font-weight: 700; font-size: 14px; white-space: nowrap; }
.run-exit:hover { background: var(--navy-2); }
.run-exit svg, .qb-prev svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.run-strip :focus-visible { outline-color: var(--led); }
.run-name { flex: 1; min-width: 0; font-family: var(--f-display); font-weight: 800; font-size: 16px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.run-mode { padding: 4px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: var(--led); color: var(--ink); white-space: nowrap; }
.run-mode[data-m="study"] { background: #fff; }
.run-clock { font-size: 13px; color: #C3CEEE; min-width: 4ch; text-align: right; }
@media (max-width: 560px) {
  .run-strip-in { flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
  .run-exit span { display: none; }
  .run-exit { padding: 0 10px; }
  .run-name { font-size: 15px; }
}
@media (max-width: 380px) { .run-clock { display: none; } }
.run-pips { position: sticky; top: calc(var(--tb, 64px) + 56px); z-index: 19; display: flex; gap: 2px; height: 5px; background: var(--navy); padding: 0 0 1px; }
.run-pips i { flex: 1; background: #22357D; transition: background-color .3s; }
.run-pips i.ans { background: var(--blue); }
.run-pips i.hit { background: var(--led); }
.run-pips i.bad { background: var(--miss); }
.run-pips i.cur { background: #fff; }
@media (max-width: 560px) { .run-pips { position: static; } }

.run-grid { max-width: var(--max); margin: 0 auto; padding: 24px var(--gutter) 0; display: grid; gap: 24px; }
@media (min-width: 1000px) { .run-grid { grid-template-columns: minmax(0, 1fr) 300px; gap: 36px; align-items: start; padding-top: 36px; } }

.qbox { min-width: 0; background: var(--card); border: 2px solid var(--ink); border-radius: var(--r-m); box-shadow: 6px 6px 0 var(--ink); padding: 18px; display: grid; gap: 18px; scroll-margin-top: calc(var(--tb, 64px) + 72px); }
@media (min-width: 760px) { .qbox { padding: 28px; gap: 20px; } }
.qb-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.qb-head .tag { text-transform: none; letter-spacing: .01em; font-size: 12px; font-weight: 500; max-width: 100%; }
.qb-n { font-size: 12px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; }
.qb-stem { font-family: var(--f-body); font-weight: 700; font-size: 19px; line-height: 1.45; letter-spacing: 0; }
.qb-stem:focus { outline: none; }
.qb-stem:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
@media (min-width: 760px) { .qb-stem { font-size: 21px; } }
.qb-need { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--blue-ink); margin-bottom: -6px; }
.qb-need:empty { display: none; }
.qb-need.warn { color: var(--ink); }
.qb-verdict:empty { display: none; }
.qb-verdict { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 12px 14px; border-radius: var(--r-s); background: var(--bg); border: 1.5px solid var(--hair); font-size: 15px; color: var(--ink-2); }
.vd { padding: 4px 9px; border-radius: 6px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.vd-ok { background: var(--led); color: var(--ink); }
.vd-no { background: #FBE1DE; color: var(--miss); border: 1.5px solid var(--miss); }
.qb-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding-top: 16px; border-top: 1px solid var(--hair); }
.qb-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.qb-nav { display: flex; gap: 10px; margin-left: auto; }
.qb-prev { width: 50px; padding: 0; flex: none; }
@media (max-width: 640px) {
  .qb-foot { flex-direction: column-reverse; align-items: stretch; }
  .qb-nav { margin-left: 0; }
  .qb-nav .btn:not(.qb-prev) { flex: 1; padding-left: 12px; padding-right: 12px; }
  .qb-tools .tool { flex: 1; justify-content: center; }
}

.run-side { display: grid; gap: 12px; }
@media (min-width: 1000px) { .run-side { position: sticky; top: calc(var(--tb, 64px) + 80px); } }
.side-card { background: var(--card); border: 2px solid var(--ink); border-radius: var(--r-m); padding: 16px; display: grid; gap: 14px; }
.side-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.side-t { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.side-n { font-size: 12px; color: var(--ink-3); }
.map { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; }
@media (min-width: 1000px) { .map { grid-template-columns: repeat(5, 1fr); } }
.tile { position: relative; width: 100%; min-height: 44px; border-radius: 8px; border: 1.5px solid var(--ink); background: var(--card); font-size: 14px; font-weight: 700; }
.tile:hover { background: var(--bg-2); }
.tile[data-s="ans"] { background: var(--blue); border-color: var(--blue-ink); color: #fff; }
.tile[data-s="hit"] { background: var(--led); color: var(--ink); }
.tile[data-s="bad"] { background: #FBE1DE; border-color: var(--miss); color: var(--miss); }
.tile.cur { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--ink); }
.tile.flag::after { content: ""; position: absolute; right: -1px; top: -1px; width: 0; height: 0; border-top: 13px solid #FFB020; border-left: 13px solid transparent; border-top-right-radius: 7px; }
.map-key { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 11.5px; color: var(--ink-2); }
.map-key li { display: inline-flex; align-items: center; gap: 6px; }
.map-key i { width: 12px; height: 12px; border-radius: 3px; border: 1.5px solid var(--ink); }
.map-key .k-hit { background: var(--led); }
.map-key .k-bad { background: #FBE1DE; border-color: var(--miss); }
.map-key .k-ans { background: var(--blue); border-color: var(--blue-ink); }
.map-key .k-flag { background: linear-gradient(225deg, #FFB020 45%, var(--card) 46%); }
.map-key .k-cur { box-shadow: 0 0 0 1.5px var(--card), 0 0 0 3px var(--ink); }
.side-go { width: 100%; }
.side-go.armed, [data-finish-q].armed { background: var(--ink); }
.side-note { font-size: 13.5px; color: var(--ink-2); line-height: 1.45; }
.side-keys { font-size: 11px; color: var(--ink-3); letter-spacing: .02em; padding: 0 4px; }
@media (hover: none), (max-width: 999px) { .side-keys { display: none; } }

/* ---------- results ---------- */
.res { max-width: var(--max); margin: 0 auto; padding: 28px var(--gutter) 0; display: grid; gap: 24px; }
@media (min-width: 1000px) { .res { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 36px; align-items: start; padding-top: 40px; } }
.res-card, .res-objs { background: var(--card); border: 2px solid var(--ink); border-radius: var(--r-m); padding: 20px; }
.res-card { box-shadow: 6px 6px 0 var(--blue); display: grid; gap: 12px; align-content: start; }
@media (min-width: 760px) { .res-card, .res-objs { padding: 26px; } }
.res-k { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }
.res-score { display: flex; align-items: baseline; gap: 10px; line-height: 1; }
.res-n { font-family: var(--f-display); font-weight: 800; font-size: clamp(76px, calc(18 * var(--vw)), 112px); letter-spacing: -.05em; color: var(--blue); font-variant-numeric: tabular-nums; }
.res-n:focus { outline: none; }
.res-of { font-size: 24px; font-weight: 700; color: var(--ink-3); }
.res-meta { font-size: 13px; color: var(--ink-2); }
.res-pips { display: flex; gap: 3px; }
.res-pips i { flex: 1; height: 14px; border-radius: 3px; border: 1.5px solid var(--ink); }
.res-pips i.hit { background: var(--led); }
.res-pips i.bad { background: #FBE1DE; border-color: var(--miss); }
.res-pips i.skip { background: var(--bg-2); border-color: var(--ink-3); }
.res-line { font-size: 17px; }
.res-best { font-size: 12.5px; color: var(--ink-3); }
.res-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 6px; }
@media (max-width: 480px) { .res-actions .btn { flex: 1 1 100%; } }
.res-saveall { font-size: 14.5px; white-space: normal; text-align: left; }
.res-saveall:disabled { text-decoration: none; opacity: 1; color: #0B7A43; font-weight: 700; }
.obj-rows { list-style: none; margin: 14px 0 0; padding: 0; border-top: 2px solid var(--ink); }
.orow { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; grid-template-areas: "id name s" ". pips pips"; column-gap: 10px; row-gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--hair); }
.orow-id { grid-area: id; font-size: 12px; font-weight: 700; color: var(--blue-ink); padding-top: 2px; }
.orow-name { grid-area: name; font-size: 15px; line-height: 1.35; }
.orow-s { grid-area: s; font-size: 13px; font-weight: 700; }
.orow.short .orow-s { color: var(--miss); }
.orow-pips { grid-area: pips; display: flex; gap: 3px; }
.orow-pips i { width: 18px; height: 8px; border-radius: 2px; background: var(--led); }
.orow-pips i.bad { background: var(--miss); }

/* ---------- review + study list entries ---------- */
.review { max-width: var(--max); margin: 0 auto; padding: 40px var(--gutter) 0; }
.rv-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-bottom: 18px; }
.rv-title { font-size: clamp(30px, calc(6 * var(--vw)), 44px); }
.seg { display: inline-flex; border: 2px solid var(--ink); border-radius: var(--r-s); overflow: hidden; background: var(--card); }
.seg-b { min-height: 44px; padding: 0 16px; border: 0; background: transparent; font-family: var(--f-display); font-weight: 700; font-size: 15px; display: inline-flex; align-items: center; gap: 8px; }
.seg-b + .seg-b { border-left: 2px solid var(--ink); }
.seg-b .mono { font-size: 12px; }
.seg-b[aria-pressed="true"] { background: var(--ink); color: #fff; }
.seg-b:disabled { color: var(--ink-3); cursor: default; }
.seg-b:focus-visible { outline-offset: -5px; }

.rq-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.rq { position: relative; background: var(--card); border: 2px solid var(--ink); border-radius: var(--r-m); overflow: hidden; transition: opacity .25s, transform .25s; }
.rq::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--hair); }
.rq[data-s="hit"]::before { background: var(--led); }
.rq[data-s="bad"]::before { background: var(--miss); }
.rq[data-s="skip"]::before { background: var(--ink-3); }
.rq[data-s="saved"]::before { background: var(--blue); }
.rq.gone { opacity: 0; transform: translateX(24px); }
.rq summary { list-style: none; cursor: pointer; display: grid; gap: 8px; padding: 14px 16px 14px 22px; min-height: 44px; }
.rq summary::-webkit-details-marker { display: none; }
.rq summary:hover { background: var(--bg); }
.rq summary:focus-visible { outline-offset: -4px; }
.rq-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.rq-n { font-size: 12px; font-weight: 700; }
.rq-badge { padding: 2px 7px; border-radius: 5px; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: var(--bg-2); color: var(--ink-2); }
.rq[data-s="hit"] .rq-badge { background: var(--led-wash); color: #0B7A43; }
.rq[data-s="bad"] .rq-badge { background: #FBE1DE; color: var(--miss); }
.rq-from { font-size: 11.5px; font-weight: 700; color: var(--blue-ink); letter-spacing: .02em; }
.rq-obj { font-size: 11.5px; color: var(--ink-3); }
.rq-chev { margin-left: auto; width: 10px; height: 10px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg) translate(-2px, -2px); transition: transform .25s var(--ease-out); }
.rq details[open] .rq-chev { transform: rotate(225deg) translate(-2px, -2px); }
.rq-stem { font-weight: 700; font-size: 16.5px; line-height: 1.45; }
.rq-body { display: grid; gap: 14px; padding: 4px 16px 16px 22px; }
.rq-body .qb-opts { gap: 10px; }
.rq-body .opt { min-height: 0; padding: 10px 12px; font-size: 15px; }
.rq-body .ans-why { font-size: 14.5px; }
.rq-tools { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 12px; border-top: 1px solid var(--hair); }
@media (min-width: 760px) { .rq summary { padding: 16px 22px 16px 28px; } .rq-body { padding: 4px 22px 20px 28px; } .rq-stem { font-size: 17.5px; } }

/* =========================================================
   Motion on this page. Each section has its own entrance (none from the home page reused):
     header      the title tunes in from a slant; your record's LED segments light up one by one
     pick a test test cards swing in from their left edge like rack doors; the mode switches power on
     study list  each saved question's status strip blinks like a port light, then the card fades up
     the test    a new question slides across; a checked answer's explanations draw down; your score counts up
                 and the results pips light in order
   Restored state never animates: re-rendering a list adds .settled so nothing replays.
   ========================================================= */
@media (prefers-reduced-motion: no-preference) {
  /* ----- header: tune in + LEDs light ----- */
  .fx-tune .pt-head.in .pt-copy > * { animation: tune .9s var(--ease-out) backwards; }
  .fx-tune .pt-head.in .pt-copy > :nth-child(2) { animation-delay: .07s; }
  .fx-tune .pt-head.in .pt-copy > :nth-child(3) { animation-delay: .14s; }
  .fx-tune .pt-head.in .pt-copy > :nth-child(4) { animation-delay: .21s; }
  @keyframes tune { from { opacity: 0; transform: skewX(-9deg) translateX(-18px); filter: blur(3px); } }
  .fx-tune .pt-head.in .record { animation: plug .7s var(--ease-out) .15s backwards; }
  @keyframes plug { from { opacity: 0; transform: translateY(18px); } }
  .fx-tune .pt-head.in .rec-list:not(.settled) .rec-meter i.on { animation: ledon .4s steps(1) backwards; animation-delay: calc(.5s + var(--k, 0) * .045s); }
  @keyframes ledon { 0% { background: var(--bg-2); } 50% { background: var(--led); } }

  /* ----- pick a test: rack doors + power on ----- */
  .fx-slot .modes.in .mode { animation: fadein .6s ease backwards; }
  .fx-slot .modes.in .mode-led { animation: power .9s steps(1) .3s backwards; }
  @keyframes power { 0% { background: var(--bg-2); } 30% { background: var(--led); } 55% { background: var(--bg-2); } }
  .fx-slot .doms.in .tcards { perspective: 1100px; }
  .fx-slot .doms.in .tcard { transform-origin: 0 50%; animation: door .75s var(--ease-out) backwards; }
  .fx-slot .doms.in .tcard:nth-child(2) { animation-delay: .09s; }
  .fx-slot .doms.in .tcard:nth-child(3) { animation-delay: .18s; }
  @keyframes door { from { opacity: 0; transform: rotateY(-62deg); } }
  .fx-slot .head-row.in { animation: fadein .7s ease backwards; }

  /* ----- study list: port blink + fade up ----- */
  .fx-file .head-row.in .copy { animation: fadein .7s ease backwards; }
  .fx-file .head-row.in .ex-lede { animation: fadein .7s ease .15s backwards; }
  .fx-file .saved.in:not(.settled) .rq::before { animation: portblink .7s steps(1) backwards; animation-delay: calc(var(--k, 0) * .06s); }
  @keyframes portblink { 0% { background: var(--hair); } 25% { background: var(--led); } 50% { background: var(--hair); } 75% { background: var(--led); } }
  .fx-file .saved.in:not(.settled) .rq > details { animation: fileup .55s var(--ease-out) backwards; animation-delay: calc(.25s + var(--k, 0) * .06s); }
  @keyframes fileup { from { opacity: 0; transform: translateY(10px); } }
  .fx-file .saved.in:not(.settled) .saved-empty, .fx-file .saved.in:not(.settled) .saved-bar { animation: fileup .55s var(--ease-out) backwards; }

  /* ----- the test ----- */
  .qbox.swap { animation: qswap .4s var(--ease-out); }
  @keyframes qswap { from { opacity: 0; transform: translateX(28px); } }
  .qbox.checked .ans-why { animation: drawdown .45s var(--ease-out) backwards; transform-origin: 0 0; }
  .qbox.checked .ans:nth-child(2) .ans-why { animation-delay: .06s; }
  .qbox.checked .ans:nth-child(3) .ans-why { animation-delay: .12s; }
  .qbox.checked .ans:nth-child(4) .ans-why { animation-delay: .18s; }
  .qbox.checked .ans:nth-child(5) .ans-why { animation-delay: .24s; }
  @keyframes drawdown { from { opacity: 0; clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
  .qbox.checked .qb-verdict { animation: verdict .45s var(--ease-spring); }
  @keyframes verdict { from { opacity: 0; transform: scale(.94); } }
  .qb-need.warn { animation: nudge .3s; }
  .tool.pop i { animation: popi .4s var(--ease-spring); }
  @keyframes popi { 50% { transform: scale(1.5); } }
  .run-view.graded .res-pips i { animation: ledon2 .35s steps(1) backwards; animation-delay: calc(.2s + var(--k, 0) * .035s); }
  @keyframes ledon2 { from { opacity: 0; } }
  .run-view.graded .orow { animation: fileup .5s var(--ease-out) backwards; animation-delay: calc(.35s + var(--k, 0) * .05s); }
  .run-view.graded .res-card { animation: plug .6s var(--ease-out) backwards; }
}
