:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-2: #f5f5f5;
  --ink: #111111;
  --muted: #525252;
  --soft: #737373;
  --line: #e5e5e5;
  --line-strong: #d4d4d4;
  --charcoal: #111111;
  --charcoal-2: #262626;
  --teal: #2563eb;
  --teal-soft: #eff6ff;
  --green: #059669;
  --green-soft: #ecfdf5;
  --amber: #f97316;
  --amber-soft: #fff7ed;
  --coral: #dc2626;
  --coral-soft: #fef2f2;
  --blue: #2563eb;
  --blue-soft: #eff6ff;
  --signal: #2563eb;
  --signal-soft: #eff6ff;
  --signal-line: #bfdbfe;
  --shadow: 0 18px 48px rgba(17, 17, 17, 0.08);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-family: Satoshi, "Helvetica Neue", Arial, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-feature-settings: normal;
  letter-spacing: 0;
  overflow-x: hidden;
}

button,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.app-header {
  position: sticky;
  top: 0;
  display: flex;
  flex-wrap: nowrap;
  z-index: 10;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  width: 100%;
  padding: 10px 28px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 3px rgba(17, 17, 17, 0.04);
  overflow: hidden;
}

.brand {
  display: grid;
  flex: 1 1 0;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.brand > div {
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--signal-line);
  border-radius: 7px;
  color: var(--blue);
  background: var(--blue-soft);
  font-size: 0.68rem;
  font-weight: 600;
}

.brand strong,
.owner-card strong {
  display: block;
  overflow: hidden;
  font-size: 0.84rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand span,
.owner-card span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.35;
}

.built-link {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--signal-line);
  border-radius: 8px;
  color: var(--blue);
  background: var(--blue-soft);
  font-size: 0.72rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.built-link:hover {
  border-color: var(--blue);
  color: #ffffff;
  background: var(--blue);
}

.nav-list {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  align-items: center;
  margin: 0 0 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: thin;
}

.nav-item {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 7px;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
  font-size: 0.72rem;
  font-weight: 500;
  text-align: left;
}

.nav-item:hover,
.nav-item.active {
  color: #ffffff;
  background: var(--blue);
  border-color: var(--blue);
}

.nav-icon {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 5px;
  color: var(--muted);
  background: var(--surface-2);
  font-size: 0.52rem;
  font-weight: 600;
}

.nav-item.active .nav-icon {
  color: var(--blue);
  background: #ffffff;
}

.header-stack {
  display: flex;
  flex: 1 1 auto;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  max-width: calc(100% - 220px);
  overflow: hidden;
}

.sidebar-label {
  color: var(--soft);
  font-size: 0.58rem;
  font-weight: 600;
  text-transform: uppercase;
}

.mini-integrations {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: nowrap;
  gap: 6px;
  align-items: center;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 2px;
}

.tool-chip {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
  font-size: 0.68rem;
  white-space: nowrap;
}

.tool-chip strong {
  font-weight: 600;
}

.mini-integration {
  display: grid;
  align-items: center;
  justify-items: center;
  width: 28px;
  height: 28px;
  min-height: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.integration-mark {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 6px;
  color: #ffffff;
  font-size: 0.52rem;
  font-weight: 600;
}

.mini-integration > div:not(.integration-mark),
.mini-integration .status-dot {
  display: none;
}

.mini-integration strong {
  display: block;
  color: var(--ink);
  font-size: 0.8rem;
  line-height: 1.2;
}

.mini-integration span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.72rem;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 99px;
  background: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.owner-card {
  grid-template-columns: 42px 1fr;
  align-items: center;
  margin-top: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.owner-avatar {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  color: #ffffff;
  background: var(--blue);
  font-weight: 600;
}

.main {
  min-width: 0;
  width: min(1480px, 100vw);
  margin: 0 auto;
  padding: 18px 28px 32px;
}

.app-footer {
  width: min(1480px, 100vw);
  margin: 0 auto;
  padding: 0 28px 28px;
}

.app-footer p {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface);
  font-size: 0.76rem;
  line-height: 1.5;
}

.app-footer strong {
  color: var(--ink);
  font-weight: 600;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px;
  gap: 24px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
  min-width: 0;
}

.title-group {
  flex: 1;
  min-width: 0;
  max-width: none;
}

.title-group > p:not(.eyebrow) {
  max-width: 52ch;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 6px;
  font-size: clamp(1.2rem, 1.55vw, 1.55rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: 0;
}

.title-group > p:not(.eyebrow):not(.view-explainer) {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.38;
}

.view-explainer {
  display: none;
}

.topbar-actions {
  display: grid;
  grid-template-columns: 170px;
  gap: 8px;
  align-items: end;
  justify-content: end;
  flex: 0 0 auto;
  width: 170px;
  min-width: 0;
  margin-left: auto;
}

.control {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
}

select,
.ghost-button,
.action-button,
.drawer-close {
  min-height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface);
}

select {
  width: 100%;
  padding: 0 36px 0 12px;
}

.ghost-button,
.action-button {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  width: 100%;
  font-weight: 600;
  white-space: nowrap;
}

.ghost-button:hover,
.action-button:hover,
.drawer-close:hover {
  border-color: var(--blue);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.12);
}

