:root {
  --lean-blue: #345574;
  --lean-blue-dark: #28465f;
  --lean-gray: #696969;
  --lean-light-gray: #e9e9e9;
  --lean-white: #ffffff;
  --lean-black: #000000;
  --surface: #f7f8f9;
  --surface-strong: #eef1f3;
  --border: #d9dde1;
  --text: #1f2933;
  --muted: #6f7882;
  --error: #9f2f2f;
  --shadow: 0 18px 45px rgba(20, 38, 55, .08);
  --radius: 18px;
  --font-title: 'Barlow Condensed', sans-serif;
  --font-text: 'Inter', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-text);
  font-size: 15px;
  line-height: 1.62;
  color: var(--text);
  background: var(--lean-white);
}
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid rgba(52,85,116,.12);
  backdrop-filter: blur(12px);
}
.site-header__inner {
  width: min(1220px, calc(100% - 48px));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand-logo { width: 176px; height: auto; }
.header-context {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--lean-gray);
}
.header-divider { width: 1px; height: 18px; background: var(--border); }
.confidential { color: var(--lean-blue); font-weight: 600; }

.page {
  width: min(1220px, calc(100% - 48px));
  margin: 0 auto;
  padding: 54px 0 72px;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, .75fr);
  gap: 74px;
  align-items: end;
  padding: 20px 0 46px;
}
.eyebrow {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--lean-blue);
}
h1,h2,h3 {
  font-family: var(--font-title);
  color: var(--lean-blue);
  margin: 0;
  font-weight: 600;
}
h1 {
  margin-top: 12px;
  font-size: clamp(40px, 5vw, 60px);
  line-height: 1.04;
  max-width: 860px;
}
h2 { font-size: clamp(31px, 4vw, 40px); line-height: 1.08; }
h3 { font-size: 24px; line-height: 1.15; }
.intro-aside {
  border-left: 2px solid var(--lean-blue);
  padding-left: 26px;
}
.intro-aside > p {
  margin: 0 0 24px;
  color: var(--lean-gray);
  max-width: 48ch;
}
.intro-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--lean-light-gray);
  border-bottom: 1px solid var(--lean-light-gray);
}
.intro-meta div { display: flex; flex-direction: column; gap: 2px; }
.intro-meta strong {
  font-family: Georgia, serif;
  font-weight: 400;
  font-size: 23px;
  color: var(--lean-blue);
}
.intro-meta span { font-size: 11px; color: var(--muted); }
.draft-note { display: block; margin-top: 12px; font-size: 11px; color: var(--muted); }

