.performance-body {
  --performance-view-nav-height: 68px;
  --performance-z-filter: 19;
  --performance-z-sticky: 20;
  --paper: var(--shell-paper);
  --paper-bright: var(--shell-surface);
  --ink: var(--shell-ink);
  --muted: var(--shell-muted);
  --line: var(--shell-line);
  --signal: var(--shell-accent);
  --signal-dark: #0b5c54;
  --verified: var(--shell-accent);
  --verified-soft: var(--shell-accent-soft);
  --display: var(--shell-sans);
  --body: var(--shell-sans);
  background: var(--shell-paper);
}
.performance-body .masthead { display: none; }
.performance-body .analysis-context,
.performance-body main,
.performance-body footer,
.performance-body .quality-banner { width: min(1480px, calc(100% - 48px)); }
.performance-body .analysis-context { margin-top: 0; border: 0; border-bottom: 1px solid var(--shell-line); background: transparent; box-shadow: none; }
.performance-body .analysis-time-form input,
.performance-body .analysis-time-form select,
.performance-body .analysis-time-form button,
.performance-body .date-presets button { border-radius: 0; box-shadow: none; }
.performance-body .dashboard-card,
.performance-body .dimension-card,
.performance-body .filter-rail,
.performance-body .video-groups { border-radius: 0; box-shadow: none; }
.performance-body h2,
.performance-body h3 { font-family: var(--shell-sans); }
.performance-body .dashboard-overview { padding-top: 36px; }

/* Align every analytical surface with the strategy console design language. */
.performance-body {
  --warning: var(--shell-warning);
  --shadow: none;
  background: var(--shell-paper);
}

.performance-body .analysis-context {
  position: static;
  z-index: auto;
  padding: 22px 0 24px;
  border-bottom: 1px solid var(--shell-line);
  border-radius: 0;
  backdrop-filter: none;
}

.performance-body .status-stamp,
.performance-body .user-chip {
  border-radius: 0;
}

.performance-body .quality-banner {
  border: 0;
  border-left: 4px solid var(--shell-warning);
  border-radius: 0;
  background: #f7e8e1;
  box-shadow: none;
}

.performance-body .analysis-context__heading {
  margin-bottom: 16px;
}

.performance-body .analysis-context__heading h2 {
  margin-top: 3px;
  font: 720 20px/1.1 var(--shell-sans);
  letter-spacing: -.025em;
}

.performance-body .analysis-context__heading > p,
.performance-body .overview-heading > p,
.performance-body .section-note {
  color: var(--shell-muted);
}

.performance-body .analysis-time-form {
  gap: 9px;
}

.performance-body .analysis-time-form > label > span,
.performance-body .metric-selection-heading,
.performance-body .series-control > span,
.performance-body .trend-scope-summary span,
.performance-body .trend-view-heading span,
.performance-body .trend-series-legend__heading > span {
  color: var(--shell-muted);
  font: 700 9px/1.35 var(--shell-mono);
  letter-spacing: .08em;
}

.performance-body .analysis-time-form input[type="date"],
.performance-body .analysis-time-form select,
.performance-body #filter-form input,
.performance-body #filter-form select,
.performance-body .evidence-display-control select {
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--shell-line);
  border-radius: 0;
  color: var(--shell-ink);
  background: var(--shell-surface);
  font-size: 11px;
}

.performance-body .date-presets {
  gap: 0;
  padding: 0;
  border: 1px solid var(--shell-line);
  border-radius: 0;
  background: var(--shell-surface);
}

.performance-body .date-presets button {
  min-height: 38px;
  border-right: 1px solid var(--shell-line);
  border-radius: 0;
  color: var(--shell-muted);
  background: transparent;
  box-shadow: none;
}

