/* The page — layers, chapters, the map plane and the route navigator.
   Builds on hero.css (tokens, nav, buttons, hero acts). */

body {
  background: #000;
  overflow-x: hidden;
}

.spacer {
  width: 1px;
}

.hero-layer,
.overlay,
.world,
.stage {
  position: fixed;
  inset: 0;
}

/* the sky: night → dawn over the whole page (colours set by the engine) */
.sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(to top, rgb(240 164 58 / calc(var(--dawn, 0) * 16%)), transparent 45%),
    radial-gradient(120% 85% at 50% 42%, var(--sky-glow, #04071a) 0%, var(--sky-top, #000) 62%);
}

.sky canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-layer {
  z-index: 0;
}

.hero-layer canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.overlay {
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* ---------- the map plane, under real perspective ---------- */

.world {
  z-index: 2;
  perspective: 1400px;
  perspective-origin: 50% 50%;
  overflow: hidden;
  pointer-events: none;
}

.plane {
  position: absolute;
  inset: 0;
  transform-origin: 50% 50%;
  transform-style: preserve-3d;
  visibility: hidden;
  will-change: transform;
}

.plane-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.pins,
.hits {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}

.pin {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  transform-origin: 50% 100%;
  will-change: transform, opacity;
}

.pin-card {
  width: 232px;
  padding: 16px 18px 18px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: rgb(8 8 12 / 92%);
  box-shadow: 0 30px 60px rgb(0 0 0 / 55%);
}

.pin-card::after,
.pin-label::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: 1px;
  height: var(--stem, 44px);
  background: linear-gradient(var(--accent-line), transparent);
}

.pin-kicker {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-ink);
}

.pin-card h3 {
  margin: 8px 0 8px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.pin-card p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.pin-label {
  --stem: 26px;
  padding: 4px 9px;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  background: rgb(8 8 12 / 92%);
  font-family: var(--mono);
  font-size: 11px;
  white-space: nowrap;
  color: var(--text);
}

.pin-label.is-red {
  border-color: rgb(240 107 107 / 50%);
  color: #ffb0ab;
}

.pin-label.is-green {
  border-color: rgb(60 207 122 / 45%);
  color: #9be8bb;
}

.pin-label.is-group {
  --stem: 34px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
}

.pin-label.is-group span {
  margin-left: 6px;
  font-family: var(--mono);
  font-weight: 400;
  color: var(--faint);
}

.hit {
  position: absolute;
  border-radius: 4px;
  pointer-events: none;
}

.plane.is-hoverable .hit {
  pointer-events: auto;
  cursor: crosshair;
}

/* ---------- stage and chapters ---------- */

.stage {
  z-index: 3;
  height: auto;
  overflow: visible;
  background: none; /* hero.css gives .stage a backdrop; here it must stay see-through */
  pointer-events: none;
}

.chapter {
  position: absolute;
  inset: 0;
  perspective: 1200px;
  visibility: hidden;
}

.chapter a,
.chapter button,
.chapter input,
.chapter label,
.chapter .prop,
.chapter .legend,
.chapter .mini,
.chapter .plan {
  pointer-events: auto;
}

.chapter .scrim {
  pointer-events: none;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-ink);
}

.h2 {
  margin: 12px 0 0;
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1.04;
  font-weight: 500;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.h2-sm {
  font-size: clamp(26px, 3vw, 40px);
}

.muted {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
  text-wrap: pretty;
}

.ch-head {
  position: absolute;
  top: 96px;
  left: clamp(20px, 6vw, 88px);
  width: min(620px, calc(100% - 40px));
}

.ch-left {
  width: min(520px, calc(100% - 40px));
}

.ch-center {
  left: 0;
  right: 0;
  margin: 0 auto;
  text-align: center;
}

.ch-center .lead {
  margin: 14px auto 0;
}

.ch-top {
  top: 86px;
}

/* features: stations + props */
.station {
  position: absolute;
  left: clamp(20px, 6vw, 88px);
  top: 50%;
  width: min(430px, 38vw);
  margin-top: -190px;
  will-change: transform, opacity;
}

.station .h2 {
  font-size: clamp(28px, 3.2vw, 44px);
}

.station .lead {
  margin: 16px 0 24px;
  font-size: 16px;
}

.prop {
  position: absolute;
  will-change: transform, opacity;
}

.prop-code {
  right: clamp(16px, 3vw, 48px);
  bottom: 24vh;
  width: min(430px, 36vw);
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: rgb(10 10 14 / 94%);
  box-shadow: 0 40px 80px rgb(0 0 0 / 60%);
  overflow: hidden;
}

.win-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--faint);
}

.win-bar i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgb(255 255 255 / 14%);
}

.win-bar span {
  margin-left: 8px;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 10px 12px 0;
}

.tabs button {
  all: unset;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.tabs button:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.tabs button[aria-selected="true"],
.tabs button.is-active {
  color: #fff;
  background: var(--accent);
  border-color: transparent;
}

.tabs button:focus-visible {
  outline: 2px solid var(--accent-line);
  outline-offset: 2px;
}

.code {
  margin: 0;
  min-height: 150px;
  padding: 14px 16px 6px;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.6;
  color: #cfd6ff;
  white-space: pre-wrap;
  word-break: break-word;
}

.caret {
  display: inline-block;
  width: 7px;
  height: 14px;
  margin-left: 1px;
  vertical-align: -2px;
  background: var(--accent-line);
  animation: blink 1s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.code-foot {
  padding: 10px 16px 14px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--faint);
}

.code-foot.is-done {
  color: var(--green);
}

.prop-report {
  right: clamp(30px, 9vw, 140px);
  top: 17vh;
  width: min(390px, 34vw);
  padding: 22px 24px;
  border-radius: 10px;
  background: #f5f6fa;
  color: #0c0d12;
  box-shadow: 0 50px 90px rgb(0 0 0 / 60%), 0 0 0 1px rgb(255 255 255 / 30%);
  transform-style: preserve-3d;
}

.rep-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid #dfe2ea;
}

