:root {
  color-scheme: light;
  --bg: #f4f1eb;
  --surface: #fffefa;
  --surface-muted: #f7f5f0;
  --surface-strong: #eeece6;
  --text: #101927;
  --text-soft: #344054;
  --muted: #667085;
  --line: #e2ded5;
  --line-strong: #cfc9be;
  --primary: #0f4fc5;
  --primary-strong: #0a3f9f;
  --primary-soft: #e9f0ff;
  --blue: #0f4fc5;
  --blue-soft: #e9f0ff;
  --amber: #a66612;
  --amber-soft: #fff1d8;
  --red: #b84343;
  --red-soft: #fde8e7;
  --violet: #6c55c5;
  --violet-soft: #eeeafd;
  --green: #25805a;
  --green-soft: #e3f3ea;
  --sidebar: #101927;
  --sidebar-2: #192334;
  --sidebar-text: #eef3f6;
  --sidebar-muted: #9ba7b7;
  --shadow: 0 12px 34px rgba(16, 25, 39, 0.06);
  --shadow-small: 0 2px 10px rgba(16, 25, 39, 0.045);
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101418;
  --surface: #1a2025;
  --surface-muted: #21282e;
  --surface-strong: #273039;
  --text: #edf2f5;
  --text-soft: #bdc7cf;
  --muted: #8996a1;
  --line: #303941;
  --line-strong: #46515b;
  --primary: #42bdb1;
  --primary-strong: #6bd1c8;
  --primary-soft: #173936;
  --blue: #7398f0;
  --blue-soft: #212f4f;
  --amber: #e1a448;
  --amber-soft: #3a2b16;
  --red: #eb7777;
  --red-soft: #402222;
  --violet: #a893ed;
  --violet-soft: #302846;
  --green: #62c292;
  --green-soft: #1d382c;
  --sidebar: #0c1013;
  --sidebar-2: #151b20;
  --sidebar-text: #f2f5f7;
  --sidebar-muted: #89949e;
  --shadow: 0 12px 34px rgba(0, 0, 0, 0.25);
  --shadow-small: 0 4px 14px rgba(0, 0, 0, 0.2);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
  letter-spacing: 0;
}

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

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

svg {
  display: block;
}

.app-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  width: 100%;
  height: 100vh;
  min-height: 0;
  overflow: hidden;
}

.sidebar {
  position: relative;
  z-index: 30;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100vh;
  padding: 18px 14px 14px;
  overflow: hidden;
  color: var(--sidebar-text);
  background: var(--sidebar);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.brand-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  min-height: 44px;
  padding: 0 6px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  overflow: hidden;
  border-radius: 9px;
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.18);
}

.brand-mark img {
  width: 100%;
  height: 100%;
}

.brand-copy {
  min-width: 0;
}

.brand-copy strong,
.brand-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-copy strong {
  font-size: 16px;
  font-weight: 850;
}

.brand-copy span {
  margin-top: 1px;
  color: var(--sidebar-muted);
  font-size: 11px;
}

.tenant-switcher {
  position: relative;
  margin-top: 24px;
}

.control-label,
.nav-label {
  display: block;
  padding: 0 8px;
  color: var(--sidebar-muted);
  font-size: 10px;
  font-weight: 850;
}

.tenant-button {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 16px;
  gap: 9px;
  align-items: center;
  width: 100%;
  min-height: 52px;
  margin-top: 7px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  background: var(--sidebar-2);
  cursor: pointer;
  text-align: left;
}

.tenant-button:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: #202c3f;
}

.tenant-button.is-static {
  cursor: default;
}

.tenant-button.is-static > svg {
  display: none;
}

.tenant-avatar {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 6px;
  background: #e8efff;
  color: #0f4fc5;
  font-size: 13px;
  font-weight: 900;
}

.tenant-button-copy {
  min-width: 0;
}

.tenant-button-copy strong,
.tenant-button-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tenant-button-copy strong {
  color: var(--sidebar-text);
  font-size: 12px;
}

.tenant-button-copy small {
  margin-top: 1px;
  color: var(--sidebar-muted);
  font-size: 10px;
}

.tenant-button > svg {
  width: 14px;
  color: var(--sidebar-muted);
}

.tenant-menu {
  position: absolute;
  z-index: 50;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: #1c2738;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32);
}

.tenant-menu button {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  width: 100%;
  padding: 7px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.tenant-menu button:hover,
.tenant-menu button.is-active {
  background: rgba(255, 255, 255, 0.08);
}

.tenant-menu-note {
  margin: 5px 4px 2px;
  padding: 8px 5px 3px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  color: var(--sidebar-muted);
  font-size: 10px;
  line-height: 1.5;
}

.tenant-menu button strong,
.tenant-menu button small {
  display: block;
}

.tenant-menu button small {
  color: var(--sidebar-muted);
  font-size: 10px;
}

.side-nav {
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin-top: 20px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.nav-label {
  margin: 14px 0 5px;
}

.nav-label:first-child {
  margin-top: 0;
}

.side-nav a {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 40px;
  padding: 0 10px;
  border-radius: 7px;
  color: #b9c2ca;
  font-size: 13px;
  font-weight: 680;
}

.side-nav a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.055);
}

.side-nav a.is-active {
  color: #ffffff;
  background: #22314a;
  box-shadow: inset 3px 0 0 #6f9cff;
}

.side-nav a svg {
  width: 17px;
  height: 17px;
}

