:root {
  color-scheme: light;
  --paper: #f4f0e7;
  --paper-deep: #ebe4d6;
  --surface: #fffdf7;
  --surface-soft: #f8f4eb;
  --ink: #161616;
  --muted-ink: #625f58;
  --quiet-ink: #827c72;
  --border: #d9d2c4;
  --border-strong: #b8b0a2;
  --focus: #f5ac1c;
  --focus-strong: #754300;
  --focus-soft: #fff0c8;
  --analytic: #2446c8;
  --analytic-soft: #dde5ff;
  --positive: #17765a;
  --positive-soft: #dff2e8;
  --negative: #b94242;
  --negative-soft: #f8dfdc;
  --warning: #713d00;
  --warning-soft: #fff0d3;
  --unknown: #777168;
  --unknown-soft: #ece8df;
  --focus-ring: #563bff;
  --shadow-small: 0 6px 20px rgba(31, 26, 15, 0.08);
  --shadow-large: 0 28px 80px rgba(31, 26, 15, 0.2);
  --sans: Inter, "Segoe UI", Arial, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --font-display: Georgia, "Times New Roman", serif;
  --font-data: var(--mono);
  --topbar-height: 72px;
  --rail-width: 248px;
  --motion-fast: 150ms;
  --motion-standard: 200ms;
  --motion-deliberate: 250ms;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 0;
  background: var(--paper);
  font-family: var(--sans);
  scroll-behavior: smooth;
}

body {
  min-width: 0;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    linear-gradient(rgba(22, 22, 22, 0.027) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22, 22, 22, 0.027) 1px, transparent 1px),
    var(--paper);
  background-size: 40px 40px;
  font-size: 15px;
  line-height: 1.5;
}

button,
select,
input {
  font: inherit;
}

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

button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible,
dialog:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

button {
  color: inherit;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  color: var(--surface);
  background: var(--ink);
  transform: translateY(-150%);
}

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

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

.topbar {
  position: sticky;
  z-index: 40;
  top: 0;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: var(--rail-width) minmax(0, 1fr) auto;
  align-items: center;
  min-width: 0;
  height: var(--topbar-height);
  border-bottom: 1px solid var(--ink);
  background: rgba(244, 240, 231, 0.96);
  backdrop-filter: blur(18px);
}

.product-mark {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  height: 100%;
  padding: 0 20px;
  border-right: 1px solid var(--ink);
  color: inherit;
  text-decoration: none;
}

.product-mark__symbol {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--ink);
  background: var(--focus);
  font-weight: 800;
  letter-spacing: -0.08em;
}

.product-mark__symbol span {
  color: var(--surface);
}

.product-mark__copy {
  display: grid;
  min-width: 0;
  line-height: 1.15;
}

.product-mark__copy strong {
  font-size: 14px;
  letter-spacing: -0.01em;
}

.product-mark__copy small {
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted-ink);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar__context {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding-inline: 24px;
  color: var(--muted-ink);
  font-family: var(--mono);
  font-size: 11px;
}

.status-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--positive);
  box-shadow: 0 0 0 4px var(--positive-soft);
}

.topbar__coverage {
  padding-left: 10px;
  border-left: 1px solid var(--border);
  color: var(--ink);
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-right: 16px;
}

.menu-button {
  display: none;
}

.icon-button,
.text-button,
.primary-button,
.ghost-button,
.segmented-button,
.chart-mark,
.route-link,
.source-row,
.evidence-row,
.state-button,
.theme-card {
  border: 0;
  cursor: pointer;
}

.icon-button {
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: var(--surface);
  font-size: 18px;
}

.menu-button {
  display: none;
}

.text-button,
.primary-button,
.ghost-button {
  min-height: 40px;
  padding: 9px 14px;
  border-radius: 3px;
  font-weight: 650;
  line-height: 1;
}

.text-button,
.ghost-button {
  border: 1px solid var(--border-strong);
  background: transparent;
}

.text-button:hover,
.ghost-button:hover {
  background: var(--surface);
}

.primary-button {
  border: 1px solid var(--ink);
  background: var(--focus);
  box-shadow: 3px 3px 0 var(--ink);
}

.primary-button:active {
  box-shadow: 1px 1px 0 var(--ink);
  transform: translate(2px, 2px);
}

.section-rail {
  position: sticky;
  z-index: 30;
  top: var(--topbar-height);
  grid-column: 1;
  grid-row: 2;
  display: flex;
  min-width: 0;
  height: calc(100vh - var(--topbar-height));
  flex-direction: column;
  border-right: 1px solid var(--ink);
  background: rgba(255, 253, 247, 0.9);
}

.rail__intro {
  display: grid;
  gap: 8px;
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--border);
}

.rail__kicker,
.eyebrow,
.drawer__level,
.mini-label,
.compare-tray__label,
.metric-card__label,
.trust-item__label,
.field-label,
.state-label {
  color: var(--muted-ink);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.rail__intro strong {
  max-width: 170px;
  font-size: 15px;
  line-height: 1.25;
}

.route-nav {
  display: grid;
  gap: 2px;
  padding: 14px 10px;
}

.route-link {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  min-height: 44px;
  padding: 8px 10px;
  border-radius: 4px;
  background: transparent;
  text-align: left;
}

.route-link:hover {
  background: var(--focus-soft);
}

.route-link.is-active {
  color: var(--surface);
  background: var(--ink);
}

.route-link__index {
  color: var(--quiet-ink);
  font-family: var(--mono);
  font-size: 10px;
}

.route-link.is-active .route-link__index {
  color: var(--focus);
}

.rail__progress {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: auto;
  padding: 18px 20px 22px;
  border-top: 1px solid var(--border);
  color: var(--muted-ink);
  font-family: var(--mono);
  font-size: 10px;
}

.progress-track {
  grid-column: 1 / -1;
  height: 3px;
  overflow: hidden;
  background: var(--border);
}

.progress-track > span {
  display: block;
  width: 14%;
  height: 100%;
  background: var(--analytic);
  transition: width var(--motion-standard) ease;
}

.workspace {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
}

.filter-bar {
  position: sticky;
  z-index: 25;
  top: var(--topbar-height);
  display: flex;
  min-width: 0;
  min-height: 78px;
  align-items: center;
  gap: 10px;
  padding: 10px 24px;
  border-bottom: 1px solid var(--ink);
  background: rgba(244, 240, 231, 0.96);
  backdrop-filter: blur(18px);
}

.filter-field,
.mobile-view-field {
  display: grid;
  min-width: 128px;
  gap: 3px;
}

.filter-field label,
.mobile-view-field label {
  color: var(--muted-ink);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.filter-field select,
.mobile-view-field select,
.control-field select,
.control-field input,
.search-field input {
  min-width: 0;
  height: 44px;
  border: 1px solid var(--border-strong);
  border-radius: 3px;
  color: var(--ink);
  background: var(--surface);
}

.filter-field select,
.mobile-view-field select,
.control-field select {
  padding: 0 34px 0 10px;
}

.reset-button {
  align-self: end;
  min-height: 36px;
}

.mobile-view-field {
  display: none;
}

.active-chips {
  display: flex;
  min-width: 0;
  flex: 1 1 180px;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.filter-chip,
.badge,
.metric-tag,
.mode-tag {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 1px solid var(--border-strong);
  border-radius: 99px;
  background: var(--surface);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.2;
}

.badge {
  max-width: 100%;
  flex-wrap: wrap;
  overflow-wrap: anywhere;
  white-space: normal;
}

.filter-chip button {
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--unknown-soft);
  cursor: pointer;
}

.compare-tray {
  display: flex;
  min-width: 0;
  min-height: 48px;
  align-items: center;
  gap: 10px;
  padding: 6px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.compare-tray__label {
  margin-right: 4px;
}

.entity-token {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
}

.entity-token i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border: 2px solid currentColor;
}

.entity-token--a {
  color: var(--focus-strong);
}

.entity-token--a i {
  border-radius: 50%;
  background: var(--focus);
}

.entity-token--b {
  color: var(--analytic);
}

.entity-token--b i {
  background: var(--analytic);
  transform: rotate(45deg);
}

.compare-tray__mode {
  margin-left: auto;
  color: var(--muted-ink);
  font-family: var(--mono);
  font-size: 10px;
}

.screen {
  min-width: 0;
  max-width: 1440px;
  margin: 0 auto;
  padding: 40px clamp(20px, 3vw, 48px) 96px;
}

.screen-header {
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(240px, 4fr);
  gap: 32px;
  align-items: end;
  margin-bottom: 28px;
}

.screen-header h1,
.screen-header p,
.section-heading h2,
.chart-card h2,
.chart-card h3,
.metric-card p,
.metric-card strong,
.thesis-panel h2,
.thesis-panel p,
.detail-drawer h2,
.evidence-sheet h2,
.state-panel h3 {
  margin: 0;
}

.eyebrow {
  display: block;
  margin-bottom: 12px;
  color: var(--focus-strong);
}

.screen-header h1 {
  max-width: 900px;
  font-size: clamp(34px, 4.2vw, 62px);
  font-weight: 760;
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.screen-header__lede {
  max-width: 900px;
  margin-top: 16px !important;
  color: var(--muted-ink);
  font-size: 17px;
  line-height: 1.55;
}

.research-stamp {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--ink);
  background: var(--surface);
  box-shadow: 5px 5px 0 var(--focus);
}

.research-stamp__row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}

.research-stamp__row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.research-stamp__row span {
  color: var(--muted-ink);
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 0 0 24px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.trust-item {
  min-width: 0;
  padding: 11px 12px;
}

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

.trust-item strong {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trust-item--warning {
  background:
    repeating-linear-gradient(135deg, transparent 0 7px, rgba(168, 100, 0, 0.08) 7px 10px),
    var(--warning-soft);
}

.thesis-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(230px, 4fr);
  gap: 24px;
  margin-bottom: 24px;
  padding: 28px;
  overflow: hidden;
  border: 1px solid var(--ink);
  color: var(--surface);
  background: var(--ink);
}

.thesis-panel::after {
  position: absolute;
  top: -72px;
  right: -38px;
  width: 240px;
  height: 240px;
  border: 32px solid var(--focus);
  border-radius: 50%;
  opacity: 0.18;
  content: "";
}

.thesis-panel h2 {
  max-width: 820px;
  font-size: clamp(27px, 3vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.thesis-panel p {
  margin-top: 14px;
  color: #d8d4cc;
  line-height: 1.6;
}

.thesis-panel .eyebrow {
  color: var(--focus);
}

.thesis-panel__action {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: end;
  gap: 10px;
}

.thesis-panel__action .primary-button {
  width: fit-content;
  color: var(--ink);
  box-shadow: 3px 3px 0 var(--surface);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 24px;
  border: 1px solid var(--ink);
  background: var(--ink);
}

.metric-card {
  position: relative;
  min-width: 0;
  min-height: 156px;
  padding: 18px;
  background: var(--surface);
}

.metric-card::after {
  position: absolute;
  right: 16px;
  bottom: 16px;
  width: 12px;
  height: 12px;
  border: 2px solid var(--analytic);
  content: "";
}

.metric-card--counter::after {
  border-radius: 50%;
  border-color: var(--positive);
  background: var(--positive-soft);
}

.metric-card strong {
  display: block;
  margin: 20px 0 6px;
  font-family: var(--mono);
  font-size: clamp(28px, 3.2vw, 45px);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: -0.06em;
}

.metric-card p {
  max-width: 210px;
  color: var(--muted-ink);
  font-size: 12px;
  line-height: 1.35;
}

.two-column,
.chart-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 20px;
  min-width: 0;
}

.chart-card,
.data-card,
.control-panel,
.state-panel,
.method-card,
.direction-card {
  min-width: 0;
  border: 1px solid var(--border-strong);
  background: var(--surface);
}

.chart-card {
  grid-column: span 7;
  padding: 22px;
}

.chart-card--wide {
  grid-column: 1 / -1;
}

.chart-card--five {
  grid-column: span 5;
}

.chart-card--four {
  grid-column: span 4;
}

.chart-card--eight {
  grid-column: span 8;
}

.chart-card__header,
.section-heading,
.control-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.chart-card h2,
.section-heading h2 {
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.chart-card h3 {
  font-size: 17px;
  letter-spacing: -0.02em;
}

.chart-card__description,
.how-to-read,
.method-note,
.empty-copy {
  color: var(--muted-ink);
  font-size: 12px;
  line-height: 1.55;
}

.how-to-read {
  display: flex;
  gap: 10px;
  margin: 18px 0 0;
  padding: 12px;
  border-left: 3px solid var(--focus);
  background: var(--focus-soft);
}

.how-to-read strong {
  flex: 0 0 auto;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.stage-chart,
.ranked-chart,
.source-list,
.evidence-list,
.opportunity-list,
.method-list {
  display: grid;
  gap: 10px;
}

.chart-mark {
  width: 100%;
  min-width: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  text-align: left;
}

.chart-mark:hover .bar-track,
.chart-mark:focus-visible .bar-track {
  box-shadow: 0 0 0 2px var(--focus-ring);
}

.stage-row,
.ranked-row {
  display: grid;
  grid-template-columns: minmax(115px, 0.9fr) minmax(100px, 2fr) minmax(64px, auto);
  gap: 12px;
  align-items: center;
}

.stage-row__label,
.ranked-row__label {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 12px;
  font-weight: 650;
}

.bar-track {
  position: relative;
  height: 28px;
  overflow: visible;
  border: 1px solid var(--border);
  background:
    repeating-linear-gradient(90deg, transparent 0 calc(25% - 1px), rgba(22, 22, 22, 0.06) calc(25% - 1px) 25%),
    var(--surface-soft);
  transition: box-shadow var(--motion-fast) ease;
}

.bar-fill {
  display: block;
  width: var(--value, 0%);
  height: 100%;
  background: var(--analytic);
  transition: width var(--motion-standard) ease;
}

.bar-fill--focus {
  background: var(--focus);
}

.bar-fill--negative {
  background: var(--negative);
}

.bar-fill--positive {
  background: var(--positive);
}

.bar-fill--muted {
  background: var(--unknown);
}

.stage-row__value,
.ranked-row__value {
  min-width: 62px;
  font-family: var(--mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  text-align: right;
}

.interval-track {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: var(--ci-left, 0%);
  width: var(--ci-width, 0%);
  height: 2px;
  background: var(--ink);
  transform: translateY(-50%);
}

.interval-track::before,
.interval-track::after {
  position: absolute;
  top: -4px;
  width: 2px;
  height: 10px;
  background: var(--ink);
  content: "";
}

.interval-track::before {
  left: 0;
}

.interval-track::after {
  right: 0;
}

.counter-signal {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--positive);
  background: var(--positive-soft);
}

.counter-signal strong {
  font-size: 15px;
}

.opportunity-item,
.source-row,
.evidence-row,
.method-list li {
  display: grid;
  min-width: 0;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
}

.opportunity-item {
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: start;
}

.opportunity-item__rank {
  color: var(--focus-strong);
  font-family: var(--mono);
  font-weight: 700;
}

.opportunity-item strong,
.source-row strong,
.evidence-row strong {
  font-size: 13px;
  line-height: 1.35;
}

.opportunity-item p,
.source-row p,
.evidence-row p {
  margin: 2px 0 0;
  color: var(--muted-ink);
  font-size: 11px;
  line-height: 1.45;
}

.opportunity-score {
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 750;
}

.badge--positive {
  border-color: var(--positive);
  color: var(--positive);
  background: var(--positive-soft);
}

.badge--warning {
  border-color: var(--warning);
  color: var(--warning);
  background: var(--warning-soft);
}

.badge--negative {
  border-color: var(--negative);
  color: var(--negative);
  background: var(--negative-soft);
}

.badge--unknown {
  color: var(--unknown);
  background:
    repeating-linear-gradient(135deg, transparent 0 6px, rgba(119, 113, 104, 0.13) 6px 8px),
    var(--unknown-soft);
}

.badge--analytic {
  border-color: var(--analytic);
  color: var(--analytic);
  background: var(--analytic-soft);
}

.control-panel {
  margin-bottom: 20px;
  padding: 18px;
}

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

.control-field,
.search-field {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.control-field label,
.search-field label {
  color: var(--muted-ink);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.segmented-control {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  margin-top: 14px;
  border: 1px solid var(--ink);
  background: var(--ink);
}

.segmented-button {
  min-height: 40px;
  flex: 1 1 150px;
  padding: 9px 12px;
  background: var(--surface);
  font-size: 11px;
  font-weight: 650;
}

.segmented-button[aria-pressed="true"] {
  color: var(--surface);
  background: var(--analytic);
}

.pair-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--ink);
  background: var(--surface-soft);
}

.pair-entity {
  display: grid;
  min-width: 0;
  gap: 8px;
}

.pair-entity--b {
  text-align: right;
}

.pair-entity strong {
  font-size: 22px;
}

.pair-entity__value {
  font-family: var(--mono);
  font-size: clamp(30px, 4vw, 54px);
  font-variant-numeric: tabular-nums;
  font-weight: 760;
  letter-spacing: -0.06em;
}

.pair-delta {
  display: grid;
  gap: 4px;
  min-width: 132px;
  padding: 14px;
  border: 1px solid var(--negative);
  color: var(--negative);
  background: var(--negative-soft);
  text-align: center;
}

.pair-delta strong {
  font-family: var(--mono);
  font-size: 24px;
}

.pair-axis {
  position: relative;
  height: 90px;
  margin: 18px 0 8px;
}

.pair-axis__line {
  position: absolute;
  top: 42px;
  right: 0;
  left: 0;
  height: 2px;
  background: var(--border-strong);
}

.pair-axis__connector {
  position: absolute;
  top: 38px;
  left: var(--connector-left);
  width: var(--connector-width);
  height: 10px;
  background: var(--analytic-soft);
  border-top: 2px solid var(--analytic);
  border-bottom: 2px solid var(--analytic);
}

.pair-axis__mark {
  position: absolute;
  top: 29px;
  left: var(--position);
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 3px solid var(--ink);
  background: var(--focus);
  transform: translateX(-50%);
}

.pair-axis__mark--b {
  border-radius: 50%;
  background: var(--analytic);
}

.pair-axis__label {
  position: absolute;
  top: 60px;
  left: var(--position);
  width: 110px;
  font-family: var(--mono);
  font-size: 10px;
  text-align: center;
  transform: translateX(-50%);
}

.field-shelf {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0;
}

.field-slot {
  min-width: 0;
  padding: 10px;
  border: 1px dashed var(--border-strong);
  background: var(--surface-soft);
}

.field-slot strong {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-slot select {
  width: 100%;
  margin-top: 5px;
}

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

.exact-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  background: var(--surface);
  font-size: 11px;
}

.exact-table caption:not(.sr-only) {
  padding: 10px 12px;
  color: var(--muted-ink);
  background: var(--surface-soft);
  font-size: 10px;
  text-align: left;
}

.exact-table th,
.exact-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.exact-table th {
  position: sticky;
  top: 0;
  color: var(--muted-ink);
  background: var(--surface-soft);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.exact-table td:not(:first-child),
.exact-table th:not(:first-child) {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.exact-table tr.is-selected td {
  background: var(--analytic-soft);
}

.unsupported-panel,
.state-panel {
  display: grid;
  gap: 14px;
  padding: 24px;
  background:
    repeating-linear-gradient(135deg, transparent 0 12px, rgba(119, 113, 104, 0.08) 12px 16px),
    var(--surface);
}

.unsupported-panel__icon,
.state-panel__icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 2px solid var(--unknown);
  border-radius: 50%;
  font-size: 22px;
}

.source-row,
.evidence-row {
  width: 100%;
  grid-template-columns: minmax(150px, 1fr) minmax(120px, 0.8fr) minmax(100px, auto);
  align-items: center;
  color: inherit;
  text-align: left;
}

.source-row:hover,
.evidence-row:hover {
  border-color: var(--ink);
  background: var(--focus-soft);
}

.source-row__metric,
.evidence-row__metric {
  font-family: var(--mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.source-plot {
  position: relative;
  min-height: 330px;
  margin: 10px 0;
  border-left: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  background:
    linear-gradient(rgba(22, 22, 22, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22, 22, 22, 0.055) 1px, transparent 1px);
  background-size: 25% 25%;
}

.source-plot__axis {
  position: absolute;
  color: var(--muted-ink);
  font-family: var(--mono);
  font-size: 9px;
}

.source-plot__axis--x {
  right: 0;
  bottom: -24px;
}

.source-plot__axis--y {
  top: -18px;
  left: 0;
}

.source-point {
  position: absolute;
  left: var(--x);
  bottom: var(--y);
  display: grid;
  width: var(--size);
  height: var(--size);
  place-items: center;
  padding: 4px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--focus);
  box-shadow: var(--shadow-small);
  font-size: 9px;
  font-weight: 750;
  text-align: center;
  transform: translate(-50%, 50%);
}

.source-point:nth-of-type(even) {
  background: var(--analytic-soft);
}

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

.risk-stat {
  padding: 18px;
  border: 1px solid var(--border-strong);
  background: var(--surface-soft);
}

.risk-stat strong {
  display: block;
  margin: 16px 0 6px;
  font-family: var(--mono);
  font-size: 34px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.05em;
}

.risk-stat--critical {
  border-color: var(--negative);
  background: var(--negative-soft);
}

.search-field {
  grid-template-columns: 1fr auto;
  margin-bottom: 18px;
}

.search-field label {
  grid-column: 1 / -1;
}

.search-field input {
  padding: 0 12px;
}

.lineage-chain {
  display: grid;
  gap: 0;
  margin: 18px 0;
  padding: 0;
  list-style: none;
}

.lineage-chain li {
  position: relative;
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr);
  gap: 10px;
  padding: 9px 0 9px 18px;
  border-left: 2px solid var(--analytic);
}

.lineage-chain li::before {
  position: absolute;
  top: 15px;
  left: -6px;
  width: 10px;
  height: 10px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--analytic);
  content: "";
}

.lineage-chain span {
  color: var(--muted-ink);
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
}

.lineage-chain code {
  min-width: 0;
  overflow-wrap: anywhere;
  font-family: var(--mono);
  font-size: 10px;
}

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

.direction-card,
.method-card {
  padding: 18px;
}

.direction-card--accepted {
  border: 2px solid var(--ink);
  box-shadow: 5px 5px 0 var(--focus);
}

.direction-swatch {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  height: 76px;
  margin-bottom: 16px;
  border: 1px solid var(--ink);
}

.direction-swatch span:nth-child(1) {
  background: var(--ink);
}

.direction-swatch span:nth-child(2) {
  background: var(--focus);
}

.direction-swatch span:nth-child(3) {
  background: var(--analytic);
}

.direction-card--editorial .direction-swatch {
  grid-template-columns: 3fr 1fr 0.4fr;
}

.direction-card--grid .direction-swatch {
  background:
    linear-gradient(rgba(22, 22, 22, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22, 22, 22, 0.12) 1px, transparent 1px),
    var(--surface);
  background-size: 16px 16px;
}

.direction-card h3,
.method-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.direction-card p,
.method-card p {
  margin: 0;
  color: var(--muted-ink);
  font-size: 11px;
}

.component-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 20px;
}

.state-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 20px;
}

.state-button {
  display: grid;
  min-height: 112px;
  align-content: space-between;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  text-align: left;
}

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

.state-button--suppressed {
  background:
    repeating-linear-gradient(135deg, transparent 0 8px, rgba(22, 22, 22, 0.06) 8px 11px),
    var(--surface);
}

.state-button--error {
  border-color: var(--negative);
  background: var(--negative-soft);
}

.detail-drawer {
  position: fixed;
  z-index: 70;
  top: 0;
  right: 0;
  display: grid;
  width: min(480px, 100%);
  max-width: 100%;
  height: 100vh;
  grid-template-rows: auto auto minmax(0, 1fr);
  border-left: 1px solid var(--ink);
  background: var(--surface);
  box-shadow: var(--shadow-large);
  overflow-x: hidden;
  transform: translateX(102%);
  transition: transform var(--motion-deliberate) ease;
}

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

.detail-drawer[hidden] {
  display: none;
}

.drawer__header,
.evidence-sheet__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  border-bottom: 1px solid var(--ink);
  background: var(--paper);
}

.drawer__header h2,
.evidence-sheet__header h2 {
  margin-top: 4px;
  font-size: 24px;
  letter-spacing: -0.04em;
}

.drawer__body {
  min-width: 0;
  overflow-y: auto;
  padding: 20px;
}

.drawer-section {
  margin-bottom: 24px;
}

.drawer-section h3 {
  margin: 0 0 10px;
  font-size: 14px;
}

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

.drawer-scrim {
  position: fixed;
  z-index: 65;
  inset: 0;
  background: rgba(22, 22, 22, 0.28);
  backdrop-filter: blur(2px);
}

.evidence-sheet {
  width: min(1380px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  overflow: auto;
  border: 1px solid var(--ink);
  color: var(--ink);
  background: var(--surface);
  box-shadow: var(--shadow-large);
}

.evidence-sheet::backdrop {
  background: rgba(22, 22, 22, 0.52);
  backdrop-filter: blur(4px);
}

#evidence-body {
  padding: 24px;
}

.evidence-metadata {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  background: var(--border);
}

.evidence-metadata > div {
  min-width: 0;
  padding: 12px;
  background: var(--surface-soft);
}

.evidence-metadata strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  font-family: var(--mono);
  font-size: 10px;
}

.toast {
  position: fixed;
  z-index: 100;
  right: 20px;
  bottom: 20px;
  max-width: min(380px, calc(100vw - 40px));
  padding: 12px 16px;
  border: 1px solid var(--ink);
  color: var(--surface);
  background: var(--ink);
  box-shadow: 4px 4px 0 var(--focus);
  font-size: 12px;
}

.mark-tooltip {
  position: fixed;
  z-index: 110;
  max-width: min(480px, calc(100vw - 16px));
  padding: 9px 11px;
  border: 1px solid var(--ink);
  color: var(--surface);
  background: var(--ink);
  box-shadow: 3px 3px 0 var(--focus);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.45;
  pointer-events: none;
}

.loading-state {
  display: grid;
  gap: 12px;
  max-width: 900px;
}

.loading-line,
.loading-panel {
  display: block;
  overflow: hidden;
  background: var(--border);
}

.loading-line {
  width: 42%;
  height: 24px;
}

.loading-line--wide {
  width: 74%;
  height: 56px;
}

.loading-panel {
  height: 320px;
}

.loading-line::after,
.loading-panel::after {
  display: block;
  width: 35%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.65), transparent);
  animation: shimmer 1.2s infinite linear;
  content: "";
}