.rep-logo {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--accent);
}

.rep-head strong {
  display: block;
  font-size: 14px;
}

.rep-head span {
  font-size: 11.5px;
  color: #5d6273;
}

.rep-head em {
  margin-left: auto;
  font-style: normal;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8a8fa0;
}

.rep-grade {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 16px 0 12px;
}

.rep-letter {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: #e8f8ee;
  color: #1c9a54;
  font-size: 30px;
  font-weight: 700;
}

.rep-grade strong {
  display: block;
  font-size: 15px;
}

.rep-grade span {
  font-size: 12px;
  color: #5d6273;
}

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

.rep-list li {
  position: relative;
  padding-left: 18px;
}

.rep-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e8961a;
}

.rep-list li.ok::before {
  background: #1fae5c;
}

.rep-list b {
  display: block;
  font-size: 13px;
}

.rep-list span {
  font-size: 12px;
  line-height: 1.45;
  color: #4b5060;
}

.rep-foot {
  margin: 16px 0 0;
  padding-top: 12px;
  border-top: 1px solid #dfe2ea;
  font-size: 11.5px;
  color: #6a6f80;
}

/* checks: the legend */
.legend {
  position: absolute;
  top: 82px;
  left: clamp(20px, 4vw, 64px);
  width: min(400px, 36vw);
  max-height: calc(100vh - 190px);
  overflow: auto;
  padding: 18px 18px 14px;
  border-radius: 16px;
  border: 1px solid var(--line-strong);
  background: rgb(8 8 12 / 86%);
  scrollbar-width: thin;
}

.legend .muted {
  font-size: 13px;
}

.legend-group {
  display: flex;
  justify-content: space-between;
  margin: 18px 0 6px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}

.legend-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.legend-list > li {
  border-top: 1px solid var(--line);
}

.legend-list button {
  all: unset;
  cursor: pointer;
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 2px;
  font-size: 13.5px;
  color: var(--muted);
}

.legend-list button b {
  font-weight: 500;
}

.legend-list button em {
  font-style: normal;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--faint);
}

.legend-list li.is-active button {
  color: var(--text);
}

.legend-list li.is-active button em {
  color: var(--accent-ink);
}

.legend-list button:focus-visible {
  outline: 2px solid var(--accent-line);
}

.legend-detail {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.legend-list li.is-active .legend-detail {
  max-height: 240px;
}

.legend-detail p {
  margin: 0 0 6px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
}

.legend-detail p i {
  font-style: normal;
  color: var(--accent-ink);
}

.legend-detail code {
  display: block;
  padding-bottom: 10px;
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.6;
  color: var(--faint);
}

/* map symbols in the legend */
.sym {
  position: relative;
  width: 20px;
  height: 14px;
}

.sym-0 {
  border-top: 2px dashed var(--accent-line);
  height: 0;
  margin-top: 6px;
}
.sym-1 {
  border: 1.5px solid var(--accent-line);
  border-radius: 3px;
  background: repeating-linear-gradient(90deg, transparent 0 3px, rgb(71 99 255 / 40%) 3px 4px);
}
.sym-2 {
  background: radial-gradient(circle, var(--orange) 0 2px, transparent 2.5px) 0 0 / 7px 7px;
}
.sym-3::before,
.sym-3::after {
  content: "";
  position: absolute;
  left: 9px;
  top: 0;
  width: 2px;
  height: 14px;
  background: var(--red);
  transform: rotate(45deg);
}
.sym-3::after {
  transform: rotate(-45deg);
}
.sym-4 {
  background:
    linear-gradient(var(--text), var(--text)) 2px 5px / 6px 9px no-repeat,
    linear-gradient(var(--muted), var(--muted)) 10px 2px / 7px 12px no-repeat;
  opacity: 0.8;
}
.sym-5 {
  border-bottom: 2px solid var(--accent-ink);
  border-radius: 0 0 50% 50% / 0 0 100% 100%;
}
.sym-6 {
  border-top: 2px dotted var(--green);
  height: 0;
  margin-top: 6px;
}
.sym-7 {
  border: 1px solid var(--orange);
  background: repeating-linear-gradient(45deg, transparent 0 3px, rgb(240 164 58 / 55%) 3px 4px);
}
.sym-8 {
  border: 1.5px double var(--text);
  border-width: 3px;
  border-radius: 2px;
}

/* bureaus: the atlas index */
.atlas-index {
  position: absolute;
  left: clamp(20px, 4vw, 64px);
  bottom: 104px;
  width: min(640px, 48vw);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.mini {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgb(8 8 12 / 88%);
  will-change: transform, opacity;
}

.mini h3 {
  margin: 0 0 4px;
  font-size: 13.5px;
  font-weight: 600;
}

.mini p {
  margin: 0;
  font-size: 11px;
  line-height: 1.4;
  color: var(--muted);
}

.mini-brand {
  border-color: var(--accent-line);
}

.swatches {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}

.swatches button {
  all: unset;
  cursor: pointer;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 25%);
  transition: transform 0.15s;
}

.swatches button:hover {
  transform: scale(1.15);
}

.swatches button[aria-pressed="true"] {
  box-shadow: 0 0 0 2px #000, 0 0 0 3.5px #fff;
}

.tooltip {
  position: fixed;
  z-index: 60;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: rgb(8 8 12 / 95%);
  font-size: 12px;
  line-height: 1.4;
  pointer-events: none;
  transform: translate(14px, 14px);
}

.tooltip b {
  display: block;
  font-size: 13px;
}

.tooltip span {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--faint);
}

