:root {
  color-scheme: light;
  --ink: #18211f;
  --ink-soft: #293431;
  --muted: #65736f;
  --faint: #8b9692;
  --surface: #ffffff;
  --canvas: #f2f5f3;
  --line: #d8e0dc;
  --line-strong: #bdc9c4;
  --forest: #235f45;
  --forest-dark: #194a35;
  --forest-soft: #e6f0ea;
  --wine: #87394e;
  --wine-soft: #f5e9ed;
  --amber: #ae7121;
  --amber-soft: #fbf0df;
  --teal: #2f7774;
  --teal-soft: #e5f1f0;
  --blue: #35658b;
  --blue-soft: #e9f0f5;
  --danger: #9a3f39;
  --danger-soft: #f8e9e7;
  --sidebar: #15201d;
  --sidebar-line: #2e3b37;
  --shadow: 0 10px 24px rgb(24 33 31 / 7%);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html {
  min-width: 320px;
  background: var(--canvas);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--canvas);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgb(53 101 139 / 28%);
  outline-offset: 2px;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  padding: 8px 12px;
  color: white;
  background: var(--ink);
  border-radius: 4px;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.topbar {
  position: sticky;
  z-index: 40;
  top: 0;
  display: grid;
  grid-template-columns: 224px minmax(260px, 1fr) auto;
  align-items: center;
  min-height: 68px;
  padding: 10px 18px;
  background: rgb(255 255 255 / 96%);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: white;
  background: var(--forest);
  border-radius: 5px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 23px;
  line-height: 1;
}

.brand > span:last-child {
  display: grid;
  line-height: 1.12;
}

.brand b {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-weight: 600;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.topbar-context {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
}

.topbar-context b {
  color: var(--ink);
}

.topbar-context i {
  width: 1px;
  height: 16px;
  margin: 0 4px;
  background: var(--line);
}

.topbar-context span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-actions,
.heading-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 13px;
  border: 1px solid transparent;
  border-radius: 5px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, transform 140ms var(--ease-out);
}

.button:active,
.text-action:active,
.sidebar-nav button:active,
.model-control button:active {
  transform: scale(0.97);
}

.button-primary {
  color: white;
  background: var(--forest);
  border-color: var(--forest);
}

.button-primary:hover {
  background: var(--forest-dark);
  border-color: var(--forest-dark);
}

.button-secondary {
  color: var(--ink-soft);
  background: white;
  border-color: var(--line-strong);
}

.button-secondary:hover {
  border-color: var(--ink-soft);
}

.button-secondary.inverse {
  color: white;
  background: transparent;
  border-color: rgb(255 255 255 / 36%);
}

.button-secondary.inverse:hover {
  border-color: white;
}

.model-control {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(88px, 1fr));
  padding: 3px;
  background: #e9eeeb;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.model-control button {
  min-height: 28px;
  padding: 5px 9px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
  transition: background-color 150ms ease, color 150ms ease, box-shadow 150ms ease, transform 140ms var(--ease-out);
}

.model-control button.is-active {
  color: var(--ink);
  background: white;
  box-shadow: 0 1px 3px rgb(24 33 31 / 12%);
}

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

.sidebar {
  position: sticky;
  top: 68px;
  display: flex;
  flex-direction: column;
  align-self: start;
  height: calc(100vh - 68px);
  padding: 22px 16px;
  color: white;
  background: var(--sidebar);
  border-right: 1px solid var(--sidebar-line);
}

.partner-identity {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 8px 20px;
  border-bottom: 1px solid var(--sidebar-line);
}

.partner-avatar {
  display: grid;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #18211f;
  background: #d9b975;
  border-radius: 50%;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: 700;
}

.partner-identity div {
  display: grid;
  min-width: 0;
}

.partner-identity small,
.partner-identity span {
  color: #9aaba5;
  font-size: 10px;
}

.partner-identity b {
  margin: 1px 0;
  font-size: 14px;
}

.sidebar-nav {
  display: grid;
  gap: 4px;
  margin-top: 20px;
}

