/* HeyRoof showcase. Static site, one stylesheet. */

@font-face {
  font-family: "Geist";
  src: url("../fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #2d3948;
  --ink-deep: #1f2834;
  --ink-soft: #46546a;
  --muted: #5f6a78;
  --faint: #8a93a0;
  --orange: #d78a36;
  --orange-deep: #b86f23;
  --orange-wash: #fbefe0;
  --paper: #f7f6f2;
  --paper-2: #efede6;
  --white: #ffffff;
  --line: #dedbd2;
  --line-strong: #c7c3b8;
  --green: #3f7d5c;
  --green-wash: #e7f1eb;
  --blue: #3c5f8c;
  --blue-wash: #e6edf6;
  --red: #a4432f;
  --red-wash: #f7e7e3;
  --focus: #2f6fd1;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgb(45 57 72 / 0.06), 0 12px 32px -16px rgb(45 57 72 / 0.22);
  --measure: 62ch;
  --wrap: 1160px;
  --gutter: clamp(20px, 4vw, 40px);
  --header-h: 68px;
  font-family: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "ss01", "cv11";
  color: var(--ink);
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  line-height: 1.5;
  font-size: 17px;
  background: var(--paper);
  color: var(--ink);
}

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

/* The hidden attribute always wins over a component's own display value
   (.form-card and .success are grids). The one intentional reveal is the print
   stylesheet's .tabpanel[hidden], which is more specific and also !important. */
[hidden] {
  display: none !important;
}

/* Anything scrolled or focused into view clears the sticky header. */
.section,
.tabs,
.tabpanel,
.form-card,
.form-summary,
.aside-card,
.field input,
.field select,
.field textarea,
.choices,
.consent {
  scroll-margin-top: calc(var(--header-h) + 16px);
}

a {
  color: inherit;
}

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

::selection {
  background: var(--orange-wash);
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  background: var(--ink);
  color: var(--white);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  z-index: 100;
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus {
  top: 12px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.wrap {
  width: min(100% - 2 * var(--gutter), var(--wrap));
  margin-inline: auto;
}

/* Type */

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.08;
  color: var(--ink);
}

h1 {
  font-size: clamp(2.5rem, 6.2vw, 4.6rem);
  letter-spacing: -0.035em;
  font-weight: 650;
}

h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.7rem);
  letter-spacing: -0.03em;
}

h3 {
  font-size: 1.25rem;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

h4 {
  font-size: 1rem;
  line-height: 1.3;
}

p {
  margin: 0;
}

p + p {
  margin-top: 0.9em;
}

.lede {
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: var(--measure);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange-deep);
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  background: var(--orange);
  border-radius: 2px;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.9rem;
}

.mono {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

/* Demo bar: one line above the header on every page */

.demo-bar {
  background: var(--ink);
  color: rgb(255 255 255 / 0.84);
  font-size: 0.84rem;
  line-height: 1.35;
}

.demo-bar .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  min-height: 34px;
  padding-block: 7px;
}

.demo-bar strong {
  color: #f0b26b;
  font-weight: 650;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgb(247 246 242 / 0.88);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  font-weight: 650;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.brand .mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--ink);
  display: grid;
  place-items: center;
  flex: none;
}

.brand .mark svg {
  width: 22px;
  height: 22px;
}

.brand em {
  font-style: normal;
  color: var(--orange);
}

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav a {
  text-decoration: none;
  font-weight: 500;
  font-size: 0.97rem;
  color: var(--ink-soft);
  padding: 8px 12px;
  border-radius: 999px;
}

.nav a:hover {
  color: var(--ink);
  background: var(--paper-2);
}

.nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
}

.nav .btn {
  margin-left: 8px;
}

.menu-btn {
  display: none;
  appearance: none;
  border: 1px solid var(--line-strong);
  background: var(--white);
  color: var(--ink);
  border-radius: 10px;
  width: 44px;
  height: 44px;
  place-items: center;
  cursor: pointer;
}