.nav-count {
  min-width: 25px;
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--sidebar-muted);
  font-size: 10px;
  text-align: center;
}

.side-nav a.is-active .nav-count {
  background: rgba(111, 156, 255, 0.16);
  color: #b6ccff;
}

.sidebar-footer {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  margin-top: auto;
  padding: 12px 8px 2px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.live-dot,
.status-dot {
  display: block;
  width: 7px;
  height: 7px;
  margin-top: 6px;
  border-radius: 50%;
  background: #45c78d;
  box-shadow: 0 0 0 3px rgba(69, 199, 141, 0.12);
}

.sidebar-footer strong,
.sidebar-footer span {
  display: block;
}

.sidebar-footer strong {
  font-size: 11px;
}

.sidebar-footer span {
  margin-top: 2px;
  color: var(--sidebar-muted);
  font-size: 10px;
}

.workspace {
  display: grid;
  grid-template-rows: 64px minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.topbar {
  position: relative;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  min-width: 0;
  padding: 0 24px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.topbar-left,
.topbar-actions,
.breadcrumb,
.page-head-actions {
  display: flex;
  align-items: center;
}

.topbar-left,
.topbar-actions {
  min-width: 0;
  gap: 8px;
}

.breadcrumb {
  min-width: 0;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

.breadcrumb strong {
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.breadcrumb svg {
  width: 13px;
  height: 13px;
}

.icon-button,
.search-button,
.command-button,
.text-button,
.tenant-login {
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
}

.icon-button {
  display: inline-grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border-radius: 7px;
}

.icon-button:hover,
.search-button:hover,
.command-button:hover,
.tenant-login:hover {
  border-color: var(--line-strong);
  background: var(--surface-muted);
}

.icon-button svg {
  width: 17px;
  height: 17px;
}

.search-button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 190px;
  height: 36px;
  padding: 0 11px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 12px;
  text-align: left;
}

.search-button svg {
  width: 15px;
  height: 15px;
}

.command-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 7px;
  color: var(--text);
  font-size: 12px;
  font-weight: 750;
}

.command-button svg {
  width: 16px;
  height: 16px;
}

.command-button.primary {
  border-color: var(--primary);
  color: #ffffff;
  background: var(--primary);
}

.command-button.primary:hover {
  border-color: var(--primary-strong);
  background: var(--primary-strong);
}

.command-button:disabled,
.icon-button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.tenant-login {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 7px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
}

.tenant-login[hidden] {
  display: none;
}

.tenant-login svg {
  width: 16px;
  height: 16px;
}

.topbar-status {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 108px;
  height: 36px;
  padding: 0 10px;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

.topbar-status .status-dot {
  width: 6px;
  height: 6px;
  margin: 0;
  flex: 0 0 6px;
}

.auth-account {
  min-width: 0;
  height: 42px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding-left: 10px;
  border-left: 1px solid var(--line);
}

.auth-account[hidden] {
  display: none;
}

.auth-avatar {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: var(--primary);
  font-size: 12px;
  font-weight: 800;
}

.auth-copy {
  min-width: 0;
  display: grid;
  line-height: 1.25;
}

.auth-copy strong,
.auth-copy small {
  max-width: 96px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-copy strong {
  font-size: 11px;
}

.auth-copy small {
  color: var(--muted);
  font-size: 10px;
}

.auth-logout.icon-button {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
  border-color: transparent;
  background: transparent;
}

.main {
  min-width: 0;
  min-height: 0;
  padding: 26px 28px 36px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.view-panel {
  display: none;
  width: min(1580px, 100%);
  margin: 0 auto;
}

.view-panel.is-active {
  display: block;
  animation: view-in 180ms ease-out;
}

@keyframes view-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-end;
  min-height: 66px;
  margin-bottom: 20px;
}

.page-head > div:first-child {
  min-width: 0;
}

.eyebrow,
.section-kicker {
  display: block;
  margin-bottom: 5px;
  color: var(--primary);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 5px;
  font-size: 30px;
  line-height: 1.18;
  font-weight: 850;
}

h2 {
  margin-bottom: 0;
  font-size: 17px;
  line-height: 1.25;
  font-weight: 820;
}

h3 {
  font-size: 14px;
  line-height: 1.3;
}

.page-head p,
.panel-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.page-head-actions {
  flex: 0 0 auto;
  gap: 10px;
}

.data-badge,
.privacy-badge,
.status-pill,
.type-badge,
.confidence-badge,
.priority-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.data-badge {
  color: var(--primary-strong);
  background: var(--primary-soft);
  border: 1px solid color-mix(in srgb, var(--primary) 24%, var(--line));
}

.data-badge.domestic {
  color: var(--blue);
  background: var(--blue-soft);
}

.timestamp {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.privacy-badge {
  gap: 6px;
  color: var(--green);
  background: var(--green-soft);
}

.privacy-badge svg {
  width: 14px;
  height: 14px;
}

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

.panel-heading,
.section-heading-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.panel-heading {
  margin-bottom: 16px;
}

.panel-heading > div:first-child,
.section-heading-row > div:first-child {
  min-width: 0;
}

.text-button {
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  color: var(--primary);
  background: transparent;
  font-size: 12px;
  font-weight: 800;
}

.text-button:hover {
  color: var(--primary-strong);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.overview-layout {
  display: grid;
  grid-template-columns: 360px minmax(420px, 1fr) 340px;
  gap: 14px;
  align-items: stretch;
}

.readiness-panel,
.kpi-band,
.signal-overview {
  min-height: 260px;
}

.readiness-body {
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.score-ring {
  position: relative;
  display: grid;
  width: 126px;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--primary) 0 var(--score, 0%), var(--surface-strong) var(--score, 0%) 100%);
}

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

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

.score-ring strong {
  display: block;
  font-size: 32px;
  line-height: 1;
  font-weight: 900;
}

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

.score-components {
  display: grid;
  gap: 10px;
}

.score-component {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  align-items: center;
}

.score-component span {
  color: var(--text-soft);
  font-size: 11px;
}

.score-component strong {
  font-size: 11px;
}

.mini-progress,
.table-progress,
.audit-gauge {
  height: 5px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--surface-strong);
}

.mini-progress {
  grid-column: 1 / -1;
}

.mini-progress i,
.table-progress i,
.audit-gauge span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
}

.score-method {
  margin: 16px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
}

.kpi-band {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 0;
  overflow: hidden;
}

.kpi-item {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  min-height: 129px;
  padding: 18px;
}

.kpi-item:nth-child(odd) {
  border-right: 1px solid var(--line);
}

.kpi-item:nth-child(-n+2) {
  border-bottom: 1px solid var(--line);
}

.kpi-label,
.metric-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.kpi-value,
.metric-value {
  display: block;
  margin: 7px 0 4px;
  font-size: 26px;
  line-height: 1;
  font-weight: 900;
}

.kpi-hint,
.metric-hint {
  color: var(--muted);
  font-size: 10px;
}

.kpi-delta {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  width: fit-content;
  margin-top: 7px;
  padding: 2px 5px;
  border-radius: 4px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 9px;
  font-weight: 800;
}

.signal-mix {
  display: grid;
  gap: 13px;
}

.signal-mix-row {
  display: grid;
  grid-template-columns: 86px minmax(70px, 1fr) 64px;
  gap: 10px;
  align-items: center;
}

.signal-mix-row span {
  overflow: hidden;
  color: var(--text-soft);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.signal-mix-row strong {
  font-size: 11px;
  text-align: right;
}

.signal-track,
.bar-track {
  overflow: hidden;
  border-radius: 99px;
  background: var(--surface-strong);
}

.signal-track {
  height: 8px;
}

.signal-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.signal-track i.ai {
  background: var(--primary);
}

.signal-track i.domestic {
  background: var(--blue);
}

.signal-track i.referral {
  background: var(--amber);
}

.signal-track i.content {
  background: var(--violet);
}

.trend-surface {
  margin-top: 14px;
}

.trend-heading {
  align-items: flex-start;
}

.chart-controls {
  display: grid;
  justify-items: end;
  gap: 8px;
  max-width: 740px;
}

.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.segmented button {
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-muted);
  color: var(--muted);
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
}

.segmented button:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.segmented button.is-active {
  color: var(--primary-strong);
  border-color: color-mix(in srgb, var(--primary) 35%, var(--line));
  background: var(--primary-soft);
}

.segmented.compact button {
  min-height: 27px;
}

.trend-tab-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 5px;
  border-radius: 2px;
  vertical-align: 1px;
}

.trend-chart {
  position: relative;
  min-height: 290px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-muted);
}

.trend-svg {
  display: block;
  width: 100%;
  min-width: 760px;
  height: auto;
}

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

.trend-axis-label {
  fill: var(--muted);
  font-size: 10px;
  font-weight: 650;
}

.trend-line {
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trend-area {
  opacity: 0.11;
}

.trend-dot {
  stroke: var(--surface);
  stroke-width: 2;
}

.trend-bar {
  opacity: 0.86;
}

.trend-bar:hover,
.trend-dot:hover {
  opacity: 1;
}

.trend-empty,
.empty-state {
  display: grid;
  place-items: center;
  color: var(--muted);
  text-align: center;
}

.trend-empty {
  min-height: 288px;
}

.empty-state {
  min-height: 100px;
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 7px;
}

.trend-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--line);
}

.trend-stat {
  padding: 12px;
  background: var(--surface);
}

.trend-stat span,
.trend-stat small,
.trend-stat strong {
  display: block;
}

.trend-stat span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.trend-stat strong {
  margin-top: 4px;
  font-size: 18px;
}

.trend-stat small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(340px, 0.7fr);
  gap: 14px;
  margin-top: 14px;
}