.sidebar-nav button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 9px 11px;
  color: #aab8b3;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
  transition: color 150ms ease, background-color 150ms ease, transform 140ms var(--ease-out);
}

.sidebar-nav button span {
  color: #74847e;
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.sidebar-nav button:hover {
  color: white;
  background: rgb(255 255 255 / 5%);
}

.sidebar-nav button.is-active {
  color: white;
  background: #26342f;
  border-color: #34443e;
}

.sidebar-nav button.is-active span {
  color: #d9b975;
}

.sidebar-status {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: auto;
  padding: 14px 10px;
  background: #1e2c27;
  border: 1px solid var(--sidebar-line);
  border-radius: 6px;
}

.status-dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  margin-top: 5px;
  background: #6eb88c;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgb(110 184 140 / 14%);
}

.sidebar-status div {
  display: grid;
  gap: 2px;
}

.sidebar-status b {
  font-size: 11px;
}

.sidebar-status small,
.sidebar-note {
  color: #95a59f;
  font-size: 9px;
  line-height: 1.45;
}

.sidebar-note {
  margin: 12px 10px 0;
}

.main {
  min-width: 0;
  padding: 22px clamp(20px, 3.2vw, 48px) 56px;
}

.truth-banner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  margin-bottom: 26px;
  padding: 8px 12px;
  background: var(--amber-soft);
  border: 1px solid #ead2aa;
  border-radius: 5px;
}

.truth-banner > span {
  color: #83541b;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.truth-banner p {
  margin: 0;
  color: #6e5737;
  font-size: 11px;
}

.truth-banner button,
.text-action {
  padding: 4px 0;
  color: var(--forest);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}

.view {
  display: none;
  min-width: 0;
}

.view.is-active {
  display: block;
}

.page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.page-heading > div:first-child {
  min-width: 0;
  max-width: 820px;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--forest);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.page-heading h1 {
  margin: 0;
  max-width: 820px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(28px, 3.2vw, 42px);
  font-weight: 500;
  line-height: 1.08;
}

.page-heading p:last-child {
  max-width: 780px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.ready-badge,
.label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: max-content;
  min-height: 27px;
  padding: 5px 8px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 850;
  text-transform: uppercase;
  white-space: nowrap;
}

.ready-badge {
  color: var(--forest-dark);
  background: var(--forest-soft);
  border: 1px solid #bfd7c8;
}

.ready-badge i {
  width: 6px;
  height: 6px;
  background: var(--forest);
  border-radius: 50%;
}

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

.label-estimate,
.label-pending {
  color: #85591f;
  background: var(--amber-soft);
}

.label-ready {
  color: var(--forest);
  background: var(--forest-soft);
}

.label-objective {
  color: var(--wine);
  background: var(--wine-soft);
}

.kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow);
}

.kpi-strip article {
  position: relative;
  display: grid;
  align-content: center;
  min-width: 0;
  min-height: 106px;
  padding: 18px 20px;
}

.kpi-strip article + article::before {
  position: absolute;
  top: 18px;
  bottom: 18px;
  left: 0;
  width: 1px;
  content: "";
  background: var(--line);
}

.kpi-strip span,
.kpi-strip small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kpi-strip b {
  margin: 3px 0 1px;
  overflow: hidden;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
  font-weight: 550;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kpi-strip.compact article {
  min-height: 92px;
}

.overview-grid,
.pilot-grid,
.checklist-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.8fr);
  gap: 18px;
}

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

.panel {
  min-width: 0;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow);
}

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

.panel-header > div:first-child {
  min-width: 0;
}

.panel-header span:first-child,
.section-label,
.next-action-band > div > span,
.claims-board > div > span,
.asset-usage span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  text-transform: uppercase;
}

.panel-header h2 {
  margin: 2px 0 0;
  font-size: 16px;
  line-height: 1.25;
}

.panel-header > small {
  color: var(--muted);
  font-size: 10px;
}

