/*
  Campaign OS - Base styles (v2)
  Editorial x Builder design system, tuned for executive review speed.
  All color and type decisions come from CSS variables set by app.js
  from the active theme in themes.js. Hardcoded colors are a bug.
*/

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #FBF7F0; --bg-alt: #F3EDE2; --ink: #191613; --ink-soft: #5C564D;
  --card: #FFFFFF; --line: #E4DCCD; --accent: #C2410C; --accent-soft: #FFF1E6;
  --gradient: linear-gradient(100deg, #C2410C, #E11D48, #9333EA);
  --font-display: Georgia, serif; --font-body: system-ui, sans-serif;
  --font-mono: ui-monospace, monospace; --radius: 14px;
}

html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 16.5px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  transition: background .4s ease;
}

::selection { background: var(--accent); color: var(--bg); }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 28px; }

/* ---------- type ---------- */

.display {
  font-family: var(--font-display);
  font-weight: 560; font-variation-settings: "opsz" 80;
  line-height: 1.06; letter-spacing: -0.015em;
}
.grad {
  background: var(--gradient);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.eyebrow {
  font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent);
}
.soft { color: var(--ink-soft); }
.mono { font-family: var(--font-mono); }

/* ---------- progress + nav ---------- */

.progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--gradient); z-index: 60; }

.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  backdrop-filter: blur(12px); background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1080px; margin: 0 auto; padding: 13px 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.nav-mark { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); min-width: 0; }
.nav-ava {
  width: 40px; height: 40px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
  background: var(--accent-soft); border: 2px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 15px; color: var(--accent);
}
.nav-ava img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nav-id { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.nav-id b { font-family: var(--font-display); font-size: 16.5px; font-weight: 600; white-space: nowrap; }
.nav-id i {
  font-style: normal; font-family: var(--font-mono); font-size: 9px;
  letter-spacing: .09em; text-transform: uppercase; color: var(--ink-soft); white-space: nowrap;
}
.nav-links { display: flex; gap: 20px; align-items: center; }
.nav-links a { font-size: 13.5px; font-weight: 500; color: var(--ink-soft); text-decoration: none; }
.nav-links a:hover { color: var(--ink); }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--ink); color: var(--bg); border: none; cursor: pointer;
  font-family: var(--font-body); font-size: 14px; font-weight: 600;
  padding: 10px 18px; border-radius: 999px; text-decoration: none;
  transition: transform .15s ease, opacity .15s ease;
}
.btn:hover { transform: translateY(-1px); opacity: .92; }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.btn.accent { background: var(--accent); color: #fff; }

/* the easter egg CTA: a pixel invader that shakes for attention,
   light shake, then a three second rest, on loop */
.egg-cta {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px;
  color: var(--accent); text-decoration: none;
  animation: eggshake 3.5s ease-in-out infinite;
}
.egg-cta svg { width: 26px; height: 19px; shape-rendering: crispEdges; }
.egg-cta:hover { color: var(--ink); animation-play-state: paused; }
@keyframes eggshake {
  0%, 12%, 100% { transform: rotate(0); }
  2% { transform: rotate(-9deg); }
  4% { transform: rotate(8deg); }
  6% { transform: rotate(-6deg); }
  8% { transform: rotate(4deg); }
  10% { transform: rotate(-2deg); }
}
@media (prefers-reduced-motion: reduce) { .egg-cta { animation: none; } }

/* ---------- hero: bold split ---------- */

.hero { padding: 0; position: relative; overflow: hidden; }

/* Subtle dot-grid texture */
.hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image: radial-gradient(circle, var(--line) 1px, transparent 1px);
  background-size: 28px 28px; opacity: .34;
}

/* Full-bleed two-column: content left, photo right */
.hero-inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1fr 40%;
  min-height: 100svh;
}

/* Left: content, vertically centered */
.hi-left {
  display: flex; flex-direction: column; justify-content: center;
  padding: calc(var(--nav-height, 68px) + 52px) 60px calc(var(--nav-height, 68px) + 40px) 28px;
}

/* Right: photo fills the full column height */
.hi-right { position: relative; overflow: hidden; }
.hi-photo-wrap { position: absolute; inset: 0; }
.hi-photo-wrap img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: top center; display: block;
}
/* Left-edge gradient blends photo into content */
.hi-photo-wrap::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to right, var(--bg) 0%, transparent 40%);
}
.hi-photo-ph {
  width: 100%; height: 100%; background: var(--bg-alt);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 72px; color: var(--line);
}

/* Content rhythm */
.hi-eyebrow { margin-bottom: 20px; }
.hi-headline { font-size: clamp(48px, 5.8vw, 88px); margin-bottom: 24px; }
.hi-sub { font-size: 18px; line-height: 1.6; color: var(--ink-soft); max-width: 48ch; margin-bottom: 36px; }
.hi-ctas { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 52px; }

