html.impact-access-blocked {
  background: #0c2441;
}
html.impact-access-blocked body {
  overflow: hidden;
  background: #0c2441;
}
html.impact-access-blocked .skip-link,
html.impact-access-blocked .site-header,
html.impact-access-blocked .header-agency,
html.impact-access-blocked .backup-banner,
html.impact-access-blocked .modal-overlay,
html.impact-access-blocked #restore-file,
html.impact-access-blocked #main,
html.impact-access-blocked .site-footer {
  display: none !important;
}
html.impact-access-granted #access-splash {
  display: none !important;
}
.access-splash {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 18px;
  background: #0c2441;
  color: #fffdf8;
}
.access-card {
  width: min(640px, 100%);
  text-align: center;
  padding: 36px 28px;
  background: #05080f;
  border: 1px solid rgba(46, 181, 224, 0.28);
  border-radius: 20px;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.28);
}
.access-logo {
  display: block;
  width: min(520px, 100%);
  height: auto;
  margin: 0 auto 18px;
}
.access-card h1 {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  color: #fffdf8;
}
.access-card p {
  margin: 0 0 22px;
  color: #d9e0e8;
  line-height: 1.55;
}
.access-card .btn {
  width: 100%;
}

:root {
  --navy: #0c2441;
  --navy-2: #163a5f;
  --navy-3: #1e4d73;
  --cyan: #2eb5e0;
  --cyan-2: #7ad4f0;
  --teal: #0f766e;
  --teal-2: #14b8a6;
  --cream: #f4f1ea;
  --paper: #fffdf8;
  --ink: #15202b;
  --muted: #4d5c6b;
  --line: #d9e0e8;
  --ok: #067647;
  --ok-bg: #ecfdf3;
  --warn: #b54708;
  --warn-bg: #fff6ed;
  --gold: #b8860b;
  --gold-bg: #fff8e7;
  --crisis: #b42318;
  --shadow: 0 10px 30px rgba(12, 35, 64, 0.08);
  --shadow-lg: 0 22px 50px rgba(12, 35, 64, 0.14);
  --radius: 18px;
  --focus: 3px solid #2eb5e0;
  --header-h: 136px;
  --font: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --serif: "Fraunces", Georgia, serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(46, 181, 224, 0.16), transparent 50%),
    radial-gradient(900px 420px at 100% 0%, rgba(184, 134, 11, 0.12), transparent 46%),
    var(--cream);
  color: var(--ink);
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.5;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:not([tabindex="-1"]):focus-visible {
  outline: var(--focus);
  outline-offset: 3px;
}

main:focus,
main:focus-visible { outline: none; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: 0;
  z-index: 10000;
  background: #fff;
  color: var(--navy);
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 700;
  transform: translateY(-120%);
  text-decoration: none;
  box-shadow: var(--shadow-lg);
}
.skip-link:focus,
.skip-link:focus-visible {
  transform: none;
  position: fixed;
  top: 8px;
  left: 8px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  min-height: var(--header-h);
  padding: 8px 22px;
  background: var(--navy);
  color: #fff;
  box-shadow: 0 8px 24px rgba(12, 35, 64, 0.25);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  min-width: 0;
  overflow: hidden;
}
.brand-logo {
  display: block;
  height: 120px;
  width: auto;
  max-width: min(520px, 72vw);
  object-fit: contain;
  object-position: left center;
}
.nav-toggle {
  display: none;
  appearance: none;
  border: 1px solid rgba(255,255,255,0.3);
  background: transparent;
  color: #fff;
  border-radius: 10px;
  padding: 8px 12px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  gap: 8px;
  align-items: center;
}
.nav-toggle-bars {
  display: inline-block;
  width: 16px;
  height: 2px;
  background: currentColor;
  box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor;
}
.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  flex: 1 1 auto;
  justify-content: flex-end;
}
.main-nav a {
  color: #d7e6f2;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 650;
  padding: 8px 10px;
  border-radius: 10px;
}
.main-nav a:hover,
.main-nav a[aria-current="page"] {
  background: rgba(255,255,255,0.1);
  color: #fff;
}
.header-agency {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 180px;
}
.header-agency[hidden] { display: none !important; }
.header-agency-name {
  margin: 0;
  min-width: 0;
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#btn-agency-profile {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}
#btn-agency-profile[aria-current="page"] {
  background: rgba(255,255,255,0.14);
}
.btn-help {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}
.btn-help[aria-current="page"] {
  background: rgba(255,255,255,0.14);
}
.help-doc section {
  scroll-margin-top: calc(var(--header-h) + 20px);
}
.help-doc .cta-row { margin-top: 12px; }
.file-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 0 0 auto;
}
.btn-header {
  appearance: none;
  min-height: 36px;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.28);
  background: rgba(255,255,255,0.06);
  color: #fff;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}
