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

:root {
  color-scheme: light;
  --navy-950: #061a28;
  --navy-900: #092437;
  --navy-800: #0c3047;
  --blue-700: #0e638f;
  --blue-600: #1085b9;
  --blue-500: #27a7d2;
  --cyan-300: #83d9e8;
  --teal-700: #08796b;
  --teal-600: #0c9481;
  --teal-100: #dff6f1;
  --red-600: #c84755;
  --red-100: #fdecee;
  --amber-600: #b97816;
  --amber-100: #fff3d8;
  --ink: #0a1f33;
  --ink-soft: #42566a;
  --muted: #718094;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --surface-3: #eef3f7;
  --line: #dce5ec;
  --line-strong: #c9d5de;
  --canvas: #f3f6f9;
  --shadow-sm: 0 1px 2px rgba(4, 27, 43, 0.04), 0 5px 16px rgba(4, 27, 43, 0.04);
  --shadow-lg: 0 22px 70px rgba(4, 27, 43, 0.16);
  --radius-sm: 9px;
  --radius: 15px;
  --radius-lg: 22px;
  --rail-width: 256px;
  --topbar-height: 68px;
}

[data-theme="dark"] {
  color-scheme: dark;
  --ink: #ecf5f8;
  --ink-soft: #a9bdc8;
  --muted: #829aa8;
  --surface: #0c2635;
  --surface-2: #102f40;
  --surface-3: #173b4d;
  --line: #244557;
  --line-strong: #31586b;
  --canvas: #071d2b;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.18), 0 7px 20px rgba(0, 0, 0, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--canvas);
  color: var(--ink);
  font:
    14px/1.5 "DM Sans",
    system-ui,
    sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--blue-500) 45%, transparent);
  outline-offset: 2px;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  left: 16px;
  top: -80px;
  padding: 10px 14px;
  border-radius: 0 0 10px 10px;
  background: #fff;
  color: #082336;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--rail-width) minmax(0, 1fr);
}

.app-rail {
  position: sticky;
  z-index: 30;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 18px 14px;
  background:
    radial-gradient(circle at 20% -10%, rgba(40, 164, 207, 0.22), transparent 32%),
    linear-gradient(180deg, var(--navy-900), var(--navy-950));
  color: #d7e5eb;
}

.brand-lockup {
  min-height: 52px;
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 2px 7px 13px;
}

.brand-lockup img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.28));
}

.brand-lockup strong,
.brand-lockup span {
  display: block;
}

.brand-lockup strong {
  color: #fff;
  font:
    700 15px/1.2 "Manrope",
    sans-serif;
}

.brand-lockup span {
  margin-top: 3px;
  color: #87a7b7;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.workspace-switcher {
  width: 100%;
  display: grid;
  grid-template-columns: 30px 1fr auto;
  align-items: center;
  gap: 9px;
  margin: 8px 0 20px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: #dce9ed;
  text-align: left;
}

.workspace-switcher:hover {
  background: rgba(255, 255, 255, 0.1);
}

.workspace-mark {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--blue-500), var(--teal-600));
  color: white;
  font:
    800 10px "Manrope",
    sans-serif;
}

.workspace-switcher b,
.workspace-switcher small {
  display: block;
}

.workspace-switcher b {
  font-size: 12px;
}

.workspace-switcher small {
  margin-top: 2px;
  color: #8eabba;
  font-size: 10px;
}

#primary-nav {
  min-height: 0;
  overflow-y: auto;
  padding: 0 2px 18px;
  scrollbar-width: thin;
}

.nav-group + .nav-group {
  margin-top: 18px;
}

.nav-label {
  margin: 0 10px 7px;
  color: #64889a;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.nav-item {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 3px 0;
  padding: 10px 11px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #a9c0cb;
  text-align: left;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.065);
  color: #f4fbfd;
  transform: translateX(2px);
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(28, 137, 180, 0.25), rgba(23, 112, 150, 0.1));
  color: #fff;
  box-shadow: inset 2px 0 var(--cyan-300);
}

.nav-item svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
}

.nav-item em {
  margin-left: auto;
  padding: 2px 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.1);
  color: #9fc8d8;
  font-size: 9px;
  font-style: normal;
}

.rail-footer {
  margin-top: auto;
  padding: 15px 8px 2px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.environment-badge {
  color: #cee6e8;
  font-size: 11px;
  font-weight: 700;
}

.environment-badge span,
.live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: #43c59e;
  box-shadow: 0 0 0 4px rgba(67, 197, 158, 0.1);
}

.rail-footer p {
  margin: 5px 0 12px;
  color: #6e909f;
  font-size: 10px;
}

.rail-help {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 0;
  border: 0;
  background: transparent;
  color: #8facba;
  font-size: 11px;
}

.rail-help:first-letter {
  font-weight: 800;
}

.app-stage {
  min-width: 0;
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(18px);
}

.topbar-start,
.topbar-actions {
  display: flex;
  align-items: center;
}

.topbar-actions {
  gap: 8px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.breadcrumb b {
  color: var(--line-strong);
}

.breadcrumb strong {
  color: var(--ink);
  font-weight: 700;
}

.select-control.compact {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 120px;
  height: 40px;
  padding: 5px 8px 5px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
}

.select-control.compact span {
  position: absolute;
  top: 3px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.select-control.compact select {
  width: 100%;
  padding: 9px 17px 0 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  appearance: auto;
}

.search-trigger {
  min-width: 176px;
  height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px 0 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--muted);
}

.search-trigger:hover {
  border-color: var(--line-strong);
  color: var(--ink-soft);
}

.search-trigger kbd,
.palette-search kbd {
  margin-left: auto;
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  color: var(--muted);
  font-size: 9px;
  font-family: inherit;
}

.icon-button,
.notification-button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink-soft);
}

.icon-button:hover,
.notification-button:hover {
  background: var(--surface-2);
}

.notification-button {
  position: relative;
}

.notification-button span {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  border: 2px solid var(--surface);
  border-radius: 99px;
  background: var(--red-600);
  color: white;
  font-size: 8px;
  font-weight: 800;
}

.profile-button {
  min-width: 147px;
  height: 46px;
  display: grid;
  grid-template-columns: 32px 1fr;
  grid-template-rows: 1fr 1fr;
  column-gap: 8px;
  align-items: center;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  box-shadow: var(--shadow-sm);
}

.profile-button > span {
  grid-row: 1 / 3;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--navy-800), var(--blue-600));
  color: white;
  font-size: 10px;
  font-weight: 800;
}

.profile-button b {
  align-self: end;
  font-size: 10px;
}

.profile-button small {
  align-self: start;
  color: var(--muted);
  font-size: 9px;
}

.mobile-menu,
.rail-close {
  display: none;
}

.evidence-ribbon {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 29px;
  border-bottom: 1px solid color-mix(in srgb, var(--teal-600) 20%, var(--line));
  background: color-mix(in srgb, var(--teal-100) 55%, var(--surface));
  color: color-mix(in srgb, var(--teal-700) 75%, var(--ink));
  font-size: 10px;
}

.evidence-ribbon b {
  color: var(--teal-700);
}

.ribbon-separator {
  width: 1px;
  height: 14px;
  background: color-mix(in srgb, var(--teal-600) 25%, transparent);
}

.evidence-ribbon button {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--teal-700);
  font-size: 10px;
  font-weight: 700;
}

.workspace {
  width: min(100%, 1640px);
  margin: 0 auto;
  padding: 30px 30px 48px;
}

.view-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 21px;
}