.menu-btn svg {
  width: 22px;
  height: 22px;
}

.menu-btn .close {
  display: none;
}

.menu-btn[aria-expanded="true"] .open {
  display: none;
}

.menu-btn[aria-expanded="true"] .close {
  display: block;
}

@media (max-width: 820px) {
  .menu-btn {
    display: grid;
  }

  .nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px var(--gutter) 16px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    display: none;
  }

  .nav[data-open="true"] {
    display: flex;
  }

  .nav a {
    padding: 14px 12px;
    font-size: 1.05rem;
    border-radius: var(--radius-sm);
  }

  .nav .btn {
    margin: 8px 0 0;
    justify-content: center;
  }
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  color: var(--ink);
  background: var(--white);
  border-color: var(--line-strong);
  transition: background-color 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.btn:hover {
  background: var(--paper-2);
}

.btn:active {
  transform: translateY(1px);
}

.btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.btn-primary {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--orange-deep);
  border-color: var(--orange-deep);
}

.btn-ink {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--white);
}

.btn-ink:hover {
  background: var(--ink-deep);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  padding-inline: 14px;
}

.btn-ghost:hover {
  background: var(--paper-2);
}

.btn-sm {
  padding: 9px 16px;
  font-size: 0.92rem;
}

.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.on-dark .btn {
  color: var(--white);
  background: rgb(255 255 255 / 0.06);
  border-color: rgb(255 255 255 / 0.22);
}

.on-dark .btn:hover {
  background: rgb(255 255 255 / 0.12);
}

.on-dark .btn-primary {
  background: var(--orange);
  border-color: var(--orange);
}

.on-dark .btn-primary:hover {
  background: var(--orange-deep);
  border-color: var(--orange-deep);
}

/* Sections */

.section {
  padding-block: clamp(64px, 9vw, 120px);
}

.section-tight {
  padding-block: clamp(44px, 6vw, 80px);
}

.section-head {
  display: grid;
  gap: 18px;
  max-width: 760px;
  margin-bottom: clamp(32px, 5vw, 56px);
}

.section-head h2 {
  max-width: 20ch;
}

.on-dark {
  background: var(--ink);
  color: rgb(255 255 255 / 0.86);
}

.on-dark h1,
.on-dark h2,
.on-dark h3,
.on-dark h4 {
  color: var(--white);
}

.on-dark .lede,
.on-dark .muted {
  color: rgb(255 255 255 / 0.72);
}

.on-dark .eyebrow {
  color: #f0b26b;
}

.on-dark .eyebrow::before {
  background: #f0b26b;
}

.hairline {
  border-top: 1px solid var(--line);
}

/* Hero */

.hero {
  position: relative;
  padding-block: clamp(56px, 8vw, 112px) clamp(56px, 8vw, 104px);
  overflow: hidden;
}

.hero .wrap {
  display: grid;
  gap: clamp(36px, 5vw, 72px);
  align-items: center;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
}

.hero-copy {
  display: grid;
  gap: 26px;
}

.hero-copy h1 {
  max-width: 11ch;
}

.hero-copy h1 em {
  font-style: normal;
  color: var(--orange);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.hero-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.95rem;
}

.hero-notes li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero-notes svg {
  width: 16px;
  height: 16px;
  color: var(--green);
}

@media (max-width: 920px) {
  .hero .wrap {
    grid-template-columns: 1fr;
  }

  .hero-copy h1 {
    max-width: 14ch;
  }
}

/* Dossier illustration */

.dossier {
  position: relative;
  border-radius: 22px;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 14px;
}

.dossier-frame {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #d8d2c0;
}

.dossier-frame svg {
  width: 100%;
  height: auto;
}

.dossier-label {
  position: absolute;
  left: 12px;
  top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgb(31 40 52 / 0.82);
  color: var(--white);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
}

.dossier-label::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--orange);
}