.btn-header:hover { background: rgba(255,255,255,0.14); }
.btn-header-danger {
  border-color: rgba(247, 180, 176, 0.55);
  color: #fecaca;
}

.backup-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 10px 22px;
  background: var(--warn-bg);
  border-bottom: 1px solid #fdc7a0;
  color: #7a3b04;
  font-size: 0.95rem;
  font-weight: 650;
}
.backup-banner[hidden] { display: none !important; }
.backup-banner p { margin: 0; flex: 1 1 280px; }
.backup-banner .cta-row { margin: 0; }

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(12, 36, 65, 0.55);
  display: grid;
  place-items: center;
  padding: 20px;
}
.modal-overlay[hidden] { display: none !important; }
.modal {
  width: min(560px, 100%);
  background: var(--paper);
  border-radius: 20px;
  padding: 24px 26px;
  box-shadow: var(--shadow-lg);
  max-height: calc(100vh - 40px);
  overflow: auto;
}
.btn-danger {
  background: var(--crisis);
  color: #fff;
}
.btn-danger:hover { background: #8f1d16; }

main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 20px 80px;
}

.eyebrow {
  display: inline-block;
  background: var(--gold-bg);
  color: #7a5a00;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.18;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(2rem, 4vw, 3.15rem); }
h2 { font-size: clamp(1.45rem, 2.6vw, 2rem); }
h3 { font-size: 1.22rem; }
p { margin: 0 0 12px; }
.lede {
  font-size: 1.12rem;
  color: var(--muted);
  max-width: 46rem;
  margin-bottom: 22px;
}
.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 18px 0 8px;
}
.pair-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px;
}
.pair-card strong { display: block; font-family: var(--serif); font-size: 1.05rem; margin-bottom: 4px; }
.pair-card span { color: var(--muted); font-size: 0.95rem; }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 18px;
  border-radius: 14px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  color: inherit;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-2); }
