/* =============================================================
   DOMINION TRUST CAPITAL — RCMM-style design system
   Warm-traditional private investment aesthetic.
   Spectral + Work Sans. Pine green bands, antique gold accent,
   square cards, no shadows.
   ============================================================= */

@import url('https://fonts.googleapis.com/css2?family=Spectral:ital,wght@0,400;0,500;0,600;1,400&family=Work+Sans:wght@400;500;600&display=swap');

:root {
  /* Warm neutrals */
  --ivory: #F8F4EC;
  --bone:  #EFE7D8;
  --paper: #FFFFFF;

  /* Pines */
  --pine-900:    #122A21;
  --pine-700:    #173328;
  --pine-600:    #1B3B2F;
  --pine-nav:    #33614E;
  --pine-navdeep:#2A5242;
  --pine-400:    #2C5645;
  --pine-50:     #EAF0EC;

  /* Gold */
  --gold-500: #B98F4A;
  --gold-300: #D9BD86;
  --gold-600: #7E5E2B;

  /* Text + rules */
  --ink:    #171F1B;
  --clay-500: #52584F;
  --clay-400: #62675E;
  --rule:  #D9D2C0;

  --error: #9A3B32;

  /* Type */
  --serif: 'Spectral', Georgia, serif;
  --sans:  'Work Sans', system-ui, -apple-system, sans-serif;

  /* Layout */
  --container: 80rem;
  --container-narrow: 48rem;
  --gutter: 24px;
  --section: 64px;
  --section-lg: 80px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --t-reveal: 0.7s;

  /* ---- Legacy DTC aliases → RCMM tokens ----
     Old starter pages (team, platform, performance, faq, terms,
     privacy, historical-returns, account-types) have inline styles
     using these names. Mapping them here means those pages render
     correctly without rewriting every inline rule. */
  --forest:       var(--pine-600);
  --forest-deep:  var(--pine-900);
  --forest-mid:   var(--pine-400);
  --sage:         var(--pine-400);
  --sage-soft:    var(--pine-50);
  --gold:         var(--gold-500);
  --gold-soft:    var(--gold-300);
  --gold-deep:    var(--gold-600);
  --accent:       var(--gold-500);
  --accent-soft:  var(--gold-300);
  --accent-deep:  var(--gold-600);
  --mute:         var(--clay-500);
  --mute-soft:    var(--clay-400);
  --body:         var(--ink);
  --cream:        var(--ivory);
  --rule-soft:    var(--rule);
  --mono:         var(--sans);
  --transition:   0.3s var(--ease);
  --radius:       3px;
  --radius-lg:    4px;
}

@media (min-width: 1024px) {
  :root { --gutter: 40px; --section: 80px; --section-lg: 96px; }
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  background: var(--ivory);
  color: var(--clay-500);
  font-size: 15px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; background: none; border: 0; color: inherit; }
ul { list-style: none; }

@media (max-width: 640px) {
  .small, .caption, .footer-meta, .footer-link { font-size: 13px !important; }
}

/* ---- Typography ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.hero-h1 { font-size: clamp(34px, 4.5vw, 50px); line-height: 1.12; }
h1 { font-size: clamp(30px, 3.5vw, 36px); line-height: 1.15; }
h2 { font-size: 30px; line-height: 1.2; }
h3 { font-size: 20px; line-height: 1.3; }
@media (min-width: 768px) { h3 { font-size: 24px; } }

em { font-style: italic; color: var(--gold-600); }
.on-dark em { color: var(--gold-300); }

.eyebrow {
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-600);
  display: inline-block;
  margin-bottom: 12px;
}
.on-dark .eyebrow, .eyebrow.on-dark { color: var(--gold-300); }

p { max-width: 36rem; }
p.full { max-width: none; }
p + p { margin-top: 1em; }

.longform {
  font-size: 17px;
  line-height: 1.8;
  color: var(--clay-500);
}
@media (min-width: 768px) { .longform { font-size: 18px; } }
.longform p + p { margin-top: 1.2em; }

.small, .caption { font-size: 13px; color: var(--clay-400); }

.lead {
  font-size: 17px;
  line-height: 1.55;
  color: var(--clay-500);
  max-width: 36rem;
}
.on-dark .lead { color: rgba(248, 244, 236, 0.86); }

/* ---- Layout ---- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.container-narrow { width: 100%; max-width: var(--container-narrow); margin: 0 auto; padding: 0 var(--gutter); }

.band { padding: var(--section) 0; }
.band-lg { padding: var(--section-lg) 0; }
.band-ivory { background: var(--ivory); }
.band-bone { background: var(--bone); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.band-paper { background: var(--paper); }
.band-pine { background: var(--pine-600); color: rgba(248, 244, 236, 0.86); }
.band-pine h1, .band-pine h2, .band-pine h3, .on-dark h1, .on-dark h2, .on-dark h3 { color: var(--ivory); }
.band-pine .lead, .on-dark .lead { color: rgba(248, 244, 236, 0.86); }
.band-pine .eyebrow, .on-dark .eyebrow { color: var(--gold-300); }

.section-intro { margin-bottom: 40px; max-width: 42rem; }
.section-intro.center { text-align: center; margin-left: auto; margin-right: auto; }
.section-intro.center p { margin-left: auto; margin-right: auto; }
.section-intro h2 { margin-top: 4px; margin-bottom: 14px; }

/* ---- Page headers ---- */
.page-header { background: var(--pine-600); color: var(--ivory); padding: 72px 0; }
.page-header h1 { color: var(--ivory); }
.page-header .eyebrow { color: var(--gold-300); }
.page-header .lead { color: rgba(248, 244, 236, 0.82); margin-top: 20px; }

.page-header.photo { position: relative; background: var(--pine-900); overflow: hidden; padding: 96px 0; }
.page-header.photo .ph-bg { position: absolute; inset: 0; z-index: 0; }
.page-header.photo .ph-bg img { width: 100%; height: 100%; object-fit: cover; }
.page-header.photo .ph-bg::after { content: ''; position: absolute; inset: 0; background: rgba(18, 42, 33, 0.5); }
.page-header.photo .ph-panel {
  position: relative; z-index: 1;
  background: rgba(18, 42, 33, 0.8);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid rgba(248, 244, 236, 0.25);
  border-radius: 4px;
  padding: 32px;
  max-width: 42rem;
}
@media (min-width: 768px) { .page-header.photo .ph-panel { padding: 40px; } }

.page-header.paper { background: var(--bone); color: var(--ink); padding: 64px 0; border-bottom: 1px solid var(--rule); }
.page-header.paper .eyebrow { color: var(--gold-600); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 14px;
  border-radius: 3px;
  border: 1px solid transparent;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
  min-height: 44px;
  text-decoration: none;
}
.btn-gold { background: var(--gold-500); color: var(--ink); }
.btn-gold:hover, .btn-gold:focus-visible { background: var(--gold-300); }

.btn-ghost, .btn-secondary { background: transparent; color: var(--ink); border: 1px solid var(--rule); }
.btn-ghost:hover, .btn-secondary:hover { background: var(--pine-50); border-color: var(--pine-400); }

