:root {
  color-scheme: light;
  --dl-white: #ffffff;
  --dl-soft: #f7f8fa;
  --dl-soft-2: #f0f2f5;
  --dl-navy: #07162f;
  --dl-text: #111d35;
  --dl-muted: #5f6b80;
  --dl-line: #dfe3e9;
  --dl-line-strong: #b8c0cc;
  --dl-red: #d10711;
  --dl-red-dark: #a90008;
  --dl-red-soft: #fff0f1;
  --dl-gold: #b87700;
  --dl-green: #087d4d;
  --dl-blue: #245bd6;
  --dl-focus: #2d6cdf;
  --dl-radius: 8px;
  --dl-shadow: 0 18px 50px rgba(7, 22, 47, 0.14);
  --dl-header-height: 58px;
  --dl-safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
  background: var(--dl-white);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--dl-white);
  color: var(--dl-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.4;
  text-rendering: optimizeLegibility;
}

body:has(dialog[open]) {
  overflow: hidden;
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
}

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

button,
select,
summary {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

a {
  color: inherit;
}

svg {
  display: block;
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

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

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 1000;
  padding: 10px 14px;
  border-radius: var(--dl-radius);
  background: var(--dl-navy);
  color: var(--dl-white);
  font-weight: 800;
  transform: translateY(-150%);
}

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

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--dl-focus) 72%, transparent);
  outline-offset: 2px;
}

.lab-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  min-height: var(--dl-header-height);
  padding: 0 14px;
  border-bottom: 1px solid var(--dl-line);
  background: rgba(255, 255, 255, 0.97);
}

.lab-brand {
  flex: 0 0 auto;
  color: var(--dl-red);
  font-size: 1.12rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  text-decoration: none;
  white-space: nowrap;
}

.lab-nav {
  display: none;
  min-width: 0;
  margin-left: 18px;
  overflow-x: auto;
  scrollbar-width: none;
}

.lab-nav::-webkit-scrollbar {
  display: none;
}

.lab-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: var(--dl-header-height);
  padding: 0 10px;
  font-size: 0.78rem;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

.lab-nav a[aria-current="page"] {
  color: var(--dl-red);
}

.lab-nav a[aria-current="page"]::after {
  position: absolute;
  right: 10px;
  bottom: 0;
  left: 10px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--dl-red);
  content: "";
}

.lab-menu {
  position: relative;
  justify-self: end;
}

.lab-menu summary {
  display: grid;
  width: 44px;
  min-height: 44px;
  place-items: center;
  border-radius: var(--dl-radius);
  list-style: none;
}

.lab-menu summary::-webkit-details-marker {
  display: none;
}

.lab-menu summary::marker {
  content: "";
}

.lab-menu summary:hover,
.lab-menu[open] summary {
  background: var(--dl-soft);
}

.lab-menu-panel {
  position: absolute;
  top: calc(100% + 5px);
  right: 0;
  display: grid;
  width: min(252px, calc(100vw - 28px));
  padding: 6px;
  border: 1px solid var(--dl-line);
  border-radius: var(--dl-radius);
  background: var(--dl-white);
  box-shadow: var(--dl-shadow);
}

.lab-menu-panel a {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: none;
}

.lab-menu-panel a:hover {
  background: var(--dl-soft);
}

.lab-menu-panel a[aria-current="page"] {
  background: var(--dl-red-soft);
  color: var(--dl-red);
}

.header-actions {
  display: none;
}

.icon-text-button,
.icon-button,
.text-button,
.compare-mode-button,
.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: var(--dl-radius);
  font-size: 0.84rem;
  font-weight: 800;
}

.icon-text-button,
.icon-button,
.text-button,
.compare-mode-button {
  border: 0;
  background: transparent;
}

.icon-text-button,
.compare-mode-button {
  gap: 8px;
  padding: 0 10px;
}

.icon-button {
  width: 44px;
  padding: 0;
}

.text-button {
  min-height: 36px;
  padding: 0 4px;
  color: var(--dl-blue);
}

.primary-button,
.secondary-button {
  gap: 10px;
  padding: 0 16px;
  border: 1px solid var(--dl-navy);
}

.primary-button {
  border-color: var(--dl-red);
  background: var(--dl-red);
  color: var(--dl-white);
}

.primary-button:hover {
  border-color: var(--dl-red-dark);
  background: var(--dl-red-dark);
}

.secondary-button {
  background: var(--dl-white);
  color: var(--dl-navy);
}

.secondary-button:hover {
  background: var(--dl-soft);
}

.draft-lab {
  padding-bottom: calc(76px + var(--dl-safe-bottom));
}

.lab-intro {
  display: grid;
  gap: 18px;
  padding: 28px 16px 18px;
  border-bottom: 1px solid var(--dl-line);
}

.lab-intro h1,
.lab-intro p,
.panel-heading h2,
.panel-heading p,
.chart-heading h2,
.chart-heading p,
.methodology-band h2,
.methodology-band p,
.trust-section h2,
.trust-section p {
  margin: 0;
}