/* The evidence cards sit inside .dossier-frame, so inset: 0 is the image area
   and the caption below the frame (.dossier-foot) is never covered. */
.dossier-cards {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.dcard {
  position: absolute;
  width: min(46%, 230px);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 13px;
  box-shadow: 0 10px 30px -14px rgb(31 40 52 / 0.45);
  display: grid;
  gap: 4px;
  pointer-events: auto;
}

.dcard-kicker {
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.dcard-title {
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}

.dcard-meta {
  font-size: 0.8rem;
  color: var(--muted);
}

.dcard-1 {
  right: 4%;
  top: 7%;
}

.dcard-2 {
  left: 4%;
  top: 31%;
}

.dcard-3 {
  right: 6%;
  bottom: 6%;
}

.dossier-foot {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 4px 0;
  font-size: 0.8rem;
  color: var(--muted);
}

@media (max-width: 560px) {
  .dcard {
    width: 60%;
    padding: 9px 11px;
  }

  .dcard-2 {
    top: 22%;
  }

  .dcard-3 {
    right: 4%;
    bottom: 4%;
  }

  .dcard-1 {
    display: none;
  }
}

/* Status pills */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  background: var(--paper-2);
  color: var(--ink-soft);
  border: 1px solid transparent;
}

.pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.85;
}

.pill-verified {
  background: var(--green-wash);
  color: var(--green);
}

.pill-open {
  background: var(--orange-wash);
  color: var(--orange-deep);
}

.pill-review {
  background: var(--blue-wash);
  color: var(--blue);
}

.pill-waiting {
  background: var(--paper-2);
  color: var(--muted);
}

.pill-flag {
  background: var(--red-wash);
  color: var(--red);
}

.pill-sample {
  background: var(--ink);
  color: var(--white);
}

.pill-sample::before {
  background: var(--orange);
  opacity: 1;
}

/* Journey steps */

.steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  counter-reset: step;
}

.step {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 20px 20px;
  display: grid;
  gap: 12px;
  align-content: start;
  text-decoration: none;
  color: inherit;
}

.step:hover {
  border-color: var(--line-strong);
}

.step-num {
  counter-increment: step;
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--white);
  font-weight: 600;
  font-size: 0.85rem;
}

.step-num::before {
  content: counter(step);
}

.step h3 {
  font-size: 1.1rem;
}

.step p {
  color: var(--muted);
  font-size: 0.95rem;
}

.step-who {
  margin-top: auto;
  font-size: 0.8rem;
  color: var(--faint);
  font-weight: 500;
}

@media (max-width: 980px) {
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .step:last-child {
    grid-column: span 2;
  }
}

@media (max-width: 560px) {
  .steps {
    grid-template-columns: 1fr;
  }

  .step:last-child {
    grid-column: auto;
  }
}

/* Honest split */

.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(22px, 3vw, 34px);
  display: grid;
  gap: 16px;
  align-content: start;
}

.panel-ink {
  background: var(--ink);
  color: rgb(255 255 255 / 0.86);
  border-color: var(--ink);
}

.panel-ink h3 {
  color: var(--white);
}

.panel-wash {
  background: var(--paper-2);
}

.check-list,
.plain-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.check-list li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  align-items: start;
  line-height: 1.45;
}

.check-list svg {
  width: 22px;
  height: 22px;
  margin-top: 1px;
  flex: none;
}

.check-list .yes svg {
  color: var(--green);
}

.check-list .no svg {
  color: var(--faint);
}

.panel-ink .check-list .yes svg {
  color: #8cd1a8;
}

.panel-ink .check-list .no svg {
  color: rgb(255 255 255 / 0.5);
}

.rule-line {
  margin-top: 22px;
  padding: 18px 22px;
  border-radius: var(--radius);
  background: var(--orange-wash);
  color: var(--ink);
  border: 1px solid #efd2ad;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  font-weight: 500;
}

