/* Home: one plant, walked by scroll.
   Default (no JS, or "Read as a page"): a plain document.
   html.is-world: one fixed stage, one spacer, copy windows that fade in place.
   Breakpoints: 768 (phone to tablet), 1100 (map goes inline), 1280 (status shows). */

/* ---------- Chrome ---------- */

.chrome {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  height: var(--chrome-h);
  display: flex;
  align-items: center;
  gap: var(--s-6);
  padding: 0 var(--gutter);
  padding-top: env(safe-area-inset-top);
  background: var(--canvas);
  border-bottom: 1px solid var(--line);
}

.is-world .chrome {
  background: linear-gradient(to bottom, var(--canvas) 0%, color-mix(in srgb, var(--canvas) 78%, transparent) 70%, transparent 100%);
  border-bottom-color: transparent;
}

.chrome__brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  flex: none;
}

.chrome__end {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  margin-left: auto;
  flex: none;
}

.status {
  display: none;
  align-items: center;
  gap: var(--s-2);
  margin-right: var(--s-2);
  font-size: var(--t-micro);
  font-weight: 560;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  white-space: nowrap;
}

.status__dot {
  width: 7px;
  height: 7px;
  border: 1px solid var(--neon);
  transform: rotate(45deg);
}

.status[data-stage="mature"] {
  color: var(--neon);
}

.status[data-stage="mature"] .status__dot {
  background: currentColor;
}

.is-world .status {
  display: none;
}

@media (min-width: 1440px) {
  .is-world .status {
    display: inline-flex;
  }
}

.mode-switch {
  display: none;
}

@media (min-width: 1280px) {
  .mode-switch {
    display: inline-flex;
  }
}

.chrome__cta,
.chrome__about {
  display: none;
}

@media (min-width: 1100px) {
  .chrome__about {
    display: inline-flex;
  }
}

@media (min-width: 768px) {
  .chrome__cta {
    display: inline-flex;
  }
}

/* ---------- Map: the walk through the plant ---------- */

.map {
  position: relative;
  min-width: 0;
}

.map__toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  min-height: 44px;
  padding: 0 var(--s-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: var(--t-small);
  font-weight: 560;
  cursor: pointer;
}

.map__toggle::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform var(--t-ui) var(--ease-out);
}

.map__toggle[aria-expanded="true"]::after {
  transform: translateY(1px) rotate(-135deg);
}

.map__list {
  position: absolute;
  top: calc(100% + var(--s-2));
  left: 0;
  min-width: 13rem;
  margin: 0;
  padding: var(--s-2);
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--e3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition:
    opacity var(--t-ui) var(--ease-out),
    transform var(--t-ui) var(--ease-out),
    visibility 0s linear var(--t-ui);
}

.map.is-open .map__list {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition:
    opacity var(--t-ui) var(--ease-out),
    transform var(--t-ui) var(--ease-out);
}

.map__list a,
.map__list button {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  width: 100%;
  min-height: 44px;
  padding: 0 var(--s-3);
  border: 0;
  background: none;
  color: var(--ink-soft);
  font: inherit;
  font-size: var(--t-small);
  font-weight: 500;
  text-align: left;
  text-decoration: none;
  border-radius: var(--radius);
  cursor: pointer;
}

.map__list a[aria-current="step"] {
  color: var(--neon);
}

.map__list a::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: none;
  border: 1px solid currentColor;
  transform: rotate(45deg);
}

.map__list a[aria-current="step"]::before {
  background: currentColor;
}

@media (hover: hover) and (pointer: fine) {
  .map__list a:hover,
  .map__list button:hover {
    color: var(--ink);
    background: var(--surface-2);
  }
}

.map__rail {
  display: none;
}

.map__page {
  border-top: 1px solid var(--line) !important;
  margin-top: var(--s-1);
}

/* Not a stop on the walk, so no diamond */
.map__list .map__about::before {
  display: none;
}

