.go-shell {
  width: min(1060px, calc(100% - 32px));
}

.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: none;
  font-size: clamp(2.4rem, 7vw, 5rem);
  line-height: 0.94;
}

.lede {
  max-width: 700px;
  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: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.progress-box strong { color: var(--gold); font-size: 1.6rem; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border-bottom: 3px solid var(--ink);
}

.stat {
  min-width: 0;
  padding: 16px 10px;
  border-right: 2px solid var(--line);
  text-align: center;
}

.stat:last-child { border-right: 0; }
.stat strong { font-size: clamp(1rem, 2.5vw, 1.45rem); }

.test-stage {
  min-height: 600px;
  padding: 40px 34px 30px;
  background:
    linear-gradient(rgba(247, 201, 72, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(247, 201, 72, 0.025) 1px, transparent 1px),
    radial-gradient(circle at 50% 30%, #2a2039 0, transparent 52%);
  background-size: 24px 24px, 24px 24px, auto;
}

.signal-panel {
  display: flex;
  min-height: 370px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.stage-kicker {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.signal-light {
  display: grid;
  width: 124px;
  height: 124px;
  margin-bottom: 20px;
  place-items: center;
  border: 5px solid var(--line);
  background: #211a2e;
  box-shadow: 7px 7px 0 var(--shadow);
  color: var(--muted);
  font-size: 4.8rem;
  font-weight: 900;
}

.signal-panel h2 {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 2.65rem);
  letter-spacing: -0.04em;
}

.signal-panel > p:not(.stage-kicker) {
  max-width: 670px;
  min-height: 48px;
  margin: 14px 0 16px;
  color: var(--muted);
  line-height: 1.55;
}

.rule-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: min(500px, 100%);
  margin: 4px 0 22px;
}

.rule-card {
  display: flex;
  justify-content: space-between;
  padding: 14px;
  border: 2px solid var(--line);
  background: #171220;
  font-size: 0.82rem;
}

.rule-card span { color: var(--muted); }
.rule-go strong { color: var(--green); }
.rule-no-go strong { color: var(--red); }

.result-flash {
  display: flex;
  min-height: 52px;
  margin-bottom: 16px;
  flex-direction: column;
  justify-content: center;
}

.result-flash[hidden] { display: none; }
.result-flash strong { color: var(--green); font-size: 2rem; }
.result-flash span { color: var(--muted); font-size: 0.86rem; }

.response-button {
  display: flex;
  width: min(620px, 100%);
  min-height: 92px;
  margin: 20px auto 0;
  align-items: center;
  justify-content: center;
  gap: 20px;
  border: 3px solid var(--ink);
  border-radius: 0;
  background: #261e34;
  box-shadow: 6px 6px 0 var(--shadow);
  color: var(--ink);
  cursor: pointer;
  font-weight: 900;
  letter-spacing: 0.08em;
  touch-action: manipulation;
  user-select: none;
}

.response-button kbd { width: auto; min-width: 82px; padding: 0 12px; }
.response-button:hover { background: #332743; }
.response-button:active,
.response-button.is-pressed { transform: translate(3px, 3px); box-shadow: 3px 3px 0 var(--shadow); }
.response-button:focus-visible { outline: 4px solid var(--gold); outline-offset: 3px; }

.control-note {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
  text-align: center;
}

.test-stage[data-state="waiting"] .primary-button,
.test-stage[data-state="go"] .primary-button,
.test-stage[data-state="no-go"] .primary-button,
.test-stage[data-state="result"] .primary-button { visibility: hidden; }

.test-stage[data-state="waiting"] .signal-light { animation: wait-pulse 800ms steps(2, end) infinite; }
.test-stage[data-state="go"] .signal-light { border-color: var(--green); background: #174528; color: var(--green); box-shadow: 0 0 34px rgba(83, 221, 131, 0.38), 7px 7px 0 var(--shadow); }
.test-stage[data-state="no-go"] .signal-light { border-color: var(--red); background: #501927; color: var(--red); box-shadow: 0 0 34px rgba(237, 78, 92, 0.38), 7px 7px 0 var(--shadow); }
.test-stage[data-state="result"] { background-color: #21182e; }
.test-stage[data-result="incorrect"] { background-color: #351521; }
.test-stage[data-state="complete"] { background-color: #2d2515; }

.content-section {
  display: grid;
  grid-template-columns: 0.85fr 1.6fr;
  gap: 64px;
  padding: 76px 18px 58px;
}

.content-section h2,
.info-panel h2,
.notice-panel h2,
.faq-section h2,
.related-section h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.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,
.metric-row p,
.notice-panel > p:not(.section-kicker),
.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,
.notice-panel { padding: 30px; border: 2px solid var(--line); background: var(--panel); }
.info-panel h2,
.notice-panel h2 { margin-bottom: 22px; }
.info-panel > p:not(.section-kicker) + p { margin-top: 16px; }
.metric-row { padding: 16px 0; border-top: 2px solid var(--line); }
.metric-row strong { display: block; margin-bottom: 7px; color: var(--gold); }

.notice-panel { margin-top: 22px; border-color: #5f5130; }
.notice-panel > p:not(.section-kicker) { max-width: 880px; }

.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(5, 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: 0.76rem; font-weight: 400; }

@keyframes wait-pulse {
  0%, 49% { border-color: var(--line); color: var(--muted); }
  50%, 100% { border-color: var(--gold); color: var(--gold); }
}

@media (max-width: 820px) {
  .test-heading { grid-template-columns: 1fr; }
  .progress-box { display: flex; align-items: center; justify-content: space-between; }
  .progress-box > span { margin: 0; }
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  .stat:nth-child(3) { border-right: 0; }
  .stat:nth-child(-n + 3) { border-bottom: 2px solid var(--line); }
  .related-links { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 620px) {
  .go-shell { width: min(100% - 18px, 600px); 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.25rem, 12vw, 3.8rem); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(odd) { border-right: 2px solid var(--line); }
  .stat:nth-child(even) { border-right: 0; }
  .stat:nth-child(-n + 4) { border-bottom: 2px solid var(--line); }
  .test-stage { min-height: 640px; padding: 32px 14px 24px; }
  .signal-panel { min-height: 405px; }
  .signal-light { width: 104px; height: 104px; font-size: 4rem; }
  .rule-card { flex-direction: column; gap: 6px; }
  .response-button { min-height: 84px; gap: 12px; font-size: 0.78rem; }
  .content-section,
  .reading-grid { grid-template-columns: 1fr; }
  .content-section { gap: 30px; padding: 58px 8px 44px; }
  .info-panel,
  .notice-panel { padding: 24px 20px; }
  .notice-panel { margin: 18px 8px 0; }
  .faq-section,
  .related-section { padding: 58px 8px 0; }
  .related-links { grid-template-columns: 1fr; }
  .related-links a { min-height: 92px; }
}

@media (prefers-reduced-motion: reduce) {
  .test-stage[data-state="waiting"] .signal-light { animation: none; }
}
