.typing-shell { width: min(1060px, calc(100% - 32px)); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.test-card { overflow: hidden; border: 3px solid var(--ink); background: var(--panel); box-shadow: 10px 10px 0 var(--shadow); }
.test-heading { display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: end; padding: 30px 34px; border-bottom: 3px solid var(--ink); }
.test-heading .eyebrow { margin-bottom: 10px; }
.test-heading h1 { max-width: 780px; font-size: clamp(2.4rem, 7vw, 5rem); line-height: .94; }
.lede { max-width: 690px; margin: 18px 0 0; color: var(--muted); font-size: 1rem; line-height: 1.6; }
.progress-box { min-width: 150px; padding: 16px; border: 2px solid var(--line); background: #171220; text-align: center; }
.progress-box > span, .stat > span { display: block; margin-bottom: 7px; color: var(--muted); font-size: .78rem; font-weight: 800; letter-spacing: .1em; }
.progress-box strong { color: var(--gold); font-size: 1.6rem; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 3px solid var(--ink); }
.stat { min-width: 0; padding: 18px 16px; border-right: 2px solid var(--line); text-align: center; }
.stat:last-child { border-right: 0; }
.stat strong { font-size: clamp(1.05rem, 3vw, 1.65rem); }
.test-stage { min-height: 610px; padding: 36px 34px 30px; background: linear-gradient(rgba(88,199,215,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(88,199,215,.025) 1px, transparent 1px), radial-gradient(circle at 50% 28%, #29213b 0, transparent 55%); background-size: 24px 24px, 24px 24px, auto; }
.prompt-panel { display: flex; min-height: 390px; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.stage-kicker, .section-kicker { margin: 0 0 12px; color: var(--gold); font-size: .78rem; font-weight: 800; letter-spacing: .14em; }
.word-frame { display: grid; width: min(600px, 100%); min-height: 142px; place-items: center; margin-bottom: 18px; padding: 20px; overflow: hidden; border: 3px solid var(--ink); background: #171220; box-shadow: 8px 8px 0 var(--shadow); }
.word-frame span { max-width: 100%; overflow-wrap: anywhere; color: var(--blue); font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: clamp(3.1rem, 10vw, 6.5rem); font-weight: 900; letter-spacing: .06em; line-height: 1; text-shadow: 4px 4px 0 var(--blue-dark); }
.prompt-panel h2 { margin: 0; font-size: clamp(1.45rem, 4vw, 2.5rem); letter-spacing: -.04em; }
.prompt-panel > p:not(.stage-kicker, .sr-only) { max-width: 680px; min-height: 45px; margin: 12px 0 14px; color: var(--muted); font-size: .95rem; line-height: 1.55; }
.deadline-track { width: min(600px, 100%); height: 9px; margin-bottom: 15px; overflow: hidden; border: 2px solid var(--line); background: #0c0912; }
.deadline-track[hidden] { display: none; }
.deadline-fill { display: block; width: 100%; height: 100%; transform-origin: left center; background: var(--blue); }
.deadline-fill.is-danger { background: var(--red); }
.result-flash { display: flex; min-height: 42px; margin-bottom: 15px; flex-direction: column; align-items: center; justify-content: center; }
.result-flash[hidden] { display: none; }
.result-flash strong { font-size: 1.55rem; }
.result-flash span { color: var(--muted); font-size: .82rem; }
.typing-form { width: min(700px, 100%); margin: 20px auto 0; }
.typing-form > label { display: block; margin-bottom: 8px; color: var(--gold); font-size: .78rem; font-weight: 800; letter-spacing: .12em; }
.input-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.input-row input, .input-row button { min-height: 62px; border: 3px solid var(--ink); border-radius: 0; font: inherit; }
.input-row input { min-width: 0; padding: 10px 16px; background: #171220; box-shadow: inset 0 0 0 2px var(--line); color: var(--ink); font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: clamp(1.35rem, 5vw, 2rem); font-weight: 800; letter-spacing: .08em; text-transform: lowercase; }
.input-row input:focus { outline: 4px solid var(--blue); outline-offset: 2px; }
.input-row input:disabled { opacity: .5; cursor: not-allowed; }
.input-row button { padding: 10px 22px; background: var(--gold); box-shadow: 5px 5px 0 var(--shadow); color: #171220; cursor: pointer; font-size: .86rem; font-weight: 900; letter-spacing: .07em; }
.input-row button:not(:disabled):active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--shadow); }
.input-row button:focus-visible { outline: 4px solid var(--blue); outline-offset: 3px; }
.input-row button:disabled { cursor: default; opacity: .5; }
.typing-form p { margin: 14px 0 0; color: var(--muted); font-size: .84rem; line-height: 1.5; text-align: center; }
.test-stage[data-state="countdown"] .word-frame { animation: ready-pulse 650ms steps(2, end) infinite; }
.test-stage[data-state="active"] .word-frame { border-color: var(--blue); transform: scale(1.015); }
.test-stage[data-state="active"] .primary-button, .test-stage[data-state="feedback"] .primary-button, .test-stage[data-state="countdown"] .primary-button { visibility: hidden; }
.test-stage[data-state="game-over"] { background-color: #351521; }
.test-stage[data-state="complete"] { background-color: #2d2515; }
.test-stage[data-state="cancelled"] { background-color: #241a31; }
.content-section { display: grid; grid-template-columns: .85fr 1.6fr; gap: 64px; padding: 76px 18px 58px; }
.content-section h2, .info-panel h2, .faq-section h2, .related-section h2 { margin: 0; font-size: clamp(1.8rem, 4vw, 3rem); line-height: 1.08; letter-spacing: -.05em; }
.steps-list { margin: 0; padding: 0; border-top: 2px solid var(--line); list-style: none; }
.steps-list li { display: grid; grid-template-columns: 54px 1fr; gap: 18px; padding: 20px 0; border-bottom: 2px solid var(--line); }
.steps-list span { color: var(--gold); font-weight: 800; }
.steps-list p, .info-panel p, .faq-list p { margin: 0; color: var(--muted); font-size: 1rem; line-height: 1.7; }
.reading-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.info-panel { padding: 30px; border: 2px solid var(--line); background: var(--panel); }
.info-panel h2 { margin-bottom: 22px; }
.info-panel > p:not(.section-kicker) + p { margin-top: 16px; }
.faq-section, .related-section { padding: 72px 18px 0; }
.faq-list { margin-top: 28px; border-top: 2px solid var(--line); }
.faq-list details { border-bottom: 2px solid var(--line); }
.faq-list summary { padding: 22px 44px 22px 0; color: var(--ink); cursor: pointer; font-size: 1.05rem; font-weight: 800; line-height: 1.4; }
.faq-list details p { max-width: 850px; padding: 0 0 24px; }
.related-links { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 28px; }
.related-links a { display: flex; min-height: 118px; flex-direction: column; justify-content: space-between; padding: 18px; border: 2px solid var(--line); background: var(--panel); color: var(--ink); font-weight: 800; line-height: 1.35; text-decoration: none; }
.related-links a:hover, .related-links a:focus-visible { border-color: var(--gold); outline: 0; }
.related-links small { color: var(--muted); font-size: .76rem; font-weight: 400; }
@keyframes ready-pulse { 0%, 49% { opacity: .45; } 50%, 100% { opacity: 1; } }
@media (max-width: 860px) { .test-heading { grid-template-columns: 1fr; } .progress-box { display: flex; align-items: center; justify-content: space-between; } .progress-box > span { margin: 0; } .related-links { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 650px) { .typing-shell { width: min(100% - 18px, 620px); padding-top: 10px; } .test-card { box-shadow: 6px 6px 0 var(--shadow); } .test-heading { gap: 20px; padding: 24px 18px; } .test-heading h1 { font-size: clamp(2.2rem, 12vw, 3.8rem); } .stats-grid { grid-template-columns: repeat(2, 1fr); } .stat:nth-child(2) { border-right: 0; } .stat:nth-child(-n + 2) { border-bottom: 2px solid var(--line); } .test-stage { min-height: 590px; padding: 28px 14px 24px; } .prompt-panel { min-height: 360px; } .word-frame { min-height: 106px; padding: 12px; } .word-frame span { font-size: clamp(2.4rem, 15vw, 4rem); } .input-row { grid-template-columns: minmax(0, 1fr); } .input-row button { min-height: 52px; } .content-section, .reading-grid { grid-template-columns: 1fr; } .content-section { gap: 30px; padding: 58px 8px 44px; } .info-panel { padding: 24px 20px; } .faq-section, .related-section { padding: 58px 8px 0; } .related-links { grid-template-columns: 1fr; } .related-links a { min-height: 92px; } }
@media (max-width: 390px) { .test-stage { padding-inline: 10px; } .word-frame { min-height: 94px; } .word-frame span { font-size: 2.2rem; } .input-row input { font-size: 1.25rem; } }
@media (prefers-reduced-motion: reduce) { .test-stage[data-state="countdown"] .word-frame { animation: none; } .word-frame, .deadline-fill, .input-row button { transition: none !important; } }