.lab-intro h1 {
  max-width: 760px;
  color: var(--dl-navy);
  font-size: clamp(1.8rem, 8vw, 2.7rem);
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 1.02;
}

.lab-intro p {
  max-width: 620px;
  margin-top: 10px;
  color: var(--dl-muted);
  font-size: 0.98rem;
}

.intro-actions .primary-button {
  width: 100%;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
  color: var(--dl-muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.breadcrumbs a {
  color: var(--dl-blue);
}

.preset-strip {
  display: flex;
  gap: 4px;
  padding: 8px 12px;
  overflow-x: auto;
  border-bottom: 1px solid var(--dl-line);
  background: var(--dl-white);
  scrollbar-width: none;
}

.preset-strip::-webkit-scrollbar {
  display: none;
}

.preset-strip a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: var(--dl-radius);
  font-size: 0.78rem;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

.preset-strip a:hover,
.preset-strip a[aria-current="true"] {
  border-color: var(--dl-red);
  color: var(--dl-red);
}

.analysis-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 14px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--dl-line);
}

.filter-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--dl-navy);
  font-size: 0.84rem;
  font-weight: 750;
}

.filter-summary svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
}

.filter-summary span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.data-stamp {
  margin: 0;
  color: var(--dl-muted);
  font-size: 0.7rem;
  font-weight: 650;
}

.notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 10px 12px 0;
  padding: 12px;
  border: 1px solid #e8c97b;
  border-left: 4px solid var(--dl-gold);
  border-radius: var(--dl-radius);
  background: #fff9e8;
  color: #614204;
  font-size: 0.82rem;
  font-weight: 700;
}

.notice svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
}

.invalid-url-notice {
  border-color: #edb8bc;
  border-left-color: var(--dl-red);
  background: var(--dl-red-soft);
  color: #7a1018;
}

.lab-workspace {
  display: block;
}

.filter-rail,
.chart-panel {
  display: none;
}

.ranking-panel {
  min-width: 0;
  border-bottom: 1px solid var(--dl-line);
}

.desktop-table-wrap {
  display: none;
}

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

.panel-heading {
  min-height: 72px;
  padding: 14px 16px 10px;
}

.panel-heading h2,
.chart-heading h2 {
  color: var(--dl-navy);
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: -0.025em;
}

.panel-heading p,
.chart-heading p {
  margin-top: 3px;
  color: var(--dl-muted);
  font-size: 0.74rem;
  font-weight: 650;
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 3px;
}

.column-key {
  margin: 0 12px 12px;
  border-block: 1px solid var(--dl-line);
  background: var(--dl-soft);
}

.column-key summary {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 10px 12px;
  color: var(--dl-navy);
  font-size: 0.78rem;
  font-weight: 850;
  cursor: pointer;
  list-style: none;
}

.column-key summary::-webkit-details-marker { display: none; }

.column-key summary::after {
  content: "+";
  margin-left: auto;
  color: var(--dl-red);
  font-size: 1.2rem;
  line-height: 1;
}

.column-key[open] summary::after { content: "−"; }

.column-key summary small {
  margin-left: 8px;
  color: var(--dl-muted);
  font-size: 0.68rem;
  font-weight: 650;
}

.column-key dl {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0 12px 12px;
}

.column-key dl div {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--dl-line);
}

.column-key dt {
  color: var(--dl-navy);
  font-size: 0.7rem;
  font-weight: 850;
}

.column-key dd {
  margin: 0;
  color: var(--dl-muted);
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.4;
}

.compare-mode-button[aria-pressed="true"] {
  background: var(--dl-red-soft);
  color: var(--dl-red);
}

.loading-state,
.error-state,
.empty-state {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-height: 320px;
  padding: 68px 24px;
  text-align: center;
}

.loading-state strong,
.error-state strong,
.empty-state strong {
  color: var(--dl-navy);
  font-size: 1rem;
}

.loading-state > span:last-child,
.error-state > span,
.empty-state > span {
  max-width: 340px;
  color: var(--dl-muted);
  font-size: 0.82rem;
}

.loading-mark {
  width: 28px;
  height: 28px;
  border: 3px solid var(--dl-line);
  border-top-color: var(--dl-red);
  border-radius: 50%;
  animation: dl-spin 700ms linear infinite;
}

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

.organization-row {
  border-top: 1px solid var(--dl-line);
  background: var(--dl-white);
}

.organization-row:first-child {
  border-top-width: 2px;
  border-top-color: var(--dl-navy);
}

.organization-row[data-selected="true"] {
  box-shadow: inset 4px 0 0 var(--dl-red);
}

.organization-summary {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto 44px;
  align-items: center;
  min-height: 74px;
  padding: 8px 8px 8px 12px;
}

.organization-summary:hover {
  background: var(--dl-soft);
}

.row-rank {
  color: var(--dl-navy);
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
  font-weight: 900;
}

.organization-row:first-child .row-rank {
  color: var(--dl-red);
}