.section-kicker {
  display: block;
  margin-bottom: 7px;
  color: var(--blue-700);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.view-header h1 {
  max-width: 820px;
  margin: 0;
  font:
    800 clamp(28px, 3.2vw, 44px)/1.07 "Manrope",
    sans-serif;
  letter-spacing: -0.045em;
}

.view-header p {
  max-width: 750px;
  margin: 9px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.view-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 18px;
}

.primary-button,
.secondary-button,
.ghost-button,
.segmented button {
  min-height: 38px;
  padding: 8px 13px;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 700;
}

.primary-button {
  border: 1px solid var(--blue-700);
  background: linear-gradient(135deg, var(--blue-700), var(--blue-600));
  color: white;
  box-shadow: 0 8px 18px rgba(16, 133, 185, 0.18);
}

.primary-button:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.secondary-button {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink-soft);
}

.secondary-button:hover {
  border-color: var(--blue-500);
  color: var(--blue-700);
}

.ghost-button {
  border: 0;
  background: transparent;
  color: var(--blue-700);
}

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

.card.interactive {
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.card.interactive:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--blue-500) 35%, var(--line));
  box-shadow: 0 10px 30px rgba(4, 27, 43, 0.08);
}

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

.metric-card {
  position: relative;
  min-height: 136px;
  padding: 17px 18px;
  overflow: hidden;
}

.metric-card::after {
  content: "";
  position: absolute;
  width: 105px;
  height: 105px;
  right: -45px;
  top: -55px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--blue-500) 7%, transparent);
}

.metric-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.metric-top button {
  width: 20px;
  height: 20px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 10px;
}

.metric-value {
  display: block;
  margin: 9px 0 5px;
  font:
    800 28px/1.05 "Manrope",
    sans-serif;
  letter-spacing: -0.04em;
}

.metric-delta {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
}

.metric-delta.positive {
  color: var(--teal-700);
}

.metric-delta.negative {
  color: var(--red-600);
}

.sparkline {
  position: absolute;
  right: 15px;
  bottom: 14px;
  width: 76px;
  height: 27px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.72fr);
  gap: 14px;
}

.dashboard-grid + .dashboard-grid,
.section-grid {
  margin-top: 14px;
}

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

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

.panel {
  padding: 18px;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 15px;
}

.panel-head h2,
.panel-head h3 {
  margin: 0;
  font:
    750 16px/1.25 "Manrope",
    sans-serif;
  letter-spacing: -0.02em;
}

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

.panel-menu {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
}

.segmented {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: 9px;
  background: var(--surface-3);
}

.segmented button {
  min-height: 28px;
  padding: 5px 9px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 9px;
}

.segmented button.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.chart-wrap {
  position: relative;
  min-height: 260px;
}

.chart-wrap.compact {
  min-height: 210px;
}

.chart-svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.chart-grid-line {
  stroke: var(--line);
  stroke-width: 1;
}

.chart-axis-label {
  fill: var(--muted);
  font:
    9px "DM Sans",
    sans-serif;
}

.chart-path-primary {
  fill: none;
  stroke: var(--blue-600);
  stroke-width: 2.8;
}

.chart-path-secondary {
  fill: none;
  stroke: var(--teal-600);
  stroke-width: 2.4;
}

.chart-area {
  fill: url(#area-gradient);
}

.chart-point {
  fill: var(--surface);
  stroke: var(--blue-600);
  stroke-width: 2.4;
  cursor: pointer;
}

.chart-point:hover,
.chart-point:focus {
  r: 5.5;
  fill: var(--blue-600);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
  color: var(--muted);
  font-size: 9px;
}

.legend span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.legend i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

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

.decision-row {
  width: 100%;
  display: grid;
  grid-template-columns: 5px 1fr auto;
  gap: 11px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-2);
  color: var(--ink);
  text-align: left;
}

.decision-row:hover {
  border-color: var(--line-strong);
  background: var(--surface-3);
}

.priority-bar {
  width: 4px;
  height: 36px;
  border-radius: 99px;
  background: var(--amber-600);
}

.priority-bar.high {
  background: var(--red-600);
}

.decision-row b,
.decision-row small {
  display: block;
}

.decision-row b {
  font-size: 11px;
}

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

.decision-row time {
  color: var(--muted);
  font-size: 8px;
  white-space: nowrap;
}

.donut-layout {
  display: grid;
  grid-template-columns: minmax(130px, 0.85fr) minmax(160px, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 215px;
}

.donut {
  position: relative;
  width: min(175px, 100%);
  aspect-ratio: 1;
  margin: auto;
  border-radius: 50%;
}

.donut::after {
  content: "";
  position: absolute;
  inset: 24%;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line);
}

.donut-center {
  position: absolute;
  z-index: 2;
  inset: 34%;
  display: grid;
  place-items: center;
  text-align: center;
}

.donut-center b {
  font:
    800 18px "Manrope",
    sans-serif;
}

.donut-center small {
  color: var(--muted);
  font-size: 8px;
}

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

.legend-button {
  width: 100%;
  display: grid;
  grid-template-columns: 8px 1fr auto;
  align-items: center;
  gap: 7px;
  padding: 5px 0;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  text-align: left;
  font-size: 9px;
}

.legend-button:hover {
  color: var(--ink);
}

.legend-button i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

.legend-button b {
  font-weight: 700;
}

.readiness-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.readiness-step {
  min-height: 74px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
}

.readiness-step span {
  display: inline-grid;
  place-items: center;
  width: 21px;
  height: 21px;
  margin-bottom: 7px;
  border-radius: 50%;
  background: var(--teal-100);
  color: var(--teal-700);
  font-size: 9px;
  font-weight: 800;
}

.readiness-step.warn span {
  background: var(--amber-100);
  color: var(--amber-600);
}

.readiness-step b,
.readiness-step small {
  display: block;
}

.readiness-step b {
  font-size: 9px;
}

.readiness-step small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.data-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10px;
}

.data-table th {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line-strong);
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.data-table td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  white-space: nowrap;
}

.data-table tbody tr {
  cursor: pointer;
}

.data-table tbody tr:hover {
  background: var(--surface-2);
}

.data-table td strong {
  color: var(--ink);
}

.bar-meter {
  min-width: 100px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.bar-meter span {
  width: 74px;
  height: 5px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--surface-3);
}

.bar-meter i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--blue-600), var(--cyan-300));
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  border-radius: 99px;
  background: var(--surface-3);
  color: var(--ink-soft);
  font-size: 8px;
  font-weight: 800;
  white-space: nowrap;
}

.status-pill::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.status-pill.good,
.status-pill.pass,
.status-pill.positive {
  background: var(--teal-100);
  color: var(--teal-700);
}

.status-pill.warn,
.status-pill.medium {
  background: var(--amber-100);
  color: var(--amber-600);
}

.status-pill.risk,
.status-pill.high,
.status-pill.negative {
  background: var(--red-100);
  color: var(--red-600);
}

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

.funnel-row {
  display: grid;
  grid-template-columns: 110px 1fr 62px;
  align-items: center;
  gap: 9px;
  color: var(--ink-soft);
  font-size: 9px;
}

.funnel-track {
  height: 20px;
  overflow: hidden;
  border-radius: 6px;
  background: var(--surface-3);
}

.funnel-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--navy-800), var(--blue-500));
}

.funnel-row b {
  text-align: right;
}

.risk-matrix {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, minmax(100px, 1fr));
  gap: 6px;
}

.risk-cell {
  position: relative;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
}

