/* ===== DESIGN TOKENS ===== */
:root {
  /* Type scale */
  --text-xs:   clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl:   clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl:  clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl:  clamp(2.5rem, 1rem + 4vw, 5rem);

  /* Spacing */
  --s1: 0.25rem; --s2: 0.5rem; --s3: 0.75rem; --s4: 1rem;
  --s5: 1.25rem; --s6: 1.5rem; --s8: 2rem; --s10: 2.5rem;
  --s12: 3rem; --s16: 4rem; --s20: 5rem; --s24: 6rem;

  /* Radii */
  --r-sm: 0.25rem; --r-md: 0.5rem; --r-lg: 0.75rem; --r-xl: 1rem;

  /* Transitions */
  --ease: 200ms cubic-bezier(0.16, 1, 0.3, 1);
  --ease-slow: 350ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Content widths */
  --w-narrow: 640px; --w-default: 960px; --w-wide: 1200px;

  /* Fonts */
  --font-display: 'Cormorant Garamond', 'Georgia', serif;
  --font-body: 'Switzer', 'Helvetica Neue', sans-serif;
}

/* ===== LIGHT PALETTE — Slate Parchment + Deep Teal + Muted Gold ===== */
:root, [data-theme="light"] {
  --bg:            #f5f3ef;
  --surface:       #faf9f7;
  --surface-2:     #ffffff;
  --surface-offset:#eeebe6;
  --divider:       #dedad4;
  --border:        #d0ccc5;

  --text:          #1e1c18;
  --text-muted:    #706d67;
  --text-faint:    #b2afa9;
  --text-inverse:  #f5f3ef;

  --primary:       #1a5c62;
  --primary-hover: #124448;
  --primary-active:#0c3135;
  --primary-hi:    #c8dbd9;

  --gold:          #9a7c3a;
  --gold-hover:    #7d6028;
  --gold-hi:       #e8e0cd;

  --slate:         #3d4a5c;
  --slate-light:   #8899aa;

  --success:       #3b7a4a;
  --warning:       #9a5c1a;
  --caution:       #b89000;

  --shadow-sm: 0 1px 3px rgba(30,28,24,0.06);
  --shadow-md: 0 4px 14px rgba(30,28,24,0.08);
  --shadow-lg: 0 12px 40px rgba(30,28,24,0.12);
  --shadow-xl: 0 20px 60px rgba(30,28,24,0.15);
}

/* ===== DARK PALETTE ===== */
[data-theme="dark"] {
  --bg:            #141210;
  --surface:       #1a1916;
  --surface-2:     #1f1e1b;
  --surface-offset:#171614;
  --divider:       #252320;
  --border:        #332f2b;

  --text:          #cccac6;
  --text-muted:    #7a7874;
  --text-faint:    #4a4845;
  --text-inverse:  #1a1916;

  --primary:       #4d9ba8;
  --primary-hover: #3d8090;
  --primary-active:#2d6572;
  --primary-hi:    #1e3538;

  --gold:          #c4a057;
  --gold-hover:    #d4b06a;
  --gold-hi:       #2e2718;

  --slate:         #8899aa;
  --slate-light:   #aabbcc;

  --success:       #5da870;
  --warning:       #cc8040;
  --caution:       #d4b030;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 14px rgba(0,0,0,0.3);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.4);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.5);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg:#141210; --surface:#1a1916; --surface-2:#1f1e1b; --surface-offset:#171614;
    --divider:#252320; --border:#332f2b; --text:#cccac6; --text-muted:#7a7874;
    --text-faint:#4a4845; --text-inverse:#1a1916; --primary:#4d9ba8;
    --primary-hover:#3d8090; --primary-active:#2d6572; --primary-hi:#1e3538;
    --gold:#c4a057; --gold-hover:#d4b06a; --gold-hi:#2e2718;
    --slate:#8899aa; --slate-light:#aabbcc;
    --success:#5da870; --warning:#cc8040; --caution:#d4b030;
    --shadow-sm:0 1px 3px rgba(0,0,0,0.2); --shadow-md:0 4px 14px rgba(0,0,0,0.3);
    --shadow-lg:0 12px 40px rgba(0,0,0,0.4); --shadow-xl:0 20px 60px rgba(0,0,0,0.5);
  }
}

/* ===== BASE RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}
body {
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--text);
  background-color: var(--bg);
  line-height: 1.65;
}
img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }
ul[role="list"] { list-style: none; }
input, button, textarea, select { font: inherit; color: inherit; }
h1,h2,h3,h4,h5,h6 { text-wrap: balance; line-height: 1.15; font-family: var(--font-display); }
p, li { text-wrap: pretty; max-width: 72ch; }
::selection { background: color-mix(in oklab, var(--primary), transparent 75%); color: var(--text); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: var(--r-sm); }
button { cursor: pointer; background: none; border: none; }
a { color: inherit; text-decoration: none; transition: color var(--ease); }

/* Transitions on interactive elements */
a, button, [role="button"] {
  transition: color var(--ease), background var(--ease), border-color var(--ease), box-shadow var(--ease), transform var(--ease);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border-width:0; }

/* ===== LAYOUT ===== */
.container { max-width: var(--w-wide); margin-inline: auto; padding-inline: clamp(var(--s6), 5vw, var(--s16)); }
.container--narrow { max-width: var(--w-default); margin-inline: auto; padding-inline: clamp(var(--s6), 5vw, var(--s16)); }
section { padding-block: clamp(var(--s12), 8vw, var(--s24)); }
.section-label { font-family: var(--font-body); font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--primary); margin-bottom: var(--s6); }
.section-title { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 400; color: var(--text); margin-bottom: var(--s4); }
.section-sub { font-size: var(--text-base); color: var(--text-muted); max-width: 56ch; line-height: 1.7; }

