/* ==========================================================================
   ShieldAI Design System
   One stylesheet shared by every page. Change a token here, it changes
   everywhere. Do not re-declare these values in page-level <style> blocks.
   ========================================================================== */

/* --- 1. Tokens ---------------------------------------------------------- */

:root {
  /* Ink / neutral ramp — cool-shifted to sit with the brand navy */
  --n-0:   #ffffff;
  --n-25:  #fbfcfe;
  --n-50:  #f5f7fb;
  --n-100: #eceff6;
  --n-200: #dde2ed;
  --n-300: #c3cbdc;
  --n-400: #98a3bd;
  --n-500: #6b7899;
  --n-600: #4d5978;
  --n-700: #38425c;
  --n-800: #232c42;
  --n-900: #141b2d;
  --n-950: #0a0f1c;

  /* Brand — #2C3E87 retained as the 600 step, ramp built around it */
  --b-50:  #eef1fa;
  --b-100: #dbe2f5;
  --b-200: #b9c6ea;
  --b-300: #8fa2da;
  --b-400: #6379c2;
  --b-500: #4256a5;
  --b-600: #2c3e87;   /* documented brand blue */
  --b-700: #24336f;
  --b-800: #1b2653;
  --b-900: #131b3b;

  /* Accent azure — evolved from #4A90E2, brightened for dark-ground legibility */
  --a-300: #8ec5ff;
  --a-400: #5aa9ff;
  --a-500: #3d90f0;
  --a-600: #2f74c9;

  /* Signal colours — status only, never decoration */
  --ok-400:   #34d399;
  --ok-600:   #059669;   /* fills, dots, icons — 3.77:1, NOT valid for text */
  --ok-700:   #047857;   /* the text-safe green: 5.48:1 on white */
  --warn-500: #f59e0b;
  --crit-500: #ef4444;

  /* Semantic surfaces */
  --surface:        var(--n-0);
  --surface-sunken: var(--n-50);
  --surface-dark:   var(--n-950);
  --surface-dark-2: var(--n-900);
  --border:         var(--n-200);
  --border-strong:  var(--n-300);
  --border-dark:    rgba(255, 255, 255, .10);

  /* Semantic text — all AA or better on their intended ground */
  --text:          var(--n-900);
  --text-muted:    var(--n-600);
  /* Not --n-500: that lands at 4.4:1 on white and fails AA for body text.
     #5f6c8b clears 4.5:1 on white through --n-100. Keep --n-500 for
     borders, icons and dividers — non-text uses where AA does not apply. */
  --text-subtle:   #5f6c8b;
  --text-on-dark:  #eef2fa;
  --text-on-dark-muted: #a9b5cd;

  /* Type */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono",
               Menlo, Consolas, monospace;

  /* Type scale — 1.200 minor third, clamped for fluid response */
  --t-xs:   0.75rem;
  --t-sm:   0.875rem;
  --t-base: 1rem;
  --t-md:   1.0625rem;
  --t-lg:   clamp(1.125rem, 0.35vw + 1.05rem, 1.25rem);
  --t-xl:   clamp(1.375rem, 0.6vw + 1.25rem, 1.625rem);
  --t-2xl:  clamp(1.75rem, 1.1vw + 1.5rem, 2.25rem);
  --t-3xl:  clamp(2.125rem, 2vw + 1.6rem, 3rem);
  --t-4xl:  clamp(2.5rem, 3.6vw + 1.6rem, 4.25rem);

  /* Spacing — 4px base */
  --s-1: 0.25rem;  --s-2: 0.5rem;   --s-3: 0.75rem;  --s-4: 1rem;
  --s-5: 1.25rem;  --s-6: 1.5rem;   --s-8: 2rem;     --s-10: 2.5rem;
  --s-12: 3rem;    --s-16: 4rem;    --s-20: 5rem;    --s-24: 6rem;
  --s-32: 8rem;

  /* Radii */
  --r-sm: 6px;  --r-md: 10px;  --r-lg: 14px;  --r-xl: 20px;  --r-full: 999px;

  /* Elevation — tinted with the navy so shadows never look grey-dirty */
  --e-1: 0 1px 2px rgba(20, 27, 45, .06), 0 1px 3px rgba(20, 27, 45, .04);
  --e-2: 0 2px 4px rgba(20, 27, 45, .05), 0 4px 12px rgba(20, 27, 45, .06);
  --e-3: 0 4px 8px rgba(20, 27, 45, .05), 0 12px 28px rgba(20, 27, 45, .09);
  --e-4: 0 8px 16px rgba(20, 27, 45, .06), 0 24px 56px rgba(20, 27, 45, .12);

  /* Layout */
  --wrap: 1180px;
  --wrap-narrow: 760px;
  --header-h: 68px;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* --- 2. Reset & base ---------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--s-4));
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

