/* ==========================================================================
   VozOps — design system
   Zero-dependency, token-driven stylesheet for the public website.
   Structure:
     1. Fonts            5. Layout primitives    9. Diagrams
     2. Design tokens    6. Header / navigation  10. Forms
     3. Reset / base     7. Footer               11. Assessment wizard
     4. Typography       8. Components           12. Utilities / motion
   ========================================================================== */

/* 1. Fonts ---------------------------------------------------------------- */

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
}

/* 2. Design tokens --------------------------------------------------------- */

:root {
  color-scheme: light;

  /* Color — core */
  --ink: #131c24;
  --ink-2: #3b4650;
  --muted: #5a6570;
  --paper: #f7f5f0;
  --surface: #ffffff;
  --surface-2: #efece4;
  --line: #dfdbd0;
  --line-strong: #c6c1b2;

  /* Color — brand teal (operated system) */
  --teal-900: #0a3733;
  --teal-800: #0e4f4a;
  --teal-700: #14625c;
  --teal-600: #1a746d;
  --teal-100: #e3ecea;

  /* Color — copper (human authority) */
  --copper: #c0764a;
  --copper-text: #8a4d26;
  --copper-100: #f4e8de;

  /* Color — dark sections */
  --dark-bg: #0c2724;
  --dark-panel: #113330;
  --dark-line: rgba(247, 245, 240, 0.16);
  --dark-text: #f7f5f0;
  --dark-muted: #a9bdb8;

  /* Color — status */
  --ok: #1d6f42;
  --ok-100: #e3efe7;
  --error: #b0362a;
  --error-100: #f8ecea;

  /* Typography */
  --font-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --text-xs: 0.8125rem;
  --text-sm: 0.9063rem;
  --text-base: 1.0313rem;
  --text-md: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
  --text-lg: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.3rem + 1vw, 2rem);
  --text-2xl: clamp(1.875rem, 1.5rem + 1.9vw, 2.75rem);
  --text-display: clamp(2.25rem, 1.6rem + 3.2vw, 3.85rem);
  --leading-body: 1.65;
  --leading-tight: 1.15;

  /* Space (4px base) */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4rem;
  --s-9: 6rem;

  /* Shape */
  --r-sm: 4px;
  --r-md: 6px;
  --r-lg: 10px;

  /* Layout */
  --container: 1180px;
  --container-narrow: 820px;
  --gutter: clamp(1.25rem, 4.5vw, 3rem);
  --header-h: 68px;

  /* Elevation (restrained) */
  --shadow-sm: 0 1px 2px rgba(19, 28, 36, 0.05);
  --shadow-md: 0 8px 28px -12px rgba(19, 28, 36, 0.16);

  /* Motion */
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --dur-1: 140ms;
  --dur-2: 240ms;
}

/* 3. Reset / base ----------------------------------------------------------- */

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

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, p, ul, ol, dl, figure {
  margin: 0;
}

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

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

a {
  color: var(--teal-700);
}

a:hover {
  color: var(--teal-800);
}

:focus-visible {
  outline: 2px solid var(--teal-700);
  outline-offset: 2px;
  border-radius: 2px;
}

::selection {
  background: var(--teal-800);
  color: var(--paper);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 18px;
  border-radius: var(--r-sm);
  text-decoration: none;
  font-weight: 500;
  font-size: var(--text-sm);
}

.skip-link:focus {
  top: 12px;
  color: var(--paper);
}

.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;
}

/* 4. Typography ------------------------------------------------------------- */

h1, h2, h3, h4 {
  font-weight: 600;
  line-height: var(--leading-tight);
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.t-display { font-size: var(--text-display); }
.t-2xl { font-size: var(--text-2xl); }
.t-xl { font-size: var(--text-xl); }
.t-lg { font-size: var(--text-lg); letter-spacing: -0.01em; }
.t-md { font-size: var(--text-md); }

.lead {
  font-size: var(--text-md);
  color: var(--ink-2);
  line-height: 1.6;
  max-width: 38em;
  text-wrap: pretty;
}

/* Compact fact line (hero, assessment intro) */
.facts {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.9;
}

.facts .sep {
  color: var(--copper);
  margin: 0 0.5em;
}

.muted { color: var(--muted); }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-700);
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--copper);
  flex: none;
}

