/* ==========================================================================
   YRproject — site.css
   V2: dark-first night sea, luminous multi-hue colour system, one family (Geist),
   tabular figures. NO LIGHT SURFACES. Documented in docs/DESIGN.md — read that before adding CSS.
   ========================================================================== */

@font-face {
  font-family: "Geist";
  src: url("/static/fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- 1. Tokens ---------------------------------------------------- */
/* V2 "Night sea, in colour". RULE: no light surfaces anywhere (docs/DESIGN.md). Every V1 token NAME
   still exists and now resolves to a dark value, so feature CSS written against V1 turns dark by itself.
   Contrast (computed, on --sea #060B18 / --sea-2 / --sea-3): foam 17.6/16.5/14.6 · mist 9.4/8.8/7.8 ·
   haze 6.6/6.1/5.5 · edge 4.2/3.9/3.5 (UI >= 3:1) · pro 12.1 · flare 6.3 · flare-hi 7.8 · client 7.1 ·
   blue 7.2 · k-oilgas 11.2 · k-lng 7.7 · k-h2 14.3 · k-yard 8.2 · ok 11.4 · warn 12.8 · bad 7.1.
   --ink on pro 12.4, on flare 6.5, on client 7.3, on foam 18.1. */
:root {
  color-scheme: dark;
  /* night sea */
  --abyss: #03060F;          /* page edge, footer */
  --sea: #060B18;            /* page background */
  --sea-2: #0C1426;          /* panels, cards */
  --sea-3: #141F3A;          /* raised / hover panel, inputs */
  --sea-rule: #1E2B47;       /* decorative hairlines */
  --edge: #5F759B;           /* control borders (>= 3:1) */
  --foam: #EEF3FA;           /* text */
  --mist: #A6B4CB;           /* secondary text */
  --haze: #8696B2;           /* tertiary text, axis labels */
  --sea-text: var(--foam);
  --sea-muted: var(--mist);

  /* colour semantics: who gets what */
  --pro: #38E1D6;            /* the professional: cool luminous cyan */
  --pro-hi: #7DF5D9;         /* foam green highlight */
  --flare: #FF5A2A;          /* YRproject's fee: flare orange */
  --flare-hi: #FF7D52;       /* coral: small accent text on dark */
  --client: #9D8CFF;         /* the client's total: violet */
  --blue: #5B9DFF;           /* electric blue, second client hue */
  --g-pro: linear-gradient(135deg, #7DF5D9, #38E1D6 45%, #2BB8E6);
  --g-fee: linear-gradient(135deg, #FF9A5C, #FF5A2A 55%, #FF3D6E);
  --g-client: linear-gradient(90deg, #38E1D6, #5B9DFF 38%, #9D8CFF 68%, #FF7D52);  /* contains both streams */
  --g-edge: linear-gradient(135deg, rgb(125 245 217 / .55), rgb(91 157 255 / .25) 35%, rgb(157 140 255 / .12) 60%, rgb(255 125 82 / .5));

  /* project kinds: maps, radar, legends. One hue per kind, never reused for UI state. */
  --k-wind: #38E1D6;         /* offshore/onshore wind */
  --k-grid: #5B9DFF;         /* grid, HVDC, interconnectors, cables */
  --k-oilgas: #FFB547;       /* oil & gas */
  --k-lng: #FF6FB5;          /* LNG */
  --k-h2: #A6F05A;           /* hydrogen, CCS */
  --k-yard: #B497FF;         /* yards, ports, fabrication */
  --k-solar: #FFE45C;        /* large solar */
  --k-other: #A6B4CB;

  --ok: #4ADE9A;
  --warn: #FFC857;
  --bad: #FF6B7A;

  /* V1 names, mapped to dark (do not use in new CSS) */
  --ink: #05070D;            /* text ON a luminous fill */
  --paper: var(--sea);
  --paper-2: var(--sea-2);
  --white: var(--sea-3);     /* V1 "white field" = raised dark field */
  --muted: var(--mist);
  --rule: #2A3A5C;
  --rule-soft: var(--sea-rule);
  --accent: var(--flare);
  --accent-ink: var(--ink);

  /* surface roles */
  --bg: var(--sea);
  --fg: var(--foam);
  --fg-muted: var(--mist);
  --fg-dim: var(--haze);     /* tertiary labels; follows the surface (.paper overrides) */
  --line: var(--rule);
  --line-soft: var(--rule-soft);
  --panel: var(--sea-2);

  /* depth */
  --hi: inset 0 1px 0 rgb(255 255 255 / .07);
  --lift: 0 30px 60px -30px rgb(0 0 0 / .7);
  --glow-pro: 0 0 28px rgb(56 225 214 / .35);
  --glow-fee: 0 0 28px rgb(255 90 42 / .45);
  --glow-client: 0 0 28px rgb(157 140 255 / .4);
  --surface: linear-gradient(180deg, rgb(255 255 255 / .045), rgb(255 255 255 / .012)), var(--sea-2);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
  --r-sm: .5rem; --r: 1rem; --r-lg: 1.5rem;

  /* type */
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --fs-hero: clamp(3.25rem, 1.4rem + 8vw, 8.25rem);
  --fs-h1: clamp(2.75rem, 1.4rem + 5.6vw, 6rem);
  --fs-h2: clamp(2.125rem, 1.3rem + 3.4vw, 4.25rem);
  --fs-h3: clamp(1.375rem, 1.2rem + .7vw, 1.875rem);
  --fs-lead: clamp(1.1875rem, 1.05rem + .55vw, 1.5rem);
  --fs-body: 1.0625rem;
  --fs-small: .9375rem;
  --fs-micro: .8125rem;
  --fs-fig: clamp(2.5rem, 1.6rem + 3.6vw, 4.75rem);

  /* space (4 px base) */
  --s1: .25rem; --s2: .5rem; --s3: .75rem; --s4: 1rem; --s5: 1.5rem;
  --s6: 2rem; --s7: 3rem; --s8: 4rem; --s9: 6rem; --s10: 9rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section: clamp(4.5rem, 9vw, 8.5rem);
  --maxw: 84rem;

  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --t-fast: 160ms; --t: 420ms; --t-slow: 900ms;
}

/* ---------- 2. Base ------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; background: var(--abyss); scrollbar-color: #2A3A5C var(--abyss); scroll-padding-top: 5rem; }
body {
  margin: 0;
  background:
    radial-gradient(70rem 40rem at 85% -12rem, rgb(91 157 255 / .13), transparent 70%),
    radial-gradient(60rem 36rem at -10% 8rem, rgb(56 225 214 / .08), transparent 70%),
    var(--bg);
  background-repeat: no-repeat;
  color: var(--fg);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.5;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh; min-height: 100dvh;
}
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--abyss); }
::-webkit-scrollbar-thumb { background: #2A3A5C; border-radius: 6px; border: 3px solid var(--abyss); }
::-webkit-scrollbar-thumb:hover { background: var(--edge); }
img, svg { max-width: 100%; display: block; }
[hidden] { display: none !important; }
h1, h2, h3, h4 { font-weight: 400; margin: 0; text-wrap: balance; }
h1, .h1 { font-size: var(--fs-h1); line-height: .98; letter-spacing: -.045em; font-weight: 500; }
h2, .h2 { font-size: var(--fs-h2); line-height: 1; letter-spacing: -.04em; font-weight: 500; }
h3, .h3 { font-size: var(--fs-h3); line-height: 1.12; letter-spacing: -.025em; font-weight: 500; }
h4, .h4 { font-size: var(--fs-body); line-height: 1.3; font-weight: 600; letter-spacing: -.005em; }
.hero-title { font-size: var(--fs-hero); line-height: .92; letter-spacing: -.055em; font-weight: 500; }
p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
.lead { font-size: var(--fs-lead); line-height: 1.35; letter-spacing: -.015em; max-width: 38em; }
.small { font-size: var(--fs-small); }
.micro { font-size: var(--fs-micro); }
.muted { color: var(--fg-muted); }
.num, .fig, table, input, output { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.eyebrow {
  font-size: var(--fs-micro); letter-spacing: .12em; text-transform: uppercase; font-family: var(--font-mono);
  color: var(--pro); margin: 0 0 var(--s5); display: flex; gap: .7em; align-items: center;
}
.eyebrow::before { content: ""; width: .55em; height: .55em; border-radius: 50%; background: var(--flare); box-shadow: 0 0 0 .25em rgb(255 90 42 / .2), var(--glow-fee); flex: none; }
a { color: inherit; text-decoration-line: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; text-decoration-color: rgb(166 180 203 / .6); }
a:hover { text-decoration-thickness: 2px; text-decoration-color: var(--pro); }
strong, b { font-weight: 600; }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--s7) 0; }
code, kbd, .mono { font-family: var(--font-mono); font-size: .92em; }
sup { font-size: .62em; line-height: 0; vertical-align: super; }
sup a { text-decoration: none; padding: 0 .1em; color: var(--pro); }
::selection { background: var(--client); color: var(--ink); }
.grad { background: var(--g-client); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.c-pro { color: var(--pro); } .c-fee { color: var(--flare-hi); } .c-client { color: var(--client); }

:focus { outline: none; }
:focus-visible { outline: 3px solid var(--pro); outline-offset: 3px; box-shadow: 0 0 0 1px var(--abyss); border-radius: 2px; }

.skip { position: absolute; left: var(--gutter); top: -6rem; background: var(--pro); color: var(--ink); padding: var(--s3) var(--s4); z-index: 100; border-radius: var(--r-sm); font-weight: 600; }
.skip:focus { top: var(--s3); }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

/* ---------- 3. Layout ---------------------------------------------------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: 56rem; }
.section { padding-block: var(--section); position: relative; }
.section--tight { padding-block: calc(var(--section) * .6); }
.section--rule { border-top: 1px solid transparent; border-image: linear-gradient(90deg, transparent, var(--rule) 20%, var(--rule) 80%, transparent) 1; }
.section-head { display: grid; gap: var(--s5); margin-bottom: var(--s8); }
.section-head .lead { color: var(--fg-muted); }
@media (min-width: 60rem) {
  .section-head { grid-template-columns: 7fr 5fr; align-items: end; gap: var(--s8); }
}
.grid { display: grid; gap: var(--s6) var(--gutter); grid-template-columns: repeat(12, minmax(0, 1fr)); }
.grid > * { grid-column: span 12; }
@media (min-width: 48rem) {
  .col-6 { grid-column: span 6; } .col-4 { grid-column: span 4; } .col-8 { grid-column: span 8; }
  .col-3 { grid-column: span 6; } .col-5 { grid-column: span 5; } .col-7 { grid-column: span 7; }
}
@media (min-width: 64rem) { .col-3 { grid-column: span 3; } }
.stack > * + * { margin-top: var(--s5); }
.stack-lg > * + * { margin-top: var(--s7); }
.cluster { display: flex; flex-wrap: wrap; gap: var(--s3) var(--s4); align-items: center; }

/* V1 surface classes stay as aliases: both are dark. .sea = deeper blue band, .inv = abyss. */
.sea, .inv { background: var(--bg); color: var(--fg); }
.sea { --bg: #050A1A; --panel: var(--sea-2); background: radial-gradient(60rem 30rem at 80% 0, rgb(56 225 214 / .1), transparent 70%), radial-gradient(50rem 30rem at 0 100%, rgb(157 140 255 / .1), transparent 70%), var(--bg); }
.inv { --bg: var(--abyss); --panel: #0A1020; }
/* the ONLY light object on the site: a sheet of paper (the sample invoice on /open-book). Opt in with .paper */
.paper { --bg: #F4F1EA; --fg: #0B0D0E; --fg-muted: #565B5A; --fg-dim: #565B5A; --haze: #565B5A; --mist: #565B5A; --pro: #0B6B5F; --line: #0B0D0E; --line-soft: #D5D1C7; --panel: #ECE9E1; --white: #FFFFFF; --accent: #E8431A; background: var(--bg); color: var(--fg); color-scheme: light; box-shadow: 0 40px 80px -30px rgb(0 0 0 / .8), 0 0 0 1px rgb(255 255 255 / .1); }

/* raised dark panel with a luminous gradient edge — the V2 replacement for "sheets" */
.panel, .card, .alert, .empty, .doors, .facts--panel {
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r); box-shadow: var(--hi), var(--lift);
}
.edge { position: relative; isolation: isolate; }
.edge::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; background: var(--g-edge); pointer-events: none; z-index: 1;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}

/* ---------- 4. Header / nav --------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid rgb(255 255 255 / .07); background: rgb(6 11 24 / .72); -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5); view-transition-name: site-header; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .site-header { background: rgb(6 11 24 / .96); } }
.site-header::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--g-client); opacity: .55; }
.site-header__in { display: flex; align-items: center; justify-content: space-between; gap: var(--s5); min-height: 4.25rem; flex-wrap: wrap; }
.logo { display: inline-flex; align-items: center; text-decoration: none; color: var(--fg); padding-block: var(--s3); }
.logo svg { height: 1.75rem; width: auto; overflow: visible; }
.logo .yr-m--pro { fill: var(--pro); }
.logo .yr-m--fee { fill: var(--flare); }
.logo .yr-mark { filter: drop-shadow(0 0 6px rgb(56 225 214 / .35)); }
/* The name reads "YouR project": .yr-y / .yr-ou / .yr-rest (brand/logo/build_logos.py). Hover or focus slides a
   regular-weight "ou" in between Y and R; on the homepage it shows once on load, then closes. */
.logo .yr-ou { opacity: 0; transition: opacity 260ms var(--ease); fill: var(--pro); }
.logo .yr-rest { transition: transform var(--t) var(--ease); }
.logo:hover .yr-ou, .logo:focus-visible .yr-ou { opacity: 1; transition-delay: 120ms; }
.logo:hover .yr-rest, .logo:focus-visible .yr-rest { transform: translateX(var(--yr-ou, 0px)); }
.nav-toggle { position: absolute; opacity: 0; width: 1px; height: 1px; }
.nav-btn {
  display: inline-flex; align-items: center; gap: .6em; cursor: pointer; user-select: none;
  font-size: var(--fs-small); padding: .55em 1em; border: 1px solid var(--edge); min-height: 2.75rem; border-radius: 99px;
}
.nav-btn::before { content: ""; width: 1em; height: .5em; border-block: 2px solid currentColor; }
.nav-toggle:focus-visible + .nav-btn { outline: 3px solid var(--pro); outline-offset: 3px; }
.nav-toggle:checked + .nav-btn { background: rgb(56 225 214 / .14); color: var(--pro-hi); border-color: var(--pro); box-shadow: var(--glow-pro); }
.nav-toggle:checked + .nav-btn::before { height: 0; border-bottom: 0; }
.site-nav { display: none; flex-basis: 100%; padding-bottom: var(--s5); max-height: calc(100vh - 5rem); overflow-y: auto; }
.nav-toggle:checked ~ .site-nav { display: block; }
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav a {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: .7em 0; border-top: 1px solid var(--line-soft); text-decoration: none;
  font-size: 1.375rem; letter-spacing: -.02em;
}
.site-nav a::after { content: "→"; color: var(--fg-muted); }
.site-nav a[aria-current="page"] { color: var(--pro); }
.site-nav .nav-live::before { content: ""; display: inline-block; width: .45em; height: .45em; border-radius: 50%; background: var(--pro); box-shadow: var(--glow-pro); margin-right: .55em; vertical-align: .12em; }
.site-nav .nav-live { justify-content: flex-start; }
.site-nav .nav-live::after { margin-left: auto; }
.nav-doors { display: grid; gap: var(--s3); padding-block: var(--s4) var(--s5); }
.nav-door { display: flex; justify-content: space-between; align-items: center; gap: var(--s4); min-height: 3.75rem; padding: .8rem 1.1rem; border-radius: var(--r); border: 1px solid var(--edge); background: var(--surface); box-shadow: var(--hi); font-size: 1.25rem; font-weight: 500; letter-spacing: -.02em; text-decoration: none; color: var(--fg); }
.site-nav a.nav-door { padding: .8rem 1.1rem; border-top: 1px solid var(--edge); font-size: 1.25rem; align-items: center; }
.site-nav a.nav-door::after { content: none; }
.nav-door--primary { background: var(--g-pro); color: var(--ink); border-color: transparent; box-shadow: var(--glow-pro); }
.site-nav a.nav-door--primary { border-top-color: transparent; }
.nav-more { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s3); margin: 0; padding-top: var(--s5); border-top: 1px solid var(--line-soft); }
.site-nav .nav-more a { display: inline-flex; min-height: 2.75rem; padding: .4em 1em; border: 1px solid var(--edge); border-radius: 99px; font-size: var(--fs-small); letter-spacing: 0; color: var(--mist); }
.site-nav .nav-more a::after { content: none; }
/* the phone menu: full screen under the bar, scrolls inside itself, the page behind is locked - CSS only (:has) */
@media (max-width: 72.99rem) {
  .site-nav { height: calc(100vh - 4.25rem); height: calc(100dvh - 4.25rem - 1px); max-height: none; overscroll-behavior: contain; padding-bottom: calc(var(--s7) + env(safe-area-inset-bottom, 0px)); }
  .site-nav a { min-height: 3.25rem; align-items: center; }
  .nav-toggle:checked ~ .site-nav { animation: nav-in 220ms var(--ease-out); }
  .site-header:has(.nav-toggle:checked) { background: rgb(5 9 20 / .98); }
  html:has(.nav-toggle:checked) { overflow: hidden; }
}
@keyframes nav-in { from { opacity: 0; transform: translateY(-.5rem); } }
@media (min-width: 73rem) {
  .nav-doors, .nav-more { display: none; }
  .nav-btn { display: none; }
  .site-header__in { flex-wrap: nowrap; }
  .site-nav { display: block; flex-basis: auto; padding: 0; overflow: visible; }
  .site-nav ul { display: flex; gap: clamp(.9rem, 1.7vw, 1.75rem); align-items: center; }
  .site-nav a { font-size: var(--fs-small); letter-spacing: 0; border: 0; padding: 1.45rem 0; white-space: nowrap; color: var(--mist); transition: color var(--t-fast); position: relative; }
  .site-nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: .95rem; height: 2px; border-radius: 2px; background: var(--g-client); transform: scaleX(0); transform-origin: left; transition: transform 260ms var(--ease-out); margin: 0; }
  .site-nav a:hover { color: var(--fg); }
  .site-nav a:hover::after, .site-nav a[aria-current="page"]::after { transform: scaleX(1); }
  .site-nav a[aria-current="page"] { color: var(--fg); }
}

/* ---------- 5. Footer ---------------------------------------------------- */
.site-footer { padding-block: var(--s9) var(--s6); position: relative; overflow: hidden; border-top: 1px solid var(--line-soft); background: radial-gradient(60rem 26rem at 50% 115%, rgb(157 140 255 / .2), transparent 70%), radial-gradient(40rem 20rem at 12% 110%, rgb(56 225 214 / .14), transparent 70%), radial-gradient(40rem 20rem at 88% 110%, rgb(255 90 42 / .16), transparent 70%), var(--abyss); }
.site-footer__claim { font-size: var(--fs-h2); letter-spacing: -.04em; line-height: 1; margin: 0 0 var(--s9); max-width: 14em; font-weight: 500; }
.site-footer__cols { display: grid; gap: var(--s7) var(--gutter); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 56rem) { .site-footer__cols { grid-template-columns: 5fr 3fr 3fr 3fr; } }
.site-footer__cols > :first-child { grid-column: 1 / -1; }
@media (min-width: 56rem) { .site-footer__cols > :first-child { grid-column: auto; } }
.site-footer h2 { font-size: var(--fs-micro); letter-spacing: .12em; text-transform: uppercase; color: var(--fg-dim); margin-bottom: var(--s4); line-height: 1.4; font-family: var(--font-mono); font-weight: 400; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .45em; }
.site-footer a { text-decoration: none; color: var(--mist); transition: color var(--t-fast); }
.site-footer a:hover { color: var(--fg); text-decoration: underline; text-decoration-color: var(--pro); }
.site-footer address { font-style: normal; color: var(--fg-muted); line-height: 1.6; }
.site-footer address strong { color: var(--fg); font-weight: 500; }
.site-footer .logo svg { height: 2rem; margin-bottom: var(--s5); }
.site-footer__base { margin-top: var(--s8); padding-top: var(--s5); border-top: 1px solid var(--line-soft); display: flex; flex-wrap: wrap; gap: var(--s3) var(--s6); justify-content: space-between; color: var(--fg-dim); font-size: var(--fs-micro); position: relative; }

/* ---------- 6. Buttons & doors ------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .7em; position: relative;
  font: inherit; font-size: var(--fs-body); font-weight: 600; line-height: 1.1; letter-spacing: -.005em;
  padding: 1em 1.5em; min-height: 3.25rem; border: 1px solid transparent; border-radius: 99px;
  background: var(--g-pro); color: var(--ink); text-decoration: none; cursor: pointer;
  box-shadow: 0 0 0 0 rgb(56 225 214 / 0), inset 0 1px 0 rgb(255 255 255 / .35);
  transition: box-shadow 220ms var(--ease), transform 160ms var(--ease), filter 160ms, background-color 160ms, color 160ms, border-color 160ms;
}
.btn:hover { box-shadow: 0 0 0 4px rgb(56 225 214 / .18), 0 10px 36px -6px rgb(56 225 214 / .55), inset 0 1px 0 rgb(255 255 255 / .35); filter: brightness(1.06); transform: translateY(-1px); }
.btn:active { transform: translateY(1px) scale(.985); }
.btn--accent { background: var(--g-fee); color: var(--ink); }
.btn--accent:hover { box-shadow: 0 0 0 4px rgb(255 90 42 / .2), 0 10px 36px -6px rgb(255 90 42 / .6), inset 0 1px 0 rgb(255 255 255 / .35); }
.btn--ghost { background: rgb(255 255 255 / .04); color: var(--fg); border-color: var(--edge); box-shadow: none; }
.btn--ghost:hover { border-color: var(--pro); background: rgb(56 225 214 / .1); box-shadow: 0 0 0 4px rgb(56 225 214 / .12); filter: none; }
.btn--small { font-size: var(--fs-small); padding: .7em 1.1em; min-height: 2.75rem; }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.arrow::after { content: "→"; transition: transform 200ms var(--ease); }
.arrow:hover::after { transform: translateX(.25em); }
.link-arrow { text-decoration: none; font-weight: 500; border-bottom: 1px solid var(--pro); padding-bottom: .1em; color: var(--fg); }
.link-arrow::after { content: " →"; color: var(--pro); display: inline-block; transition: transform 200ms var(--ease); }
.link-arrow:hover { border-bottom-width: 2px; }
.link-arrow:hover::after { transform: translateX(.25em); }

.doors { display: grid; gap: 0; overflow: hidden; padding: 0; }
@media (min-width: 44rem) { .doors { grid-template-columns: 1fr 1fr; } }
.door {
  display: grid; gap: var(--s3); padding: clamp(1.25rem, 3vw, 2.25rem); text-decoration: none; position: relative; isolation: isolate;
  grid-template-columns: 1fr auto; align-items: end; min-height: 8.5rem; --door: var(--pro); --door-rgb: 56 225 214;
  transition: background-color 180ms, color 180ms;
}
.door::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(28rem 14rem at 100% 100%, rgb(var(--door-rgb) / .28), transparent 70%); opacity: .55; transition: opacity 300ms var(--ease); }
.door::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--door); box-shadow: 0 0 24px 2px rgb(var(--door-rgb) / .7); transform: scaleX(.12); transform-origin: left; transition: transform 420ms var(--ease-out); }
.door + .door { border-top: 1px solid var(--line-soft); }
@media (min-width: 44rem) { .door + .door { border-top: 0; border-left: 1px solid var(--line-soft); } }
.door__t { font-size: clamp(1.625rem, 1.2rem + 1.8vw, 2.75rem); letter-spacing: -.035em; line-height: 1; display: block; font-weight: 500; }
.door__s { color: var(--fg-muted); font-size: var(--fs-small); display: block; margin-top: var(--s3); max-width: 30em; }
.door__a { font-size: 2rem; line-height: 1; transition: transform 220ms var(--ease); color: var(--door); }
.door:hover::before { opacity: 1; }
.door:hover::after { transform: scaleX(1); }
.door:hover .door__a { transform: translateX(.3em); }
.door--primary { --door: var(--client); --door-rgb: 157 140 255; }
.door--primary .door__s { color: var(--fg-muted); }

/* ---------- 7. Forms ----------------------------------------------------- */
.field { display: grid; gap: var(--s2); }
.field > label, .label { font-size: var(--fs-small); font-weight: 500; }
.hint { font-size: var(--fs-micro); color: var(--fg-muted); margin: 0; }
.input, .select, .textarea,
input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input[type="url"],
input[type="password"], input[type="date"], input[type="search"], select, textarea {
  font: inherit; color: var(--fg); background: rgb(20 31 58 / .7); width: 100%;
  border: 1px solid var(--edge); border-radius: var(--r-sm); padding: .8em .9em; min-height: 3.25rem;
  appearance: none; -webkit-appearance: none; box-shadow: inset 0 2px 6px rgb(0 0 0 / .35);
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background-color var(--t-fast);
}
input:hover, select:hover, textarea:hover { border-color: #8AA0C8; }
textarea { min-height: 9rem; resize: vertical; line-height: 1.45; }
select { background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 1.25em) 52%, calc(100% - .9em) 52%; background-size: .35em .35em; background-repeat: no-repeat; padding-right: 2.4em; }
select option { background: var(--sea-2); color: var(--fg); }
input::placeholder, textarea::placeholder { color: var(--fg-dim); opacity: 1; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--pro); outline-offset: 0; border-color: var(--pro); box-shadow: 0 0 0 5px rgb(56 225 214 / .16), inset 0 2px 6px rgb(0 0 0 / .35); background-color: var(--sea-3); }
input:-webkit-autofill { -webkit-text-fill-color: var(--fg); box-shadow: inset 0 0 0 99px var(--sea-3); caret-color: var(--fg); }
input[type="file"] { font: inherit; font-size: var(--fs-small); padding: var(--s4); border: 1px dashed var(--edge); border-radius: var(--r-sm); width: 100%; background: rgb(255 255 255 / .02); color: var(--fg-muted); }
input[type="file"]::file-selector-button { font: inherit; margin-right: 1em; padding: .5em 1em; border-radius: 99px; border: 1px solid var(--edge); background: var(--sea-3); color: var(--fg); cursor: pointer; }
.field--error input, .field--error select, .field--error textarea { border-color: var(--bad); box-shadow: 0 0 0 4px rgb(255 107 122 / .15); }
.field__error { font-size: var(--fs-small); font-weight: 500; color: var(--bad); }
.field__error::before { content: "!"; display: inline-grid; place-content: center; width: 1.3em; height: 1.3em; border-radius: 50%; background: var(--bad); color: var(--ink); margin-right: .5em; font-weight: 700; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; font-size: var(--fs-small); font-weight: 500; margin-bottom: var(--s3); }

.check { display: inline-flex; align-items: flex-start; gap: .7em; cursor: pointer; font-size: var(--fs-small); line-height: 1.35; padding-block: .35em; }
.check input { appearance: none; -webkit-appearance: none; flex: none; width: 1.35rem; height: 1.35rem; min-height: 0; margin: 0; padding: 0; border: 1px solid var(--edge); border-radius: .35rem; background: rgb(20 31 58 / .7); display: grid; place-content: center; cursor: pointer; box-shadow: none; }
.check input::after { content: ""; width: .7rem; height: .7rem; border-radius: .15rem; background: var(--ink); transform: scale(0); transition: transform 140ms var(--ease); clip-path: polygon(14% 52%, 0 66%, 40% 100%, 100% 22%, 86% 10%, 38% 70%); }
.check input:checked { background: var(--pro); border-color: var(--pro); box-shadow: var(--glow-pro); }
.check input:checked::after { transform: scale(1); }
.check input[type="radio"] { border-radius: 50%; }
.check input[type="radio"]::after { border-radius: 50%; clip-path: none; width: .55rem; height: .55rem; }
.check input:disabled, .check input:disabled + span { opacity: .4; cursor: not-allowed; }

.seg { display: inline-flex; border: 1px solid var(--edge); border-radius: var(--r-sm); padding: 3px; background: rgb(20 31 58 / .7); gap: 2px; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; }
.seg label { padding: .5em .85em; font-size: var(--fs-small); cursor: pointer; min-height: 2.6rem; display: inline-flex; align-items: center; white-space: nowrap; border-radius: .3rem; color: var(--mist); transition: background-color var(--t-fast), color var(--t-fast); }
.seg label:hover { color: var(--fg); }
.seg input:checked + label { background: var(--g-pro); color: var(--ink); font-weight: 500; }
.seg input:focus-visible + label { outline: 3px solid var(--pro); outline-offset: 2px; }

input[type="range"] { appearance: none; -webkit-appearance: none; width: 100%; height: 2.75rem; background: transparent; margin: 0; padding: 0; border: 0; min-height: 0; cursor: pointer; box-shadow: none; }
input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--flare) 0 12.5%, #C86BFF 12.5% 37.5%, var(--blue) 37.5%); box-shadow: inset 0 0 0 1px rgb(0 0 0 / .3); }
input[type="range"]::-moz-range-track { height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--flare) 0 12.5%, #C86BFF 12.5% 37.5%, var(--blue) 37.5%); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 1.6rem; height: 1.6rem; margin-top: calc(-.8rem + 3px); background: var(--fg); border: 0; border-radius: 50%; box-shadow: 0 0 0 5px rgb(238 243 250 / .16), 0 4px 14px rgb(0 0 0 / .6); transition: box-shadow var(--t-fast); }
input[type="range"]::-moz-range-thumb { width: 1.5rem; height: 1.5rem; background: var(--fg); border: 0; border-radius: 50%; box-shadow: 0 0 0 5px rgb(238 243 250 / .16); }
input[type="range"]:hover::-webkit-slider-thumb, input[type="range"]:active::-webkit-slider-thumb { box-shadow: 0 0 0 8px rgb(238 243 250 / .2), 0 4px 14px rgb(0 0 0 / .6); }
input[type="range"]:focus-visible { outline: 3px solid var(--pro); outline-offset: 2px; border-radius: var(--r-sm); }

.form-grid { display: grid; gap: var(--s5) var(--gutter); }
@media (min-width: 44rem) { .form-grid--2 { grid-template-columns: 1fr 1fr; } .form-grid .span-2 { grid-column: 1 / -1; } }

/* ---------- 8. Tables ---------------------------------------------------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-scroll:focus-visible { outline-offset: -3px; }
table { border-collapse: collapse; width: 100%; font-size: var(--fs-small); }
caption { text-align: left; color: var(--fg-muted); font-size: var(--fs-micro); padding-bottom: var(--s3); caption-side: top; }
th, td { text-align: left; vertical-align: top; padding: .9em 1em .9em 0; border-bottom: 1px solid var(--line-soft); }
thead th { font-size: var(--fs-micro); letter-spacing: .1em; text-transform: uppercase; font-weight: 400; font-family: var(--font-mono); color: var(--fg-dim); border-bottom: 1px solid var(--line); vertical-align: bottom; }
tbody th { font-weight: 500; }
tbody tr { transition: background-color var(--t-fast); }
tbody tr:hover { background: rgb(255 255 255 / .025); }
td.num, th.num { text-align: right; padding-right: 0; padding-left: 1em; white-space: nowrap; }
tfoot td, tfoot th { border-top: 1px solid var(--line); border-bottom: 0; font-weight: 600; }

.compare { min-width: 46rem; border-collapse: separate; border-spacing: 0; }
.compare th, .compare td { padding: 1.15em 1.25em; }
.compare thead th { font-family: var(--font); font-size: var(--fs-body); letter-spacing: -.01em; text-transform: none; color: var(--fg); padding-bottom: 1em; }
.compare tbody th { width: 22%; padding-left: 0; color: var(--fg-muted); font-weight: 400; }
.compare tbody tr:hover { background: none; }
.compare td { width: 24%; color: var(--mist); }
.compare .is-us { width: 30%; color: var(--fg); background: linear-gradient(180deg, rgb(56 225 214 / .13), rgb(157 140 255 / .1)); border-inline: 1px solid rgb(56 225 214 / .4); border-bottom-color: rgb(56 225 214 / .16); }
.compare thead .is-us { font-weight: 600; border-top: 1px solid rgb(56 225 214 / .6); border-radius: var(--r) var(--r) 0 0; box-shadow: 0 -18px 50px -12px rgb(56 225 214 / .5); font-size: var(--fs-h3); letter-spacing: -.025em; }
.compare tbody tr:last-child .is-us { border-bottom: 1px solid rgb(157 140 255 / .6); border-radius: 0 0 var(--r) var(--r); }
.yes, .no, .part { display: block; font-weight: 600; margin-bottom: .2em; color: var(--fg); }
.yes::before, .no::before, .part::before { display: inline-block; width: 1.2em; font-weight: 400; }
.yes::before { content: "●"; color: var(--pro); text-shadow: var(--glow-pro); }
.no::before { content: "○"; color: var(--fg-dim); }
.part::before { content: "◐"; color: var(--warn); }
.compare .d { display: block; font-size: var(--fs-micro); opacity: .9; }
/* Phones: one card per question, the three answers stacked and labelled (no sideways scroll). */
@media (max-width: 47.99rem) {
  .table-scroll:has(> .compare) { overflow: visible; }
  .compare { min-width: 0; width: 100%; display: block; }
  .compare thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .compare tbody, .compare tr, .compare th, .compare td { display: block; width: auto; }
  .compare tbody tr { margin: 0 0 1.25rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); overflow: hidden; }
  .compare tbody th { width: auto; padding: 1rem 1.1rem .85rem; color: var(--fg); font-weight: 600; font-size: var(--fs-h3); letter-spacing: -.02em; border-bottom: 1px solid var(--line); }
  .compare td { width: auto; padding: .95rem 1.1rem; border-bottom: 1px solid var(--line); }
  .compare tr td:last-child { border-bottom: 0; }
  .compare td::before { content: attr(data-label); display: block; margin-bottom: .4em; font-family: var(--font-mono, ui-monospace, monospace); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-muted); }
  .compare .is-us { width: auto; border-inline: 0; border-left: 3px solid var(--pro); border-radius: 0; }
  .compare .is-us::before { color: var(--pro); }
  .compare tbody tr:last-child .is-us { border-radius: 0; border-bottom: 1px solid var(--line); }
}

