/* Gordo's Way: bright, military, high-energy. No CSS nesting (Chrome 109). */
:root {
  --bg: #0a1a36;
  --bg-2: #10264d;
  --card: #132d5a;
  --line: #24467e;
  --text: #f2f6ff;
  --muted: #a9bbdc;
  --orange: #ff7a00;
  --yellow: #ffd23f;
  --cyan: #2ec5ff;
  --green: #3ddc84;
  --radius: 14px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font: 17px/1.5 "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  background:
    radial-gradient(1200px 500px at 50% -150px, rgba(46, 197, 255, 0.22), transparent 70%),
    radial-gradient(800px 400px at 110% 110%, rgba(255, 122, 0, 0.18), transparent 70%),
    var(--bg);
  background-attachment: fixed;
}

h1, h2, h3, .brand span, .btn, .big-value, .mid-value, .kicker, .label {
  font-family: "Russo One", "Segoe UI", system-ui, sans-serif;
  font-weight: 400;
  letter-spacing: 0.3px;
}

.wrap { max-width: 600px; margin: 0 auto; padding: 0 16px; }

/* Header */
.top { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 5; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 58px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-size: 20px; }
.link { background: none; border: 0; color: var(--cyan); font: inherit; font-size: 15px; cursor: pointer; padding: 8px 0; }

/* Screens */
.screen { padding: 32px 0 24px; }
.kicker { color: var(--yellow); text-transform: uppercase; font-size: 14px; margin: 0 0 8px; letter-spacing: 1.5px; }
h1 { font-size: 38px; line-height: 1.15; margin: 0 0 14px; }
.hot { color: var(--orange); text-shadow: 0 0 24px rgba(255, 122, 0, 0.45); }
.lead { font-size: 19px; color: var(--muted); margin: 0 0 26px; }
.lead b { color: var(--text); }
.small { font-size: 14px; color: var(--muted); }
.quote { margin: 36px 0 0; padding: 18px 20px; border-left: 4px solid var(--orange); background: var(--bg-2); border-radius: 0 var(--radius) var(--radius) 0; font-style: italic; font-size: 18px; }
.quote cite { display: block; margin-top: 6px; font-style: normal; color: var(--yellow); font-size: 15px; }

/* Buttons */
.btn {
  display: inline-block; border: 0; cursor: pointer; color: #1a0f00;
  background: linear-gradient(180deg, var(--yellow), var(--orange));
  font-size: 18px; padding: 14px 26px; border-radius: 12px;
  box-shadow: 0 4px 0 #b34f00, 0 10px 24px rgba(255, 122, 0, 0.35);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #b34f00, 0 6px 14px rgba(255, 122, 0, 0.3); }
.btn.big { font-size: 22px; padding: 18px 34px; width: 100%; }
.btn.ghost { background: transparent; color: var(--text); border: 2px solid var(--line); box-shadow: none; }
.btn:disabled { opacity: 0.4; cursor: default; }
.btn:focus-visible, .choice:focus-visible, input[type="range"]:focus-visible, .link:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }

/* Quiz */
.progress { height: 10px; background: var(--bg-2); border-radius: 99px; overflow: hidden; border: 1px solid var(--line); }
#bar { height: 100%; width: 20%; background: linear-gradient(90deg, var(--cyan), var(--green)); transition: width 0.25s ease; }
.step-count { color: var(--muted); font-size: 14px; margin: 8px 0 18px; }
.step h2 { font-size: 27px; margin: 0 0 18px; }
.step h3 { font-size: 18px; margin: 22px 0 6px; color: var(--muted); }
.big-value { display: block; text-align: center; font-size: 46px; color: var(--yellow); margin: 6px 0 10px; text-shadow: 0 0 22px rgba(255, 210, 63, 0.35); }
.mid-value { display: block; text-align: center; font-size: 28px; color: var(--yellow); margin: 0 0 4px; }
.hint { color: var(--muted); font-size: 15px; margin: 14px 0 0; }
/* Tick labels sit exactly under their slider positions. The thumb is 34px
   wide, so position 0% is 17px in from each edge. JS sets --p (0..1). */