@keyframes shimmer {
  from { transform: translateX(-120%); }
  to { transform: translateX(320%); }
}

body[data-density="compact"] .metric-card {
  min-height: 126px;
  padding: 13px;
}

body[data-density="compact"] .exact-table th,
body[data-density="compact"] .exact-table td {
  padding: 7px 9px;
}

body[data-density="compact"] .source-row,
body[data-density="compact"] .evidence-row,
body[data-density="compact"] .opportunity-item {
  padding: 10px;
}

@media (max-width: 1120px) {
  :root {
    --rail-width: 218px;
  }

  .filter-bar {
    flex-wrap: wrap;
  }

  .active-chips {
    flex-basis: 100%;
    justify-content: flex-start;
  }

  .screen-header {
    grid-template-columns: minmax(0, 1fr) 240px;
  }

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

  .chart-card,
  .chart-card--five,
  .chart-card--four,
  .chart-card--eight {
    grid-column: span 6;
  }
}

@media (max-width: 900px) {
  :root {
    --rail-width: 264px;
  }

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

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

  .menu-button {
    display: inline-grid;
    margin-left: 12px;
  }

  .product-mark {
    border-right: 0;
  }

  .topbar__context {
    display: none;
  }

  .section-rail {
    position: fixed;
    z-index: 80;
    top: var(--topbar-height);
    bottom: 0;
    left: 0;
    width: var(--rail-width);
    height: calc(100vh - var(--topbar-height));
    box-shadow: var(--shadow-large);
    transform: translateX(-102%);
    transition: transform var(--motion-deliberate) ease;
  }

  .section-rail.is-open {
    transform: translateX(0);
  }

  .workspace {
    grid-column: 1;
  }

  .mobile-view-field {
    display: grid;
  }

  .filter-bar {
    top: var(--topbar-height);
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: end;
  }

  .filter-field,
  .mobile-view-field {
    min-width: 0;
  }

  .reset-button {
    width: 100%;
  }

  .active-chips {
    grid-column: 1 / -1;
  }

  .screen {
    padding-top: 32px;
  }

  .screen-header {
    grid-template-columns: 1fr;
  }

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

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

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

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

  .trust-item:nth-child(3n + 2),
  .trust-item:nth-child(3n + 3) {
    border-left: 1px solid var(--border);
  }

  .trust-item:nth-child(n + 4) {
    border-top: 1px solid var(--border);
  }

  .chart-card,
  .chart-card--five,
  .chart-card--four,
  .chart-card--eight {
    grid-column: 1 / -1;
  }

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

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

@media (max-width: 600px) {
  :root {
    --topbar-height: 64px;
  }

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

  .menu-button {
    width: 44px;
    height: 44px;
    margin-left: 8px;
  }

  .icon-button {
    width: 44px;
    height: 44px;
  }

  .text-button,
  .primary-button,
  .ghost-button,
  .segmented-button {
    min-height: 44px;
  }

  .product-mark {
    gap: 8px;
    padding: 0 8px;
  }

  .product-mark__symbol {
    width: 34px;
    height: 34px;
    font-size: 12px;
  }

  .product-mark__copy small {
    display: none;
  }

  .topbar__actions {
    gap: 4px;
    padding-right: 8px;
  }

  .topbar__actions .text-button {
    display: none;
  }

  .topbar__actions .primary-button {
    min-height: 44px;
    padding: 8px 10px;
    box-shadow: 2px 2px 0 var(--ink);
    font-size: 11px;
  }

  .filter-bar {
    position: relative;
    top: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 10px 12px;
  }

  .filter-field:nth-of-type(4),
  .filter-field:nth-of-type(5) {
    display: none;
  }

  .active-chips {
    grid-column: 1 / -1;
  }

  .compare-tray {
    flex-wrap: wrap;
    gap: 7px;
    padding: 8px 12px;
  }

  .compare-tray__label,
  .compare-tray__mode {
    flex-basis: 100%;
    margin-left: 0;
  }

  .compare-tray .ghost-button {
    margin-left: auto;
  }

  .screen {
    padding: 24px 16px 72px;
  }

  .screen-header {
    gap: 18px;
    margin-bottom: 20px;
  }

  .screen-header h1 {
    font-size: 34px;
    line-height: 1.02;
  }

  .screen-header__lede {
    font-size: 15px;
  }

  .research-stamp {
    grid-template-columns: 1fr;
  }

  .research-stamp__row {
    padding-bottom: 7px;
  }

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

  .trust-item:nth-child(3n + 2),
  .trust-item:nth-child(3n + 3) {
    border-left: 0;
  }

  .trust-item:nth-child(even) {
    border-left: 1px solid var(--border);
  }

  .trust-item:nth-child(n + 3) {
    border-top: 1px solid var(--border);
  }

  .thesis-panel {
    padding: 20px;
  }

  .metric-grid,
  .risk-grid,
  .component-grid,
  .direction-grid,
  .state-grid,
  .control-grid,
  .field-shelf {
    grid-template-columns: 1fr;
  }

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

  .two-column,
  .chart-grid {
    gap: 12px;
  }

  .chart-card {
    padding: 16px;
  }

  .chart-card__header,
  .section-heading,
  .control-panel__header {
    display: grid;
  }

  .stage-row,
  .ranked-row {
    grid-template-columns: minmax(0, 1fr) 64px;
    gap: 8px;
  }

  .stage-row .bar-track,
  .ranked-row .bar-track {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .stage-row__value,
  .ranked-row__value {
    grid-column: 2;
    grid-row: 1;
  }

  .opportunity-item {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .opportunity-score {
    grid-column: 2;
  }

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

  .pair-delta {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .pair-entity--b {
    text-align: right;
  }

  .exact-table-wrap {
    overflow: visible;
    border: 0;
  }

  .exact-table {
    display: block;
    min-width: 0;
    background: transparent;
  }

  .exact-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .exact-table thead tr,
  .exact-table thead th {
    position: static;
    display: block;
    width: 1px;
    min-width: 0;
    max-width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    border: 0;
  }

  .exact-table tbody,
  .exact-table tr,
  .exact-table td {
    display: block;
    width: 100%;
  }

  .exact-table tr {
    margin-bottom: 10px;
    border: 1px solid var(--border);
    background: var(--surface);
  }

  .exact-table td,
  .exact-table td:not(:first-child) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    text-align: right;
  }

  .exact-table td::before {
    color: var(--muted-ink);
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.04em;
    text-align: left;
    text-transform: uppercase;
    content: attr(data-label);
  }

  .exact-table td:first-child {
    border-bottom-color: var(--border-strong);
  }

  .source-row,
  .evidence-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .source-row > :nth-child(2),
  .evidence-row > :nth-child(2) {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .source-plot {
    min-height: 280px;
  }

  .source-point {
    width: max(48px, var(--size));
    height: max(48px, var(--size));
  }

  .evidence-metadata {
    grid-template-columns: 1fr;
  }

  .lineage-chain li {
    grid-template-columns: 1fr;
  }

  .detail-drawer {
    right: 0;
    left: 0;
    width: auto;
    max-width: none;
  }

  .evidence-sheet {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
  }

  #evidence-body {
    padding: 16px;
  }
}

/* AIV-042 unified visual analytics runtime */

.visual-support-badge {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 9px;
  border: 1px solid var(--positive);
  color: var(--positive);
  background: var(--positive-soft);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
}

.visual-support-badge > span + span::before {
  margin-right: 6px;
  color: var(--border-strong);
  content: "·";
}

.visual-support-badge--warning {
  border-color: var(--warning);
  color: var(--warning);
  background: var(--warning-soft);
}

.metric-tooltip {
  display: grid;
  gap: 10px;
  min-width: min(420px, calc(100vw - 24px));
  max-width: min(460px, calc(100vw - 24px));
}

.metric-tooltip__heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 8px;
  border-bottom: 1px solid color-mix(in srgb, var(--surface) 28%, transparent);
}

.metric-tooltip__heading strong { font-size: 14px; }
.metric-tooltip__heading span { color: var(--focus); font-family: var(--mono); font-size: 18px; font-weight: 800; }

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

.metric-tooltip__grid > div { min-width: 0; }
.metric-tooltip__grid > .metric-tooltip__formula { grid-column: 1 / -1; }
.metric-tooltip dt { color: color-mix(in srgb, var(--surface) 62%, transparent); font-size: 9px; letter-spacing: .07em; text-transform: uppercase; }
.metric-tooltip dd { margin: 1px 0 0; overflow-wrap: anywhere; font-family: var(--mono); font-size: 10px; }
.metric-tooltip p { margin: 0; color: color-mix(in srgb, var(--surface) 82%, transparent); font-size: 11px; line-height: 1.45; }
.metric-tooltip__hint { color: var(--focus); font-size: 10px; font-weight: 800; }

.encoding-guide {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}

.encoding-guide ul {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.encoding-guide li { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; }
.encoding-guide li > span:last-child { display: grid; }
.encoding-guide small, .encoding-guide p { color: var(--muted-ink); font-size: 10px; }
.encoding-guide p { margin: 0; }

.encoding-swatch {
  position: relative;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  border: 2px solid var(--encoding-color);
  background: color-mix(in srgb, var(--encoding-color) 18%, transparent);
}

.encoding-swatch--circle { border-radius: 50%; }
.encoding-swatch--diamond { transform: rotate(45deg) scale(.74); }
.encoding-swatch--line { width: 22px; height: 4px; border: 0; background: var(--encoding-color); }

.insight-annotation {
  display: grid;
  grid-template-columns: 5px minmax(0, 1fr);
  gap: 12px;
  margin-top: 16px;
  padding: 14px 0;
  border-block: 1px solid var(--border);
}

.insight-annotation__rule { background: var(--analytic); }
.insight-annotation--warning .insight-annotation__rule { background: var(--warning); }
.insight-annotation strong { font-size: 11px; letter-spacing: .05em; text-transform: uppercase; }
.insight-annotation p { margin: 3px 0 0; line-height: 1.5; }
.insight-annotation small { display: block; margin-top: 5px; color: var(--muted-ink); }

.visual-breadcrumbs {
  margin-bottom: 16px;
  overflow: hidden;
}

.visual-breadcrumbs ol {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0;
  padding: 0;
  color: var(--muted-ink);
  font-size: 10px;
  list-style: none;
}

.visual-breadcrumbs li { display: inline-flex; align-items: center; min-width: 0; }
.visual-breadcrumbs li + li::before { margin-right: 5px; color: var(--border-strong); content: "→"; }
.visual-breadcrumbs button { padding: 0; border: 0; color: var(--analytic); background: transparent; cursor: pointer; text-decoration: underline; }
.visual-breadcrumbs [aria-current="page"] { color: var(--ink); font-weight: 800; }

.selection-summary {
  display: grid;
  grid-template-columns: 5px minmax(200px, 1fr) minmax(180px, auto) auto;
  gap: 16px;
  align-items: center;
  padding: 14px 18px;
  border: 1px solid var(--ink);
  background: var(--surface);
  box-shadow: var(--shadow-small);
}

.selection-summary__marker { align-self: stretch; background: var(--focus); }
.selection-summary p { margin: 2px 0 0; color: var(--muted-ink); font-size: 11px; }
.selection-summary__value { display: grid; justify-items: end; }
.selection-summary__value > strong { font-family: var(--mono); font-size: 22px; }
.selection-summary__value small { max-width: 260px; color: var(--muted-ink); text-align: right; }
.selection-summary__actions { display: flex; flex-wrap: wrap; gap: 7px; }

.table-fallback {
  width: 100%;
  margin-top: 14px;
  overflow-x: auto;
  border-top: 1px solid var(--border);
}

.table-fallback table { width: 100%; border-collapse: collapse; font-size: 11px; }
.table-fallback caption { padding: 11px 0 8px; color: var(--muted-ink); font-size: 10px; font-weight: 800; text-align: left; text-transform: uppercase; }
.table-fallback th, .table-fallback td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.table-fallback th { color: var(--muted-ink); font-size: 9px; letter-spacing: .05em; text-transform: uppercase; }
.table-fallback td:not(:first-child) { font-family: var(--mono); font-variant-numeric: tabular-nums; }

.visual-chart-frame {
  min-width: 0;
  overflow: hidden;
}

.visual-chart-frame .chart-card__header p {
  max-width: 640px;
  margin: 4px 0 0;
  color: var(--muted-ink);
  font-size: 11px;
}

.visual-chart-frame__plot {
  min-height: 250px;
  margin-top: 18px;
  display: grid;
  align-items: center;
}

.visual-chart-frame__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.visual-chart-frame__footer a { color: var(--ink); text-decoration: none; }

.visual-mark {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: opacity var(--motion-fast) ease, transform var(--motion-fast) ease;
}

.visual-mark:hover { transform: translateY(-1px); }
.visual-mark.is-selected { outline: 3px solid var(--focus-ring); outline-offset: 3px; }
.visual-mark.is-dimmed { opacity: .28; }

.vs-stage-chart,
.vs-ranked-chart,
.vs-interval-chart,
.vs-pair-chart,
.vs-diverging {
  display: grid;
  gap: 10px;
}

.vs-stage-chart .visual-mark {
  display: grid;
  grid-template-columns: 36px minmax(130px, .7fr) minmax(160px, 1.6fr) 68px;
  gap: 10px;
  align-items: center;
  min-height: 48px;
}

.vs-stage-chart__index { color: var(--focus-strong); font-family: var(--mono); }
.vs-stage-chart__label, .vs-ranked-chart .visual-mark > span:first-child, .vs-interval-chart .visual-mark > span:first-child, .vs-pair-chart .visual-mark > span:first-child { font-size: 12px; font-weight: 800; }
.vs-stage-chart__track, .vs-ranked-chart__track, .vs-small-multiples__track { position: relative; height: 12px; background: var(--paper-deep); }
.vs-stage-chart__track > i, .vs-ranked-chart__track > i, .vs-small-multiples__track > i { display: block; width: var(--value); height: 100%; background: var(--analytic); transition: width var(--motion-standard) ease; }
.vs-stage-chart strong, .vs-ranked-chart strong, .vs-interval-chart strong, .vs-pair-chart strong { justify-self: end; font-family: var(--mono); font-size: 12px; }

.vs-ranked-chart .visual-mark,
.vs-interval-chart .visual-mark,
.vs-pair-chart .visual-mark {
  display: grid;
  grid-template-columns: minmax(130px, .8fr) minmax(180px, 1.6fr) 82px;
  gap: 12px;
  align-items: center;
  min-height: 44px;
}

.vs-ranked-chart .visual-mark:first-child .vs-ranked-chart__track > i { background: var(--focus); }

.vs-interval-chart__axis,
.vs-pair-chart__axis {
  position: relative;
  height: 22px;
  border-bottom: 1px solid var(--border-strong);
}

.vs-interval-chart__interval,
.vs-pair-chart__connector {
  position: absolute;
  top: 10px;
  left: var(--left);
  width: var(--width);
  height: 3px;
  background: var(--analytic);
}

.vs-interval-chart__dot,
.vs-pair-chart__a,
.vs-pair-chart__b {
  position: absolute;
  top: 5px;
  left: var(--value);
  width: 12px;
  height: 12px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--analytic);
  box-shadow: 0 0 0 1px var(--analytic);
  transform: translateX(-50%);
}

.vs-pair-chart__a { background: var(--focus); box-shadow: 0 0 0 1px var(--focus-strong); }
.vs-pair-chart__b { border-radius: 0; transform: translateX(-50%) rotate(45deg); }

.vs-heatmap {
  display: grid;
  grid-template-columns: minmax(90px, 1.1fr) repeat(var(--columns), minmax(72px, 1fr));
  gap: 4px;
  align-items: stretch;
}

.vs-heatmap > strong { display: grid; min-height: 36px; place-items: center start; padding: 5px; color: var(--muted-ink); font-size: 9px; }
.vs-heatmap > strong:nth-child(-n + 4) { place-items: end center; text-align: center; }
.vs-heatmap__cell { min-height: 52px; border: 1px solid color-mix(in srgb, var(--analytic) 38%, var(--border)); background: color-mix(in srgb, var(--analytic) var(--intensity), var(--surface)); cursor: pointer; font-family: var(--mono); font-size: 11px; }
.vs-heatmap__cell.is-missing { background: repeating-linear-gradient(135deg, transparent 0 5px, var(--border) 5px 7px); }

.vs-scatter {
  position: relative;
  min-height: 330px;
  margin: 16px 18px 28px 34px;
  border-bottom: 1px solid var(--ink);
  border-left: 1px solid var(--ink);
  background:
    linear-gradient(90deg, transparent 49.8%, var(--border) 50%, transparent 50.2%),
    linear-gradient(transparent 49.8%, var(--border) 50%, transparent 50.2%);
}

.vs-scatter__point {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--size);
  height: var(--size);
  border: 1px solid var(--analytic);
  border-radius: 50%;
  color: var(--ink);
  background: color-mix(in srgb, var(--analytic) 20%, var(--surface));
  cursor: pointer;
  font-size: 9px;
  font-weight: 800;
  transform: translate(-50%, -50%);
}

.vs-scatter__point:nth-child(2n) { border-radius: 3px; }
.vs-scatter__axis { position: absolute; color: var(--muted-ink); font-size: 9px; text-transform: uppercase; }
.vs-scatter__axis--x { right: 0; bottom: -22px; }
.vs-scatter__axis--y { top: -18px; left: -30px; }

.vs-diverging .visual-mark { display: grid; grid-template-columns: 100px minmax(180px, 1fr); gap: 12px; align-items: center; min-height: 42px; }
.vs-diverging__bar { display: flex; height: 18px; overflow: hidden; background: var(--paper-deep); }
.vs-diverging__bar > i { width: var(--value); height: 100%; }
.vs-diverging__bar .is-positive { background: var(--positive); }
.vs-diverging__bar .is-neutral { background: var(--unknown); }
.vs-diverging__bar .is-negative { background: var(--negative); }

.vs-small-multiples { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.vs-small-multiples > section { min-width: 0; padding-top: 9px; border-top: 3px solid var(--ink); }
.vs-small-multiples > section > strong { display: block; margin-bottom: 8px; }
.vs-small-multiples .visual-mark { display: grid; grid-template-columns: 72px minmax(60px, 1fr) 42px; gap: 6px; align-items: center; min-height: 34px; font-size: 9px; }
.vs-small-multiples small { justify-self: end; font-family: var(--mono); }

.evidence-runtime { display: grid; gap: 14px; }
.evidence-runtime__summary { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 18px; padding: 14px; border: 1px solid var(--border); background: var(--surface-soft); }
.evidence-runtime__summary > div { margin-right: auto; }
.evidence-runtime__summary strong { display: block; font-size: 18px; }
.evidence-runtime__summary p { margin: 2px 0 0; color: var(--muted-ink); font-size: 10px; }
.evidence-runtime__workspace { display: grid; grid-template-columns: minmax(260px, .75fr) minmax(0, 1.6fr); gap: 16px; align-items: start; }
.evidence-cohort { max-height: 68vh; overflow-y: auto; border: 1px solid var(--border); background: var(--surface); }
.evidence-cohort__pager { position: sticky; z-index: 2; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px; border-bottom: 1px solid var(--border); background: var(--surface); font-size: 10px; }
.evidence-cohort-row { width: 100%; min-height: 56px; padding: 9px; border: 0; border-bottom: 1px solid var(--border); background: transparent; cursor: pointer; display: grid; grid-template-columns: minmax(100px, 1fr) 52px minmax(80px, .8fr); gap: 8px; align-items: center; text-align: left; }
.evidence-cohort-row:hover { background: var(--analytic-soft); }
.evidence-cohort-row.is-selected { color: var(--surface); background: var(--analytic); }
.evidence-cohort-row span:first-child { display: grid; }
.evidence-cohort-row small { opacity: .72; }
.evidence-cohort-row span:nth-child(2) { font-family: var(--mono); }
.evidence-cohort-row span:nth-child(3) { min-width: 0; overflow-wrap: anywhere; color: var(--muted-ink); font-size: 9px; }
.evidence-cohort-row.is-selected span:nth-child(3) { color: inherit; }

.exact-response { min-width: 0; padding: 18px; border: 1px solid var(--ink); background: var(--surface); }
.exact-response > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.exact-response h3 { margin: 4px 0 0; font-family: var(--font-display); font-size: 23px; line-height: 1.18; }
.exact-response__metadata { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 14px; margin: 14px 0; }
.exact-response__metadata > div { min-width: 0; }
.exact-response__metadata dt { color: var(--muted-ink); font-size: 9px; letter-spacing: .05em; text-transform: uppercase; }
.exact-response__metadata dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.exact-response__answer { max-height: 42vh; padding: 14px; overflow-y: auto; border: 1px solid var(--border); background: var(--paper); }
.exact-response h4 { margin: 0 0 8px; }
.exact-response__answer p { margin: 0; white-space: pre-wrap; line-height: 1.62; }
.exact-response__evidence { margin-top: 16px; }
.evidence-facts { display: flex; flex-wrap: wrap; gap: 6px; }
.evidence-facts span { padding: 4px 7px; background: var(--unknown-soft); font-family: var(--mono); font-size: 9px; }
.exact-response__evidence details { margin-top: 12px; border-top: 1px solid var(--border); }
.exact-response__evidence summary { padding: 10px 0; cursor: pointer; font-weight: 800; }
.exact-response__evidence ol,
.exact-response__evidence ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.exact-response__evidence li { padding: 10px; border-left: 3px solid var(--analytic); background: var(--surface-soft); }
.exact-response__evidence li > span,
.exact-response__evidence li > code { display: block; overflow-wrap: anywhere; color: var(--muted-ink); font-size: 9px; }
.exact-response__evidence li > a { display: block; overflow-wrap: anywhere; color: var(--analytic); font-size: 9px; }
.exact-response__evidence li p { margin: 5px 0 0; }

.source-catalog-search,
.explorer-filter-grid label {
  display: grid;
  gap: 5px;
  color: var(--muted-ink);
  font-size: 10px;
  font-weight: 700;
}

.source-catalog-search input,
.explorer-filter-grid select,
.explorer-filter-grid input {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 0;
  color: var(--ink);
  background: var(--surface);
}

.explorer-filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.explorer-filter-grid > button {
  align-self: end;
}

.catalog-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0 10px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 10px;
}

.catalog-pagination > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.evidence-row--production {
  grid-template-columns: minmax(260px, 1.5fr) minmax(150px, .7fr) minmax(150px, .7fr);
}

.evidence-row--production code {
  display: block;
  margin-top: 5px;
  overflow-wrap: anywhere;
  color: var(--muted-ink);
  font-size: 9px;
}

.source-semantics {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.source-semantic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 22px;
  border: 1px solid var(--border);
  background: var(--border);
}

.source-semantic-grid > div {
  min-width: 0;
  padding: 14px;
  background: var(--surface);
}

.source-semantic-grid strong,
.source-semantic-grid small {
  display: block;
}

.source-semantic-grid strong {
  margin: 8px 0 3px;
  font-family: var(--mono);
  font-size: 24px;
}

.source-associations {
  display: grid;
  gap: 6px;
}

.source-association {
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  color: var(--ink);
  background: var(--surface);
  text-align: left;
}

.source-association:hover {
  border-color: var(--ink);
  background: var(--focus-soft);
}

.source-association span:first-child {
  display: grid;
}

.source-association span:last-child {
  font-family: var(--mono);
  font-size: 9px;
  text-align: right;
}

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

.source-url-list li {
  min-width: 0;
  padding: 9px;
  border-left: 3px solid var(--analytic);
  background: var(--surface-soft);
}

.source-url-list a,
.source-url-list span {
  display: block;
  overflow-wrap: anywhere;
  font-size: 9px;
}

.exact-response__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 12px 0;
}

