/* SDSManagementSoftware.com — "Hazard label" design system.
   Label stock white, graphite ink, GHS red diamonds, safety-yellow highlights, SDS-style numbered section bars.
   Headings: Schibsted Grotesk · Body: Libre Franklin · Mono: Red Hat Mono */

:root {
  --paper: #FFFFFF;
  --paper-2: #F3F4F1;
  --paper-3: #E8EAE5;
  --ink: #15171B;
  --ink-2: #22252B;
  --ink-3: #30343B;
  --text: #15171B;
  --text-2: #3D424A;
  --muted: #555C66;
  --rule: #D5D8DD;
  --rule-2: #B4BAC2;
  --red: #C8102E;
  --red-2: #A30C25;
  --red-soft: #FCEDEF;
  --yellow: #FFD100;
  --yellow-soft: #FFF7D1;
  --blue: #1747A6;
  --blue-2: #0F3480;
  --blue-soft: #EBF0FA;
  --green: #17784A;
  --f-head: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --f-body: "Libre Franklin", "Helvetica Neue", Arial, sans-serif;
  --f-mono: "Red Hat Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --gutter: clamp(16px, 4vw, 32px);
  --max: 1220px;
  --header-h: 68px;
  --r: 3px;
  --shadow: 0 1px 0 rgba(21, 23, 27, .06), 0 8px 24px -12px rgba(21, 23, 27, .18);
  --shadow-lg: 0 18px 48px -18px rgba(21, 23, 27, .35);
  --hazard: repeating-linear-gradient(-45deg, var(--ink) 0 10px, var(--yellow) 10px 20px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--paper); color: var(--text); font: 400 1.0625rem/1.65 var(--f-body); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; }