/* readers */
.tabs-lg {
  padding: 0;
  margin-top: 20px;
}

.tabs-lg button {
  padding: 8px 14px;
  font-size: 13px;
}

.reader {
  position: absolute;
  left: clamp(20px, 6vw, 88px);
  bottom: 130px;
  width: min(400px, 36vw);
  padding: 18px 20px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: rgb(8 8 12 / 88%);
  opacity: 0;
  will-change: transform, opacity;
}

.reader p {
  margin: 10px 0 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
}

.reader-role {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.reader-role i {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  font-style: normal;
  font-size: 13px;
}

/* numbers: summits */
.summit {
  position: absolute;
  left: 0;
  top: 0;
  width: 200px;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, -100%);
}

.summit strong {
  display: block;
  font-size: clamp(36px, 4.4vw, 64px);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1;
}

.summit span {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
}

/* prices */
.calc {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 34px; /* breathing room under the section title */
  font-size: 14px;
  color: var(--muted);
}

.calc label {
  white-space: nowrap;
}

.calc input {
  flex-shrink: 0;
  width: min(320px, 24vw);
  accent-color: var(--accent);
}

.calc output {
  white-space: nowrap;
  min-width: 7ch;
  font-family: var(--mono);
  color: var(--text);
}

/* monthly / yearly switch: its own row above the slider */
.calc {
  flex-wrap: wrap;
  row-gap: 12px;
}

.calc .billing-row {
  order: -1;
  flex-basis: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.calc label {
  flex-basis: 100%;
  text-align: center;
  margin-bottom: 8px;
}

.billing {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgb(8 8 12 / 70%);
}

.billing button {
  all: unset;
  pointer-events: auto; /* all: unset would inherit "none" from .stage */
  cursor: pointer;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}

.billing button:hover {
  color: var(--text);
}

.billing button[aria-pressed="true"] {
  color: #fff;
  background: var(--accent);
}

.billing button:focus-visible {
  outline: 2px solid var(--accent-line);
  outline-offset: 2px;
}

.billing em {
  margin-left: 4px;
  font-style: normal;
  font-size: 11px;
  color: var(--accent-ink);
}

.billing button[aria-pressed="true"] em {
  color: rgb(255 255 255 / 80%);
}

.plans {
  position: absolute;
  left: 0;
  right: 0;
  top: 386px; /* room for the slider, the line and its label above the cards */
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 16px;
  padding: 0 20px;
}

.plan {
  width: min(310px, 30vw);
  padding: 18px 20px 20px;
  border-radius: 16px;
  border: 1px solid var(--line-strong);
  background: rgb(8 8 12 / 92%);
  will-change: transform, opacity;
}

.plan-featured {
  border-color: var(--accent-line);
  box-shadow: 0 0 0 1px var(--accent-line), 0 30px 80px rgb(0 34 255 / 18%);
}

.plan-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.plan h3 {
  margin: 0;
  font-size: 19px;
  font-weight: 600;
}

.plan .muted {
  margin-top: 6px;
  font-size: 13px;
}

.tag {
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--accent);
  font-size: 11px;
}

.price {
  margin-top: 14px;
  font-size: 34px;
  font-variant-numeric: tabular-nums; /* equal-width digits: the price doesn't wobble while it rolls */
  font-weight: 600;
  letter-spacing: -0.03em;
}

.price span {
  margin-left: 8px;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--muted);
}

.total {
  margin: 4px 0 12px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--accent-ink);
}

.plan ul {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 5px;
}

.plan li {
  position: relative;
  padding-left: 18px;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--muted);
}

.plan li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent-ink);
}

.plan.is-dimmed {
  opacity: 0.45 !important;
}

/* closing */
.closing {
  position: absolute;
  top: 17vh;
  left: 0;
  right: 0;
  margin: 0 auto;
  width: min(680px, calc(100% - 40px));
  text-align: center;
}

.closing .lead {
  margin: 16px auto 26px;
}


/* ---------- footer: the end of the page (same as on the legal pages) ---------- */

.site-footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 120px;
  margin: 0 auto;
  width: min(1040px, calc(100% - 40px));
  max-height: calc(100% - 210px);
  overflow-y: auto;
  padding: 28px 32px 22px;
  border-radius: 18px;
  border: 1px solid var(--line-strong);
  background: rgb(4 5 12 / 82%);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 40px 80px rgb(0 0 0 / 55%);
  pointer-events: auto;
  will-change: transform, opacity;
}

.site-footer-brand {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.site-footer-brand .brand {
  color: var(--text);
  font-size: 15px;
}

.site-footer-brand p {
  margin: 0;
  max-width: 460px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.5;
}

.site-footer-cols {
  display: grid;
  grid-template-columns: 1fr 1fr 2fr;
  gap: 32px;
}

.site-footer-cols > div {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.site-footer-legal {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: min-content;
  column-gap: 24px;
}

.site-footer-legal h2 {
  grid-column: 1 / -1;
}

.site-footer h2 {
  margin: 0 0 4px;
  font: 500 11px var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

.site-footer a {
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}

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

.site-footer-copy {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin: 28px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--faint);
}

.site-footer-copy a {
  font-size: 12px;
}

/* ---------- your domain, your map ---------- */

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

.site-form {
  display: flex;
  align-items: center;
  gap: 4px;
  width: min(520px, 100%);
  padding: 5px 5px 5px 16px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgb(8 8 14 / 80%);
  box-shadow: 0 0 0 0 var(--accent);
  transition: border-color 0.2s, box-shadow 0.3s;
}

.site-form:focus-within {
  border-color: var(--accent-line);
  box-shadow: 0 0 0 4px rgb(0 34 255 / 22%);
}

.site-form.is-busy {
  border-color: var(--accent-line);
  animation: sweep 1.4s linear infinite;
}

@keyframes sweep {
  0% {
    box-shadow: -40px 0 30px -20px var(--accent-line);
  }
  100% {
    box-shadow: 40px 0 30px -20px var(--accent-line);
  }
}

.site-prefix {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--faint);
}

.site-form input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: none;
  color: var(--text);
  font: 500 16px var(--sans);
}