@media (min-width: 1100px) {
  .map__toggle,
  .map__page-item,
  .map__extra {
    display: none;
  }

  .map__list {
    position: static;
    display: flex;
    gap: clamp(var(--s-3), 1.6vw, var(--s-7));
    min-width: 0;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .map__list a {
    min-height: 44px;
    padding: 0 var(--s-1);
    font-size: 0.8125rem;
    white-space: nowrap;
  }

  .map__list a::before {
    display: none;
  }

  @media (hover: hover) and (pointer: fine) {
    .map__list a:hover {
      background: none;
    }
  }

  .is-world .map__rail {
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 6px;
    height: 1px;
    background: var(--line);
    pointer-events: none;
  }

  /* The glow sits on the marker and the clipped spark on its ::before, so the clip does not cut the glow */
  .map__marker {
    position: absolute;
    left: 0;
    top: -4px;
    width: 9px;
    height: 9px;
    filter: drop-shadow(0 0 3px var(--neon-glow));
    transform: translateX(var(--marker-x, 0px));
  }

  .map__marker::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--neon);
    clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  }
}

/* ---------- Stage ---------- */

.stage {
  display: none;
}

.is-world .stage {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 0;
  height: 100svh;
  overflow: hidden;
  background: var(--world-bg);
}

.stage__canvas {
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 600ms var(--ease-out);
}

.is-ready .stage__canvas {
  opacity: 1;
}