body::before { content: ""; display: block; height: 6px; background: var(--hazard); }
img, svg { max-width: 100%; height: auto; }
a { color: var(--blue); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--blue-2); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--f-head); color: var(--ink); line-height: 1.12; letter-spacing: -.018em; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 1.3rem + 3.2vw, 3.5rem); font-weight: 800; letter-spacing: -.03em; }
h2 { font-size: clamp(1.55rem, 1.2rem + 1.3vw, 2.15rem); font-weight: 750; }
h3 { font-size: 1.22rem; font-weight: 700; letter-spacing: -.01em; }
h4 { font-size: 1.02rem; font-weight: 700; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.25em; margin: 0 0 1.1em; }
li { margin: .25em 0; }
li::marker { color: var(--muted); }
strong, b { font-weight: 650; }
small, .small { font-size: .875rem; }
.muted { color: var(--muted); }
hr { border: 0; border-top: 2px solid var(--ink); margin: 2.4rem 0; }
code, kbd { font-family: var(--f-mono); font-size: .9em; background: var(--paper-2); padding: .08em .35em; border-radius: 2px; }
mark { background: var(--yellow); color: var(--ink); padding: 0 .15em; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 10px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; font-weight: 600; }
.skip:focus { left: 10px; color: #fff; }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.wrap.narrow { max-width: 820px; }
.wrap.mid { max-width: 1080px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 48px; padding: .7em 1.25em; border: 2px solid transparent; border-radius: var(--r); font: 650 1rem/1.15 var(--f-head); letter-spacing: -.005em; text-decoration: none; cursor: pointer; transition: background-color .15s, color .15s, border-color .15s, transform .15s; white-space: nowrap; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: none; }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-2); color: #fff; }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: var(--ink-3); color: #fff; }
.btn-line { background: var(--paper); color: var(--ink); border-color: var(--ink); }
.btn-line:hover { background: var(--yellow); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--rule-2); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-sm { min-height: 40px; padding: .5em 1em; font-size: .93rem; }
.btn[disabled] { opacity: .6; cursor: wait; transform: none; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .97); border-bottom: 2px solid var(--ink); backdrop-filter: saturate(1.4) blur(8px); }
.header-in { display: flex; align-items: center; gap: 22px; min-height: var(--header-h); }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--f-head); flex: none; }
.logo:hover { text-decoration: none; color: var(--ink); }
.logo-mark { width: 40px; height: 40px; flex: none; }
.wordmark { font-size: 1.06rem; font-weight: 600; letter-spacing: -.015em; line-height: 1.05; }
.wordmark b { font-weight: 900; letter-spacing: -.02em; background: var(--yellow); padding: 0 .18em; margin-right: .08em; }
.main-nav { margin-left: auto; }
.nav-list { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-list > li { position: relative; margin: 0; }
.nav-btn, .nav-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; background: none; border: 0; color: var(--ink); font: 600 .97rem/1 var(--f-head); text-decoration: none; cursor: pointer; border-radius: var(--r); }
.nav-btn svg { width: 12px; height: 12px; transition: transform .18s; }
.nav-btn:hover, .nav-link:hover, .nav-group.open .nav-btn, .nav-link[aria-current] { background: var(--paper-2); color: var(--ink); text-decoration: none; }
.nav-link[aria-current] { box-shadow: inset 0 -3px 0 var(--red); }
.nav-panel { position: absolute; right: -150px; top: calc(100% + 14px); width: 520px; background: var(--paper); border: 2px solid var(--ink); box-shadow: var(--shadow-lg); padding: 8px; opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .16s ease, transform .16s ease, visibility .16s; }
.nav-panel::before { content: ""; position: absolute; inset: -16px 0 auto; height: 16px; }
.nav-group:hover .nav-panel, .nav-group:focus-within .nav-panel, .nav-group.open .nav-panel { opacity: 1; visibility: visible; transform: none; }
.nav-group:hover .nav-btn svg, .nav-group.open .nav-btn svg { transform: rotate(180deg); }
.nav-panel ul { list-style: none; margin: 0; padding: 0; }
.nav-panel li { margin: 0; }
.nav-panel a { display: flex; gap: 14px; padding: 11px 12px; text-decoration: none; color: inherit; border-bottom: 1px solid var(--rule); }
.nav-panel li:last-child a { border-bottom: 0; }
.nav-panel a:hover, .nav-panel a[aria-current] { background: var(--paper-2); }
.nav-panel strong { display: block; font: 650 .98rem/1.25 var(--f-head); color: var(--ink); }
.nav-panel small { display: block; color: var(--muted); font-size: .85rem; line-height: 1.42; margin-top: 2px; }
.sec-no { flex: none; display: inline-flex; align-items: center; justify-content: center; min-width: 2.3em; height: 1.7em; padding: 0 .35em; font: 600 .74rem/1 var(--f-mono); letter-spacing: .04em; color: var(--yellow); background: var(--ink); }
.menu-btn { display: none; margin-left: auto; flex: none; width: 46px; height: 46px; border: 2px solid var(--ink); border-radius: var(--r); background: var(--paper); padding: 0 11px; cursor: pointer; }
.menu-btn i { display: block; height: 2px; background: var(--ink); margin: 5px 0; transition: transform .2s, opacity .2s; }
.menu-btn[aria-expanded="true"] i:nth-of-type(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn[aria-expanded="true"] i:nth-of-type(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] i:nth-of-type(3) { transform: translateY(-7px) rotate(-45deg); }
.mobile-nav { padding: 4px var(--gutter) 22px; background: var(--paper); border-top: 1px solid var(--rule); max-height: calc(100dvh - var(--header-h) - 6px); overflow: auto; overscroll-behavior: contain; }
.mobile-nav ul { list-style: none; margin: 0 0 6px; padding: 0; }
.mobile-nav li { margin: 0; }
.mobile-nav a:not(.btn) { display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 6px 0; color: var(--ink); font: 600 1rem/1.3 var(--f-head); text-decoration: none; border-bottom: 1px solid var(--rule); }
.m-head { margin: 16px 0 2px; font: 600 .74rem/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.mobile-nav .btn { width: 100%; margin-top: 16px; }
@media (max-width: 1000px) { .main-nav, .header-cta { display: none; } .menu-btn { display: block; } }
@media (min-width: 1001px) { .mobile-nav { display: none !important; } }
@media (max-width: 420px) { .wordmark { font-size: .95rem; } .logo-mark { width: 36px; height: 36px; } }

/* ---------- Breadcrumbs, kicker, meta ---------- */
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 0; list-style: none; margin: 0 0 18px; padding: 0; font: 500 .82rem/1.4 var(--f-mono); color: var(--muted); }
.crumbs li { margin: 0; }
.crumbs li + li::before { content: "/"; margin: 0 .55em; color: var(--rule-2); }
.crumbs a { color: var(--text-2); text-decoration: none; }
.crumbs a:hover { color: var(--blue); text-decoration: underline; }
.kicker { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; font: 600 .78rem/1 var(--f-mono); letter-spacing: .09em; text-transform: uppercase; color: var(--ink); }
.kicker::before { content: ""; width: 12px; height: 12px; border: 2.5px solid var(--red); transform: rotate(45deg); flex: none; }
.meta { margin: 18px 0 0; font: 500 .84rem/1.4 var(--f-mono); color: var(--muted); }
.meta a { color: var(--text-2); }

/* ---------- Heroes ---------- */
.page-hero, .home-hero { position: relative; background: var(--paper-2); border-bottom: 2px solid var(--ink); padding: clamp(28px, 4vw, 56px) 0 clamp(34px, 5vw, 64px); overflow: hidden; }
.page-hero::after, .home-hero::after { content: ""; position: absolute; right: -120px; top: -120px; width: 420px; height: 420px; border: 2px solid var(--rule); transform: rotate(45deg); pointer-events: none; }
.page-hero-plain { background: var(--paper); border-bottom: 1px solid var(--rule); }
.page-hero-plain::after { display: none; }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.hero-copy h1 { max-width: 17ch; }
.bluf { font-size: clamp(1.08rem, 1rem + .35vw, 1.22rem); line-height: 1.6; color: var(--text); max-width: 62ch; }
.bluf p:last-child { margin-bottom: 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } .page-hero::after, .home-hero::after { width: 260px; height: 260px; right: -150px; top: -90px; } }
@media (max-width: 480px) { .hero-actions .btn { width: 100%; } }

