:root {
  --ink: #14161c;
  --bg: #0f1218;
  --panel: #1a1f29;
  --panel-2: #222936;
  --line: #2f3747;
  --text: #e9edf5;
  --muted: #9aa5b8;
  --volt: #ffd400;
  --volt-deep: #e0a800;
  --water: #1e9bff;
  --water-light: #5fd0ff;
  --radius: 14px;
  --display: "Bungee", "Arial Black", Impact, sans-serif;
  --body: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  overflow-x: hidden;
}

#bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

a { color: var(--water-light); }

h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.1; margin: 0 0 .5em; }
h2 { font-size: clamp(1.7rem, 4vw, 2.6rem); text-align: center; }

section { padding: 64px 16px; max-width: 1080px; margin: 0 auto; }

.fine { font-size: .8rem; color: var(--muted); }

/* ---------- ticker ---------- */
.ticker {
  background: var(--volt);
  color: var(--ink);
  font-weight: 700;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  overflow: hidden;
  white-space: nowrap;
  border-bottom: 3px solid var(--ink);
}
.ticker-track {
  display: inline-flex;
  gap: 48px;
  padding: 6px 0;
  animation: ticker 30s linear infinite;
}
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- header ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  max-width: 1080px;
  margin: 0 auto;
  padding: 14px 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-family: var(--display);
  font-size: 1.1rem;
}
.brand b { color: var(--volt); font-weight: 400; }
.site-header nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-header nav a { color: var(--muted); text-decoration: none; font-weight: 500; }
.site-header nav a:hover { color: var(--volt); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-family: var(--display);
  font-size: 1.05rem;
  color: var(--ink);
  background: var(--volt);
  border: 3px solid var(--ink);
  border-radius: 999px;
  padding: 12px 26px;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 5px 0 var(--volt-deep), 0 10px 30px rgba(255, 212, 0, .25);
  transition: transform .08s ease, box-shadow .08s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 7px 0 var(--volt-deep), 0 14px 40px rgba(255, 212, 0, .35); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--volt-deep); }
.btn-big { font-size: clamp(1.15rem, 3vw, 1.5rem); padding: 16px 36px; }
.btn-ghost { background: transparent; color: var(--volt); border-color: var(--volt); box-shadow: none; }
.btn-ghost:hover { box-shadow: none; background: rgba(255, 212, 0, .1); }

/* ---------- hero ---------- */
.hero { text-align: center; padding-top: 40px; }
.atom-btn {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  border-radius: 50%;
  display: inline-block;
}
.atom-btn img { width: min(260px, 60vw); height: auto; display: block; filter: drop-shadow(0 0 30px rgba(30, 155, 255, .35)); }
.atom-btn:active img { transform: scale(.95); }
.hero h1 { font-size: clamp(2.1rem, 7vw, 4.4rem); margin-top: 10px; }
.h1-small { display: block; font-size: .42em; color: var(--water-light); margin-bottom: 8px; }
.lede { max-width: 640px; margin: 0 auto 28px; color: #c8d0de; font-size: 1.1rem; }
.lede strong { color: var(--volt); }
.counter { margin: 34px 0 6px; }
.counter span {
  display: block;
  font-family: var(--display);
  font-size: clamp(.8rem, 3.6vw, 2rem);
  color: var(--volt);
  font-variant-numeric: tabular-nums;
  word-break: break-all;
}
.counter small { color: var(--muted); text-transform: uppercase; letter-spacing: .1em; font-size: .75rem; }

/* ---------- hazard stripe ---------- */
.hazard {
  height: 18px;
  background: repeating-linear-gradient(-45deg, var(--volt) 0 20px, var(--ink) 20px 40px);
  border-block: 3px solid var(--ink);
}

/* ---------- downloader ---------- */
.ver { font-size: .45em; color: var(--muted); vertical-align: middle; }
.panel {
  background: var(--panel);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(18px, 4vw, 34px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
}
fieldset { border: 0; margin: 0 0 26px; padding: 0; min-width: 0; }
legend {
  font-family: var(--display);
  font-size: 1.1rem;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.step {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--water);
  color: var(--ink);
  font-size: .9rem;
}

.ion-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(190px, 100%), 1fr));
  gap: 12px;
}
.ion-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px;
  background: var(--panel-2);
  border: 2px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color .15s, transform .15s, background .15s;
}
.ion-card:hover { transform: translateY(-2px); border-color: var(--water); }
.ion-card input { position: absolute; opacity: 0; pointer-events: none; }
.ion-card:has(input:checked) {
  border-color: var(--volt);
  background: #2a2a1f;
  box-shadow: 0 0 0 3px rgba(255, 212, 0, .2);
}
.ion-card:has(input:focus-visible) { outline: 3px solid var(--water-light); outline-offset: 2px; }
.ion-card .sym { font-family: var(--body); font-weight: 700; font-size: 2.1rem; color: var(--volt); line-height: 1.1; }
.ion-card .sym sup { font-size: .5em; color: var(--water-light); }
.ion-card .name { font-weight: 700; }
.ion-card .desc { font-size: .85rem; color: var(--muted); line-height: 1.4; }
.ion-card-weird { border-style: dashed; }

.row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 0 24px;
}

select {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--panel-2);
  border: 2px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
}
select:focus { outline: 3px solid var(--water-light); outline-offset: 1px; }

