/* ==========================================================================
   Sham Valley Apricot — Draft template v2
   Component language: shadcn / 21st.dev patterns, rebuilt without a framework.
   Motion: Emil Kowalski's rules — UI under 300ms, strong ease-out, press = scale(.97),
   hover gated to fine pointers, reduced motion keeps opacity only.
   Colour: four client theme sets (color_theme_sets.pdf), switchable at runtime.
   ========================================================================== */

/* ---------- theme sets ---------- */
:root, [data-theme="earth"] {           /* Set 4 — Warm Beige, Teal & Burnt Terracotta (default) */
  --bg: #f6f0e9; --surface: #fffcf8; --surface-2: #ede3d8; --border: #e0d3c4; --border-strong: #cdbba8;
  --fg: #241a14; --fg-muted: #6a5a4d;
  --primary: #27787c; --primary-fg: #ffffff; --primary-ink: #1f6669;
  --accent: #874625; --accent-fg: #ffffff; --accent-ink: #874625; --accent-soft: #f1e0d3;
  --tint: #d0baa6;
  --band: #163f41; --band-fg: #f3ece4; --band-muted: #b9cfcc; --band-border: rgba(243, 236, 228, .16);
  --c1: #b4572a; --c2: #008f93; --c3: #9c7b1c;
  --shadow: 0 1px 2px rgba(36, 26, 20, .05), 0 8px 24px -12px rgba(36, 26, 20, .14);
  color-scheme: light;
}
[data-theme="aubergine"] {              /* Set 2 — Ice Silver, Deep Aubergine & Marigold */
  --bg: #f2f4f7; --surface: #ffffff; --surface-2: #dde3e8; --border: #d4dbe2; --border-strong: #b9c3cc;
  --fg: #22091f; --fg-muted: #5c5060;
  --primary: #3a0f34; --primary-fg: #ffffff; --primary-ink: #6e2a66;
  --accent: #eaaa00; --accent-fg: #22091f; --accent-ink: #8a6100; --accent-soft: #fbefcc;
  --tint: #dde3e8;
  --band: #3a0f34; --band-fg: #f2f4f7; --band-muted: #cdb8c9; --band-border: rgba(242, 244, 247, .16);
  --c1: #b57f00; --c2: #8e3a84; --c3: #2f79c2;
  --shadow: 0 1px 2px rgba(34, 9, 31, .05), 0 8px 24px -12px rgba(34, 9, 31, .16);
  color-scheme: light;
}
[data-theme="mocha"] {                  /* Set 3 — Mocha Brown, Platinum Silver & Pale Lavender */
  --bg: #f4f3f1; --surface: #ffffff; --surface-2: #e5e4e2; --border: #dcdad6; --border-strong: #c4c1bb;
  --fg: #2a1f17; --fg-muted: #675a50;
  --primary: #6f4e37; --primary-fg: #ffffff; --primary-ink: #6f4e37;
  --accent: #e6e0f0; --accent-fg: #2a1f17; --accent-ink: #5f4e8a; --accent-soft: #e6e0f0;
  --tint: #e6e0f0;
  --band: #3b2a1f; --band-fg: #f4f3f1; --band-muted: #cfc4d9; --band-border: rgba(244, 243, 241, .16);
  --c1: #a5622b; --c2: #7f62c9; --c3: #1f9480;
  --shadow: 0 1px 2px rgba(42, 31, 23, .05), 0 8px 24px -12px rgba(42, 31, 23, .14);
  color-scheme: light;
}
[data-theme="noir"] {                   /* Set 1 — Jet Black, Cerulean Blue & Neon Rose */
  --bg: #0a0a0a; --surface: #131313; --surface-2: #1c1c1c; --border: #262626; --border-strong: #3a3a3a;
  --fg: #f4f4f4; --fg-muted: #a3a3a3;
  --primary: #007ba7; --primary-fg: #ffffff; --primary-ink: #4db6e0;
  --accent: #ff2d95; --accent-fg: #0a0a0a; --accent-ink: #ff5aae; --accent-soft: #3a0f24;
  --tint: #1c1c1c;
  --band: #06222e; --band-fg: #f4f4f4; --band-muted: #9db9c6; --band-border: rgba(244, 244, 244, .14);
  --c1: #2a8fc4; --c2: #f0368f; --c3: #a88324;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px -12px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

:root {
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --fs-xs: .75rem; --fs-sm: .875rem; --fs-base: 1rem; --fs-lg: 1.125rem;
  --fs-h3: 1.125rem;
  --fs-h2: clamp(1.75rem, 1.2rem + 1.6vw, 2.375rem);
  --fs-h1: clamp(2.25rem, 1.4rem + 3vw, 3.5rem);

  --r-sm: 8px; --r: 12px; --r-lg: 16px; --r-xl: 24px;
  --max: 1440px;
  --gutter: clamp(16px, 4vw, 56px);
  --section: clamp(40px, 4.5vw, 64px);

  /* Emil Kowalski's curves */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--font); font-size: var(--fs-base); line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  transition: background-color 200ms ease, color 200ms ease;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; text-wrap: balance; }
h1 { font-size: var(--fs-h1); letter-spacing: -.035em; line-height: 1.08; }
h2 { font-size: var(--fs-h2); letter-spacing: -.03em; }
h3 { font-size: var(--fs-h3); letter-spacing: -.01em; }
h4 { font-size: var(--fs-base); letter-spacing: -.005em; }
:focus-visible { outline: 2px solid var(--primary-ink); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--primary); color: var(--primary-fg); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 300; background: var(--fg); color: var(--bg); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }

.container { width: 100%; max-width: calc(var(--max) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }
.section-sm { padding-block: calc(var(--section) * .6); }
.muted { color: var(--fg-muted); }
.text-sm { font-size: var(--fs-sm); }
.text-xs { font-size: var(--fs-xs); }
.mono { font-family: var(--mono); }
.lead { font-size: var(--fs-lg); color: var(--fg-muted); line-height: 1.6; max-width: 60ch; }
.ink { color: var(--primary-ink); }
.stack-sm > * + * { margin-top: 8px; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 24px; } .mt-6 { margin-top: 32px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .sm-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .md-2 { grid-template-columns: repeat(2, 1fr); } .md-3 { grid-template-columns: repeat(3, 1fr); } .md-4 { grid-template-columns: repeat(4, 1fr); } }

/* ---------- section heading ---------- */
.sh { display: grid; gap: 10px; margin-bottom: 24px; max-width: 640px; }
.sh.center { margin-inline: auto; text-align: center; justify-items: center; }
.sh p { margin: 0; color: var(--fg-muted); font-size: var(--fs-lg); }
.sh-split { display: grid; gap: 12px; margin-bottom: 24px; align-items: end; }
@media (min-width: 900px) { .sh-split { grid-template-columns: 1fr 1fr; gap: 48px; } }
.sh-split p { margin: 0; color: var(--fg-muted); }

/* ---------- badge ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px;
  font-size: var(--fs-xs); font-weight: 500; border: 1px solid var(--border); background: var(--surface); color: var(--fg-muted);
  white-space: nowrap;
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--primary-ink); }
.badge--accent { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }
.badge--solid { background: var(--primary); color: var(--primary-fg); border-color: transparent; }
.badge-link { transition: border-color 200ms ease, background-color 200ms ease; }
.badge-link svg { width: 14px; height: 14px; }
@media (hover: hover) and (pointer: fine) { .badge-link:hover { border-color: var(--border-strong); background: var(--surface-2); } }

/* ---------- icons ---------- */
.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.icon-tile { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--primary-ink); border: 1px solid var(--border); }
.icon-tile .i { width: 20px; height: 20px; }