.slider { position: relative; }
.ticks { position: relative; height: 22px; color: var(--muted); font-size: 14px; margin-top: 2px; }
.ticks span { position: absolute; top: 0; left: calc(17px + var(--p, 0) * (100% - 34px)); transform: translateX(-50%); white-space: nowrap; }
.ticks.words span:first-child { left: 0; transform: none; }
.ticks.words span:last-child { left: auto; right: 0; transform: none; }

/* Sliders */
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 36px; background: transparent; margin: 0; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 12px; border-radius: 99px; background: linear-gradient(90deg, var(--cyan), var(--orange)); }
input[type="range"]::-moz-range-track { height: 12px; border-radius: 99px; background: linear-gradient(90deg, var(--cyan), var(--orange)); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; box-sizing: border-box; width: 34px; height: 34px; margin-top: -11px; border-radius: 50%; background: var(--yellow); border: 4px solid var(--bg); box-shadow: 0 0 0 3px var(--yellow), 0 4px 14px rgba(0, 0, 0, 0.5); }
input[type="range"]::-moz-range-thumb { box-sizing: border-box; width: 34px; height: 34px; border-radius: 50%; background: var(--yellow); border: 4px solid var(--bg); box-shadow: 0 0 0 3px var(--yellow), 0 4px 14px rgba(0, 0, 0, 0.5); }

