*, *::before, *::after { box-sizing: border-box; }

:root {
  --bg: oklch(0.118 0.026 226);
  --bg-deep: oklch(0.075 0.022 232);
  --ink: oklch(0.965 0.012 150);
  --ink-soft: oklch(0.77 0.034 178);
  --ink-dim: oklch(0.58 0.04 190);
  --panel: oklch(0.17 0.034 226 / 0.82);
  --panel-2: oklch(0.215 0.04 224 / 0.88);
  --line: oklch(0.38 0.052 190 / 0.36);
  --line-strong: oklch(0.67 0.12 166 / 0.46);
  --green: oklch(0.81 0.17 159);
  --cyan: oklch(0.78 0.12 212);
  --amber: oklch(0.84 0.14 88);
  --red: oklch(0.69 0.16 28);
  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --font-body: "DM Sans", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --wide: 1380px;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
}

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  margin: 0;
  font-family: var(--font-body);
  background:
    radial-gradient(circle at 16% 4%, oklch(0.48 0.12 165 / 0.22), transparent 32rem),
    radial-gradient(circle at 78% 10%, oklch(0.48 0.12 218 / 0.18), transparent 34rem),
    linear-gradient(180deg, var(--bg), var(--bg-deep) 72%);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: 0.32;
  background-image:
    linear-gradient(oklch(0.9 0.02 180 / 0.05) 1px, transparent 1px),
    linear-gradient(90deg, oklch(0.9 0.02 180 / 0.05) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at 50% 10%, black, transparent 74%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 118%, oklch(0.58 0.12 160 / 0.12), transparent 44rem),
    repeating-radial-gradient(circle at 20% 20%, oklch(1 0 0 / 0.018) 0 1px, transparent 1px 4px);
  mix-blend-mode: screen;
}

a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
p { color: var(--ink-soft); margin: 0; }
::selection { background: oklch(0.81 0.17 159 / 0.24); color: var(--ink); }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 4px;
  box-shadow: 0 0 0 6px oklch(0.81 0.17 159 / 0.12);
}

.skip-link {
  position: fixed;
  left: 18px;
  top: 12px;
  z-index: 200;
  transform: translateY(-160%);
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--green);
  color: oklch(0.08 0.02 232);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
}

.skip-link:focus { transform: translateY(0); }

.wide {
  width: min(var(--wide), calc(100% - 40px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 14px;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(var(--wide), calc(100% - 28px));
  margin: 8px auto 0;
  padding: 10px 14px 10px 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: oklch(0.105 0.026 228 / 0.72);
  backdrop-filter: blur(20px) saturate(1.25);
  box-shadow: 0 18px 60px oklch(0.03 0.02 232 / 0.42);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--ink);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 1px solid oklch(0.81 0.17 159 / 0.38);
  border-radius: 14px;
  background: oklch(0.08 0.02 232 / 0.72);
  box-shadow: 0 0 28px oklch(0.76 0.16 170 / 0.28), inset 0 1px 0 oklch(0.92 0.02 160 / 0.12);
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 800;
  color: var(--green);
}

.brand-word { display: flex; flex-direction: column; line-height: 0.94; min-width: 0; }
.brand-word strong {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.04em;
  white-space: nowrap;
}
.brand-word span {
  margin-top: 5px;
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
}

.nav-links a {
  padding: 9px 12px;
  border-radius: 999px;
  color: var(--ink-dim);
  transition: color .18s ease, background .18s ease;
}

.nav-links a:hover { color: var(--ink); background: oklch(0.82 0.1 170 / 0.09); }

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(440px, .74fr);
  gap: clamp(24px, 4.5vw, 58px);
  align-items: start;
  min-height: calc(100svh - 72px);
  padding: clamp(38px, 5.2vw, 74px) 0 48px;
}