.rule-line svg {
  width: 22px;
  height: 22px;
  color: var(--orange-deep);
  flex: none;
  margin-top: 2px;
}

@media (max-width: 760px) {
  .split {
    grid-template-columns: 1fr;
  }
}

/* Feature trio */

.trio {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.feature {
  display: grid;
  gap: 14px;
  padding: 26px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--white);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--paper-2);
  display: grid;
  place-items: center;
  color: var(--ink);
}

.feature-icon svg {
  width: 24px;
  height: 24px;
}

.feature p {
  color: var(--muted);
}

@media (max-width: 880px) {
  .trio {
    grid-template-columns: 1fr;
  }
}

/* Pilot area */

.pilot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}

.pilot-map {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}

.pilot-map svg {
  width: 100%;
  height: auto;
}

.pilot-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pilot-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-weight: 500;
}

@media (max-width: 820px) {
  .pilot {
    grid-template-columns: 1fr;
  }
}

/* Principal brand */

.principal {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.principal .panel h3 {
  font-size: 1.15rem;
}

.principal .panel p {
  color: var(--muted);
}

@media (max-width: 880px) {
  .principal {
    grid-template-columns: 1fr;
  }
}

/* CTA band */

.cta-band {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) auto;
  gap: 28px;
  align-items: center;
  padding: clamp(30px, 5vw, 54px);
  border-radius: 24px;
  background: var(--ink);
  color: var(--white);
}

.cta-band h2 {
  color: var(--white);
  max-width: 18ch;
}

.cta-band p {
  color: rgb(255 255 255 / 0.72);
  margin-top: 10px;
  max-width: 48ch;
}

.cta-band .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 760px) {
  .cta-band {
    grid-template-columns: 1fr;
  }
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 40px 48px;
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer .wrap {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
}

.site-footer h4 {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 10px;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.site-footer a {
  text-decoration: none;
  color: var(--ink-soft);
}

.site-footer a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.disclosure {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--white);
  font-weight: 500;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.powered {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  font-size: 0.85rem;
}

.powered strong {
  color: var(--ink);
  font-weight: 600;
}

@media (max-width: 760px) {
  .site-footer .wrap {
    grid-template-columns: 1fr;
  }
}

/* Report page */

.report-top {
  padding-block: clamp(36px, 5vw, 64px) 0;
}

.report-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  padding-bottom: 28px;
}

.report-head h1 {
  font-size: clamp(2rem, 4.4vw, 3.2rem);
  max-width: 16ch;
}

.report-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 14px;
}

.report-meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.report-meta strong {
  color: var(--ink);
  font-weight: 600;
}

.case-switch {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.case-switch label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.seg {
  display: inline-flex;
  padding: 4px;
  gap: 4px;
  border-radius: 999px;
  background: var(--paper-2);
  border: 1px solid var(--line);
}

.seg button {
  appearance: none;
  border: 0;
  background: transparent;
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--muted);
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
}

.seg button[aria-pressed="true"] {
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 1px 2px rgb(45 57 72 / 0.12);
}

@media (max-width: 760px) {
  .report-head {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .case-switch {
    justify-items: start;
  }
}

.report-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  padding-block: 28px clamp(56px, 8vw, 96px);
  align-items: start;
}

@media (max-width: 980px) {
  .report-body {
    grid-template-columns: 1fr;
  }
}

/* Step tabs */

.tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  padding: 6px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.tab {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  font: inherit;
  text-align: left;
  padding: 12px 14px;
  border-radius: 11px;
  cursor: pointer;
  display: grid;
  gap: 6px;
  color: var(--ink-soft);
  min-height: 72px;
}

.tab:hover {
  background: rgb(255 255 255 / 0.6);
}

.tab[aria-selected="true"] {
  background: var(--white);
  border-color: var(--line);
  color: var(--ink);
  box-shadow: 0 1px 2px rgb(45 57 72 / 0.1);
}

