/* ==========================================================================
   Durga Analytics - styles.css  (COMPONENT LIBRARY)
   Every value derives from theme.css tokens. No page-specific CSS anywhere.
   A component defined here is the ONE definition used site-wide.

   CONTENTS
   1.  Reset & base
   2.  Layout primitives (wrap, section)
   3.  Typography helpers (eyebrow, mono, lede)
   4.  Header / nav
   5.  Hero + hero metrics
   6.  Buttons
   7.  Grid + cards (feature grid, feature list)
   8.  Signature lifecycle / steps / timeline
   9.  Tables (framework, comparison)
   10. Pills / tags
   11. FAQ accordion
   12. Tabs
   13. Pricing cards
   14. Stats band
   15. Breadcrumb
   16. Table of contents
   17. Prose / two-col
   18. Callout / alert
   19. Code block
   20. Video embed
   21. Resource links / downloads
   22. Related links panel
   23. CTA band
   24. Footer
   25. Theme toggle + skip link + utilities
   ========================================================================== */

/* ---- 1. Reset & base -------------------------------------------------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: var(--leading);
  font-size: var(--text-base);
  -webkit-font-smoothing: antialiased;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.16;
  letter-spacing: -.01em;
  color: var(--color-heading);
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); margin: 0 0 var(--space-4); }
h3 { font-size: var(--fs-h3); font-weight: 600; margin: 0 0 var(--space-2); }
h4 { font-size: var(--fs-h4); font-weight: 600; margin: 0 0 var(--space-1); font-family: var(--font-sans); }
p  { max-width: var(--measure); }
a  { color: var(--color-secondary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; border-radius: 2px; }

/* ---- 2. Layout primitives -------------------------------------------- */
.wrap { max-width: var(--wrap-max); margin: 0 auto; padding: 0 var(--wrap-x); }
.section { padding: var(--section-y) 0; border-top: 1px solid var(--color-border); }
.section.alt  { background: var(--color-surface-alt); }
.section.dark { background: var(--color-invert-bg); border-top: none; }
.section.dark h2, .section.dark h3, .section.dark h4 { color: var(--white); }
.section.dark p, .section.dark li { color: var(--color-invert-text); }

/* ---- 3. Typography helpers ------------------------------------------- */
.mono {
  font-family: var(--font-mono); font-size: var(--fs-mono);
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--color-eyebrow); font-weight: 500;
}
/* Eyebrows/mono labels inside dark or inverted sections need the light accent */
.hero .mono, .hero .eyebrow,
.section.dark .mono, .section.dark .eyebrow,
.cta-band .mono, .cta-band .eyebrow,
footer.site .mono, footer.site .eyebrow { color: var(--color-eyebrow-invert); }
.eyebrow { display: block; margin-bottom: var(--space-3); }
.lede { font-size: var(--fs-lede); color: var(--color-muted); max-width: 64ch; }
.section.dark .lede { color: var(--color-primary-soft); }
.center { text-align: center; }
.center p, .center .lede { margin-left: auto; margin-right: auto; }

/* ---- 4. Header / nav -------------------------------------------------- */
/* The shared header is injected into the #site-header wrapper. Sticky must
   live on that wrapper (a direct child of <body>) so it stays pinned; a
   sticky element only sticks within its own parent's box. */
#site-header {
  position: sticky; top: 0; z-index: 100;
}
header.site {
  background: var(--color-header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border-invert);
}
.navrow { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
  padding: 12px clamp(var(--wrap-x), 4vw, 64px); max-width: 1600px; margin: 0 auto; }
.brand { display: inline-flex; align-items: center; gap: 10px; flex: 0 0 auto; white-space: nowrap;
  font-family: var(--font-serif); font-size: 1.2rem; color: var(--white); font-weight: 600; }