.eyebrow--bare::before { display: none; }

.on-dark .eyebrow { color: var(--dark-muted); }

/* Prose (legal pages, long-form) */
.prose {
  max-width: 68ch;
}

.prose h2 {
  font-size: var(--text-lg);
  margin: var(--s-7) 0 var(--s-4);
  padding-top: var(--s-5);
  border-top: 1px solid var(--line);
}

.prose h3 {
  font-size: var(--text-md);
  margin: var(--s-5) 0 var(--s-3);
}

.prose p, .prose ul, .prose ol {
  margin-bottom: var(--s-4);
  color: var(--ink-2);
}

.prose li { margin-bottom: var(--s-2); }
.prose ul, .prose ol { padding-left: 1.35em; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose strong { color: var(--ink); font-weight: 600; }

/* 5. Layout primitives ------------------------------------------------------ */

.container {
  width: min(var(--container), 100% - var(--gutter) * 2);
  margin-inline: auto;
}

.container--narrow {
  width: min(var(--container-narrow), 100% - var(--gutter) * 2);
}

.section {
  padding-block: clamp(3.5rem, 9vw, 6.5rem);
}

.section--tight {
  padding-block: clamp(2.5rem, 6vw, 4rem);
}

.section--surface {
  background: var(--surface);
  border-block: 1px solid var(--line);
}

.section--dark {
  background: var(--dark-bg);
  color: var(--dark-text);
}

.section-head {
  display: grid;
  gap: var(--s-4);
  max-width: 760px;
  margin-bottom: clamp(2.25rem, 5vw, 3.5rem);
}

.section-head h2 {
  font-size: var(--text-2xl);
}

.section-head .lead { font-size: var(--text-md); }

.on-dark .lead,
.section--dark .lead { color: var(--dark-muted); }

.grid {
  display: grid;
  gap: var(--s-5);
}

@media (min-width: 720px) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 980px) {
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1020px) {
  .grid--domains { grid-template-columns: repeat(3, 1fr); }
}

/* 6. Header / navigation ------------------------------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-2) var(--ease), background-color var(--dur-2) var(--ease);
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
}

.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5);
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 1.22rem;
  letter-spacing: -0.015em;
  line-height: 1;
}

.brand:hover { color: var(--ink); }

.brand svg {
  width: 30px;
  height: 30px;
  flex: none;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(var(--s-4), 2.5vw, var(--s-6));
}

.site-nav__links {
  display: flex;
  align-items: center;
  gap: clamp(var(--s-4), 2.2vw, var(--s-6));
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav__links a {
  text-decoration: none;
  color: var(--ink-2);
  font-size: var(--text-sm);
  font-weight: 500;
  padding: 8px 2px;
  border-bottom: 2px solid transparent;
  transition: color var(--dur-1) var(--ease);
}

.site-nav__links a:hover {
  color: var(--ink);
}

.site-nav__links a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--copper);
}

/* Language switch — quiet mono pair; current locale carries the same copper
   marker used for the active nav link. */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  line-height: 1;
}

