/* ==========================================================================
   Openbook Capital — design system (see DESIGN.md)
   Midnight fintech: midnight bands, white cards, one electric emerald accent.
   Signature: the open book — an offer on the left page, its full cost on the right.
   ========================================================================== */

/* ---------- 1. Fonts (self-hosted, OFL — static/fonts/licenses) ---------- */
@font-face { font-family: "Archivo"; src: url("../fonts/archivo-var.woff2") format("woff2-variations"), url("../fonts/archivo-var.woff2") format("woff2"); font-weight: 500 800; font-stretch: 100% 125%; font-display: swap; }
@font-face { font-family: "Geist"; src: url("../fonts/geist-var.woff2") format("woff2-variations"), url("../fonts/geist-var.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("../fonts/geist-mono-var.woff2") format("woff2-variations"), url("../fonts/geist-mono-var.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

/* ---------- 2. Tokens ---------- */
:root {
  --night-950: #050A18;
  --night-900: #081026;
  --night-850: #0B1531;
  --night-800: #101C3E;
  --night-700: #1A2A55;
  --night-600: #2A3D70;
  --haze-100: #E8EDF7;
  --haze-200: #C9D3E8;
  --haze-300: #A3B1CF;
  --haze-400: #8391B3;

  --em-50: #E9FBF4;
  --em-100: #CDF5E6;
  --em-200: #9FF5D4;
  --em-300: #5CF0BE;
  --em-400: #2EE6A6;
  --em-500: #14C98D;
  --em-600: #0CA473;
  --em-700: #067F59;
  --em-800: #05644A;

  --paper: #F3F6FB;
  --paper-2: #EAF0F8;
  --white: #FFFFFF;
  --ink-900: #0A1330;
  --ink-800: #18223F;
  --ink-700: #2F3B5A;
  --ink-500: #515D7A;
  --ink-400: #5E6987;
  --line: #DFE5F0;
  --line-2: #C8D1E1;
  --field: #7C89A6;

  --amber-50: #FFF6E0;
  --amber-400: #FFC24A;
  --amber-700: #8A5A00;
  --red-50: #FDECEC;
  --red-400: #FF8A8A;
  --red-700: #B42318;
  --sky-400: #7CC0FF;

  --font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;

  --sh-1: 0 1px 2px rgba(10, 19, 48, .05), 0 6px 18px -10px rgba(10, 19, 48, .18);
  --sh-2: 0 2px 6px rgba(10, 19, 48, .06), 0 22px 48px -20px rgba(10, 19, 48, .32);
  --sh-3: 0 40px 90px -30px rgba(2, 6, 18, .7);
  --glow: 0 0 0 1px rgba(46, 230, 166, .35), 0 12px 34px -12px rgba(46, 230, 166, .55);

  --container: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --sec: clamp(64px, 8.5vw, 116px);
  --header-h: 88px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --z-header: 60;
  --z-overlay: 80;
  --z-sticky: 50;
}

/* ---------- 3. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 110px; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink-700);
  background: var(--paper);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
}
img, svg { display: block; max-width: 100%; }
svg.i { width: 1.25em; height: 1.25em; flex: none; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; display: inline-block; vertical-align: -0.2em; }
a { color: var(--em-700); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--em-800); }
:focus-visible { outline: 3px solid var(--em-400); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--em-200); color: var(--night-950); }
hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }
button { font: inherit; cursor: pointer; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--em-400); color: var(--night-950); padding: 10px 16px; border-radius: var(--r-sm); font-weight: 600; transition: top .2s; }
.skip-link:focus { top: 12px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.num, .mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }

/* ---------- 4. Type ---------- */
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--ink-900); margin: 0; letter-spacing: -0.022em; text-wrap: balance; }
h1 { font-size: clamp(2.05rem, 1.3rem + 2.7vw, 3.15rem); line-height: 1.04; font-weight: 720; font-stretch: 116%; }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.45vw, 2.3rem); line-height: 1.1; font-weight: 700; font-stretch: 112%; }
h3 { font-size: 1.22rem; line-height: 1.25; font-weight: 650; font-stretch: 104%; letter-spacing: -0.012em; }
h4 { font-size: 1.02rem; line-height: 1.3; font-weight: 650; font-stretch: 100%; letter-spacing: -0.005em; }
p { margin: 0 0 1em; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: .78rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--em-700); margin: 0 0 14px; }
.eyebrow::before { content: ""; width: 18px; height: 1.5px; background: currentColor; opacity: .7; }
.deck { font-size: 1.14rem; line-height: 1.55; color: var(--ink-500); max-width: 62ch; margin: 14px 0 0; text-wrap: pretty; }
.small { font-size: .9rem; }
.muted { color: var(--ink-500); }
.lead-strong { color: var(--ink-900); font-weight: 600; }
.np { color: var(--ink-400); font-size: .92em; white-space: nowrap; }
.np::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid currentColor; margin-right: 6px; vertical-align: 1px; }
.yes { color: var(--em-700); }