body {
  font-family: var(--font-sans);
  font-size: var(--t-md);
  line-height: 1.65;
  color: var(--text);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  text-rendering: optimizeLegibility;
}

img, svg, video { display: block; max-width: 100%; }

h1, h2, h3, h4 {
  line-height: 1.15;
  letter-spacing: -0.022em;
  font-weight: 640;
  text-wrap: balance;
  color: var(--text);
}

h1 { font-size: var(--t-4xl); letter-spacing: -0.032em; font-weight: 680; }
h2 { font-size: var(--t-3xl); letter-spacing: -0.028em; }
h3 { font-size: var(--t-xl); }
h4 { font-size: var(--t-lg); }

p { text-wrap: pretty; }

a { color: var(--b-600); text-decoration-thickness: 1px; text-underline-offset: 3px; }

ul, ol { padding: 0; list-style: none; }

/* Focus — one visible ring everywhere, on both grounds */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--a-500);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}
.on-dark :where(a, button, summary):focus-visible { outline-color: var(--a-300); }

::selection { background: var(--b-200); color: var(--b-900); }

.skip-link {
  position: absolute; left: var(--s-4); top: -100px;
  z-index: 2000; padding: var(--s-3) var(--s-5);
  background: var(--n-950); color: #fff; border-radius: var(--r-md);
  font-weight: 600; text-decoration: none;
  transition: top .16s var(--ease);
}
.skip-link:focus { top: var(--s-4); }

/* --- 3. Layout ---------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--s-6);
}

.section { padding-block: clamp(var(--s-16), 8vw, var(--s-24)); }
.section--tight { padding-block: clamp(var(--s-12), 6vw, var(--s-16)); }
.section--sunken { background: var(--surface-sunken); }

.section--dark {
  background: var(--surface-dark);
  color: var(--text-on-dark);
}
.section--dark h1, .section--dark h2,
.section--dark h3, .section--dark h4 { color: #fff; }

.stack > * + * { margin-top: var(--s-4); }

/* Section heading block */
.sec-head { max-width: 62ch; margin-bottom: var(--s-12); }
.sec-head--center { margin-inline: auto; text-align: center; }
.sec-head p {
  margin-top: var(--s-4);
  font-size: var(--t-lg);
  color: var(--text-muted);
  line-height: 1.6;
}
.section--dark .sec-head p { color: var(--text-on-dark-muted); }

.eyebrow {
  display: inline-flex; align-items: center; gap: var(--s-2);
  font-size: var(--t-xs);
  font-weight: 620;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--b-600);
  margin-bottom: var(--s-4);
}
.eyebrow::before {
  content: ""; width: 18px; height: 1.5px;
  background: currentColor; border-radius: 2px;
}
.section--dark .eyebrow { color: var(--a-400); }

/* --- 4. Buttons --------------------------------------------------------- */

.btn {
  --btn-bg: var(--b-600);
  --btn-fg: #fff;
  --btn-bd: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: 0.7rem 1.25rem;
  font: inherit;
  font-size: var(--t-sm);
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1.2;
  color: var(--btn-fg);
  background: var(--btn-bg);
  border: 1px solid var(--btn-bd);
  border-radius: var(--r-md);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .16s var(--ease), border-color .16s var(--ease),
              transform .16s var(--ease), box-shadow .16s var(--ease);
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--e-2); }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn svg { width: 16px; height: 16px; flex: none; }

.btn--primary:hover { --btn-bg: var(--b-700); }

.btn--secondary {
  --btn-bg: var(--n-0);
  --btn-fg: var(--n-800);
  --btn-bd: var(--border-strong);
}
.btn--secondary:hover { --btn-bg: var(--n-50); --btn-bd: var(--n-400); }

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--n-700);
  --btn-bd: transparent;
}
.btn--ghost:hover { --btn-bg: var(--n-100); box-shadow: none; }

.btn--lg { padding: 0.9rem 1.6rem; font-size: var(--t-base); }

/* On dark ground */
.on-dark .btn--primary, .section--dark .btn--primary {
  --btn-bg: #fff; --btn-fg: var(--n-950);
}
.on-dark .btn--primary:hover, .section--dark .btn--primary:hover {
  --btn-bg: var(--n-100);
}
.on-dark .btn--secondary, .section--dark .btn--secondary {
  --btn-bg: transparent; --btn-fg: #fff; --btn-bd: rgba(255,255,255,.28);
}
.on-dark .btn--secondary:hover, .section--dark .btn--secondary:hover {
  --btn-bg: rgba(255,255,255,.08); --btn-bd: rgba(255,255,255,.45);
}