.team-id {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

button.team-id,
button.row-values {
  width: 100%;
  padding: 0;
  border: 0;
  color: inherit;
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.team-abbr {
  color: var(--dl-navy);
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.team-name {
  overflow: hidden;
  color: var(--dl-text);
  font-size: 0.82rem;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-values {
  display: grid;
  justify-items: end;
  min-width: 58px;
  font-variant-numeric: tabular-nums;
}

.row-score {
  color: var(--dl-red);
  font-size: 1rem;
  font-weight: 900;
}

.row-primary {
  color: var(--dl-muted);
  font-size: 0.67rem;
  font-weight: 700;
}

.row-change {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-top: 2px;
  font-size: 0.68rem;
  font-weight: 800;
}

.row-change.positive { color: var(--dl-green); }
.row-change.negative { color: var(--dl-gold); }

.expand-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--dl-navy);
}

.expand-button svg {
  transition: transform 150ms ease;
}

.organization-row[data-expanded="true"] .expand-button svg {
  transform: rotate(180deg);
}

.compare-check {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
}

.compare-check input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--dl-red);
}

.mobile-ranking-list[data-compare-mode="true"] .organization-summary {
  grid-template-columns: 34px minmax(0, 1fr) auto 44px;
}

.mobile-ranking-list[data-compare-mode="true"] .expand-button {
  display: none;
}

.mobile-ranking-list[data-compare-mode="true"] .compare-check {
  display: flex;
}

.organization-details {
  padding: 4px 14px 18px;
  border-top: 1px solid var(--dl-line);
  background: var(--dl-white);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  border-bottom: 1px solid var(--dl-line);
}

.metric-grid > div {
  min-width: 0;
  padding: 12px 8px;
  border-right: 1px solid var(--dl-line);
  border-bottom: 1px solid var(--dl-line);
}

.metric-grid > div:nth-child(2n) {
  border-right: 0;
}

.metric-grid dt,
.detail-metric-band dt {
  color: var(--dl-muted);
  font-size: 0.66rem;
  font-weight: 700;
}

.metric-grid dd,
.detail-metric-band dd {
  margin: 3px 0 0;
  color: var(--dl-navy);
  font-size: 0.98rem;
  font-variant-numeric: tabular-nums;
  font-weight: 900;
}

.player-callouts {
  display: grid;
  gap: 8px;
  padding: 12px 0;
}

.player-callouts p,
.row-insight {
  margin: 0;
  color: var(--dl-muted);
  font-size: 0.76rem;
}

.player-callouts strong {
  color: var(--dl-navy);
}

.excluded-player-note {
  padding: 9px 10px;
  border-left: 3px solid var(--dl-gold);
  background: #fff9e8;
  color: #614204;
  font-size: 0.74rem;
  font-weight: 700;
}

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

.row-actions a,
.row-actions button {
  min-height: 44px;
  border: 1px solid var(--dl-navy);
  border-radius: var(--dl-radius);
  background: var(--dl-white);
  color: var(--dl-navy);
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
}

.row-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.methodology-band {
  display: grid;
  gap: 14px;
  padding: 20px 16px;
  border-bottom: 1px solid var(--dl-line);
  background: var(--dl-white);
}

.methodology-band h2 {
  color: var(--dl-navy);
  font-size: 1rem;
  font-weight: 900;
}

.methodology-band p {
  margin-top: 4px;
  color: var(--dl-muted);
  font-size: 0.74rem;
}

.methodology-band dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  background: var(--dl-line);
}

.methodology-band dl > div {
  min-width: 0;
  padding: 9px 6px;
  background: var(--dl-white);
  text-align: center;
}

.methodology-band dt {
  overflow: hidden;
  color: var(--dl-muted);
  font-size: 0.62rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.methodology-band dd {
  margin: 2px 0 0;
  color: var(--dl-navy);
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
  font-weight: 900;
}

.secondary-analysis {
  display: grid;
  gap: 1px;
  padding: 1px 0;
  background: var(--dl-line);
}

.visual-panel {
  min-width: 0;
  min-height: 250px;
  padding: 18px 16px;
  background: var(--dl-white);
}

.visual-panel .chart-heading {
  margin-bottom: 18px;
}

.unavailable-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 130px;
}

.unavailable-panel h2,
.unavailable-panel p {
  margin: 0;
}

.unavailable-panel h2 {
  color: var(--dl-navy);
  font-size: 1rem;
}

.unavailable-panel p {
  margin-top: 5px;
  color: var(--dl-muted);
  font-size: 0.78rem;
}

.unavailable-panel > span {
  padding: 7px 9px;
  border: 1px solid var(--dl-line);
  border-radius: var(--dl-radius);
  color: var(--dl-muted);
  font-size: 0.66rem;
  font-weight: 800;
  text-align: center;
}

.trust-section {
  display: grid;
  gap: 16px;
  padding: 28px 16px;
  border-bottom: 1px solid var(--dl-line);
  background: var(--dl-soft);
}

.trust-section h2 {
  color: var(--dl-navy);
  font-size: 1.12rem;
}

.trust-section p {
  max-width: 800px;
  margin-top: 7px;
  color: var(--dl-muted);
  font-size: 0.84rem;
}

.trust-section a {
  align-self: start;
  color: var(--dl-blue);
  font-size: 0.82rem;
  font-weight: 800;
}