/* ---------- buttons (press = scale .97, 160ms) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 10px;
  font-size: var(--fs-sm); font-weight: 500; white-space: nowrap; border: 1px solid transparent;
  background: var(--primary); color: var(--primary-fg);
  transition: transform 160ms var(--ease-out), background-color 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}
.btn:active { transform: scale(.97); }
.btn .i { width: 16px; height: 16px; transition: transform 200ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: color-mix(in srgb, var(--primary) 88%, var(--fg)); }
  .btn:hover .i-arrow { transform: translateX(2px); }
}
.btn-lg { height: 44px; padding: 0 20px; font-size: var(--fs-base); }
.btn-sm { height: 34px; padding: 0 12px; border-radius: 8px; }
.btn-outline { background: var(--surface); color: var(--fg); border-color: var(--border); box-shadow: 0 1px 2px rgba(0,0,0,.04); }
@media (hover: hover) and (pointer: fine) { .btn-outline:hover { background: var(--surface-2); border-color: var(--border-strong); } }
.btn-ghost { background: transparent; color: var(--fg); }
@media (hover: hover) and (pointer: fine) { .btn-ghost:hover { background: var(--surface-2); } }
.btn-accent { background: var(--accent); color: var(--accent-fg); }
@media (hover: hover) and (pointer: fine) { .btn-accent:hover { background: color-mix(in srgb, var(--accent) 88%, var(--fg)); } }
.btn-icon { width: 40px; padding: 0; }
.link { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); font-weight: 500; color: var(--primary-ink); }
.link .i { width: 16px; height: 16px; transition: transform 200ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .link:hover .i { transform: translateX(2px); } .link:hover { text-decoration: underline; text-underline-offset: 4px; } }

/* ---------- card ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 24px; box-shadow: var(--shadow); }
.card-flat { box-shadow: none; }
.card h3 { margin-bottom: 6px; }
.card p { color: var(--fg-muted); font-size: var(--fs-sm); margin: 0; }

/* ==========================================================================
   Navbar — floating pill (21st.dev "Navigation Menus")
   ========================================================================== */
.nav-wrap { position: fixed; top: 12px; left: 0; right: 0; z-index: 80; padding-inline: 12px; pointer-events: none; }
.nav {
  pointer-events: auto; max-width: 1080px; margin-inline: auto; height: 56px; padding: 0 8px 0 12px; border-radius: 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: color-mix(in srgb, var(--surface) 82%, transparent); border: 1px solid var(--border);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  box-shadow: var(--shadow); transition: box-shadow 200ms ease;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: var(--fs-sm); letter-spacing: -.01em; }
.logo img { width: 32px; height: 32px; border-radius: 50%; background: #fff; border: 1px solid var(--border); }
.logo small { display: block; font-weight: 400; font-size: var(--fs-xs); color: var(--fg-muted); margin-top: 1px; }
.nav-links { display: none; list-style: none; margin: 0; padding: 0; gap: 2px; position: relative; }
.nav-links a { position: relative; z-index: 1; display: block; padding: 6px 12px; border-radius: 8px; font-size: var(--fs-sm); color: var(--fg-muted); transition: color 200ms ease; }
.nav-links a[aria-current="page"] { color: var(--fg); font-weight: 500; }
.nav-hover { position: absolute; top: 0; left: 0; height: 100%; border-radius: 8px; background: var(--surface-2); opacity: 0; transition: transform 250ms var(--ease-out), width 250ms var(--ease-out), opacity 150ms ease; pointer-events: none; }
@media (hover: hover) and (pointer: fine) { .nav-links a:hover { color: var(--fg); } }
.nav-right { display: flex; align-items: center; gap: 6px; }
.nav-cta { display: none; }
@media (min-width: 1040px) { .nav-links, .nav-cta { display: flex; } .nav-menu { display: none; } }

/* theme popover — origin-aware, 200ms */
.theme-pop { position: relative; }
.popover {
  position: absolute; right: 0; top: calc(100% + 8px); width: 300px; padding: 6px; border-radius: 14px; z-index: 90;
  background: var(--surface); border: 1px solid var(--border); box-shadow: 0 12px 32px -12px rgba(0,0,0,.28);
  transform-origin: top right; opacity: 0; transform: scale(.95); visibility: hidden;
  transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out), visibility 0s 200ms;
}
.popover.is-open { opacity: 1; transform: none; visibility: visible; transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out); }
.popover-title { font-size: var(--fs-xs); color: var(--fg-muted); padding: 8px 10px 6px; }
.theme-opt { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; background: none; border-radius: 10px; text-align: left; font-size: var(--fs-sm); }
.theme-opt[aria-checked="true"] { background: var(--surface-2); }
@media (hover: hover) and (pointer: fine) { .theme-opt:hover { background: var(--surface-2); } }
.swatches { display: flex; flex: none; }
.swatches i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--surface); margin-left: -6px; }
.swatches i:first-child { margin-left: 0; }
.theme-opt small { display: block; color: var(--fg-muted); font-size: var(--fs-xs); }
.theme-opt .tick { margin-left: auto; opacity: 0; color: var(--primary-ink); }
.theme-opt[aria-checked="true"] .tick { opacity: 1; }

/* mobile drawer — Vaul-style sheet from the right */
.sheet-backdrop { position: fixed; inset: 0; z-index: 95; background: rgba(0,0,0,.4); opacity: 0; visibility: hidden; transition: opacity 300ms var(--ease-out), visibility 0s 300ms; }
.sheet { position: fixed; top: 0; right: 0; bottom: 0; z-index: 96; width: min(86vw, 360px); background: var(--surface); border-left: 1px solid var(--border); padding: 16px; display: flex; flex-direction: column; gap: 8px; transform: translateX(100%); transition: transform 450ms var(--ease-drawer); }
.sheet-open .sheet-backdrop { opacity: 1; visibility: visible; transition: opacity 300ms var(--ease-out); }
.sheet-open .sheet { transform: none; }
.sheet-open { overflow: hidden; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.sheet nav a { display: flex; align-items: center; justify-content: space-between; padding: 12px; border-radius: 10px; font-weight: 500; }
.sheet nav a[aria-current="page"] { background: var(--surface-2); }
.sheet .btn { margin-top: auto; }

/* ==========================================================================
   Hero — "Animated hero" pattern
   ========================================================================== */
.hero { position: relative; padding: 152px 0 72px; overflow: hidden; }
.bg-grid {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 44px 44px; opacity: .55;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 30%, transparent 75%);
}
.hero-inner { display: grid; justify-items: center; text-align: center; gap: 20px; }
.hero h1 { max-width: 16ch; }
.rotator { display: inline-grid; vertical-align: bottom; overflow: hidden; color: var(--primary-ink); padding-bottom: .08em; margin-bottom: -.08em; }
.rotator span { grid-area: 1 / 1; transition: transform 500ms var(--ease-out), opacity 300ms ease, filter 300ms ease; }
.rotator span:not(.is-on) { transform: translateY(100%); opacity: 0; filter: blur(4px); }
.rotator span.is-out { transform: translateY(-100%); }
.hero .lead { margin: 0 auto; text-align: center; }
.hero-media { display: grid; gap: 12px; grid-template-columns: 1fr; margin-top: 56px; }
@media (min-width: 720px) { .hero-media { grid-template-columns: 1fr 1.2fr 1fr; align-items: end; } }
.hero-shot { position: relative; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--border); background: var(--surface-2); box-shadow: var(--shadow); }
.hero-shot img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }
@media (min-width: 720px) { .hero-shot:nth-child(2) img { aspect-ratio: 5 / 4; } }
.hero-shot figcaption { position: absolute; left: 10px; bottom: 10px; }
.hero-shot .badge { background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(8px); }