.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-3); }

/* Text link with arrow */
.link-arrow {
  display: inline-flex; align-items: center; gap: var(--s-2);
  font-size: var(--t-sm); font-weight: 600;
  color: var(--b-600); text-decoration: none;
}
.link-arrow svg {
  width: 15px; height: 15px;
  transition: transform .16s var(--ease);
}
.link-arrow:hover { text-decoration: underline; }
.link-arrow:hover svg { transform: translateX(3px); }
.on-dark .link-arrow, .section--dark .link-arrow { color: var(--a-300); }

/* --- 5. Header ---------------------------------------------------------- */

.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  display: flex; align-items: center; gap: var(--s-8);
  height: var(--header-h);
}

.brand {
  display: inline-flex; align-items: center; gap: var(--s-3);
  font-size: 1.0625rem; font-weight: 680; letter-spacing: -0.025em;
  color: var(--n-900); text-decoration: none; flex: none;
}
.brand__mark { width: 30px; height: 30px; flex: none; }
.brand__sub {
  font-weight: 500; color: var(--text-subtle);
  letter-spacing: 0;
}

.nav { display: flex; align-items: center; gap: var(--s-1); margin-inline: auto; }
.nav a {
  display: block;
  white-space: nowrap;
  padding: var(--s-2) var(--s-3);
  font-size: var(--t-sm); font-weight: 530;
  color: var(--n-700); text-decoration: none;
  border-radius: var(--r-sm);
  transition: background-color .14s var(--ease), color .14s var(--ease);
}
.nav a:hover { color: var(--n-950); background: var(--n-100); }

.header-cta { display: flex; align-items: center; gap: var(--s-2); flex: none; }

.nav-toggle {
  display: none;
  align-items: center; justify-content: center;
  width: 40px; height: 40px; flex: none;
  color: var(--n-800);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
}
.nav-toggle svg { width: 20px; height: 20px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open  { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

/* Narrow phones: tighten the bar so brand + CTA + toggle still fit at 320px */
@media (max-width: 560px) {
  .site-header__inner { gap: var(--s-3); }
  .header-cta .btn { padding: 0.6rem 0.8rem; font-size: var(--t-xs); }
}

@media (max-width: 940px) {
  .brand__sub { display: none; }
  .nav-toggle { display: inline-flex; order: 3; }
  .header-cta { order: 2; margin-left: auto; }
  .header-cta .btn--secondary { display: none; }

  .nav {
    position: absolute;
    inset-inline: 0;
    top: var(--header-h);
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: var(--s-3) var(--s-5) var(--s-5);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--e-3);
  }
  .nav[data-open] { display: flex; }
  .nav a {
    padding: var(--s-3) var(--s-2);
    font-size: var(--t-base);
    border-bottom: 1px solid var(--border);
    border-radius: 0;
  }
  .nav a:last-child { border-bottom: 0; }
}

/* --- 6. Hero ------------------------------------------------------------ */

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(90rem 42rem at 78% -12%, rgba(61,144,240,.20), transparent 62%),
    radial-gradient(60rem 34rem at 8% 8%, rgba(44,62,135,.42), transparent 60%),
    var(--n-950);
  color: var(--text-on-dark);
  padding-block: clamp(var(--s-16), 9vw, var(--s-32)) clamp(var(--s-16), 8vw, var(--s-24));
}

/* Faint engineering grid — reads as substrate, not decoration */
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(80% 70% at 50% 0%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(80% 70% at 50% 0%, #000 20%, transparent 78%);
  pointer-events: none;
}
.hero > * { position: relative; }

.hero h1 { color: #fff; max-width: 18ch; }
.hero__lede {
  margin-top: var(--s-6);
  max-width: 62ch;
  font-size: var(--t-lg);
  line-height: 1.6;
  color: var(--text-on-dark-muted);
}
.hero .btn-row { margin-top: var(--s-10); }

.pill {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: var(--s-2) var(--s-4);
  font-size: var(--t-xs); font-weight: 560; letter-spacing: .01em;
  color: var(--a-300);
  background: rgba(61,144,240,.10);
  border: 1px solid rgba(61,144,240,.26);
  border-radius: var(--r-full);
  margin-bottom: var(--s-6);
  text-decoration: none;
}
.pill__dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ok-400); flex: none;
}

