:root {
  color-scheme: dark;
  --ink: #11131a;
  --panel: #191c25;
  --paper: #f4f1e8;
  --muted: #9ba0ad;
  --line: #343846;
  --acid: #d7ff56;
  --orange: #ff6848;
  --blue: #7489ff;
  --sans: "Avenir Next", Avenir, "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  --mono: "SFMono-Regular", "Cascadia Code", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(rgb(255 255 255 / 2%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 2%) 1px, transparent 1px),
    var(--ink);
  background-size: 56px 56px;
  color: var(--paper);
  font-family: var(--sans);
}

button,
input,
textarea { font: inherit; }
button { color: inherit; }

.site-header,
main,
footer {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  color: inherit;
  text-decoration: none;
  font: .72rem/1 var(--mono);
  letter-spacing: .09em;
  text-transform: uppercase;
}

.brand-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--acid);
  color: var(--ink);
  font: 700 1rem/1 var(--mono);
}

.local-note {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #c4c7d0;
  font: .68rem/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.local-note i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 0 4px rgb(215 255 86 / 12%);
}

.hero {
  min-height: 650px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 82px 0 58px;
}

.eyebrow,
.section-head > p,
.section-label {
  margin: 0 0 30px;
  color: var(--acid);
  font: .7rem/1.3 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p { margin-top: 0; }

h1 {
  max-width: 1050px;
  margin-bottom: 46px;
  font-size: clamp(4.4rem, 10.4vw, 9.4rem);
  line-height: .83;
  letter-spacing: -.085em;
  font-weight: 600;
}

h1 em {
  display: block;
  color: var(--orange);
  font-family: Georgia, serif;
  font-weight: 400;
}

.hero-bottom {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 48px;
}

.hero-bottom > p {
  max-width: 670px;
  margin: 0;
  color: #b8bdc8;
  font-size: 1.15rem;
  line-height: 1.65;
}

.example-button,
.reset-button {
  padding: 0 0 8px;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  cursor: pointer;
  font: .7rem/1.3 var(--mono);
  letter-spacing: .07em;
  text-transform: uppercase;
}

.example-button span { margin-left: 12px; color: var(--acid); }

.signal {
  display: flex;
  align-items: center;
  margin-top: 76px;
  color: #777d8b;
  font: .64rem/1 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
}

.signal b {
  flex: 1;
  height: 1px;
  margin: 0 14px;
  background: linear-gradient(90deg, var(--line), var(--acid));
}

.builder {
  padding: 92px 0 104px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 0 0 100vmax var(--paper);
  clip-path: inset(0 -100vmax);
}

.section-head {
  display: grid;
  grid-template-columns: 1fr 2.1fr;
  gap: 32px;
  align-items: start;
  margin-bottom: 58px;
}

.section-head > p { color: var(--orange); margin-top: 9px; }
.section-head h2,
.result-head h2,
.empty h2 {
  margin-bottom: 0;
  font-size: clamp(2.5rem, 5.2vw, 5.3rem);
  line-height: .96;
  letter-spacing: -.065em;
}

form {
  display: grid;
  gap: 26px;
}

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

.field > span,
.kind-fieldset legend {
  font: 600 .67rem/1.3 var(--mono);
  letter-spacing: .09em;
  text-transform: uppercase;
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid #c9c9c2;
  border-radius: 0;
  outline: none;
  background: #fffefa;
  color: var(--ink);
}

.field input { height: 64px; padding: 0 18px; }
.field textarea {
  min-height: 122px;
  padding: 17px 18px;
  resize: vertical;
  line-height: 1.5;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgb(116 137 255 / 16%);
}

.field input::placeholder,
.field textarea::placeholder { color: #999b9d; }

.field-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.kind-fieldset {
  margin: 8px 0 0;
  padding: 0;
  border: 0;
}

.kind-fieldset legend { margin-bottom: 12px; }
.kind-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid #c9c9c2;
  border-left: 1px solid #c9c9c2;
}

.kind-card {
  position: relative;
  min-height: 96px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  border-right: 1px solid #c9c9c2;
  border-bottom: 1px solid #c9c9c2;
  cursor: pointer;
  font-size: .88rem;
}

.kind-card input {
  position: absolute;
  opacity: 0;
}

.kind-index {
  color: #8c8f93;
  font: .62rem/1 var(--mono);
}

.kind-card:has(input:checked) {
  background: var(--ink);
  color: var(--paper);
}

.kind-card:has(input:focus-visible) { outline: 3px solid var(--blue); outline-offset: -3px; }
.kind-card:has(input:checked) .kind-index { color: var(--acid); }

.primary-button {
  min-height: 66px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 0;
  background: var(--orange);
  color: #160d0b;
  cursor: pointer;
  font-weight: 700;
}

.primary-button:hover { background: #ff7a5f; }
.primary-button span { font-size: 1.5rem; }

.output { padding: 96px 0 110px; }
.empty {
  min-height: 260px;
  display: grid;
  grid-template-columns: .45fr 2fr;
  align-items: start;
}
.empty-number {
  color: var(--acid);
  font: 1rem/1 var(--mono);
}
.empty h2 { max-width: 780px; font-size: clamp(2.6rem, 6vw, 6rem); }
.empty p { color: var(--muted); margin-top: 20px; }

.result-head {
  display: flex;
  justify-content: space-between;
  gap: 36px;
  align-items: end;
  margin-bottom: 34px;
}
.result-head h2 { max-width: 850px; font-size: clamp(2.5rem, 5.6vw, 5.8rem); }
.result-head > div > p:last-child { margin: 22px 0 0; color: var(--muted); }
.ruled-out {
  margin-bottom: 36px;
  padding: 17px 20px;
  border-left: 3px solid var(--acid);
  background: var(--panel);
  color: #c8ccd5;
  font: .76rem/1.55 var(--mono);
}

.experiments { border-top: 1px solid var(--line); }
.experiment {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 24px;
  padding: 38px 0;
  border-bottom: 1px solid var(--line);
}
.experiment-number {
  color: var(--acid);
  font: 1.1rem/1 var(--mono);
}
.experiment h3 {
  margin-bottom: 12px;
  font-size: clamp(1.5rem, 2.5vw, 2.25rem);
  letter-spacing: -.04em;
}
.experiment p {
  max-width: 780px;
  margin-bottom: 16px;
  color: #bec2cc;
  line-height: 1.6;
}
.experiment small {
  display: block;
  max-width: 780px;
  color: #858b98;
  font: .72rem/1.6 var(--mono);
}
.experiment small b { color: var(--orange); text-transform: uppercase; }

.outcome {
  margin: 24px 0 0;
  padding: 0;
  border: 0;
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.outcome legend {
  width: 100%;
  margin-bottom: 9px;
  color: #858b98;
  font: .63rem/1 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.outcome label { cursor: pointer; }
.outcome input { position: absolute; opacity: 0; }
.outcome span {
  display: block;
  padding: 9px 13px;
  border: 1px solid var(--line);
  color: #b8bdc8;
  font: .68rem/1 var(--mono);
}
.outcome input:checked + span {
  border-color: var(--acid);
  background: var(--acid);
  color: var(--ink);
}

.decision-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 16px;
  margin-top: 42px;
}
.decision,
.decision-grid aside {
  min-height: 220px;
  padding: 30px;
  background: var(--panel);
}
.decision > span,
.decision-grid aside > span {
  display: block;
  margin-bottom: 32px;
  color: var(--acid);
  font: .63rem/1 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.decision strong {
  display: block;
  margin-bottom: 10px;
  font-size: clamp(1.5rem, 3vw, 2.5rem);
}
.decision p,
.decision-grid aside p {
  color: #b8bdc8;
  line-height: 1.55;
}
.decision[data-state="stop"] { background: var(--orange); color: var(--ink); }
.decision[data-state="stop"] > span,
.decision[data-state="stop"] p { color: #32130c; }
.decision[data-state="proceed"] { background: var(--acid); color: var(--ink); }
.decision[data-state="proceed"] > span,
.decision[data-state="proceed"] p { color: #29300f; }

footer {
  min-height: 110px;
  padding: 30px 0;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  border-top: 1px solid var(--line);
  color: #7e8491;
  font: .65rem/1.4 var(--mono);
  text-transform: uppercase;
  letter-spacing: .06em;
}
footer p { margin: 0; text-align: center; }

@media (max-width: 760px) {
  .site-header,
  main,
  footer { width: min(100% - 32px, 1180px); }
  .site-header { min-height: 68px; }
  .local-note { font-size: 0; }
  .local-note i { display: block; }
  .hero { min-height: auto; padding: 72px 0 42px; }
  h1 { font-size: clamp(3.5rem, 20vw, 6.2rem); margin-bottom: 36px; }
  .hero-bottom { display: block; }
  .hero-bottom > p { font-size: 1rem; }
  .example-button { margin-top: 30px; }
  .signal { margin-top: 52px; }
  .builder { padding: 68px 0 78px; }
  .section-head { display: block; margin-bottom: 38px; }
  .section-head > p { margin-bottom: 24px; }
  .field-pair,
  .kind-grid,
  .decision-grid { grid-template-columns: 1fr; }
  .kind-card { min-height: 74px; }
  .output { padding: 72px 0 82px; }
  .empty { display: block; }
  .empty-number { display: block; margin-bottom: 24px; }
  .result-head { display: block; }
  .reset-button { margin-top: 24px; }
  .experiment { grid-template-columns: 48px 1fr; gap: 12px; padding: 30px 0; }
  .decision,
  .decision-grid aside { min-height: auto; }
  footer { display: block; text-align: center; }
  footer p { margin: 12px 0; }
}

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