/* Layout: one reading column (≈68ch) on a cool site-paper ground; documents and templates sit on ruled "form" sheets; one hazard-stripe band marks the header. */
:root {
  --paper: #f5f6f3;
  --sheet: #ffffff;
  --ink: #1b2127;
  --muted: #5b6570;
  --rule: #d7dbd6;
  --hivis: #ffcd00;
  --hivis-ink: #1b2127;
  --sign: #0b6b45;
  --warn: #b3261e;
  --tint: #eef0ec;
  --head-bg: #1b2127;
  --on-head: #f5f6f3;
  --display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --body: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.625rem;
  --step-3: 2.25rem;
  --step-4: clamp(2.5rem, 6vw, 3.75rem);
  --col: 68ch;
  --wide: 1120px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #13171b; --sheet: #1b2026; --ink: #e9ecee; --muted: #a3acb5; --rule: #2e353d;
    --hivis: #ffd21f; --hivis-ink: #13171b; --sign: #4cc38a; --warn: #ff8a80; --tint: #20262d; --head-bg: #0c0f12; --on-head: #e9ecee;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #13171b; --sheet: #1b2026; --ink: #e9ecee; --muted: #a3acb5; --rule: #2e353d;
  --hivis: #ffd21f; --hivis-ink: #13171b; --sign: #4cc38a; --warn: #ff8a80; --tint: #20262d; --head-bg: #0c0f12; --on-head: #e9ecee;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.6;
}
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration-color: var(--hivis); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 3px solid var(--hivis); outline-offset: 2px; }

.wrap {
  max-width: var(--wide);
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; background: var(--hivis); color: var(--hivis-ink); padding: 8px 12px; z-index: 20; }

/* Header */
.site-head { background: var(--head-bg); color: var(--on-head); }
.site-head .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; padding-block: 14px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand-name { font-family: var(--display); font-weight: 700; font-size: 1.45rem; letter-spacing: 0.02em; text-transform: uppercase; line-height: 1; }
.brand-name span { color: var(--hivis); }
.nav { display: flex; gap: 4px 18px; flex-wrap: wrap; font-size: 0.98rem; margin-left: auto; align-items: center; }
.nav a { text-decoration: none; opacity: 0.88; }
.nav a:hover, .nav a[aria-current="page"] { opacity: 1; text-decoration: underline; text-decoration-color: var(--hivis); }
.nav .btn { opacity: 1; }
.hazard { height: 8px; background: repeating-linear-gradient(-45deg, var(--hivis) 0 14px, var(--head-bg) 14px 28px); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--display); font-weight: 700; font-size: 1.1rem; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 10px 18px; border-radius: 3px; border: 2px solid var(--hivis);
  background: var(--hivis); color: var(--hivis-ink); text-decoration: none; cursor: pointer;
}
.btn:hover { filter: brightness(0.95); }
.btn.ghost { background: transparent; color: inherit; border-color: currentColor; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Breadcrumb */
.crumbs { font-size: 0.9rem; color: var(--muted); padding-block: 18px 0; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--rule); }

/* Hero */
.hero { padding-block: 40px 48px; display: grid; gap: 40px; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; }
.hero.single { grid-template-columns: minmax(0, 1fr); padding-block: 24px 8px; }
@media (max-width: 860px) { .hero { grid-template-columns: minmax(0, 1fr); } }
.eyebrow { font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.08; text-wrap: balance; letter-spacing: 0.005em; }
h1 { font-size: var(--step-4); margin: 0 0 18px; text-transform: uppercase; }
h2 { font-size: var(--step-3); margin: 48px 0 12px; }
h3 { font-size: var(--step-2); margin: 28px 0 8px; }
.lede { font-size: var(--step-1); line-height: 1.5; max-width: 60ch; margin: 0 0 22px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 18px 0 0; padding: 0; list-style: none; font-size: 0.95rem; color: var(--muted); }
.facts li::before { content: "✓"; color: var(--sign); font-weight: 700; margin-right: 6px; }

