/* ============================================================
   LEGACY PLATFORM — Design System
   Institutional · sober · data-led.
   Type: IBM Plex Serif (authority) / Sans (text) / Mono (data)
   ============================================================ */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg, canvas { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ============================================================
   TOKENS
   ============================================================ */
:root {
  /* type families */
  --serif: "IBM Plex Serif", Georgia, serif;
  --sans:  "IBM Plex Sans", system-ui, sans-serif;
  --mono:  "IBM Plex Mono", ui-monospace, monospace;

  /* LIGHT palette — warm bone paper, deep warm charcoal ink */
  --paper:      oklch(0.969 0.006 86);
  --paper-2:    oklch(0.949 0.008 84);
  --surface:    oklch(0.992 0.004 86);
  --surface-2:  oklch(0.964 0.007 84);
  --ink:        oklch(0.225 0.008 70);
  --ink-2:      oklch(0.445 0.009 72);
  --ink-3:      oklch(0.585 0.008 74);
  --ink-4:      oklch(0.705 0.007 76);
  --hairline:   oklch(0.892 0.006 80);
  --hairline-2: oklch(0.838 0.008 78);

  /* accent — champagne / muted-brass gold (aged, never bright) */
  --accent:      oklch(0.665 0.056 80);
  --accent-deep: oklch(0.515 0.058 72);
  --accent-soft: oklch(0.665 0.056 80 / 0.07);
  --accent-line: oklch(0.615 0.058 76 / 0.40);

  /* data semantics */
  --pos:        oklch(0.475 0.072 150);
  --neg:        oklch(0.515 0.110 30);
  --neg-soft:   oklch(0.515 0.110 30 / 0.10);
  --benchmark:  oklch(0.715 0.010 78);
  --benchmark-soft: oklch(0.715 0.010 78 / 0.14);
  --grid:       oklch(0.905 0.006 80);

  /* heat-map ramp (built from pos/neg in JS via these anchors) */
  --hm-pos-strong: oklch(0.50 0.085 150);
  --hm-neg-strong: oklch(0.53 0.12 30);

  /* radii / shadow */
  --r-sm: 3px;
  --r:    5px;
  --r-lg: 8px;
  --shadow-card: 0 1px 2px oklch(0.2 0.02 260 / 0.04), 0 8px 24px oklch(0.2 0.02 260 / 0.05);
  --shadow-pop:  0 12px 40px oklch(0.2 0.02 260 / 0.14);

  /* layout */
  --maxw: 1240px;
  --maxw-text: 760px;
  --gutter: clamp(20px, 5vw, 64px);

  /* density (regular) */
  --section-pad: clamp(72px, 9vw, 132px);
  --block-gap: clamp(40px, 5vw, 72px);

  color-scheme: light;
}

[data-density="compact"] { --section-pad: clamp(52px, 6.5vw, 92px); --block-gap: clamp(28px, 3.5vw, 48px); }
[data-density="comfy"]   { --section-pad: clamp(96px, 12vw, 176px); --block-gap: clamp(56px, 7vw, 104px); }

/* ---------- accent variants (disciplined: gold family + aviator midnight) ---------- */
[data-accent="brass"] {
  --accent: oklch(0.60 0.07 70); --accent-deep: oklch(0.47 0.066 66);
  --accent-soft: oklch(0.60 0.07 70 / 0.07); --accent-line: oklch(0.56 0.07 68 / 0.42);
}
[data-accent="midnight"] {
  --accent: oklch(0.52 0.072 250); --accent-deep: oklch(0.44 0.078 252);
  --accent-soft: oklch(0.52 0.072 250 / 0.07); --accent-line: oklch(0.50 0.075 250 / 0.40);
}

/* ---------- DARK theme — warm deep charcoal (not pure black) ---------- */
[data-theme="dark"] {
  --paper:      oklch(0.175 0.006 72);
  --paper-2:    oklch(0.205 0.007 72);
  --surface:    oklch(0.225 0.008 72);
  --surface-2:  oklch(0.255 0.008 72);
  --ink:        oklch(0.945 0.006 90);
  --ink-2:      oklch(0.785 0.008 88);
  --ink-3:      oklch(0.635 0.008 80);
  --ink-4:      oklch(0.50 0.008 78);
  --hairline:   oklch(0.315 0.008 76);
  --hairline-2: oklch(0.385 0.009 76);

  --accent:      oklch(0.775 0.072 82);
  --accent-deep: oklch(0.835 0.072 84);
  --accent-soft: oklch(0.775 0.072 82 / 0.10);
  --accent-line: oklch(0.775 0.072 82 / 0.40);

  --pos:        oklch(0.72 0.085 152);
  --neg:        oklch(0.66 0.115 32);
  --neg-soft:   oklch(0.66 0.115 32 / 0.12);
  --benchmark:  oklch(0.56 0.010 78);
  --benchmark-soft: oklch(0.56 0.010 78 / 0.22);
  --grid:       oklch(0.31 0.008 76);
  --hm-pos-strong: oklch(0.64 0.085 152);
  --hm-neg-strong: oklch(0.60 0.115 32);
  --shadow-card: 0 1px 2px oklch(0 0 0 / 0.3), 0 10px 30px oklch(0 0 0 / 0.4);
  --shadow-pop:  0 16px 48px oklch(0 0 0 / 0.55);
  color-scheme: dark;
}
[data-theme="dark"][data-accent="brass"] {
  --accent: oklch(0.74 0.08 66); --accent-deep: oklch(0.81 0.08 68);
  --accent-soft: oklch(0.74 0.08 66 / 0.12); --accent-line: oklch(0.74 0.08 66 / 0.42);
}
[data-theme="dark"][data-accent="midnight"] {
  --accent: oklch(0.70 0.085 250); --accent-deep: oklch(0.78 0.085 252);
  --accent-soft: oklch(0.70 0.085 250 / 0.14); --accent-line: oklch(0.70 0.085 250 / 0.40);
}

/* ============================================================
   BASE
   ============================================================ */
body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.65;
  font-feature-settings: "kern" 1;
  transition: background-color .4s ease, color .4s ease;
}

.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.wrap-text { max-width: var(--maxw-text); }

/* ---------- Typography primitives ---------- */
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
}
.eyebrow .dot { color: var(--accent); }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.08; letter-spacing: -0.01em; color: var(--ink); }
.display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(38px, 6.2vw, 78px);
  line-height: 1.04;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.h-sec { font-size: clamp(30px, 4.4vw, 52px); line-height: 1.06; letter-spacing: -0.018em; text-wrap: balance; }