.btn-accent { background: var(--teal); color: #fff; }
.btn-accent:hover { background: #0b5f59; }
.btn-gold { background: #8a6708; color: #fff; }
.btn-gold:hover { background: #6f5306; }
.btn-ghost {
  background: #fff;
  color: var(--navy);
  border-color: var(--line);
}
.btn-sm { min-height: 40px; padding: 7px 12px; font-size: 0.92rem; border-radius: 11px; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; transform: none; }

.hero {
  display: grid;
  grid-template-columns: 1.25fr 0.9fr;
  gap: 28px;
  align-items: stretch;
  margin-bottom: 28px;
}
.hero-copy,
.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
}
.hero-copy { padding: 36px 36px 32px; }
.hero-panel {
  padding: 22px;
  background:
    linear-gradient(180deg, rgba(12,35,64,0.92), rgba(15,61,92,0.94)),
    var(--navy);
  color: #fff;
  border: 0;
  border-radius: 28px;
  box-shadow: var(--shadow-lg);
}
.hero-panel h2 { color: #fff; font-size: 1.35rem; }
.hero-panel p { color: #d4e7f4; }
.pipeline {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}
.pipeline-step {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.08);
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.92rem;
}
.pipeline-step b {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--cyan);
  color: var(--navy);
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
  margin: 28px 0 16px;
}

.tool-grid,
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.tool-card, .card {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
}
.tool-card:hover, .card.clickable:hover {
  border-color: var(--cyan);
  box-shadow: var(--shadow-lg);
}
.tool-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  background: #e8f7fb;
  color: var(--navy);
  font-weight: 800;
  font-size: 0.85rem;
}
.tool-card p, .muted { color: var(--muted); }
.go { color: var(--teal); font-weight: 800; margin-top: auto; }

.sample-sop {
  margin-top: 12px;
  padding: 12px 14px;
  background: #f7fafc;
  border: 1px dashed var(--line);
  border-radius: 12px;
}
.sample-sop-badge {
  display: inline-block;
  margin: 0 0 8px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--gold-bg);
  color: #7a5a00;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.modal-sop {
  width: min(820px, 100%);
  max-height: calc(100vh - 32px);
  padding: 18px 20px 28px;
}
.sop-modal-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  position: sticky;
  top: 0;
  background: var(--paper);
  z-index: 1;
  padding-bottom: 8px;
}
.sop-paper h2 { margin-top: 4px; }
.sop-paper h3 { margin-top: 22px; }
.sop-paper h4 { font-family: var(--font); font-size: 1.02rem; margin: 14px 0 6px; }
.sop-paper ol { margin: 0 0 12px; padding-left: 1.25rem; }
.sop-dl { margin: 0 0 12px; }
.sop-dl dt { font-weight: 800; color: var(--navy); margin-top: 8px; }
.sop-dl dd { margin: 2px 0 0; color: var(--muted); }

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 20px 0;
}
.stat {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow);
}
.stat b {
  display: block;
  font-family: var(--serif);
  font-size: 1.6rem;
  color: var(--navy);
}
.stat span { color: var(--muted); font-size: 0.92rem; }

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 14px;
}
.field label {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.field input,
.field select,
.field textarea {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 12px;
  font: inherit;
  background: #fff;
  color: var(--ink);
  width: 100%;
}
.field textarea { min-height: 110px; resize: vertical; }
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}

.choice-list { display: grid; gap: 10px; }
.choice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  cursor: pointer;
  text-align: left;
  font: inherit;
  width: 100%;
}
.choice:hover, .choice[aria-pressed="true"] {
  border-color: var(--cyan);
  box-shadow: var(--shadow);
}
.choice[aria-pressed="true"] { background: #eef9fd; }
.choice b { display: block; }
.choice span { color: var(--muted); font-size: 0.95rem; }

.progress {
  height: 8px;
  background: #e2e8f0;
  border-radius: 99px;
  overflow: hidden;
  margin: 8px 0 22px;
}
.progress > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--navy), var(--cyan));
  border-radius: 99px;
}

.score-hero {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 28px;
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 28px;
  box-shadow: var(--shadow);
  margin-bottom: 22px;
}
.score-ring {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--ring, var(--gold)) 0 var(--pct, 0%), #c5d0dc var(--pct, 0%) 100%);
}
.score-ring inner, .score-inner {
  width: 148px;
  height: 148px;
  border-radius: 50%;
  background: var(--paper);
  display: grid;
  place-items: center;
  text-align: center;
}
.score-inner b {
  font-family: var(--serif);
  font-size: 2.6rem;
  line-height: 1;
}
.score-inner span { font-size: 0.82rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }

