/* ==========================================================================
   The Orange Pill — styles
   ========================================================================== */

@property --accent { syntax: '<color>'; inherits: true; initial-value: #f7931a; }
@property --glow   { syntax: '<color>'; inherits: true; initial-value: rgba(247,147,26,.16); }

:root {
  --bg: #09090a;
  --bg-2: #111113;
  --panel: rgba(255,255,255,.035);
  --panel-2: rgba(255,255,255,.065);
  --line: rgba(255,255,255,.09);
  --line-2: rgba(255,255,255,.16);
  --ink: #f3eee6;
  --ink-2: #c8c2b7;
  --muted: #8d877d;

  --orange: #f7931a;
  --orange-hi: #ffb24a;
  --red: #ff5a4e;
  --gold: #e3b65a;
  --green: #56c288;

  --accent: var(--orange);
  --glow: rgba(247,147,26,.16);

  --serif: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --ease: cubic-bezier(.16, 1, .3, 1);
  --radius: 18px;
  --gutter: clamp(16px, 5vw, 80px);

  transition: --accent 1.4s ease, --glow 1.6s ease;
}

html[data-mood="cold"]   { --accent: var(--red);    --glow: rgba(255,80,70,.10); }
html[data-mood="gold"]   { --accent: var(--gold);   --glow: rgba(227,182,90,.12); }
html[data-mood="orange"] { --accent: var(--orange); --glow: rgba(247,147,26,.16); }

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

html {
  background: var(--bg);
  color: var(--ink);
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
@media (max-width: 860px), (max-height: 640px) {
  html { scroll-snap-type: y proximity; }
}

body {
  margin: 0;
  background: var(--bg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
strong { color: var(--ink); font-weight: 600; }
sup { font-size: .5em; vertical-align: super; line-height: 0; }

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

/* ---------- ambient layers ---------- */
[hidden] { display: none !important; }
#rain { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; opacity: .2; }
.glow {
  position: fixed; inset: -20%; z-index: 0; pointer-events: none;
  background:
    radial-gradient(40% 35% at 78% 22%, var(--glow), transparent 70%),
    radial-gradient(35% 30% at 12% 88%, var(--glow), transparent 70%);
}
.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- chrome: progress, topbar, dots, hud ---------- */
#progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 50; background: rgba(255,255,255,.05); }
#progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--orange-hi)); box-shadow: 0 0 12px var(--accent); transition: width .6s var(--ease); }

.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px var(--gutter);
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: .92rem; letter-spacing: .01em; }
.brand-mark {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--orange); color: #1a1006; font-weight: 700; transform: rotate(14deg);
  box-shadow: 0 0 24px rgba(247,147,26,.45);
}
.menu-btn {
  display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-radius: 999px;
  background: rgba(20,20,22,.6); border: 1px solid var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font-size: .85rem; transition: border-color .3s, background .3s;
}
.menu-btn:hover { border-color: var(--line-2); background: rgba(30,30,33,.8); }
.menu-btn i { width: 16px; height: 8px; border-top: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; }

#dots {
  position: fixed; right: 22px; top: 50%; transform: translateY(-50%); z-index: 40;
  display: flex; flex-direction: column; gap: 7px;
}
#dots button {
  position: relative; width: 6px; height: 6px; padding: 0; border: 0; border-radius: 3px;
  background: rgba(255,255,255,.2); transition: height .4s var(--ease), background .3s;
}
#dots button.chap { margin-top: 7px; background: rgba(255,255,255,.38); }
#dots button:first-child { margin-top: 0; }
#dots button:hover { background: rgba(255,255,255,.6); }
#dots button.active { height: 22px; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
#dots button::after {
  content: attr(data-label); position: absolute; right: 18px; top: 50%; transform: translate(6px, -50%);
  white-space: nowrap; font-size: .75rem; font-family: var(--mono); color: var(--ink-2);
  background: rgba(17,17,19,.92); border: 1px solid var(--line); padding: 4px 9px; border-radius: 6px;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
#dots button:hover::after, #dots button:focus-visible::after { opacity: 1; transform: translate(0, -50%); }
@media (max-width: 860px), (max-height: 660px) { #dots { display: none; } }

.hud {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px var(--gutter) calc(14px + env(safe-area-inset-bottom));
  font-family: var(--mono); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
  pointer-events: none;
}
.hud::before { content: ''; position: absolute; inset: -30px 0 0; background: linear-gradient(transparent, rgba(9,9,10,.85)); z-index: -1; }
.hud-chapter { color: var(--ink-2); transition: opacity .4s; }
.hud-chapter.swap { opacity: 0; }
.hud-ctrl { display: flex; align-items: center; gap: 10px; pointer-events: auto; }
.hud-btn {
  width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: rgba(20,20,22,.6);
  display: grid; place-items: center; transition: border-color .3s, color .3s;
}
.hud-btn:hover { border-color: var(--accent); color: var(--accent); }
.hud-count { min-width: 64px; text-align: center; font-variant-numeric: tabular-nums; }

/* ---------- menu overlay ---------- */
#menu {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px var(--gutter);
  background: rgba(8,8,9,.78); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  opacity: 0; transition: opacity .4s var(--ease);
}
#menu[hidden] { display: none; }
#menu.open { opacity: 1; }
.menu-inner { width: 100%; max-width: 860px; }
.menu-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.menu-close { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: transparent; }
.menu-close:hover { border-color: var(--orange); color: var(--orange); }
.menu-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 32px; }
.menu-list li { opacity: 0; transform: translateY(14px); transition: opacity .5s var(--ease), transform .6s var(--ease); transition-delay: calc(var(--i) * 45ms); }
#menu.open .menu-list li { opacity: 1; transform: none; }
.menu-list a {
  display: flex; gap: 18px; align-items: baseline; padding: 14px 4px; text-decoration: none;
  border-bottom: 1px solid var(--line); font-family: var(--serif); font-size: clamp(1.15rem, 2.4vw, 1.6rem); font-weight: 350;
  transition: color .25s, padding .35s var(--ease);
}
.menu-list a span { font-family: var(--mono); font-size: .75rem; color: var(--muted); min-width: 34px; }
.menu-list a:hover, .menu-list a.current { color: var(--orange); padding-left: 12px; }
.menu-video {
  display: inline-flex; align-items: center; gap: 12px; margin-top: 22px; padding: 10px 18px 10px 10px; border-radius: 999px;
  border: 1px solid var(--line-2); text-decoration: none; font-weight: 600; transition: border-color .25s, color .25s, background .25s;
}
.menu-video-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--orange); color: #1b1004; font-size: .7rem; padding-left: 2px; }
.menu-video small { font-family: var(--mono); font-size: .72rem; color: var(--muted); font-weight: 400; }
.menu-video:hover { border-color: var(--orange); color: var(--orange); background: rgba(247,147,26,.06); }
.share-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; }
.share-chip {
  appearance: none; display: inline-flex; align-items: center; gap: 4px; cursor: pointer;
  padding: 8px 15px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(255,255,255,.03);
  color: var(--ink-2); font: 500 .82rem/1.2 var(--sans); text-decoration: none; transition: color .2s, border-color .2s, background .2s;
}
.share-chip:hover { color: var(--orange); border-color: rgba(247,147,26,.55); }
.share-chip:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.share-chip.video-chip { border-color: rgba(247,147,26,.45); color: var(--orange); background: rgba(247,147,26,.06); }
.share-chip.video-chip:hover { background: rgba(247,147,26,.12); }
.menu-keys { margin-top: 26px; color: var(--muted); font-size: .82rem; }
kbd { font-family: var(--mono); font-size: .75rem; padding: 2px 6px; border: 1px solid var(--line-2); border-radius: 5px; color: var(--ink-2); }
@media (max-width: 640px) { .menu-list { grid-template-columns: 1fr; } .menu-keys { display: none; } }