/* ===== NAVIGATION ===== */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: 4rem;
  background: color-mix(in oklab, var(--bg), transparent 8%);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--divider);
  transition: background var(--ease-slow), border-color var(--ease-slow);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 100%; max-width: var(--w-wide); margin-inline: auto;
  padding-inline: clamp(var(--s6), 5vw, var(--s16));
}
.nav-logo { display: flex; align-items: center; gap: var(--s3); text-decoration: none; }
.nav-logo-text { font-family: var(--font-display); font-size: 1.15rem; font-weight: 500; color: var(--text); letter-spacing: 0.02em; }
.nav-links { display: flex; align-items: center; gap: var(--s6); }
.nav-link { font-size: var(--text-xs); font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); padding: var(--s2) 0; border-bottom: 1px solid transparent; transition: color var(--ease), border-color var(--ease); }
.nav-link:hover { color: var(--text); border-bottom-color: var(--primary); }
.nav-actions { display: flex; align-items: center; gap: var(--s3); }
.btn-theme { width: 2rem; height: 2rem; display: grid; place-items: center; border-radius: var(--r-md); color: var(--text-muted); background: var(--surface-offset); border: 1px solid var(--border); }
.btn-theme:hover { color: var(--text); background: var(--surface); }
.btn-mode { font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; padding: var(--s2) var(--s4); border-radius: var(--r-md); background: var(--surface-offset); color: var(--text-muted); border: 1px solid var(--border); }
.btn-mode:hover { color: var(--text); background: var(--surface); }
.btn-mode.active { background: var(--gold-hi); color: var(--gold); border-color: color-mix(in oklab, var(--gold), transparent 50%); }
@media (max-width: 768px) { .nav-links { display: none; } }

/* ===== BUTTONS ===== */
.btn { display: inline-flex; align-items: center; gap: var(--s2); padding: 0.7rem var(--s6); border-radius: var(--r-md); font-size: var(--text-sm); font-weight: 500; font-family: var(--font-body); letter-spacing: 0.04em; cursor: pointer; border: none; transition: background var(--ease), color var(--ease), box-shadow var(--ease), transform var(--ease); }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--primary); color: var(--text-inverse); }
.btn-primary:hover { background: var(--primary-hover); box-shadow: 0 4px 16px color-mix(in oklab, var(--primary), transparent 50%); }
.btn-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--surface-offset); box-shadow: var(--shadow-sm); }
.btn-ghost { background: transparent; border: none; color: var(--text-muted); padding-left: 0; padding-right: 0; letter-spacing: 0.02em; }
.btn-ghost:hover { color: var(--text); }
.btn-ghost { background: transparent; color: var(--text-muted); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--surface-offset); color: var(--text); }
.btn-gold { background: var(--gold); color: white; }
.btn-gold:hover { background: var(--gold-hover); box-shadow: 0 4px 16px color-mix(in oklab, var(--gold), transparent 55%); }

/* ===== CARDS ===== */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s6); box-shadow: var(--shadow-sm); }
.card:hover { box-shadow: var(--shadow-md); }
.card--elevated { box-shadow: var(--shadow-md); }

/* ===== HERO ===== */
#hero {
  min-height: 100vh;
  display: grid;
  grid-template-rows: 1fr auto;
  background:
    radial-gradient(ellipse 80% 70% at 75% 35%, color-mix(in oklab, var(--primary), transparent 82%) 0%, transparent 65%),
    radial-gradient(ellipse 50% 60% at 15% 85%, color-mix(in oklab, var(--gold), transparent 88%) 0%, transparent 55%),
    radial-gradient(ellipse 30% 40% at 90% 90%, color-mix(in oklab, var(--slate), transparent 92%) 0%, transparent 50%),
    var(--bg);
  padding-top: 4rem;
  position: relative;
  overflow: hidden;
}
#hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%231a5c62' fill-opacity='0.025'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
  pointer-events: none;
  z-index: 0;
}
.hero-content { position: relative; z-index: 1; }
.hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: var(--w-wide);
  margin-inline: auto;
  padding-inline: clamp(var(--s6), 5vw, var(--s16));
  padding-block: var(--s20) var(--s12);
  gap: var(--s8);
}
.hero-eyebrow { display: flex; align-items: center; gap: var(--s3); font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--primary); }
.hero-eyebrow::before { content: ''; display: block; width: 1.5rem; height: 1px; background: var(--primary); }
.hero-heading {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 1.8rem + 4.5vw, 6.5rem);
  font-weight: 300;
  line-height: 1.02;
  color: var(--text);
  letter-spacing: -0.025em;
  max-width: 20ch;
}
.hero-heading em { font-style: italic; color: var(--primary); display: block; }
.hero-sub { font-size: clamp(1rem, 0.9rem + 0.4vw, 1.2rem); color: var(--text-muted); max-width: 44ch; line-height: 1.65; font-weight: 300; margin-top: var(--s2); }
.hero-pull {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 1rem + 0.5vw, 1.4rem);
  font-weight: 300;
  font-style: italic;
  color: var(--text-faint);
  border-left: 2px solid var(--primary);
  padding-left: var(--s5);
  line-height: 1.5;
  max-width: 40ch;
  margin-top: var(--s2);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s4); align-items: center; }
.hero-note { font-size: var(--text-xs); color: var(--text-faint); }

/* Credibility strip */
.cred-strip {
  border-top: 1px solid var(--divider);
  padding: var(--s6) 0;
  max-width: var(--w-wide);
  margin-inline: auto;
  padding-inline: clamp(var(--s6), 5vw, var(--s16));
}
.cred-inner { display: flex; flex-wrap: wrap; gap: var(--s8); align-items: center; }
.cred-item { display: flex; align-items: center; gap: var(--s2); font-size: var(--text-xs); font-weight: 500; letter-spacing: 0.06em; color: var(--text-muted); text-transform: uppercase; }
.cred-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--primary); flex-shrink: 0; }

/* ===== MODE BAR ===== */
#mode-bar {
  background: color-mix(in oklab, var(--gold-hi), var(--bg) 30%);
  border-bottom: 1px solid color-mix(in oklab, var(--gold), transparent 70%);
  padding: var(--s3) 0;
  display: none;
}
#mode-bar.visible { display: block; }
.mode-bar-inner { display: flex; align-items: center; gap: var(--s4); max-width: var(--w-wide); margin-inline: auto; padding-inline: clamp(var(--s6), 5vw, var(--s16)); font-size: var(--text-xs); color: var(--gold); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.mode-indicator { display: flex; align-items: center; gap: var(--s2); }
.mode-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1;} 50%{opacity:0.4;} }

