:root {
  color-scheme: light;
  --paper: #f3f3f9;
  --card: #fff;
  --ink: #25273f;
  --muted: #505670;
  --rule: #d8dbea;
  --accent: #30498d;
  font: 16px/1.55 "Avenir Next", "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, p { margin: 0; }
[hidden] { display: none !important; }
a { color: var(--accent); text-underline-offset: .2em; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #536ec7; outline-offset: 3px; }
.frame { width: min(61rem, calc(100% - 2rem)); margin-inline: auto; }
.skip { position: absolute; left: .6rem; top: .6rem; transform: translateY(-180%); padding: .65rem 1rem; background: white; }
.skip:focus { transform: none; }
.header, .footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .2rem 1rem; border-bottom: 1px solid var(--rule); padding-block: .6rem; }
.header nav, .downloads { display: flex; flex-wrap: wrap; align-items: center; gap: 0 .85rem; }
.header a, .footer a { display: inline-flex; align-items: center; min-height: 2.75rem; }
.header .brand { font-weight: 750; color: var(--ink); text-decoration: none; }
.intro { padding-block: clamp(1.6rem, 5vw, 3.5rem) 1.55rem; }
.eyebrow { color: var(--accent); font-size: .88rem; font-weight: 700; }
h1 { max-width: 15ch; font-size: clamp(2.2rem, 6.1vw, 4.35rem); line-height: 1.02; letter-spacing: -.049em; margin: .45rem 0 .8rem; text-wrap: balance; }
.intro > p:last-child { max-width: 57ch; color: var(--muted); font-size: 1.055rem; }
.exercise { max-width: 47rem; }
.steps { display: flex; flex-wrap: wrap; gap: .38rem; margin-bottom: .55rem; }
.steps button, .choice-list button, .next { min-height: 2.75rem; border: 1px solid var(--rule); border-radius: .38rem; padding: .45rem .72rem; background: var(--card); }
.steps button[aria-pressed="true"] { border-color: var(--ink); color: white; background: var(--ink); font-weight: 650; }
.steps button:hover:not(:disabled, [aria-pressed="true"]), .choice-list button:hover { background: #e8edff; }
.steps button:disabled { color: var(--muted); background: var(--paper); cursor: default; }
.record { border: 1px solid var(--rule); border-radius: .65rem; padding: clamp(.9rem, 3.1vw, 1.7rem); background: var(--card); }
.record-heading { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: .45rem .8rem; padding-bottom: .85rem; }
.record-heading > div > p { color: var(--muted); font-size: .875rem; }
.order-id, code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.order-id { font-size: 1.85rem; line-height: 1.1; letter-spacing: .045em; }
.state { padding: .35rem .55rem; color: #2e467f; background: #edf0fb; border-radius: .27rem; font-size: .86rem; font-weight: 650; }
table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: .98rem; }
th, td { padding: .62rem .25rem; border-top: 1px solid var(--rule); text-align: left; overflow-wrap: anywhere; }
th:first-child { width: 42%; }
thead { color: var(--muted); font-size: .875rem; }
tbody th { font-weight: 550; }
tbody td code { color: #25417d; }
.evidence { margin-top: .7rem; border-top: 1px solid var(--rule); padding-top: .75rem; }
.evidence p:first-child, .choices > p:first-child { font-weight: 700; }
.evidence p + p, .answer { color: var(--muted); }
.choices { margin-block: .85rem; }
.choice-list { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .55rem; }
.answer { margin-top: .65rem; padding-inline-start: .65rem; border-inline-start: 3px solid var(--accent); }
.answer:empty { margin: 0; padding: 0; border: 0; }
.repair { margin-top: 1rem; }
.repair h2 { font-size: 1.17rem; }
.repair p { color: var(--muted); }
.repair-inputs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .65rem; margin-block: .75rem; }
.repair-inputs label { display: grid; gap: .25rem; font-size: .9rem; font-weight: 650; }
.repair-inputs input { min-width: 0; min-height: 2.75rem; border: 1px solid #a8adc5; border-radius: .38rem; padding: .48rem .6rem; background: var(--card); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 1rem; }
.repair-inputs input[aria-invalid="true"] { border-color: #a83f43; }
.guard { display: flex; align-items: center; gap: .65rem; min-height: 2.75rem; width: fit-content; }
.guard input { width: 1.1rem; height: 1.1rem; margin: 0; accent-color: var(--accent); }
.repair .answer { border-color: #a83f43; }
.repair .next { margin-top: .65rem; }
.next { display: inline-flex; margin-top: .05rem; color: white; background: var(--accent); border-color: var(--accent); font-weight: 650; }
.next:hover { background: #243970; }
.caption, .detail, .no-script { margin-top: .6rem; font-size: .89rem; color: var(--muted); }
.reproduce { display: grid; grid-template-columns: minmax(0,.9fr) minmax(0,1.1fr); align-items: end; gap: 1rem 1.5rem; margin-top: 2.1rem; border-top: 1px solid var(--rule); padding-block: 1.2rem 1.8rem; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -.028em; margin-bottom: .32rem; }
.downloads { margin-top: .6rem; }
.downloads a { display: inline-flex; align-items: center; min-height: 2.75rem; font-weight: 650; }
pre { margin: 0; padding: .85rem; border-radius: .38rem; background: var(--ink); color: #fff; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .84rem; }
.footer { border-top: 1px solid var(--rule); border-bottom: 0; font-size: .9rem; }
@media (max-width: 41rem) { .reproduce { grid-template-columns: 1fr; } }
@media (max-width: 29rem) { .repair-inputs { grid-template-columns: 1fr; } }