.stage__tags {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.stage__sim {
  position: absolute;
  right: var(--gutter);
  bottom: max(var(--s-3), env(safe-area-inset-bottom));
  margin: 0;
}

/* Tags drawn like leaders on a general-arrangement drawing */
.tag {
  position: absolute;
  left: 0;
  top: 0;
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 560;
  line-height: 1.3;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  opacity: 0;
  will-change: transform, opacity;
}

.tag::before {
  content: "";
  position: absolute;
  left: -0.5px;
  bottom: 0;
  width: 1px;
  height: var(--lead, 30px);
  background: currentColor;
  opacity: 0.55;
}

.tag::after {
  content: "";
  position: absolute;
  left: -3px;
  bottom: -3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.tag__box {
  position: absolute;
  left: -1px;
  bottom: var(--lead, 30px);
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.3em 0.6em;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--e1);
}

.tag__box::before {
  content: "";
  width: 0.55em;
  height: 0.55em;
  flex: none;
  border: 1px solid currentColor;
  border-radius: 50%;
}

/* Open questions in the blind spots: the neon purple, leader and dot included */
.tag--question {
  color: var(--neon);
}

.tag--question .tag__box {
  border-style: dashed;
  border-color: currentColor;
}

.tag--question .tag__box::before {
  content: "?";
  width: auto;
  height: auto;
  border: 0;
  font-weight: 700;
}

.tag--watch,
.tag--act {
  color: var(--accent);
}

.tag--predict {
  color: var(--neon);
}

.tag--watch .tag__box {
  border-color: currentColor;
}

.tag--watch .tag__box::before {
  border-radius: 0;
  transform: rotate(45deg) scale(0.9);
}

.tag--act .tag__box {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.tag--act .tag__box::before {
  border: 0;
  border-radius: 0;
  background: currentColor;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.tag--predict .tag__box {
  border-style: dashed;
  border-color: currentColor;
}

.tag--predict .tag__box::before {
  border: 0;
  border-radius: 0;
  background: currentColor;
  width: 0.8em;
  height: 0.8em;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
}

/* ---------- Copy: page mode (default) ---------- */

.copy {
  display: block;
  padding-top: var(--chrome-h);
  outline: none;
}

.wp {
  display: grid;
  gap: var(--s-8);
  width: min(100%, 76rem);
  margin: 0 auto;
  padding: clamp(var(--s-10), 9vh, var(--s-12)) var(--gutter);
  border-bottom: 1px solid var(--line);
}

.wp:last-of-type {
  border-bottom: 0;
}

.wp__body {
  display: grid;
  gap: var(--s-5);
  align-content: start;
  max-width: 38rem;
}

.wp__body h1 {
  font-size: var(--t-hero);
  line-height: 1.02;
  letter-spacing: -0.018em;
  margin-top: var(--s-1);
}

.wp__body h2 {
  font-size: var(--t-h2);
}

.wp__body h1:focus,
.wp__body h2:focus {
  outline: none;
}

.wp__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin-top: var(--s-2);
}

.wp__plate,
.wp--silence {
  display: none;
}

.close__about {
  max-width: 34rem;
  font-size: var(--t-small);
  color: var(--ink-soft);
}

.colophon {
  grid-column: 1 / -1;
  font-size: var(--t-micro);
  color: var(--ink-faint);
}

.colophon p {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.5em;
}

@media (min-width: 900px) {
  .wp--band,
  .wp--split,
  .wp--card,
  .wp--wide,
  .wp--close {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    align-items: start;
  }
}

/* ---------- Copy: world mode ---------- */

.is-world .copy {
  position: fixed;
  inset: 0;
  z-index: 5;
  padding: 0;
  pointer-events: none;
}

.is-world .spacer {
  display: block;
}

.spacer {
  display: none;
}

.is-world .wp {
  position: absolute;
  inset: 0;
  display: block;
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate3d(0, var(--shift, 0vh), 0);
  will-change: opacity, transform;
}

.is-world .wp.is-on {
  visibility: visible;
}

.is-world .wp.is-live .wp__body,
.is-world .wp.is-live .panel {
  pointer-events: auto;
}

.is-world .wp__body,
.is-world .panel {
  position: absolute;
}

.is-world .wp__plate {
  display: block;
  position: absolute;
  pointer-events: none;
}

.is-world .wp--silence {
  display: grid;
  place-items: center;
}

.silence {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 1.2rem + 1.6vw, 2.75rem);
  font-style: italic;
  font-weight: 500;
  color: var(--ink-soft);
  letter-spacing: -0.005em;
}

/* Plates: canvas-coloured density only where the type sits, never full frame */
.is-world .wp--lead .wp__plate {
  left: 0;
  bottom: 0;
  width: 70vw;
  height: 80vh;
  background: radial-gradient(ellipse 62% 62% at 18% 70%, var(--canvas) 44%, transparent 80%);
}

.is-world .wp--trail .wp__plate {
  right: 0;
  top: 0;
  width: 62vw;
  height: 84vh;
  background: radial-gradient(ellipse 60% 60% at 78% 34%, var(--canvas) 46%, transparent 82%);
}

.is-world .wp--band .wp__plate,
.is-world .wp--card .wp__plate,
.is-world .wp--split .wp__plate,
.is-world .wp--wide .wp__plate,
.is-world .wp--close .wp__plate {
  left: 0;
  top: 0;
  width: 56vw;
  height: 100%;
  background: radial-gradient(ellipse 62% 54% at 14% 34%, var(--canvas) 34%, transparent 76%);
}

.is-world .wp--band .wp__plate {
  top: auto;
  bottom: 0;
  height: 70vh;
  background: radial-gradient(ellipse 60% 66% at 16% 80%, var(--canvas) 36%, transparent 78%);
}

/* Desktop and tablet placements */
@media (min-width: 768px) and (orientation: landscape), (min-width: 1100px) {
  .is-world .wp--lead .wp__body {
    left: var(--gutter);
    bottom: 16vh;
    width: min(38rem, 48vw);
  }

  .is-world .wp--trail .wp__body {
    right: var(--gutter);
    top: calc(var(--chrome-h) + 12vh);
    width: min(30rem, 38vw);
  }

  .is-world .wp--band .wp__body {
    left: var(--gutter);
    bottom: 7vh;
    width: min(32rem, 40vw);
  }

  .is-world .traffic {
    right: var(--gutter);
    bottom: 7vh;
    width: min(27rem, 40vw);
  }

  .is-world .wp--split .wp__body {
    left: var(--gutter);
    top: calc(var(--chrome-h) + 8vh);
    width: min(24rem, 30vw);
  }

  /* --shot-ratio is the tallest photo's width / height (ui/vision.js); the panel narrows until it fits under the bar */
  .is-world .vision {
    right: var(--gutter);
    top: calc(50% + var(--chrome-h) / 2);
    width: min(54rem, 60vw, max(20rem, calc((100svh - var(--chrome-h) - 18rem) * var(--shot-ratio, 1.7778) + 1.625rem)));
    transform: translateY(-50%);
  }

  .is-world .wp--card .wp__body {
    left: var(--gutter);
    top: calc(var(--chrome-h) + 8vh);
    width: min(28rem, 36vw);
  }

  .is-world .decision {
    right: var(--gutter);
    bottom: 8vh;
    width: min(30rem, 42vw);
  }

  .is-world .wp--wide .wp__body {
    left: var(--gutter);
    top: calc(var(--chrome-h) + 6vh);
    width: min(26rem, 30vw);
  }

  .is-world .learn {
    right: var(--gutter);
    top: calc(50% + var(--chrome-h) / 2);
    width: min(46rem, 58vw);
    transform: translateY(-50%);
  }

  .is-world .wp--close .wp__body {
    left: var(--gutter);
    top: calc(var(--chrome-h) + 8vh);
    width: min(28rem, 36vw);
  }

  .is-world .contact {
    right: var(--gutter);
    top: calc(50% + var(--chrome-h) / 2);
    width: min(30rem, 42vw);
    transform: translateY(-50%);
  }

  .is-world .colophon {
    position: absolute;
    left: var(--gutter);
    bottom: max(var(--s-4), env(safe-area-inset-bottom));
    width: min(36rem, 46vw);
    pointer-events: auto;
  }
}

/* Phones: copy on a band at the foot of the frame, panels compact */
@media (max-width: 767.98px), (orientation: portrait) and (max-width: 1099.98px) {
  :root {
    --chrome-h: 56px;
  }

  .is-world .wp__body {
    left: var(--gutter);
    right: var(--gutter);
    bottom: max(var(--s-6), env(safe-area-inset-bottom));
    gap: var(--s-3);
  }

  .is-world .wp__plate {
    left: 0 !important;
    right: 0;
    top: auto !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 72% !important;
    background: linear-gradient(to top, var(--canvas) 52%, color-mix(in srgb, var(--canvas) 70%, transparent) 76%, transparent) !important;
  }

  .is-world .wp--band .wp__body,
  .is-world .wp--split .wp__body,
  .is-world .wp--card .wp__body,
  .is-world .wp--wide .wp__body,
  .is-world .wp--close .wp__body {
    top: calc(var(--chrome-h) + var(--s-3));
    bottom: auto;
  }

  .is-world .wp--band .wp__plate,
  .is-world .wp--split .wp__plate,
  .is-world .wp--card .wp__plate,
  .is-world .wp--wide .wp__plate,
  .is-world .wp--close .wp__plate {
    top: 0 !important;
    bottom: auto !important;
    height: 46% !important;
    background: linear-gradient(to bottom, var(--canvas) 55%, transparent) !important;
  }

  .is-world .panel {
    left: var(--gutter);
    right: var(--gutter);
    bottom: max(var(--s-4), env(safe-area-inset-bottom));
    max-height: calc(100svh - var(--chrome-h) - 9.5rem);
    overflow: auto;
    overscroll-behavior: contain;
  }

  .is-world .wp--split .lede,
  .is-world .wp--card .lede,
  .is-world .wp--wide .lede,
  .is-world .wp--wide .label,
  .is-world .wp--close .lede,
  .is-world .close__about {
    display: none;
  }

  .is-world .wp--band .lede {
    font-size: var(--t-small);
  }

  .is-world .colophon {
    display: none;
  }

  .is-world .stage__sim {
    top: calc(var(--chrome-h) + var(--s-2));
    bottom: auto;
  }
}

/* ---------- Panels ---------- */

/* Machine traffic */
.traffic {
  margin: 0;
  padding: var(--s-4) var(--s-5) var(--s-5);
}

.traffic__head,
.learn__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  font-size: var(--t-micro);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

.traffic__log {
  display: grid;
  gap: 2px;
  margin: var(--s-3) 0 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-data);
  font-size: 0.75rem;
  line-height: 1.55;
  min-height: calc(5 * 1.55em + 8px);
}