.button-dot {
  width: 9px;
  height: 9px;
  border-radius: 99px;
  background: var(--blue);
}

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

.brief-card {
  display: grid;
  grid-template-columns: minmax(66px, auto) 1fr;
  gap: 12px;
  min-height: 92px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: none;
}

.brief-icon {
  display: grid;
  width: auto;
  min-width: 66px;
  height: 40px;
  place-items: center;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 600;
}

.brief-card strong {
  display: block;
  margin-bottom: 5px;
  font-size: 0.92rem;
  font-weight: 600;
}

.brief-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

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

.kpi-card {
  min-height: 172px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: none;
}

.kpi-card button {
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
}

.metric-topline {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  min-width: 0;
}

.metric-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
}

.metric-source {
  flex: 0 0 auto;
  padding: 4px 7px;
  border-radius: 7px;
  color: var(--muted);
  border: 1px solid var(--line);
  background: #ffffff;
  font-size: 0.68rem;
  font-weight: 600;
}

.metric-value {
  display: block;
  margin-bottom: 10px;
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0;
}

.metric-change {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 7px;
  font-size: 0.76rem;
  font-weight: 600;
}

.metric-change.good {
  color: #047857;
  background: var(--green-soft);
  box-shadow: inset 0 0 0 1px #bbf7d0;
}

.metric-change.watch {
  color: var(--ink);
  background: var(--amber-soft);
  box-shadow: inset 0 0 0 1px #fed7aa;
}

.metric-change.risk {
  color: #ffffff;
  background: var(--blue);
}

.metric-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.72fr);
  gap: 14px;
  align-items: start;
}

.content-grid.single-panel {
  grid-template-columns: 1fr;
}

.content-grid.single-panel .panel-main {
  padding: 14px;
}

.panel[hidden] {
  display: none;
}

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

.panel-main,
.panel-side {
  padding: 18px;
}

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

.panel-title {
  min-width: 0;
}

.panel-title h2 {
  margin-bottom: 5px;
  font-size: 1.18rem;
  line-height: 1.2;
}

.panel-title p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.outcome-hero {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(420px, 1.4fr);
  gap: 12px;
  align-items: stretch;
  margin-bottom: 12px;
}

.outcome-message {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  min-height: 128px;
  padding: 16px;
  border: 1px solid var(--signal-line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--signal-soft);
}

.outcome-message span {
  display: block;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 600;
  text-transform: uppercase;
}

.outcome-message strong {
  display: block;
  max-width: 17ch;
  margin-bottom: 10px;
  font-size: clamp(1.15rem, 1.7vw, 1.65rem);
  font-weight: 600;
  line-height: 1.08;
  overflow-wrap: normal;
  word-break: normal;
}

.outcome-message p {
  max-width: 42ch;
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.42;
}

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

.snapshot-card {
  min-height: 128px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.snapshot-card.watch {
  background: var(--signal-soft);
  border-color: var(--signal-line);
}

.snapshot-card strong {
  display: block;
  margin-bottom: 10px;
  font-size: clamp(1.15rem, 1.9vw, 1.8rem);
  line-height: 1;
}

.snapshot-card span {
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 600;
  text-transform: uppercase;
}

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

.decision-card {
  display: grid;
  gap: 7px;
  min-height: 126px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: inherit;
  background: #ffffff;
  text-align: left;
}

.decision-card:hover {
  border-color: var(--blue);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.1);
}