.btn-ghost-light { background: transparent; color: var(--ivory); border: 1px solid rgba(248, 244, 236, 0.4); }
.btn-ghost-light:hover { background: rgba(248, 244, 236, 0.08); border-color: var(--ivory); }

.linkaction {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 500;
  font-size: 14px;
  border-bottom: 1px solid var(--ink);
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
  min-height: 44px;
}
.linkaction:hover { color: var(--gold-600); border-color: var(--gold-600); }
.linkaction.light { color: var(--ivory); border-color: var(--ivory); }
.linkaction.light:hover { color: var(--gold-300); border-color: var(--gold-300); }

/* ---- Cards ---- */
.card {
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 32px;
  border-radius: 0;
  display: flex;
  flex-direction: column;
}
.card-emphasis { border-top: 2px solid var(--gold-500); }
.card .eyebrow { margin-bottom: 12px; }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--clay-500); }

a.card { color: inherit; transition: border-color 0.3s var(--ease); }
a.card:hover { border-color: var(--pine-400); }
a.card:hover h3 { color: var(--gold-600); }

.card.with-image { padding: 0; }
.card.with-image .card-img { width: 100%; aspect-ratio: 4 / 3; overflow: hidden; background: var(--bone); }
.card.with-image .card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.card.with-image:hover .card-img img { transform: scale(1.03); }
.card.with-image .card-body { padding: 24px 28px 28px; display: flex; flex-direction: column; gap: 10px; }
.card.with-image .card-body h3 { font-size: 20px; }
.card.with-image .card-body p { font-size: 14.5px; }

/* Grids */
.grid { display: grid; gap: 28px; }
@media (min-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); gap: 24px; }
}
@media (min-width: 1024px) { .grid { gap: 32px; } }

.split { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 56px; } }
.split-img { aspect-ratio: 4 / 3; overflow: hidden; }
.split-img img { width: 100%; height: 100%; object-fit: cover; }

/* ---- Stat tiles ---- */
.stat { background: var(--paper); border: 1px solid var(--rule); padding: 24px 28px; display: flex; flex-direction: column; gap: 6px; }
.stat-label { font-size: 11.5px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-600); }
.stat-figure { font-family: var(--serif); font-weight: 400; font-size: clamp(26px, 2.6vw, 34px); color: var(--ink); line-height: 1; }
.stat-caption { font-size: 13px; color: var(--clay-400); }

/* ---- Hero (video) ---- */
.hero { position: relative; background: var(--pine-900); color: var(--ivory); overflow: hidden; min-height: 72vh; display: flex; align-items: center; }
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-media video, .hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 2.4s ease-in-out; }
.hero-media video.is-active, .hero-media .fallback { opacity: 1; }
.hero-scrim { position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(18,42,33,0.5) 0%, rgba(18,42,33,0.3) 45%, rgba(18,42,33,0.75) 100%); }
.hero-inner { position: relative; z-index: 2; width: 100%; padding: 120px 0 72px; }
.hero h1 { color: var(--ivory); max-width: 24ch; }
.hero h1 em { color: var(--gold-300); }
.hero .lead { color: rgba(248, 244, 236, 0.88); margin-top: 24px; }
.hero .hero-cta { display: flex; gap: 14px; margin-top: 32px; flex-wrap: wrap; }
.hero .eyebrow { color: var(--gold-300); margin-bottom: 20px; }

@media (max-width: 640px) {
  .hero { min-height: 62vh; }
  .hero-inner { padding: 96px 0 56px; }
  .hero .hero-cta { flex-direction: column; align-items: stretch; }
  .hero .hero-cta .btn { width: 100%; }
}

/* ---- Top nav ---- */
.site-header { background: var(--pine-nav); color: var(--ivory); position: sticky; top: 0; z-index: 100; }
.header-inner { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 68px; }
.logo-link { display: flex; align-items: center; gap: 10px; }
.logo-img { height: 32px; width: auto; }

.desktop-nav { display: none; align-items: center; gap: 24px; }
@media (min-width: 1024px) { .desktop-nav { display: flex; } }
.nav-link, .nav-dropdown-toggle {
  color: var(--ivory);
  font-size: 14px;
  font-weight: 500;
  padding: 6px 2px;
  position: relative;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  transition: color 0.3s var(--ease);
}
.nav-link:hover, .nav-dropdown-toggle:hover { color: var(--gold-300); }
.nav-link.active, .nav-dropdown.active > .nav-dropdown-toggle { color: var(--gold-300); }
.nav-link.active::after, .nav-dropdown.active > .nav-dropdown-toggle::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--gold-300);
}

.nav-dropdown { position: relative; }
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 280px;
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 12px 0;
  color: var(--ink);
}
.nav-dropdown.open .nav-dropdown-menu { display: block; }
@media (hover: hover) and (pointer: fine) { .nav-dropdown:hover .nav-dropdown-menu { display: block; } }
.dropdown-link { display: block; padding: 12px 20px; color: var(--ink); font-size: 14px; transition: background 0.2s var(--ease); }
.dropdown-link:hover { background: var(--pine-50); color: var(--gold-600); }
.dropdown-title { display: block; font-weight: 500; }
.dropdown-sub { display: block; font-size: 12px; color: var(--clay-400); margin-top: 2px; }

.header-cta { display: none; align-items: center; gap: 10px; }
@media (min-width: 1024px) { .header-cta { display: flex; } }
.header-cta .btn { padding: 10px 18px; min-height: 40px; font-size: 13px; }
.header-cta .btn-ghost-light { color: var(--ivory); border-color: rgba(248, 244, 236, 0.5); }

.hamburger { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; color: var(--ivory); }
@media (min-width: 1024px) { .hamburger { display: none; } }
.hamburger svg { width: 22px; height: 22px; }

