/* Ally Environmental — shared styles
   Layout concept: each page reads like a field inspection report — a clear header,
   a regulatory "spec" block, charts drawn to scale, and a step-by-step process. */
:root {
  --paper: #F3F7F2;
  --surface: #FFFFFF;
  --ink: #14271B;
  --muted: #56685B;
  --line: #D2DDD3;
  --accent: #1E6E34;
  --accent-ink: #FFFFFF;
  --accent-soft: #E1F0DF;
  --signal: #1A7DBF;
  --signal-soft: #DDEEF9;
  --band: #0E3320;
  --band-ink: #EAF3EB;
  --band-muted: #A3BBA8;
  --danger: #B3402E;
  --logo-plate: transparent;

  --f-display: "Archivo", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --f-body: "Public Sans", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --s-xs: .8125rem; --s-sm: .9375rem; --s-md: 1.0625rem; --s-lg: 1.375rem;
  --s-xl: 1.875rem; --s-2xl: clamp(2rem, 4.2vw, 2.875rem); --s-3xl: clamp(2.375rem, 6vw, 4.25rem);
  --radius: 6px;
  --max: 1160px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0B1610; --surface: #122019; --ink: #E5EEE6; --muted: #95A99A; --line: #24382B; --logo-plate: #FFFFFF;
    --accent: #6CC261; --accent-ink: #08180C; --accent-soft: #183A20; --signal: #55B5EE; --signal-soft: #12324A;
    --band: #07120B; --band-ink: #E5EEE6; --band-muted: #95A99A; --danger: #E57A64;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0B1610; --surface: #122019; --ink: #E5EEE6; --muted: #95A99A; --line: #24382B; --logo-plate: #FFFFFF;
  --accent: #6CC261; --accent-ink: #08180C; --accent-soft: #183A20; --signal: #55B5EE; --signal-soft: #12324A;
  --band: #07120B; --band-ink: #E5EEE6; --band-muted: #95A99A; --danger: #E57A64;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 var(--s-md)/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--surface); }
img, svg { max-width: 100%; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3, h4 { font-family: var(--f-display); font-stretch: 112%; line-height: 1.1; margin: 0; text-wrap: balance; letter-spacing: -.01em; }
h1 { font-size: var(--s-3xl); font-weight: 800; }
h2 { font-size: var(--s-2xl); font-weight: 750; }
h3 { font-size: var(--s-lg); font-weight: 700; }
h4 { font-size: var(--s-md); font-weight: 700; }
p { margin: 0; }
.wrap { max-width: var(--max); margin-inline: auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
@media (min-width: 720px) { .wrap { padding-left: max(32px, env(safe-area-inset-left, 0px)); padding-right: max(32px, env(safe-area-inset-right, 0px)); } }
.eyebrow { font: 600 var(--s-xs)/1.3 var(--f-mono); text-transform: uppercase; letter-spacing: .12em; color: var(--accent); }
.lede { font-size: var(--s-lg); line-height: 1.5; color: var(--muted); max-width: 40ch; }
.prose { max-width: 66ch; display: grid; gap: 1em; }
.muted { color: var(--muted); }
.mono { font-family: var(--f-mono); }
.num { font-variant-numeric: tabular-nums; }

/* Header */
.topbar { background: var(--band); color: var(--band-muted); font: 500 var(--s-xs)/1 var(--f-mono); }
.topbar .wrap { display: flex; flex-wrap: wrap; gap: 6px 24px; justify-content: space-between; padding-block: 9px; }
.topbar strong { color: var(--band-ink); font-weight: 600; }
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 8px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand svg { width: 38px; height: 38px; flex: none; }
.brand-name { font: 800 1.125rem/1 var(--f-display); font-stretch: 115%; letter-spacing: .01em; }
.brand-sub { display: block; font: 500 .6875rem/1.2 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: var(--s-sm); padding: 8px 10px; border-radius: var(--radius); }
.nav a:hover, .nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
.nav .btn { margin-left: 8px; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; color: var(--ink); font: 600 var(--s-sm) var(--f-body); cursor: pointer; }
@media (max-width: 1100px) {
  .nav-toggle { display: inline-flex; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; background: var(--surface); border-bottom: 1px solid var(--line); padding: 8px max(16px, env(safe-area-inset-right, 0px)) 16px max(16px, env(safe-area-inset-left, 0px)); }
  .nav.open { display: flex; }
  .nav .btn { margin: 8px 0 0; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 700 var(--s-sm)/1 var(--f-body); padding: 13px 20px; border-radius: var(--radius); text-decoration: none; border: 1.5px solid transparent; cursor: pointer; }
.btn-primary { background: var(--accent); color: var(--accent-ink) !important; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { border-color: currentColor; color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--accent-soft); }
.band .btn-ghost { color: var(--band-ink); }
.band .btn-ghost:hover { background: rgba(255,255,255,.08); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Sections */
section { padding-block: clamp(48px, 7vw, 88px); }
.section-head { display: grid; gap: 12px; margin-bottom: 36px; max-width: 70ch; }
.band { background: var(--band); color: var(--band-ink); }
.band .muted, .band .lede { color: var(--band-muted); }
.band .eyebrow { color: var(--signal); }
.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* Hero (home) */
.hero { padding-block: clamp(40px, 6vw, 72px) clamp(40px, 6vw, 80px); background: var(--surface); border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; gap: 40px; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1.05fr .95fr; } }
.hero h1 { margin-block: 14px 20px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lede { margin-bottom: 28px; }
.notice { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--signal); background: var(--signal-soft); color: var(--ink); border-radius: var(--radius); padding: 12px 14px; font-size: var(--s-sm); line-height: 1.5; max-width: 60ch; }
.notice svg { flex: none; width: 20px; height: 20px; color: var(--signal); margin-top: 1px; }
.hero .notice { margin-top: 28px; }
.figure { border: 1px solid var(--line); background: var(--paper); border-radius: 10px; padding: 18px; min-width: 0; }
.figure svg { display: block; width: 100%; height: auto; }
.figure figcaption { font: 500 var(--s-xs)/1.4 var(--f-mono); color: var(--muted); margin-top: 10px; }
figure { margin: 0; }

/* Credentials strip */
.creds { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); }
.cred { padding: 20px 20px 20px 0; border-right: 1px solid var(--line); display: grid; gap: 2px; }
.cred + .cred { padding-left: 20px; }
.cred:last-child { border-right: 0; }
.cred b { font: 800 1.25rem/1.1 var(--f-display); font-stretch: 112%; }
.cred span { color: var(--muted); font-size: var(--s-sm); }
@media (max-width: 640px) { .cred, .cred + .cred { border-right: 0; border-bottom: 1px solid var(--line); padding-left: 0; } .cred:last-child { border-bottom: 0; } }

/* Service index */
.svc-grid { display: grid; grid-template-columns: 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.svc { background: var(--surface); padding: 26px 24px 24px; display: grid; grid-template-rows: auto auto 1fr auto; gap: 12px; text-decoration: none; color: var(--ink); position: relative; transition: background .2s; }
.svc:hover { background: var(--accent-soft); }
.svc .svc-ico { width: 64px; height: 64px; }
.svc p { color: var(--muted); font-size: var(--s-sm); }
.svc .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.svc .more { font-weight: 700; font-size: var(--s-sm); color: var(--accent); display: flex; align-items: center; gap: 6px; }
.svc:hover .more span { transform: translateX(3px); }
.svc .more span { transition: transform .2s; }
.chip { font: 500 .75rem/1 var(--f-mono); padding: 5px 8px; border-radius: 4px; background: var(--paper); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.chip.reg { background: var(--signal-soft); border-color: transparent; color: var(--ink); }

/* Need matrix table */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: var(--s-sm); }
th, td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
thead th { font: 600 var(--s-xs)/1.3 var(--f-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); background: var(--paper); }
td a { font-weight: 700; }
td .mono { font-size: var(--s-xs); color: var(--muted); }

/* About */
.about-grid { display: grid; gap: 40px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .about-grid { grid-template-columns: 1.1fr .9fr; } }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-left: 2px solid var(--line); }
.timeline li { padding: 0 0 20px 22px; position: relative; display: grid; gap: 2px; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); }
.timeline li:first-child::before { background: var(--accent); }
.timeline .yr { font: 500 var(--s-xs) var(--f-mono); color: var(--muted); }
.timeline b { font-weight: 700; }

/* Service page header */
.svc-hero { background: var(--surface); border-bottom: 1px solid var(--line); padding-block: 28px clamp(36px, 5vw, 64px); }
.crumbs { font: 500 var(--s-xs) var(--f-mono); color: var(--muted); margin-bottom: 26px; display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); }
.svc-hero-grid { display: grid; gap: 36px; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 960px) { .svc-hero-grid { grid-template-columns: 1.15fr .85fr; } }
.svc-hero h1 { font-size: clamp(2.125rem, 5vw, 3.5rem); margin-block: 12px 18px; }
.svc-hero .lede { margin-bottom: 24px; max-width: 46ch; }
.reg-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 26px; }