/* ---------- 9. Cards, fact block, badges, figures ------------------------ */
.card { padding: clamp(1.25rem, 2.5vw, 2rem); display: block; text-decoration: none; position: relative; }
.card--fill { background: var(--sea-3); border-color: transparent; }
a.card { transition: border-color 200ms, transform 300ms var(--ease-out), box-shadow 300ms; }
a.card:hover { border-color: rgb(56 225 214 / .55); transform: translateY(-3px); box-shadow: var(--hi), 0 30px 60px -30px rgb(0 0 0 / .7), 0 0 40px -10px rgb(56 225 214 / .35); }
.card__k { font-size: var(--fs-micro); letter-spacing: .1em; text-transform: uppercase; font-family: var(--font-mono); color: var(--fg-dim); margin-bottom: var(--s6); display: flex; justify-content: space-between; gap: var(--s3); }
.card h3 { margin-bottom: var(--s3); }
.cards { display: grid; gap: var(--s4); }
@media (min-width: 44rem) { .cards--2, .cards--3, .cards--4 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 64rem) { .cards--3 { grid-template-columns: repeat(3, 1fr); } .cards--4 { grid-template-columns: repeat(4, 1fr); } }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 0; margin: 0; border-top: 1px solid var(--line); }
.facts > div { padding: var(--s4) var(--s4) var(--s4) 0; border-bottom: 1px solid var(--line-soft); }
.facts dt { font-size: var(--fs-micro); letter-spacing: .1em; text-transform: uppercase; font-family: var(--font-mono); color: var(--fg-dim); margin-bottom: .3em; }
.facts dd { margin: 0; font-size: var(--fs-body); font-weight: 500; }
.facts--rows { grid-template-columns: 1fr; }
.facts--rows > div { display: grid; grid-template-columns: minmax(8rem, 2fr) 3fr; gap: var(--s4); align-items: baseline; }
.facts--rows dt { margin: 0; }