/* ---------- logo cloud marquee (linear, constant motion) ---------- */
.logos { padding: 24px 0; border-block: 1px solid var(--border); }
.logos p { text-align: center; margin: 0 0 20px; font-size: var(--fs-sm); color: var(--fg-muted); }
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee-track { display: flex; gap: 48px; width: max-content; animation: marquee 40s linear infinite; }
.marquee-track span { font-weight: 600; font-size: var(--fs-lg); color: var(--fg-muted); letter-spacing: -.01em; white-space: nowrap; }
@media (hover: hover) and (pointer: fine) { .marquee:hover .marquee-track { animation-play-state: paused; } }
@keyframes marquee { to { transform: translateX(calc(-50% - 24px)); } }

/* ==========================================================================
   Stats section with text + stat cards
   ========================================================================== */
.stats-split { display: grid; gap: 32px; align-items: center; }
@media (min-width: 960px) { .stats-split { grid-template-columns: .9fr 1.1fr; gap: 64px; } }
.stat-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 20px; display: grid; gap: 4px; align-content: start; }
.stat .top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; color: var(--fg-muted); font-size: var(--fs-sm); }
.stat .top .i { color: var(--primary-ink); }
.stat .num { font-size: clamp(1.625rem, 1.2rem + 1.2vw, 2.125rem); font-weight: 600; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat .num small { font-size: max(.55em, .75rem); font-weight: 500; color: var(--fg-muted); margin-left: 2px; }
.stat .foot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: var(--fs-xs); color: var(--fg-muted); margin-top: 6px; }
.delta { display: inline-flex; align-items: center; gap: 2px; padding: 1px 6px; border-radius: 6px; background: color-mix(in srgb, var(--c3) 16%, transparent); color: var(--fg); font-weight: 500; }
.delta .i { width: 12px; height: 12px; }
.spark { width: 100%; height: 36px; margin-top: 10px; overflow: visible; }
.spark path { fill: none; stroke: var(--primary-ink); stroke-width: 1.75; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.spark .area { fill: color-mix(in srgb, var(--primary-ink) 12%, transparent); stroke: none; }

/* ---------- partition bar (21st "Partition Bar") ---------- */
.partition { display: flex; gap: 3px; height: 10px; border-radius: 99px; overflow: hidden; }
.partition span { display: block; height: 100%; border-radius: 2px; transform-origin: left; }
.partition-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: var(--fs-sm); color: var(--fg-muted); }
.partition-legend b { color: var(--fg); font-weight: 600; font-variant-numeric: tabular-nums; margin-left: 4px; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* ==========================================================================
   Tabs — segmented control with a sliding indicator
   ========================================================================== */
.tabs { display: inline-flex; position: relative; padding: 4px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { position: relative; z-index: 1; border: 0; background: none; height: 32px; padding: 0 14px; border-radius: 8px; font-size: var(--fs-sm); font-weight: 500; color: var(--fg-muted); white-space: nowrap; transition: color 200ms ease; }
.tabs button[aria-selected="true"] { color: var(--fg); }
.tabs-ind { position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 0; border-radius: 8px; background: var(--surface); box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 0 0 1px var(--border); transition: transform 250ms var(--ease-in-out), width 250ms var(--ease-in-out); }
.tab-panel { animation: panel-in 250ms var(--ease-out); }
@keyframes panel-in { from { opacity: 0; transform: translateY(6px); } }

/* feature cards */
.feature-grid { display: grid; gap: 12px; grid-template-columns: 1fr; margin-top: 24px; }
@media (min-width: 640px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .feature-grid { grid-template-columns: repeat(3, 1fr); } }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 20px; display: grid; gap: 12px; align-content: start; }
.feature h4 { font-weight: 600; }
.feature p { margin: 0; font-size: var(--fs-sm); color: var(--fg-muted); }

/* ==========================================================================
   Stepper (value chain)
   ========================================================================== */
.stepper { display: grid; gap: 12px; margin-top: 24px; counter-reset: step; }
@media (min-width: 900px) { .stepper { grid-template-columns: repeat(4, 1fr); } }
.step { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; display: flex; flex-direction: column; }
.step img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-bottom: 1px solid var(--border); }
.step-body { padding: 16px; display: grid; gap: 6px; }
.step-num { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-xs); color: var(--fg-muted); font-family: var(--mono); }
.step-num b { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: var(--primary-fg); font-weight: 500; font-family: var(--font); }
.step p { margin: 0; font-size: var(--fs-sm); color: var(--fg-muted); }
@media (min-width: 900px) {
  .step:not(:last-child)::after { content: ""; position: absolute; top: calc(50% - 1px); right: -13px; width: 14px; height: 1px; background: var(--border-strong); z-index: 2; }
}

/* ==========================================================================
   Spotlight cards (products)
   ========================================================================== */
