/* ==========================================================================
   Millionaire 1 Bitcoin Challenge — styles
   ========================================================================== */

:root {
  --bg: #04050a;
  --bg-2: #0a0d16;
  --fg: #eef1f7;
  --fg-2: #b9c0cf;
  --muted: #7d869a;
  --orange: #f7931a;
  --orange-2: #ffb648;
  --orange-glow: rgba(247, 147, 26, 0.45);
  --cyan: #4de3ff;
  --cyan-dim: rgba(77, 227, 255, 0.18);
  --line: rgba(var(--tint-rgb), 0.09);
  --line-2: rgba(var(--tint-rgb), 0.16);
  --glass: rgba(var(--panel-rgb), 0.55);
  --shade-rgb: 4, 5, 10;
  --panel-rgb: 10, 13, 22;
  --tint-rgb: 255, 255, 255;
  --good: #3ef08a;
  --vignette: rgba(0, 0, 0, 0.7);

  --f-display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --f-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --pad-x: clamp(20px, 6.5vw, 120px);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --cut: 14px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior: none;
}



h1, h2, h3, p, ol, ul, dl, dd { margin: 0; padding: 0; }
ol, ul { list-style: none; }
button, input { font: inherit; color: inherit; }
a { color: inherit; }
.mono { font-family: var(--f-mono); font-feature-settings: "zero" 1; }
.muted { color: var(--muted); }
.small { font-size: 0.8rem; }
strong { color: var(--fg); font-weight: 600; }

::selection { background: var(--orange); color: #000; }

:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}

/* ---------- Background layers ---------- */

#webgl {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
}

.no-webgl #webgl { display: none; }

/* Scripts failed to load: show the first slide statically */
.boot-failed #challenge { visibility: visible; }
.boot-failed #challenge .rv { opacity: 1; transform: none; filter: none; }
.boot-failed .dots, .boot-failed .hud-bottom, .boot-failed .lang { display: none; }
.no-webgl {
  background:
    radial-gradient(60% 50% at 75% 45%, rgba(247, 147, 26, 0.22), transparent 70%),
    radial-gradient(40% 40% at 20% 80%, rgba(77, 227, 255, 0.10), transparent 70%),
    var(--bg);
}

.shade {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(var(--shade-rgb), 0.92) 0%, rgba(var(--shade-rgb), 0.65) 30%, rgba(var(--shade-rgb), 0) 60%),
    radial-gradient(120% 90% at 60% 50%, transparent 55%, var(--vignette) 100%);
}

.hud-grid {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 96px 96px;
  mask-image: radial-gradient(70% 60% at 50% 50%, transparent 40%, #000 100%);
  -webkit-mask-image: radial-gradient(70% 60% at 50% 50%, transparent 40%, #000 100%);
}

/* ---------- Loader ---------- */

#loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 28px;
  background: var(--bg);
  transition: opacity 0.9s var(--ease), visibility 0.9s;
}
#loader.is-done { opacity: 0; visibility: hidden; }

.loader-core { position: relative; width: 84px; height: 84px; display: grid; place-items: center; }
.loader-glyph { width: 46px; height: 46px; color: var(--orange); filter: drop-shadow(0 0 14px var(--orange-glow)); }
.loader-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  border-top-color: var(--orange);
  animation: spin 1.1s linear infinite;
}
.loader-text {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}
.dots-anim::after { content: ""; animation: dots 1.4s steps(4) infinite; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }

/* ---------- Top bar ---------- */

.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px var(--pad-x) 0;
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.brand-mark {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  box-shadow: 0 0 22px var(--orange-glow);
}
.brand-mark svg { width: 22px; height: 22px; }
.brand-text span { color: var(--orange); margin: 0 2px; }
.brand-text .brand-one { color: var(--orange); font-weight: inherit; }

.top-right { display: flex; align-items: center; gap: 10px; }

