/* ==========================================================================
   Gravitas ETRM — gravitas-theme.css
   The single source of truth for the site's visual system and components.
   No page should define its own colors, spacing, or type — use these tokens
   and components only. Derived from the approved editorial theme
   (pine / amber / parchment).
   ========================================================================== */

/* ---------------------------------------------------------------------------
   1. DESIGN TOKENS
   --------------------------------------------------------------------------- */
:root {
  /* Color */
  --pine: #12271F;
  --pine-800: #1B3A2E;
  --pine-700: #274F3E;
  --graphite: #2A2E2C;
  --sage: #556860;   /* secondary text — AA on light surfaces */
  --slate-blue: #3E6B8C;
  --slate-blue-soft: #8FB2C9;
  --amber: #C08A2E;
  --amber-soft: #E3C48A;
  --amber-text: #8A5E12;   /* darker amber for small text on LIGHT surfaces (WCAG AA) */
  --parchment: #F5F3EC;
  --paper: #FBFAF6;
  --mist: #E6EBE7;
  --line: #D8DED6;
  --ink: #17201C;
  --white: #FFFFFF;
  --on-dark: #DDE6DF;    /* secondary text on ALWAYS-dark surfaces (hero, footer, CTA) — never remapped */
  --on-dark-dim: #A9BEB1;
  --pine-fixed: #12271F;      /* always-dark surface backgrounds — never remapped by theme */
  --pine-800-fixed: #1B3A2E;

  /* Layout */
  --measure: 68ch;
  --maxw: 1160px;
  --shadow: 0 1px 2px rgba(18,39,31,.06), 0 10px 30px rgba(18,39,31,.08);
  --shadow-lg: 0 4px 12px rgba(18,39,31,.10), 0 24px 60px rgba(18,39,31,.14);
  --radius: 3px;

  /* Type */
  --font-display: 'Newsreader', Georgia, serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
}

/* ---------------------------------------------------------------------------
   1b. DARK THEME  (toggled via <html data-theme="dark">)
   Brand hues (pine, amber, sage, slate) are preserved. Only the light neutral
   surfaces are remapped to dark equivalents so the editorial feel carries over.
   --------------------------------------------------------------------------- */
:root[data-theme="dark"] {
  --paper: #0E1A15;      /* page background */
  --parchment: #142219;  /* alt sections */
  --white: #16241C;      /* cards / inputs */
  --mist: #1C2E24;       /* subtle fills */
  --line: #2A3B31;       /* borders */
  --ink: #E7ECE7;        /* body text */
  --pine: #EAF0EA;       /* headings become light in dark mode */
  --pine-700: #A9C3B4;   /* used in some accents on light cards */
  --sage: #9DB0A5;       /* secondary text lightened for contrast */
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px rgba(0,0,0,.5);
  --shadow-lg: 0 4px 12px rgba(0,0,0,.5), 0 24px 60px rgba(0,0,0,.6);
}
/* Sections that are intentionally dark (hero, .dark, footer, CTA band) keep
   their fixed pine background in both themes, so their inner headings/text must
   stay light regardless of --pine remapping above. */
:root[data-theme="dark"] .hero h1,
:root[data-theme="dark"] .section.dark h2,
:root[data-theme="dark"] .section.dark h3,
:root[data-theme="dark"] .section.dark h4,
:root[data-theme="dark"] .cta-band h2,
:root[data-theme="dark"] .step h4,
:root[data-theme="dark"] footer.site .foot-brand,
:root[data-theme="dark"] .foot-grid h4 { color: #FFFFFF; }
:root[data-theme="dark"] .hmetric .num { color: var(--amber-soft); }
/* keep amber/pine brand contrast on primary buttons in dark mode */
:root[data-theme="dark"] .btn-primary,
:root[data-theme="dark"] .nav-cta { color: #12271F !important; }
/* Prevent a flash before JS runs: honour OS preference by default */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0E1A15; --parchment: #142219; --white: #16241C; --mist: #1C2E24;
    --line: #2A3B31; --ink: #E7ECE7; --pine: #EAF0EA; --pine-700: #A9C3B4; --sage: #9DB0A5;
  }
}

