:root {
  --bg: #f4f6f5;
  --panel: #ffffff;
  --ink: #17191c;
  --muted: #647078;
  --line: #dce3e0;
  --brand: #1f3a8a;
  --brand-2: #0f8f72;
  --warn: #b26a00;
  --soft: #eef4ff;
  --warm: #f7f2ea;
  --shadow: 0 14px 34px rgba(23, 25, 28, 0.08);
}

* { box-sizing: border-box; }

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 0%, rgba(15, 143, 114, 0.10), transparent 330px),
    linear-gradient(180deg, #fbfaf7 0, var(--bg) 360px);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, input, select {
  font: inherit;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 32px;
  background:
    linear-gradient(135deg, #0f1720 0%, #13251f 100%);
  color: #fff;
}

.topbar h1, h2, h3, p { margin: 0; }

h1 { font-size: 26px; line-height: 1.15; }
h2 { font-size: 25px; line-height: 1.2; }
h3 { font-size: 17px; margin-bottom: 16px; }

.eyebrow {
  color: var(--brand-2);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.muted {
  color: var(--muted);
  line-height: 1.55;
  margin-top: 8px;
}

.topbar-side {
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar-button {
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-weight: 850;
  cursor: pointer;
}

.save-status {
  min-width: 44px;
  color: #a7f3d0;
  font-size: 12px;
  font-weight: 850;
}

.layout {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 28px;
  max-width: 1480px;
  margin: 0 auto;
  padding: 30px;
}

.sidebar {
  position: sticky;
  top: 24px;
  align-self: start;
  display: grid;
  gap: 4px;
  padding: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.nav-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 42px;
  padding: 10px 10px 10px 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #34403c;
  text-align: left;
  font-size: 14px;
  font-weight: 780;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.nav-item span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-item:hover {
  background: #f4f7fb;
  color: var(--brand);
}

.nav-item.active {
  border-color: #c8d4f4;
  background: #eef4ff;
  color: var(--brand);
}

.nav-badge {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  color: #fff;
  font-size: 11px;
  font-weight: 950;
  line-height: 1;
}

.nav-badge.pending {
  background: #dc2626;
}

.nav-badge.done {
  background: #0f8f72;
}

.nav-badge.attention {
  background: #f59e0b;
  color: #1f1600;
}

#dimensionNav {
  display: grid;
  gap: 4px;
}

.workspace {
  min-width: 0;
}

.view { display: none; }
.view.active { display: block; }

.layout.mode-selecting {
  grid-template-columns: minmax(0, 980px);
  justify-content: center;
}

.layout.mode-selecting .sidebar {
  display: none;
}

.mode-hero {
  margin-bottom: 18px;
  padding: 38px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.98), rgba(240,247,244,0.96));
  box-shadow: var(--shadow);
}

.mode-hero h2 {
  max-width: 760px;
  margin-top: 8px;
  font-size: 44px;
  line-height: 1.04;
}

.mode-lead {
  max-width: 780px;
  margin: 14px 0 0;
  color: #303741;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.48;
}

.mode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.mode-card {
  display: grid;
  gap: 10px;
  min-height: 320px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.mode-card:hover,
.mode-card:focus-visible {
  border-color: #b8c7ed;
  box-shadow: 0 18px 42px rgba(31, 58, 138, 0.12);
  transform: translateY(-2px);
  outline: none;
}

.mode-card.selected {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(31, 58, 138, 0.14), var(--shadow);
}

.mode-card.recommended {
  border-color: rgba(15, 143, 114, 0.34);
}

.mode-card strong {
  display: block;
  margin-top: 8px;
  color: var(--brand);
  font-size: 28px;
  line-height: 1.12;
}

.mode-card > span:not(.mode-tag) {
  color: var(--brand-2);
  font-size: 15px;
  font-weight: 900;
}

.mode-card p {
  margin: 4px 0 0;
  color: #303741;
  font-size: 17px;
  font-weight: 650;
  line-height: 1.5;
}

.mode-card small {
  align-self: end;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.mode-tag {
  justify-self: start;
  padding: 6px 9px;
  border-radius: 999px;
  background: #e9fbf5;
  color: #047857;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.mode-tag.secondary {
  background: #eef4ff;
  color: var(--brand);
}

.mode-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 16px 18px;
  border: 1px solid #c8d4f4;
  border-radius: 8px;
  background: #eef4ff;
}

.mode-summary:empty {
  display: none;
}

.mode-summary strong,
.mode-summary span {
  display: block;
}

.mode-summary strong {
  margin-top: 4px;
  color: var(--brand);
  font-size: 18px;
}

.mode-summary span {
  margin-top: 3px;
  color: #34403c;
  font-weight: 650;
  line-height: 1.4;
}

.compact-button {
  min-height: 38px;
  padding: 8px 12px;
  white-space: nowrap;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.context-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  padding: 36px 38px;
  border: 0;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.98), rgba(247,250,248,0.96));
  box-shadow: var(--shadow);
}