.badge { display: inline-flex; align-items: center; gap: .5em; font-size: var(--fs-micro); letter-spacing: .08em; text-transform: uppercase; font-family: var(--font-mono); font-weight: 500; line-height: 1; padding: .45em .7em; border: 1px solid rgb(166 180 203 / .4); border-radius: 99px; white-space: nowrap; background: rgb(255 255 255 / .03); }
.badge--accent { background: var(--g-fee); border-color: transparent; color: var(--ink); }
.badge--solid { background: color-mix(in srgb, var(--pro) 20%, var(--bg)); border-color: var(--pro); color: var(--pro-hi); }   /* was white: owner rule, no white surfaces */
.badge--later { border-style: dashed; color: var(--fg-muted); }
.badge--live { color: var(--pro); border-color: rgb(56 225 214 / .45); background: rgb(56 225 214 / .08); }
.badge--live::before { content: ""; width: .5em; height: .5em; border-radius: 50%; background: var(--pro); box-shadow: 0 0 0 0 rgb(56 225 214 / .6); animation: pulse 2.4s var(--ease) infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgb(56 225 214 / .6); } 70%, 100% { box-shadow: 0 0 0 .6em rgb(56 225 214 / 0); } }
/* kind chips: <span class="badge kind" style="--k: var(--k-wind)"> or .kind--wind etc. */
.kind { --k: var(--k-other); color: var(--k); border-color: color-mix(in srgb, var(--k) 45%, transparent); background: color-mix(in srgb, var(--k) 9%, transparent); }
.kind::before { content: ""; width: .5em; height: .5em; border-radius: 50%; background: var(--k); box-shadow: 0 0 10px var(--k); }
.kind--wind { --k: var(--k-wind); } .kind--grid { --k: var(--k-grid); } .kind--oilgas { --k: var(--k-oilgas); }
.kind--lng { --k: var(--k-lng); } .kind--h2 { --k: var(--k-h2); } .kind--yard { --k: var(--k-yard); } .kind--solar { --k: var(--k-solar); }