.h-sub { font-size: clamp(22px, 2.6vw, 30px); line-height: 1.18; }
.lede { font-size: clamp(18px, 2vw, 22px); line-height: 1.55; color: var(--ink-2); font-weight: 350; text-wrap: pretty; }
.prose p { color: var(--ink-2); font-weight: 350; margin-bottom: 1.15em; text-wrap: pretty; }
.prose p:last-child { margin-bottom: 0; }
.prose strong, .prose b { color: var(--ink); font-weight: 600; }

.mono-note {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.6;
  letter-spacing: 0.01em;
  color: var(--ink-3);
}

/* ============================================================
   TOP BAR
   ============================================================ */
.topbar {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background-color .35s ease, border-color .35s ease, backdrop-filter .35s ease;
}
.topbar.scrolled {
  background: color-mix(in oklch, var(--paper) 82%, transparent);
  backdrop-filter: saturate(1.2) blur(14px);
  border-bottom-color: var(--hairline);
}
.topbar .bar {
  height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.brand .mark { width: 22px; height: 22px; flex: none; position: relative; }
.brand .mark::before, .brand .mark::after {
  content: ""; position: absolute; inset: 0; border: 1.5px solid var(--ink);
  transform: rotate(45deg) scale(0.74); transition: border-color .3s;
}
.brand .mark::after { border-color: var(--accent); transform: rotate(45deg) scale(0.46); background: var(--accent); }
.brand .word { font-family: var(--serif); font-weight: 600; font-size: 19px; letter-spacing: 0.045em; display: inline-flex; flex-direction: column; gap: 3px; line-height: .92; }
.brand .word i { font-family: var(--mono); font-style: normal; font-size: 8.5px; letter-spacing: .3em; color: var(--accent-deep); font-weight: 500; text-transform: uppercase; }
.nav { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 38px); }
.nav a { font-size: 14.5px; color: var(--ink-2); transition: color .2s; position: relative; }
.nav a:hover { color: var(--ink); }
.nav a.cta-link { color: var(--ink); font-weight: 500; }
.nav-toggle { display: none; }

/* visible theme toggle (sun/moon) */
.theme-toggle {
  width: 36px; height: 36px; flex: none; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--hairline-2); border-radius: 50%; background: none; cursor: pointer;
  color: var(--ink-2); transition: color .2s, border-color .2s, background .2s;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--ink-3); background: var(--surface); }
.theme-toggle svg { width: 17px; height: 17px; display: block; }
.theme-toggle .ico-moon { display: none; }
[data-theme="dark"] .theme-toggle .ico-sun { display: none; }
[data-theme="dark"] .theme-toggle .ico-moon { display: block; }

@media (max-width: 760px) {
  .nav a:not(.cta-link) { display: none; }
}

/* ============================================================
   BUTTONS / CHIPS / BADGES
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--sans); font-size: 15px; font-weight: 500; letter-spacing: 0.005em;
  padding: 13px 22px; border-radius: var(--r); border: 1px solid transparent;
  cursor: pointer; transition: all .22s ease; background: none; white-space: nowrap;
}
.btn .arrow { transition: transform .25s ease; }
.btn:hover .arrow { transform: translateX(4px); }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--accent-deep); color: #fff; }
[data-theme="dark"] .btn-primary { background: var(--ink); color: var(--paper); }
[data-theme="dark"] .btn-primary:hover { background: var(--accent); color: oklch(0.18 0.01 262); }
.btn-ghost { border-color: var(--hairline-2); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); background: var(--surface); }
.btn-text { padding: 0; color: var(--accent-deep); font-weight: 500; }
[data-theme="dark"] .btn-text { color: var(--accent); }

.chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.04em;
  color: var(--ink-2); padding: 5px 10px; border: 1px solid var(--hairline-2);
  border-radius: 100px; white-space: nowrap;
}
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }

.badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 5px 11px; border-radius: 100px; font-weight: 500;
}
.badge-hypo { color: var(--accent-deep); background: var(--accent-soft); border: 1px solid var(--accent-line); }
[data-theme="dark"] .badge-hypo { color: var(--accent); }
.badge-live { color: var(--pos); background: color-mix(in oklch, var(--pos) 12%, transparent); }
.badge-live .led { width: 6px; height: 6px; border-radius: 50%; background: var(--pos); box-shadow: 0 0 0 3px color-mix(in oklch, var(--pos) 22%, transparent); animation: pulse 2.6s ease-in-out infinite; }
@keyframes pulse { 0%,100%{ opacity:1 } 50%{ opacity:.45 } }
.badge-soon { color: var(--ink-3); background: var(--surface-2); border: 1px solid var(--hairline); }
.badge-signature { color: #fff; background: var(--accent-deep); border: 1px solid transparent; padding: 6px 13px; letter-spacing: 0.14em; font-weight: 600; white-space: nowrap; }
[data-theme="dark"] .badge-signature { color: oklch(0.18 0.01 262); background: var(--accent); }
.mbadges { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; flex: none; }

/* ============================================================
   SECTIONS / DIVIDERS
   ============================================================ */
section { position: relative; }
.section { padding-block: var(--section-pad); }
.section.alt { background: var(--paper-2); }
.rule { height: 1px; background: var(--hairline); border: 0; }
.section-head { display: flex; flex-direction: column; gap: 18px; margin-bottom: var(--block-gap); max-width: 820px; }

/* ============================================================
   HERO
   ============================================================ */
