/* ═══════════════════════════════════════════════════════════════════════════
   ESP LOTTERY — stylesheet v0.3.0
   Built on the Rheme house standards (design tokens, glass, aurora mesh,
   shimmer, ambient orbs, blur-in reveal, --ease-lux) with its own identity.

   Identity: indigo void + a violet→cyan→mint "signal spectrum".
   Deliberately shares nothing with Rheme's emerald/gold or Prophetic Finders'
   purple/gold — all three brands must be visually unmistakable from each other.
   Energy lives in the colour and motion; the claims stay sober.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── DESIGN TOKENS ────────────────────────────────────────────────────────── */
:root {
  /* Base — deep indigo void */
  --void:        #080814;
  --bg:          #0C0C1C;
  --bg-2:        #0F0F20;
  --panel:       #14142A;
  --panel-2:     #191934;
  --elev:        #1F1F3D;
  --border:      #2C2C52;
  --border-soft: #212140;

  /* Text — every value below is >= 7:1 on the page background (WCAG AAA).
     v0.2.1's --text-dim measured 4.04:1, which failed AA outright. */
  --text:        #F4F4FF;
  --text-muted:  #C3C3E4;
  --text-dim:    #9C9CC6;

  /* Signal spectrum — the brand */
  --violet:      #8B5CF6;
  --violet-lt:   #BBA6FF;
  --cyan:        #22D3EE;
  --cyan-lt:     #7DEEFB;
  --mint:        #34D399;
  --amber:       #FBBF24;

  --accent:      var(--violet-lt);
  --good:        #34D399;
  --bad:         #F87171;
  --warn:        #FBBF24;

  /* Gradients */
  --signal-grad: linear-gradient(115deg, #A78BFA 0%, #22D3EE 48%, #34D399 100%);
  --signal-soft: linear-gradient(115deg, rgba(167,139,250,.20), rgba(34,211,238,.16) 50%, rgba(52,211,153,.14));
  --violet-grad: linear-gradient(135deg, #8B5CF6 0%, #6366F1 100%);

  /* Glass */
  --glass-bg:        rgba(255,255,255,0.045);
  --glass-bg-strong: rgba(255,255,255,0.085);
  --glass-border:    rgba(255,255,255,0.11);

  /* Depth */
  --shadow-sm:   0 2px 12px rgba(0,0,0,.28);
  --shadow:      0 12px 34px rgba(0,0,0,.36);
  --shadow-lg:   0 30px 70px rgba(0,0,0,.50);
  --glow-violet: 0 0 34px rgba(139,92,246,.34);
  --glow-cyan:   0 0 30px rgba(34,211,238,.30);

  /* Motion */
  --ease-lux:        cubic-bezier(.16,.84,.44,1);
  --transition:      .3s ease;
  --transition-fast: .18s ease;

  /* Geometry */
  --nav-h:      68px;
  --max-width:  1120px;
  --section-pad: 92px;
  --radius-sm:  6px;
  --radius:     10px;
  --radius-lg:  16px;
  --radius-xl:  22px;

  /* Type */
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-sans:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono:    ui-monospace, SFMono-Regular, 'SF Mono', Menlo, monospace;
}

/* ── RESET & BASE ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.72;
  padding-top: var(--nav-h);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Faint fixed aurora behind everything — depth without noise. */
  background-image:
    radial-gradient(52% 42% at 88% 4%,  rgba(139,92,246,.13) 0%, transparent 62%),
    radial-gradient(46% 38% at 4% 22%,  rgba(34,211,238,.09) 0%, transparent 60%),
    radial-gradient(60% 50% at 50% 100%, rgba(52,211,153,.07) 0%, transparent 66%);
  background-attachment: fixed;
}

img { max-width: 100%; display: block; }

a { color: var(--cyan-lt); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--violet-lt); }

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

/* Skip link — house accessibility standard */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 3000;
  background: var(--violet); color: #0B0B18;
  padding: 12px 20px; border-radius: 0 0 var(--radius) 0; font-weight: 700;
}
.skip-link:focus { left: 0; }

/* ── LAYOUT ───────────────────────────────────────────────────────────────── */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 22px; }
.container--narrow { max-width: 700px; }

.hidden { display: none !important; }
.muted  { color: var(--text-muted); }
.dim    { color: var(--text-dim); font-size: .88rem; }
.mono   { font-family: var(--font-mono); }

/* ── TYPE ─────────────────────────────────────────────────────────────────── */
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.14; letter-spacing: -.015em; }

.overline {
  font-family: var(--font-sans);
  font-size: .7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .18em;
  color: var(--cyan); margin-bottom: 12px; display: block;
}

/* Signal-spectrum text — the signature effect */
.shimmer, .hero h1 em, .stat__v {
  background: var(--signal-grad);
  background-size: 220% auto;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: signalShimmer 7s linear infinite;
}
@keyframes signalShimmer { to { background-position: 220% center; } }

/* ── SCROLL PROGRESS (injected by main.js) ────────────────────────────────── */
#scroll-progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0;
  background: var(--signal-grad);
  box-shadow: 0 0 14px rgba(139,92,246,.7);
  z-index: 2000; pointer-events: none;
  transition: width .12s linear;
}

/* ── NAV — glass ──────────────────────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  height: var(--nav-h);
  background: rgba(11,11,24,.55);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid transparent;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
  padding-top: env(safe-area-inset-top, 0px);
}
.nav.solid {
  background: rgba(9,9,20,.82);
  border-bottom-color: rgba(255,255,255,.07);
  box-shadow: 0 8px 34px rgba(0,0,0,.34);
}
.nav__inner {
  max-width: var(--max-width); margin: 0 auto; padding: 0 22px;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
}
.nav__logo {
  font-family: var(--font-display);
  font-size: 1.14rem; font-weight: 600; letter-spacing: .01em;
  color: var(--text); white-space: nowrap;
}
.nav__logo:hover { color: var(--text); }
.nav__logo span {
  background: var(--signal-grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav__links { display: flex; align-items: center; gap: 3px; list-style: none; }
.nav__links a {
  position: relative; display: block; padding: 8px 13px; border-radius: 8px;
  color: var(--text-muted); font-size: .92rem; font-weight: 500;
}
.nav__links a:hover { color: var(--text); }
/* Underline sweep — Rheme pattern, signal palette */
.nav__links a:not(.nav__cta)::after {
  content: ''; position: absolute; left: 13px; right: 100%; bottom: 3px; height: 2px;
  background: var(--signal-grad); border-radius: 2px;
  transition: right .34s var(--ease-lux);
}
.nav__links a:not(.nav__cta):hover::after,
.nav__links a:not(.nav__cta).active::after { right: 13px; }
.nav__links a.active { color: var(--text); }