.case-panel blockquote {
  margin: 0;
  padding: 15px 17px;
  color: var(--ink-soft);
  background: #f4f7f5;
  border-left: 3px solid var(--forest);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  line-height: 1.42;
}

.case-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 17px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.case-meta div {
  min-width: 0;
  padding: 11px 12px;
}

.case-meta div + div {
  border-left: 1px solid var(--line);
}

.case-meta dt {
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
}

.case-meta dd {
  margin: 2px 0 0;
  overflow: hidden;
  font-size: 12px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.reference-list {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.reference-list div {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.reference-list i {
  display: grid;
  width: 21px;
  height: 21px;
  place-items: center;
  color: var(--wine);
  background: var(--wine-soft);
  border-radius: 50%;
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
}

.reference-list b,
.reference-list small {
  display: block;
}

.reference-list b {
  font-size: 11px;
}

.reference-list small,
.case-split > div > small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 8px;
}

.tag-list span {
  padding: 5px 7px;
  color: #4a5e59;
  background: #edf2ef;
  border: 1px solid #dae4df;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
}

.economics-total {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.economics-total > div {
  min-width: 0;
  padding: 16px 10px 16px 0;
}

.economics-total > div + div {
  padding-left: 16px;
  border-left: 1px solid var(--line);
}

.economics-total span,
.economics-total small {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.economics-total b {
  display: block;
  margin: 4px 0 2px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
  font-weight: 550;
  line-height: 1;
}

.commission-visual {
  margin-top: 18px;
}

.commission-visual > div {
  display: flex;
  width: 100%;
  height: 9px;
  overflow: hidden;
  background: var(--line);
  border-radius: 2px;
}

.commission-visual > div i,
.commission-visual > div em {
  display: block;
  height: 100%;
  transition: width 220ms var(--ease-out);
}

.commission-visual > div i {
  width: 15%;
  background: var(--wine);
}

.commission-visual > div em {
  width: 85%;
  background: var(--teal);
}

.commission-visual p {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 9px;
}

.commission-visual p span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.commission-visual p i {
  width: 7px;
  height: 7px;
  border-radius: 1px;
}

.legend-partner { background: var(--wine); }
.legend-cellaria { background: var(--teal); }

.role-copy {
  margin: 18px 0 8px;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.55;
}

.fine-print {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.next-action-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin: 18px 0;
  padding: 20px 22px;
  color: white;
  background: var(--forest-dark);
  border: 1px solid #143e2c;
  border-radius: 6px;
}

.next-action-band h2 {
  margin: 3px 0 2px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 550;
}

.next-action-band p {
  margin: 0;
  color: #c3d3cc;
  font-size: 11px;
}

.next-action-band > div:last-child {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.next-action-band .button-primary {
  color: var(--forest-dark);
  background: white;
  border-color: white;
}

.compact-panel {
  padding-bottom: 18px;
}

.goal-preview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.goal-preview article {
  min-width: 0;
  min-height: 86px;
  padding: 12px;
  background: white;
}

.goal-preview span {
  color: var(--wine);
  font-size: 9px;
  font-weight: 850;
}

.goal-preview b {
  display: block;
  margin-top: 5px;
  font-size: 11px;
  line-height: 1.35;
}

.pipeline-board {
  padding: 0;
  overflow: hidden;
}

.pipeline-board > .panel-header {
  padding: 20px 20px 0;
}

.stage-visual {
  display: flex;
  min-height: 62px;
  margin: 0 20px 20px;
  overflow-x: auto;
  overflow-y: hidden;
  background: #edf1ef;
  border: 1px solid var(--line);
  border-radius: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.stage-visual div {
  display: grid;
  align-content: center;
  min-width: 82px;
  padding: 8px 10px;
  color: var(--ink-soft);
  background: white;
  border-right: 1px solid var(--line);
}

.stage-visual div.is-populated {
  color: white;
  background: var(--teal);
}

.stage-visual span,
.stage-visual small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stage-visual span {
  font-size: 9px;
  font-weight: 800;
}

.stage-visual small {
  margin-top: 2px;
  font-size: 9px;
}

.table-wrap {
  width: 100%;
  overflow: auto;
  border-top: 1px solid var(--line);
}

.data-table {
  width: 100%;
  min-width: 960px;
  border-collapse: collapse;
}

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

.data-table th {
  color: var(--muted);
  background: #f6f8f7;
  font-size: 9px;
  font-weight: 850;
  text-transform: uppercase;
  white-space: nowrap;
}

.data-table td {
  color: var(--ink-soft);
  font-size: 11px;
}

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

.data-table td:first-child {
  min-width: 210px;
}

.data-table td b,
.data-table td small {
  display: block;
}

.data-table td small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.table-input,
.table-select {
  width: 100%;
  min-height: 32px;
  padding: 6px 8px;
  color: var(--ink-soft);
  background: white;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 10px;
}

.table-input:hover,
.table-select:hover,
.table-input:focus,
.table-select:focus {
  border-color: var(--line-strong);
}

.table-input.is-money {
  width: 112px;
  font-variant-numeric: tabular-nums;
}

.commission-cell {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.readiness-band {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin-bottom: 18px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow);
}

.readiness-band > div:not(.readiness-meter) {
  padding: 20px;
}

.readiness-band > div:nth-child(2) {
  border-left: 1px solid var(--line);
}

.readiness-band span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  text-transform: uppercase;
}

.readiness-band b {
  display: block;
  margin: 2px 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
  font-weight: 550;
}

.readiness-band p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.readiness-meter {
  grid-column: 1 / -1;
  height: 7px;
  background: #e5ebe8;
}

.readiness-meter i {
  display: block;
  width: 45%;
  height: 100%;
  background: var(--forest);
  transition: width 220ms var(--ease-out);
}

.checklist {
  display: grid;
}

.checklist label {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  min-height: 45px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.checklist label:last-child {
  border-bottom: 0;
}

.checklist input {
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  accent-color: var(--forest);
}

.checklist input:disabled {
  opacity: 1;
}

.checklist b {
  font-size: 11px;
  line-height: 1.35;
}

.checklist small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.checklist label.is-done b {
  color: var(--muted);
  text-decoration: line-through;
}

.guardrail-note {
  margin: 18px 0 0;
  padding: 13px 15px;
  color: #6c522e;
  background: var(--amber-soft);
  border: 1px solid #ead2aa;
  border-radius: 5px;
  font-size: 10px;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 18px;
  overflow: hidden;
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow);
}

.timeline article {
  position: relative;
  min-height: 180px;
  padding: 20px;
}

.timeline article + article {
  border-left: 1px solid var(--line);
}

.timeline article::after {
  position: absolute;
  right: 20px;
  bottom: 18px;
  left: 20px;
  height: 4px;
  content: "";
  background: var(--phase-color, var(--forest));
  border-radius: 1px;
}

.timeline article:nth-child(1) { --phase-color: var(--forest); }
.timeline article:nth-child(2) { --phase-color: var(--teal); }
.timeline article:nth-child(3) { --phase-color: var(--wine); }

.timeline span {
  color: var(--phase-color, var(--forest));
  font-size: 9px;
  font-weight: 850;
  text-transform: uppercase;
}

.timeline h2 {
  margin: 6px 0;
  font-size: 17px;
}

.timeline p,
.timeline small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.timeline small {
  margin-top: 10px;
  color: var(--ink-soft);
  font-weight: 750;
}

.goals-list {
  counter-reset: goals;
}

.goals-list article {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  counter-increment: goals;
}

.goals-list article:last-child {
  border-bottom: 0;
}

.goals-list article::before {
  content: counter(goals, decimal-leading-zero);
  color: var(--wine);
  font-size: 10px;
  font-weight: 850;
}

.goals-list b,
.goals-list span,
.goals-list small {
  display: block;
}

.goals-list b {
  font-size: 11px;
}

.goals-list span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.goals-list small {
  margin-top: 4px;
  color: var(--wine);
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
}

.deliverable-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: deliverables;
}

.deliverable-list li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 40px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  counter-increment: deliverables;
  font-size: 10px;
}

.deliverable-list li:last-child {
  border-bottom: 0;
}

.deliverable-list li::before {
  display: grid;
  width: 19px;
  height: 19px;
  place-items: center;
  content: counter(deliverables);
  color: var(--forest);
  background: var(--forest-soft);
  border-radius: 50%;
  font-size: 8px;
  font-weight: 850;
}

.claims-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
  overflow: hidden;
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow);
}

.claims-board > div {
  padding: 20px;
}

.claims-board > div:first-child {
  background: var(--forest-soft);
}

.claims-board > div:last-child {
  background: var(--danger-soft);
  border-left: 1px solid #ebcac6;
}

.claims-board ul {
  display: grid;
  gap: 8px;
  margin: 10px 0 0;
  padding-left: 17px;
}

.claims-board li {
  padding-left: 2px;
  font-size: 10px;
  line-height: 1.45;
}

.asset-list {
  display: grid;
  gap: 8px;
}

.asset-row {
  display: grid;
  grid-template-columns: 48px minmax(200px, 1.2fr) minmax(220px, 1fr) auto auto;
  align-items: center;
  gap: 16px;
  min-height: 78px;
  padding: 12px 14px;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: 5px;
  box-shadow: 0 5px 16px rgb(24 33 31 / 4%);
  text-decoration: none;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 140ms var(--ease-out);
}

.asset-row:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}