.traffic__log li {
  display: grid;
  grid-template-columns: 5.6em 1fr;
  gap: var(--s-3);
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.traffic__log li:last-child {
  color: var(--ink);
}

.traffic__log time {
  color: var(--ink-faint);
}

.traffic__route {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Vision */
.vision {
  padding: var(--s-3);
}

.vision__viewport {
  position: relative;
  display: grid;
}

.vision__loading,
.vision__error {
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  margin: 0;
  color: var(--ink-soft);
  font-size: var(--t-small);
  text-align: center;
  padding: var(--s-6);
}

.shot {
  grid-area: 1 / 1;
  margin: 0;
  display: grid;
  gap: var(--s-3);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t-ui) var(--ease-out), visibility 0s linear var(--t-ui);
}

.shot.is-current {
  opacity: 1;
  visibility: visible;
  transition: opacity var(--t-ui) var(--ease-out);
}

.shot__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface-2);
}

.shot__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* An honest empty slot: crop marks, a cross, and what photo is needed */
.shot__slot {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: end;
  justify-items: start;
  padding: var(--s-5);
  background:
    linear-gradient(to bottom right, transparent calc(50% - 0.5px), var(--line) calc(50% - 0.5px), var(--line) calc(50% + 0.5px), transparent calc(50% + 0.5px)),
    linear-gradient(to top right, transparent calc(50% - 0.5px), var(--line) calc(50% - 0.5px), var(--line) calc(50% + 0.5px), transparent calc(50% + 0.5px));
  text-align: center;
}