.hero { position: relative; overflow: hidden; padding-top: clamp(56px, 8vw, 104px); padding-bottom: clamp(64px, 9vw, 128px); }
.hero-curve { position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 1; }
.hero .wrap { position: relative; z-index: 1; }
.hero-eyebrow { margin-bottom: 30px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.hero-divider { width: 38px; height: 1px; background: var(--hairline-2); }
.hero h1 { max-width: 16ch; margin-bottom: 30px; }
.hero h1 em { font-style: italic; color: var(--accent-deep); }
[data-theme="dark"] .hero h1 em { color: var(--accent); }
.hero .lede { max-width: 56ch; margin-bottom: 28px; }
.hero-reg {
  display: flex; gap: 12px; align-items: flex-start;
  max-width: 52ch; padding: 4px 0 4px 20px; margin-bottom: 38px;
  border-left: 1.5px solid var(--accent);
}
.hero-reg .mono-note { color: var(--ink-2); font-style: normal; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }

/* hero metric ticker */
.hero-ticker {
  margin-top: clamp(48px, 7vw, 88px);
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline);
}
.hero-ticker .cell { padding: 24px 26px; border-right: 1px solid var(--hairline); }
.hero-ticker .cell:first-child { padding-left: 0; }
.hero-ticker .cell:last-child { border-right: 0; }
.hero-ticker .big { font-family: var(--serif); font-size: clamp(26px, 3.2vw, 40px); line-height: 1; letter-spacing: -0.01em; }
.hero-ticker .lab { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.06em; color: var(--ink-3); margin-top: 10px; text-transform: uppercase; }
.hero-ticker-note { font-family: var(--mono); font-size: 12px; letter-spacing: 0.03em; color: var(--ink-4); margin-top: 16px; }
@media (max-width: 740px) {
  .hero-ticker { grid-template-columns: 1fr 1fr; }
  .hero-ticker .cell:nth-child(odd) { padding-left: 0; }
  .hero-ticker .cell:nth-child(even) { border-right: 0; }
  .hero-ticker .cell:nth-child(-n+2) { border-bottom: 1px solid var(--hairline); }
}

/* ============================================================
   LEGACY
   ============================================================ */
.legacy-grid { display: grid; grid-template-columns: 1fr; gap: var(--block-gap); }
@media (min-width: 920px) { .legacy-grid { grid-template-columns: 1.15fr 0.85fr; gap: clamp(48px, 6vw, 96px); align-items: start; } }
.legacy-prose p { font-size: 18px; }
.legacy-aside { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 22px; }

/* aviator human-touch placeholder image */
.figure-ph {
  position: relative; border-radius: var(--r-lg); overflow: hidden;
  border: 1px solid var(--hairline-2); aspect-ratio: 4 / 5; background: var(--surface-2);
  background-image: repeating-linear-gradient(135deg,
     transparent 0 11px, color-mix(in oklch, var(--ink) 5%, transparent) 11px 12px);
}
.figure-ph .cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 16px;
  font-family: var(--mono); font-size: 11px; line-height: 1.5; letter-spacing: 0.02em;
  color: var(--ink-3); background: color-mix(in oklch, var(--surface) 86%, transparent);
  backdrop-filter: blur(4px); border-top: 1px solid var(--hairline);
}
.figure-ph .cap b { color: var(--ink-2); font-weight: 600; display: block; margin-bottom: 2px; letter-spacing: 0.08em; text-transform: uppercase; font-size: 10px; }

/* aviator instrument illustration (line-art plate) */
.figure-inst {
  position: relative; border-radius: var(--r-lg); overflow: hidden;
  border: 1px solid var(--hairline-2); aspect-ratio: 4 / 5; background: #17171a;
  box-shadow: var(--shadow-card);
}
.figure-inst[data-tint="midnight"] { background: #15161c; }
.figure-inst .inst-art { position: absolute; inset: 0; }
.figure-inst .inst-art svg { width: 100%; height: 100%; display: block; }
.figure-inst .inst-cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 32px 22px 20px;
  background: linear-gradient(to top, rgba(18,18,20,0.92) 28%, rgba(18,18,20,0));
  display: flex; flex-direction: column; gap: 9px;
}
.figure-inst .inst-cap .q { font-family: var(--serif); font-style: italic; font-size: 18px; line-height: 1.35; color: #e6d7ac; letter-spacing: 0.01em; }
.figure-inst[data-tint="midnight"] .inst-cap .q { color: #d3ddf2; }
.figure-inst .inst-cap .lab { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.13em; text-transform: uppercase; color: rgba(230,215,172,0.55); }
.figure-inst[data-tint="midnight"] .inst-cap .lab { color: rgba(211,221,242,0.55); }

.principle-card {
  border: 1px solid var(--hairline); border-radius: var(--r-lg); padding: 26px;
  background: var(--surface); box-shadow: var(--shadow-card);
}
.principle-card .q { font-family: var(--serif); font-style: italic; font-size: 19px; line-height: 1.45; color: var(--ink); }
.principle-card .src { margin-top: 16px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; color: var(--ink-3); text-transform: uppercase; }

/* ============================================================
   MODELS GRID
   ============================================================ */
.models-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); }
.mcard {
  position: relative; display: flex; flex-direction: column;
  border: 1px solid var(--hairline); border-radius: var(--r-lg);
  background: var(--surface); padding: 26px 26px 22px; overflow: hidden;
  transition: transform .3s cubic-bezier(.2,.7,.3,1), box-shadow .3s, border-color .3s;
}
.mcard.live { cursor: pointer; }
.mcard.live:hover { transform: translateY(-4px); box-shadow: var(--shadow-pop); border-color: var(--hairline-2); }
/* signature (flagship) model — elevated by tone + finer accent border, same size */
.mcard.signature {
  border-color: var(--accent-line);
  background:
    linear-gradient(180deg, var(--accent-soft), transparent 38%),
    var(--surface);
  box-shadow: var(--shadow-card), inset 0 0 0 1px var(--accent-soft);
}
.mcard.signature::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), color-mix(in oklch, var(--accent) 20%, transparent));
}
.mcard.signature:hover { border-color: var(--accent); }
.mcard.signature .mname { color: var(--ink); }
.mcard .mhead { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.mcard .mname { font-family: var(--serif); font-size: 25px; font-weight: 500; letter-spacing: -0.01em; }
.mcard .mtype { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.05em; color: var(--ink-3); margin-top: 4px; }
.mcard .mdesc { font-size: 14.5px; color: var(--ink-2); line-height: 1.55; margin: 14px 0 18px; font-weight: 350; min-height: 3em; }
.mcard .spark { height: 56px; margin: 0 -2px 18px; }
.mcard .mmetrics { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; padding-top: 18px; border-top: 1px solid var(--hairline); }
.mcard .met .v { font-family: var(--serif); font-size: 26px; line-height: 1; letter-spacing: -0.01em; }
.mcard .met .v.neg { color: var(--neg); }
.mcard .met .k { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.05em; color: var(--ink-3); margin-top: 7px; text-transform: uppercase; }
.mcard .mfoot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; }
.mcard .mfoot .sub { font-family: var(--mono); font-size: 11px; color: var(--ink-3); letter-spacing: 0.02em; }
.mcard .view { font-size: 14px; font-weight: 500; color: var(--accent-deep); display: inline-flex; align-items: center; gap: 7px; }
[data-theme="dark"] .mcard .view { color: var(--accent); }
.mcard.live:hover .view .arrow { transform: translateX(4px); }