/* Trust strip under the hero */
.trust {
  margin-top: clamp(var(--s-12), 6vw, var(--s-20));
  padding-top: var(--s-8);
  border-top: 1px solid var(--border-dark);
}
.trust__label {
  font-size: var(--t-xs); font-weight: 600; letter-spacing: .09em;
  text-transform: uppercase; color: var(--n-400);  /* AA on the navy ground */
  margin-bottom: var(--s-5);
}
.trust__items {
  display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-8);
  align-items: center;
}
.trust__item {
  display: inline-flex; align-items: center; gap: var(--s-2);
  font-size: var(--t-sm); font-weight: 560;
  color: var(--text-on-dark-muted);
}
.trust__item svg { width: 17px; height: 17px; color: var(--a-400); flex: none; }

/* --- 7. Grid & cards ---------------------------------------------------- */

.grid { display: grid; gap: var(--s-6); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }

.card {
  display: flex; flex-direction: column;
  padding: var(--s-8);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease),
              transform .18s var(--ease);
}
.card h3 { margin-bottom: var(--s-3); }
.card p { color: var(--text-muted); font-size: var(--t-base); }

.card--hover:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: var(--e-3);
}

.section--dark .card {
  background: rgba(255,255,255,.035);
  border-color: var(--border-dark);
}
.section--dark .card p { color: var(--text-on-dark-muted); }
.section--dark .card--hover:hover {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.20);
  box-shadow: none;
}

/* Icon chip */
.icon-chip {
  display: grid; place-items: center;
  width: 42px; height: 42px;
  margin-bottom: var(--s-5);
  color: var(--b-600);
  background: var(--b-50);
  border: 1px solid var(--b-100);
  border-radius: var(--r-md);
  flex: none;
}
.icon-chip svg { width: 21px; height: 21px; }
.section--dark .icon-chip {
  color: var(--a-300);
  background: rgba(61,144,240,.10);
  border-color: rgba(61,144,240,.22);
}

/* --- 8. Product cards --------------------------------------------------- */

.product {
  position: relative;
  display: flex; flex-direction: column;
  padding: var(--s-8);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease),
              transform .18s var(--ease);
}
.product::before {
  content: "";
  position: absolute; inset-inline: 0; top: 0; height: 3px;
  background: var(--product-accent, var(--b-600));
  opacity: .9;
}
.product:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: var(--e-3);
}
.product__head {
  display: flex; align-items: flex-start; gap: var(--s-4);
  margin-bottom: var(--s-4);
}
.product__mark {
  display: grid; place-items: center;
  width: 40px; height: 40px; flex: none;
  border-radius: var(--r-md);
  color: #fff;
  background: var(--product-accent, var(--b-600));
}
.product__mark svg { width: 20px; height: 20px; }
.product__name { font-size: var(--t-lg); margin: 0; }
.product__kicker {
  display: block;
  font-size: var(--t-xs); font-weight: 600; letter-spacing: .07em;
  text-transform: uppercase; color: var(--n-600);  /* AA at 12px on white */
  margin-top: var(--s-1);
}
.product p { color: var(--text-muted); font-size: var(--t-base); flex: 1; }
.product__foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-4); flex-wrap: wrap;
  margin-top: var(--s-6);
  padding-top: var(--s-5);
  border-top: 1px solid var(--border);
}

.tags { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-5); }
.tag {
  padding: 0.2rem 0.6rem;
  font-size: var(--t-xs); font-weight: 560;
  color: var(--n-700);
  background: var(--n-100);
  border-radius: var(--r-full);
}
.section--dark .tag { color: var(--text-on-dark-muted); background: rgba(255,255,255,.07); }

/* --- 9. Numbered steps -------------------------------------------------- */

.steps { counter-reset: step; display: grid; gap: var(--s-8); }
.step { position: relative; padding-left: 0; }
.step__num {
  display: grid; place-items: center;
  width: 34px; height: 34px;
  margin-bottom: var(--s-4);
  font-size: var(--t-sm); font-weight: 680;
  font-variant-numeric: tabular-nums;
  color: var(--b-600);
  background: var(--b-50);
  border: 1px solid var(--b-200);
  border-radius: var(--r-full);
}
.step h3 { margin-bottom: var(--s-2); font-size: var(--t-lg); }
.step p { color: var(--text-muted); font-size: var(--t-base); }
.section--dark .step__num {
  color: var(--a-300); background: rgba(61,144,240,.10);
  border-color: rgba(61,144,240,.26);
}

/* --- 10. Spec list (technical detail) ----------------------------------- */