.exact-response__inclusion {
  margin: 12px 0;
  padding: 12px;
  border-left: 4px solid var(--positive);
  background: var(--positive-soft);
}

.exact-response__inclusion pre {
  max-height: 180px;
  margin: 8px 0 0;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 9px;
}

.exact-response__overlays {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}

.overlay-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.overlay-toggle,
.provider-compare-toggle {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid var(--border-strong);
  color: var(--muted-ink);
  background: var(--surface);
  font-size: 10px;
}

.overlay-toggle[aria-pressed="true"],
.provider-compare-toggle[aria-pressed="true"] {
  border-color: var(--ink);
  color: var(--surface);
  background: var(--ink);
}

.overlay-toggle strong {
  font-family: var(--mono);
}

.overlay-swatch {
  display: inline-block;
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--unknown);
}

.overlay-swatch--mention { background: var(--focus); }
.overlay-swatch--recommendation { background: var(--positive); }
.overlay-swatch--claim { background: var(--warning); }
.overlay-swatch--citation { background: var(--analytic); }
.overlay-swatch--annotation { background: var(--negative); }

.overlay-ledger {
  display: grid;
  max-height: 360px;
  gap: 1px;
  overflow-y: auto;
  border: 1px solid var(--border);
  background: var(--border);
}

.overlay-ledger-row {
  display: grid;
  min-height: 54px;
  grid-template-columns: minmax(170px, 1fr) minmax(110px, .6fr) minmax(160px, .8fr);
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border: 0;
  color: var(--ink);
  background: var(--surface);
  text-align: left;
}

.overlay-ledger-row:hover,
.overlay-ledger-row.is-selected {
  background: var(--analytic-soft);
}

.overlay-ledger-row.is-selected {
  box-shadow: inset 4px 0 0 var(--analytic);
}

.overlay-ledger-row > span:first-child {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0 7px;
}

.overlay-ledger-row strong,
.overlay-ledger-row small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.overlay-ledger-row small {
  grid-column: 2;
  color: var(--muted-ink);
  font-size: 9px;
}

.evidence-selected-overlay {
  padding: 12px;
  border: 1px solid var(--analytic);
  background: var(--analytic-soft);
}

.evidence-selected-overlay > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.evidence-selected-overlay dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.evidence-selected-overlay dt {
  color: var(--muted-ink);
  font-size: 9px;
}

.evidence-selected-overlay dd {
  margin: 2px 0 0;
  overflow-wrap: anywhere;
}

.evidence-quote-preview {
  margin: 10px 0;
  padding: 10px;
  border-left: 3px solid var(--analytic);
  background: var(--surface);
  line-height: 1.55;
}

.exact-response__answer-text,
.provider-answer__text {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.62;
}

.evidence-highlight {
  padding: 1px 0;
  border: 0;
  color: inherit;
  background: color-mix(in srgb, var(--focus) 30%, transparent);
  cursor: pointer;
}

.evidence-highlight--recommendation { background: color-mix(in srgb, var(--positive) 28%, transparent); }
.evidence-highlight--claim { background: color-mix(in srgb, var(--warning) 38%, transparent); }
.evidence-highlight--citation { background: color-mix(in srgb, var(--analytic) 25%, transparent); }
.evidence-highlight--annotation { background: color-mix(in srgb, var(--negative) 20%, transparent); }
.evidence-highlight.is-selected { box-shadow: 0 0 0 2px var(--ink); }

.source-group--explicit { border-color: var(--positive) !important; }
.source-group--retrieved { border-color: var(--analytic) !important; }
.source-group--ads { border-color: var(--warning) !important; }

.provider-comparison {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 2px solid var(--ink);
}

.provider-comparison__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
}

.provider-comparison__header h4 {
  margin-top: 4px;
}

.provider-compare-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

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

.provider-answer {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--border-strong);
  background: var(--surface-soft);
}

.provider-answer > header,
.provider-answer__facts {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.provider-answer__facts {
  flex-wrap: wrap;
  margin: 10px 0;
  font-family: var(--mono);
  font-size: 9px;
}

.provider-answer details {
  margin-top: 10px;
  border-top: 1px solid var(--border);
}

.provider-answer summary {
  padding: 8px 0;
  cursor: pointer;
  font-weight: 800;
}

.provider-answer__text {
  max-height: 360px;
  overflow-y: auto;
}

@media (max-width: 900px) {
  .selection-summary { grid-template-columns: 5px minmax(0, 1fr) auto; }
  .selection-summary__value { grid-column: 2; justify-items: start; }
  .selection-summary__value small { text-align: left; }
  .selection-summary__actions { grid-column: 3; grid-row: 1 / span 2; }
  .vs-small-multiples { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .evidence-runtime__workspace { grid-template-columns: 1fr; }
  .evidence-cohort { max-height: 340px; }
  .explorer-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .provider-comparison__grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .metric-tooltip { min-width: calc(100vw - 24px); }
  .selection-summary { grid-template-columns: 5px minmax(0, 1fr); }
  .selection-summary__actions { grid-column: 2; grid-row: auto; }
  .selection-summary__actions > * { flex: 1 1 100%; }
  .table-fallback { overflow-x: visible; }
  .table-fallback thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table-fallback table, .table-fallback tbody, .table-fallback tr, .table-fallback td { display: block; width: 100%; }
  .table-fallback tr { padding: 8px 0; border-bottom: 1px solid var(--border); }
  .table-fallback td { display: grid; grid-template-columns: minmax(95px, .65fr) minmax(0, 1fr); gap: 8px; padding: 4px 0; border: 0; overflow-wrap: anywhere; }
  .table-fallback td::before { color: var(--muted-ink); content: attr(data-label); font-family: var(--sans); font-size: 9px; letter-spacing: .05em; text-transform: uppercase; }
  .visual-chart-frame__plot { min-height: 220px; }
  .vs-stage-chart .visual-mark { grid-template-columns: 30px minmax(0, 1fr) 60px; }
  .vs-stage-chart__track { grid-column: 2 / -1; }
  .vs-ranked-chart .visual-mark, .vs-interval-chart .visual-mark, .vs-pair-chart .visual-mark { grid-template-columns: minmax(0, 1fr) 68px; }
  .vs-ranked-chart__track, .vs-interval-chart__axis, .vs-pair-chart__axis { grid-column: 1 / -1; grid-row: 2; }
  .vs-heatmap { grid-template-columns: minmax(76px, .9fr) repeat(var(--columns), minmax(58px, 1fr)); overflow-x: auto; }
  .vs-heatmap__cell { min-height: 46px; font-size: 9px; }
  .vs-scatter { min-height: 280px; }
  .vs-diverging .visual-mark { grid-template-columns: 86px minmax(0, 1fr); }
  .vs-small-multiples { grid-template-columns: 1fr; }
  .exact-response__metadata { grid-template-columns: 1fr; }
  .exact-response__answer { max-height: none; }
  .evidence-cohort-row { grid-template-columns: minmax(0, 1fr) 52px; }
  .evidence-cohort-row span:nth-child(3) { grid-column: 1 / -1; }
  .explorer-filter-grid { grid-template-columns: 1fr; }
  .evidence-row--production { grid-template-columns: 1fr; }
  .source-semantic-grid { grid-template-columns: 1fr; }
  .overlay-ledger-row { grid-template-columns: 1fr; }
  .evidence-selected-overlay dl { grid-template-columns: 1fr; }
  .provider-comparison__header { align-items: flex-start; flex-direction: column; }
  .provider-compare-controls { justify-content: flex-start; }
}

@media (max-width: 360px) {
  .metric-tooltip__grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .visual-mark,
  .vs-stage-chart__track > i,
  .vs-ranked-chart__track > i,
  .vs-small-multiples__track > i { transition: none; }
}

@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;
  }
}

/* Production shell additions: state, filters, compare and drill navigation. */
.route-group-label {
  display: block;
  padding: 14px 16px 5px;
  color: var(--quiet-ink);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.advanced-filter-button {
  white-space: nowrap;
}

.compare-entities {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
}

.compare-entities .entity-token {
  max-width: 150px;
}

.entity-token button {
  display: grid;
  width: 22px;
  height: 22px;
  margin-left: 3px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.entity-token button:hover {
  background: rgba(22, 22, 22, 0.1);
}

.scope-banner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px 28px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-soft);
}

.scope-banner > span:nth-child(2) {
  display: grid;
  min-width: 0;
}

.scope-banner small {
  overflow: hidden;
  color: var(--muted-ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scope-banner code {
  color: var(--muted-ink);
  font-size: 10px;
}

.scope-banner__pulse {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--positive);
  box-shadow: 0 0 0 4px var(--positive-soft);
}

.drawer-tabs {
  display: flex;
  gap: 2px;
  padding: 8px 20px;
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
}

.drawer-tabs button {
  min-height: 40px;
  padding: 7px 10px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted-ink);
  cursor: pointer;
  white-space: nowrap;
}

.drawer-tabs button[aria-current="page"] {
  border-bottom-color: var(--focus-strong);
  color: var(--ink);
  font-weight: 700;
}

.filter-sheet {
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  overflow: auto;
  border: 1px solid var(--ink);
  background: var(--surface);
  box-shadow: var(--shadow-large);
}

.filter-sheet::backdrop {
  background: rgba(22, 22, 22, 0.48);
}

.advanced-filter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 24px;
}

.filter-sheet > .method-note {
  margin: 0 24px;
}

.filter-sheet__actions,
.state-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.filter-sheet__actions {
  justify-content: flex-end;
  padding: 18px 24px 24px;
}

.drawer-actions .state-actions {
  margin-top: 12px;
}

.state-panel--unsupported {
  border-color: var(--warning);
  background: var(--warning-soft);
}

.chart-mark.is-selected,
.source-row.is-selected,
.evidence-row.is-selected {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.chart-mark.is-dimmed,
.source-row.is-dimmed,
.evidence-row.is-dimmed {
  opacity: 0.42;
}

/* AIV-034 · governed executive, journey and measurement-health scenes */
.executive-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 24px;
  border: 1px solid var(--ink);
  background: var(--ink);
}

.executive-kpi {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 228px;
  align-content: start;
  padding: 18px;
  border: 0;
  background: var(--surface);
  text-align: left;
}

.executive-kpi:hover,
.executive-kpi:focus-visible,
.executive-insight:hover,
.executive-insight:focus-visible {
  z-index: 1;
  background: var(--focus-soft);
}

.executive-kpi.is-caution {
  background:
    repeating-linear-gradient(135deg, transparent 0 12px, rgba(168, 100, 0, 0.06) 12px 15px),
    var(--surface);
}

.executive-kpi__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.executive-kpi > strong {
  display: block;
  margin: 22px 0 8px;
  font-family: var(--font-data);
  font-size: clamp(30px, 3vw, 46px);
  font-variant-numeric: tabular-nums;
  line-height: 0.95;
  letter-spacing: -0.07em;
}

.executive-kpi h3 {
  max-width: 250px;
  font-size: 14px;
  line-height: 1.25;
}

.executive-kpi__support {
  display: block;
  margin-top: 7px;
  color: var(--muted-ink);
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.45;
}

