/* The signed-out homepage: what Agent Assurance is, with the signup form in
   the hero. Same certificate system as the app (style.css tokens), set at
   page scale: full-width bands, ruled rows, verdict inks as the only colour,
   and one navy band to close. */

body.home main { max-width: none; padding: 0; }
.home-wrap { max-width: 1180px; margin: 0 auto; padding: 0 32px; }

.home h2 {
  font-size: clamp(26px, 2.7vw, 36px);
  line-height: 1.14;
  font-weight: 650;
  letter-spacing: -0.02em;
  max-width: 24ch;
  margin: 0 0 14px;
}
.home-lede { font-size: 17.5px; line-height: 1.6; color: var(--ink-2); max-width: 62ch; margin: 0; }

/* --- Hero ------------------------------------------------------------------ */

.home-hero { padding: clamp(48px, 7vw, 96px) 0 clamp(56px, 7vw, 96px); }
.home-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 420px);
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
}
.home-hero h1 {
  font-size: clamp(38px, 4.6vw, 60px);
  line-height: 1.04;
  font-weight: 680;
  letter-spacing: -0.03em;
  max-width: 16ch;
  margin: 0 0 24px;
}
.home-hero .home-lede { font-size: 18.5px; max-width: 54ch; }

.home-runtime {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 32px 0 0;
  width: fit-content;
  max-width: 100%;
  padding: 10px 16px 11px;
  border: 1px solid var(--rule-ink);
  border-radius: var(--radius);
  background: var(--sheet);
  font-size: 15px;
  line-height: 1.45;
}
.home-runtime-label { flex: none; color: var(--ink-3); font-size: 12.5px; }
.home-runtime .num { font-family: var(--mono); font-weight: 620; }

.home-watch { display: flex; align-items: baseline; gap: 10px; margin: 24px 0 0; font-size: 15px; font-weight: 560; }
.home-watch .num { color: var(--ink-3); font-family: var(--mono); font-size: 12.5px; font-weight: 450; }

.home-signup {
  background: var(--sheet);
  border: 1px solid var(--rule-ink);
  border-radius: var(--radius);
  padding: 28px 28px 22px;
  box-shadow: 0 1px 0 var(--rule), 0 18px 40px -24px rgba(20, 33, 61, 0.28);
  scroll-margin-top: 24px;
}
.home-signup h2 { font-size: 22px; letter-spacing: -0.01em; margin: 0 0 4px; }
.home-signup-lead { color: var(--ink-3); font-size: 14px; margin: 0 0 20px; }
.home-signup-form { display: grid; gap: 14px; margin: 0 0 18px; }
.home-signup-form label { display: grid; gap: 5px; font-size: 13.5px; font-weight: 560; color: var(--ink-2); }
.home-signup-form input { width: 100%; min-height: 40px; font-size: 15px; }
.home-signup-form button { min-height: 44px; margin-top: 6px; font-size: 15px; }
.home-signup-form .terms-check { display: flex; margin: 0; font-weight: 400; }
.home-signup-note { color: var(--ink-3); font-size: 13.5px; margin: 0 0 4px; }
.home-signup.is-called { animation: home-call 900ms cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes home-call {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--focus) 45%, transparent), 0 18px 40px -24px rgba(20, 33, 61, 0.28); }
  100% { box-shadow: 0 0 0 14px transparent, 0 18px 40px -24px rgba(20, 33, 61, 0.28); }
}

/* --- Bands ------------------------------------------------------------------ */

.home-band { padding: clamp(64px, 8vw, 112px) 0; border-top: 1px solid var(--rule); }
.home-band-sheet { background: var(--sheet); }

.home-traits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 40px 0 0;
  border-top: 1px solid var(--rule-ink);
}
.home-traits > div { padding: 18px 28px 4px 0; }
.home-traits > div + div { padding-left: 28px; border-left: 1px solid var(--rule); }
.home-traits dt { font-size: 16px; font-weight: 640; margin-bottom: 6px; }
.home-traits dd { margin: 0; color: var(--ink-2); max-width: 36ch; }

.home-subhead { font-size: 20px; font-weight: 650; letter-spacing: -0.01em; margin: 80px 0 6px; }
.home-sublead { color: var(--ink-2); max-width: 62ch; margin: 0; }

.home-findings { margin-top: 28px; }
.home-findings-head,
.home-finding {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 40px;
}
.home-findings-head { padding-bottom: 8px; color: var(--ink-3); font-size: 12.5px; }
.home-finding { align-items: start; padding: 26px 0; border-top: 1px solid var(--rule); }
.home-finding:last-child { border-bottom: 1px solid var(--rule); }
.home-finding h4 { font-size: 17px; font-weight: 650; margin: 0 0 6px; }
.home-finding p { color: var(--ink-2); margin: 0; max-width: 40ch; }