/* coming soon */
.mcard.soon { background: var(--surface-2); }
.mcard.soon .mname { color: var(--ink-2); }
.mcard .soon-body { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; padding-top: 20px; border-top: 1px dashed var(--hairline-2); }
.mcard .blur-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; filter: blur(7px); opacity: .5; user-select: none; pointer-events: none; }
.mcard .blur-metrics .v { font-family: var(--serif); font-size: 24px; }
.mcard .blur-metrics .k { font-family: var(--mono); font-size: 10px; color: var(--ink-3); margin-top: 6px; }
.mcard .soon-line { font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); letter-spacing: 0.02em; }

/* ============================================================
   SIGNATURE FEATURED BLOCK (Band Filter) — full-width, light,
   blue accent. Same family as the cards + simulator; elevated by
   format + a refined border + a soft blue tint, not a bold fill.
   ============================================================ */
.feature-block {
  position: relative; display: grid; grid-template-columns: 1fr; gap: 28px;
  border: 1px solid var(--accent-line); border-radius: var(--r-lg);
  background: linear-gradient(180deg, var(--accent-soft), transparent 55%), var(--surface);
  padding: clamp(26px, 3.2vw, 44px); margin-bottom: 18px; overflow: hidden;
  box-shadow: var(--shadow-card); transition: box-shadow .3s, border-color .3s, transform .3s cubic-bezier(.2,.7,.3,1);
}
.feature-block::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), color-mix(in oklch, var(--accent) 8%, transparent));
}
.feature-block:hover { box-shadow: var(--shadow-pop); border-color: var(--accent); }
@media (min-width: 900px) { .feature-block { grid-template-columns: 0.84fr 1.16fr; gap: clamp(40px, 4.5vw, 72px); align-items: center; } }
.feature-left { display: flex; flex-direction: column; gap: 0; min-width: 0; }
.feature-left .fb-badges { display: flex; gap: 8px; margin-bottom: 18px; }
.feature-left .mname { font-family: var(--serif); font-size: clamp(30px, 3.6vw, 46px); font-weight: 500; letter-spacing: -0.015em; line-height: 1.02; color: var(--ink); }
.feature-left .mtype { font-family: var(--mono); font-size: 12px; letter-spacing: 0.05em; color: var(--ink-3); margin-top: 10px; }
.feature-left .chip-row { margin-top: 18px; }
.feature-left .mdesc { font-size: 16px; color: var(--ink-2); line-height: 1.55; margin: 18px 0 0; font-weight: 350; max-width: 48ch; text-wrap: pretty; }
.feature-left .fb-how { margin-top: 18px; font-family: var(--mono); font-size: 11.5px; color: var(--ink-4); letter-spacing: 0.02em; display: inline-flex; align-items: center; gap: 8px; }
.feature-left .fb-how::before { content: ""; width: 16px; height: 1px; background: var(--hairline-2); }
.feature-left .fb-cta { margin-top: 26px; align-self: flex-start; }
.feature-right { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.feature-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.feature-metrics .m .v { font-family: var(--serif); font-size: clamp(24px, 2.8vw, 34px); line-height: 1; letter-spacing: -0.01em; color: var(--ink); }
.feature-metrics .m .v.neg { color: var(--neg); }
.feature-metrics .m .k { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.04em; color: var(--ink-3); margin-top: 9px; text-transform: uppercase; }
.feature-chart { width: 100%; height: clamp(190px, 22vw, 260px); overflow: visible; }
.feature-legend { display: flex; gap: 18px; flex-wrap: wrap; margin-top: -6px; }
.feature-legend .li { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11.5px; color: var(--ink-2); }
.feature-legend .li .swatch { width: 16px; height: 3px; border-radius: 2px; background: var(--accent); }
.feature-legend .li .swatch.dash { background: none; border-top: 2px dashed var(--benchmark); height: 0; }
@media (max-width: 560px) { .feature-metrics { grid-template-columns: 1fr 1fr; gap: 16px; } }

/* ============================================================
   TEAM (Who We Are)
   ============================================================ */
.team-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.person { border: 1px solid var(--hairline); border-radius: var(--r-lg); padding: 24px; background: var(--surface); }
.person .avatar {
  width: 56px; height: 56px; border-radius: 50%; margin-bottom: 18px;
  background: var(--surface-2); border: 1px solid var(--hairline-2);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 19px; color: var(--ink-3);
}
.person .pname { font-family: var(--serif); font-size: 20px; font-weight: 500; }
.person .prole { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.04em; color: var(--accent-deep); margin-top: 5px; text-transform: uppercase; }
[data-theme="dark"] .person .prole { color: var(--accent); }
.person .pbio { font-size: 13.5px; color: var(--ink-3); margin-top: 14px; line-height: 1.55; font-family: var(--mono); }

/* pending content marker */
.pending-tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-4); border: 1px dashed var(--hairline-2); border-radius: 100px; padding: 5px 12px;
}

/* ---- What Viallion Brings ---- */
.viallion-open { max-width: 64ch; margin-bottom: var(--block-gap); }
.viallion-open p { font-size: clamp(19px, 2.1vw, 23px); line-height: 1.5; color: var(--ink); font-weight: 350; margin-bottom: 0.85em; text-wrap: pretty; }
.viallion-open p:last-child { margin-bottom: 0; }
.viallion-open strong { font-weight: 600; }
.viallion-points { display: grid; gap: clamp(28px, 4vw, 52px); grid-template-columns: repeat(3, 1fr); margin-bottom: var(--block-gap); }
@media (max-width: 820px) { .viallion-points { grid-template-columns: 1fr; gap: 30px; } }
.vpoint .vp-rule { width: 30px; height: 2px; background: var(--accent); margin-bottom: 18px; }
.vpoint .vp-label { font-family: var(--serif); font-size: 21px; font-weight: 500; color: var(--accent-deep); margin-bottom: 12px; letter-spacing: -0.01em; }
[data-theme="dark"] .vpoint .vp-label { color: var(--accent); }
.vpoint p { font-size: 15.5px; line-height: 1.6; color: var(--ink-2); font-weight: 350; text-wrap: pretty; }
.viallion-result { max-width: 62ch; padding-top: clamp(28px, 4vw, 40px); border-top: 1px solid var(--hairline); }
.viallion-result .stmt { font-family: var(--serif); font-size: clamp(22px, 2.8vw, 31px); line-height: 1.3; letter-spacing: -0.015em; color: var(--ink); text-wrap: balance; }
.viallion-result .stmt em { font-style: normal; color: var(--accent-deep); }
[data-theme="dark"] .viallion-result .stmt em { color: var(--accent); }

