:root {
  --navy-950: #0a1420;
  --navy-900: #111d2e;
  --navy-800: #1a2e4a;
  --blue-600: #145da0;
  --blue-400: #56aeff;
  --blue-200: #a8d8ff;
  --blue-50: #eef6ff;
  --slate-500: #5a6a7e;
  --line: #e3e9f0;
  --ink: #1a2233;
  --red: #b42318;
  --red-50: #fef3f2;
  --amber: #93590b;
  --amber-50: #fff8eb;
  --green: #136c3a;
  --green-50: #edfbf2;
  --grad: linear-gradient(100deg, #56aeff 0%, #a8d8ff 100%);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink); background: #fff; -webkit-font-smoothing: antialiased;
  font-size: 17px; line-height: 1.65;
}
a { color: var(--blue-600); }
img { max-width: 100%; }

/* nav */
.nav { background: var(--navy-950); }
.nav-in {
  max-width: 1040px; margin: 0 auto; padding: 0 20px; min-height: 64px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.logo { color: #fff; text-decoration: none; font-weight: 800; font-size: 19px; letter-spacing: .02em; }
.logo small { font-weight: 600; font-size: 13px; color: var(--blue-200); margin-left: 8px; letter-spacing: 0; }
.nav-links { display: flex; gap: 4px; list-style: none; flex-wrap: wrap; }
.nav-links a {
  color: rgba(255,255,255,.75); text-decoration: none; font-size: 14.5px; font-weight: 600;
  padding: 8px 12px; border-radius: 9px;
}
.nav-links a:hover, .nav-links a.active { color: #fff; background: rgba(255,255,255,.1); }

/* hero */
.hero {
  background: var(--navy-950); color: #fff; padding: 56px 20px 64px; position: relative; overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(800px 420px at 50% -20%, rgba(20,93,160,.55), transparent 65%);
}
.hero > * { position: relative; }
.hero-in { max-width: 820px; margin: 0 auto; }
.hero h1 { font-size: clamp(32px, 5.5vw, 52px); font-weight: 900; letter-spacing: -.03em; line-height: 1.08; }
.hero p { margin-top: 16px; font-size: 18.5px; color: rgba(255,255,255,.8); max-width: 640px; }
.kicker { font-size: 12.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--blue-400); margin-bottom: 12px; }

/* layout */
.wrap { max-width: 820px; margin: 0 auto; padding: 0 20px; }
.wide { max-width: 1040px; }
.section { padding: 56px 0; }
.section + .section { padding-top: 0; }
h2 { font-size: clamp(25px, 3.5vw, 32px); font-weight: 800; letter-spacing: -.02em; line-height: 1.2; margin-bottom: 14px; scroll-margin-top: 20px; }
h3 { font-size: 20px; font-weight: 750; margin: 28px 0 8px; line-height: 1.3; }
p + p { margin-top: 12px; }
ul.list, ol.list { margin: 12px 0 0 22px; }
ul.list li, ol.list li { margin-top: 6px; }
.muted { color: var(--slate-500); }
.small { font-size: 14.5px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 48px 0; }

/* cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin-top: 24px; }
.card {
  display: block; text-decoration: none; color: var(--ink); background: #fff;
  border: 1px solid var(--line); border-radius: 16px; padding: 24px;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
a.card:hover { border-color: var(--blue-400); box-shadow: 0 10px 30px rgba(20,93,160,.12); transform: translateY(-2px); }
.card .num {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: var(--blue-50); color: var(--blue-600); font-weight: 800; margin-bottom: 14px;
}
.card h3 { margin: 0 0 6px; font-size: 19px; }
.card p { color: var(--slate-500); font-size: 15.5px; }
.card .go { display: inline-block; margin-top: 12px; font-weight: 700; color: var(--blue-600); font-size: 15px; }

/* steps tracker */
.track { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-top: 22px; counter-reset: s; }
.track li {
  counter-increment: s; background: var(--blue-50); border-radius: 14px; padding: 16px 16px 18px;
  font-size: 15px; line-height: 1.5;
}
.track li::before { content: "Step " counter(s); display: block; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--blue-600); margin-bottom: 4px; }
.track li strong { display: block; font-size: 16px; margin-bottom: 4px; }

/* callouts */
.note { border-radius: 14px; padding: 18px 20px; margin-top: 20px; border: 1px solid var(--line); background: #f7f9fc; }
.note.blue { background: var(--blue-50); border-color: #cfe5ff; }
.note.red { background: var(--red-50); border-color: #fbd4cf; }
.note.amber { background: var(--amber-50); border-color: #f6dfb2; }
.note.green { background: var(--green-50); border-color: #bfe9cf; }
.note strong:first-child { display: block; margin-bottom: 4px; }

/* three-kinds grid */
.kinds { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 18px; }
.kind { border-radius: 14px; padding: 18px; border: 1px solid var(--line); }
.kind .tag { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 3px 9px; border-radius: 99px; margin-bottom: 10px; }
.kind.red { background: var(--red-50); border-color: #fbd4cf; } .kind.red .tag { background: var(--red); color: #fff; }
.kind.amber { background: var(--amber-50); border-color: #f6dfb2; } .kind.amber .tag { background: var(--amber); color: #fff; }
.kind.grey { background: #f7f9fc; } .kind.grey .tag { background: var(--slate-500); color: #fff; }
.kind h3 { margin: 0 0 6px; font-size: 18px; }
.kind p { font-size: 15.5px; }

/* tables */
.tbl-wrap { overflow-x: auto; margin-top: 16px; border: 1px solid var(--line); border-radius: 12px; }

/* Sideways-scroll hint, added around each .tbl-wrap by tables.js.
   The frame takes over the wrap's top margin so spacing is unchanged. */
.tbl-frame { margin-top: 16px; }
.tbl-frame .tbl-wrap { margin-top: 0; background: #fff; }
.tbl-hint {
  display: none; text-align: right; margin-bottom: 6px;
  font-size: 13px; font-weight: 650; color: var(--blue-600);
  transition: opacity .2s ease;
}
.tbl-frame.is-scrollable .tbl-hint { display: block; }
.tbl-frame.is-scrollable:not(.has-more) .tbl-hint { opacity: 0; }
.tbl-box { position: relative; }
.tbl-box::after {
  content: ""; position: absolute; top: 1px; right: 1px; bottom: 1px; width: 56px;
  border-radius: 0 11px 11px 0; pointer-events: none;
  background: linear-gradient(to right, rgba(255,255,255,0), #fff 90%);
  opacity: 0; transition: opacity .2s ease;
}
.tbl-frame.has-more .tbl-box::after { opacity: 1; }
table { border-collapse: collapse; width: 100%; font-size: 15.5px; min-width: 520px; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #f7f9fc; font-weight: 700; font-size: 14px; }
tr:last-child td { border-bottom: 0; }
/* Keep phone numbers on one line so they never split mid-number on phones. */
td a[href^="tel:"] { white-space: nowrap; }

/* track switch (assessment / clearance) */
.switch { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 26px; }
.switch a {
  display: block; text-decoration: none; color: #fff; border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.06); border-radius: 14px; padding: 16px 18px; font-weight: 700;
}
.switch a span { display: block; font-weight: 500; font-size: 14.5px; color: rgba(255,255,255,.7); margin-top: 2px; }
.switch a:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.4); }
@media (max-width: 560px) { .switch { grid-template-columns: 1fr; } }

/* side diagram */
.sides { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; margin-top: 16px; }
.sides svg { flex: 0 0 auto; }
.sides div { flex: 1 1 260px; }

/* glossary */
dl.gloss dt { font-weight: 750; margin-top: 16px; }
dl.gloss dd { margin-top: 2px; color: #2b3546; }

/* toc */
.toc { background: #f7f9fc; border: 1px solid var(--line); border-radius: 14px; padding: 18px 22px; margin-top: 8px; }
.toc strong { display: block; margin-bottom: 6px; }
.toc ol { margin-left: 20px; font-size: 15.5px; }
.toc li { margin-top: 3px; }

/* footer */
.footer { background: var(--navy-950); color: rgba(255,255,255,.7); padding: 36px 20px; font-size: 14.5px; margin-top: 40px; }
.footer .wrap { padding: 0; }
.footer a { color: var(--blue-200); }
.footer p + p { margin-top: 8px; }

/* contractor list */
table.contractors td:first-child { font-weight: 650; }
tr.placeholder td { color: #b42318; font-style: italic; }

/* suggestion form */
.formbox { background: var(--blue-50); border: 1px solid #cfe5ff; border-radius: 18px; padding: 28px; }
.formbox form { margin-top: 18px; }
.fgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.formbox label { display: block; font-size: 14.5px; font-weight: 650; }
.formbox label.full { margin-top: 14px; }
.formbox input, .formbox select, .formbox textarea {
  display: block; width: 100%; margin-top: 5px; font: inherit; font-weight: 400; font-size: 16px;
  padding: 10px 12px; border: 1px solid #c4d3e3; border-radius: 10px; background: #fff; color: var(--ink);
}
.formbox input:focus, .formbox select:focus, .formbox textarea:focus { outline: 2px solid var(--blue-400); border-color: var(--blue-400); }
.hp { position: absolute; left: -9999px; }
.btn-submit {
  margin-top: 16px; font: inherit; font-weight: 700; font-size: 16px; color: var(--navy-900);
  background: var(--grad); border: 0; border-radius: 12px; padding: 13px 28px; cursor: pointer;
  box-shadow: 0 4px 20px rgba(86,174,255,.35);
}
.btn-submit:hover { transform: translateY(-1px); }

/* ---------- Phone menu ----------
   On narrow screens the four links wrapped into a row of tabs under the logo.
   Collapse them behind a menu button instead (toggled by nav.js) and give the
   bar real vertical padding so the logo isn't pressed against the top edge. */
.nav-burger { display: none; }

@media (max-width: 760px) {
  .nav-in { padding: 12px 20px; min-height: 0; gap: 0; }
  .logo small { display: block; margin: 2px 0 0; }

  .nav-burger {
    display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px;
    width: 44px; height: 44px; margin-right: -10px;
    background: none; border: 0; border-radius: 10px; cursor: pointer;
  }
  .nav-burger:focus-visible { outline: 2px solid var(--blue-400); outline-offset: 2px; }
  .nav-burger span {
    display: block; width: 22px; height: 2px; border-radius: 2px; background: #fff;
    transition: transform .2s ease, opacity .2s ease;
  }
  .nav.open .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav.open .nav-burger span:nth-child(2) { opacity: 0; }
  .nav.open .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .nav-links {
    display: none; width: 100%; flex-direction: column; gap: 2px;
    margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.1);
  }
  .nav.open .nav-links { display: flex; }
  .nav-links a { display: block; padding: 12px 12px; font-size: 16px; }
}
