:root {
  --ink: #edf6ff;
  --muted: #8fa6bd;
  --muted-2: #607b95;
  --night: #050b13;
  --night-2: #07111f;
  --panel: #0b1725;
  --panel-2: #0e1d2e;
  --line: #203449;
  --line-soft: rgba(103, 151, 190, .16);
  --blue: #36b8ff;
  --blue-2: #6fd4ff;
  --cyan: #45e0d2;
  --green: #77db77;
  --amber: #ffc857;
  --red: #ff5267;
  --red-deep: #9a1e34;
  --shadow: 0 24px 70px rgba(0, 0, 0, .34);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--night); scroll-behavior: smooth; }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 9% -10%, rgba(38, 133, 210, .17), transparent 30rem),
    radial-gradient(circle at 95% 35%, rgba(15, 150, 154, .09), transparent 31rem),
    linear-gradient(145deg, #050b13, #07111f 52%, #050c16);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .42;
  background-image:
    linear-gradient(rgba(82, 144, 187, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(82, 144, 187, .035) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(to bottom, #000, transparent 94%);
}
button, input { font: inherit; }
button { color: inherit; }
button, summary { -webkit-tap-highlight-color: transparent; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.skip-link { position: fixed; left: 14px; top: -80px; z-index: 1000; padding: 10px 15px; color: #07111f; background: white; border-radius: 8px; }
.skip-link:focus { top: 14px; }

.site-header {
  position: relative;
  z-index: 30;
  width: min(1480px, calc(100% - 40px));
  height: 78px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line-soft);
}
.brand { display: inline-flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.brand-mark { width: 47px; height: 47px; display: grid; place-items: center; border: 1px solid rgba(83, 200, 255, .48); border-radius: 13px; color: #9be1ff; background: linear-gradient(145deg, #113553, #0b1f35); box-shadow: inset 0 0 22px rgba(59, 184, 255, .1); font-size: 12px; font-weight: 950; letter-spacing: .04em; }
.brand-copy { display: grid; line-height: 1; }
.brand-copy strong { color: #fff; font-size: 16px; letter-spacing: .08em; }
.brand-copy small { margin-top: 6px; color: var(--blue); font-size: 8px; font-weight: 850; letter-spacing: .17em; }
.header-actions { display: flex; align-items: center; gap: 13px; }
.session-chip { display: flex; align-items: center; gap: 8px; color: #86a1b8; font-size: 11px; font-weight: 700; }
.session-chip i, .live-chip i, .status-pill i { width: 7px; height: 7px; display: inline-block; border-radius: 50%; background: var(--green); box-shadow: 0 0 11px rgba(119, 219, 119, .65); }
.icon-button { width: 39px; height: 39px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: rgba(11, 28, 45, .75); cursor: pointer; transition: .18s ease; }
.icon-button:hover { transform: translateY(-1px); border-color: #38719a; color: var(--blue-2); }
.icon-button svg { width: 17px; }

main { position: relative; z-index: 2; width: min(1440px, calc(100% - 40px)); margin: 0 auto; }
.screen { display: none; min-height: calc(100vh - 128px); padding: 42px 0 68px; animation: screen-in .4s ease both; }
.screen.is-active { display: block; }
@keyframes screen-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; color: var(--blue-2); font-size: 10px; font-weight: 850; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow > span { width: 21px; height: 21px; display: grid; place-items: center; border: 1px solid rgba(255, 82, 103, .45); border-radius: 50%; color: #fff; background: rgba(255, 82, 103, .2); font-size: 12px; }

/* Welcome */
.welcome-screen { padding-top: clamp(45px, 8vh, 94px); }
.welcome-grid { max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.2fr) 430px; align-items: center; gap: clamp(48px, 8vw, 105px); }
.welcome-copy h1 { max-width: 760px; margin: 21px 0 24px; color: #f4f9ff; font-size: clamp(53px, 6vw, 84px); line-height: .98; letter-spacing: -.055em; font-weight: 790; }
.welcome-copy h1 em { color: var(--blue); font-style: normal; }
.lead { max-width: 680px; margin: 0; color: #98aec2; font-size: 16px; line-height: 1.75; }
.incident-preview { max-width: 720px; margin-top: 33px; padding: 17px 19px; display: grid; grid-template-columns: 48px minmax(180px, 1fr) auto; align-items: center; gap: 15px; border: 1px solid rgba(255, 82, 103, .32); border-left: 4px solid var(--red); border-radius: 13px; background: linear-gradient(90deg, rgba(102, 22, 37, .34), rgba(12, 25, 40, .72)); box-shadow: 0 15px 44px rgba(0, 0, 0, .2); }
.preview-alert { width: 43px; height: 43px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--red-deep); box-shadow: 0 0 0 7px rgba(255, 82, 103, .06); font-size: 23px; font-weight: 900; }
.incident-preview > div:nth-child(2) { display: grid; gap: 3px; }
.incident-preview > div:nth-child(2) span { color: #ff93a2; font-size: 9px; font-weight: 900; letter-spacing: .14em; }
.incident-preview > div:nth-child(2) strong { font-size: 17px; }
.incident-preview dl { display: flex; margin: 0; }
.incident-preview dl div { padding: 0 17px; border-left: 1px solid rgba(161, 195, 221, .15); }
.incident-preview dt { color: #718da5; font-size: 9px; }
.incident-preview dd { margin: 4px 0 0; color: #fff; font: 800 13px/1 ui-monospace, SFMono-Regular, Consolas, monospace; }
.feature-row { display: flex; margin-top: 34px; }
.feature-row div { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: baseline; padding: 0 25px; border-left: 1px solid rgba(121, 166, 201, .17); }
.feature-row div:first-child { padding-left: 0; border-left: 0; }
.feature-row strong { color: white; font-size: 24px; }
.feature-row span { color: #617f98; font-size: 9px; letter-spacing: .09em; text-transform: uppercase; }

.entry-card { overflow: hidden; border: 1px solid rgba(66, 146, 197, .3); border-radius: 20px; background: linear-gradient(155deg, rgba(15, 39, 63, .96), rgba(6, 18, 31, .98)); box-shadow: var(--shadow); }
.entry-card-top { min-height: 47px; padding: 0 19px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line-soft); color: #638099; font: 750 9px/1 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .12em; }
.entry-card-top b { padding: 5px 8px; border: 1px solid rgba(255, 82, 103, .35); border-radius: 6px; color: #ff8795; background: rgba(255, 82, 103, .09); }
.entry-card-body { padding: 32px; }
.architect-emblem { width: 57px; height: 57px; display: grid; place-items: center; margin-bottom: 23px; border: 1px solid rgba(63, 193, 255, .32); border-radius: 16px; color: var(--blue-2); background: linear-gradient(145deg, rgba(44, 170, 232, .15), rgba(9, 34, 55, .2)); }
.architect-emblem svg { width: 33px; }
.entry-card h2 { margin: 0 0 9px; font-size: 24px; letter-spacing: -.025em; }
.entry-card-body > p { margin: 0 0 24px; color: #859eb4; font-size: 12.5px; line-height: 1.65; }
.entry-card label { display: block; margin-bottom: 8px; color: #9ab0c3; font-size: 9px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.input-wrap { position: relative; }
.input-wrap svg { position: absolute; left: 14px; top: 50%; width: 17px; transform: translateY(-50%); color: #5e7c96; }
.input-wrap input { width: 100%; height: 50px; padding: 0 14px 0 42px; border: 1px solid rgba(92, 145, 181, .25); border-radius: 10px; outline: 0; color: #fff; background: rgba(2, 11, 20, .48); caret-color: var(--blue-2); transition: .18s; }
.input-wrap input::placeholder { color: #4f6b83; }
.input-wrap input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(54, 184, 255, .1); }
.input-wrap input[aria-invalid="true"] { border-color: var(--red); }
.field-error { min-height: 18px; margin: 6px 0 5px; color: #ff8795; font-size: 10px; }
.primary-button, .secondary-button, .decision-button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 0 18px; border-radius: 10px; font-size: 12px; font-weight: 800; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.primary-button { width: 100%; border: 0; color: #03111c; background: linear-gradient(135deg, #68dcff, #24aefa); box-shadow: 0 11px 28px rgba(34, 169, 241, .22); }
.primary-button:hover { transform: translateY(-1px); box-shadow: 0 15px 32px rgba(34, 169, 241, .3); }
.primary-button svg, .secondary-button svg { width: 16px; }
.alignment-note { margin-top: 22px; padding: 14px 15px; border: 1px solid rgba(102, 174, 214, .14); border-radius: 10px; background: rgba(5, 19, 33, .55); }
.alignment-note span { color: var(--cyan); font-size: 8px; font-weight: 900; letter-spacing: .13em; }
.alignment-note p { margin: 6px 0 0; color: #607e96; font-size: 9.5px; line-height: 1.5; }

/* Game header and impact */
.game-screen { padding-top: 28px; }
.incident-banner { min-height: 88px; padding: 14px 17px 14px 19px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border: 1px solid rgba(255, 82, 103, .31); border-left: 5px solid var(--red); border-radius: 14px; background: linear-gradient(90deg, rgba(88, 18, 32, .38), rgba(12, 26, 41, .84) 62%); box-shadow: 0 14px 42px rgba(0, 0, 0, .2); }
.incident-banner-copy { display: flex; align-items: center; gap: 15px; }
.alarm-pulse { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; color: white; background: #a4263b; box-shadow: 0 0 0 0 rgba(255, 82, 103, .3); font-size: 25px; font-weight: 900; animation: alarm 2s infinite; }
@keyframes alarm { 65% { box-shadow: 0 0 0 10px rgba(255, 82, 103, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 82, 103, 0); } }
.incident-banner small { color: #ff8393; font-size: 8px; font-weight: 900; letter-spacing: .15em; }
.incident-banner h1 { margin: 5px 0 0; font-size: clamp(21px, 2.4vw, 32px); letter-spacing: -.025em; }
.countdown-card { min-width: 152px; padding: 10px 14px; display: grid; justify-items: center; border: 1px solid rgba(255, 200, 87, .24); border-radius: 10px; background: rgba(5, 16, 27, .56); }
.countdown-card span { color: #8b7751; font-size: 7px; font-weight: 900; letter-spacing: .14em; }
.countdown-card time { margin-top: 4px; color: var(--amber); font: 800 25px/1 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .02em; }
.countdown-card.is-urgent { border-color: rgba(255, 82, 103, .55); background: rgba(93, 17, 30, .25); }
.countdown-card.is-urgent time { color: #ff7e8e; }
.impact-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 11px; margin: 13px 0; }
.impact-card { min-height: 91px; padding: 15px 17px; display: grid; align-content: center; border: 1px solid var(--line-soft); border-radius: 12px; background: linear-gradient(150deg, rgba(14, 35, 55, .88), rgba(8, 22, 36, .9)); }
.impact-card > span { color: #69849b; font-size: 8px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.impact-card strong { margin-top: 6px; color: #fff; font: 800 22px/1 ui-monospace, SFMono-Regular, Consolas, monospace; }
.impact-card strong b { color: var(--cyan); font-weight: inherit; }
.impact-card small { margin-top: 7px; color: #537087; font-size: 9px; }
.impact-card.danger { border-color: rgba(255, 82, 103, .23); }
.impact-card.danger strong { color: #ff7e8e; }
.impact-card.warning { border-color: rgba(255, 200, 87, .2); }
.impact-card.warning strong { color: var(--amber); }

.game-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(360px, .75fr); gap: 13px; align-items: start; }
.operations-column, .response-column { display: grid; gap: 13px; }
.panel { border: 1px solid var(--line-soft); border-radius: 14px; background: linear-gradient(155deg, rgba(14, 31, 48, .95), rgba(7, 20, 33, .97)); box-shadow: 0 14px 36px rgba(0, 0, 0, .18); }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.panel-heading.compact { align-items: center; }
.panel-heading h2 { margin: 5px 0 0; font-size: 17px; letter-spacing: -.015em; }
.panel-kicker { color: #5f809a; font-size: 7.5px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.status-pill { display: inline-flex; align-items: center; gap: 7px; padding: 6px 9px; border-radius: 999px; font-size: 8px; font-weight: 900; letter-spacing: .11em; }
.status-pill.critical { color: #ff8b99; border: 1px solid rgba(255, 82, 103, .25); background: rgba(255, 82, 103, .09); }
.status-pill.critical i { background: var(--red); box-shadow: 0 0 10px rgba(255, 82, 103, .6); }
.status-pill.healthy { color: #9bed9b; border: 1px solid rgba(119, 219, 119, .24); background: rgba(119, 219, 119, .08); }

/* Topology */
.topology-panel { padding: 20px 22px 17px; }
.topology { margin-top: 22px; display: grid; grid-template-columns: 1fr 25px 1fr 25px 1.12fr 25px 1.15fr 44px 1.2fr; align-items: center; }
.topology-node { position: relative; min-height: 102px; padding: 12px 8px; display: grid; place-items: center; align-content: center; gap: 4px; text-align: center; border: 1px solid #243e54; border-radius: 11px; background: rgba(5, 17, 29, .72); transition: .25s ease; }
.topology-node::after { content: "?"; position: absolute; right: 7px; top: 6px; width: 16px; height: 16px; display: grid; place-items: center; border-radius: 50%; color: #536f86; background: #11283a; font-size: 8px; font-weight: 900; }
.topology-node.is-checked { border-color: #387da4; background: rgba(12, 45, 66, .72); }
.topology-node.is-checked::after { content: "✓"; color: #8ad8ff; }
.topology-node.is-healthy { border-color: rgba(119, 219, 119, .34); }
.topology-node.is-healthy::after { content: "✓"; color: #93e493; background: rgba(52, 117, 63, .26); }
.topology-node.is-fault { border-color: rgba(255, 82, 103, .52); box-shadow: 0 0 20px rgba(255, 82, 103, .07); }
.topology-node.is-fault::after { content: "!"; color: #ff98a5; background: rgba(133, 32, 50, .35); }
.node-icon { min-width: 35px; height: 35px; padding: 0 8px; display: grid; place-items: center; border: 1px solid rgba(83, 190, 244, .3); border-radius: 9px; color: #87dcff; background: rgba(30, 110, 153, .15); font: 850 10px/1 ui-monospace, monospace; }
.topology-node strong { font-size: 10px; }
.topology-node small { color: #5d7990; font-size: 8px; }
.topology-link { height: 1px; position: relative; background: #2b4c63; }
.topology-link::after { content: ""; position: absolute; right: -1px; top: -3px; border-left: 5px solid #47728e; border-top: 3px solid transparent; border-bottom: 3px solid transparent; }
.topology-link.private-link b { position: absolute; left: 50%; top: 8px; transform: translateX(-50%); color: #4c718a; white-space: nowrap; font-size: 6.5px; letter-spacing: .06em; }
.zone-labels { display: grid; grid-template-columns: 76% 24%; margin-top: 13px; color: #49677e; font-size: 7px; font-weight: 800; letter-spacing: .1em; }
.zone-labels span:last-child { padding-left: 12px; border-left: 1px dashed #29465b; }

/* Action console */
.actions-panel { padding: 21px 22px 18px; }
.read-only-chip { padding: 5px 8px; border: 1px solid rgba(69, 224, 210, .18); border-radius: 7px; color: #6dbeb8; font-size: 7px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.panel-copy { margin: 12px 0 17px; color: #728ba0; font-size: 10.5px; line-height: 1.55; }
.action-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.action-button { min-height: 70px; padding: 10px 11px; display: grid; grid-template-columns: 37px minmax(0, 1fr) auto; align-items: center; gap: 10px; text-align: left; border: 1px solid #213b51; border-radius: 10px; color: #bcd0df; background: linear-gradient(145deg, rgba(15, 42, 62, .8), rgba(7, 23, 37, .82)); cursor: pointer; transition: .18s ease; }
.action-button:hover { transform: translateY(-1px); border-color: #3d789d; background: linear-gradient(145deg, rgba(18, 54, 78, .92), rgba(9, 29, 46, .92)); }
.action-button:focus-visible { outline: 2px solid var(--blue-2); outline-offset: 2px; }
.action-button:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.action-icon { min-width: 35px; height: 35px; display: grid; place-items: center; border-radius: 9px; color: #8edcff; background: #102f48; font: 850 9px/1 ui-monospace, monospace; }
.action-button > span:nth-child(2) { min-width: 0; display: grid; gap: 3px; }
.action-button strong { font-size: 10px; }
.action-button small { overflow: hidden; color: #55758d; font-size: 7.5px; text-overflow: ellipsis; white-space: nowrap; }
.action-button > b { color: #45647d; font-size: 18px; }
.action-button.is-used { border-color: rgba(69, 224, 210, .24); }
.action-button.is-used .action-icon { color: var(--cyan); background: rgba(29, 107, 105, .2); }
.restart-action { border-color: rgba(255, 200, 87, .25); }
.restart-action .action-icon { color: var(--amber); background: rgba(139, 99, 28, .18); }
.restart-action.is-authorized { border-color: rgba(119, 219, 119, .4); box-shadow: inset 0 0 22px rgba(119, 219, 119, .04); }
.action-message { min-height: 43px; margin-top: 12px; padding: 9px 11px; display: flex; align-items: center; gap: 9px; border: 1px solid rgba(88, 146, 185, .13); border-radius: 9px; background: rgba(3, 13, 23, .4); }
.action-message > span { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: var(--blue); box-shadow: 0 0 9px rgba(54, 184, 255, .5); }
.action-message p { margin: 0; color: #7590a5; font-size: 9px; line-height: 1.45; }
.action-message.is-warning > span { background: var(--amber); box-shadow: 0 0 9px rgba(255, 200, 87, .5); }
.action-message.is-danger > span { background: var(--red); box-shadow: 0 0 9px rgba(255, 82, 103, .5); }
.action-message.is-success > span { background: var(--green); box-shadow: 0 0 9px rgba(119, 219, 119, .5); }

/* Response side */
.phase-panel, .evidence-panel, .diagnosis-panel { padding: 18px; }
.phase-panel .panel-heading > span { color: var(--cyan); font: 800 11px/1 ui-monospace, monospace; }
.phase-list { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.phase-list li { min-height: 47px; padding: 6px 7px; display: grid; grid-template-columns: 30px minmax(0, 1fr) 25px; align-items: center; gap: 9px; border: 1px solid transparent; border-radius: 8px; opacity: .52; }
.phase-list li > span { width: 27px; height: 27px; display: grid; place-items: center; border: 1px solid #36526a; border-radius: 8px; color: #7892a6; font: 800 9px/1 ui-monospace, monospace; }
.phase-list li div { display: grid; gap: 2px; }
.phase-list strong { font-size: 9px; }
.phase-list small { color: #5b758a; font-size: 7.5px; }
.phase-list b { color: #4e6c84; font: 800 8px/1 ui-monospace, monospace; }
.phase-list li.is-current { opacity: 1; border-color: rgba(54, 184, 255, .23); background: rgba(34, 129, 181, .08); }
.phase-list li.is-current > span { border-color: var(--blue); color: #9ce3ff; background: rgba(36, 143, 198, .18); }
.phase-list li.is-complete { opacity: .86; }
.phase-list li.is-complete > span { border-color: rgba(119, 219, 119, .38); color: #a1eca1; background: rgba(64, 137, 69, .18); }
.phase-list li.is-complete > span::before { content: "✓"; }
.phase-list li.is-complete > span { font-size: 0; }
.phase-list li.is-complete b { color: #76bc79; }
.live-chip { display: inline-flex; align-items: center; gap: 6px; color: #658299; font-size: 7px; font-weight: 850; letter-spacing: .1em; }
.live-chip i { width: 5px; height: 5px; background: var(--red); box-shadow: 0 0 8px rgba(255, 82, 103, .65); }
.evidence-log { height: 245px; margin-top: 13px; padding: 3px 5px 3px 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #264a64 #081725; }
.evidence-empty { height: 100%; display: grid; place-items: center; align-content: center; gap: 7px; text-align: center; color: #4c687e; }
.evidence-empty span { width: 30px; height: 30px; display: grid; place-items: center; border: 1px dashed #35556d; border-radius: 50%; }
.evidence-empty p { margin: 0; font-size: 8.5px; }
.evidence-entry { position: relative; margin-left: 7px; padding: 0 0 13px 21px; border-left: 1px solid #29455a; }
.evidence-entry::before { content: ""; position: absolute; left: -4px; top: 2px; width: 7px; height: 7px; border-radius: 50%; background: #3a7ba2; box-shadow: 0 0 0 3px #0a1927; }
.evidence-entry.is-risk::before { background: var(--red); }
.evidence-entry.is-success::before { background: var(--green); }
.evidence-entry time { color: #4d6d84; font: 700 7px/1 ui-monospace, monospace; }
.evidence-entry strong { display: block; margin: 3px 0; color: #b9cfdf; font-size: 9px; }
.evidence-entry p { margin: 0; color: #718ca1; font: 8px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }

.diagnosis-panel fieldset { margin: 12px 0 0; padding: 0; border: 0; }
.diagnosis-panel legend { margin-bottom: 9px; color: #718ba1; font-size: 8.5px; }
.diagnosis-options { display: grid; gap: 6px; }
.diagnosis-option { position: relative; }
.diagnosis-option input { position: absolute; opacity: 0; pointer-events: none; }
.diagnosis-option label { min-height: 39px; padding: 8px 9px 8px 34px; display: flex; align-items: center; border: 1px solid #203a50; border-radius: 8px; color: #88a2b6; background: rgba(4, 16, 27, .42); cursor: pointer; font-size: 8.5px; line-height: 1.35; }
.diagnosis-option label::before { content: ""; position: absolute; left: 11px; width: 11px; height: 11px; border: 1px solid #4b6a81; border-radius: 50%; }
.diagnosis-option input:checked + label { border-color: #3c8eb9; color: #d6e9f5; background: rgba(35, 123, 165, .12); }
.diagnosis-option input:checked + label::before { border: 3px solid #0c2538; background: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.diagnosis-option input:focus-visible + label { outline: 2px solid var(--blue-2); outline-offset: 2px; }
.decision-button { width: 100%; min-height: 39px; margin-top: 9px; border: 1px solid #2c668c; color: #bfe8fa; background: linear-gradient(145deg, #153b57, #102a41); }
.decision-button:hover { border-color: #49a7d8; transform: translateY(-1px); }
.decision-button:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.recovery-readiness { margin-top: 13px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.recovery-readiness > span { color: #58768d; font-size: 7.5px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.recovery-readiness ul { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 5px; }
.recovery-readiness li { display: flex; align-items: center; gap: 7px; color: #57758d; font-size: 8px; }
.recovery-readiness li i { width: 12px; height: 12px; display: grid; place-items: center; border: 1px solid #34536a; border-radius: 50%; }
.recovery-readiness li.is-ready { color: #8dcf91; }
.recovery-readiness li.is-ready i { border-color: #549a5b; background: rgba(72, 142, 77, .24); }
.recovery-readiness li.is-ready i::after { content: "✓"; font-size: 7px; font-style: normal; }
.compliance-panel { overflow: hidden; }
.compliance-panel summary { padding: 14px 17px; display: flex; align-items: center; justify-content: space-between; cursor: pointer; list-style: none; }
.compliance-panel summary::-webkit-details-marker { display: none; }
.compliance-panel summary span { display: grid; gap: 4px; }
.compliance-panel summary b { font-size: 9px; }
.compliance-panel summary small { color: #58758c; font-size: 7.5px; }
.compliance-panel summary > i { color: var(--blue); font-style: normal; font-size: 16px; }
.compliance-panel[open] summary > i { transform: rotate(45deg); }
.compliance-panel > div { padding: 0 17px 13px; color: #6d899f; font-size: 8px; line-height: 1.55; }
.compliance-panel p { margin: 7px 0; }
.compliance-panel strong { color: #9ab8cc; }

/* Results */
.result-screen { padding-top: 44px; }
.result-hero { max-width: 800px; margin: 0 auto 31px; text-align: center; }
.success-mark { width: 66px; height: 66px; margin: 0 auto 19px; display: grid; place-items: center; border: 1px solid rgba(119, 219, 119, .25); border-radius: 50%; color: #0a2711; background: linear-gradient(145deg, #a6f29e, #62ca68); box-shadow: 0 0 0 9px rgba(119, 219, 119, .035), 0 0 38px rgba(119, 219, 119, .1); }
.success-mark svg { width: 31px; stroke-width: 2.4; }
.result-hero h1 { margin: 13px 0 10px; font-size: clamp(32px, 4vw, 50px); letter-spacing: -.045em; }
.result-hero h1 span { color: var(--blue-2); }
.result-hero p { max-width: 660px; margin: 0 auto; color: #849db2; font-size: 13px; line-height: 1.65; }
.result-grid { max-width: 1160px; margin: 0 auto; display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 15px; }
.result-card { border: 1px solid var(--line-soft); border-radius: 16px; background: linear-gradient(155deg, rgba(14, 33, 51, .96), rgba(6, 19, 32, .98)); box-shadow: var(--shadow); }
.score-card { padding: 24px; text-align: center; }
.score-card h2 { margin: 6px 0 0; font-size: 17px; text-align: left; }
.score-ring { --score: 100; position: relative; width: 155px; height: 155px; margin: 25px auto 16px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--green) calc(var(--score) * 1%), rgba(115, 159, 190, .12) 0); box-shadow: 0 0 34px rgba(119, 219, 119, .07); }
.score-ring::before { content: ""; position: absolute; inset: 8px; border-radius: inherit; background: #0b1d2e; box-shadow: inset 0 0 24px rgba(0, 0, 0, .35); }
.score-ring > div { position: relative; z-index: 1; display: grid; }
.score-ring strong { color: white; font-size: 47px; line-height: .9; letter-spacing: -.05em; }
.score-ring span { margin-top: 6px; color: #66849a; font-size: 10px; }
.grade-chip { display: inline-flex; padding: 6px 9px; border: 1px solid rgba(119, 219, 119, .24); border-radius: 999px; color: #9ae39a; background: rgba(119, 219, 119, .07); font-size: 8px; font-weight: 900; letter-spacing: .12em; }
.score-card dl { margin: 20px 0 0; padding-top: 13px; border-top: 1px solid var(--line-soft); }
.score-card dl div { display: flex; justify-content: space-between; gap: 16px; padding: 6px 0; font-size: 9px; }
.score-card dt { color: #627e95; }
.score-card dd { margin: 0; color: #c1d4e1; font: 750 9px/1.3 ui-monospace, monospace; text-align: right; }
.report-card { padding: 24px; }
.report-grid { margin-top: 19px; display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.report-grid > div { min-height: 65px; padding: 12px; display: grid; align-content: center; gap: 6px; border: 1px solid var(--line-soft); border-radius: 9px; background: rgba(4, 15, 25, .4); }
.report-grid .wide { grid-column: 1 / -1; }
.report-grid span { color: #56758c; font-size: 7.5px; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.report-grid strong { color: #bdd1df; font-size: 10px; line-height: 1.45; }
.lessons-box { margin-top: 11px; padding: 13px; border-left: 3px solid var(--cyan); border-radius: 8px; background: rgba(44, 150, 144, .07); }
.lessons-box span { color: #69b9b3; font-size: 7.5px; font-weight: 900; letter-spacing: .1em; }
.lessons-box p { margin: 6px 0 0; color: #83a3ad; font-size: 9px; line-height: 1.5; }
.secondary-button { border: 1px solid #2b506a; color: #9fc2d6; background: #102a40; }
.secondary-button:hover { transform: translateY(-1px); border-color: #3c85ad; }
.report-card > .secondary-button { margin-top: 13px; min-height: 40px; }
.certificate-card { max-width: 1160px; margin: 15px auto 0; padding: 24px; }
.certificate-card-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 17px; }
.certificate-card-head h2 { margin: 5px 0 0; font-size: 18px; }
.pdf-chip { padding: 6px 8px; border: 1px solid rgba(255, 82, 103, .22); border-radius: 6px; color: #ff8794; background: rgba(255, 82, 103, .07); font-size: 7px; font-weight: 900; letter-spacing: .1em; }
.certificate-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) 280px; align-items: center; gap: 24px; }
.certificate-preview-wrap { width: 100%; aspect-ratio: 1.414 / 1; overflow: hidden; border: 1px solid rgba(131, 179, 207, .18); border-radius: 9px; background: #f0ede4; box-shadow: 0 15px 42px rgba(0, 0, 0, .26); }
.certificate-preview-wrap canvas { width: 100%; height: 100%; display: block; }
.certificate-copy h3 { margin: 0 0 8px; font-size: 22px; }
.certificate-copy p { margin: 0 0 18px; color: #7d98ad; font-size: 11px; line-height: 1.6; }
.certificate-copy .primary-button, .certificate-copy .secondary-button { width: 100%; margin-top: 9px; }
.certificate-copy small { display: block; margin-top: 13px; color: #54748c; font-size: 8px; line-height: 1.5; }
.replay-button { margin: 23px auto 0; padding: 9px 12px; display: flex; align-items: center; gap: 8px; border: 0; color: #6c8ba3; background: transparent; cursor: pointer; font-size: 10px; font-weight: 750; }
.replay-button:hover { color: var(--blue-2); }
.replay-button svg { width: 15px; }

/* Timeout */
.timeout-screen { display: none; place-items: center; }
.timeout-screen.is-active { display: grid; }
.timeout-card { width: min(520px, 100%); padding: 38px; text-align: center; border: 1px solid rgba(255, 82, 103, .3); border-radius: 19px; background: linear-gradient(155deg, rgba(54, 15, 26, .93), rgba(8, 19, 31, .98)); box-shadow: var(--shadow); }
.timeout-mark { width: 63px; height: 63px; margin: 0 auto 20px; display: grid; place-items: center; border: 1px solid rgba(255, 82, 103, .4); border-radius: 50%; color: #fff; background: #92243a; font-size: 31px; font-weight: 900; }
.timeout-card h1 { margin: 14px 0 12px; font-size: 35px; letter-spacing: -.035em; }
.timeout-card > p { margin: 0; color: #a58d99; font-size: 12px; line-height: 1.65; }
.timeout-score { margin: 24px 0; display: grid; gap: 5px; }
.timeout-score span { color: #986777; font-size: 8px; font-weight: 900; letter-spacing: .12em; }
.timeout-score strong { color: #ff8b99; font: 800 30px/1 ui-monospace, monospace; }
.timeout-card .primary-button { max-width: 270px; }

.site-footer { position: relative; z-index: 2; width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding: 0 0 25px; text-align: center; color: #405d73; font-size: 8.5px; line-height: 1.5; }
.site-footer p { margin: 3px 0; }
.toast { position: fixed; z-index: 100; left: 50%; bottom: 25px; min-width: 270px; max-width: calc(100% - 30px); padding: 12px 15px; display: flex; align-items: center; gap: 9px; border: 1px solid rgba(79, 176, 221, .3); border-radius: 10px; background: rgba(7, 24, 38, .97); box-shadow: 0 17px 48px rgba(0, 0, 0, .4); opacity: 0; pointer-events: none; transform: translate(-50%, 22px); transition: .22s ease; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast span { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 9px rgba(119, 219, 119, .5); }
.toast p { margin: 0; color: #a9c3d3; font-size: 10px; }

@media (max-width: 1160px) {
  .welcome-grid { grid-template-columns: minmax(0, 1fr) 400px; gap: 48px; }
  .welcome-copy h1 { font-size: 59px; }
  .game-layout { grid-template-columns: minmax(0, 1.4fr) minmax(330px, .75fr); }
  .action-grid { grid-template-columns: 1fr 1fr; }
  .topology { grid-template-columns: 1fr 18px 1fr 18px 1fr 18px 1fr 30px 1fr; }
  .topology-node { min-height: 95px; }
  .node-icon { min-width: 31px; height: 31px; }
}

@media (max-width: 900px) {
  .site-header, main { width: min(100% - 28px, 780px); }
  .site-header { height: 70px; }
  .screen { min-height: calc(100vh - 110px); }
  .welcome-grid, .game-layout, .result-grid { grid-template-columns: 1fr; }
  .welcome-grid { gap: 40px; }
  .welcome-copy { text-align: center; }
  .lead, .incident-preview { margin-left: auto; margin-right: auto; }
  .feature-row { justify-content: center; }
  .entry-card { width: min(100%, 470px); margin: 0 auto; }
  .impact-grid { grid-template-columns: 1fr 1fr; }
  .response-column { grid-template-columns: 1fr 1fr; align-items: start; }
  .phase-panel { grid-column: 1; }
  .evidence-panel { grid-column: 2; grid-row: 1 / span 2; }
  .diagnosis-panel { grid-column: 1; }
  .compliance-panel { grid-column: 1 / -1; }
  .certificate-layout { grid-template-columns: 1fr; }
  .certificate-copy { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
  .certificate-copy h3, .certificate-copy p, .certificate-copy small { grid-column: 1 / -1; }
  .certificate-copy .primary-button, .certificate-copy .secondary-button { margin: 0; }
}

@media (max-width: 650px) {
  .session-chip { display: none; }
  .brand-copy strong { font-size: 13px; }
  .brand-copy small { font-size: 6.5px; }
  .welcome-copy h1 { font-size: clamp(43px, 13vw, 58px); }
  .incident-preview { grid-template-columns: 43px 1fr; text-align: left; }
  .incident-preview dl { grid-column: 1 / -1; }
  .incident-preview dl div { flex: 1; padding: 0 10px; }
  .incident-preview dl div:first-child { border-left: 0; }
  .feature-row { flex-wrap: wrap; row-gap: 20px; }
  .feature-row div { padding: 0 14px; }
  .incident-banner { align-items: stretch; flex-direction: column; }
  .countdown-card { grid-template-columns: 1fr auto; justify-items: start; align-items: center; }
  .countdown-card time { margin: 0; }
  .impact-grid { grid-template-columns: 1fr 1fr; }
  .impact-card { min-height: 83px; padding: 13px; }
  .impact-card strong { font-size: 17px; }
  .topology-panel { overflow-x: auto; }
  .topology { min-width: 670px; }
  .zone-labels { min-width: 670px; }
  .action-grid { grid-template-columns: 1fr; }
  .response-column { grid-template-columns: 1fr; }
  .phase-panel, .evidence-panel, .diagnosis-panel, .compliance-panel { grid-column: 1; grid-row: auto; }
  .result-grid { grid-template-columns: 1fr; }
  .score-card h2 { text-align: center; }
  .report-grid { grid-template-columns: 1fr; }
  .report-grid .wide { grid-column: auto; }
  .certificate-copy { grid-template-columns: 1fr; }
  .certificate-copy h3, .certificate-copy p, .certificate-copy small { grid-column: 1; }
  .entry-card-body, .timeout-card { padding: 27px 23px; }
}

@media (max-width: 430px) {
  .impact-grid { grid-template-columns: 1fr; }
  .feature-row div { width: 50%; justify-content: center; }
  .feature-row div:nth-child(3) { border-left: 0; }
  .incident-banner-copy { align-items: flex-start; }
  .alarm-pulse { width: 39px; height: 39px; flex: 0 0 auto; }
  .topology-panel, .actions-panel, .phase-panel, .evidence-panel, .diagnosis-panel, .report-card, .certificate-card { padding-left: 15px; padding-right: 15px; }
}

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