/* Resource amounts */
.res { display: grid; grid-template-columns: 96px 1fr auto 64px; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.res-name { font-weight: 600; white-space: nowrap; }
.res-name small { display: block; font-weight: 400; font-size: 13px; color: var(--muted); }
.res-amt { width: 100%; min-width: 0; font: inherit; font-size: 20px; font-weight: 700; color: var(--text); background: var(--bg-2); border: 2px solid var(--line); border-radius: 10px; padding: 8px 10px; text-align: right; }
.res-amt:focus { outline: none; border-color: var(--cyan); }
.units { display: flex; border: 2px solid var(--line); border-radius: 10px; overflow: hidden; }
.units button { font: inherit; font-weight: 700; color: var(--muted); background: var(--bg-2); border: 0; padding: 9px 11px; cursor: pointer; }
.units button + button { border-left: 1px solid var(--line); }
.units button[aria-pressed="true"] { background: var(--orange); color: #1a0f00; }
.res-rate { text-align: right; font-weight: 700; color: var(--muted); }
.res-rate.low { color: #ff6b6b; }
.res-rate.ok { color: var(--yellow); }
.res-rate.plenty { color: var(--green); }

/* Choices */
.choices { display: grid; gap: 12px; }
.choices.two { grid-template-columns: 1fr 1fr; }
.choice {
  display: block; width: 100%; text-align: left; cursor: pointer;
  padding: 16px 18px; border-radius: var(--radius); border: 2px solid var(--line);
  background: var(--card); color: var(--text); font: inherit;
}
.choice b { display: block; font-size: 19px; }
.choice span { color: var(--muted); font-size: 15px; }
.choices.two .choice { text-align: center; }
.choice[aria-pressed="true"] { border-color: var(--orange); background: #1b3768; box-shadow: 0 0 0 1px var(--orange), 0 8px 20px rgba(255, 122, 0, 0.25); }
.choice[aria-pressed="true"] b { color: var(--yellow); }

.nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 30px; }
.nav .btn { flex: 1; }

/* Plan */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 18px; }
.chip { background: var(--bg-2); border: 1px solid var(--line); color: var(--muted); border-radius: 99px; padding: 4px 12px; font-size: 14px; }
.chip b { color: var(--text); font-weight: 600; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 14px; margin-bottom: 16px; }
.card h2 { font-size: 22px; margin: 0 0 8px; }
.card p { margin: 0 0 6px; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; }
.label { color: var(--yellow); text-transform: uppercase; font-size: 13px; letter-spacing: 1.2px; margin: 0 0 6px !important; }
.focus { border: 2px solid var(--orange); background: linear-gradient(160deg, rgba(255, 122, 0, 0.18), var(--card) 60%); }
.focus h2 { color: var(--yellow); }
.done-count { color: var(--green); font-weight: 700; font-size: 15px; }

.tasks { list-style: none; margin: 6px 0 0; padding: 0; }
.tasks li { border-top: 1px solid var(--line); }
.tasks label { display: grid; grid-template-columns: 34px 1fr; gap: 12px; padding: 13px 0; cursor: pointer; }
.tasks input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.box { width: 30px; height: 30px; border-radius: 8px; border: 2px solid var(--cyan); display: grid; place-items: center; margin-top: 1px; }
.tasks input:checked + .box { background: var(--green); border-color: var(--green); }
.tasks input:checked + .box::after { content: ""; width: 9px; height: 16px; border: solid #08321b; border-width: 0 4px 4px 0; transform: rotate(45deg) translate(-1px, -2px); }
.tasks input:focus-visible + .box { outline: 3px solid var(--cyan); outline-offset: 2px; }
.task-text { display: block; font-weight: 600; }
.task-why { display: block; color: var(--muted); font-size: 15px; }
.tasks input:checked ~ .task .task-text { text-decoration: line-through; color: var(--muted); }

.rule { background: linear-gradient(160deg, rgba(46, 197, 255, 0.16), var(--card) 60%); border-color: var(--cyan); }
.rule h2 { color: var(--cyan); }
.pro { border-style: dashed; }
.pro-list { margin: 4px 0 4px; padding-left: 20px; color: var(--muted); }

footer { border-top: 1px solid var(--line); margin-top: 30px; padding: 22px 0 40px; color: var(--muted); font-size: 15px; }
footer p { margin: 0 0 8px; }

@media (max-width: 420px) {
  h1 { font-size: 31px; }
  .big-value { font-size: 40px; }
  .res { grid-template-columns: 1fr auto 56px; gap: 8px; }
  .res-name { grid-column: 1 / -1; margin-bottom: -4px; }
}

/* Goal note (e.g. "Suggested for solo players") and blank unit slot */
.choice-note { display: inline-block; margin-top: 8px; font-style: normal; font-size: 13px; font-weight: 700; color: var(--cyan); border: 1px solid var(--cyan); border-radius: 99px; padding: 2px 10px; }
.units-blank { border-color: transparent; }

/* Finished tasks fade so the eye goes to what's left */
.tasks li.done { opacity: 0.55; }
.reset { color: var(--muted); font-size: 14px; margin: -2px 0 4px !important; }

/* All done: glow, cheer and streak */
.card.complete { border-color: var(--green); box-shadow: 0 0 0 1px var(--green), 0 0 28px rgba(61, 220, 132, 0.25); }
.card.celebrate { animation: pop 0.6s ease; }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.025); } 100% { transform: scale(1); } }
.cheer { margin: 10px 0 2px !important; padding: 12px 14px; border-radius: 10px; background: rgba(61, 220, 132, 0.14); color: var(--green); font-weight: 700; text-align: center; }
.streak { display: inline-flex; align-items: center; gap: 6px; margin: -6px 0 16px; padding: 6px 14px 6px 10px; border-radius: 99px; background: linear-gradient(180deg, rgba(255, 210, 63, 0.18), rgba(255, 122, 0, 0.18)); border: 1px solid var(--orange); color: var(--yellow); font-weight: 700; }
.streak svg { color: var(--orange); }

/* Header actions: change answers + sound toggle */
.top-actions { display: flex; align-items: center; gap: 14px; }
.icon-btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); color: var(--yellow); cursor: pointer; }
.icon-btn[aria-pressed="false"] { color: var(--muted); }
.icon-btn .mute { display: none; }
.icon-btn[aria-pressed="false"] .mute { display: inline; }
.icon-btn[aria-pressed="false"] .waves { display: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