/* ---------------------------------------------------------------------------
   2. RESET & BASE
   --------------------------------------------------------------------------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.16;
  letter-spacing: -0.01em;
  color: var(--pine);
}
h1 { font-size: clamp(2.2rem, 5.2vw, 4rem); margin: 0 0 1.4rem; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.7rem); margin: 0 0 1rem; }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); font-weight: 600; margin: 0 0 .5rem; }
h4 { font-size: 1.05rem; font-weight: 600; margin: 0 0 .35rem; font-family: var(--font-body); }
p { max-width: var(--measure); }
a { color: var(--slate-blue); text-decoration: none; }
a:hover { text-decoration: underline; }
/* Dark-theme link color: lighten slate-blue so links read on dark card surfaces */
:root[data-theme="dark"] a { color: var(--slate-blue-soft); }
@media (prefers-color-scheme: dark){ :root:not([data-theme="light"]) a { color: var(--slate-blue-soft); } }
/* keep nav/brand/button links using their own explicit colors */
:root[data-theme="dark"] .mainnav a, :root[data-theme="dark"] .nav-menu a, :root[data-theme="dark"] .mobile-panel a { color: var(--on-dark); }
:root[data-theme="dark"] .btn-primary, :root[data-theme="dark"] .nav-cta { color: #12271F; }
:root[data-theme="dark"] .brand-word:hover, :root[data-theme="dark"] .foot-word:hover { color: var(--amber-soft); }

img { max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }

/* Utility / structural */
.mono { font-family: var(--font-mono); font-size: .76rem; letter-spacing: .06em; text-transform: uppercase; color: var(--amber-text); font-weight: 600; }
/* On dark backgrounds the bright amber has plenty of contrast, so keep it there */
.hero .mono, .section.dark .mono, .cta-band .mono, footer.site .mono,
.hero .eyebrow, .section.dark .eyebrow, .cta-band .eyebrow { color: var(--amber); }
/* In dark theme, light surfaces become dark — so mono should use the bright amber everywhere */
:root[data-theme="dark"] .mono { color: var(--amber-soft); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mono { color: var(--amber-soft); } }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(20px, 5vw, 56px); }
.section { padding: clamp(56px, 8vw, 104px) 0; border-top: 1px solid var(--line); }
.section.alt { background: var(--parchment); }
.section.dark { background: var(--pine-fixed); border-top: none; }
.section.dark h2, .section.dark h3, .section.dark h4 { color: var(--white); }
.section.dark p { color: var(--on-dark); }
.eyebrow { display: block; margin-bottom: .9rem; }
.lede { font-size: 1.18rem; color: var(--sage); max-width: 64ch; }
.section.dark .lede { color: var(--amber-soft); }
.center { text-align: center; }
.center p, .center .lede { margin-left: auto; margin-right: auto; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--amber); color: #12271F; padding: 10px 16px; z-index: 200; border-radius: 0 0 var(--radius) 0; font-weight: 600; }
.skip-link:focus { left: 0; }

/* ---------------------------------------------------------------------------
   3. HEADER / NAVIGATION  (component: site header + dropdown + mobile)
   --------------------------------------------------------------------------- */