/* Dark surfaces flip the palette */
.on-night, .section--night, .page-hero, .hero, .site-footer, .cta-band {
  color: var(--haze-200);
}
.on-night h1, .on-night h2, .on-night h3, .on-night h4,
.section--night h1, .section--night h2, .section--night h3, .section--night h4,
.page-hero h1, .page-hero h2, .hero h1, .hero h2, .hero h3, .cta-band h2, .cta-band h3, .site-footer h2, .site-footer h3 { color: #fff; }
.section--night .eyebrow, .page-hero .eyebrow, .hero .eyebrow, .cta-band .eyebrow, .on-night .eyebrow { color: var(--em-300); }
.section--night .deck, .page-hero .deck, .hero .deck, .cta-band .deck, .on-night .deck { color: var(--haze-300); }
.section--night a:not(.btn), .page-hero a:not(.btn), .cta-band a:not(.btn), .on-night a:not(.btn) { color: var(--em-300); }
.section--night .np, .page-hero .np, .on-night .np { color: var(--haze-400); }

/* ---------- 5. Layout ---------- */
.container { width: min(var(--container), 100% - 2 * var(--gutter)); margin-inline: auto; }
.container--narrow { width: min(820px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.container--wide { width: min(1320px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.section { padding: var(--sec) 0; position: relative; }
.section--tight { padding: calc(var(--sec) * .6) 0; }
.section--paper { background: var(--paper); }
.section--white { background: var(--white); }
.section--tint { background: var(--paper-2); }
.section--night { background: var(--night-900); }
.section--night-2 { background: var(--night-850); color: var(--haze-200); }
.section--night-2 h2, .section--night-2 h3 { color: #fff; }
.section--night-2 .eyebrow { color: var(--em-300); }
.section--night-2 .deck { color: var(--haze-300); }
.section-head { max-width: 780px; margin-bottom: clamp(32px, 4vw, 48px); }
.section-head--split { max-width: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.section-head--split > div { max-width: 720px; }
.section-head--center { text-align: center; margin-inline: auto; }
.section-head--center .deck { margin-inline: auto; }
.grid { display: grid; gap: clamp(16px, 2vw, 24px); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.split--top { align-items: start; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row--between { justify-content: space-between; }
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 8px !important; } .mt-2 { margin-top: 16px !important; } .mt-3 { margin-top: 24px !important; } .mt-4 { margin-top: 32px !important; } .mt-5 { margin-top: 48px !important; }
.mb-0 { margin-bottom: 0 !important; }
.center { text-align: center; }

/* ---------- 6. Buttons, links, chips, badges ---------- */
.btn {
  --btn-bg: transparent; --btn-fg: var(--ink-900); --btn-bd: var(--line-2);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px; border-radius: var(--r-pill);
  background: var(--btn-bg); color: var(--btn-fg); border: 1px solid var(--btn-bd);
  font: 600 1rem/1.2 var(--font-body); letter-spacing: -0.005em; text-decoration: none; white-space: nowrap;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background-color .2s, border-color .2s, color .2s;
}
.btn .i { transition: transform .2s var(--ease); }
.btn:hover { color: var(--btn-fg); transform: translateY(-1px); }
.btn:hover .i-arrow-right, .btn:hover .i-go { transform: translateX(3px); }
.btn:active { transform: translateY(0); }
.btn-primary { --btn-bg: var(--em-400); --btn-fg: var(--night-950); --btn-bd: var(--em-600); box-shadow: 0 10px 26px -12px rgba(20, 201, 141, .75); }
.btn-primary:hover { --btn-bg: var(--em-300); box-shadow: 0 16px 34px -14px rgba(20, 201, 141, .85); }
.btn-ghost { --btn-bg: transparent; --btn-fg: var(--ink-900); --btn-bd: var(--line-2); }
.btn-ghost:hover { --btn-bd: var(--ink-900); }
.on-night .btn-ghost, .section--night .btn-ghost, .section--night-2 .btn-ghost, .hero .btn-ghost, .page-hero .btn-ghost, .cta-band .btn-ghost,
.rail-card--night .btn-ghost, .overlay .btn-ghost, .sticky-cta .btn-ghost { --btn-fg: #fff; --btn-bd: rgba(255, 255, 255, .22); }
.on-night .btn-ghost:hover, .section--night .btn-ghost:hover, .section--night-2 .btn-ghost:hover, .hero .btn-ghost:hover, .page-hero .btn-ghost:hover, .cta-band .btn-ghost:hover,
.rail-card--night .btn-ghost:hover, .overlay .btn-ghost:hover, .sticky-cta .btn-ghost:hover { --btn-bd: rgba(255, 255, 255, .6); background: rgba(255, 255, 255, .04); }
.btn-dark { --btn-bg: var(--night-900); --btn-fg: #fff; --btn-bd: var(--night-900); }
.btn-dark:hover { --btn-bg: var(--night-700); }
.btn-sm { min-height: 40px; padding: 8px 16px; font-size: .93rem; }
.btn-lg { min-height: 56px; padding: 14px 28px; font-size: 1.06rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-loading { opacity: .7; pointer-events: none; }
.btn.is-loading::after { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; color: var(--em-700); }
.link-arrow:hover { gap: 9px; }
.link-arrow .i { width: 1.05em; height: 1.05em; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 5px 11px; border-radius: var(--r-pill); background: var(--paper-2); color: var(--ink-700); font-size: .84rem; font-weight: 500; border: 1px solid var(--line); text-decoration: none; line-height: 1.3; }
a.chip:hover { border-color: var(--em-600); color: var(--em-800); }
.chip--em { background: var(--em-50); color: var(--em-800); border-color: var(--em-100); }
.chip--night { background: rgba(255, 255, 255, .06); color: var(--haze-100); border-color: rgba(255, 255, 255, .12); }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--r-pill); font: 500 .74rem/1.4 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; border: 1px solid var(--line-2); color: var(--ink-500); background: var(--white); }
.badge--em { color: var(--em-800); border-color: var(--em-100); background: var(--em-50); }
.badge--amber { color: var(--amber-700); border-color: #F5DEA3; background: var(--amber-50); }
.badge--night { color: var(--haze-200); border-color: rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .05); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--em-400); display: inline-block; box-shadow: 0 0 0 4px rgba(46, 230, 166, .18); }

/* ---------- 7. Header: the capsule ---------- */
.announce { background: var(--em-400); color: var(--night-950); text-align: center; font-size: .9rem; font-weight: 500; padding: 8px 16px; position: relative; z-index: calc(var(--z-header) + 1); }
.site-header { position: fixed; inset: 14px 0 auto; z-index: var(--z-header); pointer-events: none; }
.has-announce .site-header { top: 52px; }
.capsule {
  pointer-events: auto; position: relative; margin-inline: auto; width: min(1200px, 100% - 24px);
  background: rgba(8, 16, 38, .74); color: var(--haze-100);
  -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, .1); border-radius: 22px;
  box-shadow: 0 18px 50px -24px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .06);
  overflow: hidden;
  transition: width .5s var(--ease), border-radius .5s var(--ease), background-color .3s, box-shadow .3s;
}
.is-scrolled .capsule { width: min(1100px, 100% - 24px); background: rgba(8, 16, 38, .9); box-shadow: 0 22px 60px -26px rgba(0, 0, 0, .75), inset 0 1px 0 rgba(255, 255, 255, .06); }
.bar { display: flex; align-items: center; gap: 14px; height: 64px; padding: 0 10px 0 18px; transition: height .4s var(--ease); }
.is-scrolled .bar { height: 58px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; flex: none; }
.brand:hover { color: #fff; }
.brand-mark { width: 30px; height: 30px; transition: transform .4s var(--ease), width .4s var(--ease); }
.is-scrolled .brand-mark { width: 27px; height: 27px; }
.brand-word { font-family: var(--font-display); font-weight: 720; font-stretch: 118%; font-size: 1.14rem; letter-spacing: -0.02em; line-height: 1; }
.brand-word span { font-weight: 500; color: var(--haze-300); margin-left: 3px; }
.links { position: relative; display: flex; align-items: center; gap: 2px; margin-left: 10px; }
.spotlight { position: absolute; top: 50%; height: 40px; transform: translateY(-50%); border-radius: 12px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .08); opacity: 0; pointer-events: none; transition: left .35s var(--ease), width .35s var(--ease), opacity .2s; z-index: 0; }
.links:hover .spotlight, .links:focus-within .spotlight, .links.has-open .spotlight { opacity: 1; }
.nav-link { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 5px; padding: 10px 13px; border-radius: 12px; border: 0; background: none; color: var(--haze-100); font: 500 .95rem/1 var(--font-body); text-decoration: none; }
.nav-link:hover, .nav-link[aria-expanded="true"] { color: #fff; }
.nav-link[aria-current="page"] { color: var(--em-300); }
.nav-link .i { width: 15px; height: 15px; opacity: .7; transition: transform .3s var(--ease); }
.nav-link[aria-expanded="true"] .i { transform: rotate(180deg); }
.bar-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.icon-btn { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; border: 1px solid transparent; background: none; color: var(--haze-100); text-decoration: none; }
.icon-btn:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.bar-phone { display: inline-flex; align-items: center; gap: 8px; color: var(--haze-100); text-decoration: none; font-weight: 500; font-size: .95rem; padding: 8px 10px; border-radius: 12px; }
.bar-phone:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.menu-btn { display: none; }

/* Canopy: the menu grows out of the capsule */
.canopy { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--ease); }
.capsule.is-open .canopy { grid-template-rows: 1fr; }
.canopy-inner { overflow: hidden; min-height: 0; }
.panel { display: none; padding: 8px 18px 20px; border-top: 1px solid rgba(255, 255, 255, .08); }
.panel.is-active { display: block; }
.panel-grid { display: grid; gap: 8px 22px; grid-template-columns: repeat(4, minmax(0, 1fr)); padding-top: 16px; }
.panel-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.1fr); }
.panel-col h3 { font: 500 .72rem/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--haze-400); margin: 6px 0 10px; }
.panel-link { display: flex; gap: 12px; align-items: flex-start; padding: 9px 10px; margin: 0 -10px; border-radius: 12px; color: var(--haze-100); text-decoration: none; opacity: 0; transform: translateY(6px); transition: background-color .2s, opacity .35s var(--ease), transform .35s var(--ease); }
.capsule.is-open .panel.is-active .panel-link { opacity: 1; transform: none; }
.panel-col:nth-child(2) .panel-link { transition-delay: .04s; }
.panel-col:nth-child(3) .panel-link { transition-delay: .08s; }
.panel-col:nth-child(4) .panel-link { transition-delay: .12s; }
.panel-link:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.panel-link .i { width: 20px; height: 20px; margin-top: 2px; color: var(--em-300); }
.panel-link strong { display: block; font-weight: 550; font-size: .95rem; color: #fff; line-height: 1.3; }
.panel-link small { display: block; color: var(--haze-400); font-size: .82rem; line-height: 1.35; margin-top: 2px; }
.panel-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px 18px; padding-top: 14px; }
.panel-list a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; color: var(--haze-100); text-decoration: none; font-size: .93rem; }
.panel-list a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.panel-list .i { width: 18px; height: 18px; color: var(--em-300); }
.rail { border-radius: 18px; padding: 18px; background: linear-gradient(150deg, rgba(46, 230, 166, .16), rgba(46, 230, 166, .03) 60%), rgba(255, 255, 255, .03); border: 1px solid rgba(46, 230, 166, .22); color: var(--haze-200); }
.rail strong { color: #fff; font-family: var(--font-display); font-stretch: 110%; font-size: 1.05rem; display: block; margin-bottom: 6px; }
.rail p { font-size: .9rem; color: var(--haze-300); margin-bottom: 14px; }
.panel-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .08); font-size: .88rem; color: var(--haze-400); }
.panel-foot a { color: var(--em-300); text-decoration: none; font-weight: 550; }
.scrim { position: fixed; inset: 0; background: rgba(3, 7, 18, .45); opacity: 0; pointer-events: none; transition: opacity .3s; z-index: calc(var(--z-header) - 1); }
.scrim.is-on { opacity: 1; pointer-events: auto; }

/* Mobile overlay */
.overlay { position: fixed; inset: 0; z-index: var(--z-overlay); background: var(--night-950); color: var(--haze-100); display: flex; flex-direction: column; opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; }
.overlay.is-open { opacity: 1; visibility: visible; }
.ov-top { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.ov-body { flex: 1; overflow-y: auto; padding: 8px 16px 24px; overscroll-behavior: contain; }
.ov-group { border-bottom: 1px solid rgba(255, 255, 255, .08); }
.ov-group > button, .ov-group > a { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 2px; background: none; border: 0; color: #fff; text-decoration: none; font: 650 1.28rem/1.2 var(--font-display); font-stretch: 112%; letter-spacing: -0.015em; text-align: left; opacity: 0; transform: translateY(10px); transition: opacity .4s var(--ease), transform .4s var(--ease); }
.overlay.is-open .ov-group > button, .overlay.is-open .ov-group > a { opacity: 1; transform: none; }
.overlay.is-open .ov-group:nth-child(2) > * { transition-delay: .04s; }
.overlay.is-open .ov-group:nth-child(3) > * { transition-delay: .08s; }
.overlay.is-open .ov-group:nth-child(4) > * { transition-delay: .12s; }
.overlay.is-open .ov-group:nth-child(5) > * { transition-delay: .16s; }
.overlay.is-open .ov-group:nth-child(6) > * { transition-delay: .2s; }
.ov-group > button .i { transition: transform .3s var(--ease); color: var(--haze-400); }
.ov-group > button[aria-expanded="true"] .i { transform: rotate(180deg); }
.ov-sub { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s var(--ease); }
.ov-sub.is-open { grid-template-rows: 1fr; }
.ov-sub > div { overflow: hidden; }
.ov-sub a { display: flex; align-items: center; gap: 12px; padding: 11px 4px; color: var(--haze-200); text-decoration: none; font-size: 1.02rem; }
.ov-sub a .i { color: var(--em-300); }
.ov-sub .ov-all { color: var(--em-300); font-weight: 600; padding-bottom: 18px; }
.ov-foot { padding: 16px; border-top: 1px solid rgba(255, 255, 255, .08); display: grid; gap: 10px; padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
body.no-scroll { overflow: hidden; }

/* ---------- 8. Home hero + the open book ---------- */
.hero { position: relative; overflow: hidden; background: var(--night-900); padding: calc(var(--header-h) + clamp(40px, 6vw, 80px)) 0 clamp(64px, 8vw, 110px); isolation: isolate; }
.hero::before, .page-hero::before, .cta-band::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(55% 55% at 88% 8%, rgba(46, 230, 166, .17), transparent 62%),
    radial-gradient(45% 60% at 4% 100%, rgba(77, 107, 255, .2), transparent 62%),
    radial-gradient(40% 40% at 50% 50%, rgba(46, 230, 166, .04), transparent 70%);
}
.hero::after, .page-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .55;
  background-image: linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px);
  background-size: 100% 34px, 34px 100%;
  -webkit-mask-image: radial-gradient(75% 70% at 60% 35%, #000 20%, transparent 75%); mask-image: radial-gradient(75% 70% at 60% 35%, #000 20%, transparent 75%);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr); gap: clamp(36px, 5vw, 72px); align-items: center; }
.hero h1 { max-width: 15ch; }
.hero h1 em { font-style: normal; color: var(--em-300); }
.hero .deck { font-size: 1.18rem; max-width: 52ch; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.proof-row { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 28px 0 0; padding: 0; list-style: none; font-size: .95rem; color: var(--haze-200); }
.proof-row li { display: inline-flex; align-items: center; gap: 8px; }
.proof-row .i { color: var(--em-300); }

/* Two equal pages. minmax(0, 1fr) stops wide content (the APR figure) from pushing the fold off-centre. */
.book { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); perspective: 1800px; filter: drop-shadow(0 40px 60px rgba(0, 0, 0, .45)); }
/* The spine glow lives on the right page's hinge edge, so it always sits exactly on the fold (and stays put while the page swings open). */
.page--right::before { content: ""; position: absolute; left: -1px; top: 14px; bottom: 14px; width: 2px; background: linear-gradient(transparent, var(--em-400) 20%, var(--em-400) 80%, transparent); box-shadow: 0 0 18px 1px rgba(46, 230, 166, .55); z-index: 3; pointer-events: none; }
.page { position: relative; background: linear-gradient(180deg, rgba(20, 34, 74, .92), rgba(12, 22, 52, .92)); border: 1px solid rgba(255, 255, 255, .1); padding: 22px 22px 20px; color: var(--haze-200); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.page--left { border-radius: 20px 6px 6px 20px; border-right: 0; }
.page--right { border-radius: 6px 20px 20px 6px; border-left: 0; transform-origin: left center; background: linear-gradient(180deg, rgba(24, 40, 84, .95), rgba(14, 26, 60, .95)); }
.js .page--right.is-closed { transform: rotateY(-96deg); }
.page--right { transition: transform 1.1s cubic-bezier(.22, .8, .24, 1); }
.page-label { display: flex; align-items: center; justify-content: space-between; font: 500 .72rem/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--haze-400); margin-bottom: 16px; }
.page-label b { color: var(--em-300); font-weight: 500; }
.dial { margin-bottom: 16px; }
.dial-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.dial-top label { font-size: .86rem; color: var(--haze-300); }
.dial-top output { font: 600 1.18rem/1 var(--font-mono); color: #fff; font-variant-numeric: tabular-nums; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 26px; background: transparent; margin: 0; cursor: pointer; --pct: 50%; }
input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 99px; background: linear-gradient(90deg, var(--em-400) var(--pct), rgba(255, 255, 255, .14) var(--pct)); }
input[type="range"]::-moz-range-track { height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .14); }
input[type="range"]::-moz-range-progress { height: 6px; border-radius: 99px; background: var(--em-400); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -8px; border-radius: 50%; background: #fff; border: 5px solid var(--em-400); box-shadow: 0 2px 8px rgba(0, 0, 0, .4); }
input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 5px solid var(--em-400); box-shadow: 0 2px 8px rgba(0, 0, 0, .4); }
input[type="range"]:focus-visible { outline: none; }
input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 5px rgba(46, 230, 166, .35); }
.light-range input[type="range"]::-webkit-slider-runnable-track { background: linear-gradient(90deg, var(--em-500) var(--pct), var(--line) var(--pct)); }
.light-range input[type="range"]::-moz-range-track { background: var(--line); }
.light-range input[type="range"]::-webkit-slider-thumb { border-color: var(--em-600); }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 12px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08); }
.seg label { position: relative; text-align: center; font-size: .88rem; padding: 7px 8px; border-radius: 9px; color: var(--haze-300); cursor: pointer; transition: background-color .2s, color .2s; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg label:has(input:checked) { background: var(--em-400); color: var(--night-950); font-weight: 600; }
.seg label:has(input:focus-visible) { outline: 2px solid var(--em-300); outline-offset: 2px; }
.ledger { list-style: none; margin: 0; padding: 0; }
.ledger li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px dashed rgba(255, 255, 255, .12); }
.ledger li:last-child { border-bottom: 0; }
.ledger span { font-size: .88rem; color: var(--haze-300); }
.ledger strong { font: 600 1.08rem/1.2 var(--font-mono); color: #fff; font-variant-numeric: tabular-nums; text-align: right; }
.ledger small { display: block; font: 400 .76rem/1.3 var(--font-body); color: var(--haze-400); margin-top: 3px; }
.apr-big { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 6px 12px; margin: 14px 0 12px; padding: 14px 16px; border-radius: 14px; background: rgba(46, 230, 166, .09); border: 1px solid rgba(46, 230, 166, .28); }
.apr-big span { font-size: .9rem; color: var(--haze-100); line-height: 1.3; font-weight: 500; white-space: nowrap; }
.apr-big span small { display: block; font-size: .74rem; color: var(--haze-400); font-weight: 400; margin-top: 3px; }
.apr-big strong { font: 700 clamp(1.7rem, 1.3rem + 1vw, 2.1rem)/1 var(--font-display); font-stretch: 112%; color: var(--em-300); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.costbar { display: flex; height: 10px; border-radius: 99px; overflow: hidden; background: rgba(255, 255, 255, .08); margin: 6px 0 8px; }
.costbar i { display: block; height: 100%; transition: width .45s var(--ease); }
.costbar .cb-principal { background: var(--sky-400); }
.costbar .cb-cost { background: var(--em-400); }
.costbar-key { display: flex; gap: 14px; font-size: .78rem; color: var(--haze-400); }
.costbar-key b { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.page-note { font-size: .78rem; color: var(--haze-400); margin: 12px 0 0; line-height: 1.45; }
.page-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; min-height: 28px; font-weight: 600; font-size: .9rem; color: var(--em-300); text-decoration: none; }

/* ---------- 9. Inner page hero ---------- */
.page-hero { position: relative; overflow: hidden; background: var(--night-900); padding: calc(var(--header-h) + clamp(28px, 4vw, 56px)) 0 clamp(44px, 6vw, 76px); isolation: isolate; }
.page-hero h1 { max-width: 22ch; }
.page-hero--wide h1 { max-width: 28ch; }
.page-hero .hero-ctas { margin-top: 26px; }
.page-hero-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: clamp(28px, 4vw, 56px); align-items: center; }
.hero-icon { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: rgba(46, 230, 166, .1); border: 1px solid rgba(46, 230, 166, .25); color: var(--em-300); margin-bottom: 20px; }
.hero-icon .i { width: 28px; height: 28px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0 0 18px; padding: 0; font-size: .86rem; color: var(--haze-400); }
.crumbs li { display: inline-flex; align-items: center; gap: 6px; }
.crumbs li + li::before { content: "/"; opacity: .5; }
.crumbs a { color: var(--haze-300) !important; text-decoration: none; }
.crumbs a:hover { color: #fff !important; }
.crumbs [aria-current] { color: var(--haze-200); }
.hero-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .1); border-radius: 18px; overflow: hidden; }
.hero-facts > div { background: rgba(10, 20, 46, .88); padding: 16px 18px; }
.hero-facts dt { font: 500 .7rem/1.2 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--haze-400); }
.hero-facts dd { margin: 6px 0 0; font: 600 1.02rem/1.3 var(--font-body); color: #fff; }

/* ---------- 10. Cards ---------- */
.card { --card-pad: clamp(20px, 2.2vw, 26px); position: relative; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--card-pad); box-shadow: var(--sh-1); }
a.card, .card--link { display: block; color: inherit; text-decoration: none; transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s; }
a.card:hover, .card--link:hover { transform: translateY(-3px); box-shadow: var(--sh-2); border-color: #BFE9D7; color: inherit; }
.card h3 { margin-bottom: 6px; }
.card p { color: var(--ink-500); font-size: .98rem; margin-bottom: 0; }
.card--photo { padding-top: 0; overflow: hidden; }
.card--photo .go { color: #fff; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .6)); }
.card-photo { display: block; width: calc(100% + 2 * var(--card-pad, 24px)); max-width: none; margin: 0 calc(-1 * var(--card-pad, 24px)) 18px; aspect-ratio: 16 / 10; height: auto; object-fit: cover; }
.photo { margin: 0; }
.photo img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--r-lg); box-shadow: var(--sh-2); }
.photo figcaption { margin-top: 8px; font-size: .8rem; color: var(--ink-500); }
.card .go { position: absolute; right: 20px; top: 22px; color: var(--ink-400); transition: transform .25s var(--ease), color .25s; }
a.card:hover .go { color: var(--em-700); transform: translate(2px, -2px); }
.icon-tile { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--em-50); color: var(--em-700); border: 1px solid var(--em-100); margin-bottom: 18px; }
.icon-tile .i { width: 24px; height: 24px; }
.icon-tile--sm { width: 38px; height: 38px; border-radius: 11px; margin-bottom: 0; }
.icon-tile--sm .i { width: 20px; height: 20px; }
.card-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line-2); font-size: .85rem; color: var(--ink-500); }
.card-meta span { display: inline-flex; align-items: center; gap: 6px; }
.card-meta .i { color: var(--em-700); width: 16px; height: 16px; }
.card--night { background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .02)); border-color: rgba(255, 255, 255, .1); box-shadow: none; color: var(--haze-200); }
.card--night h3 { color: #fff; }
.card--night p { color: var(--haze-300); }
.card--night .icon-tile { background: rgba(46, 230, 166, .1); border-color: rgba(46, 230, 166, .22); color: var(--em-300); }
a.card--night:hover { border-color: rgba(46, 230, 166, .4); box-shadow: 0 20px 40px -24px rgba(0, 0, 0, .8); }
.group-title { display: flex; align-items: baseline; gap: 14px; margin: 0 0 16px; }
.group-title h3 { font-size: 1.05rem; }
.group-title span { color: var(--ink-500); font-size: .92rem; }
.group-block + .group-block { margin-top: 40px; }
a.card.ind-card, .ind-card { display: flex; align-items: center; gap: 14px; padding: 16px 18px; }
.ind-card h3 { font-size: 1.02rem; margin: 0; }
.ind-card p { font-size: .88rem; line-height: 1.4; margin-top: 2px; }
.ind-card .icon-tile { margin: 0; flex: none; }
.promise { display: flex; gap: 16px; align-items: flex-start; }
.promise > .icon-tile { flex: none; }
.clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card h3.card-title-sm { font-size: 1.12rem; }
.card--cta { background: linear-gradient(160deg, var(--night-800), var(--night-900)); border-color: var(--night-700); color: var(--haze-300); display: flex; flex-direction: column; justify-content: space-between; gap: 16px; }
.card--cta h3 { color: #fff; }
.card--cta p { color: var(--haze-300); }
.sticky-col { position: sticky; top: 110px; }
.pitch { margin-top: 18px; padding: 14px 16px; border-radius: 14px; background: rgba(255, 255, 255, .04); border: 1px dashed rgba(255, 255, 255, .16); }
.pitch small { display: block; font: 500 .68rem/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--haze-400); margin-bottom: 8px; }
.pitch q { display: block; font: 600 1.02rem/1.35 var(--font-display); font-stretch: 106%; color: #fff; quotes: "\201C" "\201D"; }
.pitch span { display: block; margin-top: 6px; font-size: .8rem; color: var(--haze-400); }
.promise h3 { font-size: 1.08rem; margin-bottom: 6px; }
.promise p { font-size: .96rem; }

/* ---------- 11. Book spread (at a glance, disclosure) ---------- */
.spread { position: relative; display: grid; grid-template-columns: 1fr 1fr; background: var(--white); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--sh-2); overflow: hidden; }
.spread::before { content: ""; position: absolute; left: 50%; top: 18px; bottom: 18px; width: 1px; background: linear-gradient(transparent, var(--em-500), transparent); }
.spread-page { padding: clamp(20px, 2.4vw, 30px); }
.spread-page:first-child { background: linear-gradient(90deg, var(--white), #FBFCFE); }
.spread-title { display: flex; align-items: center; gap: 8px; font: 500 .74rem/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--em-700); margin: 0 0 14px; }
.spread dl { margin: 0; }
.spread dl > div { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 12px; padding: 11px 0; border-bottom: 1px dashed var(--line); }
.spread dl > div:last-child { border-bottom: 0; }
.spread dt { font-size: .9rem; color: var(--ink-500); }
.spread dd { margin: 0; font-weight: 600; color: var(--ink-900); font-size: .96rem; line-height: 1.4; }
.spread-foot { grid-column: 1 / -1; padding: 12px clamp(20px, 2.4vw, 30px); border-top: 1px solid var(--line); background: var(--paper); font-size: .84rem; color: var(--ink-500); display: flex; gap: 8px; align-items: center; }
.ledger-list { list-style: none; padding: 0; margin: 0; }
.ledger-list li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: .95rem; color: var(--ink-800); }
.ledger-list li:last-child { border-bottom: 0; }
.ledger-list .mark { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.ledger-list .mark--yes { background: var(--em-50); color: var(--em-700); border: 1px solid var(--em-100); }
.ledger-list .mark--no { border: 1.5px dashed var(--line-2); color: var(--ink-400); }
.ledger-list .mark .i { width: 13px; height: 13px; stroke-width: 2.4; }
.meter { display: flex; gap: 4px; margin: 6px 0 0; }
.meter i { flex: 1; height: 8px; border-radius: 3px; background: var(--line); }
.meter i.on { background: var(--em-500); }

/* ---------- 12. Tables ---------- */
.table-wrap { overflow-x: auto; background: var(--white); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--sh-1); -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.data caption { text-align: left; padding: 14px 18px; font-size: .88rem; color: var(--ink-500); caption-side: bottom; border-top: 1px solid var(--line); }
table.data th { text-align: left; font: 500 .72rem/1.3 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-500); background: var(--paper); padding: 12px 16px; white-space: nowrap; border-bottom: 1px solid var(--line); }
table.data td { padding: 14px 16px; border-top: 1px solid var(--line); vertical-align: top; color: var(--ink-800); }
table.data tbody tr:first-child td { border-top: 0; }
table.data tbody tr:hover td { background: #FAFCFF; }
table.data .num { white-space: nowrap; }
table.data a { font-weight: 600; text-decoration: none; }
table.data a:hover { text-decoration: underline; }
.t-name { display: flex; align-items: center; gap: 12px; min-width: 190px; }
.t-offers { min-width: 170px; }
.monogram { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--night-900); color: var(--em-300); font: 650 .8rem/1 var(--font-display); font-stretch: 112%; letter-spacing: .02em; }
.monogram--lg { width: 64px; height: 64px; border-radius: 18px; font-size: 1.3rem; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14); }
.t-sub { display: block; font-size: .8rem; color: var(--ink-500); font-weight: 400; margin-top: 2px; }
.section--night .table-wrap { background: rgba(255, 255, 255, .03); border-color: rgba(255, 255, 255, .1); box-shadow: none; }
.section--night table.data th { background: rgba(255, 255, 255, .04); color: var(--haze-400); border-color: rgba(255, 255, 255, .08); }
.section--night table.data td { color: var(--haze-100); border-color: rgba(255, 255, 255, .08); }
.section--night table.data tbody tr:hover td { background: rgba(255, 255, 255, .03); }
.section--night .t-sub { color: var(--haze-400); }
.section--night .monogram { background: rgba(46, 230, 166, .1); }
.compare-table th[scope="row"] { font: 500 .8rem/1.3 var(--font-mono); letter-spacing: .04em; text-transform: none; color: var(--ink-500); background: var(--paper); width: 22%; vertical-align: top; white-space: normal; }