.spot-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .spot-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .spot-grid { grid-template-columns: repeat(4, 1fr); } }
.spot {
  position: relative; isolation: isolate; overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 12px 12px 18px; display: flex; flex-direction: column; gap: 12px; text-align: left; width: 100%;
  transition: transform 160ms var(--ease-out), border-color 200ms ease;
}
.spot::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity 200ms ease;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--primary-ink) 14%, transparent), transparent 70%); }
@media (hover: hover) and (pointer: fine) { .spot:hover::before { opacity: 1; } .spot:hover { border-color: var(--border-strong); } }
button.spot:active { transform: scale(.98); }
.spot-img { aspect-ratio: 1; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; }
.spot-img img { width: 72%; height: 78%; object-fit: contain; }
.spot-img.cover img { width: 100%; height: 100%; object-fit: cover; }
.spot-body { padding: 0 6px; display: grid; gap: 6px; }
.spot-body p { margin: 0; font-size: var(--fs-sm); color: var(--fg-muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: var(--fs-xs); padding: 2px 8px; border-radius: 6px; background: var(--surface-2); color: var(--fg-muted); border: 1px solid var(--border); font-variant-numeric: tabular-nums; }

/* ==========================================================================
   Charts (charts.js renders SVG; colours from theme tokens)
   ========================================================================== */
.chart-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 20px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.chart-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 12px; }
.chart-card h3 { font-size: var(--fs-base); }
.chart-card .sub { font-size: var(--fs-sm); color: var(--fg-muted); margin-top: 2px; }
.chart-hero { font-size: 1.5rem; font-weight: 600; letter-spacing: -.03em; text-align: right; line-height: 1.1; font-variant-numeric: tabular-nums; }
.chart-hero small { display: block; font-size: var(--fs-xs); font-weight: 400; color: var(--fg-muted); letter-spacing: 0; margin-top: 4px; }
.chart { position: relative; width: 100%; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid line { stroke: var(--border); stroke-dasharray: 2 4; }
.chart .axis text { fill: var(--fg-muted); font-size: 11px; font-family: var(--mono); }
.chart .val { fill: var(--fg); font-size: 11px; font-weight: 500; font-family: var(--mono); }
.chart .hit { fill: transparent; cursor: crosshair; }
.chart.is-hovering .bar:not(.is-hover) { opacity: .45; }
.chart .bar { transition: opacity 150ms ease; }
.chart .xhair { stroke: var(--fg-muted); stroke-dasharray: 3 3; opacity: 0; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: var(--fs-sm); color: var(--fg-muted); }
.chart-legend .sw, .tooltip .sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.table-toggle { align-self: flex-start; border: 0; background: none; padding: 4px 0; font-size: var(--fs-sm); font-weight: 500; color: var(--primary-ink); }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.data-table th, .data-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: right; }
.data-table th:first-child, .data-table td:first-child { text-align: left; }
.data-table th { font-weight: 500; color: var(--fg-muted); font-size: var(--fs-xs); }
.tooltip { position: fixed; z-index: 150; pointer-events: none; background: var(--fg); color: var(--bg); border-radius: 10px; padding: 8px 10px; font-size: var(--fs-xs); line-height: 1.5; min-width: 120px; opacity: 0; transform: translate(-50%, calc(-100% - 10px)) scale(.97); transform-origin: bottom center; transition: opacity 125ms var(--ease-out), transform 125ms var(--ease-out); font-variant-numeric: tabular-nums; }
.tooltip.is-on { opacity: 1; transform: translate(-50%, calc(-100% - 10px)); }
.tooltip b { display: block; font-weight: 600; margin-bottom: 2px; }
.tooltip .row { display: flex; justify-content: space-between; gap: 12px; }
.chart-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 960px) { .chart-grid { grid-template-columns: 1fr 1fr; } .chart-card.wide { grid-column: span 2; } }
.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); gap: 2px; }
.seg button { border: 0; background: none; height: 28px; padding: 0 10px; border-radius: 7px; font-size: var(--fs-xs); font-weight: 500; color: var(--fg-muted); transition: background-color 200ms ease, color 200ms ease; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--fg); box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 0 0 1px var(--border); }
.donut-wrap { display: grid; gap: 20px; align-items: center; }
@media (min-width: 560px) { .donut-wrap { grid-template-columns: 200px 1fr; gap: 32px; } }
.donut-center { font-family: var(--font); font-weight: 600; font-size: 34px; fill: var(--fg); letter-spacing: -.03em; }
.donut-center-sub { font-family: var(--font); font-size: 10px; fill: var(--fg-muted); }
.mix-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.mix-list li { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; font-size: var(--fs-sm); }
.mix-list b { font-variant-numeric: tabular-nums; font-weight: 600; }
.mix-list .bar-bg { grid-column: 1 / -1; height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.mix-list .bar-fill { height: 100%; border-radius: 99px; transform-origin: left; transition: transform 600ms var(--ease-out); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; }

/* ==========================================================================
   Feature with image / media rows
   ========================================================================== */
.media-row { display: grid; gap: 32px; align-items: center; }
@media (min-width: 960px) { .media-row { grid-template-columns: 1fr 1fr; gap: 64px; } .media-row.flip > :first-child { order: 2; } }
.media { border-radius: var(--r-xl); overflow: hidden; border: 1px solid var(--border); background: var(--surface-2); box-shadow: var(--shadow); }
.media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }
.checklist { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 10px; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; font-size: var(--fs-sm); }
.checklist .i { width: 18px; height: 18px; color: var(--primary-ink); margin-top: 2px; }

/* ---------- recognition rows ---------- */
.rec { display: grid; gap: 0; grid-template-columns: 1fr; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
@media (min-width: 560px) { .rec { grid-template-columns: 180px 1fr; } }
.rec img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }
@media (min-width: 560px) { .rec img { aspect-ratio: auto; min-height: 160px; } }
.rec-body { padding: 20px; display: grid; gap: 8px; align-content: center; }
.rec-body p { margin: 0; font-size: var(--fs-sm); color: var(--fg-muted); }

/* ---------- CTA band ---------- */
.cta { position: relative; overflow: hidden; border-radius: var(--r-xl); background: var(--band); color: var(--band-fg); padding: clamp(32px, 5vw, 56px); display: grid; gap: 24px; align-items: center; }
@media (min-width: 900px) { .cta { grid-template-columns: 1fr auto; } }
.cta p { margin: 8px 0 0; color: var(--band-muted); max-width: 52ch; }
.cta .bg-dots { position: absolute; inset: 0; pointer-events: none; opacity: .5; background-image: radial-gradient(var(--band-border) 1px, transparent 1px); background-size: 18px 18px; -webkit-mask-image: linear-gradient(90deg, transparent, #000); mask-image: linear-gradient(90deg, transparent, #000); }
.cta > * { position: relative; }
.cta .btn-outline { background: transparent; color: var(--band-fg); border-color: var(--band-border); }
@media (hover: hover) and (pointer: fine) { .cta .btn-outline:hover { background: rgba(255,255,255,.08); } }
.cta .btn-light { background: var(--band-fg); color: var(--band); }
@media (hover: hover) and (pointer: fine) { .cta .btn-light:hover { background: color-mix(in srgb, var(--band-fg) 88%, var(--band)); } }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 40px 0 20px; }
.footer-grid { display: grid; gap: 32px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; } }
.footer h4 { font-size: var(--fs-sm); margin-bottom: 12px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: var(--fs-sm); color: var(--fg-muted); }
@media (hover: hover) and (pointer: fine) { .footer a:hover { color: var(--fg); } }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--border); font-size: var(--fs-xs); color: var(--fg-muted); }

/* ==========================================================================
   Page header (inner pages)
   ========================================================================== */
.page-head { position: relative; padding: 108px 0 28px; overflow: hidden; border-bottom: 1px solid var(--border); }
.page-head .crumbs { display: flex; gap: 6px; align-items: center; font-size: var(--fs-sm); color: var(--fg-muted); margin-bottom: 16px; }
.page-head .crumbs .i { width: 14px; height: 14px; }
.page-head h1 { font-size: clamp(2rem, 1.3rem + 2.4vw, 3rem); max-width: 20ch; }
.page-head .lead { margin-top: 14px; }
.page-head .row { margin-top: 24px; }

/* ---------- KPI row ---------- */
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 960px) { .kpis { grid-template-columns: repeat(4, 1fr); } }

/* ---------- progress meter ---------- */
.meter-row { display: flex; justify-content: space-between; font-size: var(--fs-sm); margin-bottom: 8px; }
.meter-row b { font-variant-numeric: tabular-nums; }
.meter { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 99px; background: var(--primary); transform-origin: left; transition: transform 600ms var(--ease-out); }
.hbars { display: grid; gap: 14px; }
.hbar .meter-row span { color: var(--fg-muted); }

/* ---------- accordion (21st "Accordions") ---------- */
.accordion { border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; }
.acc-item + .acc-item { border-top: 1px solid var(--border); }
.acc-trigger { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; border: 0; background: none; text-align: left; font-weight: 500; }
.acc-trigger .lhs { display: flex; align-items: center; gap: 12px; }
.acc-trigger .chev { color: var(--fg-muted); transition: transform 200ms var(--ease-out); }
.acc-trigger[aria-expanded="true"] .chev { transform: rotate(180deg); }
@media (hover: hover) and (pointer: fine) { .acc-trigger:hover { background: color-mix(in srgb, var(--surface-2) 50%, transparent); } }
.acc-panel { overflow: hidden; height: 0; transition: height 200ms var(--ease-out), opacity 200ms var(--ease-out); opacity: 0; }
.acc-item.is-open .acc-panel { opacity: 1; }
.acc-content { padding: 0 20px 20px 72px; color: var(--fg-muted); font-size: var(--fs-sm); }
.acc-content ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.acc-content li { display: flex; gap: 8px; }
.acc-content li .i { width: 16px; height: 16px; color: var(--primary-ink); margin-top: 3px; }
@media (max-width: 560px) { .acc-content { padding-left: 20px; } }

