/* ============================================================
   NCFC Website — Styles
   ============================================================ */

/* Design Tokens */
:root {
  --navy: #1B3A5C;
  --steel-blue: #2E5984;
  --light-blue: #3A6B96;
  --gold: #C9953C;
  --gold-hover: #B8862E;
  --white: #FFFFFF;
  --light-gray: #F2F6FA;
  --dark-text: #1A1A2E;
  --medium-text: #444444;
  --light-text: #777777;
  --border: #E0E4E8;

  --font-body: 'Merriweather', 'Georgia', serif;
  --font-heading: 'Inter', 'Arial', sans-serif;

  --max-width: 1100px;
  --section-padding: 120px 0;
  --content-padding: 0 24px;

  --transition-fast: 0.2s ease;
  --transition-medium: 0.4s ease;
  --transition-slow: 0.8s ease;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--dark-text);
  line-height: 1.75;
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  cursor: default;
}

/* Override Plotly crosshair cursor leak */
.section, .container, .pillar-card, .stack-box, .flow-step,
.waterfall-layer, .waterfall-static, .callout-box, .doctrine-callout,
.comparison-table, .bargain-text, .zone-card, .cta-card,
.arch-section, .arch-section-content, .arch-toc,
.lifecycle-panel, .hero-stat, .hero-headline, .hero-subheadline,
.body-text, .section-lead, .section-label, .section-title,
p, h1, h2, h3, h4, td, th, li, span, div {
  cursor: default;
}

a, button, .btn, .overlay-trigger, .overlay-close,
.arch-section-title, .arch-toc a, summary,
input, select, textarea, label {
  cursor: pointer;
}

input[type="range"] {
  cursor: grab;
}

input[type="range"]:active {
  cursor: grabbing;
}

img {
  max-width: 100%;
}

/* ============================================================
   Progress Bar
   ============================================================ */
#progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--gold);
  width: 0%;
  z-index: 1000;
  transition: width 0.1s linear;
}

/* ============================================================
   Sections
   ============================================================ */
.section {
  padding: var(--section-padding);
  position: relative;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--content-padding);
}

.section--white { background: var(--white); }
.section--gray  { background: var(--light-gray); }
.section--navy  { background: var(--navy); color: var(--white); }

.full-viewport {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================================
   Fade-in Animation
   ============================================================ */
.animate-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.animate-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.animate-in:nth-child(2) { transition-delay: 0.1s; }
.animate-in:nth-child(3) { transition-delay: 0.2s; }
.animate-in:nth-child(4) { transition-delay: 0.3s; }
.animate-in:nth-child(5) { transition-delay: 0.4s; }
.animate-in:nth-child(6) { transition-delay: 0.5s; }

/* ============================================================
   Typography
   ============================================================ */
.hero-headline {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 3.5rem;
  line-height: 1.15;
  color: white;
  max-width: 900px;
  margin: 0 auto 24px;
  text-align: center;
}

.hero-subheadline {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1.25rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.8);
  max-width: 700px;
  margin: 0 auto 40px;
  text-align: center;
}

.hero-stat {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: rgba(255,255,255,0.5);
  margin-top: 60px;
  text-align: center;
}

.hero-stat .stat-line {
  display: block;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  margin-bottom: 6px;
  color: rgba(255,255,255,0.5);
}

.hero-stat .stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold);
  display: block;
  font-family: 'Courier New', monospace;
  letter-spacing: 0.05em;
}

.section-label {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.85rem;
  line-height: 1;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--steel-blue);
  margin-bottom: 12px;
}

.section--navy .section-label {
  color: rgba(255,255,255,0.6);
}

.section-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 2.2rem;
  line-height: 1.25;
  color: var(--navy);
  margin-bottom: 32px;
}

.section--navy .section-title {
  color: white;
}

.body-text {
  font-size: 1.125rem;
  line-height: 1.75;
  color: var(--dark-text);
  margin-bottom: 24px;
}

.section--navy .body-text {
  color: rgba(255,255,255,0.9);
}

.section-lead {
  font-size: 1.25rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 48px;
  color: var(--navy);
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  padding: 14px 32px;
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 2px solid transparent;
  text-align: center;
}

.btn--gold {
  background: var(--gold);
  color: white;
}