/* Sample document sheet in hero */
.sheet {
  background: var(--sheet); border: 1px solid var(--rule); border-radius: 2px;
  box-shadow: 0 1px 0 var(--rule), 0 18px 40px -24px rgba(0,0,0,0.35);
  padding: 20px; font-size: 0.86rem; transform: rotate(0.6deg);
}
@media (prefers-reduced-motion: reduce) { .sheet { transform: none; } }
.sheet-head { display: grid; grid-template-columns: 1fr auto; gap: 8px; border-bottom: 2px solid var(--ink); padding-bottom: 10px; margin-bottom: 12px; }
.sheet-head strong { font-family: var(--display); font-size: 1.35rem; text-transform: uppercase; line-height: 1.05; }
.ref { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); text-align: right; line-height: 1.5; }
.sheet dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 12px; margin: 0 0 12px; }
.sheet dt { color: var(--muted); }
.sheet dd { margin: 0; }
.matrix { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 2px; font-family: var(--mono); font-size: 0.72rem; text-align: center; margin-top: 6px; }
.matrix div { padding: 4px 0; border-radius: 1px; }
.matrix .ax { color: var(--muted); }
.lo { background: color-mix(in srgb, var(--sign) 22%, var(--sheet)); }
.md { background: color-mix(in srgb, var(--hivis) 45%, var(--sheet)); }
.hi { background: color-mix(in srgb, var(--warn) 30%, var(--sheet)); }
.sheet-foot { margin-top: 10px; font-family: var(--mono); font-size: 0.72rem; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }

/* Main column */
.page { display: grid; grid-template-columns: minmax(0, var(--col)) minmax(0, 1fr); gap: 56px; padding-block: 8px 64px; }
@media (max-width: 960px) { .page { grid-template-columns: minmax(0, 1fr); gap: 24px; } }
.prose { min-width: 0; }
.prose p, .prose li { max-width: var(--col); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: 6px; }
.prose table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
.table-scroll { overflow-x: auto; margin: 16px 0; border: 1px solid var(--rule); background: var(--sheet); }
.prose th, .prose td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.prose th { font-family: var(--display); font-size: 1.02rem; letter-spacing: 0.02em; text-transform: uppercase; background: var(--tint); }
.note { border-left: 4px solid var(--hivis); background: var(--sheet); padding: 12px 16px; margin: 20px 0; }
.note.law { border-left-color: var(--ink); }
.note p { margin: 0; }
.note p + p { margin-top: 8px; }

/* Sticky aside */
.aside { min-width: 0; }
.aside-card { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 16px); background: var(--sheet); border: 1px solid var(--rule); padding: 20px; }
.aside-card h2 { font-size: 1.6rem; margin: 0 0 8px; }
.price { font-family: var(--display); font-size: 2.6rem; font-weight: 700; line-height: 1; margin: 6px 0; font-variant-numeric: tabular-nums; }
.price small { font-size: 1rem; color: var(--muted); font-weight: 500; }
.aside-card ul { padding-left: 1.1em; margin: 10px 0 16px; font-size: 0.95rem; }
.aside-links { margin-top: 20px; font-size: 0.95rem; }
.aside-links h3 { font-size: 1.15rem; margin: 0 0 6px; text-transform: uppercase; }
.aside-links ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }

/* Free template form-sheet */
.template { background: var(--sheet); border: 1px solid var(--ink); margin: 24px 0; }
.template-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; background: var(--ink); color: var(--paper); padding: 10px 14px; }
.template-head h3 { margin: 0; font-size: 1.3rem; text-transform: uppercase; color: inherit; }
.template-head .ref { color: inherit; opacity: 0.75; text-align: left; }
.template-body { padding: 14px; }
.template table { font-size: 0.92rem; }
.template td.blank { height: 2.2em; min-width: 8em; }
.template .lines { border-bottom: 1px dotted var(--muted); height: 1.9em; }
.template-foot { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; border-top: 1px solid var(--rule); padding: 10px 14px; font-size: 0.88rem; color: var(--muted); }

/* FAQ */
.faq details { border-top: 1px solid var(--rule); padding: 12px 0; }
.faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; font-weight: 600; font-size: 1.08rem; }
.faq details p { margin: 8px 0 0; }

