:root{
  --bg:#000;
  --fg:#fff;
  --accent:#2DFF73;
  --accent-ink:#000;
  --dim:rgba(255,255,255,.7);
  --faint:rgba(255,255,255,.3);
  --tint:rgba(45,255,115,.1);
  --tint-2:rgba(45,255,115,.3);
  --err:#ff6b6b;
  --radius:4px;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;background:var(--bg);color:var(--fg);
  font-family:Poppins,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  font-size:16px;line-height:1.5;-webkit-font-smoothing:antialiased;
}
button,input,textarea,select{font:inherit;color:inherit}
a{color:var(--accent)}
.hp{position:absolute;left:-9999px;width:1px;height:1px;opacity:0}

.bar{position:fixed;top:0;left:0;right:0;height:4px;background:var(--tint-2);z-index:5}
.bar i{display:block;height:100%;width:0;background:var(--accent);transition:width .35s ease}
.bar[hidden]{display:none}

.stage{
  min-height:100%;min-height:100dvh;display:flex;flex-direction:column;
  align-items:center;justify-content:center;padding:72px 24px 96px;
}
.card{width:100%;max-width:720px;animation:in .35s ease both}
.card.back{animation-name:inback}
@keyframes in{from{opacity:0;transform:translateY(28px)}to{opacity:1;transform:none}}
@keyframes inback{from{opacity:0;transform:translateY(-28px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.card{animation:none}.bar i{transition:none}}

/* welcome and ending screens */
.screen{text-align:center}
.logo{display:flex;justify-content:center;margin:0 0 36px}
.logo img{height:40px;width:auto;max-width:70%}
.logo.sm img{height:30px}
.logo .wordmark{font-size:28px;font-weight:600;letter-spacing:-.01em}
.screen h1{font-size:28px;line-height:1.3;font-weight:400;margin:0 0 16px}
.screen p{font-size:18px;line-height:1.55;color:var(--dim);margin:0 auto 32px;max-width:640px;white-space:pre-line}
.note{font-size:13px;color:var(--dim);margin-top:20px}
.note b{color:var(--accent);font-weight:500}

/* question */
.q-head{display:flex;gap:10px;align-items:baseline}
.q-num{color:var(--accent);font-size:15px;white-space:nowrap;flex:none}
.q-title{font-size:24px;line-height:1.35;font-weight:400;margin:0}
.q-title .req{margin-left:2px}
.q-desc{font-size:18px;line-height:1.5;color:var(--dim);margin:8px 0 0;white-space:pre-line}
.q-body{margin-top:28px}
.q-pad{padding-left:0}

.text-input,textarea.text-input{
  width:100%;background:transparent;border:0;border-bottom:1px solid var(--faint);
  color:var(--accent);font-size:26px;line-height:1.35;padding:0 0 8px;outline:none;border-radius:0;resize:none;
  transition:border-color .15s, box-shadow .15s;
}
.text-input::placeholder{color:var(--tint-2)}
.text-input:focus{border-bottom-color:var(--accent);box-shadow:0 1px 0 0 var(--accent)}
.hint{font-size:12px;color:var(--dim);margin-top:8px;display:flex;justify-content:space-between;gap:16px}

.choices{display:flex;flex-direction:column;gap:8px;align-items:flex-start;max-width:100%}
.choice{
  display:flex;align-items:center;gap:10px;min-width:220px;max-width:100%;text-align:left;
  background:var(--tint);border:0;box-shadow:inset 0 0 0 1px rgba(45,255,115,.6);
  color:var(--accent);border-radius:var(--radius);padding:8px 12px 8px 8px;font-size:19px;line-height:1.4;cursor:pointer;
  transition:background .12s, box-shadow .12s;
}
.choice:hover{background:var(--tint-2)}
.choice:focus-visible,.btn:focus-visible,.nav button:focus-visible,select.text-input:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.choice .key{
  flex:none;width:24px;height:24px;border-radius:3px;display:grid;place-items:center;
  font-size:12px;font-weight:600;background:var(--bg);box-shadow:inset 0 0 0 1px rgba(45,255,115,.6);
}
.choice .lbl{flex:1;min-width:0;overflow-wrap:anywhere}
.choice .tick{flex:none;width:18px;height:18px;opacity:0}
.choice[aria-checked="true"]{box-shadow:inset 0 0 0 2px var(--accent)}
.choice[aria-checked="true"] .key{background:var(--accent);color:var(--accent-ink)}
.choice[aria-checked="true"] .tick{opacity:1}
.choice.dim{opacity:.5;cursor:not-allowed}
.choice input{
  flex:1;min-width:0;background:transparent;border:0;outline:none;color:var(--accent);font-size:19px;padding:0;
}
.choice input::placeholder{color:var(--tint-2)}
.pick{font-size:14px;color:var(--accent);margin:0 0 10px}

select.text-input{appearance:none;-webkit-appearance:none;cursor:pointer;padding-right:36px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232DFF73' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 2px center;background-size:24px}
select.text-input option{background:#111;color:#fff}

.actions{display:flex;align-items:center;gap:14px;margin-top:24px;flex-wrap:wrap}
.btn{
  background:var(--accent);color:var(--accent-ink);border:0;border-radius:var(--radius);
  font-size:20px;font-weight:600;padding:8px 18px;min-height:44px;cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;gap:8px;
  transition:filter .12s;
}
.btn:hover{filter:brightness(.88)}
.btn[disabled]{opacity:.6;cursor:default}
.press{font-size:12px;color:var(--fg)}
.press b{font-weight:600}
@media (hover:none){.press{display:none}}

.error{
  display:inline-flex;align-items:center;gap:8px;margin-top:16px;padding:6px 12px;border-radius:var(--radius);
  background:rgba(255,107,107,.14);color:var(--err);font-size:14px;
}
.error[hidden]{display:none}

.nav{position:fixed;right:20px;bottom:20px;display:flex;border-radius:var(--radius);overflow:hidden;z-index:5}
.nav[hidden]{display:none}
.nav button{
  width:40px;height:36px;background:var(--accent);color:var(--accent-ink);border:0;cursor:pointer;display:grid;place-items:center;
}
.nav button+button{border-left:1px solid rgba(0,0,0,.25)}
.nav button[disabled]{opacity:.5;cursor:default}
.nav svg{width:18px;height:18px}

@media (max-width:600px){
  .stage{padding:56px 20px 88px;justify-content:flex-start;padding-top:18vh}
  .screen h1{font-size:24px}
  .screen p{font-size:16px}
  .q-title{font-size:20px}
  .q-desc{font-size:16px}
  .text-input,textarea.text-input{font-size:20px}
  .choice{width:100%;font-size:17px}
  .choices{align-items:stretch}
}
