/* Populace waitlist. One number, 150 dots, ink on paper. Aqua means paid, red means gone. */

:root {
  --bg: #fbfbf8;
  --ink: #0c0c0b;
  --ink-2: #3a3a37;
  --ink-3: #66665f;
  --line: #e5e4de;
  --line-2: #c7c6be;
  --red: #ff4a2b;
  --red-ink: #c4321a;
  --aqua: #72e0d1;
  --panel: #0c0c0b;
  --panel-ink: #fbfbf8;
  --panel-2: #a9a9a2;
  --panel-line: #3a3a37;
  --l0: #f4f3ee;
  --l1: #ecebe4;
  --l2: #e3e1d8;
  --l3: #d9d6cb;
  /* Form colors on the page; the dark panels swap these. */
  --f-ink: var(--ink);
  --f-2: var(--ink-3);
  --f-bad: var(--red-ink);
  --f-btn: var(--ink);
  --f-btn-ink: var(--bg);
  --f-focus: var(--ink);
  /* The testing hall */
  --floor: #f1f0ea;
  --wall: #e5e3db;
  --window: #fbfbf8;
  --desk: #ffffff;
  --desk-front: #d6d3c8;
  --screen: #2c2c29;
  --gutter: clamp(16px, 4.5vw, 64px);
  --bar: 64px;
  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0c0b;
    --ink: #f3f3ee;
    --ink-2: #c6c6bf;
    --ink-3: #98988f;
    --line: #232321;
    --line-2: #3c3c38;
    --red: #ff5a3d;
    --red-ink: #ff7d66;
    --panel: #181816;
    --panel-ink: #f3f3ee;
    --panel-2: #a3a39b;
    --panel-line: #34342f;
    --l0: #141413;
    --l1: #1c1c1a;
    --l2: #252522;
    --l3: #2f2f2b;
    --f-btn: var(--aqua);
    --f-btn-ink: #0c0c0b;
    --f-focus: var(--aqua);
    --floor: #141413;
    --wall: #1c1c1a;
    --window: #263231;
    --desk: #2b2b28;
    --desk-front: #1e1e1c;
    --screen: #4d4d47;
    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.5 var(--font);
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
p,
ol,
ul {
  margin: 0;
}

ol,
ul {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
}

button {
  font: inherit;
  cursor: pointer;
}

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

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

.trap {
  position: absolute;
  left: -9999px;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(0.35em);
  }
}

/* ---------- Top bar ---------- */

.bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: calc(var(--bar) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) var(--gutter) 0;
  background: var(--bg);
  transition: box-shadow 0.2s;
}

.bar.scrolled {
  box-shadow: 0 1px 0 var(--line);
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.mark svg {
  width: 16px;
  height: 16px;
  fill: var(--ink);
}

.mark .gone {
  fill: var(--red);
}

.bar-cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 4px;
  background: var(--f-btn);
  color: var(--f-btn-ink);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
}

/* Small mono labels: the instrument panel voice. */
.hud {
  font: 500 12px/1.35 var(--mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ---------- The countdown ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  grid-template-areas:
    "count globe"
    "split globe"
    "signup globe";
  column-gap: clamp(24px, 5vw, 96px);
  align-content: center;
  min-height: 100svh;
  padding: calc(var(--bar) + 28px) var(--gutter) 40px;
  overflow-x: clip;
}

.count {
  grid-area: count;
}

.num {
  position: relative;
  display: inline-block;
  margin-left: -0.04em;
  font-weight: 800;
  font-variation-settings: "wdth" 62;
  font-size: clamp(120px, min(26vw, 42svh), 420px);
  line-height: 0.8;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
}

/* How many just left drifts off the number: −1, −3, −2… */
.minus {
  position: absolute;
  left: 100%;
  top: 0.02em;
  margin-left: 0.1em;
  font: 700 0.13em/1 var(--mono);
  letter-spacing: 0;
  color: var(--red-ink);
  opacity: 0;
  pointer-events: none;
}

.minus.go {
  animation: minus 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes minus {
  0% {
    opacity: 0;
    transform: translateY(0.5em);
  }
  15% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-0.6em);
  }
}