.lang-switch a,
.lang-switch .is-current {
  padding: 9px 6px 7px;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.lang-switch .is-current {
  color: var(--ink);
  border-bottom-color: var(--copper);
}

.lang-switch a {
  color: var(--muted);
  transition: color var(--dur-1) var(--ease);
}

.lang-switch a:hover {
  color: var(--ink);
}

.lang-switch__rule {
  width: 1px;
  height: 12px;
  background: var(--line-strong);
  margin: 0 4px;
}

@media (max-width: 859.98px) {
  .site-nav .lang-switch {
    margin-bottom: var(--s-5);
    font-size: 0.8rem;
  }

  .site-nav .lang-switch a,
  .site-nav .lang-switch .is-current {
    padding: 12px 8px 10px;
  }
}

/* Compact assessment CTA shown in the header bar when the nav is collapsed */
.site-header .site-header__cta {
  display: none;
}

.nav-toggle {
  display: none;
  appearance: none;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  padding: 9px 10px;
  cursor: pointer;
  line-height: 0;
}

.nav-toggle svg { width: 20px; height: 20px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-menu { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 859.98px) {
  .nav-toggle { display: inline-flex; }

  .site-header__bar { gap: var(--s-3); }

  .site-header .site-header__cta {
    display: inline-flex;
    margin-left: auto;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    padding: var(--s-5) var(--gutter) var(--s-6);
    max-height: calc(100vh - var(--header-h));
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav__links {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-bottom: var(--s-5);
  }

  .site-nav__links a {
    display: block;
    padding: 14px 2px;
    font-size: var(--text-base);
    border-bottom: 1px solid var(--line);
  }

  .site-nav__links a[aria-current="page"] {
    border-bottom-color: var(--line);
    color: var(--teal-700);
  }

  .site-nav .btn { width: 100%; justify-content: center; }
}

/* 7. Footer ------------------------------------------------------------------ */

.site-footer {
  background: var(--dark-bg);
  color: var(--dark-text);
  padding-block: var(--s-8) var(--s-6);
  font-size: var(--text-sm);
}

.site-footer__grid {
  display: grid;
  gap: var(--s-6);
  padding-bottom: var(--s-6);
  border-bottom: 1px solid var(--dark-line);
}

@media (min-width: 720px) {
  .site-footer__grid {
    grid-template-columns: 1.6fr 1fr 1fr;
  }
}

.site-footer .brand { color: var(--dark-text); }

.site-footer__tagline {
  margin-top: var(--s-4);
  color: var(--dark-muted);
  max-width: 34em;
}

.site-footer h3 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dark-muted);
  margin-bottom: var(--s-4);
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--s-3);
}

.site-footer a {
  color: var(--dark-text);
  text-decoration: none;
}

.site-footer a:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3) var(--s-5);
  justify-content: space-between;
  padding-top: var(--s-5);
  color: var(--dark-muted);
}

.site-footer__legal a { color: var(--dark-muted); }

/* 8. Components ---------------------------------------------------------------- */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 24px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}

.btn .arrow {
  transition: transform var(--dur-1) var(--ease);
}

.btn:hover .arrow {
  transform: translateX(3px);
}

.btn--primary {
  background: var(--teal-700);
  color: var(--paper);
}

.btn--primary:hover {
  background: var(--teal-800);
  color: var(--paper);
}

.btn--primary:active {
  background: var(--teal-900);
}

.btn--secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}

.btn--secondary:hover {
  border-color: var(--ink-2);
  color: var(--ink);
  background: var(--surface);
}

.btn--inverse {
  background: var(--paper);
  color: var(--ink);
}

.btn--inverse:hover {
  background: #fff;
  color: var(--ink);
}

.btn--ghost-inverse {
  background: transparent;
  color: var(--dark-text);
  border-color: rgba(247, 245, 240, 0.35);
}

.btn--ghost-inverse:hover {
  border-color: var(--dark-text);
  color: var(--dark-text);
}

.btn--lg {
  padding: 16px 30px;
  font-size: var(--text-base);
}

.btn--sm {
  padding: 10px 15px;
  font-size: 0.85rem;
}

.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
}

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

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: clamp(1.4rem, 2.4vw, 2rem);
}

.card h3 {
  font-size: var(--text-md);
  margin-bottom: var(--s-3);
}

.card p {
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.6;
}

.card__num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--copper-text);
  display: block;
  margin-bottom: var(--s-4);
}

.card--on-paper {
  background: var(--paper);
}

.on-dark .card,
.card--dark {
  background: var(--dark-panel);
  border-color: var(--dark-line);
}

.on-dark .card h3 { color: var(--dark-text); }
.on-dark .card p { color: var(--dark-muted); }

/* Icon chip used on cards */
.icon-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  background: var(--teal-100);
  color: var(--teal-800);
  margin-bottom: var(--s-4);
}

.icon-chip svg { width: 21px; height: 21px; }

.icon-chip--copper {
  background: var(--copper-100);
  color: var(--copper-text);
}

/* Tags / status */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink-2);
  background: var(--surface);
}

.tag::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--line-strong);
}

.tag--teal { border-color: var(--teal-600); color: var(--teal-800); }
.tag--teal::before { background: var(--teal-600); }

.tag--copper { border-color: var(--copper); color: var(--copper-text); }
.tag--copper::before { background: var(--copper); }

/* Definition rows (spec-sheet style) */
.spec {
  border-top: 1px solid var(--line);
}