.site-form input::placeholder {
  color: rgb(255 255 255 / 30%);
}

.site-form .btn {
  height: 40px;
}

.site-form .btn[disabled] {
  opacity: 0.6;
  cursor: progress;
}

.hero-copy .scroll-cue,
.site-note {
  text-shadow: 0 0 10px #000, 0 0 22px #000;
}

/* the scroll hint sits on the bottom edge of the hero, its line running off the screen with a
   pulse of light travelling down it */
.hero-copy .scroll-cue {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 0 20px;
}

.hero-copy .scroll-cue::after {
  height: 48px;
  margin-top: 14px;
  background:
    linear-gradient(transparent, var(--accent-line), transparent) 0 -28px / 1px 28px no-repeat,
    linear-gradient(rgb(255 255 255 / 40%), transparent);
  animation: cue-drop 2.4s cubic-bezier(0.6, 0, 0.4, 1) infinite;
}

@keyframes cue-drop {
  0% {
    background-position: 0 -28px, 0 0;
  }
  70%,
  100% {
    background-position: 0 48px, 0 0;
  }
}

/* narrow desktops: keep clear of the route panel in the bottom-left corner */
@media (min-width: 861px) and (max-width: 1180px) {
  .hero-copy .scroll-cue {
    left: 400px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-copy .scroll-cue::after {
    animation: none;
  }
}

.site-note {
  margin: -8px 0 0;
  max-width: 520px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--faint);
}

.site-note.is-live {
  color: var(--green);
}

.site-note.is-demo {
  color: var(--orange);
}

.site-note.is-error {
  color: var(--red);
}

.codes li[data-sev="low"] .sev,
.codes li[data-sev="info"] .sev {
  color: var(--faint);
}

.codes.found li[data-sev="low"]::before,
.codes.found li[data-sev="info"]::before {
  background: var(--faint);
  box-shadow: none;
}

.grade[data-letter="F"] {
  color: var(--red);
}

.prop-report {
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.prop-report.is-grabbed {
  cursor: grabbing;
}

.live-note {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 104px;
  margin: 0;
  text-align: center;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--green);
}

/* ---------- the line you can grab, and the survey crosshair ---------- */

html {
  cursor: crosshair;
}

html :is(a, button, input, label, select) {
  cursor: pointer;
}

html .site-form input {
  cursor: text;
}

html.on-line,
html.on-line * {
  cursor: grab !important;
}

html.is-dragging,
html.is-dragging * {
  cursor: grabbing !important;
  user-select: none;
}

.line-hint,
.coords {
  position: fixed;
  z-index: 70;
  pointer-events: none;
  font-family: var(--mono);
  font-size: 10.5px;
  white-space: nowrap;
}

.line-hint {
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--accent-line);
  background: rgb(8 8 14 / 92%);
  color: var(--accent-ink);
  transform: translate(14px, -30px);
}

.coords {
  color: rgb(255 255 255 / 38%);
  transform: translate(14px, 12px);
}

/* ---------- sound ---------- */

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

.sound-toggle {
  all: unset;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-size: 13px;
  color: var(--muted);
}

.sound-toggle:hover,
.sound-toggle[aria-pressed="true"] {
  color: var(--text);
}

.sound-toggle:focus-visible {
  outline: 2px solid var(--accent-line);
  outline-offset: 2px;
}

.eq {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
}

.eq i {
  width: 2px;
  height: 3px;
  background: currentColor;
}

.sound-toggle[aria-pressed="true"] .eq i {
  background: var(--accent-line);
  animation: eq 0.9s ease-in-out infinite alternate;
}

.sound-toggle[aria-pressed="true"] .eq i:nth-child(2) {
  animation-delay: -0.3s;
}
.sound-toggle[aria-pressed="true"] .eq i:nth-child(3) {
  animation-delay: -0.6s;
}
.sound-toggle[aria-pressed="true"] .eq i:nth-child(4) {
  animation-delay: -0.15s;
}

@keyframes eq {
  from {
    height: 2px;
  }
  to {
    height: 12px;
  }
}

/* ---------- route navigator ---------- */

.route {
  position: fixed;
  left: 20px;
  bottom: 18px;
  z-index: 45;
  width: min(360px, calc(100vw - 40px));
  padding: 10px 14px 9px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: rgb(10 10 14 / 74%);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}

.route-head {
  display: flex;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
}

.route-num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent-ink);
}

.route-track {
  position: relative;
  height: 18px;
  margin: 6px 4px 4px;
}

.route-track::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--line-strong);
}

.route-fill {
  position: absolute;
  left: 0;
  top: 50%;
  height: 2px;
  margin-top: -1px;
  background: var(--accent-line);
  box-shadow: 0 0 8px var(--accent);
}

.route-dot {
  all: unset;
  position: absolute;
  top: 50%;
  width: 9px;
  height: 9px;
  margin: -5px 0 0 -4.5px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: #000;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.route-dot:hover,
.route-dot:focus-visible {
  transform: scale(1.4);
  border-color: #fff;
}

.route-dot.is-current {
  border-color: var(--accent-line);
  background: var(--accent);
}

.route-dot span {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  padding: 3px 7px;
  border-radius: 5px;
  background: #000;
  border: 1px solid var(--line-strong);
  font-size: 11px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}

.route-dot:hover span,
.route-dot:focus-visible span {
  opacity: 1;
}

.route-meta {
  display: flex;
  gap: 14px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--faint);
}

.route-meta a {
  text-decoration: none;
  color: var(--accent-ink);
}