.cap {
  margin-top: clamp(12px, 1.6vw, 20px);
  font-weight: 600;
  font-size: clamp(22px, 2.4vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.cap-in,
.cap .why {
  display: block;
  width: fit-content;
}

.cap .why {
  margin-top: 10px;
  font-size: max(16px, 0.6em);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--red-ink);
  visibility: hidden;
}

.hero.done .cap .why {
  visibility: visible;
  animation: rise 0.35s 0.15s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
}

.cap.swap .cap-in {
  animation: rise 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.cap.paid .cap-in {
  padding: 0 0.12em;
  margin-left: -0.12em;
  background: var(--aqua);
  color: #0c0c0b;
}

/* 150 people as one bar, then a table of why. */
.split {
  grid-area: split;
  max-width: 560px;
  margin-top: clamp(18px, 3svh, 30px);
}

.split-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.split-paid {
  padding: 0 5px;
  background: var(--aqua);
  color: #0c0c0b;
  opacity: 0;
  transition: opacity 0.3s;
}

.hero.done .split-paid {
  opacity: 1;
}

.bar150 {
  display: flex;
  gap: 2px;
  height: 8px;
}

.bar150 i {
  flex: 0 0 0;
  min-width: 0;
  border-radius: 1px;
  transition: flex-grow 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.bar150 i[hidden] {
  display: none;
}

.bar150 [data-r="0"],
.legend [data-r="0"]::before {
  background: color-mix(in srgb, var(--red) 38%, var(--bg));
}
.bar150 [data-r="1"],
.legend [data-r="1"]::before {
  background: color-mix(in srgb, var(--red) 56%, var(--bg));
}
.bar150 [data-r="2"],
.legend [data-r="2"]::before {
  background: color-mix(in srgb, var(--red) 76%, var(--bg));
}
.bar150 [data-r="3"],
.legend [data-r="3"]::before {
  background: var(--red);
}

.bar150 .rest {
  background: var(--ink);
  transition:
    flex-grow 0.25s cubic-bezier(0.2, 0.8, 0.2, 1),
    background 0.4s;
}

.hero.done .bar150 .rest {
  background: var(--aqua);
}

.legend {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.3;
}

.legend li {
  display: grid;
  grid-template-columns: 8px 3.4em minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-top: 1px solid var(--line);
  color: var(--ink-2);
  opacity: 0.4;
  transition: opacity 0.3s;
}

.legend li.on {
  opacity: 1;
}

.legend li::before {
  content: "";
  width: 8px;
  height: 8px;
}

.legend b {
  font: 700 13px var(--mono);
  text-align: right;
  color: var(--red-ink);
}

.legend em {
  font: 500 12px var(--mono);
  font-style: normal;
  color: var(--ink-3);
}

/* The planet */
.globe-wrap {
  grid-area: globe;
  position: relative;
  justify-self: center;
  align-self: center;
  width: min(100%, calc(100svh - 140px), 640px);
  aspect-ratio: 1;
}

.globe {
  display: block;
  width: 100%;
  height: 100%;
  animation: arrive 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes arrive {
  from {
    opacity: 0;
    transform: scale(0.94) rotate(-4deg);
  }
}

@keyframes blink {
  to {
    visibility: hidden;
  }
}

.tag {
  position: absolute;
  z-index: 1;
  padding: 6px 10px;
  border: 1px solid var(--line-2);
  border-radius: 2px;
  background: var(--bg);
  font-size: 13px;
  line-height: 1.35;
  white-space: nowrap;
  box-shadow: 0 8px 24px -12px rgb(0 0 0 / 0.35);
  transform: translateY(-50%);
  pointer-events: none;
}

.tag.pop {
  animation: fade 0.18s ease-out;
}

@keyframes fade {
  from {
    opacity: 0;
  }
}

.tag b,
.tag span,
.tag small {
  display: block;
}

.tag b {
  font-weight: 700;
}

.tag span {
  color: var(--red-ink);
}

.tag small {
  margin-top: 2px;
  font: 500 12px var(--mono);
  color: var(--ink-3);
}

.hero .signup {
  grid-area: signup;
  max-width: 560px;
  margin-top: clamp(18px, 3svh, 28px);
}

.lead {
  display: block;
  font-weight: 700;
  font-size: 18px;
}

.hero .field {
  margin-top: 8px;
}

/* ---------- Inside Populace: the product's own hall, its report filling in on both sides ---------- */

/* On a laptop or bigger, the whole section is one screen: heading, room, report, keys. */
.inside {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  padding: calc(var(--bar) + 22px) var(--gutter) 26px;
}

.in-head {
  text-align: center;
}

.inside h2 {
  font-weight: 800;
  font-size: clamp(32px, 3.6vw, 58px);
  line-height: 1;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.inside h2 span {
  background: linear-gradient(transparent 62%, var(--aqua) 62%, var(--aqua) 92%, transparent 92%);
}

.pitch {
  max-width: 780px;
  margin: 12px auto 0;
  text-wrap: balance;
  font-size: clamp(16px, 1.3vw, 19px);
  line-height: 1.45;
  color: var(--ink-2);
}

.in-stage {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(230px, 1fr) minmax(0, 2.5fr) minmax(230px, 1fr);
  gap: 22px;
  width: 100%;
  max-width: 1560px;
  min-height: 460px;
  margin: 22px auto 0;
}

.hall-frame {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.h-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 16px;
  padding: 0 2px 10px;
}

.h-clock i {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  background: var(--red);
  animation: blink 1s steps(2, start) infinite;
}

.h-clock b,
.h-count b {
  font-weight: 700;
  color: var(--ink);
}

.h-count {
  display: flex;
  align-items: center;
  gap: 14px;
}

.hall-wrap {
  position: relative;
  flex: 1;
  min-height: 0;
}

/* Corner brackets, like a viewfinder on the room. */
.hall-wrap::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: -6px;
  background:
    linear-gradient(var(--ink-3), var(--ink-3)) top left / 14px 1.5px,
    linear-gradient(var(--ink-3), var(--ink-3)) top left / 1.5px 14px,
    linear-gradient(var(--ink-3), var(--ink-3)) top right / 14px 1.5px,
    linear-gradient(var(--ink-3), var(--ink-3)) top right / 1.5px 14px,
    linear-gradient(var(--ink-3), var(--ink-3)) bottom left / 14px 1.5px,
    linear-gradient(var(--ink-3), var(--ink-3)) bottom left / 1.5px 14px,
    linear-gradient(var(--ink-3), var(--ink-3)) bottom right / 14px 1.5px,
    linear-gradient(var(--ink-3), var(--ink-3)) bottom right / 1.5px 14px;
  background-repeat: no-repeat;
  pointer-events: none;
}

/* The product's own hall renders in here, in the product's own look. */
.hall-stage {
  --paper: #f1f0ec;
  --sheet: #fdfdfb;
  --ink: #1b1f20;
  --ink-2: #4f5759;
  --solid: #1b1f20;
  --on-solid: #f1f0ec;
  --accent: #72e0d1;
  --sans: "Atkinson Hyperlegible Next", system-ui, sans-serif;
  --mono: "Martian Mono", ui-monospace, monospace;
  position: relative;
  height: 100%;
  min-height: 380px;
  overflow: hidden;
  border-radius: 6px;
  background: var(--paper);
}

.lab-view {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.lab-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

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

.bubble {
  position: absolute;
  left: 0;
  top: 0;
  max-width: 230px;
  padding: 7px 10px;
  border: 1px solid var(--ink);
  border-radius: 10px 10px 10px 2px;
  background: var(--sheet);
  box-shadow: 3px 3px 0 rgba(29, 27, 24, 0.85);
  font: 400 12px/1.35 var(--sans);
  color: var(--ink);
  will-change: transform;
}

.bubble b {
  display: block;
  margin-bottom: 1px;
  font: 600 12px var(--mono);
  color: var(--ink-2);
}

.bubble.pop {
  animation: pop 0.35s cubic-bezier(0.2, 1.5, 0.4, 1) both;
}

@keyframes pop {
  from {
    opacity: 0;
    scale: 0.85;
  }
}

.lab-tip {
  display: none;
}

/* The report, filling in as the run gets there. */
.reports {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  min-height: 0;
  padding-top: 30px;
  overflow: hidden;
}

.b-head {
  display: flex;
  justify-content: space-between;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--ink);
}

.b-head b {
  color: var(--ink);
}

.bucket ol {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.scan {
  padding: 8px 10px;
  border: 1px dashed var(--line-2);
  border-radius: 3px;
  font: 500 12px var(--mono);
  color: var(--ink-3);
}

.card {
  padding: 8px 10px 9px;
  border: 1px solid var(--line-2);
  border-left: 3px solid var(--line-2);
  border-radius: 3px;
  background: var(--bg);
  animation: rise 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.card[data-sev="Blocker"],
.card[data-sev="Critical"] {
  border-left-color: var(--red);
}

.card[data-sev="Major"],
.card[data-sev="High"] {
  border-left-color: color-mix(in srgb, var(--red) 60%, var(--bg));
}

.c-sev {
  font: 700 12px var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.card[data-sev="Blocker"] .c-sev,
.card[data-sev="Critical"] .c-sev,
.card[data-sev="Major"] .c-sev,
.card[data-sev="High"] .c-sev {
  color: var(--red-ink);
}

.c-title {
  margin-top: 2px;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.3;
}

.c-detail {
  margin-top: 3px;
  font-size: 13px;
  line-height: 1.35;
  color: var(--ink-2);
}

.keys {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 24px;
  width: 100%;
  max-width: 1560px;
  margin: 20px auto 0;
}

.keys li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 15px;
}

/* Numbered keys */
.key {
  display: inline-grid;
  place-items: center;
  flex: none;
  min-width: 26px;
  height: 18px;
  padding: 0 4px;
  background: var(--ink);
  color: var(--bg);
  font: 700 12px/1 var(--mono);
}

/* Smaller laptops and tablets: the room on top, the report under it in two columns. */
/* Short laptop screens (or display scaling): still side by side, just tighter. */
@media (min-width: 1101px) and (max-height: 860px) {
  .inside {
    padding-top: calc(var(--bar) + 12px);
    padding-bottom: 14px;
  }
  .inside h2 {
    font-size: clamp(28px, 2.8vw, 42px);
  }
  .pitch {
    margin-top: 6px;
    font-size: 15px;
  }
  .in-stage {
    min-height: 340px;
    margin-top: 14px;
    gap: 18px;
  }
  .hall-stage {
    min-height: 300px;
  }
  .reports {
    gap: 10px;
    padding-top: 28px;
  }
  .bucket ol {
    gap: 5px;
    margin-top: 6px;
  }
  .card {
    padding: 6px 9px 7px;
  }
  .c-title {
    font-size: 13px;
  }
  .c-detail {
    font-size: 12px;
  }
  .keys {
    margin-top: 12px;
  }
  .keys li {
    padding-top: 8px;
    font-size: 14px;
  }
}

/* If the report outgrows its column, it fades out at the bottom instead of pushing the page. */
@media (min-width: 1101px) {
  .reports {
    mask-image: linear-gradient(#000 calc(100% - 28px), transparent);
  }
}

@media (max-width: 1100px) {
  .inside {
    min-height: 0;
  }
  .in-stage {
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "hall hall" "left right";
  }
  .hall-frame {
    grid-area: hall;
  }
  .reports {
    padding-top: 0;
  }
  .reports:first-child {
    grid-area: left;
  }
  .reports:last-child {
    grid-area: right;
  }
  .hall-wrap {
    flex: none;
    height: min(560px, 62svh);
  }
}

@media (max-width: 600px) {
  .in-stage {
    grid-template-columns: 1fr;
    grid-template-areas: "hall" "left" "right";
  }
  .hall-wrap {
    height: min(460px, 58svh);
  }
  .hall-stage {
    min-height: 0;
  }
  .h-count {
    gap: 10px;
  }
  .keys {
    grid-template-columns: 1fr;
  }
}


/* ---------- What you get: the selling points, as a spec sheet ---------- */

.spec {
  padding: clamp(72px, 9vw, 120px) var(--gutter);
  border-top: 1px solid var(--line);
}

.spec-head,
.sheet-rows {
  max-width: 1200px;
  margin-inline: auto;
}

.spec h2 {
  margin-top: 10px;
  font-weight: 800;
  font-size: clamp(34px, 4.6vw, 64px);
  line-height: 1;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.spec .pitch {
  margin: 14px 0 0;
}

.sheet-rows {
  margin-top: clamp(28px, 4vw, 48px);
  border-top: 1.5px solid var(--ink);
}

.sheet-rows li {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) 210px;
  gap: 28px;
  align-items: start;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.5s,
    transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.sheet-rows.on li {
  opacity: 1;
  transform: none;
}

.sheet-rows li:nth-child(2) {
  transition-delay: 0.08s;
}
.sheet-rows li:nth-child(3) {
  transition-delay: 0.16s;
}
.sheet-rows li:nth-child(4) {
  transition-delay: 0.24s;
}
.sheet-rows li:nth-child(5) {
  transition-delay: 0.32s;
}
.sheet-rows li:nth-child(6) {
  transition-delay: 0.4s;
}

.s-key {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 5px;
  color: var(--ink-2);
}

.s-h {
  font-weight: 700;
  font-size: clamp(20px, 1.9vw, 26px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.s-p {
  max-width: 640px;
  margin-top: 6px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink-2);
}

.s-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.s-chips span {
  padding: 3px 7px;
  border: 1px solid var(--line-2);
  border-radius: 2px;
  color: var(--ink-2);
}

.s-metric {
  text-align: right;
}

.s-metric b {
  display: block;
  font-weight: 800;
  font-variation-settings: "wdth" 70;
  font-size: clamp(28px, 2.6vw, 40px);
  line-height: 1;
  letter-spacing: -0.02em;
}

.s-metric span {
  display: block;
  margin-top: 6px;
  font: 500 12px/1.35 var(--mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-3);
}

@media (max-width: 860px) {
  .sheet-rows li {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "key metric" "body body";
    gap: 10px 16px;
    padding: 20px 0;
  }
  .s-key {
    grid-area: key;
  }
  .s-body {
    grid-area: body;
  }
  .s-metric {
    grid-area: metric;
  }
  .s-metric b {
    font-size: 24px;
  }
}

/* ---------- Signup ---------- */

.join-zone,
.sheet {
  --f-ink: var(--panel-ink);
  --f-2: var(--panel-2);
  --f-bad: #ff8a74;
  --f-btn: var(--aqua);
  --f-btn-ink: #0c0c0b;
  --f-focus: var(--aqua);
  background: var(--panel);
  color: var(--panel-ink);
}

.join-zone {
  padding: clamp(72px, 10vw, 140px) var(--gutter);
}

.join-zone h2 {
  max-width: 820px;
  font-weight: 800;
  font-size: clamp(36px, 5.4vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.join-zone .signup {
  max-width: 820px;
  margin-top: clamp(28px, 4vw, 44px);
}

.field {
  display: flex;
  gap: 10px;
}

.field input {
  flex: 1;
  min-width: 0;
  min-height: 56px;
  padding: 0 2px;
  border: none;
  border-bottom: 2px solid var(--f-ink);
  border-radius: 0;
  background: transparent;
  color: var(--f-ink);
  font: 500 clamp(19px, 2vw, 24px) var(--font);
  letter-spacing: -0.01em;
}

.field input::placeholder {
  color: var(--f-2);
}

.field input:focus {
  outline: none;
  border-bottom-color: var(--aqua);
}

/* A clear ring for keyboard users, strong on light and dark. */
.field input:focus-visible {
  outline: 2px solid var(--f-focus);
  outline-offset: 4px;
}

.field button,
.next {
  min-height: 56px;
  padding: 0 26px;
  border: none;
  border-radius: 4px;
  background: var(--f-btn);
  color: var(--f-btn-ink);
  font-weight: 700;
  font-size: 17px;
  white-space: nowrap;
  transition: transform 0.1s;
}

.field button:active,
.next:active {
  transform: translateY(1px);
}

.join.busy button {
  opacity: 0.6;
  pointer-events: none;
}

.msg {
  min-height: 1.5em;
  margin-top: 12px;
  font-size: 15px;
  color: var(--f-2);
}

.msg.bad {
  color: var(--f-bad);
}

.ok {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
}

.ok i {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--aqua);
}

.ok i::after {
  content: "";
  width: 9px;
  height: 5px;
  margin-top: -2px;
  border-left: 2px solid #0c0c0b;
  border-bottom: 2px solid #0c0c0b;
  transform: rotate(-45deg);
}

.hero .joined {
  margin-top: clamp(20px, 3svh, 32px);
}

.joined-note {
  margin-top: 6px;
  font-size: 16px;
  color: var(--f-2);
}

.more {
  min-height: 44px;
  padding: 0;
  border: none;
  background: none;
  color: var(--f-ink);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.more[hidden] {
  display: none;
}

/* The questions open in a sheet. */
.sheet {
  width: min(680px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100svh - 32px);
  padding: 28px clamp(20px, 4vw, 40px) 32px;
  border: none;
  border-radius: 8px;
}

.sheet::backdrop {
  background: rgb(12 12 11 / 0.6);
}

.ask-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  padding-top: 10px;
  border-top: 1px solid var(--panel-line);
  font-size: 14px;
  color: var(--panel-2);
}

.step-no {
  font-variant-numeric: tabular-nums;
}

.skip {
  min-width: 56px;
  min-height: 44px;
  padding: 0 8px;
  margin-right: -8px;
  border: none;
  background: none;
  color: var(--panel-2);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.skip:hover {
  color: var(--panel-ink);
}

.q {
  margin: 8px 0 0;
  padding: 0;
  border: none;
  min-width: 0;
}

.q legend {
  padding: 0;
  font-weight: 800;
  font-size: clamp(26px, 3.4vw, 40px);
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.q legend:focus {
  outline: none;
}

.q.enter {
  animation: rise 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.chips label {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 18px;
  border: 1.5px solid var(--panel-line);
  border-radius: 4px;
  font-weight: 500;
  font-size: 16px;
  cursor: pointer;
  transition:
    border-color 0.12s,
    background 0.12s;
}

.chips label:hover {
  border-color: var(--panel-ink);
}

.chips input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.chips label:has(input:checked) {
  border-color: var(--aqua);
  background: var(--aqua);
  color: #0c0c0b;
}

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

.next {
  margin-top: 20px;
}

.q .field {
  margin-top: 20px;
}

/* ---------- Footer ---------- */

.foot {
  display: flex;
  justify-content: space-between;
  padding: 24px var(--gutter) max(24px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--panel-line);
  background: var(--panel);
  color: var(--panel-2);
  font-size: 14px;
}


/* ---------- Short laptops ---------- */

@media (min-width: 1001px) and (max-height: 760px) {
  .hero {
    padding-top: calc(var(--bar) + 12px);
    padding-bottom: 16px;
  }
  .num {
    font-size: clamp(120px, min(26vw, 30svh), 420px);
  }
  .cap {
    font-size: 24px;
  }
  .legend {
    font-size: 13px;
  }
  .legend li {
    padding: 3px 0;
  }
}

/* ---------- Tablet ---------- */

@media (max-width: 1000px) {
  .hero {
    grid-template-columns: 1fr;
    grid-template-areas: "count" "globe" "signup" "split";
  }
  .num {
    font-size: clamp(150px, 34vw, 300px);
  }
  .globe-wrap {
    width: min(100%, 520px, calc(100svh - 560px));
    min-width: 220px;
    margin-top: 12px;
  }
  .split {
    margin-top: 40px;
  }
  .keys {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- Phone ---------- */

@media (max-width: 600px) {
  :root {
    --bar: 56px;
  }
  body {
    font-size: 16px;
  }
  .mark {
    font-size: 18px;
  }
  .bar-cta {
    padding: 0 14px;
    font-size: 14px;
  }
  .hero {
    align-content: start;
    padding-top: calc(var(--bar) + 20px);
  }
  .num {
    font-size: 56vw;
  }
  .cap {
    font-size: 22px;
  }
  .globe-wrap {
    width: clamp(220px, calc(100svh - 560px), 84vw);
  }
  .legend li {
    grid-template-columns: 8px 3em minmax(0, 1fr) auto;
    gap: 8px;
  }
  .lead {
    font-size: 17px;
  }
  .field {
    flex-direction: column;
  }
  .field button {
    width: 100%;
  }
  .sheet {
    width: 100vw;
    max-height: 92svh;
    margin: auto 0 0;
    padding: 22px 16px max(24px, env(safe-area-inset-bottom));
    border-radius: 12px 12px 0 0;
  }
  .chips label {
    font-size: 15px;
    padding: 0 14px;
  }
  .foot {
    font-size: 13px;
  }
}

/* Short phones and tablets: the signup comes before the planet so it stays on the first screen. */
@media (max-width: 1000px) and (max-height: 800px) {
  .hero {
    grid-template-areas: "count" "signup" "globe" "split";
  }
  .globe-wrap {
    width: min(84vw, 520px);
    margin-top: 28px;
  }
}

@media (max-height: 620px) and (max-width: 600px) {
  .num {
    font-size: 42vw;
  }
  .cap {
    margin-top: 8px;
    font-size: 19px;
  }
}

/* Reduced motion: no smooth scrolling and no blinking. Small fades and the turning planet stay. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .h-clock i {
    animation: none;
  }
}

@media (prefers-color-scheme: dark) {
  .hall-stage {
    --paper: #121516;
    --sheet: #1e2324;
    --ink: #e9ebe8;
    --ink-2: #bcc2bf;
    --solid: #0a0c0d;
  }
  .inside h2 span {
    background: none;
    color: var(--aqua);
  }
}

/* ---------- 404 ---------- */

.lost {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
  min-height: calc(100svh - 73px);
  padding-top: calc(var(--bar) + 48px);
}

.lost .hud {
  color: var(--panel-2);
}

.lost h1 {
  max-width: 820px;
  font-weight: 800;
  font-size: clamp(36px, 5.4vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.lost-note {
  max-width: 560px;
  color: var(--panel-2);
}