.risk-cell:nth-child(2) {
  background: color-mix(in srgb, var(--amber-100) 60%, var(--surface));
}
.risk-cell:nth-child(4) {
  background: color-mix(in srgb, var(--red-100) 55%, var(--surface));
}

.risk-cell small {
  color: var(--muted);
  font-size: 8px;
  text-transform: uppercase;
}

.risk-chip {
  display: inline-flex;
  margin: 6px 4px 0 0;
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 8px;
}

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

.fixture-card {
  padding: 14px;
}

.fixture-card .fixture-date {
  color: var(--blue-700);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.fixture-card h3 {
  margin: 8px 0 2px;
  font:
    750 13px "Manrope",
    sans-serif;
}

.fixture-card p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 9px;
}

.fixture-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.fixture-metrics div {
  padding: 7px;
  border-radius: 8px;
  background: var(--surface-2);
}

.fixture-metrics b,
.fixture-metrics small {
  display: block;
}

.fixture-metrics b {
  font-size: 11px;
}

.fixture-metrics small {
  color: var(--muted);
  font-size: 7px;
  text-transform: uppercase;
}

.comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.program-card {
  position: relative;
  overflow: hidden;
  padding: 20px;
}

.program-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--blue-600);
}

.program-card.women::before {
  background: var(--teal-600);
}

.program-card h2 {
  margin: 0 0 5px;
  font:
    800 22px "Manrope",
    sans-serif;
}

.program-card > p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 10px;
}

.program-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.program-metrics div {
  padding: 11px;
  border-radius: 10px;
  background: var(--surface-2);
}

.program-metrics b,
.program-metrics small {
  display: block;
}

.program-metrics b {
  font:
    750 16px "Manrope",
    sans-serif;
}

.program-metrics small {
  color: var(--muted);
  font-size: 8px;
}

.scenario-layout {
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) minmax(0, 1.1fr);
  gap: 14px;
}

.scenario-controls {
  display: grid;
  gap: 14px;
}

.range-control {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px 12px;
}

.range-control label {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 700;
}

.range-control output {
  color: var(--ink);
  font:
    750 12px "Manrope",
    sans-serif;
}

.range-control input {
  grid-column: 1 / 3;
  width: 100%;
  accent-color: var(--blue-600);
}

.range-scale {
  grid-column: 1 / 3;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 7px;
}

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

.scenario-output {
  padding: 14px;
  border-radius: 11px;
  background: var(--surface-2);
}

.scenario-output small,
.scenario-output b,
.scenario-output span {
  display: block;
}

.scenario-output small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
}

.scenario-output b {
  margin: 6px 0 3px;
  font:
    800 24px "Manrope",
    sans-serif;
}

.scenario-output span {
  color: var(--muted);
  font-size: 8px;
}

.scenario-waterfall {
  display: flex;
  align-items: end;
  gap: 6px;
  min-height: 190px;
  padding-top: 24px;
}

.waterfall-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  height: 160px;
}

.waterfall-column i {
  width: 70%;
  min-height: 4px;
  border-radius: 5px 5px 2px 2px;
  background: var(--blue-600);
}

.waterfall-column.negative i {
  background: var(--red-600);
}

.waterfall-column.total i {
  background: var(--teal-600);
}

.waterfall-column b {
  font-size: 8px;
}

.waterfall-column span {
  color: var(--muted);
  font-size: 7px;
  text-align: center;
}

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

.decision-card {
  padding: 16px;
}

.decision-card h3 {
  min-height: 39px;
  margin: 12px 0 8px;
  font:
    750 13px/1.4 "Manrope",
    sans-serif;
}

.decision-card p {
  min-height: 42px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 9px;
}

.decision-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.decision-meta small,
.decision-meta b {
  display: block;
}

.decision-meta small {
  color: var(--muted);
  font-size: 7px;
  text-transform: uppercase;
}

.decision-meta b {
  margin-top: 2px;
  font-size: 9px;
}

.quality-score {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 18px;
  align-items: center;
}

.score-ring {
  position: relative;
  width: 138px;
  height: 138px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--teal-600) 0 100%, var(--surface-3) 0);
}

.score-ring::after {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  background: var(--surface);
}

.score-ring div {
  position: relative;
  z-index: 1;
  text-align: center;
}

.score-ring b {
  display: block;
  font:
    800 30px "Manrope",
    sans-serif;
}

.score-ring small {
  color: var(--muted);
  font-size: 8px;
}

.lineage {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  gap: 8px;
}

.lineage-node {
  position: relative;
  min-height: 78px;
  display: grid;
  place-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-2);
  text-align: center;
}

.lineage-node:not(:last-child)::after {
  content: "→";
  position: absolute;
  right: -12px;
  color: var(--muted);
}

.lineage-node b,
.lineage-node small {
  display: block;
}

.lineage-node b {
  font-size: 9px;
}

.lineage-node small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 7px;
}