.brand:hover { text-decoration: none; }
.brand img { width: 44px; height: 44px; border-radius: var(--radius); display: block; flex: 0 0 auto; }
.brand span { color: var(--color-primary); }
.nav-links { display: flex; align-items: center; gap: 2px; flex: 1 1 auto; justify-content: center; min-width: 0; }
.nav-item { position: relative; }
.nav-item > a, .nav-item > button {
  font-family: var(--font-sans); font-size: .9rem; font-weight: 500; white-space: nowrap;
  color: var(--mist); background: none; border: 0; cursor: pointer;
  padding: 9px 10px; border-radius: var(--radius); display: inline-flex; align-items: center; gap: 5px;
}
.nav-item > a:hover, .nav-item > button:hover,
.nav-item > a[aria-current="page"] { color: var(--white); background: rgba(255,255,255,.06); text-decoration: none; }
.nav-item > button svg { width: 14px; height: 14px; opacity: .7; transition: transform var(--dur) var(--ease); }
.nav-item.open > button svg { transform: rotate(180deg); }
.nav-panel {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 260px;
  background: var(--color-invert-surface); border: 1px solid var(--color-border-invert);
  border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 8px;
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility var(--dur);
  z-index: 40;
}
.nav-item:hover .nav-panel, .nav-item.open .nav-panel,
.nav-panel:focus-within { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-panel a { display: block; padding: 9px 12px; border-radius: var(--radius); font-size: .9rem; color: var(--mist); }
.nav-panel a:hover { background: rgba(255,255,255,.08); color: var(--white); text-decoration: none; }
.nav-panel .col-title { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--color-primary); padding: 8px 12px 4px; }
.nav-mega { display: grid; grid-template-columns: repeat(2, minmax(200px,1fr)); gap: 4px; min-width: 520px; }
.nav-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.nav-cta {
  font-family: var(--font-sans); font-size: .9rem; font-weight: 600; color: var(--color-on-primary);
  background: var(--color-primary); padding: 9px 16px; border-radius: var(--radius); white-space: nowrap;
}
.nav-cta:hover { background: var(--color-primary-soft); color: var(--color-on-primary); text-decoration: none; }
.nav-toggle, .theme-toggle, .icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: var(--radius);
  background: transparent; border: 1px solid var(--color-border-invert); color: var(--mist); cursor: pointer;
}
.nav-toggle { display: none; }
.nav-toggle:hover, .theme-toggle:hover, .icon-btn:hover { background: rgba(255,255,255,.08); color: var(--white); }
.theme-toggle svg, .icon-btn svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* Mobile nav */
.mobile-menu { display: none; }
@media (max-width: 1100px) {
  .nav-links, .nav-desktop-cta { display: none; }
  .nav-toggle { display: inline-flex; }
  .mobile-menu { display: block; background: var(--color-invert-surface);
    border-top: 1px solid var(--color-border-invert); }
  .mobile-menu[hidden] { display: none; }
  .mobile-menu .m-group { border-bottom: 1px solid var(--color-border-invert); }
  .mobile-menu summary { list-style: none; cursor: pointer; padding: 14px var(--wrap-x);
    color: var(--white); font-weight: 600; font-size: .95rem; display: flex; justify-content: space-between; }
  .mobile-menu summary::-webkit-details-marker { display: none; }
  .mobile-menu summary::after { content: "+"; color: var(--color-primary); font-family: var(--font-mono); }
  .mobile-menu details[open] summary::after { content: "\2013"; }
  .mobile-menu .m-panel { padding: 0 var(--wrap-x) 12px; }
  .mobile-menu .m-panel a { display: block; padding: 8px 0; color: var(--mist); font-size: .9rem; }
}