.lab-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 18px;
  padding: 24px 16px 100px;
  color: var(--dl-muted);
  font-size: 0.74rem;
}

.lab-footer span {
  width: 100%;
  color: var(--dl-navy);
  font-weight: 900;
}

.lab-footer a {
  font-weight: 700;
}

.mobile-action-bar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 35;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  min-height: calc(66px + var(--dl-safe-bottom));
  padding-bottom: var(--dl-safe-bottom);
  border-top: 1px solid var(--dl-navy);
  background: rgba(255, 255, 255, 0.98);
}

.mobile-action-bar button {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  min-height: 66px;
  padding: 4px;
  border: 0;
  border-right: 1px solid var(--dl-line);
  background: transparent;
  color: var(--dl-navy);
  font-size: 0.69rem;
  font-weight: 750;
}

.mobile-action-bar button:last-child {
  border-right: 0;
}

.filter-dialog,
.detail-dialog,
.compare-dialog,
.methodology-dialog,
.export-dialog {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--dl-white);
  color: var(--dl-text);
}

dialog::backdrop {
  background: rgba(7, 22, 47, 0.54);
}

.dialog-shell,
.detail-shell,
.compare-shell,
.methodology-shell,
.export-shell {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  margin: 0;
  background: var(--dl-white);
}

.dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex: 0 0 auto;
  padding: 20px 16px 12px;
  border-bottom: 1px solid var(--dl-line);
}

.dialog-header h2,
.dialog-header p {
  margin: 0;
}

.dialog-header h2 {
  color: var(--dl-navy);
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.dialog-header p {
  margin-top: 4px;
  color: var(--dl-muted);
  font-size: 0.76rem;
}

.dialog-header p strong {
  color: var(--dl-red);
}

.filter-tabs {
  display: flex;
  flex: 0 0 auto;
  overflow-x: auto;
  border-bottom: 1px solid var(--dl-line);
  scrollbar-width: none;
}

.filter-tabs::-webkit-scrollbar { display: none; }

.filter-tabs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  min-height: 48px;
  padding: 0 10px;
  color: var(--dl-navy);
  font-size: 0.75rem;
  font-weight: 750;
  text-decoration: none;
}

.filter-tabs a:first-child {
  box-shadow: inset 0 -3px 0 var(--dl-red);
  color: var(--dl-red);
}

.dialog-content {
  flex: 1 1 auto;
  min-height: 0;
  padding: 0 16px 100px;
  overflow-y: auto;
}

.filter-section {
  scroll-margin-top: 58px;
  padding: 22px 0;
  border-bottom: 1px solid var(--dl-line);
}

.filter-section:last-child { border-bottom: 0; }

.filter-section h3,
.filter-section p {
  margin: 0;
}

.filter-section h3 {
  color: var(--dl-navy);
  font-size: 1rem;
  font-weight: 900;
}

.filter-section > p {
  margin-top: 3px;
  color: var(--dl-muted);
  font-size: 0.72rem;
}

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

.field-stack {
  display: grid;
  gap: 7px;
  margin-top: 14px;
}

.field-row label,
.field-stack label,
.weight-control label,
.export-shell > label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--dl-navy);
  font-size: 0.72rem;
  font-weight: 750;
}

.field-row select,
.field-row input,
.field-stack select,
.field-stack input,
.export-shell input {
  width: 100%;
  min-height: 46px;
  padding: 0 11px;
  border: 1px solid var(--dl-navy);
  border-radius: var(--dl-radius);
  background: var(--dl-white);
  font-size: 0.86rem;
}

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

.preset-options button,
.segmented button {
  min-height: 44px;
  border: 1px solid var(--dl-navy);
  border-radius: var(--dl-radius);
  background: var(--dl-white);
  color: var(--dl-navy);
  font-size: 0.76rem;
  font-weight: 750;
}

.preset-options button[aria-pressed="true"],
.segmented button[aria-pressed="true"] {
  border-color: var(--dl-red);
  background: var(--dl-red);
  color: var(--dl-white);
}

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

.segmented button {
  border-radius: 0;
}

.segmented button:first-child { border-radius: var(--dl-radius) 0 0 var(--dl-radius); }
.segmented button:last-child { border-radius: 0 var(--dl-radius) var(--dl-radius) 0; }

.weight-list {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.weight-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px;
  gap: 10px;
  align-items: center;
}

.weight-control input[type="range"] {
  width: 100%;
  accent-color: var(--dl-red);
}

.weight-control input[type="number"] {
  width: 72px;
  min-height: 44px;
  padding: 0 8px;
  border: 1px solid var(--dl-navy);
  border-radius: var(--dl-radius);
  text-align: right;
}

.weight-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
  padding: 12px;
  border: 1px solid var(--dl-line-strong);
  border-radius: var(--dl-radius);
  font-size: 0.8rem;
  font-weight: 800;
}

.weight-total[data-valid="false"] {
  border-color: var(--dl-red);
  color: var(--dl-red);
}