.muted-count {
  color: var(--muted);
  font-size: 11px;
}

.task-list,
.compact-project-list,
.source-list,
.integration-list,
.security-list {
  display: grid;
}

.task-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: start;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.task-row:first-child {
  padding-top: 0;
  border-top: 0;
}

.task-index {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 5px;
  color: var(--muted);
  background: var(--surface-muted);
  font-size: 10px;
  font-weight: 850;
}

.task-copy {
  min-width: 0;
}

.task-copy strong,
.task-copy span {
  display: block;
}

.task-copy strong {
  font-size: 12px;
}

.task-copy span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.task-action {
  display: flex;
  gap: 7px;
  align-items: center;
  padding-top: 1px;
}

.priority-badge.high {
  color: var(--red);
  background: var(--red-soft);
}

.priority-badge.medium {
  color: var(--amber);
  background: var(--amber-soft);
}

.route-icon {
  display: inline-grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  cursor: pointer;
}

.route-icon:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.route-icon svg {
  width: 13px;
  height: 13px;
}

.compact-project {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 70px 58px;
  gap: 10px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.compact-project:first-child {
  padding-top: 0;
  border-top: 0;
}

.compact-project-name {
  min-width: 0;
}

.compact-project-name strong,
.compact-project-name span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-project-name strong {
  font-size: 12px;
}

.compact-project-name span {
  color: var(--muted);
  font-size: 9px;
}

.compact-project-metric {
  text-align: right;
}

.compact-project-metric strong,
.compact-project-metric span {
  display: block;
}

.compact-project-metric strong {
  font-size: 13px;
}

.compact-project-metric span {
  color: var(--muted);
  font-size: 9px;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
  box-shadow: var(--shadow-small);
}

.metric-cell {
  min-width: 0;
  min-height: 106px;
  padding: 16px;
  background: var(--surface);
}

.metric-value {
  font-size: 24px;
}

.table-surface {
  padding: 0;
  overflow: hidden;
}

.table-surface > .panel-heading {
  margin: 0;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

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

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

.legend-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 2px;
}

.legend-dot.ai {
  background: var(--primary);
}

.legend-dot.search {
  background: var(--blue);
}

.legend-dot.ecosystem {
  background: var(--amber);
}

.data-table-wrap {
  min-width: 0;
  overflow-x: auto;
}

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

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

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

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

.data-table tbody tr:hover td {
  background: color-mix(in srgb, var(--primary-soft) 45%, var(--surface));
}

.channel-cell,
.project-name-cell {
  min-width: 180px;
}

.channel-cell strong,
.channel-cell span,
.project-name-cell strong,
.project-name-cell span {
  display: block;
}

.channel-cell span,
.project-name-cell span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.type-badge.ai {
  color: var(--primary-strong);
  background: var(--primary-soft);
}

.type-badge.search {
  color: var(--blue);
  background: var(--blue-soft);
}

.type-badge.ecosystem {
  color: var(--amber);
  background: var(--amber-soft);
}

.confidence-badge.high {
  color: var(--green);
  background: var(--green-soft);
}

.confidence-badge.medium {
  color: var(--amber);
  background: var(--amber-soft);
}

.confidence-badge.low {
  color: var(--red);
  background: var(--red-soft);
}

.status-pill.active {
  color: var(--green);
  background: var(--green-soft);
}

.status-pill.waiting {
  color: var(--muted);
  background: var(--surface-strong);
}

.section-block {
  margin-top: 24px;
}

.section-heading-row {
  align-items: flex-end;
  margin-bottom: 13px;
}

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

.platform-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-small);
}

