/* ==========================================================================
   Promatics Technologies: design system
   Tokens first, then base, layout, components. No framework, no build step.
   Contrast notes: --ink on --paper 16.9:1, --muted on --paper 5.9:1,
   --lake on --paper 8.6:1, --paper on --lake 8.6:1, --paper on --ink 16.9:1.
   ========================================================================== */

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

:root {
  /* Colour: monochrome brand (from the logo) + one working accent. */
  --ink: #14181F;
  --ink-2: #2A303B;
  --paper: #FAF8F4;
  --surface: #FFFFFF;
  --sand: #F1EDE5;
  --line: #DDD7CC;
  --line-strong: #B9B1A3;   /* decorative dividers only */
  --control-border: #857E70; /* form controls: 4.0:1 on white, meets WCAG 1.4.11 non-text contrast */
  --muted: #545B66;
  --lake: #1D4E6E;          /* primary accent: links, actions */
  --lake-700: #153A53;
  --lake-050: #E8F0F5;
  --birch: #B5651D;         /* decorative only (never body text on light) */
  --ok: #1E6B45;  --ok-bg: #E7F3EC;
  --err: #A4262C; --err-bg: #FBEAEA;
  --warn-bg: #FFF4DA;
  --focus: #1D4E6E;

  /* Type */
  --font: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --step--1: clamp(0.84rem, 0.82rem + 0.1vw, 0.9rem);
  --step-0: clamp(1.0625rem, 1.03rem + 0.15vw, 1.125rem);
  --step-1: clamp(1.2rem, 1.13rem + 0.35vw, 1.4rem);
  --step-2: clamp(1.45rem, 1.3rem + 0.7vw, 1.85rem);
  --step-3: clamp(1.8rem, 1.5rem + 1.4vw, 2.6rem);
  --step-4: clamp(2.15rem, 1.7rem + 2.2vw, 3.4rem);

  /* 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;
  --gutter: clamp(1rem, 0.6rem + 2vw, 2rem);
  --maxw: 1240px;
  --measure: 68ch;
  --radius: 10px; --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(20,24,31,.06), 0 6px 20px rgba(20,24,31,.06);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 5.5rem; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font); font-size: var(--step-0); line-height: 1.6; font-feature-settings: "kern", "liga"; text-rendering: optimizeLegibility; }
img, svg { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.015em; margin: 0 0 var(--s-4); font-weight: 700; text-wrap: balance; }
h1 { font-size: var(--step-4); letter-spacing: -0.025em; font-weight: 750; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); letter-spacing: -0.01em; }
h4 { font-size: var(--step-0); }
p, ul, ol, dl, table, figure, blockquote { margin: 0 0 var(--s-4); }
p { text-wrap: pretty; }
a { color: var(--lake); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--lake-700); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 3px; }
.on-dark :focus-visible, .site-footer :focus-visible { outline-color: #F2C14E; }
strong { font-weight: 650; }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--s-7) 0; }
code { font-family: var(--mono); font-size: 0.9em; background: var(--sand); padding: 0.1em 0.35em; border-radius: 4px; overflow-wrap: anywhere; }
.prose, .demo, .worksheet, .card, .panel { overflow-wrap: break-word; }
abbr[title] { text-decoration: underline dotted; }
.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; }
.skip-link { position: absolute; left: var(--s-4); top: -100px; z-index: 100; background: var(--ink); color: var(--paper); padding: var(--s-3) var(--s-4); border-radius: var(--radius-sm); font-weight: 600; }
.skip-link:focus { top: var(--s-4); color: var(--paper); }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(3rem, 2rem + 4vw, 5.5rem); }
.section--tight { padding-block: clamp(2rem, 1.5rem + 2vw, 3.5rem); }
.section--sand { background: var(--sand); }
.section--ink { background: var(--ink); color: var(--paper); }
.section--ink a { color: #BFD8E8; }
.section-head { max-width: 60ch; margin-bottom: var(--s-6); }
.section-head p { color: var(--muted); font-size: var(--step-1); line-height: 1.5; }
.section--ink .section-head p { color: #C9CDD4; }
.eyebrow { font-family: var(--mono); font-size: var(--step--1); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: var(--s-3); display: block; }
.section--ink .eyebrow { color: #AEB4BE; }
.prose { max-width: var(--measure); }
.prose h2 { margin-top: var(--s-7); font-size: var(--step-2); }
.prose h3 { margin-top: var(--s-6); }
.prose li { margin-bottom: var(--s-2); }
.prose li > ul, .prose li > ol { margin-top: var(--s-2); }
.lede { font-size: var(--step-1); line-height: 1.5; color: var(--ink-2); max-width: 62ch; }
.grid { display: grid; gap: var(--s-5); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.split { display: grid; gap: var(--s-7); grid-template-columns: 1fr; }
@media (min-width: 60rem) { .split { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: start; } }
.stack > * + * { margin-top: var(--s-4); }
/* Grid children may not grow past their track (tables scroll inside .table-wrap instead). */
.grid > *, .split > *, .article-layout > *, .hero-home > * { min-width: 0; }

/* ---------- Staging banner ---------- */
.staging-bar { background: var(--warn-bg); color: var(--ink); border-bottom: 1px solid #E8D29A; font-size: var(--step--1); text-align: center; padding: var(--s-2) var(--gutter); }

/* ---------- Header / navigation ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(250, 248, 244, 0.96); border-bottom: 1px solid var(--line); backdrop-filter: saturate(1.4) blur(6px); }
.header-inner { display: flex; align-items: center; gap: var(--s-5); min-height: 4.5rem; }
.brand { display: inline-flex; align-items: center; flex-shrink: 0; padding-block: var(--s-2); }
.brand img { width: 176px; height: auto; }
.nav-toggle { margin-left: auto; display: inline-flex; align-items: center; gap: var(--s-2); font: inherit; font-weight: 600; font-size: var(--step--1); background: none; border: 1px solid var(--control-border); border-radius: var(--radius-sm); padding: var(--s-2) var(--s-3); color: var(--ink); cursor: pointer; min-height: 44px; white-space: nowrap; }
.nav-toggle-bars { width: 18px; height: 12px; position: relative; border-block: 2px solid currentColor; }
.nav-toggle-bars::after { content: ""; position: absolute; left: 0; right: 0; top: 3px; border-top: 2px solid currentColor; }
html:not(.js) .nav-toggle { display: none; }
.js .site-nav { display: none; }
.js .site-nav.is-open { display: block; position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); max-height: calc(100dvh - 4.5rem); overflow-y: auto; padding: var(--s-4) var(--gutter) var(--s-6); }
.nav-list { list-style: none; margin: 0; padding: 0; }
.nav-list > li > a, .nav-list > li > .menu-toggle { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: var(--s-3) 0; font: inherit; font-weight: 600; color: var(--ink); text-decoration: none; background: none; border: 0; border-bottom: 1px solid var(--line); cursor: pointer; min-height: 44px; text-align: left; }
.nav-list a[aria-current="page"], .nav-list a[aria-current="true"] { color: var(--lake); }
.nav-list .menu-toggle[data-current] { color: var(--lake); }
.menu-toggle .chev { width: 0.55em; height: 0.55em; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .15s ease; margin-left: var(--s-2); margin-right: 4px; flex-shrink: 0; }
.menu-toggle[aria-expanded="true"] .chev { transform: rotate(-135deg) translateY(-2px); }
.mega { display: none; padding: var(--s-3) 0 var(--s-4); }
.mega.is-open { display: block; }
.mega-group + .mega-group { margin-top: var(--s-4); }
.mega-title { font-family: var(--mono); font-size: var(--step--1); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin: 0 0 var(--s-2); }
.mega ul { list-style: none; margin: 0; padding: 0; }
.mega li a { display: block; padding: var(--s-2) 0; color: var(--ink); text-decoration: none; min-height: 44px; }
.mega li a:hover, .mega li a:focus-visible { color: var(--lake); text-decoration: underline; }
.mega-all { display: inline-block; margin-top: var(--s-4); font-weight: 600; }
.site-header .header-cta { display: none; }
.nav-cta-mobile { margin-top: var(--s-5); }
/* Desktop nav from 70rem (1120px): below that the full row (brand + 7 labels + CTA) cannot fit
   without labels wrapping, so the Menu button is used. The header CTA duplicates the Contact link,
   so it only appears once there is room for it (80rem). tools/qa-nav.cjs sweeps 320-1920px. */
@media (min-width: 70rem) {
  .nav-toggle, .nav-cta-mobile { display: none; }
  .header-inner { position: relative; gap: var(--s-4); }
  .site-nav, .js .site-nav, .js .site-nav.is-open { display: block; position: static; background: none; border: 0; box-shadow: none; padding: 0; overflow: visible; max-height: none; margin-left: auto; }
  .nav-list { display: flex; align-items: center; gap: 2px; }
  /* Labels stay on one line at normal spacing (tools/qa-nav.cjs checks every width); with larger user text spacing
     (WCAG 1.4.12) a long label may wrap rather than push the header off the page. */
  .nav-list > li > a, .nav-list > li > .menu-toggle { border: 0; padding: var(--s-2) 0.7rem; border-radius: var(--radius-sm); width: auto; font-size: 0.98rem; white-space: normal; text-align: center; line-height: 1.25; }
  .nav-list > li > a:hover, .nav-list > li > .menu-toggle:hover { background: var(--sand); }
  /* The mega menu is anchored to the header container (not its <li>) so it always fits the page. */
  .mega { position: absolute; top: 100%; left: var(--gutter); right: var(--gutter); max-width: 68rem; margin-inline: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: var(--s-5) var(--s-6); max-height: calc(100dvh - 6rem); overflow-y: auto; }
  .mega.is-open { display: grid; grid-template-columns: repeat(auto-fit, minmax(12.5rem, 1fr)); gap: var(--s-5); }
  .mega-group + .mega-group { margin-top: 0; }
  .mega-foot { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: var(--s-3); }
  .mega-all { margin-top: 0; }
}
@media (min-width: 80rem) {
  .site-header .header-cta { display: inline-flex; margin-left: var(--s-2); white-space: nowrap; }
  /* The CTA links to the same page as the Contact item, so it takes that item's place. */
  .nav-li--cta-dup { display: none; }
  .nav-list > li > a, .nav-list > li > .menu-toggle { padding-inline: var(--s-3); }
}

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); min-height: 48px; padding: 0.7rem 1.3rem; border-radius: var(--radius-sm); font: inherit; font-weight: 650; font-size: 1rem; line-height: 1.2; text-decoration: none; cursor: pointer; border: 2px solid transparent; transition: background-color .15s ease, color .15s ease, border-color .15s ease; }
.btn--primary { background: var(--lake); color: #fff; }
.btn--primary:hover { background: var(--lake-700); color: #fff; text-decoration: none; }
.btn--secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--secondary:hover { background: var(--ink); color: var(--paper); text-decoration: none; }
.btn--light { background: var(--paper); color: var(--ink); }
.btn--light:hover { background: #fff; color: var(--ink); text-decoration: none; }
.btn--ghost-light { color: var(--paper); border-color: rgba(250,248,244,.6); background: transparent; }
.btn--ghost-light:hover { background: rgba(250,248,244,.1); color: var(--paper); text-decoration: none; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .6; cursor: progress; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }
.text-link { font-weight: 650; text-decoration: none; }
.text-link::after { content: " →"; }
.text-link:hover { text-decoration: underline; }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { font-size: var(--step--1); color: var(--muted); padding-top: var(--s-5); }
.breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-2); }
.breadcrumbs li + li::before { content: "/"; margin-right: var(--s-2); color: var(--line-strong); }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs [aria-current] { color: var(--ink); }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(2.5rem, 1.5rem + 4vw, 5rem) clamp(2.5rem, 2rem + 3vw, 4.5rem); }
.hero h1 { max-width: 20ch; }
.hero .lede { margin-bottom: var(--s-5); }
.hero-meta { font-size: var(--step--1); color: var(--muted); margin-top: var(--s-5); display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); }
.hero-meta span { display: inline-flex; align-items: center; gap: var(--s-2); }
.hero-home { display: grid; gap: var(--s-7); align-items: center; }
@media (min-width: 62rem) { .hero-home { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); } }
.page-hero { padding-block: var(--s-6) var(--s-7); border-bottom: 1px solid var(--line); }
.page-hero h1 { max-width: 24ch; font-size: var(--step-4); }