.shot__slot::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px dashed var(--line-strong);
}

.shot__need {
  position: relative;
  z-index: 1;
  max-width: 26rem;
  padding: var(--s-2) var(--s-3);
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: var(--t-micro);
  line-height: 1.5;
  color: var(--ink-soft);
  text-align: left;
}

.shot__need strong {
  display: block;
  color: var(--ink);
  font-weight: 600;
  margin-bottom: var(--s-1);
}

.shot__overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.shot__tag {
  position: absolute;
  top: var(--s-3);
  left: var(--s-3);
  z-index: 2;
}

.box {
  position: absolute;
  border: 1.5px solid #f2f2f4;
  box-shadow: 0 0 0 1px rgba(11, 11, 12, 0.45);
  opacity: 0;
  transform: scale(1.06);
  transition:
    opacity 260ms var(--ease-out),
    transform 260ms var(--ease-out);
}

.shot.is-current .box {
  opacity: 1;
  transform: none;
}

.shot.is-current .box:nth-child(2) {
  transition-delay: 60ms;
}

.shot.is-current .box:nth-child(3) {
  transition-delay: 120ms;
}

.box--watch {
  border-color: var(--accent);
  border-style: dashed;
}

.box--act {
  border-color: var(--accent);
  border-width: 2px;
}

.box--preview {
  border-color: var(--ink-faint);
  box-shadow: none;
}

.box--preview.box--watch,
.box--preview.box--act {
  border-color: var(--accent);
}

.box__label {
  position: absolute;
  left: -1.5px;
  bottom: 100%;
  margin-bottom: 2px;
  padding: 0.15em 0.45em;
  background: #f2f2f4;
  color: #0b0b0c;
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
  border-radius: 1px;
}