header.site { position: sticky; top: 0; z-index: 100; background: rgba(18,39,31,.94); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(255,255,255,.08); }
.navrow { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 12px clamp(20px,5vw,56px); }
.brand { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.brand-logo { display: inline-flex; align-items: center; flex-shrink: 0; }
.brand-logo img { height: 56px; width: auto; display: block; flex-shrink: 0; }
.brand-word { font-family: var(--font-display); font-size: 1.3rem; color: #fff; font-weight: 600; letter-spacing: .01em; }
.brand-word:hover { color: var(--amber-soft); text-decoration: none; }
.brand-word::before { content: ""; display: inline-block; width: 1px; height: 20px; background: rgba(255,255,255,.25); margin-right: 12px; vertical-align: -3px; }

.mainnav { display: flex; align-items: center; gap: 4px; }
.mainnav a, .nav-toggle { font-family: var(--font-body); font-size: .94rem; font-weight: 500; color: var(--on-dark); padding: 8px 12px; border-radius: var(--radius); background: none; border: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
.mainnav a:hover, .nav-toggle:hover { color: var(--white); background: rgba(255,255,255,.06); text-decoration: none; }
.mainnav a[aria-current="page"] { color: var(--amber-soft); }

/* dropdown */
.nav-dd { position: relative; }
/* invisible bridge covering the 6px gap so hover stays continuous button->menu */
.nav-dd.open::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 10px; }
.nav-dd .nav-menu { position: absolute; left: 0; top: calc(100% + 6px); min-width: 240px; background: var(--pine-800-fixed); border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius); padding: 8px; box-shadow: var(--shadow-lg); display: none; flex-direction: column; z-index: 120; }
.nav-dd.open .nav-menu { display: flex; }
.nav-menu a { color: var(--on-dark); font-size: .9rem; padding: 8px 10px; border-radius: var(--radius); }
.nav-menu a:hover { background: rgba(255,255,255,.06); color: var(--white); }
.nav-menu .nav-group { margin-top: 6px; padding-top: 6px; border-top: 1px solid rgba(255,255,255,.1); }
.nav-menu .nav-group-label { font-family: var(--font-mono); font-size: .64rem; text-transform: uppercase; letter-spacing: .06em; color: var(--sage); padding: 4px 10px; }
.chev { font-family: var(--font-mono); font-size: .7rem; opacity: .8; transition: transform .15s ease; }
.nav-dd.open .chev { transform: rotate(180deg); }

.nav-cta { font-family: var(--font-body); font-size: .9rem; font-weight: 600; color: var(--pine) !important; background: var(--amber); padding: 9px 18px; border-radius: var(--radius); white-space: nowrap; }
.cta-short { display: none; }
.nav-cta:hover { background: var(--amber-soft); text-decoration: none; }

.nav-burger { display: none; background: none; border: 1px solid rgba(255,255,255,.2); border-radius: var(--radius); color: #fff; width: 42px; height: 42px; font-size: 1.4rem; cursor: pointer; align-items: center; justify-content: center; }

/* header utilities cluster: search + theme toggle */
.nav-utils { display: flex; align-items: center; gap: 10px; }
.nav-search { position: relative; }
.nav-search input { width: 190px; font-family: var(--font-body); font-size: .88rem; color: #fff; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); border-radius: 40px; padding: 8px 14px 8px 34px; transition: width .2s ease, background .2s ease; }
.nav-search input::placeholder { color: rgba(230,235,231,.6); }
.nav-search input:focus { outline: none; width: 230px; background: rgba(255,255,255,.14); border-color: var(--amber); }
.nav-search .nav-search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: rgba(230,235,231,.7); font-size: .9rem; pointer-events: none; }
.nav-search .search-results { top: calc(100% + 8px); }
.theme-toggle { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); border-radius: 40px; color: #fff; width: 40px; height: 40px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-size: 1.05rem; line-height: 1; flex-shrink: 0; }
.theme-toggle:hover { background: rgba(255,255,255,.16); border-color: var(--amber); }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: inline; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: inline; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: inline; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}
@media (max-width: 1180px) { .nav-search input { width: 150px; } .nav-search input:focus { width: 180px; } }
@media (max-width: 1000px) { .nav-search { display: none; } }

/* mobile: search inside the panel */
.mobile-panel .m-search { position: relative; margin: 10px 0 6px; }
.mobile-panel .m-search input { width: 100%; font-size: 1rem; color: var(--ink); background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.mobile-panel .m-search .search-results { top: calc(100% + 6px); }

/* mobile panel */
.mobile-panel { display: none; background: var(--pine-800-fixed); border-bottom: 1px solid rgba(255,255,255,.1); padding: 12px clamp(20px,5vw,56px) 20px; }
.mobile-panel.open { display: block; }
.mobile-panel a { display: block; color: var(--on-dark); padding: 10px 8px; border-radius: var(--radius); font-size: .98rem; }
.mobile-panel a:hover { background: rgba(255,255,255,.06); color: var(--white); text-decoration: none; }
.mobile-panel .m-label { font-family: var(--font-mono); font-size: .66rem; text-transform: uppercase; letter-spacing: .06em; color: var(--sage); padding: 12px 8px 2px; }

@media (max-width: 1000px) {
  .mainnav, .navrow > .nav-cta { display: none; }
  .nav-burger { display: inline-flex; }
  .nav-utils .nav-cta { padding: 8px 14px; }
  .nav-utils .nav-cta .cta-full { display: none; }
  .nav-utils .nav-cta .cta-short { display: inline; }
}

/* ---------------------------------------------------------------------------
   4. BUTTONS  (component)
   --------------------------------------------------------------------------- */
.btn { display: inline-block; font-weight: 600; font-size: 1rem; padding: 14px 28px; border-radius: var(--radius); transition: transform .15s ease, background .15s ease; cursor: pointer; border: 0; font-family: var(--font-body); }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--amber); color: var(--pine); }
.btn-primary:hover { background: var(--amber-soft); transform: translateY(-1px); }
.btn-ghost { border: 1px solid rgba(255,255,255,.35); color: var(--on-dark); background: transparent; }
.btn-ghost:hover { border-color: var(--amber); }
.btn-ghost.on-light { border-color: var(--line); color: var(--pine); }
.btn-ghost.on-light:hover { border-color: var(--amber); background: var(--parchment); }
/* Ghost buttons inside dark CTA bands must use light text regardless of the on-light modifier */
.kc-cta .btn-ghost, .kc-cta .btn-ghost.on-light,
.cta-band .btn-ghost, .cta-band .btn-ghost.on-light,
.section.dark .btn-ghost.on-light {
  border: 1.5px solid rgba(255,255,255,.6);
  color: #FFFFFF;
  background: transparent;
}
.kc-cta .btn-ghost:hover, .kc-cta .btn-ghost.on-light:hover,
.cta-band .btn-ghost:hover, .cta-band .btn-ghost.on-light:hover,
.section.dark .btn-ghost.on-light:hover {
  border-color: var(--amber);
  color: var(--amber-soft);
  background: rgba(255,255,255,.06);
}
/* Dark theme: override the generic dark link color so ghost buttons on dark bands stay crisp white */
:root[data-theme="dark"] .kc-cta a.btn-ghost,
:root[data-theme="dark"] .cta-band a.btn-ghost,
:root[data-theme="dark"] .kc-cta a.btn-ghost.on-light,
:root[data-theme="dark"] .cta-band a.btn-ghost.on-light {
  color: #FFFFFF;
  border: 1.5px solid rgba(255,255,255,.6);
  background: transparent;
}
:root[data-theme="dark"] .kc-cta a.btn-ghost:hover,
:root[data-theme="dark"] .cta-band a.btn-ghost:hover {
  color: var(--amber-soft);
  border-color: var(--amber);
  background: rgba(255,255,255,.06);
}
.btn-sm { padding: 10px 18px; font-size: .9rem; }
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; }
.center .btn-row { justify-content: center; }