.nav__cta {
  border: 1px solid var(--border);
  background: var(--glass-bg);
  color: var(--text) !important;
}
.nav__cta:hover { border-color: rgba(167,139,250,.5); box-shadow: var(--glow-violet); }

.nav__toggle {
  display: none; background: none; border: 0; color: var(--text);
  font-size: 1.4rem; cursor: pointer; padding: 6px 8px; line-height: 1;
}

@media (max-width: 900px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: fixed; top: calc(var(--nav-h) + env(safe-area-inset-top, 0px));
    left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(9,9,20,.97);
    -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border-soft);
    padding: 8px; max-height: 0; overflow: hidden;
    transition: max-height .28s var(--ease-lux);
  }
  .nav__links.open { max-height: 82vh; overflow-y: auto; }
  .nav__links a { padding: 13px 15px; }
  .nav__links a:not(.nav__cta)::after { display: none; }
}

/* ── BUTTONS ──────────────────────────────────────────────────────────────── */
button, .btn {
  position: relative; overflow: hidden;
  display: inline-block; text-align: center;
  background: var(--violet-grad); color: #fff;
  border: 0; border-radius: var(--radius);
  padding: 12px 24px;
  font-family: var(--font-sans); font-size: .88rem; font-weight: 600;
  letter-spacing: .015em; cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition), opacity var(--transition-fast);
}
button:hover, .btn:hover {
  color: #fff; transform: translateY(-1px);
  box-shadow: 0 12px 32px rgba(139,92,246,.42);
}
/* Shine sweep — Rheme pattern */
button::after, .btn::after {
  content: ''; position: absolute; top: 0; left: -130%; width: 55%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,.45), transparent);
  transform: skewX(-20deg); transition: left .65s var(--ease-lux); pointer-events: none;
}
button:hover::after, .btn:hover::after { left: 135%; }

button:disabled {
  opacity: .35; cursor: default; transform: none; box-shadow: none;
}
button:disabled::after { display: none; }

button.ghost, .btn.ghost {
  background: var(--glass-bg); color: var(--text-muted);
  border: 1px solid var(--border);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
button.ghost:hover, .btn.ghost:hover {
  color: var(--text); border-color: rgba(167,139,250,.45);
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
}
button.small { padding: 7px 14px; font-size: .76rem; }

/* ── FORMS ────────────────────────────────────────────────────────────────── */
label, .label {
  display: block; font-size: .76rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .13em;
  color: var(--text-muted); margin-bottom: 9px;
}

/* Section heading inside a card — serif, so card headings carry the same
   character as the page title instead of reading as small grey admin type. */
.card-title {
  font-family: var(--font-display);
  font-size: 1.22rem; font-weight: 600; letter-spacing: -.01em;
  color: var(--text); margin-bottom: 10px; line-height: 1.25;
}

input[type=text], input[type=email], input[type=password], select, textarea {
  width: 100%;
  background: rgba(255,255,255,.04);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 11px 13px; font-size: .95rem; font-family: inherit;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: rgba(139,92,246,.6);
  background: rgba(255,255,255,.06);
  box-shadow: 0 0 0 3px rgba(139,92,246,.15);
}
textarea { resize: vertical; }
select { cursor: pointer; }

.row { display: flex; gap: 15px; flex-wrap: wrap; align-items: flex-end; }
.row > div { flex: 1; min-width: 168px; }
.row > div.shrink { flex: 0 0 auto; min-width: 0; }

/* ── CARDS — glass with gradient glow border ──────────────────────────────── */
.card {
  position: relative; overflow: hidden;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 26px 28px;
  margin-bottom: 20px;
  box-shadow: 0 4px 26px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.05);
  transition: transform .5s var(--ease-lux), box-shadow .5s var(--ease-lux),
              border-color .5s var(--ease-lux), background .5s var(--ease-lux);
}
/* Masked gradient border, revealed on hover (Rheme mask-composite trick) */
.card--lift::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: linear-gradient(140deg, rgba(167,139,250,.75), transparent 38%, transparent 62%, rgba(34,211,238,.5));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .5s ease; pointer-events: none;
}
.card--lift:hover {
  transform: translateY(-7px);
  background: var(--glass-bg-strong);
  box-shadow: 0 30px 60px rgba(0,0,0,.42);
}
.card--lift:hover::after { opacity: 1; }