.specs { display: grid; gap: var(--s-3); margin-top: var(--s-5); min-width: 0; }
/* Normal flow with a hanging icon — deliberately NOT flex/grid. These lines
   contain inline <code>, and a flex or grid container would make each <code>
   its own item, splitting the sentence into unwrappable fragments. */
.spec {
  position: relative;
  padding-left: 27px;
  font-size: var(--t-sm); line-height: 1.55;
  color: var(--text-on-dark-muted);
  overflow-wrap: break-word;
}
.spec > svg {
  position: absolute; left: 0; top: 5px;
  width: 15px; height: 15px; color: var(--a-400);
}
.spec code {
  display: inline;              /* stay breakable inside the flow */
  font-family: var(--font-mono); font-size: .8125em;
  padding: 1px 5px; border-radius: 4px;
  background: rgba(255,255,255,.08); color: var(--a-300);
  overflow-wrap: break-word;
}

/* --- 11. Framework chips ------------------------------------------------ */

.frameworks {
  display: flex; flex-wrap: wrap; gap: var(--s-3);
  justify-content: center;
}
.framework {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: var(--s-3) var(--s-5);
  font-size: var(--t-sm); font-weight: 560;
  color: var(--n-700);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
}
.framework svg { width: 15px; height: 15px; color: var(--ok-600); flex: none; }

/* --- 12. Stat row ------------------------------------------------------- */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: var(--s-6);
}
.stat { padding-left: var(--s-5); border-left: 2px solid var(--b-200); }
.stat__value {
  font-size: var(--t-2xl); font-weight: 700; letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums; line-height: 1.1;
  color: var(--b-600);
}
.stat__label {
  margin-top: var(--s-2);
  font-size: var(--t-sm); color: var(--text-muted);
}
.section--dark .stat { border-left-color: rgba(61,144,240,.35); }
.section--dark .stat__value { color: #fff; }
.section--dark .stat__label { color: var(--text-on-dark-muted); }

/* --- 13. CTA band ------------------------------------------------------- */

.cta-band {
  position: relative; overflow: hidden;
  background:
    radial-gradient(60rem 30rem at 82% 110%, rgba(61,144,240,.24), transparent 60%),
    var(--b-800);
  color: #fff;
  border-radius: var(--r-xl);
  padding: clamp(var(--s-10), 6vw, var(--s-16));
  text-align: center;
}
.cta-band h2 { color: #fff; max-width: 20ch; margin-inline: auto; }
.cta-band p {
  margin: var(--s-4) auto 0;
  max-width: 56ch;
  font-size: var(--t-lg);
  color: rgba(255,255,255,.82);
}
.cta-band .btn-row { justify-content: center; margin-top: var(--s-8); }

/* --- 14. Footer --------------------------------------------------------- */

.site-footer {
  background: var(--n-950);
  color: var(--text-on-dark-muted);
  padding-block: var(--s-16) var(--s-8);
  font-size: var(--t-sm);
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 158px), 1fr));
  gap: var(--s-10) var(--s-8);
  padding-bottom: var(--s-12);
}
/* Brand block gets the wider lead column only when there is room for it */
@media (min-width: 1000px) {
  .footer-grid { grid-template-columns: 1.5fr repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 560px) and (max-width: 999px) {
  .footer-brand { grid-column: 1 / -1; }
}
.site-footer h4 {
  font-size: var(--t-xs); font-weight: 620;
  letter-spacing: .09em; text-transform: uppercase;
  color: #fff; margin-bottom: var(--s-4);
}
.site-footer li { margin-bottom: var(--s-2); }
.site-footer a {
  color: var(--text-on-dark-muted); text-decoration: none;
  transition: color .14s var(--ease);
}
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-brand .brand { color: #fff; margin-bottom: var(--s-4); }
.footer-brand p { max-width: 34ch; line-height: 1.6; }

.footer-bottom {
  display: flex; flex-wrap: wrap; gap: var(--s-4);
  align-items: center; justify-content: space-between;
  padding-top: var(--s-6);
  border-top: 1px solid var(--border-dark);
  color: var(--n-400);
  font-size: var(--t-xs);
}
.footer-bottom nav { display: flex; flex-wrap: wrap; gap: var(--s-5); }

/* --- 15. Utilities ------------------------------------------------------ */

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.text-center { text-align: center; }
.mt-0  { margin-top: 0; }
.mt-6  { margin-top: var(--s-6); }
.mt-8  { margin-top: var(--s-8); }
.mt-12 { margin-top: var(--s-12); }
.measure { max-width: 62ch; }

/* Split layout: text beside a visual */
.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  gap: clamp(var(--s-10), 5vw, var(--s-16));
  align-items: center;
}

/* --- 16. Narrow viewports ----------------------------------------------- */

@media (max-width: 560px) {
  .wrap { padding-inline: var(--s-5); }
  .card, .product { padding: var(--s-6); }
  .cta-band { padding: var(--s-8) var(--s-6); }
  .btn { width: 100%; }                 /* full-width tap targets */
  .btn-row { flex-direction: column; align-items: stretch; }
  .header-cta .btn { width: auto; }
  .product__foot { align-items: flex-start; flex-direction: column; }
  .trust__items { gap: var(--s-3) var(--s-5); }
  .stat { padding-left: var(--s-4); }
}

@media print {
  .site-header, .cta-band, .skip-link { display: none; }
  body { color: #000; background: #fff; }
}

/* ==========================================================================
   17. Application layer
   Components for the tool pages (checker, assistant, tracker, dashboard,
   demo). Marketing pages will not use most of this. Everything below is
   built from the tokens above — no raw hex values.
   ========================================================================== */

/* --- App shell ---------------------------------------------------------- */

.app-header__context {
  display: inline-flex; align-items: center; gap: var(--s-3);
  padding-left: var(--s-3);
  margin-left: var(--s-1);
  border-left: 1px solid var(--border);
  font-size: var(--t-sm); font-weight: 560; color: var(--text-muted);
}
/* First thing to go when the header row gets tight. This lives here, after the
   base rule above — a copy up in section 5 would be overridden by it. */
@media (max-width: 1100px) { .app-header__context { display: none; } }

.app-main { padding-block: var(--s-10) var(--s-16); background: var(--surface-sunken); min-height: 60vh; }
.app-main--plain { background: var(--surface); }

.page-head { margin-bottom: var(--s-8); }
.page-head h1 { font-size: var(--t-2xl); letter-spacing: -0.025em; }
.page-head p { margin-top: var(--s-3); color: var(--text-muted); max-width: 68ch; }

/* --- Panel -------------------------------------------------------------- */

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--e-1);
  overflow: hidden;
}
.panel__header {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-4); flex-wrap: wrap;
  padding: var(--s-5) var(--s-6);
  border-bottom: 1px solid var(--border);
  background: var(--n-25);
}
.panel__header h2, .panel__header h3 { font-size: var(--t-lg); margin: 0; }
.panel__body { padding: var(--s-6); }
.panel__body--flush { padding: 0; }
.panel__footer {
  display: flex; align-items: center; justify-content: flex-end;
  gap: var(--s-3); flex-wrap: wrap;
  padding: var(--s-5) var(--s-6);
  border-top: 1px solid var(--border);
  background: var(--n-25);
}