/* Two-column content */
.cols { display: grid; gap: 40px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .cols { grid-template-columns: 1fr 1fr; } }
.cols > * { min-width: 0; }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.checklist li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; }
.checklist li::before { content: ""; width: 18px; height: 18px; margin-top: 4px; border-radius: 50%; border: 2px solid var(--accent); background: radial-gradient(circle, var(--accent) 0 3px, transparent 4px); }
.checklist b { display: block; }
.checklist span { color: var(--muted); font-size: var(--s-sm); }

/* Spec table (regulatory block) */
.spec { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); overflow: hidden; }
.spec-row { display: grid; grid-template-columns: minmax(120px, 34%) 1fr; border-bottom: 1px solid var(--line); }
.spec-row:last-child { border-bottom: 0; }
.spec-row > * { padding: 13px 16px; min-width: 0; }
.spec-row dt { font: 600 var(--s-xs)/1.4 var(--f-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--paper); border-right: 1px solid var(--line); }
.spec-row dd { margin: 0; font-size: var(--s-sm); }
.spec { margin: 0; }
@media (max-width: 520px) { .spec-row { grid-template-columns: 1fr; } .spec-row dt { border-right: 0; border-bottom: 1px solid var(--line); } }

/* Charts */
.chart-card { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: clamp(18px, 3vw, 28px); display: grid; gap: 14px; min-width: 0; }
.chart-card h3 { font-size: var(--s-lg); }
.chart-card .note { font-size: var(--s-xs); color: var(--muted); font-family: var(--f-mono); line-height: 1.5; }
.chart { overflow-x: auto; }
.chart svg { display: block; min-width: 520px; width: 100%; height: auto; }
.chart svg text { font-family: var(--f-mono); fill: var(--muted); }
.chart .axis { stroke: var(--line); }
.chart .grid { stroke: var(--line); stroke-dasharray: 2 4; }
.chart .lbl-strong { fill: var(--ink); font-weight: 600; }
.legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: var(--s-xs); font-family: var(--f-mono); color: var(--muted); }
.legend i { display: inline-block; width: 14px; height: 3px; vertical-align: middle; margin-right: 6px; border-radius: 2px; }

