/* KARVED tools: the brand (navy, gold accents, Norwester headings, Montserrat body), mobile first. */
:root {
  --navy: #0D1129; --navy-mid: #111828; --carbon: #080808;
  --gold: #C4A44A; --gold-light: #E8D5A3; --gold-grad: linear-gradient(90deg, #C4A44A, #E8D5A3);
  --white: #FFFFFF; --grey: #B8B0A0; --bronze: #6A6458;
  --line: rgba(196, 164, 74, 0.3); --field: rgba(255, 255, 255, 0.05);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: 'Montserrat', system-ui, sans-serif; font-weight: 400; background: var(--navy); color: var(--white); line-height: 1.6; -webkit-font-smoothing: antialiased; }
.wrap { max-width: 820px; margin: 0 auto; padding: 0 24px; }
h1, h2, .step-num, .choice-title, h4, .res-score, .res-rank, .gate-title, .breakdown-title, .foot-l, .brand span, .tool-title {
  font-family: 'Norwester', 'Montserrat', sans-serif; font-weight: 400; text-transform: uppercase; letter-spacing: 0.01em;
}
a { color: var(--gold-light); }
:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* Top bar and hero */
.topbar { background: var(--navy); border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--white); text-decoration: none; }
.brand img { display: block; }
.brand span { font-size: 22px; letter-spacing: 0.06em; }
.topbar-tag { font-size: 11px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--bronze); }
.hero { background: var(--carbon); padding: 48px 0 40px; border-bottom: 1px solid rgba(196, 164, 74, 0.25); }
.eyebrow { font-size: 11px; font-weight: 600; letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold); margin-bottom: 10px; }
.eyebrow-line { width: 56px; height: 2px; background: var(--gold-grad); margin-bottom: 20px; }
h1 { font-size: 52px; line-height: 1; margin-bottom: 16px; }
h1 .accent { color: var(--gold-light); }
.lead { font-size: 16px; color: var(--grey); max-width: 580px; }
.lead + .lead { margin-top: 8px; }

/* Steps */
.step { margin-top: 44px; }
.step-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 14px; }
.step-num { font-size: 26px; color: var(--gold); }
h2 { font-size: 28px; line-height: 1.1; }
.step-note { font-size: 14px; color: var(--grey); margin: -6px 0 12px; }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; background: var(--navy-mid); border: 1px solid var(--line); cursor: pointer; transition: border-color .2s, background .2s; }
.choice:hover { border-color: var(--gold); }
.choice.on { border-color: var(--gold); background: rgba(196, 164, 74, 0.1); }
.choice-title { font-size: 22px; line-height: 1.1; }
.choice-sub { font-size: 13px; color: var(--grey); }
.choice:has(input:focus-visible), .chip:has(input:focus-visible) { outline: 2px solid var(--gold-light); outline-offset: 2px; }
.sub-choices { margin-top: 16px; }
.chip-label { font-size: 11px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--bronze); margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; flex-direction: column; padding: 10px 16px; background: var(--navy-mid); border: 1px solid var(--line); cursor: pointer; min-width: 110px; transition: border-color .2s, background .2s; }
.chip:hover { border-color: var(--gold); }
.chip.on { border-color: var(--gold); background: rgba(196, 164, 74, 0.12); }
.chip-title { font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.chip-sub { font-size: 11.5px; color: var(--grey); }

/* Inputs */
.input-unit { display: flex; align-items: stretch; background: var(--field); border: 1px solid rgba(196, 164, 74, 0.35); transition: border-color .2s; }
.input-unit:focus-within { border-color: var(--gold-light); }
.input-unit input { flex: 1; min-width: 0; background: transparent; border: 0; color: var(--white); font: 500 16px 'Montserrat', sans-serif; padding: 13px 14px; outline: none; }
.input-unit input::placeholder { color: var(--bronze); }
.input-unit span { display: flex; align-items: center; padding: 0 14px; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--bronze); }
.field-bw { max-width: 220px; }
.field-err { font-size: 12.5px; color: var(--gold-light); margin-top: 6px; }
.field-err::before { content: '! '; font-weight: 600; }
.rules { font-size: 13.5px; color: var(--grey); background: var(--navy-mid); border-left: 3px solid var(--gold); padding: 14px 18px; margin-bottom: 18px; }
.rules strong { color: var(--white); font-weight: 600; }
.group { margin-top: 22px; }
.group-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 10px; }
.group-head h3 { font-size: 12px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); }
.group-head p { font-size: 12.5px; color: var(--bronze); }
.test-row { display: grid; grid-template-columns: 1fr 210px; gap: 18px; align-items: center; background: var(--navy-mid); border-left: 3px solid var(--line); padding: 14px 18px; margin-bottom: 10px; transition: border-color .2s; }
.test-row:focus-within { border-left-color: var(--gold); }
.test-row.bad { border-left-color: var(--gold-light); }
.test-name { display: block; font-size: 15px; font-weight: 600; color: var(--white); }
.test-how { font-size: 12.5px; color: var(--grey); line-height: 1.45; }

/* Submit */
.submit-bar { position: sticky; bottom: 0; z-index: 20; margin: 28px -24px 0; padding: 14px 24px; background: rgba(8, 8, 8, 0.96); border-top: 1px solid rgba(196, 164, 74, 0.3); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.submit-status { font-size: 13px; color: var(--grey); }
.btn-gold { background: var(--gold-grad); color: var(--navy); border: 0; font: 600 14px 'Montserrat', sans-serif; letter-spacing: 0.12em; text-transform: uppercase; padding: 15px 26px; cursor: pointer; transition: opacity .2s; white-space: nowrap; }
.btn-gold:hover { opacity: 0.92; }
.btn-gold:disabled { opacity: 0.4; cursor: default; }
.btn-ghost { background: none; border: 1px solid rgba(255, 255, 255, 0.2); color: var(--grey); font: 600 11px 'Montserrat', sans-serif; letter-spacing: 0.14em; text-transform: uppercase; padding: 11px 22px; cursor: pointer; margin-top: 22px; }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-light); }

