:root {
  color-scheme: light;
  --navy-950: #0a202a;
  --navy-900: #102c3a;
  --navy-800: #193f4d;
  --navy-700: #285564;
  --ink: #102c3a;
  --muted: #536670;
  --muted-2: #8c9aa2;
  --line: #dce4e7;
  --line-soft: #e9eef0;
  --surface: #ffffff;
  --canvas: #f5f2ea;
  --canvas-deep: #ebe8df;
  --teal: #117e79;
  --teal-strong: #0b625f;
  --teal-soft: #e4f3ee;
  --blue: #2875c7;
  --blue-soft: #eaf3fd;
  --amber: #c37b0b;
  --amber-soft: #fff5dc;
  --red: #c33c46;
  --red-soft: #fff0f1;
  --green: #16805f;
  --shadow-sm: 0 1px 2px rgba(5, 24, 39, .05), 0 4px 12px rgba(5, 24, 39, .04);
  --shadow-lg: 0 20px 60px rgba(5, 24, 39, .18);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --sidebar: 260px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 20px;
  --space-xl: 24px;
  --space-section: 32px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
}

button, input, select, textarea { font: inherit; }
button { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

:focus-visible {
  outline: 3px solid rgba(40, 117, 199, .32);
  outline-offset: 2px;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 200;
  padding: 10px 14px;
  background: #fff;
  color: var(--navy-900);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
}
.skip-link:focus { top: 16px; }

[hidden] { display: none !important; }

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

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  width: var(--sidebar);
  display: flex;
  flex-direction: column;
  background: var(--navy-900);
  color: #d9e4ea;
  border-right: 1px solid rgba(255, 255, 255, .07);
}