/* ---------- slides ---------- */
#deck { position: relative; z-index: 2; }
.slide {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  padding: 104px var(--gutter) 96px;
  scroll-snap-align: start;
}
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; }
.wrap.narrow { max-width: 880px; }
.center { text-align: center; }
.center .lead, .center-p { margin-left: auto; margin-right: auto; }

.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(28px, 5vw, 76px); align-items: center; }
.split.wide-right { grid-template-columns: .9fr 1.1fr; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, 1fr); gap: clamp(16px, 3vw, 40px); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.mt { margin-top: clamp(22px, 3.4vh, 40px); }

@media (max-width: 1020px) { .g4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 860px) {
  .split, .split.wide-right { grid-template-columns: 1fr; }
  .g3, .g2 { grid-template-columns: 1fr; }
}
@media (max-width: 560px) { .g4 { grid-template-columns: 1fr; } }

/* ---------- type ---------- */
h1, h2, h3 { margin: 0; font-weight: 400; }
h1 {
  font-family: var(--serif); font-weight: 300; font-variation-settings: 'opsz' 144;
  font-size: clamp(3.8rem, 10.5vw, 9.4rem); line-height: .88; letter-spacing: -.035em;
}
.o { color: var(--orange); font-style: italic; font-weight: 380; text-shadow: 0 0 60px rgba(247,147,26,.35); }
.display {
  font-family: var(--serif); font-weight: 340; font-variation-settings: 'opsz' 144;
  font-size: clamp(2.1rem, 4.9vw, 4.3rem); line-height: 1.03; letter-spacing: -.028em; max-width: 20ch;
  text-wrap: balance;
}
.center .display { margin-left: auto; margin-right: auto; }
.display em, .hero-sub em { font-style: italic; color: var(--accent); font-weight: 380; }
.display.huge { font-size: clamp(2.3rem, 5.6vw, 4.9rem); max-width: 22ch; }
h3 { font-family: var(--sans); font-weight: 600; font-size: 1.02rem; letter-spacing: -.005em; margin-bottom: 6px; }

.kicker {
  display: flex; align-items: center; gap: 12px; margin: 0 0 18px;
  font-family: var(--mono); font-size: .74rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent);
}
.kicker::before { content: ''; width: 26px; height: 1px; background: currentColor; flex: none; }
.card .kicker, .stat .kicker { margin-bottom: 8px; font-size: .68rem; }
.card .kicker::before, .stat .kicker::before { display: none; }
.center-k { justify-content: center; }
.center-k::after { content: ''; width: 26px; height: 1px; background: currentColor; }

.lead { font-size: clamp(1.02rem, 1.45vw, 1.2rem); line-height: 1.6; color: var(--ink-2); max-width: 62ch; margin: 18px 0 0; text-wrap: pretty; }
.lead.small { font-size: 1rem; }
.punch { font-family: var(--serif); font-size: clamp(1.4rem, 2.6vw, 2.2rem); line-height: 1.2; letter-spacing: -.015em; margin: 28px 0 0; font-weight: 350; }
.accent { color: var(--accent); font-style: italic; }
.neg { color: var(--red); }
.pos { color: var(--green); }
.src { font-family: var(--mono); font-size: .7rem; color: var(--muted); letter-spacing: .02em; margin: 12px 0 0; line-height: 1.5; }
.big-line { font-family: var(--serif); font-size: clamp(1.5rem, 3vw, 2.4rem); line-height: 1.2; margin: 18px 0 0; font-weight: 330; letter-spacing: -.015em; }
.mega {
  font-family: var(--serif); font-weight: 300; font-variation-settings: 'opsz' 144;
  font-size: clamp(3.6rem, 12vw, 10rem); line-height: .9; letter-spacing: -.045em; margin: 10px 0 0;
  font-variant-numeric: lining-nums;
}

/* ---------- cards & stats ---------- */
.card {
  position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 22px 24px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: border-color .4s, background .4s, transform .5s var(--ease);
}
.card:hover { border-color: var(--line-2); background: var(--panel-2); }
.card p { margin: 0; color: var(--ink-2); line-height: 1.55; font-size: .96rem; }
.card h3 + p { margin-top: 2px; }
.card-n { display: block; font-family: var(--mono); font-size: .72rem; color: var(--accent); margin-bottom: 14px; }
.card.hl { border-color: rgba(247,147,26,.55); background: linear-gradient(160deg, rgba(247,147,26,.14), rgba(247,147,26,.03)); box-shadow: 0 20px 60px -20px rgba(247,147,26,.35); }