/* ── SCROLL REVEAL — blur-in + scale ──────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(34px) scale(.988);
  filter: blur(6px);
  transition: opacity .8s var(--ease-lux), transform .8s var(--ease-lux), filter .8s var(--ease-lux);
}
.reveal.visible { opacity: 1; transform: none; filter: blur(0); }
.reveal-d1 { transition-delay: .08s; }
.reveal-d2 { transition-delay: .16s; }
.reveal-d3 { transition-delay: .24s; }
.reveal-d4 { transition-delay: .32s; }

/* ── HERO — aurora mesh + grain + pointer spotlight ───────────────────────── */
.hero {
  position: relative; overflow: hidden;
  padding: 84px 0 62px;
  margin-top: calc(var(--nav-h) * -1);
  padding-top: calc(var(--nav-h) + 84px);
  background:
    radial-gradient(58% 68% at 84% 12%, rgba(139,92,246,.34) 0%, transparent 62%),
    radial-gradient(50% 58% at 6% 88%,  rgba(34,211,238,.22) 0%, transparent 60%),
    linear-gradient(150deg, var(--void) 0%, #0D0D22 55%, #121233 100%);
}
.hero::before {
  content: ''; position: absolute; z-index: 0; pointer-events: none;
  width: 780px; height: 780px; top: -290px; right: -180px; border-radius: 50%;
  background: radial-gradient(circle, rgba(52,211,153,.14), transparent 68%);
  filter: blur(52px);
  animation: auroraDrift 18s ease-in-out infinite;
}
@keyframes auroraDrift {
  0%, 100% { transform: translate(0,0) scale(1);     opacity: .8; }
  50%      { transform: translate(-46px,42px) scale(1.16); opacity: 1; }
}
/* Fine film grain */
.hero::after {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  opacity: .045; 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='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* Pointer-follow spotlight, injected by main.js */
.hero-spotlight {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(340px circle at var(--mx,70%) var(--my,26%), rgba(139,92,246,.14), transparent 62%);
  transition: background .25s ease;
}
.hero .container { position: relative; z-index: 3; }

.hero h1 {
  font-size: clamp(2.1rem, 5.4vw, 3.4rem);
  max-width: 17ch;
}
.hero .lede {
  color: var(--text-muted); font-size: 1.12rem;
  margin-top: 18px; max-width: 58ch;
}
.hero__actions { display: flex; gap: 13px; margin-top: 30px; flex-wrap: wrap; }

/* ── SECTIONS WITH AMBIENT ORBS ───────────────────────────────────────────── */
.section-orbs { position: relative; overflow: hidden; }
.section-orbs > .container { position: relative; z-index: 1; }
.section-orbs::before, .section-orbs::after {
  content: ''; position: absolute; border-radius: 50%;
  pointer-events: none; filter: blur(48px);
}
.section-orbs::before {
  width: 460px; height: 460px; top: -140px; left: -130px;
  background: radial-gradient(circle, rgba(139,92,246,.20), transparent 70%);
  animation: floatOrb 16s ease-in-out infinite;
}
.section-orbs::after {
  width: 400px; height: 400px; bottom: -160px; right: -120px;
  background: radial-gradient(circle, rgba(34,211,238,.13), transparent 70%);
  animation: floatOrb 21s ease-in-out infinite reverse;
}
@keyframes floatOrb {
  0%, 100% { transform: translate(0,0); }
  50%      { transform: translate(40px,32px); }
}

/* ── PAGE FURNITURE ───────────────────────────────────────────────────────── */
.page-head { padding: 40px 0 20px; }
.page-head h1 { font-size: clamp(1.6rem, 3.6vw, 2.1rem); }
.page-head p { color: var(--text-muted); margin-top: 10px; font-size: 1.02rem; }

.feature-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(238px, 1fr));
  gap: 18px;
}
.feature h3 { font-size: 1.05rem; margin-bottom: 7px; }
.feature p  { color: var(--text-muted); font-size: .95rem; }