.btn--gold:hover {
  background: var(--gold-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.btn--outline {
  background: transparent;
  color: var(--gold);
  border-color: var(--gold);
}

.btn--outline:hover {
  background: var(--gold);
  color: white;
}

/* ============================================================
   Overlay Trigger Button
   ============================================================ */
.overlay-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  color: var(--steel-blue);
  background: none;
  border: none;
  cursor: pointer;
  padding: 12px 0;
  margin-top: 24px;
  transition: color var(--transition-fast);
}

.overlay-trigger::after {
  content: "→";
  margin-left: 4px;
  transition: transform var(--transition-fast);
}

.overlay-trigger:hover {
  color: var(--gold);
}

.overlay-trigger:hover::after {
  transform: translateX(4px);
}

/* ============================================================
   Pillar Cards (Section 2)
   ============================================================ */
.pillar-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.pillar-card {
  background: var(--light-gray);
  padding: 32px 24px;
  border-radius: 8px;
  text-align: center;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.pillar-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.pillar-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  color: var(--steel-blue);
}

.pillar-icon svg {
  width: 48px;
  height: 48px;
}

.card-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.1rem;
  line-height: 1.35;
  color: var(--navy);
  margin-bottom: 8px;
}

.card-text {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--medium-text);
}

/* ============================================================
   Sovereign Stack (Section 3)
   ============================================================ */
.sovereign-stack {
  max-width: 600px;
  margin: 32px auto 0;
}

.stack-item {
  position: relative;
}

.stack-box {
  padding: 20px 24px;
  border: 2px solid var(--border);
  background: white;
  border-radius: 8px;
}

.stack-box--ncfc {
  border-color: var(--gold);
  background: rgba(201,149,60,0.05);
  box-shadow: 0 0 0 3px rgba(201,149,60,0.15);
}

.stack-box h3 {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  color: var(--navy);
  margin: 0 0 4px;
}

.stack-box p {
  font-size: 0.9rem;
  color: var(--medium-text);
  margin: 0;
  line-height: 1.5;
}

.stack-arrow {
  text-align: center;
  padding: 8px 0;
  color: var(--light-text);
  font-size: 1.5rem;
}

.callout-box {
  background: rgba(46,89,132,0.06);
  border-left: 4px solid var(--steel-blue);
  padding: 20px 24px;
  margin-top: 32px;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--dark-text);
  border-radius: 0 6px 6px 0;
  font-style: italic;
}

/* ============================================================
   Flow Diagram (Section 4)
   ============================================================ */
.flow-diagram {
  max-width: 700px;
  margin: 32px auto 0;
}

.flow-step {
  background: white;
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 24px;
}

.flow-step--highlight {
  border-color: var(--gold);
  background: rgba(201,149,60,0.03);
}

.flow-step-number {
  display: inline-block;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--steel-blue);
  color: white;
  text-align: center;
  line-height: 32px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  margin-right: 12px;
  vertical-align: middle;
}

.flow-step-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  color: var(--navy);
  vertical-align: middle;
}

.flow-step-desc {
  margin-top: 8px;
  font-size: 0.95rem;
  color: var(--medium-text);
  padding-left: 44px;
}

.flow-step-sub {
  font-size: 0.9rem;
  color: var(--light-text);
  margin-top: 4px;
  padding-left: 44px;
  font-style: italic;
}

.flow-arrow {
  text-align: center;
  padding: 8px 0;
  font-size: 1.5rem;
  color: var(--light-text);
}

.ncb-tranches {
  list-style: none;
  padding: 0;
  margin: 12px 0 0 44px;
}

.ncb-tranches li {
  padding: 4px 0;
  font-size: 0.9rem;
  font-family: var(--font-heading);
}

.tranche-a { color: #2E7D32; font-weight: 600; }
.tranche-b { color: var(--steel-blue); font-weight: 500; }
.tranche-r { color: var(--gold); font-weight: 500; }

/* ============================================================
   Waterfall Static (Section 5)
   ============================================================ */
.waterfall-static {
  max-width: 600px;
  margin: 32px auto 0;
}

.waterfall-layer {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  margin-bottom: 2px;
  border-radius: 4px;
  font-family: var(--font-heading);
  font-size: 0.9rem;
}

.waterfall-layer-label {
  font-weight: 600;
  color: white;
  flex: 1;
}

.waterfall-layer-desc {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.85);
  margin-left: auto;
}