.result-list { display: grid; gap: 8px; margin: 12px 0 20px; }
.result-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}
.result-item.ok { border-color: #abefc6; background: var(--ok-bg); }
.result-item.warn { border-color: #fdc7a0; background: var(--warn-bg); }
.mark {
  font-weight: 800;
  flex-shrink: 0;
}
.mark.ok { color: var(--ok); }
.mark.warn { color: var(--warn); }

.next-step {
  background: linear-gradient(180deg, #fffdf4, #fff8e7);
  border: 1px solid #ead8a0;
  border-radius: 22px;
  padding: 22px 24px;
  margin: 18px 0;
  box-shadow: var(--shadow);
}
.next-step .eyebrow { margin-bottom: 8px; }

.stepper {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.step-pill {
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 999px;
  background: #e8eef5;
  color: var(--muted);
}
.step-pill.done { background: var(--ok-bg); color: var(--ok); }
.step-pill.current { background: var(--navy); color: #fff; }

.packet-layout {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 22px;
  align-items: start;
}
.toc {
  position: sticky;
  top: 96px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  box-shadow: var(--shadow);
}
.toc a {
  display: block;
  color: var(--navy);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 650;
  padding: 6px 8px;
  border-radius: 8px;
}
.toc a:hover { background: #eef9fd; }
.doc {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 36px 40px;
  box-shadow: var(--shadow);
}
.doc-kicker {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
}
.doc h2 { margin-top: 28px; }
.doc h3 { margin-top: 18px; }
.doc ul, .doc ol { margin: 0 0 14px; padding-left: 1.2rem; }
.doc li { margin: 0 0 6px; }
.doc table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 18px;
  font-size: 0.95rem;
}
.doc th, .doc td {
  border: 1px solid var(--line);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}
.doc th { background: #f3f6fa; font-size: 0.8rem; letter-spacing: 0.04em; text-transform: uppercase; }
.letterhead {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 3px solid var(--navy);
  padding-bottom: 16px;
  margin-bottom: 22px;
}

.budget-edit input {
  min-height: 40px;
  width: 110px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px 8px;
  font: inherit;
}

.notice {
  background: #eef9fd;
  border: 1px solid #b7e4f4;
  border-radius: 14px;
  padding: 14px 16px;
  color: var(--navy-2);
  margin: 12px 0 18px;
  font-size: 0.95rem;
}
.tiny { font-size: 0.88rem; color: var(--muted); }

.site-footer {
  background: var(--navy);
  color: #d7e6f2;
  padding: 32px 20px;
}
.footer-inner { max-width: 1180px; margin: 0 auto; }
.footer-logo {
  display: block;
  height: 56px;
  width: auto;
  max-width: min(380px, 100%);
  margin: 0 0 16px;
  object-fit: contain;
  object-position: left center;
}
.site-footer a { color: var(--cyan-2); }
.site-footer .tiny { color: #9fb4c8; }

.empty {
  background: var(--paper);
  border: 1px dashed var(--line);
  border-radius: 18px;
  padding: 28px;
  text-align: center;
}

.check-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
  margin-bottom: 16px;
}
.check {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 0.95rem;
}
.check input { margin-top: 4px; }

.prose-narrative p { margin: 0 0 12px; }
.prose-narrative h2 { font-size: 1.2rem; margin-top: 26px; }
.narrative {
  white-space: pre-wrap;
  font-size: 1rem;
  line-height: 1.55;
}
.result-questions {
  margin: 0;
  padding-left: 1.3rem;
}
.result-questions li { margin: 0 0 12px; }

@page {
  size: letter;
  margin: 0.75in;
}

@media (max-width: 900px) {
  .hero, .score-hero, .packet-layout, .form-grid, .tool-grid, .card-grid, .stat-row, .pair, .check-grid {
    grid-template-columns: 1fr;
  }
  .hero-copy { padding: 24px; }
  .doc { padding: 22px; }
  .toc { position: static; }
  .nav-toggle { display: inline-flex; }
  .main-nav,
  .file-actions {
    display: none;
    width: 100%;
    flex-direction: column;
  }
  .header-agency {
    flex: 1 1 auto;
    order: 2;
  }
  .header-agency-name { max-width: 42vw; }
  .file-actions { gap: 8px; }
  .site-header.is-open .main-nav,
  .site-header.is-open .file-actions { display: flex; }
}

@media print {
  body { background: #fff; font-size: 12pt; }
  .site-header, .site-footer, .no-print, .skip-link, .nav-toggle, .file-actions, .backup-banner, .header-agency, .btn-help { display: none !important; }
  main { max-width: none; padding: 0; }
  .packet-layout { display: block; }
  .toc { display: none; }
  .doc, .hero-copy, .panel, .card, .score-hero {
    box-shadow: none;
    border: 0;
    border-radius: 0;
    padding: 0;
  }
  .score-hero { break-inside: avoid; }
  .doc h2, h1, h2 { break-after: avoid; page-break-after: avoid; }
  .doc section, .result-item, .result-questions li { break-inside: avoid; page-break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
}