.platform-card:hover {
  border-color: var(--line-strong);
}

.platform-card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.platform-card-head h3 {
  margin-bottom: 2px;
  font-size: 14px;
}

.platform-card-head span {
  color: var(--muted);
  font-size: 9px;
}

.platform-total {
  font-size: 20px;
  line-height: 1;
  font-weight: 900;
}

.platform-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 15px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--line);
}

.platform-metrics div {
  min-width: 0;
  padding: 8px;
  background: var(--surface-muted);
}

.platform-metrics span,
.platform-metrics strong {
  display: block;
}

.platform-metrics span {
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.platform-metrics strong {
  margin-top: 3px;
  font-size: 12px;
}

.platform-note {
  min-height: 36px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 9px;
}

.platform-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 9px;
}

.funnel-surface {
  margin-top: 14px;
}

.funnel {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.funnel-step {
  position: relative;
  min-height: 125px;
  padding: 14px;
  border-left: 1px solid var(--line);
  background: var(--surface-muted);
}

.funnel-step:first-child {
  border-left: 0;
}

.funnel-step-number {
  display: grid;
  width: 23px;
  height: 23px;
  margin-bottom: 14px;
  place-items: center;
  border-radius: 5px;
  color: var(--primary-strong);
  background: var(--primary-soft);
  font-size: 10px;
  font-weight: 900;
}

.funnel-step strong {
  display: block;
  font-size: 12px;
}

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

.funnel-status {
  display: block;
  margin-top: 9px;
  color: var(--primary);
  font-size: 9px;
  font-weight: 800;
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 14px;
  align-items: start;
}

.asset-matrix {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--line);
}

.asset-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 70px;
  padding: 10px;
  background: var(--surface);
}

.asset-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 6px;
  color: var(--primary);
  background: var(--primary-soft);
}

.asset-icon svg {
  width: 15px;
  height: 15px;
}

.asset-copy {
  min-width: 0;
}

.asset-copy strong,
.asset-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-copy strong {
  font-size: 11px;
}

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

.asset-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.asset-status::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
  content: "";
}

.asset-status.live {
  color: var(--green);
}

.asset-status.live::before {
  background: var(--green);
}

.asset-status.missing {
  color: var(--red);
}

.asset-status.missing::before {
  background: var(--red);
}

.audit-panel {
  position: sticky;
  top: 0;
}

.audit-score {
  font-size: 28px;
  line-height: 1;
  font-weight: 900;
}

.audit-gauge {
  height: 8px;
  margin-bottom: 18px;
}

.audit-facts {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--line);
}

.audit-fact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 11px;
  background: var(--surface-muted);
}

.audit-fact span {
  color: var(--muted);
  font-size: 10px;
}

.audit-fact strong {
  font-size: 10px;
}

.filter-input {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 220px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}

.filter-input svg {
  width: 15px;
  height: 15px;
  color: var(--muted);
}

.filter-input input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.filter-input input::placeholder {
  color: var(--muted);
}