.executive-kpi__micro {
  display: grid;
  gap: 3px;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.executive-kpi__micro-row {
  display: grid;
  grid-template-columns: 58px minmax(30px, 1fr) 58px;
  gap: 6px;
  align-items: center;
  color: var(--muted-ink);
  font-size: 8px;
}

.executive-kpi__micro-row i {
  height: 4px;
  background: var(--paper-deep);
}

.executive-kpi__micro-row i::after {
  display: block;
  width: var(--value);
  height: 100%;
  background: var(--analytic);
  content: "";
}

.executive-kpi__micro-row b {
  overflow: hidden;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.executive-kpi__micro-row.is-suppressed i {
  background: repeating-linear-gradient(135deg, var(--warning-soft) 0 4px, var(--border) 4px 6px);
}

.executive-kpi__micro-row.is-suppressed b {
  color: var(--warning);
}

.executive-analysis-grid {
  margin-bottom: 30px;
}

.executive-scatter {
  min-height: 390px;
}

.executive-scatter .vs-scatter__point {
  display: grid;
  min-width: 32px;
  place-items: center;
  padding: 3px;
  line-height: 1.05;
}

.executive-scatter .vs-scatter__point span {
  max-width: 72px;
  overflow-wrap: anywhere;
  text-align: center;
}

.executive-scatter .vs-scatter__point.is-focus {
  z-index: 2;
  border: 3px solid var(--focus-strong);
  background: var(--focus);
  box-shadow: 0 0 0 5px var(--focus-soft);
}

.avi-waterfall {
  display: grid;
  gap: 12px;
}

.avi-component {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(70px, 1fr) 58px;
  gap: 10px;
  align-items: center;
  min-height: 62px;
}

.avi-component > span {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 0 7px;
}

.avi-component > span b {
  grid-row: 1 / span 2;
  color: var(--focus-strong);
  font-family: var(--mono);
}

.avi-component > span small {
  color: var(--muted-ink);
  font-family: var(--mono);
  font-size: 9px;
}

.avi-component > i {
  height: 12px;
  background: var(--paper-deep);
}

.avi-component > i::after {
  display: block;
  width: var(--value);
  height: 100%;
  background: var(--analytic);
  content: "";
}

.avi-component:nth-child(2) > i::after { background: var(--positive); }
.avi-component:nth-child(3) > i::after { background: var(--focus-strong); }
.avi-component em { font-family: var(--mono); font-style: normal; font-weight: 800; text-align: right; }

.avi-waterfall__total {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 12px;
  align-items: end;
  margin-top: 4px;
  padding-top: 15px;
  border-top: 3px solid var(--ink);
}

.avi-waterfall__total strong {
  grid-row: 1 / span 2;
  grid-column: 2;
  font-family: var(--mono);
  font-size: 32px;
  letter-spacing: -0.06em;
}

.avi-waterfall__total small { color: var(--muted-ink); }

.executive-insights-section {
  padding: 26px 0 10px;
  border-top: 1px solid var(--ink);
}

.executive-insight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--ink);
  background: var(--ink);
}

.executive-insight {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 20px;
  gap: 14px;
  min-height: 180px;
  padding: 20px;
  border: 0;
  background: var(--surface);
  text-align: left;
}

.executive-insight:first-child {
  grid-column: 1 / -1;
  min-height: 150px;
}

.executive-insight__rank {
  color: var(--focus-strong);
  font-family: var(--mono);
  font-size: 26px;
}

.executive-insight > span:nth-child(2) {
  display: grid;
  align-content: start;
  gap: 7px;
}

.executive-insight small {
  color: var(--muted-ink);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.executive-insight strong { font-size: 17px; line-height: 1.25; }
.executive-insight p { margin: 0; color: var(--muted-ink); font-size: 11px; line-height: 1.5; }

.journey-layout,
.health-layout {
  align-items: start;
}

.journey-funnel {
  display: grid;
  gap: 7px;
}

.journey-funnel__stage {
  display: grid;
  grid-template-columns: 38px minmax(150px, 1fr) minmax(100px, auto);
  gap: 12px;
  align-items: center;
  width: var(--stage-width);
  min-width: min(100%, 310px);
  min-height: 68px;
  margin-inline: auto;
  padding: 10px 16px;
  border: 1px solid var(--border-strong);
  background: color-mix(in srgb, var(--analytic) 9%, var(--surface));
  clip-path: polygon(2% 0, 98% 0, 94% 100%, 6% 100%);
}

.journey-funnel__stage:hover,
.journey-funnel__stage:focus-visible { background: var(--analytic-soft); }
.journey-funnel__stage:nth-child(3) { border-color: var(--focus-strong); background: var(--focus-soft); }
.journey-funnel__number { color: var(--focus-strong); font-family: var(--mono); }
.journey-funnel__stage > span:nth-child(2),
.journey-funnel__stage > span:nth-child(3) { display: grid; gap: 2px; }
.journey-funnel__stage > span:nth-child(3) { justify-items: end; }
.journey-funnel__stage small { color: var(--muted-ink); font-family: var(--mono); font-size: 9px; }
.journey-funnel__stage b { font-family: var(--mono); font-size: 18px; }

.journey-counter-card {
  position: sticky;
  top: 96px;
}

.journey-counter {
  display: grid;
  width: 100%;
  min-height: 260px;
  align-content: center;
  padding: 22px;
  border: 1px solid var(--positive);
  background: var(--positive-soft);
  text-align: left;
}

.journey-counter strong {
  font-family: var(--mono);
  font-size: clamp(48px, 6vw, 74px);
  line-height: 1;
  letter-spacing: -0.08em;
}

.journey-counter span { margin-top: 12px; font-size: 18px; font-weight: 800; }
.journey-counter small { margin-top: 8px; color: var(--muted-ink); }

.no-brand-waterfall { display: grid; gap: 10px; }
.no-brand-waterfall__bar { display: flex; width: 100%; min-height: 88px; overflow: hidden; }
.no-brand-waterfall__bar > * { display: grid; width: var(--value); min-width: 0; place-items: center; padding: 8px; font-style: normal; text-align: center; }
.no-brand-waterfall__bar i { color: var(--surface); background: var(--analytic); }
.no-brand-waterfall__bar em { color: var(--ink); background: var(--warning-soft); }
.no-brand-waterfall__bar b { overflow: hidden; font-family: var(--mono); font-size: 10px; text-overflow: ellipsis; }
.no-brand-waterfall__scale { display: flex; justify-content: space-between; color: var(--muted-ink); font-size: 9px; }

.provider-top3,
.health-provider-bars,
.failure-chart { display: grid; gap: 10px; }

.provider-top3-row {
  display: grid;
  grid-template-columns: 120px minmax(80px, 1fr) 72px;
  gap: 10px;
  align-items: center;
  min-height: 40px;
}

.provider-top3-row > span:first-child { display: grid; }
.provider-top3-row small { color: var(--muted-ink); font-size: 9px; }
.provider-top3-row__track { height: 11px; background: var(--paper-deep); }
.provider-top3-row__track i { display: block; width: var(--value); height: 100%; background: var(--analytic); }
.provider-top3-row > b { font-family: var(--mono); font-size: 10px; text-align: right; }
.provider-top3-row.is-suppressed .provider-top3-row__track { background: repeating-linear-gradient(135deg, var(--warning-soft) 0 5px, var(--border) 5px 7px); }
.provider-top3-row.is-suppressed > b { color: var(--warning); }

.health-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 24px;
  border: 1px solid var(--ink);
  background: var(--ink);
}

.health-summary {
  display: grid;
  min-height: 130px;
  align-content: center;
  padding: 18px;
  border: 0;
  background: var(--surface);
  text-align: left;
}

.health-summary > span { color: var(--muted-ink); font-family: var(--mono); font-size: 9px; text-transform: uppercase; }
.health-summary > strong { margin: 8px 0 4px; font-family: var(--mono); font-size: 30px; letter-spacing: -0.06em; }
.health-summary > small { color: var(--muted-ink); }

.health-provider-row {
  display: grid;
  grid-template-columns: 105px minmax(100px, 1fr) 52px 64px;
  gap: 9px;
  align-items: center;
  min-height: 45px;
}

.health-provider-row > span:first-child { display: grid; }
.health-provider-row small { color: var(--muted-ink); font-size: 8px; }
.health-provider-row > b { font-family: var(--mono); font-size: 10px; text-align: right; }
.health-provider-row__track { position: relative; height: 12px; background: var(--paper-deep); }
.health-provider-row__track i { display: block; width: var(--value); height: 100%; background: var(--positive); }
.health-provider-row__track em { position: absolute; top: -4px; bottom: -4px; left: var(--threshold); width: 2px; background: var(--warning); }
.health-provider-row.is-suppressed .health-provider-row__track i { background: var(--warning); }

.failure-row {
  display: grid;
  grid-template-columns: minmax(100px, .8fr) minmax(100px, 1.5fr) 44px;
  gap: 9px;
  align-items: center;
  min-height: 38px;
  font-size: 10px;
}

.failure-row > i { height: 12px; background: var(--paper-deep); }
.failure-row > i b { display: block; width: var(--value); height: 100%; background: var(--negative); }
.failure-row > strong { font-family: var(--mono); text-align: right; }

.health-matrix {
  display: grid;
  grid-template-columns: minmax(110px, 1.1fr) repeat(var(--columns), minmax(96px, 1fr));
  gap: 5px;
  align-items: stretch;
}

.health-matrix > strong {
  display: grid;
  min-height: 42px;
  place-items: end center;
  padding: 5px;
  color: var(--muted-ink);
  font-size: 9px;
  text-align: center;
}

.health-matrix > .health-matrix__provider { place-items: center start; text-align: left; }

.health-matrix__cell {
  position: relative;
  display: grid;
  min-height: 78px;
  place-content: center;
  padding: 7px;
  border: 1px solid color-mix(in srgb, var(--positive) 45%, var(--border));
  background: color-mix(in srgb, var(--positive) var(--intensity), var(--surface));
  cursor: pointer;
  text-align: center;
}

.health-matrix__cell b { font-family: var(--mono); font-size: 15px; }
.health-matrix__cell small { margin-top: 2px; font-size: 8px; }
.health-matrix__cell em { margin-top: 3px; color: var(--warning); font-size: 7px; font-style: normal; font-weight: 800; text-transform: uppercase; }
.health-matrix__cell.is-suppressed { border-color: var(--warning); background: repeating-linear-gradient(135deg, var(--warning-soft) 0 7px, var(--surface) 7px 10px); }

.drawer-metric-value {
  margin: 12px 0;
  font-family: var(--mono);
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -0.07em;
}

.drawer-taxonomy {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.drawer-taxonomy > span {
  display: grid;
  gap: 3px;
  padding: 10px;
  border-left: 3px solid var(--analytic);
  background: var(--surface-soft);
}

.drawer-taxonomy b { overflow-wrap: anywhere; font-size: 10px; }
.drawer-taxonomy strong { font-family: var(--mono); font-size: 18px; }
.drawer-taxonomy small { color: var(--muted-ink); font-size: 8px; }
.drawer-evidence-cta { border-left-color: var(--focus-strong); background: var(--focus-soft); }

@media (max-width: 1120px) {
  .executive-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .health-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .health-matrix { grid-template-columns: minmax(96px, 1fr) repeat(var(--columns), minmax(82px, 1fr)); overflow-x: auto; }
}

@media (max-width: 900px) {
  .journey-counter-card { position: static; }
  .executive-scatter { min-height: 330px; }
  .executive-insight-grid { grid-template-columns: 1fr; }
  .executive-insight:first-child { grid-column: auto; }
}

@media (max-width: 600px) {
  .executive-kpi-grid,
  .health-summary-grid { grid-template-columns: 1fr; }
  .executive-kpi { min-height: 190px; }
  .executive-scatter { min-height: 300px; margin-inline: 22px 10px; }
  .executive-scatter .vs-scatter__point { font-size: 7px; }
  .avi-component { grid-template-columns: minmax(0, 1fr) 56px; }
  .avi-component > i { grid-column: 1 / -1; grid-row: 2; }
  .executive-insight { grid-template-columns: 34px minmax(0, 1fr); min-height: 160px; padding: 16px; }
  .executive-insight > span:last-child { display: none; }
  .journey-funnel__stage { grid-template-columns: 28px minmax(0, 1fr) 76px; min-width: 100%; padding-inline: 10px; clip-path: none; }
  .journey-funnel__stage small { font-size: 7px; }
  .provider-top3-row { grid-template-columns: 94px minmax(60px, 1fr) 62px; }
  .health-provider-row { grid-template-columns: 88px minmax(80px, 1fr) 48px; }
  .health-provider-row > small { grid-column: 2 / -1; }
  .health-matrix { grid-template-columns: minmax(86px, .9fr) repeat(var(--columns), minmax(76px, 1fr)); }
  .health-matrix__cell { min-height: 68px; }
  .drawer-taxonomy { grid-template-columns: 1fr; }
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (max-width: 900px) {
  .scope-banner {
    padding-inline: 18px;
  }

  .scope-banner code {
    display: none;
  }
}

@media (max-width: 600px) {
  .scope-banner {
    padding-inline: 12px;
  }

  .scope-banner small {
    white-space: normal;
  }

  .advanced-filter-grid {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .filter-sheet {
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    margin: 0;
    border: 0;
  }

  .filter-sheet > .method-note {
    margin-inline: 16px;
  }

  .filter-sheet__actions {
    padding: 16px;
  }

  .filter-sheet__actions > *,
  .drawer-actions .state-actions > * {
    flex: 1 1 100%;
  }
}

/* AIV-045 · production OLAP Compare Lab */
.compare-control-grid {
  grid-template-columns: minmax(130px, .8fr) minmax(150px, 1fr) auto minmax(150px, 1fr) minmax(190px, 1.4fr);
  align-items: end;
}

.compare-control-grid > :nth-child(n + 6) {
  grid-column: span 1;
}

.compare-swap {
  display: grid;
  align-items: end;
  min-height: 40px;
}

.compare-swap .ghost-button {
  min-height: 40px;
  white-space: nowrap;
}

.compare-mode-rail {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: 14px;
  margin-top: 16px;
}

.compare-mode-rail .segmented-control {
  margin-top: 6px;
}

.compare-caveat-strip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin: 0 0 20px;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  border-left: 4px solid var(--warning);
  background: var(--surface-soft);
}

.compare-caveat-strip p {
  margin: 0;
  color: var(--muted-ink);
  font-size: 11px;
  line-height: 1.45;
}

.compare-caveat-strip code {
  max-width: 220px;
  overflow: hidden;
  color: var(--quiet-ink);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compare-svg-button {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 0;
  border: 1px solid var(--border);
  background: var(--surface-soft);
}

.compare-pair-svg {
  display: block;
  width: 100%;
  height: auto;
}

.compare-pair-svg__grid line {
  stroke: var(--border-strong);
  stroke-width: 2;
}

.compare-pair-svg__connector {
  fill: var(--analytic-soft);
  stroke: var(--analytic);
  stroke-width: 1;
}

.compare-pair-svg__a {
  fill: var(--focus);
  stroke: var(--ink);
  stroke-width: 3;
}

.compare-pair-svg__b {
  fill: var(--analytic);
  stroke: var(--ink);
  stroke-width: 3;
}

.compare-pair-svg__label,
.compare-pair-svg__tick {
  fill: var(--ink);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
}

.compare-pair-svg__tick {
  fill: var(--muted-ink);
  font-size: 9px;
  font-weight: 500;
}

.compare-detail-list {
  display: grid;
  gap: 1px;
  margin: 0 0 16px;
  border: 1px solid var(--border);
  background: var(--border);
}

.compare-detail-list > div {
  display: grid;
  grid-template-columns: minmax(90px, .8fr) minmax(0, 1.2fr);
  gap: 8px;
  padding: 9px 10px;
  background: var(--surface-soft);
}

.compare-detail-list dt {
  color: var(--muted-ink);
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
}

.compare-detail-list dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 11px;
  font-weight: 650;
  text-align: right;
}

.compare-persistent-detail > button {
  width: 100%;
  margin-top: 8px;
}

.compare-breakdown-layout {
  margin-top: 20px;
}

.compare-forest {
  display: grid;
  gap: 7px;
}

.compare-forest__row {
  display: grid;
  grid-template-columns: minmax(105px, .9fr) minmax(90px, 1.5fr) 72px;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  text-align: left;
  transition: border-color var(--motion-standard) ease, background var(--motion-standard) ease;
}

.compare-forest__row:hover,
.compare-forest__row:focus-visible {
  border-color: var(--focus-strong);
  background: var(--focus-soft);
}

.compare-forest__row > span:first-child {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.compare-forest__row strong {
  overflow-wrap: anywhere;
  font-size: 11px;
}

.compare-forest__row small {
  color: var(--muted-ink);
  font-size: 8px;
}

.compare-forest__row > b {
  font-family: var(--mono);
  font-size: 10px;
  text-align: right;
}

.compare-forest__track {
  position: relative;
  height: 18px;
  background: linear-gradient(90deg, transparent calc(50% - 1px), var(--border-strong) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px));
}

.compare-forest__track i {
  position: absolute;
  top: 3px;
  left: var(--left);
  width: var(--width);
  height: 12px;
  background: var(--positive);
}

.compare-forest__track i.is-negative {
  background: var(--negative);
}

.compare-pivot-table th small {
  display: block;
  margin-top: 3px;
  color: var(--muted-ink);
  font-size: 8px;
  font-weight: 500;
}

.compare-pivot-table td,
.compare-pivot-table th {
  font-variant-numeric: tabular-nums;
  vertical-align: middle;
}

.compare-export-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 20px;
  padding: 14px;
  border-top: 1px solid var(--border-strong);
  border-bottom: 1px solid var(--border-strong);
}

.compare-matrix-wrap {
  max-width: 100%;
  overflow-x: auto;
}

.compare-matrix {
  width: 100%;
  min-width: 940px;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 4px;
}

.compare-matrix th {
  width: 76px;
  padding: 5px;
  overflow: hidden;
  color: var(--muted-ink);
  font-family: var(--mono);
  font-size: 8px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compare-matrix tbody th {
  width: 110px;
  color: var(--ink);
  text-align: left;
}

.compare-matrix td {
  height: 52px;
  padding: 0;
  text-align: center;
}

.compare-matrix td > button {
  width: 100%;
  height: 52px;
  border: 1px solid color-mix(in srgb, var(--positive) 48%, var(--border));
  background: color-mix(in srgb, var(--positive) calc(var(--matrix-intensity) * 55%), var(--surface));
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  transition: transform var(--motion-standard) ease, border-color var(--motion-standard) ease;
}

.compare-matrix td > button.is-negative {
  border-color: color-mix(in srgb, var(--negative) 48%, var(--border));
  background: color-mix(in srgb, var(--negative) calc(var(--matrix-intensity) * 46%), var(--surface));
}

.compare-matrix td > button:hover,
.compare-matrix td > button:focus-visible {
  z-index: 2;
  border-color: var(--ink);
  transform: scale(1.06);
}

.compare-matrix .is-diagonal {
  border: 1px dashed var(--border);
  color: var(--quiet-ink);
  background: var(--surface-soft);
}

.compare-matrix-mobile {
  display: none;
}

.compare-screen-checks {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}

.compare-screen-check {
  display: flex;
  gap: 7px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  font-size: 10px;
}

.compare-screen-check span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compare-screen-bars {
  display: grid;
  gap: 9px;
}

.compare-screen-bars > button {
  display: grid;
  grid-template-columns: 34px minmax(120px, .8fr) minmax(120px, 1.8fr) 76px;
  gap: 12px;
  align-items: center;
  min-height: 58px;
  padding: 10px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  text-align: left;
}

.compare-screen-bars__rank {
  color: var(--quiet-ink);
  font-family: var(--mono);
  font-size: 15px;
}

.compare-screen-bars > button > span:nth-child(2) {
  display: grid;
  gap: 2px;
}

.compare-screen-bars small {
  color: var(--muted-ink);
  font-size: 8px;
}

.compare-screen-bars__track {
  height: 22px;
  background: var(--paper-deep);
}

.compare-screen-bars__track i {
  display: block;
  width: var(--value);
  height: 100%;
  background: var(--analytic);
  transition: width var(--motion-standard) ease;
}

.compare-screen-bars > button > b {
  font-family: var(--mono);
  text-align: right;
}

@media (max-width: 1180px) {
  .compare-control-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .compare-swap {
    grid-column: auto;
  }

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

@media (max-width: 900px) {
  .compare-control-grid,
  .compare-mode-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .compare-caveat-strip {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .compare-caveat-strip code {
    display: none;
  }

  .compare-screen-bars > button {
    grid-template-columns: 28px minmax(100px, .8fr) minmax(80px, 1.2fr) 68px;
  }
}

@media (max-width: 720px) {
  .compare-matrix-wrap {
    display: none;
  }

  .compare-matrix-mobile {
    display: grid;
    gap: 7px;
  }

  .compare-matrix-mobile > button {
    display: grid;
    grid-template-columns: minmax(110px, 1fr) minmax(70px, 1.3fr) 72px;
    gap: 9px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--border);
    background: var(--surface-soft);
    text-align: left;
  }

  .compare-matrix-mobile > button > span {
    display: grid;
    gap: 2px;
  }

  .compare-matrix-mobile small {
    color: var(--muted-ink);
    font-size: 8px;
  }

  .compare-matrix-mobile i {
    width: var(--value);
    height: 14px;
    background: var(--positive);
  }

  .compare-matrix-mobile i.is-negative {
    background: var(--negative);
  }

  .compare-matrix-mobile b {
    font-family: var(--mono);
    font-size: 10px;
    text-align: right;
  }
}

@media (max-width: 600px) {
  .compare-control-grid,
  .compare-mode-rail,
  .compare-caveat-strip,
  .compare-detail-list > div {
    grid-template-columns: 1fr;
  }

  .compare-swap .ghost-button {
    width: 100%;
  }

  .compare-caveat-strip {
    align-items: start;
  }

  .compare-pair-layout .pair-summary {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .compare-pair-layout .pair-entity--b {
    text-align: left;
  }

  .compare-pair-layout .pair-delta {
    width: 100%;
  }

  .compare-detail-list dd {
    text-align: left;
  }

  .compare-forest__row,
  .compare-screen-bars > button {
    grid-template-columns: 28px minmax(0, 1fr) 70px;
  }

  .compare-forest__row > span:first-child {
    grid-column: 1 / 3;
  }

  .compare-forest__track {
    grid-column: 1 / 3;
    grid-row: 2;
  }

  .compare-forest__row > b {
    grid-column: 3;
    grid-row: 1 / 3;
  }

  .compare-screen-bars__rank {
    grid-column: 1;
  }

  .compare-screen-bars > button > span:nth-child(2) {
    grid-column: 2;
  }

  .compare-screen-bars__track {
    grid-column: 1 / 3;
    grid-row: 2;
  }

  .compare-screen-bars > button > b {
    grid-column: 3;
    grid-row: 1 / 3;
  }

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

  .compare-export-bar > * {
    flex: 1 1 140px;
  }
}

@media (max-width: 390px) {
  .compare-screen-checks {
    grid-template-columns: 1fr;
  }

  .compare-matrix-mobile > button {
    grid-template-columns: minmax(0, 1fr) 64px;
  }

  .compare-matrix-mobile i {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

/* AIV-052 · governed discovery workspaces */
.chart-card--seven {
  grid-column: span 7;
}

.discovery-strip {
  margin: 28px 0;
  padding: 26px 0;
  border-block: 1px solid var(--ink);
}

.discovery-finding-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--ink);
  background: var(--ink);
}

.discovery-finding {
  display: grid;
  grid-column: span 4;
  grid-template-rows: 1fr auto;
  min-width: 0;
  background: var(--surface);
}

.discovery-finding:first-child,
.discovery-finding:nth-child(2) {
  grid-column: span 6;
}

.discovery-finding__mark {
  display: grid;
  gap: 12px;
  min-height: 230px;
  padding: 22px;
  transition: background var(--motion-fast) ease;
}

.discovery-finding__mark:hover,
.discovery-finding__mark:focus-visible {
  background: var(--focus-soft);
}

.discovery-finding__mark > span {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.discovery-finding__mark small,
.discovery-finding__mark p,
.discovery-finding__mark em {
  margin: 0;
  color: var(--muted-ink);
  font-size: 10px;
  font-style: normal;
  line-height: 1.45;
}

.discovery-finding__mark > span small {
  font-family: var(--mono);
  letter-spacing: .04em;
  text-transform: uppercase;
}

.discovery-finding__mark > span strong {
  flex: 0 0 auto;
  font-family: var(--mono);
  font-size: 22px;
  letter-spacing: -.05em;
}

.discovery-finding__mark h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 21px;
  line-height: 1.18;
}

.discovery-finding__mark em {
  align-self: end;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.discovery-finding > .text-button {
  justify-content: flex-start;
  min-height: 44px;
  padding: 10px 22px;
  border-top: 1px solid var(--border);
}

.discovery-controls,
.discovery-export-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 18px 0 20px;
  padding: 14px 16px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
}

.discovery-controls > span,
.discovery-export-bar > span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.discovery-controls > span small,
.discovery-export-bar small {
  color: var(--muted-ink);
  font-family: var(--mono);
  font-size: 9px;
}

.discovery-controls > div {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.discovery-controls .segmented-button.is-active {
  color: var(--surface);
  background: var(--ink);
}

.discovery-pareto,
.discovery-interval-list,
.discovery-provider-multiples,
.discovery-breadth-rank,
.discovery-provider-dots,
.discovery-threshold-bars,
.discovery-risk-rank,
.discovery-resolution-stages {
  display: grid;
  gap: 7px;
}

.discovery-pareto-row {
  display: grid;
  grid-template-columns: 32px minmax(145px, .9fr) minmax(160px, 1.7fr) 62px 66px;
  gap: 10px;
  align-items: center;
  min-height: 54px;
  padding: 8px;
}

.discovery-pareto-row:hover,
.discovery-pareto-row:focus-visible,
.discovery-interval-row:hover,
.discovery-interval-row:focus-visible,
.discovery-provider-multiples > button:hover,
.discovery-provider-multiples > button:focus-visible,
.discovery-provider-dots > button:hover,
.discovery-provider-dots > button:focus-visible,
.discovery-risk-rank > button:hover,
.discovery-risk-rank > button:focus-visible {
  background: var(--focus-soft);
}

.discovery-rank-index {
  color: var(--quiet-ink);
  font-family: var(--mono);
}

.discovery-pareto-row > span:nth-child(2),
.discovery-interval-row > span:nth-child(2),
.discovery-provider-multiples > button > span,
.discovery-provider-dots > button > span,
.discovery-risk-rank > button > span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.discovery-pareto-row small,
.discovery-interval-row small,
.discovery-provider-multiples small,
.discovery-provider-dots small,
.discovery-risk-rank small,
.discovery-resolution-stages small {
  color: var(--muted-ink);
  font-size: 9px;
}

.discovery-pareto-row > b,
.discovery-pareto-row > small:last-child,
.discovery-interval-row > strong:last-child,
.discovery-provider-multiples em,
.discovery-provider-dots > strong,
.discovery-provider-dots > small:last-child,
.discovery-risk-rank > strong,
.discovery-resolution-stages > button > strong,
.discovery-resolution-stages > button > small {
  font-family: var(--mono);
  font-style: normal;
  text-align: right;
}

.discovery-pareto-track {
  position: relative;
  height: 18px;
  background: var(--paper-deep);
}

.discovery-pareto-track > i {
  display: block;
  width: var(--value);
  height: 100%;
  background: var(--analytic);
  transition: width var(--motion-standard) ease;
}

.discovery-pareto-row:first-child .discovery-pareto-track > i {
  background: var(--focus-strong);
}

.discovery-pareto-track > em {
  position: absolute;
  top: -3px;
  bottom: -3px;
  left: var(--cumulative);
  width: 2px;
  background: var(--ink);
  transform: translateX(-1px);
}

.discovery-composition,
.discovery-verdict-stack {
  display: flex;
  min-height: 148px;
  overflow: hidden;
  border: 1px solid var(--ink);
}

.discovery-composition > span,
.discovery-verdict-stack > span {
  display: grid;
  width: calc(var(--value) * 1%);
  min-width: 42px;
  align-content: end;
  gap: 4px;
  padding: 10px;
  color: var(--surface);
  background: var(--analytic);
}

.discovery-composition .is-focus,
.discovery-verdict-stack .series-1 {
  color: var(--ink);
  background: var(--focus);
}

.discovery-composition .is-muted,
.discovery-verdict-stack .series-4 {
  color: var(--ink);
  background: var(--paper-deep);
}

.discovery-verdict-stack .series-2 {
  background: var(--negative);
}

.discovery-verdict-stack .series-3 {
  background: var(--positive);
}

.discovery-composition small,
.discovery-verdict-stack small {
  overflow-wrap: anywhere;
  font-size: 9px;
}

.discovery-definition-list,
.compare-detail-list {
  display: grid;
  gap: 0;
  margin: 16px 0;
}

.discovery-definition-list > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
}

.discovery-definition-list dt {
  color: var(--muted-ink);
}

.discovery-definition-list dd {
  margin: 0;
  font-family: var(--mono);
  text-align: right;
}

.discovery-interval-row {
  display: grid;
  grid-template-columns: 32px minmax(125px, .9fr) minmax(180px, 1.8fr) 72px;
  gap: 10px;
  align-items: center;
  min-height: 52px;
  padding: 7px 8px;
}

.discovery-interval-row.is-selected-brand,
.discovery-breadth-rank > button.is-selected-brand,
.discovery-risk-rank > button.is-selected-brand {
  box-shadow: inset 4px 0 0 var(--focus-strong);
  background: var(--focus-soft);
}

.discovery-interval-axis {
  position: relative;
  height: 20px;
  border-bottom: 1px solid var(--border-strong);
  background: repeating-linear-gradient(90deg, transparent 0 19.8%, var(--border) 20% 20.2%);
}

.discovery-interval-axis > i {
  position: absolute;
  top: 9px;
  left: var(--left);
  width: var(--width);
  height: 2px;
  background: var(--ink);
}

.discovery-interval-axis > b {
  position: absolute;
  top: 5px;
  left: var(--value);
  width: 10px;
  height: 10px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--analytic);
  box-shadow: 0 0 0 1px var(--ink);
  transform: translateX(-5px);
}

.discovery-interval-axis .is-missing {
  position: absolute;
  inset: 1px 0 auto;
  color: var(--warning);
  font-family: var(--mono);
  font-size: 9px;
  font-style: normal;
  text-align: center;
}

.discovery-stage-pairs,
.discovery-provider-multiples {
  display: grid;
  gap: 12px;
}

.discovery-stage-pairs > button,
.discovery-provider-multiples > button,
.discovery-threshold-bars > button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(90px, 1.2fr) 86px;
  gap: 10px;
  align-items: center;
  min-height: 66px;
  padding: 10px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
}

.discovery-stage-pairs > button > span,
.discovery-threshold-bars > button > span {
  display: grid;
  gap: 2px;
}

.discovery-stage-pairs i,
.discovery-provider-multiples i,
.discovery-threshold-bars i,
.discovery-breadth-rank i,
.discovery-risk-rank i,
.discovery-barrier-counts i {
  height: 14px;
  background: var(--paper-deep);
}

.discovery-stage-pairs i > b,
.discovery-provider-multiples i > b,
.discovery-threshold-bars i > b,
.discovery-breadth-rank i > b,
.discovery-risk-rank i > b,
.discovery-barrier-counts i > b {
  display: block;
  width: var(--value);
  height: 100%;
  background: var(--analytic);
  transition: width var(--motion-standard) ease;
}

.discovery-stage-pairs em,
.discovery-provider-multiples em,
.discovery-threshold-bars em {
  font-family: var(--mono);
  font-style: normal;
  text-align: right;
}

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

.discovery-provider-multiples > button {
  grid-template-columns: 1fr;
  align-content: start;
}

.discovery-provider-multiples > button.is-unavailable,
.discovery-interval-row.is-unavailable,
.discovery-risk-rank > button.is-unavailable {
  background: var(--unknown-soft);
}

.discovery-provider-multiples > button.is-unavailable i > b {
  background: repeating-linear-gradient(135deg, var(--warning) 0 2px, transparent 2px 6px);
}

.discovery-breadth-rank > button,
.discovery-risk-rank > button {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(100px, 1.4fr) 68px;
  gap: 10px;
  align-items: center;
  min-height: 46px;
  padding: 7px 8px;
}

.discovery-breadth-rank > button > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.discovery-breadth-rank > button > strong,
.discovery-barrier-counts em {
  font-family: var(--mono);
  font-style: normal;
  text-align: right;
}

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

.discovery-category-grid > button {
  display: grid;
  min-height: calc(88px + var(--weight) * 48px);
  align-content: space-between;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--analytic-soft) calc(var(--weight) * 82%), var(--surface));
}