/* Language selector: drop-down with 2-letter codes */
.lang { position: relative; }
.lang-current {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: border-color 0.2s;
}
.lang-current:hover,
.lang.is-open .lang-current { border-color: var(--line-2); }
.lang-current svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.6; transition: transform 0.2s; }
.lang.is-open .lang-current svg { transform: rotate(180deg); }
.lang-list {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 5px;
  list-style: none;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  background: rgba(var(--panel-rgb), 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s, transform 0.2s var(--ease), visibility 0s linear 0.2s;
}
.lang.is-open .lang-list {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.2s, transform 0.2s var(--ease);
}
.lang-list button {
  width: 100%;
  min-width: 52px;
  padding: 8px 14px;
  border: 0;
  border-radius: 9px;
  background: none;
  cursor: pointer;
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--muted);
  transition: color 0.2s, background 0.2s;
}
.lang-list button:hover,
.lang-list button:focus-visible { color: var(--fg); background: rgba(var(--tint-rgb), 0.07); }
.lang-list button[aria-pressed="true"] { background: var(--orange); color: #0b0600; }

.ticker {
  display: flex;
  gap: 4px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-family: var(--f-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.tick { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; border-radius: 999px; }
.tick b { color: var(--fg); font-weight: 500; }
.tick + .tick { border-left: 1px solid var(--line); border-radius: 0 999px 999px 0; }

.live-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--muted);
  flex: none;
}
.live-dot.is-live { background: var(--good); box-shadow: 0 0 10px var(--good); animation: blink 2s ease-in-out infinite; }
@keyframes blink { 50% { opacity: 0.35; } }

/* ---------- Side dots navigation ---------- */

.dots {
  position: fixed;
  right: clamp(14px, 2.4vw, 36px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.dot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  height: 22px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  color: var(--muted);
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.dot .dot-label {
  opacity: 0;
  transform: translateX(8px);
  transition: opacity 0.3s, transform 0.3s var(--ease), color 0.3s;
  white-space: nowrap;
}
.dot .dot-bar {
  width: 14px; height: 2px;
  background: var(--line-2);
  transition: width 0.4s var(--ease), background 0.3s;
}
.dot:hover .dot-label,
.dot.is-active .dot-label { opacity: 1; transform: none; }
.dot:hover .dot-bar { background: var(--fg-2); }
.dot.is-active { color: var(--fg); }
.dot.is-active .dot-bar { width: 34px; background: var(--orange); box-shadow: 0 0 10px var(--orange-glow); }

/* ---------- Slides ---------- */

.slides { position: relative; z-index: 10; }

.slide {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  padding: 96px var(--pad-x) 92px;
  perspective: 1400px;
  perspective-origin: 30% 50%;
  pointer-events: none;
  visibility: hidden;
  transition: visibility 0s linear 1s;
}
.slide.is-active {
  visibility: visible;
  transition: visibility 0s;
}

.slide-inner {
  position: relative;
  width: 100%;
  max-width: 580px;
  max-height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  pointer-events: auto;
  transform-style: preserve-3d;
  padding: 4px 4px 4px 0;
}
.slide-inner::-webkit-scrollbar { display: none; }
.slide-inner.wide { max-width: 860px; }
#challenge .slide-inner { max-width: 720px; }

/* 3D reveal: past slides tilt away upward, future slides wait below */
.rv {
  opacity: 0;
  filter: blur(8px);
  transform: translate3d(0, 46px, -160px) rotateX(-22deg);
  transform-origin: 50% 100%;
  transition:
    transform 1s var(--ease),
    opacity 0.7s ease,
    filter 0.7s ease;
  transition-delay: calc(var(--i, 0) * 30ms);
  will-change: transform, opacity;
}
.slide.is-past .rv {
  transform: translate3d(0, -46px, -160px) rotateX(22deg);
  transform-origin: 50% 0%;
}
.slide.is-active .rv {
  opacity: 1;
  filter: none;
  transform: none;
  transition-delay: calc(var(--i, 0) * 70ms + 380ms);
}

/* ---------- Typography ---------- */

/* Hero: the challenge name, big and unmistakable */
.hero-kicker {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 14px;
  padding: 14px 22px 14px 18px;
  border-left: 3px solid var(--orange);
  background: linear-gradient(90deg, rgba(247, 147, 26, 0.18), rgba(247, 147, 26, 0.03) 70%, transparent);
  box-shadow: -8px 0 24px -12px var(--orange);
}
.hero-kicker .k1 {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: calc(clamp(0.95rem, min(1.7vw, 3vh), 1.45rem) * var(--fs-kicker, 1));
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg);
  line-height: 1.15;
}
.hero-kicker .k2 {
  font-family: var(--f-display);
  font-weight: 900;
  font-size: calc(clamp(1.45rem, min(2.9vw, 5.2vh), 2.5rem) * var(--fs-kicker, 1));
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--orange);
  text-shadow: 0 0 28px var(--orange-glow);
  line-height: 1.05;
}
.hero-for {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  font-family: var(--f-mono);
  font-size: calc(12px * var(--fs-label, 1));
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--orange-2);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  font-family: var(--f-mono);
  font-size: calc(12px * var(--fs-label, 1));
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--orange-2);
}
.eyebrow .idx {
  padding: 3px 8px;
  border: 1px solid rgba(247, 147, 26, 0.45);
  color: var(--orange);
  letter-spacing: 0.1em;
}
.pulse {
  position: relative;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 12px var(--orange);
}
.pulse::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid var(--orange);
  animation: ping 2s var(--ease) infinite;
}
@keyframes ping { from { transform: scale(0.4); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }

.display,
.title {
  font-family: var(--f-display);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.04;
  text-wrap: balance;
}
.display { font-size: calc(clamp(2rem, min(4.4vw, 6.4vh), 4.1rem) * var(--fs-display, 1)); margin-bottom: 22px; }
.title { font-size: calc(clamp(1.7rem, min(3.5vw, 6vh), 3.15rem) * var(--fs-title, 1)); margin-bottom: 22px; }
.title .t-sub {
  display: block;
  margin-bottom: 0.12em;
  font-size: 0.56em;
  letter-spacing: -0.01em;
  color: var(--fg);
}
.display em,
.title em {
  font-style: normal;
  color: var(--orange);
  text-shadow: 0 0 34px var(--orange-glow);
}

.lead {
  max-width: 52ch;
  margin-bottom: 26px;
  font-size: calc(clamp(1rem, 1.15vw, 1.1rem) * var(--fs-lead, 1));
  color: var(--fg-2);
}

.label {
  font-family: var(--f-mono);
  font-size: calc(11px * var(--fs-label, 1));
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: calc(0.85rem * var(--fs-body, 1));
  color: var(--muted);
}
.legend .sep { width: 14px; }
.sw { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }
.sw-orange { background: var(--orange); box-shadow: 0 0 8px var(--orange); }
.sw-dim { background: #3a4459; }
.sw-lost { background: #4a4f5c; box-shadow: inset 0 0 0 1px #7d869a; }

.source {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: calc(0.75rem * var(--fs-body, 1));
  color: var(--muted);
}

/* ---------- Buttons ---------- */

.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 38px; }

.btn {
  --c: var(--cut);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 26px;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  font-family: var(--f-display);
  font-weight: 500;
  font-size: calc(12.5px * var(--fs-btn, 1));
  letter-spacing: 0.12em;
  text-transform: uppercase;
  clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c));
  transition: transform 0.25s var(--ease), background 0.25s, color 0.25s, box-shadow 0.25s;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-primary {
  background: var(--orange);
  color: #0b0600;
}
.btn-primary:hover { background: var(--orange-2); }
.btn-ghost {
  background: rgba(var(--tint-rgb), 0.04);
  color: var(--fg);
  box-shadow: inset 0 0 0 1px var(--line-2);
}
.btn-ghost:hover { background: rgba(77, 227, 255, 0.08); box-shadow: inset 0 0 0 1px var(--cyan); }
.btn-sm { --c: 10px; padding: 11px 18px; font-size: calc(11px * var(--fs-btn, 1)); }

/* ---------- Panels ---------- */

.panel {
  --c: var(--cut);
  position: relative;
  padding: 22px 24px;
  background: var(--glass);
  border: 1px solid var(--line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  clip-path: polygon(0 0, calc(100% - var(--c)) 0, 100% var(--c), 100% 100%, var(--c) 100%, 0 calc(100% - var(--c)));
}
.panel::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 42px; height: 2px;
  background: var(--orange);
  box-shadow: 0 0 12px var(--orange);
}

/* Mini stats (hero) */
.mini-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.mini-stats > div { padding-right: 28px; margin-right: 28px; border-right: 1px solid var(--line); }
.mini-stats > div:last-child { border-right: 0; margin-right: 0; }
.mini-stats dt { font-family: var(--f-mono); font-size: calc(10.5px * var(--fs-label, 1)); letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.mini-stats dd { font-family: var(--f-mono); font-size: calc(1.05rem * var(--fs-num, 1)); font-weight: 500; margin-top: 4px; }

/* Supply panel */
.supply { margin-bottom: 18px; }
.supply-head { display: flex; justify-content: space-between; align-items: baseline; }
.supply-head .mono { color: var(--orange-2); }
.supply-num {
  font-size: calc(clamp(1.9rem, 3.6vw, 2.8rem) * var(--fs-num, 1));
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 6px 0 14px;
  color: var(--fg);
}
.bar {
  position: relative;
  height: 8px;
  background: rgba(var(--tint-rgb), 0.06);
  overflow: hidden;
}
.bar i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: linear-gradient(90deg, #b85e00, var(--orange) 60%, var(--orange-2));
  box-shadow: 0 0 16px var(--orange);
  transition: width 1.6s var(--ease);
}
.bar-thin { height: 4px; }
.bar-scale { display: flex; justify-content: space-between; margin-top: 6px; font-size: calc(10.5px * var(--fs-label, 1)); color: var(--muted); }
.supply-facts { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 18px; }
.supply-facts dt { font-size: calc(0.75rem * var(--fs-label, 1)); color: var(--muted); }
.supply-facts dd { font-size: calc(0.95rem * var(--fs-num, 1)); margin-top: 2px; }

/* Stat grid (math) */
.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin-bottom: 24px;
  background: var(--line);
  border: 1px solid var(--line);
}
.stat {
  padding: 18px 20px;
  background: rgba(var(--panel-rgb), 0.82);
  backdrop-filter: blur(10px);
}
.stat b { display: block; font-size: calc(clamp(1.5rem, 2.6vw, 2.1rem) * var(--fs-num, 1)); font-weight: 500; letter-spacing: -0.02em; }
.stat b.accent { color: var(--orange); text-shadow: 0 0 20px var(--orange-glow); }
/* the result of the math: per millionaire, from what is actually available */
.stat-result {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  gap: 14px;
  background: linear-gradient(90deg, rgba(247, 147, 26, 0.18), rgba(var(--panel-rgb), 0.82) 70%);
  box-shadow: inset 3px 0 0 var(--orange);
}
.stat-result span { color: var(--fg-2); }
/* USA alone: still not enough */
.stat-wide { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 14px; }
.stat-wide b { flex: none; }
.stat-wide span { color: var(--fg-2); }
/* wide screens: the four inputs in one row, the result below */
@media (min-width: 1000px) {
  #math .slide-inner { max-width: 760px; }
  #math .stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  #math .stat:not(.stat-result) b { font-size: calc(clamp(1.2rem, 1.9vw, 1.6rem) * var(--fs-num, 1)); }
  #math .stat:not(.stat-result) span { font-size: calc(0.8rem * var(--fs-body, 1)); }
}
.stat span { font-size: calc(0.85rem * var(--fs-body, 1)); color: var(--muted); }

/* Who owns it */
.holders {
  margin-bottom: 14px;
  padding: 16px 20px;
  background: var(--glass);
  border: 1px solid var(--line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
/* bar chart by holder type (left on wide screens, above the table on small ones) */
.h-chart { display: grid; gap: 10px; align-content: start; margin-bottom: 14px; }
@media (min-width: 1000px) {
  .holders { display: grid; grid-template-columns: 15.5rem minmax(0, 1fr); gap: 28px; }
  .h-chart { margin-bottom: 0; padding-right: 24px; border-right: 1px solid var(--line); }
  .holders .h-tabs { gap: 5px; }
  .holders .h-tab { padding: 6px 9px; letter-spacing: 0.04em; }
  .holders .h-list { max-height: 10.5rem; }
}
.h-kpi { display: grid; gap: 2px; }
.h-kpi b { font-size: calc(1.55rem * var(--fs-num, 1)); font-weight: 700; color: var(--orange); letter-spacing: -0.02em; }
.h-kpi span { font-size: calc(0.8rem * var(--fs-body, 1)); color: var(--fg-2); }
.h-kpi .h-kpi-pct { color: var(--fg); font-size: calc(0.78rem * var(--fs-num, 1)); }
.h-chart-title { font-size: calc(9.5px * var(--fs-label, 1)); letter-spacing: 0.1em; color: var(--orange-2); margin-top: 4px; }
.h-bars { display: grid; gap: 8px; }
.h-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 8px;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: var(--fg-2);
  font: inherit;
  font-size: calc(0.76rem * var(--fs-body, 1));
  text-align: left;
  cursor: pointer;
}
.h-bar-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h-bar-val { color: var(--fg); }
.h-bar-track { grid-column: 1 / -1; height: 7px; background: rgba(var(--tint-rgb), 0.07); border-radius: 4px; overflow: hidden; }
.h-bar-track i { display: block; width: var(--w); height: 100%; background: rgba(247, 147, 26, 0.45); border-radius: 4px; transition: background 0.2s; }
.h-bar:hover .h-bar-track i, .h-bar[aria-pressed="true"] .h-bar-track i { background: var(--orange); }
.h-bar[aria-pressed="true"] .h-bar-name { color: var(--fg); font-weight: 600; }

/* one category at a time, picked with the tabs */
.h-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.h-tab {
  padding: 7px 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: transparent;
  color: var(--fg-2);
  font-family: var(--f-mono);
  font-size: calc(10.5px * var(--fs-label, 1));
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.h-tab:hover { border-color: var(--orange); color: var(--fg); }
.h-tab[aria-selected="true"] { background: var(--orange); border-color: var(--orange); color: #140a00; font-weight: 700; }
.h-tab:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.holders-group { --cols: minmax(0, 1fr) 5.4em 7em; }
.h-list {
  max-height: 12.5rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: var(--orange) transparent;
}
.h-list::-webkit-scrollbar { width: 5px; }
.h-list::-webkit-scrollbar-thumb { background: var(--orange); border-radius: 3px; }
.h-list:focus-visible { outline: 1px solid var(--line-2); }
.h-rank { flex: none; width: 1.6em; font-style: normal; font-size: calc(0.72rem * var(--fs-num, 1)); color: var(--muted); text-align: right; }
.h-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.h-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 14px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.h-top { color: var(--orange-2); font-size: calc(9.5px * var(--fs-label, 1)); letter-spacing: 0.1em; }
.h-total { display: flex; align-items: baseline; gap: 10px; font-size: calc(0.8rem * var(--fs-num, 1)); color: var(--fg-2); }
.h-total .label { font-size: calc(9.5px * var(--fs-label, 1)); letter-spacing: 0.1em; }
.h-total b { color: var(--orange-2); }
.h-head,
.holders-group li {
  display: grid;
  grid-template-columns: var(--cols);
  align-items: end;
  gap: 10px;
}
.h-head { margin-bottom: 4px; padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.h-head .h-title { color: var(--orange-2); }
.h-head .h-col {
  text-align: right;
  font-size: calc(9.5px * var(--fs-label, 1));
  letter-spacing: 0.08em;
  line-height: 1.25;
}
.holders-group ul { display: grid; gap: 3px; }
.holders-group li {
  align-items: center;
  font-size: calc(0.9rem * var(--fs-body, 1));
  line-height: 1.6;
}
.h-name { display: flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fg); }
.h-code {
  flex: none;
  padding: 0 5px;
  font-style: normal;
  font-size: calc(9.5px * var(--fs-label, 1));
  letter-spacing: 0.08em;
  color: var(--muted);
  border: 1px solid var(--line-2);
}
.h-pct { text-align: right; font-size: calc(0.85rem * var(--fs-num, 1)); color: var(--fg); white-space: nowrap; }
.h-num { text-align: right; font-size: calc(0.85rem * var(--fs-num, 1)); color: var(--orange-2); white-space: nowrap; }

.you-row {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin-bottom: 4px;
  padding: 12px 14px 12px 20px;
  border: 1px solid rgba(247, 147, 26, 0.55);
  background: linear-gradient(90deg, rgba(247, 147, 26, 0.16), rgba(247, 147, 26, 0.04));
  box-shadow: 0 0 30px -10px var(--orange);
}
.you-name { font-family: var(--f-display); font-weight: 700; font-size: calc(1.1rem * var(--fs-body, 1)); }
.you-num { font-size: calc(1.3rem * var(--fs-num, 1)); color: var(--muted); white-space: nowrap; }
.you-num i { font-style: normal; margin: 0 2px; }
.you-num b { color: var(--orange); font-weight: 700; text-shadow: 0 0 16px var(--orange-glow); }
.you-line { font-size: calc(0.9rem * var(--fs-body, 1)); color: var(--fg-2); }

/* Mint your coin */
.mint-cta { width: 100%; }
.mint {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
}
.mint[hidden] { display: none; }
.mint-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(var(--panel-rgb), 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.mint-panel {
  position: relative;
  display: grid;
  grid-template-columns: auto 340px;
  gap: 28px;
  align-items: center;
  max-width: 100%;
  max-height: 100%;
  padding: 24px;
  border: 1px solid var(--line-2);
  background: rgba(var(--panel-rgb), 0.92);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  animation: mint-in 0.45s var(--ease);
}
@keyframes mint-in { from { opacity: 0; transform: translateY(16px) scale(0.98); } }
.mint-stage canvas {
  display: block;
  height: min(78vh, 760px);
  aspect-ratio: 4 / 5;
  width: auto;
  border: 1px solid var(--line);
}
.mint-side { display: grid; gap: 16px; align-content: center; }
.mint-side .title { margin-bottom: 0; font-size: clamp(1.5rem, 2.4vw, 2.1rem); }
.mint-side .eyebrow { margin-bottom: 0; }
.mint-side input[type="text"],
.mint-side select {
  width: 100%;
  padding: 11px 14px;
  font-size: 1rem;
}
select {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--line-2);
  border-radius: 0;
  background: rgba(var(--tint-rgb), 0.04) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5 6 7.5 9 4.5' fill='none' stroke='%23b9c0cf' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 12px center / 12px;
  color: var(--fg);
  font: inherit;
  cursor: pointer;
}
select:focus { outline: none; border-color: var(--orange); }
select option { background: var(--bg-2); color: var(--fg); }
.mint-actions { display: grid; gap: 8px; }
.mint-actions .btn { width: 100%; }
.mint-actions .btn:disabled { opacity: 0.5; cursor: wait; }
.mint-status { min-height: 1.2em; font-size: 12px; color: var(--orange-2); letter-spacing: 0.06em; }
.mint-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
.mint-close:hover { color: var(--fg); }
.modal-open .dots,
.modal-open .hud-bottom { visibility: hidden; }

/* Start with 5% */
#starter .slide-inner { max-width: 780px; }
.starter { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; margin-bottom: 12px; }
.starter-result { gap: 6px; }
.st-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: calc(0.92rem * var(--fs-body, 1)); color: var(--fg-2); }
.st-row b { font-size: calc(1.15rem * var(--fs-num, 1)); font-weight: 600; color: var(--fg); white-space: nowrap; }
.st-btc b { font-size: calc(1.6rem * var(--fs-num, 1)); font-weight: 700; color: var(--orange); text-shadow: 0 0 20px var(--orange-glow); }
.st-coin { font-size: calc(0.8rem * var(--fs-body, 1)); color: var(--muted); text-align: right; }
.st-scen {
  display: grid;
  gap: 2px;
  margin-top: 8px;
  padding: 12px 14px;
  border: 1px solid rgba(247, 147, 26, 0.5);
  background: linear-gradient(90deg, rgba(247, 147, 26, 0.14), rgba(247, 147, 26, 0.03));
}
.st-scen .label { color: var(--orange-2); }
/* the scenario result is the new net worth: say so right above the amount */
.st-scen-line { font-size: calc(0.9rem * var(--fs-body, 1)); font-weight: 600; color: var(--fg); }
.st-total { font-size: calc(1.9rem * var(--fs-num, 1)); font-weight: 700; line-height: 1.15; color: var(--fg); }
.st-change { font-size: calc(0.9rem * var(--fs-num, 1)); color: var(--good); }
.st-down { margin-top: 4px; font-size: calc(0.78rem * var(--fs-body, 1)); color: var(--muted); }
.st-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.st-foot .legend { display: block; flex: 1; min-width: 0; }
.st-foot .legend .sw { margin-right: 4px; vertical-align: -1px; }

/* Calculator */
.calc { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; margin-bottom: 4px; }
.calc-inputs { display: grid; gap: 18px; align-content: start; }
#calculator .slide-inner { max-width: 780px; }
.field { display: grid; gap: 8px; }
.field-inline { grid-template-columns: 1fr; }
.calc-nw { font-size: calc(clamp(1.7rem, 3vw, 2.3rem) * var(--fs-num, 1)); font-weight: 500; letter-spacing: -0.02em; color: var(--fg); }
.range-scale { display: flex; justify-content: space-between; font-size: calc(10px * var(--fs-label, 1)); color: var(--muted); }
/* labels at their exact slider values (style="--at: …%") */
.range-scale.is-placed { position: relative; display: block; height: 1.4em; }
.range-scale.is-placed span { position: absolute; left: var(--at); transform: translateX(-50%); }
.range-scale.is-placed span:first-child { transform: none; }
.range-scale.is-placed span:last-child { transform: translateX(-100%); }

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 26px;
  background: transparent;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  background: linear-gradient(90deg, var(--orange) var(--p, 25%), rgba(var(--tint-rgb), 0.1) var(--p, 25%));
}
input[type="range"]::-moz-range-track { height: 4px; background: rgba(var(--tint-rgb), 0.1); }
input[type="range"]::-moz-range-progress { height: 4px; background: var(--orange); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px; height: 20px;
  margin-top: -8px;
  background: var(--bg);
  border: 2px solid var(--orange);
  transform: rotate(45deg);
  box-shadow: 0 0 14px var(--orange);
}
input[type="range"]::-moz-range-thumb {
  width: 16px; height: 16px;
  border-radius: 0;
  background: var(--bg);
  border: 2px solid var(--orange);
  transform: rotate(45deg);
  box-shadow: 0 0 14px var(--orange);
}

input[type="number"],
input[type="text"] {
  min-width: 0;
  padding: 10px 14px;
  background: rgba(var(--tint-rgb), 0.04);
  border: 1px solid var(--line-2);
  border-radius: 0;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}
input[type="number"] { width: 100%; }
input[type="number"]:focus,
input[type="text"]:focus { border-color: var(--orange); background: rgba(247, 147, 26, 0.06); }

.badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  font-style: normal;
  font-size: calc(9.5px * var(--fs-label, 1));
  letter-spacing: 0.12em;
  border: 1px solid var(--line-2);
  color: var(--muted);
}
.badge.is-live { color: var(--good); border-color: var(--good); }

.result { display: grid; gap: 12px; align-content: start; padding-left: 26px; border-left: 1px solid var(--line); }
.result-main { font-size: calc(1.05rem * var(--fs-body, 1)); color: var(--fg-2); }
.result-main .mono { font-size: calc(1.9rem * var(--fs-num, 1)); font-weight: 700; color: var(--orange); text-shadow: 0 0 22px var(--orange-glow); margin-right: 4px; }
.result-list { display: grid; gap: 6px; font-size: calc(0.9rem * var(--fs-body, 1)); color: var(--fg-2); }
.result-list li { padding-left: 16px; position: relative; }
.result-list li::before { content: ""; position: absolute; left: 0; top: 0.65em; width: 6px; height: 1px; background: var(--orange); }
.result-list b { color: var(--fg); font-weight: 500; }
.verdict { font-family: var(--f-display); font-weight: 500; font-size: calc(0.95rem * var(--fs-body, 1)); color: var(--orange-2); }

/* Accept */
.accept-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; margin-bottom: 14px; }
.accept-grid > * { min-width: 0; }
#accept .slide-inner { max-width: 820px; }
.rules { display: grid; gap: 10px; align-content: start; }
.rules li {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 14px;
  align-items: start;
  padding: 12px 16px;
  background: var(--glass);
  border: 1px solid var(--line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.rules li > b {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border: 1px solid var(--orange);
  color: var(--orange);
  font-size: calc(1.1rem * var(--fs-num, 1));
  box-shadow: inset 0 0 14px rgba(247, 147, 26, 0.25);
}
.rules h3 { font-family: var(--f-display); font-weight: 500; font-size: calc(0.98rem * var(--fs-body, 1)); margin-bottom: 2px; }
.rules p { font-size: calc(0.86rem * var(--fs-body, 1)); color: var(--fg-2); }

.accept-side { display: grid; gap: 14px; align-content: start; }
.cd { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 10px 0; }
.cd > div { display: grid; justify-items: center; padding: 7px 0 5px; background: rgba(var(--tint-rgb), 0.03); border: 1px solid var(--line); }
.cd b { font-size: calc(clamp(1.25rem, 2vw, 1.7rem) * var(--fs-num, 1)); font-weight: 500; color: var(--fg); }
.cd span { font-size: calc(9.5px * var(--fs-label, 1)); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }

.share { display: grid; gap: 10px; }
.accept-side .panel { padding: 16px 20px; }
.share-row .btn-sm { padding: 11px 14px; }
.share-row { display: flex; flex-wrap: wrap; gap: 8px; }

.legal { font-size: calc(0.72rem * var(--fs-body, 1)); color: var(--muted); }
.legal p { margin: 0; }
.site-foot { margin-top: 10px !important; letter-spacing: 0.04em; opacity: 0.85; }

/* links to the Face the Bitcoin filter page: top bar, "I'm in" panel, banner */
.face-link svg, .face-btn svg, .face-banner-icon svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.face-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 14px 0 12px;
  border: 1px solid rgba(247, 147, 26, 0.55);
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--orange-2);
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 0 16px rgba(247, 147, 26, 0.18);
  transition: border-color 0.2s, box-shadow 0.2s, color 0.2s;
}
.face-link:hover { border-color: var(--orange); color: var(--fg); box-shadow: 0 0 22px var(--orange-glow); }
.face-link svg { width: 26px; height: 13px; flex: none; }
.face-btn { gap: 10px; }
.face-btn svg { width: 28px; height: 14px; flex: none; color: var(--orange); }