/* ===== ENDOWMENT MODEL ===== */
.em-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s10); margin-top: var(--s10); }
@media (max-width: 900px) { .em-grid { grid-template-columns: 1fr; } }
.em-col-head { font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-faint); margin-bottom: var(--s6); padding-bottom: var(--s3); border-bottom: 1px solid var(--divider); }
.em-item { padding: var(--s5) 0; border-bottom: 1px solid var(--divider); }
.em-item:last-child { border-bottom: none; }
.em-item-title { font-size: var(--text-sm); font-weight: 600; color: var(--text); margin-bottom: var(--s2); }
.em-item-body { font-size: var(--text-xs); color: var(--text-muted); line-height: 1.65; }
.em-check-list { display: flex; flex-direction: column; gap: var(--s3); }
.em-check { display: flex; gap: var(--s4); align-items: flex-start; padding: var(--s4); border: 1px solid var(--border); border-radius: var(--r-md); cursor: pointer; background: var(--surface-2); transition: all var(--ease); }
.em-check:hover { border-color: var(--warning); }
.em-check.flagged { background: color-mix(in oklab,var(--warning),transparent 90%); border-color: color-mix(in oklab,var(--warning),transparent 50%); }
.em-check-box { width: 18px; height: 18px; min-width: 18px; border: 2px solid var(--border); border-radius: 3px; margin-top: 2px; transition: all var(--ease); display:flex; align-items:center; justify-content:center; }
.em-check.flagged .em-check-box { background: var(--warning); border-color: var(--warning); color: white; font-size:10px; font-weight:700; }
.em-check.flagged .em-check-box::after { content: '!'; }
.em-check-title { font-size: var(--text-xs); font-weight: 600; color: var(--text); margin-bottom: var(--s1); }
.em-check-risk { font-size: var(--text-xs); color: var(--text-muted); line-height: 1.5; display: none; }
.em-check.flagged .em-check-risk { display: block; color: var(--text); }
/* ===== MANAGER SELECTION ===== */
.ms-stages { display: flex; flex-direction: column; gap: var(--s6); margin-top: var(--s10); }
.ms-stage { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); padding: var(--s8); }
.ms-stage-odd { border-color: color-mix(in oklab,var(--warning),transparent 50%); background: color-mix(in oklab,var(--warning),var(--surface) 95%); }
.ms-stage-num { font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--primary); margin-bottom: var(--s2); }
.ms-stage-title { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 400; color: var(--text); margin-bottom: var(--s5); }
.ms-stage-body { font-size: var(--text-sm); color: var(--text-muted); line-height: 1.7; margin-bottom: var(--s5); }
.ms-stage-body p { margin-bottom: var(--s3); }
.ms-stage-checks { display: flex; flex-direction: column; gap: var(--s2); border-top: 1px solid var(--divider); padding-top: var(--s5); }
.ms-check-item { display: flex; gap: var(--s3); font-size: var(--text-xs); color: var(--text-muted); align-items: flex-start; }
.ms-check-icon { color: var(--primary); font-weight: 700; flex-shrink: 0; }
.ms-4p-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--s4); }
.ms-4p { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s5); }
.ms-4p-letter { font-family: var(--font-display); font-size: 2rem; color: var(--primary); opacity: 0.3; line-height: 1; margin-bottom: var(--s2); }
.ms-4p-name { font-size: var(--text-sm); font-weight: 700; color: var(--text); margin-bottom: var(--s2); }
.ms-4p-desc { font-size: var(--text-xs); color: var(--text-muted); line-height: 1.55; }
.ms-odd-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--s3); margin-top: var(--s4); }
.ms-odd-item { padding: var(--s3) var(--s4); border-radius: var(--r-md); font-size: var(--text-xs); color: var(--text); line-height: 1.5; display: flex; flex-direction: column; gap: 4px; }
.ms-odd-reject { background: color-mix(in oklab,var(--warning),transparent 85%); border: 1px solid color-mix(in oklab,var(--warning),transparent 55%); }
.ms-odd-caution { background: color-mix(in oklab,var(--caution),transparent 85%); border: 1px solid color-mix(in oklab,var(--caution),transparent 55%); }
.ms-odd-label { font-weight: 700; font-size: 0.65rem; letter-spacing: 0.08em; text-transform: uppercase; }
.ms-odd-reject .ms-odd-label { color: var(--warning); }
.ms-odd-caution .ms-odd-label { color: var(--caution); }
.ms-triggers { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--s5); }
.ms-trigger-label { font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--primary); margin-bottom: var(--s3); padding-bottom: var(--s2); border-bottom: 1px solid var(--divider); }
.ms-trigger-items { display: flex; flex-direction: column; gap: var(--s2); }
.ms-trigger-items span { font-size: var(--text-xs); color: var(--text-muted); line-height: 1.5; padding: var(--s1) 0; border-bottom: 1px solid var(--divider); }
.ms-trigger-items span:last-child { border-bottom: none; }
/* ===== LIQUIDITY MODELLER ===== */
.lm-tiers { display: flex; flex-direction: column; gap: var(--s4); margin-top: var(--s10); }
.lm-tier { border-radius: var(--r-xl); overflow: hidden; border: 1px solid var(--border); }
.lm-tier-header { display: flex; align-items: center; gap: var(--s4); padding: var(--s5) var(--s6); }
.lm-tier-1 .lm-tier-header { background: color-mix(in oklab,var(--primary),var(--surface-2) 92%); border-bottom: 1px solid color-mix(in oklab,var(--primary),transparent 70%); }
.lm-tier-2 .lm-tier-header { background: color-mix(in oklab,var(--gold),var(--surface-2) 92%); border-bottom: 1px solid color-mix(in oklab,var(--gold),transparent 70%); }
.lm-tier-3 .lm-tier-header { background: color-mix(in oklab,var(--slate),var(--surface-2) 92%); border-bottom: 1px solid color-mix(in oklab,var(--slate),transparent 70%); }
.lm-tier-num { font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.1em; color: var(--primary); min-width: 48px; }
.lm-tier-2 .lm-tier-num { color: var(--gold); }
.lm-tier-3 .lm-tier-num { color: var(--slate); }
.lm-tier-name { font-size: var(--text-sm); font-weight: 600; color: var(--text); flex: 1; }
.lm-tier-horizon { font-size: var(--text-xs); color: var(--text-faint); }
.lm-tier-desc { padding: var(--s4) var(--s6); font-size: var(--text-xs); color: var(--text-muted); line-height: 1.6; border-bottom: 1px solid var(--divider); background: var(--surface-2); }
.lm-tier-check { padding: var(--s5) var(--s6); display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); background: var(--surface); }
@media (max-width: 640px) { .lm-tier-check { grid-template-columns: 1fr; } }
.lm-input-row { display: flex; flex-direction: column; gap: var(--s2); }
.lm-label { font-size: var(--text-xs); color: var(--text-faint); font-weight: 500; }
.lm-input { padding: var(--s3) var(--s4); border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-2); color: var(--text); font-family: var(--font-body); font-size: var(--text-sm); width: 100%; box-sizing: border-box; }
.lm-input:focus { outline: 2px solid var(--primary); outline-offset: 2px; }
.lm-result-row { grid-column: 1 / -1; font-size: var(--text-xs); line-height: 1.5; padding: var(--s2) var(--s3); border-radius: var(--r-sm); }
.lm-result-ok { background: color-mix(in oklab,var(--success),transparent 88%); color: var(--text); }
.lm-result-warn { background: color-mix(in oklab,var(--caution),transparent 85%); color: var(--text); }
.lm-result-danger { background: color-mix(in oklab,var(--warning),transparent 85%); color: var(--text); }
/* ===== TRUST SECTION ===== */
.trust-point { padding: var(--s5) 0; border-bottom: 1px solid var(--divider); }
.trust-point:last-child { border-bottom: none; }
.trust-point-head { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 400; color: var(--text); margin-bottom: var(--s2); line-height: 1.3; }
.trust-point-body { font-size: var(--text-sm); color: var(--text-muted); line-height: 1.7; }
.advisor-statement { display: flex; flex-direction: column; gap: var(--s4); font-size: var(--text-sm); color: var(--text-muted); line-height: 1.75; font-weight: 300; border-left: 2px solid var(--primary); padding-left: var(--s6); }
.advisor-statement p { margin: 0; }
.value-pillars { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); margin-top: var(--s6); }
.value-pillar { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s5); }
.vp-num { font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.1em; color: var(--primary); margin-bottom: var(--s2); }
.vp-title { font-size: var(--text-sm); font-weight: 600; color: var(--text); margin-bottom: var(--s2); }
.vp-desc { font-size: var(--text-xs); color: var(--text-muted); line-height: 1.5; }
@media (max-width: 768px) {
  #trust > div { grid-template-columns: 1fr !important; }
  .value-pillars { grid-template-columns: 1fr 1fr; }
}