/* Home: document index */
.band { background: var(--sheet); border-block: 1px solid var(--rule); }
.band .wrap { padding-block: 40px 48px; }
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 0; border-top: 2px solid var(--ink); margin-top: 18px; }
.doc-grid a { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 12px; padding: 14px 10px 14px 0; border-bottom: 1px solid var(--rule); text-decoration: none; align-content: start; }
.doc-grid a:hover strong { text-decoration: underline; text-decoration-color: var(--hivis); }
.doc-grid .code { grid-row: span 2; font-family: var(--mono); font-size: 0.75rem; color: var(--muted); padding-top: 4px; width: 4.2em; }
.doc-grid strong { font-family: var(--display); font-size: 1.25rem; text-transform: uppercase; line-height: 1.1; }
.doc-grid span:last-child { font-size: 0.92rem; color: var(--muted); }

.steps { list-style: none; counter-reset: s; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 24px; }
.steps li { counter-increment: s; border-top: 2px solid var(--ink); padding-top: 12px; }
.steps li::before { content: "Step " counter(s); font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); display: block; margin-bottom: 4px; }
.steps strong { font-family: var(--display); font-size: 1.35rem; text-transform: uppercase; display: block; line-height: 1.1; margin-bottom: 4px; }

/* Pricing table */
.price-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 16px; margin: 20px 0; }
.price-item { background: var(--sheet); border: 1px solid var(--rule); padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.price-item.pick { border: 2px solid var(--ink); }
.price-item h3 { margin: 0; font-size: 1.45rem; text-transform: uppercase; }
.price-item p { margin: 0; font-size: 0.95rem; }
.price-item .price { font-size: 2.4rem; margin: 4px 0; }
.price-item .btn { margin-top: auto; align-self: flex-start; }

/* Order form */
form.order { background: var(--sheet); border: 1px solid var(--rule); padding: 20px; display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label, fieldset legend { font-weight: 600; }
.field .hint { font-size: 0.88rem; color: var(--muted); }
input[type="text"], input[type="email"], input[type="tel"], input[type="date"], input[type="number"], select, textarea {
  font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--muted); border-radius: 2px; padding: 9px 10px; width: 100%;
}
textarea { min-height: 120px; resize: vertical; }
fieldset { border: 1px solid var(--rule); padding: 12px 14px; margin: 0; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 6px 16px; }
.checks label { font-weight: 400; display: flex; gap: 8px; align-items: flex-start; }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 16px; }
.form-msg { border-left: 4px solid var(--sign); padding: 10px 14px; background: var(--tint); }
.hp { position: absolute; left: -9999px; }