.fig { font-size: var(--fs-fig); line-height: .95; letter-spacing: -.05em; font-weight: 500; white-space: nowrap; display: block; }
.fig small, .fig__u { font-size: .34em; letter-spacing: -.01em; color: var(--fg-muted); margin-left: .15em; font-weight: 400; }
.fig--md { font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.5rem); letter-spacing: -.04em; }
.fig-label { font-size: var(--fs-small); display: flex; align-items: center; gap: .55em; margin-bottom: var(--s3); color: var(--mist); }
.key { width: .8em; height: .8em; flex: none; display: inline-block; border-radius: 50%; background: var(--pro); box-shadow: var(--glow-pro); }
.key--yr { background: var(--flare); box-shadow: var(--glow-fee); }
.key--client { background: var(--g-client); border: 0; box-shadow: var(--glow-client); }
.key--bonus { background: repeating-linear-gradient(135deg, var(--pro) 0 2px, var(--flare) 2px 4px); box-shadow: none; }

.ledger { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); font-size: var(--fs-small); }
.ledger li { display: flex; justify-content: space-between; gap: var(--s4); padding: .7em 0; border-bottom: 1px solid var(--line-soft); align-items: baseline; }
.ledger li > :last-child { white-space: nowrap; font-weight: 500; font-family: var(--font-mono); }
.ledger .is-zero { color: var(--fg-dim); }
.ledger .is-total { border-bottom: 0; border-top: 1px solid var(--flare); margin-top: -1px; font-weight: 600; }
.ledger .is-total > :last-child { color: var(--flare-hi); }