.tab-step {
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

.tab[aria-selected="true"] .tab-step {
  color: var(--orange-deep);
}

.tab-name {
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.tab-state {
  font-size: 0.78rem;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tab-state::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--faint);
}

.tab-state[data-state="done"]::before {
  background: var(--green);
}

.tab-state[data-state="open"]::before {
  background: var(--orange);
}

.tab-state[data-state="review"]::before {
  background: var(--blue);
}

@media (max-width: 760px) {
  .tabs {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .tab {
    min-height: 0;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
  }

  .tab-name {
    font-size: 0.98rem;
  }
}

.tabpanel {
  margin-top: 18px;
  display: grid;
  gap: 18px;
}

.tabpanel[hidden] {
  display: none;
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(20px, 3vw, 28px);
  display: grid;
  gap: 16px;
}

.card-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px 16px;
}

.card-head h2 {
  font-size: 1.45rem;
}

.card-head h3 {
  font-size: 1.15rem;
}

.card .intro {
  color: var(--ink-soft);
  max-width: var(--measure);
}

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 0;
}

.facts > div {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--paper);
  border: 1px solid var(--line);
  display: grid;
  gap: 4px;
}

.facts dt {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.facts dd {
  margin: 0;
  font-weight: 500;
  color: var(--ink);
}

.facts dd .small {
  display: block;
  color: var(--muted);
  font-weight: 400;
  margin-top: 2px;
}

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 18px;
}

@media (max-width: 880px) {
  .two-col {
    grid-template-columns: 1fr;
  }
}

.diagram {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #e9e6dc;
  position: relative;
}

.diagram svg {
  width: 100%;
  height: auto;
}

.diagram-label {
  position: absolute;
  left: 10px;
  bottom: 10px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--white);
  background: rgb(31 40 52 / 0.78);
  padding: 4px 9px;
  border-radius: 999px;
}

.evidence-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.evidence {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 14px;
  align-items: start;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
}

.evidence .tag {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--white);
  font-weight: 650;
  font-size: 0.95rem;
}

.evidence .tag.soft {
  background: var(--paper-2);
  color: var(--ink);
  border: 1px solid var(--line);
}

.evidence h4 {
  font-size: 1rem;
}

.evidence p {
  color: var(--muted);
  font-size: 0.93rem;
  margin-top: 4px;
}

.evidence .pill {
  justify-self: end;
}

@media (max-width: 560px) {
  .evidence {
    grid-template-columns: 44px 1fr;
  }

  .evidence .pill {
    grid-column: 2;
    justify-self: start;
  }
}

.q-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.q-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--orange-wash);
  border: 1px solid #efd2ad;
}

.q-list li.resolved {
  background: var(--green-wash);
  border-color: #c5dece;
}

.q-list .q-mark {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--orange);
  color: var(--white);
  font-weight: 700;
  font-size: 0.85rem;
}

.q-list li.resolved .q-mark {
  background: var(--green);
}

.q-list p {
  font-size: 0.95rem;
}

.q-list .answer {
  color: var(--ink-soft);
  margin-top: 4px;
  font-size: 0.9rem;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.photo {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--white);
  display: grid;
}

.photo .frame {
  position: relative;
  background: #d9d4c6;
}

.photo .frame svg {
  width: 100%;
  height: auto;
}

.photo .frame .diagram-label {
  left: 8px;
  bottom: 8px;
}

.photo figcaption {
  padding: 12px 14px 14px;
  display: grid;
  gap: 4px;
}

.photo figcaption strong {
  font-weight: 600;
  font-size: 0.95rem;
}

.photo figcaption span {
  color: var(--muted);
  font-size: 0.88rem;
}

@media (max-width: 560px) {
  .photo-grid {
    grid-template-columns: 1fr;
  }
}