/* ---------- 13. Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.stats > div { background: var(--white); padding: clamp(18px, 2.4vw, 28px); }
.stat-num { display: block; font: 700 clamp(1.9rem, 1.4rem + 1.6vw, 2.7rem)/1 var(--font-display); font-stretch: 114%; letter-spacing: -0.025em; color: var(--ink-900); font-variant-numeric: tabular-nums; }
.stat-num sup { font-size: .5em; color: var(--em-700); margin-left: 2px; }
.stat-label { display: block; margin-top: 8px; font-size: .92rem; color: var(--ink-500); line-height: 1.4; }
.section--night .stats { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .1); }
.section--night .stats > div { background: var(--night-850); }
.section--night .stat-num { color: #fff; }
.section--night .stat-label { color: var(--haze-300); }
.stat-em { color: var(--em-300) !important; }

/* ---------- 14. Marquee (4 visible desktop / 3 tablet / 2 mobile) ---------- */
.marquee { --visible: 4; position: relative; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); }
.marquee-track { display: flex; width: max-content; animation: marquee var(--marquee-dur, 90s) linear infinite; }
.marquee:hover .marquee-track, .marquee:focus-within .marquee-track, .marquee.is-paused .marquee-track { animation-play-state: paused; }
.marquee-item { flex: 0 0 calc(min(var(--container), 100vw - 2 * var(--gutter)) / var(--visible)); padding: 0 8px; }
.marquee-item a { display: flex; align-items: center; justify-content: center; gap: 10px; height: 62px; padding: 0 16px; border-radius: 16px; border: 1px solid rgba(255, 255, 255, .1); background: rgba(255, 255, 255, .035); color: var(--haze-100); text-decoration: none; font: 600 1rem/1.1 var(--font-display); font-stretch: 106%; letter-spacing: -0.01em; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.marquee-item a:hover { border-color: rgba(46, 230, 166, .45); color: #fff; }
.marquee-item .monogram { width: 30px; height: 30px; font-size: .7rem; border-radius: 9px; background: rgba(46, 230, 166, .1); }
@keyframes marquee { to { transform: translateX(-50%); } }
.marquee-caption { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; font-size: .9rem; color: var(--haze-400); }
.marquee-toggle { background: none; border: 1px solid rgba(255, 255, 255, .16); color: var(--haze-200); border-radius: 99px; padding: 5px 12px; font-size: .82rem; }

/* ---------- 15. Steps ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; counter-reset: step; position: relative; }
.steps::before { content: ""; position: absolute; top: 25px; left: 28px; right: 28px; height: 1px; background: linear-gradient(90deg, var(--em-500), var(--line-2)); }
.step { position: relative; counter-increment: step; }
.step-n { width: 50px; height: 50px; border-radius: 16px; display: grid; place-items: center; background: var(--night-900); color: var(--em-300); font: 650 1.05rem/1 var(--font-mono); position: relative; z-index: 1; margin-bottom: 18px; box-shadow: 0 0 0 6px var(--paper); }
.section--white .step-n { box-shadow: 0 0 0 6px var(--white); }
.step h3 { font-size: 1.1rem; margin-bottom: 6px; }
.step p { font-size: .96rem; color: var(--ink-500); margin: 0; }
.step .chip { margin-top: 12px; }
.section--night .step-n { background: rgba(46, 230, 166, .12); box-shadow: 0 0 0 6px var(--night-900); border: 1px solid rgba(46, 230, 166, .3); }
.section--night .step p { color: var(--haze-300); }
.section--night .steps::before { background: linear-gradient(90deg, var(--em-500), rgba(255, 255, 255, .12)); }
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 24px; top: 8px; bottom: 8px; width: 1px; background: linear-gradient(var(--em-500), var(--line-2)); }
.timeline > li { position: relative; padding: 0 0 36px 76px; }
.timeline > li:last-child { padding-bottom: 0; }
.timeline .step-n { position: absolute; left: 0; top: 0; margin: 0; }
.timeline h3 { margin-bottom: 6px; }
.timeline .when { font: 500 .78rem/1 var(--font-mono); letter-spacing: .06em; color: var(--em-700); text-transform: uppercase; display: block; margin-bottom: 8px; }

/* ---------- 16. Accordion ---------- */
.faq { display: grid; gap: 10px; }
.faq details { background: var(--white); border: 1px solid var(--line); border-radius: 16px; transition: border-color .2s, box-shadow .2s; }
.faq details[open] { border-color: #BFE9D7; box-shadow: var(--sh-1); }
.faq summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; cursor: pointer; font-weight: 600; color: var(--ink-900); font-size: 1.02rem; line-height: 1.35; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .i { flex: none; width: 22px; height: 22px; color: var(--em-700); transition: transform .3s var(--ease); }
.faq details[open] summary .i { transform: rotate(45deg); }
.faq .answer { padding: 0 20px 20px; color: var(--ink-700); }
.faq .answer p:last-child { margin: 0; }
.section--night .faq details { background: rgba(255, 255, 255, .03); border-color: rgba(255, 255, 255, .1); }
.section--night .faq summary { color: #fff; }
.section--night .faq summary .i { color: var(--em-300); }
.section--night .faq .answer { color: var(--haze-300); }

/* ---------- 17. Forms ---------- */
.form-card { background: var(--white); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--sh-2); padding: clamp(22px, 3.2vw, 40px); }
.field { display: grid; gap: 8px; margin-bottom: 22px; }
.field > label, .field > .label, fieldset legend { font-weight: 600; color: var(--ink-900); font-size: .98rem; line-height: 1.35; }
.hint { font-size: .9rem; color: var(--ink-500); line-height: 1.45; margin: 0; }
.input, .field input[type="text"], .field input[type="email"], .field input[type="tel"], .field input[type="number"], .field input[type="url"], .field select, .field textarea {
  width: 100%; min-height: 52px; padding: 12px 14px; border: 1px solid var(--field); border-radius: 12px;
  font: 400 1rem/1.4 var(--font-body); color: var(--ink-900); background: var(--white); transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 120px; resize: vertical; }
.field select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23515D7A' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 18px; padding-right: 44px; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { outline: none; border-color: var(--em-600); box-shadow: 0 0 0 4px rgba(46, 230, 166, .28); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--red-700); }
.error-text { display: flex; gap: 6px; align-items: flex-start; color: var(--red-700); font-size: .92rem; font-weight: 500; margin: 0; }
.error-text .i { margin-top: 2px; }
.error-summary { border: 1px solid #F3C1BD; background: var(--red-50); border-radius: 16px; padding: 16px 18px; margin-bottom: 24px; color: var(--ink-900); }
.error-summary h2 { font-size: 1.05rem; font-stretch: 100%; color: var(--red-700); margin-bottom: 8px; display: flex; gap: 8px; align-items: center; }
.error-summary ul { margin: 0; padding-left: 20px; }
.error-summary a { color: var(--red-700); }
fieldset { border: 0; padding: 0; margin: 0 0 22px; min-width: 0; }
fieldset legend { padding: 0; margin-bottom: 10px; }
.choices { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.choices--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.choices--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.choice { position: relative; display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--white); cursor: pointer; font-size: .97rem; color: var(--ink-800); line-height: 1.3; transition: border-color .2s, background-color .2s, box-shadow .2s; }
.choice:hover { border-color: var(--field); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice .box { width: 22px; height: 22px; flex: none; border-radius: 7px; border: 1.5px solid var(--field); display: grid; place-items: center; background: var(--white); transition: all .2s; }
.choice input[type="radio"] + .box { border-radius: 50%; }
.choice .box .i { width: 14px; height: 14px; stroke-width: 2.6; color: var(--night-950); opacity: 0; transform: scale(.6); transition: all .2s; }
.choice:has(input:checked) { border-color: var(--em-600); background: var(--em-50); box-shadow: 0 0 0 1px var(--em-600); }
.choice:has(input:checked) .box { background: var(--em-400); border-color: var(--em-600); }
.choice:has(input:checked) .box .i { opacity: 1; transform: none; }
.choice:has(input:focus-visible) { outline: 3px solid var(--em-400); outline-offset: 2px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: .92rem; color: var(--ink-700); line-height: 1.5; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; flex: none; accent-color: var(--em-600); }
.form-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.form-actions .back { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-500); font-weight: 600; text-decoration: none; }
.form-actions .back:hover { color: var(--ink-900); }
.assure { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; color: var(--ink-500); line-height: 1.45; margin: 16px 0 0; }
.assure .i { color: var(--em-700); margin-top: 1px; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.amount-box { display: flex; align-items: center; gap: 6px; border: 1px solid var(--field); border-radius: 16px; padding: 6px 16px; min-height: 68px; background: var(--white); }
.amount-box:focus-within { border-color: var(--em-600); box-shadow: 0 0 0 4px rgba(46, 230, 166, .28); }
.amount-box span { font: 700 1.8rem/1 var(--font-display); color: var(--ink-500); }
.amount-box input { border: 0 !important; box-shadow: none !important; padding: 0 !important; min-height: 0 !important; font: 700 1.9rem/1 var(--font-display) !important; font-stretch: 110% !important; color: var(--ink-900) !important; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.quick-picks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.quick-picks button { border: 1px solid var(--line-2); background: var(--white); border-radius: 99px; padding: 7px 14px; font-size: .9rem; font-weight: 500; color: var(--ink-700); }
.quick-picks button:hover, .quick-picks button.is-on { border-color: var(--em-600); background: var(--em-50); color: var(--em-800); }

/* Apply flow */
.apply-shell { min-height: 100vh; background: var(--paper); }
.apply-top { background: var(--night-900); padding: calc(var(--header-h) + 18px) 0 90px; position: relative; overflow: hidden; isolation: isolate; }
.apply-top::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(50% 80% at 90% 0%, rgba(46, 230, 166, .16), transparent 60%); }
.apply-top h1 { color: #fff; font-size: clamp(1.7rem, 1.2rem + 1.8vw, 2.4rem); max-width: 24ch; }
.apply-top .deck { color: var(--haze-300); }
.apply-body { margin-top: -64px; padding-bottom: 80px; position: relative; }
.apply-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
.progress { display: flex; gap: 6px; list-style: none; margin: 0 0 22px; padding: 0; }
.progress li { flex: 1; }
.progress .bar-seg { height: 5px; border-radius: 99px; background: rgba(255, 255, 255, .15); display: block; }
.progress li.done .bar-seg, .progress li.current .bar-seg { background: var(--em-400); }
.progress small { display: block; margin-top: 8px; font-size: .78rem; color: var(--haze-400); }
.progress li.current small { color: #fff; font-weight: 600; }
.side-card { background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: 22px; box-shadow: var(--sh-1); position: sticky; top: 100px; }
.side-card h2 { font-size: 1.05rem; font-stretch: 104%; margin-bottom: 12px; }
.side-card ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.side-card li { display: flex; gap: 10px; font-size: .92rem; color: var(--ink-700); line-height: 1.45; }
.side-card li .i { color: var(--em-700); margin-top: 2px; }
.review-block { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; margin-bottom: 16px; }
.review-block header { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: var(--paper); }
.review-block header h2 { font-size: 1rem; font-stretch: 104%; }
.review-block header a { font-weight: 600; font-size: .9rem; text-decoration: none; }
.review-block dl { margin: 0; padding: 4px 16px; }
.review-block dl > div { display: grid; grid-template-columns: 200px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: .95rem; }
.review-block dl > div:last-child { border-bottom: 0; }
.review-block dt { color: var(--ink-500); }
.review-block dd { margin: 0; color: var(--ink-900); font-weight: 500; }
.ref-code { display: inline-flex; align-items: center; gap: 10px; font: 600 1.4rem/1 var(--font-mono); letter-spacing: .06em; color: var(--night-950); background: var(--em-400); padding: 10px 16px; border-radius: 12px; }
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; font-size: .95rem; margin-bottom: 16px; }
.alert .i { margin-top: 2px; flex: none; }
.alert--success { background: var(--em-50); border: 1px solid var(--em-100); color: var(--em-800); }
.alert--error { background: var(--red-50); border: 1px solid #F3C1BD; color: var(--red-700); }
.alert--info { background: var(--paper-2); border: 1px solid var(--line); color: var(--ink-700); }
.alert--warn { background: var(--amber-50); border: 1px solid #F5DEA3; color: var(--amber-700); }
.dropzone { display: grid; place-items: center; text-align: center; gap: 8px; padding: 32px 20px; border: 2px dashed var(--line-2); border-radius: 18px; background: var(--paper); transition: border-color .2s, background-color .2s; }
.dropzone.is-over { border-color: var(--em-600); background: var(--em-50); }
.dropzone .i { width: 32px; height: 32px; color: var(--em-700); }
.file-list { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; }
.file-list li { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); font-size: .92rem; }
.file-list li .i { color: var(--em-700); }
.file-list li span:last-child { margin-left: auto; color: var(--ink-500); font-size: .85rem; }

/* ---------- 18. Article / prose ---------- */
.article-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: clamp(32px, 5vw, 64px); align-items: start; }
.article-layout--rail { grid-template-columns: minmax(0, 1fr) 320px; }
.toc { position: sticky; top: 104px; font-size: .92rem; }
.toc h2 { font: 500 .72rem/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-500); margin: 0 0 12px; font-stretch: 100%; }
.toc ol { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--line-2); }
.toc a { display: block; padding: 7px 0 7px 16px; margin-left: -1px; border-left: 2px solid transparent; color: var(--ink-500); text-decoration: none; line-height: 1.35; }
.toc a:hover { color: var(--ink-900); }
.toc a.is-active { color: var(--em-800); border-left-color: var(--em-500); font-weight: 600; }
.prose { max-width: 72ch; color: var(--ink-700); font-size: 1.0625rem; line-height: 1.7; }
.prose > *:first-child { margin-top: 0; }
.prose h2 { font-size: clamp(1.4rem, 1.15rem + .9vw, 1.8rem); margin: 2.1em 0 .5em; scroll-margin-top: 110px; }
.prose h3 { font-size: 1.18rem; margin: 1.8em 0 .45em; }
.prose p { margin: 0 0 1.05em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin: .45em 0; padding-left: .2em; }
.prose li::marker { color: var(--em-600); }
.prose strong { color: var(--ink-900); font-weight: 600; }
.prose a { color: var(--em-700); font-weight: 500; }
.prose blockquote { margin: 1.5em 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--line-2); color: var(--ink-500); font-style: italic; }
.prose .deck, .section-body .deck { font-size: 1.1rem; line-height: 1.55; color: var(--ink-900); font-weight: 500; border-left: 3px solid var(--em-400); padding: 2px 0 2px 16px; margin: 0 0 1.1em; max-width: none; }
.prose .callout { display: block; margin: 1.6em 0; padding: 16px 18px 16px 20px; border-radius: 14px; background: var(--amber-50); border: 1px solid #F5DEA3; border-left: 4px solid var(--amber-400); color: var(--ink-800); font-size: 1rem; line-height: 1.6; }
.prose .callout strong { color: var(--amber-700); }
.prose .example { margin: 1.6em 0; padding: 18px 20px; border-radius: 16px; background: var(--night-900); color: var(--haze-200); font-size: .98rem; line-height: 1.65; border: 1px solid var(--night-700); position: relative; }
.prose .example::before { content: "Worked example"; display: block; font: 500 .7rem/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--em-300); margin-bottom: 10px; }
.prose .example strong { color: #fff; }
.prose .example p:last-child { margin: 0; }
.table-scroll { margin: 1.6em 0; overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--white); -webkit-overflow-scrolling: touch; }
.table-scroll:focus-visible { outline: 2px solid var(--em-600); outline-offset: 3px; }
.table-scroll table { margin: 0; border: 0; border-radius: 0; }
.prose table.data { margin: 1.6em 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; font-size: .93rem; }
.prose .table-scroll table.data { margin: 0; border: 0; border-radius: 0; }
.prose table.data th { white-space: normal; }
.keypoints { background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: 22px 24px; box-shadow: var(--sh-1); margin-bottom: 36px; }
.keypoints h2 { font: 500 .74rem/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--em-700); margin: 0 0 14px; font-stretch: 100%; }
.keypoints ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.keypoints li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink-800); font-weight: 500; line-height: 1.5; }
.keypoints li .i { color: var(--em-700); margin-top: 3px; flex: none; }
.byline { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: .9rem; color: var(--haze-300); margin-top: 22px; }
.byline span { display: inline-flex; align-items: center; gap: 7px; }
.byline .i { color: var(--em-300); }
.sources { font-size: .9rem; color: var(--ink-500); }
.sources h2 { font-size: 1.05rem; font-stretch: 104%; margin-bottom: 12px; }
.sources ol { padding-left: 1.3em; margin: 0; }
.sources li { margin: 6px 0; line-height: 1.5; overflow-wrap: anywhere; }
.sources a { color: var(--ink-700); }
.sources small { color: var(--ink-400); }
.rail-card { background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: 22px; box-shadow: var(--sh-1); }
.rail-card + .rail-card { margin-top: 16px; }
.rail-card h2, .rail-card h3 { font-size: 1.02rem; font-stretch: 104%; margin-bottom: 10px; }
.rail-card--night { background: var(--night-900); border-color: var(--night-700); color: var(--haze-300); }
.rail-card--night h2, .rail-card--night h3 { color: #fff; }
.sticky-rail { position: sticky; top: 100px; }
.link-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.link-list a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; margin: 0 -10px; border-radius: 10px; color: var(--ink-800); text-decoration: none; font-size: .95rem; font-weight: 500; line-height: 1.35; }
.link-list a:hover { background: var(--paper); color: var(--ink-900); }
.link-list .i { color: var(--em-700); width: 18px; height: 18px; }