/* ===== INTAKE WIZARD ===== */
#intake { background: var(--surface); border-top: 1px solid var(--divider); border-bottom: 1px solid var(--divider); }
.wizard-wrap { max-width: 800px; margin-inline: auto; }
.wizard-header { margin-bottom: var(--s10); }
.wizard-progress { margin-bottom: var(--s8); }
.wizard-progress-track { height: 2px; background: var(--divider); border-radius: 1px; }
.wizard-progress-fill { height: 100%; background: var(--primary); border-radius: 1px; transition: width 0.4s var(--ease-slow); }
.wizard-progress-meta { display: flex; justify-content: space-between; align-items: center; margin-top: var(--s2); font-size: var(--text-xs); color: var(--text-faint); font-weight: 500; }
.wizard-step { display: none; }
.wizard-step.active { display: block; animation: stepIn 0.3s ease; }
@keyframes stepIn { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }
.wizard-q { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 400; color: var(--text); margin-bottom: var(--s2); line-height: 1.3; }
.wizard-hint { font-size: var(--text-sm); color: var(--text-muted); margin-bottom: var(--s6); }
.wizard-options { display: grid; gap: var(--s3); }
.wizard-options.grid-2 { grid-template-columns: 1fr 1fr; }
.wizard-opt {
  display: flex; align-items: flex-start; gap: var(--s4);
  padding: var(--s4) var(--s5);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface-2);
  cursor: pointer;
  transition: border-color var(--ease), background var(--ease), box-shadow var(--ease);
  text-align: left;
}
.wizard-opt:hover { border-color: var(--primary); background: color-mix(in oklab, var(--primary-hi), transparent 30%); }
.wizard-opt.selected { border-color: var(--primary); background: var(--primary-hi); }
.wizard-opt-icon { font-size: 1.25rem; flex-shrink: 0; margin-top: 0.1rem; }
.wizard-opt-label { font-size: var(--text-sm); font-weight: 600; color: var(--text); line-height: 1.3; }
.wizard-opt-desc { font-size: var(--text-xs); color: var(--text-muted); margin-top: var(--s1); line-height: 1.5; }
.wizard-nav { display: flex; justify-content: space-between; align-items: center; margin-top: var(--s8); padding-top: var(--s6); border-top: 1px solid var(--divider); }
.wizard-result { display: none; }
.wizard-result.visible { display: block; animation: stepIn 0.4s ease; }
.result-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--s4); margin: var(--s6) 0; }
.result-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s5); }
.result-card-label { font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-faint); margin-bottom: var(--s2); }
.result-card-value { font-family: var(--font-display); font-size: var(--text-lg); color: var(--text); }
.result-card-value.risk { color: var(--warning); }
.result-card-value.good { color: var(--success); }
.result-pathway { background: color-mix(in oklab, var(--primary-hi), transparent 20%); border: 1px solid color-mix(in oklab, var(--primary), transparent 60%); border-radius: var(--r-lg); padding: var(--s6); margin: var(--s6) 0; }
.result-pathway-label { font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--primary); margin-bottom: var(--s3); }
.result-pathway-text { font-size: var(--text-base); color: var(--text); line-height: 1.7; }
.maturity-gauge { margin: var(--s8) 0; }
.maturity-label { font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); margin-bottom: var(--s3); }
.maturity-track { position: relative; height: 8px; background: var(--divider); border-radius: 4px; margin-bottom: var(--s3); }
.maturity-fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--warning), var(--caution), var(--primary)); transition: width 1s cubic-bezier(0.16, 1, 0.3, 1); }
.maturity-levels { display: flex; justify-content: space-between; font-size: var(--text-xs); color: var(--text-faint); }
@media (max-width: 600px) { .wizard-options.grid-2 { grid-template-columns: 1fr; } }