.permission-grid {
  display: grid;
  grid-template-columns: 1.2fr repeat(5, minmax(78px, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  font-size: 8px;
}

.permission-grid > div {
  min-height: 39px;
  display: grid;
  place-items: center;
  padding: 8px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.permission-grid > div:nth-child(6n) {
  border-right: 0;
}

.permission-grid .permission-head {
  background: var(--surface-3);
  color: var(--ink-soft);
  font-weight: 800;
}

.permission-grid .permission-label {
  place-items: center start;
  background: var(--surface-2);
  color: var(--ink);
  font-weight: 700;
  text-align: left;
}

.permission-yes {
  color: var(--teal-700);
  font-weight: 800;
}
.permission-no {
  color: var(--muted);
}
.permission-limited {
  color: var(--amber-600);
  font-weight: 800;
}

.empty-note,
.callout {
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--ink-soft);
  font-size: 10px;
}

.callout.info {
  border-color: color-mix(in srgb, var(--blue-500) 28%, var(--line));
  background: color-mix(in srgb, var(--blue-500) 6%, var(--surface));
}

.callout.warn {
  border-color: color-mix(in srgb, var(--amber-600) 28%, var(--line));
  background: color-mix(in srgb, var(--amber-100) 50%, var(--surface));
}

.modal-backdrop {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: start center;
  padding: 12vh 18px 18px;
  background: rgba(3, 18, 28, 0.58);
  backdrop-filter: blur(7px);
}

.modal-backdrop[hidden] {
  display: none;
}

.command-palette {
  width: min(620px, 100%);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.palette-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
}

.palette-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  outline: none;
}

.palette-body {
  max-height: 410px;
  overflow-y: auto;
  padding: 10px;
}

.palette-body > p {
  margin: 4px 7px 8px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.palette-result {
  width: 100%;
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.palette-result:hover,
.palette-result.selected {
  background: var(--surface-2);
}

.palette-result > span:first-child {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--surface-3);
  color: var(--blue-700);
}

.palette-result b,
.palette-result small {
  display: block;
}

.palette-result b {
  font-size: 11px;
}

.palette-result small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.palette-result kbd {
  color: var(--muted);
  font: 9px inherit;
}

.command-palette footer {
  display: flex;
  gap: 16px;
  padding: 9px 15px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 8px;
}

.tour-modal {
  position: relative;
  width: min(720px, 100%);
  padding: 30px;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.tour-modal h2 {
  margin: 0;
  font:
    800 30px/1.1 "Manrope",
    sans-serif;
  letter-spacing: -0.04em;
}

.tour-modal > p {
  max-width: 570px;
  color: var(--ink-soft);
}

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

.tour-grid article {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
}

.tour-grid span {
  display: block;
  margin-bottom: 12px;
  color: var(--blue-700);
  font:
    800 10px "Manrope",
    sans-serif;
}

.tour-grid b {
  font:
    750 13px "Manrope",
    sans-serif;
}

.tour-grid p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 9px;
}

.modal-close {
  position: absolute;
  right: 16px;
  top: 16px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--muted);
}

.detail-drawer {
  position: fixed;
  z-index: 90;
  top: 0;
  right: 0;
  width: min(470px, 94vw);
  height: 100vh;
  overflow-y: auto;
  border-left: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  transform: translateX(104%);
  transition: transform 0.26s ease;
}

.detail-drawer.open {
  transform: translateX(0);
}

.drawer-head {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 22px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(12px);
}

.drawer-head h2 {
  margin: 0;
  font:
    800 23px/1.15 "Manrope",
    sans-serif;
  letter-spacing: -0.035em;
}

.drawer-body {
  padding: 22px;
}

.drawer-section + .drawer-section {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.drawer-section h3 {
  margin: 0 0 8px;
  font:
    750 12px "Manrope",
    sans-serif;
}

.drawer-section p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 10px;
}

.drawer-kpis {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.drawer-kpis div {
  padding: 12px;
  border-radius: 10px;
  background: var(--surface-2);
}

.drawer-kpis small,
.drawer-kpis b {
  display: block;
}

.drawer-kpis small {
  color: var(--muted);
  font-size: 7px;
  text-transform: uppercase;
}

.drawer-kpis b {
  margin-top: 4px;
  font:
    750 15px "Manrope",
    sans-serif;
}

.drawer-scrim {
  position: fixed;
  z-index: 80;
  inset: 0;
  background: rgba(3, 18, 28, 0.36);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease;
}

.drawer-scrim.open {
  opacity: 1;
  pointer-events: auto;
}

.toast-region {
  position: fixed;
  z-index: 120;
  right: 20px;
  bottom: 20px;
  display: grid;
  gap: 8px;
}

.toast {
  min-width: 260px;
  max-width: 360px;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
  animation: toast-in 0.22s ease both;
}

.toast > span {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--teal-100);
  color: var(--teal-700);
}

.toast b,
.toast small {
  display: block;
}

.toast b {
  font-size: 10px;
}
.toast small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.tooltip {
  position: fixed;
  z-index: 140;
  max-width: 230px;
  padding: 7px 9px;
  border-radius: 7px;
  background: var(--navy-950);
  color: white;
  font-size: 8px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition:
    opacity 0.12s ease,
    transform 0.12s ease;
}

.tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

.mobile-scrim {
  display: none;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

@media (max-width: 1240px) {
  :root {
    --rail-width: 230px;
  }
  .topbar {
    padding-inline: 20px;
  }
  .workspace {
    padding-inline: 22px;
  }
  .profile-button {
    min-width: 45px;
    width: 45px;
    grid-template-columns: 1fr;
  }
  .profile-button > span {
    grid-row: auto;
  }
  .profile-button b,
  .profile-button small {
    display: none;
  }
  .search-trigger {
    min-width: 42px;
    width: 42px;
    justify-content: center;
    padding: 0;
  }
  .search-trigger > span:not(.search-icon),
  .search-trigger kbd {
    display: none;
  }
  .fixture-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1020px) {
  .app-shell {
    grid-template-columns: 1fr;
  }
  .app-rail {
    position: fixed;
    left: 0;
    width: min(280px, 86vw);
    transform: translateX(-104%);
    transition: transform 0.24s ease;
  }
  .app-rail.open {
    transform: translateX(0);
  }
  .mobile-scrim {
    position: fixed;
    z-index: 25;
    inset: 0;
    display: block;
    background: rgba(3, 18, 28, 0.46);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }
  .mobile-scrim.open {
    opacity: 1;
    pointer-events: auto;
  }
  .mobile-menu,
  .rail-close {
    display: grid;
  }
  .rail-close {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: white;
  }
  .topbar {
    padding-inline: 16px;
  }
  .workspace {
    padding: 24px 18px 40px;
  }
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dashboard-grid,
  .scenario-layout {
    grid-template-columns: 1fr;
  }
  .span-3,
  .span-4,
  .span-5,
  .span-6,
  .span-7,
  .span-8,
  .span-9 {
    grid-column: span 12;
  }
  .decision-board {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .topbar {
    height: 60px;
  }
  .breadcrumb span,
  .breadcrumb b {
    display: none;
  }
  .topbar-actions .select-control.compact,
  .notification-button,
  .profile-button {
    display: none;
  }
  .evidence-ribbon {
    padding-inline: 16px;
  }
  .evidence-ribbon > span:not(.live-dot):not(#filter-summary),
  .evidence-ribbon > b {
    display: none;
  }
  .evidence-ribbon button {
    white-space: nowrap;
  }
  .workspace {
    padding-inline: 14px;
  }
  .view-header {
    display: block;
  }
  .view-header h1 {
    font-size: 30px;
  }
  .view-actions {
    padding-top: 14px;
  }
  .metric-grid {
    grid-template-columns: 1fr;
  }
  .metric-card {
    min-height: 122px;
  }
  .fixture-grid,
  .comparison-grid,
  .decision-board,
  .tour-grid {
    grid-template-columns: 1fr;
  }
  .readiness-strip {
    grid-template-columns: repeat(2, 1fr);
  }
  .program-metrics {
    grid-template-columns: 1fr 1fr;
  }
  .quality-score {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
  .lineage {
    grid-template-columns: 1fr;
  }
  .lineage-node:not(:last-child)::after {
    content: "↓";
    right: 50%;
    bottom: -14px;
    top: auto;
  }
  .permission-grid {
    grid-template-columns: 130px repeat(5, 82px);
    min-width: 540px;
  }
  .donut-layout {
    grid-template-columns: 1fr;
  }
  .scenario-output-grid {
    grid-template-columns: 1fr;
  }
}

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

@media print {
  .app-rail,
  .topbar,
  .evidence-ribbon,
  .view-actions,
  .modal-backdrop,
  .detail-drawer,
  .drawer-scrim,
  .toast-region {
    display: none !important;
  }
  .app-shell {
    display: block;
  }
  .workspace {
    max-width: none;
    padding: 0;
  }
  body {
    background: white;
    color: black;
  }
  .card {
    break-inside: avoid;
    box-shadow: none;
  }
}

/* PCFC control-room presentation theme */

:root,
[data-theme="dark"] {
  color-scheme: dark;
  --navy-950: #030711;
  --navy-900: #050b17;
  --navy-800: #0a1424;
  --blue-700: #00aee8;
  --blue-600: #00c8ff;
  --blue-500: #35d5ff;
  --cyan-300: #82ecff;
  --teal-700: #00b894;
  --teal-600: #19dfb2;
  --teal-100: #0a2928;
  --red-600: #ff4d6d;
  --red-100: #32121f;
  --amber-600: #ffbd42;
  --amber-100: #322611;
  --ink: #f3f8ff;
  --ink-soft: #a9b8ca;
  --muted: #6f829b;
  --surface: #0b1422;
  --surface-2: #101c2e;
  --surface-3: #15243a;
  --line: rgba(151, 184, 218, 0.13);
  --line-strong: rgba(151, 184, 218, 0.24);
  --canvas: #050912;
  --shadow-sm: 0 1px 0 rgba(255, 255, 255, 0.025), 0 16px 34px rgba(0, 0, 0, 0.16);
  --shadow-lg: 0 30px 90px rgba(0, 0, 0, 0.5);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --rail-width: 244px;
  --topbar-height: 72px;
}

[data-theme="light"] {
  color-scheme: light;
  --navy-950: #06111f;
  --navy-900: #081829;
  --navy-800: #0c2237;
  --blue-700: #006da4;
  --blue-600: #008fca;
  --blue-500: #00aee8;
  --cyan-300: #45c8e8;
  --teal-700: #00866f;
  --teal-600: #00a98b;
  --teal-100: #d9f5ef;
  --red-600: #d6415d;
  --red-100: #ffe7ec;
  --amber-600: #b87608;
  --amber-100: #fff1cc;
  --ink: #071525;
  --ink-soft: #41536a;
  --muted: #718197;
  --surface: #ffffff;
  --surface-2: #f5f8fb;
  --surface-3: #edf2f7;
  --line: rgba(15, 47, 78, 0.12);
  --line-strong: rgba(15, 47, 78, 0.22);
  --canvas: #eef3f7;
  --shadow-sm: 0 1px 0 rgba(255, 255, 255, 0.8), 0 14px 34px rgba(21, 47, 72, 0.07);
  --shadow-lg: 0 28px 80px rgba(21, 47, 72, 0.2);
}

body {
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(
      circle at 79% -8%,
      color-mix(in srgb, var(--blue-600) 10%, transparent),
      transparent 32%
    ),
    radial-gradient(
      circle at 38% 110%,
      color-mix(in srgb, var(--teal-600) 6%, transparent),
      transparent 35%
    ),
    var(--canvas);
  font-family: "DM Sans", system-ui, sans-serif;
  font-feature-settings:
    "tnum" 1,
    "ss01" 1;
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  content: "";
  background-image:
    linear-gradient(color-mix(in srgb, var(--line) 38%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--line) 38%, transparent) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent 76%);
  pointer-events: none;
}

.app-rail {
  padding: 18px 12px 16px;
  border-right: 1px solid rgba(111, 212, 247, 0.12);
  background:
    linear-gradient(180deg, rgba(0, 195, 255, 0.055), transparent 28%),
    linear-gradient(180deg, #07111e 0%, #040812 100%);
  box-shadow: 18px 0 60px rgba(0, 0, 0, 0.12);
}

.app-rail::after {
  position: absolute;
  top: 0;
  right: -1px;
  width: 1px;
  height: 35%;
  content: "";
  background: linear-gradient(var(--blue-600), transparent);
  opacity: 0.7;
}

.brand-lockup {
  min-height: 58px;
  grid-template-columns: 46px 1fr auto;
  gap: 11px;
  padding: 1px 8px 14px;
}

.brand-lockup img {
  width: 46px;
  height: 46px;
  padding: 3px;
  border: 1px solid rgba(95, 221, 255, 0.3);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  filter: drop-shadow(0 0 16px rgba(0, 198, 255, 0.24));
}

.brand-lockup strong {
  font:
    700 14px/1.2 "Manrope",
    sans-serif;
  letter-spacing: -0.01em;
}

.brand-lockup span {
  color: #5b7890;
  font:
    700 8px/1.3 "DM Sans",
    sans-serif;
  letter-spacing: 0.17em;
}

.workspace-switcher {
  margin: 7px 2px 22px;
  padding: 11px;
  border-color: rgba(90, 211, 250, 0.14);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(0, 197, 255, 0.09), rgba(255, 255, 255, 0.025));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.035);
}

.workspace-switcher:hover {
  border-color: rgba(90, 211, 250, 0.3);
  background: rgba(0, 197, 255, 0.1);
}

.workspace-mark {
  border: 1px solid rgba(105, 233, 255, 0.45);
  border-radius: 6px;
  background: linear-gradient(145deg, #067ea6, #10d4c1);
  box-shadow: 0 0 18px rgba(0, 200, 255, 0.16);
}

.workspace-switcher b {
  color: #f0f8ff;
  font-size: 11px;
  letter-spacing: 0.015em;
}

.workspace-switcher small {
  color: #66849b;
  font-size: 9px;
}

#primary-nav {
  scrollbar-color: rgba(67, 213, 255, 0.18) transparent;
}

.nav-group + .nav-group {
  margin-top: 15px;
}

.nav-label {
  margin: 0 11px 6px;
  color: #4c687e;
  font-size: 8px;
  letter-spacing: 0.2em;
}

.nav-item {
  gap: 10px;
  margin: 2px 0;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #7891a5;
  font-size: 11px;
  font-weight: 600;
}

.nav-item:hover {
  border-color: rgba(121, 207, 236, 0.08);
  background: rgba(255, 255, 255, 0.035);
  color: #d9edf6;
  transform: none;
}

.nav-item.active {
  border-color: rgba(63, 213, 255, 0.2);
  background: linear-gradient(90deg, rgba(0, 194, 255, 0.17), rgba(0, 194, 255, 0.035));
  color: #f2fbff;
  box-shadow:
    inset 2px 0 #28d7ff,
    0 7px 24px rgba(0, 0, 0, 0.08);
}

.nav-item.active::after {
  position: absolute;
  right: 9px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--blue-500);
  box-shadow: 0 0 9px var(--blue-500);
  content: "";
}

.nav-item svg {
  width: 16px;
  height: 16px;
  stroke-width: 1.7;
}

.nav-item.active svg {
  color: var(--cyan-300);
  filter: drop-shadow(0 0 6px rgba(53, 213, 255, 0.3));
}

.nav-item em {
  border: 1px solid rgba(72, 207, 245, 0.12);
  background: rgba(72, 207, 245, 0.08);
  color: #88dff5;
}

.rail-footer {
  border-top-color: rgba(136, 190, 215, 0.11);
}

.environment-badge {
  color: #a6bdca;
  font-size: 9px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.environment-badge span,
.live-dot {
  background: var(--teal-600);
  box-shadow:
    0 0 0 4px rgba(25, 223, 178, 0.08),
    0 0 10px rgba(25, 223, 178, 0.48);
  animation: live-pulse 2.4s ease-in-out infinite;
}

@keyframes live-pulse {
  50% {
    opacity: 0.52;
    box-shadow:
      0 0 0 7px rgba(25, 223, 178, 0.02),
      0 0 15px rgba(25, 223, 178, 0.3);
  }
}

.rail-footer p {
  color: #506b80;
  font-size: 9px;
}

.rail-help {
  color: #69879a;
  font-size: 10px;
}

.app-stage {
  position: relative;
  min-height: 100vh;
}

.topbar {
  height: var(--topbar-height);
  padding: 0 24px;
  border-bottom-color: var(--line);
  background: color-mix(in srgb, var(--canvas) 84%, transparent);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(24px) saturate(1.25);
}

.breadcrumb {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.breadcrumb b {
  color: var(--blue-500);
  opacity: 0.65;
}

.breadcrumb strong {
  color: var(--ink);
  font-size: 10px;
  letter-spacing: 0.04em;
}

.topbar-actions {
  gap: 7px;
}

.select-control.compact,
.search-trigger,
.icon-button,
.notification-button,
.profile-button {
  border-color: var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-2) 83%, transparent);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.025);
}

.select-control.compact {
  min-width: 126px;
  height: 42px;
  padding-inline: 10px 7px;
}

.select-control.compact span {
  top: 4px;
  color: var(--muted);
  font-size: 7px;
  letter-spacing: 0.14em;
}

.select-control.compact select {
  color: var(--ink);
  font-size: 10px;
}

.search-trigger {
  min-width: 172px;
  height: 42px;
}

.search-trigger:hover,
.icon-button:hover,
.notification-button:hover {
  border-color: color-mix(in srgb, var(--blue-500) 38%, var(--line));
  background: var(--surface-3);
  color: var(--ink);
}

.search-trigger kbd,
.palette-search kbd {
  border-color: var(--line-strong);
  background: var(--surface);
  box-shadow: inset 0 -1px rgba(255, 255, 255, 0.03);
}

.profile-button {
  min-width: 152px;
  height: 44px;
  border-color: color-mix(in srgb, var(--blue-500) 14%, var(--line));
  box-shadow: none;
}

.profile-button > span {
  border: 1px solid rgba(101, 222, 255, 0.24);
  border-radius: 6px;
  background: linear-gradient(145deg, #073f63, #087f89);
}

.profile-button b {
  font-size: 9px;
  letter-spacing: 0.03em;
}

.profile-button small {
  font-size: 8px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.evidence-ribbon {
  min-height: 34px;
  padding: 7px 25px;
  border-bottom-color: rgba(23, 217, 181, 0.14);
  background: linear-gradient(90deg, rgba(10, 77, 76, 0.19), rgba(8, 38, 53, 0.08));
  color: #74a79f;
  font-size: 8px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.evidence-ribbon b {
  color: var(--teal-600);
  font-size: 8px;
}

.evidence-ribbon button {
  color: color-mix(in srgb, var(--teal-600) 78%, var(--ink));
  font-size: 8px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.workspace {
  width: min(100%, 1740px);
  padding: 26px 28px 56px;
}

.view-header {
  align-items: flex-end;
  margin-bottom: 17px;
}

.view-identity {
  min-width: 0;
}

.view-label-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 7px;
}

.section-kicker {
  margin: 0;
  color: var(--blue-500);
  font-size: 8px;
  letter-spacing: 0.2em;
}

.live-module {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 7px;
  border: 1px solid color-mix(in srgb, var(--teal-600) 25%, transparent);
  border-radius: 99px;
  background: color-mix(in srgb, var(--teal-600) 7%, transparent);
  color: color-mix(in srgb, var(--teal-600) 72%, var(--ink));
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.live-module i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--teal-600);
  box-shadow: 0 0 8px var(--teal-600);
}

.view-header h1 {
  max-width: 900px;
  font:
    700 clamp(27px, 2.7vw, 38px)/1.06 "Manrope",
    sans-serif;
  letter-spacing: -0.035em;
}

.view-header p {
  max-width: 860px;
  margin-top: 7px;
  color: var(--ink-soft);
  font-size: 11px;
  letter-spacing: 0.005em;
}

.view-actions {
  gap: 7px;
  padding: 0 0 2px;
}

.primary-button,
.secondary-button,
.ghost-button,
.segmented button {
  min-height: 38px;
  border-radius: 7px;
  font-size: 9px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.primary-button {
  border-color: #00b7ed;
  background: linear-gradient(135deg, #007eab, #00b7d0);
  box-shadow:
    0 8px 25px rgba(0, 184, 229, 0.15),
    inset 0 1px rgba(255, 255, 255, 0.2);
}

.primary-button span {
  margin-left: 5px;
}

.secondary-button {
  border-color: var(--line-strong);
  background: color-mix(in srgb, var(--surface-2) 80%, transparent);
  color: var(--ink-soft);
}

.secondary-button:hover {
  border-color: color-mix(in srgb, var(--blue-500) 55%, var(--line));
  color: var(--blue-500);
}

.ghost-button {
  color: var(--blue-500);
}

.intelligence-brief {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  min-height: 68px;
  margin-bottom: 13px;
  padding: 11px 16px 11px 13px;
  overflow: hidden;
  border: 1px solid rgba(56, 205, 250, 0.16);
  border-radius: 10px;
  background:
    linear-gradient(90deg, rgba(0, 185, 234, 0.085), transparent 52%),
    color-mix(in srgb, var(--surface) 88%, transparent);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.025);
}

.intelligence-brief::after {
  position: absolute;
  right: 120px;
  bottom: -42px;
  width: 240px;
  height: 70px;
  border: 1px solid rgba(49, 206, 250, 0.08);
  border-radius: 50%;
  content: "";
  transform: rotate(-9deg);
}

.signal-orb {
  position: relative;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(73, 218, 255, 0.28);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(31, 215, 255, 0.19), rgba(31, 215, 255, 0.02) 60%);
  box-shadow:
    inset 0 0 14px rgba(27, 212, 255, 0.12),
    0 0 18px rgba(0, 183, 236, 0.06);
}

.signal-orb::before,
.signal-orb::after,
.signal-orb span,
.signal-orb i {
  position: absolute;
  content: "";
}

.signal-orb::before {
  width: 18px;
  height: 18px;
  border: 1px solid rgba(71, 224, 255, 0.42);
  border-radius: 50%;
}

.signal-orb::after {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--cyan-300);
  box-shadow: 0 0 8px var(--blue-500);
}

.signal-orb span {
  width: 28px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--blue-500), transparent);
  transform: rotate(45deg);
}