.spec__row {
  display: grid;
  gap: var(--s-2) var(--s-6);
  padding: var(--s-5) 0;
  border-bottom: 1px solid var(--line);
}

@media (min-width: 720px) {
  .spec__row {
    grid-template-columns: 220px 1fr;
  }
}

.spec__term {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--teal-700);
  padding-top: 3px;
}

.spec__def {
  color: var(--ink-2);
  max-width: 62ch;
}

.spec__def strong { color: var(--ink); }

/* Numbered step list */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
  display: grid;
}

.steps > li {
  counter-increment: step;
  position: relative;
  padding: var(--s-5) 0 var(--s-5) 68px;
  border-bottom: 1px solid var(--line);
}

.steps > li:first-child { border-top: 1px solid var(--line); }

.steps > li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: var(--s-5);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--copper-text);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  padding: 7px 9px;
  line-height: 1;
  background: var(--surface);
}

.steps h3 {
  font-size: var(--text-md);
  margin-bottom: var(--s-2);
}

.steps p {
  color: var(--muted);
  font-size: var(--text-sm);
  max-width: 62ch;
}

.on-dark .steps > li { border-color: var(--dark-line); }
.on-dark .steps > li::before {
  background: var(--dark-panel);
  border-color: var(--dark-line);
  color: var(--copper);
}
.on-dark .steps p { color: var(--dark-muted); }

/* Boundary list (do / don't) */
.boundary-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--s-3);
}

.boundary-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: var(--ink-2);
  font-size: var(--text-sm);
  line-height: 1.55;
}

.boundary-list svg {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 3px;
}

.boundary-list--yes svg { color: var(--teal-700); }
.boundary-list--no svg { color: var(--error); }

.on-dark .boundary-list li { color: var(--dark-muted); }
.on-dark .boundary-list--yes svg { color: #7fb8a8; }

/* Callout */
.callout {
  border: 1px solid var(--line);
  border-left: 3px solid var(--copper);
  background: var(--surface);
  border-radius: var(--r-sm);
  padding: var(--s-5);
  color: var(--ink-2);
  font-size: var(--text-sm);
  line-height: 1.6;
  max-width: 68ch;
}

.callout strong { color: var(--ink); }

.callout__link {
  display: inline-block;
  margin-top: var(--s-3);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* 9. Diagrams ------------------------------------------------------------------ */

/* Operating-model schematic (hero) */
.schematic {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  font-size: var(--text-sm);
}

.schematic__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding: 13px 20px;
  background: var(--dark-bg);
  color: var(--dark-muted);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.schematic__head span:last-child { color: #7fb8a8; }

.schematic__body {
  padding: var(--s-5);
  display: grid;
  gap: var(--s-3);
}

.schematic__lane {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px 16px;
  display: grid;
  gap: 6px;
}

.schematic__label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.schematic__lane--boundary {
  border-color: var(--teal-600);
  background: linear-gradient(0deg, var(--teal-100), var(--teal-100)) padding-box;
  background-color: color-mix(in srgb, var(--teal-100) 55%, #fff);
  background-image: none;
}

.schematic__lane--boundary .schematic__label { color: var(--teal-800); }

.schematic__items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 7px;
}

.schematic__items li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-2);
  font-size: 0.88rem;
  line-height: 1.4;
}

.schematic__items li::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal-600);
}

.schematic__connector {
  display: flex;
  justify-content: center;
  color: var(--line-strong);
  line-height: 0;
  margin-block: -3px;
}

/* Monitored-operation indicator in the head strip */
.schematic__status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.schematic__status-dot {
  position: relative;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #7fb8a8;
  flex: none;
}

.schematic__status-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid rgba(127, 184, 168, 0.75);
  opacity: 0;
  transform: scale(0.45);
}

@media (prefers-reduced-motion: no-preference) {
  .schematic__status-dot::after {
    animation: schematic-ping 4.5s cubic-bezier(0.25, 0, 0.35, 1) infinite;
  }

  @keyframes schematic-ping {
    0% { transform: scale(0.45); opacity: 0; }
    10% { opacity: 0.9; }
    40% { transform: scale(1.9); opacity: 0; }
    100% { transform: scale(1.9); opacity: 0; }
  }
}

.schematic__outcomes {
  display: grid;
  gap: var(--s-3);
}