/* Product / industry page pieces */
.fit { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.fit ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.fit li { display: flex; gap: 10px; align-items: flex-start; line-height: 1.45; color: var(--ink-800); }
.fit li .i { flex: none; margin-top: 2px; }
.fit .yes .i { color: var(--em-700); }
.fit .no .i { color: var(--ink-400); }
.season { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 4px; margin: 14px 0 10px; }
.season div { text-align: center; }
.season b { display: block; height: 44px; border-radius: 8px; background: var(--paper-2); border: 1px solid var(--line); }
.season .busy b { background: linear-gradient(180deg, var(--em-400), var(--em-500)); border-color: var(--em-600); }
.season .slow b { background: repeating-linear-gradient(135deg, var(--paper-2), var(--paper-2) 4px, var(--line) 4px, var(--line) 6px); }
.season span { display: block; font: 500 .7rem/1 var(--font-mono); color: var(--ink-500); margin-top: 6px; letter-spacing: .02em; }
.season-key { display: flex; gap: 16px; flex-wrap: wrap; font-size: .82rem; color: var(--ink-500); }
.season-key i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; border: 1px solid var(--line); }
.watch { display: flex; gap: 14px; }
.watch .icon-tile { background: var(--amber-50); border-color: #F5DEA3; color: var(--amber-700); }
.cost-card { background: var(--night-900); border: 1px solid rgba(255, 255, 255, .09); border-radius: 24px; padding: clamp(22px, 3vw, 34px); color: var(--haze-200); box-shadow: var(--sh-3); position: relative; overflow: hidden; }
.cost-card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 60% at 100% 0%, rgba(46, 230, 166, .14), transparent 60%); pointer-events: none; }
.cost-card h3 { color: #fff; }
.cost-card .ledger li { border-bottom-color: rgba(255, 255, 255, .1); }
.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.snapshot-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.snap { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; }
.snap b { display: block; font: 700 1.5rem/1.1 var(--font-display); font-stretch: 112%; color: var(--ink-900); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.snap span { display: block; font-size: .85rem; color: var(--ink-500); margin-top: 6px; line-height: 1.4; }
.evidence { font-size: .84rem; color: var(--ink-500); }
.evidence summary { cursor: pointer; color: var(--em-700); font-weight: 600; list-style: none; display: inline-flex; gap: 6px; align-items: center; min-height: 28px; }
.evidence summary::-webkit-details-marker { display: none; }
.evidence ul { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.evidence li { padding: 10px 12px; border-radius: 10px; background: var(--paper); border: 1px solid var(--line); line-height: 1.45; overflow-wrap: anywhere; }
.evidence q { color: var(--ink-800); }

/* Lender directory */
.filters { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; align-items: end; padding: 18px; background: var(--white); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--sh-1); }
.filters .field { margin: 0; gap: 6px; }
.filters .field label { font-size: .82rem; font-weight: 600; color: var(--ink-500); }
.filters input:not([type="checkbox"]):not([type="radio"]), .filters select { min-height: 46px !important; font-size: .95rem !important; }
.filters .span-2 { grid-column: span 2; }
.filters-toggle { display: none; }
.filters .check { align-self: center; font-size: .9rem; }
.filters.filters--compare { grid-template-columns: repeat(3, minmax(0, 1fr)) auto; }
.filter-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin: 18px 0 14px; font-size: .95rem; color: var(--ink-500); }
.result-count { font-weight: 600; color: var(--ink-900); }
.compare-tray { position: fixed; left: 50%; bottom: 18px; transform: translate(-50%, 140%); z-index: var(--z-sticky); background: var(--night-900); color: #fff; border-radius: 18px; padding: 10px 10px 10px 18px; display: flex; align-items: center; gap: 14px; box-shadow: var(--sh-3); transition: transform .35s var(--ease); max-width: calc(100% - 24px); }
.compare-tray.is-on { transform: translate(-50%, 0); }
.compare-tray span { font-size: .92rem; color: var(--haze-200); }
.cmp-box { display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--ink-500); cursor: pointer; white-space: nowrap; }
.cmp-box input { width: 18px; height: 18px; accent-color: var(--em-600); }

/* Lender profile */
.lender-head { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.lender-head .badges { display: flex; flex-wrap: wrap; gap: 8px; }
.review-snap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); }
.review-snap b { font: 700 1.3rem/1 var(--font-display); font-stretch: 110%; color: var(--ink-900); }