/* ---- Who We Are (leadership) ---- */
.leadership { border-top: 1px solid var(--hairline); }
.leader { display: grid; grid-template-columns: 0.82fr 1.18fr; gap: clamp(24px, 5vw, 72px); padding: clamp(28px, 3.4vw, 44px) 0; border-bottom: 1px solid var(--hairline); align-items: start; }
@media (max-width: 760px) { .leader { grid-template-columns: 1fr; gap: 12px; } }
.leader .pname { font-family: var(--serif); font-size: clamp(24px, 2.6vw, 30px); font-weight: 500; letter-spacing: -0.01em; }
.leader .prole { font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; color: var(--accent-deep); margin-top: 10px; text-transform: uppercase; line-height: 1.55; }
[data-theme="dark"] .leader .prole { color: var(--accent); }
.leader .pbio { font-size: 16.5px; line-height: 1.62; color: var(--ink-2); font-weight: 350; text-wrap: pretty; }

/* contact footnote */
.form-note { font-family: var(--mono); font-size: 12px; color: var(--ink-3); margin-top: 16px; letter-spacing: 0.02em; }

/* ============================================================
   CONTACT
   ============================================================ */
.contact-grid { display: grid; gap: var(--block-gap); grid-template-columns: 1fr; }
@media (min-width: 880px) { .contact-grid { grid-template-columns: 0.9fr 1.1fr; gap: clamp(40px, 6vw, 88px); align-items: start; } }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.field label { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.field input, .field textarea {
  background: var(--surface); border: 1px solid var(--hairline-2); border-radius: var(--r);
  padding: 13px 15px; font-size: 15px; color: var(--ink); transition: border-color .2s, box-shadow .2s;
  font-family: var(--sans);
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field textarea { resize: vertical; min-height: 110px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; gap: 0; } }

/* ============================================================
   DISCLAIMER / FOOTER
   ============================================================ */
.disclaimer {
  border: 1px solid var(--hairline); border-radius: var(--r-lg); padding: 28px 30px;
  background: var(--surface-2);
}
.disclaimer .dh { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.disclaimer .dh .eyebrow { color: var(--ink-2); }
.disclaimer p { font-family: var(--mono); font-size: 12px; line-height: 1.7; color: var(--ink-3); margin-bottom: 11px; max-width: 92ch; }
.disclaimer p:last-child { margin-bottom: 0; }
.disclaimer .placeholder { color: var(--ink-4); font-style: italic; }

footer.site { background: var(--paper-2); border-top: 1px solid var(--hairline); padding-block: clamp(48px, 6vw, 80px) 40px; }
footer.site .frow { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; margin-bottom: 48px; }
footer.site .fbrand .word { font-family: var(--serif); font-size: 22px; font-weight: 600; letter-spacing: .045em; display: flex; flex-direction: column; gap: 5px; line-height: .92; }
footer.site .fbrand .word i { font-family: var(--mono); font-style: normal; font-size: 9.5px; letter-spacing: .32em; color: var(--accent-deep); font-weight: 500; text-transform: uppercase; }
footer.site .fbrand .tag { font-family: var(--mono); font-size: 12px; color: var(--ink-3); margin-top: 10px; max-width: 38ch; line-height: 1.6; }
footer.site .fnav { display: flex; gap: clamp(36px, 6vw, 88px); flex-wrap: wrap; }
footer.site .fcol h5 { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-4); margin-bottom: 16px; font-weight: 500; }
footer.site .fcol a, footer.site .fcol span { display: block; font-size: 14px; color: var(--ink-2); margin-bottom: 11px; transition: color .2s; }
footer.site .fcol a:hover { color: var(--ink); }
footer.site .fcol span.muted { color: var(--ink-4); }
footer.site .fbottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding-top: 28px; border-top: 1px solid var(--hairline); }
footer.site .fbottom .mono-note { font-size: 11.5px; }

/* ============================================================
   DETAIL PAGE
   ============================================================ */
.back-link { display: inline-flex; align-items: center; gap: 9px; font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.04em; color: var(--ink-3); transition: color .2s; }
.back-link:hover { color: var(--ink); }
.back-link .arrow { transition: transform .2s; }
.back-link:hover .arrow { transform: translateX(-3px); }

.detail-hero { padding-top: clamp(40px, 5vw, 64px); padding-bottom: clamp(40px, 5vw, 64px); }
.detail-hero h1 { font-size: clamp(40px, 6vw, 76px); margin: 22px 0 18px; }
.detail-hero .one-line { font-size: clamp(18px, 2.1vw, 23px); color: var(--ink-2); max-width: 50ch; font-weight: 350; line-height: 1.45; margin-bottom: 26px; }
.detail-hero .period { display: inline-flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.period .meta { font-family: var(--mono); font-size: 12px; color: var(--ink-3); letter-spacing: 0.02em; }

/* headline metric band */
.metric-band {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--hairline); border-radius: var(--r-lg); overflow: hidden; background: var(--surface);
}
.metric-band .m { padding: 30px 28px; border-right: 1px solid var(--hairline); position: relative; }
.metric-band .m:last-child { border-right: 0; }
.metric-band .m.is-risk { box-shadow: inset 2px 0 0 var(--neg); }
.metric-band .m .v { font-family: var(--serif); font-size: clamp(34px, 4.4vw, 54px); line-height: 1; letter-spacing: -0.02em; }
.metric-band .m .v.neg { color: var(--neg); }
.metric-band .m .v.pos { color: var(--ink); }
.metric-band .m .k { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.05em; color: var(--ink-3); margin-top: 14px; text-transform: uppercase; }
.metric-band .m .note { font-family: var(--mono); font-size: 10.5px; color: var(--ink-4); margin-top: 5px; }
@media (max-width: 860px) {
  .metric-band { grid-template-columns: 1fr 1fr; }
  .metric-band .m:nth-child(2) { border-right: 0; }
  .metric-band .m:nth-child(-n+2) { border-bottom: 1px solid var(--hairline); }
}