/* ---------- GHS label card ---------- */
.label { background: var(--paper); border: 2px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); font-size: .95rem; }
.label-top { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-bottom: 2px solid var(--ink); }
.label-signal { margin: 0 0 3px; font: 800 .78rem/1 var(--f-head); letter-spacing: .14em; text-transform: uppercase; color: var(--red); }
.label-title { margin: 0; font: 700 1.08rem/1.25 var(--f-head); color: var(--ink); }
.label dl { margin: 0; }
.label dl > div { display: grid; grid-template-columns: minmax(96px, 38%) 1fr; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--rule); }
.label dl > div:last-child { border-bottom: 0; }
.label dt { font: 600 .74rem/1.4 var(--f-mono); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding-top: .2em; }
.label dd { margin: 0; color: var(--text); line-height: 1.5; }
.diamond { position: relative; flex: none; width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; }
.diamond::before { content: ""; position: absolute; inset: 6px; border: 3px solid var(--red); background: #fff; transform: rotate(45deg); }
.diamond i { position: relative; font: 900 1.1rem/1 var(--f-head); font-style: normal; color: var(--ink); }
.diamond-sm { width: 30px; height: 30px; }
.diamond-sm::before { inset: 5px; border-width: 2.5px; }
.diamond-sm i { font-size: .9rem; }

/* ---------- Bands (home) ---------- */
.band { padding: clamp(44px, 6vw, 84px) 0; }
.band-alt { background: var(--paper-2); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.band-head { max-width: 760px; margin-bottom: 28px; }
.band-head p { color: var(--text-2); }
.sec-tag { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 10px; font: 600 .76rem/1 var(--f-mono); letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }

/* Need router tiles */
.router { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: 2px solid var(--ink); background: var(--paper); margin: 0 0 8px; }
.router-tile { display: flex; flex-direction: column; gap: 6px; padding: 20px 20px 22px; color: var(--ink); text-decoration: none; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); transition: background-color .15s; }
.router-tile:hover { background: var(--yellow-soft); color: var(--ink); text-decoration: none; }
.router-tile:nth-child(3n) { border-right: 0; }
.router-tile strong { font: 700 1.08rem/1.25 var(--f-head); }
.router-tile span:not(.sec-no) { color: var(--text-2); font-size: .94rem; line-height: 1.5; }
.router-tile .sec-no { align-self: flex-start; }
.router-tile::after { content: "→"; margin-top: auto; padding-top: 6px; font: 700 1.1rem/1 var(--f-head); color: var(--red); }
@media (max-width: 900px) { .router { grid-template-columns: repeat(2, minmax(0, 1fr)); } .router-tile:nth-child(3n) { border-right: 1px solid var(--rule); } .router-tile:nth-child(2n) { border-right: 0; } }
@media (max-width: 560px) { .router { grid-template-columns: 1fr; } .router-tile { border-right: 0 !important; } }

/* ---------- Body grid (money pages) ---------- */
.body-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: clamp(28px, 4vw, 64px); padding-top: clamp(30px, 4vw, 52px); padding-bottom: clamp(40px, 5vw, 72px); }
.rail { min-width: 0; }
.rail-sticky { position: sticky; top: calc(var(--header-h) + 20px); display: grid; gap: 18px; }
.rail-card { border: 2px solid var(--ink); padding: 16px; background: var(--yellow-soft); }
.rail-title { margin: 0 0 4px; font: 750 1.02rem/1.3 var(--f-head); }
.rail-card p { font-size: .92rem; color: var(--text-2); margin-bottom: 12px; }
.rail-card .btn { width: 100%; }
@media (max-width: 1000px) { .body-grid { grid-template-columns: 1fr; } .rail { display: none; } }