/* ---- 5. Hero --------------------------------------------------------- */
.hero { background: var(--color-invert-bg); color: var(--white); position: relative; overflow: hidden; }
.hero .wrap { padding-top: clamp(64px,9vw,116px); padding-bottom: clamp(64px,9vw,116px); position: relative; z-index: 2; }
.hero .eyebrow { color: var(--color-eyebrow-invert); }
.hero h1 { color: var(--white); font-weight: 500; max-width: 20ch; margin: 0 0 var(--space-5); }
.hero h1 em { font-style: italic; color: var(--color-primary-soft); }
.hero .lede { color: var(--mist); font-size: clamp(1.05rem,1.8vw,1.3rem); max-width: 60ch; margin-bottom: var(--space-6); }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1; opacity: .6; pointer-events: none;
  background-image: linear-gradient(rgba(143,178,201,.05) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(143,178,201,.05) 1px, transparent 1px);
  background-size: 40px 40px;
  -webkit-mask-image: radial-gradient(ellipse at 75% 25%, #000 0%, transparent 68%);
          mask-image: radial-gradient(ellipse at 75% 25%, #000 0%, transparent 68%);
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-metrics { display: grid; grid-template-columns: repeat(4,1fr); gap: 1px;
  margin-top: clamp(48px,7vw,72px); background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.1); }
.hmetric { background: var(--color-invert-bg); padding: 22px 20px; }
.hmetric .num { font-family: var(--font-serif); font-size: 1.6rem; color: var(--color-primary-soft); line-height: 1.1; }
.hmetric .lbl { font-size: .82rem; color: var(--mist); margin-top: 6px; }
@media (max-width: 720px) { .hero-metrics { grid-template-columns: repeat(2,1fr); } }

/* ---- 6. Buttons ------------------------------------------------------ */
.btn { display: inline-block; font-weight: 600; font-size: 1rem; padding: 14px 28px;
  border-radius: var(--radius); transition: transform var(--dur) var(--ease), background var(--dur) var(--ease); cursor: pointer; border: 1px solid transparent; }
.btn-primary { background: var(--color-primary); color: var(--color-on-primary); }
.btn-primary:hover { background: var(--color-primary-soft); color: var(--color-on-primary); text-decoration: none; transform: translateY(-1px); }
/* Ghost button: safe on LIGHT backgrounds by default (dark text, visible border).
   The dark-context override below restores white text on dark heroes/bands. */
.btn-ghost { border-color: var(--color-border); color: var(--color-heading); background: transparent; }
.btn-ghost:hover { border-color: var(--color-primary); color: var(--color-primary); text-decoration: none; }
/* On dark surfaces (hero, dark sections, CTA bands) ghost buttons go light. */
.hero .btn-ghost,
.section.dark .btn-ghost,
.cta-band .btn-ghost { border-color: rgba(255,255,255,.35); color: var(--white); }
.hero .btn-ghost:hover,
.section.dark .btn-ghost:hover,
.cta-band .btn-ghost:hover { border-color: var(--color-primary); color: var(--white); }
.btn-outline { border-color: var(--color-border); color: var(--color-heading); background: var(--color-surface); }
.btn-outline:hover { border-color: var(--color-primary); color: var(--color-primary); text-decoration: none; }

/* ---- 7. Grid + cards ------------------------------------------------- */
.grid { display: grid; gap: 1px; background: var(--color-border);
  border: 1px solid var(--color-border); border-radius: var(--radius); overflow: hidden; }
.g2 { grid-template-columns: repeat(2,1fr); }
.g3 { grid-template-columns: repeat(3,1fr); }
.g4 { grid-template-columns: repeat(4,1fr); }
.cell { background: var(--color-surface); padding: 26px 24px; }
.section.alt .cell { background: var(--color-bg); }
.cell .mono { display: block; margin-bottom: var(--space-2); }
.cell h3, .cell h4 { margin-bottom: var(--space-2); }
.cell p { font-size: .95rem; color: var(--color-muted); margin: 0; max-width: none; }
.cell a.more { font-size: .88rem; font-weight: 600; display: inline-block; margin-top: var(--space-3); }
@media (max-width: 900px){ .g4,.g3{ grid-template-columns: repeat(2,1fr);} }
@media (max-width: 600px){ .g4,.g3,.g2{ grid-template-columns: 1fr;} }

/* card (standalone, not in a grid) */
.card { background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: 26px 24px; box-shadow: var(--shadow-sm); }

/* feature list (chec/arrow rows) */
.flist { list-style: none; padding: 0; margin: var(--space-4) 0 0; max-width: var(--measure); }
.flist li { position: relative; padding: 0 0 var(--space-3) 1.6rem; }
.flist li::before { content: "\2192"; position: absolute; left: 0; color: var(--color-primary); font-family: var(--font-mono); }

/* ---- 8. Lifecycle / steps / timeline --------------------------------- */
.lifecycle, .steps { display: grid; gap: 1px; background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius); overflow: hidden; }
.lifecycle { grid-template-columns: repeat(5,1fr); }
.steps { grid-template-columns: repeat(3,1fr); }
.lc-phase { background: var(--color-invert-surface); padding: 20px 18px; }
.step { background: var(--color-invert-bg); padding: 24px 22px; }
.lc-phase .no, .step .no { font-family: var(--font-mono); font-size: .74rem; color: var(--color-primary); }
.lc-phase h4, .step h4 { color: var(--white); margin: .3rem 0; font-size: .98rem; }
.lc-phase p, .step p { color: var(--mist); font-size: .84rem; margin: 0; max-width: none; }
.lc-phase .gate { display: inline-block; margin-top: 10px; font-family: var(--font-mono);
  font-size: .64rem; text-transform: uppercase; letter-spacing: .05em; color: var(--pine);
  background: var(--slate-blue-soft); padding: 3px 7px; border-radius: 2px; }