/* ---------- brand: the real logo (apps/dashboard/public/logo.png) ---------- */

.brand .logo {
  display: block;
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 0 12px rgb(0 34 255 / 55%));
}

/* ---------- contact: the sign-up form at the end of the line (mirrors /contact) ---------- */

.chapter .contact-card,
.chapter select,
.chapter textarea {
  pointer-events: auto;
}

.contact-intro {
  position: absolute;
  top: 104px;
  left: clamp(20px, 6vw, 88px);
  width: min(400px, calc(100% - 40px));
}

.inline-link {
  color: var(--accent-ink);
  text-underline-offset: 3px;
}

.contact-steps {
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 14px;
}

.contact-steps li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.contact-steps i {
  flex: none;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 1px solid var(--accent-line);
  background: var(--accent-soft, rgb(0 34 255 / 14%));
  color: var(--accent-ink);
  font: 500 12px var(--mono);
  font-style: normal;
}

.contact-steps b {
  display: block;
  font-size: 14px;
  font-weight: 600;
}

.contact-steps span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.contact-card {
  position: absolute;
  top: 88px;
  right: clamp(20px, 6vw, 88px);
  bottom: 64px;
  width: min(500px, calc(100% - 40px));
  display: flex;
  flex-direction: column;
  justify-content: center;
  will-change: transform, opacity;
}

.contact-card form,
.contact-done {
  max-height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 20px 22px 22px;
  border-radius: 16px;
  border: 1px solid var(--line-strong);
  background: rgb(8 8 12 / 92%);
  box-shadow: 0 30px 60px rgb(0 0 0 / 55%);
}

.contact-card form {
  display: grid;
  gap: 14px;
}

/* reCAPTCHA box: keeps its space while Google's script loads, and takes clicks (the stage doesn't) */
.captcha:not(:empty) {
  min-height: 78px;
}