.asset-row:active {
  transform: scale(0.995);
}

.asset-type {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: white;
  background: var(--wine);
  border-radius: 4px;
  font-size: 9px;
  font-weight: 850;
}

.asset-row[data-type="MD"] .asset-type {
  background: var(--blue);
}

.asset-row > div {
  min-width: 0;
}

.asset-row b,
.asset-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-row b {
  font-size: 12px;
}

.asset-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.asset-status {
  color: var(--forest);
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.asset-open {
  color: var(--forest);
  font-size: 10px;
  font-weight: 850;
}

.asset-usage {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.asset-usage > div {
  padding: 18px;
}

.asset-usage > div + div {
  border-left: 1px solid var(--line);
}

.asset-usage b {
  display: block;
  margin-top: 3px;
  font-size: 12px;
}

.asset-usage p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.dialog {
  width: min(620px, calc(100vw - 28px));
  max-height: calc(100vh - 40px);
  padding: 0;
  overflow: auto;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  box-shadow: 0 24px 70px rgb(10 18 15 / 28%);
}

.dialog::backdrop {
  background: rgb(16 25 22 / 52%);
}

.dialog form {
  margin: 0;
}

.dialog header,
.dialog footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
}

.dialog header {
  border-bottom: 1px solid var(--line);
}

.dialog footer {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
}

.dialog header span {
  color: var(--forest);
  font-size: 9px;
  font-weight: 850;
  text-transform: uppercase;
}

.dialog h2 {
  margin: 2px 0 0;
  font-size: 17px;
}

.close-button {
  display: grid;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  place-items: center;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.close-button:hover {
  color: var(--ink);
  border-color: var(--line);
}

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

.form-grid label {
  display: grid;
  gap: 5px;
}

.form-grid label.full {
  grid-column: 1 / -1;
}

.form-grid label > span {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 750;
}

.form-grid input,
.form-grid select {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
}

.compact-dialog {
  width: min(560px, calc(100vw - 28px));
}

.rule-list {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.rule-list p {
  margin: 0;
  padding: 10px 12px;
  color: var(--ink-soft);
  background: #f5f7f6;
  border-left: 3px solid var(--forest);
  font-size: 10px;
}

.toast {
  position: fixed;
  z-index: 80;
  right: 20px;
  bottom: 20px;
  max-width: min(380px, calc(100vw - 40px));
  padding: 11px 14px;
  color: white;
  background: var(--ink);
  border: 1px solid #32403c;
  border-radius: 5px;
  box-shadow: 0 12px 34px rgb(16 25 22 / 25%);
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out);
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.load-error {
  max-width: 620px;
  padding: 28px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.load-error h1 {
  margin-top: 0;
  font-family: Georgia, "Times New Roman", serif;
}

@media (max-width: 1120px) {
  .topbar {
    grid-template-columns: 200px minmax(160px, 1fr) auto;
  }

  .topbar-actions .button-secondary {
    display: none;
  }

  .app-shell {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .overview-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(290px, 0.75fr);
  }

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

  .asset-row {
    grid-template-columns: 48px minmax(200px, 1.2fr) minmax(180px, 1fr) auto;
  }

  .asset-open {
    display: none;
  }
}

@media (max-width: 860px) {
  .topbar {
    position: relative;
    grid-template-columns: auto minmax(0, 1fr);
    min-height: 68px;
  }

  .topbar-context {
    display: none;
  }

  .topbar-actions {
    min-width: 0;
  }

  .model-control {
    grid-template-columns: repeat(2, minmax(82px, 1fr));
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    position: sticky;
    z-index: 30;
    top: 0;
    display: block;
    width: 100%;
    height: auto;
    padding: 8px 12px;
    overflow: hidden;
    border-right: 0;
    border-bottom: 1px solid var(--sidebar-line);
  }

  .partner-identity,
  .sidebar-status,
  .sidebar-note {
    display: none;
  }

  .sidebar-nav {
    display: flex;
    gap: 4px;
    margin: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .sidebar-nav::-webkit-scrollbar {
    display: none;
  }

  .sidebar-nav button {
    flex: 1 0 auto;
    min-height: 38px;
    padding: 7px 10px;
    white-space: nowrap;
  }

  .main {
    padding: 18px 18px 46px;
  }

  .truth-banner {
    margin-bottom: 22px;
  }

  .overview-grid,
  .pilot-grid,
  .checklist-grid {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .kpi-strip article:nth-child(3)::before {
    display: none;
  }

  .kpi-strip article:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

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

  .timeline article {
    min-height: 150px;
  }

  .timeline article + article {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .asset-row {
    grid-template-columns: 48px minmax(0, 1fr) auto;
  }

  .asset-row > div:nth-of-type(2) {
    display: none;
  }

  .asset-status {
    display: none;
  }
}

@media (max-width: 620px) {
  .topbar {
    grid-template-columns: 1fr;
    gap: 9px;
    padding: 10px 12px;
  }

  .topbar-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    justify-content: stretch;
  }

  .topbar-actions .button-primary {
    min-width: 92px;
  }

  .main {
    padding: 14px 12px 42px;
  }

  .truth-banner {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 10px;
  }

  .truth-banner p {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .page-heading {
    display: grid;
    gap: 16px;
  }

  .page-heading h1 {
    font-size: 29px;
  }

  .heading-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .kpi-strip article {
    min-height: 92px;
    padding: 15px;
  }

  .kpi-strip b {
    font-size: 21px;
  }

  .panel {
    padding: 16px;
  }

  .case-meta {
    grid-template-columns: 1fr;
  }

  .case-meta div + div {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .case-split {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

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

  .economics-total > div + div {
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .next-action-band {
    display: grid;
    gap: 16px;
    padding: 18px;
  }

  .next-action-band > div:last-child {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .goal-preview,
  .claims-board,
  .asset-usage,
  .readiness-band {
    grid-template-columns: minmax(0, 1fr);
  }

  .claims-board > div:last-child,
  .asset-usage > div + div,
  .readiness-band > div:nth-child(2) {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

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

  .form-grid label.full {
    grid-column: auto;
  }

  .asset-row {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
  }

  .asset-type {
    width: 38px;
    height: 38px;
  }
}

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

@media print {
  .topbar,
  .sidebar,
  .truth-banner,
  .heading-actions,
  .toast {
    display: none !important;
  }

  .app-shell {
    display: block;
  }

  .main {
    padding: 0;
  }

  .view:not(.is-active) {
    display: none;
  }

  .panel,
  .kpi-strip,
  .next-action-band {
    box-shadow: none;
    break-inside: avoid;
  }
}