.question-workbench {
  padding: 0;
  overflow: hidden;
}

.question-filterbar {
  display: grid;
  grid-template-columns: minmax(220px, 1.7fr) repeat(4, minmax(120px, .72fr)) 36px;
  gap: 10px;
  align-items: end;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-muted);
}

.question-filterbar .filter-input {
  width: 100%;
}

.select-control {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.select-control > span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
}

.select-control select {
  width: 100%;
  height: 36px;
  padding: 0 28px 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  outline: 0;
  color: var(--text);
  background: var(--surface);
  font: inherit;
  font-size: 11px;
}

.select-control select:focus,
.question-filterbar .filter-input:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-soft);
}

.question-reset {
  width: 36px;
  height: 36px;
}

.question-project-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1px;
  border-bottom: 1px solid var(--line);
  background: var(--line);
}

.question-project-chip {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  min-width: 0;
  min-height: 52px;
  padding: 10px 14px;
  border: 0;
  color: var(--muted);
  background: var(--surface);
  font-size: 11px;
  font-weight: 800;
}

.question-project-chip span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.question-project-chip strong {
  color: var(--text);
  font-size: 13px;
}

.question-project-chip:hover,
.question-project-chip.is-active {
  color: var(--primary-strong);
  background: var(--primary-soft);
}

.question-results-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-end;
  padding: 18px;
}

.question-list {
  border-top: 1px solid var(--line);
}

.question-item {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.question-item.has-answer {
  box-shadow: inset 3px 0 0 var(--primary);
}

.question-item summary {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto auto 16px;
  gap: 12px;
  align-items: center;
  min-height: 72px;
  padding: 11px 18px;
  cursor: pointer;
  list-style: none;
}

.question-item summary::-webkit-details-marker {
  display: none;
}

.question-item summary:hover {
  background: color-mix(in srgb, var(--primary-soft) 42%, var(--surface));
}

.question-number {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--primary);
  background: var(--surface-muted);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 10px;
  font-weight: 850;
}

.question-summary-copy {
  min-width: 0;
}

.question-summary-copy strong,
.question-summary-copy > span {
  display: block;
}

.question-summary-copy strong {
  color: var(--text);
  font-size: 12px;
  line-height: 1.5;
}

.question-summary-copy > span {
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.question-batch {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.answer-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 850;
  white-space: nowrap;
}

.answer-badge.ready {
  color: var(--primary);
  background: var(--primary-soft);
}

.answer-badge.pending {
  color: var(--amber);
  background: var(--amber-soft);
}

.question-item summary > svg {
  width: 16px;
  height: 16px;
  transition: transform 160ms ease;
}

.question-item[open] summary > svg {
  transform: rotate(180deg);
}

.question-detail {
  padding: 16px 18px 18px 62px;
  border-top: 1px solid var(--line);
  background: var(--surface-muted);
}

.question-direct-answer {
  margin-bottom: 14px;
  padding-left: 12px;
  border-left: 3px solid var(--primary);
}

.question-direct-answer > span,
.question-sources > span {
  display: block;
  margin-bottom: 4px;
  color: var(--primary);
  font-size: 9px;
  font-weight: 850;
  text-transform: uppercase;
}

.question-detail .question-direct-answer p {
  max-width: 980px;
  margin: 0;
  color: var(--text);
  font-size: 12px;
  line-height: 1.75;
}

.question-key-points {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 20px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}

.question-key-points li {
  position: relative;
  padding-left: 14px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.question-key-points li::before {
  position: absolute;
  top: 0.55em;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--primary);
  content: "";
}

.question-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--line);
}

.question-facts > div {
  min-width: 0;
  padding: 11px 12px;
  background: var(--surface);
}

.question-facts span,
.question-facts strong {
  display: block;
}

.question-facts span {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 9px;
}

.question-facts strong {
  font-size: 10px;
  line-height: 1.5;
}

.question-detail p {
  margin: 12px 0 10px;
  color: var(--muted);
  font-size: 10px;
}

.question-sources {
  display: flex;
  gap: 7px;
  align-items: center;
  flex-wrap: wrap;
  margin: 10px 0;
}

.question-sources > span {
  width: 100%;
}

.question-sources a {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  min-height: 26px;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted);
  background: var(--surface);
  font-size: 9px;
  font-weight: 750;
}

.question-sources svg {
  width: 11px;
  height: 11px;
}

.question-target {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: var(--primary);
  font-size: 10px;
  font-weight: 850;
}

.question-target svg {
  width: 13px;
  height: 13px;
}

.question-list-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  min-height: 68px;
  padding: 14px 18px;
}

.question-list-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.command-button.subtle {
  color: var(--text);
  background: var(--surface-muted);
}

.project-table {
  min-width: 1050px;
}

.project-link {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.project-link:hover {
  color: var(--primary);
  border-color: var(--primary);
}

.project-link svg {
  width: 13px;
  height: 13px;
}

.readiness-cell {
  min-width: 120px;
}

.readiness-cell > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
  font-size: 9px;
}

.table-progress {
  height: 5px;
}

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

.bar-list {
  display: grid;
  gap: 12px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.95fr) minmax(100px, 1.6fr) 58px;
  gap: 10px;
  align-items: center;
}