.chapter .captcha,
.chapter .captcha iframe {
  pointer-events: auto;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-field {
  display: grid;
  gap: 6px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.form-field > label,
.form-field legend {
  padding: 0;
  font-size: 13px;
  font-weight: 500;
}

.form-field legend {
  margin-bottom: 6px;
}

.optional {
  margin-left: 4px;
  color: var(--faint);
  font-weight: 400;
  font-size: 12px;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-height: 38px;
  padding: 8px 11px;
  border-radius: 9px;
  border: 1px solid var(--line-strong);
  background: rgb(255 255 255 / 4%);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}

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

.form-field select option {
  background: #0a0a0c;
}

.form-field input:focus-visible,
.form-field select:focus-visible,
.form-field textarea:focus-visible {
  border-color: var(--accent-line);
  background: rgb(255 255 255 / 7%);
}

.plan-choice {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.plan-choice label {
  position: relative;
  cursor: pointer;
}

.plan-choice input {
  position: absolute;
  opacity: 0;
}

.plan-choice span {
  display: grid;
  gap: 2px;
  height: 100%;
  padding: 9px 10px;
  border-radius: 9px;
  border: 1px solid var(--line-strong);
  background: rgb(255 255 255 / 3%);
  transition: border-color 0.15s, background 0.15s;
}

.plan-choice strong {
  font-size: 13px;
  font-weight: 600;
}

.plan-choice small {
  color: var(--muted);
  font-size: 11.5px;
}

.plan-choice input:checked + span {
  border-color: var(--accent-line);
  background: var(--accent-soft, rgb(0 34 255 / 14%));
}

.plan-choice input:focus-visible + span {
  outline: 2px solid var(--accent-line);
  outline-offset: 2px;
}

.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
  cursor: pointer;
}

.consent input {
  flex: none;
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  accent-color: var(--accent);
}

.honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-error {
  margin: 0;
  padding: 9px 12px;
  border-radius: 9px;
  border: 1px solid rgb(240 107 107 / 40%);
  background: rgb(240 107 107 / 10%);
  color: var(--red);
  font-size: 13px;
}

.contact-submit {
  width: 100%;
  justify-content: center;
  gap: 8px;
}

.contact-done {
  display: grid;
  justify-items: start;
  gap: 4px;
}

.contact-card form[hidden],
.contact-done[hidden] {
  display: none;
}

.contact-done h3 {
  margin: 10px 0 0;
  font-size: 20px;
  outline: none;
}

.contact-done .btn {
  margin-top: 18px;
}

.done-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgb(60 207 122 / 14%);
  color: var(--green);
  font-size: 18px;
}

/* ---------- small screens: tablets in portrait and phones ----------
   The scenes in pagina-scenes.js switch to a stacked layout at the same width (isNarrow). */

/* ---------- survey sheets: every card on the page is a sheet from the same atlas ----------
   Square corners, hairline edges and registration ticks in the corners, the way a printed map
   sheet is marked for cutting. The ticks grow when you point at a sheet. */

@property --tick {
  syntax: "<length>";
  inherits: false;
  initial-value: 9px;
}

.legend,
.mini,
.plan,
.reader,
.pin-card,
.contact-card form,
.contact-done {
  --tick-c: rgb(128 144 255 / 75%);
  border-radius: 3px;
  border-color: rgb(255 255 255 / 9%);
  background:
    linear-gradient(var(--tick-c), var(--tick-c)) left top / var(--tick) 1px,
    linear-gradient(var(--tick-c), var(--tick-c)) left top / 1px var(--tick),
    linear-gradient(var(--tick-c), var(--tick-c)) right top / var(--tick) 1px,
    linear-gradient(var(--tick-c), var(--tick-c)) right top / 1px var(--tick),
    linear-gradient(var(--tick-c), var(--tick-c)) left bottom / var(--tick) 1px,
    linear-gradient(var(--tick-c), var(--tick-c)) left bottom / 1px var(--tick),
    linear-gradient(var(--tick-c), var(--tick-c)) right bottom / var(--tick) 1px,
    linear-gradient(var(--tick-c), var(--tick-c)) right bottom / 1px var(--tick),
    linear-gradient(rgb(6 8 20 / 90%), rgb(4 5 12 / 92%));
  background-repeat: no-repeat;
  background-origin: border-box;
  transition:
    --tick 0.35s cubic-bezier(0.2, 0.8, 0.2, 1),
    border-color 0.3s;
}

.mini:hover,
.plan:hover,
.legend:hover,
.reader:hover {
  --tick: 18px;
  border-color: rgb(128 144 255 / 28%);
}

/* the legend: a printed map legend, with a second rule around it */
.legend {
  outline: 1px solid rgb(255 255 255 / 6%);
  outline-offset: 5px;
}

.legend .h2 {
  margin-top: 8px;
}

.legend-group {
  border-bottom: 1px dotted rgb(255 255 255 / 14%);
  padding-bottom: 6px;
}

.legend-list > li:first-child {
  border-top: 0;
}

/* bureaus: each card is a square of the atlas grid */
.mini {
  position: relative;
}

.mini::before {
  content: attr(data-ref);
  position: absolute;
  top: 11px;
  right: 12px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  color: var(--accent-ink);
}

.mini h3 {
  font-size: 14px;
  letter-spacing: -0.01em;
}

.mini-brand {
  --tick-c: #fff;
  border-color: rgb(128 144 255 / 40%);
}

/* prices: each plan carries a scale bar, filled to how far it reaches */
.plan::before {
  content: attr(data-scale);
  display: block;
  margin-bottom: 16px;
  padding-top: 13px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  background:
    repeating-linear-gradient(90deg, transparent 0 calc(20% - 3px), #05060f calc(20% - 3px) 20%) left top / 100% 5px no-repeat,
    linear-gradient(90deg, var(--accent-line) calc(var(--seg, 1) * 20%), rgb(255 255 255 / 14%) 0) left top / 100% 5px no-repeat;
}

.plan-featured {
  --tick-c: #fff;
  border-color: rgb(128 144 255 / 50%);
  box-shadow: 0 30px 80px rgb(0 34 255 / 20%);
}

.plan-featured::before {
  color: var(--accent-ink);
}

/* the recommended plan is stamped, not badged */
.tag {
  padding: 4px 8px 3px;
  border: 1px solid var(--accent-line);
  border-radius: 2px;
  background: rgb(0 34 255 / 18%);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #dfe4ff;
  transform: rotate(-4deg);
}

/* checklist marks become survey points */
.plan li::before {
  content: "";
  top: 0.5em;
  left: 2px;
  width: 5px;
  height: 5px;
  border: 1px solid var(--accent-ink);
  transform: rotate(45deg);
}

.plan-featured li::before {
  background: var(--accent-line);
  border-color: var(--accent-line);
}

/* ---------- short desktop screens (laptops at 720–800px tall) ---------- */
@media (min-width: 861px) and (max-height: 820px) {
  h1 {
    font-size: clamp(40px, min(7vw, 10vh), 84px);
  }
  .hero-copy {
    gap: 16px;
    padding-bottom: 96px;
  }
  .hero-copy .scroll-cue::after {
    height: 30px;
    margin-top: 10px;
  }

  /* bureaus: the cards keep two lines each, and open up when you point at them */
  .atlas-index {
    bottom: 96px;
  }
  .mini {
    padding: 9px 11px;
  }
  .mini p {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
  }
  .mini:hover p,
  .mini:focus-within p {
    -webkit-line-clamp: unset;
    line-clamp: unset;
  }

  /* prices: only the scale bar, not its caption, and no tagline */
  .plans {
    top: 274px;
  }
  .plan {
    padding: 14px 18px 16px;
  }
  .plan::before {
    font-size: 0;
    padding-top: 5px;
    margin-bottom: 12px;
  }
  .plan .muted {
    display: none;
  }
  .price {
    margin-top: 8px;
    font-size: 30px;
  }
  .plan ul {
    gap: 3px;
    margin-bottom: 12px;
  }
  .plan li {
    font-size: 12px;
  }
}

/* ---------- intro: a scan line lights up the logo, then the logo flies into the nav ---------- */

.intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
}

.intro::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 85% at 50% 42%, #04071a 0%, #000 62%);
  transition: opacity 0.9s cubic-bezier(0.6, 0, 0.2, 1) 0.15s;
}

/* the nav brand at 2.3× (logo 28 → 64px), so it can fly back to exactly that size and place */
.intro-brand {
  --p: 0;
  position: relative;
  transform-origin: 0 0;
}

.intro-row {
  display: flex;
  align-items: center;
  gap: 23px;
  font-size: 34.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.intro-row img {
  display: block;
  width: 64px;
  height: 64px;
}

.intro-row.is-dim {
  color: rgb(255 255 255 / 10%);
}

.intro-row.is-dim img {
  filter: grayscale(1) brightness(0.45);
  opacity: 0.35;
}

/* the lit copy, uncovered from the bottom up as the page loads */
.intro-row.is-lit {
  position: absolute;
  inset: 0;
  color: var(--text);
  clip-path: inset(calc((1 - var(--p)) * 100%) -40px -40px -40px);
}

.intro-row.is-lit img {
  filter: drop-shadow(0 0 22px rgb(0 34 255 / 70%));
}

.intro-scan {
  position: absolute;
  left: -48px;
  right: -48px;
  top: calc((1 - var(--p)) * 100%);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-line) 18%, #dce2ff 50%, var(--accent-line) 82%, transparent);
  box-shadow: 0 0 14px var(--accent);
  transition: opacity 0.3s;
}

html.intro-out .intro {
  pointer-events: none;
}