.toc { border: 1px solid var(--rule-2); padding: 14px 16px; background: var(--paper); font-size: .9rem; }
.toc > p { margin: 0 0 8px; font: 600 .74rem/1 var(--f-mono); letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc li { counter-increment: toc; margin: 0; display: flex; gap: 10px; padding: 5px 0; border-top: 1px solid var(--rule); line-height: 1.35; }
.toc li:first-child { border-top: 0; }
.toc li::before { content: counter(toc, decimal-leading-zero); font: 600 .74rem/1.6 var(--f-mono); color: var(--red); flex: none; }
.toc a { color: var(--ink); text-decoration: none; }
.toc a:hover { color: var(--blue); text-decoration: underline; }
.prose > .toc { margin-bottom: 28px; }

/* ---------- Prose ---------- */
.prose { min-width: 0; max-width: 760px; }
.prose-wide, .band .prose { max-width: none; }
.prose h2 { margin-top: 2.2em; }
.prose h2:first-child, .prose section:first-child > h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.7em; }
.prose > p, .prose section > p, .prose li { max-width: 72ch; }
.prose .lead { font-size: 1.15rem; color: var(--text); }
.sectioned { counter-reset: sec; }
.sectioned h2:not(.no-sec) { counter-increment: sec; position: relative; padding-top: 18px; border-top: 3px solid var(--ink); }
.sectioned h2:not(.no-sec)::before { content: "Section " counter(sec, decimal-leading-zero); display: table; margin-bottom: 12px; padding: 5px 8px 4px; font: 600 .72rem/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--yellow); background: var(--ink); }