.home-quote { margin: 0; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.home-band-sheet .home-quote { background: var(--tray); }
.home-quote figcaption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 14px;
  border-bottom: 1px solid var(--rule-2);
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 12px;
}
.home-quote figcaption code { color: var(--ink-2); font-size: 12px; }
.home-quote pre {
  margin: 0;
  padding: 12px 14px 14px;
  border: 0;
  border-radius: 0;
  background: none;
  max-height: none;
  font-size: 12.5px;
  line-height: 1.85;
  color: var(--ink-2);
}
.home-quote .ln { display: inline-block; min-width: 3ch; margin-right: 14px; color: var(--ink-3); opacity: 0.7; user-select: none; text-align: right; }
.home-quote mark {
  background: var(--fail-wash);
  color: var(--ink);
  padding: 1px 2px;
  box-shadow: inset 0 -1.5px 0 var(--fail);
}

.home-compound {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 48px;
  align-items: center;
  margin-top: 80px;
}
.home-compound h3 { font-size: 24px; line-height: 1.2; font-weight: 650; letter-spacing: -0.015em; margin: 0 0 12px; max-width: 18ch; }
.home-compound p { color: var(--ink-2); font-size: 16px; margin: 0; max-width: 42ch; }

/* One long-horizon run: verified ink up to the step that breaks, failed ink
   for everything that inherits it. */
.home-dag { margin: 0; padding: 22px 24px 18px; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); }
.home-dag-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.home-dag-head b { font-size: 15px; font-weight: 650; }
.home-dag-head .num { color: var(--ink-3); font-family: var(--mono); font-size: 12px; white-space: nowrap; }
.home-dag-svg { display: block; width: 100%; height: auto; margin: 14px 0 4px; }
.home-dag figcaption { padding-top: 14px; border-top: 1px solid var(--rule-2); color: var(--ink-2); font-size: 14px; }
.home-dag figcaption b { color: var(--fail); font-weight: 620; }

.dag-edge { fill: none; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.dag-node { fill: var(--sheet); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.dag-step, .dag-ends, .dag-side, .dag-break-label { opacity: 0; transition: opacity 340ms ease-out; }
.home-dag.drawn .dag-step, .home-dag.drawn .dag-ends,
.home-dag.branched .dag-side, .home-dag.broke .dag-break-label { opacity: 1; }
.dag-step .dag-edge, .dag-step .dag-node { stroke: var(--pass); transition: stroke 550ms ease-out; }
.dag-side .dag-edge, .dag-side .dag-node { stroke: var(--control); transition: stroke 550ms ease-out; }
.dag-side .dag-arrow { fill: var(--control); transition: fill 550ms ease-out; }
.home-dag.broke .down .dag-edge, .home-dag.broke .down .dag-node { stroke: var(--fail); }
.home-dag.broke .down .dag-arrow { fill: var(--fail); }
.home-dag.broke .dag-break { fill: var(--fail); }
.dag-tick { stroke: var(--fail); stroke-width: 1; vector-effect: non-scaling-stroke; }
.dag-label { font-family: var(--mono); font-size: 12px; fill: var(--ink-3); }
.dag-label.alert { fill: var(--fail); font-weight: 560; }

/* --- The five steps, in the app's own stage register ------------------------ */

.home-steps { margin-top: 40px; min-height: 0; background: var(--sheet); }
.home-steps .register { padding: 0; }
.home-steps .register-tab {
  position: relative;
  grid-template-columns: 26px minmax(0, 1fr);
  padding: 15px 18px;
  font-size: 16px;
}
.home-steps .register-tab[aria-selected="true"] .ladder-num { color: var(--ink); }
/* Fills down the selected step over its dwell time; its end advances the register. */
.home-step-bar {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--ink);
  transform-origin: top;
  transform: scaleY(0);
}
.home-steps .register-tab[aria-selected="true"] .home-step-bar { transform: scaleY(1); }
.home-steps.cycling .register-tab[aria-selected="true"] .home-step-bar {
  transform: scaleY(0);
  animation: home-step-fill var(--dwell, 10s) linear forwards;
}
.home-steps.paused .register-tab[aria-selected="true"] .home-step-bar { animation-play-state: paused; }
@keyframes home-step-fill { to { transform: scaleY(1); } }

/* Panels share one grid cell, so the register keeps the tallest panel's
   height and the page below does not move as the steps change. */
.home-step-panels { display: grid; padding: 24px 28px 26px; }
.home-step-panel {
  grid-area: 1 / 1;
  visibility: hidden;
  opacity: 0;
  transition: opacity 320ms ease-out, visibility 0s 320ms;
}
.home-step-panel.active { visibility: visible; opacity: 1; transition: opacity 320ms ease-out; }
.home-step-panel > p { color: var(--ink-2); max-width: 68ch; margin: 0 0 18px; }

.home-scene { margin: 0; }
.home-scene video,
.home-scene img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: #F2F3F0;
}
.home-scene img { aspect-ratio: auto; }
.home-scene figcaption { color: var(--ink-3); font-size: 13.5px; margin-top: 10px; max-width: 70ch; }