/* chart cards */
.chart-card { border: 1px solid var(--hairline); border-radius: var(--r-lg); background: var(--surface); padding: clamp(22px, 3vw, 34px); }
.chart-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.chart-head .ct { font-family: var(--serif); font-size: clamp(22px, 2.6vw, 30px); font-weight: 500; letter-spacing: -0.01em; }
.chart-head .cs { font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); margin-top: 8px; letter-spacing: 0.02em; }
.legend { display: flex; gap: 20px; flex-wrap: wrap; }
.legend .li { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px; color: var(--ink-2); }
.legend .li .swatch { width: 16px; height: 3px; border-radius: 2px; }
.legend .li .swatch.dash { background: none; border-top: 2px dashed var(--benchmark); height: 0; }
.chart-context { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--hairline); font-size: 16px; color: var(--ink-2); line-height: 1.55; max-width: 76ch; font-weight: 350; text-wrap: pretty; }
.chart-context b { color: var(--ink); font-weight: 600; }
.chart-svg { width: 100%; height: auto; overflow: visible; }

.two-col { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 940px) { .two-col { grid-template-columns: 1fr 1fr; } }

/* logic block */
.logic { display: grid; grid-template-columns: 1fr; gap: var(--block-gap); }
@media (min-width: 880px) { .logic { grid-template-columns: 0.8fr 1.2fr; gap: clamp(40px, 5vw, 80px); align-items: start; } }
.logic .prose p { font-size: 17px; }
.logic-stats { display: flex; flex-direction: column; gap: 0; border: 1px solid var(--hairline); border-radius: var(--r-lg); overflow: hidden; }
.logic-stats .ls { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--hairline); }
.logic-stats .ls:last-child { border-bottom: 0; }
.logic-stats .ls .k { font-family: var(--mono); font-size: 12px; color: var(--ink-3); letter-spacing: 0.02em; }
.logic-stats .ls .v { font-family: var(--mono); font-size: 15px; color: var(--ink); font-weight: 500; }

/* collapsible returns */
.collapse { border: 1px solid var(--hairline); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.collapse > summary {
  list-style: none; cursor: pointer; padding: 22px clamp(22px, 3vw, 30px);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.collapse > summary::-webkit-details-marker { display: none; }
.collapse > summary .ct { font-family: var(--serif); font-size: clamp(20px, 2.4vw, 27px); font-weight: 500; }
.collapse > summary .cs { font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); margin-top: 6px; }
.collapse > summary .toggle { font-family: var(--mono); font-size: 12px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 9px; flex: none; }
.collapse > summary .toggle .ico { transition: transform .3s; }
.collapse[open] > summary .toggle .ico { transform: rotate(45deg); }
.collapse[open] > summary { border-bottom: 1px solid var(--hairline); }
.collapse .cbody { padding: clamp(18px, 3vw, 30px); }

/* heat-map table */
.heat-wrap { overflow-x: auto; }
.returns-card .heat-clip { position: relative; overflow: hidden; transition: max-height .55s cubic-bezier(.4,.6,.2,1); }
.returns-card .heat-clip.clipped::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: var(--fade-h, 26px); pointer-events: none;
  background: linear-gradient(to top, var(--surface) 42%, transparent);
}
.returns-card .heat-expand { display: flex; justify-content: center; margin-top: 20px; }
table.heat { border-collapse: separate; border-spacing: 3px; font-family: var(--mono); width: 100%; }
table.heat th { font-size: 10.5px; letter-spacing: 0.04em; color: var(--ink-4); font-weight: 500; padding: 4px 6px; text-transform: uppercase; text-align: center; }
table.heat th.yr { text-align: right; padding-right: 12px; }
table.heat td { font-size: 11px; text-align: center; padding: 7px 4px; border-radius: 3px; color: var(--ink-2); min-width: 40px; }
table.heat td.yrcell { font-weight: 600; color: var(--ink); text-align: right; padding-right: 12px; background: none; }
table.heat td.annual { font-weight: 600; border-left: 2px solid var(--hairline); }
table.heat td.empty { background: none; color: var(--ink-4); }

/* full stats grid */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0; border: 1px solid var(--hairline); border-radius: var(--r-lg); overflow: hidden; }
.stats-grid .st { padding: 20px 22px; border-right: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.stats-grid .st .k { font-family: var(--mono); font-size: 11px; letter-spacing: 0.03em; color: var(--ink-3); text-transform: uppercase; }
.stats-grid .st .v { font-family: var(--serif); font-size: 25px; margin-top: 10px; letter-spacing: -0.01em; }
.stats-grid .st .v.neg { color: var(--neg); }

/* soft CTA */
.soft-cta { border: 1px solid var(--hairline); border-radius: var(--r-lg); padding: clamp(36px, 5vw, 64px); background: var(--surface); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.soft-cta h3 { font-size: clamp(26px, 3.4vw, 40px); max-width: 20ch; }
.soft-cta p { color: var(--ink-2); max-width: 46ch; font-weight: 350; }

/* ============================================================
   PORTFOLIO SIMULATOR
   ============================================================ */
.sim-entry {
  margin-top: 20px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 24px; padding: clamp(26px, 3.4vw, 40px); border: 1px solid var(--hairline);
  border-radius: var(--r-lg); background: var(--surface);
}
.sim-entry h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.01em; }
.sim-entry p { color: var(--ink-2); font-weight: 350; margin-top: 12px; max-width: 60ch; text-wrap: pretty; }
.sim-entry .btn { flex: none; }
.sim-wrap { display: grid; grid-template-columns: 1fr; gap: 20px; align-items: start; }
@media (min-width: 1000px) { .sim-wrap { grid-template-columns: minmax(360px, 0.86fr) 1.14fr; gap: 24px; } }

.sim-panel { border: 1px solid var(--hairline); border-radius: var(--r-lg); background: var(--surface); padding: clamp(22px, 2.6vw, 30px); }
@media (min-width: 1000px) { .sim-build { position: sticky; top: 90px; } }
.sim-panel .ph { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-4); margin-bottom: 16px; }

