/* MARBIN — marbin.co.uk. Brand kit v1: Navy, Ivory, Brass; Cormorant Garamond + Manrope. */

:root {
  color-scheme: light;
  --ground: #F7F5EF;         /* Ivory */
  --ground-2: #EFECE3;       /* Sand */
  --surface: #FFFFFF;
  --ink: #14213D;            /* Navy */
  --ink-2: #3F4A63;          /* Slate */
  --muted: #6E7A94;
  --line: #E4E0D5;
  --brass: #B8873A;
  --brass-2: #C99A4B;
  --brass-ink: #8E6526;      /* brass dark enough for text on ivory */
  --dip-ink: #45589D;        /* strategy tags: dip, base */
  --base-ink: #2F7458;
  --night: #0F1A30;          /* Deep Navy: hero, risk, footer */
  --night-2: #14213D;
  --night-ink: #F7F5EF;
  --night-ink-2: #C9CFDB;    /* Silver */
  --night-muted: #8391AE;    /* Mist */
  --night-line: rgba(201, 207, 219, .14);
  --good: #2E8B62;
  --bad: #C0505D;
  --serif: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
  --gutter: clamp(16px, 5vw, 80px);
  --max: 1240px;
  --radius: 14px;
  --ease: cubic-bezier(.22, .8, .24, 1);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ground: #101B31;
    --ground-2: #0C1528;
    --surface: #16223B;
    --ink: #F2EFE7;
    --ink-2: #C9CFDB;
    --muted: #97A3BD;
    --line: rgba(201, 207, 219, .14);
    --brass-ink: #D4A95C;
    --dip-ink: #A3B1E6;
    --base-ink: #86CFAC;
    --night: #09111F;
    --night-2: #101B31;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ground: #101B31;
  --ground-2: #0C1528;
  --surface: #16223B;
  --ink: #F2EFE7;
  --ink-2: #C9CFDB;
  --muted: #97A3BD;
  --line: rgba(201, 207, 219, .14);
  --brass-ink: #D4A95C;
  --dip-ink: #A3B1E6;
  --base-ink: #86CFAC;
  --night: #09111F;
  --night-2: #101B31;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font: 400 17px/1.65 var(--sans); -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, canvas { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--brass-2); outline-offset: 3px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--brass); color: #fff; padding: 10px 16px; border-radius: 8px; text-decoration: none; font-weight: 700; }
.skip:focus { top: 12px; }

.wrap { max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }
.night { background: var(--night); color: var(--night-ink); }
.sand { background: var(--ground-2); }
.section { padding-block: clamp(80px, 11vw, 150px); position: relative; }

/* -- type ------------------------------------------------------------------- */
.eyebrow {
  font: 700 12px/1.4 var(--sans); letter-spacing: .18em; text-transform: uppercase;
  color: var(--brass-ink); margin-bottom: 22px;
}
.night .eyebrow { color: var(--brass-2); }
.initials { letter-spacing: .12em; text-transform: none; font-weight: 500; }
.initials b { font-weight: 800; color: var(--brass-2); }
.display {
  font: 600 clamp(44px, 5.4vw, 80px)/1.02 var(--serif); letter-spacing: -.012em;
}
@media (min-width: 900px) { .display .line { white-space: nowrap; } }
.display em { font-style: italic; font-weight: 500; color: var(--brass-2); }
.h2 { font: 600 clamp(36px, 4.6vw, 62px)/1.04 var(--serif); letter-spacing: -.01em; }
.lead { font-size: clamp(17px, 1.5vw, 20px); line-height: 1.6; color: var(--night-ink-2); max-width: 36em; }
.label { font: 700 11px/1.4 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.fine { font-size: 14px; color: var(--muted); }
.small { font-size: 13px; }

/* -- buttons ---------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; font: 700 15px/1 var(--sans);
  padding: 17px 26px; border-radius: 10px; text-decoration: none; border: 1.5px solid transparent;
  cursor: pointer; transition: transform .25s var(--ease), background .25s, color .25s, border-color .25s, box-shadow .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn-brass { background: var(--brass); color: #fff; box-shadow: 0 10px 30px -12px rgba(184, 135, 58, .7); }
.btn-brass:hover { background: var(--brass-2); }
.btn-ghost { border-color: rgba(247, 245, 239, .35); color: var(--night-ink); }
.btn-ghost:hover { border-color: var(--night-ink); }
.btn-ink { background: var(--ink); color: var(--ground); }

/* -- nav -------------------------------------------------------------------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  color: var(--night-ink); transition: background .35s, color .35s, box-shadow .35s;
}
.nav-inner { max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); height: 76px; display: flex; align-items: center; gap: 28px; }
.nav.solid { background: color-mix(in srgb, var(--ground) 88%, transparent); color: var(--ink); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3); box-shadow: 0 1px 0 var(--line); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; flex-shrink: 0; }
.brand-mark { width: 36px; height: 36px; flex-shrink: 0; }
/* the header's M badge: the same brass glow as Ask MARBIN -- a soft pulse every 6 s, a second ahead of it */
/* the ring contrasts with what's behind it: ivory over the dark header (the badge is brass there), brass once the
   header turns light on scrolling (the badge turns navy) */
/* on a wrapper box, not the SVG, and with the colours written out: every browser draws it the same (Safari didn't) */
.brand-glow { display: inline-block; flex-shrink: 0; width: 36px; height: 36px; border-radius: 8px; line-height: 0;
  -webkit-animation: glow-ivory 6s ease-in-out 1s infinite; animation: glow-ivory 6s ease-in-out 1s infinite; }
.nav.solid .brand-glow { -webkit-animation-name: glow-brass; animation-name: glow-brass; }
@-webkit-keyframes glow-ivory { 0%, 45%, 100% { box-shadow: 0 0 0 0 rgba(247, 245, 239, .7); } 25% { box-shadow: 0 0 0 10px rgba(247, 245, 239, 0); } }
@keyframes glow-ivory { 0%, 45%, 100% { box-shadow: 0 0 0 0 rgba(247, 245, 239, .7); } 25% { box-shadow: 0 0 0 10px rgba(247, 245, 239, 0); } }
@-webkit-keyframes glow-brass { 0%, 45%, 100% { box-shadow: 0 0 0 0 rgba(184, 135, 58, .7); } 25% { box-shadow: 0 0 0 10px rgba(184, 135, 58, 0); } }
@keyframes glow-brass { 0%, 45%, 100% { box-shadow: 0 0 0 0 rgba(184, 135, 58, .7); } 25% { box-shadow: 0 0 0 10px rgba(184, 135, 58, 0); } }
.bm-badge { fill: var(--brass); }
.bm-left { fill: rgba(247, 245, 239, .62); }
.bm-right { fill: #F7F5EF; }
.bm-bar { fill: #0F1A30; }
.nav.solid .bm-badge { fill: #14213D; }
.nav.solid .bm-bar, .footer .bm-bar { fill: var(--brass-2); }
.footer .bm-badge { fill: #14213D; }
.footer .bm-left { fill: #8391AE; }
.brand-word { font: 700 23px/1 var(--serif); letter-spacing: .16em; }
.brand-word .tm { font: 600 .38em/1 var(--sans); letter-spacing: 0; vertical-align: super; margin-left: .1em; opacity: .75; }
.brand-text { display: flex; flex-direction: column; gap: 5px; }
/* the tagline at every size (owner): two short lines under MARBIN, so the menu always has room beside it */
.brand-tag { display: block; max-width: 15.5em; font-size: 9.5px; line-height: 1.35; letter-spacing: .05em; opacity: .78; }
.nav.solid .brand-tag b { color: var(--brass-ink); }
/* Phones: the menu is a button, so the slogan fits again -- two short lines under MARBIN. */
@media (max-width: 820px) {
  .brand-tag { display: block; white-space: normal; max-width: 14.5em; font-size: 9.5px; line-height: 1.3; letter-spacing: .04em; }
  .brand-text { gap: 4px; }
}
@media (max-width: 380px) { .brand-tag { font-size: 8.5px; letter-spacing: .02em; } }
.nav-links { display: flex; gap: clamp(10px, 1.3vw, 24px); margin-left: auto; }
.nav-links a { font-size: 14px; font-weight: 600; text-decoration: none; opacity: .82; position: relative; padding-block: 6px; white-space: nowrap; }
@media (max-width: 1240px) { .nav-links a { font-size: 13.5px; } .nav-inner { gap: 20px; } }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px; background: var(--brass-2); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.nav-links a:hover { opacity: 1; }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-portal { white-space: nowrap; flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; text-decoration: none;
  padding: 10px 16px; border-radius: 999px; border: 1.5px solid currentColor; opacity: .95;
}
.nav-portal svg { width: 14px; height: 14px; }
.nav-portal:hover { background: var(--brass); border-color: var(--brass); color: #fff; }
.nav-toggle { display: none; background: none; border: 0; color: inherit; width: 40px; height: 40px; position: relative; cursor: pointer; }
.nav-toggle span:not(.sr) { position: absolute; left: 9px; right: 9px; height: 1.6px; background: currentColor; transition: transform .3s; }
.nav-toggle span:nth-child(1) { top: 15px; }
.nav-toggle span:nth-child(2) { top: 23px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

/* -- hero ------------------------------------------------------------------- */
.hero { position: relative; padding-top: calc(76px + env(safe-area-inset-top, 0px)); overflow: hidden; isolation: isolate; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 70% at 78% 45%, rgba(184, 135, 58, .16), transparent 70%),
    radial-gradient(50% 60% at 10% 100%, rgba(131, 145, 174, .14), transparent 70%);
}
.hero-traces { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: .9; }
.hero-grid { display: grid; grid-template-columns: 1.25fr .75fr; align-items: center; gap: clamp(24px, 4vw, 64px); padding-block: clamp(20px, 3.5vw, 56px) clamp(40px, 5vw, 72px); }
.hero-copy { display: flex; flex-direction: column; gap: 28px; }
.hero-copy .eyebrow { margin: 0; color: var(--night-ink-2); }
.hero-copy > * { animation: rise 1s var(--ease) both; }
.hero-copy > :nth-child(2) { animation-delay: .08s; }
.hero-copy > :nth-child(3) { animation-delay: .16s; }
@keyframes rise { from { transform: translateY(18px); opacity: .15; } to { transform: none; opacity: 1; } }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-mark { position: relative; aspect-ratio: 1; width: 100%; max-width: 440px; justify-self: end; }
.hero-mark canvas { width: 100%; height: 100%; cursor: crosshair; }
.mark-caption { position: absolute; bottom: -4px; left: 0; right: 0; text-align: center; font: italic 500 18px/1 var(--serif); color: var(--night-muted); letter-spacing: .04em; }

/* ticker tape of the rules */
.tape { border-top: 1px solid var(--night-line); overflow: hidden; background: rgba(9, 17, 31, .35); }
.tape-track { display: flex; width: max-content; animation: tape 48s linear infinite; }
.tape:hover .tape-track { animation-play-state: paused; }
.tape-items { display: flex; list-style: none; margin: 0; padding: 0; }
.tape-items li { white-space: nowrap; padding: 18px 34px; font-size: 13.5px; color: var(--night-ink-2); position: relative; font-variant-numeric: tabular-nums; }
.tape-items li::after { content: ""; position: absolute; right: -3px; top: 50%; width: 5px; height: 5px; border-radius: 50%; background: var(--brass); transform: translateY(-50%); }
.tape-items b { color: var(--night-ink); font-weight: 700; }
@keyframes tape { to { transform: translateX(-50%); } }

/* -- approach --------------------------------------------------------------- */
.section-head { max-width: 780px; margin-bottom: clamp(44px, 6vw, 72px); }
.section-lede { margin-top: 22px; color: var(--ink-2); max-width: 36em; font-size: 18px; }
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.principle {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 34px 30px 36px; display: flex; flex-direction: column; gap: 14px; overflow: hidden;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s;
}
.principle:hover { transform: translateY(-4px); box-shadow: 0 24px 50px -30px rgba(20, 33, 61, .45); border-color: color-mix(in srgb, var(--brass) 40%, var(--line)); }
.spot::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .35s;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), rgba(184, 135, 58, .13), transparent 60%);
}
.spot:hover::before { opacity: 1; }
.p-icon { width: 44px; height: 44px; color: var(--brass); margin-bottom: 8px; }
.principle h3 { font: 600 30px/1.1 var(--serif); }
.principle p { color: var(--ink-2); font-size: 16px; }

/* -- screen ----------------------------------------------------------------- */
.screen-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(40px, 7vw, 110px); align-items: center; }
.screen-copy { display: flex; flex-direction: column; gap: 20px; }
.screen-copy .h2 { margin-bottom: 8px; }
.screen-copy > p { color: var(--ink-2); max-width: 32em; }
.screen-copy strong { color: var(--ink); }
.excluded { margin-top: 12px; }
.chips { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { font-size: 13.5px; font-weight: 600; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); }
.excluded .chips li { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--bad) 70%, transparent); text-decoration-thickness: 1.5px; }
.gauges { display: flex; flex-direction: column; gap: 38px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: clamp(26px, 4vw, 48px); }
.gauge-top { display: flex; align-items: flex-end; gap: 22px; margin-bottom: 16px; }
.gauge-num { font: 600 clamp(64px, 7vw, 96px)/.8 var(--serif); color: var(--ink); font-variant-numeric: lining-nums tabular-nums; }
.gauge-num small { font-size: .45em; color: var(--brass); margin-left: 2px; }
.gauge-name { font-weight: 700; font-size: 16px; line-height: 1.35; }
.gauge-name span { font-weight: 500; font-size: 14px; color: var(--muted); }
.gauge-bar { position: relative; height: 12px; border-radius: 999px; background: color-mix(in srgb, var(--bad) 12%, var(--ground-2)); overflow: hidden; }
/* Bars read 0-50% for the 33% ratios and 0-10% for income, so each limit lands at two-thirds or half way. */
.gauge { --scale: 50; }
.gauge-ok { position: absolute; inset: 0 auto 0 0; width: calc(var(--limit) / var(--scale) * 100%); background: color-mix(in srgb, var(--good) 22%, transparent); }
.gauge-eg { position: absolute; inset: 3px auto 3px 3px; border-radius: 999px; width: calc(var(--eg) / var(--scale) * 100% - 3px); background: linear-gradient(90deg, var(--brass), var(--brass-2)); transform-origin: left; }
.gauge.play .gauge-eg { animation: fill 1.4s var(--ease) both; }
@keyframes fill { from { transform: scaleX(0); } }
.gauge-limit { position: absolute; top: -4px; bottom: -4px; left: calc(var(--limit) / var(--scale) * 100%); width: 2px; background: var(--ink); }
.gauge-key { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; font-size: 13px; color: var(--muted); margin-top: -8px; }
.gauge-key span { display: inline-block; width: 18px; height: 8px; border-radius: 4px; margin-right: -10px; vertical-align: middle; }
.k-ok { background: color-mix(in srgb, var(--good) 30%, transparent); }
.k-eg { background: var(--brass); }
.k-limit { width: 2px !important; height: 14px !important; background: var(--ink); border-radius: 0 !important; margin-right: -12px !important; }

/* -- decision path ---------------------------------------------------------- */
.path { position: relative; }
.path-line { position: absolute; left: 0; right: 0; top: 27px; height: 2px; background: var(--line); }
.path-dot {
  position: absolute; top: 50%; left: 0; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%;
  background: var(--brass); box-shadow: 0 0 0 6px color-mix(in srgb, var(--brass) 22%, transparent), 0 0 30px rgba(184, 135, 58, .8);
  transition: left .7s var(--ease), top .7s var(--ease), opacity .4s, transform .4s;
  opacity: 0;
}
.path-dot.on { opacity: 1; }
.path-dot.fail { background: var(--bad); box-shadow: 0 0 0 6px color-mix(in srgb, var(--bad) 22%, transparent); transform: translateY(26px) scale(.6); opacity: 0; transition: transform .6s ease-in, opacity .6s ease-in, background .2s; }
.gates { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--n, 6), 1fr); gap: 16px; position: relative; }
.path-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 34px; }
.path-tab { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent; color: var(--muted); font: 600 14px/1 var(--sans); cursor: pointer; }
.path-tab[aria-selected="true"] { border-color: var(--ink); color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brass) 18%, transparent); }
.path-tab:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
.path[hidden] { display: none; }
.gate { display: flex; flex-direction: column; gap: 8px; }
.gate-n {
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 12px;
  font: 600 26px/1 var(--serif); background: var(--ground); border: 1.5px solid var(--line); color: var(--ink);
  transition: background .35s, border-color .35s, color .35s, box-shadow .35s;
}
.gate h3 { font: 700 16px/1.3 var(--sans); }
.gate p { font-size: 14px; color: var(--muted); line-height: 1.5; }
.gate.pass .gate-n { border-color: var(--brass); background: var(--brass); color: #fff; box-shadow: 0 0 0 6px color-mix(in srgb, var(--brass) 16%, transparent); }
.gate.fail .gate-n { border-color: var(--bad); color: var(--bad); box-shadow: 0 0 0 6px color-mix(in srgb, var(--bad) 14%, transparent); }
.path-end { margin-top: 36px; display: flex; align-items: center; gap: 12px; font-weight: 700; color: var(--ink-2); }
.path-end-mark { width: 12px; height: 12px; border-radius: 3px; background: var(--good); transition: box-shadow .4s; }
.path.done .path-end-mark { box-shadow: 0 0 0 8px color-mix(in srgb, var(--good) 22%, transparent); }
.path.done .path-end { color: var(--good); }
.path-caption { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--ink-2); display: flex; gap: 12px; align-items: baseline; min-height: 3.4em; }
.tag { font: 700 10.5px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; padding: 5px 8px; border-radius: 5px; background: var(--ground-2); color: var(--muted); flex-shrink: 0; }