.toggle {
  display: flex;
  background: var(--panel-2);
  border: 2px solid var(--line);
  border-radius: 10px;
  padding: 4px;
  gap: 4px;
}
.toggle label { flex: 1; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle span {
  display: block;
  text-align: center;
  padding: 8px 6px;
  border-radius: 7px;
  cursor: pointer;
  font-weight: 700;
  font-size: .9rem;
  white-space: nowrap;
}
.toggle input:checked + span { background: var(--water); color: var(--ink); }
.toggle input:focus-visible + span { outline: 2px solid var(--water-light); }

.agree {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 4px 0 26px;
  color: #c8d0de;
  cursor: pointer;
}
.agree input { width: 20px; height: 20px; accent-color: var(--volt); margin-top: 3px; flex: none; }

.btn-download { width: 100%; }
.btn-download img { flex: none; }

/* progress */
.progress-panel { text-align: center; }
.status { font-family: var(--display); font-size: 1.15rem; min-height: 1.4em; }
.bar {
  height: 34px;
  background: var(--panel-2);
  border: 3px solid var(--ink);
  border-radius: 999px;
  overflow: hidden;
  outline: 2px solid var(--line);
}
.fill {
  height: 100%;
  width: 0%;
  background:
    repeating-linear-gradient(-45deg, rgba(255,255,255,.25) 0 12px, transparent 12px 24px),
    linear-gradient(90deg, var(--water), var(--volt));
  background-size: 34px 34px, 100% 100%;
  animation: stripes .6s linear infinite;
  transition: width .25s ease;
}
@keyframes stripes { to { background-position: 34px 0, 0 0; } }
.pct { font-family: var(--display); font-size: 2rem; margin: 10px 0; color: var(--volt); }
.log {
  list-style: none;
  margin: 0;
  padding: 12px;
  text-align: left;
  font-family: ui-monospace, Consolas, monospace;
  font-size: .82rem;
  color: #7ee787;
  background: #0b0e13;
  border-radius: 10px;
  max-height: 180px;
  overflow-y: auto;
}
.log li::before { content: "> "; color: var(--muted); }

/* done */
.done-panel { text-align: center; }
.done-panel h3 { font-size: 2rem; color: var(--volt); }
.done-panel p { margin: 0 0 18px; }
.done-panel .btn { margin: 6px; }
.seal { animation: spin 12s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- symptoms ---------- */
.sub { text-align: center; color: var(--muted); margin-top: -10px; }
.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 20px;
  margin-top: 30px;
}
.col {
  border-radius: var(--radius);
  padding: 24px;
  border: 3px solid;
}
.col h3 { display: flex; align-items: center; gap: 10px; font-size: 1.5rem; }
.col ul { margin: 0; padding-left: 20px; }
.col li { margin-bottom: 8px; }
.col-sparky { border-color: var(--volt); background: rgba(255, 212, 0, .06); }
.col-sparky h3 { color: var(--volt); }
.col-plumber { border-color: var(--water); background: rgba(30, 155, 255, .07); }
.col-plumber h3 { color: var(--water-light); }
.diagnosis { text-align: center; font-size: 1.3rem; margin-top: 30px; }
.diagnosis strong { color: var(--volt); }

/* ---------- story ---------- */
.story-body { max-width: 680px; margin: 0 auto; font-size: 1.1rem; }
.story blockquote {
  margin: 24px 0;
  padding: 18px 24px;
  border-left: 6px solid var(--volt);
  background: var(--panel);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.story blockquote.reply { border-left-color: var(--water); margin-left: 40px; }
.story blockquote p { font-family: var(--display); font-size: 1.5rem; margin: 0 0 6px; }
.story blockquote footer { color: var(--muted); font-size: .9rem; }

/* ---------- reviews ---------- */
.review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: 16px;
  margin-top: 30px;
}
.review {
  margin: 0;
  padding: 22px;
  background: var(--panel);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
}
.review .stars { color: var(--volt); letter-spacing: 3px; font-size: 1.2rem; }
.review blockquote { margin: 10px 0 14px; flex: 1; }
.review figcaption { color: var(--muted); font-weight: 700; font-size: .9rem; }

/* ---------- faq ---------- */
.faq { max-width: 760px; }
details {
  background: var(--panel);
  border: 2px solid var(--line);
  border-radius: 12px;
  margin-bottom: 10px;
  overflow: hidden;
}
summary {
  cursor: pointer;
  padding: 16px 20px;
  font-weight: 700;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-family: var(--display); color: var(--volt); }
details[open] summary::after { content: "−"; }
details[open] summary { color: var(--volt); }
details p { margin: 0; padding: 0 20px 18px; color: #c8d0de; }

/* ---------- footer ---------- */
.site-footer {
  text-align: center;
  padding: 40px 16px 60px;
  max-width: 760px;
  margin: 0 auto;
  color: var(--muted);
  font-size: .85rem;
  border-top: 2px solid var(--line);
}

/* ---------- easter egg fx ---------- */
.spark {
  position: fixed;
  pointer-events: none;
  font-family: var(--display);
  font-size: 1.4rem;
  z-index: 50;
  animation: spark 900ms ease-out forwards;
}
@keyframes spark {
  to { transform: translate(var(--dx), var(--dy)) scale(.4); opacity: 0; }
}
.overcharged { animation: shake .4s linear 3; }
@keyframes shake {
  20% { transform: translate(-6px, 3px); }
  40% { transform: translate(5px, -4px); }
  60% { transform: translate(-4px, -2px); }
  80% { transform: translate(6px, 4px); }
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: var(--volt);
  color: var(--ink);
  font-family: var(--display);
  padding: 12px 22px;
  border: 3px solid var(--ink);
  border-radius: 12px;
  z-index: 60;
  max-width: calc(100% - 32px);
  text-align: center;
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .site-header { justify-content: center; }
  .story blockquote.reply { margin-left: 16px; }
  .btn-download img { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