/* --- Forms -------------------------------------------------------------- */

.field { margin-bottom: var(--s-5); }
.field:last-child { margin-bottom: 0; }

.label {
  display: block;
  margin-bottom: var(--s-2);
  font-size: var(--t-sm); font-weight: 600; color: var(--n-800);
}
.label .req { color: var(--crit-500); margin-left: 2px; }

.input, .select, .textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  font: inherit; font-size: var(--t-base);
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  transition: border-color .14s var(--ease), box-shadow .14s var(--ease);
}
.textarea { min-height: 120px; resize: vertical; }
.select {
  appearance: none;
  padding-right: 2.25rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234d5978' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  background-size: 18px;
}
.input:hover, .select:hover, .textarea:hover { border-color: var(--n-400); }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--b-500);
  box-shadow: 0 0 0 3px rgba(66, 86, 165, .16);
}
.input::placeholder, .textarea::placeholder { color: var(--n-400); }
.input:disabled, .select:disabled, .textarea:disabled {
  background: var(--n-100); color: var(--text-subtle); cursor: not-allowed;
}
.input[aria-invalid="true"], .select[aria-invalid="true"] { border-color: var(--crit-500); }

.hint { margin-top: var(--s-2); font-size: var(--t-sm); color: var(--text-muted); }
.error-text { margin-top: var(--s-2); font-size: var(--t-sm); color: var(--crit-500); font-weight: 500; }

.field-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: var(--s-5);
}