.wf-green      { background: #4CAF50; }
.wf-green-light { background: #66BB6A; }
.wf-orange     { background: #FFA726; }
.wf-orange-dark { background: #FF9800; }
.wf-red-light  { background: #FF7043; }
.wf-red        { background: #EF5350; }
.wf-gold       { background: #CE8B3A; }
.wf-red-dark   { background: #C62828; }

.waterfall-divider {
  text-align: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--light-text);
  padding: 12px 0;
  border-top: 2px dashed var(--border);
  border-bottom: 2px dashed var(--border);
  margin: 8px 0;
}

.waterfall-cap {
  text-align: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--navy);
  margin-top: 12px;
  padding: 8px;
  background: rgba(27,58,92,0.06);
  border-radius: 4px;
}

/* ============================================================
   Comparison Table (Section 6)
   ============================================================ */
.comparison-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 32px 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.comparison-table thead th {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  padding: 16px 20px;
  text-align: left;
}

.comparison-table thead th:first-child {
  background: #f0e8e8;
  color: #8B0000;
}

.comparison-table thead th:last-child {
  background: rgba(46,89,132,0.1);
  color: var(--navy);
}

.comparison-table tbody td {
  padding: 14px 20px;
  font-size: 0.95rem;
  line-height: 1.6;
  border-bottom: 1px solid var(--border);
  background: white;
}

.comparison-table tbody tr:last-child td {
  border-bottom: none;
}

.comparison-table tbody td:first-child {
  color: var(--medium-text);
}

.comparison-table tbody td:last-child {
  color: var(--navy);
  font-weight: 500;
}

.comparison-table tbody tr:hover td {
  background: rgba(46,89,132,0.02);
}

/* ============================================================
   Bargain & Doctrine (Section 6)
   ============================================================ */
.bargain-text {
  margin: 40px 0;
}

.bargain-text p {
  margin-bottom: 16px;
}

.doctrine-callout {
  background: rgba(27,58,92,0.04);
  border-left: 4px solid var(--gold);
  padding: 24px;
  margin: 32px 0;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--dark-text);
}

/* ============================================================
   LTRF Zones (Section 7)
   ============================================================ */
.ltrf-zones {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 32px 0;
}

.zone-card {
  padding: 28px 24px;
  border-radius: 8px;
  border: 2px solid var(--border);
  background: white;
}

.zone-card h3 {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.1rem;
  margin: 0 0 8px;
  color: var(--navy);
}

.zone-label {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0 0 8px;
}

.zone-card p:last-child {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--medium-text);
  margin: 0;
}

.zone--good { border-color: #C8E6C9; }
.zone--good .zone-label { color: #2E7D32; }

.zone--normal { border-color: #BBDEFB; }
.zone--normal .zone-label { color: var(--steel-blue); }

.zone--stressed { border-color: #FFCDD2; }
.zone--stressed .zone-label { color: #C62828; }

/* ============================================================
   Architecture Section (Section 8)
   ============================================================ */
.arch-controls {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.arch-controls button {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  padding: 8px 16px;
  border: 1px solid var(--border);
  background: white;
  border-radius: 4px;
  cursor: pointer;
  color: var(--medium-text);
  transition: all var(--transition-fast);
}

.arch-controls button:hover {
  border-color: var(--steel-blue);
  color: var(--navy);
}

.arch-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 48px;
  margin-top: 32px;
}

.arch-toc {
  position: sticky;
  top: 24px;
  align-self: start;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
}

.arch-toc a {
  display: block;
  padding: 8px 12px;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: var(--medium-text);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: all var(--transition-fast);
  line-height: 1.4;
}

.arch-toc a:hover {
  color: var(--navy);
  background: rgba(46,89,132,0.04);
}

.arch-toc a.active {
  color: var(--navy);
  font-weight: 600;
  border-left-color: var(--gold);
}

.arch-section {
  border-bottom: 1px solid var(--border);
}

.arch-section-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--navy);
  padding: 16px 0;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0;
  transition: color var(--transition-fast);
}

.arch-section-title:hover {
  color: var(--steel-blue);
}

.arch-section-title::after {
  content: "+";
  font-size: 1.2rem;
  color: var(--light-text);
  transition: transform var(--transition-fast);
  flex-shrink: 0;
  margin-left: 16px;
}

.arch-section.expanded .arch-section-title::after {
  content: "\2212";
}

.arch-section-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease;
  padding: 0;
}

.arch-section.expanded .arch-section-content {
  max-height: none;
  padding: 0 0 24px;
}

.arch-section-content p {
  margin-bottom: 16px;
  font-size: 1rem;
  line-height: 1.75;
}

.arch-section-content h3 {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  color: var(--navy);
  margin: 24px 0 8px;
}

.arch-section-content ul,
.arch-section-content ol {
  padding-left: 24px;
  margin-bottom: 16px;
}

.arch-section-content li {
  margin-bottom: 6px;
  font-size: 1rem;
  line-height: 1.7;
}

.arch-section-content blockquote {
  background: rgba(46,89,132,0.06);
  border-left: 4px solid var(--steel-blue);
  padding: 16px 20px;
  margin: 16px 0;
  border-radius: 0 6px 6px 0;
  font-style: italic;
}

/* ============================================================
   CTA Cards (Section 9)
   ============================================================ */
.cta-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin: 48px 0;
}

.cta-card {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 12px;
  padding: 40px 28px;
  text-align: center;
  transition: all var(--transition-fast);
}

.cta-card:hover {
  background: rgba(255,255,255,0.12);
  transform: translateY(-4px);
}

.cta-card-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 20px;
  color: var(--gold);
}

.cta-card-icon svg {
  width: 48px;
  height: 48px;
}

.cta-card h3 {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.2rem;
  color: white;
  margin-bottom: 12px;
}

.cta-card p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.7);
  margin-bottom: 24px;
}

.author-line {
  text-align: center;
  margin-top: 48px;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  color: rgba(255,255,255,0.5);
}

/* ============================================================
   Footer
   ============================================================ */
#footer {
  background: #14293F;
  padding: 40px 24px;
  text-align: center;
}

#footer p {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: rgba(255,255,255,0.4);
  margin: 4px 0;
}