.mobile-nav { position: fixed; inset: 0; background: var(--pine-navdeep); color: var(--ivory); z-index: 200; padding: 20px var(--gutter) 40px; transform: translateX(100%); transition: transform 0.4s var(--ease); overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.mobile-nav.open { transform: translateX(0); }
.mobile-nav-head { display: flex; justify-content: space-between; align-items: center; padding: 4px 0 24px; border-bottom: 1px solid rgba(248, 244, 236, 0.15); margin-bottom: 20px; }
.mobile-nav-head .close { color: var(--ivory); width: 44px; height: 44px; }
.mobile-nav-link { display: block; padding: 14px 0; color: var(--ivory); font-size: 16px; font-weight: 500; border-bottom: 1px solid rgba(248, 244, 236, 0.08); }
.mobile-nav-link:hover, .mobile-nav-link.active { color: var(--gold-300); }
.mobile-cta { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; }

/* ---- Footer ---- */
.site-footer { background: var(--pine-600); color: rgba(248, 244, 236, 0.78); padding: 64px 0 40px; }
.footer-inner { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); display: grid; gap: 40px; }
@media (min-width: 768px) { .footer-inner { grid-template-columns: 1.3fr repeat(3, 1fr); gap: 48px; } }
.footer-logo { height: 44px; width: auto; margin-bottom: 20px; }
.footer-tagline { font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--ivory); line-height: 1.4; margin-bottom: 20px; }
.footer-meta { font-size: 13px; line-height: 1.7; color: rgba(248, 244, 236, 0.6); margin-bottom: 20px; }
.footer-heading { font-size: 11.5px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-300); display: block; margin-bottom: 20px; }
.footer-link { display: block; padding: 6px 0; font-size: 14px; color: rgba(248, 244, 236, 0.76); min-height: 32px; transition: color 0.3s var(--ease); }
.footer-link:hover { color: var(--gold-300); }
.reg-badges { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.reg-badge { display: inline-block; padding: 6px 12px; font-size: 11.5px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-300); border: 1px solid rgba(217, 189, 134, 0.5); border-radius: 3px; }
.footer-bottom { max-width: var(--container); margin: 48px auto 0; padding: 24px var(--gutter) 0; border-top: 1px solid rgba(248, 244, 236, 0.12); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; font-size: 13px; color: rgba(248, 244, 236, 0.5); }
.footer-legal { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-legal a { color: rgba(248, 244, 236, 0.6); }
.footer-legal a:hover { color: var(--gold-300); }

/* ---- Breadcrumbs ---- */
.crumbs { font-size: 11.5px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--clay-400); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }
.crumbs a { color: var(--clay-500); border-bottom: 1px solid transparent; transition: color 0.3s var(--ease), border-color 0.3s var(--ease); }
.crumbs a:hover { color: var(--gold-600); border-color: var(--gold-600); }
.crumbs span { color: var(--rule); }
.on-dark .crumbs { color: rgba(248, 244, 236, 0.6); }
.on-dark .crumbs a { color: rgba(248, 244, 236, 0.8); }
.on-dark .crumbs a:hover { color: var(--gold-300); border-color: var(--gold-300); }

/* ---- Article page ---- */
.article-head { padding: 56px 0 24px; }
.article-meta { font-size: 11.5px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-600); display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }
.article-meta .dot { color: var(--rule); }
.article-head h1 { max-width: 20ch; margin-bottom: 24px; }
.article-head .excerpt { font-family: var(--serif); font-style: italic; font-size: 20px; line-height: 1.5; color: var(--clay-500); max-width: 36rem; padding-bottom: 32px; border-bottom: 1px solid var(--rule); }

.article-cover { padding: 24px 0; }
.article-cover .cover-img { aspect-ratio: 16 / 9; overflow: hidden; max-width: 60rem; margin: 0 auto; }
.article-cover .cover-img img { width: 100%; height: 100%; object-fit: cover; }

.article-body { padding: 40px 0 72px; }
.article-body h2 { font-size: 26px; margin: 40px 0 14px; }
.article-body p { max-width: 36rem; }
.article-body ul { margin: 0 0 24px; }
.article-body ul li { position: relative; padding-left: 20px; margin-bottom: 10px; max-width: 36rem; }
.article-body ul li::before { content: ''; position: absolute; left: 0; top: 12px; width: 10px; height: 1px; background: var(--gold-500); }
.article-body .note { margin: 36px 0; padding: 24px 28px; background: var(--paper); border: 1px solid var(--rule); border-left: 3px solid var(--gold-500); font-family: var(--serif); font-style: italic; font-size: 18px; line-height: 1.55; color: var(--ink); max-width: 40rem; }

/* ---- Accessibility ---- */
a:focus-visible, button:focus-visible { outline: 2px solid var(--gold-500); outline-offset: 2px; border-radius: 2px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .hero-media video, .hero-media img { transition: none !important; }
  .hero-media video.is-active { opacity: 1 !important; }
}

.reveal { opacity: 0; transform: translateY(18px); transition: opacity var(--t-reveal) var(--ease), transform var(--t-reveal) var(--ease); }
.reveal.is-revealed { opacity: 1; transform: translateY(0); }
.reveal-d1 { transition-delay: 0.08s; }
.reveal-d2 { transition-delay: 0.16s; }
.reveal-d3 { transition-delay: 0.24s; }

html, body { overflow-x: clip; }

/* ---- Print ---- */
@media print {
  body { background: #fff; color: #000; }
  .site-header, .site-footer, .mobile-nav, .hero-media, .hero-scrim { display: none !important; }
  .band-pine, .page-header, .on-dark { background: #fff !important; color: #000 !important; }
  .band-pine h1, .band-pine h2, .band-pine h3 { color: #000 !important; }
  a { color: #000 !important; text-decoration: underline; }
  .card { border: 1px solid #999; }
}

/* =============================================================
   DTC-STARTER COMPATIBILITY LAYER
   Styles the legacy class vocabulary used in team, platform,
   performance, calculator and quiz pages — so they render in
   RCMM aesthetic without rebuilding each page.
   ============================================================= */

/* ---- Legacy page-hero → RCMM page header (pine) ---- */
.page-hero {
  background: var(--pine-600);
  color: var(--ivory);
  padding: 72px 0 56px;
  position: relative;
}
.page-hero h1, .page-hero .h1 { color: var(--ivory); font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 3.5vw, 42px); line-height: 1.15; }
.page-hero h1 em, .page-hero .h1 em { color: var(--gold-300); font-style: italic; }
.page-hero .eyebrow { color: var(--gold-300); }
.page-hero .lead { color: rgba(248, 244, 236, 0.86); margin-top: 20px; max-width: 42rem; }

/* ---- Band aliases ---- */
.bg-ivory { background: var(--ivory); }
.bg-bone { background: var(--bone); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.bg-paper { background: var(--paper); }
.dark-section, .bg-dark {
  background: var(--pine-600);
  color: rgba(248, 244, 236, 0.86);
}
.dark-section h1, .dark-section h2, .dark-section h3,
.dark-section .h1, .dark-section .h2, .dark-section .h3 { color: var(--ivory); }
.dark-section em { color: var(--gold-300); font-style: italic; }
.dark-section .eyebrow { color: var(--gold-300); }
.dark-section .lead { color: rgba(248, 244, 236, 0.86); }

/* ---- Section padding utility ---- */
section.section { padding: var(--section) 0; }

/* ---- Button variants used in starter pages ---- */
.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--rule);
}
.btn-outline:hover { background: var(--pine-50); border-color: var(--pine-400); }
.dark-section .btn-outline, .btn-outline-white {
  color: var(--ivory);
  border-color: rgba(248, 244, 236, 0.4);
  background: transparent;
}
.dark-section .btn-outline:hover, .btn-outline-white:hover {
  background: rgba(248, 244, 236, 0.08);
  border-color: var(--ivory);
}
.btn-sm { padding: 10px 18px; min-height: 40px; font-size: 13px; }
.btn-block { display: flex; width: 100%; }

/* Legacy heading classes */
.h1 { font-family: var(--serif); font-weight: 400; color: var(--ink); font-size: clamp(30px, 3.5vw, 42px); line-height: 1.15; }
.h2 { font-family: var(--serif); font-weight: 400; color: var(--ink); font-size: 30px; line-height: 1.2; }

/* ---- CALCULATOR LAYOUT ---- */
.calc-shell {
  display: grid;
  gap: 32px;
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 24px;
}
@media (min-width: 900px) {
  .calc-shell { grid-template-columns: 360px 1fr; gap: 48px; padding: 40px; }
}

.calc-inputs { display: flex; flex-direction: column; gap: 28px; }

.calc-field { display: flex; flex-direction: column; gap: 10px; }
.calc-field-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.calc-field-label {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--clay-500);
}
.calc-field-value {
  font-family: var(--serif);
  font-size: 22px;
  color: var(--ink);
  font-weight: 400;
}

.calc-range, input[type="range"].calc-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 2px;
  background: var(--rule);
  outline: none;
  border-radius: 0;
  padding: 0;
  margin: 8px 0;
  cursor: pointer;
}
.calc-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px; height: 20px;
  background: var(--gold-500);
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid var(--paper);
  box-shadow: 0 0 0 1px var(--gold-600);
  transition: background 0.2s;
}
.calc-range::-webkit-slider-thumb:hover { background: var(--gold-300); }
.calc-range::-moz-range-thumb {
  width: 20px; height: 20px;
  background: var(--gold-500);
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid var(--paper);
  box-shadow: 0 0 0 1px var(--gold-600);
}