/* Footer */
.site-foot { background: var(--head-bg); color: var(--on-head); font-size: 0.93rem; }
.site-foot .wrap { padding-block: 36px 40px; display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.site-foot h2 { font-size: 1.2rem; margin: 0 0 8px; text-transform: uppercase; color: var(--hivis); }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.site-foot a { text-decoration-color: transparent; }
.site-foot a:hover { text-decoration-color: var(--hivis); }
.site-foot .small { grid-column: 1 / -1; opacity: 0.75; font-size: 0.85rem; border-top: 1px solid rgba(255,255,255,0.15); padding-top: 16px; }

@media print {
  .site-head, .hazard, .site-foot, .aside, .crumbs, .btn, .faq, .no-print { display: none !important; }
  body { background: #fff; color: #000; }
  .template { border-color: #000; page-break-inside: avoid; }
  .template-head { background: #fff; color: #000; border-bottom: 2px solid #000; }
  .print-target-only .prose > *:not(.template) { display: none; }
}

/* ---- v2 additions (SEO audit fixes) ---- */
h1, h2, h3 { overflow-wrap: break-word; hyphens: auto; }
.site-head .wrap { display: grid; grid-template-columns: 1fr auto; }
.head-order { justify-self: end; }
.site-head .nav { grid-column: 1 / -1; margin-left: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; white-space: nowrap; }
.site-head .nav::-webkit-scrollbar { display: none; }
@media (min-width: 1000px) {
  .site-head .wrap { grid-template-columns: auto 1fr auto; }
  .brand { grid-column: 1; grid-row: 1; }
  .site-head .nav { grid-column: 2; grid-row: 1; justify-self: end; }
  .head-order { grid-column: 3; grid-row: 1; }
}
.hero.doc { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); padding-block: 24px 16px; align-items: center; }
@media (max-width: 860px) { .hero.doc { grid-template-columns: minmax(0, 1fr); } }
.hero-fig { margin: 0; }
@media (max-width: 860px) { .hero-fig { max-width: 520px; } }
.hero-fig img { display: block; width: 100%; height: auto; border: 1px solid var(--rule); box-shadow: 0 18px 40px -26px rgba(0,0,0,0.45); transform: rotate(0.6deg); background: #fff; }
@media (prefers-reduced-motion: reduce) { .hero-fig img { transform: none; } }
.byline { font-size: 0.9rem; color: var(--muted); margin: 16px 0 0; }
.sources { margin-top: 40px; border-top: 2px solid var(--ink); padding-top: 4px; font-size: 0.95rem; }
.sources h2 { font-size: 1.5rem; margin: 12px 0 6px; }
.sources ul { padding-left: 1.2em; }
.downloads { display: flex; flex-wrap: wrap; gap: 10px; padding: 0 14px 14px; }
.group-h { font-size: 1.3rem; text-transform: uppercase; margin: 32px 0 0; letter-spacing: 0.03em; }
.doc-grid.compact { margin-bottom: 8px; }
.tool { background: var(--sheet); border: 2px solid var(--ink); margin: 8px 0 28px; }
.tool-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: center; background: var(--hivis); color: var(--hivis-ink); padding: 10px 14px; }
.tool-head h3 { margin: 0; font-size: 1.35rem; text-transform: uppercase; }
.tool-head .ref { color: inherit; text-align: left; }
.tool-body { padding: 16px; display: grid; gap: 14px; }
.tool-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 10px; padding-bottom: 10px; border-bottom: 1px dotted var(--rule); }
.tool label { display: grid; gap: 4px; font-weight: 600; font-size: 0.92rem; }
.tool-result { font-family: var(--display); font-size: 1.6rem; line-height: 1.15; padding: 12px 14px; border-left: 6px solid var(--sign); background: var(--tint); }
.tool-result.warn { border-left-color: var(--hivis); }
.tool-result.bad { border-left-color: var(--warn); }
.tool-result small { display: block; font-family: var(--body); font-size: 0.95rem; margin-top: 4px; }
.tool .hint { font-size: 0.88rem; color: var(--muted); margin: 0; }
.rm-grid td, .rm-grid th { text-align: center; font-variant-numeric: tabular-nums; }
.rm-grid td.on { outline: 3px solid var(--ink); outline-offset: -3px; font-weight: 700; }
.rm-grid td.lo { background: color-mix(in srgb, var(--sign) 22%, var(--sheet)); }
.rm-grid td.md { background: color-mix(in srgb, var(--hivis) 40%, var(--sheet)); }
.rm-grid td.hi { background: color-mix(in srgb, var(--warn) 25%, var(--sheet)); }
.rm-grid td.vh { background: color-mix(in srgb, var(--warn) 50%, var(--sheet)); }

/* asbestos section */
.aside-card .small, .small { font-size: 0.9rem; color: var(--muted); }
.cta-note { border-left-color: var(--hivis); }
.quote { margin: 32px 0; padding-top: 4px; }
.quote select, .tool select { font: inherit; padding: 10px; border: 1px solid var(--rule); background: var(--sheet); color: inherit; border-radius: 2px; width: 100%; }
.infographic { margin: 8px 0 12px; }
.infographic img { width: 100%; height: auto; border: 1px solid var(--rule); display: block; }
.infographic figcaption { font-size: 0.9rem; color: var(--muted); margin-top: 6px; }
details.embed, .embed-code { margin: 8px 0 24px; }
details.embed summary { cursor: pointer; font-weight: 600; }
details.embed textarea, .embed-code { width: 100%; font-family: var(--mono); font-size: 0.8rem; padding: 10px; border: 1px solid var(--rule); background: var(--tint); color: inherit; box-sizing: border-box; }
.asb-mats { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; }
.asb-mats legend { font-weight: 600; font-size: 0.92rem; margin-bottom: 6px; }
.tool .asb-mats label { display: flex; gap: 8px; font-weight: 400; align-items: flex-start; }
.asb-next { margin: 0; }
#asb-detail ul { margin: 8px 0 0; }
.embed-body { margin: 0; padding: 12px; background: var(--paper, #f5f6f3); }
.embed-body .tool { margin: 0 0 10px; }
.embed-credit { font-size: 0.85rem; margin: 0; }