#footer a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  transition: color var(--transition-fast);
  display: inline-block;
  margin-top: 12px;
}

#footer a:hover {
  color: var(--gold);
}

/* ============================================================
   Overlay System
   ============================================================ */
.overlay-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 900;
  transition: opacity var(--transition-medium);
  opacity: 1;
  pointer-events: auto;
}

.overlay-backdrop.hidden {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.overlay-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  border-radius: 12px;
  width: 90vw;
  max-width: 900px;
  max-height: 85vh;
  overflow-y: auto;
  z-index: 950;
  padding: 40px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  transition: opacity var(--transition-medium), transform var(--transition-medium), visibility var(--transition-medium);
  opacity: 1;
  visibility: visible;
}

.overlay-panel.hidden {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transform: translate(-50%, -48%);
}

.overlay-panel--narrow {
  max-width: 500px;
}

.overlay-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.06);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--medium-text);
  transition: all var(--transition-fast);
  line-height: 1;
}

.overlay-close:hover {
  background: rgba(0,0,0,0.1);
  color: var(--dark-text);
}

.overlay-panel h2 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--navy);
  margin: 0 0 24px;
}

/* ============================================================
   Overlay B: Actuarial Distribution Model
   ============================================================ */
.overlay-panel--wide {
  max-width: 1000px;
}

.actuarial-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  align-items: start;
}

.actuarial-controls-section {
  background: var(--light-gray);
  padding: 20px;
  border-radius: 8px;
}

.actuarial-controls-label {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--medium-text);
  margin: 0 0 12px;
}

.actuarial-controls-sublabel {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  color: var(--light-text);
  margin: 0 0 8px;
}

.scenario-toggles {
  display: flex;
  gap: 4px;
  background: var(--border);
  padding: 3px;
  border-radius: 6px;
  margin-bottom: 20px;
}

