:root {
  color-scheme: dark;
  --ink: #effbf7;
  --muted: #93aaa3;
  --bg: #071113;
  --panel: #0c191b;
  --panel-2: #102124;
  --line: #21383a;
  --mint: #68f0c0;
  --gold: #f8c45c;
  --danger: #ff8a7a;
  --radius: 18px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 80% 8%, rgba(104, 240, 192, 0.1), transparent 30rem),
    linear-gradient(180deg, #071113 0%, #081416 60%, #061012 100%);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
}

a { color: inherit; }
.topbar {
  min-height: 66px;
  padding: 0 5vw;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: rgba(7, 17, 19, 0.86);
}
.brand { display: inline-flex; align-items: center; gap: 0.7rem; text-decoration: none; font-weight: 760; letter-spacing: -0.02em; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--mint); border-radius: 10px; color: var(--mint); font-size: 0.75rem; letter-spacing: 0.08em; }
.local-badge { color: var(--mint); font: 650 0.78rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; text-transform: uppercase; letter-spacing: 0.08em; }

.shell { width: min(1180px, 90vw); margin: 0 auto; padding: 4.5rem 0 2.5rem; }
.intro { max-width: 810px; margin-bottom: 2.5rem; }
.kicker, .result-label { margin: 0 0 0.65rem; color: var(--gold); font: 700 0.78rem/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.11em; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 1rem; font-size: clamp(2.35rem, 6vw, 5.4rem); line-height: 0.98; letter-spacing: -0.062em; max-width: 13ch; }
.lede { color: #b9cdc7; font-size: clamp(1.05rem, 2vw, 1.28rem); max-width: 64ch; }
.boundary-note { display: flex; gap: 0.7rem; align-items: baseline; padding: 0.9rem 1rem; border-left: 3px solid var(--gold); color: var(--muted); background: rgba(248, 196, 92, 0.055); }
.boundary-note strong { color: var(--gold); white-space: nowrap; }

.workspace { display: grid; grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,0.32); }
.intake, .result { padding: clamp(1.25rem, 3vw, 2rem); }
.intake { background: var(--panel); border-right: 1px solid var(--line); }
.result { background: linear-gradient(145deg, var(--panel-2), #0a181a); }
.panel-heading { display: flex; align-items: flex-start; gap: 0.9rem; margin-bottom: 1.5rem; }
.panel-heading h2 { margin-bottom: 0.15rem; font-size: 1.35rem; }
.panel-heading p { margin-bottom: 0; color: var(--muted); }
.step { flex: 0 0 auto; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: var(--bg); font: 800 0.78rem/1 ui-monospace, monospace; }

label, fieldset { display: grid; gap: 0.45rem; margin: 0 0 1.05rem; }
label > span, legend { color: #cfe2dc; font-weight: 680; font-size: 0.92rem; }
fieldset { border: 0; padding: 0; }
legend { margin-bottom: 0.55rem; }
select, input, textarea {
  width: 100%;
  border: 1px solid #2a4548;
  border-radius: 10px;
  padding: 0.78rem 0.85rem;
  background: #071315;
  color: var(--ink);
  font: inherit;
}
textarea { resize: vertical; min-height: 8.5rem; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.88rem; }
select:focus, input:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 3px solid rgba(104,240,192,0.35); outline-offset: 2px; }
small { color: var(--muted); font-size: 0.78rem; }
.choice { grid-template-columns: 18px 1fr; align-items: center; gap: 0.55rem; margin-bottom: 0.3rem; }
.choice input { width: 17px; height: 17px; margin: 0; accent-color: var(--mint); }
.choice span { font-weight: 500; color: #afc4be; }
button { width: 100%; border: 0; border-radius: 11px; padding: 0.9rem 1rem; background: var(--mint); color: #051211; font: 800 0.96rem/1.2 inherit; cursor: pointer; }
button:hover { background: #8af7d2; }
.readiness-fields { padding-top: 0.35rem; border-top: 1px solid var(--line); }

.route-card { min-height: 132px; padding: 1.15rem; border: 1px solid #315153; border-radius: 14px; background: rgba(5, 14, 15, 0.48); }
.route-card.is-empty { border-style: dashed; }
.route-state { display: inline-flex; margin-bottom: 0.7rem; padding: 0.28rem 0.55rem; border-radius: 999px; background: rgba(248,196,92,0.12); color: var(--gold); font: 700 0.72rem/1.2 ui-monospace, monospace; text-transform: uppercase; letter-spacing: 0.08em; }
.route-card p { margin-bottom: 0; color: #b5cac4; }
.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1.2rem 0; }
.result-grid section { padding: 1rem; border: 1px solid var(--line); border-radius: 13px; }
.result-grid h3 { margin-bottom: 0.7rem; font-size: 0.92rem; color: var(--mint); }
ul { padding-left: 1.15rem; margin: 0; color: #adc2bc; }
li + li { margin-top: 0.5rem; }
.next-action { border-top: 1px solid var(--line); padding-top: 1rem; display: grid; gap: 0.25rem; }
.next-action span { color: var(--muted); font: 700 0.72rem/1.2 ui-monospace, monospace; text-transform: uppercase; letter-spacing: 0.08em; }
.next-action strong { font-size: 1.05rem; }
.evidence { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.65rem; margin-top: 1rem; }
.evidence div { display: grid; gap: 0.2rem; padding: 0.75rem; border: 1px solid var(--line); border-radius: 10px; background: rgba(5, 14, 15, 0.42); }
.evidence span { color: var(--muted); font-size: 0.74rem; }
.evidence strong { font: 760 1.2rem/1 ui-monospace, monospace; }
.result-actions { display: grid; grid-template-columns: 0.72fr 1.28fr; gap: 0.7rem; margin-top: 0.8rem; }
.secondary, .pilot-link { min-height: 46px; display: grid; place-items: center; border-radius: 10px; text-decoration: none; font-weight: 780; text-align: center; }
.secondary { border: 1px solid #355256; background: transparent; color: var(--ink); }
.secondary:hover { background: #13282b; }
.pilot-link { padding: 0.7rem 0.85rem; background: var(--gold); color: #201604; }
.pilot-link:hover { background: #ffd778; }
.pilot-link[aria-disabled="true"] { background: #2a3436; color: #aeb9ba; cursor: not-allowed; }

.pilot { display: grid; grid-template-columns: 0.92fr 1.08fr; gap: 2rem; margin-top: 1.2rem; padding: clamp(1.3rem, 3vw, 2rem); border: 1px solid rgba(248,196,92,0.34); border-radius: 14px; background: linear-gradient(125deg, rgba(248,196,92,0.08), rgba(104,240,192,0.035)); }
.pilot h2 { max-width: 18ch; margin: 0; font-size: clamp(1.5rem, 3vw, 2.35rem); line-height: 1.06; letter-spacing: -0.04em; }
.pilot p { color: #c0d3ce; }
.pilot .fine-print { margin-bottom: 0; color: var(--muted); font-size: 0.84rem; }

.trust-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 1.2rem; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--line); }
.trust-strip div { display: grid; gap: 0.25rem; padding: 1rem; background: #0a1719; }
.trust-strip span { color: var(--muted); font: 700 0.68rem/1.2 ui-monospace, monospace; letter-spacing: 0.1em; }
.trust-strip strong { font-size: 0.92rem; }
footer { width: min(1180px, 90vw); margin: 0 auto; padding: 1rem 0 3rem; display: flex; justify-content: space-between; gap: 1.5rem; color: var(--muted); font-size: 0.84rem; }
footer p { max-width: 72ch; margin: 0; }
footer nav { display: flex; gap: 1rem; white-space: nowrap; }

@media (max-width: 820px) {
  .shell { padding-top: 3rem; }
  .workspace { grid-template-columns: 1fr; }
  .intake { border-right: 0; border-bottom: 1px solid var(--line); }
  .result-grid, .trust-strip, .pilot { grid-template-columns: 1fr; }
  footer { flex-direction: column; }
}

@media (max-width: 520px) {
  .topbar { padding: 0 1rem; }
  .local-badge { max-width: 11ch; text-align: right; line-height: 1.25; }
  .shell, footer { width: min(100% - 2rem, 1180px); }
  h1 { font-size: 2.55rem; }
  .boundary-note { align-items: flex-start; flex-direction: column; gap: 0.15rem; }
  .result-grid { gap: 0.75rem; }
  .evidence, .result-actions { grid-template-columns: 1fr; }
}