html.intro-out .intro::before {
  opacity: 0;
}

html.intro-out .intro-scan {
  opacity: 0;
}

html.intro-out .intro-brand {
  transition: transform 1s cubic-bezier(0.7, 0, 0.2, 1);
  transform: translate(var(--fx, 0px), var(--fy, 0px)) scale(var(--fs, 1));
}

/* the nav brand waits until the intro's copy lands on it */
html.is-intro .nav .brand,
html.intro-out .nav .brand {
  visibility: hidden;
}

@media (max-width: 520px) {
  .intro-row {
    gap: 16px;
    font-size: 24px;
  }
  .intro-row img {
    width: 45px;
    height: 45px;
  }
}

/* the hero rises out of the line */
.hero-copy h1 .ln {
  display: block;
  overflow: hidden;
  padding: 0 0.12em 0.1em;
  margin: 0 -0.12em -0.1em;
}

.hero-copy h1 .ln > span {
  display: inline-block;
}

html.is-intro .hero-copy > :not(h1) {
  opacity: 0;
}

html.is-intro .hero-copy h1 .ln > span {
  transform: translateY(110%);
}

html.intro-play .hero-copy > :not(h1) {
  animation: hero-rise 1s cubic-bezier(0.2, 0.7, 0.1, 1) both;
}

html.intro-play .hero-copy h1 .ln > span {
  animation: hero-line 1.2s cubic-bezier(0.2, 0.75, 0.1, 1) both 0.38s;
}

html.intro-play .hero-copy h1 .ln + .ln > span {
  animation-delay: 0.5s;
}

html.intro-play .hero-copy > :nth-child(1) {
  animation-delay: 0.3s;
}

html.intro-play .hero-copy > :nth-child(3) {
  animation-delay: 0.7s;
}

html.intro-play .hero-copy > :nth-child(4) {
  animation-delay: 0.8s;
}

html.intro-play .hero-copy > :nth-child(5) {
  animation-delay: 0.9s;
}

html.intro-play .hero-copy > :nth-child(6) {
  animation-delay: 1.05s;
}

@keyframes hero-rise {
  from {
    opacity: 0;
    transform: translateY(26px);
  }
}

@keyframes hero-line {
  from {
    transform: translateY(110%);
  }
}

@media (prefers-reduced-motion: reduce) {
  html.intro-out .intro {
    animation: intro-fade 0.25s ease forwards;
  }
  html.intro-out .intro-brand {
    transition: none;
    transform: none;
  }
  html.is-intro .hero-copy h1 .ln > span {
    transform: none;
  }
  html.intro-play .hero-copy > :not(h1),
  html.intro-play .hero-copy h1 .ln > span {
    animation: none;
  }
}

@keyframes intro-fade {
  to {
    opacity: 0;
  }
}

/* the sign-up form while it is being sent */
.contact-card form.is-busy {
  opacity: 0.7;
  transition: opacity 0.2s;
}

.contact-submit[disabled] {
  cursor: progress;
}