.scenario-btn {
  flex: 1;
  padding: 6px 8px;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--medium-text);
  background: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.scenario-btn.active {
  background: white;
  color: var(--navy);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.actuarial-slider-group {
  margin-bottom: 16px;
}

.actuarial-slider-group label {
  display: block;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.8rem;
  color: var(--navy);
  margin-bottom: 6px;
}

.actuarial-slider {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  outline: none;
}

.actuarial-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--steel-blue);
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.actuarial-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--steel-blue);
  cursor: pointer;
  border: none;
}

.actuarial-slider-labels {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-heading);
  font-size: 0.7rem;
  color: var(--light-text);
  margin-top: 4px;
}

.actuarial-slider-value {
  font-weight: 700;
  color: var(--steel-blue);
}

.actuarial-chart-area {
  min-height: 450px;
}

.actuarial-desc {
  margin-top: 20px;
  padding: 20px;
  background: var(--light-gray);
  border-radius: 8px;
  font-size: 0.95rem;
  line-height: 1.65;
}

.actuarial-desc p {
  margin: 0 0 12px;
}

.actuarial-desc p:last-child {
  margin-bottom: 0;
}

.actuarial-sources {
  margin-top: 16px;
  padding: 16px;
  background: rgba(46,89,132,0.03);
  border-radius: 6px;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  color: var(--medium-text);
  line-height: 1.5;
}

.actuarial-sources strong {
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.actuarial-sources ul {
  list-style: disc;
  padding-left: 16px;
  margin: 6px 0 0;
}

.actuarial-sources li {
  margin-bottom: 3px;
}

/* ============================================================
   Portfolio Solvency Embed (Section 8)
   ============================================================ */
.portfolio-solvency-embed {
  margin: 32px 0;
  padding: 32px;
  background: var(--light-gray);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.ps-framing {
  margin-bottom: 24px;
}

.ps-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--navy);
  margin: 0 0 12px;
}

.ps-framing p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--medium-text);
  margin: 0;
}

.ps-controls {
  display: flex;
  gap: 24px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.ps-control-group {
  flex: 1;
  min-width: 180px;
}

.ps-control-group label {
  display: block;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.8rem;
  color: var(--navy);
  margin-bottom: 6px;
}

.ps-control-group input[type="range"] {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  outline: none;
}

.ps-control-group input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--steel-blue);
  cursor: pointer;
}

.ps-control-group input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--steel-blue);
  cursor: pointer;
  border: none;
}

.ps-control-group select {
  width: 100%;
  padding: 8px 12px;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: white;
  color: var(--navy);
  outline: none;
}

.ps-slider-labels {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-heading);
  font-size: 0.7rem;
  color: var(--light-text);
  margin-top: 4px;
}

.ps-metrics {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.ps-metric {
  flex: 1;
  min-width: 140px;
  background: var(--navy);
  padding: 16px;
  border-radius: 8px;
  text-align: center;
}

.ps-metric-label {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.7rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ps-metric-value {
  display: block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.3rem;
  color: white;
}

.ps-insight {
  margin-top: 20px;
}

/* ============================================================
   Overlay: Cost Overrun Waterfall Slider
   ============================================================ */
.waterfall-interactive {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

.slider-container {
  text-align: center;
}

.slider-container label {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--navy);
  display: block;
  margin-bottom: 16px;
}

#cost-slider {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  outline: none;
}

#cost-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--gold);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

#cost-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--gold);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  border: none;
}

.slider-value {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 2rem;
  color: var(--navy);
  margin: 12px 0;
}

#waterfall-layers .wf-layer {
  padding: 12px 16px;
  margin-bottom: 2px;
  border-radius: 4px;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: white;
  opacity: 0.2;
  transition: all var(--transition-medium);
  display: flex;
  align-items: center;
}

#waterfall-layers .wf-layer.active {
  opacity: 1;
}

#waterfall-layers .wf-layer .wf-layer-label {
  font-weight: 600;
  flex: 1;
}

.waterfall-desc {
  margin-top: 24px;
  padding: 20px;
  background: var(--light-gray);
  border-radius: 8px;
  font-size: 0.95rem;
  line-height: 1.65;
  grid-column: 1 / -1;
}

/* ============================================================
   Overlay C: Lifecycle Comparison
   ============================================================ */
.lifecycle-event {
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 24px;
}

.lifecycle-event:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.lifecycle-stage {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  color: var(--navy);
  margin: 0 0 12px;
}