.face-banner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin-bottom: 14px;
  padding: 16px 22px;
  border: 1px solid rgba(247, 147, 26, 0.5);
  background:
    radial-gradient(120% 160% at 0% 50%, rgba(247, 147, 26, 0.2), transparent 60%),
    var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  color: var(--fg);
  text-decoration: none;
  transition: background 0.25s, border-color 0.25s;
}
.face-banner:hover { border-color: var(--orange); background: radial-gradient(120% 160% at 0% 50%, rgba(247, 147, 26, 0.32), transparent 65%), var(--glass); }
.face-banner-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--orange);
  color: #140a00;
  box-shadow: 0 0 26px var(--orange-glow);
}
.face-banner-icon svg { width: 38px; height: 19px; stroke-width: 2.4; }
.face-banner-text { display: grid; gap: 4px; min-width: 0; }
.face-banner-title { font-family: var(--f-display); font-weight: 700; font-size: calc(clamp(1.05rem, 2vw, 1.5rem) * var(--fs-title, 1)); line-height: 1.15; }
.face-banner-title em { font-style: normal; color: var(--orange); }
.face-banner-sub { font-size: calc(0.82rem * var(--fs-body, 1)); color: var(--fg-2); }
.face-banner-go {
  padding: 10px 14px;
  border: 1px solid var(--orange);
  color: var(--orange-2);
  font-size: calc(11px * var(--fs-btn, 1));
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}
.face-banner-go i { font-style: normal; display: inline-block; transition: transform 0.2s; }
.face-banner:hover .face-banner-go i { transform: translateX(4px); }
@media (max-width: 1100px) {
  .face-link span { display: none; }
  .face-link { padding: 0 10px; }
}
@media (max-width: 760px) {
  /* room for the extra icon in the top bar: tighter gaps, the price without the "BTC" label */
  .top-right { gap: 6px; }
  .face-link { padding: 0 8px; }
  .face-link svg { width: 24px; height: 12px; }
  .ticker { padding: 4px; }
  .tick { gap: 6px; padding: 4px 8px; font-size: 0; }
  .tick b { font-size: 11.5px; }
}
@media (max-width: 400px) {
  .top-right { gap: 4px; }
  .ticker .live-dot { display: none; }
  .tick { padding: 4px 6px; }
}
@media (max-width: 760px) {
  .face-banner { grid-template-columns: auto minmax(0, 1fr); gap: 12px 14px; padding: 14px 16px; }
  .face-banner-icon { width: 46px; height: 46px; }
  .face-banner-icon svg { width: 30px; height: 15px; }
  .face-banner-sub { display: none; }
  .face-banner-go { grid-column: 1 / -1; text-align: center; }
}
@media (max-height: 820px) and (min-width: 761px) {
  .face-banner { padding: 12px 18px; margin-bottom: 10px; }
  .face-banner-icon { width: 48px; height: 48px; }
}

