:root {
  /* BlindSpotMap design tokens */
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --text-xs: .75rem;
  --text-sm: .875rem;
  --text-md: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.375rem;
  --text-2xl: clamp(1.65rem, 2.6vw, 2.2rem);
  --text-display: clamp(2.75rem, 6vw, 5rem);
  --leading-tight: 1.12;
  --leading-body: 1.6;

  --color-brand-700: #1739a7;
  --color-brand-600: #2454e6;
  --color-brand-500: #3567f2;
  --color-brand-100: #eaf0ff;
  --color-ink-950: #101c30;
  --color-ink-800: #26354a;
  --color-ink-600: #5d6b82;
  --color-line: #d9e0eb;
  --color-line-strong: #bdc8da;
  --color-canvas: #f4f7fb;
  --color-surface: #ffffff;
  --color-surface-subtle: #f8faff;
  --color-danger-700: #b42318;
  --color-danger-100: #fee4e2;
  --color-warning-700: #b54708;
  --color-warning-100: #ffead5;
  --color-success-700: #027a48;
  --color-success-100: #d1fadf;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(16,28,48,.04), 0 4px 12px rgba(16,28,48,.04);
  --shadow-md: 0 12px 34px rgba(16,28,48,.075);
  --shadow-lg: 0 22px 58px rgba(16,28,48,.11);
  --shadow-focus: 0 0 0 3px rgba(36,84,230,.16);
  --duration-fast: 140ms;
  --duration-base: 220ms;
  --ease-standard: cubic-bezier(.2,.8,.2,1);

  /* Backward-compatible aliases for assessment screens. */
  --blue: var(--color-brand-600);
  --blue-dark: var(--color-brand-700);
  --navy: var(--color-ink-950);
  --ink: var(--color-ink-800);
  --muted: var(--color-ink-600);
  --line: var(--color-line);
  --border: var(--line);
  --soft: var(--color-surface-subtle);
  --blue-soft: var(--color-brand-100);
  --white: var(--color-surface);
  --red: var(--color-danger-700);
  --red-soft: var(--color-danger-100);
  --amber: var(--color-warning-700);
  --amber-soft: var(--color-warning-100);
  --green: var(--color-success-700);
  --green-soft: var(--color-success-100);
  --shadow: var(--shadow-md);
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--color-canvas);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: linear-gradient(180deg, #f9fbff 0%, var(--color-canvas) 100%); font-size: var(--text-md); line-height: var(--leading-body); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { min-width: 0; font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .55; cursor: not-allowed; }

.site-header {
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4vw;
  background: rgba(255,255,255,.92);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--navy); font-weight: 800; letter-spacing: -.02em; }
.brand-mark { width: 34px; height: 34px; flex: 0 0 auto; border-radius: 9px; display: block; background: url("/static/brand-mark.321ca4b9eeca.svg") center / contain no-repeat; box-shadow: none; }
.brand small { font-weight: 600; color: var(--muted); letter-spacing: 0; border-left: 1px solid var(--line); padding-left: 10px; }
.header-status { color: var(--muted); font-size: .9rem; }
.header-actions { display: flex; gap: 9px; }