.lifecycle-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.lifecycle-panel {
  padding: 16px 20px;
  border-radius: 8px;
  font-size: 0.9rem;
  line-height: 1.6;
}

.lifecycle-panel h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 8px;
}

.lifecycle-panel p {
  margin: 0;
  color: var(--medium-text);
}

.panel--status-quo {
  background: rgba(139,0,0,0.04);
  border-left: 3px solid #C62828;
}

.panel--status-quo h4 {
  color: #C62828;
}

.panel--ncfc {
  background: rgba(46,89,132,0.04);
  border-left: 3px solid var(--steel-blue);
}

.panel--ncfc h4 {
  color: var(--steel-blue);
}

/* ============================================================
   Overlay D: LTRF Chart
   ============================================================ */
.ltrf-toggle,
.trust-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.ltrf-toggle button,
.trust-toggle button {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  padding: 10px 20px;
  border: 2px solid var(--border);
  background: white;
  border-radius: 6px;
  cursor: pointer;
  color: var(--medium-text);
  transition: all var(--transition-fast);
  font-weight: 500;
}

.ltrf-toggle button.active,
.trust-toggle button.active {
  border-color: var(--steel-blue);
  color: var(--navy);
  background: rgba(46,89,132,0.05);
  font-weight: 600;
}

.ltrf-toggle button:hover,
.trust-toggle button:hover {
  border-color: var(--steel-blue);
}

#ltrf-chart {
  width: 100%;
  height: 350px;
  margin-bottom: 20px;
}

#ltrf-description,
#trust-description {
  padding: 16px 20px;
  background: var(--light-gray);
  border-radius: 8px;
  font-size: 0.95rem;
  line-height: 1.65;
}

/* ============================================================
   Overlay A: Trust Diagram
   ============================================================ */
#trust-diagram {
  min-height: 300px;
  margin-bottom: 16px;
}

/* ============================================================
   Overlay E: Request Form
   ============================================================ */
#request-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

#request-form label {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--navy);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#request-form input,
#request-form textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  outline: none;
  transition: border-color var(--transition-fast);
}

#request-form input:focus,
#request-form textarea:focus {
  border-color: var(--steel-blue);
}

#request-form textarea {
  min-height: 80px;
  resize: vertical;
}

#form-confirmation {
  text-align: center;
  padding: 40px 20px;
  font-size: 1.1rem;
  color: var(--navy);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
  .pillar-cards { grid-template-columns: repeat(2, 1fr); }
  .cta-cards { grid-template-columns: repeat(2, 1fr); }
  .ltrf-zones { grid-template-columns: repeat(2, 1fr); }

  .arch-layout { grid-template-columns: 1fr; }

  .arch-toc {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    max-height: none;
  }

  .arch-toc a {
    font-size: 0.8rem;
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 4px;
    border-left-width: 1px;
  }

  .arch-toc a.active {
    border-color: var(--gold);
  }
}

@media (max-width: 768px) {
  :root {
    --section-padding: 80px 0;
  }

  .hero-headline { font-size: 2.2rem; }
  .hero-subheadline { font-size: 1.05rem; }
  .section-title { font-size: 1.6rem; }

  .pillar-cards { grid-template-columns: 1fr; }
  .cta-cards { grid-template-columns: 1fr; }
  .ltrf-zones { grid-template-columns: 1fr; }

  .comparison-table { font-size: 0.85rem; }
  .comparison-table th,
  .comparison-table td { padding: 10px 12px; }

  .lifecycle-columns { grid-template-columns: 1fr; }
  .waterfall-interactive { grid-template-columns: 1fr; }
  .actuarial-layout { grid-template-columns: 1fr; }

  .overlay-panel {
    width: 95vw;
    max-height: 90vh;
    padding: 24px;
    border-radius: 8px;
  }

  .flow-diagram { margin: 24px auto 0; }

  .ltrf-toggle,
  .trust-toggle {
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .hero-headline { font-size: 1.8rem; }
  .section-title { font-size: 1.4rem; }

  .overlay-panel {
    width: 100vw;
    max-height: 100vh;
    border-radius: 0;
    top: 0;
    left: 0;
    transform: none;
    padding: 20px;
  }

  .overlay-panel.hidden {
    transform: translateY(10px);
  }
}