/* Choice controls — the whole block is the target, not just the box */
.choice-group { display: grid; gap: var(--s-3); }
.choice {
  display: flex; align-items: flex-start; gap: var(--s-3);
  padding: var(--s-4);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: border-color .14s var(--ease), background-color .14s var(--ease);
}
.choice:hover { border-color: var(--b-400); background: var(--b-50); }
.choice input { margin-top: 3px; accent-color: var(--b-600); width: 17px; height: 17px; flex: none; }
.choice__text { font-size: var(--t-base); }
.choice__text strong { display: block; font-weight: 600; }
.choice__text span { display: block; font-size: var(--t-sm); color: var(--text-muted); margin-top: 2px; }
.choice:has(input:checked) { border-color: var(--b-600); background: var(--b-50); box-shadow: inset 0 0 0 1px var(--b-600); }
.choice:has(input:focus-visible) { outline: 2px solid var(--a-500); outline-offset: 2px; }

/* --- Stepper ------------------------------------------------------------ */

.stepper {
  display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-6);
  padding: var(--s-5) var(--s-6);
  border-bottom: 1px solid var(--border);
  background: var(--n-25);
}
.stepper__item {
  display: inline-flex; align-items: center; gap: var(--s-3);
  font-size: var(--t-sm); font-weight: 560; color: var(--text-subtle);
}
.stepper__dot {
  display: grid; place-items: center;
  width: 26px; height: 26px; flex: none;
  font-size: var(--t-xs); font-weight: 680;
  font-variant-numeric: tabular-nums;
  color: var(--text-subtle);
  background: var(--n-100);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-full);
}
.stepper__item.is-active { color: var(--b-700); }
.stepper__item.is-active .stepper__dot {
  color: #fff; background: var(--b-600); border-color: var(--b-600);
}
.stepper__item.is-done { color: var(--ok-700); }
.stepper__item.is-done .stepper__dot {
  color: #fff; background: var(--ok-600); border-color: var(--ok-600);
}

/* --- Status pills ------------------------------------------------------- */