.page { width: min(1180px, 92vw); margin: 0 auto; }
.home-page { padding: 72px 0 84px; }
.hero { max-width: 870px; margin: 0 auto 52px; text-align: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-weight: 800; font-size: .72rem; color: var(--blue); }
.hero h1, .question-card h1, .report-hero h1 { color: var(--navy); letter-spacing: -.045em; }
.hero h1 { font-size: clamp(2.6rem, 6vw, 5rem); line-height: .98; margin: 16px 0 20px; }
.hero-copy { font-size: 1.22rem; line-height: 1.65; color: #526179; max-width: 780px; margin: 0 auto; }
.notice { margin: 26px auto 0; padding: 16px 18px; background: var(--blue-soft); border: 1px solid #b8c8ff; border-radius: 12px; color: #263b73; text-align: left; line-height: 1.5; max-width: 760px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; margin-top: 28px; flex-wrap: wrap; }

.button { border: 1px solid transparent; padding: 12px 18px; border-radius: 9px; font-weight: 750; display: inline-flex; align-items: center; justify-content: center; gap: 7px; transition: .15s ease; }
.button:hover { transform: translateY(-1px); }
.button.primary { background: var(--blue); color: white; box-shadow: 0 9px 24px rgba(36,84,230,.23); }
.button.primary:hover { background: var(--blue-dark); }
.button.secondary { background: white; border-color: var(--line); color: var(--navy); }
.button.secondary:hover, .button.ghost:hover { border-color: #a9b6cc; background: white; }
.button.ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.button.small { padding: 8px 12px; font-size: .84rem; }
.button.danger-link { border: 0; background: transparent; color: var(--red); }

.value-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 0 0 64px; }
.value-grid article { background: white; padding: 27px; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 9px 30px rgba(20,34,56,.04); }
.value-grid h2 { margin: 15px 0 8px; color: var(--navy); }
.value-grid p { margin: 0; color: var(--muted); line-height: 1.55; }
.step-number { display: inline-grid; place-items: center; width: 34px; height: 34px; color: var(--blue); background: var(--blue-soft); border-radius: 9px; font-weight: 800; }

.sessions-section { background: white; border: 1px solid var(--line); border-radius: 18px; padding: 28px; box-shadow: var(--shadow); }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.section-heading h2 { margin: 5px 0 0; color: var(--navy); letter-spacing: -.025em; }
.sessions-list { display: grid; gap: 10px; }
.session-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 4px; border-top: 1px solid var(--line); }
.session-row:first-child { border-top: 0; }
.session-title { font-weight: 800; color: var(--navy); margin-bottom: 7px; }
.session-meta { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: .8rem; color: var(--muted); }
.session-actions { display: flex; gap: 8px; align-items: center; }

.pill { display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 8px; font-size: .7rem; font-weight: 850; text-transform: uppercase; letter-spacing: .06em; background: var(--soft); color: var(--muted); }
.pill.complete, .pill.critical { color: var(--red); background: var(--red-soft); }
.pill.in_progress, .pill.high { color: var(--amber); background: var(--amber-soft); }
.pill.medium { color: var(--blue-dark); background: var(--blue-soft); }
.pill.lower, .pill.low { color: var(--green); background: var(--green-soft); }

.site-footer { padding: 26px 4vw; color: var(--muted); font-size: .8rem; text-align: center; border-top: 1px solid var(--line); background: rgba(255,255,255,.7); }
.muted { color: var(--muted); }
.empty-state { padding: 28px; text-align: center; background: var(--soft); border-radius: 12px; color: var(--muted); }
.empty-state h3 { color: var(--navy); margin-top: 0; }
.loading-card, .error-card { margin: 40px auto; max-width: 720px; padding: 26px; background: white; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.error-card { border-color: #f4b8b2; background: #fff8f7; color: var(--red); }
.error-card p { margin-bottom: 0; }

.interview-page { padding: 38px 0 70px; }
.interview-shell { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 28px; align-items: start; }
.interview-sidebar { position: sticky; top: 105px; background: var(--navy); color: white; border-radius: 16px; padding: 25px; box-shadow: var(--shadow); }
.interview-sidebar .eyebrow { color: #9bb3ff; }
.phase-list { margin: 18px 0 24px; padding: 0; display: grid; gap: 8px; color: #dce4f2; list-style: none; }
.phase-list li { display: flex; gap: 10px; align-items: flex-start; padding: 9px; border-radius: 10px; opacity: .62; }
.phase-list li > span { display: grid; place-items: center; width: 23px; height: 23px; flex: 0 0 23px; border: 1px solid rgba(255,255,255,.28); border-radius: 50%; font-size: .7rem; font-weight: 850; }
.phase-list li > div { display: grid; gap: 4px; min-width: 0; }
.phase-list li strong { color: inherit; font-size: .84rem; line-height: 1.35; }
.phase-list li small { color: #aebbd0; font-size: .72rem; line-height: 1.45; }
.phase-list li.current { background: rgba(255,255,255,.09); opacity: 1; }
.phase-list li.current > span { border-color: #9bb3ff; background: #3155b7; color: white; }
.phase-list li.complete { opacity: .82; }
.phase-list li.complete > span { border-color: #82d8ac; background: #17633d; color: white; }
.sidebar-note { font-size: .85rem; line-height: 1.55; color: #aebbd0; border-top: 1px solid rgba(255,255,255,.14); padding-top: 18px; }
.question-panel { min-width: 0; }
.guided-progress { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 14px; padding: 20px 22px; border: 1px solid #cdd8f4; border-radius: 14px; background: #f6f8ff; }
.guided-progress-copy { display: grid; gap: 5px; }
.guided-progress h2 { margin: 0; color: var(--navy); font-size: 1.18rem; }
.guided-progress p { max-width: 690px; margin: 0; color: var(--muted); font-size: .84rem; line-height: 1.5; }
.time-estimate { display: grid; flex: 0 0 auto; gap: 3px; min-width: 180px; padding: 12px 14px; border-radius: 10px; background: white; box-shadow: 0 4px 14px rgba(20,34,56,.07); }
.time-estimate strong { color: var(--navy); font-size: .9rem; }
.time-estimate span { color: var(--muted); font-size: .7rem; }
.progress-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 13px; }
.progress-text { display: grid; gap: 3px; color: var(--muted); font-size: .75rem; }
.progress-text strong { color: var(--navy); font-size: .82rem; }
.progress-text span { color: var(--muted); }
.progress-track { height: 7px; background: #e5e9f1; border-radius: 999px; overflow: hidden; width: min(300px, 42vw); }
.progress-track span { height: 100%; display: block; border-radius: inherit; background: var(--blue); transition: width .25s ease; }
.question-context { display: flex; gap: 14px; align-items: baseline; margin: 0 0 14px; padding: 12px 15px; border-left: 3px solid var(--blue); border-radius: 0 9px 9px 0; background: #f8fafc; }
.question-context > span { flex: 0 0 auto; color: var(--blue-dark); font-size: .69rem; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.question-context p { margin: 0; color: #526179; font-size: .82rem; line-height: 1.5; }
.question-card { background: white; border: 1px solid var(--line); border-radius: 18px; padding: clamp(26px, 5vw, 46px); box-shadow: var(--shadow); }
.question-card h1 { font-size: clamp(1.8rem, 3.6vw, 3rem); line-height: 1.08; margin: 8px 0 13px; }
.question-help { color: var(--muted); line-height: 1.6; max-width: 760px; margin: 0 0 28px; }

.field { margin-bottom: 20px; }
.field > label { display: block; font-weight: 800; color: var(--navy); margin-bottom: 7px; }
.field-help { color: var(--muted); font-size: .82rem; line-height: 1.45; margin: -2px 0 7px; }
input[type="text"], input:not([type]), textarea, select {
  width: 100%;
  color: var(--ink);
  background: #fff;
  border: 1px solid #bfc8d8;
  border-radius: 9px;
  padding: 12px 13px;
  outline: none;
  transition: border .15s, box-shadow .15s;
}
textarea { resize: vertical; line-height: 1.5; }
input:focus, textarea:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(36,84,230,.13); }
.inline-tip { color: var(--muted); font-size: .8rem; margin-top: 8px; }
.form-actions { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-top: 30px; border-top: 1px solid var(--line); padding-top: 22px; }
.form-error { color: var(--red); background: var(--red-soft); border-radius: 8px; padding: 11px 13px; font-weight: 650; margin-top: 16px; }
.choice-grid, .system-select-grid { display: grid; gap: 10px; }
.choice-card, .system-option { display: flex; align-items: flex-start; gap: 11px; border: 1px solid var(--line); border-radius: 11px; padding: 14px; background: #fff; cursor: pointer; }
.choice-card:hover, .system-option:hover { border-color: #97a8c7; background: #fbfcff; }
.choice-card:has(input:checked), .system-option:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); box-shadow: inset 0 0 0 1px var(--blue); }
.choice-card input, .system-option input { margin-top: 3px; accent-color: var(--blue); }
.system-option small { display: block; color: var(--muted); font-size: .75rem; margin-top: 5px; line-height: 1.35; }
.system-select-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.system-profile { display: grid; gap: 2px; }
.profile-intro { display: flex; justify-content: space-between; gap: 15px; align-items: center; padding: 14px 16px; margin-bottom: 20px; border-radius: 10px; background: var(--blue-soft); color: #30477d; }
.profile-intro span { font-size: .82rem; color: #556b99; }
.form-grid { display: grid; gap: 15px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0,1fr)); }
.form-grid.three { grid-template-columns: repeat(3, minmax(0,1fr)); }
.form-grid.four { grid-template-columns: repeat(2, minmax(0,1fr)); }
.finish-card p { line-height: 1.6; color: var(--muted); }

.report-page { width: min(1540px, calc(100% - 40px)); max-width: none; padding: 32px 0 80px; }
.report-hero { border-radius: 20px; padding: clamp(30px, 6vw, 62px); background: var(--navy); color: white; box-shadow: var(--shadow); }
.report-hero .eyebrow { color: #9fb5ff; }
.report-hero h1 { color: white; font-size: clamp(2.3rem, 5vw, 4.5rem); margin: 10px 0 5px; }
.report-hero > p { color: #b6c2d5; }
.risk-callout { margin-top: 25px; background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.16); border-left: 4px solid #89a4ff; padding: 18px 20px; border-radius: 9px; line-height: 1.6; font-size: 1.08rem; }
.report-section { margin-top: 28px; padding: clamp(24px, 4vw, 38px); background: white; border: 1px solid var(--line); border-radius: 17px; box-shadow: 0 9px 32px rgba(20,34,56,.045); }
.summary-table { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.summary-row { display: grid; grid-template-columns: 245px 1fr; border-top: 1px solid var(--line); }
.summary-row:first-child { border-top: 0; }
.summary-row > div { padding: 15px 17px; line-height: 1.5; }
.summary-row > div:first-child { background: var(--soft); font-weight: 800; color: var(--navy); }
.table-wrap { overflow-x: auto; }
.rank-table { width: 100%; border-collapse: collapse; min-width: 760px; }
.rank-table th { background: var(--navy); color: white; font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; }
.rank-table th, .rank-table td { padding: 11px 10px; border: 1px solid var(--line); text-align: center; }
.rank-table td:nth-child(2), .rank-table th:nth-child(2) { text-align: left; }
.rank-table tbody tr:nth-child(even) { background: #fafbfc; }
.cluster-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.cluster-card { border: 1px solid var(--line); border-radius: 12px; padding: 18px; background: #fbfcff; }
.cluster-card h3 { color: var(--navy); margin: 7px 0 9px; }
.cluster-card p { color: var(--muted); line-height: 1.5; font-size: .88rem; }
.cluster-type { text-transform: uppercase; letter-spacing: .1em; color: var(--blue); font-weight: 850; font-size: .68rem; }
.dependency-chain { margin-top: 13px; padding-top: 13px; border-top: 1px solid var(--line); line-height: 1.65; font-size: .82rem; color: #4a5a72; }
.dependency-chain span { color: var(--blue); font-weight: 900; }
.findings-list { display: grid; gap: 13px; }
.finding-card { border: 1px solid var(--line); border-radius: 12px; padding: 19px; }
.finding-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.finding-heading > div { display: flex; gap: 10px; align-items: flex-start; }
.finding-heading h3 { margin: 2px 0 0; color: var(--navy); }
.finding-number { display: grid; place-items: center; width: 28px; height: 28px; flex: 0 0 28px; background: var(--soft); border-radius: 8px; font-weight: 850; color: var(--blue); }
.finding-card > p { color: var(--muted); line-height: 1.55; }
.finding-card details { border-top: 1px solid var(--line); padding-top: 11px; font-size: .87rem; color: #526179; }
.finding-card summary { cursor: pointer; font-weight: 800; color: var(--ink); }
.recommendation { margin-top: 13px; display: grid; gap: 5px; padding: 13px; background: var(--blue-soft); border-radius: 9px; color: #30477d; }
.recommendation strong { font-size: .75rem; text-transform: uppercase; letter-spacing: .07em; color: var(--blue-dark); }
.actions-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.action-card { display: flex; gap: 13px; align-items: flex-start; border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.action-card > span { flex: 0 0 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; color: white; background: var(--blue); font-weight: 850; }
.action-card h3 { margin: 1px 0 8px; color: var(--navy); font-size: 1rem; line-height: 1.4; }
.action-card p { margin: 0; color: var(--muted); font-size: .82rem; line-height: 1.45; }
.two-column-report { display: grid; grid-template-columns: 1.15fr .85fr; gap: 30px; }
.unresolved-list { padding-left: 22px; color: #526179; line-height: 1.65; }
.security-card { background: var(--navy); color: #bdc9da; padding: 24px; border-radius: 13px; }
.security-card .eyebrow { color: #9fb5ff; }
.security-card h2 { color: white; }
.security-card p { line-height: 1.6; }

@media (max-width: 900px) {
  .value-grid, .cluster-grid, .actions-list { grid-template-columns: 1fr; }
  .interview-shell { grid-template-columns: 1fr; }
  .interview-sidebar { position: static; }
  .phase-list { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .two-column-report { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .site-header { padding: 0 18px; }
  .brand small, .header-status { display: none; }
  .home-page { padding-top: 45px; }
  .hero h1 { font-size: 3rem; }
  .session-row, .section-heading, .progress-row { align-items: flex-start; flex-direction: column; }
  .guided-progress { flex-direction: column; }
  .time-estimate { width: 100%; }
  .question-context { align-items: flex-start; flex-direction: column; gap: 5px; }
  .session-actions { width: 100%; }
  .session-actions .button { flex: 1; }
  .progress-track { width: 100%; }
  .system-select-grid, .form-grid.two, .form-grid.three, .form-grid.four { grid-template-columns: 1fr; }
  .summary-row { grid-template-columns: 1fr; }
  .summary-row > div:first-child { padding-bottom: 8px; }
  .profile-intro { align-items: flex-start; flex-direction: column; }
  .question-card { padding: 24px 18px; }
  .form-actions { flex-direction: column-reverse; }
  .form-actions .button { width: 100%; }
  .report-header .button.ghost { display: none; }
}
/* v0.5 Sprint 2 professional report experience */
.report-scroll-progress {
  position: fixed;
  inset: 70px 0 auto;
  height: 3px;
  z-index: 30;
  background: rgba(214,220,232,.6);
  pointer-events: none;
}
.report-scroll-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--blue), #6f8fff);
  transition: width .12s linear;
}
.report-nav a.active {
  color: var(--blue-dark);
  background: var(--blue-soft);
  box-shadow: inset 3px 0 0 var(--blue);
}
.report-content > section {
  animation: report-enter .38s ease both;
}
.report-content > section:nth-child(3) { animation-delay: .04s; }
.report-content > section:nth-child(4) { animation-delay: .08s; }
@keyframes report-enter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.report-hero {
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 10%, rgba(105,137,255,.32), transparent 28%),
    linear-gradient(135deg, #0b1426 0%, #152747 100%);
}
.executive-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 30px;
}
.executive-heading h1 { margin-bottom: 8px; }
.executive-heading p { margin: 0; color: #b8c6dc; }
.executive-score {
  width: 142px;
  aspect-ratio: 1;
  flex: 0 0 142px;
  display: grid;
  place-content: center;
  text-align: center;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  box-shadow: inset 0 0 0 8px rgba(255,255,255,.035), 0 18px 38px rgba(3,9,20,.3);
}
.executive-score span { color: #bcd0ef; font-size: .72rem; font-weight: 750; }
.executive-score strong { margin: 3px 0; color: #fff; font-size: 3rem; line-height: 1; }
.executive-score small { color: #8fb2ff; font-weight: 850; text-transform: uppercase; letter-spacing: .08em; }
.executive-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 1px;
  margin-top: 30px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 15px;
  background: rgba(255,255,255,.13);
}
.executive-grid article {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 17px;
  background: rgba(7,16,31,.75);
}
.executive-grid article > div { min-width: 0; display: grid; gap: 5px; }
.executive-grid small { color: #9fb1cc; font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.executive-grid strong { color: #fff; font-size: .88rem; line-height: 1.45; }
.executive-icon {
  width: 27px;
  height: 27px;
  flex: 0 0 27px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: rgba(113,145,255,.25);
  font-weight: 900;
}

.mri-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 14px;
}
.mri-card {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: 42px minmax(0,1fr);
  gap: 15px;
  padding: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
}
.mri-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--blue); }
.mri-card.risk::before { background: var(--red); }
.mri-card.warning::before { background: var(--amber); }
.mri-card.strength::before { background: var(--green); }
.mri-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--blue-dark);
  background: var(--blue-soft);
  font-weight: 900;
  font-size: 1.12rem;
}
.mri-card.risk .mri-icon { color: var(--red); background: var(--red-soft); }
.mri-card.warning .mri-icon { color: var(--amber); background: var(--amber-soft); }
.mri-card.strength .mri-icon { color: var(--green); background: var(--green-soft); }
.mri-label { color: var(--muted); font-size: .68rem; font-weight: 850; text-transform: uppercase; letter-spacing: .08em; }
.mri-card h3 { margin: 6px 0 7px; color: var(--navy); font-size: 1.02rem; line-height: 1.4; }
.mri-card p { margin: 0; color: var(--muted); font-size: .84rem; line-height: 1.55; }

.experience-dashboard { padding: clamp(25px, 4vw, 38px); }
.experience-dashboard .eyebrow { color: #94b2ff; }
.score-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
.score-card {
  min-width: 0;
  min-height: 116px;
  gap: 14px;
  padding: 17px;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.score-card:hover { transform: translateY(-2px); border-color: rgba(143,178,255,.5); background: rgba(255,255,255,.075); }
.score-card-copy { min-width: 0; }
.score-card-copy > span { color: #c2d0e5; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; }
.score-card-copy b { color: #fff; font-size: .98rem; }
.score-card-copy small { color: #91a4c0; font-size: .7rem; line-height: 1.35; }
.score-ring { width: 64px; height: 64px; flex-basis: 64px; }
.score-card.risk-metric .score-ring { background: conic-gradient(#ff8a80 calc(var(--score)*1%),rgba(255,255,255,.12) 0); }
.score-card.strong .score-ring { background: conic-gradient(#42d392 calc(var(--score)*1%),rgba(255,255,255,.12) 0); }
.score-card.fragile .score-ring, .score-card.critical .score-ring { background: conic-gradient(#ff6b62 calc(var(--score)*1%),rgba(255,255,255,.12) 0); }

.map-report-section { overflow: visible; }
.dependency-map-shell {
  border-color: #cdd6e6;
  box-shadow: 0 16px 42px rgba(20,34,56,.08);
}
.map-toolbar {
  display: grid;
  grid-template-columns: minmax(220px,1fr) auto auto;
  gap: 14px;
  min-height: 72px;
  padding: 12px 14px;
  border-radius: 15px 15px 0 0;
}
.map-search-wrap, .map-filters label { display: grid; gap: 5px; }
.map-search-wrap > label, .map-filters label {
  color: var(--muted);
  font-size: .65rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.map-search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  height: 38px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
}
.map-search-field:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(36,84,230,.1); }
.map-search-field span { color: var(--muted); font-size: 1.2rem; }
.map-search-field input { width: 100%; min-width: 0; padding: 0; border: 0; outline: 0; color: var(--navy); background: transparent; }
.map-filters { display: flex; align-items: end; gap: 8px; }
.map-filters select { height: 38px; max-width: 150px; padding: 0 27px 0 9px; border-radius: 9px; font-size: .74rem; }
.map-controls { align-self: end; }
.map-controls button { height: 38px; border-radius: 9px; }
.map-workspace { display: grid; grid-template-columns: minmax(0,1fr) 330px; min-height: 590px; }
.map-canvas-column { min-width: 0; border-right: 1px solid var(--line); }
.map-legend { min-height: 46px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: #fbfcff; }
.node-swatch { width: 13px; height: 10px; border: 1px solid #9aa8bc; border-radius: 3px; background: #fff; }
.node-swatch.function { background: #eaf0ff; }
.node-swatch.people { background: #ecfdf3; }
.node-swatch.external { background: #fff4e5; }
.dependency-map-viewport { height: 500px; border: 0; }
.dependency-svg-stage {
  padding: 30px;
  transition: transform .16s cubic-bezier(.2,.8,.2,1);
  will-change: transform;
}
.dependency-svg-stage g.node { transition: opacity .15s ease, filter .15s ease; }
.dependency-svg-stage g.edge { transition: opacity .15s ease; }
.dependency-svg-stage g.node.is-muted,
.dependency-svg-stage g.edge.is-muted { opacity: .12; }
.dependency-svg-stage g.node.is-neighbor { opacity: 1; filter: drop-shadow(0 3px 5px rgba(36,84,230,.24)); }
.dependency-svg-stage g.edge.is-highlighted { opacity: 1; }
.dependency-svg-stage .filter-hidden { display: none; }
.map-status { min-height: 38px; display: flex; align-items: center; padding: 8px 14px; border-top: 1px solid var(--line); color: var(--muted); background: #fff; font-size: .72rem; }
.map-node-panel {
  min-width: 0;
  padding: 20px;
  background: #f8faff;
  overflow-y: auto;
}
.map-panel-empty { min-height: 420px; display: grid; place-content: center; justify-items: center; text-align: center; color: var(--muted); }
.map-panel-empty strong { margin-top: 13px; color: var(--navy); }
.map-panel-empty p { max-width: 240px; font-size: .82rem; line-height: 1.5; }
.map-panel-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; color: var(--blue); background: var(--blue-soft); font-size: 1.5rem; }
.map-panel-heading { display: flex; justify-content: space-between; gap: 15px; padding-bottom: 17px; border-bottom: 1px solid var(--line); }
.map-panel-heading h3 { margin: 7px 0 0; color: var(--navy); font-size: 1.2rem; line-height: 1.25; }
.node-type-badge { color: var(--blue-dark); font-size: .65rem; font-weight: 850; text-transform: uppercase; letter-spacing: .06em; }
.map-panel-close { width: 30px; height: 30px; flex: 0 0 30px; padding: 0; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: #fff; }
.map-panel-stat-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; margin: 16px 0; }
.map-panel-stat-grid article { display: grid; gap: 4px; padding: 11px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.map-panel-stat-grid span, .map-panel-block > span { color: var(--muted); font-size: .65rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.map-panel-stat-grid strong { color: var(--navy); }
.map-panel-block { display: grid; gap: 7px; padding: 14px 0; border-top: 1px solid var(--line); }
.map-panel-block > strong { color: var(--navy); font-size: .86rem; line-height: 1.45; }
.map-relationship-list, .map-panel-recommendations ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.map-relationship-list li { display: grid; grid-template-columns: 1fr; gap: 2px; padding: 9px; border-radius: 8px; background: #fff; }
.map-relationship-list li span { color: var(--muted); font-size: .68rem; }
.map-relationship-list li strong { color: var(--navy); font-size: .78rem; }
.map-relationship-list li small { color: var(--muted); font-size: .64rem; text-transform: capitalize; }
.map-panel-recommendations li { position: relative; padding-left: 16px; color: #42526a; font-size: .78rem; line-height: 1.45; }
.map-panel-recommendations li::before { content: "→"; position: absolute; left: 0; color: var(--blue); font-weight: 900; }
.impact-critical, .impact-high { color: var(--red)!important; }
.impact-medium { color: var(--amber)!important; }
.dependency-map-shell:fullscreen { overflow: auto; }
.dependency-map-shell:fullscreen .map-workspace { min-height: calc(100vh - 98px); }
.dependency-map-shell:fullscreen .dependency-map-viewport { height: calc(100vh - 190px); }

.roadmap-card { box-shadow: 0 8px 22px rgba(20,34,56,.045); }
.roadmap-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; border-radius: 16px 0 0 16px; background: var(--blue); }

@media (max-width: 1250px) {
  .executive-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .map-toolbar { grid-template-columns: 1fr auto; }
  .map-filters { grid-column: 1 / -1; grid-row: 2; }
}
@media (max-width: 1000px) {
  .score-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .map-workspace { grid-template-columns: minmax(0,1fr); }
  .map-canvas-column { border-right: 0; }
  .map-node-panel { display: none; position: fixed; inset: auto 14px 14px; z-index: 50; max-height: min(72vh, 620px); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 22px 70px rgba(12,24,44,.25); }
  .map-node-panel.is-open { display: block; }
  .map-panel-empty { display: none; }
}
@media (max-width: 760px) {
  .executive-heading { align-items: center; }
  .executive-score { width: 104px; flex-basis: 104px; }
  .executive-score strong { font-size: 2.2rem; }
  .executive-grid, .mri-grid, .score-grid { grid-template-columns: 1fr; }
  .map-toolbar { grid-template-columns: 1fr; align-items: stretch; }
  .map-filters { grid-column: auto; grid-row: auto; display: grid; grid-template-columns: 1fr; }
  .map-filters select { width: 100%; max-width: none; }
  .map-controls { align-self: auto; }
  .map-legend { gap: 9px; }
  .dependency-map-viewport { height: 420px; }
}
@media (max-width: 520px) {
  .executive-heading { align-items: flex-start; }
  .executive-score { width: 88px; flex-basis: 88px; }
  .executive-score span { font-size: .6rem; }
  .executive-score strong { font-size: 1.9rem; }
  .executive-score small { font-size: .56rem; }
  .executive-grid article { padding: 14px; }
  .mri-card { grid-template-columns: 36px minmax(0,1fr); padding: 17px; }
  .mri-icon { width: 36px; height: 36px; }
}

/* v0.8 completion flow: one mental task at a time. */
.assessment-body {
  min-height: 100vh;
  background: #fbf7ec;
}
.assessment-body .interview-header {
  position: relative;
  padding-inline: clamp(20px, 4vw, 58px);
  background: rgba(251,247,236,.95);
  border-bottom-color: #dfd6c6;
  backdrop-filter: blur(10px);
}
.assessment-body .interview-header .brand { color: #123f7c; }
.assessment-body .interview-header .brand small { color: #747065; border-left-color: #d9d0bf; }
.interview-exit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #615d54;
  font-size: .88rem;
  font-weight: 750;
}
.interview-exit span { font-size: 1.3rem; line-height: 1; }
.interview-exit:hover { color: #123f7c; }
.assessment-body .interview-page {
  width: min(920px, calc(100% - 40px));
  padding: clamp(58px, 9vh, 105px) 0 80px;
}
.assessment-body .interview-shell { display: block; }
.assessment-body .question-panel { width: 100%; }
.assessment-card {
  padding: clamp(34px, 6vw, 64px);
  border: 1px solid #ded5c5;
  border-radius: 13px;
  background: #fffdf7;
  box-shadow: 0 24px 70px rgba(54,45,31,.10), 0 3px 12px rgba(54,45,31,.05);
}
.assessment-progress-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 12px;
  color: #79736a;
  font-size: .78rem;
  font-weight: 700;
}
.assessment-section {
  color: #123f7c;
  font-size: .8rem;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.assessment-card .progress-track {
  width: 100%;
  height: 5px;
  margin-bottom: clamp(34px, 5vw, 52px);
  background: #e8e1d5;
}
.assessment-card .progress-track span { background: #e26f3d; }
.assessment-card h1 {
  max-width: 720px;
  margin: 0 0 12px;
  color: #173f70;
  font-size: clamp(1.85rem, 4vw, 2.65rem);
  line-height: 1.16;
  letter-spacing: -.035em;
}
.assessment-card .question-help {
  max-width: 680px;
  margin-bottom: 30px;
  color: #68645d;
  font-size: .96rem;
}
.listening-context {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin: -10px 0 28px;
  padding: 13px 15px;
  border-left: 3px solid #123f7c;
  border-radius: 0 7px 7px 0;
  color: #304867;
  background: #eef3f8;
  font-size: .86rem;
  line-height: 1.5;
}
.listening-context span { color: #123f7c; font-weight: 900; }
.listening-context p { margin: 0; }
.assessment-card input[type="text"],
.assessment-card input:not([type]),
.assessment-card textarea,
.assessment-card select {
  min-height: 50px;
  padding: 14px 15px;
  border-color: #cfc6b7;
  border-radius: 7px;
  background: #fffefa;
}
.assessment-card textarea { min-height: 142px; }
.assessment-card input:focus,
.assessment-card textarea:focus,
.assessment-card select:focus {
  border-color: #123f7c;
  box-shadow: 0 0 0 3px rgba(18,63,124,.13);
}
.assessment-card .field[hidden],
.assessment-card .relationship-card[hidden],
.assessment-card .clarifier-option[hidden] { display: none !important; }
.task-counter {
  margin: -6px 0 20px;
  color: #8a847a;
  font-size: .74rem;
  font-weight: 750;
  letter-spacing: .04em;
}
.assessment-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 34px;
  padding-top: 24px;
  border-top: 1px solid #e6ded1;
}
.assessment-action-end { display: flex; align-items: center; gap: 16px; }
.autosave-status { color: #737065; font-size: .76rem; font-weight: 700; }
.autosave-status[data-state="saving"] { color: #9a623c; }
.autosave-status[data-state="error"] { color: var(--red); }
.assessment-card .button { min-height: 45px; padding-inline: 19px; border-radius: 7px; }
.assessment-card .button.primary {
  background: #123f7c;
  box-shadow: 0 8px 20px rgba(18,63,124,.18);
}
.assessment-card .button.primary:hover { background: #0c315f; }
.assessment-card .button.ghost { color: #353b42; border-color: transparent; }
.assessment-card .button.ghost:hover { border-color: #d9d0c1; background: #fffaf0; }

@media (max-width: 640px) {
  .assessment-body .interview-header .brand small { display: none; }
  .assessment-body .interview-page { width: min(100% - 24px, 920px); padding-top: 28px; }
  .assessment-card { padding: 26px 20px; }
  .assessment-progress-head { align-items: flex-start; flex-direction: column; gap: 4px; }
  .assessment-actions { align-items: stretch; flex-direction: column-reverse; }
  .assessment-action-end { justify-content: space-between; }
  .assessment-action-end .button { min-width: 150px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto!important; animation-duration: .01ms!important; animation-iteration-count: 1!important; transition-duration: .01ms!important; }
}


/* v0.2 adaptive clarification loop */
.source-answer {
  margin: 0 0 22px;
  padding: 16px 18px;
  border: 1px solid #cbd5e1;
  border-left: 4px solid var(--blue);
  border-radius: 10px;
  background: #f8fafc;
  color: #334155;
  line-height: 1.55;
}
.source-label {
  margin-bottom: 7px;
  color: var(--blue);
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.clarifier-intro {
  margin: 0 0 22px;
  color: var(--muted);
  line-height: 1.55;
}
.clarifier-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 24px;
}
.clarifier-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}
.clarifier-option:hover { border-color: #97a8c7; background: #fbfcff; }
.clarifier-option:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); }
.clarifier-option input { margin-top: 3px; accent-color: var(--blue); }
.clarifier-option small { display: block; margin-top: 4px; color: var(--muted); font-size: .74rem; }
.clarifier-option.already { background: #f8fafc; color: #526179; cursor: default; }
.check-mark { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #dbeafe; color: var(--blue); font-weight: 900; flex: 0 0 20px; }

@media (max-width: 760px) {
  .clarifier-options { grid-template-columns: 1fr; }
}

.clarification-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.clarification-card { border: 1px solid var(--line); border-radius: 12px; padding: 18px; background: #fbfcff; }
.clarification-card h3 { margin: 0 0 12px; color: var(--navy); }
.clarification-card dl { margin: 0; display: grid; gap: 12px; }
.clarification-card dl > div { padding-top: 10px; border-top: 1px solid var(--line); }
.clarification-card dl > div:first-child { padding-top: 0; border-top: 0; }
.clarification-card dt { font-size: .72rem; font-weight: 850; color: var(--blue); text-transform: uppercase; letter-spacing: .05em; }
.clarification-card dd { margin: 4px 0 0; color: #475467; line-height: 1.5; }
@media (max-width: 760px) { .clarification-grid { grid-template-columns: 1fr; } }

/* v0.7 Sprint 2 relationship confirmation */
.relationship-review { display: grid; gap: 18px; }
.relationship-review-intro { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 17px 18px; border: 1px solid #cdd8f4; border-radius: 12px; background: #f6f8ff; }
.relationship-review-intro > div:first-child { display: grid; gap: 5px; }
.relationship-review-intro strong { color: var(--navy); }
.relationship-review-intro span { color: var(--muted); font-size: .82rem; line-height: 1.45; }
.relationship-summary { flex: 0 0 auto; color: var(--blue-dark); font-size: .75rem; font-weight: 800; white-space: nowrap; }
#relationship-rows { display: grid; gap: 12px; }
.relationship-card { overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: #fff; transition: border-color .15s, box-shadow .15s, opacity .15s; }
.relationship-card.decision-yes { border-color: #a7d7be; box-shadow: inset 3px 0 0 #23845a; }
.relationship-card.decision-partly { border-color: #e7c77d; box-shadow: inset 3px 0 0 #c58b12; }
.relationship-card.decision-no { opacity: .66; background: #f8fafc; box-shadow: inset 3px 0 0 #98a2b3; }
.relationship-statement { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 17px 18px; }
.relationship-statement-copy { min-width: 0; }
.relationship-kicker { color: var(--muted); font-size: .64rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.relationship-statement h3 { margin: 5px 0; color: var(--navy); font-size: 1rem; line-height: 1.45; }
.relationship-statement h3 strong { color: #172b4d; }
.relationship-statement h3 em { color: var(--blue-dark); font-style: normal; font-weight: 750; }
.relationship-statement p { margin: 0; color: var(--muted); font-size: .75rem; }
.relationship-decisions { display: flex; flex: 0 0 auto; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.relationship-decisions > span { flex-basis: 100%; color: var(--muted); font-size: .68rem; font-weight: 750; text-align: right; }
.relationship-decisions button { border: 1px solid var(--line); border-radius: 999px; padding: 7px 11px; background: white; color: #526179; font-size: .73rem; font-weight: 800; }
.relationship-decisions button:hover { border-color: #97a8c7; color: var(--navy); }
.relationship-decisions button[aria-pressed="true"] { border-color: var(--blue); background: var(--blue-soft); color: var(--blue-dark); }
.relationship-decisions .relationship-edit { border-color: transparent; background: transparent; color: var(--blue-dark); }
.relationship-editor { padding: 16px 18px 18px; border-top: 1px solid var(--line); background: #fbfcff; }
.relationship-editor[hidden] { display: none; }
.relationship-main { display: grid; grid-template-columns: 1fr .82fr 1fr; gap: 12px; align-items: end; }
.relationship-node, .relationship-kind { display: grid; grid-template-columns: 1fr; gap: 7px; min-width: 0; }
.relationship-node label, .relationship-kind label { font-size: .72rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.relationship-editor input, .relationship-editor select { min-width: 0; padding: 9px 10px; font-size: .88rem; }
.relationship-review-actions { display: flex; flex-wrap: wrap; gap: 9px; }

/* v0.3 dependency map */
.map-report-section { overflow: hidden; }
.map-section-copy { color: var(--muted); line-height: 1.55; margin: -8px 0 18px; }
.dependency-map-shell { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: #f9fbff; }
.map-toolbar { min-height: 48px; display: flex; justify-content: space-between; gap: 18px; align-items: center; padding: 9px 12px; border-bottom: 1px solid var(--line); background: white; }
.map-legend { display: flex; flex-wrap: wrap; gap: 13px; color: var(--muted); font-size: .72rem; font-weight: 700; }
.map-legend span { display: inline-flex; align-items: center; gap: 6px; }
.map-legend .line { width: 25px; height: 0; border-top: 2px solid #667085; }
.map-legend .line.assumed { border-top-style: dashed; border-top-color: var(--amber); }
.map-legend .line.unknown { border-top-style: dotted; border-top-color: #98a2b3; }
.choke-dot { width: 10px; height: 10px; border-radius: 50%; border: 3px solid var(--red); background: white; }
.map-controls { display: flex; gap: 5px; flex-shrink: 0; }
.map-controls button { border: 1px solid var(--line); background: white; color: var(--navy); min-width: 33px; height: 31px; border-radius: 7px; padding: 0 9px; font-weight: 800; }
.map-controls button:hover { border-color: #98a2b3; background: var(--soft); }
.dependency-map-viewport { height: 530px; overflow: hidden; position: relative; cursor: grab; touch-action: none; background-image: radial-gradient(#dce2ee 1px, transparent 1px); background-size: 18px 18px; }
.dependency-map-viewport.is-dragging { cursor: grabbing; }
.dependency-svg-stage { width: 100%; height: 100%; transform-origin: center center; transition: transform .08s linear; display: grid; place-items: center; padding: 24px; }
.dependency-svg-stage svg { max-width: none; overflow: visible; }
.dependency-svg-stage g.node { cursor: pointer; outline: none; }
.dependency-svg-stage g.node:hover polygon,
.dependency-svg-stage g.node:hover path,
.dependency-svg-stage g.node:hover ellipse,
.dependency-svg-stage g.node.is-selected polygon,
.dependency-svg-stage g.node.is-selected path,
.dependency-svg-stage g.node.is-selected ellipse { filter: drop-shadow(0 3px 5px rgba(20,34,56,.25)); stroke-width: 3px; }
.map-loading { color: var(--muted); font-weight: 700; }
.map-node-details { min-height: 67px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 13px; padding: 13px 16px; background: white; border-top: 1px solid var(--line); }
.map-node-details strong { color: var(--navy); }
.map-node-details span { color: var(--muted); }
.map-node-details em { color: var(--blue-dark); font-style: normal; font-size: .78rem; font-weight: 800; }
.map-interpretation { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.map-interpretation article { background: var(--soft); border: 1px solid var(--line); border-radius: 11px; padding: 14px; display: grid; gap: 5px; }
.map-interpretation span { color: var(--muted); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.map-interpretation strong { color: var(--navy); line-height: 1.4; font-size: .92rem; }
.dependency-map-shell:fullscreen { background: #f9fbff; padding: 16px; }
.dependency-map-shell:fullscreen .dependency-map-viewport { height: calc(100vh - 155px); }

@media (max-width: 820px) {
  .relationship-main { grid-template-columns: 1fr; }
  .relationship-review-intro, .relationship-statement { flex-direction: column; }
  .relationship-summary { white-space: normal; }
  .relationship-decisions { justify-content: flex-start; }
  .relationship-decisions > span { text-align: left; }
  .map-toolbar { align-items: flex-start; flex-direction: column; }
  .map-interpretation { grid-template-columns: 1fr; }
  .dependency-map-viewport { height: 460px; }
}

/* v0.7 Sprint 1 customer onboarding */
.setup-page { max-width: 1120px; }
.setup-shell { display: grid; grid-template-columns: .82fr 1.35fr; gap: 28px; align-items: start; }
.setup-intro, .setup-form { background: var(--white); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.setup-intro { padding: 30px; position: sticky; top: 92px; }
.setup-intro h1 { color: var(--navy); margin: 8px 0 12px; font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.03; }
.setup-intro > p { color: var(--muted); line-height: 1.65; }
.setup-form { padding: 30px; display: grid; gap: 22px; }
.setup-form-heading { display: grid; gap: 6px; }
.setup-form-heading h2 { margin: 0; color: var(--navy); font-size: 1.45rem; }
.setup-form-heading p { margin: 0; color: var(--muted); line-height: 1.55; }
.setup-form-heading.compact h2 { font-size: 1.15rem; }
.research-fields { display: grid; gap: 18px; padding: 20px; border: 1px dashed #a8b8df; border-radius: 14px; background: #f9fbff; }
.research-fields[hidden] { display: none; }
.research-principles { display: grid; gap: 10px; margin-top: 24px; }
.research-principles article { display: grid; gap: 4px; border-top: 1px solid var(--line); padding-top: 13px; }
.research-principles strong { color: var(--navy); }
.research-principles span { color: var(--muted); line-height: 1.45; font-size: .9rem; }
.consent-card { display: flex; gap: 13px; align-items: flex-start; padding: 16px; border: 1px solid #a8b8df; border-radius: 12px; background: var(--blue-soft); cursor: pointer; }
.consent-card input { margin-top: 4px; accent-color: var(--blue); }
.consent-card span { display: grid; gap: 5px; }
.consent-card small { color: var(--muted); line-height: 1.45; }

.research-banner { display: flex; flex-wrap: wrap; gap: 9px 18px; align-items: center; padding: 13px 17px; background: #fff8e8; border: 1px solid #f1cf82; border-radius: 12px; color: #744b00; }
.research-banner strong { color: #543500; }
.research-banner span { font-size: .86rem; }
.section-instruction { color: var(--muted); margin: -6px 0 18px; line-height: 1.55; }
.validation-panel, .debrief-form { margin-top: 20px; padding: 20px; border: 1px solid #a8b8df; border-radius: 14px; background: #f9fbff; display: grid; gap: 16px; }
.validation-heading h3 { color: var(--navy); margin: 3px 0 0; }
.feedback-box { margin-top: 16px; padding: 14px; border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(210px,1.2fr) minmax(150px,.65fr) minmax(220px,1fr) auto; gap: 10px; align-items: center; background: #fbfcff; border-radius: 10px; }
.feedback-box > div { display: grid; gap: 3px; }
.feedback-box > div span { color: var(--muted); font-size: .78rem; }
.feedback-box textarea, .feedback-box input, .feedback-box select { width: 100%; }
.feedback-box.compact { grid-template-columns: minmax(180px,.75fr) minmax(220px,1fr) auto auto; margin: 12px 0 0; padding: 12px 0 0; border-radius: 0; background: transparent; }
.feedback-actions { display: flex; gap: 12px; align-items: center; }
.feedback-status { min-height: 1em; color: var(--muted); font-size: .84rem; }
.feedback-status.saved { color: var(--green); font-weight: 800; }
.feedback-status.error { color: var(--red); font-weight: 700; }
.action-feedback-card { align-items: start; }
.action-feedback-card > div { min-width: 0; width: 100%; }
.debrief-section { border: 2px solid #a8b8df; }
.export-callout { margin-top: 18px; padding: 17px; border-radius: 12px; background: var(--navy); color: white; display: flex; justify-content: space-between; gap: 18px; align-items: center; }
.export-callout > div { display: grid; gap: 5px; }
.export-callout span { color: #d3dbea; font-size: .88rem; line-height: 1.45; }
.provisional-label { display: block; color: var(--amber); font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; margin-top: 3px; }
.unknown-score { display: inline-grid; place-items: center; width: 23px; height: 23px; border-radius: 50%; background: var(--amber-soft); color: var(--amber); font-weight: 900; }
.provisional-note { color: var(--amber); font-size: .84rem; line-height: 1.5; }

@media (max-width: 940px) {
  .setup-shell { grid-template-columns: 1fr; }
  .setup-intro { position: static; }
  .feedback-box, .feedback-box.compact { grid-template-columns: 1fr; }
  .export-callout { align-items: flex-start; flex-direction: column; }
}

/* v0.4 experience layer */
.experience-dashboard{background:linear-gradient(135deg,#0b1426,#14233f);color:#fff;border:0}.experience-dashboard .muted{color:#b9c7de}.score-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px}.score-card{display:flex;align-items:center;gap:12px;padding:16px;border:1px solid rgba(255,255,255,.12);border-radius:16px;background:rgba(255,255,255,.05)}.score-card>div:last-child{display:grid;gap:3px}.score-card span{font-size:.78rem;color:#bfd0eb}.score-card b{font-size:.9rem}.score-ring{--score:50;width:68px;height:68px;flex:0 0 68px;border-radius:50%;display:grid;place-content:center;text-align:center;background:conic-gradient(#8fb2ff calc(var(--score)*1%),rgba(255,255,255,.12) 0);position:relative}.score-ring:before{content:"";position:absolute;inset:6px;border-radius:50%;background:#111d32}.score-ring strong,.score-ring span{position:relative;z-index:1}.score-ring strong{font-size:1.25rem;line-height:1}.score-ring span{font-size:.62rem}.signal-strip{display:grid;grid-template-columns:repeat(4,1fr);gap:1px;margin-top:18px;background:rgba(255,255,255,.12);border-radius:14px;overflow:hidden}.signal-strip article{padding:16px;background:rgba(8,16,31,.72);display:grid;gap:4px}.signal-strip strong{font-size:1.7rem}.signal-strip span{font-size:.78rem;color:#bfd0eb}.surprise-list{display:grid;gap:14px}.surprise-card{display:grid;grid-template-columns:50px 1fr;gap:16px;padding:20px;border:1px solid var(--border);border-radius:16px;background:#fff}.surprise-index{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;background:#111d32;color:#fff;font-weight:800}.surprise-card h3{margin:.5rem 0}.scenario-layout{display:grid;grid-template-columns:280px 1fr;gap:20px}.scenario-buttons{display:grid;gap:10px}.scenario-button{text-align:left;padding:14px 16px;border:1px solid var(--border);border-radius:12px;background:#fff;font-weight:700;cursor:pointer}.scenario-button.active{background:#111d32;color:#fff;border-color:#111d32}.scenario-result{min-height:260px;border-radius:18px;background:#f2f5fa;padding:28px;display:flex;flex-direction:column;justify-content:center}.scenario-result>strong{font-size:4rem;line-height:1;margin-top:14px}.scenario-kicker{font-weight:800;color:#52627a}.roadmap-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}.roadmap-card{padding:20px;border-radius:16px;border:1px solid var(--border);background:#fff;position:relative}.roadmap-card>span{font-size:.75rem;text-transform:uppercase;letter-spacing:.08em;font-weight:800;color:#52627a}.roadmap-card h3{font-size:1rem;margin:.8rem 0}.roadmap-card p{font-size:.86rem}.roadmap-card small{display:block;border-top:1px solid var(--border);padding-top:10px;color:#52627a}.scenario-affected{filter:drop-shadow(0 0 6px #e5484d);opacity:1!important}
@media(max-width:1000px){.score-grid{grid-template-columns:repeat(2,1fr)}.roadmap-grid{grid-template-columns:repeat(2,1fr)}}@media(max-width:700px){.score-grid,.signal-strip,.roadmap-grid{grid-template-columns:1fr}.scenario-layout{grid-template-columns:1fr}}

/* v0.5 Sprint 1 application framework */
.app-shell { width: min(1540px, calc(100% - 40px)); margin-inline: auto; }
.content-card { background: var(--white); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 10px 34px rgba(20,34,56,.055); }
.report-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; align-items: start; }
.report-content { min-width: 0; }
.report-sidebar { position: sticky; top: 94px; display: grid; gap: 22px; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.96); box-shadow: 0 10px 34px rgba(20,34,56,.06); }
.report-sidebar__brand { display: flex; align-items: center; gap: 10px; }
.report-sidebar__brand > div { display: grid; gap: 2px; min-width: 0; }
.report-sidebar__brand strong { color: var(--navy); font-size: .9rem; }
.report-sidebar__brand small { color: var(--muted); font-size: .72rem; }
.report-nav { display: grid; gap: 5px; }
.report-nav a { padding: 10px 11px; border-radius: 9px; color: #526179; font-size: .84rem; font-weight: 750; }
.report-nav a:hover, .report-nav a:focus-visible { color: var(--blue-dark); background: var(--blue-soft); outline: none; }
.report-sidebar > p { margin: 0; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: .76rem; line-height: 1.5; }
.report-section, .report-hero { scroll-margin-top: 92px; }
.report-section h2 { color: var(--navy); }
.experience-dashboard h2 { color: var(--white); }

@media (max-width: 1100px) {
  .report-layout { grid-template-columns: 1fr; }
  .report-sidebar { position: static; padding: 14px; }
  .report-sidebar__brand, .report-sidebar > p { display: none; }
  .report-nav { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
  .report-nav a { flex: 0 0 auto; white-space: nowrap; background: var(--soft); }
}

@media (max-width: 680px) {
  .app-shell, .report-page { width: min(100% - 24px, 1540px); }
  .report-page { padding-top: 18px; }
  .report-layout { gap: 14px; }
  .report-sidebar { margin-inline: -2px; }
  .report-section { padding: 22px 17px; }
  .report-hero { padding: 30px 20px; }
}

/* Sprint 2 final cascade overrides for legacy report components */
.score-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
.score-card { min-width: 0; min-height: 116px; gap: 14px; padding: 17px; transition: transform .18s ease, border-color .18s ease, background .18s ease; }
.score-ring { width: 64px; height: 64px; flex-basis: 64px; }
.score-card.risk-metric .score-ring { background: conic-gradient(#ff8a80 calc(var(--score)*1%),rgba(255,255,255,.12) 0); }
.score-card.strong .score-ring { background: conic-gradient(#42d392 calc(var(--score)*1%),rgba(255,255,255,.12) 0); }
.score-card.fragile .score-ring, .score-card.critical .score-ring { background: conic-gradient(#ff6b62 calc(var(--score)*1%),rgba(255,255,255,.12) 0); }
.map-report-section { overflow: visible; }
.map-toolbar { display: grid; grid-template-columns: minmax(220px,1fr) auto auto; gap: 14px; min-height: 72px; padding: 12px 14px; align-items: center; }
.map-legend { display: flex; min-height: 46px; padding: 10px 14px; gap: 13px; }
.dependency-map-viewport { height: 500px; }
.dependency-svg-stage { padding: 30px; transition: transform .16s cubic-bezier(.2,.8,.2,1); }
@media (max-width: 1250px) {
  .map-toolbar { grid-template-columns: 1fr auto; }
  .map-filters { grid-column: 1 / -1; grid-row: 2; }
}
@media (max-width: 1000px) {
  .score-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 820px) {
  .map-toolbar { display: grid; align-items: stretch; }
}
@media (max-width: 760px) {
  .score-grid { grid-template-columns: 1fr; }
  .map-toolbar { grid-template-columns: 1fr; }
  .map-filters { grid-column: auto; grid-row: auto; }
  .dependency-map-viewport { height: 420px; }
}

/* v0.5 Sprint 2 design-system polish */
.icon { width: 1.15em; height: 1.15em; flex: 0 0 auto; display: block; }

:where(h1, h2, h3, p) { overflow-wrap: anywhere; }
:where(h1, h2, h3) { text-wrap: balance; }
:where(p) { text-wrap: pretty; }

.site-header {
  height: 76px;
  padding-inline: max(24px, calc((100vw - 1760px) / 2));
  border-color: rgba(217,224,235,.9);
  box-shadow: 0 1px 0 rgba(16,28,48,.02);
}
.brand { gap: var(--space-3); font-size: var(--text-lg); }
.brand-mark { width: 42px; height: 42px; border-radius: var(--radius-md); box-shadow: none; }
.brand small { color: var(--muted); font-size: var(--text-sm); }

.button {
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: var(--text-sm);
  font-weight: 750;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: none;
  transition: color var(--duration-fast) var(--ease-standard), background var(--duration-fast) var(--ease-standard), border-color var(--duration-fast) var(--ease-standard), box-shadow var(--duration-fast) var(--ease-standard), transform var(--duration-fast) var(--ease-standard);
}
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button:focus-visible, .map-controls button:focus-visible, .map-panel-close:focus-visible, .scenario-button:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.button.primary { background: linear-gradient(180deg, var(--color-brand-500), var(--color-brand-600)); box-shadow: 0 8px 18px rgba(36,84,230,.2); }
.button.secondary { border-color: var(--line); background: var(--white); box-shadow: var(--shadow-sm); }
.button.ghost { border-color: transparent; }
.button.small { min-height: 38px; padding: 8px 13px; font-size: var(--text-sm); }

input[type="text"], input:not([type]), input[type="search"], textarea, select {
  min-height: 42px;
  max-width: 100%;
  border-color: var(--color-line-strong);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--white);
  transition: border-color var(--duration-fast) ease, box-shadow var(--duration-fast) ease, background var(--duration-fast) ease;
}
input:focus, textarea:focus, select:focus { border-color: var(--blue); box-shadow: var(--shadow-focus); }
::placeholder { color: #8a96a9; opacity: 1; }

.value-grid article, .sessions-section, .setup-intro, .setup-form, .question-card, .report-sidebar, .report-section, .report-hero {
  border-color: var(--line);
  box-shadow: var(--shadow-md);
}
.value-grid article, .cluster-card, .finding-card, .clarification-card, .roadmap-card, .mri-card, .score-card, .map-interpretation article {
  min-width: 0;
  transition: transform var(--duration-base) var(--ease-standard), border-color var(--duration-base) var(--ease-standard), box-shadow var(--duration-base) var(--ease-standard), background var(--duration-base) var(--ease-standard);
}
.value-grid article:hover, .roadmap-card:hover, .mri-card:hover, .map-interpretation article:hover { transform: translateY(-2px); border-color: #bcc9dc; box-shadow: var(--shadow-md); }

.eyebrow { color: var(--blue); font-size: var(--text-xs); letter-spacing: .13em; line-height: 1.35; }
.section-heading h2, .sessions-section h2 { font-size: var(--text-2xl); line-height: var(--leading-tight); }
.section-heading { align-items: flex-end; margin-bottom: var(--space-6); }
.section-heading > .muted { max-width: 360px; font-size: var(--text-sm); text-align: right; }
.section-heading-actions { display: flex; align-items: center; gap: 12px; }
.section-heading-actions .muted { font-size: var(--text-sm); }

.report-page { padding-top: var(--space-6); }
.report-layout { grid-template-columns: 252px minmax(0,1fr); gap: var(--space-8); }
.report-sidebar { top: 100px; gap: var(--space-6); padding: var(--space-5); border-radius: var(--radius-lg); }
.report-sidebar__brand strong { font-size: var(--text-md); }
.report-sidebar__brand small { font-size: var(--text-xs); }
.report-nav { gap: var(--space-1); }
.report-nav a { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 10px 12px; border-radius: 10px; font-size: var(--text-sm); transition: color var(--duration-fast) ease, background var(--duration-fast) ease, box-shadow var(--duration-fast) ease; }
.report-nav a .icon { width: 18px; height: 18px; color: #77849a; }
.report-nav a.active .icon, .report-nav a:hover .icon { color: var(--blue); }
.report-nav a.active { box-shadow: inset 3px 0 0 var(--blue); }
.report-content > section { animation-duration: .45s; animation-timing-function: var(--ease-standard); }
.report-section { margin-top: var(--space-8); padding: clamp(26px, 3.2vw, 42px); border-radius: var(--radius-lg); }

.report-hero { min-height: min(570px, calc(100vh - 130px)); display: flex; flex-direction: column; justify-content: space-between; padding: clamp(34px, 4.5vw, 60px); border-radius: var(--radius-xl); }
.report-hero h1 { font-size: clamp(2.5rem, 5vw, 4.6rem); line-height: .98; }
.executive-score { border-radius: 50%; }
.executive-grid { margin-top: var(--space-8); }
.executive-grid article { padding: var(--space-5); }
.executive-icon, .mri-icon { color: currentColor; }
.executive-icon .icon { width: 17px; height: 17px; }
.mri-icon .icon { width: 21px; height: 21px; }

.mri-grid, .cluster-grid, .clarification-grid { gap: var(--space-4); }
.mri-card { padding: var(--space-6); border-radius: var(--radius-lg); }
.mri-card::before { width: 3px; }
.experience-dashboard { border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); }
.score-grid { gap: var(--space-4); }
.score-card { border-radius: var(--radius-lg); }
.score-card-copy { display: grid; gap: 4px; }

.pill { padding: 5px 9px; border: 1px solid transparent; border-radius: var(--radius-pill); }
.pill.complete, .pill.critical { border-color: #fecaca; }
.pill.in_progress, .pill.high { border-color: #fed7aa; }
.pill.medium { border-color: #bfdbfe; }
.pill.lower, .pill.low { border-color: #bbf7d0; }

.roadmap-grid { gap: var(--space-4); }
.roadmap-card { min-height: 240px; padding: var(--space-6); border-radius: var(--radius-lg); overflow: hidden; }
.roadmap-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--blue); }
.roadmap-card h3 { margin: 16px 0 12px; font-size: var(--text-lg); line-height: 1.38; }
.roadmap-card p { line-height: 1.55; }
.roadmap-card small { margin-top: auto; }

.feedback-box, .feedback-box.compact { min-width: 0; }
.feedback-box > *, .form-grid > *, .action-card > *, .map-toolbar > *, .map-workspace > * { min-width: 0; max-width: 100%; }
.feedback-box { grid-template-columns: minmax(220px,1fr) minmax(150px,.58fr) minmax(220px,.9fr) minmax(150px,auto); gap: var(--space-3); padding: var(--space-4); }
.feedback-box .button { width: 100%; white-space: normal; }
.validation-panel, .debrief-form { padding: var(--space-6); border-color: #c3d0e8; border-radius: var(--radius-lg); }
.field { min-width: 0; }
.field > label { font-size: var(--text-sm); line-height: 1.45; }

.dependency-map-shell { border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.map-toolbar { gap: var(--space-3); padding: var(--space-4); }
.map-search-field, .map-filters select, .map-controls button { height: 42px; }
.map-search-field .icon { width: 18px; height: 18px; }
.map-controls button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-width: 42px; color: var(--navy); transition: border-color var(--duration-fast) ease, background var(--duration-fast) ease, box-shadow var(--duration-fast) ease, transform var(--duration-fast) ease; }
.map-controls button:hover { transform: translateY(-1px); border-color: var(--color-line-strong); }
.map-controls button .icon { width: 17px; height: 17px; }
.map-node-panel { background: var(--white); }
.map-panel-icon .icon { width: 28px; height: 28px; }
.map-panel-close { display: grid; place-items: center; }
.map-panel-close .icon { width: 18px; height: 18px; }
.dependency-map-viewport { background-color: #fbfcff; background-image: radial-gradient(#d8e0ed .85px, transparent .85px); }

@media (max-width: 1180px) {
  .report-layout { grid-template-columns: 1fr; gap: var(--space-4); }
  .report-sidebar { top: 88px; padding: var(--space-3); }
  .report-nav a { min-height: 40px; }
  .report-hero { min-height: auto; }
  .feedback-box { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .site-header { height: auto; min-height: 68px; padding: 12px 16px; gap: 12px; }
  .brand-mark { width: 36px; height: 36px; }
  .header-actions { margin-left: auto; overflow-x: auto; }
  .header-actions .button { min-height: 36px; padding: 8px 10px; font-size: var(--text-xs); }
  .report-header #download-research, .report-header .button.ghost { display: none; }
  .report-scroll-progress { top: 68px; }
  .report-page { width: min(100% - 20px, 1540px); padding-top: 14px; }
  .report-section, .report-hero { padding: 24px 18px; border-radius: 16px; }
  .executive-heading { gap: 18px; }
  .executive-score { width: 104px; flex-basis: 104px; }
  .executive-score strong { font-size: 2.25rem; }
  .executive-grid { grid-template-columns: 1fr; }
  .mri-grid, .feedback-box { grid-template-columns: 1fr; }
  .section-heading > .muted { text-align: left; }
  .section-heading-actions { width: 100%; align-items: flex-start; flex-direction: column; }
  .map-controls { flex-wrap: wrap; }
  .map-controls button:last-child { flex: 1; }
}

@media (max-width: 520px) {
  .executive-heading { flex-direction: column; }
  .executive-score { width: 112px; align-self: flex-start; }
  .report-sidebar { position: sticky; top: 68px; z-index: 12; margin-inline: 0; box-shadow: var(--shadow-sm); }
  .report-nav a .icon { display: none; }
  .score-grid, .signal-strip, .roadmap-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

/* v0.5 Sprint 3 — Dependency Map Studio */
.map-studio-body { min-width: 320px; overflow-x: hidden; background: var(--color-canvas); }
.map-studio-header { height: 64px; }
.map-studio-header .brand-mark { width: 36px; height: 36px; }
.map-studio-page { width: min(1880px, calc(100% - 28px)); margin: 0 auto; padding: 10px 0 18px; }
.map-studio-page .loading-card { margin-block: 40px; }
.map-studio-titlebar { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 0 24px; border: 1px solid var(--line); border-bottom: 0; border-radius: 16px 16px 0 0; background: var(--white); }
.map-studio-titlebar > div { display: flex; align-items: center; gap: 20px; }
.map-studio-titlebar h1 { margin: 0; color: var(--navy); font-size: 1.05rem; letter-spacing: -.02em; }
.map-studio-titlebar h1::after { content: ""; display: inline-block; width: 1px; height: 22px; margin-left: 20px; vertical-align: middle; background: var(--line); }
.map-studio-titlebar span { color: var(--ink); font-size: .92rem; }
.map-studio-titlebar p { margin: 0; color: var(--muted); font-size: .78rem; }
.map-studio-shell { min-height: 760px; height: calc(100vh - 132px); display: grid; grid-template-columns: 210px minmax(620px, 1fr) 330px; overflow: hidden; border: 1px solid var(--line); border-radius: 0 0 18px 18px; background: var(--white); box-shadow: var(--shadow-md); }

.studio-rail { min-width: 0; display: flex; flex-direction: column; gap: 24px; padding: 18px 14px; overflow-y: auto; border-right: 1px solid var(--line); background: #fcfdff; }
.studio-rail-group { display: grid; gap: 5px; }
.studio-rail-group + .studio-rail-group { padding-top: 22px; border-top: 1px solid var(--line); }
.studio-rail-group > span { margin: 0 10px 6px; color: var(--muted); font-size: .65rem; font-weight: 850; letter-spacing: .11em; text-transform: uppercase; }
.studio-rail-group button { width: 100%; min-height: 42px; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 1px solid transparent; border-radius: 10px; color: #53627a; background: transparent; font-size: .78rem; font-weight: 720; text-align: left; transition: color var(--duration-fast) ease, background var(--duration-fast) ease, border-color var(--duration-fast) ease, box-shadow var(--duration-fast) ease; }
.studio-rail-group button .icon { width: 18px; height: 18px; color: #71819b; }
.studio-rail-group button:hover { color: var(--blue-dark); background: var(--blue-soft); }
.studio-rail-group button.active { color: var(--blue-dark); border-color: #c8d5ff; background: var(--blue-soft); box-shadow: inset 3px 0 0 var(--blue); }
.studio-rail-group button.active .icon { color: var(--blue); }
.studio-clear-filters { align-self: flex-start; margin: -10px 10px 0; border: 0; color: var(--blue); background: transparent; font-size: .74rem; font-weight: 750; }

.studio-main { min-width: 0; display: flex; flex-direction: column; background: var(--white); }
.studio-scenario-strip { min-height: 40px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 18px; color: #b42318; border-bottom: 1px solid #fecaca; background: #fff5f4; font-size: .76rem; }
.studio-scenario-strip[hidden] { display: none; }
.studio-scenario-strip > div, .studio-scenario-strip button { display: inline-flex; align-items: center; gap: 8px; }
.studio-scenario-strip .icon { width: 15px; height: 15px; }
.studio-scenario-strip button { border: 0; color: #b42318; background: transparent; font-weight: 800; }
.studio-toolbar { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 11px 18px; border-bottom: 1px solid var(--line); background: var(--white); }
.studio-search { position: relative; width: min(330px, 42%); }
.studio-search > div:first-child { height: 40px; display: flex; align-items: center; gap: 9px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; transition: border var(--duration-fast) ease, box-shadow var(--duration-fast) ease; }
.studio-search > div:first-child:focus-within { border-color: var(--blue); box-shadow: var(--shadow-focus); }
.studio-search .icon { width: 17px; height: 17px; color: var(--muted); }
.studio-search input { width: 100%; min-height: 0; padding: 0; border: 0; box-shadow: none; color: var(--navy); background: transparent; font-size: .82rem; }
.studio-search input:focus { box-shadow: none; }
.studio-search-results { position: absolute; z-index: 30; inset: calc(100% + 7px) 0 auto; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--white); box-shadow: var(--shadow-lg); }
.studio-search-results[hidden] { display: none; }
.studio-search-results button { width: 100%; display: grid; grid-template-columns: 28px minmax(0,1fr) auto; align-items: center; gap: 9px; padding: 10px 12px; border: 0; border-top: 1px solid var(--line); color: var(--ink); background: #fff; text-align: left; }
.studio-search-results button:first-child { border-top: 0; }
.studio-search-results button:hover { background: var(--blue-soft); }
.studio-search-results button > span { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; color: var(--blue); background: var(--blue-soft); }
.studio-search-results button > div { min-width: 0; display: grid; }
.studio-search-results strong { overflow: hidden; color: var(--navy); font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.studio-search-results small { color: var(--muted); font-size: .67rem; }
.studio-search-results em { color: var(--muted); font-size: .65rem; font-style: normal; }
.studio-search-results p { margin: 0; padding: 16px; color: var(--muted); font-size: .78rem; }
.studio-toolbar-actions { display: flex; gap: 7px; }
.studio-toolbar-actions button, .studio-minimap button { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 9px; color: var(--navy); background: #fff; font-size: .75rem; font-weight: 760; transition: color var(--duration-fast) ease, background var(--duration-fast) ease, border-color var(--duration-fast) ease, box-shadow var(--duration-fast) ease, transform var(--duration-fast) ease; }
.studio-toolbar-actions button:hover, .studio-minimap button:hover { transform: translateY(-1px); border-color: var(--color-line-strong); box-shadow: var(--shadow-sm); }
.studio-toolbar-actions button.active { color: var(--blue-dark); border-color: #9eb4ff; background: var(--blue-soft); }
.studio-toolbar-actions .icon { width: 16px; height: 16px; }

.studio-canvas-wrap { min-height: 0; flex: 1; display: flex; flex-direction: column; background: #fbfcff; }
.studio-column-headings { height: 34px; flex: 0 0 34px; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); align-items: end; gap: 24px; padding: 0 40px 8px; color: #52627a; font-size: .61rem; font-weight: 850; letter-spacing: .08em; text-align: center; text-transform: uppercase; }
.studio-viewport { min-height: 500px; flex: 1; position: relative; overflow: hidden; cursor: grab; touch-action: none; background-color: #fbfcff; background-image: radial-gradient(#dce3ef .8px, transparent .8px); background-size: 18px 18px; }
.studio-viewport.dragging { cursor: grabbing; }
.studio-stage { position: absolute; inset: 0 auto auto 0; transform-origin: 0 0; will-change: transform; transition: transform .16s var(--ease-standard); }
.studio-edge-svg, .studio-node-layer { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.studio-edge-svg { z-index: 1; }
.studio-node-layer { z-index: 2; pointer-events: none; }
.studio-node-layer .studio-node { pointer-events: auto; }
.studio-edge { fill: none; stroke: #718096; stroke-width: 1.8; opacity: .72; transition: opacity var(--duration-base) ease, stroke var(--duration-base) ease, stroke-width var(--duration-base) ease; }
.studio-edge-group marker path { fill: #718096; }
.studio-edge-group.assumed .studio-edge { stroke: #b54708; stroke-dasharray: 8 6; }
.studio-edge-group.unknown .studio-edge { stroke: #98a2b3; stroke-dasharray: 2 6; }
.studio-edge-group.highlighted .studio-edge, .studio-edge-group.selected .studio-edge { stroke: var(--blue); stroke-width: 3; opacity: 1; }
.studio-edge-group.scenario-impacted .studio-edge { stroke: #ef4444; stroke-width: 3; opacity: 1; }
.studio-edge-group.scenario-surviving .studio-edge { stroke: #16a34a; stroke-width: 3; opacity: 1; }
.studio-edge-group.muted .studio-edge { opacity: .13; }
.studio-edge-hit { fill: none; stroke: transparent; stroke-width: 16; cursor: pointer; pointer-events: stroke; }
.studio-edge-label { paint-order: stroke; stroke: #fbfcff; stroke-width: 5px; stroke-linejoin: round; fill: #52627a; font-size: 10px; font-weight: 700; text-transform: capitalize; pointer-events: none; }
.studio-edge-group.highlighted .studio-edge-label { fill: var(--blue-dark); }
.studio-node { position: absolute; width: 230px; height: 66px; display: grid; grid-template-columns: 38px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 10px 11px; overflow: hidden; border: 1px solid #cbd5e1; border-radius: 13px; color: var(--ink); background: #fff; box-shadow: var(--shadow-sm); text-align: left; transform-origin: center; transition: opacity var(--duration-base) ease, border-color var(--duration-base) ease, box-shadow var(--duration-base) ease, transform var(--duration-base) var(--ease-standard), background var(--duration-base) ease; }
.studio-node:hover, .studio-node:focus-visible { z-index: 3; border-color: #8fa8d0; box-shadow: 0 12px 26px rgba(16,28,48,.14); transform: translateY(-2px); outline: none; }
.studio-node.selected { z-index: 4; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(36,84,230,.12), 0 12px 28px rgba(16,28,48,.14); }
.studio-node.choke, .studio-node.tier-critical { border-color: #f4a6a0; }
.studio-node.choke.selected, .studio-node.scenario-unavailable { border-color: #ef4444; background: #fff7f6; box-shadow: 0 0 0 3px rgba(239,68,68,.12), 0 12px 28px rgba(180,35,24,.14); }
.studio-node.scenario-surviving { border-color: #22c55e; background: #f5fff8; }
.studio-node.muted { opacity: .2; filter: saturate(.45); }
.studio-node.focus-hidden { opacity: .025; pointer-events: none; }
.studio-node.search-match { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(36,84,230,.13); }
.studio-node-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; color: #46566f; background: var(--soft); }
.studio-node-icon .icon { width: 20px; height: 20px; }
.studio-node.choke .studio-node-icon, .studio-node.tier-critical .studio-node-icon { color: #b42318; background: var(--red-soft); }
.studio-node.scenario-surviving .studio-node-icon { color: var(--green); background: var(--green-soft); }
.studio-node-copy { min-width: 0; display: grid; gap: 5px; }
.studio-node-copy strong { overflow: hidden; color: var(--navy); font-size: .76rem; font-weight: 780; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.studio-node-copy small { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .64rem; }
.studio-node-copy small i, .risk-dot { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: #94a3b8; }
.studio-node.tier-critical .studio-node-copy small i, .risk-dot.critical { background: #ef4444; }
.studio-node.tier-high .studio-node-copy small i, .risk-dot.high { background: #f59e0b; }
.studio-node.tier-medium .studio-node-copy small i, .risk-dot.medium { background: #fbbf24; }
.risk-dot.lower, .risk-dot.low, .risk-dot.mapped { background: #22c55e; }
.studio-node.scenario-unavailable .studio-node-copy small { color: #b42318; font-weight: 800; }
.studio-node-alert { color: #b42318; }
.studio-node-alert .icon { width: 15px; height: 15px; }
.studio-empty-map { position: absolute; left: 50%; top: 45%; display: grid; gap: 4px; color: var(--navy); text-align: center; transform: translate(-50%,-50%); }
.studio-empty-map span { color: var(--muted); font-size: .78rem; }
.studio-minimap { position: absolute; z-index: 8; right: 14px; bottom: 14px; display: flex; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.94); box-shadow: var(--shadow-md); }
.studio-minimap > svg { width: 184px; height: 100px; padding: 8px; }
.studio-minimap .mini-viewport { fill: rgba(36,84,230,.08); stroke: var(--blue); stroke-width: 1.5; }
.studio-minimap > div { display: grid; border-left: 1px solid var(--line); }
.studio-minimap button { min-width: 34px; min-height: 33px; padding: 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; }
.studio-minimap button:first-child { border-top: 0; }
.studio-minimap button .icon { width: 15px; height: 15px; }
.studio-canvas-footer { min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 7px 18px; border-top: 1px solid var(--line); background: #fff; }
.studio-legend, .studio-status { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; color: var(--muted); font-size: .63rem; }
.studio-legend span { display: inline-flex; align-items: center; gap: 5px; }
.studio-legend i { width: 24px; height: 0; border-top: 2px solid #718096; }
.studio-legend i.assumed { border-color: #b54708; border-top-style: dashed; }
.studio-legend i.unknown { border-color: #98a2b3; border-top-style: dotted; }
.studio-status span { position: relative; padding-left: 12px; }
.studio-status span::before { content: ""; position: absolute; left: 0; top: 50%; width: 3px; height: 3px; border-radius: 50%; background: #94a3b8; }
.studio-status strong { color: var(--ink); }

.studio-inspector { min-width: 0; overflow-y: auto; padding: 18px; border-left: 1px solid var(--line); background: #fff; }
.studio-inspector-head { display: grid; grid-template-columns: 46px minmax(0,1fr); align-items: center; gap: 12px; }
.studio-inspector-head > div { min-width: 0; }
.studio-inspector-head small { display: block; margin-bottom: 2px; color: var(--muted); font-size: .64rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.studio-inspector-head h2 { margin: 0; color: var(--navy); font-size: 1.12rem; line-height: 1.25; }
.studio-inspector-head h2 span { color: var(--muted); font-size: .88rem; }
.studio-inspector-head h2 em { display: block; color: #dc2626; font-size: .86rem; font-style: normal; }
.studio-inspector-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 12px; color: var(--blue); background: var(--blue-soft); }
.studio-inspector-icon.danger { color: #dc2626; background: var(--red-soft); }
.studio-inspector-icon .icon { width: 24px; height: 24px; }
.studio-inspector-badges { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.studio-impact-summary { margin: 18px 0; padding: 15px 0; border-block: 1px solid var(--line); color: var(--ink); font-size: .84rem; line-height: 1.5; }
.studio-impact-summary strong { color: var(--navy); }
.studio-inspector-tabs { display: grid; grid-template-columns: repeat(4,1fr); margin: 0 -6px 14px; border-bottom: 1px solid var(--line); }
.studio-inspector-tabs button { position: relative; padding: 10px 4px; border: 0; color: var(--muted); background: transparent; font-size: .67rem; font-weight: 760; }
.studio-inspector-tabs button::after { content: ""; position: absolute; inset: auto 7px -1px; height: 2px; background: transparent; }
.studio-inspector-tabs button.active { color: var(--blue-dark); }
.studio-inspector-tabs button.active::after { background: var(--blue); }
.studio-inspector-content { display: grid; gap: 0; }
.studio-inspector-stat { display: grid; grid-template-columns: 36px minmax(0,1fr); align-items: center; gap: 11px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.studio-inspector-stat > span { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 9px; color: var(--blue); background: var(--blue-soft); }
.studio-inspector-stat.danger > span { color: #dc2626; background: var(--red-soft); }
.studio-inspector-stat.success > span { color: var(--green); background: var(--green-soft); }
.studio-inspector-stat .icon { width: 18px; height: 18px; }
.studio-inspector-stat > div { min-width: 0; display: grid; gap: 3px; }
.studio-inspector-stat small, .studio-inspector-section > span, .connection-evidence-card > span { color: var(--muted); font-size: .62rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.studio-inspector-stat strong { color: var(--navy); font-size: .8rem; line-height: 1.35; }
.studio-inspector-section { display: grid; gap: 9px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.studio-inspector-section p { margin: 0; color: var(--muted); font-size: .76rem; line-height: 1.55; }
.studio-inspector-section.recommendation { margin: 14px 0; padding: 14px; border: 0; border-radius: 11px; background: var(--blue-soft); }
.studio-inspector-section.recommendation strong { color: #243d78; font-size: .8rem; line-height: 1.45; }
.studio-relationship-list, .studio-impact-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.studio-relationship-list li, .studio-impact-list li { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 9px; padding: 10px 0; border-top: 1px solid var(--line); }
.studio-relationship-list li:first-child, .studio-impact-list li:first-child { border-top: 0; }
.studio-relationship-list button { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 9px; padding: 0; border: 0; color: inherit; background: transparent; text-align: left; }
.studio-relationship-list li > div, .studio-relationship-list button > div, .studio-impact-list li > div { min-width: 0; display: grid; gap: 3px; }
.studio-relationship-list strong, .studio-impact-list strong { overflow: hidden; color: var(--navy); font-size: .76rem; text-overflow: ellipsis; white-space: nowrap; }
.studio-relationship-list small, .studio-impact-list small { color: var(--muted); font-size: .66rem; }
.studio-impact-list li { justify-content: flex-start; }
.confidence-confirmed { color: var(--green) !important; }
.confidence-assumed { color: var(--amber) !important; }
.confidence-unknown { color: var(--muted) !important; }
.studio-full-button { width: 100%; margin-top: 15px; white-space: normal; }
.studio-inspector-actions { display: grid; gap: 8px; margin-top: 16px; }
.studio-inspector-actions .button { width: 100%; }
.studio-inspector-empty { min-height: 430px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.studio-inspector-empty > span { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 15px; color: var(--blue); background: var(--blue-soft); }
.studio-inspector-empty h2 { margin: 14px 0 5px; color: var(--navy); font-size: 1.05rem; }
.studio-inspector-empty p { max-width: 250px; margin: 0; color: var(--muted); font-size: .76rem; line-height: 1.55; }
.connection-evidence-card { display: grid; gap: 5px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.connection-evidence-card strong { color: var(--navy); font-size: .86rem; text-transform: capitalize; }
.scenario-primary-stat { display: flex; align-items: baseline; gap: 10px; margin-top: 20px; }
.scenario-primary-stat strong { color: #dc2626; font-size: 2rem; line-height: 1; }
.scenario-primary-stat span { color: var(--navy); font-size: .82rem; font-weight: 760; }
.scenario-stat-grid { display: grid; grid-template-columns: repeat(3,1fr); margin: 16px 0; border-block: 1px solid var(--line); }
.scenario-stat-grid article { display: grid; gap: 3px; padding: 13px 7px; border-left: 1px solid var(--line); text-align: center; }
.scenario-stat-grid article:first-child { border-left: 0; }
.scenario-stat-grid strong { color: #dc2626; font-size: 1.12rem; }
.scenario-stat-grid span { color: var(--muted); font-size: .62rem; line-height: 1.3; }

@media (max-width: 1380px) {
  .map-studio-shell { grid-template-columns: 190px minmax(570px,1fr) 300px; }
  .studio-rail { padding-inline: 10px; }
  .studio-toolbar { align-items: stretch; flex-direction: column; }
  .studio-search { width: 100%; }
  .studio-toolbar-actions { justify-content: flex-end; }
}

@media (max-width: 1050px) {
  .map-studio-page { width: min(100% - 20px, 1880px); }
  .map-studio-shell { height: auto; min-height: 0; grid-template-columns: 1fr; overflow: visible; }
  .studio-rail { position: sticky; top: 64px; z-index: 20; flex-direction: row; gap: 12px; padding: 10px; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-sm); }
  .studio-rail-group { display: flex; flex: 0 0 auto; gap: 5px; }
  .studio-rail-group + .studio-rail-group { padding: 0 0 0 12px; border: 0; border-left: 1px solid var(--line); }
  .studio-rail-group > span { display: none; }
  .studio-rail-group button { width: auto; min-width: max-content; }
  .studio-clear-filters { flex: 0 0 auto; align-self: center; margin: 0; }
  .studio-main { min-height: 720px; }
  .studio-viewport { min-height: 620px; }
  .studio-inspector { border-top: 1px solid var(--line); border-left: 0; }
  .studio-inspector-content { grid-template-columns: repeat(2,minmax(0,1fr)); column-gap: 20px; }
  .studio-full-button { max-width: 360px; }
}

@media (max-width: 680px) {
  .map-studio-header #studio-pdf-link, .map-studio-header .button.ghost { display: none; }
  .map-studio-titlebar { align-items: flex-start; flex-direction: column; gap: 3px; padding: 12px 16px; }
  .map-studio-titlebar p { display: none; }
  .map-studio-titlebar h1::after { height: 17px; }
  .studio-rail { top: 68px; }
  .studio-rail-group:nth-child(2) { display: none; }
  .studio-toolbar { min-height: 0; gap: 9px; padding: 10px; }
  .studio-toolbar-actions { display: grid; grid-template-columns: repeat(4,1fr); }
  .studio-toolbar-actions button { min-width: 0; padding: 7px; }
  .studio-toolbar-actions button span { display: none; }
  .studio-column-headings { display: none; }
  .studio-main { min-height: 610px; }
  .studio-viewport { min-height: 520px; }
  .studio-minimap { right: 8px; bottom: 8px; }
  .studio-minimap > svg { display: none; }
  .studio-canvas-footer { align-items: flex-start; flex-direction: column; gap: 7px; }
  .studio-inspector { padding: 18px 16px; }
  .studio-inspector-content { grid-template-columns: 1fr; }
  .studio-impact-summary { margin-bottom: 10px; }
}

/* v0.5 Sprint 4 — Business MRI and deterministic Insight Engine */
.report-page { width: min(1760px, calc(100% - 40px)); }
.mri-v2 { padding: 30px; }
.mri-heading { align-items: flex-start; }
.mri-heading > div { min-width: 0; flex: 1; }
.mri-heading h2 { max-width: 1100px; font-size: clamp(1.65rem, 2vw, 1.95rem); }
.mri-heading p { margin: 7px 0 0; color: var(--muted); font-size: .9rem; }
.mri-heading .button { margin-top: 18px; flex: 0 0 auto; color: var(--blue); }
.mri-profile {
  display: grid;
  grid-template-columns: minmax(430px, .92fr) minmax(440px, 1.08fr);
  min-height: 410px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
}
.mri-radar-wrap { position: relative; display: grid; place-items: center; min-width: 0; padding: 20px 20px 15px; }
.mri-radar { width: min(100%, 520px); height: auto; overflow: visible; }
.mri-radar-grid polygon, .mri-radar-grid line { fill: none; stroke: #dce3ef; stroke-width: 1; vector-effect: non-scaling-stroke; }
.mri-radar-grid polygon:last-of-type { stroke: #cbd5e5; }
.mri-radar-data { fill: rgba(36,84,230,.12); stroke: var(--blue); stroke-width: 2.2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.mri-radar-dots circle { fill: var(--blue); stroke: #fff; stroke-width: 2; vector-effect: non-scaling-stroke; }
.mri-radar-dots circle.weak { fill: #ef4444; }
.mri-axis-label text { fill: var(--navy); font-family: var(--font-sans); font-size: 10px; font-weight: 760; }
.mri-axis-label .score { font-size: 16px; font-weight: 850; }
.mri-axis-label.critical .score { fill: var(--red); }
.mri-scale-note { position: absolute; left: 24px; bottom: 15px; color: var(--muted); font-size: .7rem; }
.mri-radar-empty { color: var(--muted); font-size: .9rem; }
.mri-diagnosis { display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: 36px 38px; border-left: 1px solid var(--line); }
.mri-diagnosis h3 { max-width: 680px; margin: 0 0 26px; color: var(--navy); font-size: clamp(1.45rem, 2vw, 2rem); line-height: 1.3; letter-spacing: -.025em; }
.mri-diagnosis dl { margin: 0; border-top: 1px solid var(--line); }
.mri-diagnosis dl > div { display: grid; grid-template-columns: minmax(190px, .8fr) minmax(220px, 1.2fr); align-items: center; gap: 20px; min-height: 70px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.mri-diagnosis dt { display: flex; align-items: center; gap: 10px; color: var(--navy); font-size: .8rem; font-weight: 800; }
.mri-diagnosis dt .icon { width: 34px; height: 34px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; color: var(--blue); }
.mri-diagnosis .constraint dt .icon { color: var(--red); border-color: #fecaca; background: #fff8f7; }
.mri-diagnosis .strength dt .icon { color: var(--green); background: #f7fcf9; }
.mri-diagnosis dd { margin: 0; color: var(--navy); font-size: .84rem; font-weight: 720; line-height: 1.45; }

.insight-engine { margin-top: 24px; scroll-margin-top: 92px; }
.insight-engine-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 10px; }
.insight-engine-heading h3 { margin: 0; color: var(--navy); font-size: 1.15rem; }
.insight-engine-heading p { margin: 3px 0 0; color: var(--muted); font-size: .76rem; }
.insight-filters { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: thin; }
.insight-filters button { min-width: max-content; padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: #fff; font-size: .76rem; font-weight: 720; transition: color var(--duration-fast), background var(--duration-fast), border-color var(--duration-fast), box-shadow var(--duration-fast); }
.insight-filters button:hover { border-color: #a8b7d0; }
.insight-filters button.active { color: #fff; border-color: var(--blue); background: var(--blue); box-shadow: 0 5px 14px rgba(36,84,230,.22); }
.insight-list { overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.insight-row { position: relative; border-top: 1px solid var(--line); background: #fff; transition: background var(--duration-base) var(--ease-standard); }
.insight-row:first-child { border-top: 0; }
.insight-row::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--blue); }
.insight-row.critical::before { background: #ef4444; }
.insight-row.high::before { background: #f59e0b; }
.insight-row.medium::before { background: var(--blue); }
.insight-row.expanded { background: #fbfcff; }
.insight-summary { display: grid; grid-template-columns: 34px 125px minmax(250px, 1.8fr) 100px minmax(145px, .8fr) auto; align-items: center; gap: 13px; min-height: 72px; padding: 11px 13px 11px 19px; }
.insight-severity-icon { width: 32px; height: 32px; display: grid; place-items: center; color: var(--blue); }
.insight-severity-icon .icon { width: 21px; height: 21px; }
.insight-row.critical .insight-severity-icon, .insight-row.critical .insight-severity > strong { color: #dc2626; }
.insight-row.high .insight-severity-icon, .insight-row.high .insight-severity > strong { color: #d97706; }
.insight-severity, .insight-meta { min-width: 0; display: grid; gap: 2px; }
.insight-severity strong, .insight-meta strong { color: var(--navy); font-size: .74rem; }
.insight-severity small, .insight-meta small { overflow: hidden; color: var(--muted); font-size: .61rem; font-weight: 720; letter-spacing: .025em; text-overflow: ellipsis; white-space: nowrap; }
.insight-title { min-width: 0; }
.insight-title h3 { margin: 0; overflow: hidden; color: var(--navy); font-size: .84rem; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.insight-title p { margin: 3px 0 0; overflow: hidden; color: var(--muted); font-size: .67rem; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.insight-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.insight-actions .button { min-width: max-content; padding: 7px 9px; color: var(--blue); font-size: .7rem; }
.insight-actions .button .icon { width: 14px; height: 14px; }
.insight-disclosure { width: 30px; height: 30px; display: grid; place-items: center; padding: 0; border: 0; color: var(--muted); background: transparent; }
.insight-disclosure .icon { width: 15px; height: 15px; transition: transform var(--duration-base) var(--ease-standard); }
.insight-row.expanded .insight-disclosure .icon { transform: rotate(90deg); }
.confidence-confirmed { color: var(--green) !important; }
.confidence-supported, .confidence-assumed { color: var(--amber) !important; }
.insight-evidence { display: grid; grid-template-columns: .9fr 1.2fr 1.1fr; gap: 0; margin-left: 5px; padding: 17px 20px 0; border-top: 1px solid var(--line); background: #fbfcff; }
.insight-evidence[hidden] { display: none; }
.insight-evidence > div:not(.insight-evidence-actions) { min-width: 0; padding: 0 23px 18px; border-left: 1px solid var(--line); }
.insight-evidence > div:first-child { padding-left: 0; border-left: 0; }
.insight-evidence span { color: var(--navy); font-size: .69rem; font-weight: 850; }
.insight-evidence p, .insight-evidence li { color: var(--ink); font-size: .69rem; line-height: 1.5; }
.insight-evidence p { margin: 7px 0 0; }
.insight-evidence ul { margin: 7px 0 0; padding-left: 17px; }
.insight-evidence-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; padding: 11px 0; border-top: 1px solid var(--line); }
.insight-evidence-actions .button { color: var(--blue); font-size: .7rem; }
.insight-evidence-actions .button.ghost { margin-left: auto; color: var(--ink); }
.insight-resolution { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 13px; padding: 15px 20px; border: 1px solid #b8c8ff; border-radius: 9px; background: #f4f7ff; }
.insight-resolution > div { display: grid; gap: 2px; }
.insight-resolution strong { color: var(--blue); font-size: .9rem; }
.insight-resolution span { color: var(--navy); font-size: .78rem; }
.insight-resolution .button { flex: 0 0 auto; color: var(--blue); }
.insight-resolution .icon { width: 14px; height: 14px; }

@media (max-width: 1320px) {
  .mri-profile { grid-template-columns: 1fr; }
  .mri-diagnosis { border-top: 1px solid var(--line); border-left: 0; }
  .insight-summary { grid-template-columns: 32px 110px minmax(220px,1fr) 90px minmax(140px,.7fr); }
  .insight-actions { grid-column: 3 / -1; justify-content: flex-start; padding-bottom: 4px; }
}

@media (max-width: 900px) {
  .mri-v2 { padding: 20px; }
  .mri-heading { align-items: stretch; flex-direction: column; }
  .mri-heading .button { align-self: flex-start; margin-top: 0; }
  .mri-profile { min-height: 0; }
  .mri-radar-wrap { padding-inline: 6px; }
  .mri-diagnosis { padding: 25px 22px; }
  .mri-diagnosis dl > div { grid-template-columns: 1fr; gap: 5px; }
  .insight-engine-heading { align-items: stretch; flex-direction: column; }
  .insight-summary { grid-template-columns: 30px 94px minmax(180px,1fr); gap: 9px; }
  .insight-meta { grid-column: span 1; padding-left: 39px; }
  .insight-actions { grid-column: 1 / -1; padding-left: 39px; }
  .insight-evidence { grid-template-columns: 1fr; }
  .insight-evidence > div:not(.insight-evidence-actions) { padding: 14px 0; border-top: 1px solid var(--line); border-left: 0; }
  .insight-evidence > div:first-child { border-top: 0; }
}

@media (max-width: 560px) {
  .report-page { width: min(100% - 16px, 1760px); }
  .mri-v2 { padding: 16px; }
  #report-mri { scroll-margin-top: 150px; }
  .mri-heading h2 { font-size: 1.55rem; }
  .mri-radar { min-width: 390px; transform: translateX(-3px); }
  .mri-radar-wrap { justify-content: start; overflow-x: auto; }
  .mri-scale-note { left: 12px; }
  .mri-diagnosis h3 { font-size: 1.25rem; }
  .insight-summary { grid-template-columns: 30px 1fr; padding: 14px 13px 14px 16px; }
  .insight-severity { align-self: center; }
  .insight-title, .insight-meta, .insight-actions { grid-column: 1 / -1; padding-left: 39px; }
  .insight-title h3, .insight-title p { overflow: visible; text-overflow: clip; white-space: normal; }
  .insight-meta { display: flex; align-items: center; gap: 8px; }
  .insight-actions { flex-wrap: wrap; }
  .insight-disclosure { margin-left: auto; }
  .insight-evidence { padding-inline: 16px; }
  .insight-evidence-actions { align-items: stretch; flex-direction: column; }
  .insight-evidence-actions .button, .insight-evidence-actions .button.ghost { width: 100%; margin-left: 0; }
  .insight-resolution { align-items: stretch; flex-direction: column; }
  .insight-resolution .button { width: 100%; }
}

.scenario-studio-body { min-width: 320px; overflow-x: hidden; background: var(--color-canvas); }
.scenario-studio-header { height: 68px; }
.scenario-studio-header .brand-mark { width: 36px; height: 36px; }
.scenario-studio-page { width: min(1880px, calc(100% - 20px)); margin: 0 auto; padding: 10px 0 20px; }
.scenario-studio-page .loading-card { margin-block: 40px; }
.scenario-workspace {
  min-height: calc(100vh - 98px);
  display: grid;
  grid-template-columns: 260px minmax(650px, 1fr) 330px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-md);
}
.scenario-workspace.result { grid-template-columns: 260px minmax(0, 1fr); }
.scenario-rail {
  min-width: 0;
  padding: 25px 18px;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: #fcfdff;
}
.scenario-rail-title {
  display: block;
  margin: 0 8px 14px;
  color: var(--navy);
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.scenario-rail nav { display: grid; gap: 5px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.scenario-rail nav button,
.scenario-rail-list button {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--ink);
  background: transparent;
  font-size: .8rem;
  font-weight: 700;
  text-align: left;
  transition: color var(--duration-fast), background var(--duration-fast), border-color var(--duration-fast);
}
.scenario-rail nav button:hover,
.scenario-rail-list button:hover { color: var(--blue-dark); background: var(--blue-soft); }
.scenario-rail nav button.active { color: var(--blue); border-color: #c8d5ff; background: #f5f7ff; }
.scenario-rail nav .icon,
.scenario-rail-list .icon { width: 18px; height: 18px; flex: 0 0 auto; color: #71819b; }
.scenario-rail-list { display: grid; gap: 4px; padding-top: 20px; }
.scenario-rail-list + .scenario-rail-list { margin-top: 16px; border-top: 1px solid var(--line); }
.scenario-rail-list > span,
.scenario-current > span {
  margin: 0 8px 8px;
  color: var(--muted);
  font-size: .64rem;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.scenario-rail-list button { min-height: 48px; border-color: var(--line); background: #fff; font-size: .74rem; }
.scenario-rail-list button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scenario-rail-empty { margin: 0; padding: 8px; color: var(--muted); font-size: .72rem; line-height: 1.5; }
.scenario-current { display: grid; gap: 10px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.scenario-current > span { margin: 0; }
.scenario-current > strong { color: var(--navy); font-size: .95rem; line-height: 1.35; }
.scenario-current > div { display: grid; gap: 7px; }
.scenario-current em {
  display: flex;
  align-items: center;
  gap: 7px;
  width: max-content;
  max-width: 100%;
  padding: 7px 9px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #b42318;
  background: #fff7f6;
  font-size: .72rem;
  font-style: normal;
  font-weight: 720;
}
.scenario-current em .icon { width: 14px; height: 14px; }
.scenario-current .button { width: 100%; margin-top: 4px; }
.scenario-setup { min-width: 0; padding: 28px 30px; }
.scenario-setup > header { margin: 0 14px 20px; }
.scenario-setup > header h1,
.scenario-result-header h1 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(1.55rem, 2.2vw, 2rem);
  line-height: 1.18;
  letter-spacing: -.035em;
}
.scenario-setup > header p,
.scenario-result-header p { margin: 7px 0 0; color: var(--muted); font-size: .9rem; }
.scenario-step { overflow: hidden; border: 1px solid var(--line); border-top: 0; background: #fff; }
.scenario-step:first-of-type { border-top: 1px solid var(--line); border-radius: 13px 13px 0 0; }
.scenario-step:last-of-type { border-radius: 0 0 13px 13px; }
.scenario-step-heading { display: flex; align-items: center; gap: 11px; padding: 15px 17px 4px; }
.scenario-step-heading > span {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  color: #fff;
  background: var(--blue);
  font-size: .78rem;
  font-weight: 850;
}
.scenario-step-heading h2 { margin: 0; color: var(--navy); font-size: .96rem; }
.scenario-chooser { display: grid; grid-template-columns: minmax(360px, 1.35fr) minmax(220px, .65fr); gap: 20px; padding: 14px 17px 18px; }
.scenario-search {
  height: 42px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
}
.scenario-search:focus-within { border-color: var(--blue); box-shadow: var(--shadow-focus); }
.scenario-search .icon { width: 17px; height: 17px; color: var(--muted); }
.scenario-search input { width: 100%; min-height: 0; padding: 0; border: 0; background: transparent; box-shadow: none; font-size: .8rem; }
.scenario-search input:focus { box-shadow: none; }
.scenario-category-filters { display: grid; grid-template-columns: .6fr .9fr 1.4fr .8fr; gap: 6px; margin: 8px 0; }
.scenario-category-filters button,
.scenario-assumptions button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  font-size: .72rem;
  font-weight: 700;
}
.scenario-category-filters button:hover,
.scenario-assumptions button:hover { border-color: #a9b6cc; }
.scenario-category-filters button.active,
.scenario-assumptions button.active { color: var(--blue-dark); border-color: var(--blue); background: var(--blue-soft); box-shadow: inset 0 0 0 1px var(--blue); }
.scenario-category-filters .icon { width: 14px; height: 14px; }
.scenario-dependency-list { max-height: 300px; overflow-y: auto; border: 1px solid var(--line); border-radius: 9px; }
.scenario-dependency-list > p { margin: 0; padding: 20px; color: var(--muted); font-size: .78rem; text-align: center; }
.scenario-dependency-row {
  width: 100%;
  min-height: 42px;
  display: grid;
  grid-template-columns: 25px minmax(130px, 1fr) 95px minmax(95px, auto);
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border: 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
  background: #fff;
  text-align: left;
}
.scenario-dependency-row:first-child { border-top: 0; }
.scenario-dependency-row:hover { background: #f8faff; }
.scenario-dependency-row.selected { position: relative; z-index: 1; color: var(--blue-dark); background: var(--blue-soft); box-shadow: inset 0 0 0 1.5px var(--blue); }
.scenario-dependency-row > span { width: 24px; height: 24px; display: grid; place-items: center; color: var(--blue); }
.scenario-dependency-row .icon { width: 15px; height: 15px; }
.scenario-dependency-row strong { overflow: hidden; color: var(--navy); font-size: .75rem; text-overflow: ellipsis; white-space: nowrap; }
.scenario-dependency-row small { color: var(--muted); font-size: .67rem; }
.scenario-dependency-row em { color: var(--muted); font-size: .65rem; font-style: normal; text-align: right; }
.scenario-dependency-row em.critical { color: var(--red); }
.scenario-dependency-row em.high { color: var(--amber); }
.scenario-selection { min-width: 0; padding-left: 20px; border-left: 1px solid var(--line); }
.scenario-selection-title { display: flex; align-items: center; gap: 10px; }
.scenario-selection-title > span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; color: var(--blue); background: var(--blue-soft); }
.scenario-selection-title .icon { width: 20px; height: 20px; }
.scenario-selection-title h3 { margin: 0; color: var(--navy); font-size: .95rem; line-height: 1.3; }
.scenario-selection dl { margin: 15px 0 0; }
.scenario-selection dl > div { display: grid; grid-template-columns: 90px 1fr; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); }
.scenario-selection dt { color: var(--muted); font-size: .68rem; }
.scenario-selection dd { margin: 0; color: var(--navy); font-size: .7rem; font-weight: 720; }
.scenario-assumptions { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding: 13px 17px 18px; }
.scenario-assumptions fieldset { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin: 0; padding: 0; border: 0; }
.scenario-assumptions fieldset:last-child { grid-template-columns: repeat(2, 1fr); }
.scenario-assumptions legend { grid-column: 1 / -1; margin-bottom: 6px; color: var(--navy); font-size: .73rem; font-weight: 800; }
.scenario-run-step { padding-bottom: 18px; }
.scenario-run-step > p { margin: 5px 17px 12px 54px; color: var(--muted); font-size: .75rem; }
.scenario-run-step > .button { margin-left: 54px; }
.scenario-guide { min-width: 0; padding: 28px 24px; border-left: 1px solid var(--line); background: #fcfdff; }
.scenario-guide h2 { margin: 0 0 14px; color: var(--navy); font-size: .96rem; }
.scenario-guide ul { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.scenario-guide li { display: grid; grid-template-columns: 40px 1fr; gap: 11px; padding: 12px 0; border-top: 1px solid var(--line); }
.scenario-guide li:first-child { border-top: 0; }
.scenario-guide li > span { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; color: var(--blue); background: #fff; }
.scenario-guide li .icon { width: 20px; height: 20px; }
.scenario-guide li strong { color: var(--navy); font-size: .77rem; }
.scenario-guide li p { margin: 3px 0 0; color: var(--muted); font-size: .69rem; line-height: 1.45; }
.simulation-only { display: grid; grid-template-columns: 28px 1fr; gap: 10px; margin-top: 15px; padding: 12px; border: 1px solid #c8d5ff; border-radius: 9px; background: #f5f7ff; }
.simulation-only > .icon { width: 18px; height: 18px; margin-top: 1px; color: var(--blue); }
.simulation-only strong { color: var(--navy); font-size: .73rem; }
.simulation-only p { margin: 2px 0 0; color: var(--muted); font-size: .66rem; line-height: 1.45; }
.scenario-preview-heading { display: flex; align-items: center; justify-content: space-between; margin: 18px 0 7px; color: var(--navy); font-size: .73rem; }
.scenario-preview-heading span { color: var(--muted); font-size: .64rem; }
.scenario-preview-map { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.scenario-preview-edges path { fill: none; stroke: #cbd5e1; stroke-width: 1.4; }
.scenario-preview-node rect { fill: #fff; stroke: #b8c3d3; }
.scenario-preview-node text { fill: var(--navy); font-family: var(--font-sans); font-size: 8px; font-weight: 650; }
.scenario-preview-node.focus rect { fill: #fff1f0; stroke: #ef4444; stroke-width: 1.8; }
.scenario-results { min-width: 0; padding: 26px 24px 36px; }
.scenario-result-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin: 0 4px 16px; }
.scenario-result-header > div { min-width: 0; }
.scenario-result-header > span { flex: 0 0 auto; padding: 5px 8px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); background: #fff; font-size: .64rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.scenario-summary-grid { display: grid; grid-template-columns: repeat(6, 1fr); overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.scenario-summary-grid article { min-width: 0; display: grid; gap: 5px; padding: 15px 12px; border-left: 1px solid var(--line); text-align: center; }
.scenario-summary-grid article:first-child { border-left: 0; }
.scenario-summary-grid span { color: var(--muted); font-size: .67rem; line-height: 1.3; }
.scenario-summary-grid strong { color: var(--navy); font-size: 1.42rem; line-height: 1; }
.scenario-summary-grid strong.low { color: var(--red); }
.scenario-summary-grid strong.medium { color: var(--amber); }
.scenario-summary-grid strong.high { color: var(--green); }
.scenario-result-body { display: grid; grid-template-columns: minmax(580px, 1fr) 330px; gap: 12px; margin-top: 12px; }
.scenario-map-panel,
.scenario-result-inspector { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.scenario-result-map-toolbar { min-height: 50px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.scenario-map-legend { display: flex; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: .63rem; }
.scenario-map-legend span { display: inline-flex; align-items: center; gap: 5px; }
.scenario-map-legend i { width: 9px; height: 9px; border: 1.5px solid #94a3b8; border-radius: 3px; background: #f8fafc; }
.scenario-map-legend i.failed { border-color: #991b1b; background: #991b1b; }
.scenario-map-legend i.degraded { border-color: #f59e0b; background: #fff7ed; }
.scenario-map-legend i.protected { border-color: #16a34a; background: #ecfdf3; }
.scenario-result-map-scroll { min-height: 490px; overflow: auto; background-color: #fbfcff; background-image: radial-gradient(#d9e5f5 1px, transparent 1px); background-size: 18px 18px; }
.scenario-result-map-stage { position: relative; }
.scenario-result-map { position: relative; transform-origin: top left; }
.scenario-result-map > svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.scenario-map-edge { fill: none; stroke: #ef4444; stroke-width: 2; opacity: .72; }
.scenario-map-edge.protected { stroke: #22c55e; stroke-dasharray: 6 5; }
.scenario-map-edge.unaffected { stroke: #cbd5e1; stroke-width: 1.25; }
.scenario-map-edge.selected { stroke-width: 3.3; opacity: 1; }
.scenario-map-node {
  position: absolute;
  width: 170px;
  min-height: 66px;
  display: grid;
  grid-template-columns: 30px minmax(0,1fr);
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 8px;
  padding: 9px 10px;
  border: 1.5px solid #94a3b8;
  border-radius: 10px;
  color: var(--ink);
  background: #fff;
  box-shadow: var(--shadow-sm);
  text-align: left;
}
.scenario-map-node:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.scenario-map-node > span { grid-row: 1 / 3; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: #f1f5f9; }
.scenario-map-node .icon { width: 17px; height: 17px; }
.scenario-map-node strong { overflow: hidden; display: -webkit-box; color: var(--navy); font-size: .7rem; line-height: 1.25; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.scenario-map-node small { color: var(--muted); font-size: .61rem; font-weight: 700; }
.scenario-map-node.failed { color: #fff; border-color: #7f1d1d; background: #991b1b; }
.scenario-map-node.failed strong,
.scenario-map-node.failed small { color: #fff; }
.scenario-map-node.failed > span { background: rgba(255,255,255,.16); }
.scenario-map-node.stopped { color: #b42318; border-color: #ef4444; background: #fff5f4; }
.scenario-map-node.degraded { color: #b54708; border-color: #f59e0b; background: #fffaf3; }
.scenario-map-node.protected { color: #027a48; border-color: #22c55e; background: #f5fcf8; }
.scenario-map-node.unknown { color: #64748b; border-color: #94a3b8; border-style: dashed; background: #f8fafc; }
.scenario-map-node.on-path { box-shadow: 0 0 0 3px rgba(36,84,230,.18), var(--shadow-md); }
.scenario-map-node.selected { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(36,84,230,.2), var(--shadow-md); }
.scenario-result-inspector { align-self: stretch; }
.scenario-why,
.scenario-sequence,
.scenario-recommendation { padding: 17px; border-top: 1px solid var(--line); }
.scenario-result-inspector > :first-child { border-top: 0; }
.scenario-why > span,
.scenario-recommendation > span { color: var(--muted); font-size: .62rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.scenario-why h2,
.scenario-sequence h2 { margin: 5px 0 0; color: var(--navy); font-size: .95rem; }
.scenario-why p { margin: 7px 0; color: var(--muted); font-size: .7rem; line-height: 1.5; }
.scenario-why > div { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.scenario-why em { padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: #f8fafc; font-size: .61rem; font-style: normal; }
.scenario-why > div .icon { width: 12px; height: 12px; color: var(--muted); }
.scenario-sequence ol { margin: 13px 0 0; padding: 0; list-style: none; }
.scenario-sequence li { position: relative; display: grid; grid-template-columns: 25px 1fr; gap: 9px; padding: 0 0 17px; }
.scenario-sequence li::before { content: ""; position: absolute; left: 12px; top: 24px; bottom: 0; width: 1px; background: #fca5a5; }
.scenario-sequence li:last-child { padding-bottom: 0; }
.scenario-sequence li:last-child::before { display: none; }
.scenario-sequence li > span { width: 25px; height: 25px; display: grid; place-items: center; z-index: 1; border-radius: 50%; color: #fff; background: #dc2626; font-size: .68rem; font-weight: 850; }
.scenario-sequence li.degraded > span { background: #f59e0b; }
.scenario-sequence li.unknown > span { background: #94a3b8; }
.scenario-sequence li strong { display: block; color: var(--navy); font-size: .71rem; line-height: 1.35; }
.scenario-sequence li small { display: block; margin-top: 3px; color: var(--red); font-size: .63rem; }
.scenario-sequence li.degraded small { color: var(--amber); }
.scenario-sequence li.unknown small { color: var(--muted); }
.scenario-recommendation { background: #fbfcff; }
.scenario-recommendation > strong { display: block; margin-top: 7px; color: var(--navy); font-size: .84rem; line-height: 1.45; }
.scenario-recommendation p { margin: 10px 0; color: var(--muted); font-size: .69rem; }
.scenario-recommendation p b { color: var(--green); }
.scenario-recommendation .button { width: 100%; }
.scenario-control-test {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(280px, .8fr) auto;
  align-items: end;
  gap: 18px;
  margin-top: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  scroll-margin-top: 90px;
}
.scenario-control-test h2 { margin: 0; color: var(--navy); font-size: 1rem; }
.scenario-control-test p { margin: 5px 0 0; color: var(--muted); font-size: .72rem; }
.scenario-control-test label { display: grid; gap: 6px; }
.scenario-control-test label span { color: var(--navy); font-size: .68rem; font-weight: 800; }
.scenario-control-test select { min-height: 43px; padding-block: 9px; font-size: .76rem; }
.scenario-comparison-result {
  display: grid;
  grid-template-columns: minmax(260px, .8fr) minmax(420px, 1.3fr) 150px;
  align-items: center;
  gap: 18px;
  margin-top: 12px;
  padding: 18px;
  border: 1px solid #b8c8ff;
  border-radius: 12px;
  background: #f7f9ff;
  scroll-margin-top: 90px;
}
.scenario-comparison-result > div:first-child { display: grid; gap: 3px; }
.scenario-comparison-result > div:first-child span { color: var(--blue); font-size: .63rem; font-weight: 850; text-transform: uppercase; letter-spacing: .07em; }
.scenario-comparison-result > div:first-child strong { color: var(--navy); font-size: .9rem; }
.scenario-comparison-result > div:first-child p { margin: 2px 0 0; color: var(--muted); font-size: .66rem; line-height: 1.4; }
.scenario-comparison-result table { width: 100%; border-collapse: collapse; background: #fff; }
.scenario-comparison-result th,
.scenario-comparison-result td { padding: 7px 8px; border: 1px solid var(--line); font-size: .67rem; text-align: center; }
.scenario-comparison-result th { color: #fff; background: var(--navy); }
.scenario-comparison-result th:first-child,
.scenario-comparison-result td:first-child { text-align: left; }
.scenario-comparison-gain { display: grid; justify-items: center; gap: 4px; color: var(--green); text-align: center; }
.scenario-comparison-gain strong { font-size: 2rem; line-height: 1; }
.scenario-comparison-gain span { color: var(--navy); font-size: .66rem; font-weight: 800; }
@media (max-width: 1420px) {
  .scenario-workspace { grid-template-columns: 220px minmax(620px, 1fr) 300px; }
  .scenario-workspace.result { grid-template-columns: 220px minmax(0, 1fr); }
  .scenario-result-body { grid-template-columns: minmax(540px,1fr) 300px; }
  .scenario-summary-grid span { font-size: .61rem; }
}
@media (max-width: 1160px) {
  .scenario-workspace { grid-template-columns: 210px minmax(0,1fr); overflow: visible; }
  .scenario-guide { grid-column: 2; border-top: 1px solid var(--line); border-left: 0; }
  .scenario-guide ul { grid-template-columns: repeat(2,1fr); column-gap: 20px; }
  .scenario-preview-map { max-width: 520px; }
  .scenario-result-body { grid-template-columns: 1fr; }
  .scenario-result-inspector { display: grid; grid-template-columns: 1fr 1fr; }
  .scenario-recommendation { grid-column: 1 / -1; }
  .scenario-control-test { grid-template-columns: 1fr minmax(280px,1fr); }
  .scenario-control-test .button { grid-column: 2; }
  .scenario-comparison-result { grid-template-columns: 1fr 1.5fr; }
  .scenario-comparison-gain { grid-column: 1 / -1; grid-template-columns: auto auto; justify-content: center; align-items: baseline; }
}
@media (max-width: 860px) {
  .scenario-studio-page { width: min(100% - 12px, 1880px); }
  .scenario-workspace,
  .scenario-workspace.result { grid-template-columns: 1fr; }
  .scenario-rail {
    position: sticky;
    top: 68px;
    z-index: 15;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
  }
  .scenario-rail-title,
  .scenario-rail-list,
  .scenario-current > span { display: none; }
  .scenario-rail nav { display: flex; flex: 0 0 auto; padding: 0 8px 0 0; border: 0; border-right: 1px solid var(--line); }
  .scenario-rail nav button { width: auto; min-width: max-content; }
  .scenario-current { display: flex; align-items: center; flex: 0 0 auto; gap: 8px; margin: 0; padding: 0; border: 0; }
  .scenario-current > strong { max-width: 190px; overflow: hidden; font-size: .75rem; text-overflow: ellipsis; white-space: nowrap; }
  .scenario-current > div { display: flex; gap: 5px; }
  .scenario-current em { padding: 5px 7px; }
  .scenario-current .button { width: auto; min-width: max-content; margin: 0; }
  .scenario-guide { grid-column: 1; }
  .scenario-summary-grid { grid-template-columns: repeat(3,1fr); }
  .scenario-summary-grid article:nth-child(4) { border-left: 0; }
  .scenario-summary-grid article:nth-child(n+4) { border-top: 1px solid var(--line); }
}
@media (max-width: 620px) {
  .scenario-studio-header #scenario-download-link,
  .scenario-studio-header .button.ghost { display: none; }
  .scenario-studio-header { padding-inline: 12px; }
  .scenario-studio-header .brand small { display: none; }
  .scenario-studio-page { padding-top: 6px; }
  .scenario-rail nav button span { display: none; }
  .scenario-current > strong,
  .scenario-current > div { display: none; }
  .scenario-current .button:first-of-type { display: none; }
  .scenario-setup,
  .scenario-results { padding: 20px 12px 28px; }
  .scenario-setup > header { margin-inline: 2px; }
  .scenario-setup > header h1,
  .scenario-result-header h1 { font-size: 1.45rem; }
  .scenario-chooser { grid-template-columns: 1fr; padding-inline: 12px; }
  .scenario-selection { padding: 15px 0 0; border-top: 1px solid var(--line); border-left: 0; }
  .scenario-category-filters { grid-template-columns: repeat(2,1fr); }
  .scenario-dependency-row { grid-template-columns: 24px minmax(120px,1fr) auto; }
  .scenario-dependency-row small { display: none; }
  .scenario-dependency-row em { max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .scenario-assumptions { grid-template-columns: 1fr; gap: 16px; padding-inline: 12px; }
  .scenario-assumptions fieldset { grid-template-columns: 1fr; }
  .scenario-assumptions fieldset:last-child { grid-template-columns: 1fr; }
  .scenario-run-step > p { margin-left: 12px; }
  .scenario-run-step > .button { width: calc(100% - 24px); margin-left: 12px; }
  .scenario-guide { padding: 22px 16px; }
  .scenario-guide ul { grid-template-columns: 1fr; }
  .scenario-result-header { align-items: stretch; flex-direction: column; }
  .scenario-result-header > span { align-self: flex-start; }
  .scenario-summary-grid { grid-template-columns: repeat(2,1fr); }
  .scenario-summary-grid article:nth-child(3),
  .scenario-summary-grid article:nth-child(5) { border-left: 0; }
  .scenario-summary-grid article:nth-child(n+3) { border-top: 1px solid var(--line); }
  .scenario-summary-grid article:nth-child(4) { border-left: 1px solid var(--line); }
  .scenario-result-map-toolbar { align-items: flex-start; flex-direction: column; }
  .scenario-result-map-scroll { min-height: 430px; }
  .scenario-result-inspector { grid-template-columns: 1fr; }
  .scenario-recommendation { grid-column: auto; }
  .scenario-control-test { grid-template-columns: 1fr; }
  .scenario-control-test .button { grid-column: auto; width: 100%; }
  .scenario-comparison-result { grid-template-columns: 1fr; }
  .scenario-comparison-result table { min-width: 0; }
  .scenario-comparison-gain { grid-column: auto; }
}

.demo-read-only-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px 16px;
  border: 1px solid #b9c8e6;
  border-radius: 12px;
  color: var(--color-brand-700);
  background: var(--color-brand-100);
  font-size: .82rem;
}
.demo-read-only-banner span { color: var(--color-ink-600); }
.demo-read-only-banner a { margin-left: auto; color: var(--color-brand-700); font-weight: 760; }
.read-only-demo #download-research,
.read-only-demo .feedback-box,
.read-only-demo .validation-panel,
.read-only-demo .debrief-section,
.read-only-demo .export-callout,
.read-only-demo .report-nav a[href="#report-feedback"] { display: none !important; }
.read-only-demo .site-footer { display: none; }
@media (max-width: 700px) {
  .demo-read-only-banner { align-items: flex-start; flex-direction: column; }
  .demo-read-only-banner a { margin-left: 0; }
}

.score-method-note { margin: -5px 0 18px; color: #c2d0e5; font-size: .82rem; line-height: 1.55; }
.score-card-explanation { grid-column: 1 / -1; margin-top: 5px; color: #c2d0e5; font-size: .7rem; }
.score-card-explanation summary { cursor: pointer; color: #dce6f7; font-weight: 800; }
.score-card-explanation p { margin: 8px 0; color: #aebed4; line-height: 1.45; }
.score-card-explanation dl { display: grid; gap: 7px; margin: 0; }
.score-card-explanation dl div { display: grid; gap: 2px; }
.score-card-explanation dt { color: #fff; font-weight: 800; }
.score-card-explanation dd { margin: 0; color: #aebed4; line-height: 1.45; }
.roadmap-card.working-summary { display: flex; flex-direction: column; }
.roadmap-card.working-summary > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.roadmap-card.working-summary > div:first-child > span { color: var(--muted); font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }

/* v0.7 Sprint 3: reveal and working roadmap */
.reveal-body { background: var(--color-canvas); }
.reveal-header { box-shadow: var(--shadow-sm); }
.reveal-page { width: min(1400px, 94vw); margin: 0 auto; padding: 42px 0 80px; }
.reveal-intro { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 18px; }
.reveal-intro > div { display: grid; gap: 4px; }
.reveal-intro > div p { margin: 0; color: var(--navy); font-size: var(--text-lg); font-weight: 800; }
.reveal-intro > p { max-width: 490px; margin: 0; color: var(--muted); font-size: var(--text-sm); text-align: right; }
.reveal-panel { overflow: hidden; padding: clamp(28px, 4vw, 56px); border-radius: var(--radius-xl); color: #fff; background: var(--navy); box-shadow: var(--shadow-lg); }
.reveal-panel-heading { max-width: 1050px; }
.reveal-panel-heading > span,
.reveal-finding-grid article > span,
.reveal-evidence > div > span,
.first-action-panel > div:first-child > span { display: block; color: #9eb4d4; font-size: .72rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.reveal-panel-heading h1 { margin: 13px 0 35px; color: #fff; font-size: clamp(2.1rem, 4.1vw, 4.15rem); letter-spacing: -.055em; line-height: 1.03; }
.reveal-finding-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) minmax(230px, .58fr); border-block: 1px solid rgba(255,255,255,.15); }
.reveal-finding-grid article { min-width: 0; padding: 30px 30px 30px 0; }
.reveal-finding-grid article + article { padding-left: 30px; border-left: 1px solid rgba(255,255,255,.15); }
.reveal-finding-grid h2 { margin: 12px 0 0; color: #fff; font-size: clamp(1.3rem, 2.1vw, 2rem); letter-spacing: -.025em; line-height: 1.3; }
.reveal-finding-grid p { margin: 12px 0 0; color: #d8e1ee; line-height: 1.7; }
.reveal-score > div { display: flex; align-items: baseline; margin-top: 10px; }
.reveal-score > div > strong { font-size: clamp(3.2rem, 6vw, 5.2rem); letter-spacing: -.07em; line-height: 1; }
.reveal-score > div > small { margin-left: 5px; color: #9eb4d4; }
.reveal-score > b { display: block; margin-top: 6px; color: #c5d4ea; font-size: .82rem; }
.reveal-score-explanation p { margin-top: 14px; color: #aebed4; font-size: .72rem; line-height: 1.5; }
.reveal-score-explanation details { margin-top: 10px; color: #c8d5e8; font-size: .72rem; }
.reveal-score-explanation summary { cursor: pointer; font-weight: 800; }
.reveal-score-explanation dl { display: grid; gap: 10px; margin: 12px 0 0; }
.reveal-score-explanation dl div { display: grid; gap: 3px; }
.reveal-score-explanation dt { color: #fff; font-weight: 800; }
.reveal-score-explanation dd { margin: 0; color: #aebed4; line-height: 1.45; }
.reveal-evidence { display: flex; align-items: end; justify-content: space-between; gap: 36px; padding: 30px 0 0; }
.reveal-evidence > div { min-width: 0; }
.reveal-evidence > a { display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; padding-bottom: 3px; color: #b9caff; font-size: .82rem; font-weight: 800; }
.reveal-evidence-list { display: grid; gap: 9px; max-width: 900px; margin: 14px 0 0; padding: 0; list-style: none; }
.reveal-evidence-list li { display: flex; align-items: flex-start; gap: 9px; color: #d8e1ee; font-size: .87rem; line-height: 1.5; }
.reveal-evidence-list .icon { width: 17px; flex: 0 0 17px; margin-top: 2px; color: #73d8a9; }
.reveal-empty-copy { color: #aebed4; }
.first-action-panel { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 34px; margin-top: 38px; padding: 25px 26px; border-radius: var(--radius-lg); color: var(--ink); background: #fff; }
.first-action-panel h2 { margin: 7px 0 6px; color: var(--navy); font-size: clamp(1.15rem, 1.7vw, 1.5rem); letter-spacing: -.02em; line-height: 1.3; }
.first-action-panel p { margin: 0; color: var(--muted); font-size: .78rem; }
.first-action-meta { display: grid; gap: 5px; min-width: 150px; color: var(--muted); font-size: .74rem; }
.first-action-status,
.roadmap-status { width: max-content; padding: 4px 8px; border-radius: var(--radius-pill); color: var(--muted); background: #edf1f6; font-size: .68rem; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.first-action-status.status-in_progress,
.roadmap-status.status-in_progress { color: var(--color-brand-700); background: var(--blue-soft); }
.first-action-status.status-blocked,
.roadmap-status.status-blocked { color: var(--amber); background: var(--amber-soft); }
.first-action-status.status-completed,
.roadmap-status.status-completed { color: var(--green); background: var(--green-soft); }
.first-action-controls .button { min-width: 190px; }
.working-roadmap { margin-top: 28px; padding: clamp(24px, 3vw, 38px); border: 1px solid var(--line); border-radius: var(--radius-xl); background: #fff; box-shadow: var(--shadow-md); }
.working-roadmap-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; }
.working-roadmap-heading h2 { margin: 7px 0 5px; color: var(--navy); font-size: var(--text-2xl); letter-spacing: -.035em; }
.working-roadmap-heading p { max-width: 680px; margin: 0; color: var(--muted); }
.working-roadmap-heading > div:last-child { display: flex; align-items: center; gap: 14px; }
#roadmap-save-status { min-width: 42px; color: var(--green); font-size: .76rem; font-weight: 800; }
.roadmap-horizon-tabs { display: flex; gap: 6px; margin-top: 28px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.roadmap-horizon-tabs button { display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; border: 0; border-radius: var(--radius-sm); color: var(--muted); background: transparent; font-size: .83rem; font-weight: 800; }
.roadmap-horizon-tabs button:hover { background: var(--soft); }
.roadmap-horizon-tabs button.active { color: #fff; background: var(--navy); }
.roadmap-horizon-tabs button span { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; color: inherit; background: rgba(127,145,172,.16); font-size: .66rem; }
.working-roadmap-columns,
.working-roadmap-row { display: grid; grid-template-columns: 145px minmax(330px, 1fr) 190px 160px 130px; gap: 18px; }
.working-roadmap-columns { padding: 14px 14px 9px; color: var(--muted); font-size: .68rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.working-roadmap-row { align-items: start; padding: 20px 14px; border-top: 1px solid var(--line); }
.working-roadmap-row.status-completed { background: #fbfdfc; }
.working-roadmap-row select,
.working-roadmap-row input,
.working-roadmap-row textarea { width: 100%; padding: 9px 10px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); color: var(--ink); background: #fff; font-size: .78rem; }
.working-roadmap-row select:focus,
.working-roadmap-row input:focus,
.working-roadmap-row textarea:focus { outline: 0; border-color: var(--blue); box-shadow: var(--shadow-focus); }
.roadmap-row-action { min-width: 0; }
.roadmap-row-action > span { color: var(--blue-dark); font-size: .68rem; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.roadmap-row-action h3 { margin: 5px 0 7px; color: var(--navy); font-size: .93rem; line-height: 1.45; }
.roadmap-row-action details { color: var(--muted); font-size: .76rem; }
.roadmap-row-action details summary { width: max-content; cursor: pointer; font-weight: 750; }
.roadmap-row-action details p { max-width: 680px; margin: 8px 0 12px; }
.roadmap-row-action details label { display: grid; gap: 6px; margin: 10px 0; color: var(--ink); font-weight: 750; }
.roadmap-row-action details .button { margin-top: 3px; }
.roadmap-row-owner > span,
.roadmap-row-date time { display: block; padding-top: 8px; color: var(--muted); font-size: .78rem; }
.roadmap-row-evidence a { display: inline-flex; padding-top: 8px; color: var(--blue-dark); font-size: .76rem; font-weight: 800; }

@media (max-width: 1120px) {
  .reveal-finding-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reveal-score { grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,.15); border-left: 0 !important; }
  .reveal-score-explanation { max-width: 680px; }
  .first-action-panel { grid-template-columns: minmax(0, 1fr) auto; }
  .first-action-controls { grid-column: 1 / -1; }
  .first-action-controls .button { width: 100%; }
  .working-roadmap-columns { display: none; }
  .working-roadmap-row { grid-template-columns: 150px minmax(280px, 1fr) 180px; }
  .roadmap-row-date,
  .roadmap-row-evidence { grid-column: 2; }
}
@media (max-width: 760px) {
  .reveal-header .brand small { display: none; }
  .reveal-header { padding-inline: 18px; }
  .reveal-page { width: min(94vw, 680px); padding-top: 24px; }
  .reveal-intro { align-items: flex-start; flex-direction: column; gap: 10px; }
  .reveal-intro > p { text-align: left; }
  .reveal-panel { padding: 25px 20px; border-radius: var(--radius-lg); }
  .reveal-panel-heading h1 { margin-bottom: 24px; }
  .reveal-finding-grid { grid-template-columns: 1fr; }
  .reveal-finding-grid article,
  .reveal-finding-grid article + article { padding: 22px 0; border-top: 1px solid rgba(255,255,255,.15); border-left: 0; }
  .reveal-finding-grid article:first-child { border-top: 0; }
  .reveal-score { grid-column: auto; }
  .reveal-evidence { align-items: flex-start; flex-direction: column; gap: 18px; }
  .first-action-panel { grid-template-columns: 1fr; gap: 17px; margin-top: 28px; padding: 21px; }
  .first-action-controls { grid-column: auto; }
  .working-roadmap { padding: 22px 16px; border-radius: var(--radius-lg); }
  .working-roadmap-heading { align-items: flex-start; flex-direction: column; gap: 17px; }
  .roadmap-horizon-tabs { overflow-x: auto; }
  .roadmap-horizon-tabs button { min-width: max-content; }
  .working-roadmap-row { grid-template-columns: 1fr; gap: 12px; padding-inline: 4px; }
  .roadmap-row-date,
  .roadmap-row-evidence { grid-column: auto; }
  .roadmap-row-owner::before,
  .roadmap-row-date::before,
  .roadmap-row-evidence::before { display: block; margin-bottom: 4px; color: var(--muted); font-size: .64rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
  .roadmap-row-owner::before { content: "Owner"; }
  .roadmap-row-date::before { content: "Target"; }
  .roadmap-row-evidence::before { content: "Evidence"; }
}
@media (max-width: 520px) {
  .reveal-header .header-actions .button.ghost { display: none; }
  .reveal-panel-heading h1 { font-size: 2rem; }
  .working-roadmap-heading > div:last-child { align-items: flex-start; flex-direction: column; }
}


/* v0.8 Sprint 4: progressive insight interruptions */
.progressive-insight-card {
  position: relative;
  overflow: hidden;
  border-color: color-mix(in srgb, var(--color-brand-600) 34%, var(--color-line));
  box-shadow: 0 24px 60px rgba(16, 28, 48, .12);
}

.progressive-insight-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--color-brand-600);
}

.insight-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.insight-kicker {
  color: var(--color-brand-700);
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.insight-type,
.insight-confidence {
  color: var(--color-ink-600);
  font-size: var(--text-sm);
}

.insight-type {
  padding: 6px 10px;
  border: 1px solid var(--color-line);
  border-radius: 999px;
  background: var(--color-surface-subtle);
  font-weight: 700;
}

.insight-confidence {
  margin-bottom: var(--space-3);
}

.insight-observation {
  color: var(--color-ink-800);
  font-size: var(--text-lg);
  line-height: 1.65;
}

.insight-why {
  margin-top: var(--space-8);
  padding: var(--space-5);
  border-radius: var(--radius-md);
  background: var(--color-brand-100);
}

.insight-why strong {
  color: var(--color-brand-700);
}

.insight-why p {
  margin: var(--space-2) 0 0;
}

.insight-actions {
  justify-content: flex-end;
}

@media (max-width: 520px) {
  .insight-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .insight-type {
    white-space: normal;
  }
}


/* v0.8 Sprint 5: assessment stages and milestone momentum */
.assessment-stage-rail {
  margin: 0 0 22px;
  color: #615d54;
}

.stage-rail-summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 11px;
  font-size: .78rem;
}

.stage-rail-summary strong {
  color: #123f7c;
}

.assessment-stage-rail ol {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.assessment-stage-rail li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding-right: 8px;
  color: #918a80;
  font-size: .68rem;
  font-weight: 700;
}

.assessment-stage-rail li::after {
  content: "";
  position: absolute;
  z-index: 0;
  top: 13px;
  right: 0;
  left: 27px;
  height: 2px;
  background: #ded5c5;
}

.assessment-stage-rail li:last-child::after {
  display: none;
}

.stage-number {
  position: relative;
  z-index: 1;
  display: grid;
  flex: 0 0 27px;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 1px solid #d6cdbc;
  border-radius: 50%;
  background: #fbf7ec;
  font-size: .7rem;
}

.stage-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assessment-stage-rail .stage-complete {
  color: #315f4b;
}

.assessment-stage-rail .stage-complete .stage-number {
  border-color: #6e9c84;
  color: #fff;
  background: #497a63;
}

.assessment-stage-rail .stage-complete::after {
  background: #6e9c84;
}

.assessment-stage-rail .stage-current {
  color: #123f7c;
}

.assessment-stage-rail .stage-current .stage-number {
  border-color: #123f7c;
  color: #fff;
  background: #123f7c;
  box-shadow: 0 0 0 4px rgba(18,63,124,.11);
}

.milestone-card {
  padding: clamp(38px, 7vw, 68px);
  border: 1px solid #d5cbb9;
  border-radius: 13px;
  background: #fffdf7;
  box-shadow: 0 24px 70px rgba(54,45,31,.10);
  text-align: center;
}

.milestone-check {
  display: grid;
  width: 48px;
  height: 48px;
  margin: 0 auto 22px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #497a63;
  font-size: 1.35rem;
  font-weight: 900;
}

.milestone-card h1 {
  margin: 0 0 14px;
  color: #173f70;
  font-size: clamp(1.85rem, 4vw, 2.65rem);
  letter-spacing: -.035em;
}

.milestone-summary {
  max-width: 660px;
  margin: 0 auto;
  color: #5f5a52;
  font-size: 1.05rem;
  line-height: 1.65;
}

.milestone-next {
  display: grid;
  gap: 7px;
  max-width: 620px;
  margin: 30px auto 0;
  padding: 20px;
  border-radius: 9px;
  color: #304867;
  background: #eef3f8;
}

.milestone-next strong {
  color: #123f7c;
}

.milestone-next span {
  color: #69645c;
  font-size: .84rem;
}

.milestone-actions {
  justify-content: center;
  margin-top: 28px;
}

@media (max-width: 700px) {
  .stage-rail-summary strong::after {
    content: "";
  }

  .assessment-stage-rail li {
    justify-content: center;
    padding: 0;
  }

  .assessment-stage-rail li::after {
    right: -1px;
    left: calc(50% + 14px);
  }

  .stage-title {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .milestone-card {
    padding: 34px 22px;
  }
}


/* v0.8 Sprint 8: final reveal payoff hierarchy */
.payoff-summary {
  width: min(1180px, calc(100% - 40px));
  margin: 36px auto 0;
  padding: clamp(44px, 7vw, 82px);
  border: 1px solid #e1ddd2;
  background: #fbf7ec;
}

.payoff-business-name {
  margin: 0 0 12px;
  color: #536174;
  font-size: .82rem;
  font-weight: 750;
}

.payoff-summary > h1 {
  max-width: 900px;
  margin: 0;
  color: #111216;
  font-size: clamp(2.8rem, 6vw, 5.1rem);
  line-height: 1;
  letter-spacing: -.055em;
}

.payoff-overall,
.payoff-priorities,
.payoff-glance {
  margin-top: clamp(34px, 5vw, 54px);
}

.payoff-overall > span,
.payoff-priorities > span,
.payoff-glance > span {
  display: block;
  margin-bottom: 12px;
  color: #123f7c;
  font-size: .72rem;
  font-weight: 820;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.payoff-overall p {
  max-width: 980px;
  margin: 0;
  color: #162033;
  font-size: clamp(1.45rem, 3vw, 2.35rem);
  line-height: 1.28;
  letter-spacing: -.025em;
}

.payoff-priority-list {
  border-top: 1px solid #d8d4ca;
}

.payoff-priority {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid #d8d4ca;
}

.payoff-priority-number {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #123f7c;
  background: #e8eef6;
  font-weight: 820;
}

.payoff-priority h2 {
  margin: 0;
  color: #111216;
  font-size: 1.15rem;
  letter-spacing: -.015em;
}

.payoff-priority p {
  max-width: 760px;
  margin: 5px 0 0;
  color: #5c6879;
  font-size: .88rem;
  line-height: 1.45;
}

.payoff-priority-severity {
  color: #536174;
  font-size: .74rem;
  font-weight: 780;
}

.payoff-priority-severity.critical,
.payoff-priority-severity.high {
  color: #9d2f25;
}

.payoff-glance-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border: 1px solid #d8d4ca;
  background: #fffdf7;
}

.payoff-glance-grid > div {
  display: grid;
  gap: 3px;
  padding: 18px 22px;
  border-left: 1px solid #d8d4ca;
}

.payoff-glance-grid > div:first-child {
  border-left: 0;
}

.payoff-glance-grid span {
  color: #536174;
  font-size: .76rem;
  font-weight: 720;
}

.payoff-glance-grid strong {
  color: #123f7c;
  font-size: 1.65rem;
  line-height: 1;
}

.payoff-glance-grid small {
  color: #687386;
  font-size: .72rem;
}

.payoff-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
}

.payoff-actions .button {
  min-width: 210px;
}

.payoff-evidence {
  margin-top: 30px;
}

.payoff-evidence .reveal-panel-heading h2 {
  margin: 5px 0 0;
  color: #f4f7fb;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.08;
  letter-spacing: -.035em;
}

.report-payoff {
  padding: clamp(34px, 5vw, 62px);
  border: 1px solid #e1ddd2;
  background: #fbf7ec;
}

.report-payoff h1 {
  margin: 0;
  color: #111216;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 1;
  letter-spacing: -.05em;
}

.report-payoff-meta {
  margin: 12px 0 0;
  color: #687386;
  font-size: .84rem;
}

.report-payoff .payoff-overall p {
  font-size: clamp(1.35rem, 2.6vw, 2rem);
}

.report-detail-intro {
  margin: 36px 0 0;
  padding-top: 30px;
  border-top: 1px solid var(--color-line);
}

.report-detail-intro h2 {
  margin: 5px 0 0;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  letter-spacing: -.035em;
}

@media (max-width: 760px) {
  .payoff-summary {
    width: calc(100% - 24px);
    margin-top: 16px;
    padding: 38px 22px;
  }

  .payoff-priority {
    grid-template-columns: 40px minmax(0, 1fr);
    align-items: start;
    gap: 14px;
  }

  .payoff-priority-severity {
    grid-column: 2;
  }

  .payoff-glance-grid {
    grid-template-columns: 1fr;
  }

  .payoff-glance-grid > div,
  .payoff-glance-grid > div:first-child {
    grid-template-columns: 110px 48px minmax(0, 1fr);
    align-items: baseline;
    border: 0;
    border-top: 1px solid #d8d4ca;
  }

  .payoff-glance-grid > div:first-child {
    border-top: 0;
  }

  .payoff-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .payoff-actions .button {
    width: 100%;
  }
}


/* v0.8 Sprint 9: evidence-based scenario discovery */
.scenario-discovery {
  width: min(1180px, calc(100% - 40px));
  margin: 18px auto 0;
  padding: clamp(32px, 5vw, 54px);
  border: 1px solid #d9e0ec;
  background: #fff;
  box-shadow: 0 12px 36px rgba(20,34,56,.045);
}
.scenario-discovery-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  padding-bottom: 24px;
}
.scenario-discovery-heading h2 {
  margin: 5px 0 8px;
  color: #111216;
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  letter-spacing: -.045em;
}
.scenario-discovery-heading p { max-width: 720px; margin: 0; color: #536174; line-height: 1.6; }
.scenario-discovery-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  color: #607089;
  font-size: .78rem;
}
.scenario-discovery-note .icon { width: 18px; height: 18px; color: var(--blue); }
.scenario-discovery-list { border-top: 1px solid #dfe4ec; }
.scenario-discovery-list > a {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 15px 4px;
  border-bottom: 1px solid #dfe4ec;
  color: var(--navy);
  transition: color .15s ease, padding .15s ease, background .15s ease;
}
.scenario-discovery-list > a:hover { padding-inline: 12px; color: var(--blue-dark); background: #f8faff; }
.scenario-discovery-list > a > span { display: grid; gap: 4px; }
.scenario-discovery-list small { color: #68778d; font-size: .7rem; font-weight: 780; letter-spacing: .08em; text-transform: uppercase; }
.scenario-discovery-list strong { font-size: 1.05rem; line-height: 1.35; }
.scenario-discovery-list .icon,
.scenario-discovery-all .icon { width: 18px; height: 18px; flex: 0 0 auto; color: var(--blue); }
.scenario-discovery-all { display: inline-flex; align-items: center; gap: 8px; margin-top: 20px; color: var(--blue-dark); font-size: .88rem; font-weight: 800; }
@media (max-width: 760px) {
  .scenario-discovery { width: calc(100% - 24px); padding: 32px 22px; }
  .scenario-discovery-heading { display: grid; gap: 14px; }
  .scenario-discovery-note { order: -1; }
  .scenario-discovery-list > a { min-height: 70px; }
}


/* v0.8: lightweight post-results advisor interest signal */
.advisor-interest {
  width: min(1180px, calc(100% - 40px));
  margin: 28px auto 56px;
  padding: clamp(38px, 6vw, 68px);
  border-radius: var(--radius-xl);
  color: #fff;
  background: var(--navy);
  box-shadow: var(--shadow-md);
}

.advisor-interest .eyebrow {
  color: #a9c8f5;
}

.advisor-interest h2 {
  max-width: 760px;
  margin: 10px 0 14px;
  color: #fff;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: -.04em;
}

.advisor-interest > p {
  max-width: 820px;
  margin: 0;
  color: #d7e1ef;
  font-size: 1rem;
  line-height: 1.7;
}

.advisor-interest-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
}

.advisor-interest-options .button {
  min-width: 0;
  min-height: 74px;
  justify-content: space-between;
  padding: 15px 18px;
  border-color: rgba(255,255,255,.26);
  color: #fff;
  background: rgba(255,255,255,.08);
  text-align: left;
  line-height: 1.35;
  overflow-wrap: anywhere;
  white-space: normal;
}

.advisor-interest-options .button:hover {
  border-color: #fff;
  background: rgba(255,255,255,.15);
}

.advisor-interest-options .button.selected,
.advisor-interest-options .button:disabled {
  border-color: #9fc8ae;
  color: #fff;
  background: #315f4b;
  opacity: 1;
}

#advisor-interest-status {
  display: block;
  min-height: 1.3em;
  margin-top: 16px;
  color: #d7e1ef;
  font-size: .84rem;
  font-weight: 750;
}

@media (max-width: 760px) {
  .advisor-interest {
    width: calc(100% - 24px);
    margin-bottom: 30px;
    padding: 34px 22px;
    border-radius: var(--radius-lg);
  }

  .advisor-interest-options {
    grid-template-columns: 1fr;
  }

  .advisor-interest-options .button {
    width: 100%;
  }
}