.note { font-size: var(--fs-micro); color: var(--fg-muted); max-width: 60em; }
.footnotes { font-size: var(--fs-micro); color: var(--fg-muted); padding-left: 1.4em; margin: var(--s6) 0 0; max-width: 62em; }
.footnotes li { margin-bottom: .5em; }
.footnotes li:target { color: var(--fg); }
.footnotes a { overflow-wrap: anywhere; }

.alert { border-left: 4px solid var(--flare); padding: var(--s4) var(--s5); border-radius: var(--r-sm); background: linear-gradient(90deg, rgb(255 90 42 / .12), transparent 60%), var(--sea-2); }
.alert--ok { border-left-color: var(--ok); background: linear-gradient(90deg, rgb(74 222 154 / .12), transparent 60%), var(--sea-2); }

.empty { border-style: dashed; border-color: var(--edge); padding: clamp(2rem, 6vw, 5rem) clamp(1.25rem, 4vw, 3rem); display: grid; gap: var(--s5); justify-items: start; background: radial-gradient(30rem 16rem at 0 0, rgb(157 140 255 / .12), transparent 70%), var(--sea-2); }
.empty h2, .empty h3 { max-width: 16em; }

/* page head for interior pages: an aurora band, never a white header */
.pagehead { padding-block: clamp(3rem, 8vw, 7rem) clamp(2.5rem, 6vw, 5rem); border-bottom: 1px solid var(--line-soft); position: relative; overflow: hidden; isolation: isolate; }
.pagehead::before { content: ""; position: absolute; inset: -40% -10% -20%; z-index: -1; background: radial-gradient(38rem 20rem at 78% 30%, rgb(157 140 255 / .3), transparent 70%), radial-gradient(34rem 18rem at 18% 70%, rgb(56 225 214 / .2), transparent 70%), radial-gradient(26rem 14rem at 60% 100%, rgb(255 90 42 / .16), transparent 70%); filter: blur(10px); }
.pagehead::after { content: ""; position: absolute; inset: 0; z-index: -1; background-image: var(--grain); opacity: .12; mix-blend-mode: overlay; pointer-events: none; }
.pagehead h1 { max-width: 14em; }
.pagehead .lead { margin-top: var(--s6); color: var(--fg-muted); }