/* minted coins counter (js/counter.js) */
.mint-counter {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 10px 14px;
  border: 1px dashed var(--line-2);
  border-radius: 10px;
  font-size: calc(0.8rem * var(--fs-body, 1));
  color: var(--fg-2);
}
.mint-counter b { display: inline-block; font-size: calc(1.25rem * var(--fs-num, 1)); color: var(--orange); font-weight: 700; }
.mint-counter.is-bump b { animation: mint-bump 0.9s var(--ease); }
@keyframes mint-bump {
  0% { transform: scale(1); }
  30% { transform: scale(1.35); text-shadow: 0 0 18px var(--orange-glow); }
  100% { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) { .mint-counter.is-bump b { animation: none; } }

/* ---------- Bottom HUD ---------- */

.hud-bottom {
  position: fixed;
  left: var(--pad-x);
  right: var(--pad-x);
  bottom: 24px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 18px;
  pointer-events: none;
  font-size: 11px;
  color: var(--muted);
}
.counter b { color: var(--fg); font-size: 14px; font-weight: 500; }
.counter span { margin-left: 6px; }
.progress { width: 120px; height: 1px; background: var(--line-2); position: relative; }
.progress i { position: absolute; inset: 0 auto 0 0; width: 12.5%; background: var(--orange); box-shadow: 0 0 8px var(--orange); transition: width 0.9s var(--ease); }
.hint { margin-left: auto; display: flex; align-items: center; gap: 10px; letter-spacing: 0.24em; text-transform: uppercase; transition: opacity 0.5s; }
.hint-line { width: 1px; height: 28px; background: linear-gradient(var(--orange), transparent); animation: drip 1.8s var(--ease) infinite; transform-origin: top; }
.is-last .hint { opacity: 0; }
@keyframes drip { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 70px;
  z-index: 60;
  padding: 10px 18px;
  background: var(--orange);
  color: #0b0600;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.4s var(--ease);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Responsive ---------- */

@media (max-height: 820px) and (min-width: 761px) {
  .slide { padding-top: 82px; padding-bottom: 72px; }
  .lead { margin-bottom: 16px; font-size: calc(0.97rem * var(--fs-lead, 1)); }
  .eyebrow { margin-bottom: 12px; }
  .title { margin-bottom: 14px; }
  .actions { margin-bottom: 20px; }
  .btn { padding: 13px 22px; }
  .hero-kicker { padding: 10px 20px 10px 16px; margin-bottom: 10px; }
  .hero-for { margin-bottom: 14px; }
  .display { margin-bottom: 16px; }
  .mini-stats { padding-top: 14px; }
  .stat-grid { margin-bottom: 16px; }
  .stat { padding: 12px 16px; }
  .stat-result { padding: 10px 16px; }
  .stat b { font-size: calc(clamp(1.3rem, 2.2vw, 1.8rem) * var(--fs-num, 1)); }
  .supply { margin-bottom: 12px; }
  .accept-grid { gap: 10px; margin-bottom: 10px; }
  .rules { gap: 8px; }
  .rules li { padding: 10px 14px; }
  .rules p { font-size: calc(0.82rem * var(--fs-body, 1)); }
  .accept-side { gap: 10px; }
  .accept-side .panel { padding: 12px 18px; }
  .cd { margin: 8px 0; }
  .cd > div { padding: 5px 0 4px; }
  .holders { padding: 12px 18px; margin-bottom: 10px; }
  .h-tabs { margin-bottom: 8px; }
  .holders .h-list { max-height: 8.6rem; }
  .h-chart { gap: 6px; }
  .h-bars { gap: 5px; }
  .h-kpi b { font-size: calc(1.3rem * var(--fs-num, 1)); }
  .holders-group li { line-height: 1.45; }
  .you-row { padding: 9px 12px 9px 18px; }
  .mint-side { gap: 12px; }
  .starter { margin-bottom: 8px; }
  .st-scen { padding: 9px 12px; margin-top: 4px; }
  #starter .lead { display: none; }
  #starter .calc-inputs { gap: 10px; }
  #starter .field { gap: 4px; }
  .starter-result { gap: 3px; }
}

@media (max-width: 1100px) {
  .accept-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 1020px) {
  .brand-text { display: none; }
}

@media (max-width: 980px) {
  .calc, .starter { grid-template-columns: 1fr; }
  .result { padding-left: 0; border-left: 0; padding-top: 18px; border-top: 1px solid var(--line); }
}

/* Portrait tablets / tall windows: 3D on top, text below */
@media (min-width: 761px) and (max-aspect-ratio: 1/1) {
  .shade {
    background:
      linear-gradient(0deg, rgba(var(--shade-rgb), 0.96) 0%, rgba(var(--shade-rgb), 0.82) 42%, rgba(var(--shade-rgb), 0.15) 72%, rgba(var(--shade-rgb), 0.5) 100%);
  }
  .slide { align-items: flex-end; padding-bottom: 70px; }
}

@media (max-width: 760px) {
  :root { --cut: 10px; }
  .shade {
    background:
      linear-gradient(0deg, rgba(var(--shade-rgb), 0.96) 0%, rgba(var(--shade-rgb), 0.85) 45%, rgba(var(--shade-rgb), 0.2) 75%, rgba(var(--shade-rgb), 0.5) 100%);
  }
  .topbar { padding-top: 14px; }
  .brand-text { display: none; }
  .hero-kicker { padding: 10px 16px 10px 14px; margin-bottom: 10px; }
  .hero-kicker .k1 { font-size: calc(0.85rem * var(--fs-kicker, 1)); }
  .hero-kicker .k2 { font-size: calc(1.45rem * var(--fs-kicker, 1)); }
  .hero-for { font-size: calc(10px * var(--fs-label, 1)); letter-spacing: 0.12em; margin-bottom: 12px; }
  .slide { align-items: flex-end; padding: 72px 16px 64px; perspective-origin: 50% 80%; }
  .slide-inner { max-width: none; }
  .dots { right: 6px; gap: 2px; }
  .dot .dot-label { display: none; }
  .dot .dot-bar { width: 8px; }
  .dot.is-active .dot-bar { width: 16px; }
  .display { font-size: calc(clamp(1.7rem, 8.4vw, 2.4rem) * var(--fs-display, 1)); margin-bottom: 14px; }
  .title { font-size: calc(clamp(1.6rem, 7.6vw, 2.1rem) * var(--fs-title, 1)); margin-bottom: 14px; }
  .lead { font-size: calc(0.95rem * var(--fs-lead, 1)); margin-bottom: 18px; }
  .eyebrow { font-size: calc(10.5px * var(--fs-label, 1)); margin-bottom: 12px; }
  .actions { margin-bottom: 22px; }
  .actions .btn { flex: 1 1 auto; }
  .mini-stats { display: grid; grid-template-columns: repeat(3, auto); justify-content: space-between; padding-top: 14px; }
  .mini-stats > div { padding-right: 0; margin-right: 0; border-right: 0; }
  .mini-stats dt { font-size: calc(9px * var(--fs-label, 1)); letter-spacing: 0.12em; }
  .mini-stats dd { font-size: calc(0.85rem * var(--fs-num, 1)); }
  .btn { padding: 13px 20px; }
  #holders .lead { display: none; }
  .holders { padding: 10px 14px; }
  .h-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; margin-bottom: 8px; }
  .h-tab { padding: 6px 8px; border-radius: 14px; font-size: calc(9.5px * var(--fs-label, 1)); letter-spacing: 0.04em; line-height: 1.25; }
  .h-list { max-height: 9.6rem; }
  .h-chart { gap: 6px; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
  .h-kpi { grid-template-columns: auto minmax(0, 1fr); align-items: baseline; gap: 0 10px; }
  .h-kpi b { font-size: calc(1.2rem * var(--fs-num, 1)); grid-row: span 2; }
  .h-chart-title { display: none; }
  .h-bars { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; }
  .h-bar { font-size: calc(0.7rem * var(--fs-body, 1)); }
  #starter .lead { display: none; }
  .starter { gap: 14px; }
  .st-total { font-size: calc(1.5rem * var(--fs-num, 1)); }
  .st-foot .btn { width: 100%; }
  /* compact phone layout, so the coin stacks stay visible above */
  .starter.panel { padding: 12px 14px; }
  #starter .calc-inputs { gap: 8px; }
  #starter .field { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0 10px; }
  #starter .field input[type="range"] { grid-column: 1 / -1; height: 22px; }
  #starter .range-scale, .st-coin { display: none; }
  #starter .calc-nw { font-size: calc(1.15rem * var(--fs-num, 1)); }
  .starter-result { padding-top: 10px; gap: 2px; }
  .st-btc b { font-size: calc(1.3rem * var(--fs-num, 1)); }
  .st-scen { grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 0 10px; padding: 8px 12px; margin-top: 6px; }
  .st-scen .label { grid-column: 1 / -1; }
  .st-total { font-size: calc(1.3rem * var(--fs-num, 1)); }
  .st-down { font-size: calc(0.72rem * var(--fs-body, 1)); }
  #starter .legend { font-size: calc(0.72rem * var(--fs-body, 1)); }
  #starter .source { font-size: calc(0.66rem * var(--fs-body, 1)); margin-top: 8px; }
  .st-foot { gap: 8px; }
  .mint { padding: 0; align-items: stretch; }
  .mint-panel { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 52px 16px 20px; overflow-y: auto; align-content: start; }
  .mint-stage { justify-self: center; }
  .mint-stage canvas { height: auto; width: min(100%, 44vh * 0.8); }
  .mint-side { gap: 12px; }
  .holders-group ul { gap: 0; }
  .holders-group { --cols: minmax(0, 1fr) 4.6em 6.2em; }
  .holders-group li { font-size: calc(0.82rem * var(--fs-body, 1)); gap: 8px; line-height: 1.38; }
  .h-code { display: none; }
  .h-name { white-space: normal; }
  .holders-group ul { gap: 2px; }
  #holders .source { font-size: calc(0.68rem * var(--fs-body, 1)); margin-top: 8px; }
  #holders .title { margin-bottom: 10px; }
  .h-head { gap: 8px; }
  .h-pct, .h-num { font-size: calc(0.8rem * var(--fs-num, 1)); }
  .you-row { grid-template-columns: auto auto minmax(0, 1fr); gap: 10px; padding: 12px 14px; }
  .you-row .btn { grid-column: 1 / -1; }
  .you-line { font-size: calc(0.82rem * var(--fs-body, 1)); }
  .rules p { font-size: calc(0.82rem * var(--fs-body, 1)); }
  .calc { gap: 16px; }
  .calc-nw { font-size: calc(1.5rem * var(--fs-num, 1)); }
  .result-main .mono { font-size: calc(1.5rem * var(--fs-num, 1)); }
  .stat { padding: 12px 14px; }
  .panel { padding: 16px 18px; }
  .supply-facts dd { font-size: calc(0.82rem * var(--fs-num, 1)); }
  .hud-bottom { bottom: 16px; left: 16px; right: 16px; }
  .progress { width: 70px; }
  .hint { display: none; }
  .hud-grid { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .rv,
  .slide.is-active .rv { transition: opacity 0.4s ease; transform: none !important; filter: none !important; transition-delay: 0s !important; }
  .loader-ring, .pulse::after, .hint-line, .live-dot.is-live { animation: none; }
  .bar i, .progress i { transition: none; }
}

/* ==========================================================================
   Scroll version: modules one after another, with space between them.
   The gap is where the 3D camera travels to the next scene.
   ========================================================================== */

:root {
  --module-gap: 40vh; /* space between modules — change to taste */
}

html {
  height: auto;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(247, 147, 26, 0.55) transparent;
}
body { height: auto; overflow: visible; }
html:has(body.modal-open) { overflow: hidden; }

.slides { position: relative; }

.slide {
  position: relative;
  inset: auto;
  min-height: 100vh;
  min-height: 100svh;
  visibility: visible;
  pointer-events: auto;
  transition: none;
}
.slide + .slide { margin-top: var(--module-gap); }
.slide:last-child { padding-bottom: 150px; }

.slide-inner {
  max-height: none;
  overflow: visible;
}

/* text slides in a little sooner than in the slide version */
.slide.is-active .rv { transition-delay: calc(var(--i, 0) * 60ms + 80ms); }

/* thin orange scrollbar in Chrome / Edge / Safari */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-thumb { background: rgba(247, 147, 26, 0.45); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

@media (max-width: 760px) {
  :root { --module-gap: 28vh; }
}

/* ==========================================================================
   Light theme (sun / moon switch in the top bar)
   ========================================================================== */

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #eef1f6;
  --bg-2: #ffffff;
  --fg: #0e1320;
  --fg-2: #39425a;
  --muted: #5d6880;
  --orange: #d47200;          /* deeper orange: readable on a light background */
  --orange-2: #9a4f00;        /* small orange text */
  --orange-glow: rgba(212, 114, 0, 0.2);
  --cyan: #08708f;
  --cyan-dim: rgba(8, 112, 143, 0.14);
  --line: rgba(14, 19, 32, 0.1);
  --line-2: rgba(14, 19, 32, 0.2);
  --glass: rgba(255, 255, 255, 0.74);
  --shade-rgb: 238, 241, 246;
  --panel-rgb: 255, 255, 255;
  --tint-rgb: 14, 19, 32;
  --good: #0b8a3f;
  --vignette: rgba(150, 160, 185, 0.3);
}
:root[data-theme="light"] .hud-grid { opacity: 0.5; }

/* the switch: sun on the left, moon on the right, the orange knob marks the theme */
.theme-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  flex: none;
  width: 66px;
  height: 34px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.2s;
}
.theme-switch:hover { border-color: var(--line-2); }
.theme-switch::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 14px var(--orange-glow);
  transform: translateX(32px);
  transition: transform 0.35s var(--ease), background 0.3s;
}
:root[data-theme="light"] .theme-switch::before { transform: translateX(0); }
.theme-switch svg { position: relative; z-index: 1; width: 16px; height: 16px; transition: color 0.3s; }
.theme-switch .i-sun { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.theme-switch .i-moon { fill: currentColor; }
:root:not([data-theme="light"]) .theme-switch .i-moon,
:root[data-theme="light"] .theme-switch .i-sun { color: #140a00; }
@media (prefers-reduced-motion: reduce) {
  .theme-switch::before { transition: none; }
}