/* Terminal receipt — pinned at bottom of left column, slight tilt */
.hi-terminal { --hb-rot: 1.4deg; }
.hbt-link { display: block; text-decoration: none; color: inherit; }
.hbt-shell {
  background: var(--ink); border-radius: 6px; overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,.22), 0 2px 8px rgba(0,0,0,.12);
  font-family: var(--font-mono); max-width: 300px;
  transition: box-shadow .2s ease, transform .2s ease;
}
.hbt-link:hover .hbt-shell { box-shadow: 0 18px 56px rgba(0,0,0,.3); transform: translateY(-2px); }
.hbt-chrome {
  background: color-mix(in srgb, var(--ink) 70%, var(--bg));
  border-bottom: 1px solid color-mix(in srgb, var(--bg) 10%, transparent);
  padding: 9px 14px; display: flex; align-items: center; gap: 10px;
}
.hbt-dots { display: flex; gap: 6px; }
.hbt-dot { width: 10px; height: 10px; border-radius: 50%; }
.hbt-dot--r { background: #FF605C; } .hbt-dot--y { background: #FFBD44; } .hbt-dot--g { background: #00CA4E; }
.hbt-title { font-size: 11px; color: color-mix(in srgb, var(--bg) 30%, transparent); margin: 0 auto; }
.hbt-body { padding: 16px 18px 14px; }
.hbt-cmd { font-size: 12px; color: color-mix(in srgb, var(--bg) 40%, transparent); margin-bottom: 9px; }
.hbt-cmd-p { color: var(--accent); margin-right: 5px; }
.hbt-rows { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.hbt-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.hbt-row-name { font-size: 11.5px; color: color-mix(in srgb, var(--bg) 55%, transparent); }
.hbt-row-tag { font-size: 10.5px; color: var(--accent); opacity: .85; white-space: nowrap; }
.hbt-input {
  display: flex; align-items: center; gap: 7px; padding-top: 9px;
  border-top: 1px solid color-mix(in srgb, var(--bg) 8%, transparent);
  font-size: 12px; color: color-mix(in srgb, var(--bg) 35%, transparent);
}
.hbt-prompt-c { color: var(--accent); }
.hbt-ttext { flex: 1; }
.hbt-cur { color: var(--accent); font-size: 12px; animation: wt-blink 1.1s step-end infinite; }

/* Spring-in */
.hb-item {
  opacity: 0;
  transform: translateY(16px) rotate(var(--hb-rot, 0deg));
  transition: opacity .44s ease, transform .6s cubic-bezier(.34, 1.56, .64, 1);
}
.hb-item.in { opacity: 1; transform: translateY(0) rotate(var(--hb-rot, 0deg)); }

/* Mobile: photo strip on top, content below */
@media (max-width: 680px) {
  .hero-inner { grid-template-columns: 1fr; grid-template-rows: 60vw auto; }
  .hi-right { grid-row: 1; }
  .hi-photo-wrap::after {
    background: linear-gradient(to bottom, transparent 50%, var(--bg) 100%);
  }
  .hi-left { grid-row: 2; padding: 24px 20px 44px; justify-content: flex-start; }
  .hi-terminal { --hb-rot: 0deg; }
  .hbt-shell { max-width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .hb-item { opacity: 1 !important; transform: rotate(var(--hb-rot, 0deg)) !important; transition: none !important; }
  .hbt-cur { animation: none !important; }
}

/* ---------- stat strip ---------- */

.stats { padding: 26px 0 8px; }
.stats-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px;
  border-top: 1px solid var(--line); padding-top: 26px;
}
.stat .n {
  font-family: var(--font-mono); font-weight: 700; font-size: clamp(20px, 2.6vw, 30px);
  color: var(--accent); letter-spacing: -0.02em; white-space: nowrap;
}
.stat .l { font-size: 12.5px; color: var(--ink-soft); margin-top: 4px; line-height: 1.4; }

/* ---------- the 30-second version ---------- */

.exec { padding: 40px 0 64px; }
.exec-card {
  background: var(--ink); color: var(--bg); border-radius: calc(var(--radius) + 6px);
  padding: 34px 38px; position: relative; overflow: hidden;
}
.exec-card::after {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--gradient);
}
.exec-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.exec-head .eyebrow { color: var(--bg); opacity: .75; }
.exec-timer {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em;
  border: 1px dashed color-mix(in srgb, var(--bg) 40%, transparent);
  padding: 5px 12px; border-radius: 999px; opacity: .75;
}
.exec-line { font-family: var(--font-display); font-size: 23px; margin-bottom: 16px; }
.exec-card ol { list-style: none; counter-reset: x; display: grid; gap: 12px; }
.exec-card ol li {
  counter-increment: x; position: relative; padding-left: 38px;
  font-size: 15.5px; line-height: 1.5; opacity: .94;
}
.exec-card ol li::before {
  content: counter(x, decimal-leading-zero); position: absolute; left: 0; top: 1px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 700; color: var(--accent);
}
.exec-ctas { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.exec-ctas .btn { background: var(--bg); color: var(--ink); }
.exec-ctas .btn.accent { background: var(--accent); color: #fff; }

/* ---------- generic section ---------- */

section { padding: 72px 0; }
section.alt { background: var(--bg-alt); transition: background .4s ease; }
.sec-head { margin-bottom: 40px; }
.sec-head h2 { font-size: clamp(30px, 4.2vw, 48px); max-width: 24ch; margin-top: 14px; }
.sec-head .time {
  font-family: var(--font-mono); font-size: 11px; color: var(--ink-soft);
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px; margin-left: 12px;
  vertical-align: middle; white-space: nowrap;
}

/* ---------- what I bring ---------- */

/* Dot-grid whiteboard texture */
section#fit {
  background-image: radial-gradient(circle, rgba(0,0,0,0.07) 1.5px, transparent 1.5px);
  background-size: 24px 24px;
}

/* ── Category tab row ── */
.bring-tabs {
  display: flex; gap: 0;
  border-bottom: 1.5px solid rgba(0,0,0,0.12);
  margin: 32px 0 0; overflow-x: auto; scrollbar-width: none;
}
.bring-tabs::-webkit-scrollbar { display: none; }

.bring-tab {
  font-family: 'Caveat', cursive; font-size: 20px; font-weight: 700;
  color: rgba(0,0,0,0.32); background: none; border: none;
  padding: 8px 28px 14px; cursor: pointer; position: relative;
  transition: color .2s ease; white-space: nowrap; flex-shrink: 0;
}
.bring-tab::after {
  content: ''; position: absolute;
  bottom: -1.5px; left: 0; right: 0; height: 3px;
  border-radius: 2px 2px 0 0;
  transform: scaleX(0); transition: transform .25s ease;
}
.bring-tab:hover { color: rgba(0,0,0,0.58); }
.bring-tab.active { color: rgba(0,0,0,0.82); }
.bring-tab.active::after { transform: scaleX(1); }
.bring-tab[data-category="think"]::after   { background: #C4A000; }
.bring-tab[data-category="build"]::after   { background: #2B8ECC; }
.bring-tab[data-category="work"]::after    { background: #1DA85A; }
.bring-tab[data-category="deliver"]::after { background: #CC5533; }

/* ── Card panel — 3 notes side by side ── */
.bring-panel {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px;
  padding-top: 20px; /* room for tape strips */
  transition: opacity .15s ease, transform .15s ease;
}
.bring-panel.fading { opacity: 0; transform: translateY(8px); pointer-events: none; }

/* ── Base card (tailored .bring-grid path) ── */
.bring-card {
  background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; display: flex; flex-direction: column; gap: 8px;
  cursor: pointer; position: relative; overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, opacity .2s ease, background .2s ease;
}
.bring-card::after {
  content: ''; position: absolute; bottom: 0; left: 0; height: 2.5px; width: 0;
  background: var(--accent); transition: width .28s cubic-bezier(.4,0,.2,1);
}
.bring-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.09); border-color: var(--accent); }
.bring-card:hover::after, .bring-card.selected::after { width: 100%; }
.bring-card.selected { border-color: var(--accent); background: var(--accent-soft); }
.bring-card.dimmed { opacity: .14; pointer-events: none; transform: none !important; box-shadow: none !important; border-color: var(--line) !important; background: var(--card) !important; }

/* ── Sticky note overrides inside .bring-panel ── */
.bring-panel .bring-card {
  border: none; border-radius: 2px; padding: 36px 22px 22px;
  overflow: visible;
  transform: rotate(var(--rot, -1deg));
  transition: transform .3s cubic-bezier(.34,1.56,.64,1), box-shadow .3s ease;
  box-shadow: 2px 5px 14px rgba(0,0,0,0.13), 0 0 1px rgba(0,0,0,0.05);
  z-index: 1;
}
/* Tape strip */
.bring-panel .bring-card::before {
  content: ''; position: absolute; top: -10px; left: 50%;
  transform: translateX(-50%) rotate(var(--tape-rot, 0deg));
  width: 52px; height: 24px;
  background: rgba(255,255,255,0.46); border-radius: 1px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08); z-index: 2; pointer-events: none;
}
.bring-panel .bring-card::after { display: none; }

/* Note colors per active category */
.bring-panel[data-category="think"]   .bring-card { background: #FFE566; }
.bring-panel[data-category="build"]   .bring-card { background: #A8D8FF; }
.bring-panel[data-category="work"]    .bring-card { background: #85ECAD; }
.bring-panel[data-category="deliver"] .bring-card { background: #FFB8A0; }
.bring-panel[data-category="think"]   .bring-card.selected { background: #F5D600; }
.bring-panel[data-category="build"]   .bring-card.selected { background: #6EC6FF; }
.bring-panel[data-category="work"]    .bring-card.selected { background: #4FE080; }
.bring-panel[data-category="deliver"] .bring-card.selected { background: #FF9575; }

.bring-panel .bring-card:hover {
  transform: rotate(0deg) translateY(-6px) scale(1.02);
  box-shadow: 4px 12px 30px rgba(0,0,0,0.18), 0 2px 6px rgba(0,0,0,0.08);
  z-index: 10;
}
.bring-panel .bring-card.selected {
  transform: rotate(0deg) translateY(-10px) scale(1.03);
  box-shadow: 6px 16px 36px rgba(0,0,0,0.2), 0 2px 8px rgba(0,0,0,0.1);
  z-index: 20;
}

/* Tags */
.bring-tag {
  align-self: flex-start; font-family: var(--font-mono); font-size: 9.5px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  background: var(--accent-soft); color: var(--accent); padding: 3px 9px; border-radius: 999px;
  transition: background .15s ease, color .15s ease;
}
.bring-card:hover .bring-tag, .bring-card.selected .bring-tag { background: var(--accent); color: #fff; }
.bring-panel .bring-tag {
  font-family: 'Caveat', cursive; font-size: 14px; font-weight: 600;
  letter-spacing: 0; text-transform: none;
  background: rgba(0,0,0,0.1); color: rgba(0,0,0,0.6);
  padding: 1px 9px 2px; border-radius: 2px;
}
.bring-panel .bring-card:hover .bring-tag,
.bring-panel .bring-card.selected .bring-tag { background: rgba(0,0,0,0.16); color: rgba(0,0,0,0.75); }

.bring-card h4 { font-family: var(--font-display); font-size: 15px; line-height: 1.25; margin: 0; transition: color .15s ease; }
.bring-card:hover h4, .bring-card.selected h4 { color: var(--accent); }
.bring-card p { font-size: 13px; color: var(--ink-soft); line-height: 1.55; margin: 0; }
.bring-panel .bring-card h4 { font-size: 17px; color: rgba(0,0,0,0.85); }
.bring-panel .bring-card:hover h4, .bring-panel .bring-card.selected h4 { color: rgba(0,0,0,0.95); }
.bring-panel .bring-card p { font-size: 13.5px; color: rgba(0,0,0,0.62); line-height: 1.6; }

/* filter pills (tailored pages) */
.bring-filters { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 16px; }
.bring-filter {
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; letter-spacing: .07em;
  text-transform: uppercase; background: transparent; color: var(--ink-soft);
  border: 1.5px solid var(--line); padding: 5px 12px; border-radius: 999px;
  cursor: pointer; transition: all .15s ease;
}
.bring-filter:hover { border-color: var(--accent); color: var(--accent); }
.bring-filter.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.bring-filter-count { opacity: .75; margin-left: 3px; font-size: 10px; }
.bring-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }

/* tailored page extras */
.bring-featured-label { font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.bring-more { margin-top: 28px; }
.bring-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; color: var(--accent); border: 1.5px solid var(--accent);
  font-family: var(--font-body); font-size: 14px; font-weight: 600;
  padding: 10px 22px; border-radius: 999px; cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.bring-toggle:hover { background: var(--accent); color: #fff; }
.bring-full { max-height: 0; overflow: hidden; transition: max-height .6s ease; }
.bring-full.open { max-height: 2400px; padding-top: 28px; }

/* ---------- proof arc (film strip) ---------- */

/* Runway: tall div that the sticky section travels through */
.arc-runway { position: relative; }

section#arc {
  position: sticky; top: 0; height: 100vh;
  overflow: hidden; padding: 0; background: var(--bg);
}

/* Film track: horizontal flex container, translated by JS on scroll */
.film-track {
  display: flex; height: 100%;
  will-change: transform;
}

/* Individual chapter panel */
.film-panel {
  width: 100vw; height: 100%;
  flex-shrink: 0;
  display: grid;
  grid-template-columns: 1fr 1.7fr 1fr;
  align-items: center;
  padding: 80px 64px 88px;
  background: var(--bg);
}
.film-panel--end {
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
}

/* Columns */
.fp-left {
  display: flex; flex-direction: column; gap: 20px;
  padding-right: 52px;
  border-right: 1px solid var(--line);
  align-self: stretch; justify-content: center;
}
.fp-center {
  padding: 0 52px;
  display: flex; flex-direction: column; gap: 0;
  justify-content: center;
}
.fp-right {
  padding-left: 52px;
  border-left: 1px solid var(--line);
  align-self: stretch; justify-content: center;
  display: flex; flex-direction: column;
}

/* Era badge */
.fp-era {
  font-family: var(--font-mono); font-size: 9px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-soft); display: block;
}

/* Large gradient metric */
.fp-metric {
  font-family: var(--font-mono); font-weight: 700;
  font-size: clamp(36px, 5vw, 70px); line-height: 1.05;
  background: var(--gradient);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* Center headline */
.fp-center h3 { font-size: clamp(20px, 2.4vw, 34px); margin-bottom: 18px; }

/* Italic takeaway */
.fp-takeaway {
  font-style: italic; color: var(--ink-soft);
  font-size: 15px; line-height: 1.6; max-width: 38ch;
  margin-top: 0;
}

/* Compact card stack */
.fp-cards { display: flex; flex-direction: column; gap: 10px; }
.fp-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: calc(var(--radius) - 4px); padding: 12px 16px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.fp-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.07); }
.fp-card-t { font-weight: 600; font-size: 13.5px; margin-bottom: 3px; }
.fp-card-d { font-size: 12px; color: var(--ink-soft); line-height: 1.4; }
.fp-card--mgmt-context { opacity: 0.6; }
.fp-card--mgmt-featured { border-left: 3px solid var(--accent); background: var(--accent-soft); }

/* Film nav: bottom filmstrip bar */
.film-nav {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 68px; display: flex; align-items: center;
  padding: 0 64px;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
}
/* Gradient progress line above the bar */
.film-nav::before {
  content: ''; position: absolute; top: -1px; left: 0;
  height: 2px; background: var(--gradient);
  width: calc(var(--film-progress, 0) * 100%);
}
.film-nav-stop {
  flex: 1; background: none; border: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 4px; opacity: 0.36; transition: opacity .2s ease;
}
.film-nav-stop:hover, .film-nav-stop.active { opacity: 1; }
.fn-label {
  font-family: var(--font-mono); font-size: 9px;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft);
}
.fn-metric {
  font-family: var(--font-mono); font-size: 12px;
  font-weight: 700; color: var(--accent);
}
.film-nav-stop.active .fn-metric {
  background: var(--gradient);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Closing end panel */
.film-panel--end h3 { font-size: clamp(26px, 3.8vw, 52px); max-width: 22ch; margin-bottom: 30px; }
.film-end-ctas { display: flex; gap: 14px; }

/* Preserved utility classes */
.metric { font-family: var(--font-mono); font-weight: 700; color: var(--accent); }
.acc-note { font-size: 14px; color: var(--ink-soft); max-width: 60ch; margin-top: 12px; }
.acc-note b { color: var(--accent); font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; }
html.is-resizing * { transition: none !important; animation: none !important; }

/* Mobile: revert to stacked vertical layout */
@media (max-width: 760px) {
  .arc-runway { height: auto !important; }
  section#arc { position: relative; height: auto; overflow: visible; padding: 64px 0; }
  .film-track { flex-direction: column; width: 100%; transform: none !important; }
  .film-panel { width: 100%; height: auto; grid-template-columns: 1fr; padding: 36px 0 32px; gap: 24px; }
  .film-panel--end { padding: 36px 0; }
  .fp-left { border-right: none; padding-right: 0; align-self: auto; flex-direction: row; align-items: baseline; gap: 16px; }
  .fp-center { padding: 0; }
  .fp-right { border-left: none; padding-left: 0; align-self: auto; }
  .film-nav { display: none; }
}

/* ---------- proof wall ---------- */

.wall-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.wall-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; display: flex; flex-direction: column; gap: 10px; cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
}
.wall-card:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(0,0,0,.07); }
.wall-card .tag {
  align-self: flex-start; font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: .1em; text-transform: uppercase;
  background: var(--accent-soft); color: var(--accent);
  padding: 4px 10px; border-radius: 999px;
}
.wall-card h4 { font-size: 18.5px; font-family: var(--font-display); }
.wall-card p { font-size: 14px; color: var(--ink-soft); }
.wall-card .more {
  font-family: var(--font-mono); font-size: 11px; color: var(--accent); margin-top: auto; padding-top: 6px;
}
.wall-card .detail { display: none; font-size: 13.5px; border-top: 1px dashed var(--line); padding-top: 10px; }
.wall-card.open .detail { display: block; }

/* ---------- proof wall — terminal UI ---------- */

.wall-terminal {
  background: var(--ink);
  border: 1px solid color-mix(in srgb, var(--bg) 12%, transparent);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0,0,0,.28), 0 4px 16px rgba(0,0,0,.18);
  font-family: var(--font-mono);
  margin-top: 40px;
}

.wt-chrome {
  background: color-mix(in srgb, var(--ink) 70%, var(--bg));
  border-bottom: 1px solid color-mix(in srgb, var(--bg) 10%, transparent);
  padding: 12px 16px;
  display: flex; align-items: center; gap: 12px;
}
.wt-dots { display: flex; gap: 7px; }
.wt-dot { width: 12px; height: 12px; border-radius: 50%; }
.wt-dot--red    { background: #FF605C; }
.wt-dot--yellow { background: #FFBD44; }
.wt-dot--green  { background: #00CA4E; }
.wt-title {
  font-size: 12px; letter-spacing: .07em;
  color: color-mix(in srgb, var(--bg) 35%, transparent);
  margin: 0 auto;
}

.wt-body { display: flex; min-height: 380px; }

.wt-sidebar {
  width: 210px; flex-shrink: 0;
  border-right: 1px solid color-mix(in srgb, var(--bg) 10%, transparent);
  padding: 18px 0;
}
.wt-sidebar-label {
  font-size: 11px; letter-spacing: 0;
  color: color-mix(in srgb, var(--bg) 30%, transparent);
  padding: 0 16px 12px;
  font-family: var(--font-mono);
}
.wt-list { display: flex; flex-direction: column; }

.wt-item {
  width: 100%; text-align: left; background: none; cursor: pointer;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px 10px 13px;
  border: none; border-left: 3px solid transparent;
  font-family: var(--font-mono); font-size: 11.5px;
  color: color-mix(in srgb, var(--bg) 38%, transparent);
  opacity: 0; transform: translateX(-10px);
  transition: opacity .3s ease, transform .3s ease, color .15s ease, border-color .15s ease;
}
.wt-item:hover  { color: color-mix(in srgb, var(--bg) 72%, transparent); }
.wt-item.active { border-left-color: var(--accent); color: var(--bg); }
.wt-item-icon { font-size: 9px; flex-shrink: 0; color: var(--accent); width: 12px; text-align: center; opacity: .7; }
.wt-item-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.wt-main { flex: 1; position: relative; overflow: hidden; }

.wt-pane {
  position: absolute; inset: 0; padding: 28px 32px;
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease;
}
.wt-pane.active {
  opacity: 1; pointer-events: auto;
  position: relative; inset: auto;
}

.wt-cmd {
  font-family: var(--font-mono); font-size: 12px;
  color: color-mix(in srgb, var(--bg) 38%, transparent);
  margin-bottom: 20px;
}
.wt-cmd::before { content: '$ '; color: var(--accent); }

.wt-pane-tag {
  display: inline-block; font-size: 10px; font-weight: 600; letter-spacing: .1em;
  text-transform: lowercase; color: color-mix(in srgb, var(--accent) 80%, var(--bg));
  border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent);
  padding: 2px 8px; border-radius: 3px; margin-bottom: 10px;
  font-family: var(--font-mono);
}
.wt-pane-tag::before { content: '['; opacity: .6; }
.wt-pane-tag::after  { content: ']'; opacity: .6; }
.wt-pane-title {
  font-family: var(--font-mono); font-size: 18px; font-weight: 700;
  color: var(--bg); margin-bottom: 12px; line-height: 1.25; letter-spacing: -.01em;
}
.wt-pane-body {
  font-size: 12.5px; line-height: 1.72;
  color: color-mix(in srgb, var(--bg) 58%, transparent);
  margin-bottom: 22px; font-family: var(--font-mono); max-width: 58ch;
}

.wt-status-row { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.wt-bar {
  flex: 1; height: 3px; max-width: 240px;
  background: color-mix(in srgb, var(--bg) 10%, transparent);
  border-radius: 0; overflow: hidden;
}
.wt-bar-fill {
  height: 100%; width: 0;
  background: var(--accent);
  border-radius: 0;
  transition: width .9s cubic-bezier(.4, 0, .2, 1);
}
.wt-status-label {
  font-size: 10px; letter-spacing: .1em; font-weight: 600;
  color: color-mix(in srgb, var(--accent) 75%, var(--bg)); white-space: nowrap;
  font-family: var(--font-mono);
}

.wt-expand-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: 1px solid color-mix(in srgb, var(--bg) 14%, transparent);
  color: color-mix(in srgb, var(--bg) 38%, transparent);
  font-family: var(--font-mono); font-size: 10.5px;
  padding: 5px 12px; border-radius: 3px; cursor: pointer;
  transition: border-color .15s ease, color .15s ease;
  letter-spacing: .04em;
}
.wt-expand-btn:hover { border-color: var(--accent); color: var(--accent); }

.wt-pane-detail {
  max-height: 0; overflow: hidden; font-family: var(--font-mono);
  font-size: 12px; line-height: 1.75;
  color: color-mix(in srgb, var(--bg) 48%, transparent);
  transition: max-height .45s ease, margin-top .45s ease;
}
.wt-pane-detail.open { max-height: 300px; margin-top: 16px; }

.wt-input-row {
  border-top: 1px solid color-mix(in srgb, var(--bg) 9%, transparent);
  padding: 10px 20px; display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: color-mix(in srgb, var(--bg) 35%, transparent);
}
.wt-prompt { color: var(--accent); font-size: 15px; line-height: 1; }
.wt-typetext { flex: 1; }
.wt-cursor { color: var(--accent); font-size: 13px; line-height: 1; animation: wt-blink 1.1s step-end infinite; }
@keyframes wt-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* Mobile: horizontal tab strip instead of sidebar */
@media (max-width: 640px) {
  .wt-body { flex-direction: column; }
  .wt-sidebar {
    width: 100%; border-right: none;
    border-bottom: 1px solid color-mix(in srgb, var(--bg) 10%, transparent);
    padding: 10px 0 0;
  }
  .wt-sidebar-label { display: none; }
  .wt-list { flex-direction: row; overflow-x: auto; scrollbar-width: none; padding: 0 12px 10px; gap: 4px; }
  .wt-list::-webkit-scrollbar { display: none; }
  .wt-item {
    white-space: nowrap; padding: 7px 14px; border-radius: 3px; border-left: 3px solid transparent;
    flex-shrink: 0; opacity: 1 !important; transform: none !important;
  }
  .wt-pane { position: relative; inset: auto; padding: 22px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .wt-item        { opacity: 1 !important; transform: none !important; transition: background .15s ease, color .15s ease !important; }
  .wt-bar-fill    { transition: none !important; }
  .wt-cursor      { animation: none !important; }
  .wt-pane        { transition: none !important; }
  .wt-pane-detail { transition: none !important; }
}

/* ---------- ship (what I'd ship) ---------- */

.ship-phases { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-bottom: 34px; }
.phase { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; }
.phase .ph-label { font-family: var(--font-mono); font-size: 11.5px; color: var(--accent); font-weight: 700; letter-spacing: .1em; }
.phase h4 { font-family: var(--font-display); font-size: 20px; margin: 8px 0 6px; }
.phase p { font-size: 14px; color: var(--ink-soft); }

.bets { display: grid; gap: 16px; }
.bet {
  background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--accent);
  border-radius: var(--radius); padding: 24px 26px;
  display: grid; grid-template-columns: 1fr 240px; gap: 24px; align-items: center;
}
.bet h5 { font-size: 17px; margin-bottom: 6px; }
.bet p { font-size: 14.5px; color: var(--ink-soft); }
.ship-note { margin-top: 26px; font-size: 14px; font-style: italic; color: var(--ink-soft); max-width: 66ch; }

/* schematic mocks */
.mock {
  background: var(--bg-alt); border: 1px dashed var(--line); border-radius: 10px;
  padding: 14px; display: flex; flex-direction: column; gap: 8px; min-height: 130px; justify-content: center;
}
.mock-label { font-family: var(--font-mono); font-size: 9px; letter-spacing: .12em; color: var(--ink-soft); text-align: center; margin-top: 6px; }
.mk-bubble { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; font-size: 11px; color: var(--ink-soft); max-width: 85%; }
.mk-bubble.me { align-self: flex-end; background: var(--accent-soft); color: var(--accent); }
.mk-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.mk-chip {
  font-family: var(--font-mono); font-size: 9.5px; border: 1px solid var(--accent);
  color: var(--accent); border-radius: 999px; padding: 3px 9px; background: var(--card);
}
.mk-chip.dim { border-color: var(--line); color: var(--ink-soft); }
.mk-row { display: flex; align-items: center; gap: 8px; }
.mk-arrow { color: var(--accent); font-size: 13px; }
.mk-node {
  background: var(--card); border: 1px solid var(--line); border-radius: 8px;
  padding: 6px 9px; font-family: var(--font-mono); font-size: 9.5px; color: var(--ink-soft);
}
.mk-node.hot { border-color: var(--accent); color: var(--accent); font-weight: 700; }
.mk-bars { display: flex; align-items: flex-end; gap: 6px; height: 64px; padding: 0 6px; }
.mk-bar { flex: 1; background: var(--line); border-radius: 3px 3px 0 0; }
.mk-bar.hot { background: var(--accent); }
.mk-target { border-top: 2px dashed var(--accent); margin: 2px 6px 0; position: relative; }
.mk-strike { text-decoration: line-through; opacity: .45; }
.mk-list { display: grid; gap: 5px; font-size: 11px; color: var(--ink-soft); }
.mk-term { background: var(--ink); border-radius: 8px; padding: 10px 12px; font-family: var(--font-mono); font-size: 9.5px; color: var(--bg); line-height: 1.7; opacity: .92; }
.mk-term .a { color: var(--accent); }

/* ---------- close ---------- */

.close { padding: 110px 0; text-align: center; }
.close h2 { font-size: clamp(36px, 5.6vw, 66px); max-width: 18ch; margin: 18px auto 0; }
.close .sub { max-width: 52ch; margin: 24px auto 0; color: var(--ink-soft); font-size: 17.5px; }
.close .hero-ctas { justify-content: center; }

/* ---------- footer ---------- */

footer { border-top: 1px solid var(--line); padding: 36px 0 90px; }
.foot-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: center; }
footer p { font-size: 13px; color: var(--ink-soft); max-width: 56ch; }
.press-start {
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: .08em;
  color: var(--ink-soft); text-decoration: none; border: 1.5px dashed var(--line);
  padding: 9px 16px; border-radius: 8px; white-space: nowrap;
}
.press-start:hover { color: var(--accent); border-color: var(--accent); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .55; } }

/* ---------- PiP video ---------- */

.pip {
  position: fixed; bottom: 26px; right: 26px; z-index: 60;
  width: 152px; height: 152px; border-radius: 50%;
  overflow: hidden; border: 3px solid var(--ink);
  box-shadow: 0 14px 40px rgba(0,0,0,.22);
  cursor: pointer; background: var(--ink);
}
.pip video { width: 100%; height: 100%; object-fit: cover; }
.pip .pip-mute {
  position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%);
  font-family: var(--font-mono); font-size: 10px; color: #fff;
  background: rgba(0,0,0,.55); padding: 3px 10px; border-radius: 999px;
}
.pip.hidden { display: none; }

/* ---------- chat ---------- */

.chat-fab {
  position: fixed; bottom: 26px; right: 26px; z-index: 60;
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  background: var(--card); color: var(--ink); border: 1px solid var(--line);
  border-radius: 50%; cursor: pointer;
  box-shadow: 0 8px 28px rgba(0,0,0,.10);
  transition: border-color .15s ease, color .15s ease, transform .15s ease;
}
.chat-fab:hover { border-color: var(--accent); color: var(--accent); transform: scale(1.06); }

.chat-backdrop {
  position: fixed; inset: 0; z-index: 199;
  background: rgba(0,0,0,.28); backdrop-filter: blur(2px);
  opacity: 0; pointer-events: none;
  transition: opacity .3s ease;
}
.chat-backdrop.open { opacity: 1; pointer-events: auto; }

.chat-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 200;
  width: 400px; max-width: 100vw;
  background: var(--bg); border-left: 1px solid var(--line);
  display: flex; flex-direction: column;
  box-shadow: -12px 0 48px rgba(0,0,0,.12);
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
}
.chat-drawer.open { transform: translateX(0); }

.chat-header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; border-bottom: 1px solid var(--line); flex-shrink: 0;
}
.chat-identity { display: flex; align-items: center; gap: 11px; }
.chat-ava-sm {
  width: 36px; height: 36px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
  background: var(--accent-soft); border: 2px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 13px; color: var(--accent);
}
.chat-ava-sm img { width: 100%; height: 100%; object-fit: cover; display: block; }
.chat-id-name { font-family: var(--font-display); font-size: 14.5px; font-weight: 600; line-height: 1.2; }
.chat-id-status {
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .07em;
  color: var(--ink-soft); text-transform: uppercase; margin-top: 1px;
}
.chat-close {
  background: none; border: none; cursor: pointer; color: var(--ink-soft);
  padding: 6px; display: flex; align-items: center; justify-content: center;
  border-radius: 8px; flex-shrink: 0;
  transition: background .15s ease, color .15s ease;
}
.chat-close:hover { background: var(--bg-alt); color: var(--ink); }

.chat-messages {
  flex: 1; overflow-y: auto; padding: 18px 14px;
  display: flex; flex-direction: column; gap: 14px;
}
.chat-msg { display: flex; gap: 9px; align-items: flex-end; }
.chat-msg--user { flex-direction: row-reverse; }

.chat-ava {
  width: 28px; height: 28px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
  background: var(--accent-soft); border: 1.5px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 11px; color: var(--accent);
}
.chat-ava img { width: 100%; height: 100%; object-fit: cover; display: block; }

.chat-bubble {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; padding: 10px 13px;
  font-size: 13.5px; line-height: 1.6; color: var(--ink);
  max-width: 84%; word-break: break-word;
}
.chat-bubble a { color: var(--accent); }
.chat-msg--luke .chat-bubble { border-bottom-left-radius: 4px; }
.chat-msg--user .chat-bubble {
  background: var(--accent); color: #fff; border-color: var(--accent);
  border-bottom-right-radius: 4px;
}

.chat-typing { display: inline-flex; gap: 4px; align-items: center; padding: 2px 0; }
.chat-typing span {
  width: 5px; height: 5px; background: var(--ink-soft); border-radius: 50%;
  animation: chatdot .9s ease-in-out infinite;
}
.chat-typing span:nth-child(2) { animation-delay: .15s; }
.chat-typing span:nth-child(3) { animation-delay: .30s; }
@keyframes chatdot {
  0%, 60%, 100% { transform: translateY(0); opacity: .6; }
  30% { transform: translateY(-4px); opacity: 1; }
}

.chat-suggestions { display: flex; flex-direction: column; gap: 7px; padding-left: 37px; }
.chat-suggestion {
  text-align: left; background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; padding: 9px 13px; cursor: pointer;
  font-family: var(--font-body); font-size: 13px; color: var(--ink-soft); line-height: 1.4;
  transition: border-color .15s ease, color .15s ease;
}
.chat-suggestion:hover { border-color: var(--accent); color: var(--accent); }

.chat-footer {
  padding: 10px 14px 14px; border-top: 1px solid var(--line);
  display: flex; gap: 8px; align-items: flex-end; flex-shrink: 0;
}
.chat-input {
  flex: 1; border: 1px solid var(--line); border-radius: 12px;
  padding: 9px 13px; font-family: var(--font-body); font-size: 14px;
  background: var(--card); color: var(--ink); outline: none; resize: none;
  line-height: 1.5; overflow: hidden;
  transition: border-color .15s ease;
}
.chat-input:focus { border-color: var(--accent); }
.chat-input::placeholder { color: var(--ink-soft); opacity: .7; }
.chat-send {
  background: var(--accent); color: #fff; border: none; cursor: pointer;
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: opacity .15s ease;
}
.chat-send:hover { opacity: .88; }
.chat-send:disabled { opacity: .35; cursor: default; }

/* ---------- reveal animation ---------- */

.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .tl-node.reveal, .tl-end.reveal { opacity: 1; transform: none; transition: none; }
  .ccard { opacity: 1; transform: none; transition: none; }
  .tl-rail::after { transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- mobile ---------- */

@media (max-width: 860px) {
  .made-grid { grid-template-columns: 1fr; }
  .bet { grid-template-columns: 1fr; }
  .mock { min-height: 110px; }
  .bring-panel { grid-template-columns: 1fr 1fr; gap: 18px; }
  .bring-tab { padding: 8px 18px 14px; font-size: 18px; }
}
@media (max-width: 560px) {
  .bring-panel { grid-template-columns: 1fr; }
  .bring-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .nav-links a:not(.btn) { display: none; }
  .nav-id i { display: none; }
  .hero { padding: 116px 0 40px; }
  section { padding: 52px 0; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); row-gap: 22px; }
  .stats-grid .stat:last-child { grid-column: span 2; }
  .exec-card { padding: 26px 22px; }
  .tl-rail-stop { min-width: 68px; }
  .tl-rail-label { font-size: 8px; }
  .tl-node { padding: 48px 0 64px; }
  .tl-metric { font-size: clamp(44px, 13vw, 72px); }
  .tl-end { padding: 48px 0 24px; }
  .tl-sidenav { right: 12px; gap: 8px; }
  .tl-sidenav-dot { width: 6px; height: 6px; }
  .tl-sidenav-dot::after { display: none; }
  .pip { width: 96px; height: 96px; bottom: 18px; right: 18px; }
  .chat-fab { bottom: 18px; right: 18px; }
  .close { padding: 80px 0; }
}

@media (max-width: 480px) {
  .tl-sidenav { display: none; }
  /* hide placeholder card images on small phones — declutters mobile view */
  .ccard-img { display: none; }
  .tl-node { padding: 32px 0 48px; }
  .tl-metric { font-size: clamp(34px, 11vw, 52px); margin: 4px 0 12px; }
  .tl-h { font-size: clamp(20px, 6vw, 28px); }
  .tl-takeaway { font-size: 14px; margin: 10px 0 18px; }
  .chapter-cards { gap: 10px; }
}

/* ---------- Game Boy modal ---------- */

.gb-overlay {
  position: fixed; inset: 0; z-index: 150;
  background: rgba(0,0,0,0.9);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease;
}
.gb-overlay.open { opacity: 1; pointer-events: all; }

.gb-body {
  background: #C8C8BE;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 44px), calc(100% - 44px) 100%, 0 100%);
  padding: 16px 16px 28px;
  width: 716px;
  position: relative;
  box-shadow:
    inset 2px 3px 0 rgba(255,255,255,0.55),
    inset -2px -3px 0 rgba(0,0,0,0.18),
    0 24px 70px rgba(0,0,0,0.75),
    0 6px 20px rgba(0,0,0,0.5);
  font-family: Arial, 'Helvetica Neue', sans-serif;
  user-select: none;
}

.gb-top-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2px; margin-bottom: 8px;
}
.gb-nintendo { font-size: 10px; font-style: italic; font-weight: 700; color: #6A6A62; letter-spacing: .04em; }
.gb-power-group { display: flex; align-items: center; gap: 7px; }
.gb-power-led {
  width: 8px; height: 8px; border-radius: 50%;
  background: #00C400; box-shadow: 0 0 5px #00FF00, 0 0 2px #00AA00;
}
.gb-close-btn {
  background: #2A2A2A; border: none; cursor: pointer;
  color: #E0E0D6; font-size: 11px; font-weight: 700; letter-spacing: .05em;
  padding: 5px 11px; border-radius: 999px; font-family: inherit;
  display: inline-flex; align-items: center; gap: 5px;
  transition: background .12s, color .12s;
  white-space: nowrap;
}
.gb-close-btn:hover { background: #111; color: #fff; }
.gb-close-esc { font-size: 8.5px; opacity: .65; letter-spacing: .1em; }

.gb-screen-section {
  background: #9E9E94;
  border-radius: 8px 8px 6px 6px;
  padding: 10px 11px 16px;
  margin-bottom: 10px;
  box-shadow: inset 2px 2px 5px rgba(0,0,0,0.22), inset -1px -1px 2px rgba(255,255,255,0.12);
}
.gb-screen-header { display: flex; align-items: center; gap: 7px; margin-bottom: 7px; }
.gb-dot-led { width: 7px; height: 7px; border-radius: 50%; background: #CC1A1A; flex-shrink: 0; }
.gb-dot-label { font-size: 6.5px; font-weight: 700; letter-spacing: .12em; color: #666; text-transform: uppercase; }

.gb-screen-bezel {
  background: #1A1A1A;
  border-radius: 5px; padding: 10px;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.9), 0 0 0 1px #0a0a0a;
  display: flex; align-items: center; justify-content: center;
}
.gb-screen-wrap {
  width: 640px; height: 448px; overflow: hidden;
  border-radius: 2px; background: #0f380f;
}
.gb-iframe { display: block; border: none; width: 640px; height: 448px; }

.gb-label-row { text-align: center; margin: 6px 0 12px; }
.gb-game-boy-txt { font-size: 13px; font-weight: 900; letter-spacing: .24em; color: #5A5A52; text-transform: uppercase; }
.gb-tm { font-size: 7px; vertical-align: super; font-weight: 400; letter-spacing: 0; }

.gb-controls-row { display: flex; align-items: center; justify-content: space-between; padding: 0 6px; }

/* D-pad */
.gb-dpad { display: grid; grid-template: repeat(3, 26px) / repeat(3, 26px); }
.gb-dc { background: transparent; }
.gb-dp {
  background: #2A2A2A; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 8px; color: #555; line-height: 1;
  -webkit-tap-highlight-color: transparent; transition: background .06s;
}
.gb-dp:active { background: #484848; }
.gb-dp-up  { border-radius: 3px 3px 0 0; }
.gb-dp-dn  { border-radius: 0 0 3px 3px; }
.gb-dp-lt  { border-radius: 3px 0 0 3px; }
.gb-dp-rt  { border-radius: 0 3px 3px 0; }
.gb-dpad-mid { background: #2A2A2A; }

/* SELECT / START */
.gb-meta-area { display: flex; flex-direction: column; align-items: center; gap: 8px; padding-top: 20px; }
.gb-meta-row { display: flex; gap: 12px; }
.gb-meta-btn {
  background: #9A9A90; border: none; cursor: pointer;
  width: 38px; height: 12px; border-radius: 6px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.3), 0 1px 0 rgba(255,255,255,0.18);
  transform: rotate(-20deg); -webkit-tap-highlight-color: transparent;
  transition: background .06s;
}
.gb-meta-btn:active { background: #7A7A70; }
.gb-meta-lbls { display: flex; gap: 12px; }
.gb-meta-lbl { font-size: 6px; letter-spacing: .1em; color: #686862; text-transform: uppercase; text-align: center; width: 38px; }

/* A / B buttons */
.gb-ab-area { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.gb-ab-buttons { display: flex; gap: 8px; align-items: center; transform: rotate(-25deg); }
.gb-a-btn, .gb-b-btn {
  width: 38px; height: 38px; border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #AB1C30, #700010);
  border: none; cursor: pointer;
  color: rgba(255,255,255,0.65); font-size: 11px; font-weight: 700;
  box-shadow: 0 3px 7px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.12);
  display: flex; align-items: center; justify-content: center;
  -webkit-tap-highlight-color: transparent; transition: transform .06s, box-shadow .06s;
  font-family: Arial, sans-serif;
}
.gb-a-btn:active, .gb-b-btn:active { transform: translateY(1px); box-shadow: 0 1px 3px rgba(0,0,0,0.55); }
.gb-ab-lbls { display: flex; gap: 8px; justify-content: flex-end; }
.gb-ab-lbl { font-size: 6px; letter-spacing: .08em; color: #686862; width: 38px; text-align: center; }

/* Speaker grill */
.gb-bottom-row { display: flex; justify-content: flex-end; padding: 8px 6px 0; }
.gb-speaker { display: grid; grid-template-columns: repeat(6, 5px); gap: 3px; }
.gb-speaker-dot { width: 5px; height: 5px; background: #AEAEA4; border-radius: 50%; box-shadow: inset 0 1px 1px rgba(0,0,0,0.15); }

/* Scale Game Boy down on narrow or short viewports */
@media (max-width: 800px) and (min-width: 600px) { .gb-body { zoom: 0.8; } }
@media (max-height: 820px) and (min-width: 600px) { .gb-body { zoom: 0.8; } }
@media (max-height: 700px) and (min-width: 600px) { .gb-body { zoom: 0.68; } }

/* On mobile the modal is hidden and links navigate normally */
@media (max-width: 599px) { .gb-overlay { display: none !important; } }

/* ---------- print nudge ---------- */

@media print {
  .pip, .chat-fab, .chat-drawer, .chat-backdrop, .nav, .progress { display: none !important; }
}