.box--watch .box__label,
.box--act .box__label {
  background: var(--accent);
  color: var(--accent-ink);
}

.box--preview .box__label {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line-strong);
}

.box--preview.box--watch .box__label,
.box--preview.box--act .box__label {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

.box--redact {
  border: 0;
  box-shadow: none;
  background: rgba(11, 11, 12, 0.85);
}

.box--redact .box__label {
  display: none;
}

.event {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--s-1) var(--s-3);
  padding: var(--s-3) var(--s-4);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--canvas);
}

.event .chip {
  justify-self: start;
}

.event__title {
  font-size: var(--t-small);
  font-weight: 600;
}

.event__source {
  grid-column: 1 / -1;
}

.event__detail {
  grid-column: 1 / -1;
  font-size: var(--t-micro);
  color: var(--ink-soft);
}

.event__time {
  font-size: var(--t-micro);
  color: var(--ink-faint);
}

.vision__controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  margin-top: var(--s-3);
}

.vision__dots {
  display: flex;
  gap: var(--s-1);
  margin: 0;
  padding: 0;
  list-style: none;
}

.vision__dots button {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  min-height: 36px;
  padding: 0 var(--s-2);
  border: 0;
  background: none;
  color: var(--ink-faint);
  font: inherit;
  font-size: var(--t-micro);
  font-weight: 560;
  cursor: pointer;
  border-bottom: 1px solid transparent;
}

.vision__dots button[aria-current="true"] {
  color: var(--ink);
  border-bottom-color: var(--neon);
}

/* Decision */
.decision {
  display: grid;
  gap: var(--s-4);
  padding: var(--s-5);
}

.decision__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
}

.decision__due {
  font-size: var(--t-micro);
  font-weight: 560;
  color: var(--ink-soft);
}

.decision__title {
  font-size: 1.125rem;
  line-height: 1.35;
}

.decision__facts {
  display: grid;
  gap: var(--s-2);
  margin: 0;
}

.decision__facts div {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: var(--s-3);
  padding-top: var(--s-2);
  border-top: 1px solid var(--line);
  font-size: var(--t-small);
}

.decision__facts dt {
  color: var(--ink-faint);
}

.decision__facts dd {
  margin: 0;
}

.decision__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
}

.decision__status:empty {
  display: none;
}

.decision__status {
  font-size: var(--t-small);
  color: var(--ink-soft);
}

.decision[data-state="approved"] .decision__status {
  color: var(--ink);
}

.decision[data-state="approved"] .chip--watch {
  color: var(--ink-soft);
  border-color: var(--line-strong);
}

.decision__foot {
  margin-top: calc(var(--s-2) * -1);
}

.segmented {
  display: inline-flex;
  gap: 0;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
}

.segmented legend {
  float: left;
  padding: 0 var(--s-3);
  align-self: center;
  font-size: var(--t-small);
  color: var(--ink-faint);
}

.segmented label {
  position: relative;
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  min-height: 36px;
  border-left: 1px solid var(--line);
  font-size: var(--t-small);
  cursor: pointer;
}

.segmented input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}

.segmented label:has(input:checked) {
  background: var(--ink);
  color: var(--canvas);
}

.segmented label:has(input:focus-visible) {
  outline: 2px solid var(--neon);
  outline-offset: 2px;
}

/* Learn */
.learn {
  display: grid;
  gap: var(--s-4);
  padding: var(--s-5);
}

.learn__head {
  justify-content: flex-start;
}

.learn__head .badge-sim {
  margin-left: auto;
}

.learn__stage {
  margin: 0;
}

.learn__acc {
  display: flex;
  align-items: baseline;
  gap: var(--s-2);
  margin: 0;
}

.learn__acc-value {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.learn__acc-value.is-empty {
  font-family: var(--font-text);
  font-size: var(--t-small);
  font-weight: 500;
  color: var(--ink-soft);
}

.learn__acc-label {
  font-size: var(--t-micro);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink-faint);
}