.prose { max-width: 44rem; }
.prose h2 { font-size: var(--fs-h3); letter-spacing: -.025em; line-height: 1.15; margin: 2.2em 0 .6em; }
.prose h3 { font-size: var(--fs-body); font-weight: 600; letter-spacing: 0; margin: 1.8em 0 .4em; }
.prose ul, .prose ol { padding-left: 1.2em; margin: 0 0 1em; }
.prose li { margin-bottom: .4em; }
.prose li::marker { color: var(--pro); }
.prose a { text-decoration-color: var(--pro); }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s4); counter-reset: step; }
@media (min-width: 56rem) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps > li { counter-increment: step; padding: var(--s6); background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r); box-shadow: var(--hi); position: relative; overflow: hidden; --c: var(--pro); display: flex; flex-direction: column; border-top: 2px solid var(--c); background: radial-gradient(24rem 12rem at 0 0, color-mix(in srgb, var(--c) 16%, transparent), transparent 70%), var(--surface); }
.steps > li:nth-child(2) { --c: var(--flare-hi); } .steps > li:nth-child(3) { --c: var(--client); }
.steps > li::before { content: "0" counter(step); display: block; font-size: var(--fs-micro); letter-spacing: .12em; font-family: var(--font-mono); color: var(--c); margin-bottom: var(--s7); }
.steps h3 { margin-bottom: var(--s4); max-width: 12em; }
.steps p { color: var(--fg-muted); max-width: 30em; }
.steps .fig--md { color: var(--c); margin-top: auto; padding-top: var(--s5); }

.index { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.index li { border-bottom: 1px solid var(--line-soft); }
.index a { display: grid; grid-template-columns: 3rem 1fr auto; gap: var(--s4); align-items: baseline; padding: clamp(.9rem, 2vw, 1.5rem) 0; text-decoration: none; position: relative; isolation: isolate; transition: padding 320ms var(--ease-out), color 180ms; --c: var(--pro); }
.index li:nth-child(7n+2) a { --c: var(--k-oilgas); } .index li:nth-child(7n+3) a { --c: var(--blue); } .index li:nth-child(7n+4) a { --c: var(--k-h2); }
.index li:nth-child(7n+5) a { --c: var(--client); } .index li:nth-child(7n+6) a { --c: #4CC9F0; } .index li:nth-child(7n+7) a { --c: var(--flare-hi); }
.index a::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 22%, transparent), transparent 70%); transform: scaleX(0); transform-origin: left; transition: transform 420ms var(--ease-out); }
.index__n { font-size: var(--fs-micro); color: var(--fg-dim); font-family: var(--font-mono); }
.index__t { font-size: clamp(1.625rem, 1.1rem + 2.6vw, 3.5rem); letter-spacing: -.04em; line-height: 1; font-weight: 500; transition: font-weight 320ms var(--ease-out), color 180ms; }
.index__a { font-size: 1.5rem; color: var(--fg-dim); transition: transform 320ms var(--ease-out), color 180ms; }
.index a:hover, .index a:focus-visible { padding-inline: var(--s4); }
.index a:hover::before, .index a:focus-visible::before { transform: scaleX(1); }
.index a:hover .index__t { color: var(--c); font-weight: 650; }
.index a:hover .index__n, .index a:hover .index__a { color: var(--c); }
.index a:hover .index__a { transform: translateX(.3em); }