.discovery-category-grid > button > span {
  font-family: var(--mono);
  font-size: 17px;
}

.discovery-delta-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 7px;
}

.discovery-delta-strip > span {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 10px;
  border-top: 2px solid var(--border-strong);
  background: var(--surface-soft);
}

.discovery-delta-strip > span > strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.discovery-delta-strip i {
  width: var(--value);
  min-width: 2px;
  height: 8px;
  background: var(--positive);
}

.discovery-delta-strip i.is-negative {
  background: var(--negative);
}

.discovery-delta-strip b,
.discovery-delta-strip small {
  font-family: var(--mono);
}

.discovery-insufficient {
  border-style: dashed;
  background: var(--unknown-soft);
}

.discovery-insufficient__summary {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-strong);
}

.discovery-insufficient__summary > span {
  display: grid;
}

.discovery-insufficient__summary > span strong {
  font-family: var(--mono);
  font-size: 25px;
}

.discovery-insufficient__summary small,
.discovery-insufficient__summary p {
  color: var(--muted-ink);
  font-size: 11px;
}

.discovery-barrier-counts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 18px;
}

.discovery-barrier-counts > span {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) minmax(90px, 1.3fr) 34px;
  gap: 8px;
  align-items: center;
  min-height: 34px;
}

.discovery-barrier-counts strong {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.discovery-provider-dots > button {
  display: grid;
  grid-template-columns: minmax(100px, .8fr) minmax(180px, 1.8fr) 70px 72px;
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 8px;
}

.discovery-provider-dots > button > i {
  position: relative;
  height: 24px;
  border-bottom: 1px solid var(--border-strong);
  background: linear-gradient(90deg, var(--negative-soft) 0 var(--threshold), transparent var(--threshold) 100%);
}

.discovery-provider-dots > button > i > b {
  position: absolute;
  top: 7px;
  left: var(--value);
  width: 11px;
  height: 11px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--analytic);
  box-shadow: 0 0 0 1px var(--ink);
  transform: translateX(-5px);
}

.discovery-provider-dots > button.is-blind > i > b {
  border-radius: 0;
  background: var(--negative);
  transform: translateX(-5px) rotate(45deg);
}

.discovery-provider-dots > button > i > em,
.discovery-provider-dots > button > i > u {
  position: absolute;
  inset-block: 2px 0;
  left: var(--median);
  width: 1px;
  background: var(--ink);
  text-decoration: none;
}

.discovery-provider-dots > button > i > u {
  left: var(--threshold);
  width: 2px;
  background: var(--negative);
}

.discovery-threshold-bars > button.is-active {
  border-color: var(--ink);
  background: var(--focus-soft);
}

.discovery-blind-heatmap {
  display: grid;
  grid-template-columns: minmax(90px, 1.2fr) repeat(var(--columns), minmax(58px, 1fr));
  gap: 3px;
  align-items: stretch;
}

.discovery-blind-heatmap > strong,
.discovery-blind-heatmap > b {
  display: grid;
  min-height: 38px;
  place-items: center;
  padding: 4px;
  overflow: hidden;
  font-size: 9px;
  text-overflow: ellipsis;
}

.discovery-blind-heatmap > b {
  place-items: center start;
}

.discovery-blind-heatmap > button,
.discovery-blind-heatmap > span {
  display: grid;
  min-height: 44px;
  place-items: center;
  border: 1px solid var(--border);
  background: var(--analytic-soft);
  font-family: var(--mono);
  font-size: 10px;
}

.discovery-blind-heatmap > button.is-blind {
  color: var(--negative);
  background: var(--negative-soft);
}

.discovery-resolution-stages > button {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) minmax(140px, 1.7fr) 56px 96px;
  gap: 10px;
  align-items: center;
  min-height: 54px;
  padding: 8px;
}

.discovery-resolution-stages > button > span {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 7px;
}

.discovery-resolution-stages > button > span b {
  color: var(--quiet-ink);
  font-family: var(--mono);
}

.discovery-resolution-stages > button > i {
  height: 18px;
  background: var(--paper-deep);
}

.discovery-resolution-stages > button > i > em {
  display: block;
  width: var(--value);
  height: 100%;
  background: var(--positive);
}

.discovery-risk-rank > button {
  grid-template-columns: minmax(145px, .9fr) minmax(140px, 1.7fr) 72px;
}

.discovery-risk-rank > button > i {
  position: relative;
}

.discovery-risk-axis {
  height: 24px;
  border-bottom: 1px solid var(--border-strong);
  background: repeating-linear-gradient(90deg, transparent 0 19.8%, var(--border) 20% 20.2%);
}

.discovery-risk-axis > span {
  position: absolute;
  top: 11px;
  left: var(--left);
  width: var(--width);
  height: 2px;
  background: var(--ink);
}

.discovery-risk-axis > b,
.discovery-risk-rank .discovery-risk-axis > b {
  position: absolute;
  top: 7px;
  left: var(--value);
  width: 10px;
  height: 10px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--analytic);
  box-shadow: 0 0 0 1px var(--ink);
  transform: translateX(-5px);
}

.discovery-risk-rank > button > i > em {
  display: grid;
  height: 100%;
  place-items: center;
  color: var(--warning);
  font-family: var(--mono);
  font-size: 9px;
  font-style: normal;
  background: repeating-linear-gradient(135deg, var(--warning-soft) 0 4px, transparent 4px 8px);
}

.discovery-exact-table {
  min-width: 0;
  max-width: 100%;
  margin-top: 20px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
}

.discovery-exact-table > summary {
  min-height: 48px;
  padding: 14px 16px;
  cursor: pointer;
  font-weight: 700;
}

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

.discovery-exact-table table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

.discovery-exact-table th,
.discovery-exact-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 10px;
  text-align: left;
}

.discovery-exact-table thead th {
  color: var(--muted-ink);
  background: var(--surface-soft);
  font-family: var(--mono);
  letter-spacing: .03em;
  text-transform: uppercase;
}

.discovery-exact-table tbody td:not(:first-child) {
  font-family: var(--mono);
}