.chart {
  margin: 0;
  display: grid;
  gap: var(--s-2);
}

.chart__title {
  font-size: var(--t-micro);
  color: var(--ink-soft);
}

.chart__svg {
  width: 100%;
  height: clamp(150px, 22vh, 220px);
  overflow: visible;
}

.chart__summary {
  font-size: var(--t-micro);
  color: var(--ink-faint);
  min-height: 1.5em;
}

.chart .grid {
  stroke: var(--line);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.chart .axis-text {
  fill: var(--ink-faint);
  font-family: var(--font-text);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.chart .now {
  stroke: var(--ink-faint);
  stroke-width: 1;
  stroke-dasharray: 2 3;
  vector-effect: non-scaling-stroke;
}

/* Emphasis form: history in the de-emphasis grey, the forecast in the neon */
.chart .history {
  fill: none;
  stroke: var(--ink-soft);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.chart .end {
  fill: var(--ink-soft);
  stroke: var(--surface);
  stroke-width: 2;
}

.chart .band {
  fill: var(--neon-wash);
  stroke: none;
}

.chart .forecast {
  fill: none;
  stroke: var(--neon);
  stroke-width: 2;
  stroke-dasharray: 6 4;
  stroke-linejoin: round;
}

.chart .quarter {
  fill: var(--surface-2);
  opacity: 0.55;
}

.chart .cross {
  stroke: var(--line-strong);
  stroke-width: 1;
}

.chart .hover-dot {
  fill: var(--ink-soft);
  stroke: var(--surface);
  stroke-width: 2;
}

.chart .hover-dot--forecast {
  fill: var(--neon);
}

.chart .chart__direct {
  fill: var(--ink-soft);
  font-weight: 600;
}

.chart .chart__direct--end {
  text-anchor: end;
}

.chart .chart__direct--forecast {
  fill: var(--neon);
}

.chart .chart__note {
  fill: var(--ink-faint);
  font-size: 10px;
  letter-spacing: 0.02em;
}

.chart .chart__empty {
  fill: var(--ink-soft);
  font-size: 12px;
}

.chart {
  position: relative;
}

.chart__svg:focus-visible {
  outline: 2px solid var(--neon);
  outline-offset: 4px;
}

.chart__tip {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
  padding: var(--s-1) var(--s-2);
  background: var(--ink);
  color: var(--canvas);
  font-size: var(--t-micro);
  font-weight: 560;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  border-radius: var(--radius);
  pointer-events: none;
}

.chart__table summary {
  font-size: var(--t-micro);
  font-weight: 560;
  color: var(--ink-soft);
  cursor: pointer;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
}

.chart__table table {
  width: 100%;
  margin-top: var(--s-2);
  border-collapse: collapse;
  font-size: var(--t-micro);
  font-variant-numeric: tabular-nums;
}

.chart__table th,
.chart__table td {
  padding: var(--s-1) var(--s-2);
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.chart__table th {
  color: var(--ink-faint);
  font-weight: 560;
}

.maturity {
  display: grid;
  gap: var(--s-2);
}

.maturity__row {
  display: flex;
  align-items: center;
  gap: var(--s-3);
}

.maturity__label {
  font-size: var(--t-small);
  font-weight: 560;
}

.maturity__out {
  font-size: var(--t-small);
  color: var(--ink-soft);
}

.maturity__row .btn {
  margin-left: auto;
}

.maturity__input {
  width: 100%;
  height: 44px;
  margin: 0;
  background: transparent;
  accent-color: var(--neon);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.maturity__input::-webkit-slider-runnable-track {
  height: 2px;
  background: linear-gradient(to right, var(--neon) var(--fill, 0%), var(--line-strong) var(--fill, 0%));
}

.maturity__input::-moz-range-track {
  height: 2px;
  background: var(--line-strong);
}

.maturity__input::-moz-range-progress {
  height: 2px;
  background: var(--neon);
}

.maturity__input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -8px;
  background: var(--neon);
  border: 0;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
}

.maturity__input::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: var(--neon);
  border: 0;
  border-radius: 0;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
}

.maturity__ticks {
  display: flex;
  justify-content: space-between;
  margin-top: calc(var(--s-3) * -1);
  font-size: 0.6875rem;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}

.suggest {
  display: grid;
  gap: var(--s-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.suggest__empty {
  font-size: var(--t-small);
  color: var(--ink-soft);
  padding: var(--s-3) 0;
  border-top: 1px solid var(--line);
}

.suggest__item {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  align-items: baseline;
  gap: var(--s-3);
  padding-top: var(--s-2);
  border-top: 1px solid var(--line);
  font-size: var(--t-small);
  animation: arrive 320ms var(--ease-out);
}

.suggest__item .chip {
  justify-self: start;
}

@keyframes arrive {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
}

.learn__note {
  font-size: var(--t-micro);
  color: var(--ink-faint);
}

/* Contact */
.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-4) var(--s-4);
  padding: var(--s-6);
}

.contact__title {
  grid-column: 1 / -1;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.field {
  display: grid;
  gap: var(--s-1);
  align-content: start;
}

.field--wide {
  grid-column: 1 / -1;
}

/* The bot trap: off-screen rather than display:none, which many bots skip */
.field--trap {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.field label {
  font-size: var(--t-small);
  font-weight: 560;
}

.field__opt {
  font-weight: 400;
  color: var(--ink-faint);
}

.field input,
.field textarea {
  width: 100%;
  min-height: 44px;
  padding: var(--s-2) var(--s-3);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--canvas);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  caret-color: var(--neon);
  transition: border-color var(--t-fast) var(--ease-out);
}

.field textarea {
  resize: vertical;
  min-height: 5.5rem;
}

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

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: var(--accent);
}

.field__error {
  font-size: var(--t-micro);
  color: var(--accent);
  font-weight: 560;
}

.field__error:empty {
  display: none;
}

.field__hint {
  font-size: var(--t-micro);
  color: var(--ink-faint);
}

.contact__actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-3) var(--s-4);
}

.contact__note {
  font-size: var(--t-micro);
  color: var(--ink-faint);
  max-width: 18rem;
}

.contact__status {
  grid-column: 1 / -1;
  font-size: var(--t-small);
}

.contact__status:empty {
  display: none;
}

@media (max-width: 767.98px), (orientation: portrait) and (max-width: 1099.98px) {
  .contact {
    grid-template-columns: 1fr;
    padding: var(--s-5);
  }

  .is-world .contact .field__hint {
    display: none;
  }

  /* Phones: one line of slot text, prev and next instead of tabs */
  .shot__need {
    font-size: 0.6875rem;
  }

  .shot__need > :not(strong),
  .is-world .vision__dots {
    display: none;
  }

  .shot__need strong {
    margin: 0;
  }

  .is-world .learn {
    gap: var(--s-3);
    padding: var(--s-4);
  }

  .is-world .learn .chart__svg {
    height: 132px;
  }

  .is-world .learn .chart__summary,
  .is-world .learn .chart__table,
  .is-world .learn .learn__note,
  .is-world .learn__head .badge-sim,
  .is-world .learn .chart__title {
    display: none;
  }

  .maturity__row {
    flex-wrap: wrap;
  }

  .maturity__label {
    white-space: nowrap;
  }

  .decision__facts div,
  .suggest__item {
    grid-template-columns: 1fr;
    gap: var(--s-1);
  }
}

@media (max-height: 760px) and (min-width: 768px) {
  .is-world .learn .chart__svg {
    height: 130px;
  }

  .is-world .learn .learn__note,
  .is-world .contact .field__hint {
    display: none;
  }
}