@media (max-width: 900px){ .lifecycle{ grid-template-columns: repeat(2,1fr);} .steps{ grid-template-columns: repeat(2,1fr);} }
@media (max-width: 520px){ .lifecycle,.steps{ grid-template-columns: 1fr;} }

/* timeline (vertical) */
.timeline { list-style: none; padding: 0; margin: var(--space-5) 0 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 11px; top: 4px; bottom: 4px; width: 2px; background: var(--color-border); }
.timeline li { position: relative; padding: 0 0 var(--space-5) 40px; }
.timeline li::before { content: ""; position: absolute; left: 4px; top: 4px; width: 16px; height: 16px;
  border-radius: 50%; background: var(--color-surface); border: 3px solid var(--color-primary); }
.timeline .t-when { font-family: var(--font-mono); font-size: .74rem; color: var(--color-primary); text-transform: uppercase; letter-spacing: .06em; }
.timeline h4 { margin: 2px 0 4px; }
.timeline p { margin: 0; font-size: .95rem; color: var(--color-muted); }

/* ---- 9. Tables (framework + comparison) ------------------------------ */
.tbl-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.fwtable { width: 100%; border-collapse: collapse; font-size: .92rem; background: var(--color-surface);
  border: 1px solid var(--color-border); border-radius: var(--radius); overflow: hidden; }
.fwtable th { text-align: left; background: var(--color-invert-bg); color: var(--white);
  font-family: var(--font-sans); font-weight: 600; font-size: .82rem; text-transform: uppercase;
  letter-spacing: .04em; padding: 14px 18px; }
.fwtable td { padding: 14px 18px; border-top: 1px solid var(--color-border); vertical-align: top; color: var(--color-text); }
.fwtable td:first-child { font-weight: 600; color: var(--color-heading); white-space: nowrap;
  font-family: var(--font-mono); font-size: .82rem; }
.fwtable tr:nth-child(even) td { background: var(--color-surface-alt); }
.compare td.yes { color: var(--pine); font-weight: 600; }
.compare td.no  { color: var(--color-muted); }
:root[data-theme="dark"] .compare td.yes { color: var(--color-primary-soft); }

/* ---- 10. Pills ------------------------------------------------------- */
.pills { display: flex; flex-wrap: wrap; gap: 8px; max-width: 940px; }
.pill { font-family: var(--font-mono); font-size: .8rem; padding: 7px 13px;
  border: 1px solid var(--color-border); border-radius: var(--radius-pill);
  background: var(--color-surface); color: var(--color-heading); }

/* ---- 11. FAQ accordion ----------------------------------------------- */
.faq-item { border-bottom: 1px solid var(--color-border); }
.faq-item summary { cursor: pointer; padding: 20px 0; font-family: var(--font-serif);
  font-size: 1.1rem; font-weight: 500; color: var(--color-heading); list-style: none;
  display: flex; justify-content: space-between; gap: 20px; align-items: baseline; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-family: var(--font-mono); color: var(--color-primary); font-size: 1.4rem; flex-shrink: 0; }
.faq-item[open] summary::after { content: "\2013"; }
.faq-item p { padding: 0 0 22px; margin: 0; color: var(--color-muted); font-size: .97rem; max-width: var(--measure); }
.faq-cat { margin: 2.4rem 0 .6rem; }

/* ---- 12. Tabs -------------------------------------------------------- */
.tabs { margin-top: var(--space-5); }
.tablist { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--color-border); }
.tab { font-family: var(--font-sans); font-size: .92rem; font-weight: 600; padding: 10px 16px;
  background: none; border: 0; border-bottom: 2px solid transparent; color: var(--color-muted); cursor: pointer; }
.tab[aria-selected="true"] { color: var(--color-heading); border-bottom-color: var(--color-primary); }
.tab:hover { color: var(--color-heading); }
.tabpanel { padding: var(--space-5) 0; }
.tabpanel[hidden] { display: none; }