/* Results */
.results { margin: 36px 0 0; padding: 34px 28px 30px; background: var(--carbon); border-top: 2px solid var(--gold); scroll-margin-top: 16px; }
.res-eyebrow, .gate-eyebrow { font-size: 10.5px; font-weight: 600; letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold); margin-bottom: 10px; }
.res-score { font-size: 92px; line-height: 0.9; color: var(--gold-light); }
.res-of { font-size: 32px; color: var(--bronze); margin-left: 8px; }
.res-rank { font-size: 26px; margin: 12px 0 6px; }
.res-desc { font-size: 15px; color: var(--grey); max-width: 540px; }
.res-std { font-size: 12.5px; color: var(--bronze); margin-top: 6px; }
.gate { margin-top: 28px; padding: 26px 24px; background: var(--navy-mid); border: 1px solid rgba(196, 164, 74, 0.4); }
.gate-title { font-size: 24px; line-height: 1.1; margin-bottom: 8px; }
.gate-sub { font-size: 13.5px; color: var(--grey); margin-bottom: 18px; max-width: 500px; }
.gate-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.gate input { width: 100%; background: var(--field); border: 1px solid rgba(196, 164, 74, 0.35); color: var(--white); font: 500 16px 'Montserrat', sans-serif; padding: 13px 14px; outline: none; }
.gate input:focus { border-color: var(--gold-light); }
.gate input::placeholder { color: var(--bronze); }
.gate .btn-gold { width: 100%; }
.gate-err { font-size: 12.5px; color: var(--gold-light); margin-top: 10px; min-height: 18px; }
.gate-note { font-size: 11.5px; color: var(--bronze); line-height: 1.5; margin-top: 6px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Breakdown */
.breakdown { margin-top: 30px; scroll-margin-top: 16px; }
.breakdown-title { font-size: 20px; margin-bottom: 14px; padding-bottom: 8px; border-bottom: 1px solid rgba(196, 164, 74, 0.25); }
.brow { background: var(--navy-mid); border-left: 3px solid var(--bronze); padding: 16px 18px; margin-bottom: 10px; }
.brow.met { border-left-color: var(--gold); }
.brow-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brow-head h4 { font-size: 18px; line-height: 1.1; }
.pill { flex: none; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--grey); border: 1px solid rgba(184, 176, 160, 0.5); padding: 4px 10px; }
.pill-met { color: var(--gold-light); border-color: var(--gold); }
.brow-nums { display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 13px; color: var(--grey); margin-top: 6px; }
.brow-nums strong { color: var(--white); font-weight: 600; }
.brow-nums em { font-style: normal; color: var(--bronze); }
.bar { position: relative; height: 8px; background: rgba(255, 255, 255, 0.1); margin: 10px 0 8px; }
.bar-fill { height: 100%; background: #8A8275; }
.brow.met .bar-fill { background: var(--gold-grad); }
.bar-mark { position: absolute; left: 80%; top: -4px; bottom: -4px; width: 2px; background: rgba(255, 255, 255, 0.75); }
.brow-level { font-size: 12.5px; color: var(--bronze); }
.brow-level strong { color: var(--gold-light); font-weight: 600; }
.fix { margin-top: 22px; padding: 18px 20px; background: var(--navy-mid); border-left: 3px solid var(--gold); }
.fix h4 { font-family: 'Montserrat', sans-serif; font-size: 10.5px; font-weight: 600; letter-spacing: 0.28em; color: var(--gold); margin-bottom: 8px; }
.fix ul { list-style: none; margin-bottom: 8px; }
.fix li { font-size: 14.5px; padding: 3px 0; }
.fix li strong { color: var(--gold-light); font-weight: 600; }
.fix p { font-size: 13.5px; color: var(--grey); }
.cta { margin-top: 22px; padding: 20px; border: 1px solid rgba(196, 164, 74, 0.35); text-align: center; }
.cta p { font-size: 13.5px; color: var(--grey); }
.cta .cta-action { font-size: 15px; font-weight: 600; color: var(--white); margin-top: 4px; }

/* Footer */
.foot { margin-top: 56px; padding: 22px 0 36px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.foot-row { display: flex; justify-content: space-between; align-items: center; }
.foot-l { font-size: 16px; letter-spacing: 0.08em; }
.foot-r { font-size: 10px; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold); }
.foot-note { font-size: 11px; color: var(--bronze); margin-top: 10px; }

/* Tools home */
.tools { display: grid; gap: 14px; margin-top: 36px; }
.tool { display: block; padding: 22px 24px; background: var(--navy-mid); border-left: 3px solid var(--gold); color: var(--white); text-decoration: none; transition: background .2s; }
.tool:hover { background: rgba(196, 164, 74, 0.08); }
.tool-title { font-size: 24px; display: block; }
.tool p { font-size: 14px; color: var(--grey); margin-top: 4px; }
.tool .go { display: inline-block; margin-top: 10px; font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-light); }

@media (max-width: 640px) {
  h1 { font-size: 38px; }
  h2 { font-size: 24px; }
  .choice-grid, .gate-fields { grid-template-columns: 1fr; }
  .test-row { grid-template-columns: 1fr; gap: 10px; }
  .res-score { font-size: 70px; }
  .results { padding: 28px 20px 24px; margin-left: -24px; margin-right: -24px; }
  .submit-bar { flex-direction: column; align-items: stretch; gap: 8px; }
  .submit-bar .btn-gold { width: 100%; }
}