.scope-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.scope-table th,
.scope-table td {
  text-align: left;
  padding: 12px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.scope-table th {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.scope-table td:first-child {
  font-weight: 600;
}

.scope-table td .small {
  display: block;
  color: var(--muted);
  font-weight: 400;
  margin-top: 3px;
}

.scope-table tr:last-child td {
  border-bottom: 0;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
}

.note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--paper);
  border: 1px dashed var(--line-strong);
  color: var(--ink-soft);
  font-size: 0.93rem;
}

.note svg {
  width: 20px;
  height: 20px;
  flex: none;
  color: var(--muted);
  margin-top: 1px;
}

.note-strong {
  background: var(--blue-wash);
  border: 1px solid #c9d7ea;
  color: var(--ink);
}

.note-strong svg {
  color: var(--blue);
}

.decision {
  display: grid;
  gap: 12px;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--paper-2);
  border: 1px solid var(--line);
}

.decision .row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.decision .row .pill {
  margin-left: auto;
}

.not-reached {
  text-align: center;
  padding: clamp(36px, 6vw, 64px) 20px;
  display: grid;
  gap: 14px;
  justify-items: center;
}

.not-reached svg {
  width: 44px;
  height: 44px;
  color: var(--faint);
}

.not-reached p {
  max-width: 44ch;
  color: var(--muted);
}

.checklist {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.checklist li {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 0.95rem;
}

.checklist svg {
  width: 22px;
  height: 22px;
  color: var(--green);
}

.checklist .small {
  color: var(--muted);
}

/* Side rail */

.rail {
  display: grid;
  gap: 16px;
  position: sticky;
  top: 86px;
}

@media (max-width: 980px) {
  .rail {
    position: static;
  }
}

.rail .card {
  padding: 20px;
  gap: 14px;
}

.rail h3 {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0;
}

.timeline li {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 12px;
  position: relative;
  padding-bottom: 16px;
}

.timeline li:last-child {
  padding-bottom: 0;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 18px;
  bottom: -2px;
  width: 2px;
  background: var(--line);
}

.timeline li:last-child::before {
  display: none;
}

.timeline .dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  background: var(--white);
  margin-top: 2px;
}

.timeline li[data-state="done"] .dot {
  background: var(--green);
  border-color: var(--green);
}

.timeline li[data-state="open"] .dot {
  background: var(--orange);
  border-color: var(--orange);
}

.timeline li[data-state="review"] .dot {
  background: var(--blue);
  border-color: var(--blue);
}

.timeline strong {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
}

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

.people {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.people li {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  align-items: center;
}

.people .avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--paper-2);
  color: var(--ink);
  font-weight: 650;
  font-size: 0.78rem;
  border: 1px solid var(--line);
}

.people strong {
  display: block;
  font-size: 0.93rem;
  font-weight: 600;
}

.people span {
  color: var(--muted);
  font-size: 0.82rem;
}

.rail-actions {
  display: grid;
  gap: 8px;
}

/* Request page */

.request-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 400px);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
  padding-block: clamp(40px, 6vw, 72px) clamp(56px, 8vw, 96px);
}

@media (max-width: 920px) {
  .request-grid {
    grid-template-columns: 1fr;
  }
}

.form-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: clamp(22px, 3.4vw, 36px);
  display: grid;
  gap: 22px;
}

.form-banner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--orange-wash);
  border: 1px solid #efd2ad;
  font-size: 0.93rem;
  color: var(--ink);
}

.form-banner svg {
  width: 20px;
  height: 20px;
  color: var(--orange-deep);
  margin-top: 2px;
}

.form-banner strong {
  font-weight: 600;
}

fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 16px;
}

legend {
  font-weight: 600;
  font-size: 1.05rem;
  padding: 0;
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}

.field {
  display: grid;
  gap: 6px;
}

.field label,
.field .label {
  font-weight: 600;
  font-size: 0.93rem;
}

.field .hint {
  font-size: 0.85rem;
  color: var(--muted);
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field select,
.field textarea {
  font: inherit;
  font-size: 1rem;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--white);
  color: var(--ink);
  width: 100%;
}