/* ===== JOURNEY MAP ===== */
#journey { background: var(--bg); }
.journey-stages { display: flex; flex-direction: column; gap: var(--s3); margin-top: var(--s10); }
.journey-stage {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface);
  transition: box-shadow var(--ease);
}
.journey-stage:hover { box-shadow: var(--shadow-md); }
.journey-stage-header {
  display: flex; align-items: center; gap: var(--s5);
  padding: var(--s5) var(--s6);
  cursor: pointer;
  user-select: none;
}
.journey-num { width: 2rem; height: 2rem; border-radius: 50%; background: var(--surface-offset); border: 1px solid var(--border); display: grid; place-items: center; font-size: var(--text-xs); font-weight: 700; color: var(--text-muted); flex-shrink: 0; transition: background var(--ease), color var(--ease), border-color var(--ease); }
.journey-stage.open .journey-num { background: var(--primary); border-color: var(--primary); color: white; }
.journey-stage-title { font-family: var(--font-display); font-size: var(--text-base); font-weight: 500; color: var(--text); flex: 1; }
.journey-stage-badge { font-size: var(--text-xs); font-weight: 500; padding: 0.2rem 0.6rem; border-radius: var(--r-sm); background: var(--surface-offset); color: var(--text-muted); }
.journey-chevron { width: 1.2rem; height: 1.2rem; color: var(--text-faint); transition: transform var(--ease); }
.journey-stage.open .journey-chevron { transform: rotate(180deg); }
.journey-body { display: none; border-top: 1px solid var(--divider); padding: var(--s6); }
.journey-stage.open .journey-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--s6); }
.journey-col-title { font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-faint); margin-bottom: var(--s3); }
.journey-col ul { list-style: none; display: flex; flex-direction: column; gap: var(--s2); }
.journey-col ul li { font-size: var(--text-sm); color: var(--text-muted); display: flex; gap: var(--s2); align-items: flex-start; line-height: 1.5; }
.journey-col ul li::before { content: '–'; color: var(--primary); flex-shrink: 0; margin-top: 0.05em; }
.journey-risk-box { grid-column: 1 / -1; background: color-mix(in oklab, var(--warning), transparent 90%); border: 1px solid color-mix(in oklab, var(--warning), transparent 70%); border-radius: var(--r-md); padding: var(--s4) var(--s5); font-size: var(--text-sm); color: var(--text); }
.journey-risk-label { font-weight: 600; font-size: var(--text-xs); letter-spacing: 0.08em; text-transform: uppercase; color: var(--warning); margin-bottom: var(--s1); }

/* ===== DILIGENCE SIMULATOR ===== */
#diligence { background: var(--surface); border-top: 1px solid var(--divider); border-bottom: 1px solid var(--divider); }
.dil-tabs { display: flex; gap: var(--s2); flex-wrap: wrap; margin: var(--s8) 0 var(--s6); border-bottom: 1px solid var(--divider); padding-bottom: 0; }
.dil-tab { font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-faint); padding: var(--s3) var(--s4); border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; transition: color var(--ease), border-color var(--ease); }
.dil-tab:hover { color: var(--text); }
.dil-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.dil-panel { display: none; animation: stepIn 0.3s ease; }
.dil-panel.active { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--s6); }
.dil-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s6); }
.dil-card-icon { font-size: 1.5rem; margin-bottom: var(--s4); }
.dil-card-title { font-size: var(--text-sm); font-weight: 700; color: var(--text); margin-bottom: var(--s3); letter-spacing: 0.02em; }
.dil-card-body { font-size: var(--text-sm); color: var(--text-muted); line-height: 1.7; }
.dil-card-body strong { color: var(--text); font-weight: 600; }

/* ===== SCORECARD ===== */
#scorecard { background: var(--bg); }
.scorecard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--s4); margin: var(--s8) 0; }
.score-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s5); }
.score-item-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--s3); }
.score-item-label { font-size: var(--text-sm); font-weight: 600; color: var(--text); }
.score-item-value { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 500; }
.score-track { height: 5px; background: var(--divider); border-radius: 3px; margin-bottom: var(--s2); }
.score-fill { height: 100%; border-radius: 3px; transition: width 1s cubic-bezier(0.16, 1, 0.3, 1); }
.score-fill.level-low { background: var(--warning); }
.score-fill.level-mid { background: var(--caution); }
.score-fill.level-high { background: var(--primary); }
.score-fill.level-elite { background: var(--success); }
.score-desc { font-size: var(--text-xs); color: var(--text-faint); line-height: 1.5; }
.score-sliders { display: grid; gap: var(--s4); margin: var(--s6) 0; }
.score-slider-row { display: flex; align-items: center; gap: var(--s4); }
.score-slider-label { font-size: var(--text-xs); color: var(--text-muted); width: 180px; flex-shrink: 0; }
.score-slider-input { flex: 1; accent-color: var(--primary); }
.score-slider-val { font-size: var(--text-xs); font-weight: 600; color: var(--primary); width: 2rem; text-align: right; }
.score-summary { background: color-mix(in oklab, var(--primary-hi), transparent 20%); border: 1px solid color-mix(in oklab, var(--primary), transparent 60%); border-radius: var(--r-lg); padding: var(--s6); margin-top: var(--s8); }
.score-summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s6); margin-top: var(--s5); }
.score-summary-col h4 { font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-faint); margin-bottom: var(--s3); }
.score-summary-col ul { list-style: none; display: flex; flex-direction: column; gap: var(--s2); }
.score-summary-col li { font-size: var(--text-sm); color: var(--text-muted); display: flex; gap: var(--s2); }
.score-summary-col.strengths li::before { content: '↑'; color: var(--success); }
.score-summary-col.gaps li::before { content: '△'; color: var(--warning); }
.total-score-ring { display: flex; flex-direction: column; align-items: center; gap: var(--s3); margin-bottom: var(--s6); }
.total-ring-svg { width: 120px; height: 120px; }
.total-score-label { font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-faint); }
.total-score-band { font-size: var(--text-xs); font-weight: 600; padding: 0.25rem 0.75rem; border-radius: var(--r-full, 9999px); background: var(--primary-hi); color: var(--primary); }
@media (max-width: 600px) { .score-summary-grid { grid-template-columns: 1fr; } .score-slider-label { width: 120px; } }

/* ===== BUILD VS BUY ===== */
#buildvsbuy { background: var(--surface); border-top: 1px solid var(--divider); border-bottom: 1px solid var(--divider); }
.bvb-factors { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--s4); margin: var(--s8) 0; }
.bvb-factor { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s5); }
.bvb-factor-label { font-size: var(--text-xs); font-weight: 600; color: var(--text-muted); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: var(--s3); }
.bvb-factor-select { width: 100%; padding: var(--s3) var(--s4); border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); color: var(--text); font-size: var(--text-sm); appearance: none; -webkit-appearance: none; cursor: pointer; }
.bvb-result { background: var(--primary); color: white; border-radius: var(--r-lg); padding: var(--s8); margin-top: var(--s6); transition: opacity 0.4s ease; }
.bvb-result-label { font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.75; margin-bottom: var(--s3); }
.bvb-result-verdict { font-family: var(--font-display); font-size: var(--text-xl); margin-bottom: var(--s4); }
.bvb-result-rationale { font-size: var(--text-base); opacity: 0.88; line-height: 1.7; max-width: 60ch; }