.context-hero::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 7px;
  background: var(--brand-2);
}

.context-hero h2 {
  max-width: 820px;
  margin-top: 6px;
  font-size: 46px;
  line-height: 1.02;
}

.context-lead {
  max-width: 780px;
  margin-top: 12px;
  color: #303741;
  font-size: 18px;
  font-weight: 720;
  line-height: 1.45;
}

.section-intro {
  margin: 6px 0 12px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.size-context-card {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.65fr) minmax(280px, 0.85fr);
  gap: 18px;
  align-items: start;
  margin-top: 18px;
  padding: 22px;
  border: 1px solid #c8d4f4;
  border-radius: 8px;
  background:
    linear-gradient(135deg, #eef4ff 0%, #f8fbfa 100%);
  box-shadow: var(--shadow);
}

.size-context-card h3 {
  margin: 4px 0 0;
  font-size: 22px;
}

.size-picker {
  align-self: center;
}

.size-context-preview {
  min-height: 96px;
  padding: 14px;
  border: 1px solid rgba(31, 58, 138, 0.16);
  border-radius: 8px;
  background: #fff;
}

.size-context-preview b,
.size-context-preview span,
.size-context-preview small {
  display: block;
}

.size-context-preview b {
  margin-bottom: 6px;
  color: var(--brand);
}

.size-context-preview span {
  color: #334155;
  line-height: 1.45;
}

.size-context-preview small {
  margin-top: 10px;
  color: var(--muted);
  font-weight: 750;
  line-height: 1.35;
}

label {
  display: grid;
  gap: 8px;
  color: #303741;
  font-size: 14px;
  font-weight: 750;
}

.field-help {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.45;
}

.field-help.error {
  color: #b91c1c;
  font-weight: 750;
}

input[readonly] {
  background: #f8fafc;
  color: #475569;
}

input, select {
  min-height: 44px;
  width: 100%;
  padding: 9px 11px;
  border: 1px solid #cdd5de;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
}

input:focus, select:focus {
  outline: 3px solid rgba(39, 51, 212, 0.16);
  border-color: var(--brand);
}

.action-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

.action-row.split {
  justify-content: space-between;
}

.primary-button, .ghost-button {
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--brand);
  border-radius: 6px;
  font-weight: 800;
  cursor: pointer;
}

.primary-button {
  background: var(--brand);
  color: #fff;
}

.ghost-button {
  background: #fff;
  color: var(--brand);
}

.score-chip {
  display: grid;
  place-items: center;
  min-width: 96px;
  min-height: 78px;
  border: 1px solid #c9d0ff;
  border-radius: 8px;
  background: var(--soft);
  color: var(--brand);
}

.score-chip span {
  font-size: 34px;
  line-height: 1;
  font-weight: 900;
}

.score-chip small {
  color: var(--muted);
  font-weight: 800;
}

.section-metrics {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  min-width: 300px;
}

.area-progress {
  max-width: 160px;
  color: #34403c;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.35;
  text-align: center;
}

.question {
  margin-bottom: 16px;
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(23, 25, 28, 0.045);
}