.signal-orb i {
  width: 28px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--blue-500), transparent);
  transform: rotate(-45deg);
}

.intelligence-brief small,
.brief-score small {
  display: block;
  margin-bottom: 3px;
  color: var(--blue-500);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.intelligence-brief p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.45;
}

.brief-score {
  position: relative;
  z-index: 1;
  min-width: 90px;
  padding-left: 17px;
  border-left: 1px solid var(--line);
  text-align: right;
}

.brief-score small {
  color: var(--muted);
}

.brief-score b {
  display: inline-block;
  color: var(--teal-600);
  font:
    700 22px/1 "Manrope",
    sans-serif;
}

.brief-score b span {
  color: var(--muted);
  font-size: 11px;
}

.brief-score em {
  display: block;
  margin-top: 2px;
  color: var(--teal-600);
  font-size: 6px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.card {
  position: relative;
  border-color: var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.018), transparent 42%),
    color-mix(in srgb, var(--surface) 96%, transparent);
  box-shadow: var(--shadow-sm);
}

.card::before {
  position: absolute;
  top: -1px;
  left: 20px;
  width: 58px;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, var(--blue-500), transparent);
  opacity: 0.42;
}

.card.interactive:hover {
  border-color: rgba(53, 213, 255, 0.3);
  box-shadow:
    0 18px 50px rgba(0, 0, 0, 0.2),
    inset 0 1px rgba(255, 255, 255, 0.025);
  transform: translateY(-2px);
}