/* ---------- Callouts, CTA strip ---------- */
.callout { display: flex; gap: 14px; align-items: flex-start; margin: 1.6em 0; padding: 16px 18px; border: 1px solid var(--rule-2); border-left-width: 5px; background: var(--paper); }
.callout > div { min-width: 0; }
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }
.callout-title { margin: 0 0 4px; font: 700 1rem/1.35 var(--f-head); color: var(--ink); }
.callout-note { border-color: var(--blue); background: var(--blue-soft); border-top-color: #CBD7F0; border-right-color: #CBD7F0; border-bottom-color: #CBD7F0; }
.callout-limit { border-color: var(--red); background: var(--red-soft); border-top-color: #F2C9D0; border-right-color: #F2C9D0; border-bottom-color: #F2C9D0; }
.callout-tip { border-color: var(--ink); background: var(--yellow-soft); border-top-color: #EBD98A; border-right-color: #EBD98A; border-bottom-color: #EBD98A; }
.note-mark { flex: none; width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--blue); color: #fff; font: 800 .9rem/1 var(--f-head); margin-top: 1px; }
.tip-mark { flex: none; width: 22px; height: 22px; margin-top: 2px; background: var(--hazard); border: 2px solid var(--ink); }
.cta-strip { display: flex; align-items: center; justify-content: space-between; gap: 18px 28px; margin: 2em 0; padding: 20px 22px; border: 2px solid var(--ink); background: var(--paper); box-shadow: 6px 6px 0 var(--yellow); }
.cta-title { margin: 0 0 4px; font: 750 1.12rem/1.3 var(--f-head); }
.cta-strip p:last-child { margin: 0; color: var(--text-2); font-size: .95rem; }
.cta-strip .btn { flex: none; }
@media (max-width: 640px) { .cta-strip { flex-direction: column; align-items: stretch; } }

/* ---------- Tables ---------- */
.table-wrap { width: 100%; overflow-x: auto; margin: 1.4em 0 1.8em; border: 2px solid var(--ink); background: var(--paper); -webkit-overflow-scrolling: touch; }
.table-wrap:focus-visible { outline-offset: 0; }
table { width: 100%; border-collapse: collapse; font-size: .93rem; line-height: 1.45; }
caption { caption-side: top; text-align: left; padding: 12px 14px; font: 600 .82rem/1.45 var(--f-mono); color: var(--text-2); background: var(--paper-2); border-bottom: 1px solid var(--rule); }
th, td { padding: 11px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule); }
thead th { position: sticky; top: 0; background: var(--ink); color: #fff; font: 600 .74rem/1.3 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; border-bottom: 0; }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
tbody th { font-weight: 650; color: var(--ink); }
table.register tbody tr:nth-child(even) { background: #FAFAF8; }
table.register tbody tr:hover { background: var(--yellow-soft); }
table.register td.no { font: 500 .78rem/1.6 var(--f-mono); color: var(--muted); width: 1%; white-space: nowrap; }
table.register td:first-child a, table.register th[scope=row] a { font-weight: 650; }
table.data th { background: var(--paper-2); color: var(--ink); }
tr[hidden] { display: none; }
tr.is-match { box-shadow: inset 4px 0 0 var(--red); background: var(--yellow-soft) !important; }
tr.is-dim { opacity: .45; }
.yes { display: inline-flex; align-items: center; gap: 4px; color: var(--green); font-weight: 600; white-space: nowrap; }
.yes svg { width: 13px; height: 13px; flex: none; }
.ns { color: var(--muted); font-size: .86em; white-space: nowrap; }
.chip { display: inline-block; margin: 1px 3px 2px 0; padding: 3px 7px 2px; border: 1px solid var(--rule-2); font: 600 .72rem/1.3 var(--f-mono); letter-spacing: .02em; color: var(--text-2); background: var(--paper); white-space: nowrap; }
.chip-red { border-color: var(--red); color: var(--red-2); background: var(--red-soft); }
.chip-yellow { border-color: #CCA700; color: var(--ink); background: var(--yellow); }
.chip-blue { border-color: var(--blue); color: var(--blue-2); background: var(--blue-soft); }
.chip-ink { border-color: var(--ink); color: #fff; background: var(--ink); }
.paid { display: inline-block; margin-left: 4px; padding: 1px 5px; font: 700 .66rem/1.4 var(--f-mono); letter-spacing: .05em; text-transform: uppercase; color: var(--ink); background: var(--yellow); border: 1px solid var(--ink); }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 1.2em 0 -.6em; }
.filters-label { font: 600 .74rem/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.filters button { min-height: 40px; padding: 0 14px; border: 2px solid var(--ink); background: var(--paper); color: var(--ink); font: 600 .88rem/1 var(--f-head); cursor: pointer; border-radius: var(--r); }
.filters button:hover { background: var(--paper-2); }
.filters button[aria-pressed="true"] { background: var(--ink); color: #fff; }

/* ---------- Cards, grids, lists ---------- */
.grid-2, .grid-3 { display: grid; gap: 16px; margin: 1.4em 0; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 820px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.card { border: 2px solid var(--ink); padding: 18px 18px 16px; background: var(--paper); min-width: 0; }
.card h3 { margin-top: 0; font-size: 1.1rem; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 1em 0; }
.kv dt { font: 600 .78rem/1.6 var(--f-mono); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.kv dd { margin: 0; }
@media (max-width: 520px) { .kv { grid-template-columns: 1fr; gap: 2px; } .kv dd { margin-bottom: 8px; } }
.formula { margin: 1.2em 0; padding: 14px 16px; background: var(--ink); color: #F3F4F1; font: 500 .92rem/1.6 var(--f-mono); overflow-x: auto; border-left: 6px solid var(--yellow); }
.formula b, .formula strong { color: var(--yellow); font-weight: 600; }
.checklist { list-style: none; padding-left: 0; }
.checklist li { position: relative; padding-left: 30px; }
.checklist li::before { content: ""; position: absolute; left: 0; top: .32em; width: 16px; height: 16px; border: 2px solid var(--ink); background: var(--paper); }
.checklist li::after { content: ""; position: absolute; left: 5px; top: calc(.32em + 2px); width: 5px; height: 9px; border: solid var(--red); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.pill-list { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; }
.pill-list li { margin: 0; padding: 4px 10px; border: 1px solid var(--rule-2); font-size: .88rem; }
.steps { list-style: none; padding: 0; counter-reset: st; margin: 1.4em 0; }
.steps > li { counter-increment: st; position: relative; padding: 0 0 18px 56px; margin: 0; max-width: none; }
.steps > li::before { content: counter(st); position: absolute; left: 0; top: 0; width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; background: var(--ink); color: var(--yellow); font: 700 1rem/1 var(--f-mono); }
.steps > li::after { content: ""; position: absolute; left: 18px; top: 42px; bottom: 4px; width: 2px; background: var(--rule); }
.steps > li:last-child::after { display: none; }
.step-title { margin: 0 0 4px; font: 700 1.06rem/1.35 var(--f-head); color: var(--ink); padding-top: 7px; }
.fig { margin: 1.8em 0; }
.fig svg { display: block; width: 100%; height: auto; border: 1px solid var(--rule); background: var(--paper); }
figcaption { margin-top: 8px; font: 500 .84rem/1.5 var(--f-mono); color: var(--muted); }

/* ---------- Tools ---------- */
.tool { margin: 1.8em 0; border: 2px solid var(--ink); background: var(--paper); box-shadow: 6px 6px 0 var(--ink); }
.tool::before { content: "Tool"; display: block; padding: 8px 14px; background: var(--hazard); color: transparent; height: 10px; overflow: hidden; }
.tool-head { padding: 16px 18px 0; }
.tool-head h3, .tool-head p { margin-top: 0; }
.tool-in { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px 16px; padding: 18px; }
.tool-out { padding: 16px 18px 18px; background: var(--paper-2); border-top: 2px solid var(--ink); }
.tool-out output, .tool-out .big { display: block; font: 800 1.6rem/1.2 var(--f-head); color: var(--ink); }
.tool-out p:last-child { margin-bottom: 0; }
.tool label, .qform label { display: grid; gap: 6px; font: 600 .9rem/1.35 var(--f-head); color: var(--ink); }
.tool fieldset { border: 1px solid var(--rule-2); padding: 10px 12px 12px; margin: 0; min-width: 0; }
.tool legend { padding: 0 4px; font: 600 .78rem/1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.tool label.opt-row, .tool .opt-row { display: flex; align-items: center; gap: 10px; font: 500 .95rem/1.35 var(--f-body); min-height: 36px; }
input, select, textarea { width: 100%; min-height: 46px; padding: 10px 12px; border: 2px solid var(--rule-2); border-radius: var(--r); background: var(--paper); color: var(--text); font: 400 1rem/1.4 var(--f-body); }
textarea { min-height: 92px; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: var(--muted); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(23, 71, 166, .2); }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; min-height: 0; padding: 0; accent-color: var(--red); flex: none; }
[aria-invalid="true"] { border-color: var(--red); }

/* ---------- Shortlist form ---------- */
.qform { position: relative; background: var(--paper); color: var(--text); border: 2px solid var(--ink); padding: clamp(18px, 3vw, 28px); box-shadow: 8px 8px 0 var(--yellow); }
.qform-head { margin-bottom: 16px; }
.qform-title { margin: 0 0 6px; font: 800 1.35rem/1.2 var(--f-head); color: var(--ink); }
.qform-sub { margin: 0 0 12px; color: var(--text-2); font-size: .94rem; }
.qform-steps { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; counter-reset: qs; }
.qform-steps li { counter-increment: qs; flex: 1; margin: 0; padding-top: 8px; border-top: 4px solid var(--rule); font: 600 .74rem/1 var(--f-mono); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.qform-steps li::before { content: counter(qs) ". "; }
.qform-steps li.on { border-color: var(--red); color: var(--ink); }
.qstep { border: 0; margin: 0; padding: 0; display: grid; gap: 14px; min-width: 0; }
.qstep + .qstep { margin-top: 14px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px) { .row2 { grid-template-columns: 1fr; } }
.opt { font-weight: 400; color: var(--muted); }
.qform .check { display: flex; gap: 10px; align-items: flex-start; font: 400 .86rem/1.5 var(--f-body); color: var(--text-2); }
.qform .check input { margin-top: 2px; }
.qform .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.qactions { display: flex; gap: 10px; }
.qactions .qsubmit { flex: 1; }
.qnext { width: 100%; }
.js .qform .qstep[data-step="2"] { display: none; }
.js .qform.step2 .qstep[data-step="1"] { display: none; }
.js .qform.step2 .qstep[data-step="2"] { display: grid; }
.qform:not(.step2) .qback { display: none; }
.qform.done fieldset, .qform.done .qform-steps, .qform.done .qform-sub, .qform.done .qform-head .qform-title { display: none !important; }
.qform-error { margin: 12px 0 0; padding: 10px 12px; border-left: 4px solid var(--red); background: var(--red-soft); color: var(--red-2); font-weight: 600; font-size: .92rem; }
.qform-done { padding: 4px 0; outline: none; }
.qform-done .qform-title::before { content: "✓ "; color: var(--green); }
.qform-fine { margin: 14px 0 0; font-size: .8rem; color: var(--muted); line-height: 1.5; }
.cf-turnstile { min-height: 65px; }

/* Dark form band */
.form-band { background: var(--ink); color: #E9EAEC; padding: clamp(44px, 6vw, 80px) 0; border-top: 6px solid var(--yellow); scroll-margin-top: var(--header-h); }
.fb-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.fb-copy h2 { color: #fff; font-size: clamp(1.8rem, 1.3rem + 1.6vw, 2.6rem); }
.fb-copy p { color: #C9CCD1; max-width: 52ch; }
.fb-copy .sec-tag { color: var(--yellow); }
.fb-copy a { color: #9EC0FF; }
.fb-list { list-style: none; padding: 0; margin: 22px 0 0; }
.fb-list li { position: relative; padding: 9px 0 9px 30px; border-top: 1px solid var(--ink-3); color: #E9EAEC; }
.fb-list li::before { content: ""; position: absolute; left: 4px; top: 15px; width: 10px; height: 10px; border: 2.5px solid var(--yellow); transform: rotate(45deg); }
@media (max-width: 900px) { .fb-grid { grid-template-columns: 1fr; } }

/* ---------- Sources ---------- */
.sources { margin-top: 3em; padding-top: 18px; border-top: 3px solid var(--ink); font-size: .88rem; color: var(--text-2); }
.sources h2 { font-size: 1.2rem; }
.sources ol { padding-left: 1.6em; }
.sources li { margin: .5em 0; max-width: none; overflow-wrap: anywhere; }
.sources li:target { background: var(--yellow-soft); outline: 2px solid var(--yellow); }
.accessed { color: var(--muted); font-family: var(--f-mono); font-size: .8rem; }
sup.cite { font: 600 .7em/0 var(--f-mono); margin-left: 1px; }
sup.cite a { text-decoration: none; color: var(--red-2); padding: 0 1px; }
sup.cite a:hover { text-decoration: underline; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #C9CCD1; padding: 52px 0 28px; font-size: .93rem; }
.form-band + .site-footer, main:has(> .form-band:last-child) + .site-footer { border-top: 1px solid var(--ink-3); }
.f-grid { display: grid; grid-template-columns: 1.6fr 1.1fr .9fr; gap: 36px; }
.f-brand p { color: #B6BAC1; max-width: 52ch; }
.f-disclose { font-size: .84rem; }
.logo-light { color: #fff; margin-bottom: 14px; }
.logo-light:hover { color: #fff; }
.logo-light .wordmark b { color: var(--ink); }
.f-head { margin: 0 0 10px; font: 600 .74rem/1 var(--f-mono); letter-spacing: .09em; text-transform: uppercase; color: var(--yellow); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 0; }
.site-footer a { color: #E9EAEC; text-decoration: none; display: inline-block; padding: 5px 0; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.f-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--ink-3); font-size: .84rem; color: #9DA2AA; }
.f-base p { margin: 0; }
@media (max-width: 820px) { .f-grid { grid-template-columns: 1fr 1fr; } .f-brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .f-grid { grid-template-columns: 1fr; } }

/* ---------- Sticky mobile CTA ---------- */
.sticky-cta { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 40; transform: translateY(150%); transition: transform .25s ease; }
.sticky-cta .btn { width: 100%; box-shadow: var(--shadow-lg); border-color: var(--ink); }
.sticky-cta.show { transform: none; }
@media (min-width: 1001px) { .sticky-cta { display: none; } }

/* ---------- Article pages ---------- */
.l-article main > .wrap { padding-top: 32px; padding-bottom: 64px; }
.page-hero-plain h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem); max-width: 22ch; }
.page-hero-plain .bluf { font-size: 1.12rem; }
.l-article .qform { margin: 1.4em 0 2em; }

@media print { .site-header, .site-footer, .sticky-cta, .rail, .qform, .form-band, .cta-strip, .hero-actions, body::before { display: none !important; } .label, .tool { box-shadow: none; } }

/* ---------- Page-specific additions (integrator) ---------- */
tr.grp th, tr.grp td, tr.group th, tr.group td, tr.group-row th, tr.group-row td, tr.vi-group th, tr.vi-group td { background: var(--paper-3) !important; color: var(--ink); font: 700 .8rem/1.3 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; padding-top: 9px; padding-bottom: 9px; border-top: 2px solid var(--ink); }
table.register tr.grp:hover, table.register tr.group:hover, table.register tr.group-row:hover, table.register tr.vi-group:hover { background: var(--paper-3); }
tr.is-fit, tr.ehs-hit { box-shadow: inset 4px 0 0 var(--red); background: var(--yellow-soft) !important; }
tr.ehs-miss { opacity: .5; }
.fit-flag { display: inline-block; margin: 4px 0 0; padding: 2px 6px; font: 700 .68rem/1.3 var(--f-mono); text-transform: uppercase; letter-spacing: .04em; background: var(--red); color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 2px; margin-top: 4px; }
table.register-matrix { font-size: .85rem; }
table.register-matrix th, table.register-matrix td { padding: 9px 8px; }
table.register-matrix td .yes, table.register-matrix td .ns { font-size: .8rem; }
@media (max-width: 640px) { table.register-matrix td .yes { font-size: 0; gap: 0; } table.register-matrix td .yes svg { width: 15px; height: 15px; } table.register-matrix td .ns { font-size: 0; } table.register-matrix td .ns::before { content: "–"; font-size: .9rem; } }
th abbr, td abbr { text-decoration: none; cursor: help; }
table td .small, table td small { display: block; margin-top: 3px; color: var(--muted); font-size: .8rem; line-height: 1.4; }
table thead th .small, table thead th small { color: #C9CCD1; text-transform: none; letter-spacing: 0; }
table.data tbody th[scope=row] { background: var(--paper); font-weight: 650; }
.vi-meta, .vi-sum { display: block; margin-top: 3px; font-size: .84rem; color: var(--text-2); line-height: 1.45; }
.vi-meta { font-family: var(--f-mono); font-size: .76rem; color: var(--muted); }
table.vi-table td { min-width: 120px; }
table.vi-table td:nth-child(2), table.vi-table td:nth-child(3) { min-width: 200px; }
ul.vendor-notes { padding-left: 1.1em; font-size: .92rem; }
ul.small { font-size: .9rem; }
.rules-box { margin: 1em 0 0; padding: 12px 14px; border: 1px dashed var(--rule-2); background: var(--paper); font-size: .9rem; color: var(--text-2); }
.rules-box p:last-child, .rules-box ul:last-child { margin-bottom: 0; }
.tool-group { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 4px 14px; }
.tool .check, .tool label.check { display: flex; align-items: center; gap: 10px; font: 500 .95rem/1.35 var(--f-body); min-height: 36px; }
.tool-in > label, .tool-in > fieldset, .tool-in > div { min-width: 0; }
.tool-out { font-size: 1rem; }
.tool-out ul { margin: .4em 0 .8em; padding-left: 1.2em; }
.tool-out li { margin: .2em 0; }
.tool-out table.data { font-size: .9rem; background: var(--paper); margin: .6em 0; }
.tool-out .small, .tool-out p.small { font-size: .86rem; color: var(--text-2); }
.tool-out output[data-out], .tool-out [data-out=why], .tool-out [data-out=match] { font: inherit; display: block; }
.tool-out output.big, .tool-out .big output, .tool-out [data-out].big { font: 800 1.6rem/1.2 var(--f-head); }
.tool-out dl.kv dd output { font: 600 1rem/1.45 var(--f-body); }
.tool-k { display: block; font: 600 .74rem/1.3 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-top: 8px; }
.tool-v { display: block; font: 750 1.15rem/1.35 var(--f-head); color: var(--ink); }
.formula { white-space: pre-line; }
.prose blockquote { margin: 1.4em 0; padding: 14px 18px; border-left: 5px solid var(--ink); background: var(--paper-2); font-size: .98rem; color: var(--text); }
.prose blockquote p:last-child { margin-bottom: 0; }
details { margin: 1em 0; border: 1px solid var(--rule-2); background: var(--paper); }
details > summary { cursor: pointer; padding: 12px 14px; font: 650 .98rem/1.35 var(--f-head); color: var(--ink); list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: "+"; display: inline-block; width: 1.2em; font-family: var(--f-mono); color: var(--red); }
details[open] > summary::before { content: "–"; }
details[open] > summary { border-bottom: 1px solid var(--rule); }
details > :not(summary) { margin: 12px 14px; }
details .table-wrap { margin: 12px 14px; width: auto; }
.qform-vendor { box-shadow: 8px 8px 0 var(--paper-3); }
.grid-3 a.card, .grid-2 a.card { color: var(--ink); text-decoration: none; transition: background-color .15s; }
.grid-3 a.card:hover, .grid-2 a.card:hover { background: var(--yellow-soft); }
.band .band-head h2 { margin-top: 0; }