/* presets */
.sim-presets { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.preset-btn {
  flex: 1 1 auto; min-width: 92px; padding: 11px 14px; border-radius: var(--r); cursor: pointer;
  border: 1px solid var(--hairline-2); background: var(--surface); color: var(--ink-2);
  font-family: var(--sans); font-size: 14px; font-weight: 500; transition: all .2s; text-align: center;
}
.preset-btn:hover { border-color: var(--ink-3); color: var(--ink); }
.preset-btn.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.preset-btn .pp { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: 0.04em; color: var(--ink-4); margin-top: 4px; font-weight: 400; text-transform: uppercase; }
.preset-btn.active .pp { color: color-mix(in oklch, var(--paper) 70%, transparent); }
.preset-btn.reset { flex: 0 0 auto; min-width: 0; color: var(--ink-3); }

/* allocation rows */
.alloc-rows { display: flex; flex-direction: column; gap: 18px; }
.alloc-row { display: grid; grid-template-columns: 1fr; gap: 9px; }
.alloc-row .ar-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.alloc-row .ar-name { font-family: var(--serif); font-size: 18px; font-weight: 500; }
.alloc-row .ar-prof { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.04em; color: var(--ink-3); text-transform: uppercase; margin-left: 8px; }
.alloc-row .ar-val { font-family: var(--mono); font-size: 15px; font-weight: 500; color: var(--ink); min-width: 46px; text-align: right; }
.alloc-row .ar-val.zero { color: var(--ink-4); }

/* range slider */
.sim-range { -webkit-appearance: none; appearance: none; width: 100%; height: 5px; border-radius: 5px; cursor: pointer; outline: none;
  background: linear-gradient(90deg, var(--accent) 0 var(--pct, 0%), var(--hairline-2) var(--pct, 0%) 100%); transition: background .05s; }
.sim-range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--accent); box-shadow: var(--shadow-card); cursor: grab; transition: transform .12s; }
.sim-range::-webkit-slider-thumb:hover { transform: scale(1.12); }
.sim-range::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); box-shadow: var(--shadow-card); cursor: grab; }

/* allocation summary bar */
.alloc-summary { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--hairline); }
.alloc-bar { height: 10px; border-radius: 100px; background: var(--surface-2); overflow: hidden; display: flex; box-shadow: inset 0 0 0 1px var(--hairline); }
.alloc-bar .seg { height: 100%; transition: width .25s cubic-bezier(.4,.6,.2,1); }
.alloc-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.alloc-meta .at { font-family: var(--mono); font-size: 12px; letter-spacing: 0.02em; color: var(--ink-3); }
.alloc-meta .at b { color: var(--ink); font-weight: 500; }
.alloc-meta .at.ok b { color: var(--accent-deep); }
.alloc-meta .at.over b { color: var(--neg); }
[data-theme="dark"] .alloc-meta .at.ok b { color: var(--accent); }
.alloc-norm { font-family: var(--sans); font-size: 12.5px; font-weight: 500; color: var(--accent-deep); background: none; border: 0; cursor: pointer; padding: 0; }
[data-theme="dark"] .alloc-norm { color: var(--accent); }
.alloc-norm:hover { text-decoration: underline; }
.alloc-norm[hidden] { display: none; }

/* results */
.sim-results { display: flex; flex-direction: column; gap: 20px; }
.sim-metrics { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--hairline); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.sim-metrics .m { padding: clamp(20px, 2.4vw, 28px); border-right: 1px solid var(--hairline); }
.sim-metrics .m:last-child { border-right: 0; }
.sim-metrics .m.is-risk { box-shadow: inset 2px 0 0 var(--neg); }
.sim-metrics .m .v { font-family: var(--serif); font-size: clamp(28px, 3.6vw, 44px); line-height: 1; letter-spacing: -0.02em; }
.sim-metrics .m .v.neg { color: var(--neg); }
.sim-metrics .m .k { font-family: var(--mono); font-size: 11px; letter-spacing: 0.05em; color: var(--ink-3); margin-top: 12px; text-transform: uppercase; }
.sim-metrics .m .note { font-family: var(--mono); font-size: 10.5px; color: var(--ink-4); margin-top: 5px; }
@media (max-width: 560px) {
  .sim-metrics { grid-template-columns: 1fr; }
  .sim-metrics .m { border-right: 0; border-bottom: 1px solid var(--hairline); }
  .sim-metrics .m:last-child { border-bottom: 0; }
}

/* diversification callout */
.sim-diversify {
  display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px 16px 20px;
  border-left: 2px solid var(--accent); background: var(--accent-soft); border-radius: 0 var(--r) var(--r) 0;
  opacity: 0; max-height: 0; overflow: hidden; transition: opacity .4s ease, max-height .4s ease, margin .4s ease; margin: 0;
}
.sim-diversify.show { opacity: 1; max-height: 220px; }
.sim-diversify .di { font-family: var(--serif); font-size: 15px; line-height: 1.5; color: var(--ink); text-wrap: pretty; }
.sim-diversify .di b { color: var(--accent-deep); font-weight: 600; font-style: italic; }
[data-theme="dark"] .sim-diversify .di b { color: var(--accent); }
.sim-diversify .di span { display: block; margin-top: 5px; color: var(--ink-3); font-family: var(--mono); font-size: 11.5px; font-style: normal; }

/* equity card */
.sim-chart .chart-head .ct { font-family: var(--serif); font-size: clamp(20px, 2.4vw, 26px); font-weight: 500; }

/* ---- Variant A: Growth / Drawdown toggle ---- */
.chart-view { display: flex; align-items: center; gap: 12px; }
.chart-view .cv-lab { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-4); }
.chart-toggle { display: inline-flex; padding: 3px; gap: 3px; background: var(--surface-2); border: 1px solid var(--hairline-2); border-radius: 100px; }
.chart-toggle button { display: inline-flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.03em; padding: 7px 15px; border: 0; background: none; color: var(--ink-3); border-radius: 100px; cursor: pointer; transition: background-color .2s, color .2s; }
.chart-toggle button .cvi { width: 14px; height: 14px; display: block; }
.chart-toggle button:hover:not(.sel) { color: var(--ink); }
.chart-toggle button.sel { background: var(--ink); color: var(--paper); }
[data-theme="dark"] .chart-toggle button.sel { background: var(--accent); color: oklch(0.18 0.01 262); }