.bar-label {
  display: flex;
  gap: 7px;
  align-items: center;
  min-width: 0;
  overflow: hidden;
  font-size: 10px;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-swatch {
  display: inline-block;
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 2px;
}

.swatch-0 { background: var(--primary); }
.swatch-1 { background: var(--blue); }
.swatch-2 { background: var(--amber); }
.swatch-3 { background: var(--violet); }
.swatch-4 { background: var(--red); }
.swatch-5 { background: var(--green); }

.bar-track {
  height: 7px;
}

.bar-track span {
  display: block;
  height: 100%;
  min-width: 2px;
  border-radius: inherit;
  background: var(--primary);
}

.bar-count {
  text-align: right;
}

.bar-count strong,
.bar-count span {
  display: block;
}

.bar-count strong {
  font-size: 11px;
}

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

.share-chart {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.donut {
  position: relative;
  display: grid;
  width: 142px;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-strong);
}

.donut::before {
  position: absolute;
  inset: 30px;
  border-radius: 50%;
  background: var(--surface);
  content: "";
}

.donut span {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

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

.legend-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.legend-row > span {
  display: flex;
  gap: 7px;
  align-items: center;
  min-width: 0;
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.legend-row strong {
  font-size: 10px;
}

.detail-panel {
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-small);
}

.detail-panel summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  min-height: 64px;
  padding: 14px 18px;
  cursor: pointer;
  list-style: none;
}

.detail-panel summary::-webkit-details-marker {
  display: none;
}

.detail-panel summary:hover {
  background: var(--surface-muted);
}

.detail-panel summary span {
  min-width: 0;
}

.detail-panel summary strong,
.detail-panel summary small {
  display: block;
}

.detail-panel summary strong {
  font-size: 12px;
}

.detail-panel summary small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.detail-panel summary svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  transition: transform 160ms ease;
}

.detail-panel[open] summary svg {
  transform: rotate(180deg);
}

.detail-body {
  padding: 18px;
  border-top: 1px solid var(--line);
}

.wide-table {
  min-width: 1050px;
}

.mono {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 10px;
}

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

.traffic-chip {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding: 2px 7px;
  border-radius: 5px;
  color: var(--muted);
  background: var(--surface-strong);
  font-size: 9px;
  font-weight: 750;
}

.traffic-chip.good {
  color: var(--green);
  background: var(--green-soft);
}

.traffic-chip.warn {
  color: var(--amber);
  background: var(--amber-soft);
}

.traffic-chip.hot {
  color: var(--red);
  background: var(--red-soft);
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.source-row,
.integration-row,
.security-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  min-height: 57px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}

.source-row:first-child,
.integration-row:first-child,
.security-row:first-child {
  padding-top: 0;
  border-top: 0;
}

.row-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 6px;
  color: var(--primary);
  background: var(--primary-soft);
}

.row-icon svg {
  width: 15px;
  height: 15px;
}

.row-copy {
  min-width: 0;
}

.row-copy strong,
.row-copy span {
  display: block;
}

.row-copy strong {
  font-size: 11px;
}

.row-copy span {
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.connection-state {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.connection-state::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
  content: "";
}

.connection-state.connected {
  color: var(--green);
}

.connection-state.connected::before {
  background: var(--green);
}

.evidence-list {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--line);
}

.evidence-list > div {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  min-height: 62px;
  padding: 10px;
  background: var(--surface-muted);
}

.evidence-level {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 900;
}

.evidence-level.strong {
  color: var(--green);
  background: var(--green-soft);
}

.evidence-level.medium {
  color: var(--primary);
  background: var(--primary-soft);
}

.evidence-level.light {
  color: var(--blue);
  background: var(--blue-soft);
}

.evidence-list p {
  margin: 0;
}

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

.evidence-list strong {
  font-size: 11px;
}

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

.detail-metrics {
  margin-bottom: 18px;
}

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

.dual-table h3 {
  margin-bottom: 8px;
}

.dual-table .data-table {
  min-width: 720px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: 14px;
}

.tenant-profile {
  min-height: 260px;
}