/* ---------- org tree ---------- */
.tree { display: grid; justify-items: center; gap: 0; }
.tree-node { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 16px; text-align: center; min-width: 180px; box-shadow: var(--shadow); }
.tree-node b { display: block; font-size: var(--fs-sm); }
.tree-node span { font-size: var(--fs-xs); color: var(--fg-muted); }
.tree-node.root { background: var(--primary); color: var(--primary-fg); border-color: transparent; }
.tree-node.root span { color: var(--primary-fg); }
.tree-line { width: 1px; height: 24px; background: var(--border-strong); }
.tree-row { display: flex; gap: 12px; position: relative; padding-top: 24px; flex-wrap: wrap; justify-content: center; }
.tree-row::before { content: ""; position: absolute; top: 0; left: 15%; right: 15%; height: 1px; background: var(--border-strong); }
.tree-row > div { position: relative; }
.tree-row > div::before { content: ""; position: absolute; top: -24px; left: 50%; width: 1px; height: 24px; background: var(--border-strong); }
.tree-row .tree-node { min-width: 120px; padding: 10px 12px; box-shadow: none; }

/* ---------- how-it-works steps ---------- */
.how { display: grid; gap: 12px; grid-template-columns: 1fr; counter-reset: h; }
@media (min-width: 860px) { .how { grid-template-columns: repeat(3, 1fr); } }
.how > div { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 20px; display: grid; gap: 8px; }
.how .n { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-size: var(--fs-sm); font-weight: 600; background: var(--accent-soft); color: var(--accent-ink); }
.how p { margin: 0; font-size: var(--fs-sm); color: var(--fg-muted); }

/* ---------- vertical process timeline ---------- */
.ptl { list-style: none; margin: 0; padding: 0; position: relative; }
.ptl::before { content: ""; position: absolute; left: 19px; top: 8px; bottom: 8px; width: 1px; background: var(--border-strong); }
.ptl li { position: relative; display: grid; gap: 16px; padding: 0 0 24px 56px; }
.ptl li:last-child { padding-bottom: 0; }
@media (min-width: 720px) { .ptl li { grid-template-columns: 1fr 200px; align-items: start; } }
.ptl .node { position: absolute; left: 0; top: 0; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--border); color: var(--primary-ink); z-index: 1; }
.ptl h4 { font-weight: 600; }
.ptl .k { font-size: var(--fs-xs); color: var(--fg-muted); font-family: var(--mono); }
.ptl p { margin: 6px 0 0; font-size: var(--fs-sm); color: var(--fg-muted); }
.ptl img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); }