/* ---- 13. Pricing cards ----------------------------------------------- */
.pricing { display: grid; grid-template-columns: repeat(3,1fr); gap: var(--space-4); margin-top: var(--space-5); }
.price-card { background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: 28px 24px; display: flex; flex-direction: column; }
.price-card.featured { border-color: var(--color-primary); box-shadow: var(--shadow); }
.price-card .tier { font-family: var(--font-mono); font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; color: var(--color-primary); }
.price-card .amount { font-family: var(--font-serif); font-size: 2.2rem; color: var(--color-heading); margin: 6px 0; }
.price-card .amount small { font-size: .9rem; color: var(--color-muted); font-family: var(--font-sans); }
.price-card ul { list-style: none; padding: 0; margin: var(--space-4) 0; }
.price-card li { padding: 6px 0 6px 1.4rem; position: relative; font-size: .92rem; color: var(--color-text); }
.price-card li::before { content: "\2713"; position: absolute; left: 0; color: var(--color-primary); }
.price-card .btn { margin-top: auto; text-align: center; }
@media (max-width: 820px){ .pricing{ grid-template-columns: 1fr;} }

/* ---- 14. Stats band -------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 1px;
  background: var(--color-border); border: 1px solid var(--color-border); border-radius: var(--radius); overflow: hidden; }
.stat { background: var(--color-surface); padding: 24px 20px; }
.section.alt .stat { background: var(--color-bg); }
.stat .num { font-family: var(--font-serif); font-size: 2rem; color: var(--color-heading); line-height: 1; }
.stat .lbl { font-size: .85rem; color: var(--color-muted); margin-top: 6px; }
@media (max-width: 720px){ .stats{ grid-template-columns: repeat(2,1fr);} }

/* ---- 15. Breadcrumb -------------------------------------------------- */
.breadcrumb { padding: 14px 0; font-size: .82rem; font-family: var(--font-sans); }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; align-items: center; }
.breadcrumb li { display: inline-flex; align-items: center; gap: 6px; color: var(--color-muted); }
.breadcrumb li + li::before { content: "/"; color: var(--color-border); }
.breadcrumb a { color: var(--color-muted); }
.breadcrumb a:hover { color: var(--color-primary); }
.breadcrumb [aria-current="page"] { color: var(--color-heading); font-weight: 600; }

/* ---- 16. Table of contents ------------------------------------------- */
.toc { background: var(--color-surface-alt); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: 20px 24px; margin: var(--space-5) 0; }
.toc h2 { font-size: 1rem; font-family: var(--font-sans); text-transform: uppercase;
  letter-spacing: .06em; color: var(--color-muted); margin: 0 0 12px; }
.toc ol { margin: 0; padding-left: 1.2rem; columns: 2; column-gap: 40px; }
.toc li { margin-bottom: 6px; font-size: .92rem; }
@media (max-width: 640px){ .toc ol{ columns: 1;} }

/* ---- 17. Prose / two-col --------------------------------------------- */
.prose p { margin: 0 0 1.15rem; }
.prose h3 { margin-top: 2.2rem; }
.prose ul, .prose ol { max-width: var(--measure); padding-left: 1.1rem; }
.prose li { margin-bottom: .5rem; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px,5vw,64px); align-items: start; }
@media (max-width: 860px){ .two-col{ grid-template-columns: 1fr;} }

/* ---- 18. Callout / alert --------------------------------------------- */
.callout { border-left: 3px solid var(--color-primary); background: var(--color-surface-sunken);
  padding: 20px 24px; border-radius: 0 var(--radius) var(--radius) 0; margin: 1.5rem 0; }
.callout p { margin: 0; font-size: .96rem; }
.section.dark .callout { background: var(--color-invert-surface); }
.alert { border: 1px solid var(--color-border); border-left: 3px solid var(--color-secondary);
  background: var(--color-surface); padding: 16px 20px; border-radius: var(--radius); margin: 1.25rem 0; font-size: .92rem; }
.alert.warn { border-left-color: var(--color-primary); }

/* ---- 19. Code block -------------------------------------------------- */
.code { background: var(--color-invert-bg); color: var(--mist); border-radius: var(--radius-lg);
  padding: 18px 20px; overflow-x: auto; font-family: var(--font-mono); font-size: .85rem; line-height: 1.6; margin: 1.25rem 0; }
.code code { white-space: pre; }
:not(pre) > code { font-family: var(--font-mono); font-size: .88em; background: var(--color-surface-sunken);
  padding: .1em .4em; border-radius: 3px; color: var(--color-heading); }