.calc-range-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--clay-400);
  margin-top: 4px;
  font-family: var(--sans);
}

.calc-output {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.calc-chart-wrap {
  aspect-ratio: 16 / 10;
  background: var(--ivory);
  border: 1px solid var(--rule);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
}
.calc-chart-wrap canvas, .calc-chart-wrap svg {
  max-width: 100%;
  height: auto;
}

.calc-breakdown {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}
.calc-breakdown > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.calc-breakdown > div > span:first-child,
.calc-breakdown .label {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-600);
}
.calc-breakdown > div > span:last-child,
.calc-breakdown .value {
  font-family: var(--serif);
  font-size: 24px;
  color: var(--ink);
  font-weight: 400;
}

.calc-disclaimer {
  margin-top: 24px;
  padding: 14px 18px;
  background: var(--bone);
  border-left: 2px solid var(--gold-500);
  font-size: 13px;
  color: var(--clay-500);
  font-style: italic;
  line-height: 1.55;
}

/* ---- QUIZ ---- */
.quiz-shell {
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 28px;
  max-width: 44rem;
  margin: 0 auto;
}
@media (min-width: 768px) { .quiz-shell { padding: 40px; } }

.quiz-counter {
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-600);
  margin-bottom: 8px;
}

.quiz-progress {
  background: var(--rule);
  height: 2px;
  margin-bottom: 32px;
  overflow: hidden;
}
.quiz-progress-bar {
  background: var(--gold-500);
  height: 100%;
  transition: width 0.4s var(--ease);
}

.quiz-question {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.3;
  margin-bottom: 24px;
}
@media (min-width: 768px) { .quiz-question { font-size: 28px; } }

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quiz-option {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 3px;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ink);
  text-align: left;
  transition: background 0.2s, border-color 0.2s;
  min-height: 60px;
  width: 100%;
}
.quiz-option:hover { background: var(--pine-50); border-color: var(--pine-400); }
.quiz-option.selected { background: var(--pine-50); border-color: var(--gold-500); }

.quiz-option-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--bone);
  color: var(--gold-600);
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 500;
  flex-shrink: 0;
  border-radius: 2px;
}

.quiz-controls {
  display: flex;
  justify-content: space-between;
  margin-top: 32px;
  gap: 12px;
  flex-wrap: wrap;
}

.swatch {
  display: inline-block;
  width: 32px;
  height: 32px;
  border: 1px solid var(--rule);
  margin-right: 6px;
  vertical-align: middle;
}

/* ---- RESULT CARDS ---- */
.result-card {
  background: var(--pine-600);
  color: var(--ivory);
  padding: 40px 32px;
  text-align: center;
  margin: 32px 0;
  border: 1px solid var(--pine-400);
}
@media (min-width: 768px) { .result-card { padding: 56px 48px; } }
.result-card h2, .result-card h3, .result-card .h2 { color: var(--ivory); font-family: var(--serif); font-weight: 400; }
.result-card .eyebrow { color: var(--gold-300); }
.result-card em { color: var(--gold-300); font-style: italic; }
.result-card p { color: rgba(248, 244, 236, 0.88); max-width: 36rem; margin-left: auto; margin-right: auto; }

.result-headline-huge {
  font-family: var(--serif);
  font-size: clamp(48px, 7vw, 84px);
  color: var(--gold-300);
  font-weight: 400;
  line-height: 1;
  margin: 20px 0;
}

/* ---- FORM INPUTS ---- */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}
.form-group label,
.form-label {
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-600);
}

input[type="text"], input[type="email"], input[type="tel"],
input[type="number"], input[type="password"], input[type="url"],
input[type="search"], textarea, select {
  font-family: var(--sans);
  font-size: 15px;
  padding: 12px 16px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 3px;
  color: var(--ink);
  min-height: 48px;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
  width: 100%;
  line-height: 1.4;
}
textarea {
  min-height: 120px;
  resize: vertical;
  padding: 14px 16px;
}
input::placeholder, textarea::placeholder { color: var(--clay-400); opacity: 0.8; }
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--gold-500);
  box-shadow: 0 0 0 2px rgba(185, 143, 74, 0.2);
}
input:invalid:not(:placeholder-shown) { border-color: var(--error); }

/* ---- PLATFORM feature rows ---- */
.feat-row {
  display: grid;
  gap: 24px;
  padding: 32px 0;
  border-top: 1px solid var(--rule);
  align-items: start;
}
@media (min-width: 768px) {
  .feat-row { grid-template-columns: 80px 1fr; gap: 40px; padding: 40px 0; }
}
.feat-row:last-of-type { border-bottom: 1px solid var(--rule); }
.feat-num {
  font-family: var(--serif);
  font-size: 36px;
  color: var(--gold-500);
  font-weight: 400;
  line-height: 1;
}
.feat-title {
  font-family: var(--serif);
  font-size: 22px;
  color: var(--ink);
  font-weight: 400;
  margin-bottom: 10px;
  line-height: 1.25;
}
.feat-body {
  color: var(--clay-500);
  max-width: 42rem;
  font-size: 15px;
  line-height: 1.65;
}
.dark-section .feat-title { color: var(--ivory); }
.dark-section .feat-body { color: rgba(248, 244, 236, 0.82); }
.dark-section .feat-row { border-color: rgba(248, 244, 236, 0.15); }

/* ---- PERFORMANCE allocation bars ---- */
.bar-row {
  display: grid;
  grid-template-columns: 160px 1fr 60px;
  gap: 16px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
}
@media (max-width: 640px) {
  .bar-row { grid-template-columns: 1fr 50px; grid-template-areas: "label value" "track track"; gap: 8px 12px; }
  .bar-row .bar-label { grid-area: label; }
  .bar-row .bar-value { grid-area: value; }
  .bar-row .bar-track { grid-area: track; }
}
.bar-row:last-of-type { border-bottom: none; }
.bar-label {
  font-family: var(--serif);
  font-size: 17px;
  color: var(--ink);
  font-weight: 400;
}
.bar-track {
  height: 6px;
  background: var(--bone);
  position: relative;
  overflow: hidden;
}
.bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--gold-500);
  transition: width 1.2s var(--ease);
}
.bar-value {
  font-family: var(--serif);
  font-size: 17px;
  color: var(--gold-600);
  text-align: right;
  font-weight: 400;
}
.dark-section .bar-label { color: var(--ivory); }
.dark-section .bar-value { color: var(--gold-300); }
.dark-section .bar-track { background: rgba(248, 244, 236, 0.1); }
.dark-section .bar-fill { background: var(--gold-300); }
.dark-section .bar-row { border-bottom-color: rgba(248, 244, 236, 0.15); }