/* ── ALERTS ───────────────────────────────────────────────────────────────── */
.alert {
  border-radius: var(--radius); padding: 14px 17px; margin-bottom: 18px;
  font-size: .9rem; border: 1px solid;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.alert--bad  { background: rgba(248,113,113,.09); border-color: rgba(248,113,113,.32); color: #FCA5A5; }
.alert--good { background: rgba(52,211,153,.09);  border-color: rgba(52,211,153,.30);  color: #6EE7B7; }
.alert--warn { background: rgba(251,191,36,.08);  border-color: rgba(251,191,36,.30);  color: #FCD34D; }

/* ── STEPS ────────────────────────────────────────────────────────────────── */
.steps { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.step {
  font-size: .69rem; font-weight: 700; text-transform: uppercase; letter-spacing: .11em;
  color: var(--text-dim); padding: 6px 13px; border-radius: 100px;
  border: 1px solid var(--border-soft);
  transition: color var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.step.on {
  color: var(--text); border-color: rgba(139,92,246,.55);
  box-shadow: var(--glow-violet);
}
.step.done { color: var(--text-muted); border-color: var(--border); }

/* ── SCANTRON / PLAYSLIP ──────────────────────────────────────────────────── */
/* Stays a light physical panel on purpose — it should feel like paper in the
   middle of the dark interface, the way a real playslip does. */
.playslip {
  background: linear-gradient(175deg, #F6F3EA 0%, #EDE9DC 100%);
  border: 1px solid #C9C2AE;
  border-radius: var(--radius);
  padding: 18px 16px;
  color: #1B1E26;
  box-shadow: 0 18px 44px rgba(0,0,0,.42), inset 0 1px 0 rgba(255,255,255,.7);
}
.playslip__head {
  display: flex; justify-content: space-between; align-items: baseline;
  border-bottom: 2px solid #1B1E26; padding-bottom: 8px; margin-bottom: 14px;
}
.playslip__title {
  font-family: var(--font-sans);
  font-weight: 800; text-transform: uppercase; letter-spacing: .12em;
  font-size: .8rem; color: #1B1E26;
}
.playslip__note { font-size: .72rem; color: #6A6558; }
.playslip__section + .playslip__section { margin-top: 18px; }
.playslip .label { color: #6A6558; }

.bubbles { display: grid; grid-template-columns: repeat(10, minmax(0,1fr)); gap: 5px; }
.bubbles--narrow { grid-template-columns: repeat(5, minmax(0,1fr)); }

.bubble {
  appearance: none; background: transparent; overflow: visible;
  border: 1.6px solid #6F6A5C; border-radius: 50% / 42%;
  color: #1B1E26; font-family: var(--font-mono);
  font-size: .8rem; font-weight: 600; letter-spacing: 0;
  padding: 0; height: 34px; cursor: pointer;
  transition: background .1s ease, transform .1s ease;
  box-shadow: none;
}
.bubble::after { display: none; }
.bubble:hover { background: #E2DDCB; transform: none; box-shadow: none; color: #1B1E26; }
.bubble.sel {
  background: #1B1E26; color: #F6F3EA; border-color: #1B1E26;
  box-shadow: 0 0 0 2px rgba(139,92,246,.4);
}
.bubble:disabled { opacity: .3; cursor: default; }
.playslip__count { font-size: .74rem; color: #6A6558; margin-top: 10px; font-family: var(--font-mono); }

/* ── BALLS ────────────────────────────────────────────────────────────────── */
.ball {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, #FFFFFF 0%, #DFE3EC 68%, #C3C8D6 100%);
  color: #12161F; font-weight: 800; font-size: .95rem; margin: 3px;
  font-family: var(--font-mono);
  box-shadow: 0 4px 12px rgba(0,0,0,.4);
}
.ball--special {
  background: radial-gradient(circle at 34% 28%, #FDE68A 0%, #FBBF24 66%, #D99B14 100%);
  color: #1B1508;
}
.ball--match {
  box-shadow: 0 0 0 3px var(--mint), 0 0 26px rgba(52,211,153,.55);
}
.ball--miss { opacity: .42; }
.ball--lg { width: 60px; height: 60px; font-size: 1.3rem; }

/* ── CANVAS ───────────────────────────────────────────────────────────────── */
.padwrap {
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; background: #FFFFFF;
  box-shadow: var(--shadow);
}
#pad { display: block; width: 100%; touch-action: none; cursor: crosshair; }
.toolbar {
  display: flex; gap: 7px; padding: 9px;
  background: var(--panel-2); flex-wrap: wrap; align-items: center;
}
.swatch {
  width: 28px; height: 28px; min-width: 28px; padding: 0;
  border-radius: 50%; border: 2px solid var(--border);
  cursor: pointer; box-shadow: none; overflow: visible;
}
.swatch::after { display: none; }
.swatch:hover { transform: scale(1.1); box-shadow: none; }
.swatch.sel { border-color: var(--cyan); box-shadow: var(--glow-cyan); }

/* ── MULTIPLE CHOICE ──────────────────────────────────────────────────────── */
.mc-option {
  display: block; width: 100%; text-align: left; overflow: hidden;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 2px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; margin-bottom: 11px;
  color: var(--text); font-weight: 400; letter-spacing: 0;
  box-shadow: none;
  transition: border-color .35s var(--ease-lux), transform .35s var(--ease-lux), background .35s var(--ease-lux);
}
.mc-option::after { display: none; }
.mc-option:hover {
  border-color: rgba(167,139,250,.5); transform: translateY(-2px);
  background: var(--glass-bg-strong); box-shadow: 0 14px 32px rgba(0,0,0,.34);
}
.mc-option.sel { border-color: var(--violet-lt); box-shadow: var(--glow-violet); }
.mc-option.correct { border-color: var(--mint); }
.mc-option.wrong { border-color: var(--bad); }
.mc-option .bignum {
  font-size: 1.9rem; font-weight: 800; font-family: var(--font-mono);
}

/* ── STATS ────────────────────────────────────────────────────────────────── */
.statgrid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(124px, 1fr));
  gap: 16px; margin: 8px 0 16px;
}
.stat__v {
  font-size: 2.05rem; font-weight: 800;
  font-family: var(--font-mono); line-height: 1.2;
}
.stat__l {
  font-size: .72rem; color: var(--text-muted); text-transform: uppercase;
  letter-spacing: .1em; margin-top: 3px; font-weight: 600;
}

/* ── TABLES ───────────────────────────────────────────────────────────────── */
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { padding: 9px 11px; border-bottom: 1px solid var(--border-soft); text-align: left; }
th {
  color: var(--text-muted); text-transform: uppercase;
  font-size: .71rem; letter-spacing: .1em; font-weight: 700;
}
tbody tr { transition: background var(--transition-fast); }
tbody tr:hover { background: rgba(255,255,255,.03); }

.tag {
  display: inline-block; font-size: .71rem; padding: 3px 11px;
  border-radius: 100px; background: rgba(255,255,255,.05);
  color: var(--text-muted); border: 1px solid var(--border);
  letter-spacing: .08em; text-transform: uppercase; font-weight: 700;
}
.tag--present { color: var(--cyan-lt);  border-color: rgba(34,211,238,.4);  background: rgba(34,211,238,.07); }
.tag--future  { color: var(--violet-lt); border-color: rgba(167,139,250,.4); background: rgba(139,92,246,.09); }

/* ── FOOTER ───────────────────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border-soft);
  margin-top: 64px; padding: 34px 0 52px;
  background: linear-gradient(180deg, transparent, rgba(7,7,15,.65));
  color: var(--text-muted); font-size: .89rem;
}
.footer a { color: var(--text-muted); }
.footer a:hover { color: var(--cyan-lt); }
.footer__links { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 16px; }
.footer__disclaimer {
  border: 1px solid var(--border-soft); border-radius: var(--radius);
  padding: 15px 17px; background: rgba(255,255,255,.025);
  line-height: 1.6; max-width: 790px;
}

/* ── RESPONSIVE ───────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  :root { --section-pad: 58px; }
  .bubbles { grid-template-columns: repeat(7, minmax(0,1fr)); }
  .ball { width: 36px; height: 36px; font-size: .85rem; }
  .ball--lg { width: 50px; height: 50px; font-size: 1.1rem; }
  .card { padding: 20px 18px; }
  .hero { padding-top: calc(var(--nav-h) + 52px); padding-bottom: 44px; }
}

/* ── REDUCED MOTION (house accessibility standard) ────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; filter: none !important; }
  .hero::before, .section-orbs::before, .section-orbs::after { animation: none; }
  .shimmer, .hero h1 em, .stat__v { animation: none; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   THEME SYSTEM  (v0.3.0)
   Four palettes, chosen on <html> before first paint by main.js so there is
   no flash. Stored in localStorage as `esplot_theme`.

     theme-starfield  night sky with drifting stars   (default)
     theme-nightfall  plain deep indigo, no stars
     theme-slate      lighter blue-grey, softest contrast, no stars
     theme-daybreak   light theme

   Every palette below was contrast-checked: all text tokens sit at 7:1 or
   better against their own background, except two `--text-dim` values at
   ~5.3:1 which still clear WCAG AA comfortably.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── NIGHTFALL — the plain dark theme (same tokens as :root) ──────────────── */
.theme-nightfall .starfield { display: none; }

/* ── SLATE — lighter, softer, less saturated. For long sessions and for
      anyone who finds near-black hard to read against. ───────────────────── */
.theme-slate {
  --void:        #10131F;
  --bg:          #171B2B;
  --bg-2:        #1B2032;
  --panel:       #202638;
  --panel-2:     #263047;
  --elev:        #2B3450;
  --border:      #3A4560;
  --border-soft: #2E374E;

  --text:        #EEF1F8;
  --text-muted:  #BFC7DA;
  --text-dim:    #98A2BA;

  --violet-lt:   #C4B2FF;
  --cyan-lt:     #8CEFFA;

  --glass-bg:        rgba(255,255,255,0.055);
  --glass-bg-strong: rgba(255,255,255,0.10);
  --glass-border:    rgba(255,255,255,0.14);
}
.theme-slate .starfield { display: none; }
.theme-slate body, body.theme-slate { background-image: none; }
.theme-slate .hero {
  background:
    radial-gradient(58% 68% at 84% 12%, rgba(139,92,246,.26) 0%, transparent 62%),
    radial-gradient(50% 58% at 6% 88%,  rgba(34,211,238,.18) 0%, transparent 60%),
    linear-gradient(150deg, #141827 0%, #1A2033 55%, #212942 100%);
}
.theme-slate .nav { background: rgba(23,27,43,.62); }
.theme-slate .nav.solid { background: rgba(20,24,39,.88); }

/* ── DAYBREAK — light theme ───────────────────────────────────────────────── */
.theme-daybreak {
  --void:        #FFFFFF;
  --bg:          #F7F7FC;
  --bg-2:        #FFFFFF;
  --panel:       #FFFFFF;
  --panel-2:     #F0F0F8;
  --elev:        #ECECF6;
  --border:      #D6D6E6;
  --border-soft: #E4E4F0;

  --text:        #171733;
  --text-muted:  #4A4A70;
  --text-dim:    #63638C;

  --violet:      #6D3DEB;
  --violet-lt:   #5B2FD6;
  --cyan:        #0E86A8;
  --cyan-lt:     #0B7A99;
  --mint:        #0F8F63;
  --good:        #0F8F63;
  --bad:         #C43D3D;
  --warn:        #9A6B08;

  --signal-grad: linear-gradient(115deg, #6D3DEB 0%, #0E86A8 48%, #0F8F63 100%);
  --violet-grad: linear-gradient(135deg, #6D3DEB 0%, #4F46E5 100%);

  --glass-bg:        rgba(255,255,255,0.72);
  --glass-bg-strong: rgba(255,255,255,0.92);
  --glass-border:    rgba(23,23,51,0.10);

  --shadow-sm:   0 2px 10px rgba(23,23,51,.07);
  --shadow:      0 12px 30px rgba(23,23,51,.10);
  --shadow-lg:   0 28px 60px rgba(23,23,51,.14);
  --glow-violet: 0 0 26px rgba(109,61,235,.20);
  --glow-cyan:   0 0 22px rgba(14,134,168,.18);
}
.theme-daybreak .starfield { display: none; }
.theme-daybreak body, body.theme-daybreak {
  background-image:
    radial-gradient(52% 42% at 88% 2%,  rgba(109,61,235,.09) 0%, transparent 62%),
    radial-gradient(46% 38% at 4% 20%,  rgba(14,134,168,.07) 0%, transparent 60%);
}
.theme-daybreak .hero {
  background:
    radial-gradient(58% 68% at 84% 10%, rgba(109,61,235,.13) 0%, transparent 62%),
    radial-gradient(50% 58% at 6% 88%,  rgba(14,134,168,.10) 0%, transparent 60%),
    linear-gradient(150deg, #FFFFFF 0%, #F4F2FE 55%, #EEF6FA 100%);
}
.theme-daybreak .hero::after { opacity: .02; }
.theme-daybreak .nav { background: rgba(247,247,252,.68); }
.theme-daybreak .nav.solid { background: rgba(255,255,255,.90); border-bottom-color: rgba(23,23,51,.09); }
.theme-daybreak .card { box-shadow: var(--shadow-sm); }
.theme-daybreak .card--lift:hover { box-shadow: var(--shadow-lg); }
.theme-daybreak .skip-link { color: #fff; }
.theme-daybreak button, .theme-daybreak .btn { color: #fff; }
.theme-daybreak .ball { box-shadow: 0 3px 10px rgba(23,23,51,.22); }
.theme-daybreak .footer { background: linear-gradient(180deg, transparent, rgba(23,23,51,.04)); }
.theme-daybreak tbody tr:hover { background: rgba(23,23,51,.035); }

/* ═══════════════════════════════════════════════════════════════════════════
   STARFIELD
   Three parallax layers of tiled radial-gradient points, drifting at
   different speeds, plus an independent twinkle rhythm per layer. Pure CSS —
   no canvas, no JS loop, no measurable cost.

   Fixed behind everything and pointer-events:none, so it never interferes
   with the drawing canvas or any control.
   ═══════════════════════════════════════════════════════════════════════════ */
.starfield {
  position: fixed; inset: 0; z-index: -1;
  pointer-events: none; overflow: hidden;
}
.starfield__layer {
  position: absolute;
  top: -100%; left: -100%; width: 300%; height: 300%;
  background-repeat: repeat;
}

/* Far layer — small, dense, slow */
.starfield__layer--far {
  background-image:
    radial-gradient(1px 1px at  12%  18%, rgba(255,255,255,.85), transparent),
    radial-gradient(1px 1px at  38%  62%, rgba(199,214,255,.75), transparent),
    radial-gradient(1px 1px at  64%  28%, rgba(255,255,255,.70), transparent),
    radial-gradient(1px 1px at  86%  74%, rgba(214,199,255,.72), transparent),
    radial-gradient(1px 1px at  22%  88%, rgba(255,255,255,.65), transparent),
    radial-gradient(1px 1px at  74%   8%, rgba(255,255,255,.78), transparent),
    radial-gradient(1px 1px at  50%  46%, rgba(190,220,255,.60), transparent),
    radial-gradient(1px 1px at   6%  52%, rgba(255,255,255,.62), transparent);
  background-size: 260px 260px;
  animation: starDriftFar 260s linear infinite, twinkleFar 7s ease-in-out infinite;
}

/* Mid layer — brighter, sparser */
.starfield__layer--mid {
  background-image:
    radial-gradient(1.5px 1.5px at 28%  34%, rgba(255,255,255,.95), transparent),
    radial-gradient(1.5px 1.5px at 72%  66%, rgba(187,166,255,.90), transparent),
    radial-gradient(1.5px 1.5px at 16%  78%, rgba(255,255,255,.88), transparent),
    radial-gradient(1.5px 1.5px at 90%  22%, rgba(125,238,251,.82), transparent),
    radial-gradient(1.5px 1.5px at 54%   6%, rgba(255,255,255,.86), transparent);
  background-size: 420px 420px;
  animation: starDriftMid 180s linear infinite, twinkleMid 4.5s ease-in-out infinite;
}

/* Near layer — few, largest, faint halo */
.starfield__layer--near {
  background-image:
    radial-gradient(2.2px 2.2px at 44% 24%, rgba(255,255,255,1), transparent),
    radial-gradient(2.2px 2.2px at 82% 58%, rgba(125,238,251,.95), transparent),
    radial-gradient(2px   2px   at 10% 40%, rgba(187,166,255,.92), transparent),
    radial-gradient(2px   2px   at 62% 86%, rgba(255,255,255,.90), transparent);
  background-size: 680px 680px;
  animation: starDriftNear 120s linear infinite, twinkleNear 3.2s ease-in-out infinite;
}

@keyframes starDriftFar  { to { transform: translate3d(-260px, 130px, 0); } }
@keyframes starDriftMid  { to { transform: translate3d(-420px, 210px, 0); } }
@keyframes starDriftNear { to { transform: translate3d(-680px, 340px, 0); } }

@keyframes twinkleFar  { 0%,100% { opacity: .55; } 50% { opacity: .90; } }
@keyframes twinkleMid  { 0%,100% { opacity: .70; } 50% { opacity: 1;   } }
@keyframes twinkleNear { 0%,100% { opacity: .60; } 50% { opacity: 1;   } }

/* ── CALM MODE ────────────────────────────────────────────────────────────
   While a viewer is actually perceiving, the sky settles. A moving
   background during a session is the opposite of what the practice needs —
   the whole point is a quiet mind. main.js adds .calm to <html> when the
   trainer enters the perceive step and removes it at reveal. ───────────── */
html.calm .starfield { opacity: 0; transition: opacity 1.1s ease; }
html.calm .starfield__layer { animation: none; }
/* Nothing moves during a session. Not the sky, not the shimmer, not the orbs
   — a viewer should have no competing motion anywhere on the page. */
html.calm .hero::before,
html.calm .section-orbs::before,
html.calm .section-orbs::after { animation: none; }
html.calm .shimmer,
html.calm .hero h1 em,
html.calm .stat__v { animation: none; }
html.calm .hero-spotlight { display: none; }
html.calm #scroll-progress { opacity: 0; transition: opacity .6s ease; }

/* ═══════════════════════════════════════════════════════════════════════════
   THEME SWITCHER — palette button, bottom right
   ═══════════════════════════════════════════════════════════════════════════ */
.theme-switch {
  position: fixed; right: 20px; bottom: 20px; z-index: 1200;
  display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.theme-switch__toggle {
  width: 46px; height: 46px; padding: 0; border-radius: 50%;
  background: var(--glass-bg-strong);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
  display: flex; align-items: center; justify-content: center;
  overflow: visible; cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition);
}
.theme-switch__toggle::after { display: none; }
.theme-switch__toggle:hover { transform: scale(1.07); box-shadow: var(--shadow-lg); }
.theme-switch__toggle svg { width: 22px; height: 22px; display: block; }

.theme-switch__panel {
  display: flex; flex-direction: column; gap: 8px;
  padding: 12px; border-radius: var(--radius-lg);
  background: var(--glass-bg-strong);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateY(10px) scale(.96);
  pointer-events: none;
  transition: opacity .26s var(--ease-lux), transform .26s var(--ease-lux);
}
.theme-switch__panel.open { opacity: 1; transform: none; pointer-events: auto; }

.theme-opt {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 12px 7px 8px; border-radius: 100px;
  background: transparent; border: 1px solid transparent;
  color: var(--text-muted); font-size: .82rem; font-weight: 600;
  letter-spacing: .01em; text-align: left; white-space: nowrap;
  cursor: pointer; overflow: visible; box-shadow: none;
}
.theme-opt::after { display: none; }
.theme-opt:hover { background: var(--glass-bg); color: var(--text); transform: none; box-shadow: none; }
.theme-opt[aria-checked="true"] { border-color: var(--violet-lt); color: var(--text); }
.theme-opt__dot {
  width: 20px; height: 20px; border-radius: 50%; flex: 0 0 auto;
  border: 1px solid rgba(255,255,255,.28);
}
.theme-opt__dot--starfield { background: radial-gradient(circle at 30% 28%, #3B3B6E 0%, #0C0C1C 72%); }
.theme-opt__dot--nightfall { background: linear-gradient(135deg, #8B5CF6, #0C0C1C 78%); }
.theme-opt__dot--slate     { background: linear-gradient(135deg, #C4B2FF, #171B2B 78%); }
.theme-opt__dot--daybreak  { background: linear-gradient(135deg, #FFFFFF 40%, #6D3DEB); }

@media (max-width: 640px) {
  .theme-switch { right: 14px; bottom: 14px; }
  .theme-switch__toggle { width: 42px; height: 42px; }
}

@media (prefers-reduced-motion: reduce) {
  .starfield__layer { animation: none !important; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   CARD DRILL  (v0.4.0)
   ═══════════════════════════════════════════════════════════════════════════ */
.cardstage { display: flex; justify-content: center; padding: 12px 0 4px; perspective: 1400px; }

.flipcard { width: 230px; height: 330px; }
.flipcard__inner {
  position: relative; width: 100%; height: 100%;
  transform-style: preserve-3d;
  transition: transform .62s var(--ease-lux);
}
.flipcard.flipped .flipcard__inner { transform: rotateY(180deg); }

.flipcard__face {
  position: absolute; inset: 0;
  -webkit-backface-visibility: hidden; backface-visibility: hidden;
  border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--glass-border);
}

/* Back — the face-down card the viewer stares at */
.flipcard__back {
  background:
    radial-gradient(circle at 50% 42%, rgba(255,255,255,.07), transparent 62%),
    linear-gradient(160deg, #1B1B3A 0%, #101026 60%, #0A0A18 100%);
}
.flipcard__mark {
  width: 116px; height: 116px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.16);
  background:
    radial-gradient(circle at 50% 50%, rgba(187,166,255,.30), transparent 58%),
    repeating-conic-gradient(from 0deg, rgba(255,255,255,.05) 0deg 6deg, transparent 6deg 12deg);
  box-shadow: inset 0 0 30px rgba(139,92,246,.24);
}
/* Optional colour cue — assigned by card ordinal, never by the answer */
.flipcard__back.c-violet { background: linear-gradient(160deg,#2A1B52,#150F30 62%,#0A0A18); }
.flipcard__back.c-cyan   { background: linear-gradient(160deg,#0E3A4A,#0A2434 62%,#07131E); }
.flipcard__back.c-mint   { background: linear-gradient(160deg,#0F3F31,#0A2A22 62%,#061715); }
.flipcard__back.c-amber  { background: linear-gradient(160deg,#4A3610,#2E220B 62%,#171106); }
.flipcard__back.c-rose   { background: linear-gradient(160deg,#4A1830,#2E0F1F 62%,#170812); }

/* Front — the revealed number */
.flipcard__front {
  transform: rotateY(180deg);
  background: linear-gradient(165deg, #F7F5EE 0%, #E8E4D6 100%);
  color: #14161F;
  font-family: var(--font-mono);
  font-size: 5.4rem; font-weight: 800; letter-spacing: -.03em;
}
.flipcard__front.is-hit  { box-shadow: 0 0 0 3px var(--mint), 0 0 44px rgba(52,211,153,.5), var(--shadow-lg); }
.flipcard__front.is-miss { opacity: .9; }

/* Colour chips for "what colour did you perceive" */
.colorpick { display: flex; gap: 10px; flex-wrap: wrap; }
.colorchip {
  width: 40px; height: 40px; min-width: 40px; padding: 0;
  border-radius: 12px; border: 2px solid var(--border);
  cursor: pointer; overflow: visible; box-shadow: none;
}
.colorchip::after { display: none; }
.colorchip:hover { transform: translateY(-2px); box-shadow: none; }
.colorchip.sel { border-color: var(--text); box-shadow: 0 0 0 3px rgba(255,255,255,.16); }
.colorchip.c-violet { background: linear-gradient(150deg,#A78BFA,#6D3DEB); }
.colorchip.c-cyan   { background: linear-gradient(150deg,#7DEEFB,#0E86A8); }
.colorchip.c-mint   { background: linear-gradient(150deg,#6EE7B7,#0F8F63); }
.colorchip.c-amber  { background: linear-gradient(150deg,#FDE68A,#D99B14); }
.colorchip.c-rose   { background: linear-gradient(150deg,#FDA4C0,#C43D6B); }

/* Toggle-style checkbox row */
.switch {
  display: inline-flex; align-items: center; gap: 9px;
  text-transform: none; letter-spacing: 0; font-size: .92rem;
  font-weight: 500; color: var(--text-muted); margin: 0; cursor: pointer;
}
.switch input { width: auto; accent-color: var(--violet); cursor: pointer; }
.switch:hover { color: var(--text); }

@media (max-width: 520px) {
  .flipcard { width: 190px; height: 274px; }
  .flipcard__front { font-size: 4.4rem; }
  .flipcard__mark { width: 92px; height: 92px; }
}

/* Report builder checkbox grid */
.checkgrid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px 20px;
}

/* Admin sub-navigation */
.adminbar {
  display: flex; gap: 6px; flex-wrap: wrap;
  padding: 26px 0 0;
}
.adminbar a {
  padding: 7px 15px; border-radius: 100px;
  border: 1px solid var(--border); background: var(--glass-bg);
  color: var(--text-muted); font-size: .86rem; font-weight: 600;
}
.adminbar a:hover { color: var(--text); border-color: rgba(187,166,255,.45); }

/* ═══════════════════════════════════════════════════════════════════════════
   LANDING PAGE SECTIONS  (v0.4.0)
   Premium-template structure: full-bleed hero image, alternating bands,
   two fixed-attachment parallax breaks, split image/text sections.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Hero with a real image behind it ─────────────────────────────────────── */
.hero--image { padding-top: calc(var(--nav-h) + 92px); padding-bottom: 84px; }
.hero__bg { position: absolute; inset: 0; z-index: 0; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
/* Overlay: the copy has to stay readable over any part of the artwork. */
.hero--image::before {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  width: auto; height: auto; border-radius: 0; filter: none; animation: none;
  background: linear-gradient(105deg,
    rgba(8,8,20,.94) 0%, rgba(8,8,20,.86) 38%, rgba(8,8,20,.55) 68%, rgba(8,8,20,.40) 100%);
}
.hero--image::after { z-index: 2; }
.hero--image .container { z-index: 3; }

.hero__stats {
  display: flex; gap: 34px; flex-wrap: wrap;
  margin-top: 38px; padding-top: 22px;
  border-top: 1px solid rgba(255,255,255,.10);
}
.hero__stat-v {
  display: block; font-family: var(--font-mono); font-size: 1.5rem; font-weight: 800;
  background: var(--signal-grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero__stat-l {
  display: block; font-size: .72rem; text-transform: uppercase;
  letter-spacing: .12em; color: var(--text-dim); font-weight: 600;
}

/* ── Bands ────────────────────────────────────────────────────────────────── */
.band { padding: var(--section-pad) 0; position: relative; }
.band--tight { padding: 62px 0; }
.band--split { padding: 74px 0; }
.band + .band { border-top: 1px solid var(--border-soft); }

.band__head { max-width: 34ch; margin-bottom: 38px; }
.band__head h2 { font-size: clamp(1.5rem, 3.4vw, 2.15rem); }
.band__close {
  margin-top: 34px; font-family: var(--font-display);
  font-size: 1.24rem; color: var(--text); max-width: 44ch;
}

.tri  { display: grid; grid-template-columns: repeat(auto-fit, minmax(224px,1fr)); gap: 30px; }
.quad { display: grid; grid-template-columns: repeat(auto-fit, minmax(224px,1fr)); gap: 30px; }
.tri h3, .quad h3 { font-size: 1.06rem; margin-bottom: 8px; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 52px; align-items: center; }
.split h2 { font-size: clamp(1.4rem, 3.1vw, 1.95rem); margin-bottom: 14px; }
.split p { margin-bottom: 14px; }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; gap: 34px; }
  .split--reverse > *:first-child { order: 2; }
}

.figure { margin: 0; }
.figure img {
  width: 100%; border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border); box-shadow: var(--shadow-lg);
}
.steps4 {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  margin-top: 18px; font-size: .88rem; color: var(--text-muted); text-align: center;
}
.steps4 strong { color: var(--text); display: block; font-size: .95rem; }
@media (max-width: 700px) { .steps4 { grid-template-columns: repeat(2, 1fr); text-align: left; } }

/* ── Parallax breaks ──────────────────────────────────────────────────────── */
.parallax {
  position: relative; overflow: hidden;
  padding: 130px 0;
  background-image: var(--px-img);
  background-size: cover; background-position: center;
  background-attachment: fixed;   /* falls back to scroll below — see media query */
}
.parallax--short { padding: 96px 0; }
.parallax::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8,8,20,.86), rgba(8,8,20,.72) 50%, rgba(8,8,20,.90));
}
.parallax .container { position: relative; z-index: 1; }

.pullquote {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  line-height: 1.25; font-weight: 600; letter-spacing: -.02em;
  max-width: 20ch; color: var(--text); border: 0; padding: 0;
}
.pullquote em {
  font-style: normal;
  background: var(--signal-grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* iOS and most mobile browsers ignore fixed attachment, and where they honour
   it the repaint cost is severe. Degrade to a static cover image. */
@media (max-width: 1024px), (hover: none) {
  .parallax { background-attachment: scroll; }
}

/* ── Closing CTA band ─────────────────────────────────────────────────────── */
.cta-band {
  position: relative; overflow: hidden;
  padding: 96px 0;
  background-image: var(--px-img);
  background-size: cover; background-position: center;
}
.cta-band::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(120deg, rgba(8,8,20,.93) 0%, rgba(8,8,20,.80) 60%, rgba(8,8,20,.66) 100%);
}
.cta-band .container { position: relative; z-index: 1; }
.cta-band h2 { font-size: clamp(1.7rem, 4vw, 2.6rem); margin-bottom: 14px; }
.cta-band .lede { color: var(--text-muted); font-size: 1.08rem; max-width: 48ch; margin-bottom: 26px; }

/* Light theme needs lighter overlays or the artwork turns to mud */
.theme-daybreak .hero--image::before {
  background: linear-gradient(105deg, rgba(247,247,252,.96) 0%, rgba(247,247,252,.90) 40%, rgba(247,247,252,.62) 72%, rgba(247,247,252,.45) 100%);
}
.theme-daybreak .parallax::before,
.theme-daybreak .cta-band::before {
  background: linear-gradient(180deg, rgba(247,247,252,.90), rgba(247,247,252,.80) 50%, rgba(247,247,252,.93));
}
.theme-daybreak .hero__stats { border-top-color: rgba(23,23,51,.12); }

@media (max-width: 640px) {
  .hero--image { padding-top: calc(var(--nav-h) + 54px); padding-bottom: 54px; }
  .parallax { padding: 84px 0; }
  .cta-band { padding: 68px 0; }
}

/* ── Four-corner MC layout + optional colour cue (Phase 2A) ───────────────── */
.mc-corners {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}
.mc-corners .mc-option {
  margin-bottom: 0; min-height: 128px;
  display: flex; align-items: center; justify-content: center; text-align: center;
}
@media (max-width: 560px) { .mc-corners { grid-template-columns: 1fr; } }

.mc-option.mc-color { border-width: 2px; }
.mc-option.c-violet { background: linear-gradient(150deg, rgba(139,92,246,.20), rgba(139,92,246,.05)); border-color: rgba(167,139,250,.5); }
.mc-option.c-cyan   { background: linear-gradient(150deg, rgba(34,211,238,.18),  rgba(34,211,238,.05));  border-color: rgba(125,238,251,.5); }
.mc-option.c-mint   { background: linear-gradient(150deg, rgba(52,211,153,.18),  rgba(52,211,153,.05));  border-color: rgba(110,231,183,.5); }
.mc-option.c-amber  { background: linear-gradient(150deg, rgba(251,191,36,.18),  rgba(251,191,36,.05));  border-color: rgba(253,230,138,.5); }
.mc-option.c-rose   { background: linear-gradient(150deg, rgba(244,114,182,.18), rgba(244,114,182,.05)); border-color: rgba(253,164,192,.5); }

/* ── Long-form post typography ────────────────────────────────────────────── */
.prose { font-size: 1.05rem; line-height: 1.78; }
.prose h2 {
  font-family: var(--font-display); font-size: 1.44rem; font-weight: 600;
  margin: 34px 0 12px; letter-spacing: -.015em;
}
.prose h3 { font-family: var(--font-display); font-size: 1.18rem; margin: 26px 0 10px; }
.prose h4 { font-size: 1.02rem; font-weight: 700; margin: 22px 0 8px; }
.prose p { margin-bottom: 17px; color: var(--text-muted); }
.prose strong { color: var(--text); font-weight: 700; }
.prose ul, .prose ol { margin: 0 0 18px 22px; color: var(--text-muted); }
.prose li { margin-bottom: 8px; }
.prose blockquote {
  margin: 22px 0; padding: 4px 0 4px 20px;
  border-left: 3px solid var(--violet-lt);
  font-family: var(--font-display); font-size: 1.14rem;
  color: var(--text); line-height: 1.5;
}
.prose code {
  font-family: var(--font-mono); font-size: .88em;
  background: rgba(255,255,255,.06); padding: 2px 6px; border-radius: 5px;
}
.prose hr { border: 0; border-top: 1px solid var(--border-soft); margin: 30px 0; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose > *:first-child { margin-top: 0; }

/* File inputs need styling or they look pasted in from 2003 */
input[type=file] {
  width: 100%; padding: 10px 12px; font-size: .9rem;
  background: rgba(255,255,255,.04); color: var(--text-muted);
  border: 1px dashed var(--border); border-radius: var(--radius);
}
input[type=file]::file-selector-button {
  background: var(--glass-bg); color: var(--text); border: 1px solid var(--border);
  border-radius: 7px; padding: 6px 13px; margin-right: 12px;
  font-family: inherit; font-size: .85rem; font-weight: 600; cursor: pointer;
}
input[type=file]::file-selector-button:hover { border-color: rgba(187,166,255,.5); }
audio { width: 100%; max-width: 260px; }
