:root {
  color-scheme: dark;
  --ink: #f5f2ff;
  --muted: #aaa4bd;
  --panel: #181520;
  --line: #393342;
  --acid: #dfff00;
  --bg: #0d0b10;
  font-family: "Arial Narrow", "Roboto Condensed", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px),
    var(--bg);
  background-size: 42px 42px;
}

button, input { font: inherit; }

.shell { width: min(1400px, calc(100% - 48px)); margin: 0 auto; }

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

.brand {
  display: inline-flex;
  gap: 13px;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
  font-weight: 900;
  font-size: 15px;
  letter-spacing: .18em;
}

.brand-mark { display: flex; align-items: end; gap: 3px; height: 22px; transform: skew(-12deg); }
.brand-mark i { display: block; width: 5px; background: var(--acid); }
.brand-mark i:nth-child(1) { height: 9px; }
.brand-mark i:nth-child(2) { height: 15px; }
.brand-mark i:nth-child(3) { height: 22px; }

.method-tag, .eyebrow {
  margin: 0;
  color: var(--acid);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .2em;
}

.method-tag { color: var(--muted); }

.hero {
  display: grid;
  grid-template-columns: minmax(320px, .78fr) minmax(590px, 1.22fr);
  gap: clamp(48px, 6vw, 105px);
  padding: clamp(58px, 7vw, 96px) 0 52px;
}

.intro h1 {
  margin: 17px 0 22px;
  font-size: clamp(46px, 5.3vw, 82px);
  line-height: .98;
  letter-spacing: -.065em;
  font-weight: 950;
}

.intro h1 em { color: var(--acid); font-style: normal; }

.lede {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.85;
}

.input-panel {
  margin-top: 37px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
  background: rgba(19, 17, 24, .93);
}

.field { padding: 20px 22px 18px; }
.field + .field { border-left: 1px solid var(--line); }

.field label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 11px;
  font-size: 13px;
  font-weight: 800;
}