@media (max-width: 1120px) {
  .discovery-finding,
  .discovery-finding:first-child,
  .discovery-finding:nth-child(2) {
    grid-column: span 6;
  }

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

  .discovery-delta-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .chart-card--seven,
  .chart-card--five {
    grid-column: 1 / -1;
  }

  .discovery-pareto-row {
    grid-template-columns: 28px minmax(110px, .9fr) minmax(120px, 1.5fr) 62px;
  }

  .discovery-pareto-row > small:last-child {
    display: none;
  }

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

  .discovery-insufficient__summary {
    grid-template-columns: 150px minmax(0, 1fr);
  }

  .discovery-insufficient__summary > button {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

@media (max-width: 720px) {
  .discovery-finding,
  .discovery-finding:first-child,
  .discovery-finding:nth-child(2) {
    grid-column: 1 / -1;
  }

  .discovery-controls,
  .discovery-export-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .discovery-controls > div,
  .discovery-controls > button,
  .discovery-export-bar > button {
    width: 100%;
  }

  .discovery-controls .segmented-button {
    flex: 1 1 130px;
    min-height: 44px;
  }

  .discovery-pareto-row,
  .discovery-interval-row,
  .discovery-provider-dots > button,
  .discovery-resolution-stages > button {
    grid-template-columns: 28px minmax(0, 1fr) 72px;
  }

  .discovery-pareto-row > span:nth-child(2),
  .discovery-interval-row > span:nth-child(2),
  .discovery-resolution-stages > button > span {
    grid-column: 2;
  }

  .discovery-pareto-track,
  .discovery-interval-axis,
  .discovery-provider-dots > button > i,
  .discovery-resolution-stages > button > i {
    grid-row: 2;
    grid-column: 1 / -1;
  }

  .discovery-pareto-row > b,
  .discovery-interval-row > strong:last-child,
  .discovery-provider-dots > strong,
  .discovery-resolution-stages > button > strong {
    grid-row: 1;
    grid-column: 3;
  }

  .discovery-provider-dots > small:last-child,
  .discovery-resolution-stages > button > small {
    display: none;
  }

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

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

  .discovery-blind-heatmap {
    grid-template-columns: minmax(80px, 1.2fr) repeat(var(--columns), minmax(50px, 1fr));
    font-size: 8px;
  }
}

@media (max-width: 600px) {
  .discovery-finding__mark {
    min-height: 210px;
  }

  .discovery-provider-multiples,
  .discovery-category-grid,
  .discovery-barrier-counts,
  .discovery-delta-strip {
    grid-template-columns: 1fr;
  }

  .discovery-stage-pairs > button,
  .discovery-threshold-bars > button {
    grid-template-columns: minmax(0, 1fr) 72px;
  }

  .discovery-stage-pairs i,
  .discovery-threshold-bars i {
    grid-row: 2;
    grid-column: 1 / -1;
  }

  .discovery-stage-pairs em,
  .discovery-threshold-bars em {
    grid-row: 1;
    grid-column: 2;
  }

  .discovery-insufficient__summary {
    grid-template-columns: 1fr;
  }

  .discovery-composition,
  .discovery-verdict-stack {
    min-height: 118px;
  }

  .discovery-composition > span,
  .discovery-verdict-stack > span {
    min-width: 34px;
    padding: 7px;
  }

  .discovery-blind-heatmap {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2px;
  }

  .discovery-blind-heatmap > span:first-child,
  .discovery-blind-heatmap > strong {
    display: none;
  }

  .discovery-blind-heatmap > b {
    grid-column: 1 / -1;
    min-height: 34px;
    place-items: end start;
    padding: 8px 4px 3px;
    border-bottom: 1px solid var(--border-strong);
    font-size: 11px;
  }

  .discovery-blind-heatmap > button,
  .discovery-blind-heatmap > span:not(:first-child) {
    min-width: 0;
    min-height: 54px;
    align-content: center;
    gap: 3px;
  }

  .discovery-blind-heatmap > button::before,
  .discovery-blind-heatmap > span:not(:first-child)::before {
    content: attr(data-provider);
    overflow: hidden;
    color: var(--muted-ink);
    font-family: var(--sans);
    font-size: 8px;
    text-overflow: ellipsis;
  }

  .discovery-blind-heatmap > button,
  .discovery-blind-heatmap > span {
    font-size: 8px;
  }
}

@media (max-width: 390px) {
  .discovery-finding__mark > span {
    align-items: start;
    flex-direction: column;
  }

  .discovery-pareto-row,
  .discovery-interval-row,
  .discovery-provider-dots > button,
  .discovery-resolution-stages > button {
    grid-template-columns: minmax(0, 1fr) 66px;
  }

  .discovery-rank-index {
    display: none;
  }

  .discovery-pareto-row > span:nth-child(2),
  .discovery-interval-row > span:nth-child(2),
  .discovery-resolution-stages > button > span {
    grid-column: 1;
  }

  .discovery-pareto-row > b,
  .discovery-interval-row > strong:last-child,
  .discovery-provider-dots > strong,
  .discovery-resolution-stages > button > strong {
    grid-column: 2;
  }

  .discovery-category-grid > button {
    min-height: 96px;
  }

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

@media (prefers-reduced-motion: reduce) {
  .discovery-pareto-track > i,
  .discovery-stage-pairs i > b,
  .discovery-provider-multiples i > b,
  .discovery-threshold-bars i > b,
  .discovery-breadth-rank i > b,
  .discovery-risk-rank i > b,
  .discovery-barrier-counts i > b {
    transition: none;
  }
}

/* AIV-035 · competition, intent and journey analytical workspace */

.ci-section {
  margin-top: 30px;
  padding-top: 26px;
  border-top: 1px solid var(--ink);
}

.ci-section__lead {
  max-width: 920px;
  margin: -4px 0 20px;
  color: var(--muted-ink);
  font-size: 12px;
}

.ci-section button,
.ci-intent-controls button {
  min-height: 44px;
}

.ci-h2h-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-bottom: 12px;
  color: var(--muted-ink);
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
}

.ci-h2h-legend > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.ci-h2h-legend > span::before {
  width: 18px;
  height: 8px;
  content: "";
  border: 1px solid color-mix(in srgb, currentColor 45%, transparent);
  background: currentColor;
}

.ci-h2h-matrix {
  border-top: 1px solid var(--border-strong);
}

.ci-h2h-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.15fr) minmax(280px, 3fr) minmax(100px, .62fr);
  gap: 16px;
  align-items: center;
  min-height: 84px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.ci-h2h-row.is-suppressed {
  background: repeating-linear-gradient(135deg, transparent 0 8px, color-mix(in srgb, var(--warning-soft) 52%, transparent) 8px 16px);
}

.ci-h2h-row__label,
.ci-h2h-row__score {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.ci-h2h-row__label > strong {
  overflow: hidden;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ci-h2h-row__label > .badge {
  width: fit-content;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ci-h2h-row__label > small,
.ci-h2h-row__score > small {
  color: var(--muted-ink);
  font-family: var(--mono);
  font-size: 9px;
}

.ci-h2h-stack {
  display: flex;
  min-width: 0;
  min-height: 58px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  background: var(--paper-deep);
}

.ci-h2h-stack > button {
  display: grid;
  min-width: 45px;
  min-height: 56px;
  flex: var(--share) 1 0;
  align-content: center;
  gap: 2px;
  padding: 7px 6px;
  border: 0;
  border-right: 1px solid color-mix(in srgb, var(--surface) 60%, transparent);
  cursor: pointer;
  transition: filter var(--motion-fast), transform var(--motion-fast);
}

.ci-h2h-stack > button:last-child {
  border-right: 0;
}

.ci-h2h-stack > button:hover,
.ci-h2h-stack > button:focus-visible {
  z-index: 1;
  filter: saturate(1.18) contrast(1.08);
  transform: translateY(-2px);
}

.ci-h2h-stack b,
.ci-h2h-stack span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ci-h2h-stack b {
  font-family: var(--mono);
  font-size: 14px;
}

.ci-h2h-stack span {
  font-size: 8px;
  text-transform: uppercase;
}

.ci-h2h-win {
  color: var(--positive);
}

.ci-h2h-stack .ci-h2h-win {
  color: var(--ink);
  background: var(--positive-soft);
}

.ci-h2h-tie {
  color: var(--analytic);
}

.ci-h2h-stack .ci-h2h-tie {
  color: var(--ink);
  background: var(--analytic-soft);
}

.ci-h2h-loss {
  color: var(--negative);
}

.ci-h2h-stack .ci-h2h-loss {
  color: var(--ink);
  background: var(--negative-soft);
}

.ci-h2h-unclear {
  color: var(--unknown);
}

.ci-h2h-stack .ci-h2h-unclear {
  color: var(--ink);
  background: repeating-linear-gradient(135deg, var(--unknown-soft) 0 5px, var(--surface-soft) 5px 10px);
}

.ci-h2h-row__score {
  justify-items: end;
  text-align: right;
}

.ci-h2h-row__score > strong {
  font-family: var(--mono);
  font-size: 20px;
}

.ci-h2h-row__score > .ghost-button {
  min-width: 88px;
}

.ci-network-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px 20px;
  margin-bottom: 20px;
  padding: 14px 0;
  border-block: 1px solid var(--border);
}

.ci-network-controls > label {
  display: grid;
  gap: 6px;
  color: var(--muted-ink);
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
}

.ci-network-controls .filter-select {
  min-width: 190px;
  min-height: 44px;
}

.ci-network-threshold {
  min-width: min(330px, 100%);
  flex: 1 1 260px;
}

.ci-network-threshold input {
  width: 100%;
  min-height: 32px;
  accent-color: var(--analytic);
  cursor: pointer;
}

.ci-network-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 270px);
  gap: 24px;
  align-items: start;
}

.ci-network-hub {
  display: grid;
  grid-template-columns: minmax(118px, 155px) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.ci-network-focal {
  display: grid;
  min-height: 100%;
  align-content: center;
  gap: 7px;
  padding: 16px;
  border: 1px solid var(--ink);
  background: color-mix(in srgb, var(--brand-color, var(--focus)) 18%, var(--surface));
  box-shadow: 5px 5px 0 color-mix(in srgb, var(--brand-color, var(--focus)) 60%, var(--ink));
}

.ci-network-focal > span,
.ci-network-focal > small {
  font-family: var(--mono);
  font-size: 8px;
  text-transform: uppercase;
}

.ci-network-focal > span {
  color: var(--brand-color, var(--focus-strong));
}

.ci-network-focal > strong {
  font-size: 20px;
  line-height: 1;
  overflow-wrap: anywhere;
}

.ci-network-focal > small {
  color: var(--muted-ink);
}

.ci-network-spokes {
  display: grid;
  gap: 5px;
}

.ci-network-row {
  display: grid;
  grid-template-columns: minmax(112px, 155px) minmax(170px, 1fr);
  gap: 6px;
  min-width: 0;
}

.ci-network-node,
.ci-network-edge,
.ci-unexpected-card,
.ci-table-link {
  border: 0;
  cursor: pointer;
}

.ci-network-node {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 1px 8px;
  align-content: center;
  min-width: 0;
  padding: 8px 10px;
  text-align: left;
  background: color-mix(in srgb, var(--brand-color, var(--analytic)) 11%, var(--surface));
}

.ci-network-node::before {
  grid-row: 1 / -1;
  width: 8px;
  height: 8px;
  align-self: center;
  content: "";
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--brand-color, var(--analytic));
}

.ci-network-node > span,
.ci-network-node > small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ci-network-node > span {
  font-weight: 700;
}

.ci-network-node > small {
  color: var(--muted-ink);
  font-family: var(--mono);
  font-size: 8px;
  text-transform: uppercase;
}

.ci-network-edge {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) minmax(110px, .8fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 7px 8px;
  text-align: left;
  background: transparent;
}

.ci-network-edge > i {
  position: relative;
  height: 14px;
  border-bottom: 1px solid var(--border-strong);
  background: repeating-linear-gradient(90deg, transparent 0 24.5%, color-mix(in srgb, var(--border) 50%, transparent) 24.5% 25%);
}

.ci-network-edge > i > b {
  position: absolute;
  bottom: -2px;
  left: 0;
  width: var(--value);
  min-width: 3px;
  height: 5px;
  background: var(--analytic);
  transition: width var(--motion-standard);
}

.ci-network-edge > span {
  display: grid;
  min-width: 0;
}

.ci-network-edge strong {
  font-family: var(--mono);
}

.ci-network-edge small {
  overflow: hidden;
  color: var(--muted-ink);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ci-network-node:hover,
.ci-network-edge:hover,
.ci-unexpected-card:hover,
.ci-table-link:hover {
  background-color: var(--focus-soft);
}

.ci-network-reading {
  padding: 17px 0 17px 18px;
  border-left: 3px solid var(--analytic);
}

.ci-network-reading h3 {
  margin: 6px 0 10px;
  font-size: 17px;
}

.ci-network-reading p {
  color: var(--muted-ink);
  font-size: 11px;
}

.ci-network-reading .ghost-button {
  width: 100%;
  margin-top: 8px;
}

.ci-unexpected {
  display: grid;
  grid-template-columns: minmax(190px, .7fr) minmax(0, 2fr);
  gap: 24px;
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px dashed var(--border-strong);
}

.ci-unexpected h3 {
  margin: 5px 0 8px;
  font-size: 17px;
}

.ci-unexpected p {
  color: var(--muted-ink);
  font-size: 11px;
}

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

.ci-unexpected-card {
  display: grid;
  min-height: 96px;
  align-content: space-between;
  gap: 7px;
  padding: 10px;
  text-align: left;
  background: var(--surface-soft);
}

.ci-unexpected-card > span,
.ci-unexpected-card > span > small {
  display: grid;
}

.ci-unexpected-card > span > small,
.ci-unexpected-card > em {
  color: var(--muted-ink);
  font-size: 8px;
}

.ci-unexpected-card > b {
  font-family: var(--mono);
  font-size: 16px;
}

.ci-unexpected-card > em {
  font-style: normal;
}

.ci-intent-controls {
  display: grid;
  gap: 14px;
  margin: 18px 0 22px;
  padding: 14px 0;
  border-block: 1px solid var(--border-strong);
}

.ci-intent-controls > div {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.ci-segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.ci-segmented .segmented-button.is-active {
  color: var(--surface);
  background: var(--ink);
}

.ci-price-caveat {
  margin: 0 0 20px;
  padding: 12px 14px;
  border-left: 3px solid var(--warning);
  color: var(--muted-ink);
  background: var(--warning-soft);
  font-size: 11px;
}

.ci-price-caveat > strong {
  margin-right: 8px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
}

.ci-heatmap-headers,
.ci-heatmap-row {
  display: grid;
  grid-template-columns: minmax(112px, 145px) minmax(0, 1fr);
  gap: 7px;
}

.ci-heatmap-headers {
  align-items: end;
  margin-bottom: 5px;
}

.ci-heatmap-headers > span {
  padding: 6px;
  color: var(--muted-ink);
  font-family: var(--mono);
  font-size: 8px;
  text-transform: uppercase;
}

.ci-heatmap-headers > div,
.ci-heatmap-cells {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(76px, 1fr));
  gap: 4px;
  min-width: 0;
}

.ci-heatmap-header {
  display: grid;
  min-width: 0;
  align-content: end;
  gap: 2px;
  padding: 6px;
  border: 0;
  border-bottom: 2px solid var(--border);
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.ci-heatmap-header.is-active {
  border-color: var(--focus-strong);
  background: var(--focus-soft);
}

.ci-heatmap-header strong,
.ci-heatmap-header small {
  overflow: hidden;
  text-overflow: ellipsis;
}

.ci-heatmap-header strong {
  font-size: 9px;
  line-height: 1.15;
}

.ci-heatmap-header small {
  color: var(--muted-ink);
  font-size: 7px;
  white-space: nowrap;
}

.ci-heatmap {
  display: grid;
  gap: 4px;
}

.ci-heatmap-row {
  align-items: stretch;
}

.ci-heatmap-brand {
  position: relative;
  display: grid;
  min-width: 0;
  align-content: center;
  gap: 2px;
  padding: 8px 9px 8px 16px;
  background: color-mix(in srgb, var(--brand-color, var(--analytic)) 9%, var(--surface));
}

.ci-heatmap-brand::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  content: "";
  background: var(--brand-color, var(--analytic));
}

.ci-heatmap-brand > strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ci-heatmap-brand > small {
  color: var(--muted-ink);
  font-family: var(--mono);
  font-size: 8px;
}

.ci-heatmap-row.is-selected-brand .ci-heatmap-brand {
  box-shadow: inset 0 0 0 1px var(--ink);
}

.ci-heatmap-cell {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 62px;
  align-content: center;
  gap: 2px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--brand-color, var(--analytic)) 26%, var(--border));
  background: color-mix(in srgb, var(--brand-color, var(--analytic)) var(--intensity), var(--surface));
  cursor: pointer;
}

.ci-heatmap-cell::after {
  position: absolute;
  inset: auto auto 0 0;
  width: var(--intensity);
  height: 4px;
  content: "";
  background: var(--brand-color, var(--analytic));
}

.ci-heatmap-cell > strong {
  font-family: var(--mono);
  font-size: 14px;
}

.ci-heatmap-cell > small {
  color: var(--muted-ink);
  font-size: 8px;
}

.ci-heatmap-cell.is-selected-segment {
  box-shadow: inset 0 0 0 2px var(--ink);
}

.ci-heatmap-cell.is-suppressed,
.ci-heatmap-cell.is-missing {
  color: var(--unknown);
  background: repeating-linear-gradient(135deg, var(--unknown-soft) 0 5px, var(--surface) 5px 10px);
}

.ci-heatmap-cell.is-missing {
  display: grid;
  min-height: 62px;
  place-items: center;
  border: 1px dashed var(--border-strong);
}

.ci-intent-analysis {
  margin-top: 20px;
}

.ci-stage-flow {
  display: flex;
  align-items: stretch;
  gap: 0;
  min-width: 0;
}

.ci-stage-step {
  display: flex;
  min-width: 0;
  flex: 1 1 0;
  align-items: center;
}

.ci-stage-node,
.ci-stage-connector,
.ci-position-mark {
  border: 0;
  cursor: pointer;
}

.ci-stage-node {
  display: grid;
  min-width: 100px;
  min-height: 126px;
  flex: 1 1 0;
  align-content: space-between;
  gap: 5px;
  padding: 12px;
  text-align: left;
  background: var(--analytic-soft);
}

.ci-stage-node > span,
.ci-stage-node > small {
  font-family: var(--mono);
  font-size: 8px;
}

.ci-stage-node > span,
.ci-stage-node > small {
  color: var(--muted-ink);
}

.ci-stage-node > strong {
  min-height: 34px;
  font-size: 10px;
}

.ci-stage-node > b {
  font-family: var(--mono);
  font-size: 19px;
}

.ci-stage-node.is-suppressed {
  background: repeating-linear-gradient(135deg, var(--unknown-soft) 0 6px, var(--surface-soft) 6px 12px);
}

.ci-stage-connector {
  display: grid;
  width: 62px;
  min-width: 62px;
  min-height: 76px;
  place-content: center stretch;
  gap: 5px;
  padding: 6px;
  color: var(--muted-ink);
  text-align: center;
  background: transparent;
}

.ci-stage-connector > span,
.ci-stage-connector > small {
  font-family: var(--mono);
  font-size: 7px;
}

.ci-stage-connector > i {
  position: relative;
  height: 1px;
  background: var(--ink);
}

.ci-stage-connector > i::after {
  position: absolute;
  top: -3px;
  right: -1px;
  width: 6px;
  height: 6px;
  content: "";
  border-top: 1px solid var(--ink);
  border-right: 1px solid var(--ink);
  transform: rotate(45deg);
}

.ci-stage-node:hover,
.ci-stage-connector:hover,
.ci-position-mark:hover {
  filter: saturate(1.15);
  background-color: var(--focus-soft);
}

.ci-position-plot {
  display: grid;
  gap: 7px;
}

.ci-position-row {
  display: grid;
  grid-template-columns: minmax(110px, 150px) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 62px;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
}

.ci-position-row > div:first-child {
  display: grid;
}

.ci-position-row > div:first-child > small {
  color: var(--muted-ink);
  font-family: var(--mono);
  font-size: 8px;
}

.ci-position-row.is-selected-brand > div:first-child {
  padding-left: 8px;
  border-left: 4px solid var(--focus-strong);
}

.ci-position-series {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.ci-position-mark {
  display: grid;
  grid-template-columns: minmax(72px, .8fr) minmax(80px, 1.2fr) 48px;
  gap: 8px;
  align-items: center;
  min-width: 0;
  min-height: 46px;
  padding: 6px;
  text-align: left;
  background: transparent;
}

.ci-position-mark > span {
  overflow: hidden;
  font-size: 8px;
  text-overflow: ellipsis;
}

.ci-position-mark > i {
  height: 12px;
  background: var(--paper-deep);
}

.ci-position-mark > i > b {
  display: block;
  width: var(--value);
  min-width: 2px;
  height: 100%;
  background: var(--analytic);
  transition: width var(--motion-standard);
}

.ci-position-mark.top3_presence_rate > i > b {
  background: var(--positive);
}

.ci-position-mark.recommendation_top3_inclusion_rate > i > b {
  background: var(--focus-strong);
}

.ci-position-mark > strong {
  font-family: var(--mono);
  font-size: 10px;
  text-align: right;
}

.ci-exact-table {
  margin-top: 20px;
  border-block: 1px solid var(--border-strong);
  background: var(--surface);
}

.ci-exact-table > summary {
  min-height: 48px;
  padding: 14px 4px;
  cursor: pointer;
  font-weight: 700;
}

.ci-exact-table .table-scroll {
  max-width: 100%;
  overflow: auto;
  border-top: 1px solid var(--border);
}

.ci-exact-table table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.ci-exact-table th,
.ci-exact-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 10px;
  text-align: left;
}