/* ---- TEAM cards ---- */
.team-grid, .team-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}
@media (min-width: 640px) { .team-grid, .team-row { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .team-grid, .team-row { grid-template-columns: repeat(3, 1fr); gap: 32px; } }

.team-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 0;
  display: flex;
  flex-direction: column;
}
.team-card-body { padding: 24px 28px 28px; display: flex; flex-direction: column; gap: 6px; }
.team-name {
  font-family: var(--serif);
  font-size: 22px;
  color: var(--ink);
  font-weight: 400;
  line-height: 1.2;
}
.team-role {
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-600);
  margin-top: 4px;
}
.team-bio {
  margin-top: 12px;
  color: var(--clay-500);
  font-size: 14.5px;
  line-height: 1.6;
}

.imgslot, .portrait-photo {
  width: 100%;
  aspect-ratio: 3 / 4;
  background: var(--bone);
  overflow: hidden;
  position: relative;
}
.imgslot img, .portrait-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}


/* ---- FAQ accordion (if present) ---- */
.faq-item {
  border-bottom: 1px solid var(--rule);
}
.faq-btn {
  width: 100%;
  text-align: left;
  padding: 20px 0;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq-q {
  font-family: var(--serif);
  font-size: 18px;
  color: var(--ink);
  font-weight: 400;
  line-height: 1.3;
}
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.4s var(--ease); }
.faq-answer-inner { padding: 0 0 20px; }
.faq-answer-inner > p { color: var(--clay-500); font-size: 15px; line-height: 1.7; max-width: 42rem; }
.faq-item.open .faq-answer { max-height: 500px; }

/* ---- MISC utility classes used across starter pages ---- */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }

/* Container-narrow alias used in starter pages */
.container.narrow { max-width: var(--container-narrow); }

/* =============================================================
   COMPAT LAYER 2 — remaining DTC-starter components
   (seg-control, calc results, quiz steps, allocation bar, tools,
    timeline, glossary, platform covers, legal pages, utilities)
   ============================================================= */

/* ---- Utilities ---- */
.no-rule::before { display: none !important; }
.section-sm { padding: 40px 0; }
@media (min-width: 1024px) { .section-sm { padding: 48px 0; } }
.btn-lg { padding: 16px 28px; font-size: 15px; min-height: 52px; }
.btn-primary { background: var(--gold-500); color: var(--ink); }
.btn-primary:hover { background: var(--gold-300); }
.serif { font-family: var(--serif); }
.mono { font-family: var(--sans); font-weight: 600; letter-spacing: 0.08em; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }

/* ---- Segmented control (Monthly / Quarterly / Annually) ---- */
.seg-control {
  display: inline-flex;
  border: 1px solid var(--rule);
  border-radius: 3px;
  overflow: hidden;
  background: var(--paper);
}
.seg-control button {
  padding: 10px 16px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--clay-500);
  background: transparent;
  border: 0;
  border-right: 1px solid var(--rule);
  cursor: pointer;
  min-height: 40px;
  transition: background 0.2s, color 0.2s;
}
.seg-control button:last-child { border-right: 0; }
.seg-control button:hover { background: var(--pine-50); color: var(--ink); }
.seg-control button.active { background: var(--pine-600); color: var(--ivory); }


/* ---- Calculator results ---- */
.calc-result-sub {
  display: block;
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-600);
  margin-bottom: 8px;
}
.calc-result-headline {
  font-family: var(--serif);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 400;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 24px;
}
.stat-value {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.1;
}

/* ---- Quiz steps (one visible at a time) ---- */
.quiz-step { display: none; }
.quiz-step.active { display: block; }

/* ---- Allocation bar (risk-quiz result) ---- */
.allocation-bar {
  display: flex;
  height: 32px;
  overflow: hidden;
  border: 1px solid var(--rule);
  background: var(--bone);
}
.allocation-bar > div { transition: flex-basis 1.2s var(--ease); }
.alloc-equity { background: var(--pine-600); }
.alloc-fixed  { background: var(--gold-500); }
.alloc-alts   { background: var(--pine-400); }
.alloc-cash   { background: var(--gold-300); }
.allocation-legend {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 16px;
  font-size: 13px;
  color: var(--clay-500);
}
.allocation-legend > * { display: flex; align-items: center; gap: 8px; }
.allocation-legend span[class^="alloc-"] {
  display: inline-block;
  width: 12px; height: 12px;
  border-radius: 2px;
  flex-shrink: 0;
}

/* ---- Tools cards (tools.html) ---- */
.tool-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 32px;
  color: inherit;
  transition: border-color 0.3s var(--ease);
}
.tool-card:hover { border-color: var(--pine-400); }
.tool-card:hover h3 { color: var(--gold-600); }
.tool-card-icon {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  color: var(--gold-500);
  margin-bottom: 8px;
}
.tool-card-icon svg { width: 28px; height: 28px; }
.tool-card .eyebrow { margin-bottom: 0; }
.tool-card h3 { margin: 4px 0 6px; }
.tool-card p { font-size: 14.5px; }
.tool-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 16px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
}
.tool-card:hover .tool-link { color: var(--gold-600); }

/* ---- Timeline (history.html) ---- */
.timeline {
  position: relative;
  padding-left: 32px;
  border-left: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 48px;
}
.timeline-item { position: relative; }
.timeline-item::before {
  content: '';
  position: absolute;
  left: -37px; top: 10px;
  width: 9px; height: 9px;
  background: var(--gold-500);
  border-radius: 50%;
  border: 2px solid var(--ivory);
}
.timeline-year {
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-600);
  margin-bottom: 8px;
}
.timeline-item h3 { margin-bottom: 8px; }
.timeline-item p { color: var(--clay-500); max-width: 36rem; }

/* ---- Glossary (glossary.html) ---- */
.glossary-search {
  width: 100%;
  max-width: 36rem;
  margin-bottom: 40px;
}
.glossary-grid {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--rule);
}
.glossary-row {
  display: grid;
  gap: 8px;
  padding: 24px 0;
  border-bottom: 1px solid var(--rule);
}
@media (min-width: 768px) {
  .glossary-row { grid-template-columns: 280px 1fr; gap: 40px; }
}
.glossary-row.hidden { display: none; }
.glossary-term {
  font-family: var(--serif);
  font-size: 20px;
  color: var(--ink);
  font-weight: 400;
  line-height: 1.3;
}
.glossary-term em {
  display: block;
  font-size: 13px;
  font-family: var(--sans);
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-600);
  margin-top: 4px;
}
.glossary-def {
  color: var(--clay-500);
  font-size: 15px;
  line-height: 1.65;
  max-width: 42rem;
}