@media (min-width: 480px) {
  .schematic__outcomes { grid-template-columns: 1fr 1fr; }
}

.schematic__outcome {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 12px 14px;
  display: grid;
  gap: 3px;
}

.schematic__outcome strong {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
}

.schematic__outcome span {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.45;
}

.schematic__outcome--copper {
  border-color: var(--copper);
  background: color-mix(in srgb, var(--copper-100) 55%, #fff);
}

.schematic__outcome--copper strong { color: var(--copper-text); }

/* Split authority diagram (dark governance section) */
.authority {
  display: grid;
  gap: var(--s-4);
}

@media (min-width: 860px) {
  .authority {
    grid-template-columns: 1fr auto 1fr;
    align-items: stretch;
  }
}

.authority__col {
  border: 1px solid var(--dark-line);
  border-radius: var(--r-md);
  background: var(--dark-panel);
  padding: var(--s-5);
}

.authority__col--copper {
  border-color: rgba(192, 118, 74, 0.55);
}

.authority__col h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--text-md);
  color: var(--dark-text);
  margin-bottom: var(--s-4);
}

.authority__col h3 .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: none;
}

.authority__col--teal h3 .dot { background: #66a99a; }
.authority__col--copper h3 .dot { background: var(--copper); }

.authority__col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--s-3);
  color: var(--dark-muted);
  font-size: var(--text-sm);
  line-height: 1.55;
}

.authority__col li {
  padding-left: 18px;
  position: relative;
}

.authority__col li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 7px;
  height: 2px;
}

.authority__col--teal li::before { background: #66a99a; }
.authority__col--copper li::before { background: var(--copper); }

.authority__bridge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--dark-muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: var(--s-2) var(--s-4);
}

.authority__bridge svg {
  width: 26px;
  height: 26px;
  color: var(--copper);
}

@media (max-width: 859.98px) {
  .authority__bridge svg { transform: rotate(90deg); }
}

/* 10. Forms ---------------------------------------------------------------------- */

.field {
  display: grid;
  gap: 7px;
  margin-bottom: var(--s-5);
}

.field > label,
.fieldset > legend {
  font-weight: 500;
  font-size: var(--text-sm);
  color: var(--ink);
}

.field__hint {
  font-size: var(--text-xs);
  color: var(--muted);
  line-height: 1.5;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field select,
.field textarea {
  appearance: none;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  font-size: var(--text-sm);
  color: var(--ink);
  transition: border-color var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease);
}

.field textarea {
  resize: vertical;
  min-height: 120px;
}

.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6l4 4 4-4' stroke='%233b4650' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 40px;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #9aa3ab;
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: none;
  border-color: var(--teal-700);
  box-shadow: 0 0 0 3px rgba(20, 98, 92, 0.18);
}

.field.has-error input,
.field.has-error select,
.field.has-error textarea {
  border-color: var(--error);
}

.field.has-error input:focus-visible,
.field.has-error textarea:focus-visible {
  box-shadow: 0 0 0 3px rgba(176, 54, 42, 0.15);
}

.fieldset.has-error .choice {
  border-color: color-mix(in srgb, var(--error) 45%, var(--line-strong));
}

.field__error {
  display: none;
  align-items: flex-start;
  gap: 7px;
  font-size: var(--text-xs);
  color: var(--error);
  font-weight: 500;
  line-height: 1.45;
}

.field.has-error .field__error,
.fieldset.has-error .field__error {
  display: flex;
}

.field__error svg {
  flex: none;
  width: 14px;
  height: 14px;
  margin-top: 2px;
}

.fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 var(--s-5);
}

.fieldset > legend {
  padding: 0;
  margin-bottom: var(--s-2);
}

.fieldset .field__hint { margin-bottom: var(--s-3); }

/* Choice chips (radio / checkbox cards) */
.choices {
  display: grid;
  gap: var(--s-3);
}

@media (min-width: 560px) {
  .choices--2 { grid-template-columns: 1fr 1fr; }
  .choices--3 { grid-template-columns: repeat(3, 1fr); }
}

.choice {
  position: relative;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color var(--dur-1) var(--ease), background-color var(--dur-1) var(--ease);
}

.choice:hover {
  border-color: var(--teal-600);
}