.question.inferred {
  padding: 16px 18px;
  border-style: dashed;
  background: #fbfcfd;
  box-shadow: none;
}

.question-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.question-number {
  margin-bottom: 5px;
  color: var(--brand-2);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.question-title {
  font-size: 18px;
  font-weight: 850;
  line-height: 1.35;
}

.concept {
  min-height: 72px;
  padding: 14px 16px;
  border: 1px solid #cfe0da;
  border-left: 4px solid var(--brand-2);
  border-radius: 6px;
  background: #f4fbf8;
}

.question-help {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid #d9e0e7;
  border-left: 4px solid var(--brand);
  border-radius: 8px;
  background: #f8fafc;
}

.question-help summary {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0;
  color: var(--brand);
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.question-help summary:hover {
  color: var(--brand);
}

.question-help[open] summary {
  color: var(--brand);
}

.dependency-note {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid #d9e0e7;
  border-radius: 8px;
  background: #f8fafc;
}

.dependency-note summary {
  color: var(--brand);
  font-weight: 850;
  cursor: pointer;
}

.dependency-note p {
  margin: 8px 0;
  color: #34403c;
  line-height: 1.45;
}

.dependency-note ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.45;
}

.question-help span {
  display: block;
  margin-top: 6px;
  padding: 8px 0 0;
  border-top: 1px solid var(--line);
  color: #34403c;
  line-height: 1.45;
}

.concept b {
  display: block;
  margin-bottom: 6px;
  color: #075e49;
}

.concept span {
  display: block;
  color: #34403c;
  line-height: 1.45;
}

.concept.empty {
  border-color: #dbe2e9;
  border-left-color: #b8c2cc;
  background: #fbfcfd;
}

.concept.empty span {
  color: var(--muted);
}

.answer-scale {
  margin: 0 0 12px;
  padding: 14px;
  border: 1px solid #d9e0e7;
  border-radius: 8px;
  background: #fbfcfd;
}

.answer-scale-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.answer-scale-head label {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.clear-answer {
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid #cdd5de;
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  font-weight: 850;
  cursor: pointer;
}

.answer-scale input[type="range"] {
  width: 100%;
  margin-bottom: 4px;
  accent-color: var(--brand);
}

.answer-scale.unanswered input[type="range"] {
  opacity: 0.45;
}

.scale-labels {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin: 0 0 14px;
}

.scale-labels button {
  min-height: 32px;
  border: 1px solid #d9e0e7;
  border-radius: 999px;
  background: #fff;
  color: #647078;
  font-size: 12px;
  font-weight: 950;
  cursor: pointer;
}

.scale-labels button.active {
  border-color: #c9d0ff;
  background: var(--soft);
  color: var(--brand);
}

.answer-cells {
  display: grid;
  grid-template-columns: repeat(5, minmax(170px, 1fr));
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.answer-cell {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-content: start;
  align-items: start;
  gap: 7px;
  min-height: 168px;
  padding: 12px;
  border: 1px solid #d9e0e7;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.answer-cell:hover,
.answer-cell:focus {
  border-color: var(--brand);
  outline: 3px solid rgba(39, 51, 212, 0.12);
}

.answer-cell.selected {
  border-color: var(--brand);
  background: var(--soft);
  box-shadow: inset 0 0 0 2px rgba(39, 51, 212, 0.12);
}

.answer-cell.included {
  border-color: #cfe0da;
  background: #f4fbf8;
}

.answer-level-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-width: 36px;
  min-height: 26px;
  padding: 4px 8px;
  border: 1px solid #d9e0e7;
  border-radius: 999px;
  background: #f0f3f6;
  color: #647078;
  font-size: 12px;
  font-weight: 950;
}

.answer-cell.included .answer-level-label {
  border-color: #b8ddd0;
  background: #fff;
  color: #047857;
}

.answer-cell.selected .answer-level-label {
  border-color: #c9d0ff;
  background: #fff;
  color: var(--brand);
}

.answer-copy {
  display: grid;
  gap: 6px;
}

.answer-copy b {
  color: var(--brand);
  font-size: 13px;
  line-height: 1.25;
}

.answer-copy span {
  color: #34403c;
  font-size: 12px;
  line-height: 1.35;
}

.question,
.question-help,
.answer-cell,
.concept {
  -webkit-user-select: none;
  user-select: none;
}

.result-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 18px;
  margin-bottom: 18px;
}

.simple-result {
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
}

.summary-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px;
  gap: 22px;
  align-items: center;
  padding: 26px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, #ffffff 0%, #f4fbf8 100%);
  box-shadow: var(--shadow);
}

.summary-hero h3 {
  margin: 4px 0 10px;
  font-size: 34px;
  line-height: 1.08;
}

.summary-hero p {
  margin: 0;
  color: #334155;
  font-size: 16px;
  line-height: 1.55;
}

.summary-score {
  display: grid;
  place-items: center;
  min-height: 150px;
  border: 1px solid #cfe0da;
  border-radius: 8px;
  background: #fff;
  text-align: center;
}

.summary-score.red { border-color: #fecaca; background: #fff5f5; }
.summary-score.yellow { border-color: #fde68a; background: #fffbeb; }
.summary-score.green { border-color: #bbf7d0; background: #f0fdf4; }
.summary-score.blue { border-color: #c8d4f4; background: #eef4ff; }

.summary-score span {
  color: var(--brand-2);
  font-size: 28px;
  font-weight: 950;
  line-height: 1.05;
  text-align: center;
}

.summary-score small {
  max-width: 120px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.25;
  text-transform: uppercase;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.summary-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 10px 24px rgba(23, 25, 28, 0.045);
}

.summary-card.red { border-color: #fecaca; background: #fff5f5; }
.summary-card.yellow { border-color: #fde68a; background: #fffbeb; }
.summary-card.green { border-color: #bbf7d0; background: #f0fdf4; }
.summary-card.blue { border-color: #c8d4f4; background: #eef4ff; }

.summary-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--brand-2);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.summary-card b {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
}

.summary-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.drill-preview,
.preview-sections,
.locked-preview {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.preview-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.preview-head h3,
.locked-preview h3 {
  margin: 4px 0 0;
  font-size: 22px;
}

.preview-head span {
  padding: 7px 10px;
  border-radius: 999px;
  background: #eef4ff;
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.drill-bars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.drill-bar-card {
  min-width: 0;
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #d9e0e7;
  border-radius: 8px;
  background: #fbfcfd;
}

.drill-bar-card.red { border-color: #fecaca; background: #fff5f5; }
.drill-bar-card.yellow { border-color: #fde68a; background: #fffbeb; }
.drill-bar-card.green { border-color: #bbf7d0; background: #f0fdf4; }
.drill-bar-card.blue { border-color: #c8d4f4; background: #eef4ff; }

.drill-bar-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  align-items: start;
}

.drill-bar-head b {
  min-width: 0;
  font-size: 13px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.drill-bar-head span {
  justify-self: start;
  display: inline-block;
  max-width: 100%;
  color: var(--brand);
  font-size: 12px;
  font-weight: 950;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.drill-track {
  height: 9px;
  border-radius: 999px;
  background: #e5e9ef;
  overflow: hidden;
}

.drill-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}

.drill-track.red i { background: #dc2626; }
.drill-track.yellow i { background: #f59e0b; }
.drill-track.green i { background: #16a34a; }
.drill-track.blue i { background: var(--brand); }

.drill-bar-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.preview-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}

.preview-card {
  min-width: 0;
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #d9e0e7;
  border-radius: 8px;
  background: #fbfcfd;
}

.preview-card.red { border-color: #fecaca; background: #fff5f5; }
.preview-card.yellow { border-color: #fde68a; background: #fffbeb; }
.preview-card.green { border-color: #bbf7d0; background: #f0fdf4; }
.preview-card.blue { border-color: #c8d4f4; background: #eef4ff; }

.preview-card-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: start;
}

.preview-card-top b {
  min-width: 0;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.preview-card-top span {
  display: inline-grid;
  justify-self: start;
  place-items: center;
  max-width: 100%;
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef4ff;
  color: var(--brand);
  font-size: 11px;
  font-weight: 950;
  line-height: 1.15;
  text-align: center;
  overflow-wrap: anywhere;
}

.preview-card p,
.preview-card small,
.preview-teaser span {
  min-width: 0;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.preview-teaser {
  display: grid;
  gap: 5px;
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.preview-teaser strong {
  color: #34403c;
  font-size: 12px;
}

.locked-preview {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
  gap: 18px;
  border-color: #c8d4f4;
  background: #eef4ff;
}

.locked-preview ul {
  margin: 0;
  padding-left: 20px;
  color: #34403c;
  line-height: 1.5;
}

.report-gate {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(340px, 0.75fr);
  gap: 22px;
  align-items: start;
  margin-bottom: 18px;
  padding: 24px;
  border: 1px solid #c8d4f4;
  border-radius: 8px;
  background: var(--soft);
}

.report-gate h3 {
  margin: 4px 0 8px;
  font-size: 26px;
}

.signup-form {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 8px;
  background: #fff;
}

.full-report[hidden] {
  display: none;
}

.panel {
  margin-bottom: 18px;
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.size-panel {
  border-color: #c8d4f4;
  background:
    linear-gradient(135deg, #ffffff 0%, #f5f8ff 100%);
}

#radar {
  width: 100%;
  max-width: 520px;
  height: auto;
}

.stack {
  display: grid;
  gap: 12px;
}

.insight {
  padding: 14px;
  border-left: 4px solid var(--brand-2);
  border-radius: 6px;
  background: #f4fbf8;
}

.size-reading {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  margin-top: 16px;
}

.executive-score {
  display: grid;
  place-items: center;
  min-height: 150px;
  border: 1px solid #c9d0ff;
  border-radius: 8px;
  background: #fff;
  text-align: center;
}

.executive-score span {
  color: var(--brand);
  font-size: 25px;
  font-weight: 950;
  line-height: 1.08;
  text-align: center;
}

.executive-score small {
  max-width: 120px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.25;
  text-transform: uppercase;
}

.executive-reading > p {
  margin: 0 0 12px;
  line-height: 1.55;
}

.executive-next-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.executive-next-grid div {
  padding: 12px;
  border: 1px solid #d9e0e7;
  border-radius: 8px;
  background: #fbfcfd;
}

.executive-next-grid b,
.executive-next-grid span {
  display: block;
}

.executive-next-grid b {
  margin-bottom: 5px;
  color: var(--brand);
  font-size: 12px;
  text-transform: uppercase;
}

.executive-next-grid span {
  color: #34403c;
  font-size: 13px;
  line-height: 1.4;
}

.score-comparison {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.score-comparison div {
  display: grid;
  gap: 8px;
  place-items: center;
  min-height: 126px;
  padding: 14px 10px;
  border: 1px solid #c9d0ff;
  border-radius: 8px;
  background: #fff;
  text-align: center;
}

.score-comparison div:last-child {
  background: var(--soft);
}

.score-comparison span {
  color: var(--brand);
  font-size: 42px;
  font-weight: 950;
  line-height: 1;
}

.score-comparison small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.25;
  text-transform: uppercase;
}

.size-reading b {
  display: block;
  margin-bottom: 8px;
}

.size-reading p {
  margin: 0 0 8px;
  line-height: 1.5;
}

.insight b {
  display: block;
  margin-bottom: 5px;
}

.table {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.table-row {
  display: grid;
  grid-template-columns: 1.1fr 90px 140px 2fr;
  gap: 12px;
  align-items: start;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.table-row:last-child { border-bottom: 0; }
.table-head {
  background: #f0f3f6;
  color: #2c3440;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.compact .table-row {
  grid-template-columns: 1.1fr 1.7fr 90px 120px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.pillar-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.pillar-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.pillar-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.pillar-card-head span {
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.maturity-tag {
  display: inline-flex;
  max-width: 100%;
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  line-height: 1.15;
  overflow-wrap: anywhere;
  text-align: center;
}

.maturity-tag.red { background: #fee2e2; color: #b91c1c; }
.maturity-tag.yellow { background: #fef3c7; color: #92400e; }
.maturity-tag.green { background: #dcfce7; color: #166534; }
.maturity-tag.blue { background: #eef4ff; color: var(--brand); }

.pillar-card h4 {
  margin: 3px 0 0;
  font-size: 18px;
}

.thermometer {
  position: relative;
  width: 22px;
  height: 72px;
  border: 1px solid #c8d4f4;
  border-radius: 999px;
  background: #eef4ff;
  overflow: hidden;
}

.thermometer i {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: block;
  border-radius: inherit;
  background: var(--brand);
}

.thermometer.red {
  border-color: #fecaca;
  background: #fff5f5;
}

.thermometer.red i { background: #dc2626; }

.thermometer.yellow {
  border-color: #fde68a;
  background: #fffbeb;
}

.thermometer.yellow i { background: #f59e0b; }

.thermometer.green {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.thermometer.green i { background: #16a34a; }

.thermometer.blue {
  border-color: #c8d4f4;
  background: #eef4ff;
}

.thermometer.blue i { background: var(--brand); }

.pillar-card p,
.pillar-card li {
  color: #475569;
  line-height: 1.45;
}

.pillar-card p,
.pillar-card ul {
  margin: 0;
}

.pillar-card strong {
  color: #34403c;
}

.didactic-actions {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.didactic-actions li {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid #d9e0e7;
  border-radius: 8px;
  background: #fff;
}

.didactic-actions b {
  color: var(--brand);
  font-size: 12px;
  text-transform: uppercase;
}

.didactic-actions span {
  color: #34403c;
}

.mini-track {
  height: 8px;
  border-radius: 999px;
  background: #e5e9ef;
  overflow: hidden;
}

.mini-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}

.roadmap-plan {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.roadmap-step {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.roadmap-step span {
  color: var(--brand);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.roadmap-step h4 {
  margin: 6px 0 10px;
}

.roadmap-step ul {
  margin: 0;
  padding-left: 20px;
  color: #475569;
  line-height: 1.45;
}

.subtheme-grid {
  position: relative;
  display: grid;
  gap: 10px;
}

.subtheme-grid::before {
  content: "";
  position: absolute;
  top: 18px;
  bottom: 18px;
  left: 18px;
  width: 2px;
  background: #d9e0e7;
}

.subtheme-card {
  position: relative;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.subtheme-card.high {
  border-color: #fecaca;
  background: #fff5f5;
}

.timeline-dot {
  position: relative;
  z-index: 1;
  width: 14px;
  height: 14px;
  margin: 3px auto 0;
  border: 3px solid #fff;
  border-radius: 999px;
  background: var(--brand);
  box-shadow: 0 0 0 1px #c8d4f4;
}

.subtheme-card.high .timeline-dot {
  background: #dc2626;
  box-shadow: 0 0 0 1px #fecaca;
}

.stage-label {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef4ff;
  color: var(--brand);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.subtheme-card.high .stage-label {
  background: #fee2e2;
  color: #b91c1c;
}

.subtheme-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.subtheme-card b {
  display: block;
  line-height: 1.3;
}

.subtheme-card strong {
  color: var(--brand);
  max-width: 150px;
  text-align: right;
  line-height: 1.2;
}

.subtheme-card strong.red { color: #dc2626; }
.subtheme-card strong.yellow { color: #b26a00; }
.subtheme-card strong.green { color: #16a34a; }
.subtheme-card strong.blue { color: var(--brand); }

.conclusion-panel {
  border-color: #c8d4f4;
  background: #fbfcff;
}

.conclusion-panel h3 {
  margin: 4px 0 10px;
  font-size: 26px;
}

.conclusion-panel p {
  margin: 0 0 14px;
  color: #34403c;
  line-height: 1.55;
}

.dooop-cta {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border: 1px solid #c8d4f4;
  border-radius: 8px;
  background: #eef4ff;
}

.dooop-cta div {
  display: grid;
  gap: 4px;
}

.dooop-cta b {
  color: var(--brand);
}

.dooop-cta span {
  color: #34403c;
  line-height: 1.4;
}

.dooop-cta a {
  text-decoration: none;
  white-space: nowrap;
}

.alert-insight small {
  display: block;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.action-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.action-card h4 {
  margin: 0 0 10px;
  font-size: 15px;
}

.action-card ol {
  margin: 0;
  padding-left: 20px;
}

.action-card li {
  margin: 8px 0;
  line-height: 1.4;
}

.level-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 28px;
  padding: 4px 8px;
  background: #e9fbf5;
  color: #047857;
  border-radius: 999px;
  font-weight: 900;
}

.inferred-pill {
  background: #eef4ff;
  color: var(--brand);
}

@media (max-width: 980px) {
  .topbar, .section-head, .context-hero { flex-direction: column; }
  .topbar {
    align-items: flex-start;
    padding: 18px;
  }
  .topbar-side {
    align-items: stretch;
    width: 100%;
    flex-wrap: wrap;
  }
  .layout {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px;
  }
  .layout.mode-selecting {
    display: flex;
  }
  .sidebar {
    position: static;
    top: 0;
    z-index: 10;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    order: -1;
    gap: 6px;
    padding: 8px;
    border-radius: 8px;
  }
  #dimensionNav {
    display: contents;
    gap: 8px;
  }
  .nav-item {
    width: 100%;
    min-height: 38px;
    height: auto;
    padding: 9px 10px;
    white-space: normal;
    font-size: 13px;
  }
  .nav-item span:first-child {
    white-space: normal;
  }
  .nav-item.active {
    border-color: #c8d4f4;
  }
  .section-metrics {
    width: 100%;
    min-width: 0;
    justify-content: space-between;
  }
  .area-progress {
    max-width: none;
    text-align: left;
  }
  .form-grid,
  .mode-grid,
  .result-grid,
  .cards-grid,
  .size-context-card,
  .summary-hero,
  .summary-grid,
  .report-gate,
  .drill-bars,
  .preview-card-grid,
  .locked-preview {
    grid-template-columns: 1fr;
  }
  .pillar-grid,
  .subtheme-grid,
  .executive-next-grid,
  .roadmap-plan {
    grid-template-columns: 1fr;
  }
  .preview-head {
    flex-direction: column;
  }
  .size-reading { grid-template-columns: 1fr; }
  .context-hero {
    padding: 26px 22px;
  }
  .mode-hero {
    padding: 28px 22px;
  }
  .mode-hero h2 {
    font-size: 34px;
  }
  .mode-lead {
    font-size: 16px;
  }
  .mode-card {
    min-height: 0;
    padding: 22px;
  }
  .mode-summary {
    align-items: stretch;
    flex-direction: column;
  }
  .context-hero h2 { font-size: 34px; }
  .context-lead { font-size: 16px; }
  .score-comparison { grid-template-columns: 1fr; }
  .table-row, .compact .table-row { grid-template-columns: 1fr; }
  .question {
    padding: 16px;
  }
  .question-head {
    align-items: flex-start;
  }
  .answer-scale {
    padding: 12px;
  }
  .answer-cells {
    grid-template-columns: 1fr;
    overflow-x: visible;
  }
  .answer-cell {
    min-height: 0;
    padding: 14px;
  }
  .scale-labels {
    gap: 4px;
  }
  .answer-level-label {
    min-width: 44px;
    min-height: 30px;
  }
  .dooop-cta {
    align-items: stretch;
    flex-direction: column;
  }
}

@media print {
  .topbar, .sidebar, .action-row, #printBtn { display: none; }
  body { background: #fff; }
  .layout { display: block; padding: 0; }
  .panel, .form-grid, .question { box-shadow: none; break-inside: avoid; }
  .view { display: none !important; }
  #resultView { display: block !important; }
}