.stat { display: flex; flex-direction: column; gap: 8px; }
.stat .num {
  font-family: var(--serif); font-weight: 350; font-size: clamp(1.9rem, 3.4vw, 2.9rem); line-height: 1.02; letter-spacing: -.025em;
  color: var(--accent); font-variant-numeric: lining-nums;
}
.stat .num small { font-size: .5em; color: var(--muted); font-style: italic; }
.stat .lbl { color: var(--ink-2); font-size: .94rem; line-height: 1.5; }
.stat .lbl small { color: var(--muted); }
.stat .src { margin-top: auto; padding-top: 6px; }
.stats-col { display: flex; flex-direction: column; gap: 22px; margin-top: 30px; }
.stats-col .stat { flex-direction: row; align-items: baseline; gap: 18px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.stats-col .num { min-width: 3.2ch; font-size: clamp(2.4rem, 4.4vw, 3.6rem); }

.countries .num { display: block; font-family: var(--serif); font-size: clamp(1.8rem, 3vw, 2.5rem); color: var(--accent); line-height: 1.1; margin: 4px 0 8px; letter-spacing: -.02em; }
.flag { font-family: var(--mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .16em; color: var(--muted); }

.row-note { display: flex; justify-content: space-between; gap: 24px; align-items: flex-end; flex-wrap: wrap; margin-top: 14px; }
.row-note p:first-child { margin: 0; color: var(--ink-2); max-width: 64ch; }

/* ---------- buttons ---------- */
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 34px; }
.cta.center { justify-content: center; }
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; border-radius: 999px;
  border: 1px solid transparent; font-weight: 600; font-size: .95rem; letter-spacing: .005em; overflow: hidden;
  transition: transform .4s var(--ease), box-shadow .4s, border-color .3s, background .3s;
}
.btn.primary { background: var(--orange); color: #1b1004; box-shadow: 0 10px 40px -8px rgba(247,147,26,.6); }
.btn.primary:hover { transform: translateY(-2px); box-shadow: 0 16px 50px -8px rgba(247,147,26,.8); }
.btn.primary::after {
  content: ''; position: absolute; inset: 0; transform: translateX(-120%);
  background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.5) 50%, transparent 70%);
  transition: transform .9s var(--ease);
}
.btn.primary:hover::after { transform: translateX(120%); }
.btn.ghost { background: rgba(255,255,255,.03); border-color: var(--line-2); color: var(--ink); }
.btn.ghost:hover { border-color: var(--orange); color: var(--orange); }
.btn.tiny { padding: 6px 12px; font-size: .78rem; }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }

/* ---------- reveal transitions ---------- */
.r {
  opacity: 0; transform: translateY(30px); filter: blur(8px);
  transition: opacity .9s var(--ease), transform 1.2s var(--ease), filter 1s var(--ease);
  transition-delay: calc(var(--d, 0) * 95ms + 80ms);
}
.r.zoom { transform: scale(.9); }
.r.wipe { transform: none; filter: none; clip-path: inset(0 100% 0 0); transition: opacity .3s, clip-path 1.3s var(--ease); }
.slide.in .r { opacity: 1; transform: none; filter: none; }
.slide.in .r.wipe { clip-path: inset(0 -10% 0 0); }
.no-js .r { opacity: 1; transform: none; filter: none; clip-path: none; }