.status {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: 0.2rem 0.65rem;
  font-size: var(--t-xs); font-weight: 620; letter-spacing: .01em;
  border-radius: var(--r-full);
  white-space: nowrap;
}
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.status--draft      { color: #374151; background: #f3f4f6; }
.status--submitted  { color: #1e40af; background: #dbeafe; }
.status--review     { color: #92400e; background: #fef3c7; }
.status--info       { color: #c2410c; background: #ffedd5; }
.status--approved   { color: #166534; background: #dcfce7; }
.status--rejected   { color: #991b1b; background: #fee2e2; }
.status--paid       { color: #6b21a8; background: #f3e8ff; }

/* --- Data table --------------------------------------------------------- */

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
.table th {
  position: sticky; top: 0; z-index: 1;
  padding: var(--s-3) var(--s-5);
  text-align: left;
  font-size: var(--t-xs); font-weight: 620;
  letter-spacing: .07em; text-transform: uppercase;
  color: var(--text-muted);
  background: var(--n-50);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table td {
  padding: var(--s-4) var(--s-5);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.table tbody tr { transition: background-color .12s var(--ease); }
.table tbody tr:hover { background: var(--n-25); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num { font-variant-numeric: tabular-nums; text-align: right; }
.table .mono { font-family: var(--font-mono); font-size: .8125rem; color: var(--text-muted); }

/* --- Toolbar / filters -------------------------------------------------- */

.toolbar {
  display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap;
  padding: var(--s-4) var(--s-6);
  border-bottom: 1px solid var(--border);
}
.toolbar .input { max-width: 320px; }

.filter-btn {
  padding: 0.4rem 0.85rem;
  font: inherit; font-size: var(--t-sm); font-weight: 560;
  color: var(--n-700);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-full);
  cursor: pointer;
  transition: all .14s var(--ease);
}
.filter-btn:hover { border-color: var(--n-400); background: var(--n-50); }
.filter-btn.active {
  color: #fff; background: var(--b-600); border-color: var(--b-600);
}

/* --- Alerts ------------------------------------------------------------- */

.alert {
  display: flex; gap: var(--s-3);
  padding: var(--s-4) var(--s-5);
  border: 1px solid;
  border-radius: var(--r-md);
  font-size: var(--t-sm); line-height: 1.6;
}
.alert svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.alert strong { display: block; margin-bottom: 2px; }
.alert--info    { color: #1e3a8a; background: #eff6ff; border-color: #bfdbfe; }
.alert--success { color: #14532d; background: #f0fdf4; border-color: #bbf7d0; }
.alert--warn    { color: #78350f; background: #fffbeb; border-color: #fde68a; }
.alert--danger  { color: #7f1d1d; background: #fef2f2; border-color: #fecaca; }

/* --- Timeline ----------------------------------------------------------- */

.timeline { position: relative; padding-left: var(--s-8); }
.timeline::before {
  content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px;
  width: 2px; background: var(--border);
}
.timeline__item { position: relative; padding-bottom: var(--s-6); }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__item::before {
  content: ""; position: absolute; left: calc(var(--s-8) * -1 + 4px); top: 5px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--n-300); border: 2px solid var(--surface);
  box-shadow: 0 0 0 2px var(--border);
}
.timeline__item.is-done::before { background: var(--ok-600); box-shadow: 0 0 0 2px var(--ok-600); }
.timeline__item.is-active::before { background: var(--b-600); box-shadow: 0 0 0 2px var(--b-600); }
.timeline__title { font-size: var(--t-base); font-weight: 600; }
.timeline__meta { font-size: var(--t-sm); color: var(--text-subtle); margin-top: 2px; }
.timeline__body { font-size: var(--t-sm); color: var(--text-muted); margin-top: var(--s-2); }

/* --- Chat --------------------------------------------------------------- */

.chat {
  display: flex; flex-direction: column;
  height: min(70vh, 620px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.chat__header {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-4) var(--s-5);
  border-bottom: 1px solid var(--border);
  background: var(--n-25);
}
.chat__log {
  flex: 1; overflow-y: auto;
  padding: var(--s-5);
  display: flex; flex-direction: column; gap: var(--s-4);
  scroll-behavior: smooth;
}
.msg { display: flex; gap: var(--s-3); max-width: 78%; }
.msg__avatar {
  display: grid; place-items: center;
  width: 30px; height: 30px; flex: none;
  border-radius: var(--r-full);
  font-size: var(--t-xs); font-weight: 700;
  color: #fff; background: var(--b-600);
}
.msg__avatar svg { width: 16px; height: 16px; }
.msg__bubble {
  padding: var(--s-3) var(--s-4);
  font-size: var(--t-base); line-height: 1.6;
  background: var(--n-100);
  border-radius: var(--r-md);
  border-top-left-radius: var(--r-sm);
}
.msg--user { margin-left: auto; flex-direction: row-reverse; }
.msg--user .msg__avatar { background: var(--n-700); }
.msg--user .msg__bubble {
  color: #fff; background: var(--b-600);
  border-radius: var(--r-md); border-top-right-radius: var(--r-sm);
}
.chat__compose {
  display: flex; gap: var(--s-3);
  padding: var(--s-4) var(--s-5);
  border-top: 1px solid var(--border);
  background: var(--n-25);
}
.chat__compose .input { flex: 1; }

.typing { display: inline-flex; gap: 4px; align-items: center; padding: 4px 0; }
.typing span {
  width: 6px; height: 6px; border-radius: 50%; background: var(--n-400);
  animation: typing 1.2s var(--ease) infinite;
}
.typing span:nth-child(2) { animation-delay: .18s; }
.typing span:nth-child(3) { animation-delay: .36s; }
@keyframes typing { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

/* --- Modal -------------------------------------------------------------- */

.modal-backdrop {
  position: fixed; inset: 0; z-index: 1500;
  display: grid; place-items: center;
  padding: var(--s-5);
  background: rgba(10, 15, 28, .55);
  backdrop-filter: blur(3px);
}
.modal-backdrop[hidden] { display: none; }
.modal {
  width: min(100%, 720px);
  max-height: 86vh;
  display: flex; flex-direction: column;
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--e-4);
  overflow: hidden;
}
.modal__header {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
  padding: var(--s-5) var(--s-6);
  border-bottom: 1px solid var(--border);
}
.modal__body { padding: var(--s-6); overflow-y: auto; }
.modal__close {
  display: grid; place-items: center;
  width: 34px; height: 34px; flex: none;
  color: var(--text-muted); background: transparent;
  border: 0; border-radius: var(--r-md); cursor: pointer;
}
.modal__close:hover { background: var(--n-100); color: var(--text); }
.modal__close svg { width: 18px; height: 18px; }

/* --- Definition list ---------------------------------------------------- */

.dl { display: grid; gap: var(--s-4); }
.dl--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.dl dt {
  font-size: var(--t-xs); font-weight: 620; letter-spacing: .07em;
  text-transform: uppercase; color: var(--text-muted);
  margin-bottom: var(--s-1);
}
.dl dd { margin: 0; font-size: var(--t-base); font-weight: 500; }

/* --- Empty state -------------------------------------------------------- */

.empty { padding: var(--s-16) var(--s-6); text-align: center; }
.empty svg { width: 40px; height: 40px; margin: 0 auto var(--s-4); color: var(--n-400); }
.empty h3 { font-size: var(--t-lg); margin-bottom: var(--s-2); }
.empty p { color: var(--text-muted); font-size: var(--t-sm); max-width: 44ch; margin-inline: auto; }
