:root{--ink:#172a3a;--muted:#607183;--paper:#f4f7f8;--white:#fff;--teal:#087f78;--mint:#dff4ef;--line:#dce5e9;--amber:#f0b94b;--red:#a63c3c;--navy:#102536}*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font:16px/1.55 'DM Sans',system-ui,sans-serif}.topbar{height:68px;padding:0 max(24px,calc((100vw - 1100px)/2));display:flex;justify-content:space-between;align-items:center;background:var(--navy);color:white}.brand{font-weight:800;letter-spacing:.03em;text-decoration:none;color:white}.brand span{font-weight:500;color:#a8c9d1}.topbar nav{display:flex;gap:24px}.topbar nav a{color:#d8e7e9;text-decoration:none;font-size:.9rem}.topbar nav a:hover{color:white}main{max-width:1100px;margin:0 auto;padding:42px 24px 64px}.hero{max-width:690px;margin:14px auto 30px;text-align:center}.hero h1,.scoreboard h1{font-size:clamp(2.1rem,5vw,3.4rem);line-height:1.08;letter-spacing:-.045em;margin:8px 0 14px}.hero p:not(.eyebrow){color:var(--muted);font-size:1.08rem}.eyebrow{font:500 .73rem 'DM Mono',monospace;letter-spacing:.12em;color:var(--teal);margin:0 0 8px}.compact{margin-top:0}.hero-row{display:flex;align-items:center;justify-content:space-between}.card{background:var(--white);border:1px solid var(--line);border-radius:16px;padding:28px;margin:20px 0;box-shadow:0 7px 24px #1833440a}.narrow{max-width:620px;margin:0 auto}.card h2{font-size:1.35rem;line-height:1.2;margin:0 0 8px;letter-spacing:-.02em}.card p{color:var(--muted)}.stack{display:flex;flex-direction:column;gap:10px}.stack label{font-weight:700;font-size:.91rem;margin-top:9px}input[type=text],input[type=password],textarea{width:100%;border:1px solid #c9d6dc;background:#fbfdfd;border-radius:9px;padding:13px 14px;color:var(--ink);font:inherit;outline:none}input:focus,textarea:focus{border-color:var(--teal);box-shadow:0 0 0 3px #087f781c}textarea{resize:vertical;min-height:90px}.button{border:0;border-radius:9px;background:var(--teal);color:white;font:700 .95rem 'DM Sans',sans-serif;padding:12px 18px;cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;justify-content:center}.button:hover{background:#066c67}.button:disabled{background:#b7c5c8;cursor:not-allowed}.button.secondary{background:#e6f2f1;color:#176c67}.button.secondary:hover{background:#d7eae7}.button.ghost{background:transparent;color:var(--ink);border:1px solid var(--line)}.button.danger{background:#a63c3c}.button-row{display:flex;gap:9px;flex-wrap:wrap;margin:14px 0}.notice{padding:12px 14px;border-radius:9px;background:#f0f5f7;color:#425665;margin:12px 0}.notice.bad{background:#fff0ee;color:#9c3833}.notice.good{background:#e3f6ed;color:#176c4a}.hint{font-size:.85rem;margin:18px 0 0}.success-head{display:flex;gap:15px;align-items:center;margin-bottom:22px}.success-head h2{margin:0}.success-head p{margin:4px 0}.check{height:42px;width:42px;border-radius:50%;display:grid;place-items:center;color:#176c4a;background:#e3f6ed;font-size:1.5rem;font-weight:bold}.incident{background:#f0f7f7;border-left:4px solid var(--teal);border-radius:7px;padding:17px 18px;margin:20px 0}.incident h3{font-size:1.1rem;line-height:1.5;margin:0}.saved{color:#176c4a!important;font-weight:600}.dashboard-grid{display:grid;grid-template-columns:minmax(280px,.75fr) minmax(0,1.5fr);gap:18px}.dashboard-grid .card{margin:10px 0}.timer-card{background:var(--navy);color:white}.timer-card .eyebrow{color:#85d6c5}.timer{font:500 clamp(3rem,6vw,4.4rem) 'DM Mono',monospace;letter-spacing:-.05em;margin:5px 0}.timer-card>p{color:#b5c9d1}.timer-card a{color:#9cddd0}.status-pill{display:inline-block;text-transform:uppercase;letter-spacing:.09em;font:500 .7rem 'DM Mono',monospace;padding:5px 9px;border-radius:20px;background:#e9eff2;color:#50626f}.timer-card .status-pill{background:#234255;color:#d1e7e8}.status-pill.running{background:#dff4ea;color:#176c4a}.status-pill.paused{background:#fff2d2;color:#8a651b}.status-pill.ready{background:#edf1f2;color:#526674}.section-head{display:flex;justify-content:space-between;align-items:center;gap:12px}.section-head h2{margin:0}.count{font-size:.8rem;background:#edf4f3;color:#26746d;padding:5px 10px;border-radius:20px}.results,.score-list{list-style:none;margin:14px 0 0;padding:0}.results li{display:flex;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid var(--line)}.results li:last-child{border:0}.rank{height:27px;width:27px;border-radius:50%;display:grid;place-items:center;background:var(--mint);color:var(--teal);font:500 .8rem 'DM Mono',monospace}.team-name{flex:1;font-weight:700}.results time{font:500 .95rem 'DM Mono',monospace}.empty{color:#81919b;font-size:.92rem;padding:14px 0}.response-item{border-top:1px solid var(--line);padding:15px 0}.response-item summary{display:flex;justify-content:space-between;cursor:pointer;font-weight:700}.muted{font-weight:400;color:var(--muted);font-family:'DM Mono',monospace}.response-form{margin-top:14px}.danger-card{border-color:#ead4d2}.danger-card h2{color:#873a37}.checkline{display:flex;align-items:flex-start;gap:9px;font-weight:500!important;color:var(--muted)}.checkline input{margin-top:5px}.code-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:8px;margin:16px 0}.code-row{display:flex;justify-content:space-between;gap:8px;background:#f4f8f8;padding:11px;border-radius:8px}.code-row code{font:500 .95rem 'DM Mono',monospace;color:var(--teal)}.scoreboard{max-width:850px;margin:0 auto;text-align:center}.score-clock{font:500 clamp(4rem,14vw,8rem)/1.1 'DM Mono',monospace;letter-spacing:-.08em;color:var(--teal);margin:12px 0}.score-card{text-align:left;background:white;border:1px solid var(--line);border-radius:16px;padding:20px 28px;margin:25px auto;box-shadow:0 7px 24px #1833440a}.score-heading{display:flex;justify-content:space-between;color:#758692;font:500 .72rem 'DM Mono',monospace;letter-spacing:.1em;padding-bottom:10px;border-bottom:1px solid var(--line)}.score-list li{display:flex;align-items:center;gap:18px;padding:18px 4px;border-bottom:1px solid var(--line);font-size:clamp(1.05rem,3vw,1.5rem);font-weight:700}.score-list li:last-child{border-bottom:0}.score-list .place{font:500 1rem 'DM Mono',monospace;color:var(--teal);width:32px}.score-list .name{flex:1}.score-list .time{font:500 1.2rem 'DM Mono',monospace}.score-foot{color:#81919b;font-size:.85rem}footer{text-align:center;color:#8998a0;font-size:.8rem;padding:20px;border-top:1px solid var(--line)}
@media(max-width:720px){.topbar{height:auto;min-height:62px;padding:14px 18px;align-items:flex-start;gap:12px;flex-direction:column}.topbar nav{gap:17px;flex-wrap:wrap}.topbar nav a{font-size:.82rem}main{padding:28px 16px 48px}.card{padding:21px;margin:15px 0}.narrow{margin:0 auto}.dashboard-grid{grid-template-columns:1fr}.hero-row{align-items:flex-start}.score-card{padding:16px}.score-list li{gap:10px}.score-clock{margin:18px 0}.code-row{font-size:.9rem}}@media print{.topbar,footer,.button,.danger-card,.hero,nav{display:none!important}body{background:white}.card{box-shadow:none}}
.logout-form{margin-top:16px}
.choice-list{border:0;padding:0;margin:8px 0 4px;display:grid;gap:9px}.choice-list legend{font-weight:700;margin-bottom:7px}.stack .choice{display:flex;align-items:flex-start;gap:11px;margin:0;padding:13px 14px;border:1px solid var(--line);border-radius:9px;background:#fbfdfd;cursor:pointer;font-weight:500}.choice input[type=radio]{flex:none;width:18px;height:18px;margin:3px 0 0;accent-color:var(--teal)}.choice:has(input:checked){border-color:var(--teal);background:#f0f8f7}
.team-time-panel{display:flex;gap:12px;margin:16px 0;padding:14px 16px;background:#f0f7f7;border:1px solid #d5e9e6;border-radius:10px}.team-time-panel>div{display:flex;flex:1;flex-direction:column;gap:2px}.team-time-panel strong{font:700 1.35rem 'DM Mono',monospace;color:var(--teal)}.time-label{font-size:.77rem;color:var(--muted);font-weight:600}
@media(max-width:480px){.team-time-panel{gap:8px;padding:12px}.team-time-panel strong{font-size:1.15rem}}
.active-question h3:focus{outline:3px solid #087f7840;outline-offset:5px;border-radius:3px}

/* Keep the active team question and its choices together in the first viewport. */
body.team-playing{min-height:100vh;display:flex;flex-direction:column}
body.team-playing .topbar{height:48px;min-height:48px;padding:0 18px;flex-direction:row;align-items:center;justify-content:flex-start;gap:0}
body.team-playing .topbar nav,body.team-playing footer{display:none}
main.team-page{flex:1;width:100%;padding:12px 16px 18px}
.team-question-card{padding:16px 20px;margin:0 auto}
.team-question-card .team-time-panel{margin:8px 0;padding:8px 12px}
.team-question-card .team-time-panel strong{font-size:1.15rem}
.team-question-card .incident{margin:10px 0;padding:12px 14px}
.team-question-card .incident h3{font-size:1rem;line-height:1.35}
.team-question-card .choice-list{gap:6px;margin:6px 0 4px}
.team-question-card .choice-list legend{margin-bottom:4px}
.team-question-card .stack .choice{padding:8px 10px;line-height:1.35}
.team-question-card .stack .button{min-height:42px;padding:9px 16px}
.team-question-card .logout-form{margin-top:8px}
.team-question-card .logout-form .button{padding:7px 12px;font-size:.85rem}
.active-question{margin-top:8px}
@media(max-width:720px){main.team-page{padding:8px 12px 12px}.team-question-card{padding:12px 14px}}
@media(max-width:480px){.team-question-card .section-head{align-items:flex-start}.team-question-card .count{white-space:nowrap}.team-question-card .team-time-panel{margin:6px 0;padding:7px 9px}.team-question-card .team-time-panel strong{font-size:1rem}.team-question-card .incident{margin:8px 0;padding:10px 12px}.team-question-card .stack .choice{padding:7px 9px;font-size:.9rem}}
@media(max-height:740px){main.team-page{padding-top:6px;padding-bottom:8px}.team-question-card{padding-top:10px;padding-bottom:10px}.team-question-card .team-time-panel{margin:5px 0}.team-question-card .incident{margin:6px 0;padding:9px 12px}.team-question-card .choice-list{gap:4px}.team-question-card .stack .choice{padding:6px 9px}}
.question-progress{width:clamp(150px,30vw,230px);flex:none}.question-progress-label{display:flex;justify-content:space-between;gap:8px;margin-bottom:5px;color:var(--muted);font-size:.72rem;line-height:1.2}.question-progress-label strong{color:var(--ink);font-size:.82rem;font-variant-numeric:tabular-nums}.question-progress progress{display:block;width:100%;height:9px;border:0;border-radius:999px;overflow:hidden;background:#e4ecee;appearance:none;-webkit-appearance:none}.question-progress progress::-webkit-progress-bar{background:#e4ecee;border-radius:999px}.question-progress progress::-webkit-progress-value{background:var(--teal);border-radius:999px;transition:width .25s ease}.question-progress progress::-moz-progress-bar{background:var(--teal);border-radius:999px}
@media(max-width:480px){.team-question-card .question-progress{width:clamp(130px,42vw,180px)}.question-progress-label{font-size:.68rem}}
.wrong-answer-flash{display:flex;align-items:center;justify-content:center;gap:14px;max-height:150px;overflow:hidden;margin:10px 0;padding:14px 18px;border:1px solid #edbbb3;border-radius:14px;background:linear-gradient(135deg,#fff0e9,#ffe0d6);color:#8f2f25;box-shadow:0 8px 22px #a63c3c20;transform-origin:center;animation:wrong-answer-boom 4s ease-in forwards}.wrong-bomb{flex:none;font-size:clamp(3rem,12vw,4.5rem);line-height:1;filter:drop-shadow(0 4px 2px #72251e30)}.wrong-answer-copy{display:flex;flex-direction:column;gap:3px;text-align:left}.wrong-answer-copy strong{font-size:clamp(1.15rem,4vw,1.55rem);line-height:1.15}.wrong-answer-copy>span{font-size:.94rem}.wrong-penalty{flex:none;padding:5px 8px;border-radius:7px;background:#a63c3c;color:white;font:700 .95rem 'DM Mono',monospace}@keyframes wrong-answer-boom{0%{opacity:0;transform:scale(.45) rotate(-8deg)}8%{opacity:1;transform:scale(1.12) rotate(4deg)}13%{transform:scale(.96) rotate(-3deg)}18%,82%{opacity:1;transform:scale(1) rotate(0)}88%{opacity:0;transform:scale(1.08)}96%{opacity:0;max-height:150px;margin:10px 0;padding:14px 18px;border-width:1px}100%{opacity:0;visibility:hidden;max-height:0;margin:0;padding-top:0;padding-bottom:0;border-width:0}}
@media(prefers-reduced-motion:reduce){.wrong-answer-flash{animation-name:wrong-answer-fade}@keyframes wrong-answer-fade{0%,82%{opacity:1;max-height:150px}90%{opacity:0;max-height:150px}96%{opacity:0;max-height:150px;margin:10px 0;padding:14px 18px;border-width:1px}100%{opacity:0;visibility:hidden;max-height:0;margin:0;padding-top:0;padding-bottom:0;border-width:0}}}
.correct-answer-flash{display:flex;align-items:center;justify-content:center;gap:14px;max-height:150px;overflow:hidden;margin:10px 0;padding:14px 18px;border:1px solid #a9d9bd;border-radius:14px;background:linear-gradient(135deg,#edfff3,#d8f6e4);color:#176441;box-shadow:0 8px 22px #18754720;transform-origin:center;animation:correct-answer-pop 4s ease-in forwards}.correct-celebration{flex:none;font-size:clamp(2.8rem,11vw,4.1rem);line-height:1;filter:drop-shadow(0 4px 2px #17644125);animation:celebrate-bounce .7s ease-in-out 2}.correct-answer-copy{display:flex;flex:1;flex-direction:column;gap:3px;text-align:left}.correct-answer-copy strong{font-size:clamp(1.1rem,4vw,1.5rem);line-height:1.15}.correct-answer-copy>span{font-size:.94rem}.correct-badge{height:35px;width:35px;flex:none;display:grid;place-items:center;border-radius:50%;background:#16804f;color:#fff;font-size:1.25rem;font-weight:800;box-shadow:0 3px 8px #17644130}@keyframes celebrate-bounce{0%,100%{transform:translateY(0) rotate(0)}35%{transform:translateY(-8px) rotate(-9deg)}70%{transform:translateY(0) rotate(8deg)}}@keyframes correct-answer-pop{0%{opacity:0;transform:scale(.6)}8%{opacity:1;transform:scale(1.08)}14%{transform:scale(.98)}20%,82%{opacity:1;transform:scale(1)}88%{opacity:0;transform:scale(.96)}96%{opacity:0;max-height:150px;margin:10px 0;padding:14px 18px;border-width:1px}100%{opacity:0;visibility:hidden;max-height:0;margin:0;padding-top:0;padding-bottom:0;border-width:0}}.success-head .check{animation:celebrate-bounce .7s ease-in-out 2}
@media(prefers-reduced-motion:reduce){.correct-answer-flash{animation-name:correct-answer-fade}.correct-celebration,.success-head .check{animation:none}@keyframes correct-answer-fade{0%,82%{opacity:1;max-height:150px}90%{opacity:0;max-height:150px}96%{opacity:0;max-height:150px;margin:10px 0;padding:14px 18px;border-width:1px}100%{opacity:0;visibility:hidden;max-height:0;margin:0;padding-top:0;padding-bottom:0;border-width:0}}}