.brand {
  min-height: 84px;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: transparent;
}
.brand-mark svg { width: 34px; height: 34px; }
.brand-mark svg path:first-child { fill: white; }
.brand-mark svg path:last-child { fill: #c8e9de; }
.brand strong { display: block; color: white; letter-spacing: -.02em; font-size: 17px; }
.auth-brand .brand-descriptor { color: #c8e9de; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.auth-brand .brand-context { color: #9fb8c2; }
.brand small { display: block; color: #8da6b7; font-size: 11px; letter-spacing: .035em; margin-top: 1px; }

.nav-list { display: grid; gap: 5px; padding: 18px 12px; border-top: 1px solid rgba(255, 255, 255, .07); }
.nav-item {
  appearance: none;
  min-height: 44px;
  width: 100%;
  padding: 0 12px;
  display: grid;
  grid-template-columns: 20px 1fr auto;
  align-items: center;
  gap: 11px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #aebfca;
  text-align: left;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.nav-item:hover { background: rgba(255,255,255,.06); color: white; }
.nav-item.is-active { background: rgba(25, 184, 154, .15); color: #e8fffa; box-shadow: inset 3px 0 0 var(--teal); }
.nav-item svg { width: 18px; height: 18px; }
.nav-count {
  min-width: 23px;
  padding: 2px 6px;
  color: #a9beca;
  background: rgba(255,255,255,.07);
  border-radius: 99px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
}
.nav-count.is-alert { color: #fff; background: var(--red); }

.sidebar-foot { margin-top: auto; padding: 16px 12px; display: grid; gap: 14px; border-top: 1px solid rgba(255,255,255,.07); }
.trust-note { display: flex; align-items: center; gap: 10px; padding: 0 10px; color: #8da6b7; }
.trust-note svg { width: 18px; color: var(--teal); }
.trust-note strong, .trust-note small { display: block; }
.trust-note strong { color: #c4d2da; font-size: 12px; }
.trust-note small { font-size: 10px; }
.session-card {
  width: 100%;
  display: grid;
  grid-template-columns: 34px 1fr 18px;
  align-items: center;
  gap: 9px;
  padding: 9px;
  border: 0;
  border-radius: 10px;
  color: #c8d6dd;
  background: rgba(255,255,255,.045);
  text-align: left;
  cursor: pointer;
}
.session-card:hover { background: rgba(255,255,255,.08); }
.session-card strong, .session-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.session-card strong { font-size: 12px; color: #eef5f7; }
.session-card small { font-size: 10px; color: #829aa9; }
.avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; background: #dff6f1; color: var(--teal-strong); font-size: 11px; font-weight: 800; }

.workspace { min-height: 100vh; margin-left: var(--sidebar); }
.topbar {
  height: 84px;
  padding: 0 clamp(24px, 3vw, 46px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: rgba(255,255,255,.92);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
}
.topbar h1 { margin: 2px 0 0; font-size: 22px; line-height: 1.2; letter-spacing: -.025em; }
.eyebrow { margin: 0; color: var(--teal-strong); font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.topbar-actions { display: flex; align-items: center; gap: 9px; }

.health-pill { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 11px; border: 1px solid var(--line); border-radius: 99px; background: #fff; color: var(--muted); font-size: 11px; font-weight: 700; }
.health-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 3px var(--amber-soft); }
.health-pill.is-healthy i { background: var(--green); box-shadow: 0 0 0 3px var(--teal-soft); }
.health-pill.is-unhealthy i { background: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }

.button, .icon-button {
  appearance: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .12s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.button:active, .icon-button:active { transform: translateY(1px); }
.button:disabled, .icon-button:disabled { cursor: not-allowed; opacity: .55; transform: none; }
.button {
  min-height: 38px;
  padding: 0 15px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}
.button svg { width: 16px; height: 16px; }
.button-primary { color: white; background: var(--navy-900); box-shadow: 0 4px 10px rgba(7,27,47,.14); }
.button-primary:hover { background: var(--navy-800); box-shadow: 0 6px 14px rgba(7,27,47,.19); }
.button-teal { color: white; background: var(--teal-strong); }
.button-teal:hover { background: #066a5b; }
.button-secondary { color: var(--ink); border-color: var(--line); background: #fff; }
.button-secondary:hover { border-color: #becacf; background: #f9fbfb; }
.button-danger { color: var(--red); border-color: #f0c5c8; background: #fff; }
.button-danger:hover { background: var(--red-soft); }
.button-large { min-height: 48px; padding: 0 18px; font-size: 13px; }
.button-block { width: 100%; }
.icon-button { width: 38px; height: 38px; display: grid; place-items: center; padding: 0; border-color: var(--line); border-radius: 9px; background: #fff; }
.icon-button:hover { background: #f6f9fa; border-color: #c5d0d4; }
.icon-button svg { width: 17px; height: 17px; }

.view { padding: 30px clamp(24px, 3vw, 46px) 48px; max-width: 1540px; margin: 0 auto; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 17px; }
.section-head h2 { margin: 0; font-size: 16px; letter-spacing: -.015em; }
.section-head p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.section-head-actions { display: flex; flex-wrap: wrap; gap: 8px; }
/* Section boundaries belong to the layout, not inline styles (blocked by CSP).
   Do not put margins on every panel: panels inside grids use the grid gap. */
.view > .section-head:not(:first-child), .section-head.section-start { margin-top: var(--space-section); }
.section-head.space-none { margin: 0; }
.metric-value.metric-value-label { font-size: 18px; }
/* Keep headings beside their actions at wide sizes, then wrap as a group. */
.section-head > div:first-child { min-width: 0; }
.section-head { flex-wrap: wrap; }
.section-link { border: 0; background: transparent; color: var(--teal-strong); font-size: 12px; font-weight: 750; cursor: pointer; }

.metrics-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-bottom: 22px; }
.metric-card, .panel, .connector-card, .source-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.metric-card { min-height: 132px; padding: 18px; position: relative; overflow: hidden; }
.metric-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.metric-label { color: var(--muted); font-size: 11px; font-weight: 700; }
.metric-icon { width: 32px; height: 32px; display: grid; place-items: center; color: var(--teal-strong); border-radius: 9px; background: var(--teal-soft); }
.metric-icon.is-blue { color: var(--blue); background: var(--blue-soft); }
.metric-icon.is-amber { color: var(--amber); background: var(--amber-soft); }
.metric-icon.is-red { color: var(--red); background: var(--red-soft); }
.metric-icon svg { width: 17px; }
.metric-value { margin-top: 12px; font-size: 28px; line-height: 1; font-weight: 790; letter-spacing: -.045em; }
.metric-foot { margin-top: 9px; display: flex; align-items: center; gap: 6px; color: var(--muted-2); font-size: 10px; }
.metric-foot strong { color: var(--green); }

.overview-grid { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(300px,.75fr); gap: 18px; }
.panel { overflow: hidden; }
.panel-head { min-height: 62px; padding: 15px 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line-soft); }
.panel-head h2, .panel-head h3 { margin: 0; font-size: 14px; }
.panel-head p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.panel-body { padding: 18px; }

.coverage-wrap { display: grid; grid-template-columns: 170px 1fr; align-items: center; gap: 26px; }
.coverage-ring { width: 160px; aspect-ratio: 1; margin: auto; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--teal) var(--coverage,0%), #e7edef 0); position: relative; }
.coverage-ring::after { content: ""; position: absolute; inset: 15px; border-radius: 50%; background: white; }
.coverage-value { position: relative; z-index: 1; text-align: center; }
.coverage-value strong { display: block; font-size: 30px; line-height: 1; letter-spacing: -.05em; }
.coverage-value small { color: var(--muted); font-size: 10px; }
.coverage-legend { display: grid; gap: 13px; }
.legend-row { display: grid; grid-template-columns: 10px 1fr auto; align-items: center; gap: 9px; color: var(--muted); font-size: 11px; }
.legend-row i { width: 8px; height: 8px; border-radius: 2px; background: var(--teal); }
.legend-row i.is-navy { background: var(--navy-700); }
.legend-row i.is-amber { background: var(--amber); }
.legend-row strong { color: var(--ink); }

.status-list { display: grid; }
.status-row { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 11px; min-height: 60px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.status-row:last-child { border-bottom: 0; }
.status-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; background: var(--canvas); color: var(--navy-700); }
.status-icon svg { width: 16px; }
.status-row strong, .status-row small { display: block; }
.status-row strong { font-size: 11px; }
.status-row small { margin-top: 2px; color: var(--muted); font-size: 10px; }

.badge { display: inline-flex; align-items: center; gap: 5px; min-height: 23px; padding: 0 8px; border-radius: 99px; background: var(--canvas-deep); color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .035em; text-transform: uppercase; white-space: nowrap; }
.badge i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.is-ready, .badge.is-active, .badge.is-matched, .badge.is-completed { background: var(--teal-soft); color: var(--green); }
.badge.is-failed, .badge.is-open, .badge.is-mismatch { background: var(--red-soft); color: var(--red); }
.badge.is-degraded, .badge.is-pending, .badge.is-reference-only { background: var(--amber-soft); color: var(--amber); }
.badge.is-live { background: var(--blue-soft); color: var(--blue); }

.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 17px; }
.search-box { width: min(360px, 100%); position: relative; }
.search-box svg { position: absolute; left: 12px; top: 50%; width: 16px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search-box input { width: 100%; height: 40px; padding: 0 12px 0 37px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); }
.filter-group { display: flex; gap: 6px; }
.filter-chip { min-height: 33px; padding: 0 11px; border: 1px solid var(--line); border-radius: 99px; background: #fff; color: var(--muted); font-size: 10px; font-weight: 750; cursor: pointer; }
.filter-chip.is-active { border-color: var(--navy-900); background: var(--navy-900); color: #fff; }

.connector-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.connector-card { min-width: 0; padding: 17px; cursor: pointer; transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease; }
.connector-card:hover { transform: translateY(-2px); border-color: #becbd0; box-shadow: 0 10px 24px rgba(6,23,40,.08); }
.connector-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.vendor-lockup { display: flex; align-items: center; gap: 11px; min-width: 0; }
.vendor-lockup > span { min-width: 0; }
.vendor-mark { width: 39px; height: 39px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 10px; background: var(--navy-900); color: white; font-size: 12px; font-weight: 850; letter-spacing: -.02em; }
.vendor-mark.is-teal { background: var(--teal-strong); }
.vendor-mark.is-blue { background: #295c91; }
.vendor-lockup strong, .vendor-lockup small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vendor-lockup strong { font-size: 13px; }
.vendor-lockup small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.connector-meta { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-top: 17px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.connector-meta > span { min-width: 0; }
.connector-meta span { color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .06em; font-weight: 750; }
.connector-meta strong { display: block; margin-top: 3px; font-size: 10px; text-transform: none; letter-spacing: 0; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-action { margin-top: 14px; display: flex; align-items: center; justify-content: space-between; color: var(--teal-strong); font-size: 10px; font-weight: 800; }

.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; }
.data-table th { height: 40px; padding: 0 16px; color: var(--muted); background: #f8fafb; border-bottom: 1px solid var(--line); font-size: 9px; letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; }
.data-table td { height: 58px; padding: 9px 16px; border-bottom: 1px solid var(--line-soft); font-size: 11px; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr[data-action] { cursor: pointer; }
.data-table tbody tr[data-action]:hover { background: #fbfcfc; }
.table-title { display: flex; align-items: center; gap: 9px; }
.table-title strong, .table-title small { display: block; }
.table-title small { color: var(--muted); font-size: 9px; margin-top: 2px; }

.source-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.source-card { padding: 18px; }
.source-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.source-card h3 { margin: 0; font-size: 14px; }
.source-card p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.feed-path { display: grid; grid-template-columns: 1fr 38px 1fr; align-items: stretch; gap: 7px; margin: 18px 0; }
.feed-node { padding: 11px; border: 1px solid var(--line-soft); border-radius: 9px; background: #fafcfc; min-width: 0; }
.feed-node span { display: block; color: var(--muted); font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.feed-node strong { display: block; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.feed-arrow { display: grid; place-items: center; color: var(--teal); }
.feed-arrow svg { width: 17px; }
.source-stats { display: grid; grid-template-columns: repeat(3,1fr); padding: 12px 0; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.source-stats div { padding: 0 10px; border-right: 1px solid var(--line-soft); }
.source-stats div:first-child { padding-left: 0; }
.source-stats div:last-child { padding-right: 0; border: 0; }
.source-stats span, .source-stats strong { display: block; }
.source-stats span { color: var(--muted); font-size: 8px; text-transform: uppercase; letter-spacing: .06em; }
.source-stats strong { margin-top: 4px; font-size: 10px; }
.source-actions { margin-top: 14px; display: flex; justify-content: space-between; gap: 8px; }

.alert-stack { display: grid; gap: 9px; }
.alert-row { display: grid; grid-template-columns: 36px 1fr auto; align-items: flex-start; gap: 12px; padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.alert-symbol { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; background: var(--red-soft); color: var(--red); }
.alert-symbol.is-warning { background: var(--amber-soft); color: var(--amber); }
.alert-symbol svg { width: 17px; }
.alert-row strong { display: block; font-size: 11px; }
.alert-row p { margin: 4px 0; color: var(--muted); font-size: 10px; }
.alert-row time { color: var(--muted-2); font-size: 9px; }

.empty-state { min-height: 260px; display: grid; place-items: center; padding: 30px; text-align: center; }
.empty-state > div { max-width: 380px; }
.empty-icon { width: 50px; height: 50px; margin: 0 auto 13px; display: grid; place-items: center; border-radius: 14px; background: var(--teal-soft); color: var(--teal-strong); }
.empty-icon svg { width: 24px; }
.empty-state h3 { margin: 0; font-size: 14px; }
.empty-state p { margin: 7px auto 15px; color: var(--muted); font-size: 11px; }

.timeline { position: relative; display: grid; gap: 0; }
.timeline::before { content: ""; position: absolute; left: 16px; top: 18px; bottom: 18px; width: 1px; background: var(--line); }
.timeline-event { position: relative; display: grid; grid-template-columns: 33px 1fr auto; gap: 12px; padding: 11px 0; align-items: start; }
.timeline-dot { z-index: 1; width: 33px; height: 33px; display: grid; place-items: center; border: 4px solid white; border-radius: 50%; background: var(--teal-soft); color: var(--teal-strong); }
.timeline-dot svg { width: 13px; }
.timeline-event strong, .timeline-event small { display: block; }
.timeline-event strong { font-size: 10px; }
.timeline-event small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.timeline-event time { color: var(--muted-2); font-size: 9px; }

.activation-hero { margin-bottom: 20px; padding: 26px 28px; display: flex; align-items: center; justify-content: space-between; gap: 30px; overflow: hidden; border-radius: 15px; color: white; background: linear-gradient(125deg,var(--navy-900),#0b3b47); box-shadow: var(--shadow-sm); }
.activation-hero h2 { margin: 5px 0 8px; max-width: 680px; font-family: Georgia,serif; font-size: clamp(27px,3vw,42px); font-weight: 500; letter-spacing: -.035em; }
.activation-hero p:not(.eyebrow) { max-width: 680px; margin: 0; color: #b9ccd2; font-size: 11px; line-height: 1.65; }
.activation-seal { width: 148px; min-height: 116px; flex: 0 0 auto; padding: 17px; display: grid; justify-items: start; align-content: center; border: 1px solid rgba(255,255,255,.16); border-radius: 13px; background: rgba(255,255,255,.06); }
.activation-seal svg { width: 25px; margin-bottom: 12px; color: #52dfca; }
.activation-seal small { color: #9fb8c0; font-size: 8px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.activation-seal strong { margin-top: 4px; font-size: 11px; letter-spacing: .035em; }
.activation-metrics { margin-bottom: 20px; }
.activation-grid { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(340px,.85fr); gap: 18px; align-items: start; }
.offline-policy-form { margin-top: 17px; display: grid; gap: 15px; }
.offline-policy-form textarea { min-height: 144px; font-family: ui-monospace,SFMono-Regular,Consolas,monospace; font-size: 9px; line-height: 1.55; }
.offline-policy-form .button { justify-self: end; }
.policy-hash { color: var(--muted); font-family: ui-monospace,SFMono-Regular,Consolas,monospace; font-size: 9px; }
.policy-timeline { position: relative; display: grid; }
.policy-timeline::before { content: ""; position: absolute; left: 16px; top: 18px; bottom: 18px; width: 1px; background: var(--line); }
.policy-event { position: relative; display: grid; grid-template-columns: 33px 1fr auto; gap: 11px; padding: 10px 0; align-items: start; }
.policy-event strong,.policy-event small { display: block; }
.policy-event strong { font-size: 10px; }
.policy-event small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.empty-state.compact { min-height: 230px; border: 0; box-shadow: none; }

.monitoring-hero { margin-bottom: 20px; padding: 25px 27px; display: flex; align-items: center; justify-content: space-between; gap: 28px; overflow: hidden; position: relative; color: white; border-radius: 16px; background: linear-gradient(120deg,var(--navy-900),#103c4b 72%,#0b6f67); box-shadow: 0 14px 34px rgba(7,27,47,.15); }
.monitoring-hero::after { content: ""; position: absolute; width: 280px; height: 280px; right: -130px; top: -165px; border: 1px solid rgba(255,255,255,.1); border-radius: 50%; box-shadow: 0 0 0 48px rgba(255,255,255,.025),0 0 0 96px rgba(255,255,255,.018); }
.monitoring-hero > * { position: relative; z-index: 1; }
.monitoring-hero h2 { margin: 5px 0 7px; font-size: 24px; letter-spacing: -.035em; }
.monitoring-hero p:not(.eyebrow) { max-width: 700px; margin: 0; color: #b5c9d0; font-size: 11px; }

.decision-control-hero { position: relative; margin-bottom: 20px; padding: 26px; display: grid; grid-template-columns: minmax(0,1.05fr) minmax(390px,.95fr); gap: 34px; overflow: hidden; color: white; border-radius: 17px; background: linear-gradient(125deg,#071b2f 0%,#0c3442 58%,#116f66 100%); box-shadow: 0 16px 38px rgba(7,27,47,.18); }
.decision-control-hero::before { content: ""; position: absolute; width: 390px; height: 390px; right: -170px; bottom: -270px; border: 1px solid rgba(255,255,255,.11); border-radius: 50%; box-shadow: 0 0 0 54px rgba(255,255,255,.025),0 0 0 108px rgba(255,255,255,.018); }
.decision-control-hero.posture-act { background: linear-gradient(125deg,#071b2f 0%,#143348 55%,#8a4f0a 130%); }
.decision-control-hero > * { position: relative; z-index: 1; }
.decision-control-copy h2 { margin: 5px 0 8px; font-size: 29px; letter-spacing: -.045em; }
.decision-control-copy > p:not(.eyebrow) { max-width: 570px; margin: 0; color: #b7cad1; font-size: 11px; line-height: 1.65; }
.decision-assurance { margin-top: 21px; display: grid; grid-template-columns: 32px 1fr; gap: 10px; align-items: start; }
.decision-assurance > svg { width: 21px; color: #6ad8c2; }
.decision-assurance strong,.decision-assurance small { display: block; }
.decision-assurance strong { color: #edf8f6; font-size: 10px; }
.decision-assurance small { margin-top: 3px; color: #8facb5; font-size: 9px; line-height: 1.45; }
.posture-console { align-self: stretch; padding: 18px; border: 1px solid rgba(255,255,255,.12); border-radius: 13px; background: rgba(3,20,33,.42); backdrop-filter: blur(8px); }
.posture-caption { color: #8fb0ba; font-size: 8px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.posture-rail { margin-top: 17px; display: grid; grid-template-columns: repeat(3,1fr); gap: 5px; }
.posture-rail span { position: relative; padding-top: 17px; color: #7696a1; font-size: 8px; font-weight: 760; text-align: center; }
.posture-rail span::before { content: ""; position: absolute; left: 0; right: 0; top: 5px; height: 2px; background: rgba(255,255,255,.12); }
.posture-rail span:first-child::before { left: 50%; }
.posture-rail span:last-child::before { right: 50%; }
.posture-rail i { position: absolute; z-index: 1; left: 50%; top: 1px; width: 10px; height: 10px; transform: translateX(-50%); border: 2px solid #557680; border-radius: 50%; background: #0a2836; }
.posture-rail .is-current { color: #f4fbfa; }
.posture-rail .is-current i { border-color: #61d5bd; background: #19b89a; box-shadow: 0 0 0 4px rgba(25,184,154,.16); }
.posture-console-meta { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 7px; }
.posture-console-meta span { padding: 5px 7px; border-radius: 6px; background: rgba(255,255,255,.07); color: #9eb7bf; font-size: 8px; }
.posture-actions { margin-top: 17px; display: flex; flex-wrap: wrap; gap: 7px; }
.posture-actions .button-secondary { border-color: rgba(255,255,255,.18); color: #e9f4f3; background: rgba(255,255,255,.07); }
.posture-request { margin-bottom: 20px; padding: 17px 19px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border: 1px solid #e6c778; border-left: 4px solid var(--amber); border-radius: 12px; background: linear-gradient(100deg,#fff9e9,#fff); }
.posture-request h3 { margin: 3px 0 5px; font-size: 16px; }
.posture-request p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 9px; }
.posture-request > div:last-child { display: flex; gap: 8px; flex-shrink: 0; }
.decision-proof-grid { margin: 16px 0; display: grid; grid-template-columns: repeat(4,1fr); gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--line); }
.decision-proof-grid > div { padding: 12px; background: #fff; }
.decision-proof-grid span,.hash-proof span { display: block; color: var(--muted); font-size: 8px; font-weight: 780; letter-spacing: .07em; text-transform: uppercase; }
.decision-proof-grid strong { display: block; margin-top: 5px; font-size: 10px; }
.hash-proof { margin: 16px 0; display: grid; gap: 5px; padding: 13px; border-radius: 9px; background: #f4f7f7; }
.hash-proof code { margin-bottom: 6px; color: var(--ink); font-size: 9px; overflow-wrap: anywhere; }
.evidence-command-bar { margin: 16px 0 4px; display: flex; justify-content: flex-end; gap: 8px; }
.evidence-artifact { display: grid; grid-template-columns: 36px minmax(0,1fr) auto; gap: 11px; align-items: start; padding: 13px 0; border-bottom: 1px solid var(--line); }
.evidence-artifact:last-child { border-bottom: 0; }
.artifact-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; color: var(--teal-strong); background: var(--teal-soft); }
.artifact-icon svg { width: 17px; }
.evidence-artifact strong { display: block; font-size: 10px; }
.evidence-artifact p { margin: 4px 0; color: var(--muted); font-size: 9px; }
.evidence-artifact small { color: var(--muted-2); font-size: 8px; }
.artifact-actions { display: grid; justify-items: end; gap: 5px; }
.operations-hero { margin-bottom: 20px; padding: 27px; display: grid; grid-template-columns: minmax(0,1fr) minmax(250px,340px); align-items: center; gap: 30px; overflow: hidden; position: relative; color: white; border-radius: 16px; background: radial-gradient(circle at 85% 0,rgba(41,201,188,.18),transparent 34%),linear-gradient(125deg,#061a2c,#0c3541 68%,#0b615d); box-shadow: 0 16px 38px rgba(7,27,47,.16); }
.operations-hero::after { content: ""; position: absolute; width: 300px; height: 300px; right: -185px; bottom: -230px; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; box-shadow: 0 0 0 42px rgba(255,255,255,.025),0 0 0 84px rgba(255,255,255,.018); }
.operations-hero > * { position: relative; z-index: 1; }
.operations-hero h2 { max-width: 720px; margin: 5px 0 8px; font-size: 25px; letter-spacing: -.035em; }
.operations-hero p:not(.eyebrow) { max-width: 720px; margin: 0; color: #b7ced4; font-size: 11px; }
.operations-signal { min-height: 86px; display: grid; grid-template-columns: 38px 1fr; column-gap: 12px; align-content: center; padding: 16px; border: 1px solid rgba(111,235,219,.24); border-radius: 12px; background: rgba(3,18,29,.42); }
.operations-signal > svg { grid-row: 1 / 3; width: 22px; align-self: center; color: #63dfcf; }
.operations-signal strong,.operations-signal small { display: block; }
.operations-signal strong { font-size: 11px; }
.operations-signal small { margin-top: 4px; color: #9db8c1; font-size: 9px; }
.operations-signal.is-critical { border-color: rgba(255,151,157,.42); background: rgba(77,16,26,.33); }
.operations-signal.is-critical > svg { color: #ff989e; }
.operations-metrics { grid-template-columns: repeat(3,minmax(0,1fr)); }
.mode-ladder { min-width: 370px; display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.mode-ladder span { padding: 7px 9px; color: #c9d8dc; border: 1px solid rgba(255,255,255,.16); border-radius: 99px; background: rgba(255,255,255,.06); font-size: 8px; font-weight: 800; letter-spacing: .045em; text-transform: uppercase; white-space: nowrap; }
.mode-ladder span.is-active { color: #dffff8; border-color: rgba(82,223,202,.45); background: rgba(15,159,135,.22); }
.mode-ladder i { width: 18px; height: 1px; background: rgba(255,255,255,.25); }
.monitoring-command-bar { min-height: 68px; padding: 13px 15px 13px 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border: 1px solid var(--line); border-left: 3px solid var(--teal); border-radius: 11px; background: white; box-shadow: var(--shadow-sm); }
.monitoring-command-bar strong,.monitoring-command-bar small { display: block; }
.monitoring-command-bar strong { font-size: 11px; }
.monitoring-command-bar small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.monitoring-command-bar > div:last-child,.panel-actions,.alert-workflow-actions { display: flex; align-items: center; gap: 8px; }
.monitoring-split { margin-top: 22px; display: grid; grid-template-columns: minmax(0,1.45fr) minmax(320px,.65fr); align-items: start; gap: 18px; }
.risk-table tbody tr { cursor: pointer; }
.risk-table tbody tr:hover { background: #f8fbfb; }
.profile-list { display: grid; padding-top: 8px; padding-bottom: 8px; }
.profile-row { min-height: 58px; display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.profile-row:last-child { border-bottom: 0; }
.profile-row strong,.profile-row small { display: block; }
.profile-row strong { font-size: 10px; }
.profile-row small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.alert-workflow-actions { margin-top: 16px; flex-wrap: wrap; }
.empty-inline { padding: 26px; color: var(--muted); text-align: center; font-size: 10px; }
.field-span { grid-column: 1 / -1; }

.loading-grid { padding: 30px clamp(24px, 3vw, 46px); display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.skeleton { height: 130px; border-radius: var(--radius); background: linear-gradient(90deg,#e8edef 25%,#f4f7f8 37%,#e8edef 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; }
.skeleton-wide { grid-column: 1 / -1; height: 260px; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

.backdrop { position: fixed; inset: 0; z-index: 70; background: rgba(2,15,25,.43); backdrop-filter: blur(2px); animation: fade-in .16s ease; }
.backdrop.is-dialog { z-index: 90; }
.drawer { position: fixed; inset: 0 0 0 auto; z-index: 80; width: min(620px,100vw); display: grid; grid-template-rows: auto 1fr; background: #fff; box-shadow: var(--shadow-lg); animation: slide-in .22s ease; }
.drawer-header { min-height: 82px; padding: 18px 22px; display: flex; justify-content: space-between; align-items: center; gap: 16px; border-bottom: 1px solid var(--line); }
.drawer-header h2 { margin: 3px 0 0; font-size: 19px; letter-spacing: -.025em; }
.drawer-body { padding: 22px; overflow-y: auto; }
@keyframes fade-in { from { opacity: 0; } }
@keyframes slide-in { from { transform: translateX(28px); opacity: .3; } }

.steps { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; margin-bottom: 23px; }
.step { display: flex; gap: 8px; align-items: center; color: var(--muted-2); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .055em; }
.step::before { content: attr(data-step); width: 24px; height: 24px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: var(--canvas-deep); color: var(--muted); }
.step.is-active { color: var(--navy-900); }
.step.is-active::before, .step.is-complete::before { background: var(--navy-900); color: white; }
.step.is-complete::before { content: "✓"; background: var(--teal-strong); }

.vendor-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.vendor-option { min-height: 105px; padding: 13px; display: flex; flex-direction: column; align-items: flex-start; gap: 7px; border: 1px solid var(--line); border-radius: 10px; background: #fff; text-align: left; cursor: pointer; }
.vendor-option:hover { border-color: #a7babf; background: #fbfdfd; }
.vendor-option.is-selected { border-color: var(--teal); box-shadow: inset 0 0 0 1px var(--teal); background: #f7fdfb; }
.vendor-option-head { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.vendor-option strong { font-size: 11px; }
.vendor-option small { color: var(--muted); font-size: 9px; line-height: 1.4; }

.form-section { margin-bottom: 24px; }
.form-section-head { margin-bottom: 12px; }
.form-section-head h3 { margin: 0; font-size: 13px; }
.form-section-head p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.connector-purpose { margin: 20px 0; padding: 16px; background: var(--teal-soft, #e7f5f2); border-radius: 12px; line-height: 1.6; }
.connector-purpose p, .connector-note { color: var(--muted); font-size: 12px; line-height: 1.65; }
.connector-fieldset { border: 0; padding: 0; margin: 24px 0; min-width: 0; }
.connector-fieldset legend { margin-bottom: 16px; font-weight: 800; }
.connector-contract { margin: 20px 0; padding: 16px; border: 1px solid var(--line, #dce4ea); border-radius: 10px; overflow-wrap: anywhere; }
.connector-contract summary { cursor: pointer; font-weight: 700; }
.connector-contract p { font-size: 12px; line-height: 1.65; }
.connector-request-preview { white-space: pre-wrap; overflow-wrap: anywhere; padding: 16px; margin: 20px 0; background: #f2f6f8; border-left: 3px solid var(--teal, #00897b); border-radius: 8px; font-size: 12px; line-height: 1.8; }
.connector-confirm { display: flex; align-items: start; gap: 12px; margin: 22px 0; font-size: 12px; line-height: 1.6; }
.drawer-body form > .button[type="submit"] { margin-top: var(--space-lg); }
.field { display: grid; gap: 6px; align-content: start; }
.field.is-full { grid-column: 1 / -1; }
.field > span { font-size: 10px; font-weight: 780; color: var(--ink); }
.field .required { color: var(--red); }
.field input, .field select, .field textarea {
  width: 100%;
  border: 1px solid #cfdadd;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input, .field select { height: 42px; padding: 0 11px; }
.field textarea { padding: 10px 11px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(40,117,199,.12); }
.field input[aria-invalid="true"], .field select[aria-invalid="true"] { border-color: var(--red); }
.field small { color: var(--muted); font-size: 9px; line-height: 1.4; }
.input-with-action { position: relative; }
.input-with-action input { padding-right: 40px; }
.input-with-action button { position: absolute; right: 4px; top: 4px; width: 34px; height: 34px; display: grid; place-items: center; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.input-with-action svg { width: 16px; }
.form-error { margin: 0; padding: 10px 11px; color: var(--red); background: var(--red-soft); border: 1px solid #f3c9cc; border-radius: 8px; font-size: 10px; }
.form-actions { position: sticky; bottom: -22px; margin: 25px -22px -22px; padding: 15px 22px; display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line); background: rgba(255,255,255,.96); backdrop-filter: blur(8px); }

.info-callout { display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 12px; border: 1px solid #bfddd7; border-radius: 9px; background: var(--teal-soft); }
.info-callout.is-warning { border-color: #efd89e; background: var(--amber-soft); }
.info-callout svg { width: 17px; margin: 2px auto 0; color: var(--teal-strong); }
.info-callout.is-warning svg { color: var(--amber); }
.info-callout strong { display: block; font-size: 10px; }
.info-callout p { margin: 3px 0 0; color: var(--muted); font-size: 9px; }
.requirements { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 7px; }
.requirements li { display: grid; grid-template-columns: 17px 1fr; gap: 7px; color: var(--muted); font-size: 9px; }
.requirements svg { width: 14px; color: var(--teal-strong); }

.detail-hero { padding: 16px; border: 1px solid var(--line); border-radius: 11px; background: #fafcfc; }
.detail-hero-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 13px; }
.detail-hero h3 { margin: 0; font-size: 15px; }
.detail-hero p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.detail-actions { display: flex; gap: 8px; margin-top: 15px; }
.detail-grid { margin: 16px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--line); }
.detail-item { min-height: 66px; padding: 11px; background: white; }
.detail-item span { display: block; color: var(--muted); font-size: 8px; font-weight: 750; text-transform: uppercase; letter-spacing: .07em; }
.detail-item strong { display: block; margin-top: 5px; font-size: 10px; overflow-wrap: anywhere; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); }
.tabs { overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
.tab { padding: 10px 12px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font-size: 10px; font-weight: 750; cursor: pointer; }
.tab.is-active { color: var(--navy-900); border-bottom-color: var(--teal); }
.tab-panel { padding-top: 10px; }

.drop-zone { min-height: 150px; padding: 22px; display: grid; place-items: center; border: 1px dashed #afbec4; border-radius: 11px; background: #fafcfc; text-align: center; cursor: pointer; }
.drop-zone:hover { border-color: var(--teal); background: #f7fcfb; }
.drop-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop-zone svg { width: 25px; color: var(--teal-strong); }
.drop-zone strong { display: block; margin-top: 8px; font-size: 11px; }
.drop-zone small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }

.confirm-dialog { position: fixed; z-index: 100; left: 50%; top: 50%; width: min(430px,calc(100vw - 28px)); padding: 24px; transform: translate(-50%,-50%); border-radius: 15px; background: white; box-shadow: var(--shadow-lg); animation: dialog-in .17s ease; }
.dialog-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 11px; background: var(--teal-soft); color: var(--teal-strong); }
.dialog-icon svg { width: 21px; }
.confirm-dialog h2 { margin: 15px 0 6px; font-size: 17px; }
.confirm-dialog > p { margin: 0 0 16px; color: var(--muted); font-size: 11px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
@keyframes dialog-in { from { transform: translate(-50%,-47%); opacity: 0; } }

.auth-gate { position: fixed; inset: 0; z-index: 150; display: grid; grid-template-columns: minmax(420px,1.15fr) minmax(420px,.85fr); min-height: 100vh; background: #fff; }
.session-check { min-height: 100dvh; display: grid; place-items: center; padding: 24px; background: var(--navy-900); }
.session-check-card { width: min(100%,480px); padding: 32px; border-radius: 16px; background: #fff; box-shadow: 0 16px 60px #0002; }
.session-check-card h1 { margin: 12px 0; font-size: 26px; color: var(--navy-900); }
.session-check-card p { color: #526778; line-height: 1.6; }
.auth-story { position: relative; overflow: hidden; padding: 32px clamp(36px,5vw,76px); display: flex; flex-direction: column; justify-content: space-between; color: white; background: var(--navy-900); }
.auth-story::before { content: ""; position: absolute; width: 520px; height: 520px; right: -220px; top: -220px; border: 1px solid rgba(255,255,255,.07); border-radius: 50%; box-shadow: 0 0 0 70px rgba(255,255,255,.025), 0 0 0 140px rgba(255,255,255,.018); }
.auth-story::after { content: ""; position: absolute; width: 260px; height: 260px; left: -170px; bottom: -160px; border: 1px solid rgba(25,184,154,.18); border-radius: 50%; box-shadow: 0 0 0 55px rgba(25,184,154,.04); }
.auth-brand { padding: 0; position: relative; z-index: 1; }
.auth-message { position: relative; z-index: 1; max-width: 620px; margin: 9vh 0; }
.auth-kicker { color: #77d8c4; font-size: 11px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.auth-message h2 { margin: 15px 0 18px; font-size: clamp(36px,4.3vw,64px); line-height: 1.04; letter-spacing: -.052em; }
.auth-message p { max-width: 540px; margin: 0; color: #a9bfcc; font-size: 15px; line-height: 1.65; }
.auth-proof { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3,1fr); border-top: 1px solid rgba(255,255,255,.1); padding-top: 20px; }
.auth-proof > div { display: grid; grid-template-columns: 26px 1fr; column-gap: 8px; padding-right: 15px; }
.auth-proof svg { width: 18px; color: #77d8c4; grid-row: 1 / span 2; }
.auth-proof strong, .auth-proof small { display: block; }
.auth-proof strong { color: #eaf2f5; font-size: 10px; }
.auth-proof small { color: #7f9aaa; font-size: 9px; margin-top: 2px; }
.auth-panel { width: min(470px,calc(100% - 60px)); align-self: center; justify-self: center; display: grid; gap: 24px; }
.auth-panel h1 { margin: 5px 0 8px; color: var(--navy-900); font-size: 29px; letter-spacing: -.04em; }
.muted { color: var(--muted); }
.auth-panel > div > p:last-child { margin: 0; font-size: 12px; }
.local-help { display: grid; grid-template-columns: 32px 1fr; gap: 9px; align-items: start; padding: 12px; border-radius: 9px; background: var(--canvas); }
.local-help > svg { width: 18px; margin: 2px auto; color: var(--muted); }
.local-help p { margin: 0; min-width: 0; }
.local-help strong { display: block; font-size: 10px; }
.local-help code { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; overflow: hidden; text-overflow: ellipsis; }
.auth-foot { margin: 0; display: flex; justify-content: center; align-items: center; gap: 6px; color: var(--muted-2); font-size: 9px; }
.auth-foot svg { width: 12px; }
.admin-entry { color: var(--accent); font-size: 10px; font-weight: 750; text-align: center; text-decoration: none; }
.admin-entry:hover { text-decoration: underline; }

.toast-region { position: fixed; right: 20px; bottom: 20px; z-index: 180; width: min(370px,calc(100vw - 40px)); display: grid; gap: 8px; }
.toast { display: grid; grid-template-columns: 28px 1fr 24px; gap: 9px; align-items: start; padding: 12px; border: 1px solid #bcded7; border-radius: 11px; background: white; box-shadow: var(--shadow-lg); animation: toast-in .18s ease; }
.toast.is-error { border-color: #efc3c6; }
.toast-icon { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 8px; background: var(--teal-soft); color: var(--teal-strong); }
.toast.is-error .toast-icon { background: var(--red-soft); color: var(--red); }
.toast-icon svg { width: 14px; }
.toast strong, .toast small { display: block; }
.toast strong { font-size: 10px; }
.toast small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.toast button { border: 0; background: transparent; cursor: pointer; color: var(--muted); }
.toast button svg { width: 13px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 1180px) {
  .connector-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .metrics-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .overview-grid { grid-template-columns: 1fr; }
  .activation-grid { grid-template-columns: 1fr; }
  .monitoring-split { grid-template-columns: 1fr; }
  .monitoring-hero { align-items: flex-start; flex-direction: column; }
  .operations-hero { grid-template-columns: 1fr; }
  .decision-control-hero { grid-template-columns: 1fr; }
  .mode-ladder { min-width: 0; justify-content: flex-start; }
}

@media (max-width: 900px) {
  :root { --sidebar: 74px; }
  .brand { padding: 18px; justify-content: center; }
  .brand > span:last-child, .nav-item > span:nth-child(2), .nav-count, .trust-note span:last-child, .session-card > span:nth-child(2), .session-card > span:last-child { display: none; }
  .nav-item { grid-template-columns: 1fr; justify-items: center; padding: 0; }
  .trust-note { justify-content: center; padding: 0; }
  .session-card { grid-template-columns: 1fr; justify-items: center; padding: 7px; }
  .auth-gate { grid-template-columns: 1fr; }
  .auth-story { display: none; }
  .auth-panel { min-height: 100vh; align-content: center; }
}

@media (max-width: 680px) {
  :root { --sidebar: 0px; --space-section: 24px; }
  .sidebar { inset: auto 0 0; width: 100%; height: 62px; border-right: 0; border-top: 1px solid rgba(255,255,255,.08); }
  .sidebar > .brand, .sidebar-foot { display: none; }
  .nav-list { height: 100%; display: flex; gap: 0; padding: 5px 6px; overflow-x: auto; overflow-y: hidden; border: 0; scrollbar-width: none; }
  .nav-list::-webkit-scrollbar { display: none; }
  .nav-item { min-width: calc((100vw - 12px)/6); min-height: 50px; flex: 0 0 calc((100vw - 12px)/6); border-radius: 8px; }
  .nav-item.is-active { box-shadow: inset 0 -2px 0 var(--teal); }
  .nav-item svg { width: 20px; height: 20px; }
  .workspace { margin: 0 0 62px; }
  .topbar { min-height: 72px; height: auto; padding: 12px 16px; }
  .topbar h1 { font-size: 18px; }
  .health-pill { display: none; }
  #primary-action span:nth-child(2) { display: none; }
  #primary-action { width: 38px; padding: 0; }
  .view { padding: 18px 14px 30px; }
  .activation-hero { padding: 20px; }
  .activation-seal { display: none; }
  .metrics-grid, .connector-grid, .source-grid, .form-grid { grid-template-columns: 1fr; }
  .operations-metrics { grid-template-columns: 1fr; }
  .monitoring-command-bar { align-items: stretch; flex-direction: column; }
  .monitoring-command-bar > div:last-child { display: grid; grid-template-columns: 1fr 1fr; }
  .decision-control-hero { padding: 21px; }
  .posture-request { align-items: stretch; flex-direction: column; }
  .posture-request > div:last-child,.posture-actions { display: grid; grid-template-columns: 1fr; }
  .decision-proof-grid { grid-template-columns: 1fr 1fr; }
  .evidence-command-bar { display: grid; grid-template-columns: 1fr; }
  .evidence-artifact { grid-template-columns: 34px 1fr; }
  .artifact-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: flex-start; }
  .mode-ladder { width: 100%; overflow-x: auto; padding-bottom: 3px; }
  .screening-hero .mode-ladder { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; overflow: visible; padding-bottom: 0; }
  .screening-hero .mode-ladder i { display: none; }
  .screening-hero .mode-ladder span { min-width: 0; padding: 7px 4px; text-align: center; white-space: normal; line-height: 1.25; }
  .field-span { grid-column: auto; }
  .field.is-full { grid-column: auto; }
  .metric-card { min-height: 112px; }
  .coverage-wrap { grid-template-columns: 1fr; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .filter-group { overflow-x: auto; padding-bottom: 3px; }
  .vendor-picker { grid-template-columns: 1fr; }
  .drawer { bottom: 0; top: auto; height: min(92vh,850px); width: 100%; border-radius: 18px 18px 0 0; animation: sheet-in .22s ease; }
  .drawer-header { min-height: 72px; padding: 14px 17px; }
  .drawer-body { padding: 17px; }
  .form-actions { bottom: -17px; margin: 22px -17px -17px; padding: 13px 17px; }
  .steps { grid-template-columns: repeat(3,auto); }
  .step { font-size: 0; }
  .detail-actions { flex-direction: column; }
  .detail-actions .button { width: 100%; }
  .auth-panel { width: min(100% - 36px,470px); gap: 20px; }
  .auth-panel h1 { font-size: 25px; }
  .feed-path { grid-template-columns: 1fr 28px 1fr; }
  .data-table th, .data-table td { padding-left: 11px; padding-right: 11px; }
  @keyframes sheet-in { from { transform: translateY(30px); opacity: .4; } }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
:root { --watch-border: #dce5ec; }
.posture-pill { display: inline-flex; cursor: pointer; max-width: 100%; white-space: normal; text-align: left; }
@media (max-width: 700px) {
  .topbar { height: auto; min-height: 84px; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; gap: 10px; }
  .topbar > div:first-child { flex-basis: 100%; }
  .topbar-actions { width: 100%; min-width: 0; }
  .posture-pill { flex: 1 1 0; min-width: 0; }
}
.watch-hash { overflow-wrap: anywhere; white-space: normal; }
.watch-gaps { padding-left: 22px; line-height: 1.6; overflow-wrap: anywhere; }
.watch-gaps li + li { margin-top: 9px; }
.watch-sample { padding: 18px; margin: 14px 0; border: 1px solid var(--watch-border); border-radius: 12px; background: #f8fafc; }
.watch-sample > small { display: block; margin-top: 6px; color: #526577; }
.watch-sample pre { max-width: 100%; overflow-x: auto; font-size: 12px; }
.watch-sample li { margin: 7px 0; }
.drawer:has(.watch-report) { width: min(1060px, 100vw); }
.watch-report .metrics-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.watch-report .form-section p { overflow-wrap: anywhere; }
@media (max-width: 700px) {
  .watch-report .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .watch-report .evidence-command-bar { flex-wrap: wrap; }
}

/* Role-aware section navigation. Full labels remain available on every screen size. */
.sidebar > .brand, .sidebar-foot { flex-shrink: 0; }
.nav-list { flex: 1; min-height: 0; align-content: start; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.nav-group { min-width: 0; }
.nav-group-row { display: grid; grid-template-columns: minmax(0, 1fr) 32px; gap: 2px; align-items: center; }
.nav-group-row .nav-item { padding: 8px 10px; gap: 8px; min-width: 0; }
.nav-group-row .nav-item > span:nth-child(2) { overflow-wrap: anywhere; font-size: 12px; }
.nav-toggle { display: grid; place-items: center; width: 32px; min-height: 44px; border: 0; border-radius: 8px; background: transparent; color: #aebfca; cursor: pointer; }
.nav-toggle:hover { background: rgba(255,255,255,.08); color: white; }
.nav-toggle svg { width: 15px; height: 15px; transition: transform .15s ease; }
.nav-toggle[aria-expanded="true"] svg { transform: rotate(90deg); }
.nav-submenu { margin: 4px 0 8px 20px; padding: 0 0 0 13px; list-style: none; border-left: 1px solid #355064; }
.nav-submenu li + li { margin-top: 2px; }
.nav-subitem { display: flex; align-items: center; justify-content: space-between; gap: 6px; width: 100%; min-height: 36px; padding: 7px 9px; border: 0; border-radius: 7px; background: transparent; color: #b5c8d5; text-align: left; font-size: 12px; line-height: 1.4; cursor: pointer; }
.nav-subitem:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-subitem.is-active { background: #12483e; color: #d4fff2; font-weight: 700; }
.nav-dialog-hint { color: #91b2be; }
.navigation-destination { scroll-margin-top: 108px; }
.navigation-destination:focus { outline: 2px solid var(--teal-strong); outline-offset: 5px; border-radius: 3px; }
.navigation-open, .navigation-close { display: none; }
.workspace-heading { min-width: 0; margin-right: auto; }
.navigation-backdrop { position: fixed; inset: 0; z-index: 54; border: 0; background: rgba(7,27,47,.5); cursor: pointer; }
@media (max-width: 900px) {
  :root { --sidebar: 0px; }
  .sidebar { display: none; inset: 0 auto 0 0; width: min(320px, calc(100vw - 40px)); height: 100dvh; z-index: 55; border-right: 1px solid #355064; border-top: 0; }
  .sidebar.is-open { display: flex; }
  .sidebar > .brand { display: flex; justify-content: start; padding: 18px; padding-right: 44px; }
  .sidebar .brand > span:last-child, .sidebar .nav-item > span:nth-child(2), .sidebar .nav-count, .sidebar .trust-note span:last-child, .sidebar .session-card > span:nth-child(2), .sidebar .session-card > span:last-child { display: block; }
  .sidebar .nav-list { display: grid; height: auto; gap: 5px; padding: 12px; overflow-x: hidden; overflow-y: auto; border-top: 1px solid rgba(255,255,255,.07); scrollbar-width: thin; }
  .sidebar .nav-item { grid-template-columns: 20px minmax(0, 1fr) auto; justify-items: stretch; min-width: 0; min-height: 44px; flex: initial; }
  .sidebar .nav-item.is-active { box-shadow: inset 3px 0 0 var(--teal); }
  .sidebar .sidebar-foot { display: grid; }
  .sidebar .trust-note { justify-content: start; padding: 0 10px; }
  .sidebar .session-card { grid-template-columns: 34px minmax(0,1fr) 16px; justify-items: stretch; padding: 9px; }
  .navigation-open, .navigation-close { display: grid; flex-shrink: 0; }
  .navigation-close { position: absolute; top: 22px; right: 10px; width: 30px; height: 36px; color: #d9e4ea; background: transparent; border-color: #355064; }
  .navigation-is-open { overflow: hidden; }
  .workspace { margin: 0; }
  .topbar { gap: 10px; }
  .navigation-destination { scroll-margin-top: 155px; }
}
@media (max-width: 680px) {
  .topbar .workspace-heading { flex: 1 1 calc(100% - 50px); }
  .topbar-actions { justify-content: flex-end; }
  .nav-subitem { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) { .nav-toggle svg { transition: none; } }

/* Shared spacing utilities follow component defaults. Grids retain their own gaps. */
.space-before-sm { margin-top: var(--space-sm); }
.space-before-md { margin-top: var(--space-md); }
.space-before-lg { margin-top: var(--space-lg); }
.space-before-xl { margin-top: var(--space-xl); }
.space-after-sm { margin-bottom: var(--space-sm); }
.space-after-lg { margin-bottom: var(--space-lg); }
/* A wide directory table must scroll inside its card, not stretch the page grid. */
.view .users-access { grid-template-columns: minmax(0,1fr); }
.view .users-access > * { min-width: 0; }

/* Retained assessment fingerprints and exact exported JSON must remain readable on small screens. */
.audited-evidence-cards,.audited-evidence-row{min-width:0;max-width:100%;}
.audited-evidence-row :is(dl,dd,pre,code,details){min-width:0;max-width:100%;overflow-wrap:anywhere;word-break:break-word;}
.audited-evidence-row pre{white-space:pre-wrap;}

/* Connection history must remain readable with long retained clock evidence on phones. */
@media(max-width:600px){
 [data-integration-handshakes] .data-table{min-width:0;width:100%;table-layout:fixed}
 [data-integration-handshakes] .data-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 [data-integration-handshakes] .data-table tbody{display:block;width:100%}
 [data-integration-handshakes] .data-table tr{display:block;padding:12px;border-bottom:1px solid var(--line)}
 [data-integration-handshakes] .data-table td{display:block;height:auto;width:auto;min-width:0;max-width:100%;padding:6px 0;border:0;white-space:normal;overflow-wrap:anywhere}
 [data-integration-handshakes] .data-table td::before{content:attr(data-column-label);display:block;margin-bottom:4px;font-size:10px;font-weight:700;letter-spacing:.04em;color:var(--muted)}
}

/* Hold outcome evidence has no icon column; scoped external CSS is compatible with the application CSP. */
.info-callout.hold-outcome-disclosure { grid-template-columns: minmax(0,1fr); padding: 16px; }
.hold-outcome-disclosure > div { min-width: 0; }
.hold-outcome-disclosure p { font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