.balance-control {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  color: var(--dl-muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.balance-control input {
  width: 20px;
  height: 20px;
  accent-color: var(--dl-red);
}

.dialog-actions {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 10px;
  padding: 10px 16px calc(10px + var(--dl-safe-bottom));
  border-top: 1px solid var(--dl-line);
  background: var(--dl-white);
}

.dialog-actions button {
  min-height: 50px;
}

.detail-shell,
.compare-shell,
.methodology-shell,
.export-shell {
  overflow-y: auto;
}

.detail-top {
  display: grid;
  gap: 12px;
  padding: 18px 16px;
  border-bottom: 1px solid var(--dl-line);
}

.detail-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.detail-title-row h2,
.detail-title-row p {
  margin: 0;
}

.detail-title-row h2 {
  color: var(--dl-navy);
  font-size: 1.5rem;
  letter-spacing: -0.03em;
}

.detail-title-row p {
  margin-top: 4px;
  color: var(--dl-muted);
  font-size: 0.8rem;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-actions a,
.detail-actions button {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 11px;
  border: 1px solid var(--dl-navy);
  border-radius: var(--dl-radius);
  background: var(--dl-white);
  color: var(--dl-navy);
  font-size: 0.74rem;
  font-weight: 800;
  text-decoration: none;
}

.detail-metric-band {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  border-bottom: 1px solid var(--dl-line);
}

.detail-metric-band > div {
  padding: 12px 16px;
  border-right: 1px solid var(--dl-line);
  border-bottom: 1px solid var(--dl-line);
}

.detail-metric-band > div:nth-child(2n) { border-right: 0; }

.detail-grid {
  display: grid;
  gap: 1px;
  background: var(--dl-line);
}

.detail-panel {
  min-width: 0;
  padding: 18px 16px;
  background: var(--dl-white);
}

.detail-panel h3,
.detail-panel p { margin: 0; }
.detail-panel h3 { color: var(--dl-navy); font-size: 1rem; }
.detail-panel > p { margin-top: 4px; color: var(--dl-muted); font-size: 0.75rem; }

.fact-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-bottom: 1px solid var(--dl-line);
}

.fact-strip > div {
  min-width: 0;
  padding: 14px 16px;
  border-right: 1px solid var(--dl-line);
  border-bottom: 1px solid var(--dl-line);
}

.fact-strip > div:nth-child(2n) { border-right: 0; }
.fact-strip span { display: block; color: var(--dl-muted); font-size: 0.65rem; font-weight: 700; }
.fact-strip strong { display: block; margin-top: 3px; color: var(--dl-navy); font-size: 0.8rem; }

.player-table-wrap,
.comparison-table-wrap {
  margin-top: 14px;
  overflow-x: auto;
  border: 1px solid var(--dl-line);
}

.player-table,
.comparison-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.player-table th,
.player-table td,
.comparison-table th,
.comparison-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--dl-line);
  text-align: right;
  font-size: 0.72rem;
}

.player-table th:first-child,
.player-table td:first-child,
.comparison-table th:first-child,
.comparison-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--dl-white);
  text-align: left;
}

.player-table th,
.comparison-table th {
  color: var(--dl-muted);
  font-size: 0.65rem;
  text-transform: uppercase;
}

.player-table td:first-child { color: var(--dl-red); font-weight: 800; }

.player-table details summary {
  color: var(--dl-red);
  font-weight: 800;
  cursor: pointer;
}

.player-table details span {
  display: block;
  min-width: 260px;
  margin-top: 5px;
  color: var(--dl-muted);
  font-size: 0.66rem;
  font-weight: 500;
}

.table-team-button,
.table-open-button {
  padding: 0;
  border: 0;
  color: inherit;
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.table-team-button {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  width: 100%;
}

.table-team-button strong,
.table-team-button span {
  display: block;
}

.table-team-button strong { color: var(--dl-navy); }
.table-team-button span { overflow: hidden; margin-top: 0; color: var(--dl-muted); font-size: 0.66rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.table-open-button { min-width: 44px; min-height: 44px; color: var(--dl-red); font-size: 1.3rem; text-align: center; }

.compare-picker,
.comparison-content,
.methodology-shell > div:last-child {
  padding: 18px 16px;
}

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

.compare-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--dl-line-strong);
  border-radius: var(--dl-radius);
  font-size: 0.76rem;
  font-weight: 750;
}

.compare-option input {
  width: 20px;
  height: 20px;
  accent-color: var(--dl-red);
}

.compare-option em {
  margin-left: auto;
  color: var(--dl-muted);
  font-size: 0.68rem;
  font-style: normal;
  font-variant-numeric: tabular-nums;
}

.comparison-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}

.comparison-toolbar p { margin: 0; color: var(--dl-muted); font-size: 0.76rem; }
.comparison-trends { display: grid; gap: 14px; margin-top: 18px; }
.comparison-empty { min-height: 180px; }

.methodology-content,
#methodology-content {
  display: grid;
  gap: 22px;
}

#methodology-content section {
  display: grid;
  gap: 7px;
}

#methodology-content h3,
#methodology-content p,
#methodology-content ul { margin: 0; }
#methodology-content h3 { color: var(--dl-navy); font-size: 1rem; }
#methodology-content p,
#methodology-content li { color: var(--dl-muted); font-size: 0.82rem; }
#methodology-content ul { padding-left: 20px; }

