@font-face {
  font-family: 'Inter';
  src: url('fonts/inter.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Space Grotesk';
  src: url('fonts/space-grotesk.woff2') format('woff2');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg-0: #0a0d0a;
  --bg-1: #11161a;
  --bg-2: #1a2128;
  --text: #f1f5f0;
  --text-muted: #a8b3a8;
  --accent: #9dd31e;
  --accent-soft: #c2eb5c;
  --accent-glow: rgba(157, 211, 30, 0.35);
  --warning: #ffb547;
  --danger: #ff7a6b;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --radius: 14px;
  --radius-lg: 22px;
  --sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --serif: 'Space Grotesk', system-ui, sans-serif;
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { color-scheme: dark; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background: radial-gradient(1200px 600px at 80% -10%, rgba(157, 211, 30, 0.08), transparent 60%), var(--bg-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--accent); }
a:hover { color: var(--accent-soft); }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px clamp(16px, 4vw, 40px);
  border-bottom: 1px solid var(--line);
}
.brand-logo { height: 38px; width: auto; display: block; }
.topbar-title { font-family: var(--serif); font-weight: 600; color: var(--text-muted); font-size: 15px; }

.wrap { width: 100%; max-width: 920px; margin: 0 auto; padding: clamp(24px, 5vw, 56px) clamp(16px, 4vw, 32px) 64px; flex: 1; }

h1, h2, h3 { font-family: var(--serif); line-height: 1.1; margin: 0; }
h1 { font-size: clamp(32px, 5vw, 54px); letter-spacing: -1.2px; font-weight: 700; margin: 18px 0 16px; }
h2 { font-size: clamp(22px, 3vw, 28px); letter-spacing: -0.4px; margin-bottom: 10px; }
h3 { font-size: 18px; }
.lead { font-size: clamp(16px, 2vw, 19px); color: var(--text-muted); margin: 0 0 24px; }
.small { font-size: 14px; color: var(--text-muted); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  background: rgba(157, 211, 30, 0.10); color: var(--accent);
  padding: 8px 16px; border-radius: 999px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.4px; text-transform: uppercase;
  border: 1px solid rgba(157, 211, 30, 0.25);
}

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 26px; border-radius: 999px;
  font: inherit; font-weight: 600; font-size: 16px;
  cursor: pointer; transition: all 0.2s ease;
  border: 1px solid transparent; text-align: center; text-decoration: none;
}
.btn-primary { background: var(--accent); color: #0a0d0a; box-shadow: 0 12px 30px var(--accent-glow); }
.btn-primary:hover { background: var(--accent-soft); color: #0a0d0a; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn:disabled { opacity: 0.5; cursor: wait; transform: none; }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .scale input:focus-visible + span {
  outline: 2px solid var(--accent); outline-offset: 2px;
}

.card, .notice {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(18px, 3vw, 28px);
}
.notice { margin-top: 28px; }
.notice h2 { font-size: 18px; }
.notice ul { margin: 8px 0; padding-left: 20px; color: var(--text-muted); }
.notice li { margin-bottom: 6px; }

.dims-preview { list-style: none; padding: 0; margin: 8px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.dims-preview li { background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; font-weight: 500; }
.dims-preview li span { color: var(--accent); font-family: var(--serif); margin-right: 8px; }

/* Progress */
.progress { height: 6px; background: var(--bg-2); border-radius: 999px; overflow: hidden; }
.progress-bar { height: 100%; width: var(--p, 0%); background: var(--accent); transition: width 0.3s ease; }
.step-meta { color: var(--text-muted); font-size: 14px; margin: 10px 0 18px; }

/* Form fields */
.field { margin-bottom: 22px; }
.field > label, .field > .label { display: block; font-weight: 600; margin-bottom: 8px; }
.field .hint { font-size: 14px; color: var(--text-muted); margin: -4px 0 8px; }
input[type="text"], input[type="email"], select, textarea {
  width: 100%; font: inherit; color: var(--text);
  background: var(--bg-2); border: 1px solid var(--line-strong);
  border-radius: 12px; padding: 12px 14px;
}
textarea { min-height: 120px; resize: vertical; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-muted) 50%), linear-gradient(135deg, var(--text-muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }

.checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 8px; }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-1); cursor: pointer; }
.check input { margin-top: 4px; accent-color: var(--accent); width: 18px; height: 18px; flex: none; }
.check.is-disabled { opacity: 0.45; cursor: not-allowed; }

/* Statements */
.dim-intro { margin-bottom: 20px; }
.dim-intro h2 { margin-top: 14px; }
.legend { display: none; gap: 6px; margin: 0 0 20px; padding: 0; list-style: none; font-size: 12px; color: var(--text-muted); }
.legend li { background: var(--bg-1); border: 1px solid var(--line); border-radius: 10px; padding: 8px; }
.legend b { color: var(--accent); font-family: var(--serif); font-size: 15px; display: block; }

