:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-soft: #eef2f6;
  --surface-strong: #e6edf3;
  --text: #17202a;
  --muted: #5d6a78;
  --line: #d9e1e8;
  --accent: #0f6b5f;
  --accent-soft: #e4f3f0;
  --blue: #2457a6;
  --blue-soft: #e7eefb;
  --warn: #9b5b0b;
  --warn-soft: #fff5df;
  --danger: #9a2e2e;
  --danger-soft: #fdecec;
  --ink: #0f1720;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
  --shadow-strong: 0 14px 35px rgba(23, 32, 42, 0.10);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

.app {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 20px 16px;
  border-right: 1px solid var(--line);
  background: var(--surface);
  overflow: auto;
}

.brand {
  padding: 2px 4px 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}

.brand strong {
  display: block;
  font-size: 21px;
  line-height: 1.2;
}

.brand span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.nav {
  display: grid;
  gap: 5px;
  margin-bottom: 18px;
}

.nav a {
  display: flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--muted);
  font-weight: 650;
}

.nav a:hover,
.nav a:focus,
.nav a.active {
  color: var(--text);
  background: var(--surface-soft);
  outline: 0;
}

.side-note {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--muted);
  font-size: 13px;
}

.content {
  padding: 28px;
}

.hero {
  display: grid;
  gap: 16px;
  margin-bottom: 22px;
}

.hero.visual {
  position: relative;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    linear-gradient(90deg, rgba(15, 107, 95, 0.06) 1px, transparent 1px),
    linear-gradient(0deg, rgba(36, 87, 166, 0.05) 1px, transparent 1px),
    var(--surface);
  background-size: 34px 34px, 34px 34px, auto;
  box-shadow: var(--shadow-strong);
}

.hero.visual::after {
  content: "";
  position: absolute;
  inset: auto 22px 0;
  height: 4px;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(90deg, var(--accent), var(--blue), var(--warn));
}

.hero-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  max-width: 840px;
  margin: 0;
  font-size: 31px;
  line-height: 1.14;
  letter-spacing: 0;
}