.home-map-tally {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 0 14px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}
.home-map-tally > div { padding: 9px 14px 10px; border-left: 1px solid var(--rule); }
.home-map-tally > div:first-child { border-left: 0; }
.home-map-tally dt { color: var(--ink-3); font-size: 12.5px; line-height: 1.35; }
.home-map-tally dd { margin: 3px 0 0; font-size: 22px; font-weight: 620; line-height: 1.1; font-variant-numeric: tabular-nums; }
.home-map-tally .pass dd { color: var(--pass); }
.home-map-tally .caution dd { color: var(--caution); }
.home-map-tally .fail dd { color: var(--fail); }

.home-map { border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.home-map-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 16px;
  padding: 9px 16px;
  border-bottom: 1px solid var(--rule);
  background: var(--tray);
  font-size: 12.5px;
  color: var(--ink-3);
}
.home-map-head code { color: var(--ink); font-size: 12.5px; }
.home-map-body { display: grid; grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr); height: 330px; }
.home-map-rules, .home-map-risks {
  min-height: 0;
  overflow-y: auto;
  padding: 14px 16px 40px;
  scrollbar-width: thin;
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 40px), transparent);
          mask-image: linear-gradient(to bottom, #000 calc(100% - 40px), transparent);
}
.home-map-risks { border-left: 1px solid var(--rule); }
.home-map-label { color: var(--ink-3); font-size: 12.5px; margin: 0 0 10px; }
.home-map ul { list-style: none; margin: 0; padding: 0; }
.home-map-rules li { display: grid; grid-template-columns: 34px minmax(0, 1fr); margin: 0; padding: 4px 0; font-size: 14px; line-height: 1.4; }
.home-map .ln { font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); padding-top: 2px; font-variant-numeric: tabular-nums; }
.home-map-risks li { margin: 0; padding: 11px 0 12px; border-top: 1px solid var(--rule-2); }
.home-map-risks li:first-child { border-top: 0; padding-top: 0; }
.home-risk-state { margin: 0 0 4px; font-size: 12.5px; color: var(--ink-3); }
.home-risk-state span { font-weight: 620; }
.home-map-risks .pass .home-risk-state span { color: var(--pass); }
.home-map-risks .caution .home-risk-state span { color: var(--caution); }
.home-map-risks .fail .home-risk-state span { color: var(--fail); }
.home-map-risks b { display: block; font-size: 14px; font-weight: 600; line-height: 1.4; }
.home-map-risks li > span { display: block; margin-top: 4px; font-size: 13px; line-height: 1.5; color: var(--ink-2); }

/* --- Scanning, tracing, evals ---------------------------------------------- */

.home-compare-table {
  width: 100%;
  margin-top: 36px;
  border-collapse: collapse;
  background: var(--sheet);
  border: 1px solid var(--rule);
  font-size: 16px;
}
.home-compare-table th, .home-compare-table td { padding: 16px 22px; text-align: left; border-top: 1px solid var(--rule-2); vertical-align: baseline; }
.home-compare-table thead th { border-top: 0; padding-top: 11px; padding-bottom: 11px; color: var(--ink-3); font-size: 12.5px; font-weight: 450; background: var(--tray); }
.home-compare-table tbody th { width: 170px; font-size: 17px; font-weight: 650; }
.home-compare-table td { color: var(--ink-2); }
/* Agent Assurance's three layers, framed as one group above the ones teams already run. */
.home-compare-table tbody.home-ours { border-top: 2px solid var(--rule-ink); border-bottom: 2px solid var(--rule-ink); }
.home-compare-table .home-ours td { color: var(--ink); font-weight: 600; }
.home-compare-table .home-ours th { font-weight: 700; }

/* --- Walkthrough, requirements, close -------------------------------------- */

.home-walkthrough {
  display: block;
  width: 100%;
  margin-top: 36px;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--ink);
}

.home-reqs-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 48px; align-items: start; }
.home-reqs { margin: 0; border-top: 1px solid var(--rule-ink); }
.home-reqs > div { padding: 18px 0 19px; border-bottom: 1px solid var(--rule); }
.home-reqs dt { font-size: 17px; font-weight: 650; margin-bottom: 4px; }
.home-reqs dd { margin: 0; color: var(--ink-2); max-width: 60ch; }