.field label span { color: #777184; font-size: 10px; font-weight: 500; }

.input-wrap { display: flex; align-items: end; gap: 8px; }

.input-wrap input {
  min-width: 0;
  width: 100%;
  padding: 0;
  color: white;
  background: none;
  border: 0;
  outline: 0;
  font-size: 34px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.input-wrap b { padding-bottom: 5px; color: var(--muted); font-size: 10px; letter-spacing: .1em; }
.field:focus-within { box-shadow: inset 0 -3px var(--acid); }

.calculate {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 18px 22px;
  border: 0;
  border-top: 1px solid var(--line);
  color: #0d0b10;
  background: var(--acid);
  font-weight: 950;
  cursor: pointer;
}

.calculate:hover { background: #ecff55; }
.calculate:active { transform: translateY(1px); }
.calculate:focus-visible { outline: 3px solid white; outline-offset: 3px; }

.error {
  display: none;
  grid-column: 1 / -1;
  margin: 0;
  padding: 13px 22px;
  color: #ffb2b2;
  background: #451d26;
  font-size: 13px;
  line-height: 1.5;
}
.error.visible { display: block; }

.results {
  align-self: start;
  padding: clamp(25px, 3.5vw, 42px);
  background: #f4f0f7;
  color: #151219;
  box-shadow: 13px 13px 0 var(--acid);
}

.result-head { display: flex; justify-content: space-between; gap: 28px; margin-bottom: 35px; }
.result-head .eyebrow { color: #665c70; }
.result-head h2 { margin: 7px 0 0; font-size: clamp(26px, 3vw, 39px); letter-spacing: -.04em; }

.summary { display: flex; margin: 0; gap: 30px; }
.summary div { min-width: 106px; }
.summary dt { color: #6e6674; font-size: 10px; font-weight: 700; letter-spacing: .05em; }
.summary dd { margin: 7px 0 0; font-size: 10px; font-weight: 800; }
.summary strong { font-size: 26px; font-variant-numeric: tabular-nums; }

.scale {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  margin: 0 0 7px 72px;
  color: #877f8d;
  font-size: 9px;
  font-weight: 800;
}
.scale span:not(:first-child):not(:last-child) { text-align: center; }
.scale span:last-child { text-align: right; }

.zone-list { border-top: 1px solid #d5cfda; }

.zone {
  --zone: #aaa;
  position: relative;
  display: grid;
  grid-template-columns: 58px minmax(205px, .85fr) minmax(210px, 1.15fr);
  gap: 14px;
  align-items: center;
  min-height: 73px;
  border-bottom: 1px solid #d5cfda;
}

.zone-number {
  align-self: stretch;
  display: grid;
  place-items: center;
  color: #151219;
  background: var(--zone);
  font-size: 15px;
  font-weight: 950;
}

.zone-range { padding: 10px 0; }
.zone-range strong { display: block; font-size: 22px; font-weight: 950; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.zone-range span { color: #716a76; font-size: 10px; font-weight: 700; letter-spacing: .06em; }

.zone-copy { padding: 10px 0; }
.zone-copy strong { display: block; margin-bottom: 4px; font-size: 13px; }
.zone-copy p { margin: 0; color: #716a76; font-size: 11px; line-height: 1.5; }

.zone-meter {
  position: absolute;
  left: 72px;
  right: 0;
  bottom: 0;
  height: 3px;
  overflow: hidden;
  background: #dfd9e2;
}
.zone-meter::after { content: ""; display: block; width: var(--fill); height: 100%; background: var(--zone); animation: grow .7s cubic-bezier(.2,.8,.2,1) both; }

@keyframes grow { from { width: 0; } }

.formula-note {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px dashed #c4bdca;
  color: #6b6470;
}
.formula-note p { margin: 0; font-size: 10px; line-height: 1.6; }
.formula-note strong { color: #28232b; }
.pulse-dot { flex: 0 0 auto; width: 8px; height: 8px; margin-top: 4px; border-radius: 50%; background: #ff385c; box-shadow: 0 0 0 4px rgba(255,56,92,.13); }

footer { padding: 24px 0 44px; border-top: 1px solid var(--line); }
footer p { max-width: 720px; margin: 0; color: #716b7d; font-size: 10px; line-height: 1.7; }

@media (max-width: 1040px) {
  .hero { grid-template-columns: 1fr; }
  .intro { display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; align-items: end; }
  .intro .eyebrow, .intro h1 { grid-column: 1; }
  .lede, .input-panel { grid-column: 2; }
  .lede { grid-row: 1 / 3; align-self: start; margin-top: 28px; }
  .input-panel { margin-top: 15px; }
}

@media (max-width: 720px) {
  .shell { width: min(100% - 28px, 600px); }
  .masthead { min-height: 68px; }
  .method-tag { display: none; }
  .hero { gap: 42px; padding-top: 43px; }
  .intro { display: block; }
  .intro h1 { font-size: clamp(45px, 14vw, 65px); }
  .lede { margin-top: 0; }
  .input-panel { margin-top: 30px; }
  .result-head { display: block; }
  .summary { margin-top: 23px; }
  .results { padding: 24px 18px; box-shadow: 7px 7px 0 var(--acid); }
  .zone { grid-template-columns: 50px 1fr; gap: 12px; padding-right: 2px; }
  .zone-number { grid-row: 1 / 3; }
  .zone-range { padding: 12px 0 0; }
  .zone-copy { padding: 0 0 13px; }
  .zone-meter { left: 62px; }
  .scale { margin-left: 62px; }
}

@media (max-width: 430px) {
  .input-panel { grid-template-columns: 1fr; }
  .field + .field { border-left: 0; border-top: 1px solid var(--line); }
  .summary { justify-content: space-between; gap: 12px; }
  .summary div { min-width: 0; }
  .summary strong { font-size: 22px; }
  .scale { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; }
}