@media (max-width: 860px) {
  /* nav: icon-only sound toggle so the brand and the button stay on one line */
  .sound-toggle {
    height: 34px;
    padding: 0 11px;
  }
  .sound-toggle [data-sound-label] {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  /* route navigator: a slim bar along the bottom */
  .route {
    left: 12px;
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    width: auto;
    padding: 8px 12px 5px;
  }
  .route-track {
    margin: 4px 4px 2px;
  }
  .route-meta {
    display: none;
  }

  /* platform: the pillar cards take turns over the map */
  .pin-card {
    width: min(232px, calc(100vw - 24px));
  }

  /* features: text on top, the card for each station underneath */
  .station {
    width: calc(100% - 40px);
    top: 84px;
    margin-top: 0;
  }
  .station .lead {
    margin-bottom: 0;
    font-size: 14px;
  }
  .station .btn {
    display: none;
  }
  .prop-code,
  .prop-report {
    left: 20px;
    right: 20px;
    top: auto;
    bottom: calc(14vh + 30px);
    bottom: calc(14svh + 30px);
    width: auto;
    max-width: 440px;
    margin: 0 auto;
  }
  .prop-code .tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }
  .prop-code .tabs button {
    flex: none;
  }
  .code {
    min-height: 0;
    height: 116px;
    overflow: hidden;
    font-size: 11.5px;
  }
  /* the example report: a smaller sheet, clear of the line underneath */
  .prop-report {
    max-width: 320px;
    padding: 13px 15px;
    bottom: calc(14vh + 46px);
    bottom: calc(14svh + 46px);
  }
  .rep-head {
    gap: 10px;
    padding-bottom: 8px;
  }
  .rep-logo {
    width: 20px;
    height: 20px;
    border-radius: 5px;
  }
  .rep-head strong {
    font-size: 12.5px;
  }
  .rep-head span {
    font-size: 10px;
  }
  .rep-head em {
    font-size: 9px;
  }
  .rep-grade {
    gap: 10px;
    margin: 10px 0 8px;
  }
  .rep-letter {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 19px;
  }
  .rep-grade strong {
    font-size: 13px;
  }
  .rep-grade span {
    font-size: 10.5px;
  }
  .rep-list {
    gap: 6px;
  }
  .rep-list li {
    padding-left: 14px;
  }
  .rep-list li::before {
    top: 5px;
    width: 6px;
    height: 6px;
  }
  .rep-list b {
    font-size: 11.5px;
  }
  .rep-list span {
    font-size: 10.5px;
    line-height: 1.4;
  }
  .rep-foot {
    display: none;
  }

  /* checks: a compact card low on the screen, so the map above stays visible. It shows the
     heading, the group you're in and only the active check with its explanation; scrolling
     steps through the checks, exactly like on desktop. */
  .legend {
    top: auto;
    bottom: 104px;
    width: calc(100% - 40px);
    max-height: none;
    overflow: visible;
    padding: 14px 16px 12px;
  }
  .legend .h2 {
    margin-top: 4px;
    font-size: 22px;
  }
  .legend .muted,
  .legend-detail code {
    display: none;
  }
  .legend-group {
    margin-top: 10px;
  }
  /* only the group that holds the active check, and only that check */
  .legend-group:not(:has(+ .legend-list li.is-active)),
  .legend-list:not(:has(li.is-active)),
  .legend-list > li:not(.is-active) {
    display: none;
  }
  .legend-list > li {
    border-top: 0;
  }
  .legend-list li.is-active .legend-detail {
    max-height: none;
  }
  .legend-detail p {
    margin-bottom: 2px;
  }

  /* bureaus: smaller client labels on short stems, so the five groups don't pile up */
  .pin-label.is-group {
    --stem: 16px;
    padding: 3px 7px;
    font-size: 10.5px;
  }
  .pin-label.is-group span {
    margin-left: 4px;
  }

  /* bureaus: the feature cards become a strip you swipe sideways */
  .atlas-index {
    left: 0;
    right: 0;
    bottom: 78px;
    width: auto;
    display: flex;
    gap: 10px;
    padding: 0 20px 4px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 20px;
    scrollbar-width: none;
    pointer-events: auto;
  }
  .atlas-index::-webkit-scrollbar,
  .prop-code .tabs::-webkit-scrollbar,
  .plans::-webkit-scrollbar {
    display: none;
  }
  .mini {
    flex: 0 0 min(72%, 280px);
    scroll-snap-align: start;
    padding: 12px 14px;
  }
  .mini p {
    font-size: 12px;
  }

  /* readers */
  .reader {
    left: 20px;
    right: 20px;
    bottom: 78px;
    width: auto;
    padding: 14px 16px;
  }
  .reader p {
    font-size: 14px;
  }

  /* numbers */
  .summit {
    width: 86px;
  }
  .summit strong {
    font-size: 28px;
  }
  .summit span {
    margin-top: 6px;
    font-size: 11px;
  }
  .live-note {
    bottom: 80px;
    padding: 0 20px;
    font-size: 10px;
  }

  /* prices: the slider on its own row, the plans side by side in a swipeable strip */
  .calc {
    flex-wrap: wrap;
    gap: 6px 14px;
    margin-top: 18px;
  }
  .calc label {
    width: 100%;
  }
  .calc input {
    flex: 1;
    width: auto;
    max-width: 320px;
  }
  .plans {
    top: 356px;
    bottom: 78px;
    flex-direction: row;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 20px;
    scrollbar-width: none;
    pointer-events: auto;
  }
  .plan {
    flex: 0 0 min(80%, 320px);
    width: auto;
    max-height: 100%;
    overflow-y: auto;
    scroll-snap-align: start;
  }
  .price {
    font-size: 30px;
  }

  /* contact */
  .contact-intro {
    top: 80px;
  }
  .contact-intro .muted,
  .contact-steps {
    display: none;
  }
  .contact-card {
    top: 170px;
    left: 20px;
    right: 20px;
    bottom: 80px;
    width: auto;
    justify-content: flex-start;
  }
  .plan-choice {
    grid-template-columns: 1fr 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .form-field input,
  .form-field select,
  .form-field textarea {
    font-size: 16px; /* below 16px iOS zooms the page in on focus */
  }

  /* closing + footer */
  .site-footer {
    bottom: 80px;
    max-height: calc(100% - 156px);
    padding: 20px 20px 16px;
  }
  .site-footer-cols {
    grid-template-columns: 1fr 1fr;
    gap: 22px;
  }
  .site-footer-legal {
    grid-column: 1 / -1;
  }
}

@media (max-width: 860px) {
  .hero-copy .scroll-cue {
    bottom: 100px;
    font-size: 10px;
  }
  .hero-copy .scroll-cue::after {
    height: 24px;
    margin-top: 10px;
  }
}

@media (max-width: 860px) and (max-height: 720px) {
  /* short phones: drop the extras so the essentials fit one screen */
  .hero-copy {
    gap: 16px;
    padding-top: 84px;
    padding-bottom: 110px;
  }
  .hero-copy .badge,
  .hero-copy .scroll-cue {
    display: none;
  }
  .hero-copy h1 {
    font-size: 36px;
  }
  .hero-copy .lead {
    font-size: 15px;
  }
  .ch-head .muted {
    font-size: 13.5px;
  }
  [data-chapter="lezers"] .ch-head .muted {
    display: none;
  }
  .rep-head span,
  .rep-list span {
    display: none;
  }
  .station .lead {
    font-size: 13px;
  }
  .code {
    height: 92px;
  }
}

/* the switch row above the slider makes the cards taller: use the compact cards a bit sooner */
@media (min-width: 861px) and (max-height: 960px) {
  /* prices: compact cards, and the switch, question and slider closer together */
  .calc {
    margin-top: 26px;
    row-gap: 8px;
  }
  .calc .billing-row {
    margin-bottom: 4px;
  }
  .calc label {
    margin-bottom: 2px;
  }
  .plans {
    top: 352px;
  }
  .plan {
    padding: 14px 18px 16px;
  }
  .plan::before {
    font-size: 0;
    padding-top: 5px;
    margin-bottom: 12px;
  }
  .plan .muted {
    display: none;
  }
  .price {
    margin-top: 8px;
    font-size: 30px;
  }
  .plan ul {
    gap: 3px;
    margin-bottom: 12px;
  }
  .plan li {
    font-size: 12px;
  }
}

/* short laptop screens: the cards move up a little so the Pro card stays on screen */
@media (min-width: 861px) and (max-height: 760px) {
  .calc {
    margin-top: 14px;
  }
  .plans {
    top: 320px;
  }
}