/* ---------- 19. CTA band ---------- */
.cta-band { position: relative; isolation: isolate; overflow: hidden; background: var(--night-900); border-radius: 32px; padding: clamp(32px, 5vw, 64px); display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 40px; align-items: center; }
.cta-band::after { content: ""; position: absolute; right: -60px; bottom: -80px; width: 380px; height: 380px; z-index: -1; opacity: .5; background: url("../img/book-outline.svg") no-repeat center / contain; }
.cta-band h2 { max-width: 18ch; }
.cta-next { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.cta-next li { display: flex; gap: 12px; align-items: flex-start; font-size: .96rem; color: var(--haze-200); line-height: 1.45; }
.cta-next .i { color: var(--em-300); margin-top: 2px; }
.cta-next b { color: #fff; }

/* ---------- 20. Footer ---------- */
.site-footer { background: var(--night-950); padding: clamp(56px, 7vw, 88px) 0 28px; position: relative; overflow: hidden; isolation: isolate; font-size: .95rem; }
.site-footer::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(40% 50% at 100% 0%, rgba(46, 230, 166, .08), transparent 60%); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(4, minmax(0, 1fr)); gap: 32px; }
.footer-brand p { color: var(--haze-400); max-width: 34ch; margin-top: 14px; font-size: .95rem; }
.footer-col h2 { font: 500 .74rem/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--haze-400); margin: 6px 0 16px; font-stretch: 100%; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-col a { color: var(--haze-200); text-decoration: none; }
.footer-col a:hover { color: #fff; text-decoration: underline; }
.footer-contact { display: grid; gap: 8px; margin-top: 18px; }
.footer-contact a, .footer-contact span { display: inline-flex; align-items: center; gap: 8px; color: var(--haze-200); text-decoration: none; }
.footer-contact .i { color: var(--em-300); }
.footer-legal { margin-top: 48px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .08); display: grid; gap: 14px; color: var(--haze-400); font-size: .84rem; line-height: 1.6; }
.footer-legal p { margin: 0; max-width: 110ch; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.footer-bottom ul { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; padding: 0; margin: 0; }
.footer-bottom a { color: var(--haze-300); text-decoration: none; }
.footer-bottom a:hover { color: #fff; }
.footer-mark { position: absolute; right: -40px; bottom: -60px; width: 340px; opacity: .05; z-index: -1; }

/* ---------- 21. Sticky mobile CTA ---------- */
.sticky-cta { display: none; }

/* ---------- 22. Misc components ---------- */
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; background: var(--white); border: 1px solid var(--line); font-size: .92rem; color: var(--ink-700); line-height: 1.5; }
.notice .i { color: var(--em-700); margin-top: 2px; flex: none; }
.notice--night { background: rgba(255, 255, 255, .04); border-color: rgba(255, 255, 255, .1); color: var(--haze-300); }
.notice--night .i { color: var(--em-300); }
.az { display: flex; flex-wrap: wrap; gap: 6px; }
.az a { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: var(--white); color: var(--ink-800); text-decoration: none; font-weight: 600; }
.az a:hover { border-color: var(--em-600); color: var(--em-800); }
.term-group { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 24px; padding: 28px 0; border-top: 1px solid var(--line); }
.term-group > h2 { font-size: 2rem; color: var(--em-700); }
.term-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 28px; list-style: none; padding: 0; margin: 0; }
.term-list a { font-weight: 600; text-decoration: none; color: var(--ink-900); }
.term-list a:hover { color: var(--em-700); }
.term-list p { font-size: .9rem; color: var(--ink-500); margin: 3px 0 0; line-height: 1.45; }
.state-card { display: flex; flex-direction: column; gap: 10px; }
.state-card .abbr { font: 700 1.6rem/1 var(--font-display); font-stretch: 118%; color: var(--ink-900); }
.search-box { display: flex; gap: 10px; }
.search-box input { flex: 1; }
.result { padding: 18px 0; border-bottom: 1px solid var(--line); }
.result h2 { font-size: 1.22rem; line-height: 1.25; font-weight: 650; font-stretch: 104%; letter-spacing: -0.012em; }
.result h2 a { color: var(--ink-900); text-decoration: none; }
.result h2 a:hover { color: var(--em-700); }
.result p { margin: 4px 0 0; color: var(--ink-500); font-size: .95rem; }
.empty { text-align: center; padding: 48px 20px; border: 1px dashed var(--line-2); border-radius: 20px; background: var(--white); color: var(--ink-500); }
.empty .i { width: 36px; height: 36px; color: var(--ink-400); margin: 0 auto 12px; }
.pill-nav { display: flex; gap: 8px; flex-wrap: wrap; }
.divider-label { display: flex; align-items: center; gap: 14px; font: 500 .74rem/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-500); margin: 0 0 20px; }
.divider-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.two-up { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.kv { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 10px 20px; margin: 0; }
.kv dt { color: var(--ink-500); font-size: .92rem; }
.kv dd { margin: 0; color: var(--ink-900); font-weight: 500; }
.legal-body { max-width: 76ch; }
.review-flag { display: inline-flex; gap: 8px; align-items: center; }

/* ---------- 23. Reveal ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
.js [data-reveal="fade"] { transform: none; }

/* ---------- 24. Responsive ---------- */
@media (max-width: 1180px) {
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
  .filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1080px) {
  .links, .bar-phone, .bar-search { display: none; }
  .menu-btn { display: inline-grid; }
  .canopy { display: none; }
  .hero-grid, .split, .page-hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero h1 { max-width: 18ch; }
  .article-layout, .article-layout--rail, .apply-layout { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; }
  .toc-wrap { display: none; }
  .sticky-rail, .side-card { position: static; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .snapshot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 32px; }
  .steps::before { display: none; }
  .cta-band { grid-template-columns: minmax(0, 1fr); }
  .marquee { --visible: 3; }
}
@media (max-width: 820px) {
  :root { --header-h: 78px; }
  .grid-3, .grid-2, .two-up, .pros-cons, .fit { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .book { grid-template-columns: minmax(0, 1fr); perspective: none; filter: none; }
  .page--right::before { display: none; }
  .page--left { border-radius: 20px 20px 0 0; border-right: 1px solid rgba(255, 255, 255, .1); border-bottom: 0; }
  .page--right { border-radius: 0 0 20px 20px; border-left: 1px solid rgba(255, 255, 255, .1); border-top: 1px solid rgba(46, 230, 166, .4); }
  .js .page--right.is-closed { transform: translateY(12px); opacity: 0; }
  .page--right { transition: transform .7s var(--ease), opacity .7s var(--ease); }
  .spread { grid-template-columns: minmax(0, 1fr); }
  .spread::before { display: none; }
  .spread-page + .spread-page { border-top: 1px dashed var(--line-2); }
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .term-group { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .term-list { grid-template-columns: minmax(0, 1fr); }
  .kv { grid-template-columns: minmax(0, 1fr); }
  .kv dd { margin-bottom: 8px; }
  .review-block dl > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .marquee { --visible: 2; }
  .choices--3 { grid-template-columns: minmax(0, 1fr); }
  .sticky-cta { display: flex; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-sticky); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(5, 10, 24, .94); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-top: 1px solid rgba(255, 255, 255, .08); transform: translateY(110%); visibility: hidden; transition: transform .35s var(--ease), visibility 0s linear .35s; }
  .sticky-cta.is-on { transform: none; visibility: visible; transition: transform .35s var(--ease), visibility 0s; }
  .sticky-cta .btn { flex: 1; }
  .sticky-cta .btn-ghost { flex: 0 0 auto; }
  .bar-cta { transition: opacity .25s var(--ease), visibility 0s; }
  .sticky-cta-on .bar-cta { opacity: 0; visibility: hidden; transition: opacity .25s var(--ease), visibility 0s linear .25s; }
  body.has-sticky .site-footer { padding-bottom: 96px; }
  /* lender tables become cards: label column on the left, value on the right */
  table.lender-table thead { display: none; }
  table.lender-table, table.lender-table tbody, table.lender-table tr, table.lender-table td { display: block; width: 100%; }
  table.lender-table tr { position: relative; padding: 16px; border-top: 1px solid var(--line); }
  table.lender-table tbody tr:first-child { border-top: 0; }
  table.lender-table caption { display: block; }
  table.data.lender-table td { border: 0 !important; padding: 5px 0 5px 122px; position: relative; min-height: 30px; }
  table.data.lender-table td::before { content: attr(data-label); position: absolute; left: 0; top: 8px; width: 112px; font: 500 .68rem/1.4 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-500); }
  table.data.lender-table td .t-sub { display: block; }
  table.data.lender-table td.t-first { padding: 0 44px 8px 0; }
  table.data.lender-table td.t-first::before { display: none; }
  table.data.lender-table td[data-label="#"] { position: absolute; top: 20px; right: 16px; width: auto; min-height: 0; padding: 0; font: 500 .8rem/1 var(--font-mono); color: var(--ink-500); }
  table.data.lender-table td[data-label="#"]::before { content: "#"; position: static; display: inline; width: auto; font: inherit; letter-spacing: 0; }
  /* compare: keep the row labels in view while the funder columns scroll */
  table.compare-table { min-width: 560px; }
  .compare-table th[scope="row"] { position: sticky; left: 0; z-index: 1; width: 118px; min-width: 118px; font-size: .72rem; box-shadow: 1px 0 0 var(--line); }
  .compare-table thead th:first-child { position: sticky; left: 0; z-index: 2; background: var(--paper); box-shadow: 1px 0 0 var(--line); }
  .filters.filters--compare { grid-template-columns: minmax(0, 1fr); }
  .filters-toggle { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 0 18px; background: var(--white); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--sh-1); font: 600 1rem/1 var(--font-body); color: var(--ink-900); cursor: pointer; }
  .filters-toggle .chev { margin-left: auto; transition: transform .2s var(--ease); }
  .filters-toggle[aria-expanded="true"] .chev { transform: rotate(180deg); }
  .filters-toggle + .filters { margin-top: 10px; }
  .js .filters.is-collapsed { display: none; }
  .filters--compare .btn { width: 100%; }
}
@media (max-width: 560px) {
  body { font-size: 1rem; }
  .bar { padding: 0 6px 0 14px; height: 58px; }
  .brand-word span { display: none; }
  .bar-cta .btn { padding: 8px 14px; min-height: 40px; font-size: .9rem; }
  .hero-ctas .btn { width: 100%; }
  .grid-4, .snapshot-grid { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .choices--2 { grid-template-columns: minmax(0, 1fr); }
  .filters { grid-template-columns: minmax(0, 1fr); }
  .filters .span-2 { grid-column: 1 / -1; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .season b { height: 34px; }
  .season span { font-size: .6rem; }
  .hero-facts > div { padding: 14px; }
  .form-actions { flex-direction: column-reverse; align-items: stretch; }
  .form-actions .btn { width: 100%; }
}

/* ---------- 25. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .js [data-reveal] { opacity: 1 !important; transform: none !important; }
  .js .page--right.is-closed { transform: none !important; opacity: 1 !important; }
  .marquee-track { animation: none !important; flex-wrap: wrap; width: auto; }
  .marquee { -webkit-mask-image: none; mask-image: none; }
  .marquee-item[aria-hidden="true"] { display: none; }
  .panel-link, .ov-group > button, .ov-group > a { opacity: 1 !important; transform: none !important; }
}

@media print {
  .site-header, .sticky-cta, .site-footer, .cta-band, .compare-tray, .scrim, .overlay { display: none !important; }
  .hero, .page-hero { background: none; color: #000; padding: 20px 0; }
  .page-hero h1, .hero h1 { color: #000; }
}

/* Season strip on dark cards */
.cost-card .season b { background: #132046; border-color: rgba(255, 255, 255, .08); }
.cost-card .season .busy b { background: linear-gradient(180deg, var(--em-400), var(--em-500)); border-color: var(--em-600); }
.cost-card .season .slow b { background: repeating-linear-gradient(135deg, #1A2A55, #1A2A55 3px, #2A3D70 3px, #2A3D70 5px); }
.cost-card .season-key i { border-color: rgba(255, 255, 255, .12); }

/* Calculators */
.tool-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0; border-radius: 26px; overflow: hidden; box-shadow: var(--sh-2); border: 1px solid var(--line); background: var(--white); }
.tool-inputs { padding: clamp(22px, 3vw, 36px); }
.tool-results { position: relative; padding: clamp(22px, 3vw, 36px); background: var(--night-900); color: var(--haze-200); }
.tool-results::before { content: ""; position: absolute; left: 0; top: 24px; bottom: 24px; width: 2px; background: linear-gradient(transparent, var(--em-400), transparent); box-shadow: 0 0 16px rgba(46, 230, 166, .5); }
.tool-results h2 { color: #fff; font-size: 1.1rem; font-stretch: 106%; margin-bottom: 10px; }
.tool-results .eyebrow { color: var(--em-300); }
.tool-inputs .field { margin-bottom: 16px; }
.tool-inputs .field label { font-size: .92rem; }
.input-affix { position: relative; }
.input-affix span { position: absolute; top: 50%; transform: translateY(-50%); color: var(--ink-500); font-weight: 600; pointer-events: none; }
.input-affix .pre { left: 14px; }
.input-affix .post { right: 14px; }
.input-affix input.has-pre { padding-left: 28px !important; }
.input-affix input.has-post { padding-right: 44px !important; }
.tool-grid .seg { background: var(--paper); border-color: var(--line); }
.tool-grid .seg label { color: var(--ink-700); }
.offers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.offer-col { background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: 18px; box-shadow: var(--sh-1); transition: border-color .2s, box-shadow .2s; }
.offer-col.is-best { border-color: var(--em-600); box-shadow: 0 0 0 1px var(--em-600), var(--sh-2); }
.offer-col h2 { display: flex; justify-content: space-between; align-items: center; font-size: 1.05rem; line-height: 1.25; font-weight: 650; font-stretch: 104%; letter-spacing: -0.012em; margin-bottom: 12px; }
.offer-col .best-tag { display: none; }
.offer-col.is-best .best-tag { display: inline-flex; }
.offer-col .field { margin-bottom: 12px; }
.offer-out { margin-top: 14px; border-top: 1px dashed var(--line-2); padding-top: 10px; }
.offer-out div { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; font-size: .93rem; }
.offer-out span { color: var(--ink-500); }
.offer-out b { font-family: var(--font-mono); color: var(--ink-900); font-variant-numeric: tabular-nums; }
.share-bar { height: 12px; border-radius: 99px; background: rgba(255, 255, 255, .1); overflow: hidden; margin: 10px 0 8px; }
.share-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--em-400), var(--amber-400)); transition: width .4s var(--ease); }
.position-row { display: grid; grid-template-columns: 1fr 1fr 130px; gap: 10px; align-items: end; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.schedule { max-height: 320px; overflow: auto; margin-top: 14px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .1); }
.schedule table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.schedule th, .schedule td { padding: 8px 10px; text-align: right; border-bottom: 1px solid rgba(255, 255, 255, .06); color: var(--haze-200); }
.schedule th { font: 500 .68rem/1.2 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--haze-400); position: sticky; top: 0; background: var(--night-850); }
.schedule th:first-child, .schedule td:first-child { text-align: left; }
@media (max-width: 900px) {
  .tool-grid, .offers { grid-template-columns: minmax(0, 1fr); }
  .tool-results::before { display: none; }
  .position-row { grid-template-columns: 1fr 1fr; }
}

/* ---------- 26. Illustrations (unDraw, recolored: apps/core/illustrations.py) ----------
   Decorative (alt=""): the words beside them carry the meaning. light = paper/white, night = midnight. */
.illo { display: block; width: 100%; height: auto; }
.page-hero-grid--art { grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); }
.page-hero-art { display: flex; justify-content: center; align-items: center; }
.page-hero-art .illo { width: auto; max-width: 100%; max-height: 290px; }
.card--art { padding-top: 0; overflow: hidden; }
.card-art { position: relative; display: block; aspect-ratio: 2 / 1; margin: 0 calc(-1 * var(--card-pad)) 18px; background: linear-gradient(180deg, var(--paper), var(--paper-2)); border-bottom: 1px solid var(--line); overflow: hidden; }
.card-art .illo { position: absolute; left: 20px; top: 16px; width: calc(100% - 40px); height: calc(100% - 16px); object-fit: contain; object-position: center bottom; transition: transform .35s var(--ease); }
a.card--art:hover .card-art .illo { transform: translateY(-3px); }
.card--art .go { z-index: 1; }
.steps--art { --art-h: 150px; }
.steps--art::before { top: calc(var(--art-h) + 18px + 25px); }
.step-art { position: relative; display: block; height: var(--art-h); margin-bottom: 18px; border-radius: 18px; background: var(--paper); border: 1px solid var(--line); overflow: hidden; }
.step-art .illo { position: absolute; left: 14px; top: 14px; width: calc(100% - 28px); height: calc(100% - 28px); object-fit: contain; }
.split-art { margin-top: 36px; max-width: 290px; }
.head-art { display: flex; flex-direction: column; align-items: flex-end; gap: 18px; }
.head-art .illo { width: auto; height: 150px; max-width: 100%; }
.flow-art { margin: 28px 0 0; max-width: 440px; }
.state-art { max-width: 280px; margin: 0 auto 18px; }
@media (max-width: 1080px) {
  .page-hero-art, .split-art { display: none; }
  /* no connecting line here, so the number sits on the picture's corner */
  .steps--art .step-n { position: absolute; top: 10px; left: 10px; width: 40px; height: 40px; border-radius: 12px; margin: 0; font-size: .92rem; box-shadow: none; }
  .head-art { align-items: flex-start; }
  .head-art .illo { display: none; }
}
@media (max-width: 820px) {
  .steps--art { --art-h: 128px; }
  .flow-art { max-width: 320px; }
}
@media (max-width: 560px) {
  /* compact art cards: picture on the left, words on the right */
  .card.card--art { display: grid; grid-template-columns: 84px minmax(0, 1fr); column-gap: 16px; align-items: start; padding-top: var(--card-pad); }
  .card--art .card-art { grid-column: 1; grid-row: 1 / span 4; margin: 0; aspect-ratio: 1; border: 1px solid var(--line); border-radius: 14px; }
  .card--art .card-art .illo { left: 8px; top: 8px; width: calc(100% - 16px); height: calc(100% - 16px); object-position: center; }
  .card--art > :not(.card-art):not(.go) { grid-column: 2; }
  .card--art h3 { padding-right: 26px; }
  .card--art .badge { justify-self: start; }
  .card--art .card-meta { margin-top: 10px; padding-top: 10px; }
}