.ci-exact-table th {
  color: var(--muted-ink);
  background: var(--surface-soft);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.ci-exact-table td:not(:first-child) {
  font-family: var(--mono);
}

.ci-table-link {
  min-height: 32px;
  padding: 0;
  font-weight: 700;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: var(--border-strong);
  text-underline-offset: 3px;
  background: transparent;
}

.ci-export-bar {
  border-color: var(--ink);
  box-shadow: 4px 4px 0 var(--focus);
}

.ci-brand-tecno { --brand-color: #e89400; }
.ci-brand-samsung { --brand-color: #3657c8; }
.ci-brand-xiaomi-redmi-group { --brand-color: #e65d22; }
.ci-brand-realme { --brand-color: #d9ad00; }
.ci-brand-infinix { --brand-color: #277d5f; }
.ci-brand-honor { --brand-color: #7a56b3; }
.ci-brand-huawei { --brand-color: #b94242; }
.ci-brand-poco { --brand-color: #35414c; }
.ci-brand-oppo { --brand-color: #16815a; }
.ci-brand-vivo { --brand-color: #347ec2; }

@media (max-width: 1180px) {
  .ci-unexpected-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ci-stage-flow {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .ci-stage-step {
    min-width: 0;
  }

  .ci-stage-step:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .ci-h2h-row {
    grid-template-columns: minmax(150px, .8fr) minmax(250px, 2fr) 92px;
    gap: 10px;
  }

  .ci-network-layout,
  .ci-unexpected {
    grid-template-columns: 1fr;
  }

  .ci-network-reading {
    padding: 15px;
    border-top: 1px solid var(--border);
    border-left-width: 3px;
    background: var(--surface-soft);
  }

  .ci-network-reading .ghost-button {
    width: auto;
  }

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

  .ci-heatmap-headers,
  .ci-heatmap-row {
    grid-template-columns: minmax(94px, 112px) minmax(0, 1fr);
  }

  .ci-position-series {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .ci-section {
    margin-top: 24px;
    padding-top: 20px;
  }

  .ci-section .section-heading {
    align-items: flex-start;
  }

  .ci-h2h-row {
    grid-template-columns: minmax(0, 1fr) 92px;
    gap: 8px;
  }

  .ci-h2h-stack {
    grid-row: 2;
    grid-column: 1 / -1;
  }

  .ci-h2h-row__score {
    grid-row: 1;
    grid-column: 2;
  }

  .ci-network-hub {
    grid-template-columns: 1fr;
  }

  .ci-network-focal {
    min-height: 112px;
  }

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

  .ci-intent-controls > div {
    grid-template-columns: 1fr;
  }

  .ci-segmented .segmented-button {
    flex: 1 1 135px;
  }

  .ci-heatmap-headers {
    display: none;
  }

  .ci-heatmap-row {
    grid-template-columns: 1fr;
    gap: 4px;
    padding-top: 9px;
    border-top: 1px solid var(--border);
  }

  .ci-heatmap-brand {
    min-height: 42px;
  }

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

  .ci-heatmap-cell {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    gap: 2px 8px;
    min-height: 68px;
    padding: 8px;
    text-align: left;
  }

  .ci-heatmap-cell::before {
    grid-column: 1 / -1;
    overflow: hidden;
    content: attr(data-segment-label);
    font-size: 8px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .ci-heatmap-cell > strong {
    grid-row: 2;
    grid-column: 1;
  }

  .ci-heatmap-cell > small {
    grid-row: 2;
    grid-column: 2;
    align-self: end;
  }

  .ci-position-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .ci-h2h-stack {
    min-height: 72px;
    overflow: visible;
  }

  .ci-h2h-stack > button {
    min-width: 42px;
    min-height: 70px;
    padding-inline: 4px;
  }

  .ci-h2h-stack span {
    font-size: 7px;
    white-space: normal;
  }

  .ci-network-row {
    grid-template-columns: minmax(96px, .8fr) minmax(150px, 1.4fr);
  }

  .ci-network-edge {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .ci-stage-flow {
    grid-template-columns: 1fr;
  }

  .ci-stage-step,
  .ci-stage-step:last-child:nth-child(odd) {
    grid-column: 1;
  }

  .ci-stage-node {
    min-height: 98px;
  }

  .ci-stage-connector {
    width: 54px;
    min-width: 54px;
  }

  .ci-position-mark {
    grid-template-columns: minmax(86px, .8fr) minmax(90px, 1.4fr) 50px;
  }

  .ci-exact-table table {
    min-width: 650px;
  }
}

@media (max-width: 390px) {
  .ci-h2h-row {
    grid-template-columns: minmax(0, 1fr) 82px;
  }

  .ci-h2h-row__label > .badge {
    white-space: normal;
  }

  .ci-h2h-row__score > .ghost-button {
    min-width: 80px;
    padding-inline: 8px;
  }

  .ci-network-row {
    grid-template-columns: 1fr;
    gap: 2px;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--border);
  }

  .ci-network-node {
    min-height: 44px;
  }

  .ci-unexpected-grid,
  .ci-heatmap-cells {
    grid-template-columns: 1fr;
  }

  .ci-segmented .segmented-button {
    flex-basis: 112px;
  }

  .ci-stage-step {
    align-items: stretch;
    flex-direction: column;
  }

  .ci-stage-connector {
    width: 100%;
    min-height: 54px;
  }

  .ci-stage-connector > i {
    width: 1px;
    height: 20px;
    justify-self: center;
  }

  .ci-stage-connector > i::after {
    top: auto;
    right: -3px;
    bottom: -1px;
    transform: rotate(135deg);
  }

  .ci-position-mark {
    grid-template-columns: minmax(82px, 1fr) 48px;
  }

  .ci-position-mark > i {
    grid-row: 2;
    grid-column: 1 / -1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ci-h2h-stack > button,
  .ci-network-edge > i > b,
  .ci-position-mark > i > b {
    transition: none;
  }
}

/* AIV-036 · feature, model, source and claim-verdict analytical surfaces */

.aiv36-feature-thesis,
.aiv36-model-thesis,
.aiv36-source-thesis,
.aiv36-accuracy-thesis {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: end;
  margin: 20px 0;
  padding: 28px 30px;
  border: 1px solid var(--ink);
  background:
    radial-gradient(circle at 92% 18%, rgba(245, 172, 28, 0.2), transparent 28%),
    linear-gradient(135deg, var(--surface) 0%, var(--surface-soft) 68%, var(--focus-soft) 100%);
  box-shadow: var(--shadow-small);
}

.aiv36-model-thesis {
  background:
    radial-gradient(circle at 92% 18%, rgba(36, 70, 200, 0.15), transparent 28%),
    linear-gradient(135deg, var(--surface) 0%, var(--surface-soft) 70%, var(--analytic-soft) 100%);
}

.aiv36-source-thesis {
  background:
    radial-gradient(circle at 92% 18%, rgba(23, 118, 90, 0.16), transparent 28%),
    linear-gradient(135deg, var(--surface) 0%, var(--surface-soft) 70%, var(--positive-soft) 100%);
}

.aiv36-accuracy-thesis {
  background:
    radial-gradient(circle at 92% 18%, rgba(185, 66, 66, 0.14), transparent 28%),
    linear-gradient(135deg, var(--surface) 0%, var(--surface-soft) 70%, var(--negative-soft) 100%);
}

.aiv36-feature-thesis h2,
.aiv36-model-thesis h2,
.aiv36-source-thesis h2,
.aiv36-accuracy-thesis h2 {
  max-width: 900px;
  margin: 6px 0 8px;
  font-family: var(--font-display);
  font-size: clamp(24px, 2.3vw, 40px);
  font-weight: 400;
  line-height: 1.06;
}

.aiv36-feature-thesis p,
.aiv36-model-thesis p,
.aiv36-source-thesis p,
.aiv36-accuracy-thesis p {
  max-width: 850px;
  margin: 0;
  color: var(--muted-ink);
}

.aiv36-feature-thesis > div:last-child,
.aiv36-model-thesis > div:last-child,
.aiv36-source-thesis > div:last-child,
.aiv36-accuracy-thesis > div:last-child {
  display: flex;
  max-width: 260px;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.aiv36-heatmap,
.aiv36-model-heatmap {
  display: grid;
  grid-template-columns: minmax(90px, 1.2fr) repeat(var(--columns), minmax(58px, 1fr));
  gap: 4px;
  align-items: stretch;
  margin-top: 18px;
}

.aiv36-heatmap > strong,
.aiv36-model-heatmap > strong {
  display: flex;
  min-height: 50px;
  align-items: flex-end;
  justify-content: center;
  padding: 4px;
  color: var(--muted-ink);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  text-transform: uppercase;
}

.aiv36-heatmap > b,
.aiv36-model-heatmap > b {
  display: flex;
  min-width: 0;
  align-items: center;
  padding: 0 8px;
  border-left: 3px solid transparent;
  font-size: 12px;
  line-height: 1.1;
}

.aiv36-heatmap > b.is-selected,
.aiv36-model-heatmap > b.is-selected {
  border-left-color: var(--focus-strong);
  background: var(--focus-soft);
}

.aiv36-heatmap__cell,
.aiv36-model-heatmap__cell,
.aiv36-heatmap__missing {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 48px;
  place-content: center;
  border: 1px solid rgba(22, 22, 22, 0.08);
  background: color-mix(in srgb, var(--analytic) var(--intensity), var(--surface));
  color: var(--ink);
  text-align: center;
  transition: transform var(--motion-fast), border-color var(--motion-fast), box-shadow var(--motion-fast);
}

.aiv36-heatmap__cell::after {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--unknown);
  content: "";
}

.aiv36-heatmap__cell.is-positive::after {
  background: var(--positive);
}

.aiv36-heatmap__cell.is-negative::after {
  background: var(--negative);
}

.aiv36-heatmap__cell:hover,
.aiv36-model-heatmap__cell:hover {
  z-index: 2;
  border-color: var(--ink);
  box-shadow: var(--shadow-small);
  transform: translateY(-2px);
}

.aiv36-heatmap__cell > strong,
.aiv36-model-heatmap__cell > strong {
  font-family: var(--font-data);
  font-size: 13px;
}

.aiv36-heatmap__cell > small,
.aiv36-model-heatmap__cell > small {
  color: currentColor;
  font-size: 9px;
  opacity: 0.74;
}

.aiv36-heatmap__cell.is-suppressed,
.aiv36-model-heatmap__cell.is-suppressed,
.aiv36-heatmap__missing {
  background:
    repeating-linear-gradient(135deg, transparent 0 5px, rgba(22, 22, 22, 0.05) 5px 6px),
    var(--unknown-soft);
  color: var(--unknown);
}

.aiv36-bubble-map,
.aiv36-source-scatter {
  position: relative;
  min-height: 430px;
  margin-top: 16px;
  border-bottom: 1px solid var(--border-strong);
  border-left: 1px solid var(--border-strong);
  background:
    linear-gradient(rgba(22, 22, 22, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22, 22, 22, 0.045) 1px, transparent 1px);
  background-size: 25% 25%;
}

.aiv36-bubble-map__x,
.aiv36-source-scatter__x {
  position: absolute;
  right: 4px;
  bottom: 4px;
  color: var(--quiet-ink);
  font-family: var(--font-data);
  font-size: 9px;
  text-transform: uppercase;
}

.aiv36-bubble-map__y,
.aiv36-source-scatter__y {
  position: absolute;
  top: 4px;
  left: 8px;
  color: var(--quiet-ink);
  font-family: var(--font-data);
  font-size: 9px;
  text-transform: uppercase;
}

.aiv36-bubble-map__zero,
.aiv36-source-scatter__parity {
  position: absolute;
  top: 50%;
  right: 0;
  left: 0;
  height: 1px;
  border-top: 1px dashed var(--border-strong);
}

.aiv36-feature-bubble,
.aiv36-source-point {
  position: absolute;
  top: var(--y);
  left: var(--x);
  display: grid;
  width: var(--size);
  height: var(--size);
  min-width: 40px;
  min-height: 40px;
  place-content: center;
  padding: 6px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: color-mix(in srgb, var(--focus) 76%, var(--surface));
  box-shadow: 0 5px 14px rgba(31, 26, 15, 0.12);
  transform: translate(-50%, -50%);
  transition: transform var(--motion-fast), box-shadow var(--motion-fast);
}

.aiv36-feature-bubble.is-positive,
.aiv36-source-point.is-positive {
  background: color-mix(in srgb, var(--positive) 65%, var(--surface));
  color: var(--surface);
}

.aiv36-feature-bubble.is-negative,
.aiv36-source-point.is-negative {
  background: color-mix(in srgb, var(--negative) 62%, var(--surface));
  color: var(--surface);
}

.aiv36-feature-bubble:hover,
.aiv36-source-point:hover {
  z-index: 4;
  box-shadow: 0 10px 28px rgba(31, 26, 15, 0.28);
  transform: translate(-50%, -50%) scale(1.08);
}

.aiv36-feature-bubble > span,
.aiv36-source-point > span {
  max-width: calc(var(--size) - 10px);
  overflow: hidden;
  font-size: 8px;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.aiv36-feature-bubble > strong,
.aiv36-source-point > strong {
  font-family: var(--font-data);
  font-size: 11px;
}

.aiv36-radar {
  display: block;
  width: min(100%, 380px);
  margin: 8px auto 0;
  overflow: visible;
}

.aiv36-radar__grid polygon,
.aiv36-radar__grid line {
  fill: none;
  stroke: var(--border);
  stroke-width: 1;
}

.aiv36-radar__selected {
  fill: rgba(245, 172, 28, 0.25);
  stroke: var(--focus-strong);
  stroke-width: 3;
}

.aiv36-radar__compare {
  fill: rgba(36, 70, 200, 0.11);
  stroke: var(--analytic);
  stroke-dasharray: 6 4;
  stroke-width: 2;
}

.aiv36-radar__selected-point {
  fill: var(--focus-strong);
}

.aiv36-radar__compare-point {
  fill: var(--analytic);
}

.aiv36-radar-legend,
.aiv36-selected-verdicts,
.aiv36-source-mix-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.aiv36-radar-legend > span,
.aiv36-selected-verdicts > span,
.aiv36-source-mix-legend > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted-ink);
  font-size: 11px;
}

.aiv36-radar-legend > span::before,
.aiv36-selected-verdicts i,
.aiv36-source-mix-legend i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--focus-strong);
  content: "";
}

.aiv36-radar-legend > .is-compared::before {
  background: var(--analytic);
}

.aiv36-radar-axis-list,
.aiv36-territory-list,
.aiv36-provider-profile,
.aiv36-disagreement-list,
.aiv36-source-mix,
.aiv36-accuracy-brands,
.aiv36-claim-types {
  display: grid;
  gap: 6px;
}

.aiv36-radar-axis,
.aiv36-territory-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  width: 100%;
  padding: 10px 0;
  border: 0;
  border-top: 1px solid var(--border);
  background: transparent;
  text-align: left;
}

.aiv36-radar-axis > span:first-child,
.aiv36-territory-row > span:first-child {
  display: grid;
  min-width: 0;
}

.aiv36-radar-axis small,
.aiv36-territory-row small,
.aiv36-territory-row em {
  color: var(--muted-ink);
  font-size: 10px;
  font-style: normal;
}

.aiv36-radar-axis > span:last-child {
  display: grid;
  grid-template-columns: repeat(2, minmax(44px, auto));
  gap: 5px;
  align-items: center;
  font-family: var(--font-data);
  text-align: right;
}

.aiv36-radar-axis em {
  color: var(--analytic);
  font-style: normal;
}

.aiv36-territory-row {
  grid-template-columns: minmax(0, 1fr) 64px minmax(90px, auto);
}

.aiv36-territory-row > b {
  font-family: var(--font-data);
  text-align: right;
}

.aiv36-territory-row.is-suppressed {
  color: var(--unknown);
  background: repeating-linear-gradient(135deg, transparent 0 7px, rgba(22, 22, 22, 0.035) 7px 8px);
}

.aiv36-semantic-territory {
  display: flex;
  min-height: 220px;
  gap: 5px;
  align-items: stretch;
  margin-top: 18px;
}

.aiv36-semantic-territory > button {
  display: grid;
  min-width: 82px;
  flex: var(--weight) 1 0;
  align-content: end;
  gap: 5px;
  padding: 16px;
  border: 1px solid var(--ink);
  background: linear-gradient(155deg, var(--surface) 0%, var(--focus-soft) 100%);
  text-align: left;
  transition: flex-grow var(--motion-standard), background var(--motion-fast);
}

.aiv36-semantic-territory > button:nth-child(3n + 2) {
  background: linear-gradient(155deg, var(--surface) 0%, var(--analytic-soft) 100%);
}

.aiv36-semantic-territory > button:nth-child(3n) {
  background: linear-gradient(155deg, var(--surface) 0%, var(--positive-soft) 100%);
}

.aiv36-semantic-territory > button:hover {
  flex-grow: calc(var(--weight) + 0.25);
}

.aiv36-semantic-territory strong {
  overflow-wrap: anywhere;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.05;
}

.aiv36-semantic-territory span {
  font-family: var(--font-data);
  font-size: 22px;
}

.aiv36-semantic-territory small {
  color: var(--muted-ink);
  font-size: 10px;
}

.aiv36-provider-profile__row {
  display: grid;
  grid-template-columns: minmax(92px, 1fr) minmax(120px, 2fr) 58px;
  gap: 10px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
}

.aiv36-provider-profile__row > span {
  display: grid;
}

.aiv36-provider-profile__row small {
  color: var(--muted-ink);
  font-size: 9px;
}

.aiv36-provider-profile__row > i,
.aiv36-disagreement-row > i,
.aiv36-claim-type > i,
.aiv36-source-network__edge > i {
  position: relative;
  display: block;
  height: 10px;
  background: var(--paper-deep);
}

.aiv36-provider-profile__row > i > b {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--value);
  background: var(--focus-strong);
}

.aiv36-provider-profile__row > i > em {
  position: absolute;
  top: -3px;
  bottom: -3px;
  left: var(--median);
  width: 1px;
  background: var(--ink);
}

.aiv36-provider-profile__row > strong {
  font-family: var(--font-data);
  text-align: right;
}

.aiv36-disagreement-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.15fr) minmax(140px, 1.7fr) 64px;
  gap: 16px;
  align-items: center;
  width: 100%;
  padding: 11px 10px;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  text-align: left;
}

.aiv36-disagreement-row:hover,
.aiv36-disagreement-row.is-selected {
  background: var(--focus-soft);
}

.aiv36-disagreement-row > span {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 0 8px;
  align-items: baseline;
}

.aiv36-disagreement-row > span > b {
  grid-row: 1 / 3;
  color: var(--quiet-ink);
  font-family: var(--font-data);
}

.aiv36-disagreement-row > span > small {
  grid-column: 2;
  color: var(--muted-ink);
  font-size: 10px;
}

.aiv36-disagreement-row > i > em {
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: var(--left);
  width: var(--width);
  background: var(--analytic-soft);
}

.aiv36-disagreement-row > i > b {
  position: absolute;
  top: -4px;
  left: var(--value);
  width: 2px;
  height: 18px;
  background: var(--analytic);
}

.aiv36-disagreement-row > strong {
  font-family: var(--font-data);
  text-align: right;
}

.aiv36-prompt-examples {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.aiv36-prompt-example {
  display: grid;
  grid-template-columns: minmax(230px, 0.78fr) minmax(0, 1.6fr);
  gap: 10px;
  padding: 10px;
  border-left: 3px solid var(--analytic);
  background: var(--surface-soft);
}

.aiv36-prompt-example__prompt {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 4px;
  border: 0;
  background: transparent;
  text-align: left;
}

.aiv36-prompt-example__prompt > span {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
}

.aiv36-prompt-example__prompt small,
.aiv36-stance small {
  color: var(--muted-ink);
  font-size: 9px;
}

.aiv36-prompt-example__prompt p {
  margin: 0;
  color: var(--muted-ink);
  font-size: 12px;
}

.aiv36-prompt-example__providers {
  display: grid;
  grid-template-columns: repeat(6, minmax(78px, 1fr));
  gap: 5px;
}

.aiv36-stance {
  display: grid;
  min-width: 0;
  align-content: space-between;
  gap: 4px;
  padding: 9px 7px;
  border: 1px solid var(--border);
  background: var(--surface);
  text-align: left;
}

.aiv36-stance > strong {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
}

.aiv36-stance > span {
  font-family: var(--font-data);
  font-size: 9px;
}

.aiv36-stance.is-positive,
.aiv36-stance.is-advantaged,
.aiv36-stance.is-balanced {
  border-top-color: var(--positive);
  background: var(--positive-soft);
}

.aiv36-stance.is-disadvantaged,
.aiv36-stance.is-negative {
  border-top-color: var(--negative);
  background: var(--negative-soft);
}

.aiv36-stance.is-neutral,
.aiv36-stance.is-unclassified {
  border-top-color: var(--unknown);
  background: var(--unknown-soft);
}

.aiv36-source-network {
  display: grid;
  gap: 5px;
  margin-top: 16px;
}

.aiv36-source-network__brand {
  display: grid;
  place-content: center;
  min-height: 68px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--surface);
  text-align: center;
}

.aiv36-source-network__brand small,
.aiv36-source-network__domain small,
.aiv36-source-network__edge small {
  font-size: 9px;
  opacity: 0.72;
}

.aiv36-source-network__row {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) minmax(140px, 1.6fr);
  gap: 5px;
}

.aiv36-source-network__domain,
.aiv36-source-network__edge {
  display: grid;
  min-width: 0;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  text-align: left;
}

.aiv36-source-network__domain {
  overflow-wrap: anywhere;
}

.aiv36-source-network__edge {
  grid-template-columns: minmax(60px, 1fr) auto;
  gap: 10px;
}

.aiv36-source-network__edge > i > b {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--value);
  background: var(--positive);
}

.aiv36-source-network__edge.is-negative > i > b {
  background: var(--negative);
}

.aiv36-source-network__edge > span {
  display: grid;
  text-align: right;
}

.aiv36-source-treemap {
  display: flex;
  min-height: 270px;
  flex-wrap: wrap;
  gap: 6px;
  align-content: stretch;
  margin-top: 16px;
}

.aiv36-source-tile {
  display: grid;
  min-width: 128px;
  min-height: 116px;
  flex: var(--weight) 1 128px;
  grid-template-columns: 1fr auto;
  align-content: end;
  gap: 4px 10px;
  padding: 14px;
  border: 1px solid var(--ink);
  background: linear-gradient(145deg, var(--surface), var(--analytic-soft));
  text-align: left;
  transition: transform var(--motion-fast);
}

.aiv36-source-tile:nth-child(3n + 2) {
  background: linear-gradient(145deg, var(--surface), var(--positive-soft));
}

.aiv36-source-tile:nth-child(3n) {
  background: linear-gradient(145deg, var(--surface), var(--focus-soft));
}

.aiv36-source-tile:hover {
  transform: translateY(-2px);
}

.aiv36-source-tile > span,
.aiv36-source-tile > small {
  color: var(--muted-ink);
  font-size: 10px;
}

.aiv36-source-tile > strong {
  overflow-wrap: anywhere;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.05;
}

.aiv36-source-tile > b {
  font-family: var(--font-data);
  font-size: 22px;
}

.aiv36-source-tile > small {
  grid-column: 1 / -1;
}

.aiv36-source-mix-row {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(0, 2fr);
  gap: 14px;
  align-items: center;
  width: 100%;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  text-align: left;
}

.aiv36-source-mix-row > span {
  display: grid;
}

.aiv36-source-mix-row small {
  color: var(--muted-ink);
  font-size: 10px;
}

.aiv36-source-mix-row > i,
.aiv36-verdict-stack,
.aiv36-accuracy-brand > i {
  display: flex;
  min-height: 28px;
  overflow: hidden;
  background: var(--paper-deep);
  font-style: normal;
}

.aiv36-source-mix-row > i > b,
.aiv36-accuracy-brand > i > b {
  display: flex;
  width: var(--share);
  min-width: 1px;
  align-items: center;
  justify-content: center;
  background: var(--focus-strong);
}

.aiv36-source-mix-row > i > b > span {
  overflow: hidden;
  color: var(--surface);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.aiv36-source-mix-row .series-2,
.aiv36-source-mix-legend .series-2 {
  background: var(--analytic);
}

.aiv36-source-mix-row .series-3,
.aiv36-source-mix-legend .series-3 {
  background: var(--positive);
}

.aiv36-source-mix-row .series-4,
.aiv36-source-mix-legend .series-4 {
  background: var(--negative);
}

.aiv36-source-mix-row .series-5,
.aiv36-source-mix-legend .series-5 {
  background: var(--unknown);
}

.aiv36-source-providers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.aiv36-source-provider {
  padding: 14px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
}

.aiv36-source-provider.is-no-data {
  background:
    repeating-linear-gradient(135deg, transparent 0 7px, rgba(22, 22, 22, 0.04) 7px 8px),
    var(--unknown-soft);
}

.aiv36-source-provider > span {
  display: flex;
  gap: 6px;
  justify-content: space-between;
  margin-bottom: 10px;
}

.aiv36-source-provider > span small {
  color: var(--muted-ink);
  font-size: 9px;
  text-align: right;
}

.aiv36-source-provider dl {
  display: grid;
  gap: 5px;
  margin: 0;
}

.aiv36-source-provider dl > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(80px, auto);
  gap: 8px;
  padding-top: 5px;
  border-top: 1px solid var(--border);
  font-size: 10px;
}

.aiv36-source-provider dt {
  color: var(--muted-ink);
}

.aiv36-source-provider dd {
  margin: 0;
  text-align: right;
}

.aiv36-ads {
  border-color: var(--warning);
  background:
    repeating-linear-gradient(135deg, transparent 0 10px, rgba(168, 100, 0, 0.035) 10px 11px),
    var(--surface);
}

.aiv36-ad-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(130px, 0.4fr)) minmax(220px, 1.4fr);
  gap: 10px;
  margin-top: 16px;
}

.aiv36-ad-summary > div {
  display: grid;
  align-content: center;
  padding: 14px;
  border-top: 1px solid var(--warning);
  background: var(--warning-soft);
}

.aiv36-ad-summary > div > strong {
  font-family: var(--font-data);
  font-size: 24px;
}

.aiv36-ad-summary > div > small {
  color: var(--muted-ink);
  font-size: 10px;
}

.aiv36-ad-domains {
  display: flex !important;
  flex-wrap: wrap;
  gap: 6px;
}

.aiv36-ad-domains > span {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 5px 8px;
  border: 1px solid rgba(168, 100, 0, 0.26);
  background: var(--surface);
  font-size: 10px;
}

.aiv36-verdict-stack {
  min-height: 82px;
  margin-top: 18px;
}

.aiv36-verdict-segment {
  display: grid;
  width: var(--share);
  min-width: 2px;
  place-content: center;
  padding: 4px;
  border: 0;
  background: var(--unknown);
  color: var(--surface);
  text-align: center;
}

.aiv36-verdict-segment > strong {
  font-family: var(--font-data);
}

.aiv36-verdict-segment > span {
  overflow: hidden;
  font-size: 9px;
  text-overflow: ellipsis;
}

.is-correct,
.aiv36-selected-verdicts .is-correct > i {
  --verdict-color: var(--positive);
}

.is-outdated,
.aiv36-selected-verdicts .is-outdated > i {
  --verdict-color: var(--warning);
}

.is-unsupported,
.aiv36-selected-verdicts .is-unsupported > i {
  --verdict-color: var(--focus-strong);
}

.is-contradictory,
.aiv36-selected-verdicts .is-contradictory > i {
  --verdict-color: var(--negative);
}

.is-unverifiable,
.aiv36-selected-verdicts .is-unverifiable > i {
  --verdict-color: var(--unknown);
}

.aiv36-verdict-segment.is-correct,
.aiv36-verdict-segment.is-outdated,
.aiv36-verdict-segment.is-unsupported,
.aiv36-verdict-segment.is-contradictory,
.aiv36-verdict-segment.is-unverifiable,
.aiv36-accuracy-brand > i > b,
.aiv36-source-mix-legend i,
.aiv36-selected-verdicts i {
  background: var(--verdict-color, var(--unknown));
}

.aiv36-verdict-definitions {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
}

.aiv36-verdict-definition {
  display: grid;
  gap: 5px;
  padding: 9px;
  border: 1px solid var(--border);
  border-top: 3px solid var(--verdict-color, var(--unknown));
  background: var(--surface);
  text-align: left;
}

.aiv36-verdict-definition > span {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  gap: 5px;
  align-items: center;
}

.aiv36-verdict-definition i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--verdict-color, var(--unknown));
}

.aiv36-verdict-definition b {
  font-family: var(--font-data);
}

.aiv36-verdict-definition small {
  color: var(--muted-ink);
  font-size: 9px;
  line-height: 1.25;
}

.aiv36-accuracy-brand,
.aiv36-claim-type {
  display: grid;
  grid-template-columns: minmax(180px, 1.15fr) minmax(110px, 1.2fr) minmax(64px, auto);
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 9px 8px;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  text-align: left;
}

.aiv36-accuracy-brand:hover,
.aiv36-accuracy-brand.is-selected,
.aiv36-claim-type:hover {
  background: var(--focus-soft);
}

.aiv36-accuracy-brand.is-no-data {
  color: var(--unknown);
  background: var(--unknown-soft);
}

.aiv36-accuracy-brand > span,
.aiv36-claim-type > span {
  display: grid;
}

.aiv36-accuracy-brand small,
.aiv36-claim-type small {
  color: var(--muted-ink);
  font-size: 9px;
}

.aiv36-accuracy-brand > strong,
.aiv36-claim-type > strong {
  font-family: var(--font-data);
  font-size: 11px;
  text-align: right;
}

.aiv36-accuracy-brand > i {
  min-height: 12px;
}

.aiv36-claim-type {
  grid-template-columns: minmax(150px, 1.2fr) minmax(90px, 1fr) 56px;
}

.aiv36-claim-type > i > b {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--value);
  background: var(--analytic);
}

.aiv36-claim-type.is-below > i > b {
  background: var(--warning);
}

.aiv36-claim-type > i > em {
  position: absolute;
  top: -3px;
  bottom: -3px;
  left: var(--floor);
  width: 2px;
  background: var(--ink);
}

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

.aiv36-critical-claim {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-width: 0;
  max-width: 100%;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border-left: 5px solid var(--negative);
  background: var(--negative-soft);
}

.aiv36-critical-claim > span {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.aiv36-critical-claim strong {
  overflow-wrap: anywhere;
}

.aiv36-critical-claim small {
  color: var(--muted-ink);
}

.aiv36-verdict-badge {
  border-color: var(--verdict-color, var(--unknown));
  color: var(--ink);
  background: color-mix(in srgb, var(--verdict-color, var(--unknown)) 15%, var(--surface));
}

.aiv36-claim-ledger,
.aiv36-exact-table {
  margin-top: 16px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  background: var(--surface);
}

.aiv36-claim-ledger > summary,
.aiv36-exact-table > summary {
  display: flex;
  cursor: pointer;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  list-style: none;
}

.aiv36-claim-ledger > summary::-webkit-details-marker,
.aiv36-exact-table > summary::-webkit-details-marker {
  display: none;
}

.aiv36-claim-ledger > summary::after,
.aiv36-exact-table > summary::after {
  color: var(--muted-ink);
  content: "+";
  font-family: var(--font-data);
  font-size: 22px;
}

.aiv36-claim-ledger[open] > summary::after,
.aiv36-exact-table[open] > summary::after {
  content: "−";
}

.aiv36-exact-table > summary > span:first-child {
  display: grid;
}

.aiv36-exact-table > summary small {
  color: var(--muted-ink);
}

.aiv36-claim-ledger .table-scroll,
.aiv36-exact-table .table-scroll {
  max-width: 100%;
  overflow-x: auto;
  border-top: 1px solid var(--border);
}

.aiv36-claim-ledger table,
.aiv36-exact-table table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 11px;
}

.aiv36-claim-ledger th,
.aiv36-claim-ledger td,
.aiv36-exact-table th,
.aiv36-exact-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.aiv36-claim-ledger th,
.aiv36-exact-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--paper-deep);
  color: var(--muted-ink);
  font-size: 9px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.aiv36-claim-ledger td:first-child {
  display: grid;
  gap: 4px;
}

