@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Manrope:wght@600;700;800&display=swap");

:root {
  --bg: #f6f8fb;
  --panel: #ffffff;
  --panel-soft: #fbfcfe;
  --ink: #14171a;
  --text: #313942;
  --muted: #697480;
  --faint: #8c96a3;
  --line: #dfe5ec;
  --line-soft: #edf1f5;
  --blue: #004dea;
  --blue-strong: #003ec4;
  --blue-soft: #eef4ff;
  --green: #1f7a4d;
  --green-soft: #eef8f2;
  --amber: #9b6200;
  --amber-soft: #fff7e8;
  --red: #b42318;
  --red-soft: #fff1f0;
  --unit-01-accent: #6d5acd;
  --unit-02-accent: #c4843a;
  --unit-03-accent: #2b8a8a;
  --unit-04-accent: #cc6a5a;
  --unit-05-accent: #3d8b5a;
  --ai-accent: #f5c000;
  --ai-accent-hover: #ffd633;
  --ai-accent-strong: #d4a017;
  --ai-accent-soft: #fff4c2;
  --ai-accent-tint: #fffdf7;
  --ai-accent-bg: rgba(245, 192, 0, 0.10);
  --ai-accent-border: #c9a000;
  --ai-accent-text: #14171a;
  --sidebar: 240px;
  --topbar: 64px;
  --radius-control: 4px;
  --radius-panel: 6px;
  --shadow-line: 0 1px 2px rgba(20, 23, 26, 0.04);
  --shadow-card: 0 4px 14px rgba(15, 23, 42, 0.07), 0 1px 3px rgba(15, 23, 42, 0.04);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--ink);
  font-family: "Manrope", Arial, sans-serif;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  width: var(--sidebar);
  border-right: 1px solid var(--line);
  background: #edf0f3;
  display: flex;
  flex-direction: column;
}

.brand {
  padding: 24px 22px 22px;
  border-bottom: 1px solid var(--line-soft);
}

.brand-lockup {
  display: flex;
  gap: 11px;
  align-items: center;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-control);
  background: var(--blue);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: "Manrope", Arial, sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-title {
  color: var(--ink);
  font-family: "Manrope", Arial, sans-serif;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.1;
}

.brand-subtitle,
.meta-label,
.eyebrow,
.field-label,
.table-head,
.small-caps {
  color: var(--faint);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.brand-subtitle {
  margin-top: 4px;
}

.side-section {
  padding: 18px 14px;
}

.side-section + .side-section {
  border-top: 1px solid var(--line-soft);
}

.side-title {
  padding: 0 8px 10px;
}

.nav-list {
  display: grid;
  gap: 2px;
}

.nav-item {
  min-height: 38px;
  border-left: 2px solid transparent;
  border-radius: 0 var(--radius-control) var(--radius-control) 0;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px 9px 10px;
  font-weight: 600;
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
}

button.nav-item {
  width: 100%;
  border-top: 0;
  border-right: 0;
  border-bottom: 0;
  font-family: inherit;
  font-size: 14px;
  text-align: left;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.6);
  color: var(--ink);
}

.nav-item.is-active {
  border-left-color: var(--blue);
  background: var(--panel);
  color: var(--ink);
  box-shadow: var(--shadow-line);
}

.nav-icon {
  width: 18px;
  color: var(--faint);
  font-size: 15px;
  line-height: 1;
  text-align: center;
}

.nav-item.is-active .nav-icon {
  color: var(--blue);
}

.sidebar-footer {
  margin-top: auto;
  padding: 18px 20px 22px;
  border-top: 1px solid var(--line-soft);
}

.workspace-chip {
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--panel);
  padding: 12px;
}

.workspace-chip-title {
  margin-top: 5px;
  color: var(--ink);
  font-weight: 700;
}