/* ---- 20. Video embed (responsive 16:9) ------------------------------- */
.video { position: relative; padding-top: 56.25%; border-radius: var(--radius-lg); overflow: hidden;
  background: var(--color-invert-bg); margin: 1.25rem 0; border: 1px solid var(--color-border); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---- 21. Resource links / downloads ---------------------------------- */
.reslist { display: grid; gap: 1px; background: var(--color-border);
  border: 1px solid var(--color-border); border-radius: var(--radius); overflow: hidden; }
.reslink { display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--color-surface); padding: 16px 20px; }
.reslink:hover { background: var(--color-surface-alt); text-decoration: none; }
.reslink .r-title { font-weight: 600; color: var(--color-heading); }
.reslink .r-meta { font-family: var(--font-mono); font-size: .74rem; color: var(--color-muted); text-transform: uppercase; }
.download { display: inline-flex; align-items: center; gap: 8px; font-weight: 600;
  border: 1px solid var(--color-border); border-radius: var(--radius); padding: 12px 18px;
  background: var(--color-surface); color: var(--color-heading); }
.download:hover { border-color: var(--color-primary); text-decoration: none; }
.download .d-type { font-family: var(--font-mono); font-size: .7rem; color: var(--color-primary); }

/* ---- 22. Related links panel ----------------------------------------- */
.related { display: grid; grid-template-columns: repeat(3,1fr); gap: var(--space-4); margin-top: var(--space-5); }
.related a { display: block; background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: 20px; }
.related a:hover { border-color: var(--color-primary); text-decoration: none; }
.related .r-kind { font-family: var(--font-mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--color-primary); }
.related .r-name { font-family: var(--font-serif); font-size: 1.15rem; color: var(--color-heading); margin: 4px 0 6px; }
.related p { font-size: .88rem; color: var(--color-muted); margin: 0; }
@media (max-width: 820px){ .related{ grid-template-columns: 1fr;} }

/* ---- 23. CTA band ---------------------------------------------------- */
.cta-band { background: var(--color-invert-bg); color: var(--white); text-align: center; }
.cta-band h2 { color: var(--white); max-width: 22ch; margin: 0 auto var(--space-4); }
.cta-band p { margin: 0 auto var(--space-6); color: var(--mist); }
.cta-band .hero-cta { justify-content: center; }

/* ---- 24. Footer ------------------------------------------------------ */
footer.site { background: var(--color-invert-surface); color: var(--color-invert-text); padding: 48px 0 32px; }
footer.site a { color: var(--color-primary-soft); }
footer.site a:hover { color: var(--white); }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 32px; }
.foot-brand .brand { margin-bottom: 12px; }
.foot-brand .brand, .foot-brand .brand span { color: var(--white); }
.foot-brand p { font-size: .9rem; color: var(--color-invert-text); max-width: 34ch; }
.foot-col h4 { color: var(--white); font-family: var(--font-sans); font-size: .8rem;
  text-transform: uppercase; letter-spacing: .06em; margin-bottom: 12px; }
.foot-col ul { list-style: none; padding: 0; margin: 0; }
.foot-col li { margin-bottom: .5rem; font-size: .9rem; }
.foot-col li a { color: var(--color-invert-text); }
.foot-col li a:hover { color: var(--white); }
.foot-note { border-top: 1px solid rgba(255,255,255,.18); padding-top: 20px; margin-top: 8px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: .82rem; color: var(--color-invert-text); }
.foot-social { display: flex; gap: 14px; }
@media (max-width: 900px){ .foot-grid{ grid-template-columns: 1fr 1fr 1fr;} }
@media (max-width: 620px){ .foot-grid{ grid-template-columns: 1fr 1fr;} }