.decision-card.risk {
  color: var(--ink);
  background: var(--signal-soft);
  border-color: var(--signal-line);
  box-shadow: inset 3px 0 0 var(--signal);
}

.decision-card.watch {
  background: var(--amber-soft);
  border-color: #fed7aa;
}

.decision-card span,
.decision-card small {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 600;
  text-transform: uppercase;
}

.decision-card strong {
  font-size: 0.94rem;
  line-height: 1.2;
}

.decision-card b {
  align-self: end;
  font-size: 0.96rem;
  font-weight: 600;
}

.tools-line {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
  max-width: 720px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

.tools-line span,
.tools-line strong {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 7px;
  font-size: 0.68rem;
  font-weight: 600;
  white-space: nowrap;
}

.tools-line em {
  flex: 0 0 auto;
  min-width: 0;
  max-width: 100%;
  color: var(--muted);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: normal;
  white-space: nowrap;
}

.tools-line span {
  padding-left: 0;
  color: var(--muted);
  text-transform: uppercase;
}

.tools-line strong {
  border: 1px solid var(--line);
  background: #ffffff;
}

.segmented {
  display: inline-grid;
  grid-auto-flow: column;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.segmented button {
  min-height: 28px;
  padding: 0 9px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-size: 0.68rem;
  font-weight: 600;
}

.segmented button.active {
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 3px 8px rgba(37, 99, 235, 0.1);
}

.chart-wrap {
  display: grid;
  min-height: 310px;
  align-items: end;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, transparent, rgba(17, 17, 17, 0.02)),
    repeating-linear-gradient(to top, transparent 0, transparent 57px, rgba(148, 163, 184, 0.18) 58px);
}

.bar-chart {
  display: grid;
  grid-template-columns: repeat(6, minmax(36px, 1fr));
  gap: 14px;
  align-items: end;
  min-height: 250px;
}

.bar-group {
  display: grid;
  gap: 8px;
  align-items: end;
}

.bars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  align-items: end;
  min-height: 200px;
}

.bar {
  min-height: 14px;
  border-radius: 7px 7px 3px 3px;
}

.bar.actual {
  background: var(--blue);
}

.bar.target {
  background: var(--line-strong);
}

.bar-label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  text-align: center;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 600;
}

.legend-item {
  display: inline-flex;
  gap: 7px;
  align-items: center;
}

.legend-swatch {
  width: 11px;
  height: 11px;
  border-radius: 3px;
}