/* ---- Platform cover blocks ---- */
.editorial-cover-dark {
  position: relative;
  background: var(--pine-900);
  aspect-ratio: 16 / 10;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 32px;
}
.editorial-cover-dark img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.6; }
.cover-tag {
  position: relative;
  z-index: 1;
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-300);
}
.dash-preview {
  position: relative;
  border: 1px solid var(--rule);
  background: var(--paper);
  overflow: hidden;
  aspect-ratio: 16 / 10;
}
.dash-preview img { width: 100%; height: 100%; object-fit: cover; }
.dash-preview-overlay {
  position: absolute;
  inset: auto 0 0 0;
  background: linear-gradient(180deg, transparent, rgba(18,42,33,0.85));
  padding: 24px;
  color: var(--ivory);
}

/* ---- Legal pages (terms, privacy) ---- */
.legal { max-width: var(--container-narrow); margin: 0 auto; }
.legal-meta { font-size: 13px; color: var(--clay-400); margin-bottom: 32px; padding-bottom: 20px; border-bottom: 1px solid var(--rule); }
.legal-toc {
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 24px 28px;
  margin-bottom: 40px;
}
.legal-toc a { display: block; padding: 6px 0; color: var(--ink); font-size: 14px; }
.legal-toc a:hover { color: var(--gold-600); }
.legal-section { margin-bottom: 40px; }
.legal-section h2 { font-size: 24px; margin-bottom: 14px; }
.legal-section p { font-size: 15px; line-height: 1.7; color: var(--clay-500); max-width: 42rem; }
.legal-section .num {
  display: inline-block;
  font-family: var(--serif);
  color: var(--gold-600);
  margin-right: 8px;
}
.num { font-family: var(--serif); color: var(--gold-600); }

/* ---- FAQ category chips ---- */
.category, .cat-cap {
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-600);
}
.faq-num { font-family: var(--serif); color: var(--gold-600); margin-right: 10px; }
.faq-icon { width: 20px; height: 20px; color: var(--gold-500); transition: transform 0.3s var(--ease); flex-shrink: 0; }
.faq-item.open .faq-icon { transform: rotate(45deg); }


/* ---- Performance extras ---- */
.perf-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.perf-table th, .perf-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--rule); }
.perf-table th { font-family: var(--sans); font-size: 11.5px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-600); }
.perf-table td { color: var(--ink); }
.delta-pos { color: var(--pine-400); }
.quarter-card { background: var(--paper); border: 1px solid var(--rule); padding: 24px; }
.quarter-q { font-family: var(--sans); font-size: 11.5px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-600); margin-bottom: 8px; display: block; }
.principle { padding: 28px 0; border-bottom: 1px solid var(--rule); }
.principle:last-child { border-bottom: 0; }
.download { display: flex; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--rule); color: inherit; }
.download:hover .dl-name { color: var(--gold-600); }
.dl-name { font-family: var(--serif); font-size: 17px; color: var(--ink); }
.dl-meta { font-size: 13px; color: var(--clay-400); }
.composite-legend { display: flex; gap: 20px; flex-wrap: wrap; font-size: 13px; color: var(--clay-500); margin-top: 16px; }
.composite-chart { position: relative; min-height: 280px; }


/* <picture> wrappers must fill image containers */
.card-img picture, .split-img picture, .cover-img picture { display: block; width: 100%; height: 100%; }

/* Contact form honeypot: invisible to people, visible to bots */
.hp-field { position: absolute !important; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ---- Calculator layout on small screens ---- */
.calc-shell { grid-template-columns: minmax(0, 1fr); }
.calc-shell > * { min-width: 0; }
@media (min-width: 900px) {
  .calc-shell { grid-template-columns: 360px minmax(0, 1fr); }
}
.seg-control { max-width: 100%; }
@media (max-width: 640px) {
  .seg-control {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
    gap: 1px;
    background: var(--rule);
    width: 100%;
  }
  .seg-control button { border: 0; background: var(--paper); }
  .seg-control button:hover { background: var(--pine-50); }
  .seg-control button.active { background: var(--pine-600); }
}

/* ---- Calculator result tiles: step down 3 -> 2 -> 1 columns instead of a fixed 3 ---- */
.calc-breakdown .stat { padding: 18px 20px; min-width: 0; }
.calc-breakdown .stat-value { overflow-wrap: anywhere; }
@media (max-width: 899px) {
  .calc-breakdown { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important; }
}

/* Heading-to-paragraph breathing room inside two-column splits */
.split > div > h2 + p { margin-top: 16px; }
.split > div > h2 { margin-bottom: 0; }

/* Subtle seam where a green CTA band meets the same-green footer */
.site-footer { border-top: 1px solid rgba(248, 244, 236, 0.14); }

/* Dashboard preview overlay: start the fade higher and darker so the caption text has contrast */
.dash-preview-overlay {
  padding: 72px 28px 24px;
  background: linear-gradient(180deg, rgba(18,42,33,0) 0%, rgba(18,42,33,0.9) 42%, rgba(18,42,33,0.96) 100%);
}
@media (max-width: 640px) { .dash-preview-overlay { padding: 56px 18px 18px; } }

/* Icons inside buttons: fixed size so they never balloon to fill the button */
.btn svg, .linkaction svg { width: 16px; height: 16px; flex: none; }

/* Cards that end in a "Learn more" link: pin the link to the card bottom so links align across a row.
   (Browsers without :has() simply skip this and keep the natural layout.) */
.card.with-image .card-body { flex: 1; }
.card.with-image .card-body:has(> p:last-child > .linkaction) > p:last-child { margin-top: auto !important; padding-top: 12px; }


/* =============================================================
   DEVICE LAYER: phones (280px+), tablets, laptops, large monitors
   ============================================================= */
:root { --header-h: 68px; --qb-h: 64px; }
html { scroll-padding-top: calc(var(--header-h) + 16px); }

/* ---- Every device: touch comfort ---- */
a, button, input, select, textarea, label, summary { touch-action: manipulation; }
html { -webkit-tap-highlight-color: rgba(185, 143, 74, 0.25); }

/* ---- Notched phones / landscape: keep content out from under the notch ---- */
.container, .container-narrow, .header-inner, .footer-inner, .footer-bottom {
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}

/* ---- Hero height: sensible on short phones and tall monitors; svh avoids the iOS address-bar jump ---- */
.hero { min-height: 72vh; min-height: clamp(520px, 72svh, 860px); }

/* ---- Form fields: 16px stops iPhones zooming the page when you tap a field ---- */
@media (max-width: 1024px), (pointer: coarse) {
  input[type="text"], input[type="email"], input[type="tel"], input[type="number"],
  input[type="password"], input[type="url"], input[type="search"], textarea, select { font-size: 16px; }
}

/* ---- Touch screens: every control at least 44px ---- */
@media (pointer: coarse) {
  .nav-link, .nav-dropdown-toggle { min-height: 48px; }
  .dropdown-link { min-height: 48px; display: flex; flex-direction: column; justify-content: center; }
  .footer-link, .footer-legal a { min-height: 44px; display: flex; align-items: center; }
  .footer-tel { display: inline-block; padding: 6px 0; }
  .crumbs a { display: inline-block; padding: 12px 0; }
  .btn, .btn-sm, .header-cta .btn { min-height: 44px; }
  .linkaction { min-height: 44px; }
  .seg-control button, .quiz-option, .faq-btn { min-height: 48px; }
  .faq-btn { min-height: 56px; }
  .tool-link, .download, .legal-toc a { min-height: 44px; display: flex; align-items: center; }
  .glossary-search { min-height: 52px; }
  /* sliders: a thin line but a finger-sized grab area and a bigger handle */
  input[type="range"].calc-range { height: 44px; padding: 21px 0; margin: 0; background-clip: content-box; }
  .calc-range::-webkit-slider-thumb { width: 28px; height: 28px; }
  .calc-range::-moz-range-thumb { width: 28px; height: 28px; }
  /* hover effects shouldn't "stick" after a tap */
  a.card:hover h3, .tool-card:hover h3 { color: inherit; }
}

/* ---- Phone menu: grouped, big targets, call + account actions ---- */
.mobile-nav { padding-left: max(var(--gutter), env(safe-area-inset-left)); padding-right: max(var(--gutter), env(safe-area-inset-right)); padding-bottom: calc(40px + env(safe-area-inset-bottom)); }
.mobile-nav-link { min-height: 52px; display: flex; align-items: center; font-size: 17px; }
.mobile-group { border-bottom: 1px solid rgba(248, 244, 236, 0.08); }
.mobile-group summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between;
  min-height: 52px; font-size: 17px; font-weight: 500; color: var(--ivory);
}
.mobile-group summary::-webkit-details-marker { display: none; }
.mobile-group summary::after {
  content: ''; width: 9px; height: 9px; border-right: 2px solid var(--gold-300); border-bottom: 2px solid var(--gold-300);
  transform: rotate(45deg); transition: transform 0.25s var(--ease); margin-right: 4px;
}
.mobile-group[open] summary::after { transform: rotate(-135deg); }
.mobile-group[open] { padding-bottom: 8px; }
.mobile-sublink { display: flex; align-items: center; min-height: 46px; padding-left: 16px; font-size: 15px; color: rgba(248, 244, 236, 0.82); border-left: 1px solid rgba(217, 189, 134, 0.35); margin-left: 4px; }
.mobile-sublink:hover { color: var(--gold-300); }
.mobile-call {
  display: flex; align-items: center; justify-content: center; min-height: 52px; border: 1px solid rgba(248, 244, 236, 0.4);
  border-radius: 3px; color: var(--ivory); font-weight: 600; font-size: 15px;
}
.footer-tel { color: inherit; }
.footer-tel:hover { color: var(--gold-300); }