/* ---- 25. Skip link + utilities --------------------------------------- */
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--color-primary); color: var(--pine); padding: 10px 16px; font-weight: 600; border-radius: 0 0 var(--radius) 0; }
.skip-link:focus { left: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.mt-0{margin-top:0}.mb-0{margin-bottom:0}
.stack > * + * { margin-top: var(--space-4); }
[hidden]{ display: none !important; }

/* ---- 26. Forms (contact page only) ----------------------------------- */
.da-form { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); max-width: 640px; }
.da-field { display: flex; flex-direction: column; gap: 6px; }
.da-field-full { grid-column: 1 / -1; }
.da-form label { font-size: .82rem; font-weight: 600; color: var(--color-heading); }
.da-form input, .da-form select, .da-form textarea {
  font-family: var(--font-sans); font-size: 1rem; color: var(--color-text);
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius); padding: 12px 14px; width: 100%;
  transition: border-color var(--dur) var(--ease);
}
.da-form input:focus, .da-form select:focus, .da-form textarea:focus {
  outline: none; border-color: var(--color-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 22%, transparent);
}
.da-form textarea { resize: vertical; min-height: 120px; }
.da-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 620px){ .da-form{ grid-template-columns: 1fr; } }
.da-hint { font-weight: 400; color: var(--color-muted); font-size: .78rem; }
.da-form select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--color-muted) 50%), linear-gradient(135deg, var(--color-muted) 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.foot-h{font-size:.95rem;font-weight:600;letter-spacing:.02em;margin:0 0 .6rem;color:var(--white)}

/* Download-brochure button (detail pages) */
.btn-brochure { display:inline-flex; align-items:center; gap:.5rem; }
.btn-brochure svg { flex:0 0 auto; }

/* Small "Download brochure" secondary link (hub sections) */
.bro-link { margin-left: .9rem; font-size: .85rem; color: var(--color-muted); text-decoration: none; border-bottom: 1px solid transparent; }
.bro-link::before { content: "\2193"; margin-right: .3rem; color: var(--color-primary); font-weight: 600; }
.bro-link:hover { color: var(--color-primary); border-bottom-color: var(--color-primary); }

/* ---- Multi-theme picker (header) ---- */
.theme-picker { position: relative; display: inline-flex; }
.theme-menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 1200;
  min-width: 200px; padding: 12px; border-radius: var(--radius-lg);
  background: var(--color-surface); color: var(--color-text);
  border: 1px solid var(--color-border); box-shadow: var(--shadow);
  display: none; flex-direction: column; gap: 8px;
}
.theme-menu[hidden] { display: none !important; }
.theme-picker.open .theme-menu:not([hidden]) { display: flex; }
.theme-menu-label {
  margin: 0; font-family: var(--font-mono, monospace); font-size: .68rem;
  text-transform: uppercase; letter-spacing: .08em; color: var(--color-muted);
}
.theme-field { display: block; }
.theme-select {
  width: 100%; padding: 8px 10px; border-radius: var(--radius);
  border: 1px solid var(--color-border); background: var(--color-bg);
  color: var(--color-text); font: inherit; font-size: .9rem; cursor: pointer;
}
.theme-select:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 1px; }
.theme-apply { width: 100%; justify-content: center; font-size: .85rem; padding: 8px 12px; cursor: pointer; }

/* ---- Reading meta (word count + time to read) ---- */
.read-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .9rem;
  margin: .1rem 0 1.2rem; padding: .5rem 0;
  font-family: var(--font-mono, monospace); font-size: .78rem;
  color: var(--color-muted); border-bottom: 1px solid var(--color-border);
}
.read-meta .rm-item { display: inline-flex; align-items: center; gap: .35rem; }
.read-meta svg { width: 14px; height: 14px; opacity: .8; }
.read-meta .rm-dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .5; }
/* Reading meta sits in the dark hero on most pages - keep it light and readable */
.hero .read-meta { color: var(--color-invert-text); border-bottom-color: var(--color-border-invert); }
.section.dark .read-meta, .cta-band .read-meta { color: var(--color-invert-text); border-bottom-color: var(--color-border-invert); }

/* ==========================================================================
   Quick navigation (scrollspy.js) - floating on-page navigator
   Desktop: fixed right rail. Mobile: sticky top-right pill that expands.
   Hidden until the reader scrolls past the hero (body.da-quicknav-on).
   ========================================================================== */