/* ---------- 27. Charts (apps/core/charts.py; rules in DESIGN.md) ---------- */
.chart { position: relative; margin: 0; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(18px, 2.4vw, 26px); box-shadow: var(--sh-1); }
.prose .chart { margin: 1.8em 0; }
.chart-cap { display: grid; gap: 4px; margin-bottom: 20px; }
.chart-title { font: 650 1.06rem/1.3 var(--font-display); font-stretch: 104%; letter-spacing: -0.01em; color: var(--ink-900); }
.chart-sub { font-size: .9rem; line-height: 1.45; color: var(--ink-500); }
.chart-note { margin: 14px 0 0; font-size: .84rem; line-height: 1.5; color: var(--ink-500); }
.chart-axis { margin: 6px 0 0; text-align: center; font: 500 .72rem/1.2 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-500); }
/* horizontal bars: label, then the bar from a hairline baseline, value at the tip */
.hbars { display: grid; gap: 4px; }
.hbar { display: grid; grid-template-columns: minmax(0, 200px) minmax(0, 1fr); align-items: center; gap: 14px; padding: 5px 8px; margin: 0 -8px; border-radius: 10px; outline-offset: 0; }
.hbar-label { font-size: .92rem; line-height: 1.3; color: var(--ink-700); }
.hbar.is-em .hbar-label { color: var(--ink-900); font-weight: 600; }
.hbar-track { position: relative; height: 20px; margin-right: 48px; border-left: 1px solid var(--line-2); }
.hbar-fill { position: absolute; left: 0; top: 0; bottom: 0; width: var(--w); background: var(--haze-300); border-radius: 0 4px 4px 0; transition: background-color .15s; }
.hbar.is-em .hbar-fill { background: var(--em-600); }
.hbar-value { position: absolute; top: 50%; left: calc(var(--w) + 8px); transform: translateY(-50%); font: 600 .84rem/1 var(--font-mono); font-variant-numeric: tabular-nums; color: var(--ink-900); white-space: nowrap; }
.hbar:hover, .hbar:focus-visible { background: var(--paper); }
.hbar:hover .hbar-fill, .hbar:focus-visible .hbar-fill { background: var(--ink-400); }
.hbar.is-em:hover .hbar-fill, .hbar.is-em:focus-visible .hbar-fill { background: var(--em-700); }
/* columns: value on the cap, label under the baseline */
.vbars { --plot-h: 200px; position: relative; display: grid; grid-template-columns: repeat(var(--n, 6), minmax(0, 1fr)); gap: 2px; }
.vbars::after { content: ""; position: absolute; left: 0; right: 0; top: calc(var(--plot-h) - 1px); height: 1px; background: var(--line-2); pointer-events: none; }
.vbar { display: flex; flex-direction: column; border-radius: 10px; padding: 0 2px 6px; outline-offset: 0; }
.vbar-plot { position: relative; height: var(--plot-h); padding-top: 26px; padding-bottom: 1px; display: flex; align-items: flex-end; justify-content: center; }
.vbar-fill { position: relative; width: min(24px, 64%); height: var(--h); min-height: 2px; background: var(--haze-300); border-radius: 4px 4px 0 0; transition: background-color .15s; }
.vbar.is-em .vbar-fill { background: var(--em-600); }
.vbar-value { position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); font: 600 .8rem/1 var(--font-mono); font-variant-numeric: tabular-nums; color: var(--ink-900); white-space: nowrap; }
.vbar-label { margin-top: 8px; text-align: center; font: 500 .76rem/1.2 var(--font-mono); color: var(--ink-500); white-space: nowrap; }
.vbar.is-em .vbar-label { color: var(--ink-900); font-weight: 600; }
.vbar:hover, .vbar:focus-visible { background: var(--paper); }
.vbar:hover .vbar-fill, .vbar:focus-visible .vbar-fill { background: var(--ink-400); }
.vbar.is-em:hover .vbar-fill, .vbar.is-em:focus-visible .vbar-fill { background: var(--em-700); }
/* the tooltip only repeats what's printed: value first, then what it is */
.chart-tip { position: absolute; z-index: 5; left: 0; top: 0; max-width: 250px; padding: 8px 12px; border-radius: 10px; background: var(--night-900); color: var(--haze-200); box-shadow: var(--sh-2); font-size: .8rem; line-height: 1.35; pointer-events: none; opacity: 0; transform: translateY(4px); transition: opacity .12s, transform .12s; }
.chart-tip.is-on { opacity: 1; transform: none; }
.chart-tip b { display: flex; align-items: center; gap: 8px; font: 650 .98rem/1.2 var(--font-mono); color: #fff; margin-bottom: 2px; }
.chart-tip b::before { content: ""; width: 12px; height: 2px; border-radius: 1px; background: var(--tip-key, var(--haze-300)); }
.chart-table { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.chart-table summary { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; cursor: pointer; font-size: .9rem; font-weight: 600; color: var(--em-700); list-style: none; }
.chart-table summary::-webkit-details-marker { display: none; }
.chart-table .table-scroll { margin: 10px 0 0; }
.chart-table table.data { font-size: .9rem; }
.chart-table tbody th { font: 500 .92rem/1.4 var(--font-body); letter-spacing: 0; text-transform: none; color: var(--ink-800); background: none; border-top: 1px solid var(--line); border-bottom: 0; padding: 10px 16px; white-space: normal; }
.chart-table tbody tr:first-child th { border-top: 0; }
.chart-table td { padding: 10px 16px; }
@media (max-width: 560px) {
  .hbar { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .vbars { --plot-h: 170px; }
  .vbar-value { font-size: .72rem; }
  .vbar-label { font-size: .68rem; }
}
@media (forced-colors: active) {
  .hbar-fill, .vbar-fill { background: CanvasText; forced-color-adjust: none; }
  .hbar.is-em .hbar-fill, .vbar.is-em .vbar-fill { background: Highlight; }
}
/* Home research: chart beside the totals */
.research-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, .6fr); gap: clamp(16px, 2vw, 24px); align-items: stretch; }
.stats--stack { grid-template-columns: minmax(0, 1fr); grid-auto-rows: 1fr; }
.stats--stack > div { display: flex; flex-direction: column; justify-content: center; }
@media (max-width: 1080px) {
  .research-grid { grid-template-columns: minmax(0, 1fr); }
  .stats--stack { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: auto; }
}
@media (max-width: 820px) { .stats--stack { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .stats--stack { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