.metric-grid {
  gap: 10px;
  margin-bottom: 11px;
}

.metric-card {
  min-height: 146px;
  padding: 16px 17px;
  border-radius: 11px;
  background:
    radial-gradient(circle at 92% 10%, rgba(26, 207, 252, 0.11), transparent 34%),
    linear-gradient(150deg, color-mix(in srgb, var(--surface-2) 90%, transparent), var(--surface));
}

.metric-card::after {
  right: -57px;
  top: -66px;
  width: 125px;
  height: 125px;
  border: 1px solid rgba(53, 213, 255, 0.06);
  background: transparent;
}

.metric-top {
  justify-content: flex-start;
  gap: 7px;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.metric-top > span:first-child {
  margin-right: auto;
}

.metric-live {
  color: var(--teal-600);
  font-size: 6px;
  letter-spacing: 0.16em;
}

.metric-top button {
  width: 17px;
  height: 17px;
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.018);
  color: var(--muted);
  font-size: 8px;
}

.metric-value {
  margin: 13px 0 5px;
  color: var(--ink);
  font:
    700 30px/1 "Manrope",
    sans-serif;
  letter-spacing: -0.04em;
  text-shadow: 0 0 28px color-mix(in srgb, var(--blue-500) 7%, transparent);
}

.metric-delta {
  max-width: calc(100% - 80px);
  color: var(--muted);
  font-size: 8px;
}