.choice input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.choice__box {
  flex: none;
  width: 19px;
  height: 19px;
  margin-top: 2px;
  border: 1.5px solid var(--line-strong);
  border-radius: 4px;
  display: grid;
  place-items: center;
  color: transparent;
  background: var(--surface);
  transition: background-color var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease);
}

.choice--radio .choice__box {
  border-radius: 50%;
}

.choice__box svg {
  width: 11px;
  height: 11px;
}

.choice--radio .choice__box::after {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: transparent;
  transition: background-color var(--dur-1) var(--ease);
}

.choice--radio .choice__box svg { display: none; }

.choice__text {
  display: grid;
  gap: 2px;
}

.choice__text strong {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--ink);
  line-height: 1.4;
}

.choice__text span {
  font-size: var(--text-xs);
  color: var(--muted);
  line-height: 1.45;
}

.choice:has(input:checked) {
  border-color: var(--teal-700);
  background: color-mix(in srgb, var(--teal-100) 45%, #fff);
}

.choice:has(input:checked) .choice__box {
  border-color: var(--teal-700);
}

.choice--check:has(input:checked) .choice__box {
  background: var(--teal-700);
  color: var(--paper);
}

.choice--radio:has(input:checked) .choice__box::after {
  background: var(--teal-700);
}

.choice:has(input:focus-visible) {
  outline: 2px solid var(--teal-700);
  outline-offset: 2px;
}

/* Contact page layout */
.contact-layout {
  display: grid;
  gap: var(--s-6);
  align-items: start;
}

@media (min-width: 900px) {
  .contact-layout { grid-template-columns: 1.5fr 1fr; gap: var(--s-8); }
}

/* Paired fields (side-by-side on wider screens) */
.field-pair {
  display: grid;
  gap: 0 var(--s-4);
}

@media (min-width: 620px) {
  .field-pair { grid-template-columns: 1fr 1fr; }
}

/* Consent checkbox row */
.consent {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: var(--text-xs);
  color: var(--ink-2);
  line-height: 1.55;
  cursor: pointer;
}

.consent input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.consent .choice__box { margin-top: 1px; }

.consent:has(input:checked) .choice__box {
  background: var(--teal-700);
  border-color: var(--teal-700);
  color: var(--paper);
}

.consent:has(input:focus-visible) .choice__box {
  outline: 2px solid var(--teal-700);
  outline-offset: 2px;
}

/* Form status banners */
.form-status {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border-radius: var(--r-md);
  padding: var(--s-4) var(--s-5);
  font-size: var(--text-sm);
  line-height: 1.55;
  margin-bottom: var(--s-5);
}

.form-status svg { flex: none; width: 19px; height: 19px; margin-top: 2px; }

.form-status--error {
  background: var(--error-100);
  border: 1px solid color-mix(in srgb, var(--error) 35%, transparent);
  color: #7c2a20;
}

.form-status--ok {
  background: var(--ok-100);
  border: 1px solid color-mix(in srgb, var(--ok) 35%, transparent);
  color: #14522f;
}

/* 11. Assessment wizard -------------------------------------------------------------- */

.wizard {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.wizard__progress {
  padding: var(--s-5) clamp(1.25rem, 3.5vw, 2.5rem) 0;
}

.wizard__progress-track {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}

.wizard__progress-seg {
  height: 4px;
  flex: 1;
  border-radius: 2px;
  background: var(--line);
  transition: background-color var(--dur-2) var(--ease);
}

.wizard__progress-seg.is-done { background: var(--teal-600); }
.wizard__progress-seg.is-current { background: var(--copper); }

.wizard__progress-text {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
}

.wizard__step {
  padding: var(--s-6) clamp(1.25rem, 3.5vw, 2.5rem) clamp(1.5rem, 3vw, 2.5rem);
}

.wizard__step[hidden] { display: none; }

.wizard__step h2 {
  font-size: var(--text-xl);
  margin-bottom: var(--s-2);
}

.wizard__step > .wizard__intro {
  color: var(--muted);
  font-size: var(--text-sm);
  max-width: 56ch;
  margin-bottom: var(--s-6);
}

.wizard__controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-4);
  padding: var(--s-4) clamp(1.25rem, 3.5vw, 2.5rem);
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.wizard__note {
  font-size: var(--text-xs);
  color: var(--muted);
  max-width: 38ch;
}

@media (max-width: 559.98px) {
  .wizard__note { display: none; }
}

.wizard__actions {
  display: flex;
  gap: var(--s-3);
  margin-left: auto;
}

/* Review list */
.review {
  border-top: 1px solid var(--line);
  margin-top: var(--s-2);
}

.review__row {
  display: grid;
  gap: 4px var(--s-5);
  padding: var(--s-4) 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--text-sm);
}