.tenant-profile-head {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.tenant-profile-avatar {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 8px;
  color: var(--primary-strong);
  background: var(--primary-soft);
  font-size: 20px;
  font-weight: 900;
}

.tenant-profile-head strong,
.tenant-profile-head span {
  display: block;
}

.tenant-profile-head strong {
  font-size: 14px;
}

.tenant-profile-head span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.plan-badge {
  padding: 4px 8px;
  border-radius: 5px;
  color: var(--violet);
  background: var(--violet-soft);
  font-size: 9px;
  font-weight: 900;
}

.tenant-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.tenant-fact span,
.tenant-fact strong {
  display: block;
}

.tenant-fact span {
  color: var(--muted);
  font-size: 9px;
}

.tenant-fact strong {
  margin-top: 3px;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-management {
  grid-column: 1 / -1;
}

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.account-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-block: 1px solid var(--line);
}

.account-summary > div {
  min-width: 0;
  padding: 13px 16px;
}

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

.account-summary span,
.account-summary strong {
  display: block;
}

.account-summary span {
  color: var(--muted);
  font-size: 10px;
}

.account-summary strong {
  margin-top: 3px;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-loading {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 56px;
  padding: 0 14px;
  color: var(--muted);
  font-size: 12px;
}

.account-loading svg {
  width: 16px;
  height: 16px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.member-list {
  display: grid;
}

.member-row {
  display: grid;
  grid-template-columns: 34px minmax(150px, 0.8fr) minmax(210px, 1.2fr) 64px 36px;
  gap: 12px;
  align-items: center;
  min-height: 62px;
  padding: 9px 4px;
  border-bottom: 1px solid var(--line);
}

.member-row:last-child {
  border-bottom: 0;
}

.member-row.is-disabled {
  opacity: 0.58;
}

.member-avatar {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 7px;
  color: var(--primary-strong);
  background: var(--primary-soft);
  font-size: 12px;
  font-weight: 900;
}

.member-identity,
.member-access {
  min-width: 0;
}

.member-identity strong,
.member-identity small,
.member-access strong,
.member-access small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-identity strong,
.member-access strong {
  font-size: 12px;
}

.member-identity small,
.member-access small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.member-state {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-align: right;
}

.member-state.is-active {
  color: var(--green);
}

.member-state::before {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 5px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.member-edit.icon-button {
  width: 32px;
  height: 32px;
  flex-basis: 32px;
}

.member-edit-placeholder {
  width: 32px;
}

.form-dialog {
  width: min(620px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 40px));
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 28px 90px rgba(16, 25, 39, 0.28);
}

.form-dialog::backdrop {
  background: rgba(16, 25, 39, 0.6);
  backdrop-filter: blur(3px);
}

.form-dialog-shell {
  display: grid;
  max-height: min(760px, calc(100vh - 40px));
  padding: 22px;
  overflow-y: auto;
}

.form-dialog-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

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

.form-grid label,
.tenant-assignment legend {
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 760;
}

.form-grid input,
.form-grid select {
  width: 100%;
  height: 42px;
  margin-top: 7px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--text);
  background: var(--surface);
}

.form-grid input:focus,
.form-grid select:focus {
  outline: 3px solid color-mix(in srgb, var(--primary) 14%, transparent);
  border-color: var(--primary);
}

.form-grid input:disabled {
  color: var(--muted);
  background: var(--surface-muted);
}

.form-grid label > small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 500;
}

.form-span {
  grid-column: 1 / -1;
}

.tenant-assignment {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.tenant-assignment legend {
  margin-bottom: 7px;
}

#memberTenantOptions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.check-option {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-height: 52px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-muted);
  cursor: pointer;
}

.check-option input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--primary);
}

.check-option strong,
.check-option small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.check-option strong {
  font-size: 11px;
}

.check-option small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.form-error {
  min-height: 20px;
  margin: 10px 0 0;
  color: var(--red);
  font-size: 11px;
}

.form-hint {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.form-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.command-dialog {
  width: min(620px, calc(100vw - 32px));
  max-height: min(620px, calc(100vh - 60px));
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.3);
}

.command-dialog::backdrop {
  background: rgba(11, 16, 20, 0.56);
  backdrop-filter: blur(3px);
}

.command-search {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) 36px;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.command-search > svg {
  width: 18px;
  height: 18px;
  color: var(--muted);
}