/* ===== PERSONAS ===== */
#personas { background: var(--bg); }
.persona-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--s5); margin-top: var(--s10); }
.persona-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: var(--s6); cursor: pointer;
  transition: border-color var(--ease), box-shadow var(--ease), transform var(--ease);
}
.persona-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.persona-card.active { border-color: var(--primary); box-shadow: var(--shadow-lg); }
.persona-tag { font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--primary); margin-bottom: var(--s3); }
.persona-name { font-family: var(--font-display); font-size: var(--text-lg); color: var(--text); margin-bottom: var(--s2); }
.persona-start { font-size: var(--text-sm); color: var(--text-muted); margin-bottom: var(--s4); line-height: 1.6; }
.persona-detail { display: none; border-top: 1px solid var(--divider); padding-top: var(--s5); margin-top: var(--s4); }
.persona-card.active .persona-detail { display: block; }
.persona-detail-row { margin-bottom: var(--s4); }
.persona-detail-label { font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-faint); margin-bottom: var(--s2); }
.persona-detail-text { font-size: var(--text-sm); color: var(--text-muted); line-height: 1.6; }
.persona-detail-list { list-style: none; display: flex; flex-direction: column; gap: var(--s1); }
.persona-detail-list li { font-size: var(--text-sm); color: var(--text-muted); display: flex; gap: var(--s2); }
.persona-detail-list li::before { content: '→'; color: var(--primary); flex-shrink: 0; }

/* ===== DELIVERABLES ===== */
#deliverables { background: var(--surface); border-top: 1px solid var(--divider); border-bottom: 1px solid var(--divider); }
.deliv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--s4); margin-top: var(--s10); }
.deliv-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; transition: box-shadow var(--ease), transform var(--ease); }
.deliv-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.deliv-bar { height: 3px; background: linear-gradient(90deg, var(--primary), var(--gold)); }
.deliv-inner { padding: var(--s5); }
.deliv-icon { font-size: 1.5rem; margin-bottom: var(--s3); }
.deliv-title { font-size: var(--text-sm); font-weight: 700; color: var(--text); margin-bottom: var(--s3); }
.deliv-why { font-size: var(--text-xs); color: var(--text-muted); line-height: 1.6; margin-bottom: var(--s3); }
.deliv-meta { display: flex; flex-direction: column; gap: var(--s1); }
.deliv-meta-row { display: flex; gap: var(--s2); align-items: flex-start; }
.deliv-meta-key { font-size: var(--text-xs); font-weight: 600; color: var(--text-faint); min-width: 4rem; flex-shrink: 0; }
.deliv-meta-val { font-size: var(--text-xs); color: var(--text-muted); line-height: 1.5; }

/* ===== OBJECTIONS ===== */
#objections { background: var(--bg); }
.obj-list { display: flex; flex-direction: column; gap: var(--s2); margin-top: var(--s10); }
.obj-item { border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); transition: box-shadow var(--ease); }
.obj-item:hover { box-shadow: var(--shadow-sm); }
.obj-trigger { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: var(--s4); padding: var(--s5) var(--s6); text-align: left; cursor: pointer; }
.obj-q { font-family: var(--font-display); font-size: var(--text-base); font-weight: 400; color: var(--text); font-style: italic; }
.obj-icon { width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--surface-offset); border: 1px solid var(--border); display: grid; place-items: center; flex-shrink: 0; color: var(--text-muted); transition: transform var(--ease); }
.obj-item.open .obj-icon { transform: rotate(45deg); }
.obj-answer { display: none; padding: 0 var(--s6) var(--s6); }
.obj-item.open .obj-answer { display: block; }
.obj-answer p { font-size: var(--text-base); color: var(--text-muted); line-height: 1.75; border-top: 1px solid var(--divider); padding-top: var(--s5); }

/* ===== CONVERSION ===== */
#conversion { background: var(--surface); border-top: 1px solid var(--divider); }
.conv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--s5); margin-top: var(--s10); }
.conv-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-xl); padding: var(--s8); position: relative; overflow: hidden; transition: box-shadow var(--ease), transform var(--ease); }
.conv-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.conv-card.featured { border-color: var(--primary); background: color-mix(in oklab, var(--primary-hi), var(--surface-2) 50%); }
.conv-badge { font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--primary); margin-bottom: var(--s4); }
.conv-title { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 400; color: var(--text); margin-bottom: var(--s3); line-height: 1.3; }
.conv-for { font-size: var(--text-xs); color: var(--text-muted); font-weight: 500; margin-bottom: var(--s5); }
.conv-details { display: flex; flex-direction: column; gap: var(--s3); margin-bottom: var(--s6); }
.conv-detail { display: flex; gap: var(--s3); align-items: flex-start; }
.conv-detail-key { font-size: var(--text-xs); font-weight: 600; color: var(--text-faint); min-width: 4.5rem; flex-shrink: 0; padding-top: 0.1rem; }
.conv-detail-val { font-size: var(--text-sm); color: var(--text-muted); line-height: 1.5; }

/* ===== BOARD MEMO ===== */
#memo { background: var(--bg); border-top: 1px solid var(--divider); }
.memo-doc { max-width: 720px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s10); box-shadow: var(--shadow-md); font-family: var(--font-display); }
.memo-header { border-bottom: 2px solid var(--text); padding-bottom: var(--s5); margin-bottom: var(--s6); }
.memo-pre { font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); font-family: var(--font-body); margin-bottom: var(--s2); }
.memo-title-doc { font-size: var(--text-xl); font-weight: 300; color: var(--text); line-height: 1.2; }
.memo-meta { display: flex; gap: var(--s6); margin-top: var(--s3); font-size: var(--text-xs); color: var(--text-faint); font-family: var(--font-body); }
.memo-section { margin-bottom: var(--s6); }
.memo-section-title { font-size: var(--text-base); font-weight: 500; color: var(--text); letter-spacing: 0.03em; margin-bottom: var(--s3); border-bottom: 1px solid var(--divider); padding-bottom: var(--s2); }
.memo-body { font-size: var(--text-base); color: var(--text-muted); line-height: 1.75; font-family: var(--font-body); font-weight: 300; }
.memo-risk-list { list-style: none; display: flex; flex-direction: column; gap: var(--s2); }
.memo-risk-list li { font-size: var(--text-sm); color: var(--text-muted); display: flex; gap: var(--s3); font-family: var(--font-body); }
.memo-risk-list li::before { content: '▸'; color: var(--warning); flex-shrink: 0; }
.memo-actions { display: flex; gap: var(--s4); margin-top: var(--s8); flex-wrap: wrap; }