/* ---------------------------------------------------------------------------
   5. HERO  (component)
   --------------------------------------------------------------------------- */
.hero { background: var(--pine-fixed); color: var(--white); position: relative; overflow: hidden; border-top: none; }
.hero .wrap { padding-top: clamp(64px, 9vw, 116px); padding-bottom: clamp(64px, 9vw, 116px); position: relative; z-index: 2; }
.hero .eyebrow { color: var(--amber); }
.hero h1 { color: var(--white); max-width: 20ch; }
.hero h1 em { font-style: italic; color: var(--amber-soft); }
.hero .lede { color: var(--on-dark); font-size: clamp(1.05rem, 1.8vw, 1.3rem); max-width: 58ch; margin-bottom: 2.2rem; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1; opacity: .6;
  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;
  mask-image: radial-gradient(ellipse at 75% 25%, #000 0%, transparent 68%);
}
.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); position: relative; z-index: 2; }
.hmetric { background: var(--pine-fixed); padding: 22px 20px; }
.hmetric .num { font-family: var(--font-display); font-size: 1.6rem; color: var(--amber-soft); line-height: 1.1; }
.hmetric .lbl { font-size: .82rem; color: var(--on-dark); margin-top: 6px; }
@media (max-width: 720px) { .hero-metrics { grid-template-columns: repeat(2,1fr); } }