.statement { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--bg-1); padding: 18px 20px; margin: 0 0 14px; }
.statement.is-missing { border-color: var(--warning); }
.statement legend { padding: 0; font-weight: 600; font-family: var(--serif); font-size: 17px; margin-bottom: 4px; float: left; width: 100%; }
.statement p { clear: both; margin: 0 0 14px; color: var(--text-muted); }
.scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.scale label { position: relative; cursor: pointer; }
.scale input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.scale span {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 64px; padding: 8px 6px; border-radius: 12px;
  border: 1px solid var(--line-strong); background: var(--bg-2);
  font-size: 12px; line-height: 1.25; text-align: center; color: var(--text-muted);
  transition: all 0.15s ease;
}
.scale span b { font-family: var(--serif); font-size: 18px; color: var(--text); }
.scale label:hover span { border-color: var(--accent); }
.scale input:checked + span { background: rgba(157, 211, 30, 0.14); border-color: var(--accent); color: var(--text); }
.scale input:checked + span b { color: var(--accent); }

.form-error { color: var(--warning); font-weight: 600; margin: 12px 0 0; }
.nav { justify-content: space-between; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Result */
.result-head { display: grid; grid-template-columns: auto 1fr; gap: clamp(20px, 4vw, 40px); align-items: center; margin: 20px 0 32px; }
.score-ring {
  width: 168px; height: 168px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: conic-gradient(var(--accent) calc(var(--pct, 0) * 1%), var(--bg-2) 0);
  position: relative;
}
.score-ring::before { content: ""; position: absolute; inset: 12px; border-radius: 50%; background: var(--bg-0); }
.score-value, .score-label { position: relative; }
.score-value { font-family: var(--serif); font-size: 44px; font-weight: 700; line-height: 1; }
.score-label { font-size: 13px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 6px; }
.result-title { margin: 0 0 10px; font-size: clamp(30px, 4.5vw, 46px); }
.result-head .lead { margin-bottom: 10px; }
.hebel { margin: 0; font-weight: 600; color: var(--accent); }

.result-grid { display: grid; gap: 20px; }
.radar-card { margin: 0; text-align: center; }
.radar-card #radar { max-width: 620px; margin: 0 auto; }
.radar-card svg { width: 100%; height: auto; display: block; }
.radar-grid { fill: none; stroke: var(--line-strong); stroke-width: 1; }
.radar-axis { stroke: var(--line-strong); stroke-width: 1; }
.radar-target { fill: none; stroke: var(--text-muted); stroke-width: 1.5; stroke-dasharray: 5 5; }
.radar-area { fill: rgba(157, 211, 30, 0.22); stroke: var(--accent); stroke-width: 2.5; }
.radar-dot { fill: var(--accent); }
.radar-label { fill: var(--text); font-family: var(--sans); font-size: 15px; font-weight: 600; }
.radar-tick { fill: var(--text-muted); font-family: var(--sans); font-size: 11px; }

.dim-results { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.dim-result { background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.dim-result.is-weakest { border-color: var(--accent); }
.dim-result-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.dim-result h3 { font-size: 16px; }
.dim-result .val { font-family: var(--serif); font-weight: 700; color: var(--accent); white-space: nowrap; }
.bar { height: 6px; background: var(--bg-2); border-radius: 999px; overflow: hidden; margin: 8px 0; }
.bar i { display: block; height: 100%; width: var(--w, 0%); background: var(--accent); border-radius: 999px; }
.dim-result p { margin: 0; font-size: 14px; color: var(--text-muted); }
.dim-result .band { font-size: 12px; text-transform: uppercase; letter-spacing: 0.4px; color: var(--text-muted); }

.mail-card { margin-top: 28px; border-color: rgba(157, 211, 30, 0.35); }
.mail-card > p { color: var(--text-muted); margin-top: 0; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 16px; }
.check.consent { margin: 4px 0 18px; }
.check.consent .small { display: block; margin-top: 4px; }
.mail-success { background: rgba(157, 211, 30, 0.10); border: 1px solid rgba(157, 211, 30, 0.35); border-radius: var(--radius); padding: 16px 18px; }
.mail-success p { margin: 0 0 6px; }
.mail-success p:last-child { margin-bottom: 0; }

.cta { margin-top: 28px; }
.save-note { margin-top: 16px; }

.footer { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; padding: 24px; border-top: 1px solid var(--line); font-size: 14px; color: var(--text-muted); }
.footer a { color: var(--text-muted); }

@media (max-width: 720px) {
  .result-head { grid-template-columns: 1fr; justify-items: start; }
  .result-grid { grid-template-columns: 1fr; }
  .legend { display: grid; grid-template-columns: 1fr; }
  .legend li { display: flex; gap: 10px; align-items: center; }
  .legend b { display: inline; }
  .scale span { min-height: 0; padding: 10px 4px; }
  .scale span small { display: none; }
  .nav .btn { flex: 1; }
}

@media print {
  body { background: #fff; color: #111; }
  .topbar, .footer, .cta .btn-row, .save-note, .eyebrow, .mail-card { display: none !important; }
  .card, .dim-result { background: #fff; border-color: #ccc; break-inside: avoid; }
  .lead, .small, .dim-result p { color: #333; }
  .score-ring::before { background: #fff; }
  .radar-label { fill: #111; }
  .radar-grid, .radar-axis { stroke: #bbb; }
  .result-grid { grid-template-columns: 1fr; }
  a { color: #111; }
}