/* ---------- scroll timeline (Manu Arora "Timeline") ---------- */
.stl { position: relative; }
.stl-rail { position: absolute; left: 15px; top: 0; bottom: 0; width: 2px; background: var(--border); border-radius: 2px; overflow: hidden; }
@media (min-width: 860px) { .stl-rail { left: 175px; } }
.stl-rail i { position: absolute; inset: 0; transform-origin: top; transform: scaleY(0); background: linear-gradient(var(--primary-ink), var(--accent-ink)); }
.stl-item { position: relative; display: grid; gap: 8px; padding: 0 0 24px 44px; }
@media (min-width: 860px) { .stl-item { grid-template-columns: 160px 1fr; gap: 48px; padding-left: 0; } }
.stl-year { position: relative; font-size: 1.375rem; font-weight: 600; letter-spacing: -.03em; color: var(--fg-muted); font-variant-numeric: tabular-nums; transition: color 200ms ease; }
@media (min-width: 860px) { .stl-year { position: sticky; top: 112px; align-self: start; text-align: right; } }
.stl-item::before { content: ""; position: absolute; left: 10px; top: 8px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--border-strong); z-index: 1; transition: border-color 200ms ease, background-color 200ms ease; }
@media (min-width: 860px) { .stl-item::before { left: 170px; } }
.stl-item.is-on .stl-year { color: var(--fg); }
.stl-item.is-on::before { border-color: var(--primary-ink); background: var(--primary-ink); }
.stl-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 20px; }
@media (min-width: 860px) { .stl-card { margin-left: 24px; } }
.stl-card p { margin: 6px 0 0; font-size: var(--fs-sm); color: var(--fg-muted); }
.stl-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.stl-metrics div { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; }
.stl-metrics span { font-size: var(--fs-xs); color: var(--fg-muted); display: block; }
.stl-metrics b { font-size: var(--fs-lg); font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

/* ---------- roadmap columns ---------- */
.roadmap { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .roadmap { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .roadmap { grid-template-columns: repeat(4, 1fr); } }
.phase { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.phase-head { display: flex; justify-content: space-between; align-items: center; }
.phase h3 { font-size: var(--fs-lg); }
.phase .tag { font-size: var(--fs-sm); color: var(--fg-muted); margin-top: -8px; }
.phase dl { margin: 0; display: grid; gap: 10px; font-size: var(--fs-sm); }
.phase dt { font-size: var(--fs-xs); color: var(--fg-muted); }
.phase dd { margin: 2px 0 0; }
.phase.is-current { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 14%, transparent); }

/* ---------- dialog (modal — centered, scale .96, 250ms) ---------- */
dialog.modal { padding: 0; border: 1px solid var(--border); border-radius: var(--r-xl); background: var(--surface); color: var(--fg); width: min(92vw, 720px); max-height: 88vh; box-shadow: 0 24px 64px -16px rgba(0,0,0,.35); opacity: 0; transform: scale(.96); transition: opacity 250ms var(--ease-out), transform 250ms var(--ease-out), overlay 250ms allow-discrete, display 250ms allow-discrete; }
dialog.modal[open] { opacity: 1; transform: none; }
@starting-style { dialog.modal[open] { opacity: 0; transform: scale(.96); } }
dialog.modal::backdrop { background: rgba(0,0,0,0); transition: background-color 250ms var(--ease-out), overlay 250ms allow-discrete, display 250ms allow-discrete; }
dialog.modal[open]::backdrop { background: rgba(0,0,0,.45); }
@starting-style { dialog.modal[open]::backdrop { background: rgba(0,0,0,0); } }
.modal-grid { display: grid; grid-template-columns: 1fr; }
@media (min-width: 640px) { .modal-grid { grid-template-columns: 1fr 1.1fr; } }
.modal-img { background: var(--surface-2); display: grid; place-items: center; min-height: 240px; }
.modal-img img { width: 70%; max-height: 320px; object-fit: contain; }
.modal-img.cover img { width: 100%; height: 100%; max-height: none; object-fit: cover; }
.modal-body { padding: 24px; display: grid; gap: 12px; align-content: start; }
.modal-close { position: absolute; top: 12px; right: 12px; z-index: 2; }
.spec { margin: 4px 0 0; display: grid; font-size: var(--fs-sm); border-top: 1px solid var(--border); }
.spec div { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.spec dt { color: var(--fg-muted); }
.spec dd { margin: 0; }
dialog.lightbox { padding: 0; border: 0; background: transparent; max-width: 92vw; max-height: 92vh; opacity: 0; transform: scale(.96); transition: opacity 250ms var(--ease-out), transform 250ms var(--ease-out), overlay 250ms allow-discrete, display 250ms allow-discrete; }
dialog.lightbox[open] { opacity: 1; transform: none; }
@starting-style { dialog.lightbox[open] { opacity: 0; transform: scale(.96); } }
dialog.lightbox::backdrop { background: rgba(0,0,0,.7); }
dialog.lightbox img { max-height: 86vh; width: auto; border-radius: 12px; }
.letters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.letter { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: #fff; padding: 0; transition: transform 160ms var(--ease-out), box-shadow 200ms ease; }
.letter:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) { .letter:hover { box-shadow: var(--shadow); } }
.letter img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: top; }

/* ---------- form ---------- */
.form { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .form { grid-template-columns: 1fr 1fr; } .form .full { grid-column: 1 / -1; } }
.field { display: grid; gap: 6px; }
.field label, .field legend { font-size: var(--fs-sm); font-weight: 500; padding: 0; }
.field .hint { font-size: var(--fs-xs); color: var(--fg-muted); font-weight: 400; }
.input { width: 100%; height: 40px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--fg); padding: 0 12px; font: inherit; font-size: var(--fs-sm); transition: border-color 150ms ease, box-shadow 150ms ease; }
textarea.input { height: auto; min-height: 112px; padding: 10px 12px; resize: vertical; }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 34px; }
.input::placeholder { color: var(--fg-muted); }
.input:focus { outline: none; border-color: var(--primary-ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
.field .err { display: none; font-size: var(--fs-xs); color: #c2410c; font-weight: 500; }
[data-theme="noir"] .field .err { color: #fb923c; }
.field.is-invalid .err { display: block; }
.field.is-invalid .input { border-color: #c2410c; }
fieldset.field { border: 0; margin: 0; padding: 0; }
.toggles { display: flex; flex-wrap: wrap; gap: 8px; }
.toggles label { position: relative; font-weight: 400; }
.toggles input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggles span { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); font-size: var(--fs-sm); cursor: pointer; transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, transform 160ms var(--ease-out); }
.toggles span:active { transform: scale(.97); }
.toggles input:checked + span { background: var(--primary); color: var(--primary-fg); border-color: var(--primary); }
.toggles input:focus-visible + span { outline: 2px solid var(--primary-ink); outline-offset: 2px; }
.info-list { display: grid; gap: 4px; }
.info { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 12px; }
.info .i { color: var(--primary-ink); margin-top: 2px; }
.info b { display: block; font-size: var(--fs-sm); font-weight: 500; }
.info span { font-size: var(--fs-sm); color: var(--fg-muted); }
.todo { background: var(--accent-soft); color: var(--accent-ink); border-radius: 4px; padding: 0 4px; font-family: var(--mono); font-size: var(--fs-xs); }

/* ---------- toast (Sonner-style: ease, ~400ms, enters & exits from bottom) ---------- */
.toaster { position: fixed; z-index: 200; right: 16px; bottom: 16px; display: grid; gap: 8px; width: min(92vw, 360px); }
.toast { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); box-shadow: 0 12px 32px -12px rgba(0,0,0,.3); font-size: var(--fs-sm); opacity: 1; transform: translateY(0); transition: opacity 400ms ease, transform 400ms ease; }
@starting-style { .toast { opacity: 0; transform: translateY(100%); } }
.toast.is-leaving { opacity: 0; transform: translateY(100%); transition-duration: 200ms; }
.toast .i { color: var(--primary-ink); margin-top: 2px; }
.toast b { display: block; font-weight: 500; }
.toast span { color: var(--fg-muted); }

/* ---------- scroll reveal (marketing surfaces, once) ---------- */
.js .reveal { opacity: 0; transform: translateY(8px); transition: opacity 500ms var(--ease-out), transform 500ms var(--ease-out); transition-delay: var(--d, 0ms); }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { transform: none; transition: opacity 200ms ease; }
  .marquee-track { animation: none; flex-wrap: wrap; justify-content: center; width: auto; }
  .marquee { -webkit-mask-image: none; mask-image: none; }
  .rotator span { transition: opacity 200ms ease; }
  .rotator span:not(.is-on), .rotator span.is-out { transform: none; filter: none; }
  .sheet { transition: none; }
  .tab-panel { animation: none; }
  .btn:active, .spot:active, .letter:active, .toggles span:active { transform: none; }
  dialog.modal, dialog.lightbox { transform: none !important; }
  .toast, .toast.is-leaving { transform: none; }
}

/* chart entrances — explanatory motion, once per view */
.chart .bar { transform-box: fill-box; transform-origin: 50% 100%; transform: scaleY(.02); transition: transform 600ms var(--ease-out), opacity 150ms ease; }
.chart.in .bar { transform: none; }
.chart .ln { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 900ms var(--ease-out); }
.chart.in .ln { stroke-dashoffset: 0; }
.chart .pt, .chart .val, .chart .area { opacity: 0; transition: opacity 300ms ease; }
.chart.in .pt, .chart.in .val, .chart.in .area { opacity: 1; }
.chart .val { transition-delay: 450ms; }
.reduced .chart .bar, .reduced .chart .ln { transition: none; }
.badge { width: fit-content; justify-self: start; }
.sh.center .badge, .hero-inner .badge { justify-self: center; }
.hero h1 .rotator { display: grid; justify-items: center; width: 100%; }
@media (min-width: 640px) { .stat-grid-3 { grid-template-columns: repeat(3, 1fr); } }
.stat-grid-3 .num { font-size: clamp(1.375rem, 1rem + 1vw, 1.75rem); }
.stl-metrics b { font-size: clamp(.9375rem, .8rem + .6vw, 1.125rem); white-space: nowrap; }

.h-sm { font-size: var(--fs-base); font-weight: 600; letter-spacing: -.005em; }

/* ==========================================================================
   v2.1 — parallax hero (Osmo pattern), scroll tracking, bento dashboard
   ========================================================================== */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

/* scroll progress — tracks the page */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 120; pointer-events: none; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--primary-ink), var(--accent-ink)); transform-origin: left; transform: scaleX(0); }