.progress-wrap {
  margin: 0 0 34px;
  padding: 18px 0 14px;
  border-top: 1px solid var(--lean-light-gray);
  border-bottom: 1px solid var(--lean-light-gray);
}
.progress-head { display:flex; justify-content:space-between; font-size:11px; color:var(--muted); margin-bottom:8px; }
.progress-line { height: 3px; background: var(--lean-light-gray); overflow: hidden; }
.progress-fill { height:100%; width:14.28%; background:var(--lean-blue); transition: width .25s ease; }
.stage-nav {
  display:grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-top: 14px;
}
.stage {
  border:0;
  border-top:2px solid transparent;
  background:transparent;
  text-align:left;
  padding:10px 8px 6px;
  color:#9aa1a8;
  transition:.2s ease;
}
.stage span { display:block; font-family:Georgia,serif; font-size:13px; }
.stage small { display:block; margin-top:2px; font-size:10px; font-weight:600; }
.stage.active { color:var(--lean-blue); border-top-color:var(--lean-blue); }
.stage.completed { color:#566d82; }
.stage:not(.active):not(.completed) { cursor:default; }

.form-step { display:none; }
.form-step.active { display:block; animation: stepIn .22s ease; }
@keyframes stepIn { from { opacity:0; transform:translateY(5px);} to {opacity:1; transform:none;} }

.section-intro {
  display:grid;
  grid-template-columns: 90px minmax(0, 1fr) minmax(190px, .4fr);
  gap: 30px;
  align-items:start;
  padding: 42px 0 40px;
  border-bottom: 1px solid var(--lean-light-gray);
}
.section-number {
  font-family: Georgia, serif;
  font-size: 46px;
  line-height: 1;
  color: #bac4cc;
}
.section-copy p {
  margin: 12px 0 0;
  color: var(--lean-gray);
  max-width: 70ch;
}
.section-note {
  align-self:end;
  justify-self:end;
  max-width: 180px;
  font-size: 12px;
  color: var(--muted);
  padding-left: 18px;
  border-left: 1px solid var(--border);
}

.question-list { max-width: 1040px; margin: 0 auto; }
.question {
  padding: 34px 0;
  border-bottom: 1px solid var(--lean-light-gray);
}
.question.featured {
  margin: 18px 0;
  padding: 34px;
  background: #f7f9fb;
  border: 1px solid #e3e8ec;
  border-radius: 14px;
}
.question.compact { padding: 28px 0; }
.question.no-border { border: 0; padding: 0; }
.question-grid { display:grid; gap: 28px; border-bottom: 1px solid var(--lean-light-gray); }
.question-grid.two { grid-template-columns: repeat(2, minmax(0,1fr)); }
.question-grid.three { grid-template-columns: repeat(3, minmax(0,1fr)); }
.question-grid > .question { border-bottom:0; }
.question-title {
  display:block;
  font-size: 15px;
  font-weight: 600;
  color: #293744;
  margin-bottom: 10px;
}
.question-title em { color: var(--lean-blue); font-style: normal; }
.question-prompt, .helper {
  margin: -2px 0 12px;
  color: var(--muted);
  font-size: 13px;
}
.strong-helper { color:#4e5f6e; font-weight:500; }

input[type="text"], input[type="number"], textarea, select, .priority-row input {
  width:100%;
  border: 1px solid #ccd3d8;
  background:#fff;
  color:var(--text);
  border-radius: 9px;
  padding: 13px 14px;
  outline:none;
  transition:border-color .2s, box-shadow .2s, background .2s;
}
textarea { resize: vertical; min-height: 104px; }
input:focus, textarea:focus, select:focus {
  border-color: var(--lean-blue);
  box-shadow: 0 0 0 3px rgba(52,85,116,.10);
}
.invalid { border-color: var(--error) !important; box-shadow: 0 0 0 3px rgba(159,47,47,.08) !important; }

.choice-grid {
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 10px;
}
.choice-card {
  position:relative;
  min-height: 58px;
  display:flex;
  align-items:center;
  border: 1px solid #d6dce1;
  border-radius: 10px;
  background:#fff;
  padding: 12px 14px;
  cursor:pointer;
  transition:.18s ease;
}
.choice-card:hover { border-color:#9eb0bf; background:#fbfcfd; }
.choice-card input { position:absolute; opacity:0; pointer-events:none; }
.choice-card span { font-size: 13px; line-height:1.35; }
.choice-card:has(input:checked) {
  border-color: var(--lean-blue);
  background: rgba(52,85,116,.06);
  box-shadow: inset 3px 0 0 var(--lean-blue);
}
.choice-card:has(input:checked) span { color:var(--lean-blue); font-weight:600; }
.inline-error { display:none; margin-top:10px; color:var(--error); font-size:12px; }
.inline-error.show { display:block; }

.conditional-panel {
  margin-top: 16px;
  padding: 18px;
  border-left: 3px solid var(--lean-blue);
  background: var(--surface);
  border-radius: 0 10px 10px 0;
}
.conditional-panel label { display:block; font-size:12px; font-weight:600; margin-bottom:8px; color:#405161; }
.size-panel { margin: 30px 0 4px; padding: 24px; border: 1px solid #dce3e8; border-left: 4px solid var(--lean-blue); border-radius: 12px; }
.conditional-title { font-family: var(--font-title); font-size:23px; font-weight:600; color:var(--lean-blue); margin-bottom:18px; }
.embedded-grid { border-bottom:0; }

.priority-stack { display:grid; gap: 10px; }
.priority-row {
  display:grid;
  grid-template-columns: 52px 1fr;
  gap: 10px;
  align-items:center;
}
.priority-row span {
  height:48px;
  display:grid;
  place-items:center;
  font-family:Georgia,serif;
  color:var(--lean-blue);
  background:#f2f5f7;
  border-radius:8px;
}

.matrix-question { padding-bottom: 42px; }
.matrix-heading { display:flex; justify-content:space-between; gap:24px; align-items:flex-start; margin-bottom:14px; }
.matrix-hint { font-size:11px; color:var(--muted); max-width:180px; text-align:right; }
.matrix-wrap { border:1px solid var(--border); border-radius:12px; overflow:hidden; }
.matrix-row {
  display:grid;
  grid-template-columns: 1.4fr repeat(4, .8fr);
  min-height:58px;
  border-bottom:1px solid #e5e8eb;
}
.matrix-row:last-child { border-bottom:0; }
.matrix-row > span, .matrix-cell {
  display:flex;
  align-items:center;
  justify-content:center;
  padding:10px;
  text-align:center;
  font-size:11px;
}
.matrix-row > span:first-child { justify-content:flex-start; text-align:left; font-weight:600; font-size:12px; color:#354453; background:#fbfcfd; }
.matrix-header { background:#f0f3f5; min-height:50px; }
.matrix-header span { font-weight:600 !important; color:#596875 !important; background:transparent !important; }
.matrix-cell label { width:100%; height:100%; display:grid; place-items:center; cursor:pointer; }
.matrix-cell input { width:17px; height:17px; accent-color:var(--lean-blue); }

.area-detail { padding:18px 0; border-bottom:1px dashed #dfe4e8; }
.area-detail:last-child { border-bottom:0; }
.area-detail strong { display:block; color:var(--lean-blue); margin-bottom:8px; font-size:13px; }

.operation-empty { padding:28px; border:1px solid var(--border); background:var(--surface); border-radius:12px; }
.operation-empty p { margin:4px 0 0; color:var(--muted); }
.operation-block .choice-grid { margin-top:12px; }
.operation-badge { display:inline-block; margin-bottom:12px; padding:5px 9px; border-radius:999px; background:#edf2f6; color:var(--lean-blue); font-size:10px; font-weight:600; text-transform:uppercase; letter-spacing:.08em; }

.final-context {
  margin-top: 28px;
  padding: 28px;
  border-top: 3px solid var(--lean-blue);
  background: #f6f8fa;
}
.final-context h3 { margin-top:8px; }
.final-context p { margin:8px 0 0; color:var(--lean-gray); }

.form-actions {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:24px;
  padding: 28px 0 0;
}
.action-left, .action-right { display:flex; align-items:center; gap:14px; }
.btn {
  border-radius: 8px;
  padding: 12px 20px;
  border:1px solid transparent;
  font-weight:600;
  font-size:13px;
  min-width:120px;
}
.btn-primary { background:var(--lean-blue); color:white; }
.btn-primary:hover { background:var(--lean-blue-dark); }
.btn-secondary { background:white; color:var(--lean-blue); border-color:#b9c5cf; }
.btn:disabled { opacity:.6; cursor:not-allowed; }
.autosave-status { font-size:11px; color:var(--muted); }

.toast {
  position:fixed;
  left:50%;
  bottom:28px;
  transform:translate(-50%, 18px);
  background:#253847;
  color:white;
  padding:10px 15px;
  border-radius:8px;
  opacity:0;
  pointer-events:none;
  transition:.2s;
  z-index:60;
  font-size:12px;
}
.toast.show { opacity:1; transform:translate(-50%,0); }
.toast.error { background:#7b2b2b; }

.success-screen {
  position:fixed;
  inset:0;
  z-index:100;
  display:grid;
  place-items:center;
  padding:24px;
  background:rgba(255,255,255,.96);
}
.success-screen[hidden] { display:none; }
.success-card { max-width:600px; text-align:center; }
.success-symbol { width:64px; margin:0 auto 24px; }
.success-card h2 { margin:10px 0 12px; }
.success-card p { color:var(--lean-gray); margin:0 auto 24px; max-width:55ch; }

.honeypot { position:absolute !important; left:-9999px !important; width:1px !important; height:1px !important; opacity:0 !important; }
[hidden] { display:none !important; }

@media (max-width: 980px) {
  .intro { grid-template-columns:1fr; gap:30px; }
  .intro-aside { max-width:760px; }
  .section-intro { grid-template-columns:68px 1fr; }
  .section-note { grid-column:2; justify-self:start; max-width:none; }
  .stage-nav { overflow-x:auto; grid-template-columns: repeat(7, minmax(110px,1fr)); padding-bottom:4px; }
  .choice-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .question-grid.three { grid-template-columns:1fr; }
}

@media (max-width: 760px) {
  .site-header__inner, .page { width:min(100% - 28px, 1220px); }
  .site-header__inner { min-height:68px; }
  .brand-logo { width:145px; }
  .header-context > span:first-child, .header-divider { display:none; }
  .page { padding-top:30px; }
  .intro { padding-top:0; }
  h1 { font-size:clamp(38px,12vw,52px); }
  .intro-meta { grid-template-columns:repeat(3,1fr); gap:8px; }
  .intro-meta strong { font-size:19px; }
  .intro-meta span { font-size:9px; }
  .section-intro { grid-template-columns:1fr; gap:12px; padding:28px 0; }
  .section-number { font-size:34px; }
  .section-note { grid-column:auto; border-left:0; padding-left:0; border-top:1px solid var(--border); padding-top:10px; }
  .question-list { max-width:none; }
  .question, .question.compact { padding:26px 0; }
  .question.featured { margin:12px -8px; padding:24px 18px; border-radius:12px; }
  .question-grid.two { grid-template-columns:1fr; gap:0; }
  .question-grid { border-bottom:0; }
  .question-grid > .question { border-bottom:1px solid var(--lean-light-gray); }
  .choice-grid { grid-template-columns:1fr; }
  .matrix-heading { display:block; }
  .matrix-hint { margin-top:6px; text-align:left; max-width:none; }
  .matrix-wrap { border:0; overflow:visible; display:grid; gap:12px; }
  .matrix-header { display:none; }
  .matrix-row { display:block; border:1px solid var(--border); border-radius:10px; overflow:hidden; }
  .matrix-row > span:first-child { padding:12px 14px; border-bottom:1px solid var(--border); }
  .matrix-cell { justify-content:flex-start; padding:0; border-bottom:1px solid #edf0f2; }
  .matrix-cell:last-child { border-bottom:0; }
  .matrix-cell label { display:flex; gap:10px; justify-content:flex-start; padding:10px 14px; font-size:12px; }
  .matrix-cell label::after { content:attr(data-label); }
  .form-actions { align-items:flex-end; }
  .action-left { flex-direction:column; align-items:flex-start; }
  .btn { min-width:108px; padding:11px 15px; }
}
