:root {
  color-scheme: light;
  --ink: #17211d;
  --muted: #5d6963;
  --paper: #fbfcf9;
  --surface: #ffffff;
  --line: #dbe3dd;
  --brand: #154f3d;
  --brand-dark: #0e392c;
  --brand-soft: #e7f1ec;
  --amber: #8d5c00;
  --amber-soft: #fff4d8;
  --red: #9d2e2e;
  --red-soft: #fbe9e7;
  --shadow: 0 18px 48px rgba(23, 33, 29, 0.09);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(213, 232, 221, 0.72), transparent 34rem),
    var(--paper);
}

button, input, textarea { font: inherit; }
button { cursor: pointer; }

.app-shell {
  width: min(100% - 32px, 680px);
  margin: 0 auto;
  padding: 24px 0 40px;
}

.app-shell--wide { width: min(100% - 32px, 760px); }

.brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  color: var(--brand-dark);
  font-size: 0.9rem;
  font-weight: 750;
  letter-spacing: 0.02em;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 10px;
  color: white;
  background: var(--brand);
  font-size: 0.78rem;
}

.hero-card, .question-card, .result-card, .rule-card, .systemise-offer, .founding-offer {
  padding: clamp(24px, 6vw, 48px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.hero-card { padding-top: clamp(40px, 10vw, 76px); padding-bottom: clamp(40px, 10vw, 76px); }

.eyebrow {
  margin: 0 0 14px;
  color: var(--brand);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 16px; font-size: clamp(2rem, 8vw, 3.9rem); line-height: 1.02; letter-spacing: -0.045em; }
.question-card h1, .result-card h1 { font-size: clamp(1.85rem, 6vw, 3rem); }
h2 { margin-bottom: 10px; font-size: clamp(1.25rem, 4vw, 1.65rem); line-height: 1.2; }
.lead { max-width: 54ch; margin-bottom: 18px; color: #34423b; font-size: clamp(1.08rem, 3.5vw, 1.28rem); line-height: 1.55; }
.support { margin-bottom: 28px; color: var(--muted); font-size: 1.05rem; line-height: 1.5; }
.meta-line { margin-bottom: 28px; color: var(--muted); font-size: 0.92rem; }

.button {
  min-height: 52px;
  padding: 14px 20px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.button--primary { color: #fff; background: var(--brand); }
.button--primary:hover { background: var(--brand-dark); }
.button--secondary { color: var(--brand-dark); border-color: #b8c9c0; background: #fff; }
.button--secondary:hover { background: var(--brand-soft); }
.button--full { width: 100%; }
.text-button { min-height: 44px; padding: 8px 4px; border: 0; color: var(--brand); background: transparent; font-size: 0.82rem; font-weight: 800; letter-spacing: 0.04em; }

.progress-wrap { margin-bottom: 16px; }
.progress-copy { display: flex; justify-content: space-between; margin-bottom: 9px; color: var(--muted); font-size: 0.78rem; font-weight: 700; }
.progress-track { height: 6px; overflow: hidden; border-radius: 20px; background: #dfe7e2; }
.progress-track span { display: block; height: 100%; border-radius: inherit; background: var(--brand); transition: width 180ms ease; }

.option-list { display: grid; gap: 10px; }
.option {
  display: flex;
  min-height: 56px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  background: #fff;
  text-align: left;
}
.option:hover { border-color: #96b3a4; background: #f6faf7; }
.option--selected { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 1px var(--brand); }
.option-dot { flex: 0 0 auto; width: 18px; height: 18px; border: 2px solid #9aa9a2; border-radius: 50%; }
.option--selected .option-dot { border: 5px solid var(--brand); background: #fff; }

textarea, input[type="text"], input:not([type]) {
  display: block;
  width: 100%;
  padding: 15px 16px;
  border: 1px solid #bfcac4;
  border-radius: 12px;
  color: var(--ink);
  background: #fff;
  line-height: 1.45;
}
textarea:focus, input:focus { outline: 3px solid rgba(21, 79, 61, 0.18); border-color: var(--brand); }
.input-meta { display: flex; justify-content: space-between; gap: 16px; margin-top: 8px; color: var(--muted); line-height: 1.4; }
.input-meta small { max-width: 52ch; }
.action-row { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; }
.action-row--start { justify-content: flex-start; flex-wrap: wrap; }
.form-error { margin: 14px 0 0; color: var(--red); font-weight: 700; }

.helper-toggle { margin-top: 12px; }
.helper { margin-top: 14px; padding: 18px; border: 1px solid #ead9ae; border-radius: 16px; background: var(--amber-soft); }
.helper h2 { font-size: 1.05rem; }
.helper-choice { display: grid; gap: 4px; width: 100%; padding: 13px 0; border: 0; border-bottom: 1px solid #ead9ae; background: transparent; text-align: left; }
.helper-choice:last-child { border-bottom: 0; }
.helper-choice span { color: #62573d; line-height: 1.45; }

.decision-state { margin-bottom: 14px; font-size: clamp(3rem, 15vw, 6rem); font-weight: 900; letter-spacing: -0.06em; line-height: 0.9; }
.result-card--act { border-top: 8px solid var(--brand); }
.result-card--check { border-top: 8px solid var(--amber); }
.result-card--escalate { border-top: 8px solid var(--red); }
.result-card--check .eyebrow, .result-card--check .decision-state { color: var(--amber); }
.result-card--escalate .eyebrow, .result-card--escalate .decision-state { color: var(--red); }
.decision-summary { max-width: 58ch; margin-bottom: 26px; font-size: 1.15rem; font-weight: 650; line-height: 1.5; }
.result-facts, .rule-summary { display: grid; gap: 1px; overflow: hidden; margin: 0 0 26px; border: 1px solid var(--line); border-radius: 14px; background: var(--line); }
.result-facts div, .rule-summary div { display: grid; grid-template-columns: minmax(120px, 0.7fr) 1.3fr; gap: 18px; padding: 14px 16px; background: #fff; }
dt { color: var(--muted); font-size: 0.8rem; font-weight: 800; text-transform: uppercase; }
dd { margin: 0; font-weight: 700; }
.why-block { margin-bottom: 24px; }
.why-block h2 { font-size: 1rem; }
.why-block ul { margin: 0; padding-left: 20px; color: #34423b; line-height: 1.55; }
.why-block li + li { margin-top: 7px; }
.next-action { padding: 18px; border-radius: 14px; background: var(--brand-soft); }
.next-action span { display: block; margin-bottom: 5px; color: var(--brand); font-size: 0.72rem; font-weight: 850; letter-spacing: 0.1em; }
.next-action p { margin: 0; font-weight: 700; line-height: 1.5; }
.professional-note { margin: 20px 0 0; color: var(--muted); font-size: 0.9rem; line-height: 1.5; }

.rule-card, .systemise-offer, .founding-offer { margin-top: 18px; box-shadow: none; }
.rule-card { border-color: #b8d1c5; background: #f7fbf8; }
.rule-intro { color: var(--muted); }
blockquote { margin: 20px 0; padding-left: 18px; border-left: 4px solid var(--brand); font-size: 1.08rem; font-weight: 650; line-height: 1.65; }
.copy-status { margin-left: 12px; color: var(--brand); font-size: 0.88rem; font-weight: 700; }
.systemise-offer { background: var(--brand-dark); color: #fff; }
.systemise-offer .eyebrow { color: #a7d0bd; }
.systemise-offer p { color: #dce9e2; line-height: 1.5; }
.systemise-offer .button--primary { color: var(--brand-dark); background: #fff; }
.founding-offer p { color: var(--muted); line-height: 1.5; }
.quiet-confirmation { margin: 14px 0 0; font-weight: 700; }
.restart-row { display: flex; justify-content: center; align-items: center; gap: 18px; flex-wrap: wrap; padding: 26px 0 4px; }

label, legend { display: block; margin: 22px 0 8px; font-weight: 750; }
fieldset { margin: 22px 0 0; padding: 0; border: 0; }
fieldset legend { margin-bottom: 10px; }
.check-option { display: flex; min-height: 48px; align-items: center; gap: 12px; margin: 0; padding: 8px 0; font-weight: 500; }
.check-option input { width: 20px; height: 20px; accent-color: var(--brand); }
form small { display: block; margin-top: 7px; color: var(--muted); line-height: 1.4; }
.rule-summary { margin-top: 24px; }

.app-footer { margin-top: 26px; color: #748079; font-size: 0.75rem; text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }

@media (max-width: 520px) {
  .app-shell, .app-shell--wide { width: min(100% - 20px, 760px); padding-top: 14px; }
  .brand-row { margin-bottom: 16px; }
  .hero-card, .question-card, .result-card, .rule-card, .systemise-offer, .founding-offer { border-radius: 18px; }
  .action-row { align-items: stretch; }
  .action-row .button { flex: 1; }
  .result-facts div, .rule-summary div { grid-template-columns: 1fr; gap: 4px; }
  .input-meta { display: grid; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