/* ---------- parallax header ---------- */
.px { position: relative; }
.px-visual { position: relative; height: 104svh; min-height: 600px; overflow: hidden; background: var(--band); }
.px-layers { position: absolute; inset: 0; }
.px-layer { position: absolute; left: 0; right: 0; will-change: transform; }
.px-layer--sky { top: -6%; bottom: -6%; }
.px-layer--sky img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.px-layer--sky::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,0) 30%); }
.px-layer--mid { bottom: -2%; height: 46%; }
.px-layer--front { bottom: -1px; height: 38%; }
.px-layer svg { width: 100%; height: 100%; display: block; }
.px-layer--mid path { fill: color-mix(in srgb, var(--band) 72%, transparent); }
.px-layer--front path { fill: var(--bg); }
.px-layer--title { top: 26%; display: grid; justify-items: center; text-align: center; gap: 14px; padding-inline: var(--gutter); }
.px-title { font-size: clamp(3.5rem, 12.5vw, 11.5rem); font-weight: 700; letter-spacing: -.055em; line-height: .9; color: #fff; text-shadow: 0 2px 40px rgba(0,0,0,.25); margin: 0; white-space: nowrap; }
.px-kicker { display: inline-flex; gap: 8px; align-items: center; height: 28px; padding: 0 12px; border-radius: 999px; font-size: var(--fs-xs); font-weight: 500; color: #fff; background: rgba(0,0,0,.28); border: 1px solid rgba(255,255,255,.28); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.px-fade { position: absolute; left: 0; right: 0; bottom: 0; height: 18%; background: linear-gradient(180deg, transparent, var(--bg)); pointer-events: none; }
.px-content { position: relative; z-index: 2; margin-top: -12svh; padding-bottom: 32px; }
.px-content .hero-inner { gap: 18px; }
.px-content h1 { font-size: clamp(2rem, 1.2rem + 2.6vw, 3.25rem); max-width: 18ch; }
.scroll-hint { position: absolute; left: 50%; bottom: 24%; z-index: 3; transform: translateX(-50%); display: grid; justify-items: center; gap: 6px; color: #fff; font-size: var(--fs-xs); }
.scroll-hint span { width: 22px; height: 34px; border: 1.5px solid rgba(255,255,255,.7); border-radius: 12px; position: relative; }
.scroll-hint span::after { content: ""; position: absolute; left: 50%; top: 6px; width: 3px; height: 6px; margin-left: -1.5px; border-radius: 2px; background: #fff; }
@media (max-width: 720px) { .px-visual { height: 92svh; } .px-layer--title { top: 30%; } .scroll-hint { display: none; } }

/* ---------- text reveal on scroll ---------- */
.statement { font-size: clamp(1.5rem, 1rem + 1.8vw, 2.5rem); font-weight: 600; letter-spacing: -.03em; line-height: 1.25; max-width: 30ch; margin: 0; text-wrap: pretty; }
.js .statement .w { opacity: .16; }
.statement .w.hl { color: var(--primary-ink); }
.reduced .statement .w { opacity: 1; }

/* ---------- container scroll (Aceternity pattern) ---------- */
.cscroll { perspective: 1200px; }
.cscroll-card { transform-origin: 50% 0; will-change: transform; border-radius: 28px; padding: 10px; background: color-mix(in srgb, var(--surface-2) 70%, transparent); border: 1px solid var(--border); box-shadow: 0 40px 80px -40px rgba(0,0,0,.35); }
.reduced .cscroll-card { transform: none !important; }

/* ---------- bento dashboard (web3-bento pattern, adapted) ---------- */
.bento { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 680px) { .bento { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .bento { grid-template-columns: repeat(4, 1fr); grid-auto-rows: minmax(150px, auto); } }
.tile { position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden; border-radius: 20px; border: 1px solid var(--border); background: var(--surface); padding: 20px; }
.tile-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.tile-head h3 { font-size: var(--fs-sm); font-weight: 500; color: var(--fg-muted); letter-spacing: 0; }
.tile .mono-num { font-family: var(--mono); font-weight: 600; letter-spacing: -.04em; font-variant-numeric: tabular-nums; line-height: 1; }
.pills { display: inline-flex; padding: 2px; border-radius: 999px; border: 1px solid var(--border); }
.pills button { border: 0; background: none; height: 26px; padding: 0 10px; border-radius: 999px; font-family: var(--mono); font-size: 11px; font-weight: 500; color: var(--fg-muted); transition: background-color 150ms ease, color 150ms ease; }
.pills button[aria-checked="true"] { background: var(--fg); color: var(--bg); }
@media (hover: hover) and (pointer: fine) { .pills button:not([aria-checked="true"]):hover { color: var(--fg); } }
@media (min-width: 680px) { .t-hero, .t-chart, .t-stream, .t-activity { grid-column: span 2; } }
@media (min-width: 1100px) {
  .t-hero { grid-column: 1 / span 2; grid-row: 1; }
  .t-cards { grid-column: 3; grid-row: 1; }
  .t-gauge { grid-column: 4; grid-row: 1; }
  .t-chart { grid-column: 1 / span 2; grid-row: 2 / span 2; }
  .t-alloc { grid-column: 3; grid-row: 2; }
  .t-accent { grid-column: 4; grid-row: 2 / span 2; }
  .t-profit { grid-column: 3; grid-row: 3; }
  .t-stream { grid-column: 1 / span 2; grid-row: 4; }
  .t-activity { grid-column: 3 / span 2; grid-row: 4; }
}
/* hero tile */
.t-hero .greet { font-size: clamp(1.5rem, 1.1rem + 1vw, 2rem); font-weight: 600; letter-spacing: -.03em; line-height: 1.1; }
.t-hero .greet span { color: var(--primary-ink); }
.t-hero .big { font-size: clamp(1.875rem, 1.3rem + 1.4vw, 2.5rem); }
.strip { display: flex; align-items: flex-end; gap: 6px; height: 96px; margin-top: auto; padding-top: 20px; }
.strip button { flex: 1; border: 0; padding: 0; border-radius: 6px; background: var(--primary); transform-origin: bottom; transition: opacity 200ms ease, transform 700ms var(--ease-out); }
.strip.dim button:not(.on) { opacity: .3; }
.strip-foot { display: flex; justify-content: space-between; margin-top: 8px; font-family: var(--mono); font-size: 11px; color: var(--fg-muted); }
.strip-foot b { color: var(--fg); font-weight: 500; }
/* stacked product cards */
.t-cards { padding-bottom: 0; }
.cardstack { position: relative; flex: 1; min-height: 200px; margin: 0 -20px; overflow: hidden; }
.pcard { position: absolute; left: 50%; width: calc(100% - 40px); max-width: 280px; aspect-ratio: 1.586; border: 0; padding: 0; border-radius: 14px; text-align: left; transform-origin: top center; box-shadow: 0 -10px 28px -14px rgba(0,0,0,.55); transition: top 600ms cubic-bezier(0.34, 1.35, 0.64, 1), transform 600ms cubic-bezier(0.34, 1.35, 0.64, 1); overflow: hidden; color: var(--ink); }
.pcard .face { position: absolute; inset: 0; background-image: linear-gradient(180deg, rgba(255,255,255,.28), transparent 36%), linear-gradient(135deg, var(--a), var(--b)); }
.pcard .film { position: absolute; inset: 0; mix-blend-mode: soft-light; background-image: linear-gradient(115deg, transparent 18%, rgba(255,190,220,.6) 32%, rgba(170,210,255,.6) 42%, rgba(200,255,190,.55) 52%, rgba(255,220,160,.5) 62%, transparent 78%); background-size: 260% 100%; background-position: var(--glare, 30%) 0; transition: background-position 600ms var(--ease-out); }
.pcard .row1 { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 14px 16px 0; font-weight: 600; font-size: 13px; }
.pcard .row1 span { display: flex; align-items: center; gap: 8px; }
.pcard .row1 small { font-family: var(--mono); font-weight: 500; font-size: 11px; }
.pcard .row1 img { width: 24px; height: 24px; border-radius: 50%; background: #fff; }
.cards-panel { position: relative; z-index: 9; margin: 0 -20px; padding: 14px 20px 16px; display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; background: color-mix(in srgb, var(--surface) 78%, transparent); backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3); border-top: 1px solid var(--border); }
.cards-panel b { display: block; font-family: var(--mono); font-size: 14px; font-weight: 600; }
.cards-panel span { font-size: 11px; color: var(--fg-muted); }
/* gauge */
.gauge-wrap { flex: 1; display: grid; place-items: center; text-align: center; align-content: center; }
.gauge-arc { stroke: var(--surface-2); }
.gauge-val { stroke: var(--primary); transition: stroke-dashoffset 800ms var(--ease-out); }
.gauge-needle { transition: transform 800ms var(--ease-out); transform-origin: 75px 78px; transform-box: view-box; }
.gauge-needle line { stroke: var(--fg); }
.gauge-hub { fill: var(--fg); }
/* chart tile */
.vs { display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: flex-end; }
.vs p { margin: 0; font-size: 12px; color: var(--fg-muted); display: flex; align-items: center; gap: 8px; }
.vs .key { width: 16px; height: 3px; border-radius: 3px; }
.vs .key.dash { height: 0; border-top: 2px dashed var(--c1); background: none; }
.vs .mono-num { font-size: 22px; margin-top: 4px; }
.lead-chip { margin-left: auto; padding: 4px 10px; border-radius: 999px; font-family: var(--mono); font-size: 11px; font-weight: 600; background: color-mix(in srgb, var(--primary) 14%, transparent); color: var(--primary-ink); }
.trk { position: relative; flex: 1; min-height: 220px; margin-top: 16px; touch-action: pan-y; cursor: crosshair; }
.trk svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.trk .gl { stroke: var(--border); stroke-dasharray: 1 5; }
.trk .xl { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--border-strong); transform: translateX(-50%); opacity: 0; transition: opacity 150ms ease; pointer-events: none; }
.trk .dotA, .trk .dotB { position: absolute; width: 12px; height: 12px; border-radius: 50%; border: 3px solid var(--surface); transform: translate(-50%, -50%); pointer-events: none; transition: left 120ms linear, top 120ms linear, opacity 150ms ease; }
.trk-labels { display: flex; justify-content: space-between; margin-top: 10px; font-family: var(--mono); font-size: 11px; color: var(--fg-muted); }
/* allocation */
.seg-bar { display: flex; gap: 4px; height: 34px; margin-top: 14px; }
.seg-bar span { border-radius: 8px; min-width: 6px; transition: flex-basis 900ms var(--ease-out), opacity 150ms ease; }
.alloc-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; font-size: 12px; }
.alloc-list li { display: flex; justify-content: space-between; gap: 8px; }
.alloc-list i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.alloc-list b { font-family: var(--mono); font-weight: 500; color: var(--fg-muted); }
/* accent tile */
.t-accent { background: var(--primary); color: var(--primary-fg); border-color: transparent; }
.t-accent .tile-head h3 { color: var(--primary-fg); opacity: .9; }
.t-accent .chip-on { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 999px; font-family: var(--mono); font-size: 11px; background: rgba(255,255,255,.16); }
.t-accent .chip-on::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.t-accent .huge { font-family: var(--mono); font-size: 52px; font-weight: 600; letter-spacing: -.05em; line-height: 1; margin-top: 4px; }
.t-accent .sub { font-size: 12px; margin-top: 6px; }
.t-accent .box { margin-top: 18px; padding: 12px; border-radius: 14px; background: rgba(255,255,255,.12); }
.t-accent .box .row { justify-content: space-between; font-size: 12px; font-weight: 500; gap: 8px; }
.t-accent .bar2 { height: 6px; border-radius: 99px; background: rgba(255,255,255,.22); margin-top: 8px; overflow: hidden; display: flex; gap: 2px; }
.t-accent .bar2 i { display: block; height: 100%; background: currentColor; border-radius: 99px; }
.t-accent .bar2 i + i { opacity: .55; }
.t-accent dl { margin: 14px 0 0; display: grid; gap: 6px; font-size: 12px; }
.t-accent dl div { display: flex; justify-content: space-between; gap: 8px; }
.t-accent dd { margin: 0; font-family: var(--mono); font-weight: 600; }
.t-accent .mini { display: flex; align-items: flex-end; gap: 4px; height: 56px; margin-top: auto; padding-top: 18px; }
.t-accent .mini span { flex: 1; border-radius: 4px; background: currentColor; transform-origin: bottom; }
.t-accent .mini-cap { font-family: var(--mono); font-size: 10px; margin-top: 6px; }
.t-accent .btn-on { margin-top: 16px; width: 100%; height: 44px; border-radius: 14px; background: var(--primary-fg); color: var(--primary); font-weight: 600; font-size: var(--fs-sm); display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: transform 160ms var(--ease-out); }
.t-accent .btn-on:active { transform: scale(.98); }
/* stream */
.stream { display: flex; align-items: flex-end; gap: 6px; flex: 1; min-height: 72px; margin-top: 14px; }
.stream span { flex: 1; border-radius: 4px; background: color-mix(in srgb, var(--fg-muted) 45%, transparent); transform-origin: bottom; }
.stream span.last { background: var(--c2); }
.tile dl.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--border); }
.tile dl.trio dt { font-size: 11px; color: var(--fg-muted); }
.tile dl.trio dd { margin: 2px 0 0; font-family: var(--mono); font-size: 13px; font-weight: 600; }
/* activity */
.acts { list-style: none; margin: -4px -8px; padding: 0; }
.acts li { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 14px; transition: background-color 150ms ease; }
@media (hover: hover) and (pointer: fine) { .acts li:hover { background: color-mix(in srgb, var(--surface-2) 60%, transparent); } }
.acts .ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-2); color: var(--fg); flex: none; }
.acts .ic .i { width: 16px; height: 16px; }
.acts .t { flex: 1; min-width: 0; }
.acts .t b { display: block; font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acts .t span { font-size: 11px; color: var(--fg-muted); }
.acts .r { text-align: right; font-family: var(--mono); font-size: 11px; color: var(--fg-muted); white-space: nowrap; }
.acts .r em { font-style: normal; display: block; color: var(--primary-ink); font-weight: 600; }

/* full-bleed wide container for the dashboard */
.container-wide { width: 100%; max-width: 1600px; margin-inline: auto; padding-inline: var(--gutter); }

main { overflow-x: clip; }
.t-gauge .pills button { padding: 0 8px; }
/* contrast + legibility pass */
.t-accent .box { background: rgba(0,0,0,.16); }
.t-accent .chip-on { background: rgba(0,0,0,.18); }
.t-accent .bar2 { background: rgba(0,0,0,.2); }
.t-accent .mini-cap, .strip-foot, .trk-labels, .acts .r, .acts .t span, .pills button, .tile dl.trio dt, .cards-panel span, .pcard .row1 small { font-size: 12px; }
.statement { line-height: 1.3; }

/* collapse doubled padding between two plain sections (bands keep theirs) */
.section:not([style*="background"]) + .section:not([style*="background"]) { padding-top: 0; }

/* ---------- route flow (value chain, scroll-driven) ---------- */
.vc-bar { position: sticky; top: 76px; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 10px 0; margin-bottom: 8px; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.vc-step { font-size: var(--fs-sm); color: var(--fg-muted); font-variant-numeric: tabular-nums; }
.vc-step b { color: var(--fg); font-weight: 600; }
.vc-meter { width: 120px; height: 4px; border-radius: 99px; background: var(--surface-2); overflow: hidden; display: inline-block; vertical-align: middle; margin-left: 10px; }
.vc-meter i { display: block; height: 100%; background: var(--primary); transform-origin: left; transform: scaleX(0); }
.ptl-fill { position: absolute; left: 19px; top: 20px; width: 2px; margin-left: -.5px; border-radius: 2px; background: linear-gradient(var(--primary-ink), var(--accent-ink)); transform-origin: top; transform: scaleY(0); z-index: 0; pointer-events: none; }
.ptl-dot { position: absolute; left: 20px; top: 20px; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--accent-ink); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent-ink) 20%, transparent); z-index: 3; pointer-events: none; will-change: transform; }
.ptl .node { transition: background-color 250ms ease, color 250ms ease, border-color 250ms ease, transform 250ms var(--ease-out); }
.ptl li.is-on .node { background: var(--primary); color: var(--primary-fg); border-color: var(--primary); }
.ptl li.is-here .node { transform: scale(1.08); }
.ptl li > img { will-change: clip-path; }
.reduced .ptl-dot { display: none; }
.reduced .ptl-fill { transform: scaleY(1); }