.export-shell {
  gap: 18px;
  padding-bottom: 24px;
}

.export-shell > label,
.export-shell > fieldset,
.export-shell > .form-error,
.export-shell > .primary-button {
  margin-right: 16px;
  margin-left: 16px;
}

.export-shell > label { margin-top: 4px; }

.export-shell fieldset {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--dl-line);
  border-radius: var(--dl-radius);
}

.export-shell legend {
  color: var(--dl-navy);
  font-size: 0.76rem;
  font-weight: 800;
}

.export-shell fieldset label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  font-size: 0.78rem;
  font-weight: 700;
}

.export-shell input[type="radio"] {
  width: 20px;
  height: 20px;
  accent-color: var(--dl-red);
}

.form-error {
  padding: 10px;
  border-left: 3px solid var(--dl-red);
  background: var(--dl-red-soft);
  color: #7a1018;
  font-size: 0.76rem;
  font-weight: 700;
}

.toast {
  position: fixed;
  right: 16px;
  bottom: calc(80px + var(--dl-safe-bottom));
  z-index: 100;
  max-width: calc(100% - 32px);
  padding: 11px 14px;
  border-radius: var(--dl-radius);
  background: var(--dl-navy);
  color: var(--dl-white);
  font-size: 0.78rem;
  font-weight: 750;
  box-shadow: var(--dl-shadow);
}

.noscript-state {
  margin: 16px;
  padding: 16px;
  border: 1px solid var(--dl-red);
  color: var(--dl-navy);
}

.ranking-bars {
  display: grid;
  gap: 10px;
}

.ranking-bar {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--dl-navy);
  text-align: left;
}

.ranking-bar > span:first-child { white-space: nowrap; }

.ranking-bar > span:first-child,
.ranking-bar strong,
.ranking-bar em {
  font-size: 0.72rem;
  font-style: normal;
  font-variant-numeric: tabular-nums;
  font-weight: 850;
}

.bar-track {
  position: relative;
  height: 10px;
  overflow: hidden;
  background: var(--dl-soft-2);
}

.bar-track i {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--bar-width, 0%);
  background: var(--dl-red);
}

.chart-help {
  margin: 16px 0 0;
  color: var(--dl-muted);
  font-size: 0.7rem;
}

.rank-change-list {
  display: grid;
  gap: 8px;
}

.rank-change-item {
  display: grid;
  grid-template-columns: 42px 26px minmax(0, 1fr) 26px;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  font-size: 0.7rem;
  font-weight: 750;
}

.rank-change-line {
  position: relative;
  height: 2px;
  background: var(--dl-line-strong);
}

.rank-change-line::before,
.rank-change-line::after {
  position: absolute;
  top: 50%;
  width: 8px;
  height: 8px;
  border: 2px solid var(--dl-white);
  border-radius: 50%;
  background: var(--dl-navy);
  content: "";
  transform: translateY(-50%);
}

.rank-change-line::before { left: 0; }
.rank-change-line::after { right: 0; background: var(--dl-red); }

.chart-empty,
.definition-note {
  margin: 12px 0 0;
  color: var(--dl-muted);
  font-size: 0.72rem;
}

.distribution-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  color: var(--dl-muted);
  font-size: 0.66rem;
  font-variant-numeric: tabular-nums;
}

.bucket-list {
  margin-top: 12px;
  border-top: 1px solid var(--dl-line);
}

.bucket-list > div {
  display: grid;
  grid-template-columns: 1fr 0.8fr 0.9fr;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--dl-line);
  font-size: 0.72rem;
}

.bucket-list span { color: var(--dl-muted); }
.bucket-list em { color: var(--dl-red); font-style: normal; font-weight: 800; text-align: right; }
.detail-panel-wide { grid-column: 1 / -1; }

.distribution-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  min-height: 150px;
  padding-top: 12px;
  border-bottom: 1px solid var(--dl-navy);
}

.distribution-bars i {
  flex: 1 1 0;
  min-width: 3px;
  height: var(--height, 10%);
  background: var(--dl-red);
}

.trend-svg,
.round-bars-svg {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 14px;
  overflow: visible;
}

.trend-svg text,
.round-bars-svg text {
  fill: var(--dl-muted);
  font: 650 10px Inter, ui-sans-serif, system-ui, sans-serif;
}

.trend-svg .axis,
.round-bars-svg .axis { stroke: var(--dl-line-strong); stroke-width: 1; }
.trend-svg .series { fill: none; stroke: var(--dl-red); stroke-width: 2.5; }
.trend-svg .point { fill: var(--dl-white); stroke: var(--dl-red); stroke-width: 2; }
.round-bars-svg .bar { fill: var(--dl-red); }

