:root {
  --ink: #113f37;
  --ink-2: #1d5a4f;
  --gold: #c7a646;
  --gold-soft: #f2e8bd;
  --paper: #f7f4ec;
  --white: #ffffff;
  --text: #1f2a28;
  --muted: #65716e;
  --line: #d8ddd9;
  --danger: #8b2e2e;
  --danger-soft: #f4e6e4;
  --ok-soft: #e7f0ec;
  --shadow: 0 10px 30px rgba(17,63,55,.10);
  --radius: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: auto; }
fieldset { min-width: 0; border: 1px solid var(--line); margin: 0 0 18px; }
legend { font-weight: 600; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--paper);
  line-height: 1.45;
}

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

.shell { max-width: 980px; margin: 0 auto; padding: 28px 18px 56px; }
.brandbar {
  background: var(--ink);
  color: var(--white);
  padding: 22px 0;
  border-bottom: 4px solid var(--gold);
}
.brand-inner { max-width: 980px; margin: 0 auto; padding: 0 18px; display: flex; justify-content: space-between; gap: 24px; align-items: center; }
.brand-title { font-weight: 800; letter-spacing: .02em; font-size: clamp(1.25rem, 3vw, 1.9rem); }
.brand-sub { color: #d6e3df; margin-top: 3px; font-size: .95rem; }
.brand-mark { color: var(--gold); font-weight: 800; letter-spacing: .08em; }

.hero { margin: 28px 0 20px; }
.eyebrow { color: var(--ink-2); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; }
h1 { margin: 8px 0 10px; color: var(--ink); font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1.02; letter-spacing: -.03em; }
.hero p { max-width: 760px; font-size: 1.08rem; color: #394642; }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin: 18px 0;
}

.callout {
  border-left: 5px solid var(--gold);
  background: #fffdf7;
  padding: 14px 16px;
  margin: 14px 0 0;
}
.callout strong { color: var(--ink); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
label.field { display: block; }
label.field span { display: block; font-weight: 700; color: var(--ink); margin-bottom: 7px; }
input[type="text"], textarea {
  width: 100%;
  border: 1px solid #bdc8c3;
  border-radius: 10px;
  padding: 12px 13px;
  background: #fff;
  color: var(--text);
}
textarea { min-height: 92px; resize: vertical; }
input:focus, textarea:focus, button:focus-visible { outline: 3px solid rgba(199,166,70,.35); outline-offset: 2px; }

.progress-wrap { margin: 14px 0 20px; }
.progress-meta { display: flex; justify-content: space-between; gap: 12px; font-size: .9rem; color: var(--muted); margin-bottom: 7px; }
.progress { width: 100%; height: 10px; border-radius: 99px; background: #e3e8e5; overflow: hidden; }
.progress > div { height: 100%; width: 0; background: var(--ink); transition: width .25s ease; }

.question-card { display: none; }
.question-card.active { display: block; }
.q-number { color: var(--gold); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; }
.question-card h2 { color: var(--ink); font-size: clamp(1.4rem, 3vw, 2rem); line-height: 1.2; margin: 7px 0 8px; }
.question-card .help { color: var(--muted); margin-bottom: 18px; }

.options { display: grid; gap: 10px; }
.option {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  border: 1px solid #c8d1cd;
  border-radius: 12px;
  padding: 13px 14px;
  background: #fff;
  transition: .15s ease;
}
.option:hover { border-color: var(--ink-2); transform: translateY(-1px); }
.option:has(input:checked) { border-color: var(--ink); background: var(--ok-soft); box-shadow: inset 0 0 0 1px var(--ink); }
.option input { margin-top: 3px; accent-color: var(--ink); }
.option strong { color: var(--ink); display: block; }
.option small { color: var(--muted); display: block; margin-top: 2px; }

.nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 22px; }
.btn {
  border: 0;
  border-radius: 10px;
  padding: 11px 16px;
  font-weight: 800;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #0d332d; }
.btn-secondary { background: #e9eeeb; color: var(--ink); }
.btn-gold { background: var(--gold); color: #17221f; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.error { color: var(--danger); font-weight: 700; margin-top: 10px; display: none; }

#result { display: none; }
.result-hero {
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius);
  padding: 24px;
  border-top: 5px solid var(--gold);
}
.result-label { color: #c9d9d4; text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 800; }
.result-mode { font-size: clamp(1.6rem, 4vw, 2.6rem); line-height: 1.05; font-weight: 900; margin: 8px 0; }
.result-short { color: #e5efeb; max-width: 780px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.pill { border: 1px solid rgba(255,255,255,.25); border-radius: 99px; padding: 6px 10px; font-size: .82rem; font-weight: 700; }

.section-title { color: var(--ink); margin: 0 0 8px; font-size: 1.2rem; }
ul.tight, ol.tight { margin: 8px 0 0 18px; padding: 0; }
ul.tight li, ol.tight li { margin: 6px 0; }

.flag { background: var(--danger-soft); border-left: 4px solid var(--danger); padding: 10px 12px; margin: 8px 0; }

.report-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.meta-row { display: grid; grid-template-columns: 150px 1fr; gap: 10px; padding: 7px 0; border-bottom: 1px solid #edf0ee; }
.meta-row strong { color: var(--ink); }

.footer { color: var(--muted); text-align: center; margin-top: 32px; font-size: .88rem; }
.footer strong { color: var(--ink); }

@media (max-width: 720px) {
  .grid-2, .report-grid { grid-template-columns: 1fr; }
  .brand-inner { align-items: flex-start; }
  .brand-mark { display: none; }
  .card { padding: 18px; }
  .meta-row { grid-template-columns: 1fr; gap: 2px; }
}

@media print {
  body { background: #fff; }
  .brandbar, .hero, #setup, #wizard, .no-print, .footer { display: none !important; }
  .shell { max-width: 100%; padding: 0; }
  #result { display: block !important; }
  .card, .result-hero { box-shadow: none; break-inside: avoid; }
  .result-hero { background: #fff !important; color: #111 !important; border: 2px solid #173f37; }
  .result-label, .result-short { color: #333 !important; }
  .result-mode { color: #173f37 !important; }
  .pill { color: #111; border-color: #777; }
  @page { size: A4; margin: 14mm; }
}
