:root {
  --bg: #060a0f;
  --panel: #0a1118;
  --panel-2: #0d161f;
  --line: #1d2b36;
  --line-strong: #2b3d49;
  --text: #d8e2e7;
  --muted: #728591;
  --cyan: #54d6e8;
  --cyan-dim: #1d7480;
  --green: #72d6a4;
  --amber: #f0b85b;
  --red: #f26f68;
  --mono: "Cascadia Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 73% 20%, rgba(45, 105, 120, 0.09), transparent 34%),
    linear-gradient(180deg, #081018 0%, var(--bg) 38%, #05080c 100%);
  font-family: var(--sans);
  letter-spacing: 0.01em;
  overflow-x: hidden;
}

button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }

.app-shell {
  width: min(100%, 1920px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 28px;
  display: grid;
  grid-template-rows: 72px 1fr 38px;
}

.masthead {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.brand {
  width: max-content;
  display: flex;
  gap: 12px;
  align-items: center;
  color: inherit;
  text-decoration: none;
  text-transform: uppercase;
}

.brand-mark {
  width: 32px;
  height: 32px;
  padding: 6px;
  display: flex;
  gap: 3px;
  align-items: flex-end;
  border: 1px solid var(--cyan-dim);
  background: rgba(84, 214, 232, 0.04);
}

.brand-mark i { width: 4px; background: var(--cyan); box-shadow: 0 0 8px rgba(84,214,232,.35); }
.brand-mark i:nth-child(1) { height: 7px; }
.brand-mark i:nth-child(2) { height: 18px; }
.brand-mark i:nth-child(3) { height: 12px; }
.brand strong, .brand em { display: block; font-style: normal; line-height: 1.05; }
.brand strong { font-size: 13px; letter-spacing: .16em; }
.brand em { color: var(--cyan); font: 600 9px var(--mono); letter-spacing: .24em; margin-top: 4px; }

.program-id, .system-clock { text-transform: uppercase; }
.program-id { text-align: center; }
.system-clock { text-align: right; }
.program-id span, .system-clock span { display: block; color: var(--muted); font: 9px var(--mono); letter-spacing: .18em; }
.program-id strong, .system-clock strong { display: block; margin-top: 5px; font: 600 11px var(--mono); letter-spacing: .12em; }

main { min-height: 0; display: flex; align-items: center; }
.screen { display: none; width: 100%; min-height: calc(100vh - 110px); }
.screen.active { display: grid; animation: screenIn .45s ease both; }
@keyframes screenIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

.start-screen {
  grid-template-columns: minmax(0, 1.1fr) minmax(430px, .9fr);
  gap: clamp(48px, 8vw, 140px);
  align-items: center;
  padding: 7vh 5vw;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--cyan);
  font: 600 10px var(--mono);
  letter-spacing: .19em;
  text-transform: uppercase;
}
.eyebrow span { width: 28px; height: 1px; background: var(--cyan); }
.start-copy h1, .results-summary h1 {
  margin: 24px 0 18px;
  color: #e8eff2;
  font-size: clamp(44px, 5vw, 82px);
  font-weight: 430;
  line-height: .98;
  letter-spacing: -.055em;
}
.start-copy h1 span { color: var(--cyan); }
.start-copy > p {
  max-width: 590px;
  color: #8da0aa;
  font-size: clamp(15px, 1.2vw, 19px);
  line-height: 1.65;
}

.response-demo {
  max-width: 650px;
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line-strong);
  background: rgba(9, 17, 24, .62);
}
.response-demo > div { min-height: 112px; padding: 15px 16px; border-right: 1px solid var(--line); }
.response-demo > div:last-child { border-right: 0; }
.response-demo > div > span { color: var(--cyan); font: 600 11px var(--mono); letter-spacing: .1em; }
.response-demo p { margin: 9px 0 0; color: #9aabb2; font-size: 13px; line-height: 1.48; }
.response-demo p strong { color: #d1dde1; font-weight: 600; }
.response-demo p b { display: inline-flex; align-items: center; gap: 5px; color: var(--amber); font: 600 8px var(--mono); text-transform: uppercase; }
.response-demo p i { width: 17px; height: 17px; display: inline-grid; place-items: center; color: var(--amber); border: 1px solid rgba(240,184,91,.5); font-style: normal; }

.primary-button {
  min-width: 235px;
  margin-top: 28px;
  padding: 0;
  display: inline-flex;
  align-items: stretch;
  justify-content: space-between;
  color: #061015;
  border: 1px solid var(--cyan);
  background: var(--cyan);
  font: 700 11px var(--mono);
  letter-spacing: .13em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.primary-button span { padding: 16px 20px; }
.primary-button b { padding: 16px 18px; border-left: 1px solid rgba(6,16,21,.25); font-size: 15px; }
.primary-button:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(84,214,232,.16); background: #6fe3f2; }
.primary-button:focus-visible, .fault-button:focus-visible { outline: 2px solid white; outline-offset: 3px; }
.keyboard-note { margin-top: 18px !important; color: #556873 !important; font: 10px var(--mono) !important; letter-spacing: .05em; }

.briefing-panel { border: 1px solid var(--line-strong); background: rgba(9,17,24,.86); box-shadow: 0 30px 80px rgba(0,0,0,.32); }
.panel-kicker, .section-label { color: var(--muted); font: 600 9px var(--mono); letter-spacing: .16em; }
.panel-kicker { padding: 15px 18px; border-bottom: 1px solid var(--line); }
.briefing-visual { position: relative; height: 150px; overflow: hidden; border-bottom: 1px solid var(--line); background: #071018; }
.briefing-visual canvas { width: 100%; height: 100%; display: block; }
.preview-label { position: absolute; top: 13px; right: 15px; color: var(--cyan); font: 9px var(--mono); letter-spacing: .13em; }
.answer-order-title { height: 38px; padding: 0 14px; display: flex; align-items: center; justify-content: space-between; color: var(--muted); border-bottom: 1px solid var(--line); font: 600 10px var(--mono); letter-spacing: .13em; }
.answer-order-title b { color: var(--cyan); font-weight: 600; }
.answer-order ol { margin: 0; padding: 0; list-style: none; }
.answer-order li { min-height: 32px; display: grid; grid-template-columns: 42px 1fr; align-items: center; border-bottom: 1px solid rgba(29,43,54,.72); }
.answer-order li > span { height: 100%; display: grid; place-items: center; color: var(--cyan); border-right: 1px solid var(--line); font: 600 11px var(--mono); }
.answer-order li > strong { padding: 0 13px; color: #bdcbd0; font-size: 12px; font-weight: 600; letter-spacing: .025em; }
.briefing-note { padding: 18px; color: #a7b6bc; font-size: 14px; line-height: 1.45; }
.status-dot { width: 7px; height: 7px; margin-right: 10px; display: inline-block; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px rgba(114,214,164,.6); }

.game-screen { height: min(760px, calc(100vh - 110px)); min-height: 0; grid-template-rows: 54px minmax(0, 1fr); gap: 12px; padding: 14px 0; position: relative; }
.mission-strip { display: grid; grid-template-columns: 145px 1fr 115px; align-items: center; border: 1px solid var(--line); background: rgba(8,15,21,.76); }
.round-readout, .score-readout { height: 100%; padding: 8px 14px; display: flex; flex-direction: column; justify-content: center; }
.round-readout { border-right: 1px solid var(--line); }
.score-readout { border-left: 1px solid var(--line); text-align: right; }
.round-readout span, .score-readout span { color: var(--muted); font: 8px var(--mono); letter-spacing: .15em; }
.round-readout strong, .score-readout strong { margin-top: 4px; font: 600 15px var(--mono); }
.round-readout b { color: var(--cyan); font-weight: inherit; }
.round-track { padding: 0 20px; display: grid; grid-template-columns: repeat(10, 1fr); gap: 5px; }
.round-segment { height: 3px; background: #1e2e38; transition: background .25s, box-shadow .25s; }
.round-segment.complete.correct { background: var(--green); }
.round-segment.complete.wrong { background: var(--red); }
.round-segment.active { background: var(--cyan); box-shadow: 0 0 9px rgba(84,214,232,.55); }

.console-grid { min-height: 0; display: grid; grid-template-columns: 176px minmax(0, 1fr) 248px; border: 1px solid var(--line-strong); background: var(--panel); }
.telemetry-sidebar, .timer-panel { background: #091119; }
.telemetry-sidebar { border-right: 1px solid var(--line); }
.timer-panel { min-height: 0; position: relative; display: grid; grid-template-rows: auto minmax(0, 1fr); border-left: 1px solid var(--line); }
.side-section { padding: 16px; border-bottom: 1px solid var(--line); }
.channel-identity strong { display: block; margin: 13px 0 7px; color: var(--cyan); font: 600 18px var(--mono); }
.channel-identity p { margin: 0; color: #a5b4bb; font-size: 10px; line-height: 1.55; letter-spacing: .07em; }
.value-block div { margin-top: 8px; display: flex; align-items: baseline; gap: 7px; }
.value-block strong { font: 500 28px var(--mono); }
.value-block div span { color: var(--muted); font: 10px var(--mono); }
.compact-readings { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.compact-readings div:last-child { grid-column: span 2; }
.compact-readings span, .difficulty-readout span { display: block; color: var(--muted); font: 8px var(--mono); letter-spacing: .12em; }
.compact-readings strong { display: block; margin-top: 4px; font: 600 11px var(--mono); }
.status-stack { border-bottom: 0; }
.status-line { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; color: #80919a; font: 8px var(--mono); }
.status-line span { display: flex; align-items: center; gap: 7px; }
.status-line i { width: 5px; height: 5px; border-radius: 50%; background: #52616a; }
.status-line strong { font-size: 8px; font-weight: 600; }
.status-line.ok i { background: var(--green); box-shadow: 0 0 6px rgba(114,214,164,.5); }
.status-line.warn { color: var(--amber); }
.status-line.warn i { background: var(--amber); box-shadow: 0 0 7px rgba(240,184,91,.5); }

.scope-panel { min-width: 0; min-height: 0; display: grid; grid-template-rows: 50px 1fr 29px; }
.scope-header { padding: 0 16px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.scope-header > div:first-child { display: flex; align-items: center; gap: 14px; }
.scope-header strong { font: 600 11px var(--mono); letter-spacing: .08em; }
.live-pip { color: var(--cyan); font: 8px var(--mono); letter-spacing: .12em; }
.live-pip i { width: 6px; height: 6px; margin-right: 5px; display: inline-block; border-radius: 50%; background: var(--cyan); animation: pulse 1.7s infinite; }
@keyframes pulse { 50% { opacity: .35; box-shadow: 0 0 0 5px rgba(84,214,232,.08); } }
.trace-legend { display: flex; align-items: center; gap: 13px; color: #73858e; font: 7px var(--mono); letter-spacing: .08em; }
.trace-legend span { display: flex; align-items: center; gap: 6px; }
.trace-legend i { width: 18px; height: 0; display: inline-block; border-top: 1px solid #87969d; }
.trace-legend .reference i { border-top-style: dashed; opacity: .72; }
.trace-legend .measured { color: #8cbac1; }
.trace-legend .measured i { border-top: 2px solid var(--cyan); box-shadow: 0 0 5px rgba(84,214,232,.25); }
.scope-metrics { display: flex; gap: 20px; color: var(--muted); font: 8px var(--mono); }
.scope-metrics b { color: #b9c6cb; font-weight: 500; }
.canvas-wrap { min-height: 0; position: relative; overflow: hidden; background: #071018; }
#telemetryCanvas { width: 100%; height: 100%; display: block; }
.y-unit { position: absolute; top: 11px; left: 44px; color: #617680; font: 8px var(--mono); pointer-events: none; }
.phase-badge { position: absolute; top: 12px; right: 13px; padding: 7px 9px; color: #82949d; border: 1px solid #263944; background: rgba(7,16,24,.82); font: 8px var(--mono); letter-spacing: .11em; transition: color .2s, border-color .2s; }
.phase-badge.fault { color: var(--amber); border-color: rgba(240,184,91,.5); }
.warning-banner { position: absolute; top: 12px; left: 50%; transform: translateX(-50%) translateY(-8px); padding: 7px 11px; display: flex; align-items: center; gap: 8px; color: var(--amber); border: 1px solid rgba(240,184,91,.45); background: rgba(34,25,12,.88); font: 8px var(--mono); letter-spacing: .1em; opacity: 0; transition: opacity .25s, transform .25s; }
.warning-banner.visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.warning-banner i { width: 5px; height: 5px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 7px rgba(240,184,91,.7); }
.scanline { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, transparent 0%, rgba(84,214,232,.018) 50%, transparent 100%); background-size: 100% 7px; opacity: .4; }
.scope-footer { padding: 0 14px; display: flex; justify-content: space-between; align-items: center; color: #4e626c; border-top: 1px solid var(--line); font: 7px var(--mono); letter-spacing: .06em; }

.timer-summary { padding: 12px 14px 10px; border-bottom: 1px solid var(--line); }
.timer-summary > .section-label { display: block; text-align: center; }
.timer-ring { width: 82px; height: 82px; margin: 7px auto 5px; position: relative; }
.timer-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.timer-ring circle { fill: none; stroke-width: 3; }
.timer-track { stroke: #192a34; }
.timer-progress { stroke: var(--cyan); stroke-linecap: square; stroke-dasharray: 326.73; stroke-dashoffset: 0; transition: stroke .2s; }
.timer-ring.warning .timer-progress { stroke: var(--amber); }
.timer-ring.critical .timer-progress { stroke: var(--red); }
.timer-ring > div { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.timer-ring strong { font: 500 21px var(--mono); }
.timer-ring span { color: var(--muted); font: 8px var(--mono); letter-spacing: .15em; }
.timer-summary > p { min-height: 14px; margin: 0; color: #91a2aa; font-size: 10px; line-height: 1.35; text-align: center; }
.difficulty-readout { margin-top: 7px; padding-top: 7px; display: flex; justify-content: space-between; border-top: 1px solid var(--line); }
.difficulty-readout strong { color: var(--cyan); font: 600 11px var(--mono); }
.confidence-bars { margin-top: 6px; display: flex; gap: 4px; }
.confidence-bars i { height: 3px; flex: 1; background: var(--cyan-dim); }

.diagnosis-panel { min-height: 0; padding: 11px 12px 12px; display: flex; flex-direction: column; gap: 9px; background: var(--panel); border-left: 2px solid transparent; transition: border-color .2s, box-shadow .2s, background .2s; }
.diagnosis-panel.ready { border-left-color: var(--amber); background: linear-gradient(90deg, rgba(240,184,91,.065), var(--panel) 45%); box-shadow: inset 10px 0 24px rgba(240,184,91,.035); }
.diagnosis-panel.ready .section-label { color: var(--amber); }
.diagnosis-copy strong { display: block; margin-top: 5px; color: #bcc9ce; font-size: 11px; line-height: 1.4; font-weight: 500; }
.fault-buttons { min-height: 0; flex: 1; display: grid; grid-template-columns: 1fr; grid-template-rows: repeat(7, minmax(31px, 1fr)); gap: 5px; }
.fault-button { min-height: 0; padding: 5px 8px; display: flex; align-items: center; gap: 9px; color: #9cacb4; border: 1px solid #263843; background: #0b151d; cursor: pointer; transition: color .15s, border-color .15s, background .15s, transform .15s; }
.fault-button:hover:not(:disabled) { color: #dce6e9; border-color: var(--cyan-dim); background: #0d1b24; transform: translateY(-1px); }
.fault-button:disabled { cursor: not-allowed; opacity: .42; }
.fault-button .key { min-width: 26px; height: 26px; display: grid; place-items: center; color: #78909a; border: 1px solid #334a56; font: 10px var(--mono); }
.fault-button .label { text-align: left; font: 600 11px var(--mono); line-height: 1.25; letter-spacing: .035em; text-transform: uppercase; }
.fault-button.correct { color: var(--green); border-color: var(--green); background: rgba(114,214,164,.08); opacity: 1; }
.fault-button.incorrect { color: var(--red); border-color: var(--red); background: rgba(242,111,104,.08); opacity: 1; }

.feedback-overlay { position: absolute; inset: 0; z-index: 10; padding: 12px; display: none; background: #091119; }
.feedback-overlay.visible { display: block; animation: feedbackIn .22s ease both; }
@keyframes feedbackIn { from { opacity: 0; transform: translateX(8px); } to { opacity: 1; transform: none; } }
.feedback-card { width: 100%; height: 100%; padding: 13px; display: flex; flex-direction: column; align-items: stretch; border: 1px solid var(--line-strong); background: #0b141c; }
.review-kicker { margin-bottom: 13px; padding-bottom: 10px; color: var(--amber); border-bottom: 1px solid var(--line); font: 600 8px var(--mono); letter-spacing: .11em; }
.review-kicker i { width: 6px; height: 6px; margin-right: 7px; display: inline-block; border-radius: 50%; background: var(--amber); box-shadow: 0 0 7px rgba(240,184,91,.5); }
.feedback-icon { width: 44px; height: 44px; margin-bottom: 14px; display: grid; place-items: center; color: var(--green); border: 1px solid var(--green); background: rgba(114,214,164,.06); font: 400 21px var(--mono); }
.feedback-card.wrong .feedback-icon { color: var(--red); border-color: var(--red); background: rgba(242,111,104,.06); }
.feedback-content > span { color: var(--green); font: 700 9px var(--mono); letter-spacing: .15em; }
.feedback-card.wrong .feedback-content > span { color: var(--red); }
.feedback-content { min-height: 0; overflow-y: auto; }
.feedback-content h2 { margin: 7px 0 10px; color: #e2ebee; font-size: 19px; line-height: 1.15; font-weight: 500; }
.feedback-content p { margin: 0; color: #8799a2; font-size: 11px; line-height: 1.55; }
.feedback-stats { margin-top: 16px; padding-top: 12px; display: grid; gap: 8px; color: var(--muted); border-top: 1px solid var(--line); font: 8px var(--mono); }
.feedback-stats span { display: flex; justify-content: space-between; }
.feedback-stats b { color: #c9d4d8; }
.primary-button.compact { width: 100%; min-width: 0; margin: auto 0 0; }
.primary-button.compact span, .primary-button.compact b { padding: 13px 14px; }

.results-screen { grid-template-columns: .85fr 1.15fr; gap: 8vw; align-items: center; padding: 5vh 6vw; }
.result-code { margin: 32px 0 0; color: #596d77; font: 9px var(--mono); letter-spacing: .13em; }
.results-summary h1 { margin: 10px 0 35px; font-size: clamp(42px, 4vw, 66px); }
.grade-lockup { display: flex; align-items: center; gap: 22px; }
.grade-lockup > span { width: 108px; height: 108px; display: grid; place-items: center; color: var(--cyan); border: 1px solid var(--cyan-dim); background: rgba(84,214,232,.04); font: 400 58px var(--mono); }
.grade-lockup strong { color: var(--cyan); font: 600 13px var(--mono); letter-spacing: .12em; }
.grade-lockup p { max-width: 300px; margin: 9px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.results-data { border: 1px solid var(--line-strong); background: rgba(9,17,24,.88); }
.final-score-block { padding: 25px; display: flex; align-items: baseline; border-bottom: 1px solid var(--line); }
.final-score-block span { margin-right: auto; color: var(--muted); font: 9px var(--mono); letter-spacing: .14em; }
.final-score-block strong { color: var(--cyan); font: 400 clamp(36px, 4vw, 58px) var(--mono); }
.final-score-block em { margin-left: 8px; color: #556974; font: normal 10px var(--mono); }
.result-metrics { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); }
.result-metrics div { padding: 18px 22px; border-right: 1px solid var(--line); }
.result-metrics div:last-child { border-right: 0; }
.result-metrics span { display: block; color: var(--muted); font: 8px var(--mono); letter-spacing: .13em; }
.result-metrics strong { display: block; margin-top: 8px; font: 500 16px var(--mono); }
.round-report { padding: 18px 22px 20px; }
.report-heading, .report-row { display: grid; grid-template-columns: 1fr auto; }
.report-heading { padding-bottom: 9px; color: #596d77; border-bottom: 1px solid var(--line); font: 8px var(--mono); letter-spacing: .11em; }
.report-row { padding: 7px 0; color: #8fa0a8; border-bottom: 1px solid rgba(29,43,54,.55); font: 9px var(--mono); }
.report-row:last-child { border-bottom: 0; }
.report-row b { color: var(--green); font-weight: 500; }
.report-row.wrong b { color: var(--red); }

.app-footer { display: flex; justify-content: space-between; align-items: center; color: #41545e; border-top: 1px solid var(--line); font: 7px var(--mono); letter-spacing: .13em; }
.footer-center { color: #617680; }
.footer-center i { width: 5px; height: 5px; margin-right: 7px; display: inline-block; border-radius: 50%; background: var(--green); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 1120px) {
  .app-shell { padding: 0 16px; }
  .console-grid { grid-template-columns: 150px minmax(0, 1fr) 218px; }
  .scope-metrics span:nth-child(2) { display: none; }
  .trace-legend { gap: 8px; }
  .timer-summary { padding: 9px 11px 8px; }
}

@media (max-width: 820px) {
  .app-shell { min-width: 320px; padding: 0 10px; grid-template-rows: 60px 1fr 34px; }
  .program-id { display: none; }
  .masthead { grid-template-columns: 1fr 1fr; }
  .start-screen, .results-screen { grid-template-columns: 1fr; padding: 48px 10px; }
  .response-demo { grid-template-columns: 1fr; }
  .response-demo > div { min-height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .response-demo > div:last-child { border-bottom: 0; }
  .briefing-panel { width: 100%; }
  .game-screen { display: none; height: auto; min-height: calc(100vh - 94px); }
  .game-screen.active { display: grid; grid-template-rows: 52px auto; }
  .console-grid { grid-template-columns: 1fr; }
  .telemetry-sidebar { display: grid; grid-template-columns: repeat(3, 1fr); border-right: 0; border-bottom: 1px solid var(--line); }
  .telemetry-sidebar .status-stack { display: none; }
  .side-section { padding: 11px; border-right: 1px solid var(--line); border-bottom: 0; }
  .channel-identity p { display: none; }
  .channel-identity strong { margin: 7px 0 0; font-size: 14px; }
  .value-block strong { font-size: 20px; }
  .compact-readings { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .compact-readings div:last-child { grid-column: auto; }
  .scope-panel { min-height: 340px; }
  .timer-panel { border-left: 0; border-top: 1px solid var(--line); }
  .fault-buttons { grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(4, minmax(42px, auto)); }
  .feedback-overlay { position: relative; min-height: 430px; }
  .results-screen { gap: 40px; }
  .results-data { width: 100%; }
  .app-footer span:first-child { display: none; }
}

@media (max-height: 760px) and (min-width: 821px) {
  .app-shell { grid-template-rows: 58px 1fr 28px; }
  .screen { min-height: calc(100vh - 86px); }
  .game-screen { height: calc(100vh - 86px); min-height: 0; padding: 8px 0; gap: 7px; grid-template-rows: 46px minmax(0, 1fr); }
  .side-section { padding: 11px 13px; }
  .timer-summary { padding: 6px 10px; }
  .timer-ring { width: 64px; height: 64px; margin: 3px auto; }
  .timer-ring strong { font-size: 18px; }
  .difficulty-readout { margin-top: 4px; padding-top: 4px; }
  .confidence-bars { display: none; }
  .diagnosis-panel { padding: 7px 9px 8px; gap: 5px; }
  .fault-buttons { gap: 3px; grid-template-rows: repeat(7, minmax(28px, 1fr)); }
  .scope-header { height: 42px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