.metric-delta.positive {
  color: var(--teal-600);
}

.metric-delta.negative {
  color: #ff6680;
}

.sparkline {
  right: 15px;
  bottom: 27px;
  filter: drop-shadow(0 0 5px color-mix(in srgb, var(--blue-500) 20%, transparent));
}

.metric-track {
  position: absolute;
  right: 17px;
  bottom: 14px;
  left: 17px;
  height: 2px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--line);
}

.metric-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue-700), var(--blue-500));
  box-shadow: 0 0 8px rgba(53, 213, 255, 0.35);
}

.metric-track span {
  position: absolute;
  top: -1px;
  left: 70%;
  width: 1px;
  height: 4px;
  background: var(--ink-soft);
}

.dashboard-grid,
.section-grid {
  gap: 10px;
}

.dashboard-grid + .dashboard-grid,
.section-grid {
  margin-top: 10px;
}

.panel {
  padding: 16px;
}

.panel-head {
  margin-bottom: 14px;
}

.panel-head h2,
.panel-head h3 {
  color: var(--ink);
  font:
    700 14px/1.2 "Manrope",
    sans-serif;
  letter-spacing: -0.015em;
}

.panel-head p {
  max-width: 680px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.015em;
}

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

.segmented {
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
}

.segmented button {
  min-height: 27px;
  padding: 5px 9px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font-size: 7px;
}

.segmented button.active {
  background: linear-gradient(135deg, rgba(0, 174, 232, 0.25), rgba(0, 174, 232, 0.08));
  color: var(--cyan-300);
  box-shadow: inset 0 0 0 1px rgba(75, 216, 255, 0.18);
}

.chart-wrap {
  margin-top: 2px;
}

.chart-grid-line {
  stroke: color-mix(in srgb, var(--line-strong) 65%, transparent);
  stroke-dasharray: 3 5;
}

.chart-axis-label {
  fill: var(--muted);
  font-size: 8px;
}

.chart-path-primary {
  stroke: var(--blue-600);
  stroke-width: 2.1;
  filter: drop-shadow(0 0 5px rgba(0, 200, 255, 0.28));
}

.chart-path-secondary {
  stroke: var(--teal-600);
  stroke-width: 1.8;
  filter: drop-shadow(0 0 5px rgba(25, 223, 178, 0.18));
}

.chart-area {
  fill: color-mix(in srgb, var(--blue-500) 9%, transparent);
}

.chart-point {
  fill: var(--surface);
  stroke: var(--blue-500);
  stroke-width: 2;
}

.legend {
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.04em;
}

.decision-row {
  min-height: 61px;
  padding: 10px 11px;
  border-color: var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-2) 66%, transparent);
}

.decision-row:hover {
  border-color: rgba(53, 213, 255, 0.24);
  background: color-mix(in srgb, var(--surface-3) 72%, transparent);
}

.decision-row b {
  color: var(--ink);
  font-size: 9px;
}

.decision-row small,
.decision-row time {
  color: var(--muted);
  font-size: 7px;
}

.priority-bar {
  width: 2px;
  background: var(--amber-600);
  box-shadow: 0 0 7px color-mix(in srgb, var(--amber-600) 40%, transparent);
}

.priority-bar.high {
  background: var(--red-600);
}

.status-pill {
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  font-size: 6px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.status-pill.good,
.status-pill.pass,
.status-pill.positive {
  border-color: rgba(25, 223, 178, 0.17);
  background: rgba(25, 223, 178, 0.07);
  color: var(--teal-600);
}

.status-pill.warn,
.status-pill.medium {
  border-color: rgba(255, 189, 66, 0.18);
  background: rgba(255, 189, 66, 0.07);
  color: var(--amber-600);
}

.status-pill.risk,
.status-pill.negative,
.status-pill.high {
  border-color: rgba(255, 77, 109, 0.18);
  background: rgba(255, 77, 109, 0.07);
  color: #ff6680;
}

.donut {
  border: 1px solid var(--line);
  box-shadow: 0 0 28px rgba(0, 188, 238, 0.08);
}

.donut::after {
  background: var(--surface);
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.18);
}

.donut-center b {
  color: var(--ink);
}

.legend-button {
  border-color: transparent;
  background: transparent;
  color: var(--ink-soft);
}

.legend-button:hover {
  border-color: var(--line);
  background: var(--surface-2);
}

.readiness-step,
.scenario-output,
.program-metrics div,
.fixture-metrics div,
.drawer-kpis div,
.lineage-node,
.risk-cell {
  border-color: var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-2) 72%, transparent);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.02);
}

.readiness-step span {
  background: rgba(25, 223, 178, 0.09);
  color: var(--teal-600);
}

.callout {
  border-radius: 8px;
  font-size: 9px;
}

.callout.info {
  border-color: rgba(0, 196, 247, 0.2);
  background: rgba(0, 174, 232, 0.07);
  color: color-mix(in srgb, var(--blue-500) 60%, var(--ink));
}

.callout.warn {
  border-color: rgba(255, 189, 66, 0.2);
  background: rgba(255, 189, 66, 0.06);
}