.flow-map {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.flow-node {
  min-height: 112px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.flow-node small {
  display: block;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
}

.flow-node strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.35rem;
}

.flow-node span {
  color: var(--muted);
  font-size: 0.78rem;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  min-width: 840px;
  border-collapse: collapse;
}

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

th {
  color: var(--muted);
  background: var(--surface-2);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
}

td {
  font-size: 0.86rem;
}

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

.status-pill {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  padding: 4px 8px;
  border-radius: 7px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid var(--line);
}

.status-pill.good {
  color: #047857;
  background: var(--green-soft);
  border-color: #bbf7d0;
}

.status-pill.watch {
  color: #9a3412;
  background: var(--amber-soft);
  border-color: #fed7aa;
}

.status-pill.risk {
  color: var(--ink);
  background: var(--signal-soft);
  border-color: var(--signal-line);
}

.status-pill.info {
  color: var(--ink);
  background: var(--blue-soft);
}

.attention-list,
.insight-list,
.job-board,
.integration-list,
.crew-list,
.source-list {
  display: grid;
  gap: 10px;
}

.attention-item,
.insight-item,
.integration-row,
.crew-row,
.source-row,
.job-card {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: inherit;
  background: #ffffff;
  text-align: left;
}

.jobs-table {
  min-width: 1080px;
}

.job-row {
  cursor: pointer;
}

.job-row:hover td {
  background: var(--surface-2);
}

.job-link {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
}

.job-link strong {
  font-size: 0.86rem;
}

.job-link span {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.35;
}

.note-copy {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

button.attention-item:hover,
button.insight-item:hover,
button.integration-row:hover,
button.job-card:hover,
button.crew-row:hover,
button.source-row:hover {
  border-color: var(--blue);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.1);
}

.row-topline {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 7px;
  min-width: 0;
}

.row-topline strong {
  min-width: 0;
  overflow: hidden;
  font-size: 0.9rem;
  line-height: 1.25;
  text-overflow: ellipsis;
}

.row-meta {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.progress-track {
  height: 9px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--surface-2);
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
}

.stacked-bars {
  display: grid;
  gap: 12px;
}

.stacked-row {
  display: grid;
  gap: 7px;
}

.stacked-head {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

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

.pipeline-col {
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 300px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.pipeline-title {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.job-card strong {
  display: block;
  margin-bottom: 7px;
}

.job-card p {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.42;
}

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

.job-health-card {
  display: grid;
  gap: 10px;
  width: 100%;
  min-height: 166px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: inherit;
  background: #ffffff;
  text-align: left;
}

.job-health-card:hover {
  border-color: var(--blue);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.1);
}

.job-health-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.job-cost-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.job-cost-line span {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  background: var(--surface-2);
  font-size: 0.7rem;
  font-weight: 600;
}

.job-profit-board {
  display: grid;
  gap: 8px;
}

.job-board-heading,
.job-board-row {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(150px, 0.55fr) minmax(260px, 1.2fr) minmax(210px, 0.8fr);
  gap: 10px 16px;
  align-items: start;
}

.job-board-heading {
  grid-template-columns: minmax(220px, 0.9fr) minmax(150px, 0.55fr) minmax(260px, 1.2fr) minmax(210px, 0.8fr);
  padding: 0 8px 3px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 600;
  text-transform: uppercase;
}

.job-board-heading span:last-child {
  display: none;
}

.job-board-row {
  width: 100%;
  min-width: 0;
  min-height: 106px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: inherit;
  background: #ffffff;
  text-align: left;
  grid-template-areas:
    "job action impact profit"
    "job source source source";
}

.job-board-row:hover {
  border-color: var(--blue);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.1);
}

.job-summary {
  display: grid;
  grid-area: job;
  gap: 4px;
  min-width: 0;
}

.job-summary strong {
  overflow: hidden;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-summary span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-id {
  color: var(--soft) !important;
  font-size: 0.64rem !important;
  font-weight: 600;
  text-transform: uppercase;
}

.owner-action,
.impact-cell,
.profit-meter,
.source-chips {
  min-width: 0;
}

.owner-action {
  grid-area: action;
}

.impact-cell {
  grid-area: impact;
}

.profit-meter {
  grid-area: profit;
}

.source-chips {
  grid-area: source;
}

.action-pill {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.action-pill.watch {
  background: var(--amber-soft);
  border-color: #fed7aa;
}

.action-pill.risk {
  color: var(--ink);
  background: var(--signal-soft);
  border-color: var(--signal-line);
}

.impact-cell {
  display: grid;
  gap: 5px;
}

.impact-cell strong {
  font-size: 0.88rem;
  line-height: 1.22;
  overflow-wrap: anywhere;
}

.impact-cell span {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
}

.profit-meter {
  display: grid;
  gap: 7px;
}

.money-topline,
.money-foot {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
}

.money-topline span,
.money-foot span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.money-topline strong {
  overflow: hidden;
  font-size: 0.78rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-money-track {
  height: 8px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--surface-2);
}

.job-money-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--signal);
}

.source-chips {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  align-self: end;
  overflow-x: auto;
  scrollbar-width: thin;
}

.source-chips span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  background: #ffffff;
  font-size: 0.66rem;
  font-weight: 600;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.job-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.job-meta span {
  padding: 4px 7px;
  border-radius: 7px;
  color: var(--muted);
  background: var(--surface-2);
  font-size: 0.7rem;
  font-weight: 600;
}

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

.funnel-step {
  display: grid;
  grid-template-columns: 110px 1fr 70px;
  gap: 10px;
  align-items: center;
}

.funnel-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.funnel-value {
  font-size: 0.82rem;
  font-weight: 600;
  text-align: right;
}

.detail-drawer {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 20;
  display: none;
  width: min(430px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  overflow: auto;
  padding: 18px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 30px 80px rgba(17, 17, 17, 0.22);
}

.detail-drawer.open {
  display: block;
}

.drawer-close {
  position: sticky;
  top: 0;
  float: right;
  width: 38px;
  padding: 0;
  color: var(--muted);
  font-weight: 600;
}

.drawer-kicker {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
}

.drawer-title {
  margin-bottom: 10px;
  font-size: 1.35rem;
  line-height: 1.15;
}

.drawer-copy {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.drawer-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}

.drawer-metric {
  min-height: 88px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.drawer-metric span {
  display: block;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
}

.drawer-metric strong {
  font-size: 1.25rem;
}

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

.drawer-list li {
  padding: 10px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.drawer-list strong {
  display: block;
  color: var(--ink);
  font-size: 0.86rem;
}

.drawer-list span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.72rem;
}

.drawer-list p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.drawer-section-title {
  margin: 2px 0 8px;
  font-size: 0.9rem;
}

.side-metrics {
  grid-template-columns: 1fr;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 30;
  transform: translate(-50%, 120%);
  min-width: 220px;
  padding: 12px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 18px 42px rgba(17, 17, 17, 0.16);
  font-weight: 600;
  opacity: 0;
  transition: transform 180ms ease, opacity 180ms ease;
}

.toast.show {
  transform: translate(-50%, 0);
  opacity: 1;
}

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

@media (max-width: 1080px) {
  .job-board-heading {
    display: none;
  }

  .job-board-row {
    grid-template-columns: 1fr;
    grid-template-areas:
      "job"
      "action"
      "impact"
      "profit"
      "source";
  }

  .job-board-row > .owner-action,
  .job-board-row > .impact-cell,
  .job-board-row > .profit-meter,
  .job-board-row > .source-chips {
    grid-column: 1 / -1;
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 880px) {
  .main {
    padding: 16px;
  }

  .panel-header {
    display: grid;
  }

  .brief-strip,
  .kpi-grid,
  .flow-map,
  .pipeline-grid,
  .outcome-hero {
    grid-template-columns: 1fr;
  }

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

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

  .tools-line {
    justify-content: flex-start;
  }

}

@media (max-width: 760px) {
  .app-header {
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
  }

  .header-stack {
    width: 100%;
  }

  .mini-integrations {
    flex-wrap: nowrap;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

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

  .topbar-actions {
    grid-template-columns: 170px;
    justify-content: end;
    margin-left: auto;
  }

  .control,
  select {
    width: 100%;
  }

  .app-footer {
    padding: 0 16px 24px;
  }
}

@media (max-width: 620px) {
  .app-header {
    display: flex;
    flex-wrap: nowrap;
    min-height: 54px;
    padding: 9px 12px;
  }

  .brand {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 8px;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
  }

  .brand strong {
    font-size: 0.76rem;
  }

  .brand span {
    font-size: 0.64rem;
  }

  .built-link {
    justify-self: auto;
    min-height: 29px;
    padding: 0 8px;
    font-size: 0.64rem;
  }

  h1 {
    font-size: 1.28rem;
  }

  .title-group > p:not(.eyebrow),
  .view-explainer {
    max-width: 38ch;
  }

  .brief-strip,
  .kpi-grid,
  .flow-map,
  .pipeline-grid,
  .decision-grid,
  .drawer-metrics {
    grid-template-columns: 1fr;
  }

  .nav-list {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 12px;
  }

  .nav-item {
    flex: 0 0 auto;
  }

  .topbar-actions {
    grid-template-columns: 1fr;
    justify-content: stretch;
    margin-left: 0;
  }

  .topbar {
    grid-template-columns: 1fr;
  }

  .outcome-message,
  .snapshot-card,
  .decision-card {
    min-height: auto;
  }

  .outcome-message {
    padding: 12px;
  }

  .outcome-message span {
    margin-bottom: 6px;
    font-size: 0.58rem;
  }

  .outcome-message strong {
    max-width: 28ch;
    margin-bottom: 0;
    font-size: 0.96rem;
    line-height: 1.18;
  }

  .outcome-message p {
    display: none;
  }

  .snapshot-card {
    padding: 12px;
  }

  .decision-card {
    padding: 12px;
  }

  .money-topline,
  .money-foot {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .bar-chart {
    gap: 8px;
    grid-template-columns: repeat(3, minmax(42px, 1fr));
  }

  .funnel-step {
    grid-template-columns: 82px 1fr 52px;
  }
}