.field textarea {
  min-height: 110px;
  resize: vertical;
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 1px;
  border-color: var(--focus);
}

.field[data-invalid="true"] input,
.field[data-invalid="true"] select,
.field[data-invalid="true"] textarea {
  border-color: var(--red);
  background: #fffafa;
}

.field .error {
  font-size: 0.86rem;
  color: var(--red);
  font-weight: 500;
  min-height: 0;
}

.field .error:empty {
  display: none;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 560px) {
  .field-row {
    grid-template-columns: 1fr;
  }
}

.choices {
  display: grid;
  gap: 8px;
}

.choice {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  align-items: start;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  cursor: pointer;
  font-weight: 500;
}

.choice:has(input:checked) {
  border-color: var(--ink);
  background: var(--white);
}

.choice:has(input:focus-visible) {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.choice input {
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--ink);
}

.choice span small {
  display: block;
  color: var(--muted);
  font-weight: 400;
  font-size: 0.86rem;
}

.consent {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  font-size: 0.95rem;
}

.consent input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--ink);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.form-summary {
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--red-wash);
  border: 1px solid #ebc9c0;
  color: var(--red);
  font-weight: 500;
  font-size: 0.95rem;
}

.form-summary[hidden] {
  display: none;
}

.form-summary a {
  color: inherit;
}

.form-summary ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

/* Success state */

.success {
  display: grid;
  gap: 20px;
}

.success-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: center;
}

.success-head .ok {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--green-wash);
  color: var(--green);
  display: grid;
  place-items: center;
}

.success-head .ok svg {
  width: 26px;
  height: 26px;
}

.success-head h2 {
  font-size: 1.6rem;
}

.ref {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--white);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.ref span {
  font-weight: 500;
  color: rgb(255 255 255 / 0.65);
  font-size: 0.85rem;
}

.summary-list {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.summary-list > div {
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--paper);
  border: 1px solid var(--line);
}

.summary-list dt {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.summary-list dd {
  margin: 4px 0 0;
  font-weight: 500;
  overflow-wrap: anywhere;
}

details.raw {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
}

details.raw summary {
  cursor: pointer;
  padding: 12px 14px;
  font-weight: 600;
  font-size: 0.93rem;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

details.raw summary::-webkit-details-marker {
  display: none;
}

details.raw summary::after {
  content: "+";
  font-weight: 500;
  color: var(--muted);
}

details.raw[open] summary::after {
  content: "–";
}

details.raw pre {
  margin: 0;
  padding: 0 14px 14px;
  font-size: 0.82rem;
  line-height: 1.5;
  overflow-x: auto;
  color: var(--ink-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.aside-stack {
  display: grid;
  gap: 16px;
}

.aside-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  display: grid;
  gap: 12px;
}

.aside-card h3 {
  font-size: 1.05rem;
}

.aside-card p,
.aside-card li {
  color: var(--muted);
  font-size: 0.93rem;
}

.aside-card ol {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
}

.storage-status {
  display: grid;
  gap: 10px;
}

.storage-status .row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  font-size: 0.93rem;
}

.storage-status .row strong {
  font-weight: 600;
  color: var(--ink);
}

.live-region {
  min-height: 1.2em;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

/* Utility */

.stack {
  display: grid;
  gap: 14px;
}

.inline-link {
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
}

.inline-link:hover {
  color: var(--orange-deep);
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Motion */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Print: the report prints clean */

@media print {
  .demo-bar,
  .site-header,
  .site-footer,
  .tabs,
  .rail-actions,
  .case-switch,
  .skip-link {
    display: none !important;
  }

  .tabpanel[hidden] {
    display: grid !important;
    break-inside: avoid;
    margin-top: 24px;
  }

  .report-body {
    grid-template-columns: 1fr;
  }

  .rail {
    position: static;
  }

  body {
    background: #fff;
    font-size: 12pt;
  }

  .card,
  .evidence,
  .photo {
    break-inside: avoid;
  }
}