.command-search input {
  width: 100%;
  height: 36px;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.command-results {
  max-height: 500px;
  padding: 8px;
  overflow-y: auto;
}

.command-group-label {
  display: block;
  padding: 7px 9px 5px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.command-result {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 48px;
  padding: 7px 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.command-result:hover {
  background: var(--surface-muted);
}

.command-result .row-icon {
  width: 30px;
  height: 30px;
}

.command-result strong,
.command-result small {
  display: block;
}

.command-result strong {
  font-size: 11px;
}

.command-result small {
  color: var(--muted);
  font-size: 9px;
}

.command-result > span:last-child {
  color: var(--muted);
  font-size: 9px;
}

.toast {
  position: fixed;
  z-index: 100;
  right: 24px;
  bottom: 24px;
  max-width: min(360px, calc(100vw - 48px));
  padding: 10px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow);
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease;
}

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

.mobile-only,
.mobile-scrim {
  display: none;
}

@media (max-width: 1320px) {
  .auth-copy {
    display: none;
  }

  .overview-layout {
    grid-template-columns: 340px minmax(380px, 1fr);
  }

  .signal-overview {
    grid-column: 1 / -1;
    min-height: auto;
  }

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

  .signal-mix-row {
    grid-template-columns: 1fr 60px;
  }

  .signal-mix-row .signal-track {
    grid-column: 1 / -1;
    grid-row: 2;
  }

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

  .question-filterbar {
    grid-template-columns: minmax(220px, 1.5fr) repeat(2, minmax(130px, 1fr));
  }

  .question-reset {
    grid-column: 3;
    justify-self: end;
  }
}

@media (max-width: 1080px) {
  .app-shell {
    grid-template-columns: 224px minmax(0, 1fr);
  }

  .topbar {
    padding: 0 18px;
  }

  .main {
    padding: 22px 20px 32px;
  }

  .overview-layout,
  .split-layout,
  .content-layout {
    grid-template-columns: 1fr;
  }

  .audit-panel {
    position: static;
  }

  .readiness-panel,
  .kpi-band {
    min-height: auto;
  }

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

  .kpi-item {
    min-height: 110px;
  }

  .kpi-item:nth-child(odd) {
    border-right: 0;
  }

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

  .kpi-item:nth-child(-n+2) {
    border-bottom: 0;
  }

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

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

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

  .funnel-step:nth-child(4) {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .funnel-step:nth-child(5) {
    border-top: 1px solid var(--line);
  }

  .dual-table {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 820px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(280px, calc(100vw - 56px));
    transform: translateX(-100%);
    transition: transform 180ms ease;
  }

  .app-shell.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .workspace {
    width: 100%;
    height: 100vh;
  }

  .mobile-only {
    display: inline-grid;
  }

  .mobile-scrim {
    position: fixed;
    z-index: 25;
    inset: 0;
    background: rgba(4, 8, 11, 0.48);
  }

  .mobile-scrim:not([hidden]) {
    display: block;
  }

  .search-button {
    width: 36px;
    flex: 0 0 36px;
    justify-content: center;
    padding: 0;
  }

  .search-button span {
    display: none;
  }

  .topbar-status {
    display: none;
  }

  .auth-account {
    padding-left: 7px;
  }

  .page-head {
    align-items: flex-start;
  }

  .chart-controls {
    justify-items: stretch;
  }

  .trend-heading {
    display: grid;
  }

  .segmented {
    justify-content: flex-start;
  }

  .platform-grid,
  .geo-grid,
  .report-grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .member-row {
    grid-template-columns: 34px minmax(0, 1fr) auto 36px;
  }

  .member-access {
    grid-column: 2 / 4;
  }

  .member-state {
    grid-column: 3;
    grid-row: 1;
  }

  .member-edit,
  .member-edit-placeholder {
    grid-column: 4;
    grid-row: 1;
  }

  .asset-matrix {
    grid-template-columns: 1fr;
  }

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

  .question-search {
    grid-column: 1 / -1;
  }

  .question-reset {
    grid-column: auto;
    justify-self: start;
  }

  .question-item summary {
    grid-template-columns: 32px minmax(0, 1fr) auto 16px;
  }

  .question-batch {
    grid-column: 2;
  }

  .question-detail {
    padding-left: 62px;
  }

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

  .funnel-step,
  .funnel-step:nth-child(4),
  .funnel-step:nth-child(5) {
    min-height: auto;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .funnel-step:first-child {
    border-top: 0;
  }
}

@media (max-width: 620px) {
  .workspace {
    grid-template-rows: 56px minmax(0, 1fr);
  }

  .topbar {
    padding: 0 10px;
  }

  .breadcrumb > span {
    display: none;
  }

  .auth-avatar {
    display: none;
  }

  #exportButton,
  #themeButton {
    display: none;
  }

  .auth-account {
    padding-left: 5px;
  }

  .tenant-login {
    width: 36px;
    padding: 0;
    justify-content: center;
  }

  .tenant-login span {
    display: none;
  }

  .main {
    padding: 18px 12px 28px;
  }

  .page-head {
    display: block;
    min-height: 0;
    margin-bottom: 16px;
  }

  .page-head-actions,
  .page-head > .filter-input,
  .page-head > .command-button {
    margin-top: 12px;
  }

  h1 {
    font-size: 24px;
  }

  .overview-layout {
    display: block;
  }

  .overview-layout > * + * {
    margin-top: 12px;
  }

  .readiness-body {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 14px;
  }

  .score-ring {
    width: 112px;
  }

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

  .kpi-item,
  .metric-cell {
    min-height: 98px;
    padding: 13px;
  }

  .kpi-item + .kpi-item {
    border-left: 0;
  }

  .kpi-item:nth-child(even),
  .metric-cell:nth-child(even) {
    border-left: 1px solid var(--line);
  }

  .kpi-item:nth-child(-n+2) {
    border-bottom: 1px solid var(--line);
  }

  .signal-mix {
    grid-template-columns: 1fr;
  }

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

  .trend-stat {
    min-height: 76px;
  }

  .task-row {
    grid-template-columns: 24px minmax(0, 1fr);
  }

  .task-action {
    grid-column: 2;
  }

  .compact-project {
    grid-template-columns: minmax(0, 1fr) 62px;
  }

  .compact-project .compact-project-metric:last-child {
    display: none;
  }

  .section-heading-row {
    display: grid;
  }

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

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

  .share-chart {
    grid-template-columns: 1fr;
  }

  .donut {
    margin: 0 auto;
  }

  .bar-row {
    grid-template-columns: minmax(90px, 1fr) minmax(80px, 1.2fr) 48px;
    gap: 7px;
  }

  .filter-input {
    width: 100%;
  }

  .question-filterbar,
  .question-facts {
    grid-template-columns: 1fr;
  }

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

  .question-item summary {
    grid-template-columns: 30px minmax(0, 1fr) 16px;
    gap: 9px;
    align-items: start;
    padding: 12px;
  }

  .question-item summary .answer-badge,
  .question-batch {
    grid-column: 2;
    width: fit-content;
  }

  .question-item summary > svg {
    grid-column: 3;
    grid-row: 1;
  }

  .question-detail {
    padding: 14px 12px 16px 51px;
  }

  .question-key-points {
    grid-template-columns: 1fr;
  }

  .question-list-footer {
    display: grid;
  }

  .question-list-footer .command-button {
    width: 100%;
  }

  .detail-panel summary {
    align-items: flex-start;
  }

  .tenant-facts {
    grid-template-columns: 1fr;
  }

  .account-management .panel-heading {
    display: grid;
  }

  .panel-actions {
    justify-content: flex-start;
  }

  .account-summary {
    grid-template-columns: 1fr;
  }

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

  .member-row {
    gap: 8px;
  }

  .form-dialog-shell {
    padding: 18px 15px;
  }

  .form-grid,
  #memberTenantOptions {
    grid-template-columns: 1fr;
  }

  .form-dialog-actions .command-button {
    flex: 1;
    justify-content: center;
  }

  .toast {
    right: 12px;
    bottom: 12px;
    max-width: calc(100vw - 24px);
  }
}

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