/* ---------- Diagram (inline SVG workflow illustrations) ---------- */
.diagram { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s-5); }
.diagram figcaption { font-size: var(--step--1); color: var(--muted); margin-top: var(--s-3); }
.diagram svg text { font-family: var(--font); }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s-5); display: flex; flex-direction: column; gap: var(--s-3); position: relative; }
.card h3 { margin: 0; }
.card p { margin: 0; color: var(--ink-2); }
.card .card-foot { margin-top: auto; padding-top: var(--s-2); }
.card--link:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.card--link h3 a { color: var(--ink); text-decoration: none; }
.card--link h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.card--link h3 a:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.card--link:has(a:focus-visible) { box-shadow: 0 0 0 3px var(--focus); }
.card-kicker { font-family: var(--mono); font-size: var(--step--1); color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.path-card { border-top: 4px solid var(--ink); }
.path-card ul { margin: 0; padding-left: 1.1rem; }
.path-card li { margin-bottom: var(--s-1); }
.path-card li a { font-weight: 600; }

/* ---------- Lists with markers ---------- */
.check-list, .x-list, .dot-list { list-style: none; padding: 0; margin: 0 0 var(--s-4); }
.check-list li, .x-list li, .dot-list li { position: relative; padding-left: 1.75rem; margin-bottom: var(--s-3); }
.check-list li::before { content: ""; position: absolute; left: 0.1rem; top: 0.45em; width: 0.9rem; height: 0.5rem; border-left: 2.5px solid var(--ok); border-bottom: 2.5px solid var(--ok); transform: rotate(-45deg); }
.x-list li::before, .x-list li::after { content: ""; position: absolute; left: 0.1rem; top: 0.72em; width: 0.95rem; height: 2.5px; background: var(--err); transform: rotate(45deg); }
.x-list li::after { transform: rotate(-45deg); }
.dot-list li::before { content: ""; position: absolute; left: 0.3rem; top: 0.62em; width: 0.45rem; height: 0.45rem; border-radius: 50%; background: var(--lake); }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s-5) var(--s-5) var(--s-3); }
.panel h2, .panel h3 { font-size: var(--step-1); }
.panel--fit { border-top: 4px solid var(--ok); }
.panel--notfit { border-top: 4px solid var(--err); }
.panel--muted { background: var(--sand); border-color: transparent; }