/* Threshold band */
.bands { display: grid; gap: 18px; }
.band-row { display: grid; gap: 8px; }
.band-row .band-label { font: 600 var(--s-xs) var(--f-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.band-track { display: grid; border-radius: 6px; overflow: hidden; min-height: 64px; }
.band-seg { padding: 10px 12px; display: grid; align-content: space-between; gap: 4px; font-size: var(--s-xs); border-right: 2px solid var(--surface); min-width: 0; }
.band-seg:last-child { border-right: 0; }
.band-seg b { font: 700 var(--s-sm) var(--f-display); font-stretch: 110%; }
.band-seg span { font-family: var(--f-mono); }
.seg-1 { background: var(--accent-soft); color: var(--ink); }
.seg-2 { background: var(--signal-soft); color: var(--ink); }
.seg-3 { background: var(--signal); color: var(--surface); }

/* Process steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 185px), 1fr)); gap: 14px; counter-reset: step; }
.steps li { counter-increment: step; border-top: 3px solid var(--accent); background: var(--surface); padding: 18px 18px 20px; display: grid; gap: 8px; align-content: start; border-radius: 0 0 var(--radius) var(--radius); }
.steps li::before { content: "Step " counter(step, decimal-leading-zero); font: 600 var(--s-xs) var(--f-mono); color: var(--accent); letter-spacing: .08em; text-transform: uppercase; }
.steps li p { font-size: var(--s-sm); color: var(--muted); }
.steps li.handoff { border-top-color: var(--signal); background: var(--signal-soft); }
.steps li.handoff::before { content: "Not by Ally"; color: var(--signal); }

/* Flow diagram */
.flow { display: grid; gap: 10px; }
.flow-node { border: 1.5px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 12px 14px; font-size: var(--s-sm); }
.flow-node.ally { border-color: var(--accent); }
.flow-node.ext { border-style: dashed; border-color: var(--signal); background: var(--signal-soft); }
.flow-node b { display: block; font-family: var(--f-display); font-stretch: 110%; }
.flow-node small { font-family: var(--f-mono); font-size: .72rem; color: var(--muted); }
.flow-arrow { text-align: center; color: var(--muted); font: 600 var(--s-xs) var(--f-mono); }
.flow-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.flow-split > * { min-width: 0; }
@media (max-width: 520px) { .flow-split { grid-template-columns: 1fr; } }
.flow-key { display: flex; flex-wrap: wrap; gap: 14px; font: 500 var(--s-xs) var(--f-mono); color: var(--muted); }
.flow-key i { display: inline-block; width: 16px; height: 10px; border: 1.5px solid var(--accent); border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.flow-key i.ext { border-style: dashed; border-color: var(--signal); background: var(--signal-soft); }

/* FAQ */
.faq { display: grid; gap: 0; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; list-style: none; padding: 16px 36px 16px 0; font-weight: 700; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 12px; font: 400 1.5rem var(--f-mono); color: var(--accent); }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 0 18px; color: var(--muted); max-width: 70ch; }

/* CTA band */
.cta-band .wrap { display: grid; gap: 24px; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 860px) { .cta-band .wrap { grid-template-columns: 1fr auto; } }
.cta-band h2 { font-size: clamp(1.75rem, 3.6vw, 2.5rem); }
.cta-band p { color: var(--band-muted); margin-top: 10px; max-width: 56ch; }

/* Footer */
.site-footer { background: var(--band); color: var(--band-muted); font-size: var(--s-sm); padding-block: 48px 32px; border-top: 1px solid rgba(255,255,255,.08); }
.foot-grid { display: grid; gap: 32px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.site-footer h4 { color: var(--band-ink); font-size: var(--s-sm); margin-bottom: 12px; font-family: var(--f-mono); font-stretch: 100%; text-transform: uppercase; letter-spacing: .1em; font-weight: 600; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer a { color: var(--band-ink); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer .brand { color: var(--band-ink); }
.site-footer .brand-sub { color: var(--band-muted); }
.foot-legal { margin-top: 36px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.1); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; font: 500 var(--s-xs)/1.5 var(--f-mono); }
.foot-legal strong { color: var(--signal); font-weight: 600; }

/* Form */
.form-grid { display: grid; gap: 40px; grid-template-columns: 1fr; }
@media (min-width: 960px) { .form-grid { grid-template-columns: .8fr 1.2fr; } }
.form { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: clamp(20px, 3vw, 32px); display: grid; gap: 18px; min-width: 0; }
.field { display: grid; gap: 6px; min-width: 0; }
.field-row { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 620px) { .field-row { grid-template-columns: 1fr 1fr; } }
label, legend { font-weight: 700; font-size: var(--s-sm); }
label .opt { font-weight: 400; color: var(--muted); }
input, select, textarea { font: 400 var(--s-md) var(--f-body); color: var(--ink); background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 11px 12px; width: 100%; }
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.invalid { border-color: var(--danger) !important; }
.err { color: var(--danger); font-size: var(--s-xs); font-weight: 600; }
fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 10px; min-width: 0; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 8px; }
.checks label { font-weight: 500; display: flex; gap: 10px; align-items: center; border: 1.5px solid var(--line); border-radius: var(--radius); padding: 10px 12px; cursor: pointer; background: var(--paper); }
.checks input { width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.checks label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.captcha { border: 1.5px dashed var(--line); border-radius: var(--radius); padding: 14px; display: grid; gap: 10px; background: var(--paper); }
.captcha-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.captcha canvas { border-radius: 4px; border: 1px solid var(--line); background: var(--surface); width: 180px; height: 56px; }
.captcha button { background: none; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; color: var(--ink); cursor: pointer; font: 600 var(--s-xs) var(--f-body); }
.captcha input { max-width: 220px; font-family: var(--f-mono); letter-spacing: .15em; text-transform: uppercase; }
.form-done { border: 1.5px solid var(--accent); background: var(--accent-soft); border-radius: 10px; padding: 24px; display: grid; gap: 10px; }
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.contact-list li { padding: 16px 0; border-bottom: 1px solid var(--line); display: grid; gap: 2px; }
.contact-list .k { font: 600 var(--s-xs) var(--f-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.contact-list .v { font-weight: 700; font-size: var(--s-lg); user-select: all; }

/* Illustration helpers (SVG) */
.ill .ln { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ill .ln-thin { fill: none; stroke: var(--muted); stroke-width: 1.25; stroke-linecap: round; }
.ill .fill-surface { fill: var(--surface); }
.ill .fill-paper { fill: var(--paper); }
.ill .fill-accent { fill: var(--accent); }
.ill .fill-accent-soft { fill: var(--accent-soft); }
.ill .fill-signal { fill: var(--signal); }
.ill .fill-signal-soft { fill: var(--signal-soft); }
.ill .fill-line { fill: var(--line); }
.ill .st-accent { stroke: var(--accent); }
.ill .st-signal { stroke: var(--signal); }
.ill text { font-family: var(--f-mono); fill: var(--ink); }
.ill .t-muted { fill: var(--muted); }
.ill .t-accent { fill: var(--accent); }
.ill .t-inv { fill: var(--surface); }
.ping { transform-box: fill-box; transform-origin: center; animation: ping 2.6s ease-out infinite; }
@keyframes ping { 0% { opacity: .7; transform: scale(.6); } 80%, 100% { opacity: 0; transform: scale(1.8); } }

:root { padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
.chart .m-accent { fill: var(--accent); }
.chart .m-signal { fill: var(--signal); }
.chart .m-ink { fill: var(--ink); }
.chart .m-soft { fill: var(--accent-soft); }
.chart .ln-accent { stroke: var(--accent); fill: none; stroke-width: 3; stroke-linejoin: round; }
.chart .ln-signal { stroke: var(--signal); fill: none; stroke-width: 3; stroke-linejoin: round; }
.chart .ln-mark { stroke: var(--muted); stroke-dasharray: 3 3; fill: none; }
.chart .dot-accent { fill: var(--surface); stroke: var(--accent); stroke-width: 2.5; }
.chart .dot-signal { fill: var(--surface); stroke: var(--signal); stroke-width: 2.5; }
.chart .zone { fill: var(--signal-soft); }
.law-tl { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 0; border-top: 2px solid var(--ink); }
.law-tl li { padding: 16px 18px 4px 0; display: grid; gap: 4px; align-content: start; position: relative; }
.law-tl li::before { content: ""; position: absolute; top: -7px; left: 0; width: 12px; height: 12px; background: var(--accent); border-radius: 50%; }
.law-tl .yr { font: 700 var(--s-lg) var(--f-display); font-stretch: 112%; }
.law-tl .src { font: 500 var(--s-xs) var(--f-mono); color: var(--accent); }
.law-tl p { font-size: var(--s-sm); color: var(--muted); }
.stack { display: grid; gap: 24px; align-content: start; }
.split-2 { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .split-2 { grid-template-columns: 1fr 1fr; } }
.split-2 > * { min-width: 0; }
.ill .fill-ink { fill: var(--ink); }

@media (min-width: 640px) { .svc-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .svc-grid { grid-template-columns: repeat(4, 1fr); } }
.svc-guide { background: var(--band); color: var(--band-ink); }
.svc-guide:hover { background: var(--band); filter: brightness(1.15); }
.svc-guide p { color: var(--band-muted); }
.svc-guide .eyebrow, .svc-guide .more { color: var(--signal); }

.logo { display: block; height: 60px; width: auto; background: var(--logo-plate); border-radius: 6px; padding: 3px 6px; }
.logo-band { height: 64px; background: #FFFFFF; padding: 6px 10px; }


/* Hero service rolodex */
.rolo { display: grid; gap: 18px; min-width: 0; }
.rolo-stack { display: grid; perspective: 1400px; position: relative; padding-bottom: 16px; }
.rolo-stack::before, .rolo-stack::after { content: ""; grid-area: 1 / 1; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; }
.rolo-stack::before { transform: translateY(16px) scale(.92); opacity: .55; }
.rolo-stack::after { transform: translateY(8px) scale(.96); opacity: .85; }
.rolo-card { position: relative; grid-area: 1 / 1; z-index: 1; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px 22px;
  display: grid; gap: 10px; align-content: start; min-width: 0; box-shadow: 0 18px 40px -28px rgba(10, 40, 20, .45);
  transform-origin: 50% 100%; transform: rotateX(70deg) translateY(-10px); opacity: 0; visibility: hidden;
  transition: transform .7s cubic-bezier(.22,.8,.25,1), opacity .45s ease, visibility 0s linear .7s; }
.rolo-card.is-active { transform: none; opacity: 1; visibility: visible; transition-delay: 0s; z-index: 2; }
.rolo-card.is-leaving { transform-origin: 50% 0; transform: rotateX(-75deg) translateY(10px); opacity: 0; visibility: visible; transition: transform .6s cubic-bezier(.5,0,.75,0), opacity .5s ease; z-index: 3; }
.rolo-card::after { display: none; content: ""; position: absolute; left: 50%; bottom: -1px; width: 56px; height: 12px; margin-left: -28px; border-radius: 12px 12px 0 0; background: var(--paper); border: 1px solid var(--line); border-bottom: 0; }
.rolo-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.rolo-count { font: 500 var(--s-xs) var(--f-mono); color: var(--muted); }
.rolo-title { font-size: var(--s-xl); }
.rolo-art { border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.rolo-art svg { display: block; width: 100%; height: auto; }
.rolo-text { color: var(--muted); font-size: var(--s-sm); }
.rolo .more { font-weight: 700; font-size: var(--s-sm); color: var(--accent); text-decoration: none; display: inline-flex; gap: 6px; }
.rolo-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.rolo-tabs button { font: 600 var(--s-xs) var(--f-body); color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 11px; cursor: pointer; }
.rolo-tabs button[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.rolo-tabs button:hover { border-color: var(--accent); }

/* Service category strip */
.cat-strip { background: var(--paper); border-bottom: 1px solid var(--line); }
.cats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cats li { border-right: 1px solid var(--line); min-width: 0; }
.cats li:first-child { border-left: 1px solid var(--line); }
.cat { display: grid; justify-items: center; gap: 12px; padding: 26px 8px 22px; text-decoration: none; color: var(--ink); text-align: center; font-weight: 700; font-size: var(--s-sm); line-height: 1.25; transition: background .2s; }
.cat:hover { background: var(--accent-soft); }
.cat .svc-ico { width: 84px; height: 84px; transition: transform .25s; }
.cat:hover .svc-ico { transform: translateY(-3px); }
@media (max-width: 900px) {
  .cats { grid-template-columns: repeat(7, 132px); overflow-x: auto; scroll-snap-type: x mandatory; }
  .cats li { scroll-snap-align: start; }
}
@media (max-width: 900px) { .cat-strip .wrap { overflow-x: auto; } }

.hero h1 { font-size: clamp(2.5rem, 5.6vw, 4rem); margin-bottom: 18px; }
.hero h1 em { display: block; }
.hero-tag { font: 700 clamp(1.25rem, 2.2vw, 1.625rem)/1.3 var(--f-display); font-stretch: 105%; color: var(--ink); max-width: 30ch; margin-bottom: 16px; padding-left: 16px; border-left: 4px solid var(--signal); text-wrap: balance; }
.hero .lede { font-size: var(--s-md); max-width: 52ch; }

/* Header: logo + phone/hours stay visible while scrolling */
.hdr { gap: 20px; }
.brand-group { display: flex; align-items: center; gap: 20px; min-width: 0; }
.hdr-contact { display: grid; gap: 3px; padding-left: 20px; border-left: 1px solid var(--line); min-width: 0; }
.hdr-phone { display: inline-flex; align-items: center; gap: 7px; font: 800 1.0625rem/1.1 var(--f-display); font-stretch: 108%; color: var(--ink); text-decoration: none; white-space: nowrap; }
.hdr-phone svg { width: 16px; height: 16px; color: var(--accent); flex: none; }
.hdr-phone:hover { color: var(--accent); }
.hdr-hours { font: 500 .75rem/1.2 var(--f-mono); color: var(--muted); white-space: nowrap; }
.nav-toggle { align-items: center; gap: 8px; min-height: 44px; }
.nav-toggle svg { width: 20px; height: 20px; }
[id] { scroll-margin-top: 96px; }
@media (min-width: 1101px) and (max-width: 1240px) { .nav a { padding: 8px 7px; } .hdr-hours { display: none; } }

/* Mobile */
@media (max-width: 1100px) {
  .nav a { padding: 13px 12px; font-size: var(--s-md); border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav .btn { border-bottom: 0; border-radius: var(--radius); padding: 15px 20px; }
}
@media (max-width: 640px) {
  .topbar .wrap { justify-content: center; padding-block: 7px; }
  .site-header .wrap { padding-block: 8px; gap: 10px; }
  .logo { height: 42px; padding: 2px 4px; }
  .brand-group { gap: 12px; }
  .hdr-contact { padding-left: 12px; gap: 2px; }
  .hdr-phone { font-size: .9375rem; gap: 5px; }
  .hdr-phone svg { width: 14px; height: 14px; }
  .hdr-hours { font-size: .6875rem; }
  .nav-toggle { padding: 8px 10px; }
  .nav-toggle span { display: none; }
  [id] { scroll-margin-top: 76px; }
  section { padding-block: 44px; }
  .hero { padding-block: 28px 40px; }
  .hero h1 { font-size: clamp(2.125rem, 10vw, 2.75rem); margin-block: 0 14px; }
  .hero-tag { font-size: 1.1875rem; padding-left: 12px; }
  .hero .lede, .lede { font-size: var(--s-md); }
  .cta-row .btn { flex: 1 1 100%; padding-block: 15px; }
  .hero-grid { gap: 28px; }
  .rolo-card { padding: 16px; }
  .rolo-title { font-size: var(--s-lg); }
  .rolo-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; margin-inline: -4px; padding-inline: 4px; }
  .rolo-tabs::-webkit-scrollbar { display: none; }
  .rolo-tabs button { flex: none; padding: 9px 13px; }
  .cats { grid-template-columns: repeat(7, 108px); }
  .cat { padding: 18px 6px 16px; font-size: var(--s-xs); }
  .cat .svc-ico { width: 60px; height: 60px; }
  .section-head { margin-bottom: 24px; }
  .svc { padding: 20px 18px; }
  .svc-hero { padding-block: 18px 36px; }
  .svc-hero h1 { font-size: clamp(1.875rem, 8.5vw, 2.375rem); }
  .crumbs { margin-bottom: 16px; }
  .chart-card { padding: 16px; }
  .chart svg { min-width: 460px; }
  .law-tl { border-top: 0; border-left: 2px solid var(--ink); grid-template-columns: 1fr; padding-left: 20px; }
  .law-tl li { padding: 0 0 20px; }
  .law-tl li::before { left: -27px; top: 6px; }
  .faq summary { padding-block: 14px; }
  .cta-band h2 { font-size: 1.625rem; }
  .table-cards { border: 0; background: transparent; overflow: visible; }
  .table-cards table, .table-cards tbody, .table-cards tr, .table-cards td { display: block; width: 100%; }
  .table-cards thead { display: none; }
  .table-cards tr { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 6px 0; margin-bottom: 12px; }
  .table-cards td { border: 0; padding: 8px 16px; }
  .table-cards td::before { content: attr(data-label); display: block; font: 600 .6875rem/1.4 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
}
@media (max-width: 370px) { .hdr-hours { display: none; } .logo { height: 38px; } }
.hdr { position: relative; }
@media (max-width: 640px) {
  .svc { grid-template-columns: 52px 1fr; grid-template-rows: auto; column-gap: 14px; row-gap: 6px; padding: 18px 16px; }
  .svc > .svc-ico { width: 52px; height: 52px; grid-row: 1 / span 3; }
  .svc h3 { font-size: 1.1875rem; }
  .svc p { font-size: var(--s-sm); }
  .svc .tags { display: none; }
  .svc > div { grid-column: 2; }
  .svc-guide { grid-template-columns: 1fr; }
  .svc-guide > div { grid-column: 1; }
}
.hero-solo > div { max-width: 820px; }
.hero-solo .lede { max-width: 62ch; }
@media (min-width: 960px) { .hero { padding-block: 72px 80px; } }
.hero-solo .hero-tag { max-width: none; }