/* ---- Variant B: stacked drawdown companion strip ---- */
.sim-dd-card { margin-top: 14px; background: var(--surface); }
.sim-dd-card .chart-head { margin-bottom: 16px; }
.sim-dd-card .chart-head .ct { font-family: var(--serif); font-size: clamp(17px, 2vw, 21px); font-weight: 500; }
.sim-dd-card .cs { color: var(--ink-4); }
.sim-secondary { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--hairline); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.sim-secondary .s { padding: 16px 14px; border-right: 1px solid var(--hairline); }
.sim-secondary .s:last-child { border-right: 0; }
.sim-secondary .s .k { font-family: var(--mono); font-size: 10px; letter-spacing: 0.03em; color: var(--ink-3); text-transform: uppercase; }
.sim-secondary .s .v { font-family: var(--serif); font-size: 20px; margin-top: 8px; letter-spacing: -0.01em; }
@media (max-width: 760px) { .sim-secondary { grid-template-columns: 1fr 1fr; } .sim-secondary .s:nth-child(even){border-right:0;} .sim-secondary .s{border-bottom:1px solid var(--hairline);} }

.sim-single { font-family: var(--mono); font-size: 12px; line-height: 1.55; color: var(--ink-3); letter-spacing: 0.01em; padding: 2px 2px 0; }
.sim-single[hidden] { display: none; }

.sim-period { font-family: var(--mono); font-size: 12px; color: var(--ink-3); letter-spacing: 0.01em; line-height: 1.6; }
.sim-period b { color: var(--ink-2); font-weight: 500; }

/* empty state */
.sim-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; padding: clamp(48px, 8vw, 96px) 24px; border: 1px dashed var(--hairline-2); border-radius: var(--r-lg); }
.sim-empty .ei { font-family: var(--serif); font-size: 22px; color: var(--ink-2); max-width: 24ch; }
.sim-empty .es { font-family: var(--mono); font-size: 12px; color: var(--ink-4); letter-spacing: 0.02em; }
.sim-results.is-empty .sim-metrics, .sim-results.is-empty .sim-chart, .sim-results.is-empty .sim-dd-card, .sim-results.is-empty .sim-secondary, .sim-results.is-empty .sim-period { display: none; }
.sim-results:not(.is-empty) .sim-empty { display: none; }

/* ============================================================
   TWEAKS PANEL (vanilla)
   ============================================================ */
#tw-panel {
  position: fixed; right: 20px; bottom: 20px; z-index: 9999; width: 270px;
  background: var(--surface); border: 1px solid var(--hairline-2); border-radius: 10px;
  box-shadow: var(--shadow-pop); font-family: var(--sans); display: none; overflow: hidden;
}
#tw-panel.on { display: block; }
#tw-panel .tw-head { display: flex; align-items: center; justify-content: space-between; padding: 13px 15px; border-bottom: 1px solid var(--hairline); cursor: grab; }
#tw-panel .tw-head .t { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); }
#tw-panel .tw-x { width: 22px; height: 22px; border-radius: 5px; border: 1px solid var(--hairline-2); background: none; cursor: pointer; color: var(--ink-3); font-size: 14px; line-height: 1; display: flex; align-items: center; justify-content: center; }
#tw-panel .tw-x:hover { color: var(--ink); border-color: var(--ink-3); }
#tw-panel .tw-body { padding: 16px 15px; display: flex; flex-direction: column; gap: 18px; }
#tw-panel .tw-sec .lab { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-4); margin-bottom: 9px; }
#tw-panel .tw-seg { display: flex; gap: 5px; }
#tw-panel .tw-seg button { flex: 1; padding: 8px 4px; font-family: var(--mono); font-size: 11px; border: 1px solid var(--hairline-2); background: var(--surface-2); color: var(--ink-2); border-radius: var(--r); cursor: pointer; transition: all .18s; letter-spacing: 0.02em; }
#tw-panel .tw-seg button:hover { border-color: var(--ink-3); }
#tw-panel .tw-seg button.sel { background: var(--ink); color: var(--paper); border-color: var(--ink); }
#tw-panel .tw-swatches { display: flex; gap: 8px; }
#tw-panel .tw-sw { width: 34px; height: 34px; border-radius: 50%; cursor: pointer; border: 2px solid var(--hairline-2); position: relative; transition: transform .15s; }
#tw-panel .tw-sw:hover { transform: scale(1.08); }
#tw-panel .tw-sw.sel { border-color: var(--ink); box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ink); }

/* ---------- motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.3,1); }
  .reveal.in { opacity: 1; transform: none; }
}

/* ============================================================
   RESPONSIVE — tablet & phone refinements
   ============================================================ */
@media (max-width: 860px) {
  .topbar .bar { height: 64px; }
  .chart-head { align-items: flex-start; }
}
@media (max-width: 600px) {
  body { font-size: 16px; line-height: 1.6; }
  .topbar .bar { height: 58px; }
  .brand .word { font-size: 17px; }
  .hero { padding-top: 36px; padding-bottom: 56px; }
  .hero h1 { margin-bottom: 22px; }
  .hero-eyebrow { margin-bottom: 22px; gap: 10px; }
  .hero-divider { display: none; }
  .hero-actions { gap: 12px; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .hero-ticker { margin-top: 40px; }
  .hero-ticker .cell { padding: 20px 18px; }

  .section-head { gap: 14px; }
  .metric-band .m { padding: 22px 18px; }
  .chart-card { padding: 18px 15px; }
  .chart-head { gap: 12px; margin-bottom: 18px; }
  .legend { gap: 14px; }
  .collapse > summary { padding: 18px 16px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid .st { padding: 16px 16px; }
  .stats-grid .st .v { font-size: 22px; }

  .mcard { padding: 22px 20px 20px; }
  .person { padding: 20px; }
  .disclaimer { padding: 22px 18px; }
  .soft-cta .btn { width: 100%; justify-content: center; }
  .detail-hero h1 { font-size: clamp(36px, 11vw, 52px); }
  .detail-hero .period { gap: 10px; }

  footer.site .frow { flex-direction: column; gap: 28px; }
  footer.site .fnav { gap: 36px; }

  /* keep tweaks panel inside the viewport on phones */
  #tw-panel { right: 12px; left: 12px; bottom: 12px; width: auto; }
}
@media (max-width: 380px) {
  .hero-ticker { grid-template-columns: 1fr; }
  .hero-ticker .cell, .hero-ticker .cell:nth-child(odd), .hero-ticker .cell:nth-child(even) { padding-left: 0; }
  .hero-ticker .cell { border-right: 0; border-bottom: 1px solid var(--hairline); }
  .hero-ticker .cell:last-child { border-bottom: 0; }
  .stats-grid { grid-template-columns: 1fr; }
}