/* ---------- At-a-glance facts ---------- */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin: 0; }
.facts > div { padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--line); }
.facts dt { font-family: var(--mono); font-size: var(--step--1); color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: var(--s-1); }
.facts dd { margin: 0; font-weight: 600; }

/* ---------- Process steps ---------- */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; gap: var(--s-4); }
.steps > li { counter-increment: step; position: relative; padding: var(--s-5) var(--s-5) var(--s-4) calc(var(--s-5) + 3rem); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.steps > li::before { content: counter(step, decimal-leading-zero); position: absolute; left: var(--s-5); top: var(--s-5); font-family: var(--mono); font-size: 1rem; color: var(--lake); font-weight: 500; }
.steps h3 { font-size: var(--step-1); margin-bottom: var(--s-2); }
.steps p { margin-bottom: var(--s-2); color: var(--ink-2); }
.steps .step-out { font-size: var(--step--1); color: var(--muted); }
.steps--row { grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }
.section--ink .steps > li { background: var(--ink-2); border-color: #3A414D; }
.section--ink .steps > li::before { color: #9FC3DA; }
.section--ink .steps p { color: #D5D9DF; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; margin: 0 0 var(--s-5); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.table-wrap:focus-visible { outline-offset: 2px; }
table { width: 100%; border-collapse: collapse; font-size: 0.97rem; margin: 0; min-width: 34rem; }
th, td { text-align: left; vertical-align: top; padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--line); }
thead th { background: var(--sand); font-weight: 650; font-size: var(--step--1); }
tbody th { font-weight: 650; }
tbody tr:last-child > * { border-bottom: 0; }

/* ---------- Accordion (native details) ---------- */
.faq { border-top: 1px solid var(--line); max-width: var(--measure); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: var(--s-4) 2.5rem var(--s-4) 0; font-weight: 650; position: relative; min-height: 44px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 0.6rem; top: 1.35rem; width: 0.6rem; height: 0.6rem; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg); transition: transform .15s ease; }
.faq details[open] summary::after { transform: rotate(-135deg); top: 1.6rem; }
.faq .faq-body { padding: 0 0 var(--s-4); color: var(--ink-2); }
.faq .faq-body > :last-child { margin-bottom: 0; }

/* ---------- Callouts & demonstration label ---------- */
.callout { border-left: 4px solid var(--lake); background: var(--lake-050); padding: var(--s-4) var(--s-5); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: var(--s-5) 0; }
.callout > :last-child { margin-bottom: 0; }
.callout--note { border-color: var(--birch); background: var(--warn-bg); }
.demo { border: 2px dashed var(--line-strong); border-radius: var(--radius); padding: var(--s-5); background: var(--surface); margin: var(--s-6) 0; }
.demo-label { display: inline-block; font-family: var(--mono); font-size: var(--step--1); font-weight: 500; letter-spacing: .03em; background: var(--ink); color: var(--paper); padding: var(--s-1) var(--s-3); border-radius: 999px; margin-bottom: var(--s-3); }
.demo > :last-child { margin-bottom: 0; }
.worksheet { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s-5); margin: var(--s-5) 0; }
.worksheet > :last-child { margin-bottom: 0; }

/* ---------- Article layout ---------- */
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-7); padding-block: var(--s-7); }
@media (min-width: 70rem) { .article-layout { grid-template-columns: minmax(0, 1fr) 17rem; } .article-aside { order: 2; } }
.article-aside { font-size: var(--step--1); }
@media (min-width: 70rem) { .article-aside .sticky { position: sticky; top: 6rem; } }
.toc { border-left: 2px solid var(--line); padding-left: var(--s-4); margin-bottom: var(--s-6); }
.toc h2 { font-size: var(--step--1); font-family: var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: var(--s-3); }
.toc ol { list-style: none; padding: 0; margin: 0; }
.toc li { margin-bottom: var(--s-2); }
.toc a { color: var(--ink-2); text-decoration: none; }
.toc a:hover { color: var(--lake); text-decoration: underline; }
.byline { font-size: var(--step--1); color: var(--muted); display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-4); margin-top: var(--s-4); }
.byline strong { color: var(--ink); font-weight: 600; }
.refs { font-size: var(--step--1); color: var(--ink-2); }
.refs li { margin-bottom: var(--s-2); overflow-wrap: anywhere; }
.aside-cta { background: var(--sand); border-radius: var(--radius); padding: var(--s-5); }
.aside-cta h2 { font-size: var(--step-0); margin-bottom: var(--s-2); }
.aside-cta p { margin-bottom: var(--s-3); }