.home-close {
  padding: clamp(72px, 9vw, 128px) 0;
  background: #14213D;
  color: #E7EAF0;
}
.home-close h2 { color: #FCFCFA; font-size: clamp(30px, 3.4vw, 44px); }
.home-close .home-lede { color: #C3CAD6; }
.home-close-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin: 32px 0 0; }
.home-close .button.primary { min-height: 44px; padding: 10px 20px; font-size: 15px; background: #FCFCFA; border-color: #FCFCFA; color: #14213D; }
.home-close .button.primary:hover { background: #FFFFFF; border-color: #FFFFFF; }
.home-close a:not(.button) { color: #FCFCFA; text-decoration-color: rgba(252, 252, 250, 0.4); font-size: 15px; font-weight: 560; }
.home-close a:not(.button):hover { text-decoration-color: #FCFCFA; }
.home-close :focus-visible { outline-color: #8DB0FF; }
@media (prefers-color-scheme: dark) {
  .home-close { background: #1B2A4A; border-top: 1px solid var(--rule); }
}

.home-foot { padding: 22px 0; background: var(--sheet); border-top: 1px solid var(--rule); color: var(--ink-3); font-size: 13px; }
.home-foot .home-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.home-foot .vail-mark { width: 16px; height: 16px; color: var(--ink-2); }
.home-foot a { color: var(--ink-2); }
.home-foot-right { margin-left: auto; }

/* --- Narrow screens -------------------------------------------------------- */

@media (max-width: 960px) {
  .home-hero-grid { grid-template-columns: 1fr; }
  .home-hero h1 { max-width: 16ch; }
  .home-signup { max-width: 520px; }
}

@media (max-width: 760px) {
  .home-wrap { padding: 0 20px; }
  .home-hero .home-lede { font-size: 17px; }
  .home-runtime { flex-direction: column; gap: 2px; }
  .home-signup { padding: 22px 20px 18px; }
  .home-traits { grid-template-columns: 1fr; }
  .home-traits > div, .home-traits > div + div { padding: 16px 0; border-left: 0; }
  .home-traits > div + div { border-top: 1px solid var(--rule); }
  .home-findings-head { display: none; }
  .home-finding, .home-compound, .home-reqs-grid { grid-template-columns: 1fr; gap: 18px; }
  .home-compound { gap: 28px; margin-top: 56px; }
  .home-subhead { margin-top: 56px; }
  .home-quote pre { font-size: 11.5px; }
  .dag-label { font-size: 18px; }
  .dag-side .dag-label, .dag-break-label { display: none; }
  .home-steps .register { display: flex; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--rule); }
  .home-steps .register li { flex: none; }
  .home-steps .register-tab { width: auto; padding: 13px 16px; white-space: nowrap; font-size: 15px; }
  .home-steps .register li:first-child .register-tab[aria-selected="true"] { border-top-color: var(--rule); }
  .home-step-bar { top: auto; right: 0; width: auto; height: 2px; transform-origin: left; transform: scaleX(0); }
  .home-steps .register-tab[aria-selected="true"] .home-step-bar { transform: scaleX(1); }
  .home-steps.cycling .register-tab[aria-selected="true"] .home-step-bar { transform: scaleX(0); animation-name: home-step-fill-x; }
  .home-step-panels { padding: 18px 16px 20px; }
  .home-step-panel { display: none; }
  .home-step-panel.active { display: block; }
  .home-map-tally { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-map-tally > div:nth-child(3) { border-left: 0; }
  .home-map-tally > div:nth-child(n + 3) { border-top: 1px solid var(--rule); }
  .home-map-body { grid-template-columns: 1fr; height: auto; }
  .home-map-rules, .home-map-risks { overflow: visible; padding-bottom: 16px; -webkit-mask-image: none; mask-image: none; }
  .home-map-risks { border-left: 0; border-top: 1px solid var(--rule); }
  .home-compare-table, .home-compare-table tbody, .home-compare-table tr, .home-compare-table th, .home-compare-table td { display: block; width: auto; }
  .home-compare-table thead { display: none; }
  .home-compare-table tbody th { padding: 14px 16px 2px; border-top: 1px solid var(--rule-2); }
  .home-compare-table tbody tr:first-child th { border-top: 0; }
  .home-compare-table td { padding: 2px 16px; border-top: 0; }
  .home-compare-table td:last-child { padding-bottom: 14px; color: var(--ink-3); font-size: 14.5px; }
  .home-compare-table tbody.home-ours { border: 2px solid var(--rule-ink); border-width: 2px 0; }
  .home-foot-right { margin-left: 0; }
}
@keyframes home-step-fill-x { to { transform: scaleX(1); } }