/* ===== RELATIONSHIP MAP ===== */
#relmap { background: var(--surface); border-top: 1px solid var(--divider); border-bottom: 1px solid var(--divider); }
.rel-map-wrap { position: relative; max-width: 640px; margin: var(--s10) auto 0; }
.rel-svg { width: 100%; height: auto; }

/* ===== ADVISOR QUESTIONS ===== */
#advisor-qs { background: var(--bg); }
.qs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--s4); margin-top: var(--s10); }
.qs-category { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s6); }
.qs-cat-title { font-size: var(--text-sm); font-weight: 700; color: var(--text); margin-bottom: var(--s4); display: flex; align-items: center; gap: var(--s2); }
.qs-cat-icon { font-size: 1rem; }
.qs-list { list-style: none; display: flex; flex-direction: column; gap: var(--s3); }
.qs-list li { font-size: var(--text-sm); color: var(--text-muted); line-height: 1.6; padding-left: var(--s5); position: relative; }
.qs-list li::before { content: '"'; position: absolute; left: 0; color: var(--primary); font-size: 1.2rem; top: -0.1rem; font-family: var(--font-display); }

/* ===== INSTITUTIONAL CHECKLIST ===== */
#checklist { background: var(--surface); border-top: 1px solid var(--divider); }
.ck-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--s6); margin-top: var(--s10); }
.ck-group { }
.ck-group-title { font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-faint); margin-bottom: var(--s4); padding-bottom: var(--s2); border-bottom: 1px solid var(--divider); }
.ck-items { list-style: none; display: flex; flex-direction: column; gap: var(--s3); }
.ck-item { display: flex; align-items: flex-start; gap: var(--s3); }
.ck-box { width: 1.1rem; height: 1.1rem; border: 1.5px solid var(--border); border-radius: 3px; flex-shrink: 0; margin-top: 0.15rem; cursor: pointer; transition: background var(--ease), border-color var(--ease); display: grid; place-items: center; }
.ck-item.checked .ck-box { background: var(--primary); border-color: var(--primary); }
.ck-item.checked .ck-box::after { content: ''; display: block; width: 0.4rem; height: 0.25rem; border-left: 2px solid white; border-bottom: 2px solid white; transform: rotate(-45deg) translate(0.05rem, -0.05rem); }
.ck-item.checked .ck-text { color: var(--text-faint); text-decoration: line-through; }
.ck-text { font-size: var(--text-sm); color: var(--text-muted); line-height: 1.5; }

/* ===== FOOTER ===== */
footer { background: var(--text); color: var(--text-inverse); padding: var(--s12) 0; }
.footer-inner { max-width: var(--w-wide); margin-inline: auto; padding-inline: clamp(var(--s6), 5vw, var(--s16)); display: grid; grid-template-columns: 1fr auto; gap: var(--s8); align-items: end; }
.footer-brand { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 300; opacity: 0.9; margin-bottom: var(--s3); }
.footer-sub { font-size: var(--text-xs); opacity: 0.4; letter-spacing: 0.06em; }
.footer-note { font-size: var(--text-xs); opacity: 0.35; text-align: right; max-width: 28ch; line-height: 1.6; }

/* ===== PRINT ===== */
@media print {
  #nav, #mode-bar, .wizard-nav, .hero-actions, .btn, footer { display: none !important; }
  body { background: white; color: black; font-size: 12pt; }
  section { padding-block: 2rem; }
  .memo-doc { box-shadow: none; border: 1px solid #ccc; }
  #hero { min-height: unset; }
  * { animation: none !important; transition: none !important; }
}

/* ===== INSTITUTIONALISATION ROADMAP ===== */
#institutionalisation { background: var(--bg); padding-block: clamp(var(--s12), 6vw, var(--s24)); }
#institutionalisation .section-label { color: var(--gold); }
.inst-phases { display: flex; flex-direction: column; gap: var(--s4); margin-top: var(--s10); }
.inst-phase { border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.inst-phase-header { display: flex; align-items: center; gap: var(--s5); padding: var(--s5) var(--s6); cursor: pointer; transition: background var(--ease); background: var(--surface); }
.inst-phase-header:hover { background: var(--surface-offset); }
.inst-phase-num { font-family: var(--font-body); font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.08em; color: var(--gold); min-width: 56px; }
.inst-phase-title { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 400; color: var(--text); flex: 1; }
.inst-phase-sub { font-size: var(--text-xs); color: var(--text-muted); display: none; }
@media (min-width: 640px) { .inst-phase-sub { display: block; } }
.inst-chevron { width: 20px; height: 20px; color: var(--text-faint); transition: transform var(--ease); flex-shrink: 0; }
.inst-phase-body { display: none; padding: var(--s8) var(--s8) var(--s8); border-top: 1px solid var(--divider); background: var(--surface-2); }
.inst-phase-body.open { display: block; }
.inst-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--s6); }
.inst-col { }
.inst-col-title { font-family: var(--font-body); font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-faint); margin-bottom: var(--s3); padding-bottom: var(--s2); border-bottom: 1px solid var(--divider); }
.inst-col ul { list-style: none; padding: 0; }
.inst-col ul li { font-size: var(--text-sm); color: var(--text-muted); padding: var(--s2) 0; border-bottom: 1px solid var(--divider); line-height: 1.5; }
.inst-col ul li:last-child { border-bottom: none; }
.inst-col ul li::before { content: '\2014'; margin-right: var(--s2); color: var(--text-faint); }
.inst-col-text { font-size: var(--text-sm); color: var(--text-muted); line-height: 1.6; }
.inst-failure { background: color-mix(in oklab, var(--warning), transparent 88%); border-left: 3px solid var(--warning); padding: var(--s3) var(--s4); font-size: var(--text-sm); color: var(--text); border-radius: 0 var(--r-sm) var(--r-sm) 0; line-height: 1.6; }

/* Failure mode matrix */
.inst-failure-matrix { }
.inst-matrix-title { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 400; color: var(--text); margin-bottom: var(--s4); }
.failure-modes-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--s5); }
.failure-mode-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s6); position: relative; overflow: hidden; }
.failure-mode-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--warning); }
.fm-num { font-family: var(--font-body); font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.1em; color: var(--warning); margin-bottom: var(--s2); }
.fm-title { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 400; color: var(--text); margin-bottom: var(--s3); }
.fm-desc { font-size: var(--text-sm); color: var(--text-muted); line-height: 1.6; margin-bottom: var(--s4); }
.fm-signal { font-size: var(--text-xs); color: var(--text); background: var(--surface-offset); padding: var(--s2) var(--s3); border-radius: var(--r-sm); margin-bottom: var(--s2); line-height: 1.5; }
.fm-signal-label { font-weight: 700; color: var(--caution); margin-right: var(--s1); }
.fm-remedy { font-size: var(--text-xs); color: var(--text); background: color-mix(in oklab, var(--primary), transparent 92%); padding: var(--s2) var(--s3); border-radius: var(--r-sm); line-height: 1.5; }
.fm-remedy-label { font-weight: 700; color: var(--primary); margin-right: var(--s1); }