.lead {
  max-width: 900px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.search {
  width: min(430px, 100%);
}

.search input {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  box-shadow: var(--shadow);
}

.search input:focus {
  border-color: var(--accent);
  outline: 2px solid rgba(15, 107, 95, 0.15);
}

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

.metric {
  min-height: 86px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.metric strong {
  display: block;
  margin-top: 6px;
  font-size: 17px;
}

.metric.accent {
  border-color: rgba(15, 107, 95, 0.28);
  background: var(--accent-soft);
}

.metric.blue {
  border-color: rgba(36, 87, 166, 0.25);
  background: var(--blue-soft);
}

.metric.warn {
  border-color: rgba(155, 91, 11, 0.24);
  background: var(--warn-soft);
}

.metric.danger {
  border-color: rgba(154, 46, 46, 0.24);
  background: var(--danger-soft);
}

.section {
  margin: 26px 0;
  scroll-margin-top: 20px;
}

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

.section h2 {
  margin: 0;
  font-size: 21px;
  line-height: 1.2;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

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

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

.card {
  display: grid;
  min-height: 132px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.card:hover,
.card:focus-within {
  border-color: rgba(15, 107, 95, 0.45);
}

.card .tag {
  width: fit-content;
  margin-bottom: 8px;
  padding: 4px 7px;
  border-radius: 5px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tag.green {
  color: var(--accent);
  background: var(--accent-soft);
}

.tag.blue {
  color: var(--blue);
  background: var(--blue-soft);
}

.tag.warn {
  color: var(--warn);
  background: var(--warn-soft);
}

.tag.danger {
  color: var(--danger);
  background: var(--danger-soft);
}

.card h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.25;
}

.card p {
  margin: 8px 0 14px;
  color: var(--muted);
  font-size: 14px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-self: end;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font-weight: 750;
}

.button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.button:hover,
.button:focus {
  border-color: var(--accent);
  outline: 0;
}

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

.list a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.list a:hover,
.list a:focus {
  border-color: rgba(36, 87, 166, 0.45);
  outline: 0;
}

.list span {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.panel {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel h3 {
  margin: 0 0 10px;
  font-size: 17px;
}

.panel ul,
.panel ol {
  margin: 0;
  padding-left: 18px;
}

.panel li + li {
  margin-top: 6px;
}

.visual-panel {
  position: relative;
  min-height: 190px;
  overflow: hidden;
}

.visual-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(23, 32, 42, 0.055) 1px, transparent 1px),
    linear-gradient(0deg, rgba(23, 32, 42, 0.04) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

.visual-panel > * {
  position: relative;
}

.quote {
  padding: 16px;
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent-soft);
  font-weight: 650;
}

.command-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 14px;
  align-items: stretch;
}

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

.signal {
  min-height: 104px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.signal span,
.node span,
.timeline-item span,
.swimlane span,
.axis-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.signal strong,
.node strong,
.timeline-item strong,
.swimlane strong,
.axis-card strong {
  display: block;
  margin-top: 5px;
  line-height: 1.25;
}

.signal p,
.node p,
.timeline-item p,
.swimlane p,
.axis-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.stack-diagram {
  display: grid;
  gap: 8px;
}

.stack-layer {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 54px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.stack-layer strong {
  font-size: 14px;
}

.stack-layer span {
  color: var(--muted);
  font-size: 13px;
}

.stack-layer mark {
  padding: 3px 7px;
  border-radius: 5px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
}

.flow-map {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.flow-step {
  min-height: 120px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.flow-step .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.flow-step h3 {
  margin: 10px 0 6px;
  font-size: 15px;
}

.flow-step p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.process-timeline {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.process-step {
  min-height: 152px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.process-step span {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 9px;
  padding: 3px 7px;
  border-radius: 5px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.process-step.done {
  border-color: rgba(15, 107, 95, 0.28);
  background: var(--accent-soft);
}

.process-step.current {
  border-color: rgba(155, 91, 11, 0.32);
  background: var(--warn-soft);
}

.process-step strong {
  display: block;
  line-height: 1.25;
}

.process-step p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.interview-grid {
  display: grid;
  gap: 12px;
}

.interview-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.interview-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.interview-head strong {
  font-size: 18px;
}

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

.interview-cols h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.interview-cols ul {
  margin: 0;
  padding-left: 18px;
}

.interview-cols li {
  color: var(--muted);
  font-size: 13px;
}

.interview-cols li + li {
  margin-top: 6px;
}

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

.journey-step {
  position: relative;
  min-height: 152px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.journey-step::after {
  content: "";
  position: absolute;
  top: 26px;
  right: -9px;
  width: 10px;
  height: 2px;
  background: var(--line);
}

.journey-step:last-child::after {
  display: none;
}

.journey-step span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 850;
}

.journey-step h3 {
  margin: 10px 0 6px;
  font-size: 15px;
}

.journey-step p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
}

.journey-step a {
  color: var(--accent);
  font-weight: 800;
}

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

.bridge-card {
  min-height: 156px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.bridge-card span,
.gate span,
.handoff span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.bridge-card strong,
.gate strong,
.handoff strong {
  display: block;
  margin-top: 5px;
  line-height: 1.25;
}

.bridge-card p,
.gate p,
.handoff p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.handoff {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: stretch;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.handoff + .handoff {
  margin-top: 10px;
}

.handoff .actions {
  align-content: start;
}

.gate {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(15, 107, 95, 0.28);
  border-radius: var(--radius);
  background: var(--accent-soft);
}

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

.deliverable {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.deliverable h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.deliverable ul {
  margin: 0;
  padding-left: 18px;
}

.deep-section {
  display: grid;
  gap: 12px;
}

.deep-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.deep-card h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

.deep-card p {
  margin: 0 0 10px;
  color: var(--muted);
}

.deep-card ul,
.deep-card ol {
  margin: 0;
  padding-left: 18px;
}

.deep-card li + li {
  margin-top: 6px;
}

.step-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr 1fr;
  gap: 10px;
}

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

.step-box {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.step-box span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.step-box strong {
  display: block;
  margin-top: 5px;
}

.step-box p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.playbook {
  display: grid;
  gap: 10px;
}

.playbook-row {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.playbook-row span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.playbook-row strong {
  display: block;
  margin-top: 5px;
}

.playbook-row p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.criteria-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.criterion {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.criterion strong {
  display: block;
}

.criterion p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.example-block {
  padding: 14px;
  border: 1px solid rgba(36, 87, 166, 0.24);
  border-radius: var(--radius);
  background: var(--blue-soft);
}

.example-block strong {
  display: block;
  margin-bottom: 6px;
}

.example-block p {
  margin: 0;
  color: var(--text);
}

.next-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.next-strip strong {
  display: block;
}

.next-strip span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.workbench {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 12px;
  align-items: start;
}

.task-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px auto;
  gap: 8px;
  margin-bottom: 12px;
}

.task-form input,
.task-form select,
.quick-note textarea {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

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

.task-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 9px;
  align-items: start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.task-item.done {
  opacity: 0.58;
}

.task-item.done strong {
  text-decoration: line-through;
}

.task-item strong,
.task-item span {
  display: block;
}

.task-item span {
  color: var(--muted);
  font-size: 12px;
}

.task-item button,
.mini-button {
  min-height: 28px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.quick-note {
  display: grid;
  gap: 8px;
}

.routine-list {
  display: grid;
  gap: 9px;
}

.routine-item {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.routine-item span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.routine-item strong {
  display: block;
}

.routine-item p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

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

.axis-card {
  min-height: 170px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.axis-card.primary {
  border-color: rgba(15, 107, 95, 0.32);
  background: var(--accent-soft);
}

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

.timeline-item {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.timeline-item strong {
  font-size: 24px;
}

.swimlanes {
  display: grid;
  gap: 10px;
}

.swimlane {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

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

.org-card {
  min-height: 150px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.org-card.primary {
  border-color: rgba(15, 107, 95, 0.3);
  background: var(--accent-soft);
}

.org-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.org-card strong {
  display: block;
  margin-top: 6px;
  font-size: 17px;
  line-height: 1.25;
}

.org-card p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.crm-toolbar {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, minmax(130px, 0.5fr));
  gap: 10px;
  align-items: end;
  margin: 18px 0;
}

.crm-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.crm-metric {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.crm-metric span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.crm-metric strong {
  display: block;
  margin-top: 5px;
  font-size: 22px;
  line-height: 1;
}

.crm-toolbar label,
.crm-add label,
.crm-table label,
.crm-db-tools label,
.crm-company-detail label,
.crm-person-card label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.crm-toolbar input,
.crm-toolbar select,
.crm-add input,
.crm-add select,
.crm-add textarea,
.crm-table input,
.crm-table select,
.crm-table textarea,
.crm-db-tools input,
.crm-company-detail input,
.crm-company-detail select,
.crm-company-detail textarea,
.crm-person-card input,
.crm-person-card select,
.crm-person-card textarea {
  width: 100%;
  min-height: 34px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 13px;
}

.crm-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.crm-table {
  width: 100%;
  min-width: 1540px;
  border-collapse: collapse;
}

.crm-table th,
.crm-table td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.crm-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface-soft);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.crm-table td {
  font-size: 13px;
}

.crm-table strong,
.crm-table small {
  display: block;
}

.crm-table small {
  margin-top: 4px;
  color: var(--muted);
}

.crm-table p {
  margin: 4px 0 10px;
  color: var(--text);
}

.crm-table textarea {
  min-height: 72px;
  resize: vertical;
}

.crm-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}

.crm-tags span {
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.crm-mail {
  display: block;
  margin-top: 6px;
  color: var(--accent);
  font-weight: 700;
  word-break: break-all;
}

.source-link {
  display: inline-flex;
  margin-left: 6px;
  color: var(--blue);
  font-weight: 800;
}

.crm-badge {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 8px;
  padding: 3px 7px;
  border-radius: 5px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.crm-badge.green {
  background: var(--accent-soft);
  color: var(--accent);
}

.crm-badge.warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.crm-badge.danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.crm-add,
.crm-db-tools {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.crm-add .wide,
.crm-db-tools .wide {
  grid-column: span 2;
}

.crm-add .full,
.crm-db-tools .full {
  grid-column: 1 / -1;
}

.crm-company-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.88fr) minmax(0, 1.5fr);
  gap: 14px;
  align-items: start;
}

.crm-company-list-panel,
.crm-company-detail {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.crm-company-list-panel {
  overflow: hidden;
}

.crm-subhead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}

.crm-subhead strong,
.crm-detail-header strong {
  display: block;
}

.crm-subhead span,
.crm-detail-header span,
.crm-card-meta,
.crm-detail-meta,
.crm-person-meta {
  color: var(--muted);
  font-size: 13px;
}

.crm-company-list {
  display: grid;
  max-height: 760px;
  overflow: auto;
}

.crm-company-card {
  display: grid;
  gap: 9px;
  width: 100%;
  padding: 13px 14px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.crm-company-card:hover,
.crm-company-card:focus,
.crm-company-card.active {
  background: var(--blue-soft);
  outline: 0;
}

.crm-card-top,
.crm-detail-header,
.crm-person-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.crm-card-title {
  font-weight: 800;
  line-height: 1.25;
}

.crm-score-pill {
  flex: 0 0 auto;
  min-width: 48px;
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 850;
  text-align: center;
}

.crm-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.crm-pill {
  display: inline-flex;
  width: fit-content;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.crm-pill.accent {
  background: var(--accent-soft);
  color: var(--accent);
}

.crm-pill.warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.crm-company-detail {
  min-height: 520px;
  padding: 16px;
}

.crm-detail-header {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.crm-detail-header h2 {
  margin: 3px 0 4px;
}

.crm-detail-grid,
.crm-detail-controls,
.crm-person-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

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

.crm-detail-block,
.crm-person-card,
.crm-empty {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}

.crm-detail-block.full {
  grid-column: 1 / -1;
}

.crm-detail-block small,
.crm-person-card small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.crm-detail-block p,
.crm-person-card p,
.crm-empty p {
  margin: 5px 0 0;
}

.crm-detail-controls {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.crm-person-card {
  display: grid;
  gap: 10px;
}

.crm-person-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.crm-advanced {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.crm-advanced summary {
  padding: 14px 16px;
  cursor: pointer;
  color: var(--text);
  font-weight: 800;
}

.crm-advanced[open] summary {
  border-bottom: 1px solid var(--line);
}

.crm-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  width: 100vw;
  height: 100vh;
  padding: 16px;
  border: 0;
  background: rgba(15, 23, 32, 0.46);
  color: var(--text);
}

.crm-modal-card {
  width: min(1120px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-strong);
}

.crm-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.crm-modal-head h2 {
  margin: 0;
}

.crm-modal-head p {
  margin: 6px 0 0;
  color: var(--muted);
}

.scorebar {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-strong);
  margin-top: 10px;
}

.scorebar > span {
  display: block;
  height: 100%;
  width: var(--score, 50%);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--blue));
}

.radar {
  display: grid;
  gap: 10px;
}

.radar-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 44px;
  gap: 10px;
  align-items: center;
}

.radar-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.radar-row strong {
  text-align: right;
  font-size: 13px;
}

.doc-shell {
  max-width: 980px;
  margin: 0 auto;
}

.doc-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.markdown-body {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-strong);
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3 {
  max-width: none;
  margin-top: 26px;
}

.markdown-body h1:first-child,
.markdown-body h2:first-child,
.markdown-body h3:first-child {
  margin-top: 0;
}

.markdown-body h1 {
  font-size: 30px;
}

.markdown-body h2 {
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 22px;
}

.markdown-body h3 {
  font-size: 17px;
}

.markdown-body p,
.markdown-body li {
  color: var(--text);
}

.markdown-body blockquote {
  margin: 18px 0;
  padding: 14px 16px;
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent-soft);
}

.markdown-body code {
  padding: 2px 5px;
  border-radius: 5px;
  background: var(--surface-soft);
}

.markdown-body pre {
  overflow: auto;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
}

.markdown-body pre code {
  padding: 0;
  background: transparent;
}

.markdown-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  border: 1px solid var(--line);
}

.markdown-body th,
.markdown-body td {
  padding: 9px 10px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.markdown-body th {
  background: var(--surface-soft);
}

.table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.table th,
.table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.table th {
  background: var(--surface-soft);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.table tr:last-child td {
  border-bottom: 0;
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.table-scroll .table {
  min-width: 760px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.sendable-body {
  background:
    linear-gradient(180deg, rgba(15, 107, 95, 0.05), transparent 240px),
    var(--bg);
}

.sendable-shell {
  width: min(1180px, calc(100vw - 36px));
  margin: 0 auto;
  padding: 22px 0 34px;
}

.sendable-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.sendable-brand strong {
  display: block;
  line-height: 1.2;
}

.sendable-brand span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.anchor-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.anchor-nav a {
  min-height: 30px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.anchor-nav a:hover,
.anchor-nav a:focus {
  border-color: var(--accent);
  color: var(--text);
  outline: 0;
}

.sendable-hero {
  margin-top: 0;
}

.profile-grid,
.knowledge-grid,
.plan-grid {
  display: grid;
  gap: 12px;
}

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

.profile-card,
.knowledge-card,
.plan-card {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.profile-card span,
.knowledge-card span,
.plan-card span {
  display: block;
  color: var(--accent);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.profile-card strong,
.knowledge-card strong {
  display: block;
  margin-top: 7px;
  line-height: 1.25;
}

.profile-card p,
.knowledge-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.quote-line {
  margin-top: 12px;
  padding: 16px;
  border: 1px solid rgba(36, 87, 166, 0.24);
  border-left: 4px solid var(--blue);
  border-radius: var(--radius);
  background: var(--blue-soft);
  font-weight: 750;
}

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

.plan-card {
  display: grid;
  gap: 10px;
  align-content: start;
}

.plan-card h3 {
  margin: 0;
  font-size: 18px;
}

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

.plan-card li {
  color: var(--muted);
  font-size: 13px;
}

.plan-card li + li {
  margin-top: 6px;
}

.plan-card strong {
  display: block;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

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

.compact-table {
  margin-top: 10px;
}

.compact-table th,
.compact-table td {
  font-size: 13px;
}

.readable-shell {
  width: min(960px, calc(100vw - 40px));
}

.readable-shell .sendable-topbar {
  position: static;
  margin-bottom: 22px;
}

.readable-shell .sendable-hero {
  padding: 30px;
}

.readable-shell .sendable-hero h1 {
  max-width: 860px;
  font-size: 34px;
  line-height: 1.12;
}

.read-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.read-summary-card {
  min-height: 132px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.read-summary-card span,
.read-section-head span,
.insight-item span,
.read-row span,
.process-line span,
.workstream span,
.scenario-card span {
  display: block;
  color: var(--accent);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.read-summary-card strong {
  display: block;
  margin-top: 7px;
  font-size: 16px;
  line-height: 1.25;
}

.read-summary-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.read-callout {
  margin: 22px 0 34px;
  padding: 18px 20px;
  border: 1px solid rgba(36, 87, 166, 0.24);
  border-left: 4px solid var(--blue);
  border-radius: var(--radius);
  background: var(--blue-soft);
}

.read-callout.compact {
  margin: 14px 0 0;
}

.read-callout strong {
  display: block;
  margin-bottom: 6px;
  font-size: 16px;
}

.read-callout p {
  margin: 0;
  color: var(--text);
}

.read-section {
  margin: 34px 0;
  scroll-margin-top: 18px;
}

.read-section-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin-bottom: 14px;
}

.read-section-head > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
}

.read-section-head h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.18;
}

.read-section-head p {
  margin: 5px 0 0;
  color: var(--muted);
}

.read-panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.read-panel + .read-panel {
  margin-top: 12px;
}

.read-panel.compact h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

.read-intro {
  max-width: 780px;
  margin: 0 0 18px;
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
}

.insight-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

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

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

.insight-item strong {
  display: block;
  line-height: 1.25;
}

.insight-item p {
  margin: 5px 0 0;
  color: var(--muted);
}

.read-row-list,
.process-list,
.plan-stack,
.workstream-list,
.question-list {
  display: grid;
  gap: 10px;
}

.read-row,
.process-line,
.workstream,
.question-list p {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.read-row {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 14px;
}

.read-row strong,
.process-line strong,
.workstream strong {
  display: block;
  margin-top: 5px;
  line-height: 1.25;
}

.read-row p,
.process-line p,
.workstream p {
  margin: 0;
  color: var(--muted);
}

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

.split-list p {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--muted);
}

.split-list strong {
  color: var(--text);
}

.process-line {
  display: grid;
  grid-template-columns: 96px 210px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.process-line.done {
  border-color: rgba(15, 107, 95, 0.28);
  background: var(--accent-soft);
}

.process-line.current {
  border-color: rgba(155, 91, 11, 0.32);
  background: var(--warn-soft);
}

.readable-plan {
  min-height: auto;
  padding: 18px;
}

.readable-plan ul {
  margin-top: 6px;
}

.workstream {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 210px;
  gap: 14px;
  align-items: start;
}

.workstream strong {
  margin-top: 0;
  color: var(--text);
  font-size: 13px;
}

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

.scenario-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.scenario-card.wide {
  grid-column: 1 / -1;
}

.scenario-card h3 {
  margin: 7px 0 8px;
  font-size: 17px;
  line-height: 1.25;
}

.scenario-card p {
  margin: 0 0 10px;
  color: var(--muted);
}

.scenario-card strong {
  display: block;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.question-list p {
  margin: 0;
  color: var(--text);
}

.article-prose {
  padding: 26px;
}

.article-prose h3 {
  max-width: 760px;
  margin: 0 0 14px;
  font-size: 25px;
  line-height: 1.2;
}

.article-prose p {
  max-width: 790px;
  margin: 0;
  color: var(--text);
  font-size: 16px;
  line-height: 1.72;
}

.article-prose p + p {
  margin-top: 14px;
}

.article-prose h3 + p {
  margin-top: 0;
}

.article-kicker {
  margin-bottom: 18px !important;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  color: var(--muted) !important;
  font-weight: 650;
}

.hidden {
  display: none !important;
}

.footer {
  margin-top: 32px;
  padding: 14px 0 4px;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 1080px) {
  .app {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

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

  .metrics,
  .signal-grid,
  .flow-map,
  .process-timeline,
  .journey,
  .bridge-grid,
  .deliverables,
  .company-org,
  .interview-cols,
  .criteria-list,
  .step-grid,
  .market-map,
  .timeline,
  .profile-grid,
  .knowledge-grid,
  .plan-grid,
  .grid,
  .grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .command-grid,
  .handoff,
  .playbook-row,
  .workbench,
  .crm-toolbar,
  .crm-metrics,
  .crm-add,
  .crm-db-tools,
  .crm-company-layout,
  .crm-detail-grid,
  .crm-detail-controls,
  .crm-person-fields,
  .swimlane {
    grid-template-columns: 1fr;
  }

  .sendable-topbar {
    position: static;
    display: grid;
  }

  .anchor-nav {
    justify-content: flex-start;
  }

  .read-summary,
  .scenario-list {
    grid-template-columns: 1fr;
  }

  .read-row,
  .process-line,
  .workstream {
    grid-template-columns: 1fr;
  }

  .insight-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .journey-step::after {
    display: none;
  }
}

@media (max-width: 720px) {
  .content {
    padding: 18px;
  }

  .nav,
  .metrics,
  .signal-grid,
  .flow-map,
  .process-timeline,
  .journey,
  .bridge-grid,
  .deliverables,
  .company-org,
  .interview-cols,
  .criteria-list,
  .step-grid,
  .market-map,
  .timeline,
  .profile-grid,
  .knowledge-grid,
  .plan-grid,
  .grid,
  .grid.two {
    grid-template-columns: 1fr;
  }

  .sendable-shell {
    width: min(100%, calc(100vw - 24px));
    padding-top: 12px;
  }

  .anchor-nav a {
    flex: 1 1 auto;
    text-align: center;
  }

  .readable-shell {
    width: min(100%, calc(100vw - 24px));
  }

  .readable-shell .sendable-hero {
    padding: 18px;
  }

  .readable-shell .sendable-hero h1 {
    font-size: 27px;
  }

  .read-panel {
    padding: 16px;
  }

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

  .hero.visual,
  .markdown-body {
    padding: 16px;
  }

  .stack-layer,
  .radar-row {
    grid-template-columns: 1fr;
  }

  .radar-row strong {
    text-align: left;
  }

  h1 {
    font-size: 25px;
  }

  .list a {
    display: grid;
  }

  .list span {
    white-space: normal;
  }

  .next-strip {
    display: grid;
  }

  .task-form {
    grid-template-columns: 1fr;
  }

  .routine-item {
    grid-template-columns: 1fr;
  }

  .crm-add .wide,
  .crm-add .full,
  .crm-db-tools .wide,
  .crm-db-tools .full {
    grid-column: auto;
  }
}