.da-quicknav{
  position:fixed; z-index:60; top:50%; right:1rem; transform:translateY(-50%);
  max-width:230px; opacity:0; visibility:hidden; pointer-events:none;
  transition:opacity .25s ease, visibility .25s ease;
}
.da-quicknav-on .da-quicknav{ opacity:1; visibility:visible; pointer-events:auto; }
.da-quicknav-toggle{ display:none; }
.da-quicknav-panel{
  background:var(--color-surface); border:1px solid var(--color-border);
  border-radius:14px; padding:.7rem .5rem; box-shadow:0 8px 30px rgba(0,0,0,.10);
  max-height:70vh; overflow-y:auto; scrollbar-width:thin;
}
.da-quicknav-head{
  font-family:var(--font-mono); font-size:.62rem; letter-spacing:.09em;
  text-transform:uppercase; color:var(--color-muted); padding:.15rem .6rem .5rem;
}
.da-quicknav-list{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:.05rem; }
.da-quicknav-link{
  display:flex; align-items:center; gap:.55rem; padding:.4rem .6rem;
  border-radius:8px; text-decoration:none; color:var(--color-muted);
  font-size:.82rem; line-height:1.25; transition:color .15s, background .15s;
}
.da-quicknav-link:hover{ color:var(--color-heading); background:var(--color-bg); text-decoration:none; }
.da-qn-tick{
  flex:0 0 auto; width:7px; height:7px; border-radius:50%;
  background:var(--color-border); transition:background .15s, transform .15s; margin-left:2px;
}
.da-quicknav-link.is-active{ color:var(--color-heading); font-weight:600; background:var(--color-bg); }
.da-quicknav-link.is-active .da-qn-tick{ background:var(--color-primary); transform:scale(1.5); }
.da-qn-txt{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* Mobile / narrow: collapse into a top-right pill that expands downward */
@media (max-width:1180px){
  .da-quicknav{ top:auto; bottom:1rem; right:1rem; transform:none; max-width:min(78vw,300px); }
  .da-quicknav-toggle{
    display:flex; align-items:center; gap:.5rem; margin-left:auto;
    background:var(--color-primary); color:#fff; border:none; cursor:pointer;
    border-radius:999px; padding:.6rem .95rem; font-size:.8rem; font-weight:600;
    box-shadow:0 6px 22px rgba(0,0,0,.22);
  }
  .da-qn-dot{ width:7px; height:7px; border-radius:50%; background:#fff; opacity:.9; }
  .da-qn-here{ max-width:150px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .da-quicknav-toggle svg{ transition:transform .2s ease; }
  .da-quicknav.is-open .da-quicknav-toggle svg{ transform:rotate(180deg); }
  .da-quicknav-panel{
    display:none; position:absolute; bottom:calc(100% + .5rem); right:0;
    width:min(78vw,300px); max-height:60vh;
  }
  .da-quicknav.is-open .da-quicknav-panel{ display:block; }
}
@media (prefers-reduced-motion:reduce){
  .da-quicknav, .da-qn-tick, .da-quicknav-toggle svg{ transition:none; }
}
@media print{ .da-quicknav{ display:none !important; } }

/* Quick-nav action links: Home (top) and Enroll (bottom) */
.da-qn-action{ font-weight:600; color:var(--color-heading); }
.da-qn-action .da-qn-aic{ flex:0 0 auto; margin-left:1px; opacity:.85; }
.da-qn-action-li:first-child{ margin-bottom:.2rem; padding-bottom:.35rem; border-bottom:1px solid var(--color-border); }
.da-qn-action-li:last-child{ margin-top:.2rem; padding-top:.35rem; border-top:1px solid var(--color-border); }
.da-qn-enroll{ color:var(--color-primary); }
.da-qn-enroll:hover{ background:var(--color-primary); color:#fff; }
.da-qn-enroll:hover .da-qn-aic{ opacity:1; }
.da-qn-home:hover{ color:var(--color-primary); }

/* "View all" links in mega-menus and footer columns */
.nav-viewall{ margin-top:.35rem; padding-top:.5rem; border-top:1px solid var(--color-border);
  color:var(--color-primary)!important; font-weight:600; font-size:.86rem; }
.nav-viewall:hover{ color:var(--color-primary-soft)!important; }
.nav-mega .nav-viewall{ display:block; }
.foot-all{ color:var(--color-primary); font-weight:600; }
.foot-all:hover{ text-decoration:underline; }

/* Related-programs cards (cross-links to sibling training programs) */
.rel-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(300px,1fr)); gap:1rem; margin-top:1.4rem; }
.rel-card{ display:flex; flex-direction:column; gap:.4rem; padding:1.1rem 1.2rem; border:1px solid var(--color-border);
  border-radius:13px; background:var(--color-surface); text-decoration:none; transition:border-color .15s,transform .15s,box-shadow .15s; }
.rel-card:hover{ border-color:var(--color-primary); transform:translateY(-2px); box-shadow:0 8px 24px rgba(0,0,0,.07); text-decoration:none; }
.rel-name{ font-weight:600; color:var(--color-heading); font-size:1.02rem; line-height:1.3; }
.rel-desc{ color:var(--color-muted); font-size:.9rem; line-height:1.5; }
.rel-go{ color:var(--color-primary); font-size:.78rem; margin-top:.1rem; }