/* ===== IPS CHECKER ===== */
#ips-checker { background: var(--surface); border-top: 1px solid var(--divider); border-bottom: 1px solid var(--divider); padding-block: clamp(var(--s12), 6vw, var(--s24)); }
#ips-checker .section-label { color: var(--primary); }
.ips-check-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s8); margin-top: var(--s10); }
@media (max-width: 768px) { .ips-check-grid { grid-template-columns: 1fr; } }
.ips-section-title { font-family: var(--font-body); font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-faint); margin-bottom: var(--s5); padding-bottom: var(--s2); border-bottom: 1px solid var(--divider); }
.ips-items { display: flex; flex-direction: column; gap: var(--s2); }
.ips-item { display: flex; gap: var(--s4); align-items: flex-start; padding: var(--s4); border: 1px solid var(--border); border-radius: var(--r-md); cursor: pointer; transition: background var(--ease), border-color var(--ease); background: var(--surface-2); }
.ips-item:hover { background: var(--surface-offset); }
.ips-item.checked { background: color-mix(in oklab, var(--primary), transparent 92%); border-color: var(--primary); }
.ips-check-box { width: 20px; height: 20px; min-width: 20px; border: 2px solid var(--border); border-radius: var(--r-sm); margin-top: 2px; display: flex; align-items: center; justify-content: center; transition: all var(--ease); }
.ips-item.checked .ips-check-box { background: var(--primary); border-color: var(--primary); color: white; }
.ips-item.checked .ips-check-box::after { content: '\2713'; font-size: 12px; color: white; }
.ips-item-title { font-size: var(--text-sm); font-weight: 600; color: var(--text); margin-bottom: var(--s1); }
.ips-item-detail { font-size: var(--text-xs); color: var(--text-muted); line-height: 1.5; display: none; }
.ips-item.checked .ips-item-detail { display: block; }
.ips-quality-summary { grid-column: 1 / -1; background: var(--surface-offset); border: 1px solid var(--border); border-radius: var(--r-xl); padding: var(--s8); margin-top: var(--s4); }
.ips-q-header { font-family: var(--font-body); font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-faint); margin-bottom: var(--s3); }
.ips-q-score { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 300; color: var(--primary); margin-bottom: var(--s4); }
.ips-q-bar-track { height: 6px; background: var(--divider); border-radius: var(--r-full); margin-bottom: var(--s4); overflow: hidden; }
.ips-q-bar-fill { height: 100%; background: var(--primary); border-radius: var(--r-full); transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1); }
.ips-q-narrative { font-size: var(--text-sm); color: var(--text); line-height: 1.6; margin-bottom: var(--s3); }
.ips-q-band { font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.06em; color: var(--gold); }

/* ===== IC EFFECTIVENESS ===== */
#ic-effectiveness { background: var(--bg); padding-block: clamp(var(--s12), 6vw, var(--s24)); }
#ic-effectiveness .section-label { color: var(--slate); }
.ic-rubric { display: flex; flex-direction: column; gap: var(--s6); margin-top: var(--s10); }
.ic-rubric-row { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s6); }
.ic-rubric-dim { font-family: var(--font-body); font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--primary); margin-bottom: var(--s2); }
.ic-rubric-q { font-size: var(--text-sm); font-weight: 500; color: var(--text); margin-bottom: var(--s3); }
.ic-select { width: 100%; padding: var(--s3) var(--s4); border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-2); color: var(--text); font-size: var(--text-sm); font-family: var(--font-body); cursor: pointer; margin-bottom: var(--s3); }
.ic-benchmark { font-size: var(--text-xs); color: var(--text-faint); line-height: 1.5; border-top: 1px solid var(--divider); padding-top: var(--s3); }
.ic-result { background: var(--surface-offset); border: 1px solid var(--border); border-radius: var(--r-xl); padding: var(--s8); margin-top: var(--s8); }
.ic-score-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--s3); }
.ic-score-label { font-family: var(--font-body); font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-faint); }
.ic-score-num { font-family: var(--font-display); font-size: var(--text-xl); color: var(--primary); }
.ic-score-band { font-size: var(--text-sm); font-weight: 700; color: var(--gold); margin-top: var(--s4); margin-bottom: var(--s2); }
.ic-score-narrative { font-size: var(--text-sm); color: var(--text); line-height: 1.6; }

/* ===== MARKET CONTEXT BAR ===== */
.market-context-bar { display: flex; flex-wrap: wrap; gap: var(--s4) var(--s8); padding: var(--s5) var(--s10); background: color-mix(in oklab, var(--primary), transparent 92%); border-top: 1px solid var(--primary-hi); font-family: var(--font-body); font-size: var(--text-xs); color: var(--text-muted); align-items: center; justify-content: center; }
.mc-stat { color: var(--text); }
.mc-stat strong { color: var(--primary); font-weight: 600; margin-right: 2px; }
.mc-src { color: var(--text-faint); font-size: 0.8em; }
.mc-div { color: var(--text-faint); }

/* ===== BENCHMARK LABELS ===== */
.sc-benchmark { display: block; font-size: var(--text-xs); font-weight: 400; color: var(--text-faint); font-family: var(--font-body); letter-spacing: 0; text-transform: none; margin-top: 2px; line-height: 1.4; }
.sc-range { width: 100%; accent-color: var(--primary); }
.bvb-factor-label { font-weight: 500; color: var(--text); font-size: var(--text-sm); margin-bottom: var(--s2); }
.bvb-factor-hint { font-size: var(--text-xs); color: var(--text-faint); line-height: 1.5; margin-bottom: var(--s3); }
.bvb-benchmark { display: block; font-size: var(--text-xs); color: var(--text-faint); margin-bottom: var(--s3); line-height: 1.4; }

/* ===== UTILITY ===== */
.hide { display: none !important; }
.text-primary { color: var(--primary); }
.text-gold { color: var(--gold); }
.text-muted { color: var(--text-muted); }
.font-display { font-family: var(--font-display); }
.italic { font-style: italic; }
.divider { height: 1px; background: var(--divider); margin-block: var(--s6); }