/* -- risk ------------------------------------------------------------------- */
.risk::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(50% 60% at 85% 20%, rgba(184, 135, 58, .12), transparent 70%); }
.risk-grid { display: grid; grid-template-columns: .95fr 1.05fr; gap: clamp(40px, 6vw, 96px); align-items: start; position: relative; }
.risk-copy > p { color: var(--night-ink-2); margin-top: 22px; max-width: 32em; }
.layers { margin: 36px 0 0; display: flex; flex-direction: column; }
.falling-list { list-style: none; margin: 8px 0 0; padding: 0; }
.falling-list li { padding: 14px 0; border-top: 1px solid var(--night-line); font-size: 15px; color: var(--night-ink-2); }
.falling-list li b { display: block; font: 600 18px/1.3 var(--serif); color: var(--night-ink); margin-bottom: 4px; }
.layers div { padding: 18px 0; border-top: 1px solid var(--night-line); display: grid; grid-template-columns: 170px 1fr; gap: 16px; }
.layers dt { font: 600 21px/1.25 var(--serif); color: var(--night-ink); }
.layers dd { margin: 0; font-size: 15px; color: var(--night-ink-2); }
.instrument {
  position: sticky; top: 100px; background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .015));
  border: 1px solid var(--night-line); border-radius: 22px; padding: clamp(20px, 3vw, 32px);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .06);
}
.inst-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.inst-head .label { color: var(--brass-2); }
.inst-note { font-size: 12.5px; color: var(--night-muted); }
.inst-chart { width: 100%; aspect-ratio: 16 / 8.5; border-radius: 12px; background: rgba(9, 17, 31, .55); }
.inst-legend { display: flex; gap: 18px; margin: 12px 0 22px; font-size: 12.5px; color: var(--night-muted); }
.inst-legend span::before { content: ""; display: inline-block; width: 14px; height: 2px; margin-right: 7px; vertical-align: middle; }
.lg-entry::before { background: var(--night-ink); }
.lg-stop::before { background: #E07A86; }
.lg-tp::before { background: var(--brass-2); }
.slider { display: block; }
.slider-top { display: flex; justify-content: space-between; font-weight: 600; font-size: 14px; color: var(--night-ink-2); }
.slider output { font: 600 22px/1 var(--serif); color: var(--night-ink); font-variant-numeric: tabular-nums; }
.slider input { width: 100%; margin: 14px 0 6px; appearance: none; -webkit-appearance: none; height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--brass-2) var(--p, 25%), rgba(201, 207, 219, .18) var(--p, 25%)); cursor: pointer; }
.slider input::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--night-ink); border: 4px solid var(--brass); box-shadow: 0 0 0 6px rgba(184, 135, 58, .18); }
.slider input::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--night-ink); border: 4px solid var(--brass); }
.slider-scale { display: flex; justify-content: space-between; font-size: 12px; color: var(--night-muted); }
.toggles { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 20px 0 24px; }
.switch { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: var(--night-ink-2); cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sw { width: 36px; height: 20px; border-radius: 999px; background: rgba(201, 207, 219, .2); position: relative; transition: background .25s; flex-shrink: 0; }
.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--night-ink); transition: transform .25s var(--ease); }
.switch input:checked + .sw { background: var(--brass); }
.switch input:checked + .sw::after { transform: translateX(16px); }
.switch input:focus-visible + .sw { outline: 2px solid var(--brass-2); outline-offset: 3px; }
.readout { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--night-line); }
.readout div { padding: 18px 12px 4px 0; display: flex; flex-direction: column; gap: 6px; }
.ro-label { font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--night-muted); }
.ro-val { font: 600 clamp(24px, 2.4vw, 32px)/1 var(--serif); color: var(--night-ink); font-variant-numeric: tabular-nums; }
#ro-stop { color: #EE9AA3; }
#ro-tp { color: var(--brass-2); }