/* ---- Phones: quick-action bar (call / write), thumb-reachable ---- */
.quickbar, .calc-live { display: none; }
@media (max-width: 767px) {
  body.has-quickbar { padding-bottom: calc(var(--qb-h) + env(safe-area-inset-bottom)); }
  .quickbar {
    display: flex; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    padding: 8px max(12px, env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
    background: var(--pine-900); border-top: 1px solid rgba(248, 244, 236, 0.18);
  }
  .quickbar a {
    flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 48px; border-radius: 3px; font-size: 14px; font-weight: 600; text-align: center; line-height: 1.2;
  }
  .quickbar .qb-call { flex: 0 0 38%; color: var(--ivory); border: 1px solid rgba(248, 244, 236, 0.45); }
  .quickbar .qb-call svg { width: 18px; height: 18px; flex: none; }
  .quickbar .qb-msg { background: var(--gold-500); color: var(--ink); }
  body.drawer-open .quickbar { display: none; }
}
@media print { .quickbar, .calc-live { display: none !important; } }

/* ---- Calculators on phones: live result pinned under the header while the sliders are on screen ---- */
@media (max-width: 899px) {
  .calc-live {
    display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
    position: fixed; left: 0; right: 0; top: var(--header-h); z-index: 80;
    padding: 10px max(var(--gutter), env(safe-area-inset-right)) 10px max(var(--gutter), env(safe-area-inset-left));
    background: var(--pine-600); color: var(--ivory); border-bottom: 1px solid rgba(248, 244, 236, 0.18);
    transform: translateY(-110%); opacity: 0; pointer-events: none; transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
  }
  .calc-live.show { transform: none; opacity: 1; }
  .calc-live-label { font-size: 11.5px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-300); }
  .calc-live-value { font-family: var(--serif); font-size: 24px; line-height: 1; }
}

