:root {
  --bg: #f6fffc;
  --surface: #ffffff;
  --surface-2: #e9fffa;
  --ink: #07343b;
  --muted: #42686a;
  --line: #b7ded8;
  --brand: #0a8f86;
  --brand-strong: #08766f;
  --brand-soft: #c9fff4;
  --danger: #b42318;
  --warn: #8a5a00;
  --ok: #176a3a;
  --focus: #005fcc;
  --shadow: 0 18px 46px rgba(7, 52, 59, 0.12);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #06191d;
    --surface: #0c252a;
    --surface-2: #10343a;
    --ink: #eefdfa;
    --muted: #b7d6d2;
    --line: #28565c;
    --brand: #7debd7;
    --brand-strong: #94fff0;
    --brand-soft: #143f45;
    --danger: #ff9b90;
    --warn: #ffd077;
    --ok: #8dedb2;
    --focus: #8dc8ff;
    --shadow: 0 18px 46px rgba(0, 0, 0, 0.35);
  }
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light dark;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, var(--surface-2) 0, var(--bg) 360px),
    var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.55;
}

body.no-scroll {
  overflow: hidden;
}

a {
  color: var(--brand-strong);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

img,
svg {
  max-width: 100%;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -5rem;
  z-index: 20;
  background: var(--ink);
  color: var(--bg);
  padding: 0.7rem 0.9rem;
}

.skip-link:focus {
  top: 1rem;
}

.site-header,
.site-footer,
main {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.brand img {
  width: 42px;
  height: 42px;
}

.site-header nav,
.site-footer nav,
.actions,
.sibling-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.site-header nav a {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  align-items: end;
  padding: clamp(2rem, 8vw, 5.5rem) 0 1.25rem;
}

.hero-mark {
  width: min(100%, 320px);
  justify-self: start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 1rem;
}

.eyebrow {
  margin: 0 0 0.5rem;
  color: var(--brand-strong);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.08;
  letter-spacing: 0;
}

h1 {
  max-width: 820px;
  font-size: clamp(2.55rem, 10vw, 6rem);
}

h2 {
  font-size: clamp(1.7rem, 5vw, 3rem);
}

h3 {
  font-size: 1.18rem;
}

.lede,
.summary,
.article-lede {
  max-width: 760px;
  color: var(--muted);
  font-size: clamp(1.08rem, 2.4vw, 1.35rem);
}

.page-section,
.tool-shell,
.report-panel,
.fleet-form,
.article,
.not-found {
  margin: 1.5rem 0;
  padding: clamp(1rem, 4vw, 1.5rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.section-head {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.tool-grid {
  display: grid;
  gap: 1rem;
}

.inspection-meta {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: 1fr;
  margin-bottom: 1rem;
}

label {
  display: grid;
  gap: 0.35rem;
  font-weight: 700;
}

label span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 400;
}

input,
textarea,
button {
  font: inherit;
}

input,
textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  padding: 0.72rem 0.8rem;
}

textarea {
  resize: vertical;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  margin: 1rem 0;
}

.tab-button,
.button,
.answer-option {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
  padding: 0.75rem 0.9rem;
}

.tab-button[aria-selected="true"],
.button.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #042629;
}

.button.secondary {
  background: var(--brand-soft);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.button.danger {
  background: transparent;
  border-color: var(--danger);
  color: var(--danger);
}

.button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.progress-wrap {
  display: grid;
  gap: 0.45rem;
  margin: 1rem 0;
}

.progress-bar {
  height: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
}

.progress-bar span {
  display: block;
  width: 0%;
  height: 100%;
  background: var(--brand);
}

.checklist {
  display: grid;
  gap: 0.85rem;
}

.check-item {
  display: grid;
  gap: 0.8rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
}

.item-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  font-weight: 800;
}

.critical-pill {
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgba(180, 35, 24, 0.12);
  color: var(--danger);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0.2rem 0.5rem;
}

.answers {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

.answer-option {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-align: center;
}

.answer-option input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.answer-option:has(input:checked) {
  border-color: var(--brand);
  background: var(--brand-soft);
  box-shadow: inset 0 0 0 2px var(--brand);
}

.note-field[hidden] {
  display: none;
}

.score-card {
  display: grid;
  gap: 0.6rem;
  padding: 1rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.score-card strong {
  font-size: clamp(2rem, 10vw, 4.2rem);
  line-height: 1;
}

.status-ready {
  color: var(--ok);
}

.status-touch {
  color: var(--warn);
}

.status-pull {
  color: var(--danger);
}

.counts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.counts div,
.report-list li,
.faq details {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.75rem;
  background: var(--bg);
}

.counts span {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
}

.counts strong {
  font-size: 1.5rem;
}

#criticalText {
  font-size: 1rem;
  line-height: 1.2;
}

.report-list {
  display: grid;
  gap: 0.55rem;
  padding: 0;
  list-style: none;
}

.copy-status,
.form-status,
.form-note,
.muted {
  color: var(--muted);
}

.form-status.error {
  color: var(--danger);
}

.visually-hidden,
.honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.article {
  max-width: 850px;
}

.article p,
.article li {
  font-size: 1.06rem;
}

.article h2,
.article h3 {
  margin-top: 1.6rem;
}

.article ul {
  padding-left: 1.2rem;
}

.faq {
  display: grid;
  gap: 0.6rem;
}

.faq summary {
  cursor: pointer;
  font-weight: 800;
}

.site-footer {
  padding: 2rem 0 3rem;
  color: var(--muted);
}

.site-footer p {
  margin-top: 0;
}

@media (min-width: 720px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) 320px;
  }

  .inspection-meta {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .answers {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .tool-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
    align-items: start;
  }

  .report-panel {
    position: sticky;
    top: 1rem;
  }

  .counts {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media print {
  body {
    background: #ffffff;
    color: #000000;
  }

  .skip-link,
  .site-header,
  .hero,
  .tool-shell,
  .fleet-form,
  .page-section,
  .site-footer,
  .actions,
  .copy-status {
    display: none !important;
  }

  main {
    width: 100%;
  }

  .report-panel {
    display: block !important;
    margin: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
  }

  a {
    color: #000000;
  }
}