.performance-body .date-presets button:last-child { border-right: 0; }
.performance-body .date-presets button:hover { color: var(--shell-ink); background: #f0f2ed; }
.performance-body .date-presets button[aria-pressed="true"] {
  color: var(--shell-accent);
  background: var(--shell-accent-soft);
  box-shadow: inset 0 -2px 0 var(--shell-accent);
}

.performance-body .analysis-time-form .partial-toggle {
  min-height: 40px;
  border-color: var(--shell-line);
  border-radius: 0;
  background: var(--shell-surface);
}

.performance-body .analysis-time-form .partial-toggle input { accent-color: var(--shell-accent); }

.performance-body .analysis-apply-button,
.performance-body .apply-button {
  min-height: 40px;
  border: 1px solid var(--shell-accent);
  border-radius: 0;
  color: white;
  background: var(--shell-accent);
  box-shadow: none;
  transition: background .18s ease, transform .18s ease;
}

.performance-body .analysis-apply-button:hover,
.performance-body .apply-button:hover { background: #0f655d; }
.performance-body .analysis-apply-button:active,
.performance-body .apply-button:active { transform: translateY(1px); }

.performance-body .analysis-context__status {
  border-top-color: var(--shell-line);
  color: var(--shell-muted);
  font-family: var(--shell-mono);
}

.performance-body .analysis-context__status strong { color: var(--shell-ink); }

.performance-body main {
  display: grid;
  grid-template-columns: 208px minmax(0, 1fr);
  align-items: start;
  column-gap: 32px;
}

.performance-body .performance-view-nav {
  position: sticky;
  top: 18px;
  z-index: var(--performance-z-sticky);
  grid-column: 1;
  align-self: start;
  border: 1px solid var(--shell-ink);
  background: var(--shell-surface);
}

.performance-body .performance-view-nav__context {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  min-height: 68px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--shell-ink);
}

.performance-body .performance-view-nav__context span,
.performance-body .performance-view-tabs small,
.performance-body .performance-view-tabs button > span {
  color: var(--shell-muted);
  font: 700 9px/1.2 var(--shell-mono);
  letter-spacing: .06em;
}

.performance-body .performance-view-nav__context strong {
  font-size: 13px;
  line-height: 1.2;
}

.performance-body .performance-view-tabs {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.performance-body .performance-view-tabs button {
  display: grid;
  min-width: 0;
  min-height: 70px;
  grid-template-columns: 25px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-content: center;
  gap: 2px 8px;
  padding: 9px 12px;
  border: 0;
  border-bottom: 1px solid var(--shell-line);
  color: var(--shell-muted);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.performance-body .performance-view-tabs button:last-child { border-bottom: 0; }
.performance-body .performance-view-tabs button > span { grid-row: 1 / -1; padding-top: 2px; }
.performance-body .performance-view-tabs strong {
  overflow: hidden;
  color: inherit;
  font-size: 13px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.performance-body .performance-view-tabs small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.performance-body .performance-view-tabs button:hover {
  color: var(--shell-ink);
  background: #eef1ec;
}
.performance-body .performance-view-tabs button[aria-selected="true"] {
  color: var(--shell-accent);
  background: var(--shell-accent-soft);
  box-shadow: inset 3px 0 0 var(--shell-accent);
}

.performance-body .performance-view-panel {
  grid-column: 2;
  min-width: 0;
  scroll-margin-top: 18px;
}
.performance-body .performance-view-panel[hidden] { display: none !important; }

.performance-body .dashboard-overview { padding: 40px 0 46px; }
.performance-body .overview-heading,
.performance-body .dashboard-section-heading { margin-bottom: 24px; }

.performance-body .overview-heading h2,
.performance-body .dashboard-section-heading h2,
.performance-body .filter-rail h2 {
  margin-top: 3px;
  font: 720 clamp(28px, 3vw, 40px)/1 var(--shell-sans);
  letter-spacing: -.04em;
}

.performance-body .ledger-grid {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--shell-line);
  border-left: 1px solid var(--shell-line);
}

.performance-body .ledger-item {
  min-height: 118px;
  padding: 15px 14px 13px !important;
  border: 0 !important;
  border-right: 1px solid var(--shell-line) !important;
  border-bottom: 1px solid var(--shell-line) !important;
  border-radius: 0;
  background: var(--shell-surface);
  box-shadow: none;
}

.performance-body .ledger-item::before {
  inset: 0 0 auto;
  width: auto;
  height: 3px;
  background: var(--shell-line);
}

.performance-body .ledger-item[data-tone="success"]::before,
.performance-body .ledger-item[data-tone="commerce"]::before,
.performance-body .ledger-item[data-tone="reach"]::before {
  background: var(--shell-accent);
}

.performance-body .ledger-item__label {
  color: var(--shell-muted);
  font: 700 10px/1.35 var(--shell-mono);
}

.performance-body .ledger-item__value {
  color: var(--shell-ink);
  font-variant-numeric: tabular-nums;
}

.performance-body .ledger-item:last-child:nth-child(7n + 6) {
  grid-column: span 2;
}

.performance-body .ledger-item__meter,
.performance-body .data-coverage-item__track,
.performance-body .funnel-stage__track,
.performance-body .style-rank-row__bar {
  border-radius: 0;
  background: #e5e8e2;
}

.performance-body .ledger-item__meter i,
.performance-body .ledger-item[data-tone="success"] .ledger-item__meter i,
.performance-body .ledger-item[data-tone="commerce"] .ledger-item__meter i,
.performance-body .data-coverage-item__track i,
.performance-body .funnel-stage__track i,
.performance-body .funnel-stage:nth-child(n) .funnel-stage__track i,
.performance-body .style-rank-row__bar i {
  border-radius: 0;
  background: var(--shell-accent);
}

.performance-body .data-coverage-card {
  margin-top: 18px;
  padding: 20px;
  border: 1px solid var(--shell-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.performance-body .data-coverage-card__heading {
  padding-bottom: 15px;
  border-bottom: 1px solid var(--shell-line);
}

.performance-body .data-coverage-card__heading h3 {
  margin-top: 6px;
  font-size: 18px;
}

.performance-body .data-coverage-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
}

.performance-body .data-coverage-item {
  padding: 13px 12px;
  border-right: 1px solid var(--shell-line);
  border-bottom: 1px solid var(--shell-line);
  border-radius: 0;
  background: transparent;
}

.performance-body .data-coverage-item:nth-child(4n) { border-right: 0; }
.performance-body .data-coverage-item strong { font-family: var(--shell-sans); }
.performance-body .data-coverage-item b { color: var(--shell-accent); }

.performance-body .chart-badge,
.performance-body .dashboard-card__hint {
  display: inline-block;
  max-width: none;
  padding: 4px 7px;
  border: 1px solid var(--shell-line);
  border-radius: 0;
  color: var(--shell-accent);
  background: var(--shell-accent-soft);
  font: 700 9px/1.2 var(--shell-mono);
  letter-spacing: .05em;
  text-align: left;
}

.performance-body .dashboard-card__hint {
  color: var(--shell-muted);
  background: var(--shell-surface);
  letter-spacing: 0;
}

.performance-body .analytics-section,
.performance-body .dimension-section,
.performance-body .video-workbench {
  padding-top: 44px;
  border-top: 1px solid var(--shell-line);
}

.performance-body .insight-grid { gap: 18px; }
.performance-body .dashboard-card,
.performance-body .dimension-card {
  border: 1px solid var(--shell-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.performance-body .dashboard-card { padding: 20px; }
.performance-body .dashboard-card__header,
.performance-body .trend-dashboard-header { border-bottom-color: var(--shell-line); }
.performance-body .dashboard-card h3,
.performance-body .trend-dashboard-card h3 { color: var(--shell-ink); }

.performance-body .funnel-stage,
.performance-body .style-rank-row { border-bottom-color: var(--shell-line); }
.performance-body .funnel-stage__index,
.performance-body .style-rank-row__identity i { color: var(--shell-muted); font-family: var(--shell-mono); }
.performance-body .style-rank-row__button:hover { background: var(--shell-accent-soft); }

.performance-body .trend-dashboard-card { margin-top: 18px; }
.performance-body .trend-section .trend-dashboard-card { margin-top: 0; }
.performance-body .trend-control-panel {
  padding: 16px;
  border: 1px solid var(--shell-line);
  border-radius: 0;
  background: #eef1ec;
}

.performance-body .series-options button,
.performance-body .metric-tabs button,
.performance-body .trend-display-toolbar button,
.performance-body .trend-series-legend__button,
.performance-body .trend-series-legend__reset,
.performance-body .trend-facet__type,
.performance-body .dimension-tabs button,
.performance-body .pagination button,
.performance-body .video-detail-toggle,
.performance-body .video-evidence-actions button {
  border-radius: 0;
  box-shadow: none;
}

.performance-body .series-options button {
  border-color: var(--shell-line);
  color: var(--shell-muted);
  background: var(--shell-surface);
}

.performance-body .series-options button:hover { border-color: var(--shell-accent); color: var(--shell-accent); }
.performance-body .series-options button[aria-pressed="true"],
.performance-body .metric-tabs button[aria-pressed="true"] {
  border-color: var(--shell-accent);
  color: var(--shell-accent);
  background: var(--shell-accent-soft);
}

.performance-body .metric-tabs {
  gap: 0;
  padding: 0;
  border: 1px solid var(--shell-line);
  border-radius: 0;
  background: var(--shell-surface);
}

.performance-body .metric-tabs button {
  min-height: 34px;
  border-right: 1px solid var(--shell-line);
  border-bottom: 1px solid var(--shell-line);
  color: var(--shell-muted);
  background: transparent;
}

.performance-body .trend-kpi,
.performance-body .trend-facet,
.performance-body .trend-facet.is-focus,
.performance-body .trend-series-legend,
.performance-body .trend-comparison-coverage,
.performance-body .trend-recharts-tooltip {
  border-radius: 0;
  box-shadow: none;
}

.performance-body .trend-kpi,
.performance-body .trend-facet { border-color: var(--shell-line); background: var(--shell-surface); }
.performance-body .trend-series-legend { border-color: var(--shell-line); background: #eef1ec; }
.performance-body .trend-series-legend__button,
.performance-body .trend-display-toolbar button,
.performance-body .trend-facet__type { border-color: var(--shell-line); background: var(--shell-surface); }
.performance-body .trend-series-legend__button.is-active {
  border-color: var(--shell-accent);
  color: var(--shell-accent);
  background: var(--shell-accent-soft);
  box-shadow: none;
}

.performance-body .dimension-card { padding: 0; }
.performance-body .dimension-tabs {
  display: flex;
  gap: 0;
  padding: 0;
  border-bottom: 1px solid var(--shell-line);
  border-radius: 0;
  background: transparent;
}

.performance-body .dimension-tabs button {
  min-height: 46px;
  padding: 10px 16px;
  border: 0;
  border-right: 1px solid var(--shell-line);
  color: var(--shell-muted);
  background: transparent;
}

.performance-body .dimension-tabs button[aria-selected="true"] {
  color: var(--shell-accent);
  background: var(--shell-accent-soft);
  box-shadow: inset 0 -2px 0 var(--shell-accent);
}

.performance-body .comparison-table-wrap {
  border-radius: 0;
  background: transparent;
}

.performance-body .comparison-table th {
  color: var(--shell-muted);
  background: #e8ebe5;
}

.performance-body .comparison-table th,
.performance-body .comparison-table td { border-bottom-color: var(--shell-line); }
.performance-body .comparison-table tbody tr:hover { background: var(--shell-accent-soft); }
.performance-body .comparison-sort-button:hover { color: var(--shell-ink); background: #dde2da; }

.performance-body .video-workbench {
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.performance-body .filter-rail {
  position: sticky;
  top: 0;
  z-index: var(--performance-z-filter);
  max-height: 100dvh;
  align-self: start;
  padding: 0;
  overflow: visible;
  background: var(--shell-paper);
}

.performance-body .filter-rail.is-advanced-open {
  display: grid;
  overflow: hidden;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.performance-body .filter-rail.is-advanced-open #filter-form {
  padding-right: 10px;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-gutter: stable;
}

.performance-body .filter-rail__heading {
  position: static;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
  padding: 0 0 14px;
  border-bottom: 1px solid var(--shell-ink);
}

.performance-body .filter-rail__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 2px;
}
.performance-body .filter-rail__actions > span {
  color: var(--shell-muted);
  font: 700 9px/1.3 var(--shell-mono);
  letter-spacing: .04em;
}
.performance-body .filter-rail__actions .text-button {
  position: static;
  min-height: 32px;
  padding: 5px 8px;
  border: 1px solid var(--shell-line);
  color: var(--shell-muted);
  background: var(--shell-surface);
  cursor: pointer;
}
.performance-body .filter-rail__actions .text-button:hover {
  border-color: var(--shell-accent);
  color: var(--shell-accent);
}

.performance-body #filter-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
  gap: 12px;
}
.performance-body .filter-rail:not(.is-advanced-open) #filter-form > [data-filter-tier="advanced"] {
  display: none !important;
}
.performance-body #filter-form > label,
.performance-body #filter-form > .filter-pair { min-width: 0; }
.performance-body #filter-form > fieldset {
  display: grid;
  align-self: stretch;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 0 8px;
}
.performance-body #filter-form > .apply-button {
  align-self: end;
  min-height: 40px;
}
.performance-body #filter-form label > span,
.performance-body #filter-form fieldset legend {
  color: var(--shell-muted);
  font: 700 10px/1.35 var(--shell-mono);
  letter-spacing: .05em;
}

.performance-body #filter-form fieldset {
  border-color: var(--shell-line);
  border-radius: 0;
}

.performance-body .radio-row input { accent-color: var(--shell-accent); }
.performance-body .text-button { color: var(--shell-accent); }
.performance-body .evidence-column {
  min-width: 0;
  container: evidence-column / inline-size;
}

.performance-body .evidence-toolbar {
  align-items: center;
  margin: 14px 0 0;
  padding: 12px 0;
  border-top: 1px solid var(--shell-line);
  border-bottom: 1px solid var(--shell-ink);
  background: var(--shell-paper);
}

.performance-body .evidence-toolbar__controls { gap: 6px; }

.performance-body .video-row {
  grid-template-areas:
    "media primary"
    "media metrics";
  grid-template-columns: 220px minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  min-height: 330px;
  border-color: var(--shell-line);
  border-radius: 0;
  background: var(--shell-surface);
  box-shadow: none;
}

.performance-body .video-row:hover { border-color: #aeb7ad; }
.performance-body .video-frame {
  grid-area: media;
  width: 220px;
  height: 100%;
  min-height: 330px;
  max-height: 380px;
  align-self: start;
  border-right: 1px solid var(--shell-line);
}
.performance-body .video-row:not(.is-expanded) .video-frame {
  height: 100%;
  min-height: 330px;
  max-height: 380px;
  align-self: stretch;
}
.performance-body .video-row.is-expanded {
  grid-template-areas:
    "media primary"
    "metrics metrics";
  grid-template-columns: 260px minmax(0, 1fr);
  grid-template-rows: auto auto;
}
.performance-body .video-row.is-expanded .video-frame {
  width: 260px;
  height: 420px;
  min-height: 420px;
  max-height: 420px;
}
.performance-body .video-frame video { min-height: inherit; }

.performance-body .video-primary {
  grid-area: primary;
  min-width: 0;
  padding: 16px 18px 14px;
  border-right: 0;
  border-bottom: 1px solid var(--shell-line);
}
.performance-body .video-primary h4 { font-size: 18px; line-height: 1.2; }
.performance-body .video-identity { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 18px; }
.performance-body .video-identity__row { grid-template-columns: 78px minmax(0, 1fr); }
.performance-body .video-row:not(.is-expanded) .video-identity__row:nth-child(n + 5) { display: none; }
.performance-body .video-creative-evidence {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  margin: 10px 0;
  padding: 9px 0;
  border-top: 1px solid var(--shell-line);
  border-bottom: 1px solid var(--shell-line);
}
.performance-body .video-creative-evidence > strong {
  color: var(--shell-muted);
  font: 750 9px/1.4 var(--shell-mono);
  letter-spacing: .04em;
}
.performance-body .video-creative-evidence__chips { display: flex; flex-wrap: wrap; gap: 5px; }
.performance-body .creative-evidence-chip {
  padding: 4px 6px;
  border: 1px solid var(--shell-line);
  color: var(--shell-muted);
  background: #edf0ea;
  font: 700 8px/1.2 var(--shell-mono);
  text-decoration: none;
}
.performance-body .creative-evidence-chip.is-hook {
  border-color: var(--shell-accent);
  color: var(--shell-accent);
  background: var(--shell-accent-soft);
}
.performance-body .creative-evidence-chip:hover { border-color: var(--shell-ink); color: var(--shell-ink); }

.performance-body .video-metrics {
  grid-area: metrics;
  min-width: 0;
  padding: 14px 18px 0;
  border-top: 0;
}
.performance-body .metric-blocks { gap: 6px; }
.performance-body .metric-block { min-height: 60px; padding: 9px 10px; }
.performance-body .metric-block strong { font-size: 17px; }
.performance-body .video-evidence-actions {
  min-height: 42px;
  margin-top: 4px;
}
.performance-body .prompt-summary-bar,
.performance-body .precheck-summary-bar { min-height: 42px; }

.performance-body .video-row.is-expanded .video-primary {
  min-height: 420px;
  border-bottom: 0;
}
.performance-body .video-row.is-expanded .video-identity {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.performance-body .video-row.is-expanded .video-metrics {
  padding-top: 18px;
  border-top: 1px solid var(--shell-line);
}
.performance-body .video-row.is-expanded .metric-blocks {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.performance-body .route-tags .tag,
.performance-body .tag,
.performance-body .metric-block {
  border-radius: 0;
}

.performance-body .route-tags .tag,
.performance-body .tag {
  border-color: var(--shell-line);
  color: var(--shell-muted);
  background: #edf0ea;
}

.performance-body .tag--signal,
.performance-body .tag--market {
  border-color: var(--shell-accent);
  color: var(--shell-accent);
  background: var(--shell-accent-soft);
}

.performance-body .tag--style {
  max-width: min(100%, 360px);
  overflow: hidden;
  border-color: var(--shell-ink);
  color: var(--shell-paper);
  background: var(--shell-ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.performance-body .metric-block { background: #eef1ec; }
.performance-body .video-detail-toggle:hover,
.performance-body .video-detail-toggle:focus-visible { color: var(--shell-accent); background: var(--shell-accent-soft); }

@container evidence-column (max-width: 760px) {
  .performance-body .video-row,
  .performance-body .video-row.is-expanded {
    grid-template-areas:
      "media"
      "primary"
      "metrics";
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
  }
  .performance-body .video-frame,
  .performance-body .video-row:not(.is-expanded) .video-frame,
  .performance-body .video-row.is-expanded .video-frame {
    width: 100%;
    height: 280px;
    min-height: 280px;
    max-height: 280px;
    border-right: 0;
    border-bottom: 1px solid var(--shell-line);
  }
  .performance-body .video-primary,
  .performance-body .video-row.is-expanded .video-primary {
    min-height: 0;
    border-bottom: 1px solid var(--shell-line);
  }
  .performance-body .video-identity,
  .performance-body .video-row.is-expanded .video-identity {
    grid-template-columns: minmax(0, 1fr);
  }
  .performance-body .video-metrics { padding-top: 16px; }
  .performance-body .metric-blocks,
  .performance-body .video-row.is-expanded .metric-blocks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .performance-body .video-evidence-actions { grid-template-columns: minmax(0, 1fr); }
}

.performance-body .detail-float {
  border-color: var(--shell-ink);
  border-radius: 0;
  background: var(--shell-surface);
  box-shadow: 10px 10px 0 #dfe1db;
}

.performance-body .detail-float__content { background: #eef1ec; }
.performance-body .detail-float__actions button {
  border-radius: 0;
  color: white;
  background: var(--shell-accent);
}

@media (max-width: 1180px) {
  .performance-body .ledger-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .performance-body .data-coverage-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .performance-body .data-coverage-item:nth-child(4n) { border-right: 1px solid var(--shell-line); }
  .performance-body .data-coverage-item:nth-child(3n) { border-right: 0; }
}

@media (max-width: 1180px) {
  .performance-body main { display: block; }
  .performance-body .performance-view-nav {
    position: sticky;
    top: 0;
    overflow: hidden;
    border-right: 0;
    border-left: 0;
  }
  .performance-body .performance-view-nav__context { display: none; }
  .performance-body .performance-view-tabs {
    display: grid;
    overflow-x: auto;
    grid-template-columns: repeat(5, minmax(156px, 1fr));
    flex-direction: initial;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    scroll-snap-type: x proximity;
  }
  .performance-body .performance-view-tabs button {
    min-height: calc(var(--performance-view-nav-height) - 2px);
    border-right: 1px solid var(--shell-line);
    border-bottom: 0;
    scroll-snap-align: start;
  }
  .performance-body .performance-view-tabs button:last-child { border-right: 0; }
  .performance-body .performance-view-tabs button[aria-selected="true"] {
    box-shadow: inset 0 -3px 0 var(--shell-accent);
  }
  .performance-body .performance-view-panel { scroll-margin-top: calc(var(--performance-view-nav-height) + 16px); }
  .performance-body .filter-rail {
    top: var(--performance-view-nav-height);
    z-index: var(--performance-z-filter);
    max-height: calc(100dvh - var(--performance-view-nav-height));
  }
}

@media (max-width: 1100px) {
  .performance-body .video-workbench { grid-template-columns: 1fr; }
  .performance-body .filter-rail {
    position: sticky;
  }
  .performance-body .filter-rail__heading {
    position: static;
    padding-top: 0;
  }
}

@media (max-width: 900px) {
  .performance-body #filter-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .performance-body .analysis-context,
  .performance-body main,
  .performance-body footer,
  .performance-body .quality-banner { width: min(100% - 28px, 1480px); }
  .performance-body .analysis-context { padding-top: 18px; }
  .performance-body .ledger-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .performance-body .data-coverage-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .performance-body .data-coverage-item:nth-child(3n) { border-right: 1px solid var(--shell-line); }
  .performance-body .data-coverage-item:nth-child(2n) { border-right: 0; }
  .performance-body .video-workbench { grid-template-columns: 1fr; }
  .performance-body .filter-rail__heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
  .performance-body .filter-rail__actions {
    width: 100%;
    flex-wrap: wrap;
  }
  .performance-body .filter-rail {
    display: grid;
    overflow: hidden;
    grid-template-rows: auto minmax(0, 1fr) auto;
  }
  .performance-body #filter-form {
    padding-right: 8px;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    scrollbar-gutter: stable;
  }
}

@media (max-width: 560px) {
  .performance-body #filter-form { grid-template-columns: minmax(0, 1fr); }
}
