:root {
  --paper: #f2efe7;
  --paper-deep: #e7e1d5;
  --ink: #151716;
  --muted: #666b65;
  --line: #c9c3b8;
  --signal: #005eff;
  --signal-dark: #003d9e;
  --acid: #d9ff43;
  --danger: #a73b2b;
  color-scheme: light;
  font-family: "Avenir Next", "Helvetica Neue", sans-serif;
  background: var(--paper);
  color: var(--ink);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--paper); scroll-behavior: smooth; }
body { min-height: 100vh; margin: 0; background:
  linear-gradient(rgba(21, 23, 22, .055) 1px, transparent 1px),
  linear-gradient(90deg, rgba(21, 23, 22, .055) 1px, transparent 1px),
  var(--paper); background-size: 48px 48px; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
[hidden] { display: none !important; }

.skip-link { position: fixed; z-index: 100; top: 8px; left: 8px; transform: translateY(-180%); padding: 10px 14px; background: var(--ink); color: #fff; }
.skip-link:focus { transform: translateY(0); }

.setup-header { position: sticky; z-index: 20; top: 0; min-height: 76px; display: grid; grid-template-columns: 1fr minmax(240px, 420px) 1fr; align-items: center; gap: 28px; padding: 12px clamp(18px, 4vw, 64px); border-bottom: 1px solid var(--ink); background: rgba(242, 239, 231, .94); backdrop-filter: blur(16px); }
.setup-brand { display: inline-grid; grid-template-columns: 36px auto; grid-template-rows: auto auto; align-items: center; width: max-content; text-decoration: none; }
.setup-brand > span { grid-row: 1 / 3; display: grid; place-items: center; width: 30px; height: 30px; margin-right: 6px; border: 1px solid var(--ink); border-radius: 50%; font-family: Georgia, serif; font-size: 18px; font-weight: 700; }
.setup-brand strong { font-family: Georgia, "Times New Roman", serif; font-size: 17px; letter-spacing: -.02em; }
.setup-brand small { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.setup-progress__copy { display: flex; justify-content: space-between; margin-bottom: 7px; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.setup-progress__track { height: 5px; overflow: hidden; border: 1px solid var(--ink); background: transparent; }
.setup-progress__track span { display: block; width: 20%; height: 100%; background: var(--signal); transition: width 260ms ease; }
.setup-skip { justify-self: end; font-size: 12px; font-weight: 700; text-underline-offset: 4px; }

.setup-shell { display: grid; grid-template-columns: minmax(260px, .72fr) minmax(0, 1.58fr); min-height: calc(100vh - 112px); }
.setup-manifesto { display: flex; flex-direction: column; padding: clamp(40px, 7vw, 92px) clamp(24px, 5vw, 74px); border-right: 1px solid var(--ink); background: var(--ink); color: #f7f3e8; }
.eyebrow, .step-count { margin: 0 0 18px; color: var(--acid); font-size: 10px; font-weight: 900; letter-spacing: .2em; text-transform: uppercase; }
.setup-manifesto h1 { max-width: 12ch; margin: 0; font-family: "Iowan Old Style", Georgia, serif; font-size: clamp(38px, 5vw, 72px); font-weight: 500; line-height: .98; letter-spacing: -.055em; }
.setup-manifesto > p:not(.eyebrow) { max-width: 48ch; margin: 26px 0 0; color: #c6c7c0; line-height: 1.75; }
.setup-manifesto dl { display: grid; gap: 0; margin: 50px 0 0; border-top: 1px solid #555955; }
.setup-manifesto dl div { display: grid; grid-template-columns: 90px 1fr; gap: 18px; padding: 13px 0; border-bottom: 1px solid #555955; }
.setup-manifesto dt { color: var(--acid); font: 800 9px/1.4 "Avenir Next", sans-serif; letter-spacing: .15em; text-transform: uppercase; }
.setup-manifesto dd { margin: 0; font-size: 12px; }
.model-boundary { margin-top: auto; padding-top: 50px; }
.model-boundary span { display: inline-block; padding: 5px 8px; background: var(--acid); color: var(--ink); font-size: 9px; font-weight: 900; letter-spacing: .12em; }
.model-boundary p { max-width: 50ch; margin: 12px 0 0; color: #b9bcb7; font-size: 11px; line-height: 1.65; }

.setup-stage { min-width: 0; display: grid; grid-template-rows: auto 1fr auto; padding: clamp(22px, 4vw, 56px) clamp(18px, 5vw, 78px) 24px; background: rgba(242, 239, 231, .92); }
.setup-steps { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.setup-steps button { min-height: 58px; padding: 8px; border: 0; border-right: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .08em; cursor: pointer; }
.setup-steps button:last-child { border-right: 0; }
.setup-steps button span { display: block; margin-bottom: 3px; font-family: Georgia, serif; font-size: 15px; font-weight: 400; }
.setup-steps button[aria-current="step"] { background: var(--ink); color: #fff; }
.setup-steps button[data-complete="true"] { color: var(--signal-dark); }

.setup-panel { align-self: start; width: min(100%, 940px); padding: clamp(44px, 7vw, 90px) 0 36px; }
.setup-panel .step-count { color: var(--signal); }
.setup-panel h2 { max-width: 19ch; margin: 0; font-family: "Iowan Old Style", Georgia, serif; font-size: clamp(34px, 4.5vw, 62px); font-weight: 500; line-height: 1; letter-spacing: -.045em; }
.step-dek { max-width: 66ch; margin: 20px 0 30px; color: var(--muted); font-size: 14px; line-height: 1.65; }

.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.choice-card { position: relative; min-height: 150px; display: grid; align-content: start; gap: 8px; padding: 20px; border: 1px solid var(--line); background: rgba(255, 255, 255, .38); cursor: pointer; transition: border-color 140ms ease, transform 140ms ease, background 140ms ease; }
.choice-card:hover { transform: translateY(-2px); border-color: var(--ink); }
.choice-card:has(input:checked) { border-color: var(--signal); background: #fff; box-shadow: inset 5px 0 0 var(--signal); }
.choice-card input { position: absolute; opacity: 0; pointer-events: none; }
.choice-card__index { width: max-content; color: var(--signal); font-family: Georgia, serif; font-size: 14px; }
.choice-card strong { font-family: "Iowan Old Style", Georgia, serif; font-size: 20px; font-weight: 600; }
.choice-card small { max-width: 40ch; color: var(--muted); line-height: 1.5; }
.choice-card i { margin-top: auto; color: var(--signal-dark); font-size: 10px; font-style: normal; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }

.selection-meter { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; font-size: 11px; font-weight: 800; }
.selection-meter button, .text-action { border: 0; border-bottom: 1px solid currentColor; padding: 3px 0; background: transparent; color: var(--muted); font-size: 11px; font-weight: 700; cursor: pointer; }
.sector-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--ink); border-left: 1px solid var(--ink); }
.sector-grid label { position: relative; min-height: 86px; display: grid; align-content: center; gap: 4px; padding: 14px; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); background: rgba(255, 255, 255, .28); cursor: pointer; }
.sector-grid label:has(input:checked) { background: var(--acid); }
.sector-grid label:has(input:disabled) { color: #9c9c96; cursor: not-allowed; }
.sector-grid input { position: absolute; top: 10px; right: 10px; accent-color: var(--signal); }
.sector-grid span { padding-right: 22px; font-family: Georgia, serif; font-size: 16px; }
.sector-grid small { color: var(--muted); font-size: 9px; }

.lens-recommendation { display: grid; grid-template-columns: 76px 1fr; gap: 18px; margin-bottom: 18px; padding: 18px; border: 1px solid var(--ink); background: var(--ink); color: #fff; }
.lens-recommendation b { display: grid; place-items: center; width: 66px; height: 66px; border-radius: 50%; background: var(--acid); color: var(--ink); font-family: Georgia, serif; font-size: 24px; }
.lens-recommendation strong { display: block; font-family: Georgia, serif; font-size: 22px; }
.lens-recommendation p { margin: 7px 0 0; color: #c6c7c0; font-size: 12px; line-height: 1.55; }
.lens-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.lens-options label { position: relative; min-height: 86px; display: grid; align-content: center; gap: 5px; padding: 13px; border: 1px solid var(--line); background: rgba(255, 255, 255, .35); cursor: pointer; }
.lens-options label:has(input:checked) { border-color: var(--signal); background: #fff; box-shadow: inset 0 -4px 0 var(--signal); }
.choice-card:has(input:focus-visible),
.sector-grid label:has(input:focus-visible),
.lens-options label:has(input:focus-visible) { outline: 3px solid var(--signal); outline-offset: 3px; }
.lens-options input { position: absolute; opacity: 0; }
.lens-options strong { font-family: Georgia, serif; font-size: 16px; }
.lens-options small { color: var(--muted); font-size: 10px; }
.honesty-note { margin: 16px 0 0; padding: 13px 15px; border-left: 4px solid var(--danger); background: rgba(167, 59, 43, .08); color: #55352e; font-size: 11px; line-height: 1.6; }

.setup-ticket { position: relative; display: grid; gap: 0; max-width: 680px; border: 1px solid var(--ink); background: #fff; box-shadow: 12px 12px 0 var(--paper-deep); }
.setup-ticket::before { content: "UNPRICED / FIRST RUN"; padding: 10px 14px; background: var(--ink); color: var(--acid); font-size: 9px; font-weight: 900; letter-spacing: .16em; }
.setup-ticket dl { margin: 0; }
.setup-ticket dl div { display: grid; grid-template-columns: 120px 1fr; gap: 15px; padding: 13px 16px; border-top: 1px solid var(--line); }
.setup-ticket dt { color: var(--muted); font-size: 9px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.setup-ticket dd { margin: 0; font-family: Georgia, serif; font-size: 16px; }
.launch-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.launch-primary, .launch-secondary { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 14px; padding: 12px 20px; border: 1px solid var(--ink); font-size: 12px; font-weight: 900; text-decoration: none; }
.launch-primary { background: var(--signal); color: #fff; border-color: var(--signal); }
.launch-secondary { background: transparent; }
.launch-disclosure { max-width: 70ch; margin: 18px 0; color: var(--muted); font-size: 10px; line-height: 1.6; }

.setup-controls { align-self: end; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 18px; border-top: 1px solid var(--ink); }
.setup-controls p { min-height: 18px; margin: 0; color: var(--muted); font-size: 11px; }
.setup-controls > div { display: flex; gap: 8px; }
.setup-controls button { min-width: 110px; min-height: 44px; border: 1px solid var(--ink); padding: 9px 16px; font-weight: 800; cursor: pointer; }
.control-back { background: transparent; }
.control-next { background: var(--ink); color: #fff; }
.setup-controls button:disabled { opacity: .35; cursor: not-allowed; }
.legal-footer { display: flex; justify-content: space-between; gap: 20px; padding: 12px clamp(18px, 4vw, 64px); border-top: 1px solid var(--ink); background: var(--paper); color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }

:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; }

@media (max-width: 980px) {
  .setup-header { grid-template-columns: 1fr 1fr; }
  .setup-progress { grid-column: 1 / -1; grid-row: 2; }
  .setup-skip { grid-column: 2; grid-row: 1; }
  .setup-shell { grid-template-columns: 1fr; }
  .setup-manifesto { min-height: auto; border-right: 0; border-bottom: 1px solid var(--ink); }
  .setup-manifesto h1 { max-width: 15ch; }
  .model-boundary { margin-top: 40px; padding-top: 0; }
}

@media (max-width: 680px) {
  .setup-header { gap: 12px; padding: 10px 14px; }
  .setup-skip { font-size: 10px; }
  .setup-manifesto { padding: 24px 18px 20px; }
  .setup-manifesto h1 { font-size: 30px; }
  .setup-manifesto > p:not(.eyebrow) { margin-top: 12px; font-size: 11px; line-height: 1.45; }
  .setup-manifesto dl { display: none; }
  .setup-manifesto dl div { display: block; padding: 10px 8px; border-right: 1px solid #555955; }
  .setup-manifesto dl div:last-child { border-right: 0; }
  .setup-manifesto dd { margin-top: 5px; font-size: 10px; }
  .model-boundary { margin-top: 12px; padding-top: 0; }
  .model-boundary p { display: none; }
  .setup-stage { padding: 14px 14px 22px; }
  .setup-steps { overflow-x: auto; }
  .setup-steps button { min-width: 92px; }
  .setup-panel { padding-top: 18px; }
  .setup-panel h2 { font-size: 34px; }
  .step-dek { margin: 12px 0 18px; font-size: 12px; }
  .choice-grid, .lens-options { grid-template-columns: 1fr; }
  .choice-card { min-height: 128px; }
  .sector-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lens-recommendation { grid-template-columns: 58px 1fr; gap: 12px; }
  .lens-recommendation b { width: 52px; height: 52px; font-size: 19px; }
  .setup-controls { align-items: stretch; flex-direction: column; }
  .setup-controls > div { display: grid; grid-template-columns: 1fr 1fr; }
  .setup-controls button { min-width: 0; }
  .legal-footer { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 380px) {
  .sector-grid { grid-template-columns: 1fr; }
  .setup-ticket dl div { grid-template-columns: 90px 1fr; }
}

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