@media (min-width: 560px) {
  .lab-intro {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .intro-actions .primary-button { width: auto; }
  .metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .metric-grid > div:nth-child(2n) { border-right: 1px solid var(--dl-line); }
  .metric-grid > div:nth-child(3n) { border-right: 0; }
  .preset-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .detail-metric-band { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .detail-metric-band > div:nth-child(2n) { border-right: 1px solid var(--dl-line); }
  .detail-metric-band > div:nth-child(3n) { border-right: 0; }
}

@media (min-width: 760px) {
  .lab-header { padding-inline: 20px; }
  .lab-brand { font-size: 1.25rem; }
  .lab-nav { display: flex; justify-content: center; }
  .lab-menu { display: none; }
  .lab-nav a { padding-inline: 16px; font-size: 0.82rem; }
  .lab-intro { padding: 28px 28px 20px; }
  .preset-strip { padding-inline: 22px; }
  .analysis-status { padding-inline: 28px; }
  .notice { margin-right: 28px; margin-left: 28px; }
  .panel-heading { padding-inline: 28px; }
  .organization-summary { grid-template-columns: 44px minmax(0, 1fr) 150px 44px; padding-inline: 24px; }
  .organization-details { padding-right: 28px; padding-left: 76px; }
  .metric-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .metric-grid > div { border-right: 1px solid var(--dl-line); }
  .metric-grid > div:nth-child(3n) { border-right: 1px solid var(--dl-line); }
  .metric-grid > div:nth-child(6n) { border-right: 0; }
  .secondary-analysis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .unavailable-panel { grid-column: 1 / -1; }
  .trust-section { grid-template-columns: minmax(0, 1fr) auto; padding: 34px 28px; }
  .lab-footer { padding-inline: 28px; }
  .detail-metric-band { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .detail-metric-band > div,
  .detail-metric-band > div:nth-child(2n),
  .detail-metric-band > div:nth-child(3n) { border-right: 1px solid var(--dl-line); }
  .detail-metric-band > div:nth-child(6n) { border-right: 0; }
  .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .comparison-trends { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fact-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .fact-strip > div,
  .fact-strip > div:nth-child(2n) { border-right: 1px solid var(--dl-line); }
  .fact-strip > div:nth-child(4n) { border-right: 0; }
}

@media (min-width: 1000px) {
  :root { --dl-header-height: 62px; }

  .draft-lab { padding-bottom: 0; }
  .lab-header { grid-template-columns: auto minmax(0, 1fr) auto; padding-inline: 28px; }
  .header-actions { display: flex; align-items: center; gap: 4px; }
  .lab-intro { padding: 28px 32px 20px; }
  .preset-strip { gap: 14px; padding: 8px 28px; }
  .preset-strip a { position: relative; min-height: 50px; padding-inline: 12px; border: 0; border-radius: 0; }
  .preset-strip a:hover,
  .preset-strip a[aria-current="true"] { box-shadow: inset 0 -3px 0 var(--dl-red); }
  .analysis-status { display: none; }
  .notice { margin: 10px 32px 0; }
  .mobile-only,
  .mobile-ranking-list,
  .mobile-action-bar { display: none !important; }

  .lab-workspace {
    display: grid;
    grid-template-columns: 224px minmax(620px, 1fr) minmax(260px, 29vw);
    border-bottom: 1px solid var(--dl-line);
  }

  .filter-rail,
  .chart-panel {
    display: block;
    min-width: 0;
    background: var(--dl-white);
  }

  .filter-rail {
    padding: 18px 16px 28px;
    border-right: 1px solid var(--dl-line);
  }

  .rail-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
  }

  .rail-heading strong { color: var(--dl-navy); font-size: 0.82rem; }
  .rail-heading span { color: var(--dl-muted); font-size: 0.66rem; font-weight: 750; }
  .compact-controls { display: grid; gap: 12px; }
  .compact-field { display: grid; gap: 5px; }
  .compact-field span { color: var(--dl-navy); font-size: 0.68rem; font-weight: 800; }
  .compact-field select { width: 100%; min-height: 40px; padding: 0 9px; border: 1px solid var(--dl-line-strong); border-radius: 5px; background: var(--dl-white); font-size: 0.75rem; }
  .filter-rail .primary-button,
  .filter-rail .secondary-button { width: 100%; margin-top: 14px; font-size: 0.75rem; }

  .ranking-panel { border-right: 1px solid var(--dl-line); border-bottom: 0; }
  .panel-heading { min-height: 78px; padding: 18px 20px 12px; }
  .panel-heading h2 { font-size: 1.25rem; }
  .column-key { margin: 0 20px 14px; }
  .column-key dl { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
  .desktop-table-wrap { display: block; overflow-x: auto; }
  .ranking-table { width: 100%; min-width: 760px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
  .ranking-table thead th { height: 44px; padding: 0; border-bottom: 1px solid var(--dl-line); background: var(--dl-white); }
  .ranking-table thead th button { display: inline-flex; align-items: center; justify-content: center; width: 100%; min-height: 44px; padding: 0 7px; border: 0; background: transparent; color: var(--dl-muted); font-size: 0.62rem; font-weight: 800; }
  .ranking-table thead th:nth-child(2) button { justify-content: flex-start; }
  .ranking-table thead th[aria-sort="ascending"] button,
  .ranking-table thead th[aria-sort="descending"] button { color: var(--dl-red); }
  .ranking-table td { height: 54px; padding: 8px 7px; border-bottom: 1px solid var(--dl-line); color: var(--dl-navy); font-size: 0.7rem; text-align: center; }
  .ranking-table tbody th { height: 54px; max-width: 180px; padding: 8px 7px; border-bottom: 1px solid var(--dl-line); background: var(--dl-white); text-align: left; }
  .ranking-table tbody tr:hover td,
  .ranking-table tbody tr:hover th { background: var(--dl-soft); }
  .ranking-table tbody tr[data-selected="true"] td,
  .ranking-table tbody tr[data-selected="true"] th { background: #f1f5ff; }
  .ranking-table tbody tr[data-selected="true"] td:first-child { box-shadow: inset 3px 0 0 var(--dl-blue); }
  .table-team { display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: baseline; gap: 6px; }
  .table-team strong { font-size: 0.72rem; }
  .table-team span { overflow: hidden; color: var(--dl-muted); font-size: 0.62rem; text-overflow: ellipsis; white-space: nowrap; }
  .table-score { color: var(--dl-red) !important; font-weight: 900; }
  .table-change.positive { color: var(--dl-green); font-weight: 800; }
  .table-change.negative { color: var(--dl-gold); font-weight: 800; }
  .table-open { width: 36px; height: 36px; padding: 0; border: 0; background: transparent; }
  .table-compare { width: 18px; height: 18px; accent-color: var(--dl-red); }

  .chart-panel { padding: 20px 18px; }
  .chart-heading { align-items: center; }
  .ranking-bars { margin-top: 18px; }
  .ranking-bar { grid-template-columns: 62px minmax(0, 1fr) 42px; }
  .methodology-band { grid-template-columns: 170px minmax(0, 1fr) auto; align-items: center; padding: 22px 32px; }
  .methodology-band dl { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .secondary-analysis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .unavailable-panel { grid-column: auto; min-height: 250px; align-content: center; }
  .lab-footer { padding-bottom: 30px; }

  .filter-dialog,
  .detail-dialog,
  .compare-dialog,
  .methodology-dialog,
  .export-dialog {
    height: auto;
    max-height: min(820px, calc(100vh - 48px));
    margin: auto;
    border: 1px solid var(--dl-line-strong);
    border-radius: 10px;
    box-shadow: var(--dl-shadow);
  }

  .filter-dialog { width: min(760px, calc(100% - 48px)); }
  .detail-dialog { width: min(1180px, calc(100% - 48px)); }
  .compare-dialog { width: min(1120px, calc(100% - 48px)); }
  .methodology-dialog { width: min(780px, calc(100% - 48px)); }
  .export-dialog { width: min(520px, calc(100% - 48px)); }
  .dialog-shell,
  .detail-shell,
  .compare-shell,
  .methodology-shell,
  .export-shell { min-height: 0; max-height: inherit; }
  .dialog-content { padding-bottom: 90px; }
  .dialog-actions { position: sticky; }
  .detail-shell { overflow: auto; }
}

@media (min-width: 1320px) {
  .lab-workspace { grid-template-columns: 246px minmax(720px, 1fr) 360px; }
  .ranking-table td { font-size: 0.73rem; }
  .ranking-table th button { font-size: 0.64rem; }
}

/* Shared site chrome: identical navigation and footer treatment. */
.header-actions { display: none !important; }

.lab-footer {
  justify-content: center;
  gap: 12px;
  padding: 24px 14px calc(86px + var(--dl-safe-bottom));
  border-top: 1px solid var(--dl-line);
  background: var(--dl-navy);
  color: #dce3ed;
  font-size: 0.85rem;
}

.lab-footer span {
  flex-basis: 100%;
  width: auto;
  color: var(--dl-white);
  text-align: center;
}

.lab-footer a:hover,
.lab-footer a:focus-visible { color: var(--dl-white); }

@media (max-width: 640px) {
  .lab-header {
    min-height: 96px;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 46px 50px;
    gap: 0;
    padding: 0;
  }

  .lab-brand {
    display: flex;
    align-items: center;
    min-height: 46px;
    padding: 0 14px;
    border-bottom: 1px solid var(--dl-line);
    font-size: 1rem;
  }

  .lab-nav {
    display: flex;
    justify-content: flex-start;
    width: 100%;
    min-height: 50px;
    margin: 0;
    padding: 0 6px;
  }

  .lab-nav a { min-height: 50px; padding: 0 10px; }
  .lab-menu { display: none; }
}

@media (min-width: 641px) and (max-width: 759px) {
  .lab-nav { display: flex; justify-content: flex-end; }
  .lab-menu { display: none; }
}

@media (min-width: 1000px) {
  .lab-header { grid-template-columns: auto minmax(0, 1fr); }
  .lab-footer { padding-bottom: 34px; }
}

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

@media print {
  .lab-header,
  .lab-menu,
  .preset-strip,
  .filter-rail,
  .mobile-action-bar,
  .header-actions,
  .panel-actions,
  .lab-footer { display: none !important; }
  .draft-lab { padding: 0; }
  .lab-workspace { display: block; }
  .chart-panel { display: block; }
}
