.research-workspace {
  --research-ink: #172625;
  --research-muted: #63716d;
  --research-line: #dce4df;
  --research-paper: #fff;
  --research-wash: #f4f7f4;
  --research-green: #176b56;
  --research-amber: #94600e;
  max-width: 1480px;
  margin: 0 auto;
  padding: 26px clamp(16px, 2.4vw, 34px) 42px;
  color: var(--research-ink);
  font: 14px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.research-workspace *, .research-workspace *::before, .research-workspace *::after { box-sizing: border-box; }
.research-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.research-heading h1 { margin: 2px 0 5px; font-size: clamp(26px, 3vw, 35px); letter-spacing: -.035em; line-height: 1.1; }
.research-lede { max-width: 720px; margin: 0; color: var(--research-muted); }
.research-eyebrow, .research-kicker { margin: 0; color: var(--research-green); font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.research-contract-tag, .research-unit { flex: 0 0 auto; border: 1px solid var(--research-line); border-radius: 999px; padding: 5px 10px; color: #455550; background: #fafcf9; font-size: 11px; font-weight: 650; }
.research-method-alert { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 15px; padding: 13px 16px; border: 1px solid #eadab7; border-radius: 9px; background: #fffaf0; }
.research-alert-mark { display: grid; flex: 0 0 22px; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #f1e1bf; color: #6e4b11; font-weight: 800; }
.research-method-alert h2 { margin: 0 0 2px; color: #553d12; font-size: 14px; }
.research-method-alert p { margin: 0; color: #675738; font-size: 12px; }
.research-workspace code { font-size: .92em; }
.research-filters, .research-panel, .research-summary-card, .research-method-details { border: 1px solid var(--research-line); border-radius: 10px; background: var(--research-paper); }
.research-filters { margin-bottom: 14px; padding: 13px 15px 10px; }
.research-filter-heading, .research-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.research-filter-heading { margin-bottom: 9px; }
.research-filter-heading h2, .research-panel-head h2 { margin: 2px 0 0; font-size: 16px; letter-spacing: -.015em; }
.research-filter-note { color: var(--research-muted); font-size: 11px; }
.research-filter-grid { display: grid; grid-template-columns: minmax(135px, 1fr) minmax(135px, 1fr) minmax(160px, 1.2fr) minmax(160px, 1.2fr) minmax(190px, 1.4fr) auto; align-items: end; gap: 9px; }
.research-filter-grid label { display: grid; gap: 4px; color: #52615c; font-size: 11px; font-weight: 650; }
.research-filter-grid input, .research-filter-grid select { width: 100%; min-height: 36px; border: 1px solid #cbd6d0; border-radius: 6px; padding: 6px 8px; color: var(--research-ink); background: #fff; font: inherit; font-size: 12px; }
.research-filter-grid button { min-height: 36px; border: 0; border-radius: 6px; padding: 0 14px; color: #fff; background: var(--research-green); font: inherit; font-size: 12px; font-weight: 750; cursor: pointer; }
.research-filter-grid button:hover { background: #115a47; }
.research-filter-grid :focus-visible, .research-method-details summary:focus-visible { outline: 3px solid #75b8a5; outline-offset: 2px; }
.research-filter-status { min-height: 17px; margin: 7px 0 0; color: var(--research-muted); font-size: 11px; }
.research-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.research-summary-card { display: grid; gap: 0; padding: 12px 14px; }
.research-summary-card > span { color: var(--research-muted); font-size: 11px; }
.research-summary-card strong { font-size: 23px; letter-spacing: -.035em; line-height: 1.25; font-variant-numeric: tabular-nums; }
.research-summary-card small { color: var(--research-muted); font-size: 10px; }
.research-panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 12px; }
.research-panel { min-width: 0; padding: 15px; }
.research-panel-head { align-items: flex-start; margin-bottom: 8px; }
.research-panel-head h2 { font-size: 16px; }
.research-panel-copy { margin: 0 0 10px; color: var(--research-muted); font-size: 11px; }
.research-unit { padding: 4px 8px; font-size: 10px; }
.research-table-wrap { width: 100%; overflow-x: auto; border: 1px solid #e4eae6; border-radius: 7px; }
.research-table-wrap table { width: 100%; border-collapse: collapse; font-size: 11px; font-variant-numeric: tabular-nums; }
.research-table-wrap caption { padding: 7px 9px; color: var(--research-muted); background: #f8faf8; text-align: left; font-size: 10px; }
.research-table-wrap th, .research-table-wrap td { padding: 7px 8px; border-top: 1px solid #e8ede9; text-align: right; white-space: nowrap; }
.research-table-wrap thead th { color: #64716d; background: #fbfcfb; font-size: 9px; font-weight: 750; }
.research-table-wrap tbody th { min-width: 185px; color: #2d3d38; text-align: left; white-space: normal; font-weight: 650; }
.research-table-wrap tbody th span, .research-table-wrap td span { display: block; color: #84908b; font-size: 9px; font-weight: 450; }
.research-table-wrap tbody td strong { color: var(--research-green); font-size: 12px; }
.research-table-wrap small { display: block; font-size: 9px; font-weight: 500; }
.research-footnote { margin: 8px 0 0; color: var(--research-muted); font-size: 10px; }
.research-subpanel { margin-top: 13px; }
.research-subpanel h3 { margin: 0 0 6px; font-size: 12px; }
.research-transition-strip { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; margin-top: 11px; padding: 10px 11px; border-left: 3px solid #75ad9a; border-radius: 4px; background: var(--research-wash); color: #51615b; font-size: 10px; }
.research-transition-strip strong { color: var(--research-ink); font-size: 11px; }
.research-transition-strip span:last-child { grid-column: 1 / -1; }
.research-spx-panel { grid-column: 1 / -1; }
.research-spx-panel .research-panel-copy { max-width: 980px; }
.research-spx-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.research-spx-stats > div { display: grid; gap: 2px; padding: 9px 10px; border: 1px solid #e4eae6; border-radius: 7px; background: #fbfcfb; }
.research-spx-stats span { color: var(--research-muted); font-size: 10px; }
.research-spx-stats strong { font-size: 14px; font-variant-numeric: tabular-nums; }
.research-spx-result { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px 18px; margin-top: 9px; padding: 10px 12px; border-radius: 7px; background: #edf5f1; color: #456259; font-size: 10px; }
.research-spx-result strong { color: #204c3f; font-size: 12px; }
.research-method-details { margin-top: 12px; padding: 0 14px; }
.research-method-details summary { padding: 11px 0; cursor: pointer; color: #3f514b; font-size: 12px; font-weight: 750; }
.research-method-details > div { max-width: 1100px; padding: 0 0 10px; color: var(--research-muted); font-size: 11px; }
.research-method-details p { margin: 6px 0; }
.research-footer { padding-top: 10px; color: #78847f; text-align: right; font-size: 10px; }
.research-cohort-fixed-note { margin: -5px 0 13px; color: var(--research-muted); font-size: 11px; }
.research-empty-scope { margin: 0 0 14px; padding: 14px 16px; border: 1px dashed var(--research-line); border-radius: 8px; background: var(--research-wash); color: var(--research-muted); }
.research-plot { margin: 12px 0; padding: 9px 10px 6px; border: 1px solid var(--research-line); border-radius: 7px; background: var(--research-wash); }
.research-plot figcaption { margin-bottom: 4px; color: var(--research-muted); font-size: 10px; }
.research-plot svg { display: block; width: 100%; height: auto; overflow: visible; }
.research-plot text { fill: var(--research-muted); font-family: inherit; font-size: 10px; }
.research-plot .plot-label { fill: var(--research-ink); }
.research-plot .plot-range { stroke: var(--research-muted); stroke-width: 2; }
.research-plot .plot-iqr { fill: var(--research-green); opacity: .48; stroke: var(--research-green); }
.research-plot .plot-median { stroke: var(--research-green); stroke-width: 2.5; }
.research-plot .plot-axis { stroke: var(--research-line); stroke-width: 1; }
.research-plot .plot-tick, .research-plot .plot-n { font-size: 9px; }
.research-workspace [hidden] { display: none !important; }

html[data-theme="dark"] .research-workspace {
  --research-ink: #e5ecef;
  --research-muted: #91a0a7;
  --research-line: #29343b;
  --research-paper: #13191e;
  --research-wash: #171f25;
  --research-green: #9bbfc0;
  --research-amber: #d8b773;
  color-scheme: dark;
}
html[data-theme="dark"] .research-contract-tag,
html[data-theme="dark"] .research-unit { color: var(--research-muted); background: var(--research-wash); }
html[data-theme="dark"] .research-method-alert { border-color: #5a482a; background: #292216; }
html[data-theme="dark"] .research-alert-mark { background: #4a3d24; color: #e6c57d; }
html[data-theme="dark"] .research-method-alert h2 { color: #e6c57d; }
html[data-theme="dark"] .research-method-alert p { color: #c7b991; }
html[data-theme="dark"] .research-filter-grid label { color: var(--research-muted); }
html[data-theme="dark"] .research-filter-grid input,
html[data-theme="dark"] .research-filter-grid select { border-color: #3b4a53; color: var(--research-ink); background: #0d151f; }
html[data-theme="dark"] .research-filter-grid button { color: #101819; background: var(--research-green); }
html[data-theme="dark"] .research-table-wrap { border-color: var(--research-line); }
html[data-theme="dark"] .research-table-wrap caption { color: var(--research-muted); background: #171f25; }
html[data-theme="dark"] .research-table-wrap th,
html[data-theme="dark"] .research-table-wrap td { border-color: #29343b; }
html[data-theme="dark"] .research-table-wrap thead th { color: var(--research-muted); background: #171f25; }
html[data-theme="dark"] .research-table-wrap tbody th { color: var(--research-ink); }
html[data-theme="dark"] .research-table-wrap tbody th span,
html[data-theme="dark"] .research-table-wrap td span { color: #788790; }
html[data-theme="dark"] .research-transition-strip { background: #171f25; color: var(--research-muted); }
html[data-theme="dark"] .research-transition-strip strong,
html[data-theme="dark"] .research-spx-result strong { color: var(--research-ink); }
html[data-theme="dark"] .research-spx-stats > div { border-color: var(--research-line); background: #171f25; }
html[data-theme="dark"] .research-spx-result { background: #171f25; color: var(--research-muted); }
html[data-theme="dark"] .research-method-details summary { color: var(--research-ink); }
html[data-theme="dark"] .research-footer { color: #788790; }
html[data-theme="dark"] .research-plot { background: #171f25; }
@media (max-width: 1050px) {
  .research-filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .research-filter-grid button { width: 100%; }
}
@media (max-width: 760px) {
  .research-workspace { padding: 18px 12px 30px; }
  .research-heading { align-items: flex-start; flex-direction: column; gap: 9px; }
  .research-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .research-summary-card { padding: 10px; }
  .research-summary-card strong { font-size: 20px; }
  .research-panels { grid-template-columns: minmax(0, 1fr); }
  .research-spx-panel { grid-column: auto; }
  .research-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .research-filter-grid label:last-of-type, .research-filter-grid button { grid-column: 1 / -1; }
  .research-spx-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .research-transition-strip { grid-template-columns: 1fr; }
}
@media (max-width: 400px) {
  .research-filter-grid { grid-template-columns: 1fr; }
  .research-filter-grid label:last-of-type, .research-filter-grid button { grid-column: auto; }
  .research-spx-stats { grid-template-columns: 1fr 1fr; }
  .research-panel { padding: 11px; }
  .research-panel-head { align-items: flex-start; flex-direction: column; gap: 5px; }
}
