:root {
  color-scheme: light;
  --bg: #f7f8f5;
  --ink: #1f2a28;
  --muted: #63706b;
  --line: #d8ded7;
  --panel: #ffffff;
  --green: #1d6b58;
  --blue: #315f86;
  --gold: #a56b22;
  --red: #9d3f35;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  padding: 28px 34px 22px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

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

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 30px;
}

h2 {
  margin-bottom: 6px;
  font-size: 25px;
}

h3 {
  margin-bottom: 16px;
  font-size: 17px;
}

h4 {
  margin-bottom: 8px;
}

.source-pill,
.status-card {
  display: grid;
  gap: 4px;
  min-width: 210px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.source-pill span,
.status-card span,
small {
  color: var(--muted);
  font-size: 12px;
}

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

.layout {
  display: grid;
  grid-template-columns: minmax(310px, 390px) minmax(0, 1fr);
  min-height: calc(100vh - 92px);
}

.evidence-layout {
  display: grid;
  grid-template-columns: minmax(310px, 390px) minmax(0, 1fr);
  min-height: calc(100vh - 92px);
}

.portfolio {
  padding: 24px;
  border-right: 1px solid var(--line);
  background: #eef2ed;
}

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

.readiness-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.readiness-grid > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.readiness-grid strong {
  color: var(--gold);
}

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

.summary-band > div,
.notice,
.panel,
.lane-button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.summary-band > div {
  padding: 14px;
}

.metric {
  display: block;
  font-size: 22px;
  font-weight: 800;
  color: var(--blue);
}

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

.notice {
  margin-bottom: 18px;
  padding: 13px;
  color: #5b4a2a;
  background: #fff8e8;
}

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

.packet-list {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.packet-list h3 {
  margin: 6px 0 4px;
}

.vendor-packet {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  width: 100%;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.vendor-packet.recon {
  background: #f8f7f2;
}

.vendor-packet span:last-child {
  text-align: right;
}

.vendor-packet strong,
.vendor-packet small {
  display: block;
}

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

.bottleneck-card {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(260px, 1fr);
  gap: 16px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.bottleneck-card:hover,
.vendor-packet:hover,
.lane-button:hover {
  border-color: #9db8ae;
}

.bottleneck-card strong,
.bottleneck-card small {
  display: block;
}

.lane-button {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  width: 100%;
  padding: 12px;
  text-align: left;
  cursor: pointer;
}

.lane-button.active {
  border-color: var(--green);
  box-shadow: inset 4px 0 0 var(--green);
}

.lane-button em {
  grid-column: 2;
  color: var(--gold);
  font-size: 12px;
  font-style: normal;
}

.lane-id {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #dce9e4;
  color: var(--green);
  font-weight: 800;
}

.workroom {
  padding: 28px;
  overflow: auto;
}

.ask-panel {
  margin-bottom: 18px;
}

.ask-box {
  margin-bottom: 12px;
}

.ask-box input {
  min-height: 50px;
  font-size: 17px;
}

.example-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.example-query {
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fbfcfa;
  color: var(--blue);
  cursor: pointer;
}

.internal-note {
  margin-top: 18px;
  padding: 13px;
  border: 1px dashed #b9c3bd;
  border-radius: 8px;
  background: #f8faf7;
  color: var(--muted);
  font-size: 13px;
}

.internal-note p:last-child {
  margin-bottom: 0;
}

.lane-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.work-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.8fr);
  gap: 16px;
  margin-bottom: 16px;
}

.panel {
  padding: 18px;
}

.command-center {
  margin-bottom: 18px;
}

.process-panel {
  margin-bottom: 18px;
}

.section-title {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 14px;
}

.section-title h2 {
  margin-bottom: 0;
}

.section-title > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.gantt {
  display: grid;
  gap: 9px;
}

.gantt-scale,
.gantt-row {
  display: grid;
  grid-template-columns: minmax(220px, 0.42fr) minmax(360px, 1fr);
  gap: 14px;
  align-items: center;
}

.gantt-scale {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.gantt-scale::before {
  content: "";
}

.gantt-scale span {
  display: inline-block;
  width: 19%;
}

.gantt-row > div:first-child strong,
.gantt-row > div:first-child small {
  display: block;
}

.gantt-track {
  position: relative;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: repeating-linear-gradient(
    to right,
    #f6f8f5,
    #f6f8f5 19%,
    #e2e7e0 19%,
    #e2e7e0 20%
  );
  overflow: hidden;
}

.gantt-bar {
  position: absolute;
  top: 4px;
  bottom: 4px;
  display: flex;
  align-items: center;
  min-width: 70px;
  padding: 0 9px;
  border-radius: 5px;
  background: var(--green);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

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

label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 10px;
  color: var(--ink);
  background: #fff;
}

input[readonly] {
  background: #f5f7f4;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.chips span,
.category {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #edf3f6;
  color: #315f86;
  font-size: 12px;
}

.lever-list {
  margin: 0;
  padding-left: 18px;
}

.lever-list li {
  margin-bottom: 8px;
}

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

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

.playbook-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.35fr);
  gap: 16px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.playbook-item p {
  margin-bottom: 0;
  color: var(--ink);
}

.playbook-item strong,
.playbook-item small {
  display: block;
}

.process-board {
  display: grid;
  grid-template-columns: minmax(260px, 0.75fr) minmax(0, 1fr);
  gap: 16px;
}

.process-item,
.case-card {
  margin-bottom: 10px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.process-item p,
.case-card p {
  margin-bottom: 8px;
  color: var(--muted);
}

.case-card > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.case-card strong,
.case-card small {
  display: block;
}

.event-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.event-steps span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #edf3f6;
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
}

.event-steps .blocked {
  background: #f8e7df;
  color: var(--red);
}

.event-steps .ready {
  background: #e7f1ec;
  color: var(--green);
}

.event-steps .excluded {
  background: #eeeeeb;
  color: var(--muted);
}

.intervention {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
  gap: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.intervention p {
  color: var(--muted);
}

.evidence-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}

.evidence-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 10px;
  margin-bottom: 14px;
  align-items: end;
}

.evidence-toolbar button {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}

.risk {
  display: block;
  color: var(--gold);
  font-weight: 800;
}

.contract-link {
  color: var(--green);
  font-weight: 800;
  text-decoration: none;
}

.contract-link:hover {
  text-decoration: underline;
}

.evidence-card {
  margin-bottom: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.evidence-card-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
}

.evidence-card h3 {
  margin: 8px 0 4px;
}

.evidence-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.source-stack {
  min-width: 180px;
  text-align: right;
}

.source-stack strong,
.source-stack small {
  display: block;
}

.evidence-summary {
  max-width: 78ch;
  margin-bottom: 14px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
}

.excerpt-label {
  margin: 4px 0 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

.terms-summary > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.terms-summary .wide {
  grid-column: 1 / -1;
}

.terms-summary span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.terms-summary strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

blockquote {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-left: 4px solid var(--green);
  background: #f3f7f4;
  color: #263431;
  font-size: 13px;
  line-height: 1.55;
  max-width: 86ch;
}

mark {
  padding: 0 2px;
  border-radius: 3px;
  background: #ffe7a6;
  color: inherit;
}

.evidence-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.evidence-facts > div {
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.evidence-facts strong,
.evidence-facts small {
  display: block;
}

.next-step {
  display: grid;
  gap: 4px;
  margin-bottom: 10px;
  padding: 11px 12px;
  border-radius: 8px;
  background: #fff8e8;
  color: #5b4a2a;
}

.source-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 12px;
}

.decision-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.45fr);
  gap: 20px;
  margin-bottom: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.decision-hero h2 {
  max-width: 880px;
  margin-bottom: 10px;
  font-size: 30px;
  line-height: 1.16;
}

.decision-hero p {
  max-width: 78ch;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.hero-metrics {
  display: grid;
  gap: 8px;
}

.hero-metrics > div,
.conversation-kpis > div,
.source-signal-grid > div,
.conversation-stats span {
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.hero-metrics strong,
.hero-metrics small,
.conversation-kpis strong,
.conversation-kpis small,
.source-signal-grid strong,
.source-signal-grid small {
  display: block;
}

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

.lane-overview-card {
  display: grid;
  gap: 14px;
  min-height: 190px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.lane-overview-card:hover {
  border-color: #9db8ae;
}

.lane-overview-card > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.lane-overview-card h3 {
  margin-bottom: 0;
  font-size: 18px;
  line-height: 1.25;
}

.conversation-stats {
  display: grid;
  gap: 7px;
}

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

.owner-workbench-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.85fr) minmax(0, 1.15fr);
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
}

.conversation-list-panel {
  position: sticky;
  top: 18px;
}

.conversation-button {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  width: 100%;
  margin-bottom: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.conversation-button.active {
  border-color: var(--green);
  box-shadow: inset 4px 0 0 var(--green);
}

.conversation-button strong,
.conversation-button small,
.conversation-button em {
  display: block;
}

.conversation-button em {
  color: var(--gold);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  text-align: right;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--muted);
}

.status-dot.ready,
.category.ready {
  background: #e7f1ec;
  color: var(--green);
}

.status-dot.ready {
  background: var(--green);
}

.status-dot.blocked,
.category.blocked {
  background: #f8e7df;
  color: var(--red);
}

.status-dot.blocked {
  background: var(--red);
}

.status-dot.warning,
.category.warning {
  background: #fff0cf;
  color: var(--gold);
}

.status-dot.warning {
  background: var(--gold);
}

.status-dot.excluded,
.category.excluded,
.status-dot.muted-status,
.category.muted-status {
  background: #eeeeeb;
  color: var(--muted);
}

.status-dot.excluded,
.status-dot.muted-status {
  background: var(--muted);
}

.conversation-header {
  margin-bottom: 15px;
}

.conversation-header h2 {
  margin: 10px 0 7px;
  font-size: 29px;
}

.conversation-header p,
.conversation-section p {
  color: var(--muted);
  line-height: 1.55;
}

.conversation-kpis,
.source-signal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

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

.conversation-kpis strong,
.source-signal-grid strong {
  color: var(--ink);
  font-size: 15px;
  overflow-wrap: anywhere;
}

.owner-question {
  display: grid;
  gap: 5px;
  margin-bottom: 15px;
  padding: 15px;
  border-left: 4px solid var(--green);
  border-radius: 8px;
  background: #f3f7f4;
}

.owner-question span,
.formula-gate .eyebrow {
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.owner-question strong {
  max-width: 70ch;
  font-size: 18px;
  line-height: 1.35;
}

.conversation-section {
  margin-bottom: 15px;
}

.compact-title {
  align-items: start;
  margin-bottom: 10px;
}

.contract-facts {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

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

.contract-fact-grid > div,
.contract-source-row > div {
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.contract-fact-grid span {
  display: block;
  margin-bottom: 7px;
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.contract-fact-grid ul {
  margin: 0;
  padding-left: 18px;
}

.contract-fact-grid li {
  margin-bottom: 6px;
  font-size: 13px;
  line-height: 1.42;
}

.contract-source-row {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 10px;
}

.contract-source-row strong,
.contract-source-row p {
  display: block;
  margin: 0;
}

.contract-source-row strong {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.contract-source-row p {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.42;
  overflow-wrap: anywhere;
}

.check-list,
.agenda-list {
  margin: 0;
  padding-left: 20px;
}

.check-list li,
.agenda-list li {
  margin-bottom: 7px;
  color: var(--ink);
  line-height: 1.45;
}

.formula-gate {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid #e3d4b7;
  border-radius: 8px;
  background: #fff8e8;
}

.formula-gate h3 {
  margin-bottom: 2px;
  color: #5b4a2a;
  line-height: 1.35;
}

.task-force-panel,
.support-search-panel {
  margin-top: 16px;
}

.task-force-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(260px, 1fr) minmax(260px, 0.8fr);
  gap: 16px;
}

.task-force-grid p {
  color: var(--muted);
  line-height: 1.55;
}

.evidence-results-compact {
  margin-top: 14px;
}

.compact-evidence-card {
  padding: 14px;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th,
td {
  padding: 9px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

td small {
  display: block;
  margin-top: 4px;
}

th {
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 920px) {
  .topbar,
  .lane-header {
    align-items: stretch;
    flex-direction: column;
  }

  .layout,
  .evidence-layout,
  .work-grid,
  .intervention,
  .evidence-card-header,
  .evidence-facts,
  .terms-summary,
  .evidence-meta,
  .evidence-toolbar,
  .gantt-scale,
  .gantt-row,
  .playbook-item,
  .process-grid,
  .bottleneck-card,
  .process-board,
  .charter-grid,
  .opportunity-fields,
  .decision-hero,
  .lane-overview-grid,
  .owner-workbench-grid,
  .conversation-kpis,
  .source-signal-grid,
  .task-force-grid,
  .contract-fact-grid,
  .contract-source-row {
    grid-template-columns: 1fr;
  }

  .conversation-list-panel {
    position: static;
  }
}