.hero::after {
  content: "GAUNTLET";
  position: absolute;
  right: 0;
  bottom: -18px;
  z-index: -1;
  color: oklch(0.92 0.02 160 / 0.04);
  font-family: var(--font-display);
  font-size: clamp(88px, 17vw, 230px);
  font-weight: 800;
  line-height: 0.8;
  letter-spacing: -0.07em;
  pointer-events: none;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.eyebrow::before,
.section-kicker::before {
  content: "";
  width: 34px;
  height: 1px;
  background: currentColor;
  box-shadow: 0 0 18px currentColor;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  letter-spacing: 0;
  text-wrap: balance;
}

h1 {
  max-width: 980px;
  font-size: clamp(48px, 6.8vw, 92px);
  line-height: 0.9;
  font-weight: 800;
}

h2 {
  max-width: 880px;
  font-size: clamp(34px, 5vw, 66px);
  line-height: 0.98;
  font-weight: 800;
}

.hero-lede {
  max-width: 760px;
  margin-top: 22px;
  color: oklch(0.82 0.035 180);
  font-size: clamp(18px, 1.8vw, 23px);
  line-height: 1.45;
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 17px;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  transition: transform .28s var(--ease), background .28s var(--ease), border-color .28s var(--ease), color .28s var(--ease), opacity .28s var(--ease);
}

.button:hover { transform: translateY(-2px); }
.button:active { transform: translateY(0) scale(0.985); }
.button:disabled { cursor: not-allowed; opacity: .45; transform: none; }
.button.primary { background: var(--green); color: oklch(0.08 0.02 232); }
.button.secondary { border-color: var(--line); background: oklch(0.13 0.026 228 / 0.74); color: var(--ink); }

.metric span {
  color: var(--ink-dim);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.metric {
  display: grid;
  gap: 8px;
  min-height: 94px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: oklch(0.16 0.032 226 / 0.68);
}

.metric strong {
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 24px;
  font-variant-numeric: tabular-nums;
}

.results-shell {
  padding: 70px 0;
}

.run-form,
.result-card,
.empty-state {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: oklch(0.14 0.03 226 / 0.78);
  box-shadow: 0 20px 80px oklch(0.035 0.02 232 / 0.26), inset 0 1px 0 oklch(0.92 0.02 160 / 0.08);
}

.run-form {
  display: grid;
  gap: 16px;
  padding: clamp(18px, 3vw, 28px);
}

.hero-form {
  position: sticky;
  top: 96px;
}

.form-kicker {
  margin: 0 0 8px;
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.run-form h2 {
  font-size: clamp(30px, 3.4vw, 46px);
  line-height: .98;
}

.run-form p {
  margin-top: 10px;
  max-width: 54ch;
  font-size: 14px;
}

label,
legend {
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
}

label {
  display: grid;
  gap: 8px;
}

input,
select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: oklch(0.08 0.02 232 / 0.72);
  color: var(--ink);
  padding: 0 13px;
}

input::placeholder { color: var(--ink-dim); }

.form-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 14px;
}

fieldset {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
  margin: 4px 0 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
}

fieldset label,
.toggle-row label {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
}

input[type="checkbox"] {
  width: 17px;
  min-height: 17px;
  accent-color: var(--green);
}

.toggle-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.form-error,
.payment-note {
  padding: 12px 14px;
  border: 1px solid oklch(0.69 0.16 28 / .5);
  border-radius: 14px;
  background: oklch(0.2 0.055 28 / 0.28);
  color: oklch(0.88 0.08 48);
  font-size: 14px;
}

.submit-button { justify-self: start; min-width: 156px; }

.results-shell {
  display: block;
  padding-top: 50px;
}

.results-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.empty-state,
.result-card {
  padding: clamp(18px, 3vw, 28px);
}

.empty-state strong {
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-display);
  font-size: 28px;
}

.result-card {
  display: grid;
  gap: 18px;
}

.result-top {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: start;
}

.run-id {
  color: var(--ink-dim);
  font-family: var(--font-mono);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.verdict {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
}

.verdict.CLEAR { color: var(--green); border-color: oklch(0.81 0.17 159 / .44); }
.verdict.POLISH { color: var(--cyan); border-color: oklch(0.78 0.12 212 / .44); }
.verdict.FIX { color: var(--amber); border-color: oklch(0.84 0.14 88 / .44); }
.verdict.BLOCK { color: var(--red); border-color: oklch(0.69 0.16 28 / .44); }

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.persona-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.persona-card {
  min-height: 114px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: oklch(0.1 0.024 232 / 0.5);
}

.persona-card strong {
  display: block;
  margin-bottom: 5px;
  font-family: var(--font-display);
  font-size: 20px;
}

.persona-card span {
  color: var(--ink-dim);
  font-family: var(--font-mono);
  font-size: 11px;
}

.result-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.result-links a {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 12px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 36px 0 44px;
  color: var(--ink-dim);
  font-family: var(--font-mono);
  font-size: 12px;
}

.share-page {
  padding: clamp(38px, 5vw, 74px) 0 70px;
}

.share-hero,
.share-section {
  display: grid;
  gap: 20px;
  padding: clamp(18px, 3vw, 30px) 0;
}

.share-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
}

.share-title-row h1 {
  max-width: 1120px;
  overflow-wrap: anywhere;
  font-size: clamp(44px, 6vw, 82px);
}

.share-metrics {
  margin: 10px 0 28px;
}

.share-finding-list {
  display: grid;
  gap: 12px;
}

.share-finding {
  display: grid;
  gap: 8px;
  padding: clamp(16px, 2.4vw, 22px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: oklch(0.12 0.026 232 / 0.68);
}

.share-finding span,
.share-finding small {
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.share-finding h3 {
  font-size: clamp(22px, 2.8vw, 34px);
}

.share-fix {
  padding-top: 6px;
  color: var(--ink);
}

.share-analysis {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

[hidden] { display: none !important; }

@media (max-width: 920px) {
  .wide { width: min(100% - 28px, var(--wide)); }
  .topbar {
    align-items: flex-start;
    border-radius: 28px;
  }
  .nav-links { flex-wrap: wrap; justify-content: flex-end; }
  .hero,
  .runner-shell {
    grid-template-columns: 1fr;
  }
  .hero-form { position: static; }
  .metric-grid,
  .persona-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .topbar {
    display: grid;
    grid-template-columns: 1fr;
  }
  .nav-links { justify-content: flex-start; }
  .hero { padding-top: 42px; }
  .form-row,
  fieldset {
    grid-template-columns: 1fr;
  }
  .result-top,
  .share-title-row,
  .results-head,
  .site-footer {
    display: grid;
  }
  h1 { font-size: clamp(46px, 16vw, 72px); }
}