.aiv36-claim-ledger code {
  max-width: 170px;
  overflow: hidden;
  color: var(--muted-ink);
  font-size: 9px;
  text-overflow: ellipsis;
}

.aiv36-export-bar {
  margin-top: 16px;
}

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

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

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

@media (max-width: 860px) {
  .aiv36-feature-thesis,
  .aiv36-model-thesis,
  .aiv36-source-thesis,
  .aiv36-accuracy-thesis {
    grid-template-columns: 1fr;
    padding: 22px;
  }

  .aiv36-feature-thesis > div:last-child,
  .aiv36-model-thesis > div:last-child,
  .aiv36-source-thesis > div:last-child,
  .aiv36-accuracy-thesis > div:last-child {
    max-width: none;
    justify-content: flex-start;
  }

  .aiv36-prompt-example__providers {
    grid-template-columns: repeat(3, minmax(78px, 1fr));
  }

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

  .aiv36-source-mix-row {
    grid-template-columns: 1fr;
  }

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

  .aiv36-ad-domains {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  .aiv36-heatmap {
    grid-template-columns: minmax(52px, 0.75fr) repeat(var(--columns), minmax(25px, 1fr));
    gap: 2px;
  }

  .aiv36-heatmap > strong {
    min-height: 86px;
    justify-content: flex-start;
    padding: 3px 1px;
    font-size: 8px;
    text-align: left;
    transform: rotate(180deg);
    writing-mode: vertical-rl;
  }

  .aiv36-heatmap > b {
    padding: 0 3px;
    font-size: 9px;
    overflow-wrap: anywhere;
  }

  .aiv36-heatmap__cell {
    min-height: 42px;
  }

  .aiv36-heatmap__cell > strong {
    font-size: 10px;
  }

  .aiv36-heatmap__cell > small {
    display: none;
  }

  .aiv36-bubble-map,
  .aiv36-source-scatter {
    min-height: 360px;
  }

  .aiv36-feature-bubble > span,
  .aiv36-source-point > span {
    display: none;
  }

  .aiv36-source-providers,
  .aiv36-verdict-definitions {
    grid-template-columns: 1fr;
  }

  .aiv36-source-network__row {
    grid-template-columns: 1fr;
  }

  .aiv36-semantic-territory {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .aiv36-semantic-territory > button {
    min-width: 0;
    min-height: 116px;
  }

  .aiv36-disagreement-row,
  .aiv36-accuracy-brand,
  .aiv36-claim-type {
    grid-template-columns: minmax(0, 1fr) 58px;
    gap: 8px;
  }

  .aiv36-disagreement-row > i,
  .aiv36-accuracy-brand > i,
  .aiv36-claim-type > i {
    grid-row: 2;
    grid-column: 1 / -1;
  }

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

  .aiv36-critical-claim {
    grid-template-columns: 1fr;
  }

  .aiv36-territory-row {
    grid-template-columns: minmax(0, 1fr) 58px;
  }

  .aiv36-territory-row > em {
    grid-column: 1 / -1;
  }
}

@media (max-width: 430px) {
  .aiv36-feature-thesis,
  .aiv36-model-thesis,
  .aiv36-source-thesis,
  .aiv36-accuracy-thesis {
    gap: 16px;
    margin-inline: -4px;
    padding: 18px;
  }

  .aiv36-model-heatmap {
    grid-template-columns: minmax(62px, 0.8fr) repeat(var(--columns), minmax(54px, 1fr));
  }

  .aiv36-model-heatmap > strong {
    font-size: 8px;
  }

  .aiv36-provider-profile__row {
    grid-template-columns: minmax(82px, 1fr) 48px;
  }

  .aiv36-provider-profile__row > i {
    grid-row: 2;
    grid-column: 1 / -1;
  }

  .aiv36-source-tile {
    min-width: 112px;
    flex-basis: 112px;
  }

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

  .aiv36-ad-domains {
    grid-column: auto;
  }

  .aiv36-claim-ledger > summary,
  .aiv36-exact-table > summary {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .aiv36-heatmap__cell,
  .aiv36-model-heatmap__cell,
  .aiv36-feature-bubble,
  .aiv36-source-point,
  .aiv36-semantic-territory > button,
  .aiv36-source-tile {
    transition: none;
  }
}

/* AIV-038 · methodology, governed export, accessibility and delivery quality */
button,
select,
input,
.primary-button,
.ghost-button,
.text-button {
  min-height: 44px;
}

select {
  height: 44px;
}

input[type="checkbox"],
input[type="radio"] {
  width: 20px;
  min-height: 20px;
}

.executive-scatter .vs-scatter__point {
  min-width: 48px;
  min-height: 48px;
}

.executive-scatter .vs-scatter__point[data-collision-displaced="true"] {
  border-style: double;
}

.route-loading {
  display: grid;
  min-height: 420px;
  align-content: center;
  gap: 12px;
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.route-loading h2,
.route-loading p {
  margin: 0;
}

.route-loading p {
  color: var(--muted-ink);
}

.accessible-data-alternatives {
  display: grid;
  min-width: 0;
  gap: 10px;
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid var(--ink);
}

.accessible-data-alternatives .discovery-exact-table {
  background: var(--surface);
}

.export-sheet {
  width: min(820px, calc(100% - 32px));
  max-height: min(820px, calc(100vh - 32px));
  padding: 0;
  overflow: auto;
  border: 1px solid var(--ink);
  color: var(--ink);
  background: var(--surface);
  box-shadow: var(--shadow-large);
}

.export-sheet::backdrop {
  background: rgba(22, 22, 22, 0.56);
}

.export-sheet__intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.export-sheet__intro p {
  max-width: 580px;
  margin: 0;
  color: var(--muted-ink);
}

.export-option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 0 24px 20px;
  border: 1px solid var(--ink);
  background: var(--ink);
}

.export-option {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 2px 14px;
  min-height: 120px;
  padding: 18px;
  border: 0;
  background: var(--surface);
  text-align: left;
  cursor: pointer;
}

.export-option:hover {
  background: var(--focus-soft);
}

.export-option:disabled {
  color: var(--muted-ink);
  background: var(--paper-deep);
  cursor: not-allowed;
}

.export-option > span {
  grid-row: 1 / span 2;
  color: var(--analytic);
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 800;
}

.export-option > strong {
  font-size: 15px;
}

.export-option > small {
  color: var(--muted-ink);
  font-size: 11px;
  line-height: 1.45;
}

.export-sheet > .method-note {
  margin: 0 24px 24px;
}

.methodology-passport,
.methodology-drill,
.glossary-section,
.methodology-states,
.release-budget-table {
  margin-top: 24px;
}

.methodology-passport {
  padding: 24px;
  border: 1px solid var(--ink);
  background: var(--surface);
}

.methodology-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 18px 0;
  border: 1px solid var(--border);
  background: var(--border);
}

.methodology-facts article {
  display: grid;
  align-content: start;
  gap: 5px;
  min-height: 118px;
  padding: 16px;
  background: var(--surface-soft);
}

.methodology-facts span,
.methodology-facts small {
  color: var(--muted-ink);
}

.methodology-facts span {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.methodology-facts strong {
  font-size: 20px;
}

.methodology-invariants {
  margin-top: 20px;
}

.glossary-controls {
  display: grid;
  grid-template-columns: minmax(280px, 1.7fr) repeat(2, minmax(190px, 0.65fr));
  gap: 12px;
  margin-bottom: 16px;
}

.glossary-controls label {
  display: grid;
  gap: 6px;
  color: var(--muted-ink);
  font-size: 11px;
  font-weight: 700;
}

.glossary-controls input,
.glossary-controls select {
  width: 100%;
  border: 1px solid var(--border-strong);
  color: var(--ink);
  background: var(--surface);
}

.glossary-table-wrap {
  max-height: 680px;
  overflow: auto;
  border: 1px solid var(--border);
}

.methodology-states .table-scroll,
.release-budget-table .table-scroll {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

.glossary-table-wrap table,
.methodology-states table,
.release-budget-table table {
  width: 100%;
  border-collapse: collapse;
}

.glossary-table-wrap th,
.glossary-table-wrap td,
.methodology-states th,
.methodology-states td,
.release-budget-table th,
.release-budget-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.glossary-table-wrap thead th {
  position: sticky;
  z-index: 2;
  top: 0;
  color: var(--muted-ink);
  background: var(--paper-deep);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.glossary-table-wrap tbody th {
  min-width: 210px;
}

.glossary-table-wrap tbody th,
.glossary-table-wrap td {
  font-size: 11px;
}

.glossary-table-wrap tbody th strong,
.glossary-table-wrap tbody th small,
.glossary-table-wrap td small {
  display: block;
  margin-top: 5px;
}

.glossary-table-wrap tbody th small,
.glossary-table-wrap td small {
  color: var(--muted-ink);
  line-height: 1.45;
}

.glossary-table-wrap td:nth-child(2) {
  min-width: 300px;
}

.glossary-table-wrap td:last-child {
  min-width: 260px;
}

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

.methodology-contract-grid .chart-card {
  min-height: 240px;
}

.methodology-contract-grid h2 {
  margin: 8px 0 12px;
}

.methodology-contract-grid p {
  color: var(--muted-ink);
}

@media (max-width: 900px) {
  .methodology-facts,
  .glossary-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .glossary-controls label:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  #aiv-dashboard button,
  #aiv-dashboard select,
  #aiv-dashboard input:not([type="hidden"]),
  #aiv-dashboard textarea,
  #aiv-dashboard [role="button"] {
    min-height: 44px;
  }

  #aiv-dashboard button,
  #aiv-dashboard [role="button"] {
    min-width: 44px;
  }

  .skip-link {
    min-block-size: 44px;
    box-sizing: border-box;
  }

  .export-sheet {
    width: calc(100% - 16px);
    max-height: calc(100vh - 16px);
  }

  .export-sheet__intro {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px;
  }

  .export-option-grid {
    grid-template-columns: 1fr;
    margin-inline: 16px;
  }

  .export-sheet > .method-note {
    margin-inline: 16px;
  }

  .methodology-passport {
    padding: 16px;
  }

  .methodology-facts,
  .glossary-controls,
  .methodology-contract-grid {
    grid-template-columns: 1fr;
  }

  .glossary-controls label:first-child {
    grid-column: auto;
  }

  .glossary-table-wrap {
    max-height: none;
  }

  .health-matrix,
  .aiv36-heatmap,
  .executive-scatter {
    display: none;
  }

  .accessible-data-alternatives {
    display: grid;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  @page {
    size: A4 landscape;
    margin: 12mm;
  }

  html,
  body {
    background: #fff;
  }

  .app-shell {
    display: block;
  }

  .topbar,
  .section-rail,
  .filter-bar,
  .skip-link,
  .compare-tray,
  .selection-summary-host,
  .drawer-scrim,
  .detail-drawer,
  dialog,
  .toast,
  .state-actions,
  .discovery-export-bar,
  .ghost-button,
  .primary-button,
  .text-button,
  .icon-button {
    display: none !important;
  }

  .workspace,
  .screen {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
  }

  .scope-banner {
    position: static;
    margin-bottom: 12px;
  }

  .chart-card,
  .methodology-passport,
  .trust-strip,
  .thesis-panel,
  .accessible-data-alternatives,
  table,
  tr {
    break-inside: avoid;
  }

  details:not([open]) > :not(summary) {
    display: block !important;
  }

  .table-scroll,
  .glossary-table-wrap,
  .discovery-table-wrap {
    max-height: none;
    overflow: visible;
  }

  .glossary-table-wrap table {
    table-layout: fixed;
  }

  .glossary-table-wrap tbody th,
  .glossary-table-wrap td:nth-child(2),
  .glossary-table-wrap td:last-child {
    min-width: 0;
  }

  .glossary-table-wrap th,
  .glossary-table-wrap td,
  .glossary-table-wrap code {
    overflow-wrap: anywhere;
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 9px;
  }
}