/* ---- Phones (up to 640px) ---- */
@media (max-width: 640px) {
  body { font-size: 16px; }
  .lead { font-size: 17px; }
  h2 { font-size: 26px; }
  .band { padding: 48px 0; }
  .card { padding: 24px 20px; }
  .card.with-image { padding: 0; }
  .card.with-image .card-body { padding: 20px; }
  .stat { padding: 18px 20px; }
  .calc-shell { padding: 18px; }
  .quiz-shell { padding: 20px; }
  .header-inner { min-height: 60px; gap: 12px; }
  .logo-img { height: 28px; }
  .hero-inner { padding: 88px 0 48px; }
  .hero .lead { margin-top: 18px; }
  .hero .hero-cta { margin-top: 24px; }
  .page-header { padding: 48px 0; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .article-body .container-narrow, .longform { font-size: 17px; }
  .section-intro { margin-bottom: 28px; }
}

/* ---- Very small / foldable cover screens (under 340px) ---- */
@media (max-width: 340px) {
  :root { --gutter: 16px; }
  h1 { font-size: 26px; }
  h2 { font-size: 23px; }
  .hero-h1 { font-size: 30px; }
  .btn { padding: 12px 16px; }
  .card { padding: 20px 16px; }
  .quickbar .qb-call span { display: none; }
  .quickbar .qb-call { flex: 0 0 52px; }
  .calc-live-label { display: none; }
  .calc-live { justify-content: center; }
}

/* ---- Landscape phones: short screens, so slim the chrome ---- */
@media (max-height: 500px) and (orientation: landscape) {
  :root { --header-h: 52px; --section: 36px; }
  .header-inner { min-height: 52px; }
  .hero { min-height: 0; }
  .hero-inner { padding: 64px 0 32px; }
  .page-header, .page-header.photo { padding: 36px 0; }
  .quickbar { padding-top: 6px; padding-bottom: calc(6px + env(safe-area-inset-bottom)); }
  .quickbar a { min-height: 42px; }
  body.has-quickbar { padding-bottom: calc(54px + env(safe-area-inset-bottom)); }
}

/* ---- Tablets, portrait (641px to 1023px): comfortable two-column layouts ---- */
@media (min-width: 641px) and (max-width: 1023px) {
  .hero-inner { padding: 112px 0 64px; }
  .page-header { padding: 60px 0; }
}

/* ---- Large screens: let the page use the width, and scale type slightly ---- */
@media (min-width: 1600px) {
  :root { --container: 88rem; --gutter: 56px; }
  body { font-size: 16px; }
  .lead { font-size: 18px; }
  .hero h1 { max-width: 26ch; }
}
@media (min-width: 2200px) {
  :root { --container: 104rem; --gutter: 72px; }
  body { font-size: 18px; }
  h2 { font-size: 36px; }
  .hero-h1 { font-size: clamp(50px, 3vw, 64px); }
  .card.with-image .card-body p, .card p { font-size: 16px; }
}


/* =============================================================
   FIXES FROM THE DEVICE AUDIT
   ============================================================= */

/* ---- Touch: finger-sized logo, footer phone, legal links, breadcrumbs; phone/email links in text ---- */
@media (pointer: coarse) {
  .logo-link { min-height: 44px; }
  .footer-tel { display: inline-flex; align-items: center; min-height: 44px; padding: 0; }
  .footer-legal { gap: 4px; }
  .footer-legal a { padding: 0 10px; min-width: 44px; justify-content: center; }
  .crumbs a { display: inline-flex; align-items: center; min-height: 44px; padding: 0; }
  p > a[href^="tel:"], p > a[href^="mailto:"], li > a[href^="tel:"], li > a[href^="mailto:"] { display: inline-block; padding: 10px 0; }
}

/* ---- Phones: nothing under 13px (design-system rule), header height variable matches the real header ---- */
@media (max-width: 640px) {
  :root { --header-h: 60px; }
  .eyebrow, .stat-label, .footer-heading, .calc-field-label, .calc-result-sub, .team-role, .crumbs, .crumbs a, .crumbs span,
  .article-meta, .quiz-counter, .timeline-year, .cover-tag, .form-group label, .reg-badge, .perf-table th, .dl-meta,
  .calc-range-ticks, .calc-range-ticks span, .composite-legend, .composite-legend *, .composite-chart span, .allocation-legend,
  .legal-meta, .calc-live-label, .quarter-q, .tool-link, .faq-num, .category, .cat-cap, .calc-breakdown > div > span:first-child {
    font-size: 13px !important;
  }
  .eyebrow, .stat-label, .footer-heading, .calc-field-label, .team-role, .quiz-counter, .timeline-year,
  .form-group label, .reg-badge, .perf-table th, .dl-meta, .cover-tag { letter-spacing: 0.1em !important; }
  .consent-label { font-size: 14px !important; }

  /* Performance page: allocation bars and downloads were wider than a small phone */
  .bar-row { grid-template-columns: 1fr auto !important; grid-template-areas: "label value" "track track" !important; gap: 8px 12px !important; }
  .bar-row .bar-label { grid-area: label; min-width: 0; }
  .bar-row .bar-value { grid-area: value; }
  .bar-row .bar-track { grid-area: track; }
  .download { flex-wrap: wrap; gap: 12px; padding: 18px 16px !important; }
  .dl-name { min-width: 0; overflow-wrap: anywhere; }
  .perf-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* The header lives inside #header-placeholder, which is only as tall as the header, so a sticky header
   inside it can never stick. Make the wrapper itself sticky (its parent is the whole page). */
#header-placeholder { position: sticky; top: 0; z-index: 100; }

/* Small inline-styled text and key links on phones */
@media (max-width: 640px) {
  [style*="font-size: 10px"]:not(.dash-preview *), [style*="font-size: 11px"]:not(.dash-preview *),
  [style*="font-size: 11.5px"]:not(.dash-preview *), [style*="font-size: 12px"]:not(.dash-preview *) { font-size: 13px !important; }
}
@media (pointer: coarse) {
  p > a[href^="tel:"], p > a[href^="mailto:"], li > a[href^="tel:"], li > a[href^="mailto:"] { padding: 12px 0; }
}

/* Foldable cover screens (<=340px): chart year labels get crowded, so show every other one */
@media (max-width: 340px) {
  .composite-chart span:nth-child(2), .composite-chart span:nth-child(4) { display: none; }
}


/* ---- Touch tablets and phones alike: small labels lifted to 13px (your audience reads on iPads) ---- */
@media (pointer: coarse) and (min-width: 641px) {
  .eyebrow, .stat-label, .footer-heading, .calc-field-label, .calc-result-sub, .team-role, .crumbs, .crumbs a, .crumbs span,
  .article-meta, .quiz-counter, .timeline-year, .cover-tag, .form-group label, .reg-badge, .perf-table th, .dl-meta,
  .calc-range-ticks, .calc-range-ticks span, .composite-legend, .composite-legend *, .composite-chart span, .allocation-legend,
  .legal-meta, .calc-live-label, .quarter-q, .tool-link, .faq-num, .category, .cat-cap, .calc-breakdown > div > span:first-child {
    font-size: 13px !important;
  }
  [style*="font-size: 10px"]:not(.dash-preview *), [style*="font-size: 11px"]:not(.dash-preview *),
  [style*="font-size: 11.5px"]:not(.dash-preview *), [style*="font-size: 12px"]:not(.dash-preview *) { font-size: 13px !important; }
}

/* ---- Touch: bigger breadcrumb + consent tap areas ---- */
@media (pointer: coarse) {
  .crumbs a { min-width: 44px; justify-content: center; }
  .consent-label { padding: 12px 0; min-height: 48px; align-items: center !important; }
  .consent-label input[type="checkbox"] { width: 24px !important; height: 24px !important; flex: none; }
}


/* ---- Short landscape phones: hide the quick bar (the menu has Call) and fit the hero above the fold ---- */
@media (max-height: 500px) and (orientation: landscape) {
  .quickbar { display: none !important; }
  body.has-quickbar { padding-bottom: 0; }
  .hero-inner { padding: 36px 0 24px; }
  .hero-h1 { font-size: 28px; }
  .hero .eyebrow { margin-bottom: 10px; }
  .hero .lead { margin-top: 12px; font-size: 15px; }
  .hero .hero-cta { margin-top: 16px; }
}

/* ---- Big monitors: small uppercase labels grow with the screen ---- */
@media (min-width: 1600px) {
  .eyebrow, .stat-label, .footer-heading, .calc-field-label, .calc-result-sub, .team-role, .crumbs, .article-meta,
  .quiz-counter, .timeline-year, .cover-tag, .form-group label, .reg-badge, .perf-table th, .dl-meta { font-size: 12.5px; }
}
@media (min-width: 2200px) {
  .eyebrow, .stat-label, .footer-heading, .calc-field-label, .calc-result-sub, .team-role, .crumbs, .article-meta,
  .quiz-counter, .timeline-year, .cover-tag, .form-group label, .reg-badge, .perf-table th, .dl-meta { font-size: 14px; }
  .btn { font-size: 15px; }
}

/* ---- Desktops: chart tick labels, legends and small badges scale up on big monitors ---- */
@media (min-width: 1024px) and (pointer: fine) {
  [style*="font-size: 10px"]:not(.dash-preview *) { font-size: 11px !important; }
}
@media (min-width: 1600px) {
  .calc-range-ticks, .calc-range-ticks span, .composite-legend, .composite-legend *, .composite-chart span,
  [style*="font-size: 10px"]:not(.dash-preview *), [style*="font-size: 11px"]:not(.dash-preview *),
  [style*="font-size: 11.5px"]:not(.dash-preview *) { font-size: 12.5px !important; }
}
@media (min-width: 1600px) { .perf-table th, .dl-meta { font-size: 12.5px !important; } }