/* ---------- 10. Split bar (static/js/splitbar.js) ------------------------ */
.sb { display: grid; gap: clamp(2rem, 4vw, 3rem); }
.sb__controls { display: grid; gap: var(--s5) var(--gutter); align-items: start; }
/* hero: the stream comes first, the controls sit right under it, then the figures, then the scale */
.sb--hero .sb__viz { display: contents; }
.sb--hero .sb__barwrap { order: 1; } .sb--hero .sb__controls { order: 2; }
.sb--hero .sb__figs { order: 3; margin-top: 0; } .sb--hero .sb__scale { order: 4; }
.sb--hero { gap: clamp(1rem, 2vw, 1.5rem); }
.sb--hero .sb__scale { margin-top: var(--s6); }
@media (min-width: 56rem) { .sb__controls { grid-template-columns: minmax(0, 4fr) minmax(0, 5fr) minmax(0, 4fr); } }
.sb--hero .sb__controls { padding: clamp(1rem, 2.4vw, 1.75rem); background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r); box-shadow: var(--hi), var(--lift); }
.sb__row { display: flex; gap: var(--s3); align-items: stretch; flex-wrap: wrap; }
.sb__money { position: relative; flex: 1 1 8rem; min-width: 0; }
.sb__money span { position: absolute; left: .8em; top: 50%; transform: translateY(-50%); pointer-events: none; font-size: 1.25rem; color: var(--pro); }
.sb__money input, .sb__hoursnum input { font-size: 1.375rem; letter-spacing: -.02em; padding-block: .5em; -moz-appearance: textfield; appearance: textfield; font-weight: 500; }
.sb input[type="number"]::-webkit-inner-spin-button, .sb input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.sb__money input { padding-left: 1.8em; }
.sb__hoursrow { display: grid; grid-template-columns: 1fr 8.75rem; gap: var(--s4); align-items: center; }
@media (max-width: 24rem) { .sb__hoursrow { grid-template-columns: 1fr 7rem; gap: var(--s3); } }
.sb__hoursnum { position: relative; }
.sb__hoursnum span { position: absolute; right: .8em; top: 50%; transform: translateY(-50%); color: var(--fg-muted); pointer-events: none; }
.sb__hoursnum input { padding-right: 1.8em; }
.sb__toggles { display: grid; gap: 0; }
.sb__submit { justify-self: start; }
@media (scripting: enabled) { .sb__submit { display: none; } }
@media (scripting: none) { .sb [data-sb-js] { display: none; } .sb__hoursrow { grid-template-columns: 1fr; } }

.sb__total { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s4); font-size: var(--fs-small); padding-bottom: var(--s3); position: relative; margin-bottom: var(--s3); color: var(--mist); }
.sb__total::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 2px; background: var(--g-client); box-shadow: 0 0 18px rgb(157 140 255 / .6); }
.sb__total b { font-weight: 600; color: var(--fg); }
.sb__bar { display: flex; height: clamp(5.5rem, 11vw, 9.5rem); width: 100%; overflow: hidden; border-radius: var(--r-sm); }
.sb__seg { flex: 0 0 auto; min-width: 0; overflow: hidden; position: relative; transition: width var(--t) var(--ease); display: flex; flex-direction: column; justify-content: space-between; padding: clamp(.6rem, 1.4vw, 1.1rem); font-size: var(--fs-small); line-height: 1.2; white-space: nowrap; font-weight: 500; }
.sb__seg--pro { background: var(--g-pro); color: var(--ink); box-shadow: inset 0 1px 0 rgb(255 255 255 / .4); }
.sb__seg--bonus { background: repeating-linear-gradient(135deg, var(--pro) 0 5px, var(--flare) 5px 10px); padding: 0; }
.sb__seg--yr { background: var(--g-fee); color: var(--ink); flex: 1 1 0; box-shadow: inset 0 1px 0 rgb(255 255 255 / .35); border-left: 3px solid var(--bg); }
.sb__seg b { font-weight: 500; font-size: clamp(1.5rem, 1rem + 2.6vw, 3.25rem); letter-spacing: -.04em; line-height: 1; }
.sb__seg--yr b { font-size: clamp(1rem, .7rem + 1.4vw, 1.75rem); }
.sb__seg.is-narrow > * { visibility: hidden; }
@media (max-width: 43.99rem) {
  .sb__seg--yr { padding: .5rem .4rem; }
  .sb__seg--yr span { visibility: hidden; }
  .sb__seg--yr b { font-size: .8125rem; letter-spacing: -.02em; font-weight: 600; }
}

.sb__figs { display: grid; gap: var(--s4); margin-top: var(--s5); }
@media (min-width: 44rem) { .sb__figs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.sb__figs > div { --c: var(--client); --c-rgb: 157 140 255; position: relative; overflow: hidden; padding: var(--s5); background: radial-gradient(22rem 10rem at 0 0, rgb(var(--c-rgb) / .16), transparent 70%), var(--sea-2); border: 1px solid var(--line-soft); border-radius: var(--r); box-shadow: var(--hi); }
.sb__figs > div:nth-child(2) { --c: var(--pro); --c-rgb: 56 225 214; }
.sb__figs > div:nth-child(3) { --c: var(--flare-hi); --c-rgb: 255 90 42; }
.sb__figs > div::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 2px; background: var(--c); box-shadow: 0 0 24px 2px var(--c); }
.sb__figs .fig { color: var(--c); text-shadow: 0 0 40px rgb(var(--c-rgb) / .45); font-size: clamp(2.25rem, 1.2rem + 3.1vw, 4.25rem); }
.sb__sub { color: var(--fg-muted); font-size: var(--fs-small); margin-top: var(--s3); }
.sb__sub b { color: var(--fg); font-weight: 500; }

.sb__scale { display: grid; gap: var(--s5) var(--gutter); }
@media (min-width: 56rem) { .sb__scale { grid-template-columns: 8fr 5fr; align-items: end; } }
.sb__scalehead { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: var(--s1) var(--s4); margin-bottom: 2.75rem; font-size: var(--fs-small); }
.sb__steps { position: relative; height: 9rem; display: flex; align-items: flex-end; border-bottom: 1px solid var(--line); }
.sb__band { position: relative; height: 100%; display: flex; align-items: flex-end; min-width: 0; transition: width var(--t) var(--ease); --c: var(--flare); --c-rgb: 255 90 42; }
.sb__band[data-sb-band="1"] { --c: #C86BFF; --c-rgb: 200 107 255; } .sb__band[data-sb-band="2"] { --c: var(--blue); --c-rgb: 91 157 255; }
.sb__band + .sb__band { border-left: 2px solid var(--bg); }
.sb__col { position: relative; width: 100%; background: linear-gradient(180deg, rgb(var(--c-rgb) / .16), rgb(var(--c-rgb) / .04)); box-shadow: inset 0 2px 0 rgb(var(--c-rgb) / .7); border-radius: 4px 4px 0 0; transition: height var(--t) var(--ease); }
.sb__fill { position: absolute; inset: 0 auto 0 0; background: linear-gradient(180deg, var(--c), rgb(var(--c-rgb) / .45)); box-shadow: 0 0 30px rgb(var(--c-rgb) / .45); border-radius: 4px 0 0 0; transition: width var(--t) var(--ease); }
.sb__pct { position: absolute; left: .35rem; bottom: 100%; margin-bottom: .3rem; font-size: var(--fs-small); font-weight: 600; white-space: nowrap; line-height: 1; color: var(--c); font-family: var(--font-mono); }
.sb__marker { position: absolute; top: -1.4rem; bottom: -.35rem; width: 0; border-left: 2px solid var(--fg); transition: left var(--t) var(--ease); z-index: 2; filter: drop-shadow(0 0 6px rgb(238 243 250 / .7)); }
.sb__marker span { position: absolute; top: 0; left: .35rem; font-size: var(--fs-micro); font-weight: 600; white-space: nowrap; background: rgb(10 16 32 / .88); color: var(--fg); border: 1px solid rgb(255 255 255 / .22); box-shadow: 0 0 18px rgb(157 140 255 / .35); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); padding: .3em .55em; border-radius: 4px; line-height: 1; transform: translateY(-20%); }
.sb__marker.is-right span { left: auto; right: .35rem; }
.sb__axis { position: relative; height: 1.4rem; font-size: var(--fs-micro); color: var(--fg-dim); margin-top: .35rem; font-family: var(--font-mono); }
.sb__axis span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.sb__axis span:first-child { transform: none; }
.sb__axis span:last-child { transform: translateX(-100%); }