@media (min-width: 640px) {
  .review__row { grid-template-columns: 240px 1fr auto; align-items: baseline; }
}

.review__label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.review__value { color: var(--ink); overflow-wrap: anywhere; }

.review__edit {
  justify-self: start;
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--teal-700);
  background: none;
  border: none;
  padding: 5px 2px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Success state */
.wizard__success {
  padding: clamp(2.5rem, 6vw, 4rem) clamp(1.25rem, 3.5vw, 2.5rem);
  text-align: center;
}

.wizard__success .icon-chip {
  width: 52px;
  height: 52px;
  margin: 0 auto var(--s-5);
  background: var(--ok-100);
  color: var(--ok);
}

.wizard__success .icon-chip svg { width: 26px; height: 26px; }

.wizard__success h2 { font-size: var(--text-xl); margin-bottom: var(--s-3); }

.wizard__success .btn-row { justify-content: center; }

.wizard__success p {
  color: var(--muted);
  max-width: 52ch;
  margin: 0 auto var(--s-3);
  font-size: var(--text-sm);
  line-height: 1.6;
}

/* 12. Utilities / motion -------------------------------------------------------------- */

.center { text-align: center; }
.center .eyebrow { justify-content: center; }
.center .lead { margin-inline: auto; }
.center .btn-row { justify-content: center; }
.t-sm { font-size: var(--text-sm); }
.mt-2 { margin-top: var(--s-2); }
.mt-4 { margin-top: var(--s-4); }
.mt-5 { margin-top: var(--s-5); }
.mt-6 { margin-top: var(--s-6); }
.mt-7 { margin-top: var(--s-7); }
.mb-4 { margin-bottom: var(--s-4); }
.mb-5 { margin-bottom: var(--s-5); }
.mb-6 { margin-bottom: var(--s-6); }

.divider {
  border: 0;
  border-top: 1px solid var(--line);
  margin: var(--s-6) 0;
}

/* Hero composition */
.hero {
  padding-block: clamp(3.5rem, 9vw, 6.5rem) clamp(3.5rem, 8vw, 6rem);
  background:
    linear-gradient(var(--paper) 0 0) padding-box,
    var(--paper);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(19, 28, 36, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(19, 28, 36, 0.045) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 90% 80% at 70% 0%, black 0%, transparent 68%);
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 70% 0%, black 0%, transparent 68%);
  pointer-events: none;
}

.hero__grid {
  position: relative;
  display: grid;
  gap: clamp(2.5rem, 5vw, 4.5rem);
  align-items: center;
}

@media (min-width: 980px) {
  .hero__grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.9fr);
  }
}

.hero h1 {
  font-size: var(--text-display);
  letter-spacing: -0.022em;
  margin: var(--s-5) 0;
  max-width: 15em;
}

.hero .lead { margin-bottom: var(--s-6); }

.hero .facts { margin-top: var(--s-6); }

@media (max-width: 979.98px) {
  .hero .schematic { max-width: 620px; }
}

/* Scroll reveal — activated by JS only when IntersectionObserver exists and
   the user has not requested reduced motion. Without JS, content is fully
   visible by default. */
html.reveal-on .reveal,
html.reveal-on .reveal-group > * {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}

html.reveal-on .reveal.is-visible,
html.reveal-on .reveal-group.is-visible > * {
  opacity: 1;
  transform: translateY(0);
}

html.reveal-on .reveal-group.is-visible > :nth-child(2) { transition-delay: 70ms; }
html.reveal-on .reveal-group.is-visible > :nth-child(3) { transition-delay: 140ms; }
html.reveal-on .reveal-group.is-visible > :nth-child(4) { transition-delay: 210ms; }
html.reveal-on .reveal-group.is-visible > :nth-child(n+5) { transition-delay: 260ms; }

/* Motion preferences */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