/* -- nightly ---------------------------------------------------------------- */
.nightly-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(40px, 7vw, 110px); align-items: center; }
.clock-wrap { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.clock { width: min(100%, 340px); overflow: visible; }
.clock-face { fill: var(--surface); stroke: var(--line); stroke-width: 1.5; }
.clock-ticks line { stroke: var(--ink); stroke-width: 1.2; opacity: .35; }
.clock-ticks line.major { stroke-width: 2.4; opacity: .85; }
.clock-hour, .clock-min { stroke: var(--ink); stroke-linecap: round; transform-origin: 100px 100px; }
.clock-hour { stroke-width: 5; animation: hour 9s var(--ease) infinite; }
.clock-min { stroke-width: 3; stroke: var(--brass); animation: minute 9s var(--ease) infinite; }
.clock-hub { fill: var(--brass); }
.clock-pulse { fill: none; stroke: var(--brass); stroke-width: 2; opacity: 0; transform-origin: 100px 100px; animation: pulse 9s ease-out infinite; }
@keyframes minute { 0% { transform: rotate(-270deg); } 55%, 100% { transform: rotate(0deg); } }
@keyframes hour { 0% { transform: rotate(-22.5deg); } 55%, 100% { transform: rotate(0deg); } }
@keyframes pulse { 0%, 54% { opacity: 0; transform: scale(1); } 56% { opacity: .9; } 85%, 100% { opacity: 0; transform: scale(1.22); } }
.clock-label { font: 600 34px/1 var(--serif); font-variant-numeric: tabular-nums; }
.clock-label span { display: block; text-align: center; font: 700 11px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-top: 8px; }
.nightly-copy .h2 { margin-bottom: 30px; }
.steps { list-style: none; margin: 0 0 28px; padding: 0; counter-reset: s; display: flex; flex-direction: column; gap: 16px; }
.steps li { position: relative; padding-left: 28px; color: var(--ink-2); max-width: 38em; }
.steps li::before { content: ""; position: absolute; left: 0; top: .62em; width: 12px; height: 2px; background: var(--brass); }
.steps strong { color: var(--ink); }
.segments li { border-color: color-mix(in srgb, var(--c) 40%, var(--line)); color: var(--ink); display: inline-flex; align-items: center; gap: 8px; }
.segments li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.nightly-copy .fine { margin-top: 22px; max-width: 40em; }

/* -- contact ---------------------------------------------------------------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: end; }
.contact-grid > div:first-child > p:last-child { margin-top: 18px; color: var(--ink-2); max-width: 30em; }
.mail { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 22px; justify-self: end; }
.mail-addr { font: 600 clamp(26px, 3.4vw, 44px)/1.1 var(--serif); user-select: all; border-bottom: 1.5px solid var(--brass); padding-bottom: 6px; word-break: break-all; }
.copied { font-size: 14px; color: var(--good); font-weight: 600; min-width: 5em; }

/* -- footer ----------------------------------------------------------------- */
.footer { padding-block: 72px calc(40px + env(safe-area-inset-bottom, 0px)); }
.footer-grid { display: grid; grid-template-columns: auto 1fr; gap: 36px 60px; align-items: center; }
.footer-brand { display: flex; gap: 16px; align-items: center; }
.footer-brand .brand-mark { width: 52px; height: 52px; }
.footer-brand .initials { color: var(--night-ink-2); margin-top: 6px; white-space: nowrap; }
.footer-links { display: flex; gap: 10px 22px; flex-wrap: wrap; align-items: center; justify-content: flex-end; font-size: 14px; font-weight: 600; }
.footer-links a { text-decoration: none; color: var(--night-ink-2); }
.footer-links a:hover { color: var(--brass-2); }
.footer-social { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; margin-block: -18px -12px; }   /* site-src/social.json: only networks with a URL */
.footer-social a { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; color: var(--night-ink-2); border: 1px solid var(--night-line); transition: color .2s, border-color .2s; }
.footer-social a:hover, .footer-social a:focus-visible { color: var(--brass-2); border-color: var(--brass-2); }
.legal { grid-column: 1 / -1; border-top: 1px solid var(--night-line); padding-top: 26px; font-size: 13px; line-height: 1.6; color: var(--night-muted); }
.legal p { margin: 0; }
.legal .risk-line a { color: var(--night-ink-2); }
.legal .waitlist { margin-top: 6px; }
.legal .waitlist a { color: var(--brass-2); }
.legal .risk-line a:hover { color: var(--brass-2); }
.legal-bottom { display: flex; justify-content: space-between; align-items: baseline; gap: 10px 32px; flex-wrap: wrap; margin-top: 14px; font-size: 12px; }
.legal-links { display: flex; gap: 20px; }
.legal-links a { color: var(--night-muted); text-decoration: none; }
.legal-links a:hover { color: var(--brass-2); }
.legal strong { color: var(--night-ink-2); }
.legal .copy { color: var(--night-muted); }

/* -- strategies ------------------------------------------------------------ */
.sleeves { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.sleeve-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px 30px; display: flex; flex-direction: column; gap: 16px; }
.sleeve-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.sleeve-tag { font: 700 12px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; padding: 7px 11px; border-radius: 6px; }
.sleeve-tag.core { background: color-mix(in srgb, var(--brass) 16%, transparent); color: var(--brass-ink); }
.sleeve-tag.dip { background: color-mix(in srgb, #5B6FB5 16%, transparent); color: var(--dip-ink); }
.sleeve-tag.base { background: color-mix(in srgb, #3E8E6E 16%, transparent); color: var(--base-ink); }
.sleeve-tag.reserve { background: color-mix(in srgb, var(--muted) 16%, transparent); color: var(--muted); }
.alloc { display: flex; gap: 4px; margin: 0 0 22px; border-radius: 10px; overflow: hidden; font: 700 12px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; }
.alloc-part { padding: 14px 12px; white-space: nowrap; overflow: hidden; text-overflow: clip; min-width: 0; }
.alloc-part.core { background: color-mix(in srgb, var(--brass) 22%, var(--surface)); color: var(--brass-ink); }
.alloc-part.dip { background: color-mix(in srgb, #5B6FB5 20%, var(--surface)); color: var(--dip-ink); }
.alloc-part.base { background: color-mix(in srgb, #3E8E6E 20%, var(--surface)); color: var(--base-ink); }
.alloc-part.reserve { background: color-mix(in srgb, var(--muted) 18%, var(--surface)); color: var(--muted); padding-inline: 6px; text-align: center; }
@media (max-width: 560px) {
  .alloc { font-size: 11px; letter-spacing: .04em; } .alloc-part { padding: 12px 6px; }
  .alloc-part.reserve { flex: 0 0 auto !important; min-width: 3em; }   /* room for "5%" */
  .footer-links { gap: 0 22px; } .footer-links a { padding-block: 11px; min-width: 44px; }   /* 44px+ tap targets on phones */
}
.sleeve-horizon { font-size: 13px; color: var(--muted); }
.sleeve-card h3 { font: 600 28px/1.15 var(--serif); }
.ticks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ticks li { position: relative; padding-left: 26px; color: var(--ink-2); font-size: 15.5px; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .5em; width: 12px; height: 7px; border-left: 2px solid var(--brass); border-bottom: 2px solid var(--brass); transform: rotate(-45deg); }
.ticks strong { color: var(--ink); }
.sleeve-note { margin-top: 22px; max-width: 60em; }

/* -- forecast engine -------------------------------------------------------- */
.h2-em { font-style: italic; font-weight: 500; color: var(--brass-ink); }
.loop { list-style: none; margin: 0 0 48px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: none; }
.loop-step { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 22px; transition: border-color .4s, box-shadow .4s, transform .4s var(--ease); }
.loop-step:not(:last-child)::after { content: "→"; position: absolute; right: -14px; top: 34px; font: 600 18px/1 var(--sans); color: var(--brass); z-index: 1; }
.loop-step.lit { border-color: var(--brass); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brass) 14%, transparent); transform: translateY(-3px); }
.loop-n { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: var(--ground); font: 600 18px/1 var(--serif); margin-bottom: 14px; }
.loop-step h3 { font: 700 17px/1.3 var(--sans); margin-bottom: 6px; }
.loop-step p { font-size: 14.5px; color: var(--ink-2); }
.record { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(28px, 5vw, 64px); align-items: center; padding: clamp(24px, 4vw, 40px); background: var(--night); color: var(--night-ink); border-radius: 20px; }
.record .label { color: var(--brass-2); }
.record-big { font: 600 clamp(64px, 8vw, 104px)/.9 var(--serif); margin-top: 10px; }
.record-sub { color: var(--night-ink-2); margin: 6px 0 18px; }
.record-copy > p:not(.label):not(.record-big):not(.record-sub) { color: var(--night-ink-2); font-size: 15.5px; }
.record-copy .fine { color: var(--night-muted); margin-top: 12px; }
.ic-chart { margin: 0; }
.ic-chart canvas { width: 100%; aspect-ratio: 16 / 8; display: block; }
.ic-chart figcaption { display: flex; gap: 18px; flex-wrap: wrap; font-size: 12.5px; color: var(--night-muted); margin-top: 10px; }
.ic-chart figcaption span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.ic-chart .lg-up::before { background: #C99A4B; }
.ic-chart .lg-down::before { background: #8391AE; }
.ic-chart figcaption span:last-child::before { display: none; }
.guards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 36px; }
.guards h3 { font: 600 24px/1.2 var(--serif); margin-bottom: 8px; }
.guards p { color: var(--ink-2); font-size: 15px; }

/* -- vs the index ------------------------------------------------------------ */
.compare-wrap { overflow-x: auto; margin-bottom: 18px; }
.compare { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: 15px; }
.compare th, .compare td { text-align: left; padding: 16px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare thead th { font: 700 12px/1.3 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.compare thead th:last-child { color: var(--brass-ink); }
.compare tbody th { font: 600 19px/1.25 var(--serif); width: 18%; }
.compare td { color: var(--ink-2); width: 27%; }
.compare td:last-child { color: var(--ink); background: color-mix(in srgb, var(--brass) 6%, transparent); }
.compare tbody tr:last-child th, .compare tbody tr:last-child td { border-bottom: none; }

/* -- responsive ------------------------------------------------------------- */
@media (max-width: 1080px) {
  .gates { grid-template-columns: repeat(3, 1fr); row-gap: 40px; }
  .path-line { display: none; }
  .layers div { grid-template-columns: 1fr; gap: 4px; }
  .loop { grid-template-columns: 1fr 1fr; }
  .loop-step:nth-child(2)::after { display: none; }
}
@media (max-width: 900px) {
  .hero-grid, .screen-grid, .risk-grid, .nightly-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero-mark { justify-self: center; max-width: 380px; order: -1; margin-bottom: -12px; }
  .principles, .sleeves, .guards, .record { grid-template-columns: 1fr; }
  .instrument { position: relative; top: 0; }
  .mail { justify-self: start; }
  .footer-links, .footer-social { justify-content: flex-start; }
  .footer-brand .initials { white-space: normal; }   /* one line on wide screens only */
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 1080px) {
  .nav-links { position: absolute; top: calc(100% - 4px); left: 12px; right: 12px; flex-direction: column; gap: 0; background: var(--ground); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; padding: 8px; box-shadow: 0 30px 60px -30px rgba(15, 26, 48, .5); opacity: 0; transform: translateY(-8px); pointer-events: none; transition: opacity .25s, transform .25s; }
  .nav-links.open { opacity: 1; transform: none; pointer-events: auto; }
  .nav-links a { padding: 12px 14px; font-size: 16px; opacity: 1; }
  .nav-links a::after { display: none; }
  .nav-portal { margin-left: auto; }
  .nav-toggle { display: block; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .gates { grid-template-columns: 1fr 1fr; }
  .readout { grid-template-columns: 1fr 1fr; }
  .loop { grid-template-columns: 1fr; }
  .loop-step::after { display: none; }
  .gauge-top { gap: 14px; }
  .nav-portal { padding: 8px 12px; }
  .brand-word { font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .tape-track { animation: none; flex-wrap: wrap; width: auto; }
  .tape-items[aria-hidden="true"] { display: none; }
  .tape-items { flex-wrap: wrap; }
}

/* -- pages (tools/build_site.py): page heroes, doors, sign-ups, blog, code ----------------- */
.page-hero-copy { padding-block: clamp(36px, 6vw, 88px) clamp(48px, 7vw, 96px); display: flex; flex-direction: column; gap: 22px; }
.page-hero-copy .eyebrow { margin: 0; }
.page-hero .display { font-size: clamp(40px, 6vw, 76px); }
.nav-links a[aria-current="page"] { color: var(--brass-2); }
.doors { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.door, .principle.plain, .post-card { display: flex; flex-direction: column; gap: 14px; text-decoration: none; color: inherit;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 3vw, 40px);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s; }
.door:hover, .post-card:hover { transform: translateY(-4px); box-shadow: 0 24px 50px -30px rgba(20, 33, 61, .45);
  border-color: color-mix(in srgb, var(--brass) 40%, var(--line)); }
.door h3, .post-card h3 { font: 600 clamp(26px, 2.6vw, 34px)/1.1 var(--serif); }
.door p:not(.eyebrow), .post-card p { color: var(--ink-2); }
.door-go { margin-top: auto; font-weight: 700; color: var(--brass-ink); }
.signup-band { background: var(--ground-2); padding-block: clamp(56px, 7vw, 96px); }
.signup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.signup-grid p:not(.eyebrow) { margin-top: 16px; color: var(--ink-2); max-width: 32em; }
form.signup { display: grid; gap: 14px; }
form.signup label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
form.signup input[type="email"], form.signup input[name="name"] { font: 400 16px var(--sans); padding: 13px 14px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); }
form.signup label.consent { grid-template-columns: auto 1fr; align-items: start; gap: 10px; font-weight: 400; font-size: 13.5px; }
form.signup label.consent input { margin-top: 3px; }
form.signup .trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
form.signup button { justify-self: start; }
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.post-date { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.prose-section { padding-block: clamp(56px, 7vw, 100px); }
.prose { max-width: 760px; }
.prose p, .prose li { font-size: 18px; line-height: 1.75; color: var(--ink-2); margin-top: 18px; }
.prose h2 { font: 600 clamp(28px, 3vw, 36px)/1.15 var(--serif); margin-top: 44px; color: var(--ink); }
.prose ul { padding-left: 22px; }
.prose li { margin-top: 8px; }
.prose a { color: var(--brass-ink); }
.prose .tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 32px; }
.prose .hashtags { font-size: 15px; font-weight: 600; color: var(--muted); margin-top: 12px; word-spacing: .3em; }
.prose h3 { font: 600 clamp(21px, 2.2vw, 25px)/1.25 var(--serif); margin-top: 30px; color: var(--ink); }
.btn-ghost-ink { border: 1px solid var(--line); color: var(--ink); }
.btn-ghost-ink:hover { border-color: var(--ink); }
pre.code { background: var(--night); color: var(--night-ink); border-radius: var(--radius); padding: 22px 24px; overflow-x: auto;
  font: 500 14px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; margin-bottom: 16px; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; }
.compare.plans td { width: auto; }
@media (max-width: 900px) {
  .doors, .signup-grid, .posts { grid-template-columns: 1fr; }
}
.night .principle { color: var(--ink); }              /* light cards on a dark section keep dark text */
.night .principle p { color: var(--ink-2); }
.night .fine { color: var(--night-muted); margin-top: 22px; }