/* ---------- CTA band ---------- */
.cta-band { background: var(--ink); color: var(--paper); border-radius: var(--radius); padding: clamp(2rem, 1.5rem + 2.5vw, 3.5rem); display: grid; gap: var(--s-5); align-items: center; }
@media (min-width: 56rem) { .cta-band { grid-template-columns: minmax(0, 1.6fr) auto; } }
.cta-band h2 { font-size: var(--step-2); margin-bottom: var(--s-2); }
.cta-band p { color: #C9CDD4; margin: 0; max-width: 56ch; }

/* ---------- Forms ---------- */
.form { display: grid; gap: var(--s-5); }
.form-row { display: grid; gap: var(--s-5); }
@media (min-width: 44rem) { .form-row--2 { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: var(--s-2); }
.field label, .field legend { font-weight: 650; }
.field .req { color: var(--err); font-weight: 700; }
.field .opt { color: var(--muted); font-weight: 400; font-size: var(--step--1); }
.hint { font-size: var(--step--1); color: var(--muted); margin: 0; }
input[type="text"], input[type="email"], input[type="tel"], input[type="url"], input[type="number"], input[type="date"], input[type="file"], select, textarea {
  font: inherit; font-size: 1rem; color: var(--ink); background: var(--surface); width: 100%;
  border: 1.5px solid var(--control-border); border-radius: var(--radius-sm); padding: 0.7rem 0.8rem; min-height: 48px; }
textarea { min-height: 9rem; resize: vertical; line-height: 1.5; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--lake); }
[aria-invalid="true"] { border-color: var(--err) !important; background: #FFFBFB; }
.field-error { color: var(--err); font-size: var(--step--1); font-weight: 600; margin: 0; }
.field-error:empty { display: none; }
.hp-field { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { border-radius: var(--radius-sm); padding: var(--s-4) var(--s-5); font-weight: 500; }
.form-status:empty { display: none; }
.form-status--ok { background: var(--ok-bg); border: 1px solid #A6D2B7; color: #0F3F28; }
.form-status--err { background: var(--err-bg); border: 1px solid #E7B1B4; color: #6B1519; }
.form-status--info { background: var(--lake-050); border: 1px solid #B8CFDE; }
.form-status h2 { font-size: var(--step-1); margin-bottom: var(--s-2); }
.form-status p:last-child { margin-bottom: 0; }
.ref-id { font-family: var(--mono); font-weight: 500; background: rgba(255,255,255,.7); padding: 0.05em 0.35em; border-radius: 4px; }
.privacy-note { font-size: var(--step--1); color: var(--muted); border-top: 1px solid var(--line); padding-top: var(--s-4); }
.error-summary { border: 2px solid var(--err); background: var(--err-bg); border-radius: var(--radius-sm); padding: var(--s-4) var(--s-5); }
.error-summary h2 { font-size: var(--step-1); color: var(--err); }
.error-summary ul { margin: 0; }
.flash { display: none; }
.flash:target { display: block; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #C9CDD4; padding-block: var(--s-8) var(--s-6); margin-top: var(--s-8); font-size: 0.97rem; }
.site-footer a { color: var(--paper); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-grid { display: grid; gap: var(--s-6) var(--s-5); grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); } /* 6 columns fit a 1240px row */
.footer-grid:has(> :nth-child(7)) { gap: var(--s-6) var(--s-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5rem), 1fr)); } /* a fifth practice (US): 7 columns still fit one row */
.footer-brand img { width: 170px; margin-bottom: var(--s-4); }
.footer-grid h2 { font-family: var(--mono); font-size: var(--step--1); letter-spacing: .06em; text-transform: uppercase; color: #9AA1AC; font-weight: 500; margin-bottom: var(--s-3); }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: var(--s-2); }
.footer-base { border-top: 1px solid #333A46; margin-top: var(--s-7); padding-top: var(--s-5); display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-6); justify-content: space-between; font-size: var(--step--1); color: #9AA1AC; }
.footer-base ul { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); margin: 0; padding: 0; }
.site-footer address { font-style: normal; }

/* ---------- Utilities ---------- */
.muted { color: var(--muted); }
.small { font-size: var(--step--1); }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; } .mt-6 { margin-top: var(--s-6); } .mt-7 { margin-top: var(--s-7); }
.center { text-align: center; }
.badge { display: inline-block; font-family: var(--mono); font-size: 0.78rem; padding: 0.15rem 0.55rem; border-radius: 999px; background: var(--sand); color: var(--ink-2); border: 1px solid var(--line); }

/* ---------- Motion & print ---------- */
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
@media print { .site-header, .site-footer, .cta-band, .article-aside, .staging-bar, .btn { display: none !important; } body { background: #fff; } a::after { content: " (" attr(href) ")"; font-size: .8em; } }

/* ---------- Printable checklists (task-list items) ---------- */
.box { display: inline-block; width: 1rem; height: 1rem; border: 2px solid var(--ink-2); border-radius: 3px; vertical-align: -0.15em; margin-right: 0.55rem; flex-shrink: 0; }
.worksheet ul:has(.box), .prose ul:has(> li > .box) { list-style: none; padding-left: 0; }
.worksheet li:has(> .box), .prose li:has(> .box) { padding-left: 1.6rem; text-indent: -1.6rem; }

/* Scroll cue: a shadow appears on the edge that has more table to scroll to (pure CSS). */
.table-wrap {
  background:
    linear-gradient(to right, var(--surface) 30%, rgba(255,255,255,0)) left center / 40px 100% no-repeat local,
    linear-gradient(to left, var(--surface) 30%, rgba(255,255,255,0)) right center / 40px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgba(20,24,31,.16), rgba(20,24,31,0)) left center / 14px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgba(20,24,31,.16), rgba(20,24,31,0)) right center / 14px 100% no-repeat scroll,
    var(--surface);
}
.table-wrap thead th { background-color: var(--sand); }
.hero-meta span + span::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--line-strong); margin-right: var(--s-2); }

/* ---------- Stats band ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: var(--s-5); margin: 0; }
.stats > div { display: flex; flex-direction: column-reverse; gap: var(--s-1); border-left: 3px solid #9FC3DA; padding-left: var(--s-4); }
.stats dd { margin: 0; font-size: var(--step-4); font-weight: 750; letter-spacing: -0.02em; line-height: 1; color: var(--paper); }
.stats dt { color: #C9CDD4; font-size: var(--step--1); }

/* ---------- Chips (industries) ---------- */
.chip-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-3); }
.chip-list a { display: inline-flex; align-items: center; min-height: 44px; padding: var(--s-2) var(--s-4); border: 1px solid var(--control-border); border-radius: 999px; background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 600; }
.chip-list a:hover { border-color: var(--lake); color: var(--lake); }

/* ---------- Testimonials ---------- */
.quote { margin: 0; }
.quote blockquote { margin: 0; }
.quote blockquote p { font-size: 1.02rem; color: var(--ink-2); }
.quote blockquote p::before { content: "“"; font-size: 2.2rem; line-height: 0; vertical-align: -0.45em; margin-right: 0.1em; color: var(--lake); }
.quote figcaption { margin-top: auto; padding-top: var(--s-3); border-top: 1px solid var(--line); font-size: var(--step--1); }
.mega-more { font-weight: 650; }

.facts--stack { grid-template-columns: 1fr; }

/* ---------- Form layout (data-driven forms) ---------- */
.form-grid { display: grid; gap: var(--s-5); grid-template-columns: 1fr; }
@media (min-width: 44rem) { .form-grid { grid-template-columns: 1fr 1fr; } .field--full { grid-column: 1 / -1; } }
fieldset.field { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.field legend { padding: 0; margin-bottom: var(--s-2); }
.check-grid { display: grid; gap: var(--s-2) var(--s-5); grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }
.check { display: flex; gap: var(--s-2); align-items: flex-start; min-height: 44px; padding: var(--s-2) 0; cursor: pointer; font-weight: 500; }
.check input { width: 1.25rem; height: 1.25rem; margin-top: 0.15rem; accent-color: var(--lake); flex-shrink: 0; }
.form-links { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s-2); }
.form-links a { font-weight: 600; }

/* ---------- Article conversion block & inline CTA ---------- */
.convert { display: grid; gap: var(--s-6); align-items: center; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--lake); border-radius: var(--radius); padding: clamp(1.5rem, 1rem + 2vw, 2.5rem); }
@media (min-width: 56rem) { .convert { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); } }
.convert h2 { font-size: var(--step-2); }
.convert .check-list { margin-bottom: 0; }
.convert-action { text-align: center; }
.convert-action .btn { width: 100%; }
.convert-action p { margin: var(--s-3) 0 0; }
.cta-inline { margin: var(--s-6) 0; padding: var(--s-5); border-radius: var(--radius); background: var(--ink); color: var(--paper); }
.cta-inline p { margin: 0 0 var(--s-3); color: #D5D9DF; }
.cta-inline strong { color: var(--paper); }
.cta-inline a { color: #BFD8E8; font-weight: 700; }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
@media (min-width: 48rem) and (max-width: 74.99rem) { .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 75rem) { .grid--4 { grid-template-columns: repeat(4, 1fr); } }
/* A fifth practice (regional) spans the row: text on the left, its services on the right. */
.grid--4 > .path-card--wide { grid-column: 1 / -1; }
@media (min-width: 48rem) { .path-card--wide { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--s-2) var(--s-7); align-items: start; } .path-card--wide > ul { margin-top: 0; } }

/* ---------- Careers: application form (CKC pattern), job cards, conditional panels ---------- */
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s-5); box-shadow: var(--shadow); min-width: 0; }
@media (min-width: 44rem) { .form-card { padding: var(--s-6); } }
.form-card .form-status { margin-bottom: var(--s-4); }
.form-panel { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--paper); padding: var(--s-4); }
.form-panel-title { font-family: var(--mono); font-size: var(--step--1); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin: 0 0 var(--s-3); }
[data-show-if][hidden] { display: none !important; }
.checks--inline .check-grid { grid-template-columns: repeat(auto-fit, minmax(6rem, max-content)); }
input[type="file"] { padding: 0.55rem 0.6rem; cursor: pointer; }
input[type="file"]::file-selector-button { font: inherit; font-weight: 600; margin-right: var(--s-3); padding: 0.45rem 0.9rem; border: 1.5px solid var(--control-border); border-radius: var(--radius-sm); background: var(--sand); color: var(--ink); cursor: pointer; }
.btn--sm { min-height: 44px; padding: 0.5rem 1rem; font-size: var(--step--1); }
.card--job .card-foot { margin-top: auto; }
.job-facts { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); list-style: none; padding: 0; margin: var(--s-4) 0 0; font-size: var(--step--1); color: var(--muted); }
.job-facts strong { color: var(--ink); }
@media (min-width: 60rem) { .split--form { grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr); } }