/* Phones: .sb__stage = flow + readout + controls. The bar wrap sticks under the header while the controls are in
   view, so every drag visibly moves the flow AND the three figures (.sb__mini, a twin of .sb__figs). */
.sb--hero .sb__stage { display: contents; }
.sb__mini { display: none; }
.sb--ext { display: block; }
@media (max-width: 43.99rem) {
  .sb--hero .sb__stage { display: grid; gap: var(--s4); order: 1; }
  .sb--hero .sb__barwrap { position: sticky; top: calc(4.25rem + 1px); z-index: 5; margin-inline: calc(var(--gutter) * -1); padding: .55rem var(--gutter) .65rem; background: rgb(5 9 20 / .8); -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4); border-bottom: 1px solid rgb(255 255 255 / .08); box-shadow: 0 18px 30px -18px rgb(0 0 0 / .9); }
  .sb--hero .sb__total { padding-bottom: var(--s2); margin-bottom: var(--s2); }
  .sb--hero .sb__flow { height: 9.25rem; }
  .sb--hero .sb__bar { height: 4.5rem; }
  .sb__mini { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem; margin-top: .45rem; }
  .sb__m { --c: var(--client); display: grid; gap: .2rem; padding: .4rem .5rem .45rem; border-radius: 10px; min-width: 0; background: color-mix(in srgb, var(--c) 10%, rgb(8 13 28 / .9)); box-shadow: inset 0 2px 0 var(--c), 0 0 22px -8px var(--c); }
  .sb__m--pro { --c: var(--pro); } .sb__m--yr { --c: var(--flare-hi); }
  .sb__m small { font-family: var(--font-mono); font-size: .625rem; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sb__m b { font-weight: 600; font-size: clamp(.9375rem, 4.5vw, 1.25rem); letter-spacing: -.03em; line-height: 1; color: var(--c); font-variant-numeric: tabular-nums; white-space: nowrap; text-shadow: 0 0 18px color-mix(in srgb, var(--c) 55%, transparent); }
  /* keyboard open / very low viewports: drop the canvas from the sticky block, keep the numbers */
  .sb--hero .sb__stage:has(input[type="number"]:focus) .sb__flow { display: none; }
  .sb--hero .sb__controls { scroll-margin-top: 12rem; }
  .sb--hero .sb__figs { gap: var(--s3); }
  .sb--hero .sb__figs > div { padding: var(--s4); }
  .sb__toggles .check { min-height: 2.75rem; }
}
@media (max-width: 43.99rem) and (max-height: 34rem) { .sb--hero .sb__flow, .sb--flow.sb--hero .sb__flow { display: none; } }
@media (scripting: none) { .sb--hero .sb__barwrap { position: static; } }

.sb--compact { gap: var(--s5); }
.sb--compact .sb__bar { height: 3.5rem; }
.sb--compact .sb__seg b { font-size: 1.25rem; }
.sb--compact .sb__seg--yr b { font-size: .9375rem; }
.sb--compact .sb__controls { grid-template-columns: 1fr; }
.sb--compact .sb__figs { grid-template-columns: 1fr; gap: var(--s3); margin-top: var(--s5); }
.sb--compact .sb__figs > div { padding: var(--s4); }
.sb--compact .fig { font-size: 2rem; }
.sb--compact .sb__scale { grid-template-columns: 1fr; }
.sb--compact .sb__steps { height: 4.5rem; }

/* ---------- 11. V1 compatibility for feature CSS not yet migrated --------- */
/* admin.css paints var(--paper) text on var(--ink); both are dark now. Remove when admin.css uses --fg/--bg. */
body .adm-bar { color: var(--fg); border-bottom: 1px solid var(--line-soft); }
body .adm-bar__out .btn { color: var(--fg); border-color: var(--edge); }
body .adm-bar__out .btn:hover { background: var(--fg); color: var(--ink); }
@media (max-width: 47.99rem) { .hide-sm { display: none; } }
/* Phones, site-wide baseline: no iOS focus-zoom (controls >= 16 px), 44 px disclosure rows, long words and URLs wrap,
   anchors clear the sticky header, notch / home-indicator insets. */
main summary { cursor: pointer; padding-block: .65rem; }
@media (max-width: 47.99rem) {
  main input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), main select, main textarea { font-size: max(1em, 16px); }
  main p, main li, main dd, main td, main h1, main h2, main h3 { overflow-wrap: break-word; }
  main a[href^="http"], main a[href^="mailto:"] { overflow-wrap: anywhere; }
}
@supports (padding: env(safe-area-inset-left)) {
  .wrap { padding-left: max(var(--gutter), env(safe-area-inset-left)); padding-right: max(var(--gutter), env(safe-area-inset-right)); }
  .site-footer { padding-bottom: env(safe-area-inset-bottom); }
}

/* ---------- 12. Motion & print ------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; }
}
@media print {
  :root { --bg: #fff; --fg: #000; --fg-muted: #444; --line: #000; --line-soft: #bbb; --panel: #fff; --sea-2: #fff; --sea-3: #fff; --surface: #fff; --pro: #000; --flare-hi: #000; --client: #000; --haze: #444; --mist: #444; color-scheme: light; }
  .site-header, .site-footer, .nav-btn, .sb__controls, .world, .sb__flow { display: none !important; }
  html, body { background: #fff !important; color: #000; }
  * { box-shadow: none !important; text-shadow: none !important; }
}
/* the server's built-in error / 404 body (yr/server.py: <section class='page-head'>) had no gutter on phones */
.page-head { max-width: var(--maxw); margin-inline: auto; padding: var(--section) var(--gutter); }
.page-head h1 { margin-bottom: var(--s4); }

/* Open Rate Index: the empty index (no band published yet) - one block, not fifteen empty rows. */
.ri-list--none { display: grid; gap: .6rem; justify-items: start; padding: clamp(1.25rem, 1rem + 2vw, 2.25rem); border: 1px dashed var(--edge); border-radius: var(--r-lg); background: linear-gradient(180deg, rgb(255 255 255 / .03), transparent); }
.ri-none__k { margin: 0; font-family: var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--fg-dim); }
.ri-none__t { margin: 0; font-size: clamp(1.15rem, 1rem + .9vw, 1.6rem); line-height: 1.25; color: var(--fg); }
.ri-none__s { margin: 0; max-width: 46rem; color: var(--fg-muted); font-size: var(--fs-small); line-height: 1.55; }
.ri-list--none .cluster { margin-top: .4rem; }

/* Plain lists of Radar item links (home, sector pages): crawlable internal links, no motion. */
.rd-links { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: .1rem; }
.rd-links a { display: grid; gap: .1rem; padding: .65rem .9rem; border: 1px solid transparent; border-radius: var(--r-md, .8rem); text-decoration: none; color: var(--fg-muted); transition: border-color .2s, background .2s; }
.rd-links a:hover { border-color: var(--edge); background: rgb(255 255 255 / .03); }
.rd-links span { font: 500 .6875rem/1.3 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--fg-dim); }
.rd-links b { font-weight: 500; color: var(--fg); line-height: 1.35; }