/* ---------- hero ---------- */
.hero-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 40px; align-items: center; }
.hero-sub { font-family: var(--serif); font-size: clamp(1.5rem, 3vw, 2.4rem); line-height: 1.18; margin: 28px 0 0; font-weight: 330; letter-spacing: -.015em; }
.hero .lead { max-width: 54ch; }
.pill-stage { position: relative; aspect-ratio: 1; display: grid; place-items: center; max-width: 480px; width: 100%; justify-self: center; }
.orbit { position: absolute; border-radius: 50%; border: 1px solid rgba(247,147,26,.22); }
.orbit.o1 { inset: 4%; animation: spin 40s linear infinite; border-style: dashed; }
.orbit.o2 { inset: 16%; border-color: rgba(247,147,26,.14); animation: spin 26s linear infinite reverse; }
.orbit.o3 { inset: 28%; border-color: rgba(247,147,26,.30); background: radial-gradient(circle, rgba(247,147,26,.18), transparent 70%); }
.orbit.o1::after { content: ''; position: absolute; top: -4px; left: 50%; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 16px var(--orange); }
.orbit.o2::after { content: ''; position: absolute; bottom: 12%; right: 4%; width: 5px; height: 5px; border-radius: 50%; background: var(--ink); opacity: .7; }
.pill-tilt {
  position: relative; width: 80%; z-index: 1;
  transform: perspective(900px) rotateX(var(--tx, 0deg)) rotateY(var(--ty, 0deg));
  transition: transform .8s var(--ease);
}
.pill-float {
  animation: float 7s ease-in-out infinite;
  filter: drop-shadow(0 28px 38px rgba(247,147,26,.32)) drop-shadow(0 8px 12px rgba(0,0,0,.55));
  transition: filter .6s;
}
.pill-stage:hover .pill-float { filter: drop-shadow(0 28px 60px rgba(247,147,26,.55)) drop-shadow(0 8px 12px rgba(0,0,0,.55)); }
.pill-svg { display: block; width: 100%; height: auto; overflow: visible; }
.pill-shadow { position: absolute; bottom: 12%; width: 46%; height: 6%; border-radius: 50%; background: radial-gradient(rgba(0,0,0,.65), transparent 70%); animation: shadow 7s ease-in-out infinite; }
.scroll-hint {
  position: absolute; left: 50%; bottom: 74px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.scroll-hint i { width: 1px; height: 36px; background: linear-gradient(var(--orange), transparent); animation: drip 2.2s var(--ease) infinite; transform-origin: top; }
@media (max-height: 960px) { .scroll-hint { display: none; } }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .pill-stage { order: -1; max-width: 300px; margin: -10px auto -30px; }
  .scroll-hint { display: none; }
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 0%,100% { transform: rotate(-30deg) translateY(0); } 50% { transform: rotate(-26deg) translateY(-14px); } }
@keyframes shadow { 0%,100% { transform: scale(1); opacity: .9; } 50% { transform: scale(.82); opacity: .6; } }
@keyframes drip { 0% { transform: scaleY(0); opacity: 1; } 60% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------- chapter slides ---------- */
.chapter .wrap { position: relative; }
.numeral {
  font-family: var(--serif); font-weight: 300; font-style: italic; font-variation-settings: 'opsz' 144;
  font-size: clamp(7rem, 24vw, 19rem); line-height: .8; letter-spacing: -.04em;
  color: transparent; -webkit-text-stroke: 1.5px var(--accent);
  margin-bottom: 18px; opacity: .9;
  text-shadow: 0 0 80px var(--glow);
}
.chapter .display { font-size: clamp(2.6rem, 7vw, 6rem); max-width: 16ch; }
.chapter::after {
  content: ''; position: absolute; left: var(--gutter); right: var(--gutter); bottom: 80px; height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
  transform: scaleX(0); transform-origin: left; transition: transform 1.8s var(--ease) .5s;
}
.chapter.in::after { transform: scaleX(1); }

/* ---------- ice cube calculator ---------- */
.calc { margin-top: 28px; display: grid; gap: 18px; max-width: 520px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field > span { font-family: var(--mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.field > span strong { color: var(--ink); }
.money-input { display: flex; align-items: center; border: 1px solid var(--line-2); border-radius: 12px; background: rgba(255,255,255,.03); padding: 0 14px; transition: border-color .3s; }
.money-input:focus-within { border-color: var(--accent); }
.money-input i { font-style: normal; color: var(--muted); font-family: var(--mono); }
.money-input input, .field input[type=text] {
  width: 100%; background: transparent; border: 0; color: var(--ink); font: 500 1.05rem var(--mono); padding: 12px 8px; outline: none;
}
.field input[type=text] { border: 1px solid var(--line-2); border-radius: 12px; background: rgba(255,255,255,.03); padding: 12px 14px; font-size: .92rem; }
.field input[type=text]:focus { border-color: var(--accent); }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 26px; background: transparent; }
input[type=range]::-webkit-slider-runnable-track { height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--accent) var(--p, 40%), rgba(255,255,255,.12) var(--p, 40%)); }
input[type=range]::-moz-range-track { height: 3px; border-radius: 3px; background: rgba(255,255,255,.12); }
input[type=range]::-moz-range-progress { height: 3px; background: var(--accent); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -8.5px; border-radius: 50%; background: var(--ink); border: 4px solid var(--accent); box-shadow: 0 0 0 6px rgba(255,255,255,.04); }
input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--ink); border: 4px solid var(--accent); }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; padding: 5px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.02); }
.seg button {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 9px 6px; border: 0; border-radius: 10px; background: transparent;
  font-family: var(--mono); font-weight: 600; font-size: .95rem; color: var(--ink-2); transition: background .3s, color .3s;
}
.seg button small { font-family: var(--sans); font-weight: 400; font-size: .68rem; color: var(--muted); white-space: nowrap; }
.seg button[aria-checked="true"] { background: var(--accent); color: #140b04; }
.seg button[aria-checked="true"] small { color: rgba(20,11,4,.7); }
.seg.small button { padding: 8px 6px; }

.ice { display: flex; flex-direction: column; align-items: center; text-align: center; }
.ice-svg { width: min(320px, 80%); overflow: visible; }
#ice-cube { transition: transform 1s var(--ease); }
#ice-puddle { transition: rx 1s var(--ease), ry 1s var(--ease); }
.ice-out { margin-top: 6px; }
.ice-label { margin: 0; color: var(--ink-2); }
.ice-value { font-family: var(--serif); font-size: clamp(3rem, 7vw, 5.2rem); line-height: 1; margin: 10px 0; letter-spacing: -.03em; font-variant-numeric: tabular-nums lining-nums; }

/* ---------- charts ---------- */
.chart-box { margin-top: 26px; }
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid-line { stroke: rgba(255,255,255,.07); stroke-width: 1; }
.chart .axis-t { fill: var(--muted); font: 11px var(--mono); }
.chart .lbl-t { fill: var(--ink); font: 600 13px var(--sans); }
.chart .lbl-s { fill: var(--ink-2); font: 12px var(--sans); }
.chart .ann-line { stroke: rgba(255,255,255,.28); stroke-dasharray: 3 4; }
.chart .ann-t { fill: var(--ink-2); font: 11px var(--mono); }
.chart .line { fill: none; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.chart .draw { transition: stroke-dashoffset 2.6s var(--ease); }
.chart .area { opacity: 0; transition: opacity 1.6s ease .9s; }
.chart.drawn .area { opacity: 1; }
.chart .bar { transition: transform 1.2s var(--ease); transform-box: fill-box; transform-origin: bottom; }
.chart .hbar { transition: transform 1.3s var(--ease); transform-box: fill-box; transform-origin: left; }
.chart .cross { stroke: rgba(255,255,255,.35); stroke-width: 1; }
.chart .dot { stroke: var(--bg); stroke-width: 2; }
.tip {
  position: absolute; pointer-events: none; z-index: 5; transform: translate(-50%, calc(-100% - 14px));
  background: rgba(17,17,19,.95); border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 12px;
  font: 12px var(--mono); color: var(--ink-2); white-space: nowrap; opacity: 0; transition: opacity .15s;
  box-shadow: 0 10px 30px rgba(0,0,0,.4);
}
.tip b { display: block; font: 600 15px var(--sans); color: var(--ink); }
.tip.on { opacity: 1; }

/* ---------- monopoly ---------- */
.monopoly { margin-top: 12px; }

/* ---------- cantillon flow ---------- */
.flow { display: grid; grid-template-columns: 1fr 40px 1fr 40px 1fr 40px 1fr 40px 1fr; align-items: stretch; margin-top: 34px; }
.flow-node {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 18px 10px 16px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel);
}
.flow-node b { font-size: .92rem; font-weight: 600; }
.flow-node small { color: var(--muted); font-size: .8rem; }
.flow-i { font-size: 1.4rem; height: 34px; display: grid; place-items: center; color: var(--ink-2); }
.flow-node .tag { margin-top: 8px; font-style: normal; font-family: var(--mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; padding: 4px 9px; border-radius: 999px; }
.tag.t0 { background: rgba(255,255,255,.08); color: var(--ink); }
.tag.t1 { background: rgba(86,194,136,.15); color: var(--green); }
.tag.t2 { background: rgba(227,182,90,.15); color: var(--gold); }
.tag.t3 { background: rgba(255,140,80,.15); color: #ff9a5c; }
.tag.t4 { background: rgba(255,90,78,.18); color: var(--red); }
.flow-node.you { border-color: rgba(255,90,78,.5); background: rgba(255,90,78,.06); }
.flow-arrow { position: relative; display: grid; place-items: center; }
.flow-arrow::before { content: ''; position: absolute; left: 4px; right: 4px; top: 50%; height: 1px; background: var(--line-2); }
.flow-arrow::after { content: ''; position: absolute; right: 4px; top: 50%; width: 7px; height: 7px; border-top: 1px solid var(--line-2); border-right: 1px solid var(--line-2); transform: translateY(-50%) rotate(45deg); }
.flow-arrow i { position: absolute; left: 4px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); animation: flow 1.8s linear infinite; }
@keyframes flow { from { left: 4px; opacity: 0; } 20% { opacity: 1; } 80% { opacity: 1; } to { left: calc(100% - 10px); opacity: 0; } }
@media (max-width: 860px) {
  .flow { grid-template-columns: 1fr; }
  .flow-arrow { height: 28px; }
  .flow-arrow::before { left: 50%; right: auto; top: 4px; bottom: 4px; width: 1px; height: auto; }
  .flow-arrow::after { right: auto; left: 50%; top: auto; bottom: 4px; transform: translateX(-50%) rotate(135deg); }
  .flow-arrow i { left: 50%; margin-left: -3px; top: 4px; animation-name: flowv; }
  .flow-node { flex-direction: row; justify-content: flex-start; flex-wrap: wrap; text-align: left; gap: 4px 12px; padding: 12px 16px; }
  .flow-node .tag { margin: 0 0 0 auto; }
  .flow-i { height: auto; }
}
@keyframes flowv { from { top: 4px; opacity: 0; } 20%, 80% { opacity: 1; } to { top: calc(100% - 10px); opacity: 0; } }

/* ---------- battery ---------- */
.battery-wrap { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.battery {
  position: relative; width: min(340px, 80%); aspect-ratio: 2.2; border: 3px solid var(--ink-2); border-radius: 22px; padding: 10px;
}
.battery-cap { position: absolute; right: -16px; top: 32%; bottom: 32%; width: 10px; border-radius: 0 6px 6px 0; background: var(--ink-2); }
.battery-level {
  height: 100%; border-radius: 12px; background: linear-gradient(90deg, var(--gold), var(--orange));
  box-shadow: 0 0 40px rgba(247,147,26,.35); transform-origin: left; animation: drain 6s ease-in-out infinite;
}
@keyframes drain { 0%, 12% { transform: scaleX(1); filter: saturate(1); } 85%, 100% { transform: scaleX(.32); filter: saturate(.3) brightness(.85); } }
.battery-cap-label { display: flex; flex-direction: column; align-items: center; gap: 4px; font-family: var(--mono); font-size: .8rem; color: var(--ink-2); margin: 0; text-transform: uppercase; letter-spacing: .1em; }

/* ---------- properties ---------- */
.prop i { display: block; width: 34px; height: 34px; margin-bottom: 16px; color: var(--accent); }
.prop i svg { width: 100%; height: 100%; }
.prop.note { background: transparent; border-style: dashed; display: flex; align-items: center; }

/* ---------- beads ---------- */
.beads { display: grid; place-items: center; min-height: 300px; }
.bead-strand { position: relative; width: min(420px, 90%); aspect-ratio: 1; }
.bead {
  position: absolute; border-radius: 50%; transform: translate(-50%, -50%);
  box-shadow: inset -4px -6px 10px rgba(0,0,0,.45), inset 4px 4px 8px rgba(255,255,255,.35), 0 8px 20px rgba(0,0,0,.4);
  animation: beadIn .8s var(--ease) both;
}
.bead::after { content: ''; position: absolute; inset: 38%; border-radius: 50%; background: rgba(0,0,0,.55); }
@keyframes beadIn { from { opacity: 0; transform: translate(-50%, -50%) scale(.2); } }

/* ---------- timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0 0 0 26px; position: relative; display: flex; flex-direction: column; gap: 18px; }
.timeline::before { content: ''; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 1px; background: linear-gradient(var(--line-2), var(--orange)); }
.timeline li { position: relative; display: flex; flex-direction: column; gap: 2px; }
.timeline li::before { content: ''; position: absolute; left: -26px; top: 7px; width: 11px; height: 11px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); }
.timeline b { font-family: var(--serif); font-size: 1.5rem; font-weight: 400; color: var(--accent); }
.timeline span { color: var(--ink-2); font-size: .95rem; line-height: 1.55; }
.timeline li.hl::before { background: var(--orange); border-color: var(--orange); box-shadow: 0 0 16px var(--orange); }
.timeline li.hl b { color: var(--orange); }
.timeline li.hl span { color: var(--ink); font-weight: 600; }

/* ---------- genesis block ---------- */
.block-card {
  font-family: var(--mono); border: 1px solid rgba(247,147,26,.45); border-radius: 20px; padding: 24px;
  background: linear-gradient(160deg, rgba(247,147,26,.10), rgba(255,255,255,.015) 50%);
  box-shadow: 0 30px 80px -30px rgba(247,147,26,.45), inset 0 1px 0 rgba(255,255,255,.06);
}
.block-head { display: flex; align-items: center; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--line); font-size: .78rem; letter-spacing: .16em; color: var(--muted); }
.block-head b { font-size: 1.6rem; color: var(--orange); letter-spacing: 0; font-weight: 500; }
.pulse { margin-left: auto; width: 9px; height: 9px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 0 rgba(247,147,26,.7); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 12px rgba(247,147,26,0); } 100% { box-shadow: 0 0 0 0 rgba(247,147,26,0); } }
.block-card dl { margin: 14px 0; display: grid; gap: 10px; }
.block-card dl div { display: flex; justify-content: space-between; gap: 16px; font-size: .8rem; }
.block-card dt { color: var(--muted); }
.block-card dd { margin: 0; color: var(--ink-2); text-align: right; overflow-wrap: anywhere; }
.block-msg { margin-top: 6px; padding: 16px; border-radius: 12px; background: rgba(0,0,0,.35); border: 1px dashed rgba(247,147,26,.35); }
.block-msg span { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.block-msg p { margin: 8px 0 0; color: var(--orange-hi); font-size: .98rem; line-height: 1.5; }

/* ---------- supply ---------- */
.supply-top { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: end; }
#supply .mega { color: var(--orange); text-shadow: 0 0 80px rgba(247,147,26,.3); font-size: clamp(3.2rem, 10vw, 8.4rem); }
#supply .lead { max-width: 56ch; }
.live { position: relative; padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.live-dot { position: absolute; top: 22px; right: 22px; width: 8px; height: 8px; border-radius: 50%; background: var(--green); animation: pulseG 2s infinite; }
@keyframes pulseG { 0% { box-shadow: 0 0 0 0 rgba(86,194,136,.6); } 70% { box-shadow: 0 0 0 10px rgba(86,194,136,0); } 100% { box-shadow: 0 0 0 0 rgba(86,194,136,0); } }
.live-k { margin: 0; font-family: var(--mono); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.live-v { margin: 6px 0 4px; font-family: var(--mono); font-size: clamp(1.4rem, 2.6vw, 2rem); font-weight: 500; font-variant-numeric: tabular-nums; }
.live-s { margin: 0; color: var(--ink-2); font-size: .85rem; }
#supply .chart-box { margin-top: 18px; }
@media (max-width: 860px) { .supply-top { grid-template-columns: 1fr; gap: 20px; } }

.chain { display: flex; flex-direction: column; gap: 6px; margin: 12px 0 0 !important; font-family: var(--mono); font-size: .82rem !important; }
.chain span { position: relative; padding-left: 18px; }
.chain span::before { content: '↓'; position: absolute; left: 0; color: var(--muted); }
.chain span:first-child::before { content: '•'; }
.supply-cards .card h3 { font-family: var(--serif); font-weight: 400; font-size: 1.5rem; }

.step-n {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; margin-bottom: 16px;
  border: 1px solid var(--accent); color: var(--accent); font-family: var(--mono); font-size: .85rem;
}

/* ---------- miner ---------- */
.miner { display: flex; flex-direction: column; gap: 16px; padding: 24px; }
.mine-out { display: grid; gap: 10px; padding: 14px 16px; border-radius: 12px; background: rgba(0,0,0,.35); border: 1px solid var(--line); font-family: var(--mono); }
.mine-out div { display: grid; grid-template-columns: 60px 1fr; gap: 10px; align-items: baseline; }
.mine-out span { font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.mine-out b { font-weight: 500; font-variant-numeric: tabular-nums; }
.mine-out code { font-size: .78rem; overflow-wrap: anywhere; color: var(--ink-2); line-height: 1.5; }
.mine-out code .z { color: var(--orange); font-weight: 700; }
.miner.found .mine-out { border-color: rgba(86,194,136,.5); box-shadow: 0 0 30px -10px rgba(86,194,136,.5); }
.mine-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.mine-status { margin: 0 !important; font-size: .88rem !important; min-height: 2.8em; }
.mine-status .pos { font-weight: 600; }

/* ---------- sats / big card ---------- */
.big-card { padding: 26px; }
.sats { font-family: var(--serif); font-size: clamp(1.6rem, 3.2vw, 2.5rem) !important; color: var(--ink) !important; line-height: 1.15 !important; margin: 0 0 12px !important; letter-spacing: -.02em; }
.sats span:first-child { color: var(--ink); }

/* ---------- seed ---------- */
.seed { padding: 22px; }
.seed-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.seed-grid { list-style: none; counter-reset: w; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.seed-grid li {
  counter-increment: w; display: flex; align-items: baseline; gap: 8px; padding: 10px 12px; border-radius: 10px;
  background: rgba(0,0,0,.35); border: 1px solid var(--line); font-family: var(--mono); font-size: .9rem;
  animation: wordIn .6s var(--ease) both; animation-delay: calc(var(--i) * 45ms);
}
.seed-grid li::before { content: counter(w); font-size: .66rem; color: var(--muted); min-width: 1.4em; }
@keyframes wordIn { from { opacity: 0; transform: translateY(8px) scale(.96); filter: blur(4px); } }
.seed-warn { margin: 16px 0 0 !important; font-size: .8rem !important; color: var(--gold) !important; }
@media (max-width: 420px) { .seed-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- versus ---------- */
.versus { display: grid; grid-template-columns: 1fr auto 1fr; gap: 18px; align-items: stretch; }
.versus ul { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.versus li { position: relative; padding-left: 22px; color: var(--ink-2); font-size: .96rem; }
.vs-a li::before { content: '×'; position: absolute; left: 0; color: var(--red); font-weight: 700; }
.vs-b li::before { content: '✓'; position: absolute; left: 0; color: var(--orange); font-weight: 700; }
.vs-a h3 { color: var(--ink-2); }
.vs-b { border-color: rgba(247,147,26,.45); background: linear-gradient(160deg, rgba(247,147,26,.10), rgba(255,255,255,.02)); }
.vs-b h3 { color: var(--orange); }
.vs-mid { display: grid; place-items: center; font-family: var(--serif); font-style: italic; font-size: 1.6rem; color: var(--muted); }
@media (max-width: 860px) { .versus { grid-template-columns: 1fr; } .vs-mid { padding: 0; } }

/* ---------- matrix ---------- */
.matrix-wrap { margin-top: 24px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(12,12,14,.6); -webkit-overflow-scrolling: touch; }
.matrix { width: 100%; min-width: 760px; border-collapse: collapse; font-size: .86rem; }
.matrix th, .matrix td { padding: 9px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.matrix tr:last-child td, .matrix tr:last-child th { border-bottom: 0; }
.matrix thead th { padding: 0; border-bottom: 1px solid var(--line-2); }
.matrix thead th button {
  width: 100%; padding: 14px; background: transparent; border: 0; text-align: left;
  font-family: var(--serif); font-size: 1.15rem; font-weight: 400; color: var(--ink-2); transition: color .25s;
}
.matrix thead th button:hover { color: var(--ink); }
.matrix thead th button small { display: block; font-family: var(--mono); font-size: .62rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-top: 2px; }
.matrix tbody th { font-weight: 500; color: var(--ink-2); white-space: nowrap; font-size: .84rem; }
.matrix td { color: var(--muted); transition: background .3s, color .3s; }
.matrix td .cell { display: flex; align-items: center; gap: 10px; }
.matrix .sel { background: rgba(255,255,255,.04); color: var(--ink-2); }
.matrix thead th.sel button { color: var(--ink); }
.matrix .btc { background: rgba(247,147,26,.07); }
.matrix .btc.sel { background: rgba(247,147,26,.14); color: var(--ink); }
.matrix thead th.btc button { color: var(--orange); }
.pips { display: inline-flex; gap: 3px; flex: none; }
.pips i { width: 14px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.12); }
.pips[data-r="1"] i:nth-child(-n+1) { background: var(--red); }
.pips[data-r="2"] i:nth-child(-n+2) { background: var(--gold); }
.pips[data-r="3"] i:nth-child(-n+3) { background: var(--green); }
.verdict {
  margin-top: 16px; display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center;
  padding: 18px 22px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel);
}
.verdict h3 { font-family: var(--serif); font-weight: 400; font-size: 1.6rem; margin: 0; min-width: 7ch; }
.verdict p { margin: 0; color: var(--ink-2); line-height: 1.55; }
.verdict.is-btc { border-color: rgba(247,147,26,.45); }
.verdict.is-btc h3 { color: var(--orange); }
.verdict .swap { animation: verdictIn .5s var(--ease); }
@keyframes verdictIn { from { opacity: 0; transform: translateY(6px); } }
@media (max-width: 640px) { .verdict { grid-template-columns: 1fr; gap: 6px; } }

/* ---------- shift list ---------- */
.shift { list-style: none; padding: 0; margin: 0; display: grid; }
.shift li {
  display: grid; grid-template-columns: 1fr 60px 1fr; align-items: center; gap: 12px;
  padding: 16px 0; border-bottom: 1px solid var(--line);
  font-family: var(--serif); font-size: clamp(1.1rem, 2.2vw, 1.75rem); letter-spacing: -.01em;
}
.shift li span { color: var(--muted); font-weight: 300; text-decoration: line-through; text-decoration-color: rgba(255,90,78,.5); text-decoration-thickness: 1px; }
.shift li i { font-style: normal; color: var(--orange); text-align: center; font-family: var(--sans); }
.shift li b { font-weight: 400; color: var(--ink); }
.shift li:last-child b { color: var(--orange); font-style: italic; }
@media (max-width: 640px) { .shift li { grid-template-columns: 1fr 30px 1fr; font-size: 1rem; } }

/* ---------- faq ---------- */
.faq { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; align-items: start; }
.faq details { border: 1px solid var(--line); border-radius: 14px; background: var(--panel); transition: border-color .3s, background .3s; }
.faq details[open] { border-color: rgba(247,147,26,.4); background: var(--panel-2); }
.faq summary {
  list-style: none; cursor: pointer; padding: 0 52px 0 18px; position: relative;
  display: flex; align-items: center; height: 58px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-family: var(--serif); font-size: 1.12rem; font-weight: 400; letter-spacing: -.005em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+'; position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line-2); font-family: var(--sans); font-size: .95rem; color: var(--orange); transition: transform .4s var(--ease);
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { margin: 0; padding: 0 18px 18px; color: var(--ink-2); font-size: .94rem; line-height: 1.6; animation: verdictIn .5s var(--ease); }
@media (max-width: 860px) { .faq { grid-template-columns: 1fr; } }

/* ---------- books ---------- */
.book { text-decoration: none; display: flex; flex-direction: column; gap: 4px; }
.book h3 { font-family: var(--serif); font-weight: 400; font-size: 1.35rem; }
a.book::after { content: '↗'; position: absolute; top: 18px; right: 20px; color: var(--muted); transition: color .3s, transform .3s var(--ease); }
a.book:hover::after { color: var(--orange); transform: translate(2px, -2px); }
.book:hover { transform: translateY(-3px); }

/* ---------- finale ---------- */
.finale .display { margin-top: 24px; }
.mini-pill { display: inline-flex; width: 84px; height: 32px; border-radius: 999px; overflow: hidden; transform: rotate(-24deg); box-shadow: 0 10px 40px rgba(247,147,26,.5); }
.mini-pill span { flex: 1; }
.mini-pill span:first-child { background: linear-gradient(175deg, #ffc56b, #f7931a 40%, #c56500); }
.mini-pill span:last-child { background: linear-gradient(175deg, #fff, #e3ddd2 50%, #a9a196); }
blockquote { margin: 36px auto 0; max-width: 640px; }
blockquote p { margin: 0; font-family: var(--serif); font-style: italic; font-size: clamp(1.1rem, 2vw, 1.4rem); color: var(--ink-2); line-height: 1.45; }
cite { display: block; margin-top: 12px; font-style: normal; font-family: var(--mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.signoff { margin-top: 36px; font-family: var(--mono); font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--orange); }
.credit { margin-top: 14px; font-family: var(--mono); font-size: .68rem; letter-spacing: .06em; color: var(--muted); }
.credit a { color: inherit; text-decoration: underline; text-decoration-color: rgba(255,255,255,.25); text-underline-offset: 3px; }
.credit a:hover { color: var(--orange); }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 80px; z-index: 120; transform: translate(-50%, 20px); opacity: 0;
  padding: 12px 18px; border-radius: 999px; background: var(--ink); color: #111; font-weight: 600; font-size: .9rem;
  transition: opacity .3s, transform .4s var(--ease); pointer-events: none;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- small screens ---------- */
@media (max-width: 860px) {
  .slide { padding-top: 88px; padding-bottom: 84px; }
  .display { max-width: none; }
  .hud-chapter { max-width: 55vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; }
  .r { transform: none !important; filter: none !important; clip-path: none !important; transition: opacity .4s ease !important; transition-delay: 0s !important; }
  .battery-level { animation: none; transform: scaleX(.55); }
}

/* ---------- fit tweaks ---------- */
.big-line { text-wrap: balance; }
.display.compact { font-size: clamp(2rem, 3.8vw, 3.3rem); max-width: none; }
#compare .matrix-wrap { margin-top: 20px; }
#compare .matrix td, #compare .matrix tbody th { padding-top: 7px; padding-bottom: 7px; }
#compare .matrix td .cell > span { white-space: nowrap; }
#compare .matrix thead th button { padding: 11px 14px; }
#compare .verdict { margin-top: 12px; padding: 14px 20px; }
.shift { margin-top: 18px; }
#compare .matrix { font-size: .82rem; }
#compare .matrix td, #compare .matrix tbody th { padding-left: 12px; padding-right: 10px; }
#compare .pips i { width: 10px; }
#compare .matrix td .cell { gap: 8px; }
@media (max-width: 860px) {
  .pill-stage { max-width: 230px; margin: -16px auto -36px; }
  .hero .lead { font-size: 1rem; }
}

@media (max-width: 420px) { .faq summary { font-size: 1rem; padding-right: 46px; } }

/* ---------- library & media ---------- */
.books .card { padding: 18px 18px 20px; }
.books h3 { font-size: 1.2rem; }
.book.energy { border-color: rgba(86,194,136,.35); background: linear-gradient(160deg, rgba(86,194,136,.09), rgba(255,255,255,.02)); }
.book.energy .kicker { color: var(--green); }
.book.energy:hover { border-color: rgba(86,194,136,.6); }

.media { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(20px, 3vw, 40px); align-items: start; }
.col-h { font-family: var(--mono); font-size: .72rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.films { display: flex; flex-direction: column; gap: 12px; }
.film { display: grid; grid-template-columns: 168px 1fr; gap: 16px; align-items: center; padding: 12px; text-decoration: none; }
.film:hover { transform: translateY(-2px); }
.thumb { position: relative; display: block; aspect-ratio: 16/9; border-radius: 10px; overflow: hidden; background: #1a1a1c; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s var(--ease); }
.film:hover .thumb img { transform: scale(1.05); }
.thumb i { position: absolute; left: 50%; top: 50%; width: 38px; height: 38px; margin: -19px 0 0 -19px; border-radius: 50%; background: rgba(247,147,26,.92); box-shadow: 0 6px 20px rgba(0,0,0,.5); }
.thumb i::after { content: ''; position: absolute; left: 15px; top: 12px; border-left: 11px solid #1b1004; border-top: 7px solid transparent; border-bottom: 7px solid transparent; }
.film-t { display: flex; flex-direction: column; gap: 3px; }
.film-t .kicker { margin: 0; font-size: .64rem; }
.film-t .kicker::before { display: none; }
.film-t b { font-family: var(--serif); font-weight: 400; font-size: 1.22rem; color: var(--ink); line-height: 1.2; }
.film-t small { color: var(--ink-2); font-size: .85rem; line-height: 1.45; }
.pod-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.pod-list a {
  display: grid; grid-template-columns: 1fr auto; grid-template-areas: "n h" "d d"; gap: 2px 12px;
  padding: 12px 34px 12px 4px; border-bottom: 1px solid var(--line); text-decoration: none; position: relative;
  transition: padding .35s var(--ease), background .3s;
}
.pod-list a::after { content: '↗'; position: absolute; right: 8px; top: 50%; transform: translateY(-50%); color: var(--muted); transition: color .3s; }
.pod-list a:hover { padding-left: 12px; background: rgba(255,255,255,.025); }
.pod-list a:hover::after { color: var(--orange); }
.pod-list b { grid-area: n; font-family: var(--serif); font-weight: 400; font-size: 1.12rem; }
.pod-list span { grid-area: h; font-family: var(--mono); font-size: .7rem; color: var(--accent); align-self: center; }
.pod-list small { grid-area: d; color: var(--ink-2); font-size: .86rem; }
@media (max-width: 960px) { .media { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .film { grid-template-columns: 112px 1fr; gap: 12px; } .film-t small { display: none; } .pod-list a { grid-template-areas: "n" "h" "d"; grid-template-columns: 1fr; } }

/* ---------- sound ---------- */
.top-actions { display: flex; gap: 8px; align-items: center; }
.sound-btn {
  display: flex; align-items: center; gap: 9px; padding: 9px 14px; border-radius: 999px;
  background: rgba(20,20,22,.6); border: 1px solid var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font-size: .85rem; transition: border-color .3s, background .3s, color .3s;
}
.sound-btn:hover { border-color: var(--line-2); }
.sound-btn[aria-pressed="true"] { border-color: rgba(247,147,26,.55); color: var(--orange); }
.eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.eq i { width: 2px; height: 3px; border-radius: 1px; background: currentColor; transition: height .3s; }
.sound-btn[aria-pressed="true"] .eq i { animation: eq 1.1s ease-in-out infinite; }
.sound-btn[aria-pressed="true"] .eq i:nth-child(2) { animation-delay: -.4s; }
.sound-btn[aria-pressed="true"] .eq i:nth-child(3) { animation-delay: -.8s; }
.sound-btn[aria-pressed="true"] .eq i:nth-child(4) { animation-delay: -.2s; }
@keyframes eq { 0%, 100% { height: 3px; } 50% { height: 12px; } }
.sound-hint {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; padding: 0; border: 0; background: none;
  font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); transition: color .3s;
}
.sound-hint:hover, .sound-hint[aria-pressed="true"] { color: var(--orange); }
@media (max-width: 520px) { .sound-btn .sound-label { display: none; } .menu-btn span { display: none; } }
.eq i:nth-child(1) { height: 5px; } .eq i:nth-child(2) { height: 10px; } .eq i:nth-child(3) { height: 7px; } .eq i:nth-child(4) { height: 4px; }
.sound-btn[aria-pressed="false"] .eq { opacity: .55; }

/* ---------- language picker ---------- */
.lang-wrap { position: relative; }
.lang-btn {
  display: flex; align-items: center; gap: 7px; padding: 9px 12px; border-radius: 999px;
  background: rgba(20,20,22,.6); border: 1px solid var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font: 600 .78rem var(--mono); letter-spacing: .06em; transition: border-color .3s;
}
.lang-btn:hover, .lang-btn[aria-expanded="true"] { border-color: var(--line-2); }
.lang-btn svg { width: 16px; height: 16px; }
.lang-pop {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 60; list-style: none; margin: 0; padding: 8px; min-width: 190px;
  border-radius: 14px; border: 1px solid var(--line-2); background: rgba(17,17,19,.96);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 24px 60px rgba(0,0,0,.55);
  opacity: 0; transform: translateY(-6px); transition: opacity .25s, transform .35s var(--ease);
}
.lang-pop.open { opacity: 1; transform: none; }
.lang-pop a { display: block; padding: 9px 12px; border-radius: 9px; text-decoration: none; font-size: .92rem; color: var(--ink-2); transition: background .2s, color .2s; }
.lang-pop a:hover { background: rgba(255,255,255,.05); color: var(--ink); }
.lang-pop a[aria-current="true"] { color: var(--orange); }
.lang-pop a[aria-current="true"]::after { content: ' ✓'; }
@media (max-width: 520px) { .lang-btn span { display: none; } .lang-pop { right: -48px; } }
/* longer labels in other languages: let the scorecard wrap instead of scrolling */
html:not([lang="en"]) #compare .matrix { font-size: .78rem; }
html:not([lang="en"]) #compare .matrix td .cell > span { white-space: normal; }
html:not([lang="en"]) #compare .matrix td, html:not([lang="en"]) #compare .matrix tbody th { padding-top: 6px; padding-bottom: 6px; }

/* grid/flex children may shrink below their content width (long words in other languages) */
.split > *, .grid > *, .faq > *, .media > *, .calc, .field, .seg button { min-width: 0; }
.seg button small { white-space: normal; text-align: center; line-height: 1.25; }
@media (max-width: 860px) {
  .faq summary { white-space: normal; height: auto; min-height: 58px; padding-top: 12px; padding-bottom: 12px; }
}