.data-table th {
  border-bottom-color: var(--line-strong);
  background: color-mix(in srgb, var(--surface-2) 86%, transparent);
  color: var(--muted);
  font-size: 7px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.data-table td {
  border-bottom-color: var(--line);
  color: var(--ink-soft);
  font-size: 9px;
}

.data-table td strong {
  color: var(--ink);
}

.data-table tbody tr:hover {
  background: rgba(0, 181, 229, 0.045);
}

.bar-meter span,
.funnel-track {
  background: color-mix(in srgb, var(--surface-3) 80%, transparent);
}

.bar-meter i,
.funnel-track i {
  background: linear-gradient(90deg, var(--blue-700), var(--blue-500));
  box-shadow: 0 0 8px rgba(53, 213, 255, 0.18);
}

.fixture-card,
.program-card,
.decision-card {
  overflow: hidden;
  background:
    radial-gradient(circle at 100% 0, rgba(0, 194, 255, 0.08), transparent 30%), var(--surface);
}

.fixture-card::after,
.program-card::after,
.decision-card::after {
  position: absolute;
  right: -40px;
  bottom: -40px;
  width: 100px;
  height: 100px;
  border: 1px solid rgba(64, 210, 250, 0.06);
  border-radius: 50%;
  content: "";
}

.fixture-card h3,
.decision-card h3 {
  color: var(--ink);
}

.fixture-card .fixture-date {
  color: var(--blue-500);
}

.program-card.women {
  background:
    radial-gradient(circle at 100% 0, rgba(25, 223, 178, 0.09), transparent 32%), var(--surface);
}

.range-control input {
  accent-color: var(--blue-500);
}

.range-control output,
.scenario-output b,
.program-card h2 {
  color: var(--ink);
  text-shadow: 0 0 20px rgba(0, 194, 255, 0.06);
}

.waterfall-column i {
  background: linear-gradient(var(--blue-500), var(--blue-700));
  box-shadow: 0 0 12px rgba(0, 194, 255, 0.14);
}

.waterfall-column.negative i {
  background: linear-gradient(#ff6680, #b12e4a);
}

.waterfall-column.total i {
  background: linear-gradient(var(--teal-600), #06856f);
}

.risk-cell {
  min-height: 110px;
}

.risk-chip {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--ink-soft);
}

.score-ring {
  background: conic-gradient(var(--teal-600) 0 100%, var(--surface-3) 100%);
  box-shadow: 0 0 26px rgba(25, 223, 178, 0.1);
}

.score-ring::after {
  background: var(--surface);
}

.permission-grid > div {
  border-color: var(--line);
}

.permission-grid .permission-head {
  background: var(--surface-2);
  color: var(--muted);
}

.permission-yes {
  color: var(--teal-600);
}

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

.permission-limited {
  color: var(--amber-600);
}

.modal-backdrop,
.drawer-scrim {
  background: rgba(1, 5, 11, 0.74);
  backdrop-filter: blur(8px);
}

.command-palette,
.tour-modal,
.detail-drawer {
  border-color: rgba(71, 211, 251, 0.18);
  background:
    radial-gradient(circle at 95% 0, rgba(0, 194, 255, 0.08), transparent 28%), var(--surface);
  box-shadow: var(--shadow-lg);
}

.palette-search {
  border-bottom-color: var(--line);
  background: var(--surface-2);
}

.palette-result {
  border-color: transparent;
}

.palette-result.selected {
  border-color: rgba(53, 213, 255, 0.22);
  background: rgba(0, 186, 234, 0.08);
}

.drawer-head {
  border-bottom-color: var(--line);
  background: color-mix(in srgb, var(--surface-2) 74%, transparent);
}

.toast {
  border: 1px solid rgba(25, 223, 178, 0.2);
  background: #08151f;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.42);
}

.tooltip {
  border: 1px solid rgba(64, 211, 252, 0.15);
  background: #030812;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.3);
}

@media (max-width: 1240px) {
  :root,
  [data-theme="dark"] {
    --rail-width: 222px;
  }

  .workspace {
    padding-inline: 20px;
  }
}

@media (max-width: 1020px) {
  .app-rail {
    width: min(286px, 86vw);
  }

  .workspace {
    padding: 22px 17px 44px;
  }

  .view-header {
    align-items: flex-start;
  }
}

@media (max-width: 720px) {
  .topbar {
    height: 58px;
    padding-inline: 12px;
  }

  .evidence-ribbon {
    min-height: 32px;
    padding-inline: 13px;
  }

  .workspace {
    padding: 19px 12px 38px;
  }

  .view-header h1 {
    font-size: 27px;
  }

  .view-header p {
    font-size: 10px;
  }

  .view-actions {
    padding-top: 12px;
  }

  .intelligence-brief {
    grid-template-columns: 36px 1fr;
    gap: 10px;
    padding: 11px;
  }

  .brief-score {
    display: none;
  }

  .signal-orb {
    width: 32px;
    height: 32px;
  }

  .metric-card {
    min-height: 130px;
  }

  .panel {
    padding: 14px;
  }
}

@media print {
  body,
  [data-theme="dark"],
  [data-theme="light"] {
    background: white !important;
    color: black !important;
  }

  body::before,
  .intelligence-brief {
    display: none !important;
  }

  .card {
    border-color: #ccd4dc !important;
    background: white !important;
    color: black !important;
  }
}

.scope-note {
  display: grid;
  gap: 5px;
  margin: -4px 0 14px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--amber-600);
  border-radius: 8px;
  background: var(--surface-2);
  font-size: 11px;
  line-height: 1.55;
}
.scope-note b {
  color: var(--amber-600);
  font-size: 10px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.scope-note small,
.method-note {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}
.metric-trend {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  margin-top: 15px;
}
.metric-trend .sparkline {
  position: static;
  flex-shrink: 0;
}
.metric-trend small {
  max-width: 130px;
  font-size: 8px;
  color: var(--muted);
  line-height: 1.5;
}
.metric-card .metric-value {
  font-size: clamp(24px, 2.3vw, 34px);
}
.metric-live {
  white-space: nowrap;
}
.portfolio-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.portfolio-controls input,
.portfolio-controls select,
.scenario-controls select {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--ink);
  font: inherit;
  font-size: 11px;
}
.portfolio-controls input {
  flex: 1 1 160px;
}
.portfolio-controls select {
  flex: 0 1 145px;
}
.select-control:has(select:disabled) {
  opacity: 0.48;
}
select:disabled {
  cursor: not-allowed;
}
.assumption-details {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.assumption-details summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  padding-bottom: 14px;
}
.range-control label {
  line-height: 1.6;
}
#scenario-detail {
  margin-top: 18px;
}
#presentation-print {
  display: none;
}
.evidence-ribbon {
  flex-wrap: wrap;
  height: auto;
  padding-block: 9px;
}
#filter-summary {
  line-height: 1.5;
}

@media (max-width: 720px) {
  .topbar {
    height: auto;
    min-height: 58px;
    flex-wrap: wrap;
    gap: 8px;
    padding-block: 9px;
    position: relative;
  }
  .topbar-start {
    flex: 1;
  }
  .topbar-actions {
    display: grid;
    width: 100%;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 40px 40px;
  }
  .topbar-actions .select-control.compact {
    display: flex;
    min-width: 0;
  }
  .select-control.compact select {
    font-size: 10px;
  }
  .topbar-actions .search-trigger {
    min-width: 0;
    width: 40px;
    height: 42px;
    padding: 0;
    justify-content: center;
  }
  .evidence-ribbon > b {
    display: block;
    font-size: 9px;
  }
  #filter-summary {
    flex-basis: 100%;
    font-size: 9px;
  }
  .metric-card .metric-value {
    font-size: 30px;
  }
  .scope-note {
    margin-top: 10px;
  }
  .portfolio-controls button {
    flex: 1 0 auto;
  }
  .chart-wrap,
  .chart-wrap.compact {
    min-height: 0;
    overflow-x: auto;
    overflow-y: hidden;
  }
  .chart-svg {
    min-width: 620px;
    display: block;
  }
  .chart-axis-label {
    font-size: 13px;
  }
  .chart-wrap::after {
    content: "Swipe chart horizontally to inspect all months";
    display: block;
    position: sticky;
    left: 0;
    color: var(--muted);
    font-size: 10px;
    padding-block: 8px;
  }
}

@media print {
  .scope-note {
    color: #14202e !important;
    background: #fff !important;
    border-color: #526170 !important;
  }
  .scope-note small,
  .method-note,
  .panel p,
  .card p,
  .card small,
  .card span {
    color: #344250 !important;
  }
  .portfolio-controls,
  .segmented,
  .ghost-button,
  .secondary-button,
  .primary-button,
  .panel-menu {
    display: none !important;
  }
  body.print-owner .app-shell {
    display: none !important;
  }
  body.print-owner #presentation-print {
    display: block !important;
    color: #111;
    padding: 18px;
    font-size: 12px;
    line-height: 1.55;
  }
  #presentation-print .drawer-section {
    break-inside: avoid;
  }
  #presentation-print h1 {
    font-size: 24px;
  }
  #presentation-print h3 {
    color: #111;
    font-size: 15px;
  }
  #presentation-print .callout {
    color: #111;
    background: #f0f4f8;
  }
  @page {
    size: A4;
    margin: 16mm;
  }
  body.print-owner #presentation-print {
    max-width: 178mm;
    margin: 0 auto;
    padding: 0;
    font-size: 11pt;
  }
  #presentation-print p,
  #presentation-print small,
  #presentation-print b,
  #presentation-print strong {
    color: #111 !important;
    font-size: 10.5pt;
    line-height: 1.5;
  }
  #presentation-print h1 {
    font-size: 20pt;
  }
  #presentation-print h3 {
    font-size: 12pt;
  }
  #presentation-print .drawer-section {
    padding-block: 12px;
    border-color: #b9c3cf;
  }
}