/* ---------------------------------------------------------------------------
   6. GRID / CARDS  (component: feature grid, KPI cards)
   --------------------------------------------------------------------------- */
.grid { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); 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(--white); padding: 26px 24px; }
.section.alt .cell { background: var(--paper); }
.cell .mono { display: block; margin-bottom: .5rem; }
.cell p { font-size: .95rem; color: var(--sage); margin: 0; max-width: none; }
.cell.link-cell { transition: background .15s ease; }
.cell.link-cell:hover { background: var(--parchment); }
.cell.link-cell a.stretched::after { content: ""; position: absolute; inset: 0; }
.cell.link-cell { position: relative; }
@media (max-width: 900px) { .g4 { grid-template-columns: repeat(2,1fr); } .g3 { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 600px) { .g4, .g3, .g2 { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------------------
   7. PROSE / TWO-COL  (component)
   --------------------------------------------------------------------------- */
.prose p { margin: 0 0 1.15rem; }
.prose h3 { margin-top: 2.2rem; }
.prose ul { 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; } }

/* ---------------------------------------------------------------------------
   8. TABLES  (component: framework table + feature matrix)
   --------------------------------------------------------------------------- */
.fwtable { width: 100%; border-collapse: collapse; font-size: .92rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.fwtable th { text-align: left; background: var(--pine-fixed); color: var(--white); font-family: var(--font-body); 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(--line); vertical-align: top; color: var(--graphite); }
.fwtable td:first-child { font-weight: 600; color: var(--pine); }
/* Dark theme: table header text must stay light on the fixed-pine header row,
   and body cells must use a light body color instead of dark --graphite. */
:root[data-theme="dark"] .fwtable th { color: #FFFFFF; }
:root[data-theme="dark"] .fwtable td { color: var(--on-dark, #DDE6DF); }
:root[data-theme="dark"] .fwtable td:first-child { color: #FFFFFF; }
:root[data-theme="dark"] .fwtable .yes { color: var(--amber-soft); }
:root[data-theme="dark"] .fwtable .no { color: var(--on-dark-dim, #A9BEB1); }
.fwtable.matrix td:first-child { font-family: var(--font-mono); font-size: .82rem; white-space: nowrap; }
.fwtable tr:nth-child(even) td { background: var(--parchment); }
.fwtable .yes { color: var(--pine-700); font-weight: 600; }
.fwtable .no { color: var(--sage); }
.tbl-scroll { overflow-x: auto; }

/* ---------------------------------------------------------------------------
   9. LIFECYCLE / STEPS / TIMELINE  (component)
   --------------------------------------------------------------------------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.step { background: var(--white); padding: 24px 22px; }
.step .no { font-family: var(--font-mono); color: var(--amber); font-size: .8rem; }
.step h4 { color: var(--pine); margin: .4rem 0 .35rem; }
.step p { color: var(--sage); font-size: .9rem; margin: 0; max-width: none; }
.section.dark .steps { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.12); }
.section.dark .step { background: var(--pine-fixed); }
.section.dark .step h4 { color: var(--white); }
.section.dark .step p { color: var(--on-dark); }
@media (max-width: 820px) { .steps { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------------------
   10. PILLS  (component)
   --------------------------------------------------------------------------- */
.pills { display: flex; flex-wrap: wrap; gap: 8px; max-width: 900px; }
.pill { font-family: var(--font-mono); font-size: .8rem; padding: 7px 13px; border: 1px solid var(--line); border-radius: 40px; background: var(--white); color: var(--pine-700); }

/* ---------------------------------------------------------------------------
   11. CALLOUT  (component)
   --------------------------------------------------------------------------- */
.callout { border-left: 3px solid var(--amber); background: var(--mist); padding: 20px 24px; border-radius: 0 var(--radius) var(--radius) 0; margin: 1.5rem 0; }
.callout p { margin: 0; font-size: .96rem; max-width: none; }
.section.dark .callout { background: var(--pine-800-fixed); }

/* ---------------------------------------------------------------------------
   12. FAQ ACCORDION  (component)
   --------------------------------------------------------------------------- */
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary { cursor: pointer; padding: 20px 0; font-family: var(--font-display); font-size: 1.1rem; font-weight: 500; color: var(--pine); 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(--amber); 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(--sage); font-size: .97rem; }
.faq-cat { margin: 2.4rem 0 .6rem; }

/* ---------------------------------------------------------------------------
   13. BREADCRUMB  (component)
   --------------------------------------------------------------------------- */
.breadcrumb { font-family: var(--font-mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--sage); padding: 16px 0 0; }
.breadcrumb a { color: var(--sage); }
.breadcrumb a:hover { color: var(--amber); }
.breadcrumb .sep { margin: 0 8px; opacity: .5; }

/* ---------------------------------------------------------------------------
   14. TABS  (component)
   --------------------------------------------------------------------------- */
.tabs { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--white); }
.tablist { display: flex; flex-wrap: wrap; gap: 0; background: var(--parchment); border-bottom: 1px solid var(--line); }
.tablist button { font-family: var(--font-body); font-weight: 600; font-size: .9rem; color: var(--sage); background: none; border: 0; padding: 14px 20px; cursor: pointer; border-bottom: 2px solid transparent; }
.tablist button[aria-selected="true"] { color: var(--pine); border-bottom-color: var(--amber); background: var(--white); }
.tabpanel { padding: 26px 24px; }
.tabpanel[hidden] { display: none; }

/* ---------------------------------------------------------------------------
   15. CODE EXAMPLE  (component)
   --------------------------------------------------------------------------- */
.code { background: var(--pine-fixed); color: var(--on-dark); border-radius: var(--radius); padding: 20px 22px; overflow-x: auto; font-family: var(--font-mono); font-size: .84rem; line-height: 1.7; margin: 1.2rem 0; }
.code .tok-key { color: var(--amber-soft); }
.code .tok-str { color: var(--slate-blue-soft); }
.code .tok-com { color: var(--sage); }

/* ---------------------------------------------------------------------------
   16. SCREENSHOT GALLERY / FRAME  (component)
   --------------------------------------------------------------------------- */
.shot { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--white); }
.shot-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: var(--parchment); border-bottom: 1px solid var(--line); }
.shot-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); display: block; }
.shot-bar .addr { margin-left: 10px; font-family: var(--font-mono); font-size: .7rem; color: var(--sage); }
.shot-body { padding: 0; }
.shot-body img { display: block; width: 100%; }
.shot-placeholder { aspect-ratio: 16/9; display: flex; align-items: center; justify-content: center; background: repeating-linear-gradient(45deg, var(--parchment), var(--parchment) 12px, var(--paper) 12px, var(--paper) 24px); color: var(--sage); font-family: var(--font-mono); font-size: .8rem; text-align: center; padding: 20px; }
.gallery { display: grid; grid-template-columns: repeat(2,1fr); gap: 20px; }
@media (max-width: 700px) { .gallery { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------------------
   17. FORM  (component: contact / demo)
   --------------------------------------------------------------------------- */
.form { display: grid; gap: 16px; max-width: 560px; }
.form .field { display: flex; flex-direction: column; gap: 6px; }
.form label { font-size: .85rem; font-weight: 600; color: var(--pine); }
.form input, .form select, .form textarea { font-family: var(--font-body); font-size: 1rem; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); color: var(--ink); }
.form textarea { min-height: 120px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 3px solid var(--amber); outline-offset: 1px; border-color: var(--amber); }
.form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 520px) { .form .row2 { grid-template-columns: 1fr; } }
.form .hint { font-size: .8rem; color: var(--sage); }

/* choice cards (demo / consulting / training triage) */
.choice-cards { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin: 1.5rem 0; }
.choice { border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); padding: 22px 20px; cursor: pointer; transition: border-color .15s ease, transform .15s ease; }
.choice:hover { border-color: var(--amber); transform: translateY(-2px); text-decoration: none; }
.choice h4 { color: var(--pine); }
.choice p { font-size: .9rem; color: var(--sage); margin: .3rem 0 0; max-width: none; }
@media (max-width: 760px) { .choice-cards { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------------------
   18. CTA BAND  (component)
   --------------------------------------------------------------------------- */
.cta-band { background: var(--pine-fixed); color: var(--white); text-align: center; }
.cta-band h2 { color: var(--white); max-width: 22ch; margin: 0 auto 1rem; }
.cta-band p { margin: 0 auto 2rem; color: var(--on-dark); }
.cta-band .btn-row { justify-content: center; }

/* ---------------------------------------------------------------------------
   19. FOOTER  (component)
   --------------------------------------------------------------------------- */
footer.site { background: var(--pine-800-fixed); color: var(--on-dark); padding: 48px 0 32px; }
footer.site a { color: var(--amber-soft); }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 32px; }
.foot-grid h4 { color: var(--white); font-family: var(--font-body); font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; }
.foot-grid li { margin-bottom: .4rem; font-size: .9rem; }
.foot-brand { display: flex; align-items: center; gap: 10px; margin-bottom: .6rem; font-family: var(--font-display); font-size: 1.2rem; color: var(--white); font-weight: 600; }
.foot-brand img { height: 28px; }
.foot-brand span { color: var(--amber); }
.foot-note { border-top: 1px solid rgba(255,255,255,.1); padding-top: 20px; font-size: .82rem; color: var(--slate-blue-soft); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } }

/* ---------------------------------------------------------------------------
   20. SEARCH (client-side)  (component)
   --------------------------------------------------------------------------- */
.search-wrap { position: relative; }
#site-search { width: 100%; }
.search-results { position: absolute; top: calc(100% + 8px); left: 0; right: 0; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); max-height: 360px; overflow-y: auto; z-index: 50; }
.search-results a { display: block; padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--pine); }
.search-results a:hover { background: var(--parchment); text-decoration: none; }
.search-results .sr-kicker { font-family: var(--font-mono); font-size: .62rem; text-transform: uppercase; letter-spacing: .05em; color: var(--amber-text); display: block; }
.search-results .sr-empty { padding: 16px; color: var(--sage); font-size: .9rem; }

/* ---------------------------------------------------------------------------
   21. HELPERS
   --------------------------------------------------------------------------- */
.stack-sm > * + * { margin-top: .5rem; }
.mt-0 { margin-top: 0; }
.mb-2 { margin-bottom: 2rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------------------------------------------------------------------------
   22. FOOTER BRAND (split links)
   --------------------------------------------------------------------------- */
.foot-brand { display: flex; align-items: center; gap: 10px; }
.foot-brand img { height: 28px; }
.foot-brand a { display: inline-flex; align-items: center; }
.foot-brand .foot-word { font-family: var(--font-display); font-size: 1.3rem; color: #fff; font-weight: 600; }
.foot-brand .foot-word:hover { color: var(--amber-soft); text-decoration: none; }
.foot-tagline { font-size: .9rem; max-width: 42ch; color: var(--on-dark); opacity: .9; }