.workspace-chip-sub {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.topbar {
  position: fixed;
  inset: 0 0 auto var(--sidebar);
  z-index: 20;
  height: var(--topbar);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 32px;
}

.crumbs {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.crumb-current {
  color: var(--ink);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.main {
  margin-left: var(--sidebar);
  padding: calc(var(--topbar) + 34px) 36px 44px;
}

.main-inner {
  width: min(100%, 1440px);
  margin: 0 auto;
}

.page-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  margin-bottom: 28px;
}

.page-title {
  margin-top: 10px;
  max-width: 820px;
  font-size: 34px;
  line-height: 1.14;
  letter-spacing: -0.025em;
}

.page-subtitle {
  max-width: 720px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

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

.span-12 { grid-column: span 12; }
.span-8 { grid-column: span 8; }
.span-7 { grid-column: span 7; }
.span-6 { grid-column: span 6; }
.span-5 { grid-column: span 5; }
.span-4 { grid-column: span 4; }
.span-3 { grid-column: span 3; }

.module {
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: var(--radius-panel);
  background: var(--panel);
  box-shadow: var(--shadow-card);
}

.module-header {
  min-height: 56px;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
}

.module-body {
  padding: 24px;
}

.module + .module {
  margin-top: 20px;
}

.module-title {
  margin-top: 6px;
  font-size: 18px;
  line-height: 1.35;
}

.module-note {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.btn {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--panel);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.btn:hover {
  border-color: #c5ced8;
  background: #fafbfd;
}

.btn-primary {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.btn-primary:hover {
  border-color: var(--blue-strong);
  background: var(--blue-strong);
}

.btn-quiet {
  background: transparent;
}

.icon-btn {
  width: 36px;
  min-width: 36px;
  padding: 0;
  color: var(--muted);
  font-size: 15px;
}

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

.field {
  display: grid;
  gap: 7px;
}

.field-wide {
  grid-column: 1 / -1;
}

.input,
.textarea,
.select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: #f8fafc;
  color: var(--ink);
  outline: none;
  padding: 11px 12px;
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.textarea {
  min-height: 112px;
  resize: vertical;
}

.input:focus,
.textarea:focus,
.select:focus {
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0, 77, 234, 0.08);
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--line);
}

.metric {
  background: var(--panel);
  padding: 18px;
}

.metric-value {
  margin-top: 12px;
  color: var(--ink);
  font-family: "Manrope", Arial, sans-serif;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.metric-caption {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.project-list {
  display: grid;
}

.project-card {
  border-bottom: 1px solid var(--line-soft);
  background: var(--panel);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  min-height: 86px;
  padding: 18px;
  cursor: pointer;
  transition: background 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.project-card:hover {
  background: #fbfcfe;
  box-shadow: inset 2px 0 0 var(--blue), 0 8px 24px rgba(15, 23, 42, 0.10), 0 2px 6px rgba(15, 23, 42, 0.05);
  transform: translateY(-2px);
}

.project-card:last-child {
  border-bottom: 0;
}

.project-card-main {
  min-width: 0;
}

.project-card-org {
  color: var(--faint);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.project-card-title {
  margin-top: 7px;
  color: var(--ink);
  font-family: "Manrope", Arial, sans-serif;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
}

.project-card-summary {
  max-width: 720px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.section-meta {
  color: var(--faint);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-row {
  display: grid;
  grid-template-columns: minmax(230px, 1.3fr) 150px 130px 130px 92px;
  gap: 16px;
  align-items: center;
  min-height: 76px;
  border-bottom: 1px solid var(--line-soft);
  padding: 16px 18px;
}

.project-row:last-child {
  border-bottom: 0;
}

.project-name {
  color: var(--ink);
  font-family: "Manrope", Arial, sans-serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
}

.project-desc {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.status {
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
  color: var(--text);
  padding: 5px 8px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  line-height: 1;
  text-transform: uppercase;
}

.status-blue {
  border-color: #cfe0ff;
  background: var(--blue-soft);
  color: var(--blue-strong);
}

.status-green {
  border-color: #cfead9;
  background: var(--green-soft);
  color: var(--green);
}

.status-amber {
  border-color: #f4dfb7;
  background: var(--amber-soft);
  color: var(--amber);
}

.module-map {
  display: grid;
  gap: 0;
}

.module-link {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid var(--line-soft);
  padding: 15px 18px;
}

.module-link:last-child {
  border-bottom: 0;
}

.module-index {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  color: var(--muted);
  display: grid;
  place-items: center;
  font-weight: 800;
}

.module-link.is-active .module-index {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.module-link-title {
  color: var(--ink);
  font-weight: 800;
}

.module-link-sub {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.unit-output {
  color: var(--faint);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-align: right;
  text-transform: uppercase;
}

.progress-rail {
  width: 100%;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf1f5;
}

.progress-fill {
  height: 100%;
  background: var(--blue);
}

.activity-list {
  display: grid;
}

.activity-item {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 16px;
  border-bottom: 1px solid var(--line-soft);
  padding: 14px 0;
}

.activity-item:first-child {
  padding-top: 0;
}

.activity-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.activity-time {
  color: var(--faint);
  font-size: 12px;
  font-weight: 700;
}

.activity-text {
  color: var(--text);
}

.activity-text strong {
  color: var(--ink);
  font-weight: 800;
}

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

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

.vision-layout {
  align-items: start;
}

.rail-card {
  border-bottom: 1px solid var(--line-soft);
  padding: 16px 18px;
}

.rail-card:last-child {
  border-bottom: 0;
}

.rail-value {
  margin-top: 8px;
  color: var(--ink);
  font-weight: 700;
}

.state-block {
  border-left: 2px solid var(--line);
  padding-left: 13px;
}

.state-block.is-current {
  border-left-color: var(--red);
}

.state-block.is-target {
  border-left-color: var(--blue);
}

.editor {
  min-height: 420px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: #f8fafc;
  padding: 24px;
}

.editor-textarea {
  width: 100%;
  min-height: 360px;
  border: 0;
  background: transparent;
  color: var(--ink);
  outline: 0;
  resize: none;
  font-family: "Manrope", Arial, sans-serif;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.48;
}

.editor:focus-within {
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0, 77, 234, 0.08);
}

.criteria-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--line);
}

.criterion {
  background: var(--panel);
  padding: 16px;
}

.criterion-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.score {
  color: var(--blue);
  font-weight: 900;
}

.criterion-title {
  margin-top: 10px;
  color: var(--ink);
  font-weight: 800;
}

.criterion-note {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.signal-list {
  display: grid;
  gap: 10px;
}

.signal {
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: #fafbfd;
  padding: 12px;
}

.signal-title {
  color: var(--ink);
  font-weight: 800;
}

.signal-text {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.ai-panel {
  border: 1px solid #cfe0ff;
  background: linear-gradient(180deg, #fff 0%, #f7faff 100%);
}

.code-block {
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: #f8fafc;
  color: var(--text);
  padding: 14px;
  font-family: "Inter", Arial, sans-serif;
  font-size: 12px;
  line-height: 1.55;
}

.link-arrow {
  color: var(--blue);
  font-weight: 900;
}

/* Functional compatibility layer for the original platform markup. */
.save-indicator {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
  color: var(--muted);
  padding: 5px 9px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.save-indicator.saving {
  border-color: #f4dfb7;
  background: var(--amber-soft);
  color: var(--amber);
}

.save-indicator.saved {
  border-color: #cfead9;
  background: var(--green-soft);
  color: var(--green);
}

.topbar-project {
  color: var(--ink);
  font-weight: 800;
}

.topbar-org,
.topbar-sep {
  color: var(--muted);
  font-weight: 600;
}

.tabbar {
  position: sticky;
  top: var(--topbar);
  z-index: 10;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-bottom: 20px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.tab-btn {
  min-height: 44px;
  border: 0;
  border-right: 1px solid var(--line-soft);
  background: transparent;
  color: var(--muted);
  padding: 0 16px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.tab-btn:last-child {
  border-right: 0;
}

.tab-btn:hover {
  color: var(--ink);
  background: #fafbfd;
}

.tab-btn.active {
  color: var(--blue);
  background: var(--blue-soft);
  box-shadow: inset 0 -4px 0 currentColor;
}

/* Per-unit active-tab accent — colour matches the unit's accent so
   the underline + label colour reinforce which unit you're in. */
body.unit-01-page .tab-btn.active:not([data-tab="ai"]) {
  color: var(--unit-01-accent);
  background: rgba(109, 90, 205, 0.06);
}
body.unit-02-page .tab-btn.active:not([data-tab="ai"]) {
  color: var(--unit-02-accent);
  background: rgba(196, 132, 58, 0.06);
}
body.unit-03-page .tab-btn.active:not([data-tab="ai"]) {
  color: var(--unit-03-accent);
  background: rgba(43, 138, 138, 0.06);
}
body.unit-04-page .tab-btn.active:not([data-tab="ai"]) {
  color: var(--unit-04-accent);
  background: rgba(204, 106, 90, 0.06);
}
body.unit-05-page .tab-btn.active:not([data-tab="ai"]) {
  color: var(--unit-05-accent);
  background: rgba(61, 139, 90, 0.06);
}

.pane {
  display: none;
}

.pane.active {
  display: block;
}

.wrap,
.wrap-wide {
  width: 100%;
}

.pane-head {
  margin-bottom: 20px;
}

.pane-eyebrow {
  color: var(--faint);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.pane-title {
  margin-top: 9px;
  font-size: 28px;
  line-height: 1.18;
  letter-spacing: -0.02em;
}

.pane-desc {
  max-width: 760px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.hint-box {
  border: 1px solid #cfe0ff;
  border-radius: var(--radius-panel);
  background: var(--blue-soft);
  color: var(--text);
  padding: 14px 16px;
  margin: 0 0 18px;
  font-size: 13px;
  line-height: 1.6;
}

.hint-box strong {
  color: var(--ink);
}

.hint-box.amber {
  border-color: #f4dfb7;
  background: var(--amber-soft);
}

.grid-2,
.grid-3 {
  display: grid;
  gap: 14px;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field-group {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
}

.label {
  color: var(--faint);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.field-input,
.field-textarea,
.field-select,
.criterion-notes,
.signal-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: #f8fafc;
  color: var(--ink);
  outline: none;
  padding: 11px 12px;
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.field-textarea,
.criterion-notes {
  resize: vertical;
  line-height: 1.55;
}

.field-input:focus,
.field-textarea:focus,
.field-select:focus,
.criterion-notes:focus {
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0, 77, 234, 0.08);
}

.btn-sm {
  min-height: 30px;
  padding: 7px 10px;
  font-size: 10px;
}

.btn-secondary {
  border-color: var(--line);
  background: var(--panel);
}

.btn-inverse {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.btn-ghost {
  color: var(--muted);
}

.btn-ghost:hover {
  border-color: #f4c7c3;
  background: var(--red-soft);
  color: var(--red);
}

.label-file {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--panel);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.label-file:hover {
  border-color: #c5ced8;
  background: #fafbfd;
}

.progress-track {
  display: flex;
  gap: 3px;
}

.progress-seg {
  width: 24px;
  height: 4px;
  border-radius: 1px;
  background: var(--line);
}

.progress-seg.done {
  background: var(--blue);
}

.progress-seg.active {
  background: var(--blue-soft);
  box-shadow: inset 0 0 0 1px var(--blue);
}

.progress-label,
.project-card-date {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.project-card-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.project-card-actions {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: 8px;
}

.stage-badge,
.demo-chip {
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
  color: var(--text);
  padding: 5px 8px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  line-height: 1;
  text-transform: uppercase;
}

.demo-chip {
  display: inline-block;
  margin-left: 8px;
  background: var(--ink);
  color: #fff;
}

.stage-unit_1 { border-color: #cfe0ff; background: var(--blue-soft); color: var(--blue-strong); }
.stage-unit_2 { border-color: #f4dfb7; background: var(--amber-soft); color: var(--amber); }
.stage-unit_3 { border-color: #d9d6ff; background: #f5f3ff; color: #4f46a5; }
.stage-unit_4 { border-color: #cfead9; background: var(--green-soft); color: var(--green); }
.stage-unit_5 { border-color: #d8e2ea; background: #f7fafc; color: #475569; }
.stage-complete { border-color: #cfead9; background: var(--green-soft); color: var(--green); }

.projects-empty {
  border: 1px dashed var(--line);
  border-radius: var(--radius-panel);
  background: var(--panel);
  padding: 42px 24px;
  text-align: center;
}

.projects-empty-label {
  color: var(--faint);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.projects-empty-title {
  margin-top: 10px;
  color: var(--ink);
  font-family: "Manrope", Arial, sans-serif;
  font-size: 18px;
  font-weight: 800;
}

.projects-empty-sub {
  max-width: 400px;
  margin: 8px auto 0;
  color: var(--muted);
}

.sk-card {
  min-height: 82px;
  border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(90deg, #f1f4f8 25%, #fafbfd 50%, #f1f4f8 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.vision-quote {
  border: 1px solid var(--line);
  border-left: 2px solid var(--blue);
  border-radius: var(--radius-panel);
  background: #f8fafc;
  padding: 20px;
  margin-bottom: 18px;
}

.vision-quote-label {
  color: var(--faint);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.vision-quote-text {
  margin-top: 10px;
  color: var(--ink);
  font-family: "Manrope", Arial, sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.48;
}

.vision-quote-text.empty {
  color: var(--muted);
  font-family: "Inter", Arial, sans-serif;
  font-size: 13px;
  font-weight: 500;
}

.criteria-top {
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--panel);
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  margin-bottom: 18px;
  padding: 18px;
}

.criteria-summary-text {
  color: var(--text);
  font-size: 13px;
  line-height: 1.65;
}

.criterion-card {
  background: var(--panel);
  padding: 16px;
}

.criterion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.criterion-name {
  color: var(--ink);
  font-weight: 800;
}

.criterion-score-display {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.criterion-score-display.s4,
.criterion-score-display.s5 {
  color: var(--green);
}

.criterion-score-display.s3 {
  color: var(--amber);
}

.criterion-score-display.s1,
.criterion-score-display.s2 {
  color: var(--red);
}

.criterion-question {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
}

.score-row {
  display: flex;
  gap: 4px;
  margin-top: 12px;
}

.score-btn {
  flex: 1;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: #f8fafc;
  color: var(--muted);
  font-weight: 800;
}

.score-btn:hover,
.score-btn.active {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.criterion-notes {
  min-height: 48px;
  margin-top: 10px;
  font-size: 13px;
}

.ns-display {
  border: 1px solid var(--line);
  border-left: 2px solid var(--blue);
  border-radius: var(--radius-panel);
  background: var(--panel);
  padding: 16px;
  margin: 16px 0 20px;
}

.ns-display-label {
  color: var(--blue);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ns-display-text {
  margin-top: 8px;
  color: var(--ink);
  font-family: "Manrope", Arial, sans-serif;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.35;
}

.ns-display-text.empty {
  color: var(--muted);
  font-family: "Inter", Arial, sans-serif;
  font-size: 13px;
  font-weight: 500;
}

.divider {
  height: 1px;
  background: rgba(15, 23, 42, 0.10);
  margin: 24px 0;
}

.signal-list {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.signal-row {
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--panel);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
}

.signal-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  flex: 0 0 auto;
}

.signal-input {
  border: 0;
  background: transparent;
  padding: 4px 0;
}

.signal-input:focus {
  box-shadow: none;
}

.signal-remove {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
}

.signal-remove:hover {
  color: var(--red);
}

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

.ai-mode-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--panel);
  padding: 15px;
  cursor: pointer;
}

.ai-mode-card:hover {
  border-color: #c5ced8;
}

.ai-mode-card.active {
  border-color: var(--blue);
  background: var(--blue-soft);
  box-shadow: inset 2px 0 0 var(--blue);
}

.ai-mode-title {
  color: var(--ink);
  font-weight: 800;
}

.ai-mode-desc {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.prompt-box {
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--panel);
  overflow: hidden;
}

.prompt-box-head {
  border-bottom: 1px solid var(--line-soft);
  background: #fafbfd;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
}

.prompt-box-label {
  color: var(--faint);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.prompt-hint {
  color: var(--muted);
  font-size: 12px;
}

.prompt-text {
  max-height: 360px;
  overflow: auto;
  padding: 16px;
  color: var(--text);
  font-size: 12px;
  line-height: 1.65;
  white-space: pre-wrap;
}

.prompt-actions {
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 16px;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  background: rgba(20, 23, 26, 0.42);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.modal-overlay.visible {
  opacity: 1;
  pointer-events: all;
}

.modal {
  width: min(460px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--panel);
  box-shadow: 0 18px 50px rgba(20, 23, 26, 0.14);
  padding: 24px;
}

.modal-title {
  color: var(--ink);
  font-family: "Manrope", Arial, sans-serif;
  font-size: 20px;
  font-weight: 800;
}

.modal-sub {
  margin-top: 8px;
  color: var(--muted);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 70;
  max-width: 360px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--ink);
  color: #fff;
  padding: 11px 14px;
  font-size: 13px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.ok {
  background: var(--green);
}

.toast.error {
  background: var(--red);
}

/* Unit 2: force field */
.net-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--panel);
  padding: 18px;
  margin: 18px 0;
}

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

.net-title,
.ff-col-title,
.analysis-card-title,
.inner-sb-label {
  color: var(--faint);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.net-score {
  color: var(--ink);
  font-family: "Manrope", Arial, sans-serif;
  font-size: 26px;
  font-weight: 800;
}

.net-score.positive { color: var(--green); }
.net-score.negative { color: var(--red); }

.net-bar-track {
  position: relative;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--red-soft);
}

.net-bar-fill {
  height: 100%;
  background: var(--green-soft);
  border-right: 2px solid var(--green);
}

.net-bar-center {
  position: absolute;
  inset: 0 auto 0 50%;
  width: 1px;
  background: var(--line);
}

.net-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  color: var(--faint);
  font-size: 11px;
  font-weight: 700;
}

.net-interp {
  margin-top: 12px;
  color: var(--text);
  font-size: 13px;
}

.ff-diagram {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 80px minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

.ff-col {
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--panel);
  padding: 16px;
}

.ff-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.ff-col-count {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 800;
}

.ff-col-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  margin-right: 8px;
  background: var(--blue);
}

.ff-col.driving .ff-col-dot { background: var(--green); }
.ff-col.resisting .ff-col-dot { background: var(--red); }

.ff-center {
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: #fafbfd;
  color: var(--muted);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
}

.ff-arrow {
  color: var(--blue);
  font-size: 22px;
  font-weight: 900;
}

.ff-center-label {
  color: var(--faint);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.force-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: #fbfcfe;
  padding: 12px;
  margin-bottom: 10px;
}

.force-item-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px 28px;
  gap: 8px;
  align-items: center;
}

.force-label-input {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--ink);
  outline: 0;
  font-weight: 700;
}

.force-type-chip,
.force-remove,
.btn-add {
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--panel);
  color: var(--muted);
  min-height: 28px;
  font-weight: 900;
}

.force-type-chip.chip-rational { color: var(--blue); background: var(--blue-soft); border-color: #cfe0ff; }
.force-type-chip.chip-emotional { color: var(--amber); background: var(--amber-soft); border-color: #f4dfb7; }
.force-remove:hover { color: var(--red); border-color: #f4c7c3; }

.strength-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.strength-bar-track {
  flex: 1;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf1f5;
  cursor: pointer;
}

.strength-bar-fill {
  height: 100%;
  background: var(--blue);
}

.strength-bar-track.driving .strength-bar-fill { background: var(--green); }
.strength-bar-track.resisting .strength-bar-fill { background: var(--red); }

.strength-val {
  width: 18px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  text-align: right;
}

.add-force-btn {
  width: 100%;
  min-height: 38px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.add-force-btn:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: var(--blue-soft);
}

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

.analysis-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--panel);
  padding: 16px;
}

.analysis-card-body {
  margin-top: 10px;
  color: var(--text);
  font-size: 13px;
}

.analysis-card-body ul {
  margin: 0;
  padding-left: 18px;
}

/* Unit 3: stakeholder map */
.workspace.has-inner-sb,
.stakeholder-workspace {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 20px;
}

.inner-sb {
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--panel);
  overflow: hidden;
}

.inner-sb-head {
  min-height: 54px;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
}

.btn-add {
  padding: 0 10px;
  color: var(--blue);
}

.inner-sb-list {
  max-height: 620px;
  overflow: auto;
}

.inner-sb-empty,
.no-selection {
  color: var(--muted);
  padding: 22px;
  text-align: center;
  font-size: 13px;
}

.sh-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 8px;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid var(--line-soft);
  padding: 12px 14px;
  cursor: pointer;
}

.sh-item:hover,
.sh-item.active {
  background: #fbfcfe;
}

.sh-item.active {
  box-shadow: inset 2px 0 0 var(--blue);
}

.sh-avatar {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-control);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 900;
}

.sh-info {
  min-width: 0;
}

.sh-name {
  overflow: hidden;
  color: var(--ink);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sh-role {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sh-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.sh-table {
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--panel);
  overflow: hidden;
}

.sh-table-head,
.sh-table-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 80px 80px 110px 90px;
  gap: 14px;
  align-items: center;
}

.sh-table-head {
  border-bottom: 1px solid var(--line-soft);
  background: #fafbfd;
  padding: 12px 16px;
}

.sh-table-row {
  border-bottom: 1px solid var(--line-soft);
  padding: 14px 16px;
  cursor: pointer;
}

.sh-table-row:last-child {
  border-bottom: 0;
}

.sh-table-row:hover {
  background: #fbfcfe;
}

.sh-table-num {
  color: var(--ink);
  font-weight: 900;
  text-align: center;
}

.sh-stance-chip {
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.btn-danger {
  border-color: #f4c7c3;
  background: var(--red-soft);
  color: var(--red);
}

.stance-chips,
.readiness-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.stance-chip,
.readiness-step {
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: #f8fafc;
  color: var(--muted);
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.stance-chip.supporter,
.readiness-step.active {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue);
}

.stance-chip.neutral { border-color: #f4dfb7; background: var(--amber-soft); color: var(--amber); }
.stance-chip.skeptical { border-color: #f4dfb7; background: #fff3e8; color: #9b4b00; }
.stance-chip.blocker { border-color: #f4c7c3; background: var(--red-soft); color: var(--red); }

.slider-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.slider-row input {
  flex: 1;
  accent-color: var(--blue);
}

.slider-val {
  width: 20px;
  color: var(--ink);
  font-weight: 900;
}

.no-selection-label {
  color: var(--ink);
  font-family: "Manrope", Arial, sans-serif;
  font-weight: 800;
}

.no-selection-text {
  margin-top: 6px;
}

.map-canvas-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--panel);
  padding: 16px;
}

.map-canvas {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background:
    linear-gradient(90deg, transparent calc(50% - 0.5px), var(--line) calc(50% - 0.5px), var(--line) calc(50% + 0.5px), transparent calc(50% + 0.5px)),
    linear-gradient(180deg, transparent calc(50% - 0.5px), var(--line) calc(50% - 0.5px), var(--line) calc(50% + 0.5px), transparent calc(50% + 0.5px)),
    #fbfcfe;
}

.map-axis {
  position: absolute;
  color: var(--faint);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Quadrant labels read as anchored map-legend chips, not floating
   decoration. Unit 3's inline <style> may further tune this. */
.map-quadrant {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(15, 23, 42, 0.55);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: 4px 10px;
  border-radius: 999px;
}

.map-node {
  position: absolute;
  z-index: 2;
  transform: translate(-50%, -50%);
  border: 2px solid #fff;
  border-radius: 999px;
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(20, 23, 26, 0.18);
}

.map-tooltip {
  position: absolute;
  z-index: 4;
  display: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: #fff;
  color: var(--text);
  padding: 8px 10px;
  font-size: 12px;
  box-shadow: 0 8px 24px rgba(20, 23, 26, 0.12);
}

.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 14px;
}

.map-legend-item {
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
}

.map-legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
}

/* Unit 4: communication */
.core-grid,
.kfd-grid,
.misfire-grid,
.east-grid,
.momentum-signals {
  display: grid;
  gap: 12px;
}

.core-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 22px;
}

.core-block,
.kfd-card,
.audience-card,
.misfire-card,
.east-card,
.adoption-card,
.nudge-card,
.complete-box,
.momentum-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--panel);
  padding: 16px;
}

.core-block-num,
.kfd-badge,
.east-badge,
.east-type-badge {
  display: inline-flex;
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
  color: var(--blue);
  padding: 5px 8px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;
}

.core-block-title,
.kfd-card-title,
.audience-name,
.misfire-title,
.east-card-title,
.adoption-card-name,
.nudge-title-input,
.complete-title {
  margin-top: 10px;
  color: var(--ink);
  font-family: "Manrope", Arial, sans-serif;
  font-weight: 800;
  line-height: 1.25;
}

.core-block-desc,
.kfd-card-desc,
.misfire-desc,
.east-card-desc,
.adoption-card-role,
.complete-sub {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.core-block .field-textarea,
.kfd-card .field-textarea {
  margin-top: 12px;
  min-height: 86px;
}

.kfd-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.kfd-know,
.east-easy,
.badge-easy { background: #f7faff; border-color: #cfe0ff; }
.kfd-feel,
.east-attractive,
.badge-attractive { background: #fff7e8; border-color: #f4dfb7; }
.kfd-do,
.east-social,
.badge-social { background: #f4fbf7; border-color: #cfead9; }
.east-timely,
.badge-timely { background: #fbfcfe; border-color: #d8e2ea; }

.audience-card {
  margin-bottom: 12px;
}

.audience-card-head,
.adoption-card-head,
.nudge-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.audience-avatar {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-control);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 900;
  flex: 0 0 auto;
}

.from-stakeholder {
  margin-left: 8px;
  color: var(--blue);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.audience-source {
  color: var(--muted);
  font-size: 12px;
}

.misfire-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 18px;
}

.misfire-card {
  cursor: pointer;
}

.misfire-card:hover,
.misfire-card.flagged {
  border-color: var(--red);
  background: var(--red-soft);
}

.misfire-card.flagged .misfire-title::after {
  content: " flagged";
  margin-left: 8px;
  color: var(--red);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Unit 5: adoption, nudges, momentum */
.adoption-card,
.nudge-card {
  margin-bottom: 12px;
}

.adoption-meta {
  color: var(--muted);
  font-size: 12px;
}

.adoption-meta strong {
  color: var(--ink);
}

.adoption-meta .target {
  color: var(--blue);
}

.adoption-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
}

.adopt-step {
  min-height: 38px;
  border-right: 1px solid var(--line);
  background: #f8fafc;
  color: var(--muted);
  display: grid;
  place-items: center;
  padding: 8px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.adopt-step:last-child {
  border-right: 0;
}

.adopt-step.passed {
  background: var(--green-soft);
  color: var(--green);
}

.adopt-step.active {
  background: var(--blue);
  color: #fff;
}

.adopt-step.target {
  background: var(--blue-soft);
  color: var(--blue);
}

.east-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.nudge-list {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}

.nudge-card-top {
  margin-bottom: 12px;
}

.east-type-badge {
  min-width: 78px;
  justify-content: center;
}

.nudge-title-input {
  flex: 1;
  min-width: 180px;
  border: 0;
  background: transparent;
  outline: 0;
  font-size: 15px;
  margin-top: 0;
}

.nudge-east-select {
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: #f8fafc;
  color: var(--ink);
  padding: 8px 10px;
  outline: 0;
}

.nudge-remove {
  width: 30px;
  min-width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--panel);
  color: var(--muted);
  font-weight: 900;
}

.nudge-remove:hover {
  color: var(--red);
  border-color: #f4c7c3;
}

.momentum-wrap {
  margin-bottom: 18px;
}

.momentum-score {
  color: var(--ink);
  font-family: "Manrope", Arial, sans-serif;
  font-size: 42px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.momentum-bar-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf1f5;
  margin: 12px 0;
}

.momentum-bar-fill {
  height: 100%;
  background: var(--blue);
}

.momentum-status {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 14px;
}

.momentum-signals {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.signal-check {
  width: 20px;
  height: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  flex: 0 0 auto;
}

.signal-check.on {
  border-color: var(--blue);
  background: var(--blue);
}

.complete-box {
  margin-top: 18px;
  text-align: center;
}

.complete-eyebrow {
  color: var(--blue);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.complete-title {
  font-size: 22px;
}

.complete-sub {
  max-width: 560px;
  margin: 8px auto 16px;
}

@media (max-width: 1100px) {
  .span-8,
  .span-7,
  .span-6,
  .span-5,
  .span-4,
  .span-3 {
    grid-column: span 12;
  }

  .metric-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-row {
    grid-template-columns: 1fr 120px;
  }

  .ff-diagram,
  .workspace.has-inner-sb,
  .stakeholder-workspace,
  .analysis-grid,
  .core-grid,
  .kfd-grid,
  .misfire-grid,
  .east-grid,
  .momentum-signals {
    grid-template-columns: 1fr;
  }

  .ff-center {
    display: none;
  }

  .project-row > :nth-child(3),
  .project-row > :nth-child(4) {
    display: none;
  }
}

@media (max-width: 760px) {
  :root {
    --sidebar: 0px;
  }

  .sidebar {
    position: static;
    width: 100%;
    height: auto;
  }

  .side-section,
  .sidebar-footer {
    display: none;
  }

  .brand {
    padding: 16px 20px;
  }

  .topbar {
    position: sticky;
    inset: auto;
    height: auto;
    min-height: 58px;
    padding: 12px 18px;
  }

  .main {
    margin-left: 0;
    padding: 24px 18px 34px;
  }

  .page-head {
    grid-template-columns: 1fr;
  }

  .page-title {
    font-size: 27px;
  }

  .topbar-actions {
    display: none;
  }

  .field-grid,
  .criteria-grid,
  .grid-2,
  .grid-3,
  .ai-mode-grid,
  .criteria-top,
  .metric-strip {
    grid-template-columns: 1fr;
  }
}

/* ── Design pass ─────────────────────────────────────────────
   Numbering, sidebar split + dots, tab dots, AI 2x2 cards,
   lobby treatment, vision summary card.
   ────────────────────────────────────────────────────────── */

/* Sidebar: 01–05 numeric prefix replaces icons for unit entries.
   Command Center keeps its icon. */
.nav-num {
  width: 22px;
  font-family: "Manrope", Arial, sans-serif;
  font-size: 11px;
  font-weight: 800;
  color: var(--faint);
  letter-spacing: 0.04em;
  text-align: center;
  line-height: 1;
}

.nav-item.is-active .nav-num {
  color: var(--blue);
}

.nav-progress-dot {
  margin-left: auto;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: 1.5px solid var(--faint);
  background: transparent;
  flex-shrink: 0;
}

.nav-progress-dot.filled {
  background: var(--blue);
  border-color: var(--blue);
}

.nav-item.is-active .nav-progress-dot {
  border-color: var(--blue);
}

/* Tab progress dots (filled when the underlying data for that tab
   has any non-empty content; AI tabs do not show a dot). */
.tab-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  margin-right: 7px;
  border: 1.5px solid var(--faint);
  background: transparent;
  vertical-align: 1px;
}

.tab-dot.filled {
  background: currentColor;
  border-color: currentColor;
}

.tab-btn.active .tab-dot {
  border-color: var(--blue);
}

.tab-btn.active .tab-dot.filled {
  background: var(--blue);
  border-color: var(--blue);
}

/* AI tab — 2x2 redesign. Each card now shows the actual TASK text the
   prompt will use, plus a "Use this task" button. */
.ai-mode-card {
  display: flex;
  flex-direction: column;
  min-height: 200px;
  padding: 16px 16px 14px;
}

.ai-mode-task {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-control);
  background: #fafbfd;
  border: 1px solid var(--line-soft);
  color: var(--text);
  font-size: 0.78rem;
  line-height: 1.55;
  white-space: pre-wrap;
  flex: 1;
}

.ai-mode-task-label {
  display: inline-block;
  margin-bottom: 6px;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ai-mode-card.active .ai-mode-task {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(0, 77, 234, 0.18);
}

.ai-mode-use {
  margin-top: 12px;
  align-self: flex-start;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--panel);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease;
}

.ai-mode-use:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.ai-mode-card.active .ai-mode-use {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.ai-mode-card.active .ai-mode-use::before {
  content: "✓ ";
}

@media (max-width: 980px) {
  .ai-mode-grid {
    grid-template-columns: 1fr;
  }
}

/* Command Center — lobby treatment. Larger title, restrained warm
   background tint, no "Unit XX" pattern (Command Center is not a unit). */
.lobby-head {
  border-radius: var(--radius-panel);
  background: linear-gradient(180deg, #fbf5ec 0%, #fdfaf2 60%, #fdfdfb 100%);
  border: 1px solid var(--line-soft);
  padding: 28px 28px 26px;
  margin-bottom: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
}

.lobby-eyebrow {
  color: var(--faint);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1;
  text-transform: uppercase;
}

.lobby-title {
  margin-top: 12px;
  max-width: 820px;
  font-family: "Manrope", Arial, sans-serif;
  font-size: 41px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.lobby-subtitle {
  max-width: 720px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

@media (max-width: 760px) {
  .lobby-head {
    grid-template-columns: 1fr;
    padding: 22px 20px;
  }
  .lobby-title {
    font-size: 32px;
  }
}

/* Vision summary card on Unit 1: case info + vision + north star,
   prominent enough to re-anchor a returning user in 2 seconds. */
.vision-summary {
  border-radius: var(--radius-panel);
  background: linear-gradient(180deg, #f5f8ff 0%, #fafcff 70%, #fcfdff 100%);
  border: 1px solid var(--line-soft);
  padding: 24px 26px 22px;
  margin-bottom: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: end;
}

.vision-summary-eyebrow {
  color: var(--blue);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.vision-summary-title {
  margin-top: 10px;
  font-family: "Manrope", Arial, sans-serif;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.vision-summary-sub {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.vision-summary-body {
  margin-top: 14px;
  display: grid;
  gap: 10px;
  max-width: 760px;
}

.vision-summary-row {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  align-items: baseline;
}

.vision-summary-label {
  color: var(--faint);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.vision-summary-text {
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
}

.vision-summary-actions {
  align-self: end;
}

@media (max-width: 760px) {
  .vision-summary {
    grid-template-columns: 1fr;
    padding: 20px;
  }
  .vision-summary-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

/* ── Tier-1 polish ──────────────────────────────────────────
   Per-unit accent wayfinding (sidebar number + page-head eyebrow),
   AI tab explainer, AI architecture note on the dashboard, subtle
   blue-violet tint on the active AI mode card.
   ────────────────────────────────────────────────────────── */

/* Sidebar: tint just the unit number with the per-unit accent.
   Stays accent-coloured even when the row is active — the accent is
   a wayfinding cue, so it should not flip back to blue on selection. */
.nav-item[data-module="vision"]        .nav-num,
.nav-item.is-active[data-module="vision"]        .nav-num { color: var(--unit-01-accent); }
.nav-item[data-module="forces"]        .nav-num,
.nav-item.is-active[data-module="forces"]        .nav-num { color: var(--unit-02-accent); }
.nav-item[data-module="stakeholders"]  .nav-num,
.nav-item.is-active[data-module="stakeholders"]  .nav-num { color: var(--unit-03-accent); }
.nav-item[data-module="communication"] .nav-num,
.nav-item.is-active[data-module="communication"] .nav-num { color: var(--unit-04-accent); }
.nav-item[data-module="nudges"]        .nav-num,
.nav-item.is-active[data-module="nudges"]        .nav-num { color: var(--unit-05-accent); }

/* Active sidebar item picks up the unit accent as a background tint
   (no left border — the universal blue 2px marker stays). */
body.unit-01-page .nav-item.is-active[data-module="vision"]        { background: rgba(109, 90, 205, 0.08); }
body.unit-02-page .nav-item.is-active[data-module="forces"]        { background: rgba(196, 132, 58, 0.08); }
body.unit-03-page .nav-item.is-active[data-module="stakeholders"]  { background: rgba(43, 138, 138, 0.08); }
body.unit-04-page .nav-item.is-active[data-module="communication"] { background: rgba(204, 106, 90, 0.08); }
body.unit-05-page .nav-item.is-active[data-module="nudges"]        { background: rgba(61, 139, 90, 0.08); }

/* Page-head eyebrow takes the matching accent on each unit page.
   Scoped to .page-head so other .eyebrow uses (module headers, etc.)
   stay neutral. */
body.unit-01-page .page-head .eyebrow { color: var(--unit-01-accent); }
body.unit-02-page .page-head .eyebrow { color: var(--unit-02-accent); }
body.unit-03-page .page-head .eyebrow { color: var(--unit-03-accent); }
body.unit-04-page .page-head .eyebrow { color: var(--unit-04-accent); }
body.unit-05-page .page-head .eyebrow { color: var(--unit-05-accent); }

/* Page-head accent zone: very light tint of the unit's accent + a 4px
   left border in the same accent. Anchors the section visually so the
   eye knows "this is the unit header" before reading. */
body.unit-page .page-head {
  border-radius: 16px;
  padding: 24px 28px 20px;
  margin-bottom: 20px;
}

body.unit-01-page .page-head { background: rgba(109, 90, 205, 0.08); }
body.unit-02-page .page-head { background: rgba(196, 132, 58, 0.08); }
body.unit-03-page .page-head { background: rgba(43, 138, 138, 0.08); }
body.unit-04-page .page-head { background: rgba(204, 106, 90, 0.08); }
body.unit-05-page .page-head { background: rgba(61, 139, 90, 0.08); }

/* AI tab explainer — small, muted line above the mode-card grid. */
.ai-tab-explainer {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 18px 0;
  font-style: italic;
  line-height: 1.5;
  max-width: 70ch;
}

/* Active mode card — universal subtle blue-violet tint, with a 3px
   per-unit left border that replaces the previous inset shadow accent. */
.ai-mode-card.active {
  background: rgba(109, 90, 205, 0.06);
  border-color: rgba(109, 90, 205, 0.28);
  box-shadow: none;
  border-left: 3px solid var(--unit-01-accent);
}
body.unit-02-page .ai-mode-card.active { border-left-color: var(--unit-02-accent); }
body.unit-03-page .ai-mode-card.active { border-left-color: var(--unit-03-accent); }
body.unit-04-page .ai-mode-card.active { border-left-color: var(--unit-04-accent); }
body.unit-05-page .ai-mode-card.active { border-left-color: var(--unit-05-accent); }

/* Dashboard: "How AI fits in" info block. Visually quiet — readable
   prose, not a hero. */
.ai-architecture-note .module-body {
  padding: 22px 24px 24px;
}

.ai-architecture-note .module-title {
  margin-top: 6px;
  max-width: 70ch;
}

.ai-note-body {
  margin: 14px 0 0;
  font-size: 0.95rem;
  line-height: 1.55;
  max-width: 70ch;
  color: var(--ink);
}

.ai-note-sub {
  margin: 10px 0 0;
  font-size: 0.85rem;
  line-height: 1.55;
  max-width: 70ch;
  color: var(--muted);
}

/* AI cue: yellow action panel that surfaces the framework-aware AI
   prompt for the current pane. Yellow (#f5c000) is the platform-wide
   semantic marker for "AI" — used ONLY on AI elements so reviewers
   learn the rule "yellow = AI" at a glance. The rest of the platform
   stays calm. */
.ai-cue {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
  padding: 16px 20px;
  background: #f5c000;
  border-radius: 8px;
  text-decoration: none;
  color: #14171a;
  transition: background 120ms ease, box-shadow 120ms ease;
}
.ai-cue:hover {
  background: #ffd633;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.ai-cue-badge {
  font-family: "Manrope", Arial, sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  background: #14171a;
  color: #f5c000;
  padding: 4px 9px;
  border-radius: 4px;
}
.ai-cue-action {
  flex: 1;
  font-family: "Manrope", Arial, sans-serif;
  font-weight: 700;
  font-size: 1.02rem;
  color: #14171a;
}
.ai-cue-arrow {
  font-size: 1.15rem;
  color: #14171a;
  font-weight: 600;
}

/* AI tab — yellow call-to-action button matching the .ai-cue cards
   at the bottom of unit panes. Same hue, same warmth — visually says
   "I'm not a content section, I'm a tool you can invoke." Pushed to
   the right end of the tabbar. */
.tab-btn[data-tab="ai"],
.tab-btn-ai {
  background: var(--ai-accent);
  color: var(--ai-accent-text);
  border-right: 0;
  border-radius: 6px;
  font-weight: 800;
  padding: 8px 16px;
  margin: 6px 6px 6px auto;
  box-shadow: none;
}

.tab-btn[data-tab="ai"]:hover,
.tab-btn-ai:hover {
  background: var(--ai-accent-hover);
  color: var(--ai-accent-text);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.tab-btn[data-tab="ai"].active,
.tab-btn-ai.active {
  background: var(--ai-accent-strong);
  color: var(--ai-accent-text);
  box-shadow: inset 0 0 0 1px var(--ai-accent-border);
}

/* AI pane eyebrow: yellow pill, visually echoes the .ai-cue-badge so
   landing on the AI tab feels like the same semantic marker, larger. */
#pane-ai .pane-eyebrow {
  display: inline-block;
  padding: 4px 10px;
  background: #f5c000;
  color: #14171a;
  border-radius: 4px;
}

/* Dashboard architecture note: yellow stripe ties the "How AI fits in"
   block into the same yellow = AI rule used inside the units. */
.ai-architecture-note {
  border-left: 4px solid #f5c000;
}

/* ===== Card hover states — interactive cards lift on hover so it's
   clear they're clickable. */
.ai-mode-card,
.module-link {
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.ai-mode-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.10), 0 2px 6px rgba(15, 23, 42, 0.05);
  cursor: pointer;
}

.module-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

/* Stakeholder inner-sidebar items get a subtle hover so the list
   reads as interactive. */
.sh-item {
  transition: background 120ms ease;
}
.sh-item:hover {
  background: rgba(15, 23, 42, 0.03);
}

/* ===== AI SLIDE PANEL =====
   Right-anchored slide-over that opens when the AI button is clicked.
   The user stays in their working context — the AI prompt overlays
   their work rather than replacing it. */

.ai-panel-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.3);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  display: none;
  justify-content: flex-end;
}

.ai-panel-overlay.visible {
  display: flex;
}

.ai-panel {
  width: 460px;
  max-width: 90vw;
  height: 100%;
  background: #ffffff;
  box-shadow: -8px 0 30px rgba(15, 23, 42, 0.15);
  display: flex;
  flex-direction: column;
  animation: aiPanelSlideIn 200ms ease;
}

@keyframes aiPanelSlideIn {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}

.ai-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px 18px;
  border-bottom: 1px solid var(--ai-accent-border);
  background: var(--ai-accent);
  flex-shrink: 0;
}

.ai-panel-title {
  font-family: "Manrope", Arial, sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--ai-accent-text);
  line-height: 1.2;
}

.ai-panel-sub {
  font-size: 0.82rem;
  color: var(--ai-accent-text);
  opacity: 0.82;
  margin-top: 6px;
  line-height: 1.5;
  max-width: 38ch;
}

.ai-panel-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(20, 23, 26, 0.18);
  background: rgba(255, 255, 255, 0.85);
  color: var(--ai-accent-text);
  font-size: 18px;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  flex-shrink: 0;
  transition: background 120ms ease, color 120ms ease;
}

.ai-panel-close:hover {
  background: #ffffff;
  color: #111827;
}

.ai-panel-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}

/* ===== AI PANEL INTERNAL ZONES ===== */

.ai-panel-modes {
  display: flex;
  gap: 6px;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  flex-shrink: 0;
  flex-wrap: wrap;
}

.ai-panel-mode-pill {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.15);
  background: transparent;
  color: var(--muted, #6b7280);
  cursor: pointer;
  white-space: nowrap;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}

.ai-panel-mode-pill:hover {
  background: rgba(15, 23, 42, 0.04);
  color: var(--ink, #111827);
}

.ai-panel-mode-pill.active {
  background: var(--ai-accent);
  color: var(--ai-accent-text);
  border-color: var(--ai-accent-border);
}

/* "Choose a reflection angle" label above the mode pills. */
.ai-panel-modes::before {
  content: "Choose a reflection angle";
  display: block;
  width: 100%;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 4px;
}

.ai-panel-prompt-zone {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  min-height: 0;
  background: var(--ai-accent-tint);
}

.ai-panel-prompt-zone .prompt-text {
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--ink, #1a1d20);
  white-space: pre-wrap;
  font-family: "IBM Plex Mono", "SF Mono", monospace;
  background: #ffffff;
  border: 1px solid var(--ai-accent-border);
  border-radius: 10px;
  padding: 16px;
}

.ai-panel-actions {
  flex-shrink: 0;
  display: flex;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--ai-accent-border);
  background: var(--ai-accent-soft);
}

.ai-panel-actions .btn {
  flex: 1;
  text-align: center;
  font-size: 0.78rem;
}

body.ai-panel-active {
  overflow: hidden;
}

@media (max-width: 640px) {
  .ai-panel {
    width: 100vw;
    max-width: 100vw;
  }
}
