/* Assembled stylesheet. Edit the ordered parts listed in source/manifest.json, then run npm run build:gui from the repository root. */
/*
 * Source section 1/53: overview and initialization.
 * Assembles into styles/base.css.
 * Rules remain in their original cascade order; later sections may intentionally override these
 * declarations.
 */
/**
 * styles/base.css
 *
 * Defines the foundational interface variables and base layouts for menus, panels, controls, metadata tables,
 * dialogs and SVG presentation. Later application/component styles refine these rules.
 */
/* Copyright (c) 2026 Mostafa Abdel-Glil. */
/* SPDX-License-Identifier: MIT */
:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --panel-2: #f9fbff;
  --text: #172033;
  --muted: #6f7b91;
  --border: #dce3ef;
  --border-strong: #c8d3e3;
  --accent: #375dfb;
  --accent-soft: #eef2ff;
  --accent-2: #6d5dfc;
  --good: #16794b;
  --good-soft: #e9f7ef;
  --warn: #a15c00;
  --warn-soft: #fff6df;
  --danger: #b42318;
  --danger-soft: #fff0ef;
  --shadow: 0 10px 35px rgba(35, 48, 80, 0.08);
  --radius: 14px;
  --radius-sm: 9px;
  --app-font-family: 'Noto Sans', 'Segoe UI', system-ui, Arial, sans-serif;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--app-font-family);
  background: var(--bg);
  color: var(--text);
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
.hidden {
  display: none !important;
}
.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}
.topbar {
  height: 64px;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 0 18px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 250px;
}
.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.04em;
}
.brand-name {
  font-weight: 760;
  font-size: 16px;
}
.brand-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 1px;
}
.toolbar {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.toolbar-btn,
.icon-btn,
.mini-btn,
.view-tab,
.control-tab,
.button-grid button,
.wide-btn,
.log-toolbar button,
.zoom-dock button,
.node-menu button {
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  border-radius: 8px;
  padding: 7px 10px;
  transition: 0.15s ease;
}
.toolbar-btn:hover,
.icon-btn:hover,
.mini-btn:hover,
.view-tab:hover,
.control-tab:hover,
.button-grid button:hover,
.wide-btn:hover,
.log-toolbar button:hover,
.zoom-dock button:hover,
.node-menu button:hover {
  border-color: var(--border-strong);
  background: #f7f9fd;
}
.toolbar-btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 700;
}
.toolbar-btn.strong {
  font-weight: 650;
}
.toolbar-sep {
  height: 24px;
  width: 1px;
  background: var(--border);
  margin: 0 2px;
}
.icon-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  display: grid;
  place-items: center;
  font-size: 19px;
}
.modebar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 6px 18px;
  background: #fbfcfe;
  border-bottom: 1px solid var(--border);
}
.mode-pill {
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #3149b7;
}
.view-switch {
  display: flex;
  gap: 4px;
}
.view-tab {
  font-size: 12px;
  padding: 6px 10px;
  background: transparent;
}
.view-tab.active {
  background: var(--panel);
  border-color: var(--border-strong);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  font-weight: 700;
}
.modebar-spacer,
.statusbar-spacer {
  flex: 1;
}
.status-compact {
  font-size: 12px;
  color: var(--muted);
}
.workspace-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: 310px minmax(520px, 1fr) 340px;
  gap: 12px;
  padding: 12px;
}
.left-panel,
.right-panel {
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.panel-card,
.control-group {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 1px 1px rgba(20, 30, 50, 0.02);
}
.panel-card {
  padding: 14px;
}
.panel-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-weight: 800;
}
.panel-card h2,
.control-group h3 {
  margin: 3px 0 0;
}
.panel-card h2 {
  font-size: 15px;
}
.panel-copy {
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
  margin: 10px 0 12px;
}
.file-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin: 8px 0;
  background: var(--panel-2);
  cursor: pointer;
}
.file-card:hover {
  border-color: #acbad1;
  background: #f6f9ff;
}
.file-flag {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--accent-soft);
  color: #324bbd;
  font-weight: 800;
  font-size: 12px;
}
.file-card-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.file-card-body strong {
  font-size: 13px;
}
.file-card-body span {
  font-size: 11px;
  color: var(--muted);
}
.file-card-body small {
  margin-top: 2px;
  color: #40506a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-action {
  font-size: 11px;
  color: var(--accent);
  font-weight: 700;
}
.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.compact-grid {
  margin-top: 10px;
}
.field-grid label,
.control-group label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 11px;
  color: #4b5870;
}
.control-group label + label {
  margin-top: 9px;
}
input[type='text'],
input[type='number'],
select {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 6px 8px;
  outline: none;
}
input:focus,
select:focus {
  border-color: #879bf8;
  box-shadow: 0 0 0 3px rgba(55, 93, 251, 0.1);
}
.input-summary {
  margin-top: 12px;
  padding: 10px;
  border-radius: 9px;
  background: #f5f8ff;
  border: 1px solid #dde5ff;
  color: #46546c;
  font-size: 11px;
  line-height: 1.45;
}
.command-preview {
  white-space: pre-wrap;
  word-break: break-word;
  background: #111827;
  color: #dce4f3;
  border-radius: 10px;
  padding: 10px;
  font-size: 10px;
  line-height: 1.5;
  max-height: 150px;
  overflow: auto;
}
.collapsed-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
  max-height: 220px;
  overflow: auto;
}
.collapsed-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fbfcff;
}
.collapsed-item small {
  color: var(--muted);
}
.empty-mini {
  font-size: 11px;
  color: var(--muted);
  padding: 8px 0;
}
.plot-shell {
  min-width: 0;
  min-height: 0;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  position: relative;
}
.plot-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(#fff, #fbfcff);
}
.plot-title {
  font-weight: 800;
  font-size: 16px;
}
.plot-subtitle {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
  max-width: 760px;
  line-height: 1.45;
  white-space: pre-line;
}
.plot-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.badge {
  font-size: 10px;
  padding: 5px 8px;
  border-radius: 999px;
  background: #f1f4f9;
  border: 1px solid var(--border);
  color: #506078;
}
.badge.good {
  background: var(--good-soft);
  border-color: #ccebd8;
  color: var(--good);
}
.plot-view {
  display: none;
  min-height: 0;
  position: relative;
}
.plot-view.active {
  display: flex;
  flex-direction: column;
}
.plot-scroller {
  min-height: 0;
  overflow: auto;
  flex: 1;
  background: #fff;
}
.plot-svg {
  display: block;
  min-width: 100%;
  min-height: 100%;
  background: #fff;
}
.zoom-dock {
  position: absolute;
  left: 14px;
  bottom: 14px;
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px;
  box-shadow: 0 4px 18px rgba(20, 30, 50, 0.1);
}
.zoom-dock span {
  min-width: 48px;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
}
.compact-intro {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.compact-intro span {
  color: var(--muted);
}
.log-toolbar {
  padding: 10px;
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--border);
}
.log-output {
  margin: 0;
  padding: 14px;
  white-space: pre-wrap;
  overflow: auto;
  min-height: 0;
  flex: 1;
  background: #0f172a;
  color: #cbd5e1;
  font-size: 11px;
  line-height: 1.55;
}
/*
 * Source section 2/53: error banner.
 * Assembles into styles/base.css.
 * Rules remain in their original cascade order; later sections may intentionally override these
 * declarations.
 */
.error-banner {
  position: absolute;
  left: 18px;
  right: 18px;
  top: 84px;
  z-index: 20;
  padding: 11px 13px;
  border-radius: 10px;
  background: var(--danger-soft);
  border: 1px solid #fac7c3;
  color: var(--danger);
  font-size: 12px;
  box-shadow: 0 8px 30px rgba(180, 35, 24, 0.1);
}
.right-panel {
  background: transparent;
}
.control-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  background: var(--panel);
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 12px;
  position: sticky;
  top: 0;
  z-index: 5;
}
.control-tab {
  font-size: 11px;
  padding: 7px 4px;
  background: transparent;
}
.control-tab.active {
  background: var(--accent-soft);
  color: #3149b7;
  border-color: #dfe5ff;
  font-weight: 800;
}
.control-page {
  display: none;
  gap: 10px;
  flex-direction: column;
}
.control-page.active {
  display: flex;
}
.control-group {
  padding: 13px;
}
.control-group h3 {
  font-size: 13px;
  margin-bottom: 10px;
}
.check-row {
  flex-direction: row !important;
  align-items: center;
  gap: 8px !important;
}
.check-row input {
  width: 16px;
  height: 16px;
}
.hint {
  font-size: 10px;
  line-height: 1.45;
  color: var(--muted);
  margin-top: 7px;
}
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}
.stat {
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 8px;
  background: #fafcff;
}
.stat b {
  display: block;
  font-size: 14px;
}
.stat span {
  font-size: 9px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.selection-card {
  padding: 9px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fafcff;
  font-size: 11px;
  line-height: 1.45;
  margin-bottom: 8px;
}
.button-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}
.button-grid button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.wide-btn {
  width: 100%;
  margin: 4px 0;
}
.node-menu {
  position: absolute;
  z-index: 30;
  width: 190px;
  padding: 7px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 36px rgba(20, 30, 50, 0.18);
}
.node-menu-name {
  padding: 6px 8px;
  font-size: 11px;
  font-weight: 800;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.node-menu button {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  font-size: 11px;
}
.statusbar {
  height: 28px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  background: #eef2f8;
  border-top: 1px solid var(--border);
  font-size: 10px;
  color: #65728a;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.38);
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 100;
}
.modal {
  width: min(720px, 95vw);
  max-height: 90vh;
  overflow: auto;
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.22);
  padding: 18px;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal h2 {
  margin: 0;
}
.help-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 16px 0;
}
.help-grid > div {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
}
.help-grid h3 {
  font-size: 12px;
  margin: 0 0 6px;
}
.help-grid code {
  font-size: 10px;
  word-break: break-all;
}
.modal p {
  font-size: 12px;
  line-height: 1.55;
  color: #56637a;
}
/* SVG */
.svg-title {
  font-weight: 800;
  fill: #111827;
}
.svg-subtitle {
  fill: #667085;
}
.tree-edge {
  fill: none;
}
.tip-label,
.meta-cell,
.support-label,
.legend-label,
.axis-label,
.axis-title,
.header-label {
  dominant-baseline: middle;
}
.node-hit {
  cursor: pointer;
}
.collapsed-wedge {
  fill: #eef2ff;
  stroke: #7286e8;
  stroke-width: 1;
}
.selected-node {
  stroke: #111827 !important;
  stroke-width: 2.5 !important;
}
[data-tip-kind='point'].tree-muted-tip {
  fill: #d1d5db !important;
  stroke: #d1d5db !important;
  opacity: 0.25 !important;
}
.tree-selected-metadata {
  opacity: 1 !important;
  fill-opacity: 1 !important;
}
text.tree-selected-metadata {
  font-weight: 700;
  paint-order: stroke fill;
  stroke: #ffffff;
  stroke-width: 0.4;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.legend-box {
  fill: rgba(255, 255, 255, 0.95);
  stroke: #dce3ef;
}
.cutoff-line {
  stroke: #64748b;
  stroke-dasharray: 5 4;
}
.axis-line {
  stroke: #5f6b7a;
}
.connector {
  fill: none;
}
.pub-label {
  font-size: 8px;
  fill: #263248;
}
@media (max-width: 1200px) {
  .workspace-grid {
    grid-template-columns: 270px minmax(480px, 1fr) 310px;
  }
  .brand {
    min-width: 210px;
  }
  .toolbar-btn {
    padding: 6px 8px;
    font-size: 12px;
  }
}
@media (max-width: 980px) {
  .workspace-grid {
    grid-template-columns: 1fr;
  }
  .left-panel,
  .right-panel {
    overflow: visible;
  }
  .plot-shell {
    min-height: 650px;
  }
  .topbar {
    height: auto;
    min-height: 64px;
    align-items: flex-start;
    padding-top: 10px;
    padding-bottom: 10px;
  }
  .toolbar {
    flex: 1;
  }
  .brand {
    min-width: auto;
  }
  .control-tabs {
    position: static;
  }
}
@media print {
  body {
    background: #fff;
  }
  .topbar,
  .modebar,
  .left-panel,
  .right-panel,
  .statusbar,
  .zoom-dock,
  .compact-intro,
  .log-toolbar {
    display: none !important;
  }
  .workspace-grid {
    display: block;
    padding: 0;
  }
  .plot-shell {
    border: 0;
    box-shadow: none;
  }
  .plot-header {
    border: 0;
  }
  .plot-view {
    display: none !important;
  }
  .plot-view.active {
    display: flex !important;
  }
  .plot-scroller {
    overflow: visible;
  }
  .plot-svg {
    width: 100% !important;
    height: auto !important;
  }
}
.clear-input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  margin-top: 8px;
}
.clear-input-row button {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--muted);
  border-radius: 7px;
  padding: 5px;
  font-size: 10px;
}
.clear-input-row button:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

/* Professional live analysis controls */
.analysis-config {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}
.config-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 11px;
  color: #4b5870;
}
.cutoff-control {
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 11px;
  background: linear-gradient(180deg, #fbfcff, #f7f9ff);
}
.cutoff-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.cutoff-head > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cutoff-label {
  font-size: 12px;
  font-weight: 750;
  color: var(--text);
}
.cutoff-head small {
  font-size: 9px;
  color: var(--muted);
}
.cutoff-number {
  width: 82px !important;
  min-height: 32px !important;
  text-align: right;
  font-weight: 700;
}
.cutoff-slider {
  width: 100%;
  margin: 12px 0 2px;
  accent-color: var(--accent);
}
.cutoff-slider:disabled,
.cutoff-number:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.cutoff-scale {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: var(--muted);
}
.live-cluster-summary {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 8px;
  padding: 10px 11px;
  border-radius: 9px;
  background: var(--good-soft);
  border: 1px solid #ccebd8;
}
.live-cluster-summary strong {
  font-size: 12px;
  color: var(--good);
}
.live-cluster-summary span {
  font-size: 10px;
  color: #4f6f60;
  line-height: 1.35;
}
.config-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 10px;
}
.config-summary > div {
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fafcff;
  min-width: 0;
}
.config-summary span {
  display: block;
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 2px;
}
.config-summary strong {
  display: block;
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-flag {
  font-size: 11px;
}
.toolbar-btn.primary {
  box-shadow: 0 2px 8px rgba(55, 93, 251, 0.2);
}

.version-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  vertical-align: 1px;
  background: #f7f9fc;
}

/* Desktop-style application menus and direct manipulation */
.topbar {
  height: auto;
  min-height: 66px;
  align-items: center;
  flex-wrap: wrap;
  padding-top: 8px;
  padding-bottom: 8px;
}
.brand {
  flex: 0 0 auto;
}
.menubar {
  display: flex;
  align-items: center;
  gap: 1px;
  flex: 1;
  min-width: 420px;
  position: relative;
  z-index: 80;
}
.menu-root {
  position: relative;
}
/*
 * Source section 3/53: menu trigger.
 * Assembles into styles/base.css.
 * Rules remain in their original cascade order; later sections may intentionally override these
 * declarations.
 */
.menu-trigger {
  border: 0;
  background: transparent;
  color: var(--text);
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}
.menu-trigger:hover,
.menu-trigger[aria-expanded='true'] {
  background: #eef2f8;
  color: #21304b;
}
.menu-dropdown {
  position: absolute;
  display: none;
  top: calc(100% + 6px);
  left: 0;
  min-width: 230px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  box-shadow: 0 16px 42px rgba(20, 30, 50, 0.18);
  z-index: 100;
}
.menu-dropdown.open {
  display: block;
}
.menu-dropdown-right {
  left: auto;
  right: 0;
}
.menu-dropdown button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  padding: 8px 9px;
  border-radius: 6px;
  font-size: 11px;
  white-space: nowrap;
  cursor: pointer;
}
.menu-dropdown button:hover,
.menu-dropdown button:focus-visible {
  background: var(--accent-soft);
  outline: none;
}
.menu-dropdown button span {
  font-size: 9px;
  color: var(--muted);
  font-weight: 400;
}
.menu-divider {
  height: 1px;
  background: var(--border);
  margin: 5px 4px;
}
.toolbar {
  margin-left: auto;
}
.interaction-hint {
  font-size: 10px;
  color: var(--muted);
  padding-right: 8px;
  white-space: nowrap;
}
.plot-scroller {
  cursor: grab;
  overscroll-behavior: contain;
  touch-action: none;
}
.plot-scroller.is-panning {
  cursor: grabbing;
  user-select: none;
}
.tree-canvas-stage {
  position: relative;
  display: flex;
  flex: 1;
  min-width: 0;
  min-height: 0;
}
/* Match the interactive map's top-right navigation control. */
.tree-canvas-zoom {
  position: absolute;
  top: 12px;
  right: 28px;
  z-index: 2;
  overflow: hidden;
  border: 1px solid #d9dcde;
  border-radius: 5px;
  background: #fff;
  box-shadow: 0 1px 2px rgb(0 0 0 / 8%);
}
.tree-canvas-zoom > button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 29px;
  height: 29px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #fff;
  color: #333;
  cursor: pointer;
}
.tree-canvas-zoom > button + button { border-top: 1px solid #ddd; }
.tree-canvas-zoom > button:hover { background: #f2f2f2; }
.tree-canvas-zoom > button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.tree-canvas-zoom > button:disabled { color: #aaa; cursor: default; }
#app #workspaceDocumentArea .tree-canvas-zoom svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3.2;
  stroke-linecap: round;
}
@media print { .tree-canvas-zoom { display: none; } }
/* Pointer capture owns an active drag. Keep navigation classes off descendant
   selectors: invalidating every SVG cell makes large annotated trees stall. */
.tree-canvas-plane {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: clip;
  contain: layout style paint;
  background: #fff;
}
.plot-scroller { scrollbar-gutter: stable; }
.tree-canvas-position {
  transform-origin: 0 0;
}
.tree-canvas-position > .plot-svg {
  display: block;
  min-width: 0;
  min-height: 0;
  transform-origin: 0 0;
}
/* Promote only moving canvases. Persistent compositing can retain a low-scale
   texture of a tall tree long after zoom finishes. Native vectors paint at rest. */
.plot-scroller:is(.is-navigating,.is-panning) .plot-svg:not(.tree-navigation-preview-active),
.tree-navigation-preview-layer {
  will-change: transform;
}
@media print {
  .tree-canvas-plane {
    width: auto !important;
    height: auto !important;
    overflow: visible;
    contain: none;
  }
  .tree-canvas-position {
    width: auto !important;
    height: auto !important;
    transform: none !important;
    will-change: auto !important;
  }
  .tree-canvas-position > .plot-svg {
    transform: none !important;
    will-change: auto !important;
  }
}
.tree-table-mode-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: auto !important;
  min-width: 26px !important;
  padding: 3px 6px !important;
  white-space: nowrap;
}
.tree-table-mode-btn.active {
  color: #315fc4 !important;
  border-color: #4d83f1 !important;
  background: #edf4ff !important;
}
.tree-table-grid {
  fill: none;
  stroke: #cbd5e1;
  stroke-width: 1;
  pointer-events: none;
}
.tree-table-selection {
  fill: #3b82f618;
  stroke: #4d83f1;
  stroke-width: 1;
}
.tree-table-column .meta-cell {
  cursor: text;
}
.tree-table-column .tree-table-readonly {
  cursor: default;
}
.tree-table-header-hit {
  cursor: grab;
}
.tree-table-resize {
  cursor: col-resize;
  touch-action: none;
  outline: none;
}
.tree-table-resize:hover,
.tree-table-resize:focus {
  fill: #4d83f11a;
  stroke: #4d83f1;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.tree-table-resizing,
.tree-table-resizing * {
  cursor: col-resize !important;
  user-select: none;
}
body.interaction-off .tree-table-column .meta-cell,
body.interaction-off .tree-table-resize,
body.interaction-off .tree-table-header-hit {
  cursor: default;
}
.tree-table-editor {
  position: fixed;
  z-index: 65000;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  box-sizing: border-box;
  max-width: calc(100vw - 16px);
  padding: 5px;
  border: 1px solid #4d83f1;
  border-radius: 5px;
  background: #fff;
  box-shadow: 0 5px 18px #24354b30;
  font:
    12px Arial,
    sans-serif;
}
.tree-table-editor input {
  flex: 1 1 100%;
  min-width: 0;
  box-sizing: border-box;
  height: 29px;
  padding: 4px 6px;
  border: 1px solid #cbd5e1;
  border-radius: 3px;
  font: inherit;
  color: #304158;
}
.tree-table-editor button {
  height: 25px;
  padding: 3px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #f7f9fc;
  color: #304158;
  cursor: pointer;
  font: inherit;
}
.tree-table-editor button:first-of-type {
  background: #edf4ff;
  color: #315fc4;
  border-color: #9ab9ed;
}
.tree-table-edit-message {
  flex: 1 1 100%;
  font-size: 11px;
  color: #a52a2a;
}
.tree-table-edit-message:empty {
  display: none;
}
.tree-table-filter {
  cursor: pointer;
  outline: none;
}
.tree-table-filter:hover > rect,
.tree-table-filter:focus > rect {
  stroke: #315fc4;
  stroke-width: 2;
}
.clademap-popout-link-notice {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 9px 12px;
  margin: 4px;
  border: 1px solid #c6d6e6;
  border-radius: 5px;
  background: #f1f7fc;
  color: #334d67;
  font:
    12px/1.4 system-ui,
    'Segoe UI',
    sans-serif;
  grid-column: 1 / -1;
}
.tree-table-tree-handle {
  touch-action: none;
  cursor: nwse-resize;
  outline: none;
}
.tree-table-tree-handle[data-axis='horizontal'] {
  cursor: ew-resize;
}
.tree-table-tree-handle[data-axis='vertical'] {
  cursor: ns-resize;
}
.tree-table-tree-handle:hover,
.tree-table-tree-handle:focus {
  fill: #dceafa;
  stroke-width: 2;
}
.tree-table-filter-menu {
  position: fixed;
  z-index: 65001;
  box-sizing: border-box;
  max-height: calc(100vh - 16px);
  overflow: auto;
  padding: 12px;
  border: 1px solid #afc0d7;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 5px 18px #24354b30;
  font:
    12px/1.4 system-ui,
    'Segoe UI',
    sans-serif;
  color: #304158;
}
.tree-table-filter-menu p {
  margin: 6px 0;
  color: #61728a;
}
.tree-table-filter-menu input[type='search'] {
  box-sizing: border-box;
  width: 100%;
  margin: 6px 0;
  padding: 5px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font: inherit;
}
.tree-table-filter-values {
  max-height: 240px;
  overflow: auto;
  border-block: 1px solid #e0e6ee;
  padding-block: 4px;
  margin-bottom: 6px;
}
.tree-table-filter-value {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
}
.tree-table-filter-value label {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}
.tree-table-filter-value span {
  overflow-wrap: anywhere;
}
.tree-table-filter-value input[type='color'] {
  flex: 0 0 30px;
  width: 30px;
  height: 24px;
  padding: 1px;
  border: 1px solid #cbd5e1;
  border-radius: 3px;
}
.tree-table-filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}
.tree-table-filter-menu button {
  padding: 4px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #f7f9fc;
  color: inherit;
  cursor: pointer;
  font: inherit;
}
@media (max-width: 1100px) {
  .tree-table-mode-btn > span {
    display: none;
  }
}
.figure-draggable,
.metadata-header-draggable {
  cursor: move;
}
.figure-draggable:hover .drag-outline,
.metadata-header-draggable:hover {
  filter: brightness(0.92);
}
.legend-draggable {
  cursor: move;
}
.legend-draggable .legend-box {
  transition:
    stroke 0.12s ease,
    stroke-width 0.12s ease;
}
.legend-draggable:hover .legend-box {
  stroke: #8ca0ff;
  stroke-width: 1.5;
}
.metadata-header-draggable {
  paint-order: stroke fill;
  stroke: #fff;
  stroke-width: 2px;
  stroke-linejoin: round;
}
.metadata-dragging {
  opacity: 0.72;
}
.figure-dragging {
  opacity: 0.82;
}
.drag-badge {
  font-size: 8px;
  fill: #7a86a0;
  pointer-events: none;
}
@media (max-width: 1450px) {
  .menubar {
    order: 3;
    flex-basis: 100%;
    min-width: 0;
  }
  .toolbar {
    margin-left: auto;
  }
  .interaction-hint {
    display: none;
  }
}
@media (max-width: 980px) {
  .menubar {
    overflow-x: auto;
    padding-bottom: 2px;
  }
  .menu-dropdown {
    position: fixed;
    top: 74px;
    left: 12px;
    right: auto;
    max-width: calc(100vw - 24px);
  }
  .menu-dropdown-right {
    right: 12px;
    left: auto;
  }
}

.interaction-switch {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}
.interaction-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.switch-track {
  width: 34px;
  height: 19px;
  border-radius: 999px;
  background: #cfd7e6;
  position: relative;
  transition: 0.15s ease;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}
.switch-knob {
  position: absolute;
  width: 15px;
  height: 15px;
  left: 2px;
  top: 2px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(20, 30, 50, 0.22);
  transition: 0.15s ease;
}
.interaction-switch input:checked + .switch-track {
  background: var(--accent);
}
.interaction-switch input:checked + .switch-track .switch-knob {
  transform: translateX(15px);
}
.interaction-switch input:focus-visible + .switch-track {
  outline: 3px solid rgba(55, 93, 251, 0.18);
}
.switch-label {
  font-weight: 700;
  color: #4d5a70;
}
body.interaction-off .plot-scroller {
  cursor: default;
  touch-action: auto;
}
body.interaction-off .figure-draggable,
body.interaction-off .metadata-header-draggable,
body.interaction-off .legend-draggable {
  cursor: default;
}
body.interaction-off .interaction-hint {
  opacity: 0.55;
}

.supplied-cluster-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 9px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fafcff;
}
.supplied-cluster-fields.is-disabled {
  opacity: 0.5;
}

.control-tabs {
  grid-template-columns: repeat(3, 1fr);
}
/*
 * Source section 4/53: control group collapsible.
 * Assembles into styles/base.css.
 * Rules remain in their original cascade order; later sections may intentionally override these
 * declarations.
 */
.control-group.collapsible {
  padding: 0;
  overflow: hidden;
}
.section-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 0;
  background: transparent;
  padding: 12px 13px;
  text-align: left;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.section-toggle:hover {
  background: #f8faff;
}
.section-toggle .section-chevron {
  font-size: 11px;
  color: var(--muted);
  transition: transform 0.15s ease;
}
.section-toggle[aria-expanded='false'] .section-chevron {
  transform: rotate(-90deg);
}
.section-body {
  padding: 0 13px 13px;
}
.section-body.collapsed {
  display: none;
}

.metadata-dock {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 24;
  max-height: 42%;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  box-shadow: 0 18px 46px rgba(20, 30, 50, 0.18);
  overflow: hidden;
}
.metadata-dock-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 11px;
  border-bottom: 1px solid var(--border);
  background: #f8faff;
}
.metadata-dock-head > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.metadata-dock-head strong {
  font-size: 12px;
}
.metadata-dock-head span {
  font-size: 9px;
  color: var(--muted);
}
.metadata-dock-actions {
  display: flex;
  gap: 6px;
}
.metadata-dock-actions button {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 7px;
  padding: 5px 8px;
  font-size: 10px;
}
.metadata-dock-actions button:last-child {
  width: 28px;
}
.metadata-editor {
  overflow: auto;
  min-height: 120px;
  background: #fff;
}
.metadata-grid {
  border-collapse: separate;
  border-spacing: 0;
  width: max-content;
  min-width: 100%;
  font-size: 10px;
}
.metadata-grid th,
.metadata-grid td {
  border-right: 1px solid #e7ebf2;
  border-bottom: 1px solid #e7ebf2;
  padding: 5px 7px;
  min-width: 90px;
  max-width: 240px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.metadata-grid th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f3f6fb;
  text-align: left;
  font-weight: 800;
  color: #46546c;
}
.metadata-grid td[contenteditable='true'] {
  outline: none;
  background: #fff;
}
.metadata-grid td[contenteditable='true']:focus {
  background: #fffbea;
  box-shadow: inset 0 0 0 2px #f2c94c;
}
.metadata-grid .sample-col {
  position: sticky;
  left: 0;
  z-index: 1;
  background: #fafcff;
  font-weight: 700;
}
.metadata-grid th.sample-col {
  z-index: 3;
  background: #eef3fa;
}

.insight-table-wrap {
  overflow: auto;
  max-height: 340px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fff;
}
.insight-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 10px;
}
.insight-table th,
.insight-table td {
  padding: 6px 7px;
  border-bottom: 1px solid #edf0f5;
  text-align: right;
  white-space: nowrap;
}
.insight-table th:first-child,
.insight-table td:first-child {
  text-align: left;
  position: sticky;
  left: 0;
  background: #fff;
  z-index: 1;
}
.insight-table thead th {
  position: sticky;
  top: 0;
  background: #f5f7fb;
  z-index: 2;
  font-weight: 800;
  color: #4f5e76;
}
.insight-table tbody tr {
  cursor: pointer;
}
.insight-table tbody tr:hover td {
  background: #f7f9ff;
}
.insight-table tbody tr.selected td {
  background: #eef2ff;
}
.insight-cell-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}
.insight-cell-bar i {
  height: 5px;
  border-radius: 4px;
  background: #9db0ff;
  display: inline-block;
  min-width: 2px;
}
.metadata-profile {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.profile-row {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px;
  background: #fafcff;
}
.profile-row strong {
  font-size: 10px;
}
.profile-row span {
  display: block;
  margin-top: 3px;
  font-size: 9px;
  color: var(--muted);
  line-height: 1.45;
}

.tip-insight-dim {
  opacity: 0.16;
}
.tip-insight-selected {
  stroke: #111827 !important;
  stroke-width: 2.4 !important;
}
.metadata-insight-dim {
  opacity: 0.18;
}

.interaction-disabled-note {
  font-size: 9px;
  color: var(--muted);
  padding: 5px 7px;
  border-radius: 7px;
  background: #f4f6fa;
  border: 1px solid var(--border);
}

@media (max-width: 1200px) {
  .control-tabs {
    grid-template-columns: repeat(3, 1fr);
  }
  .supplied-cluster-fields {
    grid-template-columns: 1fr;
  }
}
.config-field.is-disabled {
  opacity: 0.5;
}
@media print {
  .metadata-dock {
    display: none !important;
  }
}
/* Keep scientific content anchored to the top-left of the scrollable workspace. */
.plot-svg {
  min-width: 0;
  min-height: 0;
  align-self: flex-start;
  flex: none;
}

.plot-shell {
  grid-template-rows: auto auto minmax(0, 1fr);
}
.workspace-tabs {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 6px 10px;
  border-bottom: 1px solid var(--border);
  background: #f8faff;
  overflow-x: auto;
}
.workspace-tabs .view-tab {
  white-space: nowrap;
  padding: 7px 12px;
}
.workspace-tabs .view-tab.active {
  background: #fff;
  color: #253fc0;
  border-color: #cfd9f6;
  box-shadow: 0 1px 3px rgba(20, 30, 50, 0.06);
}
.workspace-data-view {
  background: #fff;
  overflow: hidden;
}
.workspace-view-head,
.analysis-workspace-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(#fff, #fbfcff);
}
.workspace-view-head > div:first-child,
.analysis-workspace-head > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.workspace-view-head strong,
.analysis-workspace-head strong {
  font-size: 13px;
}
.workspace-view-head span,
.analysis-workspace-head span {
  font-size: 10px;
  color: var(--muted);
}
.workspace-view-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.workspace-view-actions span {
  font-size: 10px;
  color: var(--muted);
}
.workspace-view-actions button {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 8px;
  padding: 6px 9px;
  font-size: 10px;
}
.workspace-table-editor {
  flex: 1;
  min-height: 0;
  overflow: auto;
  background: #fff;
  padding: 0;
}
.workspace-table-editor .metadata-grid {
  min-width: 100%;
}
.workspace-summary-strip {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 9px 13px;
  border-bottom: 1px solid var(--border);
  background: #fafcff;
  font-size: 10px;
  color: #596780;
}
.workspace-summary-strip span {
  padding: 5px 8px;
  border: 1px solid #e1e6ef;
  border-radius: 999px;
  background: #fff;
}
.workspace-summary-strip strong {
  color: #26344e;
}
.cluster-grid .editable-cluster-cell {
  background: #fffdf3;
  outline: none;
}
.cluster-grid .editable-cluster-cell:focus {
  background: #fff7d6;
  box-shadow: inset 0 0 0 2px #e3b341;
}
.analysis-workspace {
  min-height: 0;
  overflow: auto;
  padding-bottom: 20px;
}
.analysis-selector-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr);
  gap: 10px;
  padding: 12px 14px 4px;
}
.analysis-selector-row label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 11px;
  color: #4b5870;
}
.analysis-stats {
  grid-template-columns: repeat(4, minmax(100px, 1fr));
  padding: 10px 14px;
}
.analysis-workspace > h3 {
  font-size: 13px;
  margin: 12px 14px 4px;
}
.analysis-workspace > .hint {
  margin: 0 14px 8px;
}
.analysis-table {
  margin: 0 14px;
  max-height: none;
}
.analysis-workspace .metadata-profile {
  margin: 0 14px;
}
.profile-selection-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.profile-selection-head span {
  font-size: 10px;
  color: var(--muted);
}
.control-tabs {
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 1200px) {
  .analysis-selector-row {
    grid-template-columns: 1fr;
  }
  .analysis-stats {
    grid-template-columns: 1fr 1fr;
  }
  .workspace-view-head,
  .analysis-workspace-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .workspace-view-actions {
    justify-content: flex-start;
  }
}
@media print {
  .workspace-tabs {
    display: none !important;
  }
}

html,
body {
  height: 100%;
  overflow: hidden;
}
.app-shell {
  height: 100vh;
  min-height: 0;
  overflow: hidden;
}
.topbar {
  position: relative;
  flex: 0 0 auto;
}
.modebar {
  flex: 0 0 auto;
  overflow-x: auto;
  white-space: nowrap;
}
.workspace-grid {
  min-height: 0;
  overflow: hidden;
  grid-template-columns: 310px minmax(0, 1fr) 340px;
}
.left-panel,
.right-panel {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}
.plot-shell {
  height: 100%;
  min-height: 0;
  grid-template-rows: auto auto minmax(0, 1fr);
}
.plot-view,
.workspace-data-view,
.analysis-workspace,
.phylo-workspace {
  min-height: 0;
}
.statusbar {
  flex: 0 0 auto;
}
.workspace-panel-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.mode-action,
.fit-width-switch {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 8px;
  padding: 5px 8px;
  font-size: 10px;
  color: #536077;
}
/*
 * Source section 5/53: mode action active.
 * Assembles into styles/base.css.
 * Rules remain in their original cascade order; later sections may intentionally override these
 * declarations.
 */
.mode-action.active {
  background: var(--accent-soft);
  border-color: #cfd8ff;
  color: #2944bd;
  font-weight: 800;
}
.fit-width-switch {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}
.fit-width-switch input {
  width: 14px;
  height: 14px;
  margin: 0;
}
body.inputs-collapsed .workspace-grid {
  grid-template-columns: 0 minmax(0, 1fr) 340px;
}
body.inputs-collapsed .left-panel {
  display: none;
}
body.controls-collapsed .workspace-grid {
  grid-template-columns: 310px minmax(0, 1fr) 0;
}
body.controls-collapsed .right-panel {
  display: none;
}
body.inputs-collapsed.controls-collapsed .workspace-grid {
  grid-template-columns: minmax(0, 1fr);
}

/* Workspace tabs inspired by modern browser tabs. */
.workspace-tabs {
  align-items: flex-end;
  gap: 2px;
  padding: 7px 9px 0;
  background: #e9edf4;
  border-bottom: 1px solid #cfd6e1;
  overflow-x: auto;
  overflow-y: hidden;
}
.workspace-tabs .view-tab {
  position: relative;
  margin: 0;
  padding: 8px 14px 9px;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 11px 11px 0 0;
  background: transparent;
  color: #59667c;
  box-shadow: none;
  min-height: 34px;
}
.workspace-tabs .view-tab:hover {
  background: #f3f5f9;
  border-color: #dce2eb;
}
.workspace-tabs .view-tab.active {
  z-index: 2;
  background: #fff;
  color: #223ec0;
  border-color: #cfd6e1;
  box-shadow: 0 -1px 2px rgba(30, 42, 70, 0.04);
  font-weight: 800;
}
.workspace-tabs .view-tab.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: #fff;
}
.control-tabs {
  display: flex;
  grid-template-columns: none;
  gap: 3px;
  overflow-x: auto;
  position: sticky;
  top: 0;
}
.control-tab {
  flex: 1 0 auto;
  min-width: 72px;
}

.compact-input-config {
  margin-top: 10px;
}
.phylo-workspace {
  display: flex;
  flex-direction: column;
  overflow: auto;
  background: #fff;
  padding-bottom: 18px;
}
.phylo-selector-row {
  display: flex;
  gap: 10px;
  padding: 11px 14px 0;
}
.phylo-selector-row label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 11px;
  color: #4b5870;
  min-width: min(360px, 100%);
}
.phylo-stats {
  grid-template-columns: repeat(6, minmax(105px, 1fr));
  padding: 10px 14px;
}
.phylo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 14px 14px;
}
.analysis-card {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #fff;
  overflow: hidden;
}
.analysis-card.wide {
  grid-column: 1/-1;
}
.analysis-card h3 {
  font-size: 12px;
  margin: 0;
  padding: 10px 11px;
  border-bottom: 1px solid var(--border);
  background: #f8faff;
}
.analysis-card > .hint {
  margin: 0;
  padding: 8px 11px;
  border-bottom: 1px solid #edf0f5;
  background: #fbfcff;
}
.analysis-card-body {
  padding: 10px 11px;
  overflow: auto;
}
.metric-list {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto;
  gap: 6px 14px;
  font-size: 10px;
}
.metric-list div:nth-child(odd) {
  color: #536077;
}
.metric-list div:nth-child(even) {
  font-weight: 750;
  text-align: right;
}
.analysis-note {
  margin-top: 9px;
  font-size: 10px;
  color: var(--muted);
  line-height: 1.5;
}
.analysis-mini-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 10px;
}
.analysis-mini-table th,
.analysis-mini-table td {
  padding: 6px 7px;
  border-bottom: 1px solid #e9edf3;
  text-align: left;
  white-space: nowrap;
}
.analysis-mini-table th {
  position: sticky;
  top: 0;
  background: #f5f7fb;
  color: #4d5a70;
  z-index: 1;
}
.analysis-mini-table td.num,
.analysis-mini-table th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.phylo-status-good {
  color: var(--good);
  font-weight: 750;
}
.phylo-status-warn {
  color: var(--warn);
  font-weight: 750;
}
.cluster-diagnostic-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 0;
  font-size: 10px;
  border-bottom: 1px solid #edf0f5;
}
.cluster-diagnostic-row:last-child {
  border-bottom: 0;
}
.cluster-diagnostic-row span {
  color: var(--muted);
}

.compact-scroller {
  background: #fff;
}
.compact-strip-label {
  font-size: 8px;
  fill: #596780;
}
.compact-tip-label {
  font-size: 8px;
  fill: #263248;
  dominant-baseline: middle;
}
.compact-strip {
  stroke: #fff;
  stroke-width: 0.4;
}
.compact-axis-label {
  font-size: 8px;
  fill: #667085;
}

/* Allow the plot to own the viewport while side panels scroll independently. */
@media (max-width: 1200px) {
  .workspace-grid {
    grid-template-columns: 270px minmax(0, 1fr) 300px;
  }
  body.inputs-collapsed .workspace-grid {
    grid-template-columns: 0 minmax(0, 1fr) 300px;
  }
  body.controls-collapsed .workspace-grid {
    grid-template-columns: 270px minmax(0, 1fr) 0;
  }
  body.inputs-collapsed.controls-collapsed .workspace-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .phylo-stats {
    grid-template-columns: repeat(3, minmax(100px, 1fr));
  }
}
@media (max-width: 980px) {
  .topbar {
    max-height: 108px;
    overflow: auto;
  }
  .workspace-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .left-panel,
  .right-panel {
    display: none;
  }
  .modebar {
    padding-inline: 10px;
  }
  .plot-shell {
    min-height: 0;
  }
  .phylo-grid {
    grid-template-columns: 1fr;
  }
  .analysis-card.wide {
    grid-column: auto;
  }
  .phylo-stats {
    grid-template-columns: 1fr 1fr;
  }
}
/* Strip borders come from the track settings; avoid forcing white outlines. */
.compact-strip-header {
  fill: #5c6980;
  font-weight: 700;
}
.mode-action[aria-pressed='true'] {
  background: var(--accent-soft);
  border-color: #cfd8ff;
  color: #2944bd;
  font-weight: 800;
}

html,
body {
  font-size: 14px;
}
.topbar {
  height: 70px;
  padding: 0 20px;
  gap: 20px;
}
.brand {
  min-width: 270px;
}
.brand-name {
  font-size: 17px;
}
.brand-sub {
  font-size: 12.5px;
}
.version-badge {
  font-size: 11px;
}
.menu-trigger {
  font-size: 13.5px;
  padding: 8px 9px;
}
.menu-dropdown button {
  font-size: 13px;
  padding: 9px 10px;
}
.menu-dropdown button span {
  font-size: 11px;
}
.toolbar-btn,
.mini-btn,
.mode-action,
.wide-btn,
.button-grid button,
.log-toolbar button,
.zoom-dock button,
.node-menu button {
  font-size: 13px;
}
.example-launch {
  background: linear-gradient(135deg, #375dfb, #6d5dfc);
  border-color: #375dfb;
  color: #fff;
  font-weight: 800;
  padding: 9px 14px;
  box-shadow: 0 4px 14px rgba(55, 93, 251, 0.2);
}
.example-launch:hover {
  background: linear-gradient(135deg, #2f51df, #5f50e7);
  border-color: #2f51df;
  color: #fff;
}
.interaction-switch {
  font-size: 13px;
}
.interaction-hint,
.status-compact {
  font-size: 12px;
}
.modebar {
  min-height: 48px;
}
.mode-pill {
  font-size: 13px;
}
.fit-width-switch {
  font-size: 12.5px;
}
.workspace-grid {
  grid-template-columns: 325px minmax(540px, 1fr) 365px;
  gap: 12px;
  padding: 12px;
}
.panel-card {
  padding: 15px;
}
.eyebrow {
  font-size: 11px;
}
.panel-card h2 {
  font-size: 16px;
}
.panel-copy {
  font-size: 13px;
  line-height: 1.5;
}
.project-name-field,
.project-export-name {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12.5px;
  color: #4b5870;
  margin-top: 10px;
}
.project-folder {
  margin-top: 12px;
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  background: #fbfcff;
  overflow: hidden;
}
.project-folder > summary {
  list-style: none;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 10px 11px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  background: #f3f6fb;
  border-bottom: 1px solid transparent;
}
.project-folder[open] > summary {
  border-bottom-color: var(--border);
}
.project-folder > summary::-webkit-details-marker {
  display: none;
}
.folder-glyph {
  font-size: 12px;
  color: #52637d;
  transition: transform 0.15s ease;
}
.project-folder:not([open]) .folder-glyph {
  transform: rotate(-90deg);
}
.folder-meta {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}
.project-file-list {
  padding: 6px 6px 7px 26px;
  position: relative;
}
.project-file-list:before {
  content: '';
  position: absolute;
  left: 16px;
  top: 0;
  bottom: 11px;
  border-left: 1px solid #d6deea;
}
.project-file-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 7px 8px;
  margin: 3px 0;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  position: relative;
  background: #fff;
}
.project-file-row:before {
  content: '';
  position: absolute;
  left: -10px;
  top: 50%;
  width: 10px;
  border-top: 1px solid #d6deea;
}
.project-file-row:hover {
  border-color: #cdd8eb;
  background: #f5f8ff;
}
.project-file-icon {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--accent-soft);
  color: #324bbd;
  font-size: 11px;
  font-weight: 850;
}
.project-file-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.project-file-copy strong {
  font-size: 13px;
}
.project-file-copy small {
  font-size: 11.5px;
  color: #5a6880;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.project-file-action {
  font-size: 12px;
  color: var(--accent);
  font-weight: 800;
}
/*
 * Source section 6/53: project actions.
 * Assembles into styles/base.css.
 * Rules remain in their original cascade order; later sections may intentionally override these
 * declarations.
 */
.project-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 10px;
}
.project-action-btn {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 8px;
  padding: 8px;
  font-size: 12px;
  color: #34445e;
}
.project-action-btn:hover {
  background: #f7f9fd;
  border-color: var(--border-strong);
}
.compact-clear-row {
  grid-template-columns: 1fr 1fr;
  margin-top: 8px;
}
.compact-clear-row button {
  font-size: 11.5px;
  padding: 6px 4px;
}
.input-summary {
  font-size: 12.5px;
}
.collapsed-list {
  max-height: none;
  overflow: visible;
}
.collapsed-item,
.selection-card {
  font-size: 12.5px;
}
.empty-mini {
  font-size: 12.5px;
}
.plot-title {
  font-size: 18px;
}
.plot-subtitle {
  font-size: 13px;
}
.badge {
  font-size: 11.5px;
}
.workspace-tabs .view-tab {
  font-size: 13px;
  padding: 9px 14px;
}
.workspace-view-head strong,
.analysis-workspace-head strong {
  font-size: 15px;
}
.workspace-view-head span,
.analysis-workspace-head span {
  font-size: 12.5px;
}
.workspace-view-actions span,
.workspace-view-actions button {
  font-size: 12px;
}
.metadata-grid {
  font-size: 12.5px;
}
.metadata-grid th,
.metadata-grid td {
  padding: 7px 9px;
}
.insight-table {
  font-size: 12.5px;
}
.insight-table th,
.insight-table td {
  padding: 7px 8px;
}
.profile-row strong {
  font-size: 12.5px;
}
.profile-row span {
  font-size: 12px;
}
.workspace-summary-strip {
  font-size: 12px;
}
.analysis-workspace > h3,
.phylo-workspace h3 {
  font-size: 14px;
}
.analysis-selector-row label,
.phylo-selector-row label {
  font-size: 12.5px;
}
.analysis-note,
.phylo-note,
.hint {
  font-size: 12px;
  line-height: 1.5;
}
.stat b {
  font-size: 16px;
}
.stat span {
  font-size: 10.5px;
}
.control-tabs {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
}
.control-tab {
  font-size: 12px;
  padding: 8px 3px;
}
.control-group h3 {
  font-size: 14px;
}
.field-grid label,
.control-group label {
  font-size: 12.5px;
}
.section-toggle {
  font-size: 14px;
  padding: 13px 14px;
}
.section-body {
  padding: 0 14px 14px;
}
.right-panel {
  overflow-y: auto;
  overflow-x: visible;
}
.right-panel .control-page,
.right-panel .control-group,
.right-panel .section-body {
  overflow: visible !important;
  max-height: none !important;
}
.command-preview {
  font-size: 12px;
  max-height: none;
  overflow: visible;
}
.analysis-table {
  max-height: none;
}
.statusbar {
  height: 31px;
  font-size: 11.5px;
}
.log-output {
  font-size: 12.5px;
}
.phylo-pair-card {
  margin: 10px 14px 2px;
  padding: 12px 13px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fbfcff;
}
.phylo-pair-card > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.phylo-pair-card > div:first-child strong {
  font-size: 14px;
}
.phylo-pair-card > div:first-child span {
  font-size: 12px;
  color: var(--muted);
}
.phylo-pair-selectors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}
.phylo-pair-selectors label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12.5px;
  color: #4b5870;
}
.phylo-pair-result {
  margin-top: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #e2e7ef;
  font-size: 12.5px;
  color: #40506a;
}
.tree-vertical-handle {
  cursor: ns-resize;
  opacity: 0.78;
}
.tree-vertical-handle:hover {
  opacity: 1;
}
.tree-vertical-handle rect {
  fill: #eef2ff;
  stroke: #9daff2;
}
.tree-vertical-handle text {
  font-size: 10px;
  fill: #536176;
  pointer-events: none;
}
.compact-legend-title {
  font-weight: 800;
  fill: #24324a;
}
.compact-legend-field {
  font-weight: 750;
  fill: #40506a;
}
.compact-legend-label {
  fill: #536176;
}
@media (max-width: 1450px) {
  .workspace-grid {
    grid-template-columns: 280px minmax(500px, 1fr) 330px;
  }
  .brand {
    min-width: 230px;
  }
  .panel-copy {
    display: block;
  }
  .control-tab {
    font-size: 11.5px;
  }
}
@media (max-width: 1120px) {
  .workspace-grid {
    grid-template-columns: 270px minmax(500px, 1fr) 320px;
  }
  .phylo-pair-selectors {
    grid-template-columns: 1fr;
  }
  .topbar {
    height: auto;
    min-height: 70px;
    flex-wrap: wrap;
    padding-top: 8px;
    padding-bottom: 8px;
  }
}
.phylo-pair-result strong {
  display: block;
  font-size: 13px;
  color: #26344e;
  margin-bottom: 4px;
}
.phylo-pair-result span {
  display: block;
  line-height: 1.45;
}
/* Compact settings topics: no nested scrolling; use two-column forms where possible. */
.right-panel .section-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 8px;
  align-items: start;
}
.right-panel .section-body.collapsed {
  display: none !important;
}
.right-panel .section-body > label {
  margin-top: 0 !important;
}
.right-panel .section-body > .field-grid,
.right-panel .section-body > .hint,
.right-panel .section-body > .stats-grid,
.right-panel .section-body > .selection-card,
.right-panel .section-body > .button-grid,
.right-panel .section-body > .cutoff-control,
.right-panel .section-body > .live-cluster-summary,
.right-panel .section-body > .config-summary,
.right-panel .section-body > .supplied-cluster-fields,
.right-panel .section-body > .command-preview,
.right-panel .section-body > .wide-btn {
  grid-column: 1/-1;
}
.right-panel .section-body > .wide-btn {
  margin-top: 2px;
}
.right-panel input[type='text'],
.right-panel input[type='number'],
.right-panel select {
  min-height: 38px;
  font-size: 13px;
}
@media (max-width: 1260px) {
  .right-panel .section-body {
    grid-template-columns: 1fr;
  }
}

.control-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  overflow: visible;
}
.control-tab {
  min-width: 0;
  flex: initial;
  white-space: nowrap;
  padding-left: 2px;
  padding-right: 2px;
}

.workspace-grid {
  grid-template-columns: 340px minmax(560px, 1fr) 365px;
}
.left-panel,
.right-panel {
  scrollbar-gutter: stable;
}

.project-library-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin: 8px 0 10px;
}
.wide-project-action {
  width: 100%;
  margin-top: 8px;
}
.danger-light {
  color: #9b2c2c;
  background: #fff7f7;
  border-color: #efd2d2;
}
.project-tree {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 10px;
}
.project-tree-project {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fbfcff;
  overflow: hidden;
}
.project-tree-project.active-project {
  border-color: #aab9ff;
  box-shadow: 0 0 0 2px rgba(55, 93, 251, 0.06);
}
.project-tree-project > summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px;
  background: #f4f7fb;
  border-bottom: 1px solid transparent;
}
.project-tree-project[open] > summary {
  border-bottom-color: var(--border);
}
.project-tree-project > summary::-webkit-details-marker {
  display: none;
}
.project-switch {
  border: 0;
  background: transparent;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  flex: 1;
  text-align: left;
  color: var(--text);
  font-weight: 800;
  font-size: 13px;
}
.project-switch span:last-child {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.project-switch.is-renaming {
  display: none;
}
.project-rename-input {
  flex: 1;
  min-width: 0;
  width: 0;
  padding: 3px 5px;
  font: inherit;
  color: var(--text);
  background: var(--surface, #fff);
  border: 1px solid var(--accent, #0b8b89);
  border-radius: 3px;
  outline: 2px solid color-mix(in srgb, var(--accent, #0b8b89) 20%, transparent);
  user-select: text;
}
.project-folder-icon {
  font-size: 10px;
  color: #64748b;
  transition: transform 0.15s;
}
.project-tree-project[open] .project-folder-icon {
  transform: rotate(90deg);
}
.active-project-badge {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #3150d6;
  background: #eaf0ff;
  border: 1px solid #d4defe;
  border-radius: 999px;
  padding: 3px 6px;
}
.project-tree-branches {
  padding: 5px 6px 7px 18px;
  position: relative;
}
.project-tree-branches:before {
  content: '';
  position: absolute;
  left: 10px;
  top: 0;
  bottom: 9px;
  border-left: 1px solid #d8e0ec;
}
.project-tree-branches details {
  position: relative;
  margin: 2px 0;
}
.project-tree-branches details:before {
  content: '';
  position: absolute;
  left: -8px;
  top: 14px;
  width: 8px;
  border-top: 1px solid #d8e0ec;
}
.project-tree-branches summary {
  list-style: none;
  cursor: pointer;
  padding: 5px 6px;
  font-size: 12px;
  font-weight: 760;
  color: #40506a;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.project-tree-branches summary::-webkit-details-marker {
  display: none;
}
.project-tree-branches summary span {
  font-size: 10px;
  color: var(--muted);
  font-weight: 650;
}
.project-tree-files {
  padding: 2px 0 3px 12px;
}
.project-tree-file {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 6px;
  padding: 5px 4px;
  border-radius: 7px;
}
.project-tree-file:hover {
  background: #f3f6fb;
}
.project-tree-icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  background: #edf2ff;
  color: #3550c8;
  font-size: 9px;
  font-weight: 850;
}
.project-tree-file-name {
  display: flex;
  min-width: 0;
  flex-direction: column;
}
.project-tree-file-name strong {
  font-size: 11.5px;
}
/*
 * Source section 7/53: project tree file name small.
 * Assembles into styles/base.css.
 * Rules remain in their original cascade order; later sections may intentionally override these
 * declarations.
 */
.project-tree-file-name small {
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.project-tree-file > button,
.project-tree-branches li button {
  border: 0;
  background: transparent;
  color: #375dfb;
  padding: 3px 4px;
  font-size: 10.5px;
  text-align: left;
}
.project-tree-file > button:hover,
.project-tree-branches li button:hover {
  text-decoration: underline;
}
.project-tree-clear {
  color: #9a4a4a !important;
  font-size: 14px !important;
}
.project-tree-branches ul {
  list-style: none;
  margin: 2px 0 4px;
  padding: 0 0 0 14px;
}
.project-tree-branches li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-height: 25px;
  font-size: 11px;
  color: #526177;
}
.project-tree-branches li:before {
  content: '•';
  color: #a9b4c6;
  margin-right: 3px;
}
.project-tree-branches li button {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.project-tree-branches li small {
  font-size: 9px;
  color: #8a96a8;
  white-space: nowrap;
}
.muted-tree-item {
  color: #8a96a8 !important;
  font-style: italic;
}
.activity-history {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}
.activity-step {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 7px;
  padding: 6px 0;
  border-bottom: 1px solid #edf0f5;
}
.activity-step:last-child {
  border-bottom: 0;
}
.activity-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6b82e8;
  margin-top: 5px;
}
.activity-step.is-warn .activity-dot {
  background: #d39a2f;
}
.activity-step.is-error .activity-dot {
  background: #d14b4b;
}
.activity-step > div {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 5px;
  align-items: baseline;
}
.activity-step strong {
  font-size: 10.5px;
  color: #35445d;
}
.activity-step span {
  font-size: 10.5px;
  color: #5f6d82;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.activity-step small {
  font-size: 9px;
  color: #9aa5b5;
}
.activity-help {
  display: flex;
  gap: 7px;
  margin-top: 10px;
  padding: 9px;
  border-radius: 8px;
  background: #f6f8ff;
  border: 1px solid #e0e6ff;
  font-size: 10.5px;
  line-height: 1.45;
}
.activity-help strong {
  color: #3149b7;
}
.activity-help span {
  color: #536176;
}

.settings-shell-head {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px 14px;
}
.settings-shell-head h2 {
  font-size: 16px;
  margin: 3px 0 4px;
}
.settings-shell-head p {
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--muted);
  margin: 0;
}
.settings-tree {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  position: sticky;
  top: 0;
  z-index: 5;
}
.settings-tree .control-tab {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  width: 100%;
  text-align: left;
  padding: 8px 9px;
  border-color: transparent;
  background: transparent;
}
.settings-tree .control-tab > span:last-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 1px;
}
.settings-tree .control-tab strong {
  font-size: 12.5px;
}
.settings-tree .control-tab small {
  font-size: 10px;
  color: var(--muted);
  font-weight: 500;
  white-space: normal;
}
.settings-tree .control-tab.active {
  background: var(--accent-soft);
  border-color: #d9e0ff;
  color: #3048bd;
}
.settings-node-icon {
  font-size: 9px;
  color: #8793a6;
}
.settings-tree .control-tab.active .settings-node-icon {
  transform: rotate(90deg);
}
.collapsed-settings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  grid-column: 1/-1;
}
.collapsed-settings-head strong {
  font-size: 12px;
}

.metadata-highlight-fields {
  grid-column: 1/-1;
  display: grid;
  gap: 8px;
  padding: 9px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fbfcff;
}
.field-caption {
  font-size: 11.5px;
  color: #4b5870;
  font-weight: 700;
}
.multi-select-dropdown {
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: #fff;
  position: relative;
}
.multi-select-dropdown > summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 7px 9px;
  cursor: pointer;
  font-size: 12.5px;
}
.multi-select-dropdown > summary::-webkit-details-marker {
  display: none;
}
.multi-select-options {
  max-height: 210px;
  overflow: auto;
  border-top: 1px solid var(--border);
  padding: 5px;
}
.multi-select-option {
  display: grid !important;
  grid-template-columns: 18px minmax(0, 1fr) auto !important;
  align-items: center;
  gap: 6px !important;
  margin: 0 !important;
  padding: 6px 5px;
  border-radius: 6px;
  font-size: 12px !important;
}
.multi-select-option:hover {
  background: #f3f6fb;
}
.multi-select-option input {
  width: 15px;
  height: 15px;
}
.multi-select-option small {
  color: var(--muted);
  font-size: 10px;
}
.highlight-palette-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.color-palette-editor {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.color-code-row {
  display: grid;
  grid-template-columns: minmax(80px, 1fr) 42px 90px;
  align-items: center;
  gap: 7px;
}
.color-code-row > span {
  font-size: 11.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.color-code-row input[type='color'] {
  width: 42px;
  height: 34px;
  padding: 2px;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  background: #fff;
}
.color-code-row input[type='text'] {
  min-height: 34px !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px !important;
  text-transform: uppercase;
}

.cluster-diagnostics-list {
  grid-column: 1/-1;
}
.diagnostic-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.diagnostic-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid #edf0f5;
  font-size: 11.5px;
}
.diagnostic-list li:last-child {
  border-bottom: 0;
}
.diagnostic-list span {
  color: #667085;
}
.diagnostic-list strong {
  text-align: right;
  color: #28354d;
  font-weight: 750;
}

.compact-legend-group {
  cursor: move;
}
.compact-legend-box {
  fill: rgba(255, 255, 255, 0.96);
  stroke: #d5deea;
  stroke-width: 1;
}
.compact-legend-group:hover .compact-legend-box {
  stroke: #8498ef;
  stroke-width: 1.4;
}
.compact-legend-field {
  font-weight: 800;
  fill: #34445e;
}
.compact-legend-label {
  fill: #536176;
}
body.interaction-off .compact-legend-group {
  cursor: default;
}

@media (max-width: 1450px) {
  .workspace-grid {
    grid-template-columns: 300px minmax(500px, 1fr) 335px;
  }
}
@media (max-width: 1180px) {
  .workspace-grid {
    grid-template-columns: 270px minmax(500px, 1fr) 315px;
  }
  .settings-shell-head p {
    display: none;
  }
  .settings-tree .control-tab small {
    display: none;
  }
}

/* Keep canvas views inside the center workspace so wide SVGs scroll instead of being clipped. */
.plot-view {
  min-width: 0;
  width: 100%;
  max-width: 100%;
}
.plot-scroller {
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.workspace-grid {
  grid-template-columns: clamp(220px, 19vw, 300px) minmax(300px, 1fr) clamp(340px, 27vw, 410px);
  gap: 10px;
  padding: 10px;
  min-width: 0;
  overflow: hidden;
}
.left-panel,
.right-panel,
.plot-shell {
  min-width: 0;
}
.right-panel {
  overflow-y: auto;
  overflow-x: hidden;
  display: block;
  scrollbar-gutter: stable;
}
.settings-inspector {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px;
  align-items: start;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: visible;
  min-height: 100%;
}
.settings-pages {
  min-width: 0;
  background: #fff;
}
.settings-tab-rail {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  background: #f3f5f8;
  border-left: 1px solid #d7dde7;
  min-height: 100%;
  padding: 3px 0;
  z-index: 8;
}
.settings-tab-rail .control-tab {
  height: 44px;
  width: 45px;
  min-width: 45px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #6b7280;
  padding: 0;
  display: grid;
  place-items: center;
  position: relative;
}
.settings-tab-rail .control-tab:hover {
  background: #e9edf3;
  color: #334155;
}
.settings-tab-rail .control-tab.active {
  background: #fff;
  color: #2646b8;
  box-shadow: inset 3px 0 0 #375dfb;
  font-weight: 850;
}
.rail-icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid #c8d0dc;
  border-radius: 6px;
  background: #fff;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.02em;
}
.settings-tab-rail .control-tab.active .rail-icon {
  border-color: #9eb0ff;
  background: #eef2ff;
}
.settings-page-titlebar {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 13px 10px;
  border-bottom: 1px solid var(--border);
  background: #fafbfc;
  position: sticky;
  top: 0;
  z-index: 4;
}
.settings-page-glyph {
  width: 28px;
  height: 28px;
  border: 1px solid #cfd6e2;
  border-radius: 6px;
  background: #fff;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 900;
  color: #44546a;
}
.settings-page-titlebar > div {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
/*
 * Source section 8/53: settings page titlebar strong.
 * Assembles into styles/base.css.
 * Rules remain in their original cascade order; later sections may intentionally override these
 * declarations.
 */
.settings-page-titlebar strong {
  font-size: 14px;
}
.settings-page-titlebar small {
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1.3;
}
.control-page {
  gap: 0;
  background: #fff;
}
.control-page.active {
  display: flex;
}
.settings-inspector .control-group {
  border: 0;
  border-bottom: 1px solid #e5e9f0;
  border-radius: 0;
  box-shadow: none;
  padding: 12px 13px;
  background: #fff;
}
.settings-inspector .control-group h3 {
  font-size: 13px;
  margin: 0 0 10px;
  color: #243047;
}
.settings-inspector .control-group > label:not(.check-row) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(112px, 43%);
  align-items: center;
  gap: 10px;
  margin-top: 7px;
  color: #4a5568;
  font-size: 12px;
}
.settings-inspector .control-group > label:not(.check-row) > span {
  line-height: 1.25;
}
.settings-inspector .control-group > label:not(.check-row) > input,
.settings-inspector .control-group > label:not(.check-row) > select {
  min-height: 34px;
  height: 34px;
  font-size: 12px;
  padding: 5px 7px;
}
.settings-inspector .control-group > .check-row {
  display: grid !important;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 7px !important;
  margin-top: 7px !important;
  font-size: 12px;
  color: #334155;
}
.settings-inspector .check-row input {
  width: 15px;
  height: 15px;
  margin: 0;
}
.settings-inspector .field-grid {
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.settings-inspector .field-grid label {
  font-size: 11px;
}
.settings-inspector .field-grid input {
  min-height: 34px;
  height: 34px;
  font-size: 12px;
}
.settings-inspector .hint {
  font-size: 11px;
  line-height: 1.45;
  margin-top: 7px;
}
.settings-inspector .selection-card {
  font-size: 11.5px;
  margin: 8px 0;
}
.settings-inspector .button-grid button,
.settings-inspector .wide-btn,
.settings-inspector .mini-btn {
  font-size: 11.5px;
  padding: 7px 8px;
}
.settings-inspector .collapsed-list {
  max-height: none;
  overflow: visible;
}
.advanced-settings {
  border-bottom: 1px solid #dfe5ee;
  background: #f8fafc;
}
.advanced-settings > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 13px;
  color: #34445e;
  font-weight: 800;
  font-size: 12px;
  position: relative;
}
.advanced-settings > summary::-webkit-details-marker {
  display: none;
}
.advanced-settings > summary:after {
  content: '▸';
  position: absolute;
  right: 13px;
  top: 11px;
  color: #7b8798;
  font-size: 11px;
}
.advanced-settings[open] > summary:after {
  content: '▾';
}
.advanced-settings > summary small {
  font-size: 10px;
  color: #7b8798;
  font-weight: 500;
  padding-right: 24px;
}
.advanced-settings-body {
  background: #fff;
}
.advanced-settings-body .control-group:last-child {
  border-bottom: 0;
}
.metadata-highlight-fields {
  grid-column: auto !important;
  margin-top: 9px;
}
.multi-select-options {
  max-height: 240px;
}
.cutoff-control {
  margin-top: 4px;
}
.cutoff-head {
  align-items: center;
}
.cutoff-number {
  width: 88px !important;
  min-height: 34px !important;
  font-size: 13px !important;
  font-variant-numeric: tabular-nums;
}
.cutoff-slider {
  width: 100%;
}
.supplied-cluster-fields {
  margin-top: 8px;
}
.supplied-cluster-fields label {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(112px, 43%) !important;
  align-items: center;
  gap: 10px !important;
  margin-top: 7px !important;
}
.stats-grid {
  grid-template-columns: 1fr 1fr;
}
.activity-history {
  max-height: none;
}
.activity-step > div {
  grid-template-columns: auto minmax(0, 1fr) auto;
}
.activity-step span {
  white-space: normal;
}
body.inputs-collapsed .workspace-grid {
  grid-template-columns: 0 minmax(300px, 1fr) clamp(340px, 27vw, 410px);
}
body.controls-collapsed .workspace-grid {
  grid-template-columns: clamp(220px, 19vw, 300px) minmax(300px, 1fr) 0;
}
body.inputs-collapsed.controls-collapsed .workspace-grid {
  grid-template-columns: minmax(0, 1fr);
}
@media (max-width: 1180px) {
  .workspace-grid {
    grid-template-columns: minmax(190px, 22vw) minmax(260px, 1fr) minmax(300px, 31vw);
    gap: 7px;
    padding: 7px;
  }
  .settings-inspector {
    grid-template-columns: minmax(0, 1fr) 42px;
  }
  .settings-tab-rail .control-tab {
    width: 41px;
    min-width: 41px;
  }
  .settings-page-titlebar small {
    display: none;
  }
  .panel-copy {
    display: none;
  }
  .project-name-field span,
  .project-export-name span {
    font-size: 10px;
  }
}
@media (max-width: 980px) {
  .workspace-grid {
    grid-template-columns: minmax(170px, 24vw) minmax(220px, 1fr) minmax(255px, 34vw);
    gap: 6px;
    padding: 6px;
    overflow-x: auto;
  }
  .left-panel,
  .right-panel {
    display: flex !important;
  }
  .right-panel {
    display: block !important;
  }
  .topbar {
    max-height: none;
    overflow: visible;
  }
  .settings-inspector .control-group > label:not(.check-row) {
    grid-template-columns: 1fr;
  }
  .settings-inspector .control-group > label:not(.check-row) > span {
    font-size: 10.5px;
  }
  .settings-inspector .field-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  .workspace-grid {
    grid-template-columns: minmax(150px, 23vw) minmax(210px, 1fr) minmax(230px, 35vw);
  }
  .settings-tab-rail {
    width: 38px;
  }
  .settings-tab-rail .control-tab {
    width: 37px;
    min-width: 37px;
  }
  .rail-icon {
    width: 23px;
    height: 23px;
  }
  .left-panel .panel-card {
    padding: 10px;
  }
  .project-tree-file {
    grid-template-columns: 22px minmax(0, 1fr) auto;
  }
  .project-tree-clear {
    display: none;
  }
}

.workspace-grid {
  grid-template-columns: 250px minmax(420px, 1fr) 360px;
  gap: 8px;
  padding: 8px;
}
.left-panel,
.right-panel {
  overflow: auto;
  min-width: 0;
}
.workspace-panel-icons {
  display: flex;
  align-items: center;
  gap: 4px;
}
.panel-icon-toggle {
  width: 25px;
  height: 25px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 5px;
  padding: 0;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 850;
  color: #566277;
}
.panel-icon-toggle:hover {
  background: #f4f6fa;
  border-color: #bfc8d6;
}
.panel-icon-toggle.active {
  background: #eef2ff;
  color: #3150c8;
  border-color: #b8c5ff;
}
.fit-width-inline {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  color: #506078;
  padding: 3px 5px;
  border-left: 1px solid #dfe5ee;
}
.fit-width-inline input {
  width: 14px;
  height: 14px;
  margin: 0;
}

/* Left panel mirrors the compact inspector pattern used by Settings. */
.project-inspector {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  min-height: 100%;
  overflow: visible;
}
.project-tab-rail {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  background: #f3f5f8;
  border-right: 1px solid #d7dde7;
  min-height: 100%;
  padding: 3px 0;
  z-index: 8;
}
.project-tab {
  width: 37px;
  height: 42px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #6b7280;
  padding: 0;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 11px;
}
.project-tab:hover {
  background: #e9edf3;
  color: #334155;
}
.project-tab.active {
  background: #fff;
  color: #2646b8;
  box-shadow: inset -3px 0 0 #375dfb;
}
.project-tab span {
  width: 23px;
  height: 23px;
  border: 1px solid #cfd6e2;
  border-radius: 5px;
  background: #fff;
  display: grid;
  place-items: center;
}
.project-tab.active span {
  border-color: #9eb0ff;
  background: #eef2ff;
}
.project-pages {
  min-width: 0;
  background: #fff;
}
.project-page {
  display: none;
  min-height: 100%;
}
.project-page.active {
  display: block;
}
.project-page-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  padding: 9px 9px 8px;
  border-bottom: 1px solid var(--border);
  background: #fafbfc;
  position: sticky;
  top: 0;
  z-index: 4;
}
.project-page-titlebar > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 1px;
}
.project-page-titlebar strong {
  font-size: 13px;
}
.project-page-titlebar small {
  font-size: 9.5px;
  color: var(--muted);
  line-height: 1.25;
}
.compact-icon {
  width: 27px;
  height: 27px;
  font-size: 16px;
}
.project-page-body {
  padding: 7px 8px 10px;
}
.history-page-body {
  padding-top: 8px;
}
.project-name-field,
.project-export-name {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3px;
  margin: 0 0 7px;
}
.project-name-field span,
.project-export-name span {
  font-size: 9.5px;
  color: #677489;
  font-weight: 750;
}
.project-name-field input,
.project-export-name input {
  height: 31px;
  font-size: 11px;
  padding: 5px 7px;
}
.compact-actions {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 5px !important;
  margin: 5px 0 7px !important;
}
.compact-actions button {
  min-width: 0;
  font-size: 10px;
  padding: 6px 5px;
}
.wide-project-action {
  font-size: 10px;
  padding: 6px 7px;
  margin-top: 3px;
}
.input-summary {
  font-size: 9.5px;
  line-height: 1.35;
  padding: 6px 7px;
  margin-top: 7px;
}
.project-tree {
  font-size: 11px;
  margin-top: 3px;
}
.project-tree-project {
  margin: 2px 0;
}
.project-tree-project > summary {
  padding: 4px 3px;
}
.project-switch {
  font-size: 11.5px;
  gap: 5px;
}
.active-project-badge {
  font-size: 8px;
  padding: 2px 4px;
}
.project-tree-branches {
  padding-left: 14px;
}
.project-tree-branches:before {
  left: 7px;
}
.project-tree-branches summary {
  padding: 4px 4px;
  font-size: 10.5px;
}
.project-tree-file {
  grid-template-columns: 20px minmax(0, 1fr) auto auto;
  gap: 4px;
  padding: 4px 2px;
}
.project-tree-icon {
  width: 19px;
  height: 19px;
  border-radius: 4px;
  font-size: 8px;
}
/*
 * Source section 9/53: project tree file name strong.
 * Assembles into styles/base.css.
 * Rules remain in their original cascade order; later sections may intentionally override these
 * declarations.
 */
.project-tree-file-name strong {
  font-size: 10px;
}
.project-tree-file-name small {
  font-size: 8.5px;
}
.project-tree-file > button,
.project-tree-branches li button {
  font-size: 9px;
  padding: 2px 3px;
}
.project-tree-branches li {
  font-size: 9.5px;
  min-height: 21px;
}
.project-tree-branches li small {
  font-size: 8px;
}
.project-tree-example {
  border: 1px solid #dfe5ee;
  border-radius: 6px;
  background: #fbfcff;
  margin: 0 0 6px;
}
.project-tree-example > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 6px;
  font-size: 10.5px;
  font-weight: 850;
  color: #46556c;
}
.project-tree-example > summary::-webkit-details-marker {
  display: none;
}
.project-tree-example > summary small {
  font-size: 8.5px;
  color: #7b8798;
}
.example-project {
  border-top: 1px solid #e7ebf1;
  padding: 4px;
}
.example-project-open {
  width: 100%;
  border: 0;
  background: transparent;
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 5px;
  align-items: center;
  text-align: left;
  padding: 4px;
  color: #3048bd;
  font-size: 10.5px;
  font-weight: 800;
  border-radius: 4px;
}
.example-project-open:hover {
  background: #eef2ff;
}
.example-project-open small {
  font-size: 8px;
  color: #526177;
}
.example-files {
  padding: 2px 2px 2px 14px;
  display: grid;
  gap: 2px;
}
.example-files span {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 4px;
  align-items: center;
  font-size: 8.5px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.example-files b {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  background: #edf2ff;
  color: #3550c8;
  display: grid;
  place-items: center;
  font-size: 7px;
}
.activity-history {
  font-size: 9px;
  line-height: 1.35;
}
.activity-help {
  font-size: 9px;
  line-height: 1.35;
  margin-top: 8px;
}

/* Stable panel proportions: opening Projects never makes Settings expand. */
body.inputs-collapsed .workspace-grid {
  grid-template-columns: 0 minmax(420px, 1fr) 350px;
}
body.controls-collapsed .workspace-grid {
  grid-template-columns: 250px minmax(420px, 1fr) 0;
}
body.inputs-collapsed.controls-collapsed .workspace-grid {
  grid-template-columns: minmax(0, 1fr);
}

/* Compact tree/legend usability. */
.compact-tree-layer {
  pointer-events: none;
}
.compact-legend-group {
  cursor: grab;
}
.compact-legend-group.figure-dragging {
  cursor: grabbing;
}
.compact-legend-hitbox {
  fill: transparent;
  stroke: none;
  pointer-events: all;
}
.compact-legend-box {
  fill: rgba(255, 255, 255, 0.97);
  stroke: #cfd8e5;
  stroke-width: 1;
  pointer-events: all;
}
.compact-legend-handle {
  fill: #77859a;
  font-weight: 800;
  pointer-events: none;
}
.compact-symbol-cell,
.compact-heat-cell,
.compact-bar,
.compact-bar-bg,
.compact-text-cell {
  pointer-events: none;
}

/* Phylogenetic statistics are a dense list, not dashboard cards. */
.phylo-stat-list {
  margin: 8px 14px 12px;
  padding: 9px 10px;
  border-top: 1px solid #e6eaf0;
  border-bottom: 1px solid #e6eaf0;
  grid-template-columns: minmax(210px, 1fr) minmax(80px, auto);
  font-size: 11px;
  background: #fbfcfe;
}
.phylo-grid {
  display: block;
  padding: 0 14px 14px;
}
.phylo-grid .analysis-card {
  border: 0;
  border-radius: 0;
  background: transparent;
  border-top: 1px solid #e6eaf0;
  overflow: visible;
}
.phylo-grid .analysis-card.wide {
  grid-column: auto;
}
.phylo-grid .analysis-card h3 {
  background: transparent;
  border: 0;
  padding: 11px 0 7px;
  font-size: 12.5px;
}
.phylo-grid .analysis-card > .hint {
  background: transparent;
  border: 0;
  padding: 0 0 8px;
}
.phylo-grid .analysis-card-body {
  padding: 0 0 12px;
  overflow: auto;
}
.phylo-grid .metric-list {
  font-size: 10.5px;
}

@media (max-width: 1180px) {
  .workspace-grid {
    grid-template-columns: 225px minmax(350px, 1fr) 330px;
    gap: 6px;
    padding: 6px;
  }
  body.inputs-collapsed .workspace-grid {
    grid-template-columns: 0 minmax(350px, 1fr) 330px;
  }
  body.controls-collapsed .workspace-grid {
    grid-template-columns: 225px minmax(350px, 1fr) 0;
  }
  .project-inspector {
    grid-template-columns: 35px minmax(0, 1fr);
  }
  .project-tab {
    width: 34px;
    height: 40px;
  }
}
@media (max-width: 980px) {
  .workspace-grid {
    grid-template-columns: 205px minmax(320px, 1fr) 305px;
    gap: 5px;
    padding: 5px;
    overflow-x: auto;
  }
  body.inputs-collapsed .workspace-grid {
    grid-template-columns: 0 minmax(320px, 1fr) 305px;
  }
  body.controls-collapsed .workspace-grid {
    grid-template-columns: 205px minmax(320px, 1fr) 0;
  }
  .left-panel,
  .right-panel {
    display: flex !important;
    overflow: auto;
  }
  .right-panel {
    display: block !important;
  }
  .project-page-titlebar small {
    display: none;
  }
}
@media (max-width: 760px) {
  .workspace-grid {
    grid-template-columns: 190px minmax(300px, 1fr) 290px;
  }
  .project-inspector {
    grid-template-columns: 32px minmax(0, 1fr);
  }
  .project-tab {
    width: 31px;
  }
}

.panel-icon-toggle {
  border: 0;
  background: transparent;
  border-radius: 4px;
}
.panel-icon-toggle:hover {
  background: #eef2f7;
}
.panel-icon-toggle.active {
  border: 0;
  background: #e8edff;
}
.phylo-stat-list {
  display: block;
  margin: 8px 14px 12px;
  padding: 9px 10px;
  border-top: 1px solid #e6eaf0;
  border-bottom: 1px solid #e6eaf0;
  background: #fbfcfe;
}
.phylo-stat-list > .metric-list {
  grid-template-columns: minmax(210px, 1fr) minmax(80px, auto);
  font-size: 11px;
}
/* Pin workspace panes to columns so hiding one pane never reflows another pane into its slot. */
.workspace-grid > .left-panel {
  grid-column: 1;
}
.workspace-grid > .plot-shell {
  grid-column: 2;
}
.workspace-grid > .right-panel {
  grid-column: 3;
}
body.inputs-collapsed .workspace-grid > .plot-shell {
  grid-column: 2;
}
body.inputs-collapsed .workspace-grid > .right-panel {
  grid-column: 3;
}
body.controls-collapsed .workspace-grid > .left-panel {
  grid-column: 1;
}
body.controls-collapsed .workspace-grid > .plot-shell {
  grid-column: 2;
}
body.inputs-collapsed.controls-collapsed .workspace-grid > .plot-shell {
  grid-column: 1;
}
/* Keep the compact project tree readable despite the narrower inspector. */
.project-tree-file-name small,
.example-files span {
  font-size: 9.5px;
}
.project-tree-file-name strong {
  font-size: 10.5px;
}
.project-tree-branches li {
  font-size: 10px;
}
.project-tree-branches li small {
  font-size: 8.5px;
}

.legend-hitbox {
  fill: transparent;
  stroke: none;
  pointer-events: all;
}
.legend-title {
  font-weight: 800;
  fill: #34445e;
  dominant-baseline: middle;
  pointer-events: none;
}
.legend-handle {
  fill: #77859a;
  font-weight: 800;
  dominant-baseline: middle;
  pointer-events: none;
}
.legend-draggable {
  cursor: grab;
}
.legend-draggable.figure-dragging {
  cursor: grabbing;
}
.legend-draggable .legend-box {
  fill: rgba(255, 255, 255, 0.97);
  stroke: #cfd8e5;
  stroke-width: 1;
  pointer-events: all;
}
.legend-free-disabled {
  opacity: 0.48;
}

:root {
  --workbench-blue: #2948b8;
  --workbench-navy: #24324a;
  --workbench-slate: #5d6a7f;
  --workbench-line: #d7deea;
  --workbench-soft: #f4f7fb;
  --workbench-green: #16794b;
}
.brand-mark {
  border-radius: 7px;
  background: linear-gradient(145deg, #2c4fc4, #4f68d9);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}
.brand-name {
  letter-spacing: -0.015em;
}
.brand-sub {
  font-size: 10.5px;
  color: #66748a;
}
.toolbar-command-group {
  display: flex;
  align-items: center;
  gap: 5px;
}
.data-health-pill,
.run-id-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 8px;
  border: 1px solid #dce2eb;
  border-radius: 5px;
  background: #fff;
  color: #66748a;
  font-size: 9.5px;
  font-weight: 700;
  white-space: nowrap;
}
.health-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #aab4c4;
}
.data-health-pill.is-good {
  color: #176844;
  border-color: #c9e8d8;
  background: #f5fbf7;
}
.data-health-pill.is-good .health-dot {
  background: #1f9d63;
}
.data-health-pill.is-warn {
  color: #8a5a07;
  background: #fffbef;
  border-color: #f0dfad;
}
.data-health-pill.is-warn .health-dot {
  background: #c98a16;
}
.run-id-pill {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #53627a;
  background: #f7f9fc;
}
.analysis-provenance-strip {
  margin: 7px 14px 4px;
  padding: 7px 9px;
  border: 1px solid #dfe5ee;
  border-left: 3px solid #6b7fbd;
  border-radius: 4px;
  background: #f8fafc;
  color: #58657a;
  font-size: 9.5px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.analysis-provenance-strip strong {
  color: #2d3a52;
  font-size: 10px;
}
.analysis-provenance-strip span {
  color: #758197;
}
.professional-analysis-section {
  margin: 10px 14px;
  border: 1px solid #dce3ee;
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
}
.analysis-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 11px;
  border-bottom: 1px solid #e3e8f0;
  background: linear-gradient(#fbfcfe, #f7f9fc);
}
.analysis-section-title > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.analysis-section-title strong {
  font-size: 12.5px;
  color: #26354d;
}
.analysis-section-title span {
  font-size: 9.5px;
  color: #748096;
}
.section-kicker {
  font-size: 8.5px !important;
  font-weight: 900 !important;
  letter-spacing: 0.12em;
  color: #5268b7 !important;
  border: 1px solid #d8e0fb;
  background: #f2f5ff;
  border-radius: 3px;
  padding: 3px 5px;
}
.sample-stat-list,
.priority-metric-list {
  display: grid !important;
  grid-template-columns: minmax(190px, 1fr) minmax(120px, auto);
  margin: 0 !important;
  padding: 8px 11px !important;
  background: #fff !important;
  border: 0 !important;
  font-size: 10.5px !important;
}
.sample-stat-list > div,
.priority-metric-list > div {
  padding: 5px 6px;
  border-bottom: 1px solid #eef1f5;
}
/*
 * Source section 10/53: sample stat list div nth last child n 2.
 * Assembles into styles/base.css.
 * Rules remain in their original cascade order; later sections may intentionally override these
 * declarations.
 */
.sample-stat-list>div:nth-last-child(-n/**/+2),.priority-metric-list>div:nth-last-child(-n/**/+2) {
  border-bottom: 0;
}
.sample-stat-list > div:nth-child(odd),
.priority-metric-list > div:nth-child(odd) {
  color: #536078;
}
.sample-stat-list > div:nth-child(even),
.priority-metric-list > div:nth-child(even) {
  font-weight: 750;
  color: #22314a;
  text-align: right;
}
.microbiology-essential-section {
  border-left: 3px solid #3f62d6;
}
.microbiology-essential-section .analysis-section-title {
  background: linear-gradient(90deg, #f3f6ff, #fbfcff);
}
.professional-note {
  font-size: 9.5px;
  line-height: 1.5;
  color: #56657b;
  padding: 8px 11px;
  border-top: 1px solid #e5eaf1;
  background: #fafcff;
}
.technical-summary-section {
  border-left: 3px solid #8997ac;
}
.technical-summary-section .phylo-stat-list {
  margin: 0 !important;
  border: 0 !important;
  background: #fff !important;
  padding: 8px 11px !important;
}
.professional-pair-card {
  margin-top: 10px !important;
  border-radius: 6px !important;
  box-shadow: none !important;
}
.professional-phylo-sections {
  padding-top: 0 !important;
}
.professional-phylo-sections .analysis-card {
  counter-increment: none;
}
.professional-phylo-sections .analysis-card h3 {
  color: #2b3950;
  font-size: 12px !important;
}
.professional-phylo-sections .analysis-card:first-child {
  border-top: 0;
}
.professional-statusbar {
  height: 30px;
  gap: 0;
  padding: 0;
  background: #eef2f7;
  border-top: 1px solid #cfd8e6;
  color: #526077;
  overflow: hidden;
}
.status-segment {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 100%;
  padding: 0 9px;
  border-right: 1px solid #d7dee8;
  white-space: nowrap;
  font-size: 9.5px;
}
.status-segment b {
  font-size: 8px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8792a3;
}
.status-primary {
  color: #31425e;
  font-weight: 700;
}
.status-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #24a36a;
  box-shadow: 0 0 0 2px rgba(36, 163, 106, 0.12);
}
.status-separator {
  padding: 0 5px;
  color: #9aa4b2;
}
.professional-statusbar > #metadataMatchStatus,
.professional-statusbar > #elapsedStatus,
.professional-statusbar > #statusRunId {
  font-size: 9.5px;
  white-space: nowrap;
}
.professional-statusbar > #statusRunId {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  padding-right: 9px;
}
.workspace-tabs {
  background: #f0f3f8;
  border-bottom-color: #ccd5e2;
  padding: 4px 8px;
  gap: 1px;
}
.workspace-tabs .view-tab {
  border-radius: 5px 5px 0 0;
  border-color: transparent;
  padding: 7px 10px;
  color: #58657a;
}
.workspace-tabs .view-tab.active {
  border-color: #cbd5e4;
  border-bottom-color: #fff;
  background: #fff;
  color: #263e9b;
  box-shadow: none;
}
.settings-page-titlebar,
.project-page-titlebar {
  background: #f5f7fa !important;
  border-bottom-color: #d6dee9 !important;
}
.settings-page-titlebar strong,
.project-page-titlebar strong {
  color: #29384f;
}
.control-group {
  box-shadow: none;
  border-radius: 7px;
  border-color: #d9e0e9;
}
.control-group h3 {
  color: #344259;
}
.analysis-mini-table {
  font-size: 10px;
}
.analysis-mini-table th {
  background: #f4f6fa;
  color: #536178;
  font-weight: 800;
}
.analysis-mini-table tr:hover td {
  background: #fafcff;
}
@media (max-width: 1280px) {
  .run-id-pill {
    display: none;
  }
  .status-segment:nth-of-type(3) {
    display: none;
  }
}
/* Keep long analysis sections at intrinsic height inside the scrollable phylogenetic workspace. */
.phylo-workspace > .analysis-workspace-head,
.phylo-workspace > .phylo-selector-row,
.phylo-workspace > .analysis-provenance-strip,
.phylo-workspace > .professional-analysis-section,
.phylo-workspace > .phylo-pair-card,
.phylo-workspace > .phylo-grid {
  flex: 0 0 auto;
}

.outbreak-workspace {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding-bottom: 26px;
}
.outbreak-selector-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 9px 12px;
  padding: 12px 14px;
  border-bottom: 1px solid #e5e9f0;
  background: #fbfcfe;
}
.outbreak-selector-row label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11.5px;
  color: #45536a;
  font-weight: 700;
}
.outbreak-selector-row label > span {
  font-weight: 800;
}
.outbreak-selector-row select,
.outbreak-selector-row input[type='number'] {
  min-height: 34px;
  border: 1px solid #cad2df;
  border-radius: 6px;
  background: #fff;
  padding: 5px 7px;
  color: #26344e;
}
.outbreak-selector-row small {
  font-size: 9.5px;
  line-height: 1.3;
  color: #748095;
  font-weight: 500;
}
.outbreak-selector-row .check-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 7px;
  padding-top: 19px;
}
.outbreak-summary-section,
.outbreak-table-section,
.outbreak-method-section {
  margin: 13px 14px 0;
}
.outbreak-stat-list {
  grid-template-columns: minmax(240px, 1fr) minmax(140px, auto);
}
.outbreak-figures-section {
  margin: 13px 14px 0;
}
.outbreak-figure-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 9px;
}
.outbreak-figure {
  margin: 0;
  border: 1px solid #dfe5ee;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  min-width: 0;
}
.outbreak-figure figcaption {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 11px 7px;
  border-bottom: 1px solid #e7ebf1;
  background: #fafbfc;
}
.outbreak-figure figcaption strong {
  font-size: 12px;
  color: #26344e;
}
.outbreak-figure figcaption span {
  font-size: 10px;
  color: #748095;
}
.outbreak-plot {
  min-height: 190px;
  padding: 7px;
  overflow: auto;
  background: #fff;
}
.outbreak-plot-empty {
  min-height: 170px;
  display: grid;
  place-items: center;
}
.outbreak-chart-svg {
  display: block;
  min-width: 100%;
  overflow: visible;
}
.outbreak-table-wrap {
  overflow: auto;
  border: 1px solid #e2e7ef;
  border-radius: 7px;
}
.outbreak-evidence-table {
  min-width: 1500px;
}
.outbreak-evidence-table td:first-child {
  min-width: 150px;
}
.outbreak-evidence-table td:first-child strong {
  display: block;
}
.outbreak-evidence-table td:first-child small {
  display: block;
  margin-top: 3px;
  color: #7a8597;
  max-width: 190px;
  white-space: normal;
}
.outbreak-evidence-table tbody tr {
  cursor: pointer;
}
.outbreak-evidence-table tbody tr:hover {
  background: #f3f6ff;
}
.outbreak-method-list {
  margin: 8px 0 0;
  padding: 0 4px 2px 20px;
  color: #45536a;
  font-size: 11px;
  line-height: 1.5;
}
.outbreak-method-list li {
  margin: 7px 0;
}
.outbreak-method-list strong {
  color: #24324a;
}
@media (max-width: 1100px) {
  .outbreak-selector-row {
    grid-template-columns: repeat(2, minmax(170px, 1fr));
  }
  .outbreak-figure-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  .outbreak-selector-row {
    grid-template-columns: 1fr;
  }
}

.outbreak-detail-section {
  margin: 13px 14px 0;
}
.outbreak-selected-detail > .metric-list {
  font-size: 10.5px;
  grid-template-columns: minmax(230px, 1fr) minmax(180px, 2fr);
}
.outbreak-dossier-actions {
  display: flex;
  justify-content: flex-end;
  margin: 8px 0;
}
.outbreak-evidence-table tbody tr.selected td {
  background: #eef2ff !important;
}
.outbreak-selected-detail .analysis-note {
  margin-top: 8px;
}

.legal-modal {
  width: min(790px, 95vw);
}
.about-identity {
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 16px 0 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f8faff;
}
.about-logo {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 850;
  font-size: 14px;
}
.about-identity > div:last-child {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.about-identity strong {
  font-size: 15px;
}
.about-identity span {
  font-size: 11px;
  color: var(--muted);
}
.legal-facts {
  display: grid;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin: 12px 0;
}
.legal-facts > div {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 12px;
  padding: 8px 10px;
  border-bottom: 1px solid #edf0f5;
  font-size: 11px;
}
.legal-facts > div:last-child {
  border-bottom: 0;
}
.legal-facts span {
  color: var(--muted);
}
.legal-facts strong {
  font-weight: 700;
}
.legal-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}
.legal-actions .wide-btn {
  width: auto;
}
.license-summary-banner {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 14px 0;
  padding: 11px 12px;
  border: 1px solid #bfe0ce;
  background: #f0faf5;
  border-radius: 10px;
}
.license-summary-banner strong {
  font-size: 12px;
  color: var(--good);
}
.license-summary-banner span {
  font-size: 10px;
  color: #4c6658;
  line-height: 1.45;
}
.licenses-modal h3 {
  font-size: 12px;
  margin: 15px 0 7px;
}
.license-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 235px;
  gap: 14px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-bottom: 0;
  background: #fff;
}
.license-row:first-of-type {
  border-radius: 9px 9px 0 0;
}
.license-row:last-of-type {
  border-bottom: 1px solid var(--border);
  border-radius: 0 0 9px 9px;
}
.license-row > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.license-row strong,
.license-row b {
  font-size: 11px;
}
.license-row span,
.license-row small {
  font-size: 9px;
  line-height: 1.45;
  color: var(--muted);
}
.legal-file-list {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 9px;
  overflow: hidden;
}
.legal-file-list code,
.legal-file-list span {
  padding: 7px 9px;
  border-bottom: 1px solid #edf0f5;
  font-size: 10px;
}
.legal-file-list code {
  background: #f7f9fd;
  font-weight: 700;
}
.legal-file-list span {
  color: var(--muted);
}
.legal-file-list>*:nth-last-child(-n/**/+2) {
  border-bottom: 0;
}
/*
 * Source section 11/53: status copyright.
 * Assembles into styles/base.css.
 * Rules remain in their original cascade order; later sections may intentionally override these
 * declarations.
 */
.status-copyright {
  font-size: 9px;
  color: var(--muted);
  white-space: nowrap;
}
@media (max-width: 900px) {
  .status-copyright,
  .status-copyright-sep {
    display: none;
  }
  .license-row {
    grid-template-columns: 1fr;
  }
  .legal-facts > div,
  .legal-file-list {
    grid-template-columns: 1fr;
  }
  .legal-file-list code {
    border-bottom: 0;
  }
  .legal-file-list span {
    border-bottom: 1px solid #edf0f5;
  }
}

.horizontal-view-locked {
  overflow-x: hidden !important;
  overscroll-behavior-x: none;
}
.horizontal-view-locked.is-panning {
  cursor: ns-resize;
}
.legend-quick-toggle {
  border: 1px solid var(--border);
  background: #fff;
  color: #41506a;
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 11.5px;
  font-weight: 750;
  cursor: pointer;
  white-space: nowrap;
}
.legend-quick-toggle:hover {
  background: #f4f7fb;
  border-color: #bfc9d8;
}
.legend-quick-toggle:disabled {
  opacity: 0.45;
  cursor: default;
}
.project-drop-zone {
  margin: 7px 0;
  padding: 8px 7px;
  border: 1px dashed #aebbd0;
  border-radius: 6px;
  background: #f8faff;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: center;
  color: #526178;
  transition: 0.14s ease;
}
.project-drop-zone strong {
  font-size: 10.5px;
  color: #35455f;
}
.project-drop-zone span {
  font-size: 8.8px;
}
.project-drop-zone.drag-over,
.project-tree.drag-over {
  border-color: #516fd6;
  background: #edf2ff;
  box-shadow: inset 0 0 0 1px #9caef2;
}
.project-tree-file[data-drop-input] {
  transition:
    background 0.12s ease,
    outline 0.12s ease;
}
.project-tree-file[data-drop-input]:has(button:hover) {
  background: #f8faff;
}

/* Result/workspace readability is increased without changing the compact Settings inspector typography. */
.plot-shell .plot-title {
  font-size: 17px;
}
.plot-shell .plot-subtitle {
  font-size: 12.5px;
  line-height: 1.5;
}
.workspace-tabs .view-tab {
  font-size: 13px;
  padding: 8px 11px;
}
.workspace-view-head strong,
.analysis-workspace-head strong {
  font-size: 15px;
}
.workspace-view-head span,
.analysis-workspace-head span {
  font-size: 12px;
  line-height: 1.45;
}
.analysis-selector-row label,
.phylo-selector-row label {
  font-size: 13px;
}
.analysis-provenance-strip {
  font-size: 11.5px;
  line-height: 1.5;
}
.analysis-provenance-strip strong {
  font-size: 12px;
}
.analysis-section-title strong {
  font-size: 14px;
}
.analysis-section-title span {
  font-size: 11px;
}
.professional-note,
.analysis-note,
.phylo-note {
  font-size: 12px;
  line-height: 1.55;
}
.sample-stat-list,
.priority-metric-list {
  font-size: 12.5px !important;
  line-height: 1.45;
}
.phylo-stat-list,
.phylo-stat-list > .metric-list {
  font-size: 12.5px !important;
}
.phylo-grid .metric-list {
  font-size: 12px;
}
.analysis-card-body,
.metadata-profile,
.insight-table,
.analysis-mini-table,
.outbreak-method-list,
.outbreak-selected-detail > .metric-list {
  font-size: 12.5px;
}
.analysis-mini-table th,
.analysis-mini-table td,
.insight-table th,
.insight-table td {
  padding: 7px 8px;
}
.plot-shell .empty-mini {
  font-size: 12px;
}
.outbreak-figure figcaption strong {
  font-size: 13.5px;
}
.outbreak-figure figcaption span {
  font-size: 11.5px;
}
.outbreak-selector-row label {
  font-size: 12.5px;
}
.outbreak-selector-row small {
  font-size: 10.5px;
}

/* Fast navigation and independently collapsible phylogenetic analyses. */
.phylo-section-nav {
  position: sticky;
  top: 0;
  z-index: 9;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  padding: 7px 14px;
  border-top: 1px solid #dfe5ee;
  border-bottom: 1px solid #d7dee9;
  background: rgba(248, 250, 253, 0.97);
  backdrop-filter: blur(4px);
}
.phylo-section-nav button {
  border: 1px solid #cfd8e5;
  border-radius: 5px;
  background: #fff;
  color: #40506b;
  font-size: 11.5px;
  font-weight: 750;
  padding: 5px 7px;
  cursor: pointer;
}
.phylo-section-nav button:hover {
  background: #eef3ff;
  border-color: #aebceb;
  color: #2f49b6;
}
.phylo-nav-spacer {
  flex: 1;
}
.phylo-collapsible {
  margin: 0 !important;
  padding: 0 !important;
}
.phylo-collapsible > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 2px 9px;
  color: #2b3950;
  font-weight: 800;
  border-bottom: 0;
}
.phylo-collapsible > summary::-webkit-details-marker {
  display: none;
}
.phylo-collapsible > summary:after {
  content: '▾';
  font-size: 12px;
  color: #728096;
  margin-left: 7px;
}
.phylo-collapsible:not([open]) > summary:after {
  content: '▸';
}
.phylo-collapsible > summary span {
  font-size: 13.5px;
}
.phylo-collapsible > summary small {
  margin-left: auto;
  font-size: 10.5px;
  font-weight: 550;
  color: #768298;
}
.phylo-collapsible-body {
  padding: 0 0 10px;
}
.phylo-collapsible:not([open]) .phylo-collapsible-body {
  display: none;
}
.professional-phylo-sections .analysis-card h3 {
  font-size: 13.5px !important;
}

/* Per-metadata-field Compact configuration, inspired by scientific annotation-track workbenches. */
.compact-field-controls {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 7px 0 10px;
}
.compact-field-row {
  display: grid;
  grid-template-columns: 18px minmax(70px, 1fr) 74px 58px 18px;
  gap: 5px;
  align-items: center;
  padding: 5px 4px;
  border-bottom: 1px solid #edf0f4;
}
.compact-field-row:last-child {
  border-bottom: 0;
}
.compact-field-row input[type='checkbox'] {
  width: 14px;
  height: 14px;
  margin: 0;
}
.compact-field-row select,
.compact-field-row input[type='number'] {
  min-height: 29px !important;
  height: 29px !important;
  padding: 3px 5px !important;
  font-size: 10.5px !important;
}
.compact-field-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10.5px;
  font-weight: 750;
  color: #344259;
}

@media (max-width: 1100px) {
  .phylo-section-nav {
    gap: 4px;
    padding: 6px 9px;
  }
  .phylo-section-nav button {
    font-size: 10.5px;
    padding: 4px 6px;
  }
  .phylo-collapsible > summary small {
    display: none;
  }
  .workspace-tabs .view-tab {
    font-size: 12px;
  }
}

:root {
  --font-ui: 'Noto Sans', 'Segoe UI Variable Text', 'Segoe UI', system-ui, Arial, sans-serif;
  --font-display: 'Noto Sans', 'Segoe UI Variable Display', 'Segoe UI', system-ui, Arial, sans-serif;
  --ui-xs: 10px;
  --ui-sm: 11px;
  --ui-md: 12px;
  --ui-lg: 13.5px;
  --ui-title: 15px;
  --chrome: #f5f6f8;
  --chrome-2: #eef1f5;
  --chrome-line: #cfd6df;
  --chrome-text: #263244;
}
html,
body {
  font-family: var(--font-ui);
  font-size: 12px;
  line-height: 1.4;
  background: #eef1f5;
}
button,
input,
select,
textarea {
  font-family: var(--font-ui);
  font-size: 12px;
}
.ui-icon {
  width: 16px;
  height: 16px;
  display: inline-block;
  vertical-align: -3px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}
.app-shell {
  height: 100vh;
  min-height: 0;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}
.topbar {
  min-height: 98px;
  height: auto;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: 36px 58px;
  grid-template-areas: 'brand menu' 'toolbar toolbar';
  column-gap: 20px;
  row-gap: 0;
  padding: 0 12px;
  background: #f7f8fa;
  border-bottom: 1px solid #c9d1dc;
  box-shadow: 0 1px 2px rgba(30, 41, 59, 0.04);
}
.brand {
  grid-area: brand;
  min-width: 245px;
  gap: 8px;
}
.brand-mark {
  width: 27px;
  height: 27px;
  border-radius: 5px;
  font-size: 10px;
}
.brand-name {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
}
.brand-sub {
  font-size: 9.5px;
  margin-top: 0;
}
.menubar {
  grid-area: menu;
  min-width: 0;
  align-self: stretch;
}
.menu-trigger {
  height: 30px;
  padding: 0 8px !important;
  border-radius: 3px !important;
  font-size: 11.5px !important;
  color: #2d3748 !important;
}
.menu-trigger:hover,
.menu-trigger[aria-expanded='true'] {
  background: #e6eaf0 !important;
}
.toolbar-command-group {
  gap: 3px;
}
.toolbar-sep {
  height: 34px;
  align-self: center;
  background: #d6dce5;
}
.interaction-switch {
  align-self: center;
  margin: 0 4px;
  white-space: nowrap;
  font-size: 10.5px;
}
.modebar {
  min-height: 34px;
  padding: 4px 10px;
  background: #f8f9fb;
  border-bottom-color: #d5dbe3;
  gap: 8px;
}
.mode-pill {
  font-size: 10.5px;
  padding: 4px 8px;
  border-radius: 4px;
}
.data-health-pill,
.run-id-pill {
  height: 23px;
  font-size: 9px;
}
.interaction-hint {
  font-size: 9.5px;
}
.status-compact {
  font-size: 10px;
}
.workspace-grid {
  grid-template-columns: 290px minmax(480px, 1fr) 350px;
  gap: 6px;
  padding: 6px;
  background: #e8ebef;
}
.left-panel,
.right-panel {
  gap: 6px;
}
/*
 * Source section 12/53: plot shell.
 * Assembles into styles/base.css.
 * Rules remain in their original cascade order; later sections may intentionally override these
 * declarations.
 */
.plot-shell {
  border-radius: 4px;
  border-color: #cbd3de;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}
.plot-header {
  min-height: 74px;
  padding: 15px 16px 13px;
  background: #fff;
}
.plot-title {
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1.2;
}
.plot-subtitle {
  font-size: 12px;
  max-width: 900px;
}
.plot-badges {
  align-items: center;
}
.panel-icon-toggle {
  width: 26px;
  height: 26px;
}
.panel-icon-toggle .ui-icon {
  width: 15px;
  height: 15px;
}

/* Geneious-like document tabs: compact rectangular documents, clear active tab, icon + text. */
.workspace-tabs {
  min-height: 37px;
  padding: 4px 6px 0;
  gap: 2px;
  background: #edf0f4;
  border-bottom: 1px solid #bdc6d2;
  overflow-x: auto;
  overflow-y: hidden;
}
.workspace-tabs .view-tab {
  height: 33px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
  padding: 6px 10px !important;
  background: transparent;
  color: #536073;
  font-size: 11.5px !important;
  font-weight: 600;
  white-space: nowrap;
}
.workspace-tabs .view-tab .ui-icon {
  width: 14px;
  height: 14px;
  color: #68778b;
}
.workspace-tabs .view-tab:hover {
  background: #f7f8fa;
  border-color: #d4dae2;
}
.workspace-tabs .view-tab.active {
  position: relative;
  background: #fff;
  border-color: #bdc6d2;
  color: #1f356d;
  box-shadow: none;
}
.workspace-tabs .view-tab.active:before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: -4px;
  height: 3px;
  background: #375dc6;
  border-radius: 2px 2px 0 0;
}
.workspace-tabs .view-tab.active .ui-icon {
  color: #3155b4;
}
.workspace-tab-spacer {
  flex: 1 0 14px;
}
.workspace-focus-btn {
  height: 30px;
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid #cbd3de;
  background: #f8f9fb;
  color: #435168;
  border-radius: 4px;
  padding: 0 9px;
  font-size: 10.5px;
  font-weight: 650;
  white-space: nowrap;
}
.workspace-focus-btn:hover,
.workspace-focus-btn.active {
  background: #e6ecfa;
  color: #28499f;
  border-color: #afbee5;
}
.workspace-focus-btn .ui-icon {
  width: 14px;
  height: 14px;
}

/* Project navigator: desktop folder tree with real hierarchy and file-type icons. */
.project-inspector {
  grid-template-columns: 34px minmax(0, 1fr);
  border-radius: 4px;
  border-color: #cbd3de;
  min-height: 100%;
  background: #fff;
}
.project-tab-rail {
  background: #eef1f4;
  border-right-color: #d1d7df;
}
.project-tab {
  width: 33px;
  height: 40px;
}
.project-tab span {
  width: 26px;
  height: 26px;
  border: 0;
  background: transparent;
}
.project-tab span .ui-icon {
  width: 16px;
  height: 16px;
}
.project-tab.active {
  box-shadow: inset -2px 0 0 #3659b7;
  color: #284b9f;
}
.project-tab.active span {
  background: #dfe7f7;
  border: 0;
}
.project-page-titlebar {
  min-height: 48px;
  padding: 8px 9px !important;
}
.project-page-titlebar strong {
  font-size: 13px;
}
.project-page-titlebar small {
  font-size: 9.5px;
}
.project-title-actions {
  display: flex;
  gap: 3px;
}
.project-title-actions .icon-btn {
  width: 26px;
  height: 26px;
  border-radius: 3px;
}
.project-title-actions .ui-icon {
  width: 14px;
  height: 14px;
}
.project-page-body {
  padding: 6px 6px 10px;
}
.project-name-field,
.project-export-name {
  margin-bottom: 5px;
}
.project-name-field input,
.project-export-name input {
  height: 29px;
  min-height: 29px;
  border-radius: 4px;
  font-size: 11px;
}
.project-library-actions {
  margin-top: 2px !important;
}
.project-tree {
  font-size: 11px;
  margin: 4px -2px 6px;
  user-select: none;
}
.project-tree details > summary {
  list-style: none;
}
.project-tree details > summary::-webkit-details-marker {
  display: none;
}
.project-tree-project {
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.project-tree-project > summary {
  min-height: 27px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px;
  border-radius: 3px;
}
.project-tree-project > summary:hover {
  background: #f0f3f7;
}
.project-tree-project.active-project > summary {
  background: #e5eaf3;
}
.project-switch {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 5px;
  border: 0;
  background: transparent;
  text-align: left;
  color: #344154;
  font-size: 11.5px;
  font-weight: 650;
  padding: 2px;
}
.project-switch .ui-icon {
  width: 15px;
  height: 15px;
  color: #d5a32f;
  fill: #f4cc66;
  stroke: #8f6d1f;
}
.active-project-badge {
  font-size: 8px;
  padding: 1px 4px;
  border-radius: 3px;
  background: #dce5fb;
  color: #294995;
  font-weight: 750;
}
.project-tree-branches {
  position: relative;
  padding-left: 14px;
  margin-left: 7px;
  border-left: 1px solid #d9dee6;
}
.project-tree-branches:before {
  display: none;
}
.project-branch-group {
  margin: 1px 0;
}
.project-branch-group > summary {
  min-height: 24px;
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px;
  padding: 2px 3px !important;
  border-radius: 3px;
  color: #4c596c;
  font-size: 10.5px !important;
  font-weight: 600;
}
.project-branch-group > summary:hover {
  background: #f2f4f7;
}
.project-branch-group > summary > .ui-icon {
  width: 14px;
  height: 14px;
  color: #c49228;
  fill: #f3c75b;
  stroke: #8e6a1c;
}
.project-branch-group > summary small {
  font-size: 8.5px;
  color: #8792a2;
  font-weight: 500;
}
.subproject-nodes {
  margin-left: 4px;
}
.subproject-nodes > .project-tree-project {
  border-left: 1px solid #dde2e9;
  margin-left: 2px;
  padding-left: 5px;
}
.project-tree-files {
  display: grid;
  gap: 0;
}
.project-tree-file {
  grid-template-columns: 18px minmax(0, 1fr) auto auto;
  gap: 4px;
  align-items: center;
  min-height: 29px;
  padding: 2px 2px 2px 4px;
  border-radius: 3px;
}
.project-tree-file:hover {
  background: #f3f5f8;
}
.project-tree-file > .ui-icon {
  width: 14px;
  height: 14px;
  color: #5c71a5;
}
.project-tree-file.is-loaded > .ui-icon {
  color: #3159b6;
}
.project-tree-file-name {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.project-tree-file-name strong {
  font-size: 10.5px;
  font-weight: 600;
}
.project-tree-file-name small {
  font-size: 8.8px;
  color: #7b8798;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.project-tree-file > button {
  border: 0;
  background: transparent;
  border-radius: 3px;
  font-size: 8.8px;
  padding: 2px 4px;
  color: #5b6c84;
}
.project-tree-file > button:hover {
  background: #e4e9f0;
  color: #2d4f9a;
}
.project-tree-clear {
  color: #a33 !important;
}
.project-tree-branches ul {
  list-style: none;
  margin: 0;
  padding: 0 0 0 2px;
}
.project-tree-nav-item,
.project-tree-leaf,
.project-tree-json {
  min-height: 24px;
  display: flex;
  align-items: center;
}
.project-tree-nav-item button,
.project-tree-json button {
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  border: 0;
  background: transparent;
  border-radius: 3px;
  padding: 4px;
  color: #506078;
  text-align: left;
  font-size: 10px;
}
.project-tree-nav-item button:hover,
.project-tree-json button:hover {
  background: #eef2f7;
  color: #294d9f;
}
.project-tree-nav-item .ui-icon,
.project-tree-leaf .ui-icon,
.project-tree-json .ui-icon {
  width: 13px;
  height: 13px;
  color: #687a98;
}
.project-tree-leaf {
  gap: 5px;
  padding: 3px 4px;
  color: #637086;
  font-size: 9.8px;
}
.project-tree-json {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  padding-bottom: 2px;
}
.project-tree-json small {
  padding-left: 22px;
  font-size: 8px;
  color: #8a94a3;
}
.muted-tree-item {
  padding: 4px 5px;
  color: #929baa;
  font-size: 9px;
}
.project-tree-example {
  margin-top: 7px;
  border: 0;
  border-top: 1px solid #dce1e8;
  border-radius: 0;
  background: transparent;
}
.project-tree-example > summary {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  gap: 4px;
  padding: 7px 3px 4px;
  font-size: 10px;
}
.project-tree-example > summary .ui-icon {
  width: 14px;
  height: 14px;
  color: #c49228;
  fill: #f3c75b;
}
.example-project {
  border-top: 0;
}
.example-project-open {
  grid-template-columns: 16px minmax(0, 1fr) auto;
}
.example-project-open .ui-icon {
  width: 14px;
  height: 14px;
}
.example-files span {
  grid-template-columns: 16px minmax(0, 1fr);
  font-size: 9px;
}
.example-files span .ui-icon {
  width: 12px;
  height: 12px;
}
.example-files em {
  font-style: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Homogeneous typography across data, settings and analyses. */
.workspace-view-head,
.analysis-workspace-head {
  min-height: 57px;
  padding: 10px 13px;
}
.workspace-view-head strong,
.analysis-workspace-head strong {
  font-family: var(--font-display);
  font-size: 14px !important;
  font-weight: 700;
}
.workspace-view-head span,
.analysis-workspace-head span {
  font-size: 10.8px !important;
  line-height: 1.35;
}
.workspace-view-actions button,
.mini-btn {
  min-height: 29px;
  border-radius: 4px;
  font-size: 10.5px;
  padding: 5px 8px;
}
.workspace-view-actions .focus-analysis-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.workspace-view-actions .focus-analysis-btn .ui-icon {
  width: 13px;
  height: 13px;
}
.analysis-selector-row,
.phylo-selector-row,
.outbreak-selector-row {
  padding: 10px 13px;
  gap: 9px 12px;
  background: #f8f9fb;
}
.analysis-selector-row label,
.phylo-selector-row label,
.outbreak-selector-row label {
  font-size: 11px !important;
  font-weight: 600;
}
/*
 * Source section 13/53: analysis selector row select.
 * Assembles into styles/base.css.
 * Rules remain in their original cascade order; later sections may intentionally override these
 * declarations.
 */
.analysis-selector-row select,
.phylo-selector-row select,
.outbreak-selector-row select,
.outbreak-selector-row input[type='number'] {
  min-height: 31px;
  height: 31px;
  border-radius: 4px;
  font-size: 11px;
}
.analysis-provenance-strip {
  margin: 7px 13px 0;
  padding: 6px 8px;
  font-size: 10px !important;
}
.analysis-provenance-strip strong {
  font-size: 10.5px !important;
}
.control-group label,
.field-grid label {
  font-size: 11px;
}
.control-group h3 {
  font-size: 12px;
}
.settings-page-titlebar strong {
  font-size: 13px;
}
.hint,
.professional-note,
.analysis-note,
.phylo-note {
  font-size: 10.5px !important;
  line-height: 1.45;
}
.analysis-mini-table,
.insight-table {
  font-size: 10.5px;
}
.analysis-mini-table th,
.analysis-mini-table td,
.insight-table th,
.insight-table td {
  padding: 6px 7px;
}
.metric-list,
.sample-stat-list,
.priority-metric-list,
.phylo-stat-list,
.outbreak-stat-list {
  font-size: 11px !important;
}

/* One analysis language: header -> selectors -> provenance -> top cards -> details. */
.analysis-surface {
  background: #f3f5f8;
}
.analysis-workspace,
.phylo-workspace,
.outbreak-workspace {
  overflow-y: auto;
  min-height: 0;
}
.analysis-top-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 8px;
  margin: 9px 13px 10px;
}
.analysis-top-cards-phylo {
  grid-template-columns: repeat(3, minmax(220px, 1fr));
}
.analysis-top-cards > .professional-analysis-section,
.analysis-top-cards > .phylo-pair-card {
  margin: 0 !important;
  height: 100%;
  border: 1px solid #d6dde7 !important;
  border-radius: 5px !important;
  background: #fff !important;
  overflow: hidden;
}
.analysis-summary-card {
  box-shadow: 0 1px 1px rgba(15, 23, 42, 0.025);
}
.professional-analysis-section {
  margin: 9px 13px;
  border-radius: 5px;
  border-color: #d6dde7;
}
.analysis-section-title {
  min-height: 44px;
  padding: 8px 10px;
  background: #f8f9fb;
  border-bottom-color: #dfe4eb;
}
.analysis-section-title strong {
  font-size: 12px !important;
}
.analysis-section-title span {
  font-size: 9.8px !important;
}
.section-kicker {
  font-size: 8px !important;
  border-radius: 3px;
}
.analysis-detail-section {
  background: #fff;
}
.analysis-detail-section > .insight-table-wrap,
.analysis-detail-section > .metadata-profile {
  border: 0 !important;
  border-radius: 0 !important;
  margin: 0 !important;
}
.sample-stat-list,
.priority-metric-list {
  padding: 7px 9px !important;
}
.technical-summary-section .phylo-stat-list {
  padding: 7px 9px !important;
}
.professional-pair-card {
  padding: 0 !important;
}
.professional-pair-card > div:first-child {
  padding: 8px 10px;
  border-bottom: 1px solid #dfe4eb;
  background: #f8f9fb;
}
.professional-pair-card .phylo-pair-selectors {
  padding: 8px 10px;
}
.professional-pair-card .phylo-pair-result {
  margin: 0 10px 10px;
}
.phylo-section-nav {
  top: 0;
  margin-top: 0;
  padding: 6px 13px;
  background: #eef1f5;
}
.phylo-section-nav button {
  font-size: 10px;
  padding: 4px 6px;
  border-radius: 3px;
}
.phylo-grid {
  padding: 0 13px 14px;
}
.phylo-collapsible > summary {
  padding: 10px 3px 8px;
}
.phylo-collapsible > summary span {
  font-size: 12px;
}
.outbreak-figures-section {
  margin: 9px 13px 0 !important;
  padding-bottom: 9px;
}
.outbreak-figure-grid {
  padding: 0 9px;
}
.outbreak-table-section,
.outbreak-detail-section,
.outbreak-method-section {
  margin: 9px 13px 0;
}
.outbreak-figure {
  border-radius: 4px;
}
.outbreak-figure figcaption strong {
  font-size: 11.5px;
}
.outbreak-figure figcaption span {
  font-size: 10px;
}
.outbreak-method-list {
  font-size: 10.5px;
}
.outbreak-selected-detail > .metric-list {
  font-size: 10.5px;
}

/* Focus mode enlarges the active document to the whole application window. */
body.focus-workspace .app-shell {
  grid-template-rows: minmax(0, 1fr);
}
body.focus-workspace .topbar,
body.focus-workspace .modebar,
body.focus-workspace .statusbar {
  display: none !important;
}
body.focus-workspace .workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 0;
  padding: 0;
  height: 100vh;
  background: #fff;
}
body.focus-workspace .workspace-grid > .left-panel,
body.focus-workspace .workspace-grid > .right-panel {
  display: none !important;
}
body.focus-workspace .workspace-grid > .plot-shell {
  grid-column: 1 !important;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  height: 100vh;
}
body.focus-workspace .plot-header {
  display: none;
}
body.focus-workspace .workspace-tabs {
  min-height: 38px;
  position: sticky;
  top: 0;
  z-index: 30;
}
body.focus-workspace .workspace-focus-btn {
  background: #dfe8fb;
  border-color: #9fb1df;
  color: #24489e;
}

@media (max-width: 1320px) {
  .workspace-grid {
    grid-template-columns: 260px minmax(420px, 1fr) 330px;
  }
  .analysis-top-cards-phylo {
    grid-template-columns: repeat(2, minmax(240px, 1fr));
  }
  .analysis-top-cards-phylo > .professional-pair-card {
    grid-column: 1/-1;
  }
}
@media (max-width: 1020px) {
  .topbar {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    grid-template-areas: 'brand' 'menu' 'toolbar';
    padding-top: 4px;
  }
  .brand {
    min-width: 0;
  }
  .menubar {
    min-width: 650px;
  }
  .workspace-grid {
    grid-template-columns: 230px minmax(380px, 1fr) 310px;
    overflow-x: auto;
  }
  .analysis-top-cards-phylo {
    grid-template-columns: 1fr;
  }
  .analysis-top-cards-phylo > .professional-pair-card {
    grid-column: auto;
  }
}

.topbar {
  min-height: 66px !important;
  height: 66px !important;
  grid-template-columns: 185px minmax(0, 1fr) !important;
  grid-template-rows: 25px 40px !important;
  grid-template-areas: 'brand menu' 'toolbar toolbar' !important;
  column-gap: 10px !important;
  padding: 0 8px !important;
  overflow: visible !important;
}
.brand {
  min-width: 0 !important;
  gap: 7px !important;
}
.brand-mark {
  width: 22px !important;
  height: 22px !important;
  border-radius: 4px !important;
  font-size: 8px !important;
}
.brand-name {
  font-size: 12px !important;
  white-space: nowrap;
}
.brand-sub {
  display: none;
}
.version-badge {
  font-size: 8px !important;
}
.menubar {
  height: 25px !important;
  align-items: center !important;
  gap: 0 !important;
}
.menu-trigger {
  height: 24px !important;
  padding: 2px 7px !important;
  font-size: 10px !important;
}
.toolbar-sep {
  height: 24px !important;
}
.interaction-switch {
  font-size: 9px !important;
  margin: 0 2px !important;
}
.switch-track {
  transform: scale(0.85);
}
.modebar {
  min-height: 24px !important;
  height: 24px !important;
  padding: 2px 7px !important;
  gap: 5px !important;
}
.mode-pill {
  padding: 2px 6px !important;
  font-size: 8.5px !important;
}
.data-health-pill,
.run-id-pill {
  height: 19px !important;
  padding: 0 6px !important;
  font-size: 8px !important;
}
.workspace-panel-icons {
  height: 20px !important;
}
.panel-icon-toggle {
  width: 24px !important;
  height: 20px !important;
  padding: 2px !important;
}
.panel-icon-toggle .ui-icon {
  width: 13px !important;
  height: 13px !important;
}
.status-compact {
  font-size: 8.8px !important;
}
.plot-header {
  min-height: 44px !important;
  height: 44px !important;
  padding: 6px 10px !important;
  align-items: center !important;
}
.plot-title {
  font-size: 13.5px !important;
  white-space: nowrap;
}
.plot-subtitle {
  font-size: 9.5px !important;
  line-height: 1.2 !important;
  margin-top: 1px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: min(58vw, 760px) !important;
}
.plot-badges {
  gap: 4px !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
}
.badge {
  padding: 2px 6px !important;
  font-size: 8.5px !important;
}
.fit-width-inline,
.legend-quick-toggle {
  font-size: 8.5px !important;
  min-height: 22px !important;
  padding: 2px 5px !important;
  white-space: nowrap;
}
.workspace-tabs {
  min-height: 31px !important;
  height: 31px !important;
  padding: 3px 5px 0 !important;
}
.workspace-tabs .view-tab {
  height: 28px !important;
  padding: 4px 8px !important;
  font-size: 10px !important;
}
.workspace-tabs .view-tab .ui-icon {
  width: 12px !important;
  height: 12px !important;
}
.workspace-focus-btn {
  height: 25px !important;
  padding: 0 7px !important;
  font-size: 9px !important;
}
.workspace-tabs .view-tab.secondary-active {
  background: #eef5ff;
  border-color: #b8c9ed;
  color: #284a9b;
}
.workspace-tabs .view-tab.secondary-active:after {
  content: '2';
  display: grid;
  place-items: center;
  width: 12px;
  height: 12px;
  margin-left: 1px;
  border-radius: 50%;
  background: #5270c7;
  color: #fff;
  font-size: 7px;
  font-weight: 800;
}

/* Export menu branches: choose the section first, then format. */
.export-branch-menu {
  width: 218px !important;
  overflow: visible !important;
}
.menu-branch {
  position: relative;
}
.menu-branch-trigger {
  width: 100%;
  display: flex !important;
  align-items: center;
  justify-content: space-between !important;
}
.menu-arrow {
  font-size: 15px;
  color: #7d899a;
}
.menu-submenu {
  display: none;
  position: absolute;
  left: calc(100% - 3px);
  top: -5px;
  min-width: 190px;
  padding: 5px;
  background: #fff;
  border: 1px solid #cfd7e2;
  border-radius: 5px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.16);
  z-index: 90;
}
.menu-branch:hover > .menu-submenu,
.menu-branch:focus-within > .menu-submenu {
  display: block;
}
.menu-submenu button {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 3px;
  padding: 6px 8px;
  font-size: 10.5px;
  color: #364359;
}
.menu-submenu button:hover {
  background: #edf2fa;
  color: #24489b;
}

/* Settings launcher: expanded branches without occupying permanent header or menu space. */
.header-popover {
  position: fixed;
  z-index: 120;
  width: 340px;
  max-height: min(620px, calc(100vh - 80px));
  overflow: auto;
  background: #fff;
  border: 1px solid #cbd4e0;
  border-radius: 6px;
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.2);
  padding: 7px;
}
/*
 * Source section 14/53: header popover title.
 * Assembles into styles/base.css.
 * Rules remain in their original cascade order; later sections may intentionally override these
 * declarations.
 */
.header-popover-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 5px 7px;
  border-bottom: 1px solid #e1e6ed;
}
.header-popover-title > div {
  display: flex;
  flex-direction: column;
}
.header-popover-title strong {
  font-size: 12px;
}
.header-popover-title span {
  font-size: 9px;
  color: #7a8698;
  margin-top: 1px;
}
.header-popover-title > button {
  border: 0;
  background: transparent;
  color: #6b7788;
  font-size: 18px;
  line-height: 1;
  padding: 0 3px;
}
.settings-branch-tree details {
  border-bottom: 1px solid #edf0f4;
}
.settings-branch-tree details:last-child {
  border-bottom: 0;
}
.settings-branch-tree summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 5px 4px;
  font-size: 10.5px;
  font-weight: 700;
  color: #36455b;
}
.settings-branch-tree summary::-webkit-details-marker {
  display: none;
}
.settings-branch-tree summary .ui-icon {
  width: 13px;
  height: 13px;
  color: #506aa9;
}
.settings-branch-tree details > div {
  padding: 0 0 5px 19px;
  display: grid;
  gap: 1px;
}
.settings-branch-tree button {
  border: 0;
  background: transparent;
  text-align: left;
  border-radius: 3px;
  padding: 4px 6px;
  font-size: 9.8px;
  color: #5a677a;
}
.settings-branch-tree button:hover {
  background: #edf2fa;
  color: #284a9d;
}
.split-view-popover {
  width: 315px;
}
.split-popover-current {
  padding: 8px 5px 5px;
  font-size: 10px;
  color: #647084;
}
.split-secondary-select {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 5px;
  font-size: 9.5px;
  color: #5d6879;
}
.split-secondary-select select {
  min-height: 29px;
  height: 29px;
  border-radius: 4px;
  font-size: 10.5px;
}
.split-presets {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 4px;
  padding: 5px;
}
.split-presets button,
.split-popover-actions button {
  border: 1px solid #d3dae4;
  background: #f8f9fb;
  border-radius: 4px;
  padding: 6px 5px;
  font-size: 9px;
  color: #45536a;
}
.split-presets button:hover,
.split-popover-actions button:hover {
  background: #edf2fa;
}
.split-popover-actions {
  display: flex;
  justify-content: flex-end;
  gap: 5px;
  padding: 7px 5px 4px;
  border-top: 1px solid #edf0f4;
}
.split-popover-actions .primary-action {
  background: #3659ba;
  color: #fff;
  border-color: #3659ba;
}

/* Display applies view choices directly; layout controls remain visible while choosing. */
.split-view-popover {
  max-width: calc(100vw - 16px);
  box-sizing: border-box;
}
#splitViewPopover [hidden] {
  display: none !important;
}
.split-layout-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  padding: 9px 5px 5px;
}
.split-layout-switch button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 5px 8px;
  border: 1px solid #cbd6e3;
  border-radius: 6px;
  background: #fff;
  color: #45536a;
  font: inherit;
  cursor: pointer;
}
.split-layout-switch button .ui-icon {
  width: 15px;
  height: 15px;
  flex: none;
}
.split-layout-switch button.active {
  background: #e8effc;
  border-color: #9eb8e2;
  color: #244e91;
  font-weight: 600;
}
.split-layout-switch button:hover,
.split-layout-tools button:hover {
  background: #edf2fa;
}
.split-layout-switch button:focus-visible,
.split-layout-tools button:focus-visible,
.split-quick-layouts summary:focus-visible {
  outline: 2px solid #8daee0;
  outline-offset: 2px;
}
.split-pane-selectors .split-secondary-select {
  gap: 5px;
  padding: 6px 5px;
}
.split-pane-selectors select {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.split-layout-tools {
  display: flex;
  gap: 5px;
  padding: 5px;
}
.split-layout-tools button {
  flex: 1;
  min-height: 28px;
  padding: 4px 7px;
  border: 1px solid #d3dae4;
  border-radius: 6px;
  background: #f8f9fb;
  color: #45536a;
  font: inherit;
  cursor: pointer;
}
.split-quick-layouts {
  margin: 5px 5px 2px;
  border-top: 1px solid #e1e6ed;
}
.split-quick-layouts > summary {
  padding: 8px 0 4px;
  color: #5d6879;
  cursor: pointer;
}
.split-quick-layouts .split-presets {
  grid-template-columns: 1fr;
  padding: 4px 0;
  gap: 5px;
}
.split-quick-layouts .split-presets button {
  min-height: 28px;
  border-radius: 6px;
  text-align: left;
  padding: 5px 8px;
  font: inherit;
  cursor: pointer;
}

/* Side inspectors slide away instead of disappearing abruptly. */
.workspace-grid {
  transition: grid-template-columns 0.11s ease;
  gap: 5px !important;
  padding: 5px !important;
}
.left-panel,
.right-panel {
  transition:
    transform 0.11s ease,
    opacity 0.1s ease;
}
.left-panel {
  transform-origin: left center;
}
.right-panel {
  transform-origin: right center;
}
body.inputs-collapsed .left-panel {
  transform: translateX(-14px);
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
}
body.controls-collapsed .right-panel {
  transform: translateX(14px);
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
}

/* Live split view. Both panes remain the original interactive DOM, not screenshots. */
.workspace-document-area {
  min-height: 0;
  min-width: 0;
  position: relative;
  display: block;
}
.workspace-document-area > .plot-view.active {
  height: 100%;
}
.workspace-document-area.split-mode {
  display: grid;
  grid-template-columns: minmax(0, var(--split-ratio, 50%)) 5px minmax(
      0,
      calc(100% - var(--split-ratio, 50%) - 5px)
    );
  grid-template-rows: minmax(0, 1fr);
  background: #c8d0db;
}
.workspace-document-area.split-mode > .plot-view {
  display: none !important;
  min-width: 0;
  min-height: 0;
  background: #fff;
  overflow: hidden;
}
.workspace-document-area.split-mode > .plot-view.split-primary {
  display: flex !important;
  grid-column: 1;
  grid-row: 1;
}
.workspace-document-area.split-mode > .plot-view.split-secondary {
  display: flex !important;
  grid-column: 3;
  grid-row: 1;
  border-left: 1px solid #bfc8d5;
}
.split-divider {
  grid-column: 2;
  grid-row: 1;
  background: #c4ccd7;
  cursor: col-resize;
  position: relative;
  z-index: 15;
}
.split-divider:after {
  content: '';
  position: absolute;
  inset: 0 -3px;
}
.split-divider:hover,
.resizing-split .split-divider {
  background: #6680c6;
}
.resizing-split {
  cursor: col-resize !important;
  user-select: none !important;
}
.workspace-document-area.split-mode .analysis-workspace-head,
.workspace-document-area.split-mode .workspace-view-head {
  padding: 7px 9px !important;
  min-height: 47px !important;
}
.workspace-document-area.split-mode .analysis-selector-row,
.workspace-document-area.split-mode .phylo-selector-row,
.workspace-document-area.split-mode .outbreak-selector-row {
  padding: 7px 9px !important;
  gap: 6px 8px !important;
}
.workspace-document-area.split-mode .analysis-top-cards {
  margin: 7px 9px 8px !important;
  grid-template-columns: 1fr !important;
}
.workspace-document-area.split-mode .professional-analysis-section {
  margin-left: 9px !important;
  margin-right: 9px !important;
}
.workspace-document-area.split-mode .phylo-grid {
  padding-left: 9px !important;
  padding-right: 9px !important;
}
.workspace-document-area.split-mode .workspace-view-actions {
  gap: 4px;
  flex-wrap: wrap;
}
.workspace-document-area.split-mode .workspace-view-actions > span {
  display: none;
}
.workspace-document-area.split-mode .outbreak-selector-row {
  grid-template-columns: repeat(2, minmax(150px, 1fr)) !important;
}
.workspace-document-area.split-mode .outbreak-figure-grid {
  grid-template-columns: 1fr !important;
}
.workspace-document-area.split-mode .analysis-top-cards-phylo {
  grid-template-columns: 1fr !important;
}

/* In focus mode, split mode can fill the entire application. */
body.focus-workspace .workspace-document-area {
  height: calc(100vh - 31px);
}

@media (max-width: 1100px) {
  .topbar {
    grid-template-columns: 160px minmax(0, 1fr) !important;
  }
  .interaction-switch .switch-label {
    display: none;
  }
  .plot-subtitle {
    max-width: 42vw !important;
  }
  .workspace-document-area.split-mode .outbreak-selector-row {
    grid-template-columns: 1fr !important;
  }
}
.export-branch-menu .menu-submenu {
  left: auto !important;
  right: calc(100% - 3px) !important;
}

.settings-branch-menu {
  width: 220px !important;
  overflow: visible !important;
}
.settings-branch-menu .menu-submenu {
  left: calc(100% - 3px) !important;
  right: auto !important;
}
.dual-workspace-tabs {
  display: grid !important;
  grid-template-columns: minmax(0, var(--split-ratio, 50%)) 5px minmax(
      0,
      calc(100% - var(--split-ratio, 50%) - 5px)
    );
  padding: 0 !important;
  height: 32px !important;
  min-height: 32px !important;
  background: #e7ebf1 !important;
  border-bottom: 1px solid #bdc6d2 !important;
  overflow: hidden !important;
}
.workspace-tab-group {
  min-width: 0;
  display: flex;
  align-items: flex-end;
  gap: 1px;
  padding: 3px 4px 0;
  overflow: hidden;
  background: #edf0f4;
}
.workspace-tab-group-left {
  grid-column: 1;
}
.workspace-tab-group-right {
  grid-column: 3;
  border-left: 1px solid #c4ccd7;
}
.workspace-group-label {
  align-self: center;
  flex: 0 0 auto;
  padding: 0 4px;
  font-size: 7.5px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8994a5;
}
.workspace-tab-group .view-tab {
  height: 28px !important;
  min-width: 0;
  flex: 0 1 auto;
  padding: 4px 7px !important;
  font-size: 9.5px !important;
  overflow: hidden;
}
.workspace-tab-group .view-tab span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.workspace-tab-group .view-tab.active:before {
  top: -3px;
}
.workspace-tab-group .auxiliary-view-tab {
  display: none !important;
}
.pane-maximize-btn {
  align-self: center;
  height: 24px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  border: 1px solid #cbd3de;
  background: #f8f9fb;
  color: #435168;
  border-radius: 4px;
  padding: 0 6px;
  font-size: 8.5px;
  font-weight: 700;
  white-space: nowrap;
}
.pane-maximize-btn .ui-icon {
  width: 12px;
  height: 12px;
}
.pane-maximize-btn:hover,
.pane-maximize-btn.active {
  background: #e1e8f8;
  border-color: #9eafda;
  color: #244799;
}
.workspace-tab-spacer {
  min-width: 2px;
  flex: 1 1 4px;
}
/* Right Settings remains as a compact icon rail until a category is opened. */
body.controls-collapsed .workspace-grid {
  grid-template-columns: 290px minmax(480px, 1fr) 46px !important;
}
body.inputs-collapsed.controls-collapsed .workspace-grid {
  grid-template-columns: minmax(0, 1fr) 46px !important;
}
body.controls-collapsed .right-panel {
  display: block !important;
  transform: none !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  overflow: visible !important;
}
body.controls-collapsed .settings-inspector {
  grid-template-columns: 46px !important;
  border-radius: 4px;
  min-height: 100%;
}
body.controls-collapsed .settings-pages {
  display: none !important;
}
/*
 * Source section 15/53: body controls collapsed settings tab rail.
 * Assembles into styles/base.css.
 * Rules remain in their original cascade order; later sections may intentionally override these
 * declarations.
 */
body.controls-collapsed .settings-tab-rail {
  grid-column: 1;
  border-left: 0;
  min-height: 100%;
  box-shadow: none;
}
.right-panel {
  overflow: visible;
}
.settings-tab-rail .control-tab {
  cursor: pointer;
}
/* Pane maximize expands one sub-window across the workbench while preserving the compact application menu. */
body.pane-maximized .workspace-grid {
  grid-template-columns: 0 minmax(0, 1fr) 0 !important;
  gap: 0 !important;
  padding: 0 !important;
}
body.pane-maximized .workspace-grid > .left-panel,
body.pane-maximized .workspace-grid > .right-panel {
  display: none !important;
}
body.pane-maximized .workspace-grid > .plot-shell {
  grid-column: 2 !important;
  border-left: 0;
  border-right: 0;
  border-radius: 0;
  box-shadow: none;
}
body.pane-maximized .plot-header {
  display: none !important;
}
body.pane-maximized .dual-workspace-tabs {
  grid-template-columns: 1fr !important;
}
.workspace-document-area.split-mode.pane-max-left,
.workspace-document-area.split-mode.pane-max-right {
  display: block !important;
  background: #fff;
}
.workspace-document-area.split-mode.pane-max-left > .plot-view,
.workspace-document-area.split-mode.pane-max-right > .plot-view {
  display: none !important;
}
.workspace-document-area.split-mode.pane-max-left > .plot-view.split-primary,
.workspace-document-area.split-mode.pane-max-right > .plot-view.split-secondary {
  display: flex !important;
  height: 100%;
  border-left: 0 !important;
}
.workspace-document-area.split-mode.pane-max-left > .split-divider,
.workspace-document-area.split-mode.pane-max-right > .split-divider {
  display: none !important;
}
body.pane-maximized .workspace-tab-group {
  display: none !important;
}
body.pane-maximized .workspace-document-area.pane-max-left ~ * {
}
body.pane-maximized
  .dual-workspace-tabs:has(+ .workspace-document-area.pane-max-left)
  .workspace-tab-group-left,
body.pane-maximized
  .dual-workspace-tabs:has(+ .workspace-document-area.pane-max-right)
  .workspace-tab-group-right {
  display: flex !important;
  grid-column: 1 !important;
  border-left: 0 !important;
}
@media (max-width: 1320px) {
  body.controls-collapsed .workspace-grid {
    grid-template-columns: 260px minmax(420px, 1fr) 44px !important;
  }
  body.controls-collapsed .settings-inspector {
    grid-template-columns: 44px !important;
  }
  .workspace-group-label {
    display: none;
  }
  .workspace-tab-group .view-tab {
    font-size: 8.8px !important;
    padding-inline: 5px !important;
  }
  .pane-maximize-btn span {
    display: none;
  }
  .pane-maximize-btn {
    width: 25px;
    padding: 0;
    justify-content: center;
  }
}
@media (max-width: 1020px) {
  body.controls-collapsed .workspace-grid {
    grid-template-columns: 230px minmax(380px, 1fr) 42px !important;
  }
  .dual-workspace-tabs {
    min-width: 680px;
  }
  .workspace-tab-group .view-tab {
    font-size: 8.4px !important;
  }
}

html,
body,
button,
input,
select,
textarea {
  font-family: var(--app-font-family) !important;
}
/* Geneious-style compact Windows menu target from the supplied reference video. */
.menu-trigger {
  font-family: var(--app-font-family) !important;
  border-radius: 2px !important;
  color: #253247 !important;
}
.menu-trigger:hover,
.menu-trigger[aria-expanded='true'] {
  background: #dce9fb !important;
  color: #173f7e !important;
}
.menu-dropdown,
.menu-submenu {
  font-family: var(--app-font-family) !important;
  border-radius: 3px !important;
  border-color: #bcc6d3 !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18) !important;
}
.menu-dropdown button,
.menu-submenu button {
  font-family: var(--app-font-family) !important;
  border-radius: 2px !important;
}
.menu-dropdown button:hover,
.menu-submenu button:hover {
  background: #dbeafe !important;
  color: #123d78 !important;
}
.menu-dropdown button:disabled,
.menu-submenu button:disabled {
  color: #9aa3af !important;
  background: transparent !important;
  cursor: not-allowed !important;
}
.menu-separator {
  border-color: #d8dde5 !important;
}

/* Settings must scroll inside its own pane; do not let the page grow beyond the workspace. */
.right-panel {
  overflow: hidden !important;
  min-height: 0 !important;
  height: 100% !important;
  max-height: 100% !important;
}
.settings-inspector {
  height: 100% !important;
  max-height: 100% !important;
  min-height: 0 !important;
  align-items: stretch !important;
  overflow: hidden !important;
}
.settings-pages {
  height: 100% !important;
  min-height: 0 !important;
  max-height: 100% !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  scrollbar-gutter: stable !important;
  overscroll-behavior: contain;
}
.settings-tab-rail {
  height: 100% !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  scrollbar-width: thin;
}
body.controls-collapsed .right-panel {
  overflow: hidden !important;
}
body.controls-collapsed .settings-inspector {
  height: 100% !important;
  max-height: 100% !important;
  overflow: hidden !important;
}
body.controls-collapsed .settings-tab-rail {
  height: 100% !important;
  overflow-y: auto !important;
}
.control-page {
  min-height: min-content;
}

/* Data/Analysis slider and visible clustering tab. */
.workspace-document-area.split-mode,
.dual-workspace-tabs {
  transition: grid-template-columns 0.18s ease !important;
}
.workspace-group-label.workspace-slide-control {
  appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 3px;
  line-height: 18px;
}
.workspace-group-label.workspace-slide-control:hover,
.workspace-group-label.workspace-slide-control.slide-active {
  background: #dfe8f8;
  color: #274d9b;
}
.workspace-tab-group .view-tab[data-view='clusters'] {
  display: inline-flex !important;
}

/* Lock cards to the top of Tree analysis instead of vertically stretching. */
.analysis-top-cards,
.analysis-top-cards-phylo {
  align-content: start !important;
  align-items: start !important;
  grid-auto-rows: max-content !important;
}
.analysis-top-cards > .professional-analysis-section,
.analysis-top-cards > .phylo-pair-card {
  height: auto !important;
  align-self: start !important;
}
.phylo-workspace {
  justify-content: flex-start !important;
  align-content: start !important;
}

/* Disabled Tree analysis and requirements. */
.view-tab.tree-analysis-disabled,
.view-tab:disabled {
  opacity: 0.45;
  cursor: not-allowed !important;
  background: #f3f4f6 !important;
  color: #8b95a4 !important;
}
.tree-analysis-requirement {
  margin: 9px 13px 0;
  padding: 11px 12px;
  border: 1px solid #e5b6b2;
  border-left: 4px solid #b42318;
  border-radius: 5px;
  background: #fff5f4;
  color: #6e2924;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 10.8px;
  line-height: 1.45;
}
.tree-analysis-requirement strong {
  font-size: 11.5px;
}
.tree-analysis-requirement span {
  color: #74403b;
}

/* Single manual information control retained above Settings. */
.settings-info-rail {
  width: 28px;
  height: 28px;
  min-width: 28px;
  margin: 6px auto 4px;
  padding: 0;
  border: 1px solid #aeb9c8;
  border-radius: 50%;
  background: #fff;
  color: #45607d;
  font-size: 12px;
  font-weight: 800;
  line-height: 26px;
  text-align: center;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}
.settings-info-rail:hover {
  background: #e7f0ff;
  border-color: #7896c8;
  color: #244f8f;
}

/* Inactive clustering approaches stay visible, shaded and non-interactive. */
.cluster-setting-block {
  transition:
    opacity 0.12s ease,
    background 0.12s ease;
}
.cluster-setting-block.is-unused {
  background: #f3f4f6 !important;
  color: #858e9c !important;
  opacity: 0.58;
}
.cluster-setting-block.is-unused select,
.cluster-setting-block.is-unused input {
  background: #eef0f3 !important;
  color: #929aa5 !important;
  cursor: not-allowed !important;
}
.cluster-setting-block.is-unused .cutoff-control {
  background: #f1f2f4 !important;
  border-color: #d7dce3 !important;
}
.fixed-setting {
  opacity: 0.75;
}
.fixed-setting input:disabled {
  background: #f2f3f5;
  color: #6b7280;
}

/* Keep pane geometry stable when focus/panel state changes. */
.plot-scroller.horizontal-view-locked {
  overscroll-behavior-x: none;
}

body.inputs-collapsed.controls-collapsed .workspace-grid {
  grid-template-columns: 0 minmax(0, 1fr) 46px !important;
}
body.inputs-collapsed.controls-collapsed .workspace-grid > .plot-shell {
  grid-column: 2 !important;
}
body.inputs-collapsed.controls-collapsed .workspace-grid > .right-panel {
  grid-column: 3 !important;
}
@media (max-width: 1320px) {
  body.inputs-collapsed.controls-collapsed .workspace-grid {
    grid-template-columns: 0 minmax(0, 1fr) 44px !important;
  }
}
@media (max-width: 1020px) {
  body.inputs-collapsed.controls-collapsed .workspace-grid {
    grid-template-columns: 0 minmax(0, 1fr) 42px !important;
  }
}
.toolbar-text-icon {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}

.focus-restore-btn {
  display: none;
}
body.focus-workspace .focus-restore-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  position: fixed;
  right: 10px;
  top: 6px;
  z-index: 90;
  border: 1px solid #9fb1df;
  border-radius: 4px;
  background: #eef3fd;
  color: #24489e;
  padding: 5px 8px;
  font-family: var(--app-font-family);
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}
body.focus-workspace .focus-restore-btn:hover {
  background: #dfe8fb;
}

.tab-info-btn {
  width: 18px;
  height: 18px;
  min-width: 18px;
  align-self: center;
  padding: 0;
  border: 1px solid #aeb9c8;
  border-radius: 50%;
  background: #fff;
  color: #45607d;
  font-family: var(--app-font-family);
  font-size: 10px;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
  cursor: pointer;
}
.tab-info-btn:hover {
  background: #e7f0ff;
  border-color: #7896c8;
  color: #244f8f;
}

:root {
  --ui-font-xs: 10.5px;
  --ui-font-sm: 11.5px;
  --ui-font-base: 12.5px;
  --ui-font-title: 13.5px;
}
/* Keep the compact desktop chrome, but do not trade legibility for a few pixels. */
.topbar {
  min-height: 68px !important;
  height: 68px !important;
  grid-template-rows: 29px 39px !important;
}
.brand-name {
  font-size: 13.5px !important;
}
.version-badge {
  font-size: 9.5px !important;
}
.menubar {
  height: 29px !important;
}
.menu-trigger {
  height: 28px !important;
  padding: 3px 9px !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
}
.menu-dropdown button,
.menu-submenu button {
  font-size: 12px !important;
  padding: 7px 9px !important;
}
.menu-dropdown button span {
  font-size: 10.5px !important;
}
.modebar {
  min-height: 27px !important;
  height: 27px !important;
}
.mode-pill,
.data-health-pill,
.run-id-pill,
.status-compact,
.interaction-hint {
  font-size: 10.5px !important;
}
.workspace-tab-group .view-tab {
  font-size: 11px !important;
}
.workspace-group-label {
  font-size: 9.5px !important;
}
.pane-maximize-btn {
  font-size: 10px !important;
}
.project-switch {
  font-size: 12px !important;
}
.project-branch-group > summary {
  font-size: 11.5px !important;
}
.project-branch-group > summary small {
  font-size: 10px !important;
}
.project-tree-file-name strong {
  font-size: 11.5px !important;
}
.project-tree-file-name small {
  font-size: 10px !important;
}
.project-tree-nav-item button,
.project-tree-json button {
  font-size: 11px !important;
}
.project-tree-leaf {
  font-size: 10.8px !important;
}
.project-tree-json small {
  font-size: 9.5px !important;
}
.muted-tree-item {
  font-size: 10.5px !important;
}
.project-page-titlebar strong,
.settings-page-titlebar strong {
  font-size: 13.5px !important;
}
.project-page-titlebar small,
.settings-page-titlebar small {
  font-size: 10.8px !important;
}
.project-name-field,
.project-export-name,
.control-group label,
.field-grid label {
  font-size: 12px !important;
}
/*
 * Source section 16/53: control group h3.
 * Assembles into styles/base.css.
 * Rules remain in their original cascade order; later sections may intentionally override these
 * declarations.
 */
.control-group h3 {
  font-size: 13px !important;
}
.hint,
.professional-note,
.analysis-note,
.phylo-note {
  font-size: 11.5px !important;
  line-height: 1.5 !important;
}
.analysis-workspace-head strong,
.workspace-view-head strong {
  font-size: 14px !important;
}
.analysis-workspace-head span,
.workspace-view-head span {
  font-size: 11.5px !important;
}
.analysis-section-title strong {
  font-size: 13.5px !important;
}
.analysis-section-title span {
  font-size: 11px !important;
}
.section-kicker {
  font-size: 9.5px !important;
}
.metric-list,
.sample-stat-list,
.priority-metric-list,
.phylo-stat-list,
.outbreak-stat-list,
.analysis-card-body,
.metadata-profile,
.insight-table,
.analysis-mini-table,
.outbreak-method-list,
.analysis-method-list {
  font-size: 12px !important;
}
.phylo-section-nav button {
  font-size: 11px !important;
  padding: 5px 7px !important;
}
.phylo-collapsible > summary span {
  font-size: 12.5px !important;
}
.outbreak-figure figcaption strong {
  font-size: 12.5px !important;
}
.outbreak-figure figcaption span {
  font-size: 11px !important;
}
.outbreak-selector-row label {
  font-size: 12px !important;
}
.outbreak-selector-row small {
  font-size: 10.8px !important;
}
.statusbar {
  font-size: 10.5px !important;
}

/* Parameter-level information bubbles were intentionally removed. The only retained information control opens the
full manual. */
.settings-info-rail {
  font-size: 12px !important;
}

/* Method & interpretation sections use one visual language across all analyses. */
.analysis-method-section {
  margin: 9px 13px 13px !important;
  background: #fff;
}
.analysis-method-list {
  margin: 8px 0 0;
  padding: 2px 16px 8px 30px;
  color: #45536a;
  line-height: 1.55;
}
.analysis-method-list li {
  margin: 7px 0;
}
.analysis-method-list strong {
  color: #24324a;
}

/* The dossier value column is prose/evidence and is intentionally left aligned. */
.outbreak-selected-detail > .metric-list div:nth-child(even) {
  text-align: left !important;
}

/* True sliding side panels. Projects leaves a narrow handle rail; Settings keeps its category rail. */
.left-panel {
  position: relative;
  overflow: visible !important;
}
.right-panel {
  position: relative;
  overflow: visible !important;
}
.side-slide-handle {
  position: absolute;
  z-index: 30;
  border: 1px solid #bdc7d4;
  background: #f8fafc;
  color: #44546a;
  border-radius: 0 4px 4px 0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  font-family: var(--app-font-family);
  font-size: 16px;
  font-weight: 800;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.projects-slide-handle {
  top: 8px;
  right: -11px;
  width: 22px;
  height: 36px;
}
.projects-slide-handle:hover,
.settings-slide-handle:hover {
  background: #e6edf8;
  color: #244a98;
}
.settings-slide-handle {
  width: 30px;
  height: 26px;
  min-width: 30px;
  margin: 1px auto 5px;
  border-radius: 4px;
  font-size: 15px;
  padding: 0;
}
body.inputs-collapsed .workspace-grid {
  grid-template-columns: 30px minmax(0, 1fr) 350px !important;
}
body.inputs-collapsed.controls-collapsed .workspace-grid {
  grid-template-columns: 30px minmax(0, 1fr) 46px !important;
}
body.inputs-collapsed .left-panel {
  display: block !important;
  transform: none !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  overflow: visible !important;
  background: transparent;
}
body.inputs-collapsed .left-panel .project-inspector {
  display: none !important;
}
body.inputs-collapsed .projects-slide-handle {
  right: 3px;
  border-radius: 4px;
}
body.controls-collapsed .settings-slide-handle {
  display: grid !important;
}

/* The Tree analysis jump controls sit above the summary cards and remain sticky while reading long analyses. */
.phylo-section-nav {
  position: sticky !important;
  top: 0 !important;
  z-index: 12 !important;
  border-bottom: 1px solid #d8dfe8 !important;
  margin: 0 !important;
}

/* Right-side tree margin is user-controlled; zero remains the default. */
#rightMargin {
  font-variant-numeric: tabular-nums;
}

@media (max-width: 1320px) {
  .workspace-group-label {
    display: inline-flex !important;
  }
  .workspace-tab-group .view-tab {
    font-size: 10.5px !important;
    padding-inline: 5px !important;
  }
  body.inputs-collapsed .workspace-grid {
    grid-template-columns: 28px minmax(0, 1fr) 330px !important;
  }
  body.inputs-collapsed.controls-collapsed .workspace-grid {
    grid-template-columns: 28px minmax(0, 1fr) 44px !important;
  }
}
@media (max-width: 1020px) {
  .workspace-tab-group .view-tab {
    font-size: 10px !important;
  }
  .menu-trigger {
    font-size: 12px !important;
  }
}

/* Final accessibility pass: menu/header text must remain comfortably readable at 100% Windows scaling. */
.brand-name {
  font-size: 14px !important;
}
.menu-trigger {
  font-size: 14px !important;
  font-weight: 650 !important;
  padding-inline: 10px !important;
}
.menu-dropdown button,
.menu-submenu button {
  font-size: 13px !important;
  line-height: 1.25 !important;
}
.workspace-tab-group .view-tab {
  font-size: 11.5px !important;
}
.workspace-group-label {
  font-size: 10.5px !important;
}
.mode-pill,
.data-health-pill,
.run-id-pill,
.status-compact,
.interaction-hint,
.statusbar {
  font-size: 11px !important;
}
@media (max-width: 1320px) {
  .workspace-tab-group .view-tab {
    font-size: 11px !important;
  }
  .menu-trigger {
    font-size: 13.5px !important;
  }
}
@media (max-width: 1020px) {
  .workspace-tab-group .view-tab {
    font-size: 10.5px !important;
  }
  .menu-trigger {
    font-size: 13px !important;
  }
}

/* Every top menu uses the same right-expanding hierarchical interaction. */
.hierarchical-menu {
  width: 230px !important;
  overflow: visible !important;
  left: 0 !important;
  right: auto !important;
}
.hierarchical-menu .menu-branch {
  position: relative;
}
.hierarchical-menu .menu-branch-trigger {
  width: 100%;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 18px !important;
  text-align: left !important;
}
.hierarchical-menu .menu-submenu {
  left: calc(100% - 2px) !important;
  right: auto !important;
  top: -5px !important;
  min-width: 220px !important;
  max-width: 320px !important;
}
.export-branch-menu .menu-submenu {
  left: calc(100% - 2px) !important;
  right: auto !important;
}
.menu-arrow {
  margin-left: auto !important;
}

/* Projects and History: fixed title bars, independently scrolling bodies. */
.left-panel {
  overflow: hidden !important;
  min-height: 0 !important;
  height: 100% !important;
  max-height: 100% !important;
}
.project-inspector {
  height: 100% !important;
  max-height: 100% !important;
  min-height: 0 !important;
  overflow: hidden !important;
  align-items: stretch !important;
}
.project-tab-rail {
  height: 100% !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}
.project-pages {
  height: 100% !important;
  max-height: 100% !important;
  min-height: 0 !important;
  overflow: hidden !important;
  display: block !important;
}
.project-page {
  height: 100% !important;
  min-height: 0 !important;
  max-height: 100% !important;
  overflow: hidden !important;
  flex-direction: column !important;
}
.project-page.active {
  display: flex !important;
}
.project-page-titlebar {
  position: relative !important;
  top: auto !important;
  flex: 0 0 auto !important;
}
.project-page-body {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  scrollbar-gutter: stable !important;
  overscroll-behavior: contain !important;
}
.history-page-body {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
}
.activity-history {
  flex: 1 1 auto !important;
  min-height: 120px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  margin-top: 0 !important;
  padding-right: 3px !important;
  scrollbar-gutter: stable !important;
  overscroll-behavior: contain !important;
}
.activity-help {
  flex: 0 0 auto !important;
  margin-top: 0 !important;
}

/* Top-level project folders have an explicit disclosure button and remember their collapsed state. */
.project-tree-project > summary {
  grid-template-columns: 18px minmax(0, 1fr) auto !important;
  display: grid !important;
}
.project-disclosure-btn {
  width: 18px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: #637086;
  border-radius: 3px;
  padding: 0;
  font-size: 12px;
  cursor: pointer;
}
.project-disclosure-btn:hover {
  background: #dde5f2;
  color: #244d9d;
}
.project-switch {
  grid-column: 2;
  min-width: 0;
}
.active-project-badge {
  grid-column: 3;
}

/* The navigator exposes only meaningful user content: Data, Analyses, Saved views, plus real subprojects. */
.project-tree-branches {
  padding-bottom: 4px;
}

/* Right Settings rail is flush, stable and fully visible against the application edge. */
.workspace-grid {
  padding-right: 0 !important;
}
.right-panel {
  margin-right: 0 !important;
  padding-right: 0 !important;
}
.settings-inspector {
  width: 100% !important;
  border-right: 0 !important;
  border-radius: 4px 0 0 4px !important;
}
.settings-tab-rail {
  border-right: 0 !important;
}
body.controls-collapsed .right-panel {
  width: 100% !important;
}
body.controls-collapsed .settings-inspector {
  width: 100% !important;
}

/* Supplied cluster assignments stack vertically in the narrow settings inspector; never overlap. */
.settings-inspector .supplied-cluster-fields {
  grid-template-columns: 1fr !important;
  gap: 5px !important;
  min-width: 0 !important;
}
.settings-inspector .supplied-cluster-fields label {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) !important;
  gap: 8px !important;
  min-width: 0 !important;
}
.settings-inspector .supplied-cluster-fields select {
  min-width: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
}

/* Tree Fit / - / + live in the pane header immediately beside Expand. */
.tree-pane-zoom-controls {
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
}
.tree-pane-zoom-controls button {
  height: 24px;
  min-width: 25px;
  border: 1px solid #cbd3de;
  background: #f8f9fb;
  color: #435168;
  border-radius: 4px;
  padding: 0 6px;
  font: 700 10.5px var(--app-font-family);
  cursor: pointer;
}
.tree-pane-zoom-controls button:hover {
  background: #e1e8f8;
  border-color: #9eafda;
  color: #244799;
}
.tree-pane-zoom-controls button:disabled {
  opacity: 0.4;
  cursor: default;
}
.tree-pane-zoom-controls.hidden {
  display: none !important;
}

/* Global Focus hides chrome without changing internal pane proportions or inventing new sizing rules. */
body.focus-workspace .app-shell {
  height: 100vh !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-rows: minmax(0, 1fr) !important;
}
body.focus-workspace .topbar,
body.focus-workspace .modebar,
body.focus-workspace .statusbar {
  display: none !important;
}
body.focus-workspace .workspace-grid {
  height: 100% !important;
  min-height: 0 !important;
  grid-template-columns: 0 minmax(0, 1fr) 0 !important;
  gap: 0 !important;
  padding: 0 !important;
  background: #fff !important;
  overflow: hidden !important;
}
body.focus-workspace .workspace-grid > .left-panel,
body.focus-workspace .workspace-grid > .right-panel {
  display: none !important;
}
body.focus-workspace .workspace-grid > .plot-shell {
  grid-column: 2 !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow: hidden !important;
}
body.focus-workspace .plot-header {
  display: none !important;
}
body.focus-workspace .dual-workspace-tabs {
  position: relative !important;
  top: auto !important;
  height: 32px !important;
  min-height: 32px !important;
}
/*
 * Source section 17/53: body focus workspace workspace document area.
 * Assembles into styles/base.css.
 * Rules remain in their original cascade order; later sections may intentionally override these
 * declarations.
 */
body.focus-workspace .workspace-document-area {
  height: auto !important;
  min-height: 0 !important;
  flex: 1 1 auto !important;
}
body.focus-workspace .plot-shell {
  display: flex !important;
  flex-direction: column !important;
}
body.focus-workspace .focus-restore-btn {
  display: flex !important;
}

@media (max-width: 1100px) {
  .tree-pane-zoom-controls button {
    padding: 0 4px;
    min-width: 23px;
  }
  .tree-pane-zoom-controls #zoomResetBtn {
    min-width: 31px;
  }
}

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

.menu-dropdown.hierarchical-menu {
  width: 214px !important;
  min-width: 214px !important;
  padding: 4px !important;
}
.hierarchical-menu .menu-submenu {
  min-width: 205px !important;
  max-width: 300px !important;
  padding: 4px !important;
}
.menu-dropdown button,
.menu-submenu button {
  padding: 5px 8px !important;
  min-height: 27px !important;
  font-size: 12.5px !important;
  line-height: 1.2 !important;
}
.menu-dropdown button span {
  font-size: 10.5px !important;
}
.menu-separator {
  height: 1px;
  background: #e3e7ed;
  margin: 3px 4px;
}
.outbreak-export-submenu {
  max-height: min(520px, 72vh);
  overflow-y: auto;
}

.canvas-action-strip {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 5px 9px;
  border-bottom: 1px solid #d9dfe7;
  background: #f8fafc;
  white-space: nowrap;
  overflow-x: auto;
  scrollbar-width: thin;
}
.canvas-action-strip .tree-pane-zoom-controls {
  display: flex !important;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.canvas-action-strip .tree-pane-zoom-controls button,
.canvas-action-strip > .legend-quick-toggle,
.canvas-action-strip > .mini-btn {
  height: 26px;
  min-height: 26px;
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 11px;
}
.canvas-action-strip .tree-pane-zoom-controls button {
  min-width: 30px;
}
.canvas-action-primary {
  font-weight: 650;
}
.canvas-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 7px;
  border: 1px solid #cbd4df;
  border-radius: 3px;
  background: #fff;
  color: #34435a;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.canvas-toggle input {
  margin: 0;
}
.compact-intro {
  padding: 7px 10px !important;
  min-height: 34px;
}

.outbreak-selector-row {
  grid-template-columns: repeat(3, minmax(155px, 1fr)) !important;
  gap: 6px 8px !important;
  padding: 7px 10px !important;
}
.outbreak-selector-row label {
  gap: 2px !important;
  font-size: 11px !important;
}
.outbreak-selector-row select,
.outbreak-selector-row input[type='number'] {
  height: 28px !important;
  min-height: 28px !important;
  padding: 2px 6px !important;
  font-size: 11px !important;
}
.outbreak-selector-row small {
  font-size: 9.5px !important;
  line-height: 1.2 !important;
}
.outbreak-selector-row .check-row {
  padding-top: 15px !important;
}

.outbreak-top-cards {
  display: block !important;
  margin: 8px 13px 9px !important;
}
.outbreak-summary-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}
.outbreak-summary-card {
  min-width: 0;
  border: 1px solid #d6dde7;
  border-radius: 5px;
  background: #fff;
  padding: 8px 9px;
  box-shadow: 0 1px 1px rgba(15, 23, 42, 0.025);
}
.outbreak-summary-card > span {
  display: block;
  color: #657188;
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}
.outbreak-summary-card > strong {
  display: block;
  margin: 2px 0 1px;
  color: #1d2a40;
  font-size: 18px;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.outbreak-summary-card > small {
  display: block;
  color: #68758a;
  font-size: 10px;
  line-height: 1.3;
}
.outbreak-summary-card.tree {
  border-top: 3px solid #64748b;
}
.outbreak-summary-card.threshold {
  border-top: 3px solid #4f46e5;
}
.outbreak-summary-card.separation {
  border-top: 3px solid #0f766e;
}

.outbreak-table-section,
.outbreak-detail-section,
.outbreak-figures-section,
.outbreak-method-section {
  margin: 9px 13px 0 !important;
}
.outbreak-table-wrap {
  overflow: auto;
  border: 1px solid #dbe2eb;
  border-radius: 5px;
  background: #fff;
}
.outbreak-evidence-table {
  min-width: 1120px !important;
  width: 100%;
  table-layout: auto;
}
.outbreak-evidence-table th,
.outbreak-evidence-table td {
  vertical-align: top;
}
.outbreak-evidence-table thead th {
  white-space: nowrap;
}
.outbreak-evidence-table .evidence-domain-head th {
  text-align: center !important;
  font-size: 11px !important;
  font-weight: 750 !important;
  letter-spacing: 0.015em;
  border-bottom-color: #cfd7e2;
}
.outbreak-evidence-table .evidence-domain-head .outbreak-col,
.outbreak-evidence-table .evidence-domain-head .interpretation-col {
  text-align: left !important;
}
.outbreak-evidence-table .domain-tree {
  background: #f2f5f8 !important;
}
.outbreak-evidence-table .domain-threshold {
  background: #f0f0ff !important;
}
.outbreak-evidence-table .domain-separation {
  background: #eef8f6 !important;
}
.outbreak-evidence-table .evidence-measure-head th {
  font-size: 10.5px !important;
  font-weight: 650 !important;
  color: #47566d;
  background: #fafbfd !important;
}
.outbreak-evidence-table .outbreak-col {
  min-width: 190px !important;
  max-width: 250px;
}
.outbreak-evidence-table .interpretation-col {
  min-width: 210px;
  white-space: normal !important;
}
.outbreak-isolate-preview {
  display: block !important;
  margin-top: 3px !important;
  color: #68758a !important;
  max-width: 230px !important;
  white-space: normal !important;
  line-height: 1.3;
}
.outbreak-isolate-preview b {
  display: block;
  color: #34435a;
  font-weight: 650;
  margin-bottom: 2px;
}
.threshold-status,
.separation-status {
  display: inline-block;
  padding: 2px 5px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}
.status-good {
  background: #e8f5ee;
  color: #16643e;
}
.status-bad {
  background: #fdecea;
  color: #a5352a;
}
.status-neutral,
.status-na {
  background: #eef1f5;
  color: #617087;
}
.status-warn {
  background: #fff3d8;
  color: #8a5a00;
}

.outbreak-selected-detail {
  padding: 10px !important;
  background: #fff;
}
.outbreak-dossier-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e4e8ee;
}
.outbreak-dossier-head strong {
  display: block;
  font-size: 15px;
  color: #1e2b41;
}
.outbreak-dossier-head span {
  display: block;
  margin-top: 2px;
  color: #657188;
  font-size: 10.5px;
  line-height: 1.35;
}
.outbreak-isolate-block {
  padding: 9px 0;
  border-bottom: 1px solid #e8ecf1;
}
.dossier-label {
  display: block;
  color: #68758a;
  font-size: 9px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 5px;
}
.outbreak-isolate-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.outbreak-isolate-list span {
  padding: 2px 5px;
  border: 1px solid #d8dfe8;
  border-radius: 3px;
  background: #f8fafc;
  font-size: 10px;
  color: #334155;
}
.outbreak-dossier-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 9px 0;
}
.outbreak-domain-card {
  border: 1px solid #d9e0e8;
  border-radius: 5px;
  background: #fbfcfd;
  overflow: hidden;
}
.outbreak-domain-card header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  padding: 7px 8px;
  border-bottom: 1px solid #e2e7ed;
}
.outbreak-domain-card header strong {
  font-size: 11.5px;
}
.outbreak-domain-card header span {
  font-size: 10px;
  font-weight: 700;
  text-align: right;
}
.outbreak-domain-card.domain-tree header {
  background: #f2f5f8;
}
.outbreak-domain-card.domain-threshold header {
  background: #f0f0ff;
}
.outbreak-domain-card.domain-separation header {
  background: #eef8f6;
}
.outbreak-domain-card dl {
  margin: 0;
  padding: 5px 8px;
}
.outbreak-domain-card dl > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px solid #edf0f4;
}
.outbreak-domain-card dl > div:last-child {
  border-bottom: 0;
}
.outbreak-domain-card dt {
  color: #67748a;
  font-size: 10px;
}
.outbreak-domain-card dd {
  margin: 0;
  color: #233149;
  font-size: 10.5px;
  font-weight: 700;
  text-align: right;
  max-width: 160px;
  overflow-wrap: anywhere;
}
.separation-good {
  color: #16643e;
}
.separation-warn {
  color: #8a5a00;
}
.separation-bad {
  color: #a5352a;
}
.separation-na {
  color: #617087;
}
.outbreak-context-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 6px;
  padding-top: 1px;
}
.outbreak-context-grid > div {
  border: 1px solid #e0e5ec;
  border-radius: 4px;
  padding: 6px 7px;
  background: #fff;
}
.outbreak-context-grid strong {
  display: block;
  font-size: 10.5px;
  color: #28364e;
  line-height: 1.35;
}
.outbreak-dossier-interpretation {
  margin-top: 8px;
  padding: 8px 9px;
  border-left: 3px solid #4f64b8;
  background: #f5f7ff;
  border-radius: 3px;
}
.outbreak-dossier-interpretation strong,
.outbreak-dossier-interpretation span,
.outbreak-dossier-interpretation small {
  display: block;
}
.outbreak-dossier-interpretation strong {
  font-size: 11px;
}
.outbreak-dossier-interpretation span {
  margin-top: 2px;
  font-size: 11px;
  font-weight: 650;
  color: #2e3d57;
}
.outbreak-dossier-interpretation small {
  margin-top: 4px;
  font-size: 9.8px;
  line-height: 1.4;
  color: #667085;
}

.sample-stat-cards {
  padding: 8px 9px;
}
.sample-stat-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.sample-stat-card {
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid #dce2ea;
  border-radius: 4px;
  background: #fbfcfd;
}
.sample-stat-card > span {
  display: block;
  color: #66748a;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}
.sample-stat-card > strong {
  display: block;
  color: #22314a;
  font-size: 15px;
  line-height: 1.2;
  margin: 2px 0;
}
.sample-stat-card > small {
  display: block;
  color: #6c788b;
  font-size: 9.5px;
  line-height: 1.25;
}
/*
 * Source section 18/53: sample stat mode.
 * Assembles into styles/base.css.
 * Rules remain in their original cascade order; later sections may intentionally override these
 * declarations.
 */
.sample-stat-mode {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 5px 7px;
  background: #f4f6f9;
  border-radius: 3px;
  font-size: 9.8px;
  color: #6a7689;
}
.sample-stat-mode strong {
  color: #2b3950;
  font-size: 10.5px;
}
.sample-stat-arrow {
  color: #8a95a5;
}

@media (max-width: 1200px) {
  .outbreak-summary-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .outbreak-dossier-grid {
    grid-template-columns: 1fr;
  }
  .sample-stat-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .outbreak-summary-cards,
  .sample-stat-card-grid {
    grid-template-columns: 1fr;
  }
  .canvas-action-strip {
    gap: 4px;
  }
  .outbreak-selector-row {
    grid-template-columns: 1fr !important;
  }
}

.data-grid-workspace {
  position: relative;
  display: flex !important;
  flex-direction: column;
  min-height: 0;
  background: #f6f8fb !important;
}
.data-grid-titlebar {
  padding: 8px 10px !important;
  min-height: 46px;
  background: #fff !important;
}
.data-summary-strip {
  display: flex;
  align-items: center;
  gap: 0;
  min-height: 34px;
  padding: 0 10px;
  border-bottom: 1px solid #dfe5ee;
  background: #f3f6fb;
  color: #5c6a80;
  overflow-x: auto;
  white-space: nowrap;
  font-size: 10.5px;
}
.data-summary-strip > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 12px;
  border-right: 1px solid #d8e0eb;
  height: 22px;
}
.data-summary-strip > span:first-child {
  padding-left: 0;
}
.data-summary-strip > span:last-child {
  border-right: 0;
}
.data-summary-strip strong {
  color: #213452;
  font-size: 11.5px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}
.data-grid-toolbar {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 43px;
  padding: 6px 8px;
  border-bottom: 1px solid #dde4ee;
  background: #fff;
  white-space: nowrap;
  overflow-x: auto;
}
.data-grid-toolbar button,
.data-grid-toolbar .toolbar-search {
  height: 30px;
  border: 1px solid #d3dbe8;
  border-radius: 5px;
  background: #fff;
  color: #32425c;
  font:
    600 10.5px/1 'Noto Sans',
    'Segoe UI',
    Arial,
    sans-serif;
}
.data-grid-toolbar button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  cursor: pointer;
}
.data-grid-toolbar button:hover {
  background: #f4f7fb;
  border-color: #bcc8da;
}
.data-grid-toolbar button:disabled {
  opacity: 0.4;
  cursor: default;
}
.data-grid-toolbar .ui-icon {
  width: 14px;
  height: 14px;
}
.toolbar-search {
  display: flex;
  align-items: center;
  gap: 6px;
  width: min(330px, 33vw);
  padding: 0 8px;
}
.toolbar-search input {
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  width: 100%;
  min-width: 130px;
  font:
    400 11px/1.2 'Noto Sans',
    'Segoe UI',
    Arial,
    sans-serif;
  color: #27364d;
}
.toolbar-search input::placeholder {
  color: #8b96a7;
}
.tool-count {
  display: inline-grid;
  place-items: center;
  min-width: 17px;
  height: 17px;
  border-radius: 9px;
  padding: 0 4px;
  background: #e9efff;
  color: #3659c7;
  font-size: 9px;
  font-weight: 800;
}
.toolbar-divider {
  height: 19px;
  width: 1px;
  background: #d8dfe9;
  margin: 0 2px;
}
.toolbar-spacer {
  flex: 1 1 auto;
}
.filter-chip-row {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 0;
  padding: 0 8px;
  background: #fbfcfe;
  border-bottom: 1px solid #e3e8ef;
  overflow-x: auto;
}
.filter-chip-row:empty {
  display: none;
}
.filter-chip {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  margin: 5px 0 !important;
  padding: 3px 7px !important;
  border: 1px solid #cdd9f3 !important;
  border-radius: 12px !important;
  background: #eef4ff !important;
  color: #31539b !important;
  font-size: 9.5px !important;
}
.filter-chip b {
  font-size: 12px;
  line-height: 1;
  color: #6480b8;
}
.data-grid-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 255px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: #fff;
}
.data-grid-main.clustering-grid-main {
  grid-template-columns: auto minmax(0, 1fr) 270px;
}
.data-side-panel {
  width: 220px;
  min-width: 220px;
  padding: 8px;
  border-right: 1px solid #dfe5ed;
  background: #f8fafc;
  overflow: auto;
  transition:
    width 0.16s ease,
    min-width 0.16s ease,
    padding 0.16s ease;
}
.data-side-panel.is-collapsed {
  width: 0;
  min-width: 0;
  padding: 0;
  border-right: 0;
  overflow: hidden;
}
.side-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 9px;
}
.side-panel-head > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.side-panel-head strong {
  font-size: 11.5px;
  color: #26364f;
}
.side-panel-head span {
  font-size: 9.5px;
  color: #788599;
}
.side-panel-head .icon-btn {
  border: 0;
  background: transparent;
  width: 24px;
  height: 24px;
  font-size: 16px;
  color: #69768a;
  cursor: pointer;
}
.data-side-panel label,
.record-inspector label,
.columns-popover label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 7px;
  font-size: 9.5px;
  color: #5d6b80;
}
.data-side-panel input,
.data-side-panel select,
.record-inspector input,
.record-inspector select,
.columns-popover input,
.columns-popover select {
  height: 29px;
  border: 1px solid #d2dae6;
  border-radius: 4px;
  background: #fff;
  color: #26364d;
  padding: 3px 6px;
  font:
    400 10.5px 'Noto Sans',
    'Segoe UI',
    Arial,
    sans-serif;
}
.side-panel-actions,
.columns-panel-actions {
  display: flex;
  gap: 5px;
  margin: 7px 0;
}
.side-panel-actions button,
.columns-panel-actions button {
  border: 1px solid #ccd6e4;
  border-radius: 4px;
  background: #fff;
  padding: 5px 8px;
  color: #33445d;
  font-size: 9.8px;
  font-weight: 650;
  cursor: pointer;
}
.facet-title {
  padding: 8px 0 4px;
  border-top: 1px solid #e2e7ee;
  color: #66758a;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.facet-value {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 0;
  background: transparent;
  padding: 5px;
  border-radius: 4px;
  color: #3d4c63;
  font-size: 10px;
  text-align: left;
  cursor: pointer;
}
.facet-value:hover {
  background: #edf2f8;
}
.facet-value b {
  font-size: 9px;
  color: #7a8798;
  font-variant-numeric: tabular-nums;
}
.virtual-grid-host {
  min-height: 0;
  overflow: auto !important;
  background: #fff;
}
.metadata-grid-virtual {
  table-layout: auto;
  min-width: max-content !important;
}
.metadata-grid-virtual th,
.metadata-grid-virtual td {
  height: 34px;
  box-sizing: border-box;
}
.metadata-grid-virtual .selection-col {
  min-width: 34px !important;
  width: 34px !important;
  max-width: 34px !important;
  padding: 0 !important;
  text-align: center;
  position: sticky;
  left: 0;
  z-index: 4;
  background: #fbfcfe;
}
.metadata-grid-virtual .sample-col {
  left: 34px !important;
  min-width: 115px;
}
.metadata-grid-virtual th.sample-col {
  z-index: 5;
}
.metadata-grid-virtual td[contenteditable='true'] {
  cursor: text;
}
.metadata-grid-virtual tr.selected-record > td {
  background: #edf4ff !important;
}
.metadata-grid-virtual tr:hover > td {
  background: #f8fbff;
}
.metadata-grid-virtual tr.selected-record:hover > td {
  background: #e8f1ff !important;
}
.metadata-grid-virtual .virtual-spacer-row td {
  padding: 0 !important;
  border: 0 !important;
  background: #fff !important;
  height: auto;
}
.metadata-sort-btn,
.header-filter-btn {
  border: 0 !important;
  background: transparent !important;
  color: inherit;
  padding: 0 !important;
  font: inherit;
  cursor: pointer;
}
.header-filter-btn {
  float: right;
  margin-left: 6px;
  opacity: 0.52;
}
.header-filter-btn:hover {
  opacity: 1;
}
.header-filter-btn .ui-icon {
  width: 11px;
  height: 11px;
}
.record-inspector {
  width: 255px;
  min-width: 255px;
  padding: 8px 9px;
  border-left: 1px solid #dfe5ed;
  background: #fbfcfe;
  overflow: auto;
}
.clustering-grid-main .record-inspector {
  width: 270px;
  min-width: 270px;
}
.record-inspector.is-collapsed {
  display: none;
}
.record-inspector-body {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.inspector-record-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 1px 0 9px;
  margin-bottom: 8px;
  border-bottom: 1px solid #e2e7ed;
}
.inspector-record-title strong {
  font-size: 15px;
  color: #22324b;
}
.inspector-record-title span {
  font-size: 9.5px;
  color: #7d8999;
}
.inspector-actions {
  display: grid;
  gap: 5px;
  margin-top: 7px;
  padding-top: 8px;
  border-top: 1px solid #e3e8ef;
}
.inspector-actions button {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-start;
  border: 1px solid #cfd9ea;
  border-radius: 4px;
  background: #fff;
  color: #3153a3;
  padding: 6px 8px;
  font-size: 10px;
  font-weight: 650;
  cursor: pointer;
}
.inspector-actions .ui-icon {
  width: 14px;
  height: 14px;
}
.cluster-inspector-metrics {
  margin: 0;
}
.cluster-inspector-metrics > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(70px, auto);
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid #e8edf2;
}
.cluster-inspector-metrics dt {
  font-size: 9.5px;
  color: #69768a;
}
.cluster-inspector-metrics dd {
  margin: 0;
  text-align: right;
  font-size: 10px;
  font-weight: 700;
  color: #283850;
}
.member-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 10px;
}
/*
 * Source section 19/53: member list strong.
 * Assembles into styles/base.css.
 * Rules remain in their original cascade order; later sections may intentionally override these
 * declarations.
 */
.member-list > strong {
  font-size: 10.5px;
  color: #34445d;
  margin-bottom: 2px;
}
.member-list > span {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 5px;
  border-radius: 3px;
  background: #f0f3f7;
  color: #33445a;
  font-size: 9.5px;
}
.member-list small {
  color: #7d8998;
  font-size: 8.8px;
}
.member-list em {
  font-size: 9px;
  color: #778497;
  padding: 3px;
}
.columns-popover {
  position: absolute;
  z-index: 40;
  top: 123px;
  left: 245px;
  width: min(520px, calc(100% - 300px));
  max-height: 70%;
  overflow: auto;
  padding: 9px;
  border: 1px solid #bdc8d8;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(35, 48, 72, 0.16);
}
.columns-popover.hidden {
  display: none !important;
}
.columns-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 8px;
  margin-bottom: 5px;
  border-bottom: 1px solid #e1e6ed;
}
.columns-panel-head > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.columns-panel-head strong {
  font-size: 12px;
  color: #24344c;
}
.columns-panel-head span {
  font-size: 9.5px;
  color: #748196;
}
.columns-head-row,
.columns-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 68px 68px 64px;
  gap: 6px;
  align-items: center;
  min-height: 31px;
  border-bottom: 1px solid #edf0f4;
  padding: 0 4px;
}
.columns-head-row {
  font-size: 8.8px;
  color: #7c8798;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.035em;
  background: #f7f9fb;
}
.columns-row > span:first-child {
  font-size: 10.5px;
  color: #33435b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.columns-row label {
  display: grid;
  place-items: center;
  margin: 0;
}
.column-order-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 2px;
}
.column-order-buttons button {
  border: 1px solid #d6dde7;
  border-radius: 3px;
  background: #fff;
  width: 24px;
  height: 23px;
  color: #637086;
  cursor: pointer;
}
.tree-label-fixed {
  font-size: 9px;
  color: #6e7c90;
  font-weight: 700;
}
.cluster-column-option {
  display: grid !important;
  grid-template-columns: 1fr auto !important;
  align-items: center !important;
  min-height: 31px;
  margin: 0 !important;
  padding: 0 5px;
  border-bottom: 1px solid #edf0f4;
}
.cluster-column-option span {
  font-size: 10.5px;
  color: #33435b;
}
.data-grid-footer {
  flex: 0 0 27px;
  display: flex;
  align-items: center;
  padding: 0 9px;
  border-top: 1px solid #dde4ec;
  background: #f5f7fa;
  color: #69768a;
  font-size: 9.5px;
}
.cluster-summary-grid {
  min-width: 100% !important;
}
.cluster-summary-grid th,
.cluster-summary-grid td {
  white-space: nowrap;
}
.cluster-summary-grid td:nth-child(4),
.cluster-summary-grid td:nth-child(5) {
  white-space: normal;
  min-width: 130px;
}
.cluster-summary-grid tr {
  cursor: pointer;
}
.cluster-summary-grid tr.selected-record > td {
  background: #edf4ff !important;
}
.status-good {
  background: #e7f5ed !important;
  color: #17633f !important;
  font-weight: 700;
}
.status-bad {
  background: #fdebea !important;
  color: #a13d32 !important;
  font-weight: 700;
}
.status-warn {
  background: #fff3d8 !important;
  color: #8a5a00 !important;
  font-weight: 700;
}
.ui-icon {
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 1100px) {
  .data-grid-main,
  .data-grid-main.clustering-grid-main {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .record-inspector {
    display: none;
  }
  .columns-popover {
    left: 20px;
    width: calc(100% - 40px);
  }
}

:root {
  --menu-text-size: 14px;
  --data-table-text-size: 12.5px;
}
.menu-trigger {
  font-weight: 400 !important;
}
.metadata-grid,
.cluster-summary-grid,
.metadata-grid-virtual {
  font-family: var(--app-font-family) !important;
  font-size: var(--data-table-text-size) !important;
  font-weight: 400 !important;
}
.metadata-grid th,
.metadata-grid td,
.cluster-summary-grid th,
.cluster-summary-grid td,
.metadata-grid-virtual th,
.metadata-grid-virtual td {
  font-family: var(--app-font-family) !important;
  font-size: var(--data-table-text-size) !important;
  font-weight: 400 !important;
  line-height: 1.35 !important;
}
.metadata-grid th,
.cluster-summary-grid th,
.metadata-grid-virtual th {
  color: #314057 !important;
  background: #f3f6fb !important;
}
.metadata-grid .sample-col,
.cluster-summary-grid .sample-col {
  font-weight: 400 !important;
}
.status-good,
.status-bad,
.status-warn {
  font-weight: 500 !important;
}
.data-summary-strip,
.data-summary-strip strong,
.data-grid-footer,
.data-grid-toolbar button,
.data-grid-toolbar .toolbar-search,
.toolbar-search input {
  font-family: var(--app-font-family) !important;
}
.data-summary-strip {
  font-size: 12px !important;
}
.data-summary-strip strong {
  font-size: 12.5px !important;
  font-weight: 500 !important;
}
.data-grid-toolbar button,
.data-grid-toolbar .toolbar-search {
  font-size: 12px !important;
  font-weight: 400 !important;
}
.toolbar-search input {
  font-size: 12px !important;
  font-weight: 400 !important;
}
.data-grid-footer {
  font-size: 11.5px !important;
}

/* Data-workspace popovers are moved to document.body and positioned against the viewport. */
.columns-popover.global-floating-panel,
.node-menu.global-floating-panel {
  position: fixed !important;
  z-index: 1000 !important;
  margin: 0 !important;
  max-width: calc(100vw - 16px) !important;
  max-height: calc(100vh - 16px) !important;
  overscroll-behavior: contain;
}
.columns-popover.global-floating-panel {
  width: min(520px, calc(100vw - 24px)) !important;
  overflow: auto !important;
}
.node-menu.global-floating-panel {
  width: 190px !important;
}
.menu-dropdown.global-floating-menu {
  position: fixed !important;
  z-index: 1100 !important;
  margin: 0 !important;
  max-height: calc(100vh - 16px) !important;
  overflow: visible !important;
}
.menu-submenu.submenu-flip-left {
  left: auto !important;
  right: calc(100% - 2px) !important;
}

/* A slightly roomier row height keeps the larger type readable without making the table heavy. */
.metadata-grid-virtual th,
.metadata-grid-virtual td,
.cluster-summary-grid th,
.cluster-summary-grid td {
  min-height: 36px !important;
  height: 36px !important;
  padding: 7px 9px !important;
}

@media (max-width: 1320px) {
  :root {
    --menu-text-size: 13.5px;
    --data-table-text-size: 12px;
  }
}
@media (max-width: 1020px) {
  :root {
    --menu-text-size: 13px;
    --data-table-text-size: 11.5px;
  }
}
.menu-dropdown.global-floating-menu {
  left: var(--floating-left, 8px) !important;
  top: var(--floating-top, 40px) !important;
  right: auto !important;
}

.workspace-document-area:not(.split-mode) {
  display: flex !important;
  flex-direction: column !important;
  min-height: 0 !important;
  overflow: hidden !important;
}
.workspace-document-area:not(.split-mode) > .plot-view.active {
  flex: 1 1 auto !important;
  height: auto !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

/* Metadata and Clustering inspectors no longer reserve width when closed. */
.data-grid-main,
.data-grid-main.clustering-grid-main {
  grid-template-columns: auto minmax(0, 1fr) auto !important;
}
.record-inspector {
  box-sizing: border-box;
  overflow: auto;
  transition:
    width 0.16s ease,
    min-width 0.16s ease,
    padding 0.16s ease,
    border-color 0.16s ease;
}
.record-inspector.is-collapsed {
  display: block !important;
  width: 0 !important;
  min-width: 0 !important;
  max-width: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  border-left-color: transparent !important;
  overflow: hidden !important;
}

/* Data toolbars share the Tree/Compact tree control-strip visual language. */
.data-action-strip {
  min-height: 36px !important;
  padding: 5px 9px !important;
  gap: 6px !important;
  border-bottom: 1px solid #d9dfe7 !important;
  background: #f8fafc !important;
}
.data-action-strip button,
.data-action-strip .toolbar-search {
  height: 26px !important;
  min-height: 26px !important;
  border: 1px solid #cbd4df !important;
  border-radius: 3px !important;
  background: #fff !important;
  color: #34435a !important;
  font-family: var(--app-font-family) !important;
  font-size: 11.5px !important;
  font-weight: 400 !important;
}
.data-action-strip button {
  padding: 3px 8px !important;
}
.data-action-strip button:hover {
  background: #f4f7fb !important;
  border-color: #b8c5d6 !important;
}
.data-action-strip button:disabled {
  opacity: 0.4 !important;
  cursor: default !important;
}
.data-action-strip .toolbar-search {
  padding: 0 7px !important;
  gap: 5px !important;
}
.data-action-strip .toolbar-search input {
  font-size: 11.5px !important;
  font-weight: 400 !important;
}
.data-action-strip .ui-icon {
  width: 14px !important;
  height: 14px !important;
}

/* With explanatory prose removed, the data title bars stay compact. */
.data-grid-titlebar {
  min-height: 40px !important;
  height: 40px !important;
  padding: 6px 10px !important;
}
.data-grid-titlebar > div:first-child {
  justify-content: center !important;
}
.data-grid-titlebar > div:first-child > strong {
  font-size: 14px !important;
  font-weight: 600 !important;
}

/* Closed filter/inspector rails animate symmetrically. */
.data-side-panel,
.record-inspector {
  will-change: width, min-width, padding;
}
.workspace-document-area:not(.split-mode) #analysisView > .analysis-workspace,
.workspace-document-area:not(.split-mode) #phyloView > .phylo-workspace,
.workspace-document-area:not(.split-mode) #outbreakView > .outbreak-workspace {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
}

.data-grid-workspace {
  container-type: inline-size;
}
.data-action-strip {
  overflow: visible !important;
  white-space: normal !important;
  flex-wrap: wrap !important;
}
.table-font-control,
.axis-scale-control {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 26px;
  flex: 0 0 auto;
}
.table-font-control button,
.axis-scale-control button {
  height: 26px !important;
  min-width: 28px !important;
  padding: 0 6px !important;
  justify-content: center !important;
}
.table-font-control > span,
.axis-scale-control > span:not(.axis-label) {
  min-width: 42px;
  text-align: center;
  font: 400 10.5px/1 var(--app-font-family);
  color: #55647a;
  font-variant-numeric: tabular-nums;
}
.axis-scale-control {
  padding: 0 3px;
  border: 1px solid #cbd4df;
  border-radius: 3px;
  background: #fff;
}
.axis-scale-control button {
  border: 0 !important;
  background: transparent !important;
}
.axis-scale-control .axis-label {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 3px;
  background: #eef2f7;
  color: #31445f;
  font-size: 9px;
  font-weight: 650;
}

/* Table fonts can be adjusted per workspace without changing the rest of the UI. */
#metadataView .metadata-grid th,
#metadataView .metadata-grid td,
#clustersView .cluster-summary-grid th,
#clustersView .cluster-summary-grid td {
  font-size: var(--workspace-table-font-size, var(--data-table-text-size)) !important;
}

/* Option A: neutral Data pane, very pale blue-gray Analysis pane. */
.workspace-tab-group-left {
  background: #edf0f4 !important;
}
.workspace-tab-group-right {
  background: #eef4f9 !important;
  border-left-color: #bfcbd7 !important;
}
.workspace-tab-group-right .view-tab {
  color: #52677b !important;
}
.workspace-tab-group-right .view-tab:hover {
  background: #f7faff !important;
  border-color: #cbd9e6 !important;
}
/*
 * Source section 20/53: workspace tab group right view tab active.
 * Assembles into styles/base.css.
 * Rules remain in their original cascade order; later sections may intentionally override these
 * declarations.
 */
.workspace-tab-group-right .view-tab.active {
  background: #f7fbff !important;
  color: #28527b !important;
  border-color: #bccfe0 !important;
}
.workspace-tab-group-right .view-tab.active:before {
  background: #6e91b2 !important;
}
.workspace-tab-group-right .view-tab.active .ui-icon {
  color: #557c9f !important;
}
.workspace-document-area.split-mode > .plot-view.split-primary {
  background: #fff !important;
}
.workspace-document-area.split-mode > .plot-view.split-secondary {
  background: #f5f8fb !important;
  border-left-color: #c3ced9 !important;
}
.workspace-document-area.split-mode > .plot-view.split-secondary > .analysis-workspace,
.workspace-document-area.split-mode > .plot-view.split-secondary > .phylo-workspace,
.workspace-document-area.split-mode > .plot-view.split-secondary > .outbreak-workspace,
.workspace-document-area.split-mode > .plot-view.split-secondary.data-grid-workspace {
  background: #f5f8fb !important;
}
.workspace-document-area.split-mode > .plot-view.split-secondary .workspace-view-head,
.workspace-document-area.split-mode > .plot-view.split-secondary .analysis-workspace-head {
  background: #f1f6fa !important;
  border-bottom-color: #d5e0e9 !important;
}
.workspace-document-area.split-mode.pane-max-right > .plot-view.split-secondary {
  background: #f5f8fb !important;
}

/* No horizontal scrollbar in Metadata/Clustering action bars. On narrow panes use a two-column grid. */
@container (max-width: 760px) {
  .data-action-strip {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: center !important;
    gap: 5px !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 6px 8px !important;
  }
  .data-action-strip .toolbar-search {
    grid-column: 1/-1 !important;
    width: 100% !important;
    min-width: 0 !important;
  }
  .data-action-strip button {
    width: 100% !important;
    min-width: 0 !important;
    justify-content: flex-start !important;
    overflow: hidden !important;
  }
  .data-action-strip button span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .data-action-strip .toolbar-divider,
  .data-action-strip .toolbar-spacer {
    display: none !important;
  }
  .data-action-strip .table-font-control {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: 1fr auto 1fr !important;
    border: 1px solid #cbd4df;
    border-radius: 3px;
    background: #fff;
    padding: 0 2px;
  }
  .data-action-strip .table-font-control button {
    width: 100% !important;
    justify-content: center !important;
    border: 0 !important;
  }
}
@container (max-width: 470px) {
  .data-action-strip {
    grid-template-columns: 1fr !important;
  }
  .data-action-strip .toolbar-search {
    grid-column: 1 !important;
  }
}
.data-grid-titlebar {
  min-height: 34px !important;
  height: 34px !important;
  padding: 4px 10px !important;
}

/* Selected tabs are highlighted by surface/color only, never by bold type. */
.view-tab,
.view-tab.active,
.control-tab,
.control-tab.active,
.project-tab,
.project-tab.active {
  font-weight: 400 !important;
}
.view-tab.active {
  color: #274e73 !important;
}

/* Metadata and Clustering: compact readable rows with alternating shading. */
.metadata-grid-virtual th,
.metadata-grid-virtual td,
.cluster-summary-grid th,
.cluster-summary-grid td {
  height: 30px !important;
  min-height: 30px !important;
  padding: 4px 8px !important;
  font-weight: 400 !important;
}
.metadata-grid-virtual thead th,
.cluster-summary-grid thead th {
  background: #eef2f7 !important;
}
.metadata-grid-virtual tbody tr:nth-child(even):not(.virtual-spacer-row),
.cluster-summary-grid tbody tr:nth-child(even) {
  background: #f7f9fc !important;
}
.metadata-grid-virtual tbody tr:nth-child(odd):not(.virtual-spacer-row),
.cluster-summary-grid tbody tr:nth-child(odd) {
  background: #fff !important;
}
.metadata-grid-virtual tbody tr:hover:not(.virtual-spacer-row),
.cluster-summary-grid tbody tr:hover {
  background: #edf4fb !important;
}
.metadata-grid-virtual tbody tr.selected-record,
.cluster-summary-grid tbody tr.selected-record {
  background: #e4eef9 !important;
}

/* Maximum toolbar wrapping is two rows. If controls still do not fit, scroll horizontally. */
@container (max-width:760px) {
  .data-action-strip {
    display: grid !important;
    grid-template-rows: repeat(2, 26px) !important;
    grid-auto-flow: column !important;
    grid-auto-columns: max-content !important;
    grid-template-columns: none !important;
    align-items: center !important;
    gap: 5px !important;
    height: auto !important;
    max-height: 62px !important;
    min-height: 57px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    flex-wrap: nowrap !important;
    scrollbar-width: thin;
    padding: 5px 8px !important;
  }
  .data-action-strip .toolbar-search {
    grid-column: auto !important;
    width: 220px !important;
    min-width: 180px !important;
  }
  .data-action-strip button {
    width: auto !important;
    min-width: max-content !important;
    justify-content: center !important;
    overflow: visible !important;
  }
  .data-action-strip button span {
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: nowrap !important;
  }
  .data-action-strip .toolbar-divider,
  .data-action-strip .toolbar-spacer {
    display: none !important;
  }
  .data-action-strip .table-font-control {
    width: auto !important;
    display: inline-grid !important;
    grid-template-columns: auto auto auto !important;
    border: 1px solid #cbd4df;
    border-radius: 3px;
    background: #fff;
    padding: 0 2px;
  }
  .data-action-strip .table-font-control button {
    width: auto !important;
    min-width: 28px !important;
    justify-content: center !important;
    border: 0 !important;
  }
}
@container (max-width:470px) {
  .data-action-strip {
    grid-template-rows: repeat(2, 26px) !important;
    grid-template-columns: none !important;
    grid-auto-flow: column !important;
    overflow-x: auto !important;
  }
  .data-action-strip .toolbar-search {
    grid-column: auto !important;
  }
}

/* Inspector is absent from layout until a row is clicked; its opening animation mirrors Filters. */
.record-inspector {
  transition:
    width 0.16s ease,
    min-width 0.16s ease,
    max-width 0.16s ease,
    padding 0.16s ease,
    border-color 0.16s ease,
    opacity 0.14s ease !important;
}
.record-inspector.is-collapsed {
  opacity: 0 !important;
}
.record-inspector:not(.is-collapsed) {
  opacity: 1 !important;
}

/* Expand mode starts clean but Projects and Settings may be explicitly reopened. */
body.pane-maximized .workspace-grid > .left-panel,
body.pane-maximized .workspace-grid > .right-panel {
  display: flex !important;
}
body.pane-maximized.inputs-collapsed.controls-collapsed .workspace-grid {
  grid-template-columns: 0 minmax(0, 1fr) 0 !important;
}
body.pane-maximized:not(.inputs-collapsed).controls-collapsed .workspace-grid {
  grid-template-columns: 290px minmax(0, 1fr) 0 !important;
}
body.pane-maximized.inputs-collapsed:not(.controls-collapsed) .workspace-grid {
  grid-template-columns: 0 minmax(0, 1fr) 350px !important;
}
body.pane-maximized:not(.inputs-collapsed):not(.controls-collapsed) .workspace-grid {
  grid-template-columns: 290px minmax(0, 1fr) 350px !important;
}
body.pane-maximized .workspace-grid > .plot-shell {
  grid-column: 2 !important;
}
body.pane-maximized.inputs-collapsed .left-panel {
  pointer-events: none !important;
}
body.pane-maximized:not(.inputs-collapsed) .left-panel {
  transform: none !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  overflow: visible !important;
}
body.pane-maximized.controls-collapsed .right-panel {
  width: 0 !important;
  min-width: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
body.pane-maximized:not(.controls-collapsed) .right-panel {
  width: auto !important;
  min-width: 0 !important;
  transform: none !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  overflow: visible !important;
}

/* Sample analysis uses a thin status strip rather than dashboard cards. */
.analysis-summary-strip {
  display: flex !important;
  align-items: center !important;
  gap: 0 !important;
  flex-wrap: wrap !important;
  padding: 5px 10px !important;
  min-height: 32px !important;
  background: #eef3f8 !important;
  border-bottom: 1px solid #d8e0e9 !important;
}
.analysis-summary-strip > span {
  display: inline-flex !important;
  align-items: baseline !important;
  gap: 4px !important;
  padding: 0 10px !important;
  border-right: 1px solid #cbd5e0 !important;
  white-space: nowrap !important;
  font-size: 11.5px !important;
  color: #526174 !important;
}
.analysis-summary-strip > span:first-child {
  padding-left: 0 !important;
}
.analysis-summary-strip > span:last-child {
  border-right: 0 !important;
}
.analysis-summary-strip strong {
  font-size: 12.5px !important;
  font-weight: 500 !important;
  color: #20354d !important;
}

/* Selected-group details: compact shaded key/value table. */
.compact-profile-head {
  padding: 6px 8px !important;
  margin: 0 !important;
  background: #edf2f7 !important;
  border: 1px solid #d8e0e9 !important;
  border-bottom: 0 !important;
}
.compact-detail-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
}
.compact-detail-table th,
.compact-detail-table td {
  padding: 5px 8px;
  border: 1px solid #dce3eb;
  vertical-align: top;
  font-weight: 400;
  text-align: left;
}
.compact-detail-table th {
  width: 170px;
  color: #405168;
  background: #eef2f7;
}
.compact-detail-table tr:nth-child(even) td {
  background: #f7f9fc;
}
.compact-detail-table tr:nth-child(odd) td {
  background: #fff;
}

/* Tree-analysis top blocks share one grid and equal visual treatment. */
.analysis-top-cards-phylo {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 8px !important;
  align-items: stretch !important;
}
.analysis-top-cards-phylo > .professional-analysis-section {
  margin: 0 !important;
  min-height: 100% !important;
  border-radius: 4px !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
}
.analysis-top-cards-phylo > .professional-analysis-section .analysis-section-title {
  min-height: 50px !important;
}
.analysis-top-cards-phylo > .professional-analysis-section > .metric-list,
.analysis-top-cards-phylo > .professional-analysis-section > .phylo-summary-body,
.analysis-top-cards-phylo > .professional-analysis-section > .professional-note {
  margin: 8px !important;
}
@media (max-width: 1250px) {
  .analysis-top-cards-phylo {
    grid-template-columns: 1fr !important;
  }
}

/* Lightweight explanatory figures inside Tree analysis. */
.phylo-figure-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
}
.phylo-explain-figure {
  margin: 0;
  border: 1px solid #d8e0e9;
  border-radius: 4px;
  background: #fff;
  overflow: hidden;
}
.phylo-explain-figure figcaption {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 7px 9px;
  background: #f2f5f8;
  border-bottom: 1px solid #dce3ea;
  font-size: 11px;
  color: #5a6879;
}
.phylo-explain-figure figcaption strong {
  font-size: 12px;
  font-weight: 500;
  color: #24384f;
}
.phylo-figure-canvas {
  min-height: 170px;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.phylo-figure-canvas svg {
  width: 100%;
  height: auto;
  max-height: 190px;
}
.phylo-chart-bar {
  fill: #7897b5;
}
.phylo-chart-axis {
  stroke: #aab6c3;
  stroke-width: 1;
}
.phylo-chart-label {
  font: 10px var(--app-font-family);
  fill: #617083;
}
.phylo-chart-value {
  font: 9px var(--app-font-family);
  fill: #34465b;
}
@media (max-width: 1200px) {
  .phylo-figure-grid {
    grid-template-columns: 1fr;
  }
}

/* Outbreak overview is the same thin information-strip language as Metadata. */
.outbreak-summary-strip {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center !important;
  gap: 0 !important;
  padding: 5px 10px !important;
  min-height: 34px !important;
  background: #edf3f8 !important;
  border: 1px solid #d7e0e9 !important;
  border-radius: 3px !important;
}
.outbreak-summary-strip > span {
  display: inline-flex !important;
  align-items: baseline !important;
  gap: 4px !important;
  flex-wrap: wrap !important;
  padding: 0 12px !important;
  border-right: 1px solid #c8d4df !important;
  color: #526174 !important;
  font-size: 11.5px !important;
}
.outbreak-summary-strip > span:first-child {
  padding-left: 0 !important;
}
.outbreak-summary-strip > span:last-child {
  border-right: 0 !important;
}
.outbreak-summary-strip strong {
  font-size: 12.5px !important;
  font-weight: 500 !important;
  color: #20354d !important;
}
.outbreak-summary-strip small {
  font-size: 10px !important;
  color: #7a8795 !important;
}

/* Physical right pane keeps the pale blue-gray Option-A flavour even for Data tabs. */
.workspace-document-area.split-mode > .plot-view.split-secondary {
  background: #f5f8fb !important;
}
.workspace-document-area.split-mode > .plot-view.split-secondary .data-summary-strip,
.workspace-document-area.split-mode > .plot-view.split-secondary .data-action-strip {
  border-color: #d2dde7 !important;
}

:root {
  --analysis-pane-tint: #f5f8fb;
}
.workspace-tab-group-right {
  background: var(--analysis-pane-tint) !important;
}
.workspace-document-area.split-mode > .plot-view.split-secondary,
.workspace-document-area.split-mode > .plot-view.split-secondary > .analysis-workspace,
.workspace-document-area.split-mode > .plot-view.split-secondary > .phylo-workspace,
.workspace-document-area.split-mode > .plot-view.split-secondary > .outbreak-workspace,
.workspace-document-area.split-mode > .plot-view.split-secondary.data-grid-workspace {
  background: var(--analysis-pane-tint) !important;
}
.settings-pages {
  background: #f6f7f9 !important;
}
.settings-page-titlebar.compact-settings-title {
  min-height: 38px !important;
  padding: 5px 8px !important;
}
.settings-page-titlebar.compact-settings-title small {
  font-size: 9px !important;
}
.settings-global-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 4px;
  padding: 5px 6px;
  border-bottom: 1px solid #d7dde6;
  background: #eef1f5;
  position: sticky;
  top: 0;
  z-index: 7;
}
/*
 * Source section 21/53: settings global strip check row.
 * Assembles into styles/base.css.
 * Rules remain in their original cascade order; later sections may intentionally override these
 * declarations.
 */
.settings-global-strip .check-row {
  margin: 0 !important;
  min-height: 24px;
}
.settings-global-strip .mini-btn {
  min-height: 24px;
  padding: 0 6px;
  font-size: 9.5px;
}
.settings-compact-section {
  margin: 4px 5px;
  border: 1px solid #d7dde5;
  border-radius: 4px;
  background: #fff;
  overflow: hidden;
}
.settings-compact-section > summary {
  list-style: none;
  cursor: pointer;
  position: relative;
  padding: 6px 24px 6px 8px;
  font: 600 10.5px/1.15 var(--app-font-family);
  color: #304158;
  background: #edf0f4;
  border-bottom: 0;
}
.settings-compact-section > summary::-webkit-details-marker {
  display: none;
}
.settings-compact-section > summary:after {
  content: '›';
  position: absolute;
  right: 8px;
  top: 5px;
  color: #738096;
  font-size: 15px;
}
.settings-compact-section[open] > summary:after {
  content: '⌄';
  top: 3px;
}
.settings-compact-section[open] > summary {
  border-bottom: 1px solid #e0e5ec;
}
.settings-compact-body,
.settings-module-body {
  padding: 5px 7px;
  display: grid;
  gap: 4px;
  background: #fff;
}
.settings-compact-body > label:not(.check-row),
.settings-module-body > label:not(.check-row),
.settings-inline-grid > label {
  display: grid;
  grid-template-columns: minmax(92px, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: 6px;
  font-size: 10px !important;
  color: #435169;
  margin: 0 !important;
}
.settings-compact-body input:not([type='checkbox']):not([type='color']),
.settings-compact-body select,
.settings-module-body input:not([type='checkbox']):not([type='color']),
.settings-module-body select,
.settings-inline-grid input:not([type='checkbox']):not([type='color']),
.settings-inline-grid select {
  height: 25px !important;
  min-height: 25px !important;
  padding: 2px 5px !important;
  font-size: 10px !important;
}
.settings-compact-body input[type='color'],
.settings-module-body input[type='color'],
.settings-inline-grid input[type='color'] {
  height: 23px !important;
  width: 100% !important;
  min-width: 38px !important;
  padding: 1px !important;
}
.settings-inline-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}
.settings-inline-grid > label {
  grid-template-columns: minmax(72px, 0.9fr) minmax(0, 1fr);
}
.settings-module,
.nested-setting {
  margin: 4px 5px;
  border: 1px solid #d7dde5;
  border-radius: 4px;
  background: #fff;
  overflow: hidden;
}
.nested-setting {
  margin: 4px 0;
}
.settings-module-head,
.nested-setting-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px;
  min-height: 29px;
  padding: 3px 5px;
  background: #edf0f4;
}
.settings-module-head .check-row,
.nested-setting-head .check-row {
  margin: 0 !important;
  min-height: 22px;
}
.settings-module-head strong {
  font-size: 10.5px;
  color: #304158;
}
.setting-detail-toggle {
  height: 22px !important;
  padding: 0 6px !important;
  border: 1px solid #cbd3de !important;
  border-radius: 3px !important;
  background: #f9fafc !important;
  font-size: 9px !important;
  color: #516077 !important;
}
.settings-module.is-collapsed > .settings-module-body,
.nested-setting.is-collapsed > .settings-module-body {
  display: none;
}
.settings-module.is-disabled,
.nested-setting.is-disabled {
  opacity: 0.72;
}
.settings-module.is-disabled .settings-module-head,
.nested-setting.is-disabled .nested-setting-head {
  background: #f4f5f7;
}
.settings-module.is-disabled .setting-detail-toggle,
.nested-setting.is-disabled .setting-detail-toggle {
  display: none;
}
.settings-inspector .hint {
  display: none !important;
}
.settings-inspector .control-group {
  margin: 4px 5px !important;
  padding: 6px !important;
}
.settings-inspector .control-group h3 {
  font-size: 10.5px !important;
  margin: 0 0 5px !important;
}
.settings-inspector .control-group > label:not(.check-row) {
  grid-template-columns: minmax(92px, 0.9fr) minmax(0, 1.1fr) !important;
  gap: 6px !important;
  font-size: 10px !important;
}
.settings-inspector .control-group input:not([type='checkbox']):not([type='color']),
.settings-inspector .control-group select {
  min-height: 25px !important;
  height: 25px !important;
  font-size: 10px !important;
}
.settings-inspector .advanced-settings {
  margin: 4px 5px !important;
}
.settings-inspector .advanced-settings > summary {
  padding: 6px 24px 6px 8px !important;
  font-size: 10.5px !important;
}
.settings-inspector .advanced-settings > summary small {
  display: none !important;
}
.settings-tab-rail {
  overflow-y: auto !important;
}
.settings-tab-rail .control-tab {
  min-height: 34px !important;
  height: 34px !important;
}
.settings-tab-rail .rail-icon {
  font-size: 11px !important;
}
.compact-field-controls {
  max-height: 210px;
  overflow: auto;
  border: 1px solid #e0e5ec;
  border-radius: 3px;
  background: #fff;
}
.compact-field-row {
  grid-template-columns: 18px minmax(70px, 1fr) 76px 54px 20px !important;
  gap: 4px !important;
  padding: 3px 4px !important;
  min-height: 28px !important;
  font-size: 9.5px !important;
}
.compact-field-row select,
.compact-field-row input[type='number'] {
  height: 22px !important;
  font-size: 9px !important;
}
.track-config-head {
  display: grid;
  grid-template-columns: minmax(88px, 1fr) 76px 54px 34px;
  gap: 4px;
  padding: 2px 5px;
  color: #788497;
  font-size: 8.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.tree-scaling-popover {
  width: 260px !important;
}
.scaling-popover-grid {
  display: grid;
  grid-template-columns: minmax(80px, 1fr) 30px 56px 30px;
  align-items: center;
  gap: 4px;
  padding: 8px;
}
.scaling-popover-grid > span {
  font-size: 10px;
  color: #4a586e;
}
.scaling-popover-grid strong {
  text-align: center;
  font: 600 10.5px var(--app-font-family);
  color: #29384d;
}
.scaling-popover-grid button {
  height: 26px;
  border: 1px solid #ccd4df;
  border-radius: 3px;
  background: #fff;
}
.scale-summary {
  font-size: 9px;
  color: #718096;
  font-variant-numeric: tabular-nums;
}
body.ui-comfortable .settings-compact-body,
body.ui-comfortable .settings-module-body {
  gap: 6px;
  padding: 7px 8px;
}
body.ui-comfortable .settings-compact-section,
body.ui-comfortable .settings-module {
  margin-block: 6px;
}

.settings-inspector label.check-row,
.settings-inspector .check-row {
  display: grid !important;
  grid-template-columns: 16px minmax(0, 1fr) !important;
  align-items: center !important;
  column-gap: 7px !important;
  min-height: 24px;
  margin: 0 !important;
  padding-block: 1px;
  line-height: 1.2 !important;
}
.settings-inspector .check-row input[type='checkbox'] {
  width: 14px !important;
  height: 14px !important;
  min-width: 14px !important;
  margin: 0 !important;
  padding: 0 !important;
  align-self: center !important;
  justify-self: center !important;
  vertical-align: middle !important;
}
.settings-inspector .check-row > span,
.settings-inspector .check-row > strong {
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.2 !important;
  align-self: center !important;
}
.settings-module-head .check-row,
.nested-setting-head .check-row {
  width: 100%;
}

.metadata-text-config-head {
  display: grid;
  grid-template-columns: 18px minmax(80px, 1fr) 58px 30px;
  align-items: center;
  gap: 4px;
  padding: 3px 5px;
  color: #788497;
  font-size: 8.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.metadata-text-field-row {
  display: grid !important;
  grid-template-columns: 18px minmax(80px, 1fr) 58px 30px !important;
  align-items: center !important;
  gap: 4px !important;
  min-height: 28px !important;
  padding: 3px 4px !important;
  border-top: 1px solid #edf0f4;
  font-size: 9.5px !important;
}
.metadata-text-field-row input[type='number'] {
  height: 22px !important;
  font-size: 9px !important;
}
.metadata-text-field-row input[type='color'] {
  width: 26px !important;
  height: 22px !important;
  min-width: 26px !important;
  padding: 1px !important;
}
.compact-inherit-strip {
  margin: 4px 5px;
  padding: 6px 8px;
  border: 1px solid #d7e0e9;
  border-radius: 4px;
  background: #f4f7fa;
  color: #536176;
  font-size: 9.5px;
  line-height: 1.25;
}
.compact-inherit-strip strong {
  font-weight: 500;
  color: #2e4259;
}
.settings-pages #tab-appearance .settings-compact-section:first-of-type > summary {
  background: #e7edf4;
  color: #24384e;
}
.settings-pages #tab-metadata .settings-page-titlebar,
.settings-pages #tab-compact .settings-page-titlebar {
  border-bottom: 1px solid #d8e0e8;
}
.compact-background {
  pointer-events: none;
}
.settings-local-reset {
  margin: 5px !important;
  width: calc(100% - 10px) !important;
}

.project-title-editable,
.project-subtitle-editable {
  outline: none;
  border-radius: 3px;
  padding: 1px 3px;
  margin-left: -3px;
  cursor: text;
}
.project-title-editable:focus,
.project-subtitle-editable:focus {
  background: #eef4ff;
  box-shadow: inset 0 0 0 1px #b7c7eb;
}
.scaling-action-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  min-height: 24px !important;
  height: 24px !important;
  padding: 0 7px !important;
  font-size: 9px !important;
  font-weight: 400 !important;
  white-space: nowrap;
}
.scaling-action-btn .scale-summary {
  font-size: 8.5px !important;
  font-weight: 400 !important;
  color: #718096;
}
.settings-inspector select,
.settings-inspector input[type='text'],
.settings-inspector input[type='number'] {
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}
.settings-inspector select {
  padding-right: 18px !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}
.settings-compact-body > label:not(.check-row),
.settings-module-body > label:not(.check-row),
.settings-inline-grid > label {
  grid-template-columns: minmax(78px, 0.72fr) minmax(0, 1.28fr) !important;
}
.settings-inline-grid > label {
  grid-template-columns: minmax(56px, 0.62fr) minmax(0, 1.38fr) !important;
}
.settings-subsection {
  border: 1px solid #e0e5ec;
  border-radius: 3px;
  background: #fbfcfe;
  overflow: hidden;
}
.settings-subsection + .settings-subsection {
  margin-top: 2px;
}
.settings-subsection > summary {
  list-style: none;
  cursor: pointer;
  padding: 5px 7px;
  font-size: 9.7px;
  font-weight: 600;
  color: #42516a;
  background: #f2f4f7;
}
.settings-subsection > summary::-webkit-details-marker {
  display: none;
}
.settings-subsection > summary:after {
  content: '›';
  float: right;
  color: #7a8698;
}
.settings-subsection[open] > summary:after {
  content: '⌄';
}
.settings-subsection > div {
  display: grid;
  gap: 4px;
  padding: 5px 6px;
  background: #fff;
}
.settings-subsection > div > label:not(.check-row) {
  display: grid;
  grid-template-columns: minmax(78px, 0.72fr) minmax(0, 1.28fr);
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: #435169;
}
.settings-subsection .settings-inline-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}
.metadata-fields-shell {
  padding: 4px !important;
}
.metadata-field-sections {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-height: 430px;
  overflow: auto;
}
.metadata-field-section {
  border: 1px solid #dce2ea;
  border-radius: 3px;
  background: #fff;
  overflow: hidden;
}
.metadata-field-section > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  list-style: none;
  cursor: pointer;
  padding: 5px 7px;
  background: #f0f3f7;
  color: #344259;
}
.metadata-field-section > summary::-webkit-details-marker {
  display: none;
}
.metadata-field-section > summary:after {
  content: '›';
  grid-column: 3;
  color: #748095;
}
.metadata-field-section[open] > summary:after {
  content: '⌄';
}
.metadata-field-title {
  font-size: 10.3px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.metadata-field-section summary small {
  font-size: 8.5px;
  color: #7b8798;
  white-space: nowrap;
}
.metadata-field-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 6px;
  background: #fff;
}
/*
 * Source section 22/53: metadata field column.
 * Assembles into styles/base.css.
 * Rules remain in their original cascade order; later sections may intentionally override these
 * declarations.
 */
.metadata-field-column {
  display: grid;
  gap: 4px;
  align-content: start;
  padding: 5px;
  border: 1px solid #e4e8ee;
  border-radius: 3px;
  background: #fbfcfe;
}
.metadata-field-column > strong {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #68768b;
}
.metadata-field-column > label:not(.check-row) {
  display: grid;
  grid-template-columns: minmax(68px, 0.72fr) minmax(0, 1.28fr);
  align-items: center;
  gap: 5px;
  font-size: 9.5px;
  color: #45536a;
}
.metadata-field-column .check-row {
  font-size: 9.5px !important;
}
@media (max-width: 1220px) {
  .metadata-field-body {
    grid-template-columns: 1fr;
  }
  .metadata-field-section summary small {
    display: none;
  }
}

body.pane-maximized.inputs-collapsed.controls-collapsed .workspace-grid {
  grid-template-columns: 30px minmax(0, 1fr) 46px !important;
}
body.pane-maximized.inputs-collapsed:not(.controls-collapsed) .workspace-grid {
  grid-template-columns: 30px minmax(0, 1fr) 350px !important;
}
body.pane-maximized:not(.inputs-collapsed).controls-collapsed .workspace-grid {
  grid-template-columns: 290px minmax(0, 1fr) 46px !important;
}
body.pane-maximized.inputs-collapsed .left-panel {
  width: auto !important;
  min-width: 0 !important;
  overflow: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}
body.pane-maximized.controls-collapsed .right-panel {
  width: auto !important;
  min-width: 0 !important;
  overflow: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}
@media (max-width: 1320px) {
  body.pane-maximized.inputs-collapsed.controls-collapsed .workspace-grid {
    grid-template-columns: 28px minmax(0, 1fr) 44px !important;
  }
  body.pane-maximized.inputs-collapsed:not(.controls-collapsed) .workspace-grid {
    grid-template-columns: 28px minmax(0, 1fr) 330px !important;
  }
  body.pane-maximized:not(.inputs-collapsed).controls-collapsed .workspace-grid {
    grid-template-columns: 260px minmax(0, 1fr) 44px !important;
  }
}
@media (max-width: 1020px) {
  body.pane-maximized.inputs-collapsed.controls-collapsed .workspace-grid {
    grid-template-columns: 28px minmax(0, 1fr) 42px !important;
  }
  body.pane-maximized:not(.inputs-collapsed).controls-collapsed .workspace-grid {
    grid-template-columns: 230px minmax(0, 1fr) 42px !important;
  }
}

:root {
  --active-tab-red: #b42318;
  --active-tab-red-soft: #fff4f2;
  --active-tab-red-border: #e3b8b3;
}

/* Active tabs use a restrained scientific red accent across Data, Analysis,
   Settings, and Project rails without increasing font weight. */
.view-tab.active,
.control-tab.active,
.project-tab.active {
  color: var(--active-tab-red) !important;
  background: var(--active-tab-red-soft) !important;
  border-color: var(--active-tab-red-border) !important;
  font-weight: 400 !important;
}
.view-tab.active:before,
.workspace-tab-group-right .view-tab.active:before {
  background: var(--active-tab-red) !important;
}
.view-tab.active .ui-icon,
.workspace-tab-group-right .view-tab.active .ui-icon {
  color: var(--active-tab-red) !important;
}
.workspace-tab-group-right .view-tab.active {
  color: var(--active-tab-red) !important;
  background: #fff7f5 !important;
  border-color: var(--active-tab-red-border) !important;
}
.control-tab.active .rail-icon,
.project-tab.active span {
  color: var(--active-tab-red) !important;
}

/* Figure subtitle is intentionally roomier because it may contain a short
   scientific description in addition to a subtitle. */
.settings-inspector textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: #fff;
  color: var(--text);
  padding: 6px 7px;
  font: inherit;
  line-height: 1.35;
  resize: vertical;
}
.figure-subtitle-setting {
  align-items: start !important;
}
.figure-subtitle-setting textarea {
  min-height: 58px;
  max-height: 128px;
}

/* Compact tree publication controls are now nested inside Tree settings. */
.tree-compact-settings {
  margin-top: 3px;
}
.tree-compact-settings > .settings-module-head {
  background: #eef3f7;
}
.compact-publication-body {
  gap: 3px !important;
}
.compact-publication-body .compact-inherit-strip {
  margin: 0 0 2px !important;
  padding: 5px 6px !important;
}
.compact-publication-body .settings-subsection {
  margin-top: 0 !important;
}

/* Persistence is deliberately reduced to two explicit actions at the end. */
.settings-persistence-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  padding: 7px 5px 10px;
  margin-top: 3px;
  border-top: 1px solid #dce2e9;
  background: #fafbfd;
}
.settings-persistence-footer .mini-btn {
  min-height: 27px;
  border-radius: 4px;
  font-size: 9.8px;
  font-weight: 500;
}

/* Collapsed-clade editing follows the same compact density as other settings. */
#tab-appearance .selection-card {
  min-height: 0 !important;
  margin: 2px 0 3px !important;
  padding: 5px 6px !important;
  border-radius: 4px !important;
  font-size: 9.5px !important;
  line-height: 1.25 !important;
}
#tab-appearance .button-grid {
  gap: 3px !important;
}
#tab-appearance .button-grid button {
  min-height: 24px !important;
  padding: 4px 5px !important;
  font-size: 9.3px !important;
  border-radius: 4px !important;
}
#tab-appearance .collapsed-settings-head {
  margin-top: 4px !important;
  min-height: 24px !important;
}
#tab-appearance .collapsed-list {
  max-height: 116px !important;
  overflow: auto !important;
  gap: 3px !important;
  margin-top: 3px !important;
}
#tab-appearance .collapsed-item {
  padding: 4px 5px !important;
  border-radius: 4px !important;
  font-size: 9.3px !important;
}

/* Metadata field Tree and Compact controls are stacked, not side-by-side. */
.metadata-field-body {
  grid-template-columns: 1fr !important;
  gap: 4px !important;
  padding: 5px !important;
}
.metadata-field-column {
  padding: 5px 6px !important;
  gap: 3px !important;
}
.metadata-field-column > strong {
  margin-bottom: 1px;
}
.metadata-field-column > label:not(.check-row) {
  grid-template-columns: minmax(84px, 0.78fr) minmax(0, 1.22fr) !important;
}

/* Color/highlight controls use the same compact setting density. */
.metadata-color-compact {
  gap: 3px !important;
}
.metadata-color-compact .metadata-highlight-fields {
  gap: 4px !important;
  padding: 5px 6px !important;
  margin-top: 2px !important;
  border-radius: 4px !important;
}
.metadata-color-compact .field-caption {
  font-size: 9.3px !important;
  font-weight: 600 !important;
}
.metadata-color-compact .multi-select-dropdown {
  border-radius: 4px !important;
}
.metadata-color-compact .multi-select-dropdown > summary {
  min-height: 26px !important;
  padding: 4px 6px !important;
  font-size: 9.5px !important;
}
.metadata-color-compact .multi-select-options {
  max-height: 135px !important;
  padding: 3px !important;
}
.metadata-color-compact .multi-select-option {
  min-height: 24px !important;
  padding: 3px 4px !important;
  font-size: 9.3px !important;
  border-radius: 3px !important;
}
.metadata-color-compact .multi-select-option input {
  width: 13px !important;
  height: 13px !important;
}
.metadata-color-compact .multi-select-option small {
  font-size: 8.5px !important;
}
.metadata-color-compact .color-palette-editor {
  gap: 3px !important;
}
.metadata-color-compact .color-code-row {
  grid-template-columns: minmax(70px, 1fr) 30px 72px !important;
  gap: 4px !important;
}
.metadata-color-compact .color-code-row > span {
  font-size: 9.2px !important;
}
.metadata-color-compact .color-code-row input[type='color'] {
  width: 30px !important;
  height: 24px !important;
  border-radius: 3px !important;
}
.metadata-color-compact .color-code-row input[type='text'] {
  min-height: 24px !important;
  height: 24px !important;
  font-size: 8.8px !important;
  border-radius: 3px !important;
}

/* Tree-analysis global detail controls are intentionally distinct from section jump buttons. */
#expandPhyloSectionsBtn,
#collapsePhyloSectionsBtn {
  border-radius: 999px !important;
  padding-left: 10px !important;
  padding-right: 10px !important;
  font-weight: 550 !important;
}
#expandPhyloSectionsBtn {
  background: #f7f2fb !important;
  border-color: #d8c9e4 !important;
  color: #654d78 !important;
}
#collapsePhyloSectionsBtn {
  background: #f1f6f3 !important;
  border-color: #c7d8ce !important;
  color: #496457 !important;
}
#expandPhyloSectionsBtn:hover {
  background: #f1e8f7 !important;
  border-color: #c7b3d8 !important;
  color: #563e69 !important;
}
#collapsePhyloSectionsBtn:hover {
  background: #eaf2ed !important;
  border-color: #b7cbbf !important;
  color: #3d574a !important;
}

/* Auto width inputs must look like an unset/automatic value, not a forced minimum. */
.metadata-field-column input[data-k='tree-width']::placeholder,
.metadata-field-column input[data-k='compact-width']::placeholder {
  color: #7d8999;
  opacity: 1;
}
/* Keep field controls readable in the narrow Settings inspector without increasing overall density. */
.metadata-field-column > label:not(.check-row) {
  grid-template-columns: minmax(92px, 0.82fr) minmax(96px, 1.18fr) !important;
}
@media (max-width: 1180px) {
  .metadata-field-column > label:not(.check-row) {
    grid-template-columns: minmax(84px, 0.78fr) minmax(92px, 1.22fr) !important;
  }
}

:root {
  --active-tab-accent: #4b5563;
  --active-tab-accent-soft: #f3f4f6;
  --active-tab-accent-border: #cbd0d6;
}
.workspace-tab-group .view-tab.active,
.control-tab.active,
.project-tab.active {
  color: var(--active-tab-accent) !important;
  background: var(--active-tab-accent-soft) !important;
  border-color: var(--active-tab-accent-border) !important;
}
.workspace-tab-group-right .view-tab.active:before {
  background: var(--active-tab-accent) !important;
}
.workspace-tab-group-right .view-tab.active .ui-icon,
.control-tab.active .rail-icon,
.project-tab.active span {
  color: var(--active-tab-accent) !important;
}
.workspace-tab-group-right .view-tab.active {
  color: var(--active-tab-accent) !important;
  border-color: var(--active-tab-accent-border) !important;
}

.setting-note {
  margin: 3px 0 0;
  font-size: 9px;
  line-height: 1.25;
  color: #738095;
}
.settings-subsection-label {
  font-size: 9px;
  font-weight: 600;
  color: #56657a;
  text-transform: uppercase;
  letter-spacing: 0.035em;
}
.support-mode-hidden,
.is-layout-hidden {
  display: none !important;
}
#internalNodeShape,
#collapsedCladeShape,
#collapsedCladeLabel {
  min-width: 116px !important;
  width: 100% !important;
}

.settings-persistence-footer {
  padding: 5px 6px !important;
  gap: 5px !important;
  background: #f7f8f9 !important;
  border-top: 1px solid #e2e6ea !important;
}
.settings-persistence-footer button {
  min-height: 24px !important;
  height: 24px !important;
  padding: 2px 9px !important;
  border-radius: 9px !important;
  background: #eef0f2 !important;
  border: 1px solid #cbd1d7 !important;
  color: #485364 !important;
  font-weight: 500 !important;
  font-size: 9.5px !important;
  box-shadow: none !important;
}
.settings-persistence-footer button:hover {
  background: #e5e8eb !important;
}

.metadata-field-body {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 5px !important;
  padding: 5px !important;
}
.metadata-field-column.metadata-field-subsection {
  display: block !important;
  padding: 0 !important;
  border: 1px solid #e1e6ec !important;
  border-radius: 5px !important;
  background: #fbfcfd !important;
  overflow: hidden !important;
}
.metadata-field-column.metadata-field-subsection > summary {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  min-height: 25px !important;
  padding: 4px 7px !important;
  cursor: pointer !important;
  list-style: none !important;
  font-size: 9px !important;
  font-weight: 650 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.035em !important;
  color: #5c697b !important;
  background: #f5f7f9 !important;
}
.metadata-field-column.metadata-field-subsection > summary::-webkit-details-marker {
  display: none;
}
.metadata-field-column.metadata-field-subsection > summary:after {
  content: '›';
  font-size: 13px;
  transform: rotate(90deg);
  transition: transform 0.12s ease;
}
.metadata-field-column.metadata-field-subsection:not([open]) > summary:after {
  transform: rotate(0deg);
}
.metadata-field-subbody {
  display: grid;
  gap: 4px;
  padding: 6px;
}
.metadata-field-subbody > label:not(.check-row) {
  display: grid;
  grid-template-columns: minmax(88px, 0.8fr) minmax(100px, 1.2fr);
  align-items: center;
  gap: 6px;
  font-size: 9.5px;
  color: #45536a;
}
.metadata-field-subbody .check-row {
  font-size: 9.5px !important;
}
.metadata-field-subbody input,
.metadata-field-subbody select {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.color-code-row {
  grid-template-columns: minmax(0, 1fr) 30px minmax(66px, 76px) !important;
  gap: 5px !important;
  align-items: center !important;
}
.color-code-row > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.color-code-row input[type='text'] {
  min-width: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
  font-size: 9px !important;
  padding-left: 4px !important;
  padding-right: 4px !important;
}
.color-code-row input[type='color'] {
  width: 30px !important;
  min-width: 30px !important;
  padding: 1px !important;
}

.collapsed-node-list {
  max-height: 88px !important;
  overflow: auto !important;
  border: 1px solid #e2e7ed !important;
  border-radius: 5px !important;
  background: #fbfcfd !important;
  padding: 3px !important;
}
#collapsedNodeList .node-edit-row {
  padding: 3px 4px !important;
  min-height: 24px !important;
}
#expandAllNodesBtn {
  min-height: 25px !important;
  height: 25px !important;
  border-radius: 7px !important;
  padding: 2px 8px !important;
  background: #f0f2f4 !important;
  border-color: #cdd3d9 !important;
  color: #4c596b !important;
}

/*
 * Source section 23/53: export figure options settings subsection.
 * Assembles into styles/base.css.
 * Rules remain in their original cascade order; later sections may intentionally override these
 * declarations.
 */
.export-figure-options .settings-subsection {
  margin-top: 5px;
}
.metadata-compact-presentation > summary {
  font-weight: 600;
}

body.ui-comfortable .settings-compact-body {
  gap: 8px !important;
  padding: 8px 9px !important;
}
body.ui-comfortable .settings-primary {
  padding: 8px !important;
}
body.ui-comfortable .settings-module-head {
  min-height: 34px !important;
  padding-top: 6px !important;
  padding-bottom: 6px !important;
}
body.ui-comfortable .canvas-action-strip button,
body.ui-comfortable .metadata-action-bar button,
body.ui-comfortable .cluster-action-bar button {
  min-height: 29px !important;
}
body.ui-comfortable .metadata-grid th,
body.ui-comfortable .metadata-grid td {
  padding-top: 7px !important;
  padding-bottom: 7px !important;
}
body.ui-comfortable .workspace-tab-group .view-tab {
  padding-top: 7px !important;
  padding-bottom: 7px !important;
}

#compactCircularControls {
  display: grid;
}
#compactCircularControls.is-layout-hidden {
  display: none !important;
}
#compactArcField.is-layout-hidden {
  display: none !important;
}
#collapsedList {
  max-height: 88px !important;
  overflow: auto !important;
  border: 1px solid #e2e7ed !important;
  border-radius: 5px !important;
  background: #fbfcfd !important;
  padding: 3px !important;
}
#collapsedList .node-edit-row,
#collapsedList > div {
  padding: 3px 4px !important;
  min-height: 22px !important;
}
#expandAllBtn {
  min-height: 25px !important;
  height: 25px !important;
  border-radius: 7px !important;
  padding: 2px 8px !important;
  background: #f0f2f4 !important;
  border-color: #cdd3d9 !important;
  color: #4c596b !important;
}

.view-tab.active,
.workspace-tab-group .view-tab.active,
.workspace-tab-group-right .view-tab.active,
.control-tab.active,
.project-tab.active {
  color: var(--active-tab-accent) !important;
  background: var(--active-tab-accent-soft) !important;
  border-color: var(--active-tab-accent-border) !important;
}
.view-tab.active:before,
.workspace-tab-group .view-tab.active:before,
.workspace-tab-group-right .view-tab.active:before {
  background: var(--active-tab-accent) !important;
}
.view-tab.active .ui-icon,
.workspace-tab-group .view-tab.active .ui-icon,
.workspace-tab-group-right .view-tab.active .ui-icon {
  color: var(--active-tab-accent) !important;
}
.control-tab.active .rail-icon,
.project-tab.active span {
  color: var(--active-tab-accent) !important;
  background: #e5e7eb !important;
  border-color: #c7ccd2 !important;
}

.cluster-analytics-section {
  margin-top: 10px;
  padding: 10px 12px 14px;
  border-top: 1px solid #d9e2ee;
  background: linear-gradient(180deg, #fbfdff 0%, #f6f9fd 100%);
}
.cluster-analytics-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.cluster-analytics-header strong {
  display: block;
  font-size: 14px;
  color: #22344d;
}
.cluster-analytics-header span {
  display: block;
  font-size: 10px;
  color: #67768c;
  margin-top: 2px;
}
.cluster-analytics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 10px;
  align-items: start;
}
.cluster-analytics-card {
  background: #fff;
  border: 1px solid #d8e1ed;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(31, 55, 88, 0.05);
  overflow: hidden;
}
.cluster-analytics-card h4 {
  margin: 0;
  padding: 8px 10px;
  border-bottom: 1px solid #e3e8f0;
  background: #f5f8fc;
  font-size: 12px;
  color: #24364f;
}
.cluster-analytics-body {
  padding: 9px 10px 10px;
}
.cluster-analytics-note {
  margin-top: 8px;
  font-size: 10px;
  line-height: 1.45;
  color: #5f6e83;
}
.cluster-analytics-card svg {
  width: 100%;
  height: auto;
  display: block;
}
.cluster-mini-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10px;
  color: #2a3950;
}
.cluster-mini-table th,
.cluster-mini-table td {
  padding: 5px 6px;
  border: 1px solid #dce3ee;
  text-align: left;
  vertical-align: top;
}
.cluster-mini-table th {
  background: #eef3f8;
  font-weight: 700;
}
.cluster-stat-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 10px;
  font-size: 10px;
  color: #2f4058;
  align-items: start;
}
.cluster-stat-grid div:nth-child(odd) {
  color: #617187;
}
.cluster-stat-grid div:nth-child(even) {
  font-weight: 700;
  text-align: right;
  color: #233650;
}
.cluster-empty-card {
  padding: 12px;
  font-size: 10px;
  color: #66758a;
  background: #fff;
  border: 1px dashed #cdd8e6;
  border-radius: 8px;
}
.cluster-analytics-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}
.cluster-legend-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 7px;
  font-size: 9.5px;
  color: #44546a;
}
.cluster-legend-inline span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.cluster-legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  display: inline-block;
  border: 1px solid rgba(0, 0, 0, 0.12);
}
@media (max-width: 900px) {
  .cluster-analytics-grid {
    grid-template-columns: 1fr;
  }
}

.metadata-field-peer-sections {
  display: flex !important;
  flex-direction: column !important;
  gap: 5px !important;
  max-height: none !important;
  overflow: visible !important;
  padding: 0 !important;
}
.metadata-field-peer.settings-compact-section {
  margin: 0 !important;
  border: 1px solid #dbe2eb !important;
  border-radius: 5px !important;
  background: #fff !important;
  overflow: hidden !important;
}
.metadata-field-peer > summary {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 8px !important;
  min-height: 30px !important;
  padding: 5px 8px !important;
  background: #f3f5f8 !important;
  color: #344259 !important;
}
.metadata-field-peer > summary:after {
  grid-column: 3 !important;
}
.metadata-field-peer > summary small {
  font-size: 8.5px !important;
  color: #7a8797 !important;
  white-space: nowrap !important;
}
.metadata-field-peer .metadata-field-title {
  font-size: 10.5px !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
.metadata-field-peer .metadata-field-body {
  display: flex !important;
  flex-direction: column !important;
  gap: 7px !important;
  padding: 7px !important;
  background: #fff !important;
}
.metadata-field-block {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 4px !important;
  padding: 6px !important;
  border: 1px solid #e2e7ee !important;
  border-radius: 5px !important;
  background: #fbfcfd !important;
}
.metadata-field-block-title {
  font-size: 9px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
  color: #637085 !important;
  padding-bottom: 2px !important;
  border-bottom: 1px solid #e9edf2 !important;
  margin-bottom: 1px !important;
}
.metadata-field-block > label:not(.check-row) {
  display: grid !important;
  grid-template-columns: minmax(90px, 0.78fr) minmax(110px, 1.22fr) !important;
  align-items: center !important;
  gap: 6px !important;
  font-size: 9.5px !important;
  color: #45536a !important;
  margin: 0 !important;
}
.metadata-field-block .check-row {
  font-size: 9.5px !important;
  margin: 0 !important;
}
.metadata-field-block input,
.metadata-field-block select {
  min-width: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
.metadata-field-reset-row {
  padding: 6px 0 2px !important;
}
.metadata-field-reset-row .wide-btn {
  min-height: 26px !important;
  height: 26px !important;
  border-radius: 7px !important;
  background: #f0f2f4 !important;
  border-color: #ccd3dc !important;
  color: #4b5869 !important;
}

#clustersView.data-grid-workspace {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  overscroll-behavior: contain !important;
  flex-direction: column !important;
}
#clustersView > .data-summary-strip,
#clustersView > .data-grid-toolbar,
#clustersView > .filter-chip-row {
  flex: 0 0 auto !important;
}
#clustersView .clustering-grid-main {
  flex: 0 0 clamp(300px, 48vh, 520px) !important;
  min-height: 300px !important;
  max-height: 520px !important;
  overflow: hidden !important;
  background: #fff !important;
}
#clustersView .cluster-analytics-section {
  position: relative !important;
  inset: auto !important;
  z-index: auto !important;
  flex: 0 0 auto !important;
  width: auto !important;
  min-height: auto !important;
  margin: 10px 0 0 !important;
  box-sizing: border-box !important;
}
#clustersView .cluster-analytics-grid {
  position: static !important;
  inset: auto !important;
  width: auto !important;
  min-height: 0 !important;
}
#clustersView .columns-popover {
  position: fixed !important;
}
.workspace-document-area.split-mode > #clustersView.split-secondary.data-grid-workspace {
  overflow-y: auto !important;
  overflow-x: hidden !important;
}
.workspace-document-area.split-mode > #clustersView .clustering-grid-main {
  flex-basis: clamp(280px, 44vh, 440px) !important;
  min-height: 280px !important;
  max-height: 440px !important;
}
@media (max-height: 760px) {
  #clustersView .clustering-grid-main {
    flex-basis: 320px !important;
    max-height: 320px !important;
  }
}

.cluster-analytics-card {
  position: relative;
}
.cluster-analytics-card h4 {
  padding-right: 42px;
}
.cluster-popout-btn {
  position: absolute;
  top: 5px;
  right: 7px;
  width: 28px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: #42536a;
  cursor: pointer;
  z-index: 2;
}
.cluster-popout-btn:hover {
  background: #eef3f8;
  border-color: #aebdce;
  color: #21344e;
}
.cluster-popout-btn svg {
  width: 16px;
  height: 16px;
  display: block;
}
.cluster-figure-modal {
  width: min(1180px, 96vw);
  max-height: 94vh;
  padding: 14px;
  overflow: hidden;
}
.cluster-figure-modal-head {
  padding: 2px 2px 10px;
  border-bottom: 1px solid #e0e6ee;
}
.cluster-figure-modal-head h2 {
  font-size: 17px;
  color: #22344d;
}
.cluster-figure-modal-body {
  max-height: calc(94vh - 76px);
  overflow: auto;
  padding: 14px 8px 8px;
  background: #fff;
}
.cluster-figure-modal-body .cluster-analytics-body {
  padding: 0;
}
.cluster-figure-modal-body svg {
  width: 100%;
  max-height: 72vh;
  height: auto;
}
.cluster-figure-modal-body .cluster-mini-table {
  font-size: 12px;
}
.cluster-figure-modal-body .cluster-stat-grid {
  font-size: 12px;
}
.cluster-figure-modal-body .cluster-analytics-note {
  font-size: 11px;
}

#clustersView.data-grid-workspace:not(.active):not(.split-primary):not(.split-secondary) {
  display: none !important;
}
#clustersView.data-grid-workspace.active,
#clustersView.data-grid-workspace.split-primary,
#clustersView.data-grid-workspace.split-secondary {
  display: flex !important;
}

.cluster-interpretation {
  margin: 0 0 10px;
  border: 1px solid #d7e0eb;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(31, 55, 88, 0.04);
}
.cluster-interpretation-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-bottom: 1px solid #e2e8f0;
  background: #f3f6fa;
}
.cluster-interpretation-head strong {
  font-size: 12px;
  color: #24364f;
  letter-spacing: 0.02em;
}
.cluster-interpretation-evidence {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  border-bottom: 1px solid #e5eaf1;
}
.cluster-interpretation-metric {
  padding: 8px 10px;
  border-right: 1px solid #e5eaf1;
  min-width: 0;
}
.cluster-interpretation-metric:last-child {
  border-right: 0;
}
.cluster-interpretation-metric span {
  display: block;
  font-size: 9px;
  color: #6d7b8e;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.cluster-interpretation-metric strong {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: #263950;
  font-weight: 650;
  white-space: normal;
  overflow-wrap: anywhere;
}
/*
 * Source section 24/53: cluster interpretation body.
 * Assembles into styles/base.css.
 * Rules remain in their original cascade order; later sections may intentionally override these
 * declarations.
 */
.cluster-interpretation-body {
  padding: 10px 11px 11px;
  font-size: 10.5px;
  line-height: 1.55;
  color: #34445b;
}
.cluster-interpretation-body p {
  margin: 0 0 7px;
}
.cluster-interpretation-body p:last-child {
  margin-bottom: 0;
}
.cluster-interpretation-disclaimer {
  padding-top: 7px;
  border-top: 1px solid #e7ebf1;
  color: #66758a;
  font-style: italic;
}
@media (max-width: 900px) {
  .cluster-interpretation-evidence {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cluster-interpretation-metric {
    border-bottom: 1px solid #e5eaf1;
  }
}

.cluster-interpretation-section {
  margin-top: 10px;
  padding: 10px 12px 12px;
  border-top: 1px solid #d9e2ee;
  border-bottom: 1px solid #d9e2ee;
  background: #f8fafc;
}
.cluster-interpretation-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}
.cluster-interpretation-header strong {
  font-size: 12px;
  letter-spacing: 0.035em;
  color: #25364d;
}
.cluster-interpretation-header span {
  font-size: 9.8px;
  color: #6d7a8d;
}
.cluster-interpretation-body {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.cluster-interpretation-evidence {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.cluster-evidence-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 6px 8px;
  border: 1px solid #dce4ed;
  border-radius: 5px;
  background: #fff;
  font-size: 9.8px;
  color: #56667c;
}
.cluster-evidence-item strong {
  font-size: 10px;
  color: #25364d;
  font-weight: 650;
  text-align: right;
}
.cluster-evidence-item small {
  display: block;
  color: #7a8798;
  font-size: 8.7px;
  font-weight: 400;
  margin-top: 1px;
}
.cluster-interpretation-text {
  margin: 0;
  font-size: 10.4px;
  line-height: 1.55;
  color: #34455d;
}
.cluster-interpretation-disclaimer {
  margin: 0;
  padding-top: 7px;
  border-top: 1px solid #e0e6ee;
  font-size: 9.8px;
  line-height: 1.45;
  color: #68778a;
  font-style: italic;
}
@media (max-width: 1000px) {
  .cluster-interpretation-evidence {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 700px) {
  .cluster-interpretation-evidence {
    grid-template-columns: 1fr;
  }
  .cluster-interpretation-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }
}

.outbreak-figure-grid.cluster-analytics-grid {
  padding: 0 9px;
  margin-top: 9px;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 10px;
}
.outbreak-analytics-card {
  position: relative;
  min-width: 0;
  background: #fff;
  border: 1px solid #d8e1ed;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(31, 55, 88, 0.05);
  overflow: hidden;
}
.outbreak-analytics-card h4 {
  margin: 0;
  padding: 8px 78px 8px 10px;
  border-bottom: 1px solid #e3e8f0;
  background: #f5f8fc;
  font-size: 12px;
  color: #24364f;
}
.outbreak-analytics-card .cluster-analytics-body {
  padding: 9px 10px 10px;
}
.outbreak-figure-subtitle {
  min-height: 16px;
  margin: 0 0 5px;
  font-size: 10px;
  line-height: 1.4;
  color: #67768c;
}
.outbreak-analytics-card .outbreak-plot {
  min-height: 190px;
  padding: 3px 0 0;
  overflow: auto;
  background: #fff;
}
.outbreak-card-actions {
  position: absolute;
  top: 5px;
  right: 7px;
  display: flex;
  align-items: center;
  gap: 4px;
  z-index: 3;
}
.outbreak-card-actions button {
  width: 28px;
  height: 26px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: #42536a;
  cursor: pointer;
}
.outbreak-card-actions button:hover {
  background: #eef3f8;
  border-color: #aebdce;
  color: #21344e;
}
.outbreak-card-actions .ui-icon {
  width: 15px;
  height: 15px;
}
.double-window-icon {
  position: relative;
  width: 16px;
  height: 16px;
  display: block;
}
.double-window-icon:before,
.double-window-icon:after {
  content: '';
  position: absolute;
  width: 9px;
  height: 9px;
  border: 1.5px solid currentColor;
  border-radius: 1.5px;
  background: #fff;
  box-sizing: border-box;
}
.double-window-icon:before {
  left: 1px;
  top: 1px;
}
.double-window-icon:after {
  left: 6px;
  top: 6px;
}
.outbreak-modal-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
}
.outbreak-modal-actions .mini-btn {
  height: 27px;
  min-height: 27px;
  padding: 2px 9px;
  border-radius: 5px;
  background: #f5f7fa;
  border: 1px solid #cbd5e1;
  color: #33465f;
  font-size: 10px;
  font-weight: 600;
}
.outbreak-figure-modal-body .outbreak-plot {
  min-height: 300px;
  overflow: auto;
}
.outbreak-figure-modal-body .outbreak-chart-svg {
  width: 100%;
  height: auto;
  max-height: 72vh;
}
.workspace-document-area.split-mode .outbreak-figure-grid.cluster-analytics-grid {
  grid-template-columns: 1fr !important;
}

#clusterInterpretationSection.cluster-interpretation-section {
  margin-top: 10px;
  padding: 12px 14px 13px;
  border: 1px solid #bfd8ee;
  border-left: 4px solid #74a9d6;
  border-radius: 0;
  background: #eaf4ff;
  box-shadow: none;
}
#clusterInterpretationSection .cluster-interpretation-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
#clusterInterpretationSection .cluster-interpretation-header strong {
  font-size: 13px;
  letter-spacing: 0.035em;
  color: #173b5d;
}
#clusterInterpretationSection .cluster-interpretation-header span {
  font-size: 11px;
  color: #506f8c;
}
#clusterInterpretationSection .cluster-interpretation-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0;
  font-size: 12px;
  line-height: 1.55;
  color: #243f58;
}
.cluster-interpretation-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid #c9dff1;
}
.cluster-evidence-row {
  display: grid;
  grid-template-columns: minmax(130px, 0.75fr) minmax(90px, 0.45fr) minmax(180px, 1.8fr);
  gap: 10px;
  align-items: baseline;
  padding: 7px 2px;
  border-bottom: 1px solid #c9dff1;
  background: transparent;
}
.cluster-evidence-name {
  font-size: 11.5px;
  font-weight: 650;
  color: #274963;
}
.cluster-evidence-status {
  font-size: 11.5px;
  font-weight: 700;
  color: #173b5d;
}
.cluster-evidence-detail {
  font-size: 11px;
  color: #5a7187;
}
#clusterInterpretationSection .cluster-interpretation-text {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: #203b54;
}
#clusterInterpretationSection .cluster-interpretation-disclaimer {
  margin: 0;
  padding-top: 8px;
  border-top: 1px solid #c9dff1;
  font-size: 11px;
  line-height: 1.5;
  color: #5c7185;
  font-style: italic;
}
@media (max-width: 760px) {
  .cluster-evidence-row {
    grid-template-columns: minmax(110px, 0.8fr) minmax(90px, 0.6fr);
    gap: 5px 10px;
  }
  .cluster-evidence-detail {
    grid-column: 1/-1;
    padding-left: 0;
  }
}

@container (max-width:760px) {
  #metadataView .data-action-strip,
  #clustersView .data-action-strip {
    min-height: 78px !important;
    max-height: 82px !important;
    height: auto !important;
    padding: 5px 8px 17px !important;
    box-sizing: border-box !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scrollbar-width: auto !important;
    scrollbar-gutter: stable !important;
    align-content: start !important;
  }
}
@container (max-width:470px) {
  #metadataView .data-action-strip,
  #clustersView .data-action-strip {
    min-height: 78px !important;
    max-height: 82px !important;
    padding-bottom: 17px !important;
  }
}

body.controls-collapsed .right-panel {
  overflow: visible !important;
}
body.controls-collapsed .settings-inspector {
  overflow: visible !important;
}
body.controls-collapsed .settings-tab-rail {
  align-items: center !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}
body.controls-collapsed .settings-tab-rail .control-tab {
  width: calc(100% - 6px) !important;
  min-width: 0 !important;
  max-width: 42px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box !important;
  overflow: visible !important;
}
body.controls-collapsed .settings-slide-handle {
  max-width: 34px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box !important;
}
#documentationBtn .ui-icon {
  width: 14px;
  height: 14px;
}

.tree-toolbar-icon-btn {
  width: 30px !important;
  min-width: 30px !important;
  height: 28px !important;
  padding: 0 !important;
  display: inline-grid !important;
  place-items: center !important;
  border-radius: 5px !important;
}
.tree-toolbar-icon-btn .ui-icon {
  width: 16px !important;
  height: 16px !important;
}
.scaling-action-btn .ui-icon {
  width: 17px !important;
  height: 17px !important;
}
.tree-scaling-popover {
  width: 192px !important;
  min-width: 192px !important;
  max-width: 192px !important;
  padding: 6px !important;
}
.tree-scaling-popover .compact-popover-head {
  padding-bottom: 5px !important;
  margin-bottom: 3px !important;
}
.tree-scaling-popover .columns-panel-head strong {
  font-size: 11px !important;
}
.tree-scaling-popover .scaling-popover-grid {
  grid-template-columns: 54px 24px 42px 24px !important;
  gap: 3px !important;
  padding: 4px 2px 6px !important;
}
.tree-scaling-popover .scaling-popover-grid > span {
  font-size: 9.5px !important;
}
.tree-scaling-popover .scaling-popover-grid strong {
  font-size: 9.8px !important;
}
.tree-scaling-popover .scaling-popover-grid button {
  height: 23px !important;
  min-height: 23px !important;
  padding: 0 !important;
}
.tree-scaling-popover .compact-scale-reset {
  height: 25px !important;
  min-height: 25px !important;
  padding: 2px 7px !important;
  font-size: 9.5px !important;
}
.tree-columns-popover {
  width: 300px !important;
  min-width: 260px !important;
  max-width: min(300px, calc(100vw - 20px)) !important;
}
.tree-columns-popover .columns-head-row,
.tree-columns-popover .columns-row {
  grid-template-columns: minmax(145px, 1fr) 52px 64px !important;
}
.metadata-only-columns {
  width: 660px !important;
  max-width: min(660px, calc(100vw - 20px)) !important;
}
.metadata-only-columns .columns-head-row,
.metadata-only-columns .columns-row {
  grid-template-columns: minmax(90px, 1fr) 46px 70px 110px !important;
}
.metadata-only-columns .columns-panel-head span,
.tree-columns-popover .columns-panel-head span {
  font-size: 9.5px !important;
}

#clusterInterpretationSection.cluster-interpretation-section {
  margin: 8px 10px 0 !important;
  padding: 11px 12px 12px !important;
  border: 1px solid #b9d5eb !important;
  border-radius: 8px !important;
  background: #eaf4ff !important;
  box-shadow: none !important;
  overflow: hidden !important;
}
#clusterInterpretationSection .cluster-interpretation-header {
  display: block !important;
  margin: 0 0 7px !important;
}
#clusterInterpretationSection .cluster-interpretation-header strong {
  font-size: 12px !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  color: #203b54 !important;
  font-weight: 700 !important;
}
#clusterInterpretationSection .cluster-interpretation-body {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  padding: 0 !important;
  font-size: 10px !important;
  line-height: 1.45 !important;
  color: #243f58 !important;
}
#clusterInterpretationSection .cluster-interpretation-text {
  order: 1;
  margin: 0 !important;
  font-size: 10.5px !important;
  line-height: 1.5 !important;
  color: #243f58 !important;
}
#clusterInterpretationSection .cluster-interpretation-table {
  order: 2;
  margin: 0 !important;
  border-collapse: collapse !important;
  width: 100% !important;
  font-size: 10px !important;
  background: #f5faff !important;
}
/*
 * Source section 25/53: cluster interpretation section cluster interpretation table th.
 * Assembles into styles/base.css.
 * Rules remain in their original cascade order; later sections may intentionally override these
 * declarations.
 */
#clusterInterpretationSection .cluster-interpretation-table th,
#clusterInterpretationSection .cluster-interpretation-table td {
  padding: 5px 6px !important;
  border: 1px solid #c8deef !important;
  vertical-align: top !important;
  white-space: normal !important;
}
#clusterInterpretationSection .cluster-interpretation-table th {
  background: #dceeff !important;
  color: #314a62 !important;
  font-weight: 700 !important;
}
#clusterInterpretationSection .cluster-interpretation-table td {
  background: #f4f9ff !important;
  color: #334b62 !important;
}
#clusterInterpretationSection .cluster-interpretation-table td:nth-child(2) {
  width: 120px !important;
  font-weight: 700 !important;
  color: #203b54 !important;
}
#clusterInterpretationSection .cluster-interpretation-disclaimer {
  order: 3;
  margin: 0 !important;
  padding-top: 7px !important;
  border-top: 1px solid #c8deef !important;
  font-size: 9.8px !important;
  line-height: 1.45 !important;
  color: #60778b !important;
  font-style: italic !important;
}

/* The interpretation follows the table/inspector in normal flow and moves down when the inspector opens. */
#clustersView .clustering-grid-main:has(#clusterInspector:not(.is-collapsed)) {
  flex-basis: clamp(390px, 58vh, 620px) !important;
  max-height: 620px !important;
}
.workspace-document-area.split-mode
  > #clustersView
  .clustering-grid-main:has(#clusterInspector:not(.is-collapsed)) {
  flex-basis: clamp(340px, 52vh, 520px) !important;
  max-height: 520px !important;
}

#clustersView .cluster-analytics-section {
  padding-top: 8px !important;
}
#clustersView .cluster-analytics-header {
  margin-bottom: 8px !important;
}
#clustersView .cluster-analytics-header strong {
  font-size: 12px !important;
  color: #25364d !important;
}
.cluster-analytics-card h4 {
  padding-right: 76px !important;
}
.cluster-card-actions {
  position: absolute;
  top: 5px;
  right: 7px;
  display: flex;
  align-items: center;
  gap: 4px;
  z-index: 3;
}
.cluster-card-actions .cluster-popout-btn,
.cluster-card-actions .cluster-download-btn {
  position: static !important;
  top: auto !important;
  right: auto !important;
  width: 27px !important;
  height: 25px !important;
  display: grid !important;
  place-items: center !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 6px !important;
  background: #fff !important;
  color: #42536a !important;
  cursor: pointer !important;
  padding: 0 !important;
}
.cluster-card-actions .cluster-popout-btn:hover,
.cluster-card-actions .cluster-download-btn:hover {
  background: #eef3f8 !important;
  border-color: #aebdce !important;
  color: #21344e !important;
}
.cluster-card-actions .cluster-popout-btn svg,
.cluster-card-actions .cluster-download-btn svg {
  width: 15px !important;
  height: 15px !important;
  display: block !important;
}
.cluster-modal-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}
.cluster-modal-actions .mini-btn {
  height: 27px;
  min-height: 27px;
  padding: 2px 9px;
  border-radius: 5px;
  background: #f5f7fa;
  border: 1px solid #cbd5e1;
  color: #33465f;
  font-size: 10px;
  font-weight: 600;
}

.columns-popover.global-floating-panel.tree-scaling-popover {
  width: 192px !important;
  min-width: 192px !important;
  max-width: 192px !important;
}
.columns-popover.global-floating-panel.tree-columns-popover {
  width: 300px !important;
  min-width: 260px !important;
  max-width: min(300px, calc(100vw - 20px)) !important;
}
.columns-popover.global-floating-panel.metadata-only-columns {
  width: 660px !important;
  max-width: min(660px, calc(100vw - 20px)) !important;
}
.tree-columns-popover .columns-head-row,
.tree-columns-popover .columns-row {
  grid-template-columns: minmax(165px, 1fr) 52px !important;
}

#clustersView > #clusterInterpretationSection.cluster-interpretation-section {
  flex: 0 0 auto !important;
  flex-shrink: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
}
#clustersView > #clusterInterpretationSection .cluster-interpretation-body {
  flex: 0 0 auto !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
}

.compact-columns-popover {
  width: 300px !important;
  min-width: 260px !important;
  max-width: min(300px, calc(100vw - 20px)) !important;
}
.compact-columns-popover .columns-head-row,
.compact-columns-popover .columns-row {
  grid-template-columns: minmax(165px, 1fr) 52px !important;
}
.compact-scaling-popover {
  width: 192px !important;
  min-width: 192px !important;
  max-width: 192px !important;
  padding: 6px !important;
}
.compact-scaling-popover .compact-popover-head {
  padding-bottom: 5px !important;
  margin-bottom: 3px !important;
}
.compact-scaling-popover .columns-panel-head strong {
  font-size: 11px !important;
}
.compact-scaling-popover .scaling-popover-grid {
  grid-template-columns: 54px 24px 42px 24px !important;
  gap: 3px !important;
  padding: 4px 2px 6px !important;
}
.compact-scaling-popover .scaling-popover-grid > span {
  font-size: 9.5px !important;
}
.compact-scaling-popover .scaling-popover-grid strong {
  font-size: 9.8px !important;
}
.compact-scaling-popover .scaling-popover-grid button {
  height: 23px !important;
  min-height: 23px !important;
  padding: 0 !important;
}
.compact-scaling-popover .compact-scale-reset {
  height: 25px !important;
  min-height: 25px !important;
  padding: 2px 7px !important;
  font-size: 9.5px !important;
}
.columns-popover.global-floating-panel.compact-scaling-popover {
  width: 192px !important;
  min-width: 192px !important;
  max-width: 192px !important;
}
.columns-popover.global-floating-panel.compact-columns-popover {
  width: 300px !important;
  min-width: 260px !important;
  max-width: min(300px, calc(100vw - 20px)) !important;
}

#clusterInterpretationSection .cluster-interpretation-text strong {
  font-weight: 750 !important;
  color: #173b5d !important;
}
#clusterInterpretationSection .cluster-interpretation-table-wrap {
  order: 2;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  border-radius: 5px;
  scrollbar-gutter: stable;
}
#clusterInterpretationSection .cluster-interpretation-table {
  table-layout: fixed !important;
  min-width: 0 !important;
}
#clusterInterpretationSection .cluster-interpretation-table th:nth-child(1) {
  width: 14% !important;
}
#clusterInterpretationSection .cluster-interpretation-table th:nth-child(2) {
  width: 14% !important;
}
#clusterInterpretationSection .cluster-interpretation-table th:nth-child(3) {
  width: 19% !important;
}
#clusterInterpretationSection .cluster-interpretation-table th:nth-child(4) {
  width: 25% !important;
}
#clusterInterpretationSection .cluster-interpretation-table th:nth-child(5) {
  width: 28% !important;
}
#clusterInterpretationSection .cluster-interpretation-table td:nth-child(2) {
  width: auto !important;
}
#clusterInterpretationSection .cluster-interpretation-table th,
#clusterInterpretationSection .cluster-interpretation-table td {
  overflow-wrap: anywhere !important;
  word-break: normal !important;
}
@media (max-width: 760px) {
  #clusterInterpretationSection .cluster-interpretation-table {
    min-width: 720px !important;
    table-layout: fixed !important;
  }
  #clusterInterpretationSection .cluster-interpretation-table-wrap {
    padding-bottom: 4px;
  }
}

.outbreak-summary-strip {
  overflow-x: visible !important;
  overflow-y: visible !important;
  white-space: normal !important;
  flex-wrap: wrap !important;
  align-content: center !important;
  gap: 5px 0 !important;
  height: auto !important;
  min-height: 40px !important;
  padding: 6px 10px !important;
}
.outbreak-summary-strip > span {
  flex: 1 1 185px !important;
  min-width: 165px !important;
  height: auto !important;
  min-height: 28px !important;
  padding: 3px 12px !important;
  white-space: normal !important;
  line-height: 1.25 !important;
}
.outbreak-summary-strip > span:first-child {
  padding-left: 4px !important;
}
.outbreak-summary-strip small {
  white-space: normal !important;
  line-height: 1.25 !important;
}
@media (max-width: 760px) {
  .outbreak-summary-strip > span {
    flex-basis: calc(50% - 1px) !important;
    min-width: 145px !important;
  }
}
@media (max-width: 460px) {
  .outbreak-summary-strip > span {
    flex-basis: 100% !important;
    border-right: 0 !important;
    border-bottom: 1px solid #d5dee8 !important;
    padding: 5px 4px !important;
  }
  .outbreak-summary-strip > span:last-child {
    border-bottom: 0 !important;
  }
}

.menu-choice-mark {
  float: right;
  margin-left: 18px;
  opacity: 0;
  color: #315fbb;
  font-weight: 900;
}
.active-menu-choice .menu-choice-mark {
  opacity: 1;
}
.active-menu-choice {
  background: #edf3ff !important;
  color: #244b9e !important;
  font-weight: 700 !important;
}

/* Colorful scientific mode. The neutral restrained appearance remains available from View > Interface color. */
body.ui-colorful {
  --bg: #edf3f9;
  --panel-2: #f7faff;
  --accent: #315fc4;
  --accent-soft: #e8efff;
  --accent-2: #7456c8;
  --border: #d6e0eb;
  --border-strong: #bdcad9;
}
body.ui-colorful .topbar {
  background: linear-gradient(180deg, #fbfdff 0%, #edf4fb 100%) !important;
  border-bottom-color: #c8d7e5 !important;
}
body.ui-colorful .brand-mark {
  background: linear-gradient(135deg, #315fc4 0%, #2e8b78 52%, #7456c8 100%) !important;
  box-shadow: 0 2px 7px rgba(49, 95, 196, 0.2);
}
body.ui-colorful .version-badge {
  background: #e8f1ff !important;
  border-color: #c5d8f1 !important;
  color: #315b91 !important;
}
body.ui-colorful .menubar {
  background: transparent !important;
}
body.ui-colorful .menu-trigger:hover,
body.ui-colorful .menu-trigger[aria-expanded='true'] {
  background: #e4eef9 !important;
  color: #234f83 !important;
}
body.ui-colorful .interaction-switch {
  background: #f3f8fb !important;
  border-color: #c5d5e2 !important;
}
body.ui-colorful .workspace-grid {
  background: linear-gradient(135deg, #edf4fa 0%, #f3f6fa 45%, #eef4f7 100%) !important;
}
body.ui-colorful .project-inspector {
  border-color: #c9d8df !important;
  box-shadow: 0 2px 8px rgba(52, 84, 102, 0.06);
}
body.ui-colorful .project-tab-rail {
  background: linear-gradient(180deg, #eaf6f2 0%, #edf3fb 100%) !important;
  border-right-color: #c8d9d5 !important;
}
body.ui-colorful .project-tab.active {
  color: #176b5a !important;
  box-shadow: inset -3px 0 0 #2f8d78 !important;
}
body.ui-colorful .project-tab.active span {
  border-color: #9bcaba !important;
  background: #e9f7f2 !important;
}
body.ui-colorful .project-page-titlebar {
  background: linear-gradient(90deg, #edf8f4 0%, #f5f9fd 100%) !important;
  border-bottom-color: #d0dfda !important;
}
body.ui-colorful .project-tree-example {
  background: #f8fbff !important;
  border-color: #cedbe8 !important;
}
body.ui-colorful .project-tree-example > summary {
  background: #edf5fb !important;
  color: #31536f !important;
}
body.ui-colorful .example-project-open {
  color: #3157a6 !important;
}
body.ui-colorful .example-project-open:hover {
  background: #e7f0ff !important;
}
body.ui-colorful .dual-workspace-tabs {
  background: #dfe8f0 !important;
  border-bottom-color: #b9c9d7 !important;
}
body.ui-colorful .workspace-tab-group-left {
  background: linear-gradient(180deg, #e9f3ff, #eef5fb) !important;
}
body.ui-colorful .workspace-tab-group-right {
  background: linear-gradient(180deg, #f1edff, #eef4fb) !important;
  border-left-color: #c8c8df !important;
}
body.ui-colorful .workspace-tab-group-left .view-tab.active {
  background: #ffffff !important;
  color: #285f93 !important;
  border-color: #a9c6df !important;
}
body.ui-colorful .workspace-tab-group-left .view-tab.active:before {
  background: #4c8dc2 !important;
}
body.ui-colorful .workspace-tab-group-right .view-tab.active {
  background: #ffffff !important;
  color: #654899 !important;
  border-color: #c8b9df !important;
}
body.ui-colorful .workspace-tab-group-right .view-tab.active:before {
  background: #8a69bd !important;
}
body.ui-colorful .workspace-tab-group-right .view-tab.active .ui-icon {
  color: #7855ac !important;
}
body.ui-colorful .plot-header {
  background: linear-gradient(90deg, #ffffff 0%, #f4f8ff 60%, #f5fbf8 100%) !important;
  border-bottom-color: #d2dce7 !important;
}
body.ui-colorful .canvas-action-strip {
  background: #f5f9fc !important;
  border-bottom-color: #d3dfe8 !important;
}
body.ui-colorful .data-summary-strip:not(.outbreak-summary-strip) {
  background: #edf4fb !important;
  border-bottom-color: #cfdae6 !important;
}
body.ui-colorful .outbreak-summary-strip {
  background: linear-gradient(90deg, #edf7fb, #eef5ff) !important;
  border-color: #c8dae7 !important;
}
body.ui-colorful .analysis-surface {
  background: linear-gradient(180deg, #f2f6fa 0%, #eef4f8 100%) !important;
}
body.ui-colorful .analysis-section-title {
  background: linear-gradient(90deg, #f5f8ff, #f2f8f6) !important;
  border-bottom-color: #d5dfe7 !important;
}
body.ui-colorful .cluster-analytics-card {
  border-color: #d1dce9 !important;
  box-shadow: 0 1px 3px rgba(56, 76, 102, 0.04);
}
body.ui-colorful .cluster-analytics-card > h4 {
  background: linear-gradient(90deg, #f5f8ff, #f7fbfa) !important;
}
body.ui-colorful .settings-inspector {
  border-color: #d3d2e2 !important;
  box-shadow: 0 2px 8px rgba(68, 62, 102, 0.05);
}
body.ui-colorful .settings-tab-rail {
  background: linear-gradient(180deg, #f1edfb 0%, #edf4fb 55%, #edf8f5 100%) !important;
  border-left-color: #d2cde1 !important;
}
body.ui-colorful .settings-tab-rail .control-tab.active {
  background: #ffffff !important;
  color: #684f9b !important;
  box-shadow: inset 3px 0 0 #8265b2 !important;
}
body.ui-colorful .settings-tab-rail .control-tab:hover {
  background: #f9f7ff !important;
}
body.ui-colorful .settings-page-titlebar {
  background: linear-gradient(90deg, #f3effb, #f3f8fc) !important;
  border-bottom-color: #dbd7e5 !important;
}
body.ui-colorful .settings-compact-section > summary {
  background: #f6f8fc !important;
}
body.ui-colorful .statusbar {
  background: linear-gradient(90deg, #eaf4f1 0%, #edf3fb 55%, #f2eff9 100%) !important;
  border-top-color: #cbd9dd !important;
  color: #536677 !important;
}
body.ui-colorful .status-indicator {
  background: #2f8d78 !important;
}
body.ui-colorful .focus-restore-btn,
body.ui-colorful .pane-maximize-btn {
  background: #f7faff !important;
  border-color: #bfcfe0 !important;
}

.theme-choice-menu {
  min-width: 218px !important;
}
.theme-choice-menu button {
  justify-content: space-between !important;
  gap: 10px !important;
}
.theme-menu-label {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  font-size: inherit !important;
  color: inherit !important;
  font-weight: inherit !important;
}
/*
 * Source section 26/53: theme swatch.
 * Assembles into styles/base.css.
 * Rules remain in their original cascade order; later sections may intentionally override these
 * declarations.
 */
.theme-swatch {
  display: inline-block;
  width: 13px;
  height: 13px;
  border-radius: 4px;
  border: 1px solid rgba(30, 41, 59, 0.22);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
  flex: 0 0 13px;
}
.swatch-colorful {
  background: linear-gradient(135deg, #315fc4 0 34%, #2e8b78 34% 67%, #7456c8 67%);
}
.swatch-ocean {
  background: linear-gradient(135deg, #1f6fb5, #57a6c9);
}
.swatch-forest {
  background: linear-gradient(135deg, #27745b, #71a66f);
}
.swatch-violet {
  background: linear-gradient(135deg, #6f52aa, #b779b4);
}
.swatch-amber {
  background: linear-gradient(135deg, #b96b23, #d6a642);
}
.swatch-teal {
  background: linear-gradient(135deg, #247d82, #60889a);
}
.swatch-neutral {
  background: linear-gradient(135deg, #667085, #c7cdd5);
}

/* Shared compact, polished geometry. Scientific plots/tables keep dense square data geometry. */
body {
  --ui-control-radius: 7px;
  --ui-panel-radius: 8px;
  --ui-soft-shadow: 0 1px 3px rgba(15, 23, 42, 0.055);
}
.workspace-focus-btn,
.mini-btn,
.workspace-view-actions button,
.icon-btn,
.project-title-actions .icon-btn,
.canvas-action-strip button,
.table-actionbar button,
.data-grid-toolbar button,
.analysis-actions button,
.cluster-card-actions button,
input:not([type='range']):not([type='checkbox']):not([type='radio']),
select,
textarea,
.settings-compact-section > summary,
.setting-detail-toggle,
.focus-restore-btn,
.pane-maximize-btn {
  border-radius: var(--ui-control-radius) !important;
}
.project-inspector,
.settings-inspector,
.plot-shell,
.analysis-provenance-strip,
.cluster-interpretation-section,
.cluster-analytics-card,
.outbreak-figure-card,
.analysis-note,
.phylo-note,
.professional-note {
  border-radius: var(--ui-panel-radius) !important;
}
.workspace-tabs {
  padding: 3px 5px 0 !important;
}
.workspace-tabs .view-tab {
  height: 32px !important;
  padding: 5px 9px !important;
  border-radius: 7px 7px 0 0 !important;
}
.canvas-action-strip {
  padding-top: 5px !important;
  padding-bottom: 5px !important;
  gap: 4px !important;
}
.canvas-action-strip button,
.mini-btn {
  min-height: 28px !important;
  padding: 4px 7px !important;
}
.modebar {
  padding-top: 3px !important;
  padding-bottom: 3px !important;
}
.project-name-field input,
.project-export-name input {
  height: 28px !important;
  min-height: 28px !important;
}
.project-tree-project > summary,
.project-branch-group > summary,
.project-tree-file,
.project-tree-nav-item button,
.project-tree-json button {
  border-radius: 6px !important;
}
.project-tree-project > summary:hover,
.project-branch-group > summary:hover,
.project-tree-file:hover,
.project-tree-nav-item button:hover,
.project-tree-json button:hover {
  box-shadow: inset 0 0 0 1px rgba(100, 116, 139, 0.08);
}
.menu-trigger {
  border-radius: 7px !important;
}
.menu-dropdown,
.menu-submenu {
  border-radius: 9px !important;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.16) !important;
}
.menu-dropdown button,
.menu-submenu button {
  border-radius: 6px !important;
}
.version-badge,
.data-health-pill,
.run-id-pill,
.active-project-badge {
  border-radius: 999px !important;
}
.statusbar {
  min-height: 27px !important;
}
.control-tab {
  border-radius: 6px !important;
}
.settings-compact-section {
  border-radius: 8px !important;
  overflow: hidden;
}

/* Theme variables. These colors apply to application chrome only; SVG scientific encodings are untouched. */
body[data-color-mode='ocean'] {
  --bg: #edf5fa;
  --panel-2: #f6fbfe;
  --accent: #256aa8;
  --accent-soft: #e5f1fa;
  --accent-2: #3e91b8;
  --border: #d1e0ea;
  --border-strong: #b7cedc;
}
body[data-color-mode='forest'] {
  --bg: #eef6f1;
  --panel-2: #f7fbf8;
  --accent: #2d765d;
  --accent-soft: #e5f3eb;
  --accent-2: #6d925d;
  --border: #d3e2d9;
  --border-strong: #b9d0c2;
}
body[data-color-mode='violet'] {
  --bg: #f4f1f8;
  --panel-2: #fbf9fd;
  --accent: #6d55a4;
  --accent-soft: #eee8f7;
  --accent-2: #a56394;
  --border: #ddd5e7;
  --border-strong: #c8bad8;
}
body[data-color-mode='amber'] {
  --bg: #f8f4ec;
  --panel-2: #fdfaf4;
  --accent: #a96024;
  --accent-soft: #f8ead8;
  --accent-2: #b58b32;
  --border: #e6d9c8;
  --border-strong: #d5c0a5;
}
body[data-color-mode='teal'] {
  --bg: #edf5f5;
  --panel-2: #f6fbfb;
  --accent: #2d7478;
  --accent-soft: #e3f1f1;
  --accent-2: #5f7f93;
  --border: #d0dfe0;
  --border-strong: #b5ced0;
}
body[data-color-mode='neutral'] {
  --bg: #f1f3f5;
  --panel-2: #f8f9fa;
  --accent: #526071;
  --accent-soft: #e9edf1;
  --accent-2: #727c88;
  --border: #d8dde3;
  --border-strong: #c3cad2;
}

body[data-color-mode='ocean'] .topbar,
body[data-color-mode='forest'] .topbar,
body[data-color-mode='violet'] .topbar,
body[data-color-mode='amber'] .topbar,
body[data-color-mode='teal'] .topbar,
body[data-color-mode='neutral'] .topbar {
  background: linear-gradient(180deg, #fff 0%, var(--panel-2) 100%) !important;
  border-bottom-color: var(--border-strong) !important;
}
body[data-color-mode='ocean'] .brand-mark {
  background: linear-gradient(135deg, #2368a3, #4b9fbd) !important;
}
body[data-color-mode='forest'] .brand-mark {
  background: linear-gradient(135deg, #2c735b, #6a9460) !important;
}
body[data-color-mode='violet'] .brand-mark {
  background: linear-gradient(135deg, #6b50a3, #a66393) !important;
}
body[data-color-mode='amber'] .brand-mark {
  background: linear-gradient(135deg, #ae6425, #bc9239) !important;
}
body[data-color-mode='teal'] .brand-mark {
  background: linear-gradient(135deg, #287579, #5d8192) !important;
}
body[data-color-mode='neutral'] .brand-mark {
  background: linear-gradient(135deg, #536171, #7b8794) !important;
}
body:not([data-color-mode='colorful']) .workspace-grid {
  background: var(--bg) !important;
}
body:not([data-color-mode='colorful']) .project-tab-rail,
body:not([data-color-mode='colorful']) .settings-tab-rail {
  background: var(--panel-2) !important;
  border-color: var(--border) !important;
}
body:not([data-color-mode='colorful']) .project-page-titlebar,
body:not([data-color-mode='colorful']) .settings-page-titlebar,
body:not([data-color-mode='colorful']) .analysis-section-title {
  background: linear-gradient(90deg, var(--accent-soft), #fff) !important;
  border-color: var(--border) !important;
}
body:not([data-color-mode='colorful']) .dual-workspace-tabs {
  background: color-mix(in srgb, var(--accent-soft) 52%, #edf0f4) !important;
  border-bottom-color: var(--border-strong) !important;
}
body:not([data-color-mode='colorful']) .workspace-tab-group-left,
body:not([data-color-mode='colorful']) .workspace-tab-group-right {
  background: linear-gradient(180deg, var(--panel-2), #f5f7f9) !important;
}
body:not([data-color-mode='colorful']) .workspace-tabs .view-tab.active {
  color: var(--accent) !important;
  border-color: var(--border-strong) !important;
}
body:not([data-color-mode='colorful']) .workspace-tabs .view-tab.active:before {
  background: var(--accent) !important;
}
body:not([data-color-mode='colorful']) .statusbar {
  background: linear-gradient(90deg, var(--accent-soft), var(--panel-2)) !important;
  border-top-color: var(--border) !important;
}
body:not([data-color-mode='colorful']) .status-indicator {
  background: var(--accent) !important;
}
body:not([data-color-mode='colorful']) .menu-trigger:hover,
body:not([data-color-mode='colorful']) .menu-trigger[aria-expanded='true'],
body:not([data-color-mode='colorful']) .menu-dropdown button:hover,
body:not([data-color-mode='colorful']) .menu-submenu button:hover {
  background: var(--accent-soft) !important;
  color: var(--accent) !important;
}
body:not([data-color-mode='colorful']) .active-menu-choice {
  background: var(--accent-soft) !important;
  color: var(--accent) !important;
}
body:not([data-color-mode='colorful']) .active-menu-choice .menu-choice-mark {
  color: var(--accent) !important;
}
body:not([data-color-mode='colorful']) .analysis-surface {
  background: linear-gradient(180deg, #f7f9fb, var(--panel-2)) !important;
}
body:not([data-color-mode='colorful']) .outbreak-summary-strip {
  background: linear-gradient(90deg, var(--accent-soft), var(--panel-2)) !important;
  border-color: var(--border) !important;
}
.workspace-focus-btn:hover,
.mini-btn:hover,
.icon-btn:hover,
.canvas-action-strip button:hover {
  box-shadow: var(--ui-soft-shadow);
}
.project-inspector,
.settings-inspector,
.plot-shell {
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.045) !important;
}

.project-explorer-layout {
  display: grid !important;
  grid-template-rows: minmax(0, 2fr) minmax(175px, 1fr) !important;
  padding: 0 !important;
  overflow: hidden !important;
  gap: 0 !important;
}
.project-explorer-zone {
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
  overflow: hidden;
}
.project-utilities-zone {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  border-top: 1px solid var(--border);
  background: var(--panel-2);
  padding: 7px 7px 9px;
}
.project-explorer-toolbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 5px 6px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #fff, var(--panel-2));
}
.project-explorer-tool {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border: 1px solid transparent;
  background: transparent;
  color: #425269;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 6px;
  cursor: pointer;
}
.project-explorer-tool:hover {
  background: var(--accent-soft);
  border-color: var(--border);
  color: var(--accent);
}
.project-explorer-tool .ui-icon {
  width: 15px;
  height: 15px;
}
.project-new-tool {
  width: 38px;
  grid-template-columns: 1fr 10px;
  padding: 0 4px;
}
.project-new-tool .project-tool-chevron {
  width: 9px;
  height: 9px;
}
.project-tool-danger:hover {
  background: #fff0f0 !important;
  color: #a23b3b !important;
  border-color: #e9bcbc !important;
}
.project-toolbar-spacer {
  flex: 1 1 auto;
  min-width: 3px;
}
.project-new-wrap {
  position: relative;
}
.project-new-menu {
  position: absolute;
  left: 0;
  top: 32px;
  z-index: 30;
  width: 164px;
  padding: 4px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.16);
}
.project-new-menu.hidden {
  display: none;
}
.project-new-menu button {
  width: 100%;
  border: 0;
  background: transparent;
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 7px;
  align-items: center;
  text-align: left;
  padding: 7px 8px;
  border-radius: 6px;
  color: #34445e;
  font-size: 10.5px;
}
.project-new-menu button:hover {
  background: var(--accent-soft);
  color: var(--accent);
}
.project-new-menu .ui-icon {
  width: 14px;
  height: 14px;
}
.explorer-project-name {
  flex: 0 0 auto;
  margin: 5px 6px 4px !important;
}
.explorer-project-name span {
  font-size: 8.8px !important;
}
.explorer-project-name input {
  height: 27px !important;
  min-height: 27px !important;
}
.project-explorer-heading {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 7px 3px;
  color: #536177;
  border-top: 1px solid #eef1f5;
}
.project-explorer-heading span {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.project-explorer-heading small {
  font-size: 8.5px;
  color: #8490a0;
}
.project-tree-explorer {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  padding: 2px 4px 6px;
  margin: 0 !important;
  overscroll-behavior: contain;
}
.project-library-root {
  margin: 0;
}
.project-library-root > summary {
  list-style: none;
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  gap: 4px;
  align-items: center;
  min-height: 25px;
  padding: 3px 4px;
  border-radius: 6px;
  cursor: pointer;
  color: #445268;
  font-size: 10.5px;
  font-weight: 750;
}
.project-library-root > summary::-webkit-details-marker {
  display: none;
}
.project-library-root > summary:hover {
  background: #f3f6f9;
}
.project-library-root > summary > .ui-icon {
  width: 14px;
  height: 14px;
  color: #c18c22;
  fill: #f3c75b;
  stroke: #8e6a1c;
}
.project-library-root > summary small {
  font-size: 8.5px;
  color: #8390a1;
  font-weight: 600;
}
.project-library-nodes {
  margin-left: 7px;
  padding-left: 7px;
  border-left: 1px solid #dce2ea;
}
/*
 * Source section 27/53: project tree example.
 * Assembles into styles/base.css.
 * Rules remain in their original cascade order; later sections may intentionally override these
 * declarations.
 */
.project-tree-example {
  margin-top: 4px !important;
  border: 0 !important;
  background: transparent !important;
}
.project-tree-example > summary {
  min-height: 25px;
  padding: 3px 4px !important;
  border-radius: 6px;
}
.project-tree-example > summary:hover {
  background: #f3f6f9;
}
.project-tree-project.active-project > summary {
  background: color-mix(in srgb, var(--accent-soft) 76%, #fff) !important;
  box-shadow: inset 2px 0 0 var(--accent);
}
.project-tree-file.is-loaded .project-tree-icon {
  background: color-mix(in srgb, var(--accent-soft) 75%, #fff);
  color: var(--accent);
}
.project-persistence-status {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  border-top: 1px solid #edf0f4;
  background: #fafbfd;
  color: #69768a;
  font-size: 8.7px;
  line-height: 1.25;
}
.project-save-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #55a574;
  box-shadow: 0 0 0 2px rgba(85, 165, 116, 0.12);
}
.project-persistence-status.is-saving .project-save-dot {
  background: #d09b3a;
}
.project-persistence-status.is-error .project-save-dot {
  background: #c65b5b;
}
.project-utilities-zone .project-drop-zone {
  margin: 0 0 6px;
  padding: 7px 6px;
}
.project-utilities-zone .compact-actions {
  margin: 5px 0 !important;
}
.project-utilities-zone .wide-project-action {
  margin-top: 4px;
}
.project-utilities-zone .project-export-name {
  margin: 6px 0 0 !important;
}
.project-utilities-zone .input-summary {
  margin-top: 6px !important;
}
body:not([data-color-mode='colorful']) .project-explorer-toolbar {
  background: linear-gradient(180deg, #fff, var(--panel-2));
}
.project-explorer-tool:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent);
  outline-offset: 1px;
}
@media (max-height: 720px) {
  .project-explorer-layout {
    grid-template-rows: minmax(0, 1.8fr) minmax(150px, 1fr) !important;
  }
  .project-utilities-zone {
    padding-top: 5px;
  }
  .project-utilities-zone .project-drop-zone {
    padding: 5px;
  }
}

.project-explorer-layout {
  --project-explorer-top: 80%;
  grid-template-rows: minmax(0, var(--project-explorer-top)) 6px minmax(88px, 1fr) !important;
}
.project-explorer-divider {
  position: relative;
  min-height: 6px;
  height: 6px;
  cursor: row-resize;
  background: #e7ebf1;
  border-top: 1px solid #d9dfe7;
  border-bottom: 1px solid #d9dfe7;
  touch-action: none;
  z-index: 8;
}
.project-explorer-divider span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 34px;
  height: 2px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: #aeb8c6;
}
.project-explorer-divider:hover,
.project-explorer-divider:focus-visible,
.resizing-project-explorer .project-explorer-divider {
  background: color-mix(in srgb, var(--accent-soft) 72%, #e7ebf1);
}
.project-explorer-divider:hover span,
.project-explorer-divider:focus-visible span,
.resizing-project-explorer .project-explorer-divider span {
  background: var(--accent);
}
.project-explorer-divider:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 42%, transparent);
  outline-offset: -1px;
}
.project-utilities-zone {
  padding: 7px !important;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow-y: auto !important;
}
.project-utilities-zone .project-drop-zone {
  margin: 0 0 6px !important;
  padding: 7px 6px !important;
  min-height: 52px;
  box-sizing: border-box;
}
.project-utilities-zone .compact-actions {
  margin: 0 !important;
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 5px !important;
}
.project-utilities-zone .project-action-btn {
  min-height: 28px !important;
  height: 28px !important;
  font-size: 9.5px !important;
  padding: 3px 5px !important;
}
.project-utility-compat {
  display: none !important;
}
/* Keep the Explorer toolbar fully visible even in the narrow left pane. */
.project-explorer-toolbar {
  gap: 1px !important;
  padding: 3px 4px !important;
  overflow: visible !important;
  flex-wrap: nowrap !important;
}
.project-explorer-tool {
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  border-radius: 5px !important;
}
.project-explorer-tool .ui-icon {
  width: 14px !important;
  height: 14px !important;
}
.project-new-tool {
  width: 32px !important;
  min-width: 32px !important;
  grid-template-columns: 1fr 8px !important;
  padding: 0 2px !important;
}
.project-new-tool .project-tool-chevron {
  width: 8px !important;
  height: 8px !important;
}
.project-toolbar-spacer {
  flex: 1 1 2px !important;
  min-width: 0 !important;
}
/* Explorer typography uses normal weight throughout; hierarchy comes from indentation and icons. */
.project-explorer-zone .project-library-root > summary,
.project-explorer-zone .project-switch,
.project-explorer-zone .project-branch-group > summary,
.project-explorer-zone .project-tree-file-name strong,
.project-explorer-zone .example-project-open,
.project-explorer-zone .active-project-badge,
.project-explorer-zone .project-explorer-heading span,
.project-explorer-zone strong {
  font-weight: 400 !important;
}
.project-explorer-heading span {
  text-transform: none !important;
  letter-spacing: 0 !important;
}
/* Professional SVG icons replace letter initials in Settings navigation and page headers. */
.settings-tab-rail .rail-icon {
  display: grid !important;
  place-items: center !important;
  width: 22px !important;
  height: 22px !important;
  color: #52647b !important;
}
.settings-tab-rail .rail-icon .ui-icon {
  width: 17px !important;
  height: 17px !important;
  stroke-width: 1.8;
}
.control-tab.active .rail-icon {
  color: var(--active-tab-accent, var(--accent)) !important;
}
.settings-page-glyph .ui-icon {
  width: 16px !important;
  height: 16px !important;
  color: var(--accent);
  stroke-width: 1.8;
}
@media (max-height: 720px) {
  .project-explorer-layout {
    grid-template-rows: minmax(0, var(--project-explorer-top)) 6px minmax(82px, 1fr) !important;
  }
  .project-utilities-zone {
    padding: 5px 6px !important;
  }
  .project-utilities-zone .project-drop-zone {
    min-height: 46px;
    padding: 5px !important;
  }
}
#project-page-projects > .project-page-titlebar strong {
  font-weight: 400 !important;
}

.project-explorer-toolbar {
  gap: 0 !important;
  padding-left: 3px !important;
  padding-right: 3px !important;
}
.project-explorer-tool {
  width: 21px !important;
  height: 23px !important;
  min-width: 21px !important;
}
.project-explorer-tool .ui-icon {
  width: 13px !important;
  height: 13px !important;
}
.project-new-tool {
  width: 26px !important;
  min-width: 26px !important;
  grid-template-columns: 1fr 7px !important;
  padding: 0 1px !important;
}
.project-new-tool .project-tool-chevron {
  width: 7px !important;
  height: 7px !important;
}

.project-explorer-toolbar {
  min-height: 24px !important;
  padding: 2px 3px !important;
}
.project-explorer-tool {
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  border-radius: 4px !important;
}
.project-new-tool {
  width: 29px !important;
  min-width: 29px !important;
}
.project-explorer-tool .ui-icon {
  width: 13px !important;
  height: 13px !important;
}
.explorer-project-name {
  margin: 2px 4px !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 1px !important;
}
.explorer-project-name span {
  font-size: 8px !important;
}
.explorer-project-name input {
  height: 23px !important;
  min-height: 23px !important;
  padding: 2px 5px !important;
  font-size: 10px !important;
}
.project-explorer-heading {
  padding: 2px 5px !important;
  min-height: 18px !important;
}
.project-explorer-heading span {
  font-size: 8.5px !important;
}
.project-explorer-heading small {
  font-size: 8px !important;
}
.project-tree-explorer {
  padding: 0 2px 3px !important;
}
.project-library-root > summary {
  min-height: 20px !important;
  padding: 1px 2px !important;
  font-size: 9.5px !important;
  gap: 2px !important;
  grid-template-columns: 13px minmax(0, 1fr) auto !important;
}
.project-library-root > summary > .ui-icon {
  width: 12px !important;
  height: 12px !important;
}
.project-library-nodes {
  margin-left: 4px !important;
  padding-left: 4px !important;
}
.project-tree-project > summary {
  min-height: 20px !important;
  padding: 1px 2px !important;
  gap: 2px !important;
}
.project-switch {
  font-size: 9.8px !important;
  gap: 3px !important;
  padding: 1px !important;
}
.project-switch .ui-icon {
  width: 12px !important;
  height: 12px !important;
}
.project-disclosure-btn {
  width: 13px !important;
  min-width: 13px !important;
  height: 18px !important;
  padding: 0 !important;
}
.active-project-badge {
  font-size: 7px !important;
  padding: 1px 3px !important;
}
.project-tree-branches {
  padding-left: 8px !important;
  margin-left: 4px !important;
}
.project-branch-group {
  margin: 0 !important;
}
.project-branch-group > summary {
  min-height: 18px !important;
  padding: 1px 2px !important;
  grid-template-columns: 13px minmax(0, 1fr) auto !important;
  gap: 2px !important;
  font-size: 9.3px !important;
}
.project-branch-group > summary > .ui-icon {
  width: 11px !important;
  height: 11px !important;
}
.project-branch-group > summary small {
  font-size: 7.5px !important;
}
.project-tree-files {
  padding: 0 0 1px 4px !important;
}
.project-tree-file {
  grid-template-columns: 14px minmax(0, 1fr) auto auto !important;
  gap: 2px !important;
  min-height: 21px !important;
  padding: 1px 1px 1px 2px !important;
}
.project-tree-file > .ui-icon {
  width: 11px !important;
  height: 11px !important;
}
.project-tree-file-name strong {
  font-size: 9px !important;
}
.project-tree-file-name small {
  font-size: 7.5px !important;
}
.project-tree-file > button {
  font-size: 7.8px !important;
  padding: 1px 2px !important;
}
.project-tree-nav-item,
.project-tree-leaf,
.project-tree-json {
  min-height: 19px !important;
}
.project-tree-nav-item button,
.project-tree-json button {
  gap: 3px !important;
  padding: 2px !important;
  font-size: 8.8px !important;
}
.project-tree-nav-item .ui-icon,
.project-tree-leaf .ui-icon,
.project-tree-json .ui-icon {
  width: 10px !important;
  height: 10px !important;
}
.muted-tree-item {
  padding: 2px !important;
  font-size: 8px !important;
}
.project-tree-example {
  margin-top: 3px !important;
}
.project-tree-example > summary {
  min-height: 19px !important;
  padding: 2px !important;
  font-size: 9px !important;
  grid-template-columns: 13px minmax(0, 1fr) auto !important;
}
.project-tree-example > summary .ui-icon {
  width: 11px !important;
  height: 11px !important;
}
.example-project {
  padding: 2px !important;
}
.example-project-open {
  padding: 2px !important;
  font-size: 9px !important;
  grid-template-columns: 13px minmax(0, 1fr) auto !important;
}
.example-project-open .ui-icon {
  width: 11px !important;
  height: 11px !important;
}
.example-files {
  padding: 1px 1px 1px 9px !important;
  gap: 0 !important;
}
.example-files span {
  font-size: 7.5px !important;
  grid-template-columns: 12px minmax(0, 1fr) !important;
}
.example-files span .ui-icon {
  width: 9px !important;
  height: 9px !important;
}
.project-persistence-status {
  padding: 2px 5px !important;
  font-size: 7.6px !important;
  min-height: 18px !important;
}
.project-save-dot {
  width: 5px !important;
  height: 5px !important;
}
.saved-analysis-item button {
  color: var(--accent) !important;
}

.table-toolbar-icon,
.workspace-save-btn {
  width: 28px !important;
  min-width: 28px !important;
  height: 28px !important;
  padding: 0 !important;
  display: grid !important;
  place-items: center !important;
  position: relative;
}
.table-toolbar-icon .ui-icon,
.workspace-save-btn .ui-icon {
  width: 15px !important;
  height: 15px !important;
}
#metadataFiltersBtn .tool-count {
  position: absolute;
  right: -2px;
  top: -3px;
  min-width: 13px;
  height: 13px;
  line-height: 12px;
  padding: 0 2px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  border: 1px solid #fff;
  font-size: 7px;
}
.analysis-view-actionbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-height: 32px;
  padding: 3px 8px;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
}
.analysis-view-actionbar .workspace-save-btn {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 6px;
  color: #46576f;
}
/*
 * Source section 28/53: analysis view actionbar workspace save btn hover.
 * Assembles into styles/base.css.
 * Rules remain in their original cascade order; later sections may intentionally override these
 * declarations.
 */
.analysis-view-actionbar .workspace-save-btn:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

/* Compact trees must preserve geometric proportions. */
#compactSvg {
  shape-rendering: geometricPrecision;
  text-rendering: geometricPrecision;
}

.side-slide-handle,
.settings-slide-handle {
  width: 24px !important;
  height: 28px !important;
  min-width: 24px !important;
  min-height: 28px !important;
  padding: 0 !important;
  border-radius: 6px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  line-height: 1 !important;
  box-sizing: border-box !important;
}
.projects-slide-handle {
  top: 8px !important;
  right: -12px !important;
  margin: 0 !important;
}
.settings-slide-handle {
  margin: 1px auto 5px !important;
}
.side-slide-handle > span {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 100% !important;
  line-height: 1 !important;
  transform: translateY(-0.5px);
}

/* Every icon-only action uses optical and mathematical centering; SVGs do not sit on the text baseline. */
.icon-only-action,
.table-toolbar-icon,
.workspace-save-btn,
.project-explorer-tool {
  align-items: center !important;
  justify-content: center !important;
  line-height: 0 !important;
  box-sizing: border-box !important;
}
.icon-only-action {
  display: inline-flex !important;
  padding: 0 !important;
}
.icon-only-action > .ui-icon,
.table-toolbar-icon > .ui-icon,
.workspace-save-btn > .ui-icon,
.project-explorer-tool > .ui-icon {
  display: block !important;
  margin: 0 !important;
  flex: 0 0 auto !important;
  transform: none !important;
  vertical-align: middle !important;
}
.data-action-strip .icon-only-action {
  width: 28px !important;
  min-width: 28px !important;
  height: 26px !important;
  padding: 0 !important;
}

/* Metadata tools stay grouped on the left; the percent readout is intentionally hidden. */
#metadataView .toolbar-search {
  width: 200px !important;
  min-width: 165px !important;
  max-width: 220px !important;
  flex: 0 1 200px !important;
}
#metadataView .toolbar-spacer {
  display: none !important;
}
#metadataView .data-action-strip {
  justify-content: flex-start !important;
  align-content: flex-start !important;
}
#metadataView .metadata-font-control {
  gap: 2px !important;
  border: 1px solid #cbd4df;
  border-radius: 4px;
  background: #fff;
  padding: 0 2px !important;
}
#metadataView .metadata-font-control > button {
  width: 28px !important;
  min-width: 28px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  text-align: center !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
#metadataFontReadout.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
@container (max-width:760px) {
  #metadataView .toolbar-search {
    width: 185px !important;
    min-width: 150px !important;
    max-width: 185px !important;
  }
  #metadataView .metadata-font-control {
    display: inline-flex !important;
    width: auto !important;
    grid-template-columns: none !important;
  }
}

.metadata-field-expanded {
  gap: 6px !important;
  padding: 6px 7px 8px !important;
}
.metadata-field-expanded .metadata-field-block {
  gap: 5px !important;
}
.metadata-track-field-block {
  padding-top: 6px !important;
  border-top: 1px solid #e1e7ef !important;
}
.metadata-track-options {
  grid-column: 1/-1;
  display: grid;
  gap: 5px;
  padding: 6px 0 2px;
  border-top: 1px dashed #d9e1eb;
  margin-top: 2px;
}
.metadata-track-options.is-track-option-hidden,
.is-track-option-hidden {
  display: none !important;
}
.metadata-mini-heading {
  font-size: 8.5px;
  font-weight: 650;
  letter-spacing: 0.035em;
  text-transform: uppercase;
  color: #64748b;
  margin: 0 0 1px;
}
.compact-inline-check {
  align-self: end;
  min-height: 29px;
}
.metadata-field-expanded label > span {
  font-size: 9px;
}
.metadata-field-expanded input[type='number'],
.metadata-field-expanded input[type='text'],
.metadata-field-expanded select {
  min-height: 27px;
  height: 27px;
  font-size: 9.5px;
}
.metadata-field-expanded input[type='color'] {
  height: 26px;
  min-height: 26px;
}
.metadata-field-expanded .check-row {
  min-height: 22px;
}

/* Both rails use the same edge-tab control, placed at mid-height so the Settings tab icons remain unobstructed. */
.side-slide-handle,
.settings-slide-handle {
  position: absolute !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 24px !important;
  height: 34px !important;
  min-width: 24px !important;
  min-height: 34px !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 7px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 0 !important;
  z-index: 45 !important;
}
.projects-slide-handle {
  left: auto !important;
  right: -12px !important;
}
.settings-slide-handle {
  right: auto !important;
  left: -12px !important;
}
.side-slide-handle .ui-icon,
.settings-slide-handle .ui-icon {
  display: block !important;
  width: 14px !important;
  height: 14px !important;
  margin: 0 !important;
  transform: none !important;
}
body.inputs-collapsed .projects-slide-handle {
  right: 3px !important;
}
body.controls-collapsed .settings-slide-handle {
  left: 11px !important;
}

.right-panel {
  position: relative !important;
}
.right-panel > .settings-slide-handle {
  position: absolute !important;
  top: 50% !important;
  left: -12px !important;
  right: auto !important;
  transform: translateY(-50%) !important;
  width: 24px !important;
  height: 34px !important;
  min-width: 24px !important;
  min-height: 34px !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 120 !important;
  background: var(--panel) !important;
  border: 1px solid var(--border-strong) !important;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.14) !important;
}
body.controls-collapsed .right-panel > .settings-slide-handle {
  left: -12px !important;
}
.right-panel > .settings-slide-handle .ui-icon {
  display: block !important;
  width: 14px !important;
  height: 14px !important;
  margin: 0 !important;
}

.right-panel > .settings-slide-handle {
  left: -24px !important;
}
body.controls-collapsed .right-panel > .settings-slide-handle {
  left: -24px !important;
}

.left-panel,
.right-panel {
  display: grid !important;
  grid-template-rows: 36px minmax(0, 1fr) !important;
  gap: 0 !important;
  min-height: 0 !important;
  height: 100% !important;
  max-height: 100% !important;
  overflow: hidden !important;
}
.side-panel-topbar {
  min-height: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  padding: 4px 6px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-bottom: 0;
  position: relative;
  z-index: 130;
  box-sizing: border-box;
}
.projects-panel-topbar {
  border-radius: 6px 6px 0 0;
}
.settings-panel-topbar {
  border-radius: 6px 0 0 0;
}
.side-panel-caption {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: #34445e;
  font-size: 11.5px;
  font-weight: 650;
  white-space: nowrap;
}
.side-panel-caption .ui-icon {
  width: 15px;
  height: 15px;
  color: var(--accent);
}
.side-panel-topbar .side-slide-handle,
.side-panel-topbar .settings-slide-handle,
.right-panel .side-panel-topbar .settings-slide-handle {
  position: static !important;
  inset: auto !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  transform: none !important;
  margin: 0 !important;
  width: 27px !important;
  height: 27px !important;
  min-width: 27px !important;
  min-height: 27px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 1px solid var(--border-strong) !important;
  border-radius: 5px !important;
  background: #fff !important;
  color: #425269 !important;
  box-shadow: none !important;
  z-index: auto !important;
  padding: 0 !important;
}
.side-panel-topbar .side-slide-handle:hover,
.side-panel-topbar .settings-slide-handle:hover {
  background: var(--accent-soft) !important;
  color: var(--accent) !important;
}
.side-panel-topbar .side-slide-handle .ui-icon,
.side-panel-topbar .settings-slide-handle .ui-icon {
  width: 14px !important;
  height: 14px !important;
}
.left-panel .project-inspector,
.right-panel .settings-inspector {
  min-height: 0 !important;
  height: 100% !important;
  border-radius: 0 0 6px 6px !important;
}
.right-panel .settings-inspector {
  border-radius: 0 0 0 6px !important;
}

/* Project and History navigation remains usable while Projects is collapsed. */
body.inputs-collapsed .workspace-grid {
  grid-template-columns: 46px minmax(0, 1fr) 350px !important;
}
body.inputs-collapsed.controls-collapsed .workspace-grid {
  grid-template-columns: 46px minmax(0, 1fr) 46px !important;
}
body.inputs-collapsed .left-panel {
  display: grid !important;
  grid-template-rows: 36px minmax(0, 1fr) !important;
  opacity: 1 !important;
  transform: none !important;
  pointer-events: auto !important;
}
body.inputs-collapsed .left-panel .side-panel-topbar {
  justify-content: center;
  padding-inline: 3px;
}
body.inputs-collapsed .left-panel .side-panel-caption {
  display: none !important;
}
body.inputs-collapsed .left-panel .project-inspector {
  display: grid !important;
  grid-template-columns: 45px !important;
  border-radius: 0 0 6px 6px !important;
}
body.inputs-collapsed .left-panel .project-pages {
  display: none !important;
}
body.inputs-collapsed .left-panel .project-tab-rail {
  display: flex !important;
  width: 45px !important;
  border-right: 0 !important;
  height: 100% !important;
}
body.inputs-collapsed .left-panel .project-tab {
  width: 44px !important;
  min-width: 44px !important;
  height: 42px !important;
}
body.inputs-collapsed .left-panel .project-tab span {
  width: 30px !important;
  height: 30px !important;
}
body.inputs-collapsed .left-panel .project-tab span .ui-icon {
  width: 18px !important;
  height: 18px !important;
}

/* Settings uses the same visible top control while its category rail stays present. */
body.controls-collapsed .right-panel {
  display: grid !important;
  grid-template-rows: 36px minmax(0, 1fr) !important;
  opacity: 1 !important;
  transform: none !important;
  pointer-events: auto !important;
  overflow: hidden !important;
}
body.controls-collapsed .right-panel .side-panel-topbar {
  justify-content: center;
  padding-inline: 3px;
}
body.controls-collapsed .right-panel .side-panel-caption {
  display: none !important;
}
body.controls-collapsed .right-panel .settings-inspector {
  display: grid !important;
  grid-template-columns: 46px !important;
}
body.controls-collapsed .right-panel .settings-pages {
  display: none !important;
}
body.controls-collapsed .right-panel .settings-tab-rail {
  grid-column: 1 !important;
  width: 45px !important;
  min-width: 45px !important;
  border-left: 0 !important;
  height: 100% !important;
}

/* Readable project hierarchy. */
.project-tree-explorer {
  font-size: 12px !important;
  line-height: 1.3 !important;
}
.project-library-root > summary {
  min-height: 27px !important;
  padding: 4px 4px !important;
  font-size: 12px !important;
  gap: 5px !important;
  grid-template-columns: 16px minmax(0, 1fr) auto !important;
}
.project-library-root > summary > .ui-icon {
  width: 14px !important;
  height: 14px !important;
}
.project-library-root > summary small {
  font-size: 10px !important;
}
.project-tree-project > summary {
  min-height: 27px !important;
  padding: 3px 3px !important;
  gap: 4px !important;
  grid-template-columns: 17px minmax(0, 1fr) auto !important;
}
.project-switch {
  font-size: 12.5px !important;
  line-height: 1.25 !important;
  gap: 5px !important;
  padding: 2px !important;
}
.project-switch .ui-icon {
  width: 14px !important;
  height: 14px !important;
}
.project-disclosure-btn {
  width: 17px !important;
  min-width: 17px !important;
  height: 22px !important;
  font-size: 12px !important;
}
.active-project-badge {
  font-size: 9px !important;
  padding: 2px 4px !important;
}
.project-tree-branches {
  padding-left: 11px !important;
  margin-left: 5px !important;
}
.project-branch-group > summary {
  min-height: 23px !important;
  padding: 2px 3px !important;
  grid-template-columns: 14px minmax(0, 1fr) auto !important;
  gap: 4px !important;
  font-size: 11px !important;
}
.project-branch-group > summary > .ui-icon {
  width: 12px !important;
  height: 12px !important;
}
.project-branch-group > summary small {
  font-size: 9px !important;
}
/*
 * Source section 29/53: project tree file.
 * Assembles into styles/base.css.
 * Rules remain in their original cascade order; later sections may intentionally override these
 * declarations.
 */
.project-tree-file {
  min-height: 25px !important;
}
.project-tree-file-name strong {
  font-size: 10.5px !important;
}
.project-tree-file-name small {
  font-size: 9px !important;
}
.project-tree-nav-item button,
.project-tree-json button {
  font-size: 10.5px !important;
  min-height: 23px !important;
}
.muted-tree-item {
  font-size: 9.5px !important;
}
.project-tree-example > summary {
  min-height: 27px !important;
  font-size: 12px !important;
}
.example-project-open {
  font-size: 11px !important;
}
.example-files span {
  font-size: 9px !important;
}
.project-root-empty {
  padding: 6px 8px;
  color: var(--muted);
  font-size: 10px;
  font-style: italic;
}
.project-archive-root > summary {
  color: #58677b;
}
.archived-project > summary {
  opacity: 0.92;
}

/* Native-feeling project context menu. */
.project-context-menu {
  position: fixed;
  z-index: 10000;
  width: 210px;
  padding: 5px;
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.2);
  font-family: var(--app-font-family);
}
.project-context-menu button {
  width: 100%;
  min-height: 30px;
  border: 0;
  background: transparent;
  border-radius: 5px;
  padding: 5px 7px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  text-align: left;
  color: #34445e;
  font-size: 11.5px;
  cursor: pointer;
}
.project-context-menu button:hover {
  background: var(--accent-soft);
  color: var(--accent);
}
.project-context-menu .ui-icon {
  width: 14px;
  height: 14px;
}
.project-context-separator {
  height: 1px;
  background: var(--border);
  margin: 4px 3px;
}
.project-context-menu .project-context-danger {
  color: #a23b3b;
}
.project-context-menu .project-context-danger:hover {
  background: #fff0f0;
  color: #8f2929;
}
.project-context-menu .project-context-danger-soft {
  color: #835d32;
}

@media (max-width: 1320px) {
  body.inputs-collapsed .workspace-grid {
    grid-template-columns: 44px minmax(0, 1fr) 330px !important;
  }
  body.inputs-collapsed.controls-collapsed .workspace-grid {
    grid-template-columns: 44px minmax(0, 1fr) 44px !important;
  }
  body.inputs-collapsed .left-panel .project-inspector {
    grid-template-columns: 43px !important;
  }
  body.inputs-collapsed .left-panel .project-tab-rail {
    width: 43px !important;
  }
  body.inputs-collapsed .left-panel .project-tab {
    width: 42px !important;
    min-width: 42px !important;
  }
}

:root {
  --pw-project-panel-width: 345px;
  --pw-settings-panel-width: 380px;
  --pw-side-rail-width: 46px;
}
.workspace-grid {
  grid-template-columns: var(--pw-project-panel-width) minmax(420px, 1fr) var(--pw-settings-panel-width) !important;
}
body.inputs-collapsed .workspace-grid {
  grid-template-columns: var(--pw-side-rail-width) minmax(420px, 1fr) var(--pw-settings-panel-width) !important;
}
body.controls-collapsed .workspace-grid {
  grid-template-columns: var(--pw-project-panel-width) minmax(420px, 1fr) var(--pw-side-rail-width) !important;
}
body.inputs-collapsed.controls-collapsed .workspace-grid {
  grid-template-columns: var(--pw-side-rail-width) minmax(420px, 1fr) var(--pw-side-rail-width) !important;
}
body.pane-maximized:not(.inputs-collapsed):not(.controls-collapsed) .workspace-grid {
  grid-template-columns: var(--pw-project-panel-width) minmax(420px, 1fr) var(--pw-settings-panel-width) !important;
}
body.pane-maximized.inputs-collapsed:not(.controls-collapsed) .workspace-grid {
  grid-template-columns: var(--pw-side-rail-width) minmax(420px, 1fr) var(--pw-settings-panel-width) !important;
}
body.pane-maximized:not(.inputs-collapsed).controls-collapsed .workspace-grid {
  grid-template-columns: var(--pw-project-panel-width) minmax(420px, 1fr) var(--pw-side-rail-width) !important;
}
body.pane-maximized.inputs-collapsed.controls-collapsed .workspace-grid {
  grid-template-columns: var(--pw-side-rail-width) minmax(420px, 1fr) var(--pw-side-rail-width) !important;
}

.left-panel,
.right-panel {
  position: relative !important;
}
.side-panel-resize-gutter {
  position: absolute;
  top: 36px;
  bottom: 0;
  width: 8px;
  z-index: 180;
  cursor: col-resize;
  touch-action: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  outline: none;
}
.side-panel-resize-gutter span {
  width: 1px;
  height: 100%;
  border-radius: 0;
  background: #d8dee8;
  transition:
    background 0.12s ease,
    width 0.12s ease;
}
.side-panel-resize-gutter:hover span,
.side-panel-resize-gutter:focus-visible span,
body.resizing-side-panel .side-panel-resize-gutter span {
  background: #8798ad;
  width: 3px;
}
.projects-resize-gutter {
  right: 0;
}
.settings-resize-gutter {
  left: 0;
}
body.inputs-collapsed .projects-resize-gutter,
body.controls-collapsed .settings-resize-gutter {
  display: none !important;
}
body.resizing-side-panel,
body.resizing-side-panel * {
  cursor: col-resize !important;
  user-select: none !important;
}

/* Expanded Projects rail keeps its icons fully inside the rail. */
body:not(.inputs-collapsed) .project-inspector {
  grid-template-columns: 42px minmax(0, 1fr) !important;
}
body:not(.inputs-collapsed) .project-tab-rail {
  width: 42px !important;
  min-width: 42px !important;
  overflow-x: visible !important;
}
body:not(.inputs-collapsed) .project-tab {
  width: 41px !important;
  min-width: 41px !important;
  height: 42px !important;
  overflow: visible !important;
}
body:not(.inputs-collapsed) .project-tab span {
  width: 28px !important;
  height: 28px !important;
  overflow: visible !important;
}
body:not(.inputs-collapsed) .project-tab span .ui-icon {
  width: 17px !important;
  height: 17px !important;
  display: block !important;
}

/* Project names remain readable but leave more horizontal room for long names. */
.project-tree-explorer {
  font-size: 11.5px !important;
}
.project-library-root > summary {
  font-size: 11.4px !important;
  padding-inline: 3px !important;
}
.project-tree-project > summary {
  grid-template-columns: 17px minmax(0, 1fr) auto 24px !important;
  gap: 3px !important;
}
.project-switch {
  font-size: 11.2px !important;
  line-height: 1.2 !important;
  gap: 4px !important;
  padding: 2px 0 !important;
  overflow: hidden !important;
}
.project-switch > span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.project-switch .ui-icon {
  width: 13px !important;
  height: 13px !important;
  flex: 0 0 auto;
}
.active-project-badge {
  grid-column: 3 !important;
  font-size: 7.8px !important;
  padding: 1px 3px !important;
}
.project-more-btn {
  grid-column: 4;
  width: 24px;
  height: 24px;
  min-width: 24px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #69768a;
  font: 700 17px/1 var(--app-font-family);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.project-more-btn:hover,
.project-more-btn:focus-visible {
  background: #e7edf6;
  color: #2e4e86;
  outline: none;
}
.project-branch-group > summary {
  font-size: 10.5px !important;
}
.project-tree-file-name strong {
  font-size: 10.2px !important;
}
.project-tree-nav-item button,
.project-tree-json button {
  font-size: 10.2px !important;
}
.project-tree-example > summary {
  font-size: 11.4px !important;
}
.example-project-open {
  font-size: 10.6px !important;
}

.outbreak-selector-row {
  grid-template-columns: repeat(3, minmax(210px, 1fr)) !important;
  align-items: end;
}
.outbreak-selector-row label {
  gap: 5px !important;
}
.outbreak-selector-row .check-row {
  padding-top: 0 !important;
  align-items: center !important;
  min-height: 31px;
}
.outbreak-selector-row small {
  display: none !important;
}
.outbreak-figure-grid.cluster-analytics-grid {
  grid-template-columns: repeat(3, minmax(280px, 1fr)) !important;
  gap: 10px !important;
}
@media (max-width: 1380px) {
  .outbreak-figure-grid.cluster-analytics-grid {
    grid-template-columns: repeat(2, minmax(280px, 1fr)) !important;
  }
}
@media (max-width: 860px) {
  .outbreak-figure-grid.cluster-analytics-grid {
    grid-template-columns: 1fr !important;
  }
}
.outbreak-figure-subtitle {
  color: #7a8798 !important;
}
.outbreak-cluster-links {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 220px;
}
.outbreak-cluster-pill {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 6px;
  border: 1px solid #d7dee8;
  border-radius: 5px;
  background: #f8fafc;
  font-size: 10px;
  line-height: 1.3;
}
.outbreak-cluster-pill b {
  display: block;
  color: #23344d;
  font-size: 10.5px;
}
.outbreak-cluster-pill small {
  display: block;
  color: #6d7a8c;
}
.outbreak-cluster-pill .cluster-purity-tag {
  margin-left: auto;
  white-space: nowrap;
  padding: 2px 5px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 9px;
  border: 1px solid #d8dde5;
  background: #fff;
  color: #556274;
}
.outbreak-cluster-pill.pure .cluster-purity-tag {
  background: #eefbf3;
  border-color: #b8e0c6;
  color: #16643e;
}
.outbreak-cluster-pill.mixed .cluster-purity-tag {
  background: #fff7e8;
  border-color: #eed7a9;
  color: #8a5a00;
}
.outbreak-cluster-unassigned {
  font-size: 10px;
  color: #6b778a;
}
.outbreak-evidence-table .cluster-col {
  min-width: 220px;
  max-width: 300px;
}
.outbreak-evidence-table .cluster-col .outbreak-cluster-links {
  min-width: 0;
}
.outbreak-method-launch {
  padding: 10px;
  background: #fff;
}
.outbreak-method-open-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #d7dee8;
  border-radius: 8px;
  background: linear-gradient(90deg, #f6fbff, #fbfcff);
  cursor: pointer;
  text-align: left;
}
.outbreak-method-open-btn:hover {
  background: linear-gradient(90deg, #eef6ff, #f7fbff);
  border-color: #bcd0ea;
}
.outbreak-method-open-btn strong {
  display: block;
  font-size: 12px;
  color: #23344d;
}
.outbreak-method-open-btn small {
  display: block;
  margin-top: 2px;
  color: #647286;
  font-size: 10px;
  line-height: 1.35;
}
.method-open-icons {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}
.method-open-icon {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
  border: 1px solid rgba(0, 0, 0, 0.08);
}
.method-open-icon.tree {
  background: #dbeafe;
}
.method-open-icon.cluster {
  background: #dcfce7;
}
.method-open-icon.epi {
  background: #fef3c7;
}
.outbreak-methods-modal {
  width: min(980px, 94vw);
  max-height: min(88vh, 920px);
  overflow: auto;
}
.outbreak-methods-modal-body {
  padding: 14px 16px 18px;
  background: #fff;
  display: grid;
  gap: 12px;
}
.outbreak-methods-modal-body section {
  border: 1px solid #dde5ef;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.outbreak-methods-modal-body h3 {
  margin: 0;
  padding: 9px 11px;
  background: #f6f8fb;
  border-bottom: 1px solid #e3e8ef;
  font-size: 13px;
  color: #25364f;
}
.outbreak-methods-modal-body .method-block {
  padding: 10px 11px;
  color: #435268;
  font-size: 11px;
  line-height: 1.55;
}
.outbreak-methods-modal-body .method-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.outbreak-methods-modal-body .method-grid > div {
  border: 1px solid #e2e7ef;
  border-radius: 6px;
  padding: 8px;
  background: #fafcff;
}
.outbreak-methods-modal-body dl {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(150px, 220px) 1fr;
  gap: 6px 10px;
}
.outbreak-methods-modal-body dt {
  color: #677489;
  font-weight: 700;
}
.outbreak-methods-modal-body dd {
  margin: 0;
  color: #28374f;
}
.outbreak-methods-modal-body ul {
  margin: 0;
  padding-left: 18px;
}
.outbreak-methods-modal-body li {
  margin: 6px 0;
}
.outbreak-methods-modal-body .method-note {
  margin-top: 6px;
  padding: 8px 10px;
  border-left: 3px solid #4f64b8;
  background: #f5f8ff;
  border-radius: 4px;
  color: #30425d;
}
/*
 * Source section 30/53: media.
 * Assembles into styles/base.css.
 * Rules remain in their original cascade order; later sections may intentionally override these
 * declarations.
 */
@media (max-width: 900px) {
  .outbreak-methods-modal-body .method-grid {
    grid-template-columns: 1fr;
  }
}

.outbreak-actionbar {
  gap: 6px !important;
  justify-content: flex-end !important;
  padding: 4px 8px !important;
}
.outbreak-methods-mini-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 27px;
  padding: 0 9px;
  border: 1px solid #bfd0e7;
  border-radius: 999px;
  background: #eef5ff;
  color: #294b75;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
}
.outbreak-methods-mini-btn:hover {
  background: #e3efff;
  border-color: #9eb9d9;
}
.outbreak-methods-mini-btn .ui-icon {
  width: 14px;
  height: 14px;
}
.outbreak-methods-arrow {
  font-size: 11px;
  color: #6885a8;
}

.outbreak-settings-triptych {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 7px !important;
  padding: 7px 9px !important;
  background: #f5f7fa !important;
  align-items: stretch !important;
}
.outbreak-setting-panel {
  min-width: 0;
  border: 1px solid #d9e0e9;
  border-radius: 6px;
  background: #fff;
  padding: 7px 8px;
  display: grid;
  gap: 6px;
  align-content: start;
}
.outbreak-setting-panel-title {
  font-size: 10px;
  font-weight: 800;
  color: #34455e;
  letter-spacing: 0.015em;
  padding-bottom: 3px;
  border-bottom: 1px solid #edf0f4;
}
.outbreak-setting-panel label {
  font-size: 10.5px !important;
  gap: 3px !important;
  min-width: 0;
}
.outbreak-setting-panel select,
.outbreak-setting-panel input[type='number'] {
  width: 100%;
  min-width: 0;
  height: 28px !important;
  min-height: 28px !important;
  font-size: 10.5px !important;
}
.outbreak-setting-panel .check-row {
  min-height: 25px !important;
  padding: 0 !important;
  font-size: 10.5px !important;
  font-weight: 600 !important;
}
.outbreak-setting-inline-pair {
  display: grid;
  grid-template-columns: minmax(90px, 0.75fr) minmax(130px, 1.25fr);
  gap: 6px;
}
.outbreak-cluster-overlay-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid #dbe4ef;
  border-radius: 5px;
  background: #f8fbff;
  padding: 5px 6px;
  min-height: 32px;
}
.outbreak-cluster-overlay-box .check-row {
  flex: 1 1 auto !important;
  min-width: 0 !important;
}
.outbreak-cluster-overlay-box .check-row span {
  white-space: normal;
  line-height: 1.2;
}
.outbreak-cluster-overlay-box .mini-btn {
  height: 25px;
  min-height: 25px;
  padding: 2px 6px;
  font-size: 9.5px;
  flex: 0 0 auto;
}
.outbreak-cluster-overlay-box .ui-icon {
  width: 12px;
  height: 12px;
}
@media (max-width: 1050px) {
  .outbreak-settings-triptych {
    grid-template-columns: 1fr 1fr !important;
  }
  .outbreak-setting-panel:last-child {
    grid-column: 1/-1;
  }
}
@media (max-width: 700px) {
  .outbreak-settings-triptych {
    grid-template-columns: 1fr !important;
  }
  .outbreak-setting-panel:last-child {
    grid-column: auto;
  }
  .outbreak-setting-inline-pair {
    grid-template-columns: 1fr;
  }
}

/* Keep outbreak figures readable while showing two to three cards per row. */
.outbreak-figure-grid.cluster-analytics-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(300px, 1fr)) !important;
  gap: 10px !important;
  align-items: start !important;
}
.outbreak-analytics-card {
  min-width: 0 !important;
}
.outbreak-analytics-card .cluster-analytics-body {
  min-height: 230px;
}
.outbreak-analytics-card .outbreak-plot {
  min-height: 205px !important;
}
@media (max-width: 1320px) {
  .outbreak-figure-grid.cluster-analytics-grid {
    grid-template-columns: repeat(2, minmax(300px, 1fr)) !important;
  }
}
@media (max-width: 760px) {
  .outbreak-figure-grid.cluster-analytics-grid {
    grid-template-columns: 1fr !important;
  }
}
.workspace-document-area.split-mode .outbreak-figure-grid.cluster-analytics-grid {
  grid-template-columns: repeat(2, minmax(260px, 1fr)) !important;
}
@media (max-width: 1050px) {
  .workspace-document-area.split-mode .outbreak-figure-grid.cluster-analytics-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Clustering table action bar: compact, uniform and left aligned. */
#clustersView .data-action-strip {
  display: flex !important;
  flex-flow: row wrap !important;
  justify-content: flex-start !important;
  align-items: center !important;
  align-content: flex-start !important;
  gap: 5px !important;
  height: auto !important;
  min-height: 36px !important;
  padding: 5px 8px !important;
  overflow: visible !important;
}
#clustersView .toolbar-search {
  width: 175px !important;
  min-width: 145px !important;
  max-width: 190px !important;
  flex: 0 1 175px !important;
  height: 26px !important;
}
#clustersView .data-action-strip > button {
  width: 28px !important;
  min-width: 28px !important;
  height: 26px !important;
  padding: 0 !important;
  display: inline-grid !important;
  place-items: center !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 5px !important;
  background: #fff !important;
}
#clustersView .data-action-strip > button:hover {
  background: #f3f6fa !important;
  border-color: #aebdce !important;
}
#clustersView .data-action-strip .table-font-control {
  order: 0 !important;
  height: 26px !important;
  margin: 0 !important;
  display: inline-grid !important;
  grid-template-columns: 28px auto 28px !important;
  align-items: center !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 5px !important;
  background: #fff !important;
  padding: 0 !important;
}
#clustersView .data-action-strip .table-font-control button {
  height: 24px !important;
  min-height: 24px !important;
  width: 28px !important;
  min-width: 28px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  display: grid !important;
  place-items: center !important;
}
#clustersView .data-action-strip .table-font-control span {
  padding: 0 5px;
  font-size: 9.5px;
  white-space: nowrap;
  color: #59677a;
}
@media (max-width: 720px) {
  #clustersView .data-action-strip {
    display: flex !important;
    flex-flow: row wrap !important;
  }
  #clustersView .toolbar-search {
    width: 155px !important;
    min-width: 130px !important;
    max-width: 170px !important;
  }
}

.outbreak-workspace {
  container-type: inline-size;
}
.outbreak-actionbar {
  position: relative !important;
  z-index: 35 !important;
  justify-content: space-between !important;
  overflow: visible !important;
}
.outbreak-actionbar-left,
.outbreak-actionbar-right {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.outbreak-actionbar-left {
  margin-right: auto;
  position: relative;
}
.outbreak-section-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 27px;
  padding: 0 8px;
  border: 1px solid #c7d4e4;
  border-radius: 7px;
  background: #fff;
  color: #344b68;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
}
.outbreak-section-nav-btn:hover,
.outbreak-section-nav-btn[aria-expanded='true'] {
  background: #eef5ff;
  border-color: #a9bfdc;
  color: #234d7c;
}
.outbreak-section-nav-btn .ui-icon {
  width: 13px;
  height: 13px;
}
.outbreak-nav-chevron {
  width: 11px !important;
  height: 11px !important;
}
.outbreak-section-nav-menu {
  position: absolute;
  left: 0;
  top: 32px;
  width: min(300px, 76vw);
  padding: 5px;
  border: 1px solid #cbd6e4;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(30, 45, 65, 0.18);
  z-index: 180;
}
.outbreak-section-nav-menu button {
  width: 100%;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  padding: 7px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  text-align: left;
  color: #31435c;
  cursor: pointer;
}
.outbreak-section-nav-menu button:hover {
  background: #eef4fb;
}
.outbreak-section-nav-menu .ui-icon {
  width: 15px;
  height: 15px;
  color: #55718e;
}
.outbreak-section-nav-menu button span {
  display: block;
  min-width: 0;
}
.outbreak-section-nav-menu button strong {
  display: block;
  font-size: 10.5px;
}
.outbreak-section-nav-menu button small {
  display: block;
  margin-top: 1px;
  font-size: 9px;
  color: #748096;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Keep all three outbreak settings groups on one row. The cluster overlay is a compact full-width strip below them. */
.outbreak-settings-triptych {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  overflow-x: hidden !important;
  align-items: start !important;
}
.outbreak-setting-panel {
  height: 100%;
  box-sizing: border-box;
}
.outbreak-cluster-overlay-strip {
  grid-column: 1/-1 !important;
  display: grid !important;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 4px 7px !important;
  min-height: 30px !important;
}
.outbreak-cluster-overlay-strip .outbreak-overlay-note {
  font-size: 9px;
  color: #718096;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.outbreak-cluster-overlay-strip .mini-btn {
  white-space: nowrap;
}
@container (max-width:560px) {
  .outbreak-settings-triptych {
    grid-template-columns: repeat(3, minmax(88px, 1fr)) !important;
    gap: 4px !important;
    padding: 5px !important;
  }
  .outbreak-setting-panel {
    padding: 5px !important;
    gap: 4px !important;
    border-radius: 5px !important;
  }
  .outbreak-setting-panel-title {
    font-size: 8.5px !important;
    padding-bottom: 2px !important;
  }
  .outbreak-setting-panel label {
    font-size: 8.5px !important;
    line-height: 1.15 !important;
    gap: 2px !important;
  }
  .outbreak-setting-panel select,
  .outbreak-setting-panel input[type='number'] {
    height: 24px !important;
    min-height: 24px !important;
    font-size: 8.5px !important;
    padding: 1px 16px 1px 4px !important;
  }
  .outbreak-setting-inline-pair {
    grid-template-columns: 1fr !important;
    gap: 3px !important;
  }
  .outbreak-setting-panel .check-row {
    font-size: 8.5px !important;
    line-height: 1.1 !important;
    min-height: 22px !important;
  }
  .outbreak-setting-panel .check-row input {
    width: 13px !important;
    height: 13px !important;
  }
  .outbreak-cluster-overlay-strip {
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 4px !important;
  }
  .outbreak-cluster-overlay-strip .outbreak-overlay-note {
    display: none !important;
  }
  .outbreak-cluster-overlay-strip .check-row span {
    font-size: 8.5px !important;
  }
  .outbreak-cluster-overlay-strip .mini-btn {
    height: 23px !important;
    min-height: 23px !important;
    font-size: 0 !important;
    padding: 2px 5px !important;
  }
  .outbreak-cluster-overlay-strip .mini-btn .ui-icon {
    width: 12px !important;
    height: 12px !important;
  }
  .outbreak-actionbar {
    padding: 3px 5px !important;
  }
  .outbreak-section-nav-btn,
  .outbreak-methods-mini-btn {
    height: 25px !important;
    padding: 0 6px !important;
    font-size: 9px !important;
  }
  .outbreak-methods-mini-btn span:not(.outbreak-methods-arrow) {
    max-width: 118px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
@container (max-width:380px) {
  .outbreak-methods-mini-btn span:not(.outbreak-methods-arrow) {
    display: none;
  }
  .outbreak-methods-mini-btn {
    width: 27px !important;
    padding: 0 !important;
    justify-content: center !important;
  }
  .outbreak-methods-arrow {
    display: none;
  }
  .outbreak-section-nav-btn span {
    display: none;
  }
  .outbreak-section-nav-btn {
    width: 27px !important;
    padding: 0 !important;
    justify-content: center !important;
  }
  .outbreak-nav-chevron {
    display: none;
  }
}

/* Settings panel: respond to the actual resized pane width, never the browser width alone. */
.right-panel {
  container-type: inline-size !important;
  overflow: hidden !important;
}
.right-panel,
.right-panel * {
  box-sizing: border-box;
}
.right-panel .settings-inspector,
.right-panel .settings-pages,
.right-panel .control-page,
.right-panel .control-group,
.right-panel .settings-module,
.right-panel .settings-compact-section,
.right-panel .nested-setting {
  min-width: 0 !important;
  max-width: 100% !important;
}
.right-panel .settings-pages {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  contain: inline-size;
}
/*
 * Source section 31/53: right panel control page active.
 * Assembles into styles/base.css.
 * Rules remain in their original cascade order; later sections may intentionally override these
 * declarations.
 */
.right-panel .control-page.active {
  width: 100% !important;
  overflow-x: hidden !important;
}
.right-panel input:not([type='checkbox']):not([type='radio']):not([type='color']),
.right-panel select,
.right-panel textarea {
  min-width: 0 !important;
  max-width: 100% !important;
  width: 100%;
}
.right-panel .field-grid,
.right-panel .settings-grid,
.right-panel .compact-grid {
  min-width: 0 !important;
  max-width: 100% !important;
}
@container (max-width:285px) {
  .settings-inspector {
    grid-template-columns: minmax(0, 1fr) 38px !important;
  }
  .settings-tab-rail {
    width: 38px !important;
    min-width: 38px !important;
  }
  .settings-tab-rail .control-tab {
    width: 37px !important;
    min-width: 37px !important;
  }
  .settings-inspector .control-group {
    padding: 5px !important;
    margin: 3px !important;
  }
  .settings-inspector .control-group > label:not(.check-row),
  .supplied-cluster-fields label {
    grid-template-columns: 1fr !important;
    gap: 2px !important;
    align-items: stretch !important;
  }
  .settings-inspector .control-group > label:not(.check-row) > span {
    font-size: 9px !important;
    line-height: 1.15 !important;
  }
  .settings-inspector .control-group input:not([type='checkbox']):not([type='color']),
  .settings-inspector .control-group select {
    height: 24px !important;
    min-height: 24px !important;
    font-size: 9px !important;
  }
  .settings-inspector .field-grid {
    grid-template-columns: 1fr !important;
    gap: 4px !important;
  }
  .settings-page-titlebar {
    padding: 5px !important;
    gap: 5px !important;
  }
  .settings-page-titlebar small {
    display: none !important;
  }
  .settings-page-titlebar strong {
    font-size: 10.5px !important;
  }
  .settings-page-glyph {
    width: 22px !important;
    height: 22px !important;
  }
  .settings-inspector .button-grid {
    grid-template-columns: 1fr !important;
  }
  .settings-inspector .wide-btn,
  .settings-inspector .mini-btn {
    max-width: 100% !important;
    white-space: normal !important;
  }
}
@container (max-width:190px) {
  .settings-inspector {
    grid-template-columns: minmax(0, 1fr) 34px !important;
  }
  .settings-tab-rail {
    width: 34px !important;
    min-width: 34px !important;
  }
  .settings-tab-rail .control-tab {
    width: 33px !important;
    min-width: 33px !important;
  }
  .settings-page-glyph {
    display: none !important;
  }
  .settings-page-titlebar {
    min-height: 30px !important;
  }
  .settings-page-titlebar strong {
    font-size: 9.5px !important;
  }
}
.outbreak-actionbar {
  position: sticky !important;
  top: 0 !important;
}
.outbreak-settings-triptych > .outbreak-setting-panel:last-of-type {
  grid-column: auto !important;
}

.outbreak-settings-triptych {
  grid-template-columns: repeat(3, minmax(180px, 1fr)) !important;
  grid-auto-flow: row !important;
  min-width: 620px !important;
  overflow-x: auto !important;
  overflow-y: visible !important;
  align-items: stretch !important;
  scrollbar-width: thin;
}
.outbreak-settings-triptych > .outbreak-setting-panel {
  grid-column: auto !important;
  min-width: 180px !important;
  height: auto !important;
}
.outbreak-settings-triptych > .outbreak-cluster-overlay-strip {
  grid-column: 1/-1 !important;
  min-width: 0 !important;
}
@container (max-width:560px) {
  .outbreak-settings-triptych {
    grid-template-columns: repeat(3, minmax(180px, 1fr)) !important;
    min-width: 620px !important;
    gap: 6px !important;
    padding: 6px !important;
    overflow-x: auto !important;
  }
  .outbreak-setting-panel {
    min-width: 180px !important;
    padding: 6px !important;
  }
  .outbreak-setting-panel-title {
    font-size: 9.5px !important;
  }
  .outbreak-setting-panel label {
    font-size: 9px !important;
  }
  .outbreak-setting-panel select,
  .outbreak-setting-panel input[type='number'] {
    height: 26px !important;
    min-height: 26px !important;
    font-size: 9px !important;
  }
  .outbreak-setting-inline-pair {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 5px !important;
  }
}
@container (max-width:380px) {
  .outbreak-settings-triptych {
    grid-template-columns: repeat(3, minmax(180px, 1fr)) !important;
    min-width: 620px !important;
  }
}

.analysis-workspace,
.phylo-workspace,
.outbreak-workspace,
#clustersView.data-grid-workspace {
  scroll-padding-top: 48px !important;
}
.analysis-jump-target {
  scroll-margin-top: 48px !important;
}
.analysis-view-actionbar.shared-analysis-actionbar,
.outbreak-actionbar {
  position: sticky !important;
  top: 0 !important;
  z-index: 50 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 6px !important;
  min-height: 34px !important;
  padding: 4px 8px !important;
  overflow: visible !important;
  background: rgba(255, 255, 255, 0.98) !important;
  backdrop-filter: blur(5px);
  border-bottom: 1px solid var(--border) !important;
}
.shared-analysis-actionbar-left,
.shared-analysis-actionbar-right {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  position: relative;
}
.shared-analysis-actionbar-left {
  margin-right: auto;
}
.analysis-section-nav-btn,
.analysis-methods-mini-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 27px;
  padding: 0 8px;
  border: 1px solid #c7d4e4;
  border-radius: 7px;
  background: #fff;
  color: #344b68;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.analysis-methods-mini-btn {
  border-color: #bfd0e7;
  border-radius: 999px;
  background: #eef5ff;
  color: #294b75;
}
.analysis-section-nav-btn:hover,
.analysis-section-nav-btn[aria-expanded='true'] {
  background: #eef5ff;
  border-color: #a9bfdc;
  color: #234d7c;
}
.analysis-methods-mini-btn:hover {
  background: #e3efff;
  border-color: #9eb9d9;
}
.analysis-section-nav-btn .ui-icon,
.analysis-methods-mini-btn .ui-icon {
  width: 13px;
  height: 13px;
}
.analysis-nav-chevron {
  width: 11px !important;
  height: 11px !important;
}
.analysis-methods-arrow {
  font-size: 11px;
  color: #6885a8;
}
.analysis-section-nav-menu {
  position: absolute;
  left: 0;
  top: 32px;
  width: min(310px, 78vw);
  max-height: min(68vh, 520px);
  overflow: auto;
  padding: 5px;
  border: 1px solid #cbd6e4;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(30, 45, 65, 0.18);
  z-index: 190;
}
.analysis-section-nav-menu button {
  width: 100%;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  padding: 7px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  text-align: left;
  color: #31435c;
  cursor: pointer;
}
.analysis-section-nav-menu button:hover {
  background: #eef4fb;
}
.analysis-section-nav-menu .ui-icon {
  width: 15px;
  height: 15px;
  color: #55718e;
}
.analysis-section-nav-menu button > span {
  display: block;
  min-width: 0;
}
.analysis-section-nav-menu strong {
  display: block;
  font-size: 10.5px;
}
.analysis-section-nav-menu small {
  display: block;
  margin-top: 1px;
  font-size: 9px;
  color: #748096;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#clustersView > .analysis-view-actionbar {
  flex: 0 0 auto !important;
}

/* The three outbreak setting cards are always one row. Narrow panes scroll horizontally; cards never wrap 2+1. */
.outbreak-settings-triptych {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(185px, 1fr)) !important;
  grid-auto-flow: column !important;
  grid-auto-columns: minmax(185px, 1fr) !important;
  min-width: 590px !important;
  gap: 7px !important;
  padding: 7px 9px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  align-items: stretch !important;
  scrollbar-width: thin;
}
.outbreak-settings-triptych > .outbreak-setting-panel {
  grid-column: auto !important;
  min-width: 185px !important;
  height: 100% !important;
  padding: 7px 8px !important;
}
.outbreak-settings-triptych > .outbreak-setting-panel:last-of-type {
  grid-column: auto !important;
}
.outbreak-settings-triptych .outbreak-setting-inline-pair {
  grid-template-columns: minmax(72px, 0.8fr) minmax(112px, 1.2fr) !important;
  gap: 5px !important;
}
.outbreak-setting-panel .outbreak-cluster-overlay-box {
  margin-top: 1px;
  min-height: 29px;
  padding: 3px 5px;
  gap: 4px;
}
.outbreak-setting-panel .outbreak-cluster-overlay-box .check-row {
  font-size: 9px !important;
  line-height: 1.1;
}
.outbreak-setting-panel .outbreak-cluster-overlay-box .mini-btn {
  width: 25px;
  min-width: 25px;
  padding: 0 !important;
}
@container (max-width:620px) {
  .outbreak-settings-triptych {
    grid-template-columns: repeat(3, minmax(185px, 1fr)) !important;
    grid-auto-flow: column !important;
    min-width: 590px !important;
    overflow-x: auto !important;
  }
  .outbreak-settings-triptych > .outbreak-setting-panel {
    min-width: 185px !important;
  }
  .outbreak-setting-inline-pair {
    grid-template-columns: minmax(72px, 0.8fr) minmax(112px, 1.2fr) !important;
  }
}
@media (max-width: 1050px) {
  .outbreak-settings-triptych {
    grid-template-columns: repeat(3, minmax(185px, 1fr)) !important;
  }
  .outbreak-setting-panel:last-child {
    grid-column: auto !important;
  }
}
@media (max-width: 700px) {
  .outbreak-settings-triptych {
    grid-template-columns: repeat(3, minmax(185px, 1fr)) !important;
  }
  .outbreak-setting-panel:last-child {
    grid-column: auto !important;
  }
  .outbreak-setting-inline-pair {
    grid-template-columns: minmax(72px, 0.8fr) minmax(112px, 1.2fr) !important;
  }
}

@container (max-width:430px) {
  .analysis-section-nav-btn,
  .analysis-methods-mini-btn,
  .outbreak-section-nav-btn,
  .outbreak-methods-mini-btn {
    height: 25px !important;
    padding: 0 6px !important;
    font-size: 9px !important;
  }
  .analysis-methods-mini-btn span:not(.analysis-methods-arrow),
  .outbreak-methods-mini-btn span:not(.outbreak-methods-arrow) {
    max-width: 112px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .analysis-section-nav-menu,
  .outbreak-section-nav-menu {
    width: min(280px, 88vw);
  }
}
@container (max-width:300px) {
  .analysis-methods-mini-btn span:not(.analysis-methods-arrow),
  .analysis-methods-arrow,
  .analysis-section-nav-btn span,
  .analysis-nav-chevron {
    display: none;
  }
  .analysis-methods-mini-btn,
  .analysis-section-nav-btn {
    width: 27px !important;
    padding: 0 !important;
    justify-content: center !important;
  }
}
/* Split-workspace override: preserve the 3-card outbreak row instead of the older 2-column rule. */
.workspace-document-area.split-mode .outbreak-selector-row.outbreak-settings-triptych {
  grid-template-columns: repeat(3, minmax(185px, 1fr)) !important;
  grid-auto-flow: column !important;
  grid-auto-columns: minmax(185px, 1fr) !important;
  min-width: 590px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
}

#workspaceDocumentArea.workspace-document-area.split-mode.pane-max-left > .plot-view.split-secondary,
#workspaceDocumentArea.workspace-document-area.split-mode.pane-max-left > #clustersView.split-secondary {
  display: none !important;
}
#workspaceDocumentArea.workspace-document-area.split-mode.pane-max-right > .plot-view.split-primary,
#workspaceDocumentArea.workspace-document-area.split-mode.pane-max-right > #clustersView.split-primary {
  display: none !important;
}

.outbreak-setting-panel-title {
  font-weight: 800 !important;
}
.outbreak-setting-panel label,
.outbreak-setting-panel label > span {
  font-weight: 650 !important;
}
.outbreak-setting-panel .check-row,
.outbreak-setting-panel .check-row > span,
.outbreak-cluster-overlay-box .check-row > span {
  font-weight: 750 !important;
}
.settings-outbreak-mirror > summary {
  font-weight: 750 !important;
}
.settings-outbreak-mirror .settings-compact-body label,
.settings-outbreak-mirror .settings-compact-body label > span {
  font-weight: 600 !important;
}
.settings-outbreak-mirror .settings-compact-body .check-row,
.settings-outbreak-mirror .settings-compact-body .check-row > span {
  font-weight: 700 !important;
}

/* The virtual cluster table needs an explicit measured flow height. JavaScript updates this
   custom property from the rendered table/filter/inspector content. The interpretation block
   therefore follows the visible table instead of replacing it or leaving a large fixed gap. */
#clustersView .clustering-grid-main,
#clustersView .clustering-grid-main:has(#clusterInspector:not(.is-collapsed)) {
  flex: 0 0 var(--cluster-table-flow-height, 180px) !important;
  flex-basis: var(--cluster-table-flow-height, 180px) !important;
  height: var(--cluster-table-flow-height, 180px) !important;
  min-height: 96px !important;
  max-height: 520px !important;
  overflow: hidden !important;
}
.workspace-document-area.split-mode > #clustersView .clustering-grid-main,
.workspace-document-area.split-mode
  > #clustersView
  .clustering-grid-main:has(#clusterInspector:not(.is-collapsed)) {
  max-height: 440px !important;
}
#clustersView > #clusterInterpretationSection.cluster-interpretation-section {
  margin-top: 0 !important;
}

/* Outbreak evidence exposes every isolate explicitly rather than truncating the row preview. */
.outbreak-evidence-table {
  min-width: 1380px !important;
}
.outbreak-evidence-table .outbreak-isolates-col {
  min-width: 260px !important;
  max-width: 420px !important;
  white-space: normal !important;
  text-align: left !important;
}
.outbreak-evidence-table .outbreak-all-isolates {
  display: block;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.35;
  color: #3e4d62;
}

.analysis-save-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  z-index: 35;
}
.analysis-save-menu-btn {
  width: auto !important;
  min-width: 38px !important;
  padding: 0 6px !important;
  gap: 2px !important;
}
/*
 * Source section 32/53: analysis save menu btn save chevron.
 * Assembles into styles/base.css.
 * Rules remain in their original cascade order; later sections may intentionally override these
 * declarations.
 */
.analysis-save-menu-btn .save-chevron {
  width: 10px !important;
  height: 10px !important;
  opacity: 0.68;
}
.analysis-save-menu {
  position: absolute;
  top: calc(100% + 5px);
  right: 0;
  width: 238px;
  padding: 5px;
  background: #fff;
  border: 1px solid #cbd7e5;
  border-radius: 7px;
  box-shadow: 0 10px 28px rgba(29, 45, 68, 0.18);
  z-index: 140;
}
.analysis-save-menu.hidden {
  display: none !important;
}
.analysis-save-menu > button {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 7px 8px;
  border: 0;
  border-radius: 5px;
  background: #fff;
  color: #26384f;
  text-align: left;
  cursor: pointer;
}
.analysis-save-menu > button:hover {
  background: #eef5fb;
}
.analysis-save-menu > button strong {
  font-size: 10.8px;
  line-height: 1.25;
}
.analysis-save-menu > button small {
  font-size: 9.4px;
  line-height: 1.3;
  color: #66778b;
  font-weight: 400;
}
.analysis-save-separator {
  height: 1px;
  margin: 5px 3px;
  background: #d7e1ec;
  border-radius: 999px;
}
.shared-analysis-actionbar,
.outbreak-actionbar {
  overflow: visible !important;
}

.fit-width-button {
  appearance: none;
}
.fit-width-button.active,
.fit-width-button[aria-pressed='true'] {
  background: #eaf3fb;
  border-color: #9bbdd9;
  color: #173d5d;
}
.fit-width-button:not(.active)[aria-pressed='false'] {
  background: #fff;
  color: #53657a;
}

.outbreak-evidence-table .outbreak-col {
  min-width: 190px;
  max-width: 280px;
}
.outbreak-evidence-table .outbreak-isolate-preview {
  display: block;
  margin-top: 3px;
  font-size: 9.5px;
  line-height: 1.35;
  color: #66778b;
  white-space: normal;
}
.outbreak-evidence-table .outbreak-isolate-preview b {
  display: block;
  margin-bottom: 2px;
  color: #40536a;
}
.outbreak-evidence-table .outbreak-isolate-preview .outbreak-all-isolates {
  display: block;
  font-weight: 400;
  overflow-wrap: anywhere;
  word-break: break-word;
}

#clusterInterpretationSection .cluster-interpretation-header strong {
  font-size: 12.8px !important;
}
#clusterInterpretationSection .cluster-interpretation-body {
  font-size: 11.2px !important;
  line-height: 1.52 !important;
}
#clusterInterpretationSection .cluster-interpretation-text {
  font-size: 11.6px !important;
  line-height: 1.55 !important;
}
#clusterInterpretationSection .cluster-interpretation-table {
  font-size: 10.8px !important;
  line-height: 1.45 !important;
}
#clusterInterpretationSection .cluster-interpretation-table th,
#clusterInterpretationSection .cluster-interpretation-table td {
  padding: 5.5px 6.5px !important;
}
#clusterInterpretationSection .cluster-interpretation-disclaimer {
  font-size: 10.4px !important;
  line-height: 1.5 !important;
}

.outbreak-setting-vertical-pair {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}
.outbreak-setting-vertical-pair > label {
  min-width: 0;
}
.tree-action-strip,
.compact-action-strip,
.log-action-strip,
#metadataView .data-grid-toolbar {
  overflow: visible !important;
}
.data-save-wrap {
  z-index: 85;
}
.data-save-wrap .analysis-save-menu {
  z-index: 220;
}
@container (max-width:620px) {
  .outbreak-setting-vertical-pair {
    gap: 4px;
  }
}

.analysis-save-wrap {
  position: relative !important;
  display: inline-grid !important;
  place-items: center !important;
  align-self: center !important;
  height: 26px !important;
  min-height: 26px !important;
  vertical-align: middle !important;
  overflow: visible !important;
}
.analysis-save-menu-btn {
  position: relative !important;
  width: 30px !important;
  min-width: 30px !important;
  max-width: 30px !important;
  height: 26px !important;
  min-height: 26px !important;
  padding: 0 !important;
  margin: 0 !important;
  display: grid !important;
  place-items: center !important;
  line-height: 1 !important;
}
.analysis-save-menu-btn > .ui-icon:not(.save-chevron) {
  width: 14px !important;
  height: 14px !important;
  margin: 0 !important;
}
.analysis-save-menu-btn .save-chevron {
  position: absolute !important;
  right: 1px !important;
  bottom: 1px !important;
  width: 7px !important;
  height: 7px !important;
  margin: 0 !important;
  opacity: 0.65 !important;
  pointer-events: none !important;
}
.analysis-save-menu {
  position: fixed !important;
  top: auto;
  left: auto;
  right: auto;
  width: 238px !important;
  max-width: calc(100vw - 16px) !important;
  margin: 0 !important;
  z-index: 10000 !important;
}
.data-save-wrap {
  height: 26px !important;
  margin: 0 !important;
  padding: 0 !important;
}
#metadataView .data-grid-toolbar > .analysis-save-wrap {
  align-self: center !important;
  justify-self: start !important;
}

.font-size-menu-wrap {
  position: relative;
  display: inline-grid;
  place-items: center;
  height: 26px;
  flex: 0 0 auto;
  overflow: visible;
}
.font-size-menu-btn {
  position: relative !important;
  width: 30px !important;
  min-width: 30px !important;
  height: 26px !important;
  padding: 0 !important;
  display: grid !important;
  place-items: center !important;
}
.font-size-glyph {
  position: relative;
  display: block;
  width: 18px;
  height: 15px;
  line-height: 1;
  color: #354960;
  font-family: Arial, Helvetica, sans-serif;
}
.font-size-glyph-small {
  position: absolute;
  left: 1px;
  bottom: 1px;
  font-size: 9px;
  font-weight: 600;
}
.font-size-glyph-large {
  position: absolute;
  right: 0;
  top: 0;
  font-size: 14px;
  font-weight: 700;
}
.font-size-menu {
  position: fixed;
  width: 180px;
  padding: 4px;
  background: #fff;
  border: 1px solid #cbd7e5;
  border-radius: 7px;
  box-shadow: 0 10px 28px rgba(29, 45, 68, 0.18);
  z-index: 10000;
}
.font-size-menu.hidden {
  display: none !important;
}
.font-size-menu > button {
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  width: 100%;
  min-height: 30px;
  padding: 5px 7px;
  border: 0;
  border-radius: 5px;
  background: #fff;
  color: #26384f;
  text-align: left;
  cursor: pointer;
  font: 400 10.5px/1.25 var(--app-font-family);
}
.font-size-menu > button:hover {
  background: #eef5fb;
}
.font-menu-symbol {
  font-weight: 700;
  text-align: center;
  color: #24435f;
}
#clustersView .data-action-strip .font-size-menu-wrap,
#metadataView .data-action-strip .font-size-menu-wrap {
  order: 0 !important;
}

.outbreak-check-action-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 6px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.outbreak-check-action-row > .outbreak-check {
  flex: 1 1 auto;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.outbreak-check-action-row > .mini-btn {
  flex: 0 0 auto;
}

:root {
  --pw-blue: #3b6fd8;
  --pw-blue-soft: #eef5ff;
  --pw-cyan: #2287a6;
  --pw-cyan-soft: #ecf9fd;
  --pw-teal: #21856f;
  --pw-teal-soft: #ecf8f4;
  --pw-green: #2f8a57;
  --pw-green-soft: #eef9f2;
  --pw-amber: #b26a16;
  --pw-amber-soft: #fff7e8;
  --pw-orange: #c75f32;
  --pw-orange-soft: #fff1eb;
  --pw-rose: #b84d78;
  --pw-rose-soft: #fff0f6;
  --pw-violet: #7757bd;
  --pw-violet-soft: #f4efff;
  --pw-slate: #4d627c;
  --pw-slate-soft: #f1f5f9;
}

body.ui-color-rich {
  color: #18263a !important;
}

body.ui-color-rich {
  font-size: 12.5px;
  letter-spacing: 0.002em;
}

body.ui-color-rich .plot-subtitle,
body.ui-color-rich .panel-copy,
body.ui-color-rich .hint,
body.ui-color-rich .project-page-titlebar small,
body.ui-color-rich .analysis-section-title small,
body.ui-color-rich .outbreak-figure-subtitle {
  color: #52627a !important;
}

body.ui-color-rich input,
body.ui-color-rich select,
body.ui-color-rich textarea {
  color: #1c2c42 !important;
  border-color: #b9c9dc !important;
}

body.ui-color-rich input::placeholder,
body.ui-color-rich textarea::placeholder {
  color: #738197 !important;
  opacity: 1;
}

body.ui-color-rich button {
  font-weight: 600;
}

/* Stronger visual hierarchy around the three primary application areas. */

body.ui-color-rich .left-panel {
  background: linear-gradient(180deg, #effaf7 0%, #f5fbff 100%) !important;
  border: 1px solid #a8d8cb !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 18px rgba(33, 133, 111, 0.09) !important;
}

body.ui-color-rich .left-panel .side-panel-topbar {
  background: linear-gradient(90deg, #dff6ef, #e8f5ff) !important;
  border-bottom: 1px solid #afd9cf !important;
  color: #185f53 !important;
}

body.ui-color-rich .left-panel .project-inspector {
  border-color: #b7dcd3 !important;
  background: #fbfffd !important;
}

body.ui-color-rich .project-tab-rail {
  background: linear-gradient(180deg, #e1f5ef, #e9f1ff) !important;
  border-right-color: #acd5cb !important;
}

body.ui-color-rich .project-tab {
  color: #48667b !important;
}
body.ui-color-rich .project-tab:hover {
  background: #f7fffc !important;
  color: #176b5b !important;
}

body.ui-color-rich .project-tab.active {
  color: #176b5b !important;
  box-shadow: inset -3px 0 0 #23836e !important;
}
body.ui-color-rich .project-tab.active span {
  background: #d9f2ea !important;
  color: #176b5b !important;
}

body.ui-color-rich .project-page-titlebar {
  background: linear-gradient(90deg, #e5f8f1, #eef5ff) !important;
  border-bottom-color: #bcded5 !important;
  color: #183e46 !important;
}

body.ui-color-rich .project-explorer-toolbar {
  background: #f3fbf8 !important;
  border-color: #c4e1da !important;
}

body.ui-color-rich .project-tree-project > summary:hover,
body.ui-color-rich .project-branch-group > summary:hover {
  background: #eaf8f4 !important;
}

body.ui-color-rich .project-tree-project.active-project > summary {
  background: #def3ec !important;
  box-shadow: inset 3px 0 0 #21856f !important;
}

body.ui-color-rich .project-persistence-status {
  background: #edf8f4 !important;
  border-color: #c3e3d8 !important;
  color: #365f56 !important;
}

body.ui-color-rich .right-panel {
  background: linear-gradient(180deg, #f7f2ff 0%, #f4f8ff 100%) !important;
  border: 1px solid #d1c0ef !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 18px rgba(119, 87, 189, 0.08) !important;
}

body.ui-color-rich .right-panel .side-panel-topbar {
  background: linear-gradient(90deg, #efe6ff, #edf4ff) !important;
  border-bottom: 1px solid #d3c3ee !important;
  color: #5c4097 !important;
}

body.ui-color-rich .settings-inspector {
  border-color: #d7c8ee !important;
  background: #fcfbff !important;
}

body.ui-color-rich .settings-tab-rail {
  background: linear-gradient(180deg, #efe7ff, #eaf4ff, #e9f8f3) !important;
  border-left-color: #d4c4eb !important;
}

body.ui-color-rich .settings-tab-rail .control-tab {
  color: #625678 !important;
}
body.ui-color-rich .settings-tab-rail .control-tab:hover {
  background: #fbf8ff !important;
  color: #6c4eb2 !important;
}

body.ui-color-rich .settings-tab-rail .control-tab.active {
  background: #fff !important;
  color: #6d4fb1 !important;
  box-shadow: inset 3px 0 0 #7757bd !important;
}

body.ui-color-rich .settings-page-titlebar {
  background: linear-gradient(90deg, #f0e8ff, #eef5ff) !important;
  border-color: #d5c8e8 !important;
  color: #493878 !important;
}

body.ui-color-rich .settings-compact-section,
body.ui-color-rich .settings-module,
body.ui-color-rich .control-group {
  border-color: #cfd9e8 !important;
  box-shadow: 0 1px 4px rgba(48, 63, 90, 0.05) !important;
}

body.ui-color-rich .settings-compact-section > summary {
  background: linear-gradient(90deg, #f6f1ff, #f4f8ff) !important;
  color: #33445c !important;
  border-bottom-color: #d9dfea !important;
}

body.ui-color-rich .settings-compact-section:nth-of-type(3n/**/+1) {
  border-left: 3px solid var(--pw-violet) !important;
}

body.ui-color-rich .settings-compact-section:nth-of-type(3n/**/+2) {
  border-left: 3px solid var(--pw-blue) !important;
}

body.ui-color-rich .settings-compact-section:nth-of-type(3n) {
  border-left: 3px solid var(--pw-teal) !important;
}

/*
 * Source section 33/53: body ui color rich plot shell.
 * Assembles into styles/base.css.
 * Rules remain in their original cascade order; later sections may intentionally override these
 * declarations.
 */
body.ui-color-rich .plot-shell {
  border-color: #b7c9de !important;
  box-shadow: 0 8px 28px rgba(37, 65, 98, 0.11) !important;
}

body.ui-color-rich .plot-header {
  background: linear-gradient(90deg, #f7fbff 0%, #f3f8ff 45%, #f1faf7 72%, #fff5f8 100%) !important;
  border-bottom-color: #c7d7e6 !important;
}

body.ui-color-rich .plot-title {
  font-size: 17px !important;
  color: #172b46 !important;
}
body.ui-color-rich .plot-subtitle {
  font-size: 11.5px !important;
  line-height: 1.5 !important;
}

body.ui-color-rich .badge:nth-child(1) {
  background: var(--pw-blue-soft) !important;
  border-color: #bad0ef !important;
  color: #285a9e !important;
}

body.ui-color-rich .badge:nth-child(2) {
  background: var(--pw-teal-soft) !important;
  border-color: #b7dfd4 !important;
  color: #196b5a !important;
}

body.ui-color-rich .badge.good {
  background: var(--pw-green-soft) !important;
  border-color: #b9dfc9 !important;
  color: #217344 !important;
}

/* Colored tabs make the Data / Analysis workspaces easier to scan. */

body.ui-color-rich .workspace-tab-group-left .view-tab[data-view='main'] {
  --tab-color: #3b6fd8;
  --tab-soft: #edf4ff;
}

body.ui-color-rich .workspace-tab-group-left .view-tab[data-view='metadata'] {
  --tab-color: #1686a5;
  --tab-soft: #eaf9fd;
}

body.ui-color-rich .workspace-tab-group-left .view-tab[data-view='compact'] {
  --tab-color: #2f8a57;
  --tab-soft: #edf9f1;
}

body.ui-color-rich .workspace-tab-group-left .view-tab[data-view='log'] {
  --tab-color: #52667f;
  --tab-soft: #f0f4f8;
}

body.ui-color-rich .workspace-tab-group-right .view-tab[data-view='analysis'] {
  --tab-color: #6b60c7;
  --tab-soft: #f1efff;
}

body.ui-color-rich .workspace-tab-group-right .view-tab[data-view='clusters'] {
  --tab-color: #aa6a14;
  --tab-soft: #fff6e7;
}

body.ui-color-rich .workspace-tab-group-right .view-tab[data-view='phylo'] {
  --tab-color: #21856f;
  --tab-soft: #ecf8f4;
}

body.ui-color-rich .workspace-tab-group-right .view-tab[data-view='outbreak'] {
  --tab-color: #b84d78;
  --tab-soft: #fff0f6;
}

body.ui-color-rich .workspace-tab-group .view-tab:hover {
  background: var(--tab-soft, #f5f8fc) !important;
  color: var(--tab-color, #355f9a) !important;
}

body.ui-color-rich .workspace-tab-group .view-tab.active {
  background: var(--tab-soft, #fff) !important;
  color: var(--tab-color, #355f9a) !important;
  border-color: color-mix(in srgb, var(--tab-color, #355f9a) 40%, white) !important;
  font-weight: 750 !important;
}

body.ui-color-rich .workspace-tab-group .view-tab.active:before {
  background: var(--tab-color, #355f9a) !important;
}

body.ui-color-rich .workspace-tab-group .view-tab.active .ui-icon {
  color: var(--tab-color, #355f9a) !important;
}

/* Toolbars remain compact but are visually separated from the content. */

body.ui-color-rich .canvas-action-strip,
body.ui-color-rich .data-action-strip,
body.ui-color-rich .analysis-view-actionbar.shared-analysis-actionbar,
body.ui-color-rich .outbreak-actionbar {
  background: linear-gradient(90deg, #f7fbff, #f5f8fc) !important;
  border-bottom-color: #cbd9e7 !important;
  box-shadow: inset 0 -1px 0 rgba(71, 98, 130, 0.04);
}

body.ui-color-rich .canvas-action-strip button,
body.ui-color-rich .data-action-strip button,
body.ui-color-rich .analysis-view-actionbar button {
  border-color: #bccce0 !important;
  color: #30465f !important;
}

body.ui-color-rich .canvas-action-strip button:hover,
body.ui-color-rich .data-action-strip button:hover,
body.ui-color-rich .analysis-view-actionbar button:hover {
  background: #edf5ff !important;
  border-color: #95b3d6 !important;
  color: #214f81 !important;
}

/* Context-colored data workspaces. */

body.ui-color-rich #metadataView .data-summary-strip {
  background: linear-gradient(90deg, var(--pw-cyan-soft), #f3fbff) !important;
  border-bottom-color: #b7dce7 !important;
  color: #27566a !important;
}

body.ui-color-rich #clustersView > .data-summary-strip {
  background: linear-gradient(90deg, var(--pw-amber-soft), #fffaf1) !important;
  border-bottom-color: #ead2aa !important;
  color: #6e4b18 !important;
}

body.ui-color-rich #logView .log-action-strip {
  background: linear-gradient(90deg, #eef3f8, #f7f9fc) !important;
}

/* Analysis cards get semantic color rather than a uniform gray box. */

body.ui-color-rich #analysisView .professional-analysis-section {
  border: 1px solid #c5d1f2 !important;
  border-left: 4px solid #6b60c7 !important;
  background: #fff !important;
  box-shadow: 0 2px 8px rgba(107, 96, 199, 0.06) !important;
}

body.ui-color-rich #analysisView .analysis-section-title {
  background: linear-gradient(90deg, #f1efff, #f6f8ff) !important;
  color: #4a4387 !important;
  border-bottom-color: #d8d2f3 !important;
}

body.ui-color-rich #clustersView .cluster-interpretation-section {
  border: 1px solid #e2c48e !important;
  border-left: 4px solid var(--pw-amber) !important;
  background: #fffdf8 !important;
  box-shadow: 0 2px 8px rgba(178, 106, 22, 0.07) !important;
}

body.ui-color-rich #clustersView .cluster-interpretation-section h3 {
  color: #694814 !important;
}

body.ui-color-rich #phyloView .professional-analysis-section {
  border: 1px solid #b8ddd3 !important;
  border-left: 4px solid var(--pw-teal) !important;
  background: #fff !important;
  box-shadow: 0 2px 8px rgba(33, 133, 111, 0.06) !important;
}

body.ui-color-rich #phyloView .analysis-section-title {
  background: linear-gradient(90deg, #eaf8f3, #f3fbf8) !important;
  color: #246455 !important;
  border-bottom-color: #c4e3da !important;
}

body.ui-color-rich #outbreakView .professional-analysis-section {
  border: 1px solid #e6bfd0 !important;
  border-left: 4px solid var(--pw-rose) !important;
  background: #fff !important;
  box-shadow: 0 2px 8px rgba(184, 77, 120, 0.06) !important;
}

body.ui-color-rich #outbreakView .analysis-section-title {
  background: linear-gradient(90deg, #fff0f6, #fff7fa) !important;
  color: #7d3150 !important;
  border-bottom-color: #edccda !important;
}

/* Outbreak settings use three distinct but coordinated colors. */

body.ui-color-rich #outbreakSettingsSection .outbreak-setting-panel {
  box-shadow: 0 2px 8px rgba(48, 66, 92, 0.06) !important;
  background: #fff !important;
}

body.ui-color-rich #outbreakSettingsSection .outbreak-setting-panel:nth-child(1) {
  border: 1px solid #c7bce9 !important;
  border-top: 4px solid var(--pw-violet) !important;
  background: linear-gradient(180deg, #faf8ff, #fff) !important;
}

body.ui-color-rich #outbreakSettingsSection .outbreak-setting-panel:nth-child(2) {
  border: 1px solid #b9dce6 !important;
  border-top: 4px solid var(--pw-cyan) !important;
  background: linear-gradient(180deg, #f3fbfd, #fff) !important;
}

body.ui-color-rich #outbreakSettingsSection .outbreak-setting-panel:nth-child(3) {
  border: 1px solid #b9ddd4 !important;
  border-top: 4px solid var(--pw-teal) !important;
  background: linear-gradient(180deg, #f2faf7, #fff) !important;
}

body.ui-color-rich #outbreakSettingsSection .outbreak-setting-panel-title {
  font-weight: 760 !important;
  color: #273c57 !important;
  font-size: 11.5px !important;
}

body.ui-color-rich #outbreakSettingsSection label {
  color: #35485f !important;
}

/* Figure cards rotate through readable accent colors without coloring plot backgrounds. */

body.ui-color-rich .cluster-analytics-grid .cluster-analytics-card:nth-child(4n/**/+1) {
  border-top: 3px solid var(--pw-blue) !important;
}

body.ui-color-rich .cluster-analytics-grid .cluster-analytics-card:nth-child(4n/**/+2) {
  border-top: 3px solid var(--pw-teal) !important;
}

body.ui-color-rich .cluster-analytics-grid .cluster-analytics-card:nth-child(4n/**/+3) {
  border-top: 3px solid var(--pw-amber) !important;
}

body.ui-color-rich .cluster-analytics-grid .cluster-analytics-card:nth-child(4n) {
  border-top: 3px solid var(--pw-violet) !important;
}

body.ui-color-rich .cluster-analytics-card h4 {
  color: #263a52 !important;
  font-size: 12.2px !important;
  font-weight: 750 !important;
}

body.ui-color-rich .cluster-analytics-grid .cluster-analytics-card:nth-child(4n/**/+1)>h4 {
  background: var(--pw-blue-soft) !important;
}

body.ui-color-rich .cluster-analytics-grid .cluster-analytics-card:nth-child(4n/**/+2)>h4 {
  background: var(--pw-teal-soft) !important;
}

body.ui-color-rich .cluster-analytics-grid .cluster-analytics-card:nth-child(4n/**/+3)>h4 {
  background: var(--pw-amber-soft) !important;
}

body.ui-color-rich .cluster-analytics-grid .cluster-analytics-card:nth-child(4n) > h4 {
  background: var(--pw-violet-soft) !important;
}

body.ui-color-rich .outbreak-analytics-card:nth-child(5n/**/+1) {
  border-top-color: var(--pw-rose) !important;
}
body.ui-color-rich .outbreak-analytics-card:nth-child(5n/**/+1)>h4 {
  background: var(--pw-rose-soft) !important;
}

body.ui-color-rich .outbreak-analytics-card:nth-child(5n/**/+2) {
  border-top-color: var(--pw-violet) !important;
}
body.ui-color-rich .outbreak-analytics-card:nth-child(5n/**/+2)>h4 {
  background: var(--pw-violet-soft) !important;
}

body.ui-color-rich .outbreak-analytics-card:nth-child(5n/**/+3) {
  border-top-color: var(--pw-teal) !important;
}
body.ui-color-rich .outbreak-analytics-card:nth-child(5n/**/+3)>h4 {
  background: var(--pw-teal-soft) !important;
}

body.ui-color-rich .outbreak-analytics-card:nth-child(5n/**/+4) {
  border-top-color: var(--pw-cyan) !important;
}
body.ui-color-rich .outbreak-analytics-card:nth-child(5n/**/+4)>h4 {
  background: var(--pw-cyan-soft) !important;
}

body.ui-color-rich .outbreak-analytics-card:nth-child(5n) {
  border-top-color: var(--pw-amber) !important;
}
body.ui-color-rich .outbreak-analytics-card:nth-child(5n) > h4 {
  background: var(--pw-amber-soft) !important;
}

/* Tables: stronger contrast and clearer row tracking. */

body.ui-color-rich .metadata-grid th,
body.ui-color-rich .cluster-summary-grid th,
body.ui-color-rich .cluster-interpretation-table th,
body.ui-color-rich .outbreak-table th {
  background: #eaf2fb !important;
  color: #223d5e !important;
  font-weight: 750 !important;
  border-color: #bfd0e3 !important;
}

body.ui-color-rich .metadata-grid td,
body.ui-color-rich .cluster-summary-grid td,
body.ui-color-rich .cluster-interpretation-table td,
body.ui-color-rich .outbreak-table td {
  color: #26384e !important;
  border-color: #d2ddea !important;
}

body.ui-color-rich .metadata-grid tbody tr:nth-child(even),
body.ui-color-rich .cluster-summary-grid tbody tr:nth-child(even),
body.ui-color-rich .cluster-interpretation-table tbody tr:nth-child(even),
body.ui-color-rich .outbreak-table tbody tr:nth-child(even) {
  background: #f8fbff !important;
}

body.ui-color-rich .metadata-grid tbody tr:hover,
body.ui-color-rich .cluster-summary-grid tbody tr:hover,
body.ui-color-rich .outbreak-table tbody tr:hover {
  background: #edf6ff !important;
}

/* Keep readability high in dense areas. */

body.ui-color-rich .project-tree-explorer {
  color: #263c50 !important;
}
body.ui-color-rich .project-switch {
  color: #24384c !important;
  font-weight: 650 !important;
}

body.ui-color-rich .analysis-workspace,
body.ui-color-rich .phylo-workspace,
body.ui-color-rich .outbreak-workspace {
  color: #26384e !important;
}

body.ui-color-rich .cluster-interpretation-text,
body.ui-color-rich .professional-note,
body.ui-color-rich .metric-list,
body.ui-color-rich .phylo-summary-body {
  line-height: 1.5 !important;
}

/* Ensure per-tab semantic colors win over the older theme-specific active-tab rules. */

body.ui-color-rich .workspace-tab-group-left .view-tab[data-view].active,
body.ui-color-rich .workspace-tab-group-right .view-tab[data-view].active {
  background: var(--tab-soft, #fff) !important;
  color: var(--tab-color, #355f9a) !important;
  border-color: color-mix(in srgb, var(--tab-color, #355f9a) 42%, white) !important;
}

body.ui-color-rich .workspace-tab-group-left .view-tab[data-view].active:before,
body.ui-color-rich .workspace-tab-group-right .view-tab[data-view].active:before {
  background: var(--tab-color, #355f9a) !important;
}

body.ui-color-rich .workspace-tab-group-left .view-tab[data-view].active .ui-icon,
body.ui-color-rich .workspace-tab-group-right .view-tab[data-view].active .ui-icon {
  color: var(--tab-color, #355f9a) !important;
}

body.ui-color-rich .font-size-icon {
  display: block;
  width: 18px;
  height: 16px;
  overflow: visible;
  color: #354960;
  pointer-events: none;
}

body.ui-color-rich .font-size-menu-btn .font-size-glyph,
body.ui-color-rich .font-size-menu-btn .font-size-glyph-small,
body.ui-color-rich .font-size-menu-btn .font-size-glyph-large {
  display: none !important;
}

.font-size-icon {
  display: block !important;
  width: 18px !important;
  height: 16px !important;
  overflow: visible !important;
  color: #354960;
  pointer-events: none;
}

.brand-mark {
  width: 42px !important;
  min-width: 42px !important;
  font-size: 9px !important;
  letter-spacing: 0.035em !important;
}
.performance-profiler {
  border: 1px solid #cfd9e6;
  border-radius: 7px;
  background: #fff;
  overflow: hidden;
}
.performance-empty {
  padding: 9px 10px;
  color: #66758a;
  font-size: 10.5px;
}
.performance-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid #dce4ed;
  background: #f7f9fc;
}
.performance-summary-grid > div {
  min-width: 0;
  padding: 8px;
  border-right: 1px solid #dce4ed;
}
.performance-summary-grid > div:last-child {
  border-right: 0;
}
.performance-summary-grid strong {
  display: block;
  font-size: 12px;
  color: #1f334d;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.performance-summary-grid span {
  display: block;
  margin-top: 2px;
  font-size: 8.8px;
  color: #69798e;
  line-height: 1.2;
}
.performance-last-run {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 9px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 9.5px;
  color: #405269;
}
.performance-last-run strong {
  color: #23374f;
}
.performance-table-wrap {
  max-height: 170px;
  overflow: auto;
}
.performance-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 9.5px;
}
.performance-table th,
.performance-table td {
  padding: 5px 7px;
  border-bottom: 1px solid #edf1f5;
  text-align: left;
  vertical-align: middle;
}
.performance-table th {
  position: sticky;
  top: 0;
  background: #f4f7fa;
  color: #52647a;
  font-size: 8.8px;
  text-transform: uppercase;
  letter-spacing: 0.035em;
  z-index: 1;
}
.performance-table th:nth-child(2),
.performance-table td:nth-child(2),
.performance-table th:nth-child(3),
.performance-table td:nth-child(3) {
  text-align: right;
  white-space: nowrap;
}
.performance-actions {
  margin-top: 6px;
}
@media (max-width: 980px) {
  .performance-summary-grid {
    grid-template-columns: 1fr;
  }
  .performance-summary-grid > div {
    border-right: 0;
    border-bottom: 1px solid #dce4ed;
  }
  .performance-summary-grid > div:last-child {
    border-bottom: 0;
  }
}

/*
 * Source section 34/53: performance recent.
 * Assembles into styles/base.css.
 * Rules remain in their original cascade order; later sections may intentionally override these
 * declarations.
 */
.performance-recent {
  border-top: 1px solid #e5ebf2;
}

:root {
  --clademap-ui-font-size: 12.5px;
  --clademap-ui-section-size: 13.5px;
  --clademap-ui-heading-size: 14.5px;
  --clademap-ui-title-size: 16px;
  --clademap-ui-project-title-size: 18px;
}
body.ui-unified-typography #app {
  font-size: var(--clademap-ui-font-size) !important;
}
body.ui-unified-typography
  #app
  :where(
    div,
    span,
    button,
    input,
    select,
    textarea,
    label,
    summary,
    td,
    th,
    p,
    li,
    small,
    pre,
    a,
    strong,
    b,
    em
  ):not(.plot-svg):not(.plot-svg *):not(.clademap-map-figure-element):not(.clademap-map-figure-element *),
body.ui-unified-typography
  :where(
    .menu-dropdown,
    .menu-dropdown *,
    .font-size-menu,
    .font-size-menu *,
    .analysis-save-menu,
    .analysis-save-menu *,
    .columns-popover,
    .columns-popover *,
    .header-popover,
    .header-popover *,
    .node-menu,
    .node-menu *
  ) {
  font-size: var(--clademap-ui-font-size) !important;
  line-height: 1.38;
}
body.ui-unified-typography
  #app
  :where(h4, .analysis-card-title, .cluster-analytics-card > h4, .outbreak-analytics-card > h4) {
  font-size: var(--clademap-ui-section-size) !important;
  line-height: 1.3 !important;
}
body.ui-unified-typography
  #app
  :where(h3, .settings-page-titlebar strong, .analysis-view-title, .outbreak-view-title) {
  font-size: var(--clademap-ui-heading-size) !important;
  line-height: 1.28 !important;
}
body.ui-unified-typography #app :where(h2, .brand-name) {
  font-size: var(--clademap-ui-title-size) !important;
  line-height: 1.22 !important;
}
body.ui-unified-typography #app .plot-title {
  font-size: var(--clademap-ui-project-title-size) !important;
  line-height: 1.2 !important;
}
body.ui-unified-typography #app .plot-subtitle {
  font-size: var(--clademap-ui-font-size) !important;
  line-height: 1.35 !important;
}
body.ui-unified-typography #app .plot-svg,
body.ui-unified-typography #app .plot-svg * {
  font-size: revert-layer;
}
body.ui-unified-typography #app .metadata-grid,
body.ui-unified-typography #app .cluster-summary-grid {
  font-size: var(--workspace-table-font-size, var(--clademap-ui-font-size)) !important;
}
body.ui-unified-typography #app .visually-hidden {
  font-size: 1px !important;
}
.global-font-control {
  height: auto !important;
  display: inline-flex !important;
  align-items: center !important;
  overflow: visible !important;
}
.global-font-control .global-font-menu-btn {
  min-width: 46px !important;
}
.global-font-control .font-size-icon {
  width: 18px !important;
  height: 16px !important;
}
.interface-font-settings-note {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 7px 8px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fafcff;
}
.interface-font-settings-note strong {
  color: #31445e;
}
.interface-font-settings-note span {
  color: var(--muted);
}
body.ui-unified-typography .topbar {
  height: auto !important;
  min-height: 68px !important;
  grid-template-rows: auto auto !important;
}
body.ui-unified-typography .modebar {
  height: auto !important;
  min-height: 27px !important;
}

/* Wordmark: wider, laboratory-style identity without compromising readability. */
.brand {
  gap: 10px !important;
  min-width: 286px !important;
}
.brand-mark {
  position: relative !important;
  width: 60px !important;
  min-width: 60px !important;
  height: 30px !important;
  border-radius: 7px !important;
  padding-left: 5px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: 0.16em !important;
  line-height: 1 !important;
  background: linear-gradient(110deg, #2e6ca4 0%, #367e9e 42%, #2f8b74 100%) !important;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.28),
    0 1px 2px rgba(31, 54, 78, 0.16) !important;
  overflow: hidden !important;
}
.brand-mark:before {
  content: '';
  position: absolute;
  left: 6px;
  top: 5px;
  width: 2px;
  height: 20px;
  border-radius: 2px;
  background: linear-gradient(
    #f3d35a 0 25%,
    transparent 25% 38%,
    #fff 38% 62%,
    transparent 62% 75%,
    #ef7f66 75% 100%
  );
  opacity: 0.9;
}
.brand-mark:after {
  content: '';
  position: absolute;
  right: 5px;
  bottom: 4px;
  width: 16px;
  height: 2px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.5);
}
.brand-name {
  font-weight: 700 !important;
  letter-spacing: 0.075em !important;
}
.brand-sub {
  letter-spacing: 0.01em !important;
}

/* Professional weight hierarchy: reserve heavy weight for headings, not every field label. */
body.ui-unified-typography #app :where(label, button, select, input, textarea, td, th, small, span) {
  font-weight: 400;
}
body.ui-unified-typography
  #app
  :where(
    .toolbar-btn,
    .mini-btn,
    .view-tab,
    .control-tab,
    .analysis-section-nav-btn,
    .analysis-methods-mini-btn,
    .outbreak-section-nav-btn,
    .outbreak-methods-mini-btn
  ) {
  font-weight: 560 !important;
}
body.ui-unified-typography
  #app
  :where(
    .analysis-section-title strong,
    .settings-page-titlebar strong,
    .outbreak-setting-panel-title,
    .cluster-interpretation-header strong,
    .cluster-analytics-header strong
  ) {
  font-weight: 650 !important;
}
body.ui-unified-typography
  #app
  :where(
    .settings-compact-section > summary,
    .settings-module-head strong,
    .settings-module-head label,
    .control-group h3
  ) {
  font-weight: 600 !important;
}

/* Outbreak settings: same typography and rhythm as the rest of the analysis interface. */
.outbreak-settings-triptych {
  gap: 8px !important;
  padding: 8px 10px !important;
  min-width: 620px !important;
  align-items: stretch !important;
}
.outbreak-settings-triptych > .outbreak-setting-panel {
  min-width: 190px !important;
  padding: 9px 10px !important;
  gap: 7px !important;
  border-radius: 7px !important;
}
.outbreak-setting-panel-title {
  font-size: var(--clademap-ui-section-size) !important;
  font-weight: 650 !important;
  line-height: 1.25 !important;
  letter-spacing: 0 !important;
  padding: 0 0 6px !important;
}
.outbreak-setting-panel label,
.outbreak-setting-panel label > span {
  font-size: var(--clademap-ui-font-size) !important;
  font-weight: 560 !important;
  line-height: 1.28 !important;
  color: #33465e !important;
}
.outbreak-setting-panel select,
.outbreak-setting-panel input[type='number'] {
  height: 31px !important;
  min-height: 31px !important;
  font-size: var(--clademap-ui-font-size) !important;
  font-weight: 400 !important;
  padding: 4px 26px 4px 8px !important;
  border-radius: 6px !important;
}
.outbreak-setting-panel input[type='number'] {
  padding-right: 7px !important;
}
.outbreak-setting-panel .check-row,
.outbreak-setting-panel .check-row > span {
  font-size: var(--clademap-ui-font-size) !important;
  font-weight: 520 !important;
  line-height: 1.28 !important;
}
.outbreak-setting-panel .check-row {
  min-height: 26px !important;
  gap: 7px !important;
}
.outbreak-setting-panel .check-row input {
  width: 15px !important;
  height: 15px !important;
}
.outbreak-check-action-row {
  min-height: 27px !important;
  gap: 7px !important;
}
.outbreak-check-action-row > .mini-btn {
  width: 28px !important;
  min-width: 28px !important;
  height: 27px !important;
  padding: 0 !important;
}
.outbreak-setting-vertical-pair {
  gap: 7px !important;
}
.settings-outbreak-mirror > summary {
  font-weight: 600 !important;
}
.settings-outbreak-mirror .settings-compact-body label,
.settings-outbreak-mirror .settings-compact-body label > span,
.settings-outbreak-mirror .settings-compact-body .check-row,
.settings-outbreak-mirror .settings-compact-body .check-row > span {
  font-weight: 500 !important;
}

/* Cleaner action bars. */
.analysis-view-actionbar,
.canvas-action-strip,
.data-action-strip {
  font-weight: 400 !important;
  border-color: #d8e0e9 !important;
  box-shadow: none !important;
}
.analysis-view-actionbar strong,
.canvas-action-strip strong,
.data-action-strip strong {
  font-weight: 600 !important;
}

/* Empty analysis state replaces a field of inactive cards when prerequisites are absent. */
.analysis-no-data-hidden {
  display: none !important;
}
.analysis-empty-state {
  margin: 20px auto;
  max-width: 620px;
  min-height: 150px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px 14px;
  align-items: center;
  padding: 20px 22px;
  border: 1px dashed #b9c8d9;
  border-radius: 10px;
  background: linear-gradient(180deg, #fbfcfe, #f7f9fc);
  color: #405269;
}
.analysis-empty-state.hidden {
  display: none !important;
}
.analysis-empty-icon {
  width: 42px;
  height: 42px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: #edf3f8;
  color: #58718f;
}
.analysis-empty-icon .ui-icon {
  width: 22px;
  height: 22px;
}
.analysis-empty-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.analysis-empty-copy strong {
  font-size: var(--clademap-ui-heading-size) !important;
  font-weight: 650 !important;
  color: #263a52;
}
.analysis-empty-copy span {
  font-size: var(--clademap-ui-font-size) !important;
  color: #617187;
  line-height: 1.4;
}
.analysis-empty-actions {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.analysis-empty-actions .mini-btn {
  min-height: 30px !important;
}

/* Single right-side scroll path: content scrolls; icon rail and outer panel do not. */
.right-panel {
  overflow: hidden !important;
}
.right-panel .settings-inspector {
  height: 100% !important;
  min-height: 0 !important;
  overflow: hidden !important;
  align-items: stretch !important;
}
.right-panel .settings-pages {
  height: 100% !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  scrollbar-gutter: stable !important;
  contain: none !important;
}
.right-panel .settings-tab-rail {
  height: 100% !important;
  min-height: 0 !important;
  overflow: hidden !important;
  position: relative !important;
  top: auto !important;
}
body.controls-collapsed .right-panel .settings-tab-rail {
  overflow: hidden !important;
}

/* Detailed-analysis launcher uses an unambiguous open-in-new-view icon. */
.analysis-section-title {
  justify-content: flex-start !important;
}
.analysis-section-title > div {
  flex: 1 1 auto;
  min-width: 0;
}
.analysis-section-title > .section-kicker {
  margin-left: auto;
}
.analysis-section-popout-btn {
  width: 28px;
  height: 27px;
  min-width: 28px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #c7d3e1;
  border-radius: 6px;
  background: #fff;
  color: #526b86;
  cursor: pointer;
  flex: 0 0 auto;
}
.analysis-section-popout-btn:hover {
  background: #edf4fb;
  border-color: #9fb5cc;
  color: #244f7b;
}
.analysis-section-popout-btn .ui-icon {
  width: 14px;
  height: 14px;
}
.cluster-interpretation-header,
.cluster-analytics-header {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}
.cluster-interpretation-header > .analysis-section-popout-btn,
.cluster-analytics-header > .analysis-section-popout-btn {
  margin-left: auto;
}
.outbreak-card-actions [data-outbreak-popout] .ui-icon,
.cluster-card-actions .cluster-popout-btn .ui-icon {
  width: 14px !important;
  height: 14px !important;
}
.double-window-icon {
  display: none !important;
}

.analysis-detail-modal {
  width: min(1180px, 94vw) !important;
  height: min(86vh, 900px) !important;
  max-width: 1180px !important;
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
  overflow: hidden !important;
}
.analysis-detail-modal-head {
  border-bottom: 1px solid #d8e1eb;
}
.analysis-detail-modal-body {
  min-height: 0;
  overflow: auto;
  padding: 12px;
  background: #f5f7fa;
}
.analysis-popout-clone {
  margin: 0 !important;
  max-width: none !important;
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  background: #fff !important;
}
.analysis-popout-clone
  :where(
    .analysis-table,
    .outbreak-table-wrap,
    .insight-table-wrap,
    .analysis-card-body,
    .cluster-interpretation-table-wrap,
    .cluster-analytics-grid
  ) {
  max-height: none !important;
  height: auto !important;
  overflow: visible !important;
}
/*
 * Source section 35/53: analysis popout clone table.
 * Assembles into styles/base.css.
 * Rules remain in their original cascade order; later sections may intentionally override these
 * declarations.
 */
.analysis-popout-clone table {
  width: 100% !important;
  max-width: 100% !important;
}
.analysis-popout-clone .analysis-section-title {
  position: static !important;
}

/* Bottom status bar: memory at far left plus visible staged-computation progress. */
.professional-statusbar {
  height: 34px !important;
  background: #edf2f7 !important;
  border-top-color: #c8d3df !important;
  overflow: hidden !important;
}
.status-segment {
  font-size: 10.5px !important;
  font-weight: 400 !important;
  padding: 0 9px !important;
  position: relative;
}
.status-segment b {
  font-size: 8.5px !important;
  font-weight: 600 !important;
}
.status-memory {
  min-width: 104px;
  color: #36526a;
  background: #f4f8fb;
}
.memory-indicator {
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: #3d8e74;
  box-shadow: 0 0 0 2px rgba(61, 142, 116, 0.1);
}
.status-memory.estimated .memory-indicator {
  background: #7d8da0;
}
.status-primary {
  min-width: 230px;
  max-width: 360px;
  font-weight: 520 !important;
  color: #273b54 !important;
  padding-bottom: 3px !important;
}
.status-indicator {
  width: 7px !important;
  height: 7px !important;
}
body.is-computing .status-indicator {
  background: #d18a28 !important;
  box-shadow: 0 0 0 2px rgba(209, 138, 40, 0.13) !important;
  animation: clademap-status-pulse 1s ease-in-out infinite;
}
@keyframes clademap-status-pulse {
  0%,
  100% {
    opacity: 0.65;
  }
  50% {
    opacity: 1;
  }
}
.status-progress-track {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: transparent;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.status-progress-track.active {
  opacity: 1;
  background: #dce5ef;
}
#statusProgressBar {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #2b7cad, #328b75);
  transition: width 0.18s ease-out;
}

@media (max-width: 1180px) {
  .status-memory {
    min-width: 88px;
  }
  .status-primary {
    min-width: 180px;
  }
  .status-copyright,
  .status-copyright-sep {
    display: none !important;
  }
  .brand {
    min-width: 250px !important;
  }
}

.analysis-empty-state {
  box-shadow: 0 12px 30px rgba(24, 58, 94, 0.06);
}
.analysis-empty-icon {
  align-self: start;
  margin-top: 2px;
}
.analysis-empty-copy strong {
  font-size: calc(var(--interface-font-size, 12.5px) * 1.08);
  font-weight: 700;
  letter-spacing: 0.005em;
  color: #1e3650;
}
.analysis-empty-copy span {
  font-size: var(--interface-font-size, 12.5px);
  line-height: 1.5;
  color: #607188;
}
.analysis-empty-actions {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}
.analysis-empty-actions .mini-btn {
  min-height: 30px;
  padding: 5px 10px;
  font-size: var(--interface-font-size, 12.5px);
  font-weight: 600;
}
.analysis-detail-modal {
  width: min(1540px, 98vw) !important;
  max-width: 1540px !important;
  height: min(92vh, 980px) !important;
}
.analysis-detail-modal-body {
  overflow: auto !important;
  padding: 16px !important;
  background: #f2f5f8 !important;
}
.analysis-popout-clone {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
}
.analysis-popout-outbreakEvidenceSection {
  width: 1480px !important;
  min-width: 1480px !important;
}
.analysis-popout-clone .analysis-section-title,
.analysis-popout-clone .cluster-interpretation-header,
.analysis-popout-clone .cluster-analytics-header {
  position: sticky !important;
  left: 0;
  z-index: 2;
}
.analysis-popout-outbreakEvidenceSection .outbreak-table-wrap {
  width: 1480px !important;
  max-width: none !important;
  overflow: visible !important;
}
.analysis-popout-outbreakEvidenceSection .outbreak-evidence-table {
  width: 1480px !important;
  min-width: 1480px !important;
  max-width: none !important;
  table-layout: fixed !important;
  border-collapse: collapse !important;
}
.analysis-popout-outbreakEvidenceSection .outbreak-evidence-table th,
.analysis-popout-outbreakEvidenceSection .outbreak-evidence-table td {
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
  vertical-align: top !important;
  line-height: 1.4 !important;
  padding: 8px 9px !important;
}
.analysis-popout-outbreakEvidenceSection .outbreak-evidence-table .outbreak-col {
  width: 190px !important;
  min-width: 190px !important;
  max-width: 190px !important;
}
.analysis-popout-outbreakEvidenceSection .outbreak-evidence-table .cluster-col {
  width: 165px !important;
  min-width: 165px !important;
  max-width: 165px !important;
}
.analysis-popout-outbreakEvidenceSection .outbreak-evidence-table .interpretation-col {
  width: 205px !important;
  min-width: 205px !important;
  max-width: 205px !important;
}
.analysis-popout-outbreakEvidenceSection .outbreak-evidence-table .num {
  white-space: nowrap !important;
}
.analysis-popout-outbreakEvidenceSection .outbreak-all-isolates {
  display: block !important;
  margin-top: 4px !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
}
.analysis-popout-clone .outbreak-dossier-grid,
.analysis-popout-clone .outbreak-context-grid {
  grid-template-columns: repeat(2, minmax(320px, 1fr)) !important;
  width: min(1320px, calc(98vw - 80px)) !important;
  max-width: 1320px !important;
}
.analysis-popout-clone .outbreak-selected-detail {
  width: min(1320px, calc(98vw - 80px)) !important;
  max-width: 1320px !important;
}

#clustersView #clusterTableSection.analysis-no-data-hidden,
#clustersView #clusterTableSection.cluster-tools-no-data {
  display: none !important;
}

/* The upper edge of Clustering interpretation is a draggable horizontal boundary. */
#clustersView .cluster-interpretation-divider {
  position: relative;
  flex: 0 0 18px;
  min-height: 18px;
  margin: 0 10px;
  cursor: row-resize;
  touch-action: none;
  outline: none;
  z-index: 4;
}
#clustersView .cluster-interpretation-divider::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 8px;
  height: 1px;
  background: #b9d5eb;
}
#clustersView .cluster-interpretation-divider > span {
  position: absolute;
  left: 50%;
  top: 5px;
  width: 54px;
  height: 7px;
  transform: translateX(-50%);
  border: 1px solid #9abbd6;
  border-radius: 4px;
  background: #f7fbff;
  box-shadow: 0 1px 2px rgba(31, 55, 88, 0.08);
}
#clustersView .cluster-interpretation-divider:hover > span,
#clustersView .cluster-interpretation-divider:focus-visible > span,
body.resizing-cluster-interpretation #clustersView .cluster-interpretation-divider > span {
  border-color: #4f88b8;
  background: #dceeff;
  box-shadow: 0 0 0 2px rgba(79, 136, 184, 0.16);
}
#clustersView.cluster-table-resized .clustering-grid-main,
#clustersView.cluster-table-resized .clustering-grid-main:has(#clusterInspector:not(.is-collapsed)) {
  flex: 0 0 var(--cluster-table-user-height) !important;
  flex-basis: var(--cluster-table-user-height) !important;
  height: var(--cluster-table-user-height) !important;
  max-height: none !important;
}
body.resizing-cluster-interpretation,
body.resizing-cluster-interpretation * {
  cursor: row-resize !important;
  user-select: none !important;
}
body.ui-color-rich #clustersView .cluster-interpretation-divider::before {
  background: #e2c48e;
}
body.ui-color-rich #clustersView .cluster-interpretation-divider > span {
  border-color: #cda65f;
  background: #fffaf0;
}
#phyloView.phylo-no-data .analysis-top-cards-phylo,
#phyloView.phylo-no-data #phyloFiguresSection,
#phyloView.phylo-no-data .professional-phylo-sections,
#phyloView.phylo-no-data #phyloSettingsSection,
#phyloView.phylo-no-data #phyloProvenance,
#phyloView.phylo-no-data #phyloRequirementBanner {
  display: none !important;
}
.view-tab[data-view='phylo'] {
  opacity: 1 !important;
  cursor: pointer !important;
}
.view-tab[data-view='phylo'].tree-analysis-disabled {
  opacity: 1 !important;
  cursor: pointer !important;
  background: inherit !important;
  color: inherit !important;
}

.node-menu-separator {
  height: 1px;
  background: var(--border, #d8dee8);
  margin: 5px 3px;
}
.node-menu .danger-action {
  color: #b42318;
}
.tree-quality-modal {
  width: min(900px, 92vw);
  max-height: 88vh;
}
.tree-quality-body {
  padding: 16px 18px;
  overflow: auto;
  display: grid;
  gap: 14px;
}
.tree-qc-status {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border-radius: 9px;
  background: #eef6ff;
  border: 1px solid #bfdbfe;
}
.tree-qc-status.good {
  background: #effbf4;
  border-color: #b7e4c7;
}
.tree-qc-status.warning {
  background: #fff8e7;
  border-color: #f4d58d;
}
.tree-qc-status.error {
  background: #fff1f0;
  border-color: #f3b5ae;
}
.tree-qc-section {
  border: 1px solid var(--border, #d8dee8);
  border-radius: 9px;
  padding: 12px;
  background: var(--panel, #fff);
}
.tree-qc-section h3 {
  margin: 0 0 8px;
  font-size: 13px;
}
.tree-qc-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--border, #e5e7eb);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 7px;
  overflow: hidden;
}
.tree-qc-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 9px;
  background: var(--panel, #fff);
  font-size: 12px;
}
.tree-qc-row strong {
  font-variant-numeric: tabular-nums;
}
.tree-qc-issues {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 5px;
  font-size: 12px;
}
.tree-qc-issues .error {
  color: #b42318;
}
.tree-qc-issues .warning {
  color: #9a6700;
}
.tree-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 0 18px 16px;
}
.tree-qc-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted, #667085);
  margin: 0 0 8px;
}
.clade-annotation {
  pointer-events: none;
}
.tree-locate-pulse {
  animation: locatePulse 0.55s ease-in-out 3;
  filter: drop-shadow(0 0 3px currentColor);
}
@keyframes locatePulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.28;
  }
}
#dataHealthPill[role='button'] {
  cursor: pointer;
}
.analysis-no-data-hidden#phyloTechnicalSummary {
  display: block !important;
}
@media (max-width: 700px) {
  .tree-qc-metrics {
    grid-template-columns: 1fr;
  }
}

.tree-autocollapse {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(110px, 0.7fr);
  gap: 7px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line, #d7dee8);
}
.tree-autocollapse label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 11.5px;
  color: var(--muted, #64748b);
}
.tree-autocollapse input {
  min-width: 0;
  width: 100%;
}
.tree-autocollapse .secondary-btn {
  align-self: end;
}

.tree-editing-settings .tree-editing-note,
.compact-inherit-strip,
.publication-export-note {
  border: 1px solid #d9e4ef;
  background: #f7fafe;
  border-radius: 7px;
  padding: 7px 8px;
  color: #42566f;
  line-height: 1.35;
}
.tree-editing-settings .settings-subsection-label {
  margin-top: 8px;
  font-weight: 650;
  color: #263b53;
}
.tree-edit-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}
.tree-edit-grid button {
  min-height: 30px;
  white-space: normal;
  line-height: 1.2;
}
.tree-annotation-inline {
  display: grid;
  gap: 6px;
  padding: 7px;
  border: 1px solid #e0e7ef;
  border-radius: 7px;
  background: #fff;
}
.compact-selection-card {
  margin-top: 4px;
}
.publication-export-note {
  display: grid;
  gap: 2px;
  margin: 6px 0;
}
.publication-export-note strong {
  color: #20364d;
}
.publication-pdf-btn {
  font-weight: 650;
  border-color: #87a7c8 !important;
  background: #eef5fc !important;
  color: #173c62 !important;
}
.publication-pdf-btn:hover {
  background: #e3effa !important;
}
#compactSvg .compact-node-hit {
  cursor: pointer;
  pointer-events: all;
}
/*
 * Source section 36/53: compact svg compact collapsed node.
 * Assembles into styles/base.css.
 * Rules remain in their original cascade order; later sections may intentionally override these
 * declarations.
 */
#compactSvg .compact-collapsed-node {
  cursor: pointer;
  pointer-events: all;
}
#compactSvg .compact-tree-selection {
  vector-effect: non-scaling-stroke;
}
.node-menu-settings-note {
  padding: 7px 9px;
  color: #5a6d83;
  font-size: 12px;
  line-height: 1.35;
  max-width: 260px;
}

.workspace-tab-save-btn {
  height: 25px !important;
  min-height: 25px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  padding: 0 7px !important;
  border: 1px solid #cbd6e3 !important;
  border-radius: 5px !important;
  background: #fff !important;
  color: #2e4259 !important;
  font-size: 9.5px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  cursor: pointer !important;
}
.workspace-tab-save-btn:hover {
  background: #eef4fa !important;
  border-color: #afc1d5 !important;
}
.workspace-tab-save-btn > .ui-icon {
  width: 13px !important;
  height: 13px !important;
  position: static !important;
  margin: 0 !important;
}
.workspace-tab-save-btn > .save-chevron {
  width: 11px !important;
  height: 11px !important;
  opacity: 0.86 !important;
}
.data-workspace-save-wrap {
  display: inline-flex !important;
  align-items: center !important;
  margin-left: auto !important;
  margin-right: 6px !important;
  padding-left: 6px !important;
  border-left: 1px solid #d6dee8 !important;
  position: relative !important;
}
.workspace-tab-group-left > .workspace-tab-spacer {
  display: none !important;
}

/* Save menus are deliberately compact action lists. */
.analysis-save-menu {
  z-index: 32000 !important;
  padding: 4px !important;
  width: 220px !important;
}
.analysis-save-menu > button {
  display: block !important;
  padding: 7px 9px !important;
  text-align: left !important;
  line-height: 1.2 !important;
}
.analysis-save-menu > button strong {
  font-size: 10.5px !important;
  font-weight: 500 !important;
}
.analysis-save-menu > button small {
  display: none !important;
}
.analysis-save-separator {
  margin: 3px 5px !important;
  border-top: 1px solid #e2e8f0 !important;
}

/* Floating tree/context menus always sit above the Settings drawer, but below modal dialogs. */
.columns-popover.global-floating-panel,
.node-menu.global-floating-panel {
  z-index: 30000 !important;
}
.menu-dropdown.global-floating-menu {
  z-index: 31000 !important;
}
.modal-backdrop {
  z-index: 70000 !important;
}
.node-menu.global-floating-panel {
  width: 190px !important;
  padding: 7px !important;
}
.node-menu-name {
  font-weight: 650 !important;
  padding: 4px 6px 7px !important;
  border-bottom: 1px solid #dce4ed !important;
  margin-bottom: 4px !important;
}
.node-menu button {
  width: 100% !important;
  text-align: left !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 4px !important;
  padding: 6px 7px !important;
  font-size: 10.5px !important;
  color: #26384f !important;
  cursor: pointer !important;
}
.node-menu button:hover {
  background: #edf4fb !important;
}
.node-menu button.danger-action {
  color: #b42318 !important;
}
.node-menu-separator {
  height: 1px;
  background: #dfe5ed;
  margin: 4px 5px !important;
}

/* Small, persistent render-context line below Tree / Compact action bars. */
.tree-render-notice {
  min-height: 20px;
  padding: 3px 9px;
  border-top: 1px solid #e9edf2;
  border-bottom: 1px solid #e1e7ee;
  background: #f7fafc;
  color: #53657a;
  font-size: 9.2px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tree-render-notice.notice-warning {
  background: #fff8e8;
  color: #8a5a14;
  border-color: #f1d8a4;
}
.tree-render-notice:empty {
  display: none;
}

/* Never let a long setting name invade the input/value column. */
.settings-inspector
  :is(.settings-compact-body, .settings-module-body, .settings-subsection, .metadata-field-column)
  label:not(.check-row)
  > span,
.settings-inspector .settings-inline-grid label:not(.check-row) > span {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  display: block !important;
}
.settings-inspector label {
  min-width: 0 !important;
}
.settings-inspector input,
.settings-inspector select,
.settings-inspector textarea {
  min-width: 0 !important;
  max-width: 100% !important;
}
.concise-note {
  font-size: 9px !important;
  color: #66758a !important;
  margin: 0 0 2px !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
}

/* Distance-only settings remain visible but inactive for phylogenetic-tree modes. */
.conditional-setting.is-disabled {
  opacity: 0.46 !important;
  pointer-events: none !important;
}
.conditional-setting.is-disabled > summary {
  cursor: default !important;
}

/* Automatic collapse: one aligned rule per row, matching the rest of Tree settings. */
.tree-autocollapse {
  display: grid !important;
  gap: 5px !important;
  padding: 6px !important;
}
.tree-autocollapse .auto-collapse-min {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(86px, 42%) !important;
  gap: 6px !important;
  align-items: center !important;
}
.tree-autocollapse .auto-collapse-rule {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 68px !important;
  gap: 5px !important;
  align-items: center !important;
  border-top: 1px solid #edf1f5;
  padding-top: 5px !important;
}
.tree-autocollapse .auto-collapse-rule label {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(84px, 43%) !important;
  gap: 6px !important;
  align-items: center !important;
  min-width: 0 !important;
  font-size: 9.6px !important;
  color: #435169 !important;
}
.tree-autocollapse .auto-collapse-rule button {
  height: 25px !important;
  padding: 2px 6px !important;
  font-size: 9.5px !important;
}
.tree-autocollapse input {
  height: 25px !important;
  min-height: 25px !important;
  font-size: 9.5px !important;
}

/* Publication/tree metadata controls. */
.columns-panel-actions {
  display: flex !important;
  gap: 5px !important;
  flex-wrap: wrap !important;
}
.columns-panel-actions button {
  flex: 1 1 auto !important;
}
.metadata-field-column input[data-field-control='compact-missing'] {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace !important;
}

/* Clear scale icon affordance in both toolbars. */
.scaling-action-btn .ui-icon {
  width: 15px !important;
  height: 15px !important;
  stroke-width: 1.7 !important;
}

/* Clade annotation custom position row is kept out of layout until selected. */
#annotationCustomPosition.hidden {
  display: none !important;
}

@media (max-width: 1320px) {
  .workspace-tab-save-btn > span {
    display: none !important;
  }
  .workspace-tab-save-btn {
    width: 31px !important;
    justify-content: center !important;
    padding: 0 3px !important;
    gap: 1px !important;
  }
}

.workspace-tab-group-left > .pane-maximize-btn {
  margin-left: 1px !important;
}

.tree-autocollapse {
  grid-template-columns: minmax(0, 1fr) !important;
  width: 100% !important;
}
.tree-autocollapse .auto-collapse-min {
  width: 100% !important;
  grid-template-columns: minmax(0, 1fr) 92px !important;
}
.tree-autocollapse .auto-collapse-rule {
  width: 100% !important;
  grid-template-columns: minmax(0, 1fr) 68px !important;
}
.tree-autocollapse .auto-collapse-rule label {
  grid-template-columns: minmax(0, 1fr) 94px !important;
}
.tree-autocollapse .auto-collapse-rule label > span,
.tree-autocollapse .auto-collapse-min > span {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  min-width: 0 !important;
}

.data-action-save-wrap {
  margin-left: auto !important;
  flex: 0 0 auto !important;
}
.tree-action-strip > .data-action-save-wrap,
.compact-action-strip > .data-action-save-wrap,
.log-action-strip > .data-action-save-wrap,
#metadataView .data-grid-toolbar > .data-action-save-wrap {
  margin-left: auto !important;
}
.data-action-save-wrap .analysis-save-menu-btn {
  width: 30px !important;
  min-width: 30px !important;
  max-width: 30px !important;
  height: 26px !important;
  min-height: 26px !important;
  padding: 0 !important;
  display: grid !important;
  place-items: center !important;
}
.data-action-save-wrap .analysis-save-menu-btn > .ui-icon:not(.save-chevron) {
  width: 14px !important;
  height: 14px !important;
}
.data-action-save-wrap .analysis-save-menu-btn .save-chevron {
  right: 1px !important;
  bottom: 1px !important;
  width: 7px !important;
  height: 7px !important;
}

#collapsedList {
  max-height: 320px !important;
  overflow: auto !important;
  padding: 5px !important;
}
#collapsedList .collapsed-item {
  min-height: 34px !important;
  padding: 6px 7px !important;
  align-items: flex-start !important;
}
#collapsedList .collapsed-item > div {
  min-width: 0;
  line-height: 1.25;
}
#collapsedList .collapsed-item strong {
  display: block;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}
#collapsedList .collapsed-item .mini-btn {
  flex: 0 0 auto;
  margin-top: 1px;
}

.workspace-tab-group > .pane-maximize-btn {
  margin-left: auto !important;
  order: 100 !important;
}
.workspace-tab-group > .workspace-tab-spacer {
  order: 99 !important;
  flex: 0 0 0 !important;
  min-width: 0 !important;
}

.workspace-tab-group {
  position: relative !important;
  padding-right: 74px !important;
}
.workspace-tab-group > .pane-maximize-btn {
  position: absolute !important;
  right: 4px !important;
  bottom: 4px !important;
  margin: 0 !important;
  order: initial !important;
  z-index: 8 !important;
}
.workspace-tab-group > .workspace-tab-spacer {
  display: none !important;
}
@media (max-width: 1320px) {
  .workspace-tab-group {
    padding-right: 34px !important;
  }
  .workspace-tab-group > .pane-maximize-btn {
    right: 4px !important;
    bottom: 4px !important;
  }
}

#tab-appearance #collapsedList {
  max-height: 320px !important;
  overflow: auto !important;
}

.canvas-interaction-footer {
  flex: 0 0 auto;
  min-height: 24px;
  padding: 5px 10px;
  border-top: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.25;
  white-space: normal;
}

.tree-settings-navigator {
  position: sticky;
  top: 0;
  z-index: 24;
  display: grid;
  gap: 6px;
  padding: 7px 7px 6px;
  background: color-mix(in srgb, var(--panel, #fff) 94%, #eef3f8 6%);
  border-bottom: 1px solid var(--border, #d8dee8);
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.05);
}
.tree-settings-nav-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(108px, 0.78fr);
  gap: 6px;
  align-items: center;
}
.tree-settings-search,
.tree-settings-section-nav {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  min-height: 29px;
  height: 29px;
  font-size: 10.5px;
}
.tree-settings-scope {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px;
  padding: 2px;
  background: #eef2f6;
  border: 1px solid #d8e0e8;
  border-radius: 7px;
}
.tree-settings-scope-btn {
  min-height: 25px;
  height: 25px;
  padding: 3px 7px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #5b6878;
  font-size: 10px;
  font-weight: 600;
}
.tree-settings-scope-btn:hover {
  background: #fff;
}
.tree-settings-scope-btn.active {
  background: #fff;
  color: var(--accent, #315b86);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
}
.tree-settings-profile-section {
  margin-top: 6px !important;
}
.tree-settings-profile-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}
.tree-settings-profile-actions button {
  min-width: 0;
  min-height: 27px;
  height: auto;
  padding: 5px 7px;
  font-size: 9.5px;
  white-space: normal;
  line-height: 1.2;
}
.tree-settings-filter-hidden,
.metadata-field-not-selected {
  display: none !important;
}
#treeMetadataFieldNavigator {
  padding: 6px 7px;
  margin-top: 5px;
  border: 1px solid var(--border, #d8dee8);
  border-radius: 7px;
  background: #f8fafc;
}
#treeMetadataFieldNavigator label {
  display: grid;
  grid-template-columns: minmax(86px, 0.8fr) minmax(112px, 1.2fr);
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 9.5px;
  color: #45536a;
}
#treeMetadataFieldNavigator select {
  width: 100%;
  min-width: 0;
  min-height: 28px;
  height: 28px;
}
/*
 * Source section 37/53: tree annotation selector row.
 * Assembles into styles/base.css.
 * Rules remain in their original cascade order; later sections may intentionally override these
 * declarations.
 */
#treeAnnotationSelectorRow {
  margin-bottom: 2px;
}
#tab-appearance
  :is(
    .settings-compact-section,
    .settings-module,
    #treeMetadataFieldNavigator,
    [id^='tree'][class*='settings-']
  ) {
  scroll-margin-top: 96px;
}
#treeCladeAnnotationAnchor {
  scroll-margin-top: 96px;
}
#settingsMemoryStatus {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}
@media (max-width: 1180px) {
  .tree-settings-nav-row {
    grid-template-columns: 1fr;
  }
  .tree-settings-navigator {
    gap: 5px;
  }
  #settingsMemoryStatus {
    max-width: 120px;
  }
}
.tree-settings-no-match {
  margin: 7px;
  padding: 10px;
  text-align: center;
  border: 1px dashed var(--border, #d8dee8);
  border-radius: 7px;
  background: #fafbfd;
}

.tree-settings-navigator {
  gap: 4px;
  padding: 5px 6px;
  background: #eef1f5;
  border-bottom: 1px solid #d7dde6;
  box-shadow: none;
}
.tree-settings-nav-row {
  gap: 4px;
}
.tree-settings-search,
.tree-settings-section-nav {
  min-height: 25px !important;
  height: 25px !important;
  padding: 2px 6px !important;
  border: 1px solid var(--border-strong, #c8d3e3) !important;
  border-radius: var(--ui-control-radius, 7px) !important;
  background: var(--panel, #fff) !important;
  color: var(--text, #172033) !important;
  font-size: 9.5px !important;
  line-height: 1.15 !important;
  box-shadow: none !important;
}
.tree-settings-search::placeholder {
  color: #7b8798;
  opacity: 1;
}
.tree-settings-search:hover,
.tree-settings-section-nav:hover {
  border-color: #b8c4d2 !important;
  background: #fbfcfe !important;
}
.tree-settings-search:focus,
.tree-settings-section-nav:focus {
  border-color: color-mix(in srgb, var(--accent, #375dfb) 52%, #ffffff) !important;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent, #375dfb) 11%, transparent) !important;
}
.tree-settings-scope {
  gap: 4px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}
.tree-settings-scope-btn {
  min-height: 23px;
  height: 23px;
  padding: 2px 6px;
  border: 1px solid #cbd3de;
  border-radius: var(--ui-control-radius, 7px);
  background: #fff;
  color: #516077;
  font-size: 9.5px;
  font-weight: 600;
  line-height: 1.1;
  box-shadow: none;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}
.tree-settings-scope-btn:hover {
  background: #f7f9fc;
  border-color: #b9c5d3;
  color: #334155;
}
.tree-settings-scope-btn.active {
  background: var(--accent-soft, #eef2ff);
  border-color: color-mix(in srgb, var(--accent, #375dfb) 34%, #d7dde6);
  color: var(--accent, #375dfb);
  box-shadow: none;
  font-weight: 700;
}
.tree-settings-profile-section {
  margin-top: 4px !important;
}
.tree-settings-profile-actions {
  gap: 4px;
}
.tree-settings-profile-actions button {
  min-width: 0;
  min-height: 25px;
  height: 25px;
  padding: 2px 6px;
  border: 1px solid var(--border, #dce3ef);
  border-radius: var(--ui-control-radius, 7px);
  background: var(--panel, #fff);
  color: var(--text, #172033);
  font-size: 9.5px;
  font-weight: 600;
  line-height: 1.1;
  white-space: nowrap;
  box-shadow: none;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}
.tree-settings-profile-actions button:hover:not(:disabled) {
  background: #f7f9fd;
  border-color: var(--border-strong, #c8d3e3);
}
.tree-settings-profile-actions button:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent, #375dfb) 28%, transparent);
  outline-offset: 1px;
}
.tree-settings-profile-actions button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: #f5f6f8;
  color: #7f8a99;
}
#treeMetadataFieldNavigator {
  margin: 4px 5px;
  padding: 5px 7px;
  border: 1px solid #d7dde5;
  border-radius: var(--ui-panel-radius, 8px);
  background: #fff;
  box-shadow: none;
}
#treeMetadataFieldNavigator label {
  grid-template-columns: minmax(78px, 0.72fr) minmax(0, 1.28fr);
  gap: 6px;
  color: #435169;
  font-size: 10px;
}
#treeMetadataFieldNavigator select {
  min-height: 25px !important;
  height: 25px !important;
  padding: 2px 5px !important;
  border-color: var(--border-strong, #c8d3e3) !important;
  border-radius: var(--ui-control-radius, 7px) !important;
  font-size: 10px !important;
}
.tree-settings-no-match {
  margin: 4px 5px;
  padding: 7px 8px;
  border: 1px solid #d7dde5;
  border-radius: var(--ui-panel-radius, 8px);
  background: #f8fafc;
  color: var(--muted, #6f7b91);
  font-size: 10px;
}

body.ui-colorful .tree-settings-navigator {
  background: linear-gradient(90deg, #f6f3fb 0%, #f4f8fc 100%);
  border-bottom-color: #dbd7e5;
}
body.ui-colorful .tree-settings-scope-btn.active {
  background: #f0ebf8;
  border-color: #cbbfe0;
  color: #684f9b;
}
body.ui-colorful .tree-settings-search:focus,
body.ui-colorful .tree-settings-section-nav:focus {
  border-color: #b9a8d3 !important;
  box-shadow: 0 0 0 2px rgba(104, 79, 155, 0.1) !important;
}
body.ui-colorful #treeMetadataFieldNavigator {
  border-color: #ddd9e8;
  background: #fbfaff;
}
body.ui-colorful .tree-settings-profile-actions button:hover:not(:disabled) {
  background: #f9f7ff;
  border-color: #cfc5df;
}

/* Profile actions use the exact compact action-button geometry already used by Tree editing controls. */
#tab-appearance .tree-settings-profile-actions button {
  min-height: 24px !important;
  height: auto !important;
  padding: 4px 5px !important;
  border-radius: 4px !important;
  font-size: 9.3px !important;
  line-height: 1.2 !important;
}

.canvas-interaction-footer--canvas {
  width: 100%;
  min-height: 24px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  padding: 4px 10px 5px;
  border-top: 1px solid #dde2e8;
  background: #f1f3f5;
  color: #5f6875;
  font-size: 10.5px;
  line-height: 1.25;
  letter-spacing: 0.002em;
  white-space: normal;
  position: relative;
  z-index: 6;
}
body.ui-color-rich .canvas-interaction-footer--canvas,
body.ui-colorful .canvas-interaction-footer--canvas {
  background: color-mix(in srgb, var(--panel, #fff) 92%, #e8edf4 8%);
  border-top-color: var(--border, #dce3ef);
  color: var(--muted, #6c7788);
}
.tree-quality-settings > .settings-compact-body {
  padding-top: 6px;
}
.tree-settings-group-heading {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 7px 7px 3px;
  color: #56657a;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}
.tree-settings-group-heading::after {
  content: '';
  flex: 1 1 auto;
  min-width: 12px;
  border-top: 1px solid #dde3eb;
}
.tree-settings-group-heading.tree-settings-group-hidden {
  display: none !important;
}
body.ui-color-rich .tree-settings-group-heading,
body.ui-colorful .tree-settings-group-heading {
  color: color-mix(in srgb, var(--accent, #5c5ce2) 58%, #526074);
}

body.pane-maximized .plot-shell {
  grid-template-rows: auto minmax(0, 1fr) !important;
}
body.pane-maximized .workspace-document-area {
  height: 100% !important;
  min-height: 0 !important;
}
body.pane-maximized .workspace-document-area.split-mode.pane-max-left > .plot-view.split-primary,
body.pane-maximized .workspace-document-area.split-mode.pane-max-right > .plot-view.split-secondary {
  height: 100% !important;
  min-height: 0 !important;
}
body.pane-maximized #mainView.split-primary,
body.pane-maximized #compactView.split-primary {
  flex-direction: column !important;
}
body.pane-maximized :is(#plotScroller, #compactScroller) {
  flex: 1 1 auto !important;
  min-height: 0 !important;
}

/* Metadata track text is intentionally compact. Full values remain available
   to legends/keys; rendered cells are ellipsized in JavaScript to their track. */
#treeDefaultColumnWidth {
  font-variant-numeric: tabular-nums;
}

#treeMetadataFieldNavigator {
  position: relative;
  margin: 5px 5px 4px !important;
  padding: 7px 8px !important;
  border: 1px solid #b9c8dd !important;
  border-left: 3px solid #6e88b8 !important;
  border-radius: 7px !important;
  background: linear-gradient(90deg, #f3f7fc 0%, #fbfcfe 100%) !important;
}
#treeMetadataFieldNavigator label > span {
  color: #314968 !important;
  font-weight: 750 !important;
  letter-spacing: 0.005em;
}
#treeMetadataFieldNavigator select {
  background: #fff !important;
  border-color: #b8c5d7 !important;
}
body.ui-colorful #treeMetadataFieldNavigator,
body.ui-color-rich #treeMetadataFieldNavigator {
  border-color: #c8bedb !important;
  border-left-color: #8066ad !important;
  background: linear-gradient(90deg, #f5f1fa 0%, #fbfaff 100%) !important;
}
body.ui-colorful #treeMetadataFieldNavigator label > span,
body.ui-color-rich #treeMetadataFieldNavigator label > span {
  color: #5f4b86 !important;
}

/* Interoperability remains a separate top-level group. */
.tree-interoperability-settings .setting-note {
  margin-bottom: 6px;
}

.full-setting-row {
  grid-template-columns: minmax(132px, 1fr) minmax(90px, 148px) !important;
}
.full-setting-row > span {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
}
.metadata-defaults > summary {
  font-weight: 700;
}
.disabled-setting-row {
  opacity: 0.55;
}
.offset-emphasis {
  background: #f6f9ff;
  border-radius: 4px;
}
.field-order-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: end;
  padding: 6px;
  border: 1px solid #cfd9e8;
  border-radius: 5px;
  background: #f5f8fc;
}
.field-order-row label {
  display: grid !important;
  grid-template-columns: minmax(90px, 0.78fr) minmax(80px, 1.22fr) !important;
  align-items: center !important;
  gap: 6px !important;
  margin: 0 !important;
}
.field-order-actions {
  display: flex;
  gap: 3px;
}
.field-order-actions button {
  width: 26px;
  height: 25px;
  padding: 0;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #fff;
  color: #334155;
  cursor: pointer;
}
.field-order-actions button:hover {
  border-color: #7b9bca;
  background: #f3f7fd;
}
.metadata-header-block {
  background: #f2f8f6 !important;
  border-color: #cfe3dc !important;
}
.metadata-header-block > .metadata-field-block-title {
  color: #26715c !important;
  border-bottom-color: #d7ebe4 !important;
}
.metadata-track-field-block {
  background: #f8f5fc !important;
  border-color: #ddd3eb !important;
}
.metadata-track-field-block > .metadata-field-block-title {
  color: #6b4f91 !important;
  border-bottom-color: #e6dff0 !important;
}
.metadata-field-block-title[role='button'] {
  cursor: pointer;
  position: relative;
  padding-right: 18px !important;
  user-select: none;
}
.metadata-field-block-title[role='button']:after {
  content: '▾';
  position: absolute;
  right: 3px;
  top: 0;
  font-size: 10px;
}
.metadata-field-block.is-collapsed-setting > .metadata-field-block-title:after {
  content: '▸';
}
.metadata-field-block.is-collapsed-setting > :not(.metadata-field-block-title) {
  display: none !important;
}
.metadata-original-value-toggle {
  display: none !important;
}
.value-label-row {
  border-top: 1px solid #ece7f4;
  padding-top: 4px !important;
}
.tree-column-extra {
  display: grid;
  gap: 4px;
}
#treeMetadataFieldNavigator {
  border: 1px solid #c7d7ec !important;
  border-left: 3px solid #6e88b8 !important;
  background: #eef5ff !important;
  border-radius: 5px !important;
  padding: 7px !important;
}
#treeMetadataFieldNavigator label > span {
  font-weight: 700 !important;
  color: #315b92 !important;
}
@media (min-width: 1500px) {
  .full-setting-row {
    grid-template-columns: minmax(155px, 1fr) minmax(115px, 165px) !important;
  }
}

/* Long setting names use a full label row and a full control row. */
.settings-inspector .settings-compact-body > label.full-setting-row,
.settings-inspector .settings-module-body > label.full-setting-row,
.settings-inspector .settings-subsection label.full-setting-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: auto auto !important;
  align-items: stretch !important;
  gap: 3px !important;
  min-width: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
}

/* Subsection titles use normal sentence case throughout Tree Settings. */
#tab-appearance .settings-subsection-label,
#tab-appearance .metadata-field-block-title,
#tab-appearance .metadata-field-column.metadata-field-subsection > summary,
#tab-appearance .metadata-mini-heading,
#tab-appearance .settings-subsection > summary {
  text-transform: none !important;
  letter-spacing: 0 !important;
}

/* The .settings-pages element is the one vertical scroller. Keeping the active
   Tree page overflow visible lets the navigator stick to that scroller reliably. */
.right-panel #tab-appearance.control-page.active {
  overflow: visible !important;
}
#treeSettingsNavigator.tree-settings-navigator {
  position: sticky !important;
  top: 0 !important;
  z-index: 220 !important;
  align-self: stretch !important;
  width: 100% !important;
  flex: 0 0 auto !important;
}

.applied-annotations {
  display: grid;
  gap: 4px;
  margin: 4px 0 7px;
}
.annotation-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 5px;
  padding: 5px 6px;
  border: 1px solid var(--border, #d8dee8);
  border-radius: 5px;
  background: #fafbfd;
}
/*
 * Source section 38/53: annotation row is disabled.
 * Assembles into styles/base.css.
 * Rules remain in their original cascade order; later sections may intentionally override these
 * declarations.
 */
.annotation-row.is-disabled {
  opacity: 0.58;
  background: #f3f5f7;
}
.annotation-row input[type='checkbox'] {
  width: 14px;
  height: 14px;
  margin: 0;
}
.annotation-info {
  min-width: 0;
  display: grid;
  gap: 1px;
}
.annotation-info strong {
  font-size: 9.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #2c3b52;
}
.annotation-info small {
  font-size: 8.5px;
  color: #6c7889;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.annotation-row button {
  min-height: 23px !important;
  height: 23px !important;
  padding: 2px 6px !important;
  font-size: 9px !important;
}
.annotation-row .delete-annotation {
  color: #a12622 !important;
}
#tipLabelWidthCharsRow.disabled-annotation-row,
#tipLabelMaxCharsRow.disabled-annotation-row {
  opacity: 0.55;
}

.metadata-scale-control {
  display: grid !important;
  grid-template-columns: minmax(64px, 1fr) auto auto !important;
  align-items: center !important;
  gap: 5px !important;
  width: 100% !important;
  min-width: 0 !important;
}
.metadata-scale-control input {
  min-width: 0 !important;
  width: 100% !important;
}
.metadata-scale-control > span {
  font-weight: 700;
  color: #546176;
  font-size: 10px;
}
.metadata-scale-control small {
  font-size: 9px;
  color: #718096;
  white-space: nowrap;
}
.compact-track-auto-note {
  margin-top: 4px !important;
  padding: 6px 7px !important;
  border: 1px solid #e4e8ef !important;
  border-radius: 5px !important;
  background: #f8fafc !important;
}
[data-compact-track].is-track-option-hidden {
  display: none !important;
}

.brand {
  gap: 9px !important;
  min-width: 210px !important;
  align-items: center !important;
}
.brand-logo {
  display: block !important;
  width: 126px !important;
  max-width: 126px !important;
  height: auto !important;
  object-fit: contain !important;
  flex: 0 0 auto !important;
}
.brand-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}
.brand-copy .brand-name {
  line-height: 1 !important;
  letter-spacing: 0 !important;
}
.brand-copy .brand-sub {
  max-width: 210px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand-mark {
  display: none !important;
}
@media (max-width: 1180px) {
  .brand {
    min-width: 180px !important;
  }
  .brand-logo {
    width: 112px !important;
    max-width: 112px !important;
  }
  .brand-copy .brand-sub {
    display: none !important;
  }
}
@media (max-width: 860px) {
  .brand-logo {
    width: 96px !important;
    max-width: 96px !important;
  }
  .brand {
    min-width: 150px !important;
  }
}

.topbar {
  min-height: 60px !important;
  height: 60px !important;
  grid-template-columns: 190px minmax(0, 1fr) !important;
  grid-template-rows: 22px 37px !important;
  grid-template-areas: 'brand menu' 'toolbar toolbar' !important;
  column-gap: 10px !important;
  padding: 0 8px !important;
  overflow: visible !important;
}
.brand {
  min-width: 0 !important;
  max-width: 190px !important;
  height: 22px !important;
  gap: 5px !important;
  align-items: center !important;
  overflow: visible !important;
}
.brand-logo {
  display: block !important;
  width: auto !important;
  max-width: 148px !important;
  height: auto !important;
  max-height: 28px !important;
  object-fit: contain !important;
  object-position: left center !important;
  flex: 0 1 auto !important;
}
.brand-copy {
  display: flex !important;
  min-width: 0 !important;
  align-items: center !important;
  justify-content: center !important;
}
.brand-copy .brand-name {
  line-height: 1 !important;
}
.brand-copy .brand-sub {
  display: none !important;
}
.version-badge {
  font-size: 8px !important;
  white-space: nowrap !important;
}
.menubar {
  height: 22px !important;
  min-height: 22px !important;
  align-items: center !important;
}
.menu-trigger {
  height: 21px !important;
  min-height: 21px !important;
  padding: 1px 7px !important;
  line-height: 18px !important;
}
@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: 165px minmax(0, 1fr) !important;
  }
  .brand {
    max-width: 165px !important;
  }
  .brand-logo {
    max-width: 126px !important;
    max-height: 27px !important;
  }
}
@media (max-width: 900px) {
  .brand-logo {
    max-width: 112px !important;
  }
  .brand {
    max-width: 145px !important;
  }
  .topbar {
    grid-template-columns: 145px minmax(0, 1fr) !important;
  }
}

.metadata-figures-view {
  background: #f5f7fa !important;
  min-height: 0 !important;
  overflow: hidden !important;
}
.metadata-figures-toolbar {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 43px;
  padding: 5px 8px;
  border-bottom: 1px solid #cdd6e1;
  background: #f8fafc;
  flex: 0 0 auto;
}
.metadata-figures-toolbar-title {
  display: flex;
  flex-direction: column;
  min-width: 220px;
  margin-right: auto;
}
.metadata-figures-toolbar-title strong {
  font-size: 12px;
  color: #21334b;
}
.metadata-figures-toolbar-title span {
  font-size: 9px;
  color: #718096;
  margin-top: 1px;
}
.metadata-figure-preset {
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  margin: 0 !important;
}
.metadata-figure-preset > span {
  font-size: 9px !important;
  margin: 0 !important;
  color: #66758a;
}
.metadata-figure-preset select {
  min-width: 130px !important;
  height: 27px !important;
}
.metadata-figure-summary-strip {
  display: flex;
  align-items: center;
  gap: 0;
  min-height: 29px;
  border-bottom: 1px solid #d5dde7;
  background: #fff;
  overflow-x: auto;
  flex: 0 0 auto;
}
.metadata-figure-summary-strip > span {
  display: flex;
  align-items: baseline;
  gap: 4px;
  padding: 5px 10px;
  border-right: 1px solid #e5e9ef;
  font-size: 9px;
  color: #68778b;
  white-space: nowrap;
}
.metadata-figure-summary-strip strong {
  font-size: 10px;
  color: #25374e;
  text-transform: capitalize;
}
.metadata-figures-layout {
  display: grid;
  grid-template-columns: minmax(205px, 245px) minmax(360px, 1fr) minmax(235px, 290px);
  min-height: 0;
  flex: 1;
  background: #d9e0e8;
  gap: 1px;
  overflow: hidden;
}
.metadata-figure-mapping-panel,
.metadata-figure-settings-panel {
  background: #f8fafc;
  min-height: 0;
  overflow: auto;
  padding: 8px;
}
.metadata-figure-settings-panel {
  padding: 0 7px 10px;
}
.metadata-figure-canvas-panel {
  background: #fff;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.metadata-figure-panel-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 3px 2px 7px;
  border-bottom: 1px solid #dbe2ea;
  margin-bottom: 7px;
}
.metadata-figure-panel-head strong {
  font-size: 11px;
  color: #24364e;
}
.metadata-figure-panel-head span {
  font-size: 9px;
  color: #718096;
  line-height: 1.3;
}
.metadata-figure-panel-head.sticky {
  position: sticky;
  top: 0;
  z-index: 4;
  background: #f8fafc;
  padding: 8px 2px 7px;
  margin: 0 -1px 5px;
}
.metadata-figure-mapping-panel > label,
.metadata-role-grid label,
.mf-settings-body > label,
.mf-settings-body .mf-grid-2 > label {
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
  margin: 0 0 7px !important;
  color: #46566d !important;
  font-size: 9px !important;
  font-weight: 600 !important;
}
.metadata-figure-mapping-panel label > span,
.mf-settings-body label > span {
  display: block !important;
  margin: 0 !important;
}
.metadata-figure-mapping-panel select,
.metadata-figure-mapping-panel input,
.mf-settings-body select,
.mf-settings-body input:not([type='checkbox']) {
  width: 100% !important;
  min-width: 0 !important;
  height: 28px !important;
  padding: 3px 7px !important;
  border: 1px solid #ccd6e2 !important;
  border-radius: 5px !important;
  background: #fff !important;
  color: #24364e !important;
  font-size: 10px !important;
}
.metadata-role-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 7px;
}
.metadata-role-grid small {
  font-size: 8px;
  color: #718096;
  font-weight: 400;
}
.metadata-matrix-fields {
  margin: 5px 0 8px;
  border: 1px solid #d7e0e9;
  border-radius: 6px;
  background: #fff;
}
.metadata-matrix-fields summary {
  cursor: pointer;
  padding: 6px 8px;
  font-size: 9px;
  font-weight: 700;
  color: #3e5067;
}
.metadata-matrix-fields.is-relevant {
  border-color: #87a2d8;
  box-shadow: 0 0 0 1px rgba(49, 95, 196, 0.06);
}
.metadata-matrix-field-list {
  max-height: 180px;
  overflow: auto;
  padding: 3px 7px 7px;
}
.metadata-matrix-field-list label {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 5px;
  align-items: center;
  padding: 3px 0;
  margin: 0 !important;
  font-size: 9px !important;
}
.metadata-matrix-field-list small {
  font-size: 8px;
  color: #7c8798;
}
.metadata-relationship-hint {
  padding: 7px;
  border-radius: 6px;
  background: #eef4ff;
  border: 1px solid #d7e2f7;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.metadata-relationship-hint strong {
  font-size: 9px;
  color: #315fc4;
  text-transform: capitalize;
}
.metadata-relationship-hint span {
  font-size: 8.5px;
  color: #5f6f84;
  line-height: 1.35;
}
.metadata-figure-canvas-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-height: 43px;
  padding: 7px 10px;
  border-bottom: 1px solid #dce3eb;
  background: #fbfcfe;
}
.metadata-figure-canvas-head > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.metadata-figure-canvas-head strong {
  font-size: 12px;
  color: #20334a;
}
.metadata-figure-canvas-head span {
  font-size: 9px;
  color: #718096;
}
.metadata-figure-badges {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.metadata-figure-badges span {
  padding: 3px 6px;
  border: 1px solid #d8e0ea;
  border-radius: 999px;
  background: #fff;
  font-size: 8px;
  color: #53657b;
}
.metadata-figure-canvas {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: auto;
  background: #fff;
}
.metadata-figure-canvas svg {
  display: block;
  min-width: 100%;
  min-height: 100%;
  background: #fff;
}
.metadata-figure-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 30px;
  text-align: center;
  color: #718096;
  font-size: 11px;
}
.metadata-figure-empty.hidden {
  display: none;
}
.metadata-figure-mark {
  cursor: pointer;
}
.metadata-figure-mark:hover {
  filter: brightness(0.94);
  stroke: #26364c !important;
  stroke-width: 1.5 !important;
}
/*
 * Source section 39/53: metadata figure tooltip.
 * Assembles into styles/base.css.
 * Rules remain in their original cascade order; later sections may intentionally override these
 * declarations.
 */
.metadata-figure-tooltip {
  position: absolute;
  z-index: 20;
  pointer-events: none;
  padding: 5px 7px;
  border-radius: 5px;
  background: #1f2937;
  color: #fff;
  font-size: 9px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.18);
}
.metadata-figure-interpretation {
  min-height: 42px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 7px 10px;
  border-top: 1px solid #dce3eb;
  background: #f8fafc;
  flex: 0 0 auto;
}
.metadata-figure-interpretation strong {
  font-size: 10px;
  color: #2e4770;
}
.metadata-figure-interpretation span {
  font-size: 9px;
  color: #627187;
  line-height: 1.35;
}
.mf-settings-section {
  border: 1px solid #d7e0e9;
  border-radius: 6px;
  background: #fff;
  margin: 0 0 6px;
  overflow: hidden;
}
.mf-settings-section > summary {
  cursor: pointer;
  padding: 6px 8px;
  background: #f5f8fc;
  border-bottom: 1px solid transparent;
  font-size: 9.5px;
  font-weight: 700;
  color: #35485f;
  list-style: none;
}
.mf-settings-section[open] > summary {
  border-bottom-color: #dde4ec;
}
.mf-settings-body {
  padding: 7px;
}
.mf-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 7px;
}
.mf-check {
  display: grid !important;
  grid-template-columns: auto 1fr !important;
  align-items: center !important;
  gap: 6px !important;
}
.mf-check input {
  margin: 0 !important;
}
.mf-check small {
  grid-column: 2;
  font-size: 8px;
  color: #7b8797;
  font-weight: 400;
}
.mf-settings-body label small {
  font-size: 8px;
  color: #7b8797;
  font-weight: 400;
}
.mf-settings-body input[type='color'] {
  padding: 2px !important;
}
.workspace-document-area.split-mode #figuresView .metadata-figures-layout {
  grid-template-columns: minmax(175px, 220px) minmax(280px, 1fr);
}
.workspace-document-area.split-mode #figuresView .metadata-figure-settings-panel {
  display: none;
}
.workspace-document-area.split-mode #figuresView .metadata-figures-toolbar-title span {
  display: none;
}
.workspace-document-area.split-mode #figuresView .metadata-figures-toolbar-title {
  min-width: auto;
}
.workspace-document-area.split-mode #figuresView .metadata-figure-preset {
  display: none !important;
}
@media (max-width: 1150px) {
  .metadata-figures-layout {
    grid-template-columns: 210px minmax(330px, 1fr) 245px;
  }
  .metadata-figures-toolbar-title span {
    display: none;
  }
  .metadata-figure-preset > span {
    display: none !important;
  }
}
@media (max-width: 900px) {
  .metadata-figures-layout {
    grid-template-columns: 190px minmax(320px, 1fr);
  }
  .metadata-figure-settings-panel {
    display: none;
  }
  .metadata-figures-toolbar {
    overflow-x: auto;
  }
  .metadata-figures-toolbar-title {
    min-width: 145px;
  }
}

body.ui-unified-typography .topbar {
  height: 60px !important;
  min-height: 60px !important;
  max-height: 60px !important;
  grid-template-rows: 22px 37px !important;
  align-items: center !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.metadata-figure-mapping-panel {
  grid-area: mapping;
}
.metadata-figure-canvas-panel {
  grid-area: canvas;
}
.metadata-figure-settings-panel {
  grid-area: settings;
}
.metadata-figures-layout {
  grid-template-areas: 'mapping canvas settings';
}
.workspace-document-area.split-mode #figuresView .metadata-figures-layout {
  grid-template-columns: minmax(175px, 210px) minmax(280px, 1fr) !important;
  grid-template-rows: minmax(280px, 1fr) 230px !important;
  grid-template-areas: 'mapping canvas' 'settings settings' !important;
  overflow: hidden !important;
}
.workspace-document-area.split-mode #figuresView .metadata-figure-settings-panel {
  display: block !important;
  max-height: 230px !important;
  overflow: auto !important;
  border-top: 1px solid #cdd6e1;
}
@media (max-width: 900px) {
  .metadata-figures-layout {
    grid-template-columns: 190px minmax(280px, 1fr) !important;
    grid-template-rows: minmax(280px, 1fr) 230px !important;
    grid-template-areas: 'mapping canvas' 'settings settings' !important;
    overflow: hidden !important;
  }
  .metadata-figure-settings-panel {
    display: block !important;
    max-height: 230px !important;
    overflow: auto !important;
  }
}

.metadata-figures-layout {
  grid-template-columns: minmax(205px, 260px) minmax(360px, 1fr) !important;
  grid-template-areas: 'mapping canvas' !important;
}
.workspace-document-area.split-mode #figuresView .metadata-figures-layout {
  grid-template-columns: minmax(175px, 220px) minmax(280px, 1fr) !important;
  grid-template-rows: minmax(280px, 1fr) !important;
  grid-template-areas: 'mapping canvas' !important;
}
@media (max-width: 1150px) {
  .metadata-figures-layout {
    grid-template-columns: minmax(190px, 230px) minmax(320px, 1fr) !important;
    grid-template-areas: 'mapping canvas' !important;
  }
}
@media (max-width: 900px) {
  .metadata-figures-layout {
    grid-template-columns: minmax(175px, 205px) minmax(280px, 1fr) !important;
    grid-template-rows: minmax(280px, 1fr) !important;
    grid-template-areas: 'mapping canvas' !important;
  }
}
.metadata-figure-settings-page .metadata-figure-settings-note {
  margin: 7px 8px 8px;
}
.metadata-figure-settings-panel.settings-integrated {
  display: block !important;
  max-height: none !important;
  overflow: visible !important;
  background: transparent !important;
  padding: 0 7px 12px !important;
  border: 0 !important;
}
.metadata-figure-settings-panel.settings-integrated .metadata-figure-panel-head.sticky {
  position: static !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 6px !important;
  margin: 0 0 6px !important;
  padding: 7px 8px !important;
  background: #eef4ff !important;
  border: 1px solid #d7e2f7 !important;
}
.metadata-figure-settings-page .mf-settings-section {
  margin-bottom: 7px;
}

.workspace-document-area.split-mode #figuresView .metadata-figures-layout {
  grid-template-columns: minmax(145px, 190px) minmax(0, 1fr) !important;
}

.metadata-figures-layout {
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-areas: 'canvas' !important;
  background: #fff !important;
}
.workspace-document-area.split-mode #figuresView .metadata-figures-layout {
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-areas: 'canvas' !important;
}
@media (max-width: 1150px) {
  .metadata-figures-layout {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-areas: 'canvas' !important;
  }
}
.metadata-figure-canvas-panel {
  grid-area: canvas !important;
}
.metadata-figure-settings-page {
  padding-bottom: 10px;
}
.metadata-figure-settings-navigator {
  position: sticky;
  top: 0;
  z-index: 12;
  margin: 0 0 6px !important;
  padding: 6px !important;
  background: var(--panel-bg, #f8fafc);
  border-bottom: 1px solid #d5dde7;
}
.metadata-figure-mapping-settings {
  margin: 0 7px 7px !important;
}
.metadata-figure-mapping-settings .settings-compact-body > label,
.metadata-figure-relationship-details > div > label,
.metadata-figure-relationship-details .metadata-role-grid label {
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
  margin: 0 0 7px !important;
  color: #46566d !important;
  font-size: 9px !important;
  font-weight: 600 !important;
}
.metadata-figure-mapping-settings select,
.metadata-figure-mapping-settings input:not([type='checkbox']) {
  width: 100% !important;
  min-width: 0 !important;
  height: 28px !important;
  padding: 3px 7px !important;
  border: 1px solid #ccd6e2 !important;
  border-radius: 5px !important;
  background: #fff !important;
  color: #24364e !important;
  font-size: 10px !important;
}
.metadata-figure-mapping-settings small {
  font-size: 8px;
  color: #718096;
  font-weight: 400;
}
.metadata-figure-relationship-details {
  margin-top: 6px;
}
.metadata-figure-settings-panel.settings-integrated .metadata-figure-panel-head.sticky {
  position: sticky !important;
  top: 41px !important;
  z-index: 10 !important;
  background: #eef4ff !important;
  border: 1px solid #d7e2f7 !important;
}
.metadata-figure-settings-page .mf-settings-section.settings-compact-section {
  margin: 0 7px 7px !important;
  border-radius: 6px !important;
}
.metadata-figure-settings-page .mf-settings-section.settings-compact-section > summary {
  padding: 6px 8px !important;
  background: #f5f8fc !important;
  font-size: 9.5px !important;
  font-weight: 700 !important;
  color: #35485f !important;
}
.metadata-figure-settings-page .mf-settings-section .settings-compact-body {
  padding: 7px !important;
}
.metadata-figure-settings-page .mf-subsection-label {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
  color: #607086;
  margin: 7px 0 5px;
  padding-top: 5px;
  border-top: 1px solid #e6ebf1;
}
.metadata-figure-settings-page .mf-inline-note {
  padding: 6px 7px;
  border-radius: 5px;
  background: #f7f9fc;
  border: 1px solid #e1e7ef;
  color: #64748b;
  font-size: 8px;
  line-height: 1.35;
  margin-bottom: 7px;
}
.metadata-figure-settings-page .mf-color-list {
  display: grid;
  gap: 4px;
  margin-top: 5px;
}
.metadata-figure-settings-page .mf-color-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  align-items: center;
  gap: 6px;
  padding: 3px 5px;
  border: 1px solid #e3e8ef;
  border-radius: 5px;
  background: #fff;
}
.metadata-figure-settings-page .mf-color-row span {
  font-size: 8.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #405169;
}
.metadata-figure-settings-page .mf-color-row input[type='color'] {
  width: 38px !important;
  height: 24px !important;
  min-width: 38px !important;
  padding: 1px !important;
}
.metadata-figure-settings-page .mf-settings-hidden {
  display: none !important;
}
.metadata-figure-settings-page .mf-settings-search-match {
  outline: 1px solid rgba(49, 95, 196, 0.18);
}
.metadata-figure-settings-page .mf-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 6px;
}
.metadata-figure-settings-page .mf-grid-3 > label {
  min-width: 0;
}
@media (max-width: 1150px) {
  .metadata-figure-settings-page .mf-grid-3 {
    grid-template-columns: 1fr 1fr;
  }
}
body.ui-colorful .metadata-figure-settings-navigator {
  border-color: #d9d4ec;
  background: linear-gradient(180deg, #fbfaff 0%, #f7f6fb 100%);
}
body.ui-colorful .metadata-figure-mapping-settings[open] > summary {
  color: #4d3e86;
}

.metadata-figure-settings-page {
  --mf-label-col: minmax(118px, 0.92fr);
  --mf-control-col: minmax(0, 1.08fr);
}
.metadata-figure-mapping-settings .settings-compact-body > label,
.metadata-figure-relationship-details > div > label,
.metadata-figure-relationship-details .metadata-role-grid label {
  display: grid !important;
  grid-template-columns: var(--mf-label-col) var(--mf-control-col) !important;
  align-items: center !important;
  gap: 6px !important;
  margin: 0 !important;
  padding: 2px 0 !important;
  color: #435169 !important;
  font-size: 9.5px !important;
  font-weight: 500 !important;
  text-align: left !important;
}
.metadata-figure-settings-page :is(.metadata-figure-mapping-settings, .mf-settings-body) label > span {
  display: block !important;
  text-align: left !important;
  line-height: 1.2 !important;
  color: #435169 !important;
}
.metadata-figure-settings-page :is(.metadata-figure-mapping-settings, .mf-settings-body) label > small {
  grid-column: 2 !important;
  margin-top: -2px !important;
  font-size: 8px !important;
  line-height: 1.25 !important;
  color: #79869a !important;
  text-align: left !important;
}
.metadata-figure-settings-page
  :is(.metadata-figure-mapping-settings, .mf-settings-body)
  :is(select, input:not([type='checkbox'])) {
  height: 25px !important;
  min-height: 25px !important;
  border-radius: 4px !important;
  font-size: 9.5px !important;
  padding: 2px 5px !important;
}
.metadata-figure-settings-page .mf-grid-2,
.metadata-figure-settings-page .mf-grid-3 {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 2px !important;
}
.metadata-figure-settings-page .check-row,
.metadata-figure-settings-page .mf-check {
  display: grid !important;
  grid-template-columns: 16px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 6px !important;
  min-height: 24px !important;
  padding: 1px 0 !important;
  text-align: left !important;
}
.metadata-figure-settings-page .check-row small {
  display: block !important;
  margin-top: 2px !important;
  color: #7b8797 !important;
  font-size: 8px !important;
  font-weight: 400 !important;
}
.metadata-figure-settings-page .settings-compact-section,
.metadata-figure-settings-page .mf-settings-section.settings-compact-section {
  margin: 4px 6px !important;
  border-radius: 4px !important;
  border: 1px solid #d7dde5 !important;
  box-shadow: none !important;
  background: #fff !important;
}
.metadata-figure-settings-page .settings-compact-section > summary,
.metadata-figure-settings-page .mf-settings-section.settings-compact-section > summary {
  background: #edf0f4 !important;
  color: #304158 !important;
  font-size: 10.25px !important;
  font-weight: 600 !important;
  padding: 6px 24px 6px 8px !important;
}
.metadata-figure-settings-page .settings-compact-body,
.metadata-figure-settings-page .mf-settings-section .settings-compact-body {
  padding: 5px 7px !important;
  gap: 3px !important;
}
.metadata-figure-settings-navigator {
  padding: 5px 6px !important;
  background: #eef1f5 !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04) !important;
}

.metadata-relationship-hint {
  padding: 5px 7px !important;
  border-radius: 4px !important;
  background: #f7f9fc !important;
  border: 1px solid #dde4ec !important;
  border-left: 3px solid #8aa0bf !important;
  gap: 1px !important;
  text-align: left !important;
}
.metadata-relationship-hint strong {
  font-size: 9px !important;
  color: #344963 !important;
}
.metadata-relationship-hint span {
  font-size: 8px !important;
  color: #66768b !important;
}
/*
 * Source section 40/53: metadata figure relationship details.
 * Assembles into styles/base.css.
 * Rules remain in their original cascade order; later sections may intentionally override these
 * declarations.
 */
.metadata-figure-relationship-details {
  border: 1px solid #dbe2ea !important;
  border-radius: 4px !important;
  background: #fafbfd !important;
  margin-top: 4px !important;
}
.metadata-figure-relationship-details > summary {
  font-size: 9px !important;
  font-weight: 600 !important;
  color: #405169 !important;
  padding: 5px 7px !important;
}
.metadata-figure-relationship-details > div {
  padding: 5px 7px !important;
}
.metadata-role-grid {
  grid-template-columns: 1fr !important;
  gap: 2px !important;
}
.mf-recommendation-panel {
  display: grid;
  gap: 5px;
  margin: 4px 0 5px;
}
.mf-rec-card {
  border: 1px solid #d7dde5;
  border-left: 3px solid #6e88b8;
  border-radius: 4px;
  background: #fbfcfe;
  padding: 5px 6px;
}
.mf-rec-card.muted {
  border-left-color: #aeb8c6;
  background: #fafbfc;
}
.mf-rec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.mf-rec-head strong {
  font-size: 9px;
  color: #34445b;
}
.mf-rec-head span {
  font-size: 7.75px;
  color: #77859a;
}
.mf-rec-card p {
  margin: 0;
  color: #6c798c;
  font-size: 8px;
  line-height: 1.35;
}
.mf-rec-list {
  display: grid;
  gap: 3px;
}
.mf-rec-btn {
  display: grid;
  grid-template-columns: minmax(75px, 0.6fr) minmax(0, 1.4fr);
  align-items: center;
  gap: 6px;
  min-height: 27px;
  width: 100%;
  padding: 3px 5px;
  border: 1px solid #dce3ec;
  border-radius: 4px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}
.mf-rec-btn:hover {
  border-color: #9fb2cf;
  background: #f5f8fd;
}
.mf-rec-btn.recommended {
  border-color: #b9c9e2;
  background: #f2f6fc;
}
.mf-rec-btn span {
  font-size: 8.75px;
  font-weight: 650;
  color: #344a66;
}
.mf-rec-btn small {
  font-size: 7.75px;
  line-height: 1.2;
  color: #6d7a8d;
}
.mf-setting-block {
  border: 1px solid #e0e5ec;
  border-radius: 4px;
  background: #fafbfd;
  padding: 5px 6px;
  margin-bottom: 5px;
}
.mf-setting-block:last-child {
  margin-bottom: 0;
}
.mf-setting-block-title {
  font-size: 8.25px;
  font-weight: 700;
  color: #59697f;
  margin-bottom: 3px;
}
.mf-legend-background-block {
  margin-bottom: 6px;
}
.metadata-figure-mapping-settings .mf-primary-field-row > span,
.metadata-figure-mapping-settings .mf-figure-type-row > span {
  font-weight: 650 !important;
  color: #344a66 !important;
}
@media (max-width: 1180px) {
  .metadata-figure-settings-page {
    --mf-label-col: minmax(102px, 0.82fr);
    --mf-control-col: minmax(0, 1.18fr);
  }
  .mf-rec-btn {
    grid-template-columns: 1fr;
  }
  .mf-rec-btn small {
    padding-left: 0;
  }
}
.metadata-figure-settings-page :is(.metadata-figure-mapping-settings, .mf-settings-body) label > span {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  min-width: 0 !important;
}

.topbar,
body.ui-unified-typography .topbar {
  height: 64px !important;
  min-height: 64px !important;
  max-height: 64px !important;
  grid-template-rows: 27px 36px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}
.brand {
  height: 27px !important;
  min-height: 27px !important;
  overflow: hidden !important;
  padding: 1px 0 !important;
  align-items: center !important;
}
.brand-logo {
  height: auto !important;
  max-height: 24px !important;
  max-width: 148px !important;
  object-fit: contain !important;
  object-position: left center !important;
  margin: 0 !important;
}
.menubar {
  height: 27px !important;
  min-height: 27px !important;
  align-items: center !important;
}

#figuresView > .metadata-figures-actionbar {
  position: sticky !important;
  top: 0 !important;
  z-index: 45 !important;
  flex: 0 0 auto !important;
}
.metadata-figures-actionbar-left,
.metadata-figures-actionbar-right {
  min-width: 0 !important;
  flex-wrap: nowrap !important;
}
.metadata-figures-actionbar .figure-action-btn {
  height: 27px !important;
  min-height: 27px !important;
  padding: 0 7px !important;
  border-radius: 7px !important;
  font-size: 10px !important;
  font-weight: 650 !important;
}
.metadata-figures-actionbar .figure-action-btn .ui-icon {
  width: 13px !important;
  height: 13px !important;
}
.figure-action-preset {
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  min-width: 0 !important;
  margin: 0 !important;
  color: #53657b !important;
  font-size: 9px !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
}
.figure-action-preset > span {
  font-size: 9px !important;
  color: #63748a !important;
}
.figure-action-preset select {
  height: 27px !important;
  min-height: 27px !important;
  width: clamp(108px, 14vw, 190px) !important;
  max-width: 190px !important;
  min-width: 0 !important;
  padding: 2px 24px 2px 6px !important;
  border: 1px solid #c7d4e4 !important;
  border-radius: 7px !important;
  background: #fff !important;
  color: #344b68 !important;
  font-size: 9.5px !important;
}
.figure-action-divider {
  height: 20px !important;
  margin: 0 1px !important;
}
@container (max-width:520px) {
  .metadata-figures-actionbar .figure-action-btn span {
    display: none !important;
  }
  .metadata-figures-actionbar .figure-action-btn {
    width: 27px !important;
    padding: 0 !important;
    justify-content: center !important;
  }
  .figure-action-preset > span {
    display: none !important;
  }
  .figure-action-preset select {
    width: 108px !important;
  }
}
@container (max-width:390px) {
  .figure-action-preset {
    display: none !important;
  }
}

/* Keep every nested figure setting within the right Settings window. */
#tab-figures,
.metadata-figure-settings-page,
.metadata-figure-settings-navigator,
.metadata-figure-mapping-settings,
.metadata-figure-settings-panel,
.metadata-figure-settings-panel *,
.metadata-figure-mapping-settings * {
  box-sizing: border-box !important;
  min-width: 0 !important;
  max-width: 100%;
}
#tab-figures,
.metadata-figure-settings-page {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
}
.metadata-figure-settings-panel {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
}
.metadata-figure-settings-page details,
.metadata-figure-settings-page .mf-setting-block,
.metadata-figure-settings-page .mf-rec-card {
  width: auto !important;
  max-width: calc(100% - 10px) !important;
}
.metadata-figure-settings-page :is(input:not([type='checkbox']), select, textarea, button) {
  max-width: 100% !important;
}
.metadata-figure-settings-page input[type='color'] {
  width: 100% !important;
  min-width: 0 !important;
}
.metadata-figure-settings-page {
  --mf-label-col: minmax(88px, 0.82fr);
  --mf-control-col: minmax(0, 1.18fr);
}
.metadata-figure-settings-page .metadata-figure-mapping-settings .settings-compact-body > label,
.metadata-figure-settings-page .metadata-figure-relationship-details > div > label,
.metadata-figure-settings-page .metadata-figure-relationship-details .metadata-role-grid label {
  width: 100% !important;
  max-width: 100% !important;
  grid-template-columns: var(--mf-label-col) var(--mf-control-col) !important;
}
.metadata-figure-settings-page .metadata-figure-mapping-settings label > span {
  overflow-wrap: anywhere !important;
  word-break: normal !important;
}

/* Checkbox rows follow the same left-label/right-control alignment as every other setting row. */

/* Professional density: concise context, no assistant-style prose. */

.mf-rec-card {
  padding: 4px 5px !important;
}
.mf-rec-head {
  margin-bottom: 3px !important;
}
.mf-rec-head strong {
  font-size: 8.75px !important;
}
.mf-rec-head span {
  font-size: 7.5px !important;
}
.mf-rec-list {
  gap: 2px !important;
}
.mf-rec-btn {
  grid-template-columns: minmax(76px, 0.8fr) minmax(0, 1.2fr) !important;
  min-height: 24px !important;
  padding: 2px 5px !important;
}
.mf-rec-btn span {
  font-size: 8.5px !important;
}
.mf-rec-btn small {
  font-size: 7.5px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
.mf-rec-card p {
  font-size: 7.75px !important;
  line-height: 1.2 !important;
}
.metadata-figure-interpretation {
  min-height: 34px !important;
  padding: 5px 9px !important;
}
.metadata-figure-interpretation span {
  font-size: 8.5px !important;
}

/* Narrow Settings windows stack safely instead of overflowing. */
@container (max-width:360px) {
  .metadata-figure-settings-page {
    --mf-label-col: minmax(76px, 0.72fr);
    --mf-control-col: minmax(0, 1.28fr);
  }
  .mf-rec-btn {
    grid-template-columns: 1fr !important;
  }
  .mf-rec-btn small {
    display: none !important;
  }
}
@container (max-width:300px) {
  .metadata-figure-settings-page .metadata-figure-mapping-settings .settings-compact-body > label,
  .metadata-figure-settings-page .metadata-figure-relationship-details > div > label,
  .metadata-figure-settings-page .metadata-figure-relationship-details .metadata-role-grid label {
    grid-template-columns: 1fr !important;
    gap: 2px !important;
  }
}

.brand-logo {
  height: 24px !important;
  width: auto !important;
  max-height: 24px !important;
  max-width: 94px !important;
  flex: 0 0 auto !important;
  object-fit: contain !important;
}
@media (max-width: 1180px) {
  .brand-logo {
    height: 23px !important;
    max-height: 23px !important;
    max-width: 90px !important;
    flex: 0 0 auto !important;
  }
}
@media (max-width: 900px) {
  .brand-logo {
    height: 22px !important;
    max-height: 22px !important;
    max-width: 86px !important;
  }
  .brand-copy .version-badge {
    display: none !important;
  }
}
.mf-rec-head > span {
  display: none !important;
}
.metadata-figure-settings-note {
  display: none !important;
}

/* Figure setting labels may wrap; unlike metadata cell text they are never ellipsized. */
.settings-inspector
  .metadata-figure-settings-page
  :is(.metadata-figure-mapping-settings, .mf-settings-body, .metadata-figure-relationship-details)
  label
  > span {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  overflow-wrap: anywhere !important;
  max-width: 100% !important;
}

@container (max-width:300px) {
  .metadata-figure-settings-page {
    --mf-label-col: minmax(0, 0.8fr);
    --mf-control-col: minmax(0, 1.2fr);
  }
  .metadata-figure-settings-page .metadata-figure-mapping-settings .settings-compact-body > label,
  .metadata-figure-settings-page .metadata-figure-relationship-details > div > label,
  .metadata-figure-settings-page .metadata-figure-relationship-details .metadata-role-grid label {
    grid-template-columns: 1fr !important;
    gap: 3px !important;
    align-items: stretch !important;
    padding: 3px 0 !important;
  }
  .metadata-figure-settings-page
    :is(.metadata-figure-mapping-settings, .mf-settings-body, .metadata-figure-relationship-details)
    label
    > span {
    grid-column: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    white-space: normal !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    line-height: 1.2 !important;
  }
  .metadata-figure-settings-page
    :is(.metadata-figure-mapping-settings, .mf-settings-body, .metadata-figure-relationship-details)
    label
    > small {
    grid-column: 1 !important;
    margin: 0 !important;
  }
  .metadata-figure-settings-page
    :is(.metadata-figure-mapping-settings, .mf-settings-body, .metadata-figure-relationship-details)
    label
    > :is(select, input:not([type='checkbox']), textarea) {
    grid-column: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  .metadata-figure-settings-navigator .tree-settings-nav-row {
    grid-template-columns: 1fr !important;
    gap: 4px !important;
  }

  .mf-rec-btn {
    grid-template-columns: 1fr !important;
  }
  .mf-rec-btn small {
    display: none !important;
  }
}

@container (max-width:245px) {
  .metadata-figure-settings-page .settings-page-titlebar {
    padding-inline: 4px !important;
  }
  .metadata-figure-settings-page .settings-page-titlebar .settings-page-glyph {
    display: none !important;
  }
  .metadata-figure-settings-page .settings-page-titlebar strong {
    font-size: 9.5px !important;
  }
  .metadata-figure-settings-page .settings-compact-section,
  .metadata-figure-settings-page .mf-settings-section.settings-compact-section {
    margin-inline: 3px !important;
  }
  .metadata-figure-settings-page .settings-compact-body,
  .metadata-figure-settings-page .mf-settings-section .settings-compact-body {
    padding-inline: 5px !important;
  }
}

@container (max-width:300px) {
  .metadata-figure-settings-page
    .metadata-figure-settings-panel
    .mf-settings-body
    > label:not(.mf-color-row):not(:has(> input[type='checkbox'])),
  .metadata-figure-settings-page
    .metadata-figure-settings-panel
    .mf-setting-block
    > label:not(.mf-color-row):not(:has(> input[type='checkbox'])) {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 3px !important;
    align-items: stretch !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 3px 0 !important;
  }
  .metadata-figure-settings-page
    .metadata-figure-settings-panel
    .mf-settings-body
    > label:not(.mf-color-row)
    > span,
  .metadata-figure-settings-page
    .metadata-figure-settings-panel
    .mf-setting-block
    > label:not(.mf-color-row)
    > span {
    grid-column: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    white-space: normal !important;
    overflow: visible !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    line-height: 1.2 !important;
  }
  .metadata-figure-settings-page
    .metadata-figure-settings-panel
    .mf-settings-body
    > label:not(.mf-color-row)
    > small,
  .metadata-figure-settings-page
    .metadata-figure-settings-panel
    .mf-setting-block
    > label:not(.mf-color-row)
    > small {
    grid-column: 1 !important;
    margin: 0 !important;
  }
  .metadata-figure-settings-page
    .metadata-figure-settings-panel
    label:has(> input[type='checkbox']):not(.mf-color-row) {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 18px !important;
    gap: 6px !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 2px 0 !important;
  }
  .metadata-figure-settings-page
    .metadata-figure-settings-panel
    label:has(> input[type='checkbox']):not(.mf-color-row)
    > span {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    white-space: normal !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    line-height: 1.2 !important;
  }
  .metadata-figure-settings-page
    .metadata-figure-settings-panel
    label:has(> input[type='checkbox']):not(.mf-color-row)
    > input[type='checkbox'] {
    grid-column: 2 !important;
    grid-row: 1 !important;
    justify-self: end !important;
    margin: 0 !important;
    width: 14px !important;
    height: 14px !important;
    min-width: 14px !important;
    max-width: 14px !important;
  }
}

/*
 * Source section 41/53: container.
 * Assembles into styles/base.css.
 * Rules remain in their original cascade order; later sections may intentionally override these
 * declarations.
 */
@container (max-width:300px) {
}

/* Ensure the narrow stack wins over the normal two-column mf-grid rules. */
@container (max-width:300px) {
}

.metadata-figure-settings-page .mf-analysis-mode {
  display: grid;
  gap: 6px;
  margin: 0 0 8px;
}
.metadata-figure-settings-page .mf-step-label {
  font-size: 11px;
  font-weight: 700;
  color: #42526a;
  letter-spacing: 0.01em;
}
.metadata-figure-settings-page .mf-mode-buttons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}
.metadata-figure-settings-page .mf-mode-buttons button {
  min-width: 0;
  padding: 6px 4px;
  border: 1px solid #cbd5e1;
  background: #fff;
  border-radius: 4px;
  font: inherit;
  font-size: 11px;
  color: #334155;
}
.metadata-figure-settings-page .mf-mode-buttons button.active {
  border-color: #315fc4;
  background: #edf3ff;
  color: #234da7;
  font-weight: 700;
}
.metadata-figure-settings-page .mf-core-relationship {
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid #d7dee9;
  border-radius: 5px;
  background: #fafbfd;
  margin-bottom: 8px;
}
.metadata-figure-settings-page .mf-core-relationship.hidden {
  display: none !important;
}
.metadata-figure-settings-page .mf-role-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.metadata-figure-settings-page .mf-core-relationship label {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 3px !important;
}
.metadata-figure-settings-page .mf-core-relationship select {
  width: 100% !important;
  min-width: 0 !important;
}
.metadata-figure-settings-page .mf-plot-step,
.metadata-figure-settings-page .mf-settings-step {
  margin: 7px 0 4px;
}
.metadata-figure-settings-page .mf-final-figure-choice {
  margin-top: 4px;
}
.metadata-figure-settings-page .hidden {
  display: none !important;
}
@media (max-width: 440px) {
  .metadata-figure-settings-page .mf-role-pair {
    grid-template-columns: 1fr;
  }
  .metadata-figure-settings-page .mf-mode-buttons {
    grid-template-columns: 1fr;
  }
}

#metadataFigureCoreRelationship.hidden {
  display: none !important;
}
#metadataFigureR22Pair.hidden,
#metadataFigureR22Flow.hidden,
#metadataFigureR22Relationship.hidden,
#metadataFigureR22Multi.hidden {
  display: none !important;
}
#metadataFigureCoreRelationship {
  display: none !important;
}

.settings-inspector .metadata-figure-settings-page label.check-row,
.settings-inspector .metadata-figure-settings-page label.mf-check {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 22px !important;
  align-items: center !important;
  column-gap: 8px !important;
  row-gap: 2px !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  min-height: 26px !important;
  margin: 0 !important;
  padding: 2px 0 !important;
}
.settings-inspector .metadata-figure-settings-page label.check-row > span,
.settings-inspector .metadata-figure-settings-page label.mf-check > span {
  grid-column: 1 !important;
  grid-row: 1 !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  white-space: normal !important;
  overflow: visible !important;
  overflow-wrap: break-word !important;
  word-break: normal !important;
  text-align: left !important;
  line-height: 1.25 !important;
}
.settings-inspector .metadata-figure-settings-page label.check-row > input[type='checkbox'],
.settings-inspector .metadata-figure-settings-page label.mf-check > input[type='checkbox'] {
  grid-column: 2 !important;
  grid-row: 1 !important;
  justify-self: end !important;
  align-self: center !important;
  width: 14px !important;
  height: 14px !important;
  min-width: 14px !important;
  max-width: 14px !important;
  margin: 0 !important;
  padding: 0 !important;
}
.settings-inspector .metadata-figure-settings-page label.check-row > small,
.settings-inspector .metadata-figure-settings-page label.mf-check > small {
  grid-column: 1 / -1 !important;
  margin: 0 !important;
}

/* Sankey settings stay compact and readable at normal inspector widths. */

@container (max-width:360px) {
}

.metadata-subtab-strip {
  display: flex;
  align-items: center;
  gap: 2px;
  min-height: 34px;
  padding: 4px 8px 3px;
  border-bottom: 1px solid #d9e1ea;
  background: #f7f9fc;
  flex: 0 0 auto;
}
.metadata-subtab-strip button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 27px;
  padding: 4px 10px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: #536276;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}
.metadata-subtab-strip button:hover {
  background: #eef3f8;
  color: #26374e;
}
.metadata-subtab-strip button.active {
  border-color: #b9c9da;
  background: #fff;
  color: #183a61;
  box-shadow: 0 1px 2px rgba(27, 52, 82, 0.06);
}
.metadata-subtab-strip .ui-icon {
  width: 14px;
  height: 14px;
}
.control-tab[hidden],
#tab-metadata[hidden] {
  display: none !important;
}
.tree-metadata-highlighting-settings .metadata-highlight-fields {
  min-width: 0;
}
.metadata-plot-profile-section .settings-compact-body {
  gap: 7px;
}
.metadata-plot-profile-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}
.metadata-plot-profile-actions button {
  min-width: 0;
}
.metadata-plots-reset-footer {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid #d8e0e9;
}
.metadata-plots-reset-footer .mini-btn {
  width: 100%;
  min-height: 29px;
}

.metadata-figure-settings-page #metadataFigureMappingSection.mf-flow-locked #metadataFigureR22Relationship,
.metadata-figure-settings-page #metadataFigureMappingSection.mf-multi-locked #metadataFigureR22Multi {
  margin-bottom: 2px;
}
.metadata-figure-settings-page #metadataFigureRecommendations > .mf-rec-card.hidden {
  display: none !important;
}
.metadata-figure-settings-page #metadataFigureRecommendations.hidden {
  display: none !important;
}
.metadata-figure-settings-page .mf-plot-step.hidden {
  display: none !important;
}

.metadata-figure-settings-page .metadata-figure-mapping-settings .settings-compact-body > label.hidden,
.metadata-figure-settings-page .metadata-figure-mapping-settings label.mf-primary-field-row.hidden,
.metadata-figure-settings-page .metadata-figure-mapping-settings label.mf-type-row.hidden,
.metadata-figure-settings-page .metadata-figure-mapping-settings label.mf-figure-type-row.hidden {
  display: none !important;
}

#metadataFigureCanvas[data-r26-mode='pan'] {
  cursor: grab;
}
#metadataFigureCanvas[data-r26-mode='pan']:active {
  cursor: grabbing;
}
#metadataFigureCanvas[data-r26-mode='edit'] [data-r26-edit-id] {
  cursor: crosshair;
}
#metadataFigureCanvas[data-r26-mode='edit'] [data-r26-edit-id]:hover {
  outline: 1px dashed #238bb4;
  outline-offset: 2px;
}
#metadataFigureCanvas #metadataFigureSvg {
  transform-origin: 0 0;
  will-change: transform;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: none !important;
}
@media (max-width: 430px) {
}
@media (max-width: 330px) {
}

.metadata-link-panel {
  margin: 10px 14px 0;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: #f7f9fd;
  box-shadow: 0 1px 2px rgba(20, 30, 50, 0.04);
  font-size: 11px;
  line-height: 1.4;
}
.metadata-link-panel.is-error {
  background: var(--danger-soft);
  border-color: #ef9b95;
  box-shadow: 0 0 0 2px rgba(180, 35, 24, 0.05);
}
.metadata-link-panel.is-good {
  background: var(--good-soft);
  border-color: #a9d9bd;
}
.metadata-link-panel.is-info {
  background: #f5f8ff;
  border-color: #cbd7f8;
}

.metadata-link-details {
  margin-top: 10px;
  border-top: 1px solid rgba(112, 126, 151, 0.24);
  padding-top: 8px;
}
.metadata-link-details summary {
  cursor: pointer;
  font-weight: 750;
  color: #3d4c66;
}
.metadata-link-empty {
  display: block;
  max-height: 118px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font:
    9px/1.45 Consolas,
    Menlo,
    monospace;
  color: #46536a;
}
.metadata-link-empty {
  font-family: inherit;
  color: var(--muted);
}
.metadata-profile-bar {
  display: grid;
  grid-template-columns: minmax(250px, 1fr) minmax(360px, auto);
  gap: 10px 14px;
  align-items: center;
  margin: 0 0 12px;
  padding: 11px 12px;
  border: 1px solid #cfd9ef;
  border-radius: 12px;
  background: linear-gradient(180deg, #fbfdff, #f4f7ff);
}
.metadata-profile-bar > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.metadata-profile-bar strong {
  font-size: 12px;
}
.metadata-profile-bar small {
  font-size: 9px;
  line-height: 1.35;
  color: var(--muted);
}
@media (max-width: 1100px) {
  .metadata-profile-bar {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 700px) {
  .metadata-link-panel {
    margin-left: 8px;
    margin-right: 8px;
  }
}

.metadata-link-status-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 22px;
  padding: 2px 7px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #f5f7fb;
  color: #536178;
  font-size: 8.5px;
  line-height: 1;
  white-space: nowrap;
}
.metadata-link-status-btn:hover {
  background: #eef3f9;
}
.metadata-link-status-btn:focus-visible {
  outline: 2px solid #315fc4;
  outline-offset: 2px;
}
.metadata-link-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7e8a9b;
  flex: 0 0 auto;
}
.metadata-link-status-btn.is-good {
  background: #eef9f2;
  border-color: #b9ddc6;
  color: #11663f;
}
.metadata-link-status-btn.is-good .metadata-link-status-dot {
  background: #22a060;
}
.metadata-link-status-btn.is-error {
  background: #fff1f0;
  border-color: #e9a19b;
  color: #982e25;
  font-weight: 750;
}
.metadata-link-status-btn.is-error .metadata-link-status-dot {
  background: #cf3f34;
}
.metadata-link-status-btn.is-info {
  background: #f3f7fd;
  border-color: #ccd8e8;
  color: #50627b;
}
.metadata-link-status-btn.is-info .metadata-link-status-dot {
  background: #5d7da8;
}
.metadata-link-popover {
  position: absolute;
  right: 10px;
  top: 48px;
  z-index: 95;
  width: min(620px, calc(100% - 20px));
  max-height: calc(100% - 62px);
  overflow: auto !important;
  margin: 0 !important;
  padding: 10px 11px !important;
  border-radius: 8px !important;
  box-shadow: 0 12px 34px rgba(28, 43, 66, 0.18) !important;
  background: #fff !important;
}
.metadata-link-popover.is-error {
  background: #fffaf9 !important;
  border-color: #e9a19b !important;
}
.metadata-link-popover.is-good {
  background: #fbfefc !important;
  border-color: #b9ddc6 !important;
}
.metadata-link-popover.is-info {
  background: #fbfcff !important;
  border-color: #ccd8e8 !important;
}
.metadata-link-popover-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid #e4e9f0;
}
.metadata-link-popover-head > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.metadata-link-popover-head strong {
  font-size: 11px;
  color: #27364d;
}
.metadata-link-popover-head span {
  font-size: 9.5px;
  color: #647086;
}
.metadata-link-popover-head em {
  font-size: 9.5px;
  font-style: normal;
  color: var(--danger);
  font-weight: 650;
}
.metadata-link-close {
  border: 0;
  background: transparent;
  color: #718096;
  font-size: 18px;
  line-height: 1;
  padding: 0 2px;
}
.metadata-link-popover .metadata-link-details {
  margin-top: 8px;
  padding-top: 7px;
}
.metadata-link-popover .metadata-link-empty {
  max-height: 92px;
}
.metadata-profile-bar {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  min-width: 0;
  margin: 0 0 7px !important;
  padding: 5px 7px !important;
  border: 1px solid #d8e0eb !important;
  border-radius: 6px !important;
  background: #fafbfd !important;
  box-shadow: none !important;
}
.metadata-profile-bar select {
  min-width: 150px;
  max-width: 240px;
  min-height: 27px;
  font-size: 9.5px;
}
.metadata-profile-bar > button {
  border: 1px solid #d5dde8;
  background: #fff;
  border-radius: 5px;
  padding: 4px 6px;
  font-size: 8.5px;
  color: #48576c;
  white-space: nowrap;
}
.metadata-profile-bar > button:hover {
  background: #f2f6fb;
}
/*
 * Source section 42/53: media.
 * Assembles into styles/base.css.
 * Rules remain in their original cascade order; later sections may intentionally override these
 * declarations.
 */
@media (max-width: 760px) {
  .metadata-link-popover {
    right: 6px;
    width: calc(100% - 12px);
  }
  .metadata-profile-bar {
    flex-wrap: wrap !important;
  }
  .metadata-profile-bar select {
    flex: 1;
    max-width: none;
  }
}

#metadataPlotSettingsProfiles,
.metadata-plots-reset-footer {
  display: none !important;
}

.metadata-profile-toolbar {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 4px !important;
  padding: 0 0 5px !important;
  margin: 0 0 5px !important;
  border: 0 !important;
  border-bottom: 1px solid #e1e6ea !important;
  border-radius: 0 !important;
  background: transparent !important;
}
.metadata-profile-toolbar select {
  min-width: 180px !important;
  max-width: none !important;
  flex: 1 1 180px !important;
  height: 27px !important;
  min-height: 27px !important;
  font-size: 9.4px !important;
}
.metadata-profile-toolbar > button {
  flex: 0 0 auto !important;
  min-width: 58px;
  height: 27px;
  padding: 3px 7px !important;
  font-size: 9.2px !important;
  border-radius: 4px !important;
}

@media (max-width: 390px) {
  .metadata-profile-toolbar {
    grid-template-columns: 1fr 1fr !important;
  }
  .metadata-profile-toolbar select {
    grid-column: 1/-1;
  }
}

@container (max-width:360px) {
  .metadata-profile-toolbar select {
    flex: 1 1 100% !important;
    min-width: 100% !important;
  }
  .metadata-profile-toolbar > button {
    flex: 1 1 calc(50% - 2px) !important;
  }
}

.modebar {
  overflow: visible !important;
}
.modebar .metadata-link-status-btn {
  height: 19px !important;
  min-height: 19px !important;
  padding: 0 6px !important;
  font-size: 8.8px !important;
  border-radius: 999px !important;
}
.modebar .metadata-link-status-dot {
  width: 6px !important;
  height: 6px !important;
}
.modebar .modebar-tree-status {
  height: 19px !important;
  display: inline-flex !important;
  align-items: center !important;
  padding: 0 6px !important;
  font-size: 8.8px !important;
  line-height: 1 !important;
  border-radius: 999px !important;
  white-space: nowrap !important;
}
.modebar .modebar-tree-status.good {
  background: #edf8f1 !important;
  border-color: #b7d9c3 !important;
  color: #17623f !important;
}
.modebar .modebar-tree-status:not(.good) {
  background: #fff2ef !important;
  border-color: #e6aea5 !important;
  color: #922f27 !important;
}

.metadata-link-toolbar-btn {
  min-width: max-content !important;
}
.metadata-link-toolbar-btn.is-good {
  background: #edf9f1 !important;
  border-color: #afd9bd !important;
  color: #17623f !important;
}
.metadata-link-toolbar-btn.is-error {
  background: #fff1ef !important;
  border-color: #e4a69d !important;
  color: #962f28 !important;
  font-weight: 700 !important;
}
.metadata-link-toolbar-btn.is-info {
  background: #f5f7fa !important;
  color: #526176 !important;
}
.metadata-link-toolbar-btn:disabled {
  opacity: 0.48 !important;
}

.pane-size-controls {
  margin-left: auto !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 2px !important;
  flex: 0 0 auto !important;
  order: 100 !important;
}
.workspace-tab-group > .pane-size-controls {
  margin-left: auto !important;
}
.pane-size-btn {
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  padding: 0 !important;
  display: inline-grid !important;
  place-items: center !important;
  border: 1px solid #cbd3de !important;
  border-radius: 4px !important;
  background: #f8f9fb !important;
  color: #435168 !important;
  box-shadow: none !important;
}
.pane-size-btn .ui-icon {
  width: 13px !important;
  height: 13px !important;
}
.pane-size-btn:hover,
.pane-size-btn.active {
  background: #e7edf8 !important;
  border-color: #9eafda !important;
  color: #244799 !important;
}
.pane-minimize-btn.active {
  background: #f3f5f8 !important;
  border-color: #aeb8c7 !important;
  color: #344256 !important;
}
body.ui-colorful .pane-size-btn {
  background: #faf9fd !important;
  border-color: #d4ccdf !important;
}
body.ui-colorful .pane-size-btn:hover,
body.ui-colorful .pane-size-btn.active {
  background: #f0ebf8 !important;
  border-color: #c5b7da !important;
  color: #684f9b !important;
}

/* Plot settings profile: same structure and position as Tree settings. */
#metadataPlotSettingsProfiles {
  display: block !important;
  margin-top: 4px !important;
}
#metadataPlotSettingsProfiles > .settings-compact-body {
  gap: 4px !important;
  padding: 5px 6px !important;
}
#metadataPlotSettingsProfiles label {
  grid-template-columns: minmax(72px, 0.68fr) minmax(0, 1.32fr) !important;
  gap: 6px !important;
  font-size: 9.8px !important;
}
#metadataPlotSettingsProfiles select {
  min-height: 25px !important;
  height: 25px !important;
  font-size: 9.7px !important;
  padding: 2px 5px !important;
}
#metadataPlotSettingsProfiles .metadata-plot-profile-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 4px !important;
}
#metadataPlotSettingsProfiles .metadata-plot-profile-actions button {
  min-height: 24px !important;
  height: 24px !important;
  padding: 2px 6px !important;
  font-size: 9.5px !important;
  line-height: 1.1 !important;
}
.metadata-profile-bar {
  display: none !important;
}
.metadata-plots-reset-footer {
  display: flex !important;
  margin-top: 5px !important;
  padding-top: 5px !important;
}
.metadata-plots-reset-footer #resetMetadataPlotSettingsBtn {
  width: 100% !important;
  min-height: 26px !important;
  height: 26px !important;
  font-size: 9.7px !important;
  font-weight: 650 !important;
}

/* Metadata plot inspector: condensed through spacing and collapse, not tiny text. */
#tab-figures.metadata-figure-settings-page {
  font-size: 9.8px !important;
}
#tab-figures .settings-page-titlebar {
  min-height: 31px !important;
  padding: 5px 7px !important;
}
#tab-figures .settings-page-titlebar strong {
  font-size: 10.7px !important;
}
#metadataFigureMappingSection {
  margin-top: 0 !important;
}
@media (max-width: 390px) {
  #metadataPlotSettingsProfiles label {
    grid-template-columns: 1fr !important;
    gap: 2px !important;
  }
}

/* ========================================================================== */

/* ========================================================================== */

/* Window controls live in the upper-right of each pane tab strip. */
.pane-size-controls {
  align-self: stretch !important;
  gap: 0 !important;
  margin-left: auto !important;
  display: inline-flex !important;
  align-items: flex-start !important;
  padding-top: 1px !important;
}
.pane-size-btn {
  width: 30px !important;
  height: 27px !important;
  min-width: 30px !important;
  border: 0 !important;
  border-radius: 2px !important;
  background: transparent !important;
  color: #516071 !important;
  padding: 0 !important;
  display: grid !important;
  place-items: center !important;
  box-shadow: none !important;
}
.pane-size-btn .ui-icon {
  width: 13px !important;
  height: 13px !important;
  stroke-width: 1.8 !important;
}
.pane-size-btn:hover {
  background: #dfe5ec !important;
  color: #26384d !important;
}
.pane-size-btn.active {
  background: #d8e2ee !important;
  color: #1f4f7d !important;
}
.pane-minimize-btn .ui-icon {
  transform: translateY(-1px);
}
.workspace-tab-group {
  padding-right: 4px !important;
}
.workspace-tab-group > .pane-size-controls {
  position: static !important;
  right: auto !important;
  bottom: auto !important;
  order: 100 !important;
}

/* True minimize-to-dock: the remaining pane receives the full document area. */
body.pane-minimized-left .dual-workspace-tabs,
body.pane-minimized-right .dual-workspace-tabs {
  grid-template-columns: minmax(0, 1fr) !important;
}
body.pane-minimized-left .workspace-tab-group-left,
body.pane-minimized-right .workspace-tab-group-right {
  display: none !important;
}
body.pane-minimized-left .workspace-tab-group-right,
body.pane-minimized-right .workspace-tab-group-left {
  display: flex !important;
  grid-column: 1 !important;
  border-left: 0 !important;
}
.workspace-document-area.split-mode.pane-min-left,
.workspace-document-area.split-mode.pane-min-right {
  display: block !important;
  background: #fff !important;
}
.workspace-document-area.split-mode.pane-min-left > .plot-view,
.workspace-document-area.split-mode.pane-min-right > .plot-view {
  display: none !important;
}
.workspace-document-area.split-mode.pane-min-left > .plot-view.split-secondary,
.workspace-document-area.split-mode.pane-min-right > .plot-view.split-primary {
  display: flex !important;
  height: 100% !important;
  width: 100% !important;
  border-left: 0 !important;
}
.workspace-document-area.split-mode.pane-min-left > .split-divider,
.workspace-document-area.split-mode.pane-min-right > .split-divider {
  display: none !important;
}

/* Left rail hosts plugin shortcuts and minimized-window restore buttons. */
.project-tab-rail .project-rail-divider {
  height: 1px !important;
  margin: 4px 7px !important;
  background: #cbd3dd !important;
  flex: 0 0 auto !important;
}
.rail-action-tab {
  width: 41px !important;
  min-width: 41px !important;
  height: 40px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #6b7280 !important;
  padding: 0 !important;
  display: grid !important;
  place-items: center !important;
  cursor: pointer !important;
  position: relative !important;
}
.rail-action-tab > span {
  width: 27px !important;
  height: 27px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 5px !important;
}
.rail-action-tab .ui-icon {
  width: 16px !important;
  height: 16px !important;
}
.rail-action-tab:hover > span {
  background: #e4e9ef !important;
  color: #334155 !important;
}
.plugin-rail-tab.plugin-active > span {
  background: #e9f2ff !important;
  color: #315f9c !important;
}
.pane-dock-tab > span {
  background: #eef1f5 !important;
  color: #46586c !important;
  box-shadow: inset 0 0 0 1px #d3dae3 !important;
}
.pane-dock-tab:after {
  content: '';
  position: absolute;
  right: 2px;
  top: 7px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #537aa3;
}

/* Plugin menu. */
.plugins-menu {
  min-width: 280px !important;
}
.plugin-menu-entry {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 8px !important;
}
.plugin-menu-copy {
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  color: #24364a !important;
}
.plugin-menu-copy strong {
  font-size: 12px !important;
  font-weight: 700 !important;
}
.plugin-menu-copy span {
  font-size: 10.5px !important;
  color: #718096 !important;
  white-space: normal !important;
  line-height: 1.25 !important;
}
.plugin-toggle-btn {
  min-width: 92px !important;
  height: 28px !important;
  border: 1px solid #c7d0db !important;
  border-radius: 5px !important;
  background: #f8fafc !important;
  color: #3e4e61 !important;
  padding: 0 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  font: inherit !important;
  font-size: 11px !important;
  cursor: pointer !important;
}
.plugin-toggle-btn.active {
  background: #eaf7ef !important;
  border-color: #a8d4b8 !important;
  color: #23683e !important;
}
.plugin-toggle-btn:hover {
  filter: brightness(0.98);
}
.plugin-toggle-mark {
  font-weight: 800 !important;
}

.metadata-subtab-strip {
  display: none !important;
}
.dual-workspace-tabs .view-tab[data-view='figures']:not([hidden]):not(.workspace-tab-closed) {
  display: inline-flex !important;
}
.plugin-hidden,
[hidden].plugin-hidden {
  display: none !important;
}
body.ui-color-rich .workspace-tab-group-left .view-tab[data-view='figures'] {
  --tab-color: #7358a8;
  --tab-soft: #f3effb;
}
.rail-action-tab.hidden {
  display: none !important;
}

:root {
  --r35-toolbar-btn-h: 34px;
  --r35-compact-font: 11px;
  --r35-compact-label: 118px;
  --r35-outline: #d7dfeb;
  --r35-outline-strong: #c7d2e3;
  --r35-surface: #ffffff;
  --r35-surface-soft: #f7faff;
  --r35-surface-soft-2: #eef4ff;
  --r35-title: #203246;
  --r35-muted: #5c6d81;
  --r35-accent: #4169c9;
  --r35-accent-soft: #eaf0ff;
}


/* Windows-like split title controls */
.workspace-tab-group {
  position: relative;
}
.pane-size-controls {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  padding: 2px;
  margin-left: 6px;
  border: 1px solid #ced7e4;
  border-radius: 6px;
  background: linear-gradient(180deg, #fdfefe 0%, #f1f4f9 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
}
.pane-size-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #42556f;
  transition:
    background-color 0.12s ease,
    color 0.12s ease;
}
.pane-size-btn .ui-icon {
  width: 11px;
  height: 11px;
}
.pane-size-btn:hover,
.pane-size-btn:focus-visible {
  background: #eaf0fb;
  color: #214e9c;
  outline: none;
}
.pane-size-btn[aria-pressed='true'] {
  background: #dfe9ff;
  color: #214e9c;
}
.pane-minimize-btn:hover,
.pane-minimize-btn:focus-visible {
  background: #eef2f7;
  color: #33455e;
}

/* Footer minimised by ~3–4 px */
.professional-statusbar {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 22px;
  padding: 2px 8px;
  border-top: 1px solid #d2dbe7;
  background: linear-gradient(180deg, #f5f8fc 0%, #edf2f8 100%);
  color: #607183;
  font-size: 10px !important;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
}
.professional-statusbar .status-segment,
.professional-statusbar #metadataMatchStatus,
.professional-statusbar #elapsedStatus,
.professional-statusbar #statusRunId,
.professional-statusbar .status-copyright {
  font-size: 10px !important;
  line-height: 1.1;
}
.professional-statusbar .status-segment {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 2px;
}
.professional-statusbar .status-segment b {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #7b8899;
}
.professional-statusbar .status-separator {
  color: #9ba8b7;
}

/* Highly condensed settings */
.settings-inspector,
.settings-inspector * {
  box-sizing: border-box;
}
.settings-inspector,
.settings-pages,
.control-page {
  font-size: var(--r35-compact-font);
  color: var(--r35-title);
}
.control-page {
  padding-bottom: 8px;
}
.compact-settings-title {
  position: sticky;
  top: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid var(--r35-outline);
  border-radius: 8px;
  background: linear-gradient(180deg, #fdfefe 0%, #f6f9fe 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.92);
}
.compact-settings-title strong {
  font-size: 12px;
  line-height: 1.1;
}
.compact-settings-title small {
  font-size: 10px;
  color: var(--r35-muted);
}
.tree-settings-navigator,
.metadata-figure-settings-navigator {
  position: sticky;
  top: 42px;
  z-index: 5;
  display: grid;
  gap: 6px;
  margin: 7px 0 8px;
  padding: 6px 8px;
  border: 1px solid var(--r35-outline);
  border-radius: 8px;
  background: linear-gradient(180deg, #fbfdff 0%, #f4f8fe 100%);
  box-shadow: 0 1px 2px rgba(34, 57, 86, 0.04);
}
.tree-settings-nav-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  gap: 6px;
  align-items: center;
}
.tree-settings-search,
.tree-settings-section-nav {
  min-height: 26px;
  height: 26px;
  padding: 3px 8px;
  border: 1px solid var(--r35-outline-strong);
  border-radius: 6px;
  background: #fff;
  font-size: 11px;
  color: var(--r35-title);
}
.tree-settings-scope {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.tree-settings-scope-btn {
  min-height: 24px;
  padding: 2px 8px;
  border: 1px solid var(--r35-outline-strong);
  border-radius: 999px;
  background: #fff;
  color: var(--r35-muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.tree-settings-scope-btn.active,
.tree-settings-scope-btn[aria-pressed='true'] {
  border-color: #91a7da;
  background: var(--r35-accent-soft);
  color: var(--r35-accent);
}
.settings-compact-section,
.settings-module,
.settings-subsection,
.tree-metadata-field-navigator,
.metadata-field-sections,
.metadata-field-reset-row {
  margin-top: 6px;
  border: 1px solid var(--r35-outline);
  border-radius: 8px;
  background: var(--r35-surface);
  box-shadow: 0 1px 2px rgba(34, 57, 86, 0.035);
  overflow: hidden;
}
.settings-compact-section > summary,
.settings-subsection > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 30px;
  padding: 7px 10px;
  background: linear-gradient(180deg, #fbfdff 0%, #f2f7fd 100%);
  border-bottom: 1px solid rgba(215, 223, 235, 0.72);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--r35-title);
}
.settings-compact-section > summary::-webkit-details-marker,
.settings-subsection > summary::-webkit-details-marker {
  display: none;
}
.settings-compact-section > summary::after,
.settings-subsection > summary::after {
  content: '▾';
  font-size: 11px;
  color: #7b8da5;
  flex: 0 0 auto;
}
.settings-compact-section:not([open]) > summary::after,
.settings-subsection:not([open]) > summary::after {
  content: '▸';
}
.settings-compact-body,
.settings-module-body,
.settings-subsection > div {
  display: grid;
  gap: 6px;
  padding: 8px 10px 10px;
  background: #fff;
}
.settings-page-titlebar + .setting-note,
.metadata-tree-settings-note {
  margin-top: 6px;
}
.settings-compact-body > label,
.settings-subsection > div > label,
.settings-module-body > label,
.metadata-color-compact > label,
.tree-metadata-field-navigator > label,
.tree-annotation-inline > label,
.compact-publication-body > label,
.compact-publication-body > details > div > label {
  display: grid;
  grid-template-columns: minmax(84px, var(--r35-compact-label)) minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 11px;
}
.settings-compact-body > label > span:first-child,
.settings-subsection > div > label > span:first-child,
.settings-module-body > label > span:first-child,
.tree-metadata-field-navigator > label > span:first-child,
.tree-annotation-inline > label > span:first-child {
  font-size: 10.5px;
  line-height: 1.15;
  color: #5f7086;
  font-weight: 600;
}
.settings-inline-grid,
.tree-annotation-inline,
.tree-settings-profile-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  align-items: start;
}
.tree-settings-profile-actions {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.settings-inline-grid > label,
.tree-annotation-inline .settings-inline-grid > label,
#annotationRangeCustom > label,
.compact-publication-body .settings-inline-grid > label {
  display: grid;
  grid-template-columns: minmax(70px, 96px) minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  margin: 0;
}
.check-row {
  display: grid !important;
  grid-template-columns: auto 1fr !important;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 1px 0;
}
.check-row > span,
.check-row > strong {
  color: var(--r35-title) !important;
  font-size: 10.75px;
  line-height: 1.15;
}
.settings-inspector input[type='text'],
.settings-inspector input[type='search'],
.settings-inspector input[type='number'],
.settings-inspector input[type='color'],
.settings-inspector select,
.settings-inspector textarea,
.settings-inspector button {
  font-size: 11px;
}
.settings-inspector input[type='text'],
.settings-inspector input[type='search'],
.settings-inspector input[type='number'],
.settings-inspector select,
.settings-inspector textarea {
  min-height: 26px;
  height: 26px;
  padding: 3px 7px;
  border: 1px solid var(--r35-outline-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--r35-title);
}
.settings-inspector input[type='color'] {
  min-height: 24px;
  height: 24px;
  padding: 1px 3px;
}
.settings-inspector input[type='checkbox'] {
  width: 14px;
  height: 14px;
  margin: 0;
}
.settings-inspector button,
.settings-inspector .mini-btn,
.settings-inspector .wide-btn,
.settings-inspector .secondary-btn {
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 6px;
}
.settings-subsection-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 0;
  padding-top: 6px;
  border-top: 1px dashed #d9e1ee;
  color: #5b6f88;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.settings-subsection-label::after {
  content: '';
  flex: 1 1 auto;
  height: 1px;
  background: linear-gradient(90deg, rgba(153, 170, 194, 0.45), transparent);
}
.selection-card,
.setting-note,
.concise-note,
.empty-mini,
.performance-empty {
  padding: 6px 8px;
  border: 1px solid #dce6f2;
  border-radius: 6px;
  background: var(--r35-surface-soft);
  color: #55697f;
  font-size: 10.5px;
  line-height: 1.3;
}
.button-grid.tree-edit-grid,
.button-grid.performance-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}
#treeSelectionInfo,
#selectedNodeInfo,
#appliedAnnotations,
#performanceProfiler,
#metadataFieldSections {
  margin-top: 2px;
}
.settings-module-head,
.nested-setting-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 30px;
  padding: 6px 10px;
  background: linear-gradient(180deg, #fbfdff 0%, #f2f7fd 100%);
  border-bottom: 1px solid rgba(215, 223, 235, 0.72);
}
.setting-detail-toggle {
  min-height: 22px !important;
  padding: 2px 8px !important;
  font-size: 10px !important;
  border-radius: 999px !important;
}
.metadata-field-reset-row {
  padding: 8px 10px;
  background: #fff;
}
.settings-persistence-footer {
  position: sticky;
  bottom: 0;
  z-index: 4;
  padding-top: 8px;
  margin-top: 6px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(248, 250, 253, 0.94) 28%,
    rgba(248, 250, 253, 0.98) 100%
  );
  backdrop-filter: blur(4px);
}
.settings-persistence-footer .mini-btn {
  min-width: 150px;
}

@media (max-width: 1260px) {
  .tree-settings-profile-actions,
  .button-grid.tree-edit-grid,
  .button-grid.performance-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 860px) {
  .tree-settings-nav-row,
  .settings-inline-grid,
  .tree-annotation-inline,
  .tree-settings-profile-actions,
  .button-grid.tree-edit-grid,
  .button-grid.performance-actions {
    grid-template-columns: 1fr;
  }
  .settings-compact-body > label,
  .settings-subsection > div > label,
  .settings-module-body > label,
  .tree-metadata-field-navigator > label,
  .settings-inline-grid > label,
  .tree-annotation-inline > label,
  #annotationRangeCustom > label {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .tree-settings-nav-row {
    grid-template-columns: 1fr;
  }
}

/* ========================================================================== */

/* Strong final rules intentionally live at the end of the stylesheet so      */
/* earlier historical release overrides cannot cancel the requested layout.   */
/* ========================================================================== */

/*
 * Source section 44/53: root.
 * Assembles into styles/base.css.
 * Rules remain in their original cascade order; later sections may intentionally override these
 * declarations.
 */
:root {
  --r36-border: #cfd8e6;
  --r36-border-soft: #dfe5ee;
  --r36-text: #283b52;
  --r36-muted: #65758a;
  --r36-blue: #4169c9;
  --r36-blue-soft: #edf3ff;
  --r36-panel: #ffffff;
  --r36-panel-soft: #f7f9fc;
  --r36-control-h: 24px;
  --r36-setting-font: 10px;
}

/* ---------- Action bar: visibly grouped{
  height: 52px !important;
  min-height: 52px !important;
  padding: 4px 8px !important;
  gap: 5px !important;
  align-items: stretch !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  background: linear-gradient(180deg, #fbfdff 0%, #f0f4f9 100%) !important;
  border-top: 1px solid #dfe5ee !important;
  border-bottom: 1px solid #cbd5e3 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
}

/* ---------- Footer: 3–4 px smaller and materially shorter ---------- */
.professional-statusbar {
  height: 21px !important;
  min-height: 21px !important;
  padding: 0 6px !important;
  gap: 0 !important;
  background: #eef3f8 !important;
  border-top: 1px solid #ccd6e2 !important;
  color: #667487 !important;
  font-size: 8.5px !important;
  line-height: 1 !important;
  overflow: hidden !important;
}
.professional-statusbar .status-segment {
  height: 20px !important;
  padding: 0 6px !important;
  gap: 3px !important;
  border-right: 1px solid #d8e0ea !important;
  font-size: 8.5px !important;
  line-height: 1 !important;
}
.professional-statusbar .status-segment b {
  font-size: 7.5px !important;
  line-height: 1 !important;
  letter-spacing: 0.045em !important;
  color: #8794a5 !important;
}
.professional-statusbar > #metadataMatchStatus,
.professional-statusbar > #elapsedStatus,
.professional-statusbar > #statusRunId,
.professional-statusbar .status-copyright,
.professional-statusbar .status-separator {
  font-size: 8.5px !important;
  line-height: 20px !important;
}
.professional-statusbar .status-separator {
  padding: 0 3px !important;
}
.professional-statusbar .memory-indicator,
.professional-statusbar .status-indicator {
  width: 5px !important;
  height: 5px !important;
}

/* ---------- Windows-like split controls at top-right of each pane ---------- */
.pane-size-controls {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0 !important;
  margin-left: 4px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.pane-size-btn {
  width: 25px !important;
  height: 23px !important;
  min-width: 25px !important;
  min-height: 23px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 3px !important;
  background: transparent !important;
  color: #53647a !important;
  box-shadow: none !important;
}
.pane-size-btn .ui-icon {
  width: 10px !important;
  height: 10px !important;
}
.pane-size-btn:hover,
.pane-size-btn:focus-visible {
  background: #e6ebf2 !important;
  color: #213b5c !important;
  outline: none !important;
}
.pane-size-btn[aria-pressed='true'] {
  background: #dce7f8 !important;
  color: #214b91 !important;
}

/* ---------- Tree settings: highly condensed, readable, sectional ---------- */
#tab-appearance.tree-settings,
#tab-appearance.tree-settings * {
  box-sizing: border-box;
}
#tab-appearance.tree-settings {
  font-size: var(--r36-setting-font) !important;
  line-height: 1.15 !important;
  color: var(--r36-text) !important;
}
#tab-appearance.tree-settings .settings-page-titlebar.compact-settings-title {
  min-height: 31px !important;
  padding: 5px 7px !important;
  margin: 0 4px 4px !important;
  gap: 6px !important;
  border: 1px solid var(--r36-border) !important;
  border-radius: 6px !important;
  background: linear-gradient(180deg, #fbfdff, #f2f6fb) !important;
  box-shadow: none !important;
}
#tab-appearance.tree-settings .compact-settings-title strong {
  font-size: 11px !important;
  line-height: 1 !important;
}
#tab-appearance.tree-settings .compact-settings-title small {
  font-size: 8.5px !important;
  line-height: 1 !important;
}
#tab-appearance.tree-settings .settings-page-glyph .ui-icon {
  width: 14px !important;
  height: 14px !important;
}

#treeSettingsNavigator.tree-settings-navigator {
  position: sticky !important;
  top: 0 !important;
  z-index: 8 !important;
  display: grid !important;
  gap: 4px !important;
  margin: 0 4px 5px !important;
  padding: 5px !important;
  border: 1px solid var(--r36-border) !important;
  border-radius: 6px !important;
  background: #f7f9fc !important;
  box-shadow: none !important;
}
#treeSettingsNavigator .tree-settings-nav-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 116px !important;
  gap: 4px !important;
  align-items: center !important;
}
#treeSettingsNavigator .tree-settings-search,
#treeSettingsNavigator .tree-settings-section-nav {
  width: 100% !important;
  min-width: 0 !important;
  height: 24px !important;
  min-height: 24px !important;
  padding: 2px 6px !important;
  border: 1px solid #cbd5e2 !important;
  border-radius: 4px !important;
  background: #fff !important;
  font-size: 9.5px !important;
  line-height: 1 !important;
}
#treeSettingsScope.tree-settings-scope {
  display: flex !important;
  gap: 3px !important;
  flex-wrap: wrap !important;
}
#treeSettingsScope .tree-settings-scope-btn {
  height: 21px !important;
  min-height: 21px !important;
  padding: 1px 7px !important;
  border: 1px solid #cfd7e2 !important;
  border-radius: 10px !important;
  background: #fff !important;
  color: #657489 !important;
  font-size: 8.5px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  letter-spacing: 0.02em !important;
  text-transform: none !important;
}
#treeSettingsScope .tree-settings-scope-btn.active,
#treeSettingsScope .tree-settings-scope-btn[aria-pressed='true'] {
  border-color: #96abd6 !important;
  background: #e9f0ff !important;
  color: #335ba7 !important;
}

#tab-appearance.tree-settings .settings-compact-section,
#tab-appearance.tree-settings .settings-module,
#tab-appearance.tree-settings .tree-metadata-field-navigator,
#tab-appearance.tree-settings .metadata-field-sections,
#tab-appearance.tree-settings .metadata-field-reset-row {
  margin: 3px 4px !important;
  border: 1px solid var(--r36-border) !important;
  border-radius: 5px !important;
  background: #fff !important;
  box-shadow: none !important;
  overflow: hidden !important;
}
#tab-appearance.tree-settings .settings-compact-section > summary {
  position: relative !important;
  min-height: 26px !important;
  padding: 6px 23px 5px 21px !important;
  border: 0 !important;
  border-left: 3px solid #6f8fc9 !important;
  border-radius: 0 !important;
  background: linear-gradient(90deg, #f2f6fb 0%, #fafcff 100%) !important;
  color: #31465f !important;
  font-size: 9.75px !important;
  font-weight: 700 !important;
  line-height: 1.1 !important;
  letter-spacing: 0.01em !important;
  text-transform: none !important;
}
#tab-appearance.tree-settings .settings-compact-section > summary::before {
  content: '' !important;
  position: absolute !important;
  left: 9px !important;
  top: 50% !important;
  width: 5px !important;
  height: 5px !important;
  transform: translateY(-50%) !important;
  border-radius: 2px !important;
  background: #6f8fc9 !important;
}
#tab-appearance.tree-settings .settings-compact-section > summary::after {
  content: '▸' !important;
  position: absolute !important;
  right: 8px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  color: #7c8da2 !important;
  font-size: 10px !important;
}
#tab-appearance.tree-settings .settings-compact-section[open] > summary::after {
  content: '▾' !important;
}
#tab-appearance.tree-settings .settings-compact-section[open] > summary {
  border-bottom: 1px solid #dfe5ee !important;
}
#treeSettingsProfiles > summary {
  border-left-color: #7562c6 !important;
}
#treeSettingsProfiles > summary::before {
  background: #7562c6 !important;
}
#treeEditingSettings > summary {
  border-left-color: #9b6ab2 !important;
}
#treeEditingSettings > summary::before {
  background: #9b6ab2 !important;
}
#treeTypographySettings > summary {
  border-left-color: #4e85c7 !important;
}
#treeTypographySettings > summary::before {
  background: #4e85c7 !important;
}
#treeLayoutSettings > summary {
  border-left-color: #3a91aa !important;
}
#treeLayoutSettings > summary::before {
  background: #3a91aa !important;
}
#treeBranchSettings > summary {
  border-left-color: #4e8a69 !important;
}
#treeBranchSettings > summary::before {
  background: #4e8a69 !important;
}
#treeMetadataPresentationSettings > summary {
  border-left-color: #c18a37 !important;
}
#treeMetadataPresentationSettings > summary::before {
  background: #c18a37 !important;
}
#treeExportSettings > summary {
  border-left-color: #687b9f !important;
}
#treeExportSettings > summary::before {
  background: #687b9f !important;
}
#treeInteroperabilitySettings > summary {
  border-left-color: #8068a7 !important;
}
#treeInteroperabilitySettings > summary::before {
  background: #8068a7 !important;
}

#tab-appearance.tree-settings .settings-compact-body {
  display: grid !important;
  gap: 4px !important;
  padding: 5px 7px 6px !important;
  background: #fff !important;
}
#tab-appearance.tree-settings .settings-module {
  overflow: hidden !important;
}
#tab-appearance.tree-settings .settings-module-head,
#tab-appearance.tree-settings .nested-setting-head {
  min-height: 26px !important;
  padding: 4px 7px !important;
  gap: 5px !important;
  border: 0 !important;
  border-left: 3px solid #8aa1c5 !important;
  border-bottom: 1px solid #e2e7ee !important;
  background: linear-gradient(90deg, #f6f8fb, #fff) !important;
}
#tab-appearance.tree-settings .settings-module-head label,
#tab-appearance.tree-settings .nested-setting-head label,
#tab-appearance.tree-settings .settings-module-head strong {
  margin: 0 !important;
  font-size: 9.5px !important;
  font-weight: 700 !important;
  line-height: 1.1 !important;
}
#tab-appearance.tree-settings .settings-module-body {
  gap: 4px !important;
  padding: 5px 7px 6px !important;
}
#tab-appearance.tree-settings .setting-detail-toggle {
  min-height: 19px !important;
  height: 19px !important;
  padding: 1px 6px !important;
  border-radius: 9px !important;
  font-size: 8.5px !important;
  line-height: 1 !important;
}

/* Keep key text readable: wrap labels, never trim/ellipsis. */
#tab-appearance.tree-settings .settings-compact-body > label,
#tab-appearance.tree-settings .settings-module-body > label,
#tab-appearance.tree-settings .settings-subsection > div > label,
#tab-appearance.tree-settings .tree-metadata-field-navigator > label,
#tab-appearance.tree-settings .tree-annotation-inline > label {
  display: grid !important;
  grid-template-columns: minmax(92px, 42%) minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 5px !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 9.5px !important;
}
#tab-appearance.tree-settings label > span:first-child,
#tab-appearance.tree-settings label > strong:first-child {
  min-width: 0 !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
  word-break: normal !important;
  color: #5d6d81 !important;
  font-size: 9.25px !important;
  font-weight: 600 !important;
  line-height: 1.12 !important;
}
#tab-appearance.tree-settings input[type='text'],
#tab-appearance.tree-settings input[type='search'],
#tab-appearance.tree-settings input[type='number'],
#tab-appearance.tree-settings select {
  width: 100% !important;
  min-width: 0 !important;
  height: var(--r36-control-h) !important;
  min-height: var(--r36-control-h) !important;
  padding: 2px 5px !important;
  border: 1px solid #cbd5e2 !important;
  border-radius: 4px !important;
  background: #fff !important;
  color: #25394f !important;
  font-size: 9.5px !important;
  line-height: 1 !important;
}
#tab-appearance.tree-settings textarea {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 44px !important;
  padding: 4px 5px !important;
  border: 1px solid #cbd5e2 !important;
  border-radius: 4px !important;
  background: #fff !important;
  color: #25394f !important;
  font-size: 9.5px !important;
  line-height: 1.2 !important;
}
#tab-appearance.tree-settings input[type='color'] {
  width: 100% !important;
  height: 22px !important;
  min-height: 22px !important;
  padding: 1px 2px !important;
  border: 1px solid #cbd5e2 !important;
  border-radius: 4px !important;
}
#tab-appearance.tree-settings input[type='checkbox'] {
  width: 13px !important;
  height: 13px !important;
  margin: 0 !important;
}
#tab-appearance.tree-settings .check-row {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) !important;
  gap: 5px !important;
  min-height: 20px !important;
  align-items: center !important;
}
/*
 * Source section 45/53: tab appearance tree settings check row span.
 * Assembles into styles/base.css.
 * Rules remain in their original cascade order; later sections may intentionally override these
 * declarations.
 */
#tab-appearance.tree-settings .check-row > span,
#tab-appearance.tree-settings .check-row > strong {
  font-size: 9.25px !important;
  line-height: 1.12 !important;
  white-space: normal !important;
}
#tab-appearance.tree-settings button,
#tab-appearance.tree-settings .mini-btn,
#tab-appearance.tree-settings .wide-btn {
  min-height: 22px !important;
  height: auto !important;
  padding: 3px 6px !important;
  border-radius: 4px !important;
  font-size: 9px !important;
  line-height: 1.08 !important;
  white-space: normal !important;
}
#tab-appearance.tree-settings .settings-inline-grid,
#tab-appearance.tree-settings .tree-annotation-inline {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 4px !important;
}
#tab-appearance.tree-settings .settings-inline-grid > label {
  display: grid !important;
  grid-template-columns: minmax(66px, 42%) minmax(0, 1fr) !important;
  gap: 4px !important;
  align-items: center !important;
  min-width: 0 !important;
}
#tab-appearance.tree-settings .tree-settings-profile-actions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 4px !important;
}
#tab-appearance.tree-settings .button-grid.tree-edit-grid,
#tab-appearance.tree-settings .button-grid.performance-actions {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 4px !important;
}
#tab-appearance.tree-settings .settings-subsection-label {
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  margin: 3px 0 1px !important;
  padding-top: 4px !important;
  border-top: 1px solid #e5eaf1 !important;
  color: #6b798b !important;
  font-size: 8.5px !important;
  font-weight: 700 !important;
  letter-spacing: 0.03em !important;
  text-transform: none !important;
}
#tab-appearance.tree-settings .settings-subsection-label::after {
  content: '' !important;
  flex: 1 !important;
  height: 1px !important;
  background: #e2e7ee !important;
}
#tab-appearance.tree-settings .selection-card,
#tab-appearance.tree-settings .setting-note,
#tab-appearance.tree-settings .concise-note,
#tab-appearance.tree-settings .empty-mini,
#tab-appearance.tree-settings .performance-empty {
  margin: 1px 0 !important;
  padding: 4px 6px !important;
  border: 1px solid #dfe5ed !important;
  border-radius: 4px !important;
  background: #f8fafc !important;
  color: #637286 !important;
  font-size: 8.75px !important;
  line-height: 1.22 !important;
}
/* Remove static explanatory prose that wastes inspector height. */
#tab-appearance.tree-settings #treeInteroperabilitySettings .setting-note {
  display: none !important;
}
#tab-appearance.tree-settings .settings-persistence-footer {
  position: sticky !important;
  bottom: 0 !important;
  z-index: 7 !important;
  margin: 4px !important;
  padding: 5px !important;
  border: 1px solid #d3dce8 !important;
  border-radius: 5px !important;
  background: rgba(248, 250, 253, 0.97) !important;
  backdrop-filter: blur(3px) !important;
}
#tab-appearance.tree-settings .settings-persistence-footer .mini-btn {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 24px !important;
  color: #9b2c2c !important;
  border-color: #e2b7b7 !important;
  background: #fff8f8 !important;
}

@media (max-width: 1050px) {
  #tab-appearance.tree-settings .button-grid.tree-edit-grid,
  #tab-appearance.tree-settings .button-grid.performance-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
@media (max-width: 760px) {
  #treeSettingsNavigator .tree-settings-nav-row,
  #tab-appearance.tree-settings .settings-inline-grid,
  #tab-appearance.tree-settings .tree-annotation-inline,
  #tab-appearance.tree-settings .button-grid.tree-edit-grid,
  #tab-appearance.tree-settings .button-grid.performance-actions {
    grid-template-columns: 1fr !important;
  }
  #tab-appearance.tree-settings .settings-compact-body > label,
  #tab-appearance.tree-settings .settings-module-body > label,
  #tab-appearance.tree-settings .settings-subsection > div > label,
  #tab-appearance.tree-settings .tree-metadata-field-navigator > label {
    grid-template-columns: 1fr !important;
    gap: 2px !important;
  }
}

/* ========================================================================== */

/* ========================================================================== */

.topbar,
body.ui-unified-typography .topbar {
  height: 78px !important;
  min-height: 78px !important;
  max-height: 78px !important;
  grid-template-columns: 185px minmax(0, 1fr) !important;
  grid-template-rows: 25px 52px !important;
  grid-template-areas: 'brand menu' 'toolbar toolbar' !important;
  align-items: stretch !important;
  overflow: visible !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}
.topbar .brand {
  height: 25px !important;
  min-height: 25px !important;
  max-height: 25px !important;
  align-self: center !important;
  overflow: hidden !important;
}
.topbar .brand-logo {
  max-height: 23px !important;
}
.menubar {
  height: 25px !important;
  min-height: 25px !important;
  max-height: 25px !important;
  align-items: center !important;
}
.modebar {
  position: relative !important;
  z-index: 42 !important;
  min-height: 27px !important;
  height: 27px !important;
  margin: 0 !important;
  overflow: visible !important;
}
@media (max-width: 1180px) {
  .topbar,
  body.ui-unified-typography .topbar {
    grid-template-columns: 165px minmax(0, 1fr) !important;
  }
}

#tab-appearance.tree-settings {
  padding: 0 2px 4px !important;
  margin: 0 !important;
  font-size: 10px !important;
}
#tab-appearance.tree-settings .settings-page-titlebar.compact-settings-title {
  min-height: 29px !important;
  margin: 0 2px 2px !important;
  padding: 4px 6px !important;
}
#treeSettingsNavigator.tree-settings-navigator {
  margin: 0 2px 3px !important;
  padding: 4px !important;
  gap: 3px !important;
}
#tab-appearance.tree-settings .settings-compact-section,
#tab-appearance.tree-settings .settings-module,
#tab-appearance.tree-settings .tree-metadata-field-navigator,
#tab-appearance.tree-settings .metadata-field-sections,
#tab-appearance.tree-settings .metadata-field-reset-row {
  margin: 2px !important;
}
#tab-appearance.tree-settings .settings-compact-section > summary {
  min-height: 25px !important;
  padding-top: 5px !important;
  padding-bottom: 5px !important;
}
#tab-appearance.tree-settings .settings-compact-body,
#tab-appearance.tree-settings .settings-module-body {
  row-gap: 3px !important;
  column-gap: 6px !important;
  padding: 5px 6px 6px !important;
}

/* Default to one-column if the inspector itself is narrow. */
#tab-appearance.tree-settings .settings-compact-body {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
}

/* Anything structurally complex stays full-width even when the body becomes
   two-column. Simple settings rows are allowed to pair side-by-side. */
#tab-appearance.tree-settings
  .settings-compact-body
  > :is(
    .settings-subsection,
    .settings-subsection-label,
    .settings-inline-grid,
    .button-grid,
    .tree-settings-profile-actions,
    .selection-card,
    .setting-note,
    .concise-note,
    .empty-mini,
    .performance-empty,
    .tree-annotation-inline,
    .applied-annotations,
    .nested-setting,
    .settings-module,
    .collapsed-list,
    button.wide-btn,
    button.secondary-btn
  ) {
  grid-column: 1/-1 !important;
}
#tab-appearance.tree-settings .settings-compact-body > label:has(textarea),
#tab-appearance.tree-settings #treeSettingsProfiles .settings-compact-body > label,
#tab-appearance.tree-settings #treeSettingsProfiles .concise-note {
  grid-column: 1/-1 !important;
}

/* Real two-column control layout once the Settings panel has enough width. */
@container (min-width:440px) {
  #tab-appearance.tree-settings .settings-compact-body {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  #tab-appearance.tree-settings .settings-compact-body > label {
    min-height: 25px !important;
    grid-template-columns: minmax(78px, 43%) minmax(0, 1fr) !important;
    gap: 4px !important;
  }
  #tab-appearance.tree-settings .settings-compact-body > .check-row {
    grid-template-columns: auto minmax(0, 1fr) !important;
  }
  #tab-appearance.tree-settings .settings-inline-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  #tab-appearance.tree-settings .tree-settings-profile-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

/* Typography needs enough editing space for the actual figure title/subtitle. */
#treeTypographySettings .settings-compact-body > label:has(#figureTitle),
#treeTypographySettings .settings-compact-body > label.figure-subtitle-setting,
#treeTypographySettings .settings-compact-body > label:has(#fontFamily),
#treeTypographySettings .settings-compact-body > .position-controls {
  grid-column: 1/-1 !important;
}
#treeTypographySettings label:has(#figureTitle),
#treeTypographySettings label.figure-subtitle-setting,
#treeTypographySettings label:has(#fontFamily) {
  grid-template-columns: minmax(88px, 23%) minmax(0, 1fr) !important;
}
#treeTypographySettings #figureTitle {
  min-height: 25px !important;
}
#treeTypographySettings #clusterDescription {
  height: 44px;
  min-height: 44px !important;
  max-height: none !important;
  resize: vertical !important;
  line-height: 1.25 !important;
  padding-top: 5px !important;
  padding-bottom: 5px !important;
}

/* Pair simple toggles/values without creating blank blocks. */
#tab-appearance.tree-settings .check-row {
  margin: 0 !important;
  min-height: 22px !important;
  padding: 0 1px !important;
}
#tab-appearance.tree-settings .settings-subsection-label {
  margin: 2px 0 0 !important;
  padding-top: 3px !important;
}
#tab-appearance.tree-settings .selection-card,
#tab-appearance.tree-settings .setting-note,
#tab-appearance.tree-settings .concise-note,
#tab-appearance.tree-settings .empty-mini {
  padding: 3px 5px !important;
  margin: 0 !important;
}
#tab-appearance.tree-settings .settings-persistence-footer {
  margin: 2px !important;
  padding: 4px !important;
}

/* Clear two-column grouping without heavy boxes. */
#tab-appearance.tree-settings .settings-compact-body > label:not(.check-row) {
  padding: 2px 3px !important;
  border-radius: 4px !important;
  background: #fbfcfe !important;
  border: 1px solid #edf1f6 !important;
}
#tab-appearance.tree-settings .settings-compact-body > label:not(.check-row):focus-within {
  background: #f6f9ff !important;
  border-color: #d6e1f3 !important;
}

/* Avoid the old whitespace created by empty hidden/conditional blocks. */
#tab-appearance.tree-settings .hidden,
#tab-appearance.tree-settings [hidden] {
  display: none !important;
}
#tab-appearance.tree-settings .conditional-setting.hidden,
#tab-appearance.tree-settings .settings-module-body.hidden {
  margin: 0 !important;
  padding: 0 !important;
}

@container (max-width:439px) {
  #tab-appearance.tree-settings .settings-compact-body > label,
  #tab-appearance.tree-settings .settings-inline-grid > label {
    grid-template-columns: minmax(94px, 42%) minmax(0, 1fr) !important;
  }
  #treeTypographySettings label:has(#figureTitle),
  #treeTypographySettings label.figure-subtitle-setting,
  #treeTypographySettings label:has(#fontFamily) {
    grid-template-columns: minmax(94px, 42%) minmax(0, 1fr) !important;
  }
}

/* b: two-column settings even at the normal ~350px Settings width.
   At this width each setting stacks its key over the control within its half,
   so keys remain readable instead of being trimmed. */
@container (min-width:300px) and (max-width:439px) {
  #tab-appearance.tree-settings .settings-compact-body {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  #tab-appearance.tree-settings .settings-compact-body > label:not(.check-row) {
    grid-template-columns: minmax(0, 1fr) !important;
    align-content: start !important;
    gap: 2px !important;
    min-height: 43px !important;
  }
  #tab-appearance.tree-settings .settings-compact-body > label:not(.check-row) > span:first-child {
    min-height: 12px !important;
    font-size: 9px !important;
    line-height: 1.12 !important;
  }
  #tab-appearance.tree-settings .settings-compact-body > .check-row {
    grid-template-columns: auto minmax(0, 1fr) !important;
    min-height: 24px !important;
    align-self: center !important;
  }
  #tab-appearance.tree-settings .settings-inline-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  #tab-appearance.tree-settings .settings-inline-grid > label {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 2px !important;
  }
  #tab-appearance.tree-settings .settings-inline-grid > label > span:first-child {
    min-height: 12px !important;
  }
  #treeTypographySettings label:has(#figureTitle),
  #treeTypographySettings label.figure-subtitle-setting,
  #treeTypographySettings label:has(#fontFamily) {
    grid-column: 1/-1 !important;
    grid-template-columns: 82px minmax(0, 1fr) !important;
    min-height: 27px !important;
    align-items: center !important;
  }
  #treeTypographySettings label.figure-subtitle-setting {
    min-height: 48px !important;
  }
}

/* Keep the reset action anchored at the visual end of the inspector. */
#tab-appearance.tree-settings {
  min-height: 100% !important;
}
#tab-appearance.tree-settings .settings-persistence-footer {
  clear: both !important;
}

/* c: nested Tree subsections also use the same two-column grammar. */
@container (min-width:300px) {
  #tab-appearance.tree-settings .settings-subsection > div,
  #tab-appearance.tree-settings .nested-setting > .settings-module-body {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 3px 6px !important;
  }
  #tab-appearance.tree-settings .settings-subsection > div > label:not(.check-row),
  #tab-appearance.tree-settings .nested-setting > .settings-module-body > label:not(.check-row) {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 2px !important;
    min-width: 0 !important;
    padding: 2px 3px !important;
    border: 1px solid #edf1f6 !important;
    border-radius: 4px !important;
    background: #fbfcfe !important;
  }
  #tab-appearance.tree-settings .settings-subsection > div > label:not(.check-row) > span:first-child,
  #tab-appearance.tree-settings
    .nested-setting
    > .settings-module-body
    > label:not(.check-row)
    > span:first-child {
    min-height: 12px !important;
    font-size: 9px !important;
    line-height: 1.12 !important;
  }
  #tab-appearance.tree-settings
    .settings-subsection
    > div
    > :is(
      .settings-inline-grid,
      .settings-subsection-label,
      .button-grid,
      .setting-note,
      .selection-card,
      .concise-note,
      .empty-mini,
      button.wide-btn,
      .nested-setting,
      .settings-subsection
    ),
  #tab-appearance.tree-settings
    .nested-setting
    > .settings-module-body
    > :is(
      .settings-inline-grid,
      .settings-subsection-label,
      .button-grid,
      .setting-note,
      .selection-card,
      .concise-note,
      .empty-mini,
      button.wide-btn,
      .nested-setting,
      .settings-subsection
    ) {
    grid-column: 1/-1 !important;
  }
  #tab-appearance.tree-settings .settings-subsection > div > .check-row,
  #tab-appearance.tree-settings .nested-setting > .settings-module-body > .check-row {
    grid-template-columns: auto minmax(0, 1fr) !important;
  }
}

/* ========================================================================== */
/* d — visual 100% normalization                                           */
/* Current browser 95% becomes the new interface 100%; current Settings 90%  */
/* becomes the new Settings 100%.  Values are reduced directly, not scaled.  */
/* ========================================================================== */

/* Global/header geometry follows the new 95%-equivalent interface baseline. */
.topbar,
body.ui-unified-typography .topbar {
  height: 74px !important;
  min-height: 74px !important;
  max-height: 74px !important;
  grid-template-rows: 24px 49px !important;
}
.topbar .brand {
  height: 24px !important;
  min-height: 24px !important;
  max-height: 24px !important;
}
.topbar .brand-logo {
  max-height: 22px !important;
}
.menubar {
  height: 24px !important;
  min-height: 24px !important;
  max-height: 24px !important;
  font-size: 11.4px !important;
}

/* The same portable profile actions fit every settings inspector. */
#tab-appearance.tree-settings .tree-settings-profile-actions.portable-profile-actions,
.unified-settings .tree-settings-profile-actions.portable-profile-actions,
.tree-settings-profile-actions.portable-profile-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 5px;
}
.tree-settings-profile-actions.portable-profile-actions > button {
  min-width: 0;
  white-space: normal;
}

.modebar {
  min-height: 26px !important;
  height: 26px !important;
  font-size: 10.5px !important;
}

/* Same compact baseline for the other Settings pages, without changing their
   visual hierarchy or plot cards. */
.settings-inspector .control-page:not(#tab-appearance) {
  font-size: 90% !important;
}
.settings-inspector .control-page:not(#tab-appearance) .settings-page-titlebar strong {
  font-size: 90% !important;
}
.settings-inspector .control-page:not(#tab-appearance) :is(input, select, textarea, button) {
  font-size: 90% !important;
}

/* ========================================================================== */

/* Two columns are retained only where labels and controls remain readable.  */
/* ========================================================================== */

/* Window-style close control beside minimize/maximize. */
.pane-close-btn {
  font-family: Arial, sans-serif !important;
  font-size: 15px !important;
  line-height: 1 !important;
  font-weight: 400 !important;
}
.pane-close-btn:hover,
.pane-close-btn:focus-visible {
  background: #e81123 !important;
  color: #fff !important;
}

#tab-appearance.tree-settings {
  font-size: 9.4px !important;
  line-height: 1.15 !important;
}
#tab-appearance.tree-settings label > span:first-child,
#tab-appearance.tree-settings label > strong:first-child,
#tab-appearance.tree-settings .settings-compact-body > label:not(.check-row) > span:first-child,
#tab-appearance.tree-settings .settings-module-body > label:not(.check-row) > span:first-child,
#tab-appearance.tree-settings .settings-subsection > div > label:not(.check-row) > span:first-child,
#tab-appearance.tree-settings .settings-inline-grid > label > span:first-child {
  font-size: 9px !important;
  line-height: 1.16 !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
  hyphens: none !important;
  white-space: normal !important;
  min-width: 0 !important;
}
#tab-appearance.tree-settings input[type='text'],
#tab-appearance.tree-settings input[type='search'],
#tab-appearance.tree-settings input[type='number'],
#tab-appearance.tree-settings select {
  min-height: 24px !important;
  height: 24px !important;
  padding: 2px 5px !important;
  font-size: 9.6px !important;
  line-height: 1.18 !important;
}
#tab-appearance.tree-settings input[type='color'] {
  min-height: 22px !important;
  height: 22px !important;
}
#tab-appearance.tree-settings .check-row > span,
#tab-appearance.tree-settings .check-row > strong {
  font-size: 9px !important;
  line-height: 1.16 !important;
}
#tab-appearance.tree-settings button,
#tab-appearance.tree-settings .mini-btn,
#tab-appearance.tree-settings .wide-btn {
  min-height: 23px !important;
  padding: 2px 7px !important;
  font-size: 9px !important;
  line-height: 1.12 !important;
}

/* No off-labelling: every compact setting protects a real label column. */
@container (min-width:300px) {
  #tab-appearance.tree-settings .settings-compact-body,
  #tab-appearance.tree-settings .settings-module-body,
  #tab-appearance.tree-settings .settings-subsection > div,
  #tab-appearance.tree-settings .nested-setting > .settings-module-body {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 4px 6px !important;
  }
  #tab-appearance.tree-settings .settings-compact-body > label:not(.check-row),
  #tab-appearance.tree-settings .settings-module-body > label:not(.check-row),
  #tab-appearance.tree-settings .settings-subsection > div > label:not(.check-row),
  #tab-appearance.tree-settings .nested-setting > .settings-module-body > label:not(.check-row) {
    display: grid !important;
    grid-template-columns: minmax(70px, 44%) minmax(0, 56%) !important;
    align-items: center !important;
    gap: 5px !important;
    min-height: 28px !important;
    padding: 2px 3px !important;
  }
  #tab-appearance.tree-settings .settings-inline-grid {
    grid-column: 1/-1 !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 4px 6px !important;
  }
  #tab-appearance.tree-settings .settings-inline-grid > label:not(.check-row) {
    display: grid !important;
    grid-template-columns: minmax(62px, 43%) minmax(0, 57%) !important;
    align-items: center !important;
    gap: 4px !important;
    min-height: 27px !important;
    padding: 2px 3px !important;
  }
}

/* Important/long settings span the full inspector width instead of breaking labels. */
#treeTypographySettings label:has(#figureTitle),
#treeTypographySettings label.figure-subtitle-setting,
#treeTypographySettings label:has(#fontFamily),
#treeTypographySettings .position-controls,
#treeScaleSettings label:has(#treeScaleBarPosition),
#treeScaleSettings label:has(#treeScaleBarShape),
#treeMetadataPresentationSettings label:has(#metadataTextColorMode),
#treeMetadataPresentationSettings label:has(#metadataMissingLabel),
#treeExportSettings .check-row:has(#pdfIncludeProjectHeader) {
  grid-column: 1/-1 !important;
}
#treeTypographySettings label:has(#figureTitle),
#treeTypographySettings label.figure-subtitle-setting,
#treeTypographySettings label:has(#fontFamily),
#treeScaleSettings label:has(#treeScaleBarPosition),
#treeScaleSettings label:has(#treeScaleBarShape) {
  grid-template-columns: minmax(88px, 28%) minmax(0, 72%) !important;
}

/* Title/subtitle editing gets generous input space. */
#treeTypographySettings #figureTitle {
  height: 27px !important;
  min-height: 27px !important;
  font-size: 10.2px !important;
}
#treeTypographySettings #clusterDescription {
  height: 64px;
  min-height: 44px !important;
  max-height: none !important;
  resize: vertical !important;
  font-size: 10.2px !important;
  line-height: 1.28 !important;
  padding: 5px 7px !important;
}
#treeTypographySettings :is(#titleOffsetX, #titleOffsetY, #subtitleOffsetX, #subtitleOffsetY),
#treeTypographySettings :is(#titleFontSize, #subtitleFontSize) {
  font-size: 10px !important;
  font-weight: 500 !important;
}
#treeTypographySettings .position-controls > label {
  grid-template-columns: minmax(72px, 46%) minmax(0, 54%) !important;
}

/* Automatic collapse: long rule names receive a protected horizontal label area. */
#treeAutoCollapseSettings > div.tree-autocollapse {
  grid-template-columns: 1fr !important;
  gap: 4px !important;
}
#treeAutoCollapseSettings .auto-collapse-min,
#treeAutoCollapseSettings .auto-collapse-rule {
  grid-column: 1/-1 !important;
}
#treeAutoCollapseSettings .auto-collapse-min {
  display: grid !important;
  grid-template-columns: 145px minmax(0, 1fr) !important;
  gap: 6px !important;
  align-items: center !important;
}
#treeAutoCollapseSettings .auto-collapse-rule {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 68px !important;
  gap: 6px !important;
  align-items: center !important;
}
#treeAutoCollapseSettings .auto-collapse-rule > label {
  display: grid !important;
  grid-template-columns: 145px minmax(0, 1fr) !important;
  gap: 6px !important;
  align-items: center !important;
  min-width: 0 !important;
}
#treeAutoCollapseSettings .auto-collapse-rule button {
  width: 68px !important;
  min-width: 68px !important;
  min-height: 24px !important;
  border: 1px solid #aebbd0 !important;
  border-radius: 6px !important;
  background: linear-gradient(180deg, #fff 0%, #f1f5fb 100%) !important;
  color: #30435c !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}
#treeAutoCollapseSettings .auto-collapse-rule button:hover {
  border-color: #7f9bc5 !important;
  background: #eaf1fb !important;
}

/* Scale-bar editor: compact, aligned, and now includes explicit shape. */
#treeScaleSettings .settings-module-body {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}
#treeScaleSettings .settings-inline-grid,
#treeScaleSettings #resetScaleBarPositionBtn {
  grid-column: 1/-1 !important;
}

/* Metadata highlighting: remove the empty second-half panel. */
#tab-metadata .metadata-color-compact {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 5px 7px !important;
}
#tab-metadata .metadata-color-compact > label {
  min-height: 28px !important;
  grid-template-columns: minmax(92px, 42%) minmax(0, 58%) !important;
}
#tab-metadata #metadataHighlightFields,
#tab-metadata .metadata-color-compact > label:has(#metadataUncoloredColor) {
  grid-column: 1/-1 !important;
}
#tab-metadata #metadataHighlightFields {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 4px 8px !important;
  align-items: center !important;
  padding: 5px !important;
  border: 1px solid #dde5ef !important;
  border-radius: 6px !important;
  background: #fbfcfe !important;
}
#tab-metadata #metadataValueDropdown,
#tab-metadata #metadataColorPalette {
  grid-column: 1/-1 !important;
}
#tab-metadata .highlight-palette-head {
  grid-column: 1/-1 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
}
#tab-metadata .metadata-tree-settings-note {
  padding: 4px 6px !important;
  margin: 3px 1px !important;
  font-size: 9px !important;
  line-height: 1.2 !important;
}

/* Metadata field editor: order is a compact toolbar, while Header/Tree/Compact
   become nested collapsible blocks instead of three crowded open cards. */
#tab-appearance.tree-settings .metadata-field-body {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 4px !important;
  padding: 5px !important;
}
#tab-appearance.tree-settings .field-order-row {
  grid-column: 1/-1 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 5px !important;
  min-height: 28px !important;
  padding: 3px 5px !important;
  border: 1px solid #dbe3ee !important;
  border-radius: 5px !important;
  background: #f7f9fc !important;
}
#tab-appearance.tree-settings .field-order-row label {
  display: grid !important;
  grid-template-columns: auto 52px !important;
  align-items: center !important;
  gap: 5px !important;
  width: auto !important;
}
#tab-appearance.tree-settings .field-order-row label span {
  font-size: 8.8px !important;
  font-weight: 600 !important;
  color: #64758a !important;
}
#tab-appearance.tree-settings .field-order-row input {
  width: 52px !important;
}
#tab-appearance.tree-settings .field-order-actions button {
  width: 24px !important;
  height: 24px !important;
  min-height: 24px !important;
  padding: 0 !important;
}
#tab-appearance.tree-settings .metadata-field-block {
  grid-column: 1/-1 !important;
  margin: 0 !important;
  padding: 0 5px 5px !important;
  border-radius: 5px !important;
}
#tab-appearance.tree-settings .metadata-field-block-title {
  min-height: 26px !important;
  display: flex !important;
  align-items: center !important;
  padding: 4px 18px 4px 5px !important;
  font-size: 9.4px !important;
  font-weight: 700 !important;
}
#tab-appearance.tree-settings .metadata-field-block:not(.is-collapsed-setting) {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 4px 6px !important;
}
#tab-appearance.tree-settings .metadata-field-block:not(.is-collapsed-setting) > .metadata-field-block-title,
#tab-appearance.tree-settings .metadata-field-block:not(.is-collapsed-setting) > .settings-inline-grid,
#tab-appearance.tree-settings .metadata-field-block:not(.is-collapsed-setting) > .tree-column-extra,
#tab-appearance.tree-settings .metadata-field-block:not(.is-collapsed-setting) > .setting-note,
#tab-appearance.tree-settings .metadata-field-block:not(.is-collapsed-setting) > .metadata-track-options {
  grid-column: 1/-1 !important;
}
#tab-appearance.tree-settings .metadata-field-block:not(.is-collapsed-setting) > label:not(.check-row) {
  display: grid !important;
  grid-template-columns: minmax(72px, 43%) minmax(0, 57%) !important;
  align-items: center !important;
  gap: 4px !important;
  min-height: 27px !important;
  padding: 2px 3px !important;
}
#tab-appearance.tree-settings .metadata-field-block .settings-inline-grid > label:not(.check-row),
#tab-appearance.tree-settings .tree-column-extra .settings-inline-grid > label:not(.check-row) {
  grid-template-columns: minmax(68px, 44%) minmax(0, 56%) !important;
}
#tab-appearance.tree-settings .metadata-field-section > summary {
  min-height: 27px !important;
  padding: 4px 7px !important;
}
#tab-appearance.tree-settings .metadata-field-title {
  font-size: 9.6px !important;
}

/* Applied annotation list remains the removal/edit surface; the old Load /
   Apply / Remove action row is intentionally absent. */
#treeHighlightsSettings .tree-annotation-inline {
  gap: 4px 6px !important;
}
#treeHighlightsSettings #annotationTargetInfo {
  grid-column: 1/-1 !important;
}

@container (max-width:299px) {
  #tab-appearance.tree-settings .settings-compact-body,
  #tab-appearance.tree-settings .settings-module-body,
  #tab-appearance.tree-settings .settings-subsection > div,
  #tab-appearance.tree-settings .nested-setting > .settings-module-body {
    grid-template-columns: 1fr !important;
  }
  #tab-appearance.tree-settings .settings-compact-body > label:not(.check-row),
  #tab-appearance.tree-settings .settings-module-body > label:not(.check-row),
  #tab-appearance.tree-settings .settings-subsection > div > label:not(.check-row) {
    grid-template-columns: minmax(92px, 42%) minmax(0, 58%) !important;
  }
}

#tab-appearance.tree-settings .metadata-field-block.is-collapsed-setting > :not(.metadata-field-block-title) {
  display: none !important;
}
#treeAutoCollapseSettings .auto-collapse-rule {
  grid-template-columns: minmax(0, 1fr) 68px !important;
  align-items: end !important;
}
#treeAutoCollapseSettings .auto-collapse-rule > label {
  grid-template-columns: 1fr !important;
  gap: 2px !important;
  align-content: end !important;
}
#treeAutoCollapseSettings .auto-collapse-rule > label > span:first-child {
  min-height: 13px !important;
  font-size: 9.2px !important;
  font-weight: 600 !important;
}
#treeAutoCollapseSettings .auto-collapse-rule > label > input {
  width: 100% !important;
  min-width: 0 !important;
}
#treeAutoCollapseSettings .auto-collapse-rule button {
  align-self: end !important;
}

#tab-metadata .metadata-color-compact {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 5px !important;
}
#tab-metadata .metadata-color-compact > label {
  grid-column: 1/-1 !important;
  display: grid !important;
  grid-template-columns: 112px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 7px !important;
  min-height: 29px !important;
  padding: 2px 3px !important;
}
#tab-metadata #metadataHighlightFields {
  grid-column: 1/-1 !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 7px !important;
  padding: 6px !important;
  border: 1px solid #dbe4ef !important;
  border-radius: 6px !important;
  background: #fbfcfe !important;
}
#tab-metadata .metadata-highlight-values-block,
#tab-metadata .metadata-highlight-palette-block {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 5px !important;
  min-width: 0 !important;
}
#tab-metadata .highlight-palette-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  min-height: 26px !important;
}
#tab-metadata .metadata-other-color-row {
  display: grid !important;
  grid-template-columns: minmax(100px, 1fr) 46px !important;
  align-items: center !important;
  gap: 8px !important;
  min-height: 28px !important;
  padding: 4px 2px 1px !important;
  margin-top: 2px !important;
  border-top: 1px solid #e1e7f0 !important;
  font-size: 9.4px !important;
  font-weight: 600 !important;
  color: #53657c !important;
}
#tab-metadata .metadata-other-color-row input[type='color'] {
  width: 46px !important;
  height: 24px !important;
  justify-self: end !important;
}
#tab-metadata .color-code-row {
  grid-template-columns: minmax(100px, 1fr) 32px 78px !important;
  gap: 5px !important;
}
#tab-metadata .color-code-row > span {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  line-height: 1.15 !important;
}

/* Branch settings: no half-empty second column; every property is a real row. */
#treeBranchSettings > .settings-compact-body {
  grid-template-columns: 1fr !important;
  gap: 4px !important;
}
#treeBranchSettings > .settings-compact-body > .settings-inline-grid {
  grid-template-columns: 1fr !important;
  gap: 4px !important;
}
#treeBranchSettings > .settings-compact-body > label:not(.check-row),
#treeBranchSettings > .settings-compact-body > .settings-inline-grid > label:not(.check-row) {
  grid-column: 1/-1 !important;
  display: grid !important;
  grid-template-columns: 122px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 7px !important;
  min-height: 28px !important;
  padding: 2px 3px !important;
}
/*
 * Source section 47/53: tree branch settings settings compact body label has tree branch .
 * Assembles into styles/base.css.
 * Rules remain in their original cascade order; later sections may intentionally override these
 * declarations.
 */
#treeBranchSettings > .settings-compact-body > label:has(#treeBranchColor) {
  display: none !important;
}
#treeBranchSettings.branch-fixed-color > .settings-compact-body > label:has(#treeBranchColor) {
  display: grid !important;
}

/* Title/subtitle offsets are four explicit rows, not a compressed matrix. */
#treeTypographySettings .position-controls > div {
  grid-template-columns: 1fr !important;
  gap: 4px !important;
}
#treeTypographySettings .position-controls > div > label {
  grid-column: 1/-1 !important;
  display: grid !important;
  grid-template-columns: 132px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 7px !important;
  min-height: 28px !important;
  padding: 2px 3px !important;
}
#treeTypographySettings .position-controls #resetFigureTextPositionsBtn {
  grid-column: 1/-1 !important;
}

/* Scale bar: one readable row per control; offsets and appearance no longer squeeze together. */
#treeScaleSettings .settings-module-body {
  grid-template-columns: 1fr !important;
  gap: 4px !important;
}
#treeScaleSettings .settings-module-body > label:not(.check-row),
#treeScaleSettings .settings-inline-grid > label:not(.check-row) {
  grid-column: 1/-1 !important;
  display: grid !important;
  grid-template-columns: 112px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 7px !important;
  min-height: 28px !important;
  padding: 2px 3px !important;
}
#treeScaleSettings .settings-inline-grid {
  grid-column: 1/-1 !important;
  grid-template-columns: 1fr !important;
  gap: 4px !important;
}
#treeScaleSettings #resetScaleBarPositionBtn {
  grid-column: 1/-1 !important;
}

/* General narrow-panel safeguard: prefer a full row rather than off-labelling. */
@container (max-width:390px) {
}

#tab-metadata .metadata-color-compact {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  column-gap: 6px !important;
  row-gap: 6px !important;
}
#tab-metadata .metadata-color-compact > label {
  grid-column: auto !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
  align-content: start !important;
  gap: 3px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
}
#tab-metadata .metadata-color-compact > label > span:first-child {
  min-height: 14px !important;
  font-size: 9.3px !important;
  line-height: 1.1 !important;
  white-space: normal !important;
}
#tab-metadata .metadata-color-compact > label select {
  width: 100% !important;
  min-width: 0 !important;
}
#tab-metadata #metadataHighlightFields {
  grid-column: 1/-1 !important;
  margin-top: 0 !important;
  padding: 7px !important;
  gap: 7px !important;
  border-color: #d7e0ec !important;
  background: #fff !important;
}
#tab-metadata .metadata-highlight-values-block {
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}
#tab-metadata .metadata-highlight-palette-block {
  padding-top: 6px !important;
  border-top: 1px solid #e0e7f0 !important;
}
#tab-metadata .highlight-palette-head {
  min-height: 24px !important;
}
#tab-metadata .metadata-other-color-row {
  grid-template-columns: minmax(0, 1fr) 32px 78px !important;
  min-height: 26px !important;
  padding: 3px 0 0 !important;
  border-top: 1px solid #e5eaf2 !important;
}
#tab-metadata .metadata-other-color-row::after {
  content: '';
  display: block;
  width: 78px;
  height: 1px;
}
#tab-metadata .metadata-other-color-row input[type='color'] {
  grid-column: 2 !important;
  width: 32px !important;
  height: 22px !important;
  justify-self: start !important;
}

/* Compact tree Figure & layout: every control is a deliberate readable row. */
#treeCompactSettings .compact-publication-body > .settings-subsection:first-of-type > div {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 4px !important;
}
#treeCompactSettings .compact-publication-body > .settings-subsection:first-of-type > div > label,
#treeCompactSettings
  .compact-publication-body
  > .settings-subsection:first-of-type
  .settings-inline-grid
  > label {
  grid-column: 1/-1 !important;
  display: grid !important;
  grid-template-columns: 118px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 7px !important;
  min-height: 27px !important;
  padding: 1px 2px !important;
}
#treeCompactSettings .compact-publication-body > .settings-subsection:first-of-type .settings-inline-grid {
  grid-column: 1/-1 !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 4px !important;
}
#treeCompactSettings .compact-publication-body > .settings-subsection:first-of-type label > span:first-child {
  min-width: 0 !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  line-height: 1.15 !important;
}
#treeCompactSettings #compactBackgroundColor {
  width: 100% !important;
  max-width: none !important;
}

/* Other compact-tree subsection rows follow the same label/value rhythm. */
#treeCompactSettings .compact-publication-body > .settings-subsection:not(:first-of-type) > div {
  grid-template-columns: 1fr !important;
  gap: 4px !important;
}
#treeCompactSettings
  .compact-publication-body
  > .settings-subsection:not(:first-of-type)
  > div
  > label:not(.check-row),
#treeCompactSettings
  .compact-publication-body
  > .nested-setting
  .settings-module-body
  > label:not(.check-row) {
  display: grid !important;
  grid-template-columns: 118px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 7px !important;
  min-height: 27px !important;
  padding: 1px 2px !important;
}
#tab-metadata .metadata-other-color-row {
  grid-template-columns: minmax(0, 1fr) 42px !important;
}
#tab-metadata .metadata-other-color-row::after {
  display: none !important;
  content: none !important;
}
#tab-metadata .metadata-other-color-row input[type='color'] {
  grid-column: 2 !important;
  width: 42px !important;
  justify-self: end !important;
}

#tab-appearance.tree-settings #treeBranchSettings > .settings-compact-body,
#tab-appearance.tree-settings #treeScaleSettings > .settings-module-body,
#tab-appearance.tree-settings #treeTypographySettings .position-controls > div,
#tab-appearance.tree-settings #treeSupportSettings > .settings-module-body {
  grid-template-columns: 1fr !important;
  gap: 4px !important;
}
#tab-appearance.tree-settings #treeBranchSettings > .settings-compact-body > .settings-inline-grid,
#tab-appearance.tree-settings #treeScaleSettings .settings-inline-grid,
#tab-appearance.tree-settings #treeSupportSettings .settings-inline-grid {
  grid-column: 1/-1 !important;
  grid-template-columns: 1fr !important;
  gap: 4px !important;
}
#tab-appearance.tree-settings #treeBranchSettings > .settings-compact-body > label:not(.check-row),
#tab-appearance.tree-settings
  #treeBranchSettings
  > .settings-compact-body
  > .settings-inline-grid
  > label:not(.check-row),
#tab-appearance.tree-settings #treeScaleSettings > .settings-module-body > label:not(.check-row),
#tab-appearance.tree-settings #treeScaleSettings .settings-inline-grid > label:not(.check-row),
#tab-appearance.tree-settings #treeTypographySettings .position-controls > div > label:not(.check-row),
#tab-appearance.tree-settings #treeSupportSettings .settings-subsection > div > label:not(.check-row),
#tab-appearance.tree-settings #treeSupportSettings .settings-inline-grid > label:not(.check-row) {
  grid-column: 1/-1 !important;
  display: grid !important;
  grid-template-columns: 122px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 7px !important;
  min-height: 27px !important;
  padding: 1px 2px !important;
}
#tab-appearance.tree-settings #treeBranchSettings > .settings-compact-body > label:has(#treeBranchColor) {
  display: none !important;
}
#tab-appearance.tree-settings
  #treeBranchSettings.branch-fixed-color
  > .settings-compact-body
  > label:has(#treeBranchColor) {
  display: grid !important;
}

#tab-appearance.tree-settings
  #treeCompactSettings
  .compact-publication-body
  > .settings-subsection:first-of-type
  > div,
#tab-appearance.tree-settings
  #treeCompactSettings
  .compact-publication-body
  > .settings-subsection:not(:first-of-type)
  > div {
  grid-template-columns: 1fr !important;
  gap: 4px !important;
}
#tab-appearance.tree-settings #treeCompactSettings .compact-publication-body .settings-inline-grid {
  grid-column: 1/-1 !important;
  grid-template-columns: 1fr !important;
  gap: 4px !important;
}
#tab-appearance.tree-settings
  #treeCompactSettings
  .compact-publication-body
  > .settings-subsection
  > div
  > label:not(.check-row),
#tab-appearance.tree-settings
  #treeCompactSettings
  .compact-publication-body
  > .settings-subsection
  .settings-inline-grid
  > label:not(.check-row),
#tab-appearance.tree-settings
  #treeCompactSettings
  .compact-publication-body
  > .nested-setting
  .settings-module-body
  > label:not(.check-row) {
  grid-column: 1/-1 !important;
  display: grid !important;
  grid-template-columns: 118px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 7px !important;
  min-height: 27px !important;
  padding: 1px 2px !important;
}

/* Metadata highlighting: two compact selectors above one integrated editor card. */
#tab-metadata .settings-compact-body.metadata-color-compact {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 6px !important;
}
#tab-metadata .settings-compact-body.metadata-color-compact > label {
  grid-column: auto !important;
  grid-template-columns: 1fr !important;
  gap: 3px !important;
}
#tab-metadata .settings-compact-body.metadata-color-compact > #metadataHighlightFields {
  grid-column: 1/-1 !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 7px !important;
}
#tab-metadata #metadataHighlightFields .metadata-other-color-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 42px !important;
  gap: 8px !important;
  align-items: center !important;
}

#tab-appearance.tree-settings #treeBranchSettings .nested-setting > .settings-module-body {
  grid-template-columns: 1fr !important;
  gap: 4px !important;
}
#tab-appearance.tree-settings
  #treeBranchSettings
  .nested-setting
  > .settings-module-body
  > .settings-inline-grid {
  grid-template-columns: 1fr !important;
  gap: 4px !important;
}
#tab-appearance.tree-settings
  #treeBranchSettings
  .nested-setting
  > .settings-module-body
  > label:not(.check-row),
#tab-appearance.tree-settings
  #treeBranchSettings
  .nested-setting
  > .settings-module-body
  > .settings-inline-grid
  > label:not(.check-row) {
  grid-column: 1/-1 !important;
  display: grid !important;
  grid-template-columns: 122px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 7px !important;
  min-height: 27px !important;
  padding: 1px 2px !important;
}
#tab-appearance.tree-settings #treeCompactSettings > .compact-publication-body {
  grid-template-columns: 1fr !important;
  gap: 4px !important;
}
#tab-appearance.tree-settings #treeCompactSettings > .compact-publication-body > .settings-subsection,
#tab-appearance.tree-settings #treeCompactSettings > .compact-publication-body > .nested-setting {
  grid-column: 1/-1 !important;
  width: 100% !important;
  min-width: 0 !important;
}
#tab-appearance.tree-settings #treeCompactSettings #compactCircularControls.is-layout-hidden,
#tab-appearance.tree-settings #treeCompactSettings #compactArcField.is-layout-hidden {
  display: none !important;
}

#tab-appearance.tree-settings #treeMetadataHighlightingSettings > .metadata-color-compact,
#tab-appearance.tree-settings
  #treeMetadataHighlightingSettings
  > .settings-compact-body.metadata-color-compact {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 6px !important;
  padding: 6px 7px !important;
}
#tab-appearance.tree-settings #treeMetadataHighlightingSettings .metadata-tree-settings-note,
#tab-appearance.tree-settings #treeMetadataHighlightingSettings .setting-note,
#tab-appearance.tree-settings #treeMetadataHighlightingSettings #metadataHighlightFields {
  grid-column: 1/-1 !important;
}
#tab-appearance.tree-settings
  #treeMetadataHighlightingSettings
  > .metadata-color-compact
  > label:not(.check-row) {
  grid-column: auto !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 3px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
}
#tab-appearance.tree-settings
  #treeMetadataHighlightingSettings
  > .metadata-color-compact
  > label:not(.check-row)
  > span:first-child {
  font-size: 9.3px !important;
  line-height: 1.12 !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
}
#tab-appearance.tree-settings #treeMetadataHighlightingSettings > .metadata-color-compact > label select {
  width: 100% !important;
  min-width: 0 !important;
}
#tab-appearance.tree-settings #treeMetadataHighlightingSettings #metadataHighlightFields {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 7px !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 7px !important;
  border: 1px solid #d8e1ed !important;
  border-radius: 6px !important;
  background: #fff !important;
}
#tab-appearance.tree-settings #treeMetadataHighlightingSettings .metadata-highlight-values-block,
#tab-appearance.tree-settings #treeMetadataHighlightingSettings .metadata-highlight-palette-block {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 5px !important;
  min-width: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}
#tab-appearance.tree-settings #treeMetadataHighlightingSettings .metadata-highlight-palette-block {
  padding-top: 6px !important;
  border-top: 1px solid #e2e8f0 !important;
}
#tab-appearance.tree-settings #treeMetadataHighlightingSettings .highlight-palette-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  min-height: 24px !important;
}
#tab-appearance.tree-settings #treeMetadataHighlightingSettings .metadata-other-color-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 42px !important;
  align-items: center !important;
  gap: 8px !important;
  min-height: 26px !important;
  padding: 4px 0 0 !important;
  margin: 1px 0 0 !important;
  border-top: 1px solid #e5eaf2 !important;
  color: #53657c !important;
  font-size: 9.4px !important;
  font-weight: 600 !important;
}
#tab-appearance.tree-settings
  #treeMetadataHighlightingSettings
  .metadata-other-color-row
  input[type='color'] {
  width: 42px !important;
  height: 22px !important;
  justify-self: end !important;
}
#tab-appearance.tree-settings #treeMetadataHighlightingSettings .color-code-row {
  grid-template-columns: minmax(0, 1fr) 32px 78px !important;
  gap: 5px !important;
}

#tab-appearance.tree-settings #treeHighlightsSettings .tree-annotation-inline {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 4px !important;
}
#tab-appearance.tree-settings #treeHighlightsSettings .tree-annotation-inline > label:not(.check-row),
#tab-appearance.tree-settings
  #treeHighlightsSettings
  .tree-annotation-inline
  > .settings-inline-grid
  > label:not(.check-row),
#tab-appearance.tree-settings #treeHighlightsSettings #annotationRangeGeometry > label:not(.check-row),
#tab-appearance.tree-settings
  #treeHighlightsSettings
  #annotationRangeGeometry
  > .settings-inline-grid
  > label:not(.check-row),
#tab-appearance.tree-settings #treeHighlightsSettings #annotationBracketGeometry > label:not(.check-row),
#tab-appearance.tree-settings #treeHighlightsSettings #annotationCustomPosition > label:not(.check-row) {
  grid-column: 1/-1 !important;
  display: grid !important;
  grid-template-columns: 128px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 7px !important;
  min-height: 28px !important;
  padding: 2px 3px !important;
  margin: 0 !important;
}
#tab-appearance.tree-settings #treeHighlightsSettings .tree-annotation-inline > .settings-inline-grid,
#tab-appearance.tree-settings #treeHighlightsSettings #annotationRangeGeometry > .settings-inline-grid,
#tab-appearance.tree-settings #treeHighlightsSettings #annotationCustomPosition {
  grid-column: 1/-1 !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 4px !important;
}
#tab-appearance.tree-settings #treeHighlightsSettings #annotationRangeGeometry,
#tab-appearance.tree-settings #treeHighlightsSettings #annotationBracketGeometry {
  grid-column: 1/-1 !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 4px !important;
  min-width: 0 !important;
}
#tab-appearance.tree-settings #treeHighlightsSettings #annotationRangeGeometry .settings-subsection-label {
  grid-column: 1/-1 !important;
  margin-top: 4px !important;
}
#tab-appearance.tree-settings #treeHighlightsSettings .tree-annotation-inline > .check-row,
#tab-appearance.tree-settings #treeHighlightsSettings #annotationRangeGeometry > .check-row {
  grid-column: 1/-1 !important;
  min-height: 24px !important;
  padding: 2px 3px !important;
}

/* ========================================================================== */

/* ========================================================================== */
/*
 * Source section 48/53: tab appearance tree settings settings compact section.
 * Assembles into styles/base.css.
 * Rules remain in their original cascade order; later sections may intentionally override these
 * declarations.
 */
#tab-appearance.tree-settings .settings-compact-section,
#tab-appearance.tree-settings .settings-subsection,
#tab-appearance.tree-settings .settings-module,
#tab-appearance.tree-settings .nested-setting {
  margin-top: 3px !important;
  border-radius: 6px !important;
}
#tab-appearance.tree-settings .settings-compact-section > summary,
#tab-appearance.tree-settings .settings-subsection > summary {
  min-height: 24px !important;
  padding: 4px 7px !important;
  font-size: 10px !important;
  line-height: 1.08 !important;
}
#tab-appearance.tree-settings .settings-compact-body,
#tab-appearance.tree-settings .settings-subsection > div,
#tab-appearance.tree-settings .settings-module-body {
  gap: 3px !important;
  padding: 5px 7px 6px !important;
}
#tab-appearance.tree-settings .settings-subsection-label {
  margin: 2px 0 0 !important;
  padding-top: 4px !important;
  font-size: 9px !important;
  line-height: 1.05 !important;
}
#tab-appearance.tree-settings label,
#tab-appearance.tree-settings .check-row {
  line-height: 1.08 !important;
}
#tab-appearance.tree-settings input[type='text'],
#tab-appearance.tree-settings input[type='number'],
#tab-appearance.tree-settings select,
#tab-appearance.tree-settings button:not(.pane-size-btn) {
  min-height: 23px !important;
  height: 23px !important;
  padding-top: 2px !important;
  padding-bottom: 2px !important;
}
#tab-appearance.tree-settings textarea {
  line-height: 1.2 !important;
}
#tab-appearance.tree-settings .setting-note,
#tab-appearance.tree-settings .selection-card,
#tab-appearance.tree-settings .concise-note,
#tab-appearance.tree-settings .empty-mini {
  padding: 4px 6px !important;
  line-height: 1.18 !important;
}
#tab-appearance.tree-settings .tree-annotation-inline,
#tab-appearance.tree-settings #annotationRangeGeometry,
#tab-appearance.tree-settings #annotationBracketGeometry {
  gap: 2px !important;
}
#tab-appearance.tree-settings #treeHighlightsSettings .tree-annotation-inline > label:not(.check-row),
#tab-appearance.tree-settings
  #treeHighlightsSettings
  .tree-annotation-inline
  > .settings-inline-grid
  > label:not(.check-row),
#tab-appearance.tree-settings #treeHighlightsSettings #annotationRangeGeometry > label:not(.check-row),
#tab-appearance.tree-settings
  #treeHighlightsSettings
  #annotationRangeGeometry
  > .settings-inline-grid
  > label:not(.check-row),
#tab-appearance.tree-settings #treeHighlightsSettings #annotationBracketGeometry > label:not(.check-row) {
  min-height: 24px !important;
  padding: 1px 2px !important;
  grid-template-columns: 118px minmax(0, 1fr) !important;
  gap: 6px !important;
}
#tab-appearance.tree-settings #annotationRangeGeometry.hidden,
#tab-appearance.tree-settings #annotationBracketGeometry.hidden {
  display: none !important;
}
#tab-appearance.tree-settings .annotation-range-appearance {
  margin: 0 !important;
}
#tab-appearance.tree-settings .position-controls > div {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 4px !important;
}
#tab-appearance.tree-settings .position-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 4px 6px !important;
}
#tab-appearance.tree-settings .position-grid > label {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 2px !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 2px 3px !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 5px !important;
  background: #fbfcfe !important;
}
#tab-appearance.tree-settings .position-grid > label > span {
  font-size: 9.2px !important;
  line-height: 1.05 !important;
  white-space: normal !important;
}
#tab-appearance.tree-settings .position-grid input {
  width: 100% !important;
  min-width: 0 !important;
}
#tab-appearance.tree-settings .position-controls #resetFigureTextPositionsBtn {
  width: 100% !important;
  margin-top: 1px !important;
}
@media (max-width: 330px) {
  #tab-appearance.tree-settings .position-grid {
    grid-template-columns: 1fr !important;
  }
}

#annotationRangeGeometry.hidden,
#annotationBracketGeometry.hidden,
#annotationRangeCustom.hidden,
#annotationCustomPosition.hidden {
  display: none !important;
}
#tab-appearance.tree-settings #treeHighlightsSettings #annotationRangeGeometry.hidden,
#tab-appearance.tree-settings #treeHighlightsSettings #annotationBracketGeometry.hidden,
#tab-appearance.tree-settings #treeEditingSettings #annotationRangeCustom.hidden,
#tab-appearance.tree-settings #treeHighlightsSettings #annotationCustomPosition.hidden {
  display: none !important;
}
#tab-appearance.tree-settings #treeHighlightsSettings .tree-annotation-inline > .check-row,
#tab-appearance.tree-settings #treeHighlightsSettings #annotationRangeGeometry > .check-row {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 5px !important;
  min-height: 22px !important;
  padding: 1px 2px !important;
}
#tab-appearance.tree-settings #treeHighlightsSettings .tree-annotation-inline > .check-row > span,
#tab-appearance.tree-settings #treeHighlightsSettings #annotationRangeGeometry > .check-row > span {
  min-width: 0 !important;
  line-height: 1.08 !important;
}

/* ========================================================================== */

/* ========================================================================== */
:root {
  --pw-settings-panel-width: 380px;
}

/* Closing a pane never promotes/reopens the other pane. The surviving pane,
   when any, simply occupies the document area. */
.workspace-document-area.split-mode.pane-closed-left:not(.workspace-empty),
.workspace-document-area.split-mode.pane-closed-right:not(.workspace-empty) {
  display: block !important;
  background: #fff !important;
}
.workspace-document-area.split-mode.pane-closed-left:not(.workspace-empty) > .plot-view,
.workspace-document-area.split-mode.pane-closed-right:not(.workspace-empty) > .plot-view {
  display: none !important;
}
.workspace-document-area.split-mode.pane-closed-left:not(.workspace-empty) > .plot-view.split-secondary,
.workspace-document-area.split-mode.pane-closed-right:not(.workspace-empty) > .plot-view.split-primary {
  display: flex !important;
  width: 100% !important;
  height: 100% !important;
  border-left: 0 !important;
}
.workspace-document-area.split-mode.pane-closed-left > .split-divider,
.workspace-document-area.split-mode.pane-closed-right > .split-divider {
  display: none !important;
}

.workspace-document-area.workspace-empty {
  display: grid !important;
  place-items: center !important;
  min-height: 0 !important;
  background: #fff !important;
  overflow: hidden !important;
}
.workspace-document-area.workspace-empty > .plot-view,
.workspace-document-area.workspace-empty > .split-divider {
  display: none !important;
}
.workspace-empty-state {
  grid-area: 1/1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 260px;
  pointer-events: none;
  user-select: none;
  background: #fff;
}
.workspace-empty-state.hidden {
  display: none !important;
}
.workspace-empty-state img {
  width: clamp(150px, 18vw, 260px);
  max-width: 48%;
  height: auto;
  filter: grayscale(1) saturate(0) contrast(0.72);
  opacity: 0.17;
}

/* Closed pane headers stay available as the discoverable reopen surface. */
.workspace-tab-group.pane-is-closed {
  background: #fafbfc !important;
}
.workspace-tab-group.pane-is-closed .workspace-group-label,
.workspace-tab-group.pane-is-closed .view-tab {
  opacity: 0.54;
}
.workspace-tab-group.pane-is-closed .view-tab:hover,
.workspace-tab-group.pane-is-closed .view-tab:focus-visible {
  opacity: 1;
  background: #f0f3f7 !important;
}
.workspace-tab-group.pane-is-closed .pane-size-btn:disabled {
  opacity: 0.3 !important;
  cursor: default !important;
  background: transparent !important;
}
.view-tab.pane-closed-tab.active {
  box-shadow: none !important;
}

/* Matching resize grips stay inside both panel borders so neither is clipped. */
.projects-resize-gutter {
  right: 0 !important;
}
.settings-resize-gutter {
  left: 0 !important;
}
.side-panel-resize-gutter {
  width: 8px !important;
  top: 36px !important;
  bottom: 0 !important;
  z-index: 220 !important;
  cursor: ew-resize !important;
  background: transparent !important;
}
.side-panel-resize-gutter span {
  width: 5px !important;
  height: 58px !important;
  min-height: 58px !important;
  border-radius: 999px !important;
  background: #c3cedb !important;
  border: 1px solid #aebbc9 !important;
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.82),
    0 1px 3px rgba(45, 62, 82, 0.16) !important;
  transition:
    background 0.12s ease,
    width 0.12s ease,
    box-shadow 0.12s ease !important;
}
.side-panel-resize-gutter:hover span,
.side-panel-resize-gutter:focus-visible span,
body.resizing-side-panel .side-panel-resize-gutter span {
  width: 6px !important;
  background: #758aa3 !important;
  border-color: #667b94 !important;
  box-shadow:
    0 0 0 2px rgba(229, 236, 244, 0.96),
    0 1px 4px rgba(30, 48, 70, 0.24) !important;
}
.side-panel-resize-gutter:focus-visible {
  outline: none !important;
}

/* ========================================================================== */

/* ========================================================================== */

/* A closed pane is genuinely absent from the tab strip. It remains reopenable
   from View/menu/project navigation, which activates its retained hidden tab. */
.workspace-tab-group.pane-is-closed {
  display: none !important;
}

/* When exactly one workspace pane is closed, let the surviving tab group use
   the complete strip instead of leaving a blank half-bar. */
body.pane-closed-left:not(.pane-closed-right) .dual-workspace-tabs,
body.pane-closed-right:not(.pane-closed-left) .dual-workspace-tabs {
  grid-template-columns: minmax(0, 1fr) !important;
}
body.pane-closed-left:not(.pane-closed-right) .workspace-tab-group-right,
body.pane-closed-right:not(.pane-closed-left) .workspace-tab-group-left {
  display: flex !important;
  grid-column: 1 !important;
  border-left: 0 !important;
}

/* With Data and Analysis both closed there is no navigation strip to show. */
body.pane-closed-left.pane-closed-right .dual-workspace-tabs,
body.workspace-all-closed .dual-workspace-tabs {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

.workspace-document-area.workspace-empty {
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: minmax(0, 1fr) !important;
}
.workspace-document-area.workspace-empty > .workspace-empty-state {
  grid-column: 1 / -1 !important;
  grid-row: 1 / -1 !important;
  min-height: 0 !important;
}
.workspace-empty-state img {
  width: clamp(300px, 34vw, 560px) !important;
  max-width: 68% !important;
  max-height: 52% !important;
  object-fit: contain;
  filter: grayscale(1) saturate(0) contrast(0.72);
  opacity: 0.18;
}

/* When the tab strip is absent, explicitly assign the empty document to the
   flexible plot-shell row. Without this, CSS Grid auto-placement moves it into
   the old tab row and leaves the large flexible row empty below it. */
body.workspace-all-closed .plot-shell {
  grid-template-rows: auto minmax(0, 1fr) !important;
}
body.workspace-all-closed .workspace-document-area {
  grid-row: 2 !important;
  min-height: 0 !important;
}

.example-data-groups {
  display: grid;
  gap: 2px;
  padding: 1px 0 2px 7px;
}
.example-data-group {
  border-left: 1px solid #e0e5ec;
  margin-left: 2px;
  padding-left: 3px;
}
.example-data-group > summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: 13px minmax(0, 1fr) auto;
  gap: 4px;
  align-items: center;
  min-height: 20px;
  padding: 2px 3px;
  border-radius: 4px;
  color: #536178;
  font-size: 9px;
  font-weight: 800;
}
.example-data-group > summary::-webkit-details-marker {
  display: none;
}
.example-data-group > summary:hover {
  background: #f3f6f9;
}
.example-data-group > summary .ui-icon {
  width: 11px;
  height: 11px;
  color: #6b7ea0;
}
.example-data-group > summary small {
  font-size: 7.8px;
  color: #8994a4;
}
.example-data-group > .example-project {
  padding-left: 2px;
}
.example-data-group .example-project-open small {
  max-width: 66px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.example-data-phylogeny > summary .ui-icon {
  color: #5b75b8;
}
.example-data-profiles > summary .ui-icon {
  color: #6f62a8;
}
.example-data-metadata > summary .ui-icon {
  color: #4e8d70;
}
html:not(.clademap-metadata-plots-plugin-loaded) .workspace-tab-group-left .view-tab[data-view='figures'],
html:not(.clademap-metadata-plots-plugin-loaded) .control-tab[data-tab='figures'],
html:not(.clademap-metadata-plots-plugin-loaded) #tab-figures,
html:not(.clademap-metadata-plots-plugin-loaded) #pluginPlotsDockBtn,
html:not(.clademap-metadata-plots-plugin-loaded) [data-plugin-entry='metadata-plots'],
html:not(.clademap-metadata-plots-plugin-loaded) [data-command='view-figures'],
html:not(.clademap-metadata-plots-plugin-loaded) #splitPrimarySelect option[value='figures'] {
  display: none !important;
}

/* ========================================================================== */

/* ========================================================================== */
.diagnostic-source-view {
  display: none !important;
}
body.workspace-all-closed .workspace-empty-state img {
  width: clamp(340px, 38vw, 620px) !important;
  max-width: 72% !important;
  max-height: 56% !important;
  opacity: 0.18 !important;
}
.plugins-menu.global-floating-menu {
  overflow: hidden !important;
}

.tab-window-controls {
  display: inline-flex;
  align-items: stretch;
  gap: 0;
  flex: 0 0 auto;
  height: 27px;
  margin-left: 4px;
  border-left: 1px solid #d5dde7;
}
.tab-window-btn {
  width: 30px !important;
  min-width: 30px !important;
  height: 27px !important;
  margin: 0 !important;
  padding: 0 !important;
  display: grid !important;
  place-items: center !important;
  border: 0 !important;
  border-radius: 2px !important;
  background: transparent !important;
  color: #516071 !important;
  box-shadow: none !important;
  line-height: 1 !important;
}
.tab-window-btn .ui-icon {
  width: 12px !important;
  height: 12px !important;
  stroke-width: 1.8 !important;
}
.tab-window-btn:hover,
.tab-window-btn:focus-visible {
  background: #dfe5ec !important;
  color: #26384d !important;
  outline: none !important;
}
.tab-window-btn.active,
.tab-window-btn[aria-pressed='true'] {
  background: #d8e2ee !important;
  color: #1f4f7d !important;
}
.tab-window-new-window .ui-icon {
  width: 13px !important;
  height: 13px !important;
}
#workspaceDocumentArea .tab-window-controls .tab-window-btn.tab-window-link {
  width: auto !important;
  min-width: 44px !important;
  padding: 0 7px !important;
  font-size: 11px !important;
}
.tab-window-link:disabled {
  opacity: 0.5;
  cursor: default;
}
.tab-window-controls-floating {
  position: absolute;
  z-index: 12;
  right: 6px;
  top: 5px;
  background: #f8fafc;
  border: 1px solid #d5dde7;
  border-radius: 3px;
  overflow: hidden;
}
.shared-analysis-actionbar-right > .tab-window-controls,
.outbreak-actionbar-right > .tab-window-controls {
  margin-left: auto;
}
.canvas-action-strip > .tab-window-controls,
.data-action-strip > .tab-window-controls {
  margin-left: auto;
}
.tab-window-controls + .analysis-save-wrap {
  margin-left: 4px;
}
.plugin-owned-view .tab-window-controls {
  border-left-color: #d4dde7;
}
/*
 * Source section 49/53: map modebar tab window controls.
 * Assembles into styles/base.css.
 * Rules remain in their original cascade order; later sections may intentionally override these
 * declarations.
 */
.map-modebar > .tab-window-controls {
  margin-left: auto;
}
.clademap-mst-toolbar > .tab-window-controls {
  margin-left: auto;
}
@media (max-width: 920px) {
  .tab-window-btn {
    width: 27px !important;
    min-width: 27px !important;
  }
  .tab-window-controls {
    margin-left: 2px;
  }
}

#workspaceDocumentArea > .plot-view:not(.active):not(.split-primary):not(.split-secondary) {
  display: none !important;
}
#workspaceDocumentArea.split-mode {
  display: grid !important;
  grid-template-columns: minmax(0, var(--split-ratio, 50%)) 5px minmax(
      0,
      calc(100% - var(--split-ratio, 50%) - 5px)
    ) !important;
  grid-template-rows: minmax(0, 1fr) !important;
  align-items: stretch !important;
}
#workspaceDocumentArea.split-mode > .plot-view.split-primary {
  grid-column: 1 !important;
  grid-row: 1 !important;
  width: auto !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
}
#workspaceDocumentArea.split-mode > .plot-view.split-secondary {
  grid-column: 3 !important;
  grid-row: 1 !important;
  width: auto !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
}
.analysis-workspace-workspace-tab {
  max-width: min(380px, 42vw);
}
.analysis-workspace-workspace-tab span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.analysis-workspace-subtabs {
  display: flex;
  align-items: center;
  gap: 3px;
  flex: 0 0 auto;
  min-height: 34px;
  padding: 4px 8px;
  border-bottom: 1px solid #ccd5e1;
  background: #f4f7fb;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}
.analysis-workspace-subtabs button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  height: 25px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: #52627a;
  font: inherit;
  font-size: 10.5px;
  cursor: pointer;
  white-space: nowrap;
}
.analysis-workspace-subtabs button:hover {
  background: #e9eff8;
  border-color: #d3dce8;
  color: #263d5c;
}
.analysis-workspace-subtabs button.active {
  background: #fff;
  border-color: #aebed3;
  color: #173a5e;
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(36, 55, 80, 0.08);
}
.analysis-workspace-subtabs .ui-icon {
  width: 13px;
  height: 13px;
}
.workspace-document-area.split-mode .analysis-workspace-subtabs {
  padding: 3px 6px;
  gap: 2px;
}
.workspace-document-area.split-mode .analysis-workspace-subtabs button {
  padding: 0 6px;
  font-size: 10px;
}

.analysis-plugin-view {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  background: var(--panel-bg, #fff);
}
.analysis-plugin-view .analysis-subtabs {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 6px 8px;
  border-bottom: 1px solid var(--border, #d9e0e8);
  background: var(--panel-bg, #fff);
  white-space: nowrap;
  overflow-x: auto;
}
.analysis-plugin-view .analysis-subtabs button {
  border: 1px solid #cbd5e1;
  background: #fff;
  border-radius: 6px;
  padding: 5px 8px;
  font: inherit;
  cursor: pointer;
}
.analysis-plugin-view .analysis-subtabs button.active {
  background: #e8eef6;
  border-color: #9eb0c7;
  font-weight: 700;
}
.analysis-plugin-view .analysis-panel {
  display: none !important;
  min-width: 0;
}
.analysis-plugin-view .analysis-panel.analysis-panel-active {
  display: block !important;
}
.analysis-plugin-view .analysis-workspace-subtabs {
  display: none !important;
}
.analysis-settings-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid #d9e0e8;
}
.analysis-settings-header .analysis-settings-copy {
  min-width: 0;
}
.analysis-settings-header strong {
  display: block;
  font-size: 12px;
}
.analysis-settings-header small {
  display: block;
  color: #6b7788;
  font-size: 10px;
}
.analysis-settings-nav {
  display: flex;
  gap: 4px;
  padding: 6px 8px;
  border-bottom: 1px solid #e2e8f0;
  overflow-x: auto;
  white-space: nowrap;
}
.analysis-settings-nav button {
  border: 1px solid #cbd5e1;
  background: #fff;
  border-radius: 6px;
  padding: 4px 7px;
  font-size: 10.5px;
  cursor: pointer;
}
.analysis-settings-nav button.active {
  background: #e8eef6;
  border-color: #9eb0c7;
  font-weight: 700;
}
.analysis-settings-group {
  padding: 4px 0;
}
.analysis-settings-group[hidden] {
  display: none !important;
}
.analysis-settings-group-title {
  padding: 7px 10px 3px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #536174;
}
.tree-profile-startup-toggle {
  margin-top: 5px;
}

.project-database-bar {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 3px 6px;
  border-bottom: 1px solid var(--border);
  background: #fafbfd;
  color: #536177;
  font-size: 9.5px;
}
.project-db-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #9aa6b5;
}
.project-database-bar.is-connected .project-db-dot {
  background: #3f9b67;
}
.project-database-bar.is-readonly .project-db-dot {
  background: #d39a36;
}
.project-database-bar.is-error .project-db-dot {
  background: #c65b5b;
}
.project-database-bar small {
  font-size: 8.5px;
  color: #7b8796;
  white-space: nowrap;
}
.project-explorer-layout.import-sidebar-closed {
  grid-template-rows: minmax(0, 1fr) !important;
}
.project-explorer-layout.import-sidebar-closed .project-explorer-divider,
.project-explorer-layout.import-sidebar-closed .project-import-sidebar {
  display: none !important;
}
.project-explorer-layout.import-sidebar-compact {
  --project-explorer-top: calc(100% - 118px);
}
.project-import-sidebar {
  position: relative;
}
.project-import-sidebar-head {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 24px;
  margin: -2px -2px 5px;
  padding: 2px 3px;
  border-bottom: 1px solid var(--border);
  font-size: 9.5px;
  color: #536177;
}
.project-import-sidebar-head strong {
  font-weight: 650 !important;
}
.project-import-sidebar-spacer {
  flex: 1;
}
.project-import-sidebar-head button {
  width: 23px;
  height: 21px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 4px;
  color: #657386;
  cursor: pointer;
}
.project-import-sidebar-head button:hover {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--border);
}
.project-explorer-layout.import-sidebar-compact .project-import-sidebar .project-drop-zone span,
.project-explorer-layout.import-sidebar-compact .project-import-sidebar .compact-actions {
  display: none !important;
}
.project-explorer-layout.import-sidebar-compact .project-import-sidebar .project-drop-zone {
  min-height: 36px !important;
  margin-bottom: 0 !important;
}
.project-manifest-modal {
  position: fixed;
  inset: 0;
  z-index: 12000;
  background: rgba(15, 23, 42, 0.34);
  display: grid;
  place-items: center;
  padding: 24px;
}
.project-manifest-modal.hidden {
  display: none;
}
.project-manifest-card {
  width: min(840px, 92vw);
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.28);
  overflow: hidden;
}
.project-manifest-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.project-manifest-head strong {
  flex: 1;
}
.project-manifest-head button {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 5px;
  padding: 4px 7px;
  cursor: pointer;
}
.project-manifest-card pre {
  margin: 0;
  padding: 10px;
  overflow: auto;
  font:
    10.5px/1.45 ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
  white-space: pre-wrap;
  background: #fbfcfe;
  color: #253247;
}
.project-library-root > summary {
  font-weight: 650 !important;
}
.project-tree-project > summary .active-project-badge {
  display: none !important;
}

.project-database-forget {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--muted, #6c7d8f);
  font: inherit;
  font-size: 9px;
  cursor: pointer;
  padding: 2px 5px;
  border-radius: 4px;
}
.project-database-forget:hover {
  background: rgba(80, 110, 145, 0.1);
  color: var(--text, #263f5c);
}

.topbar .ui-icon{
  width: 20px !important;
  height: 20px !important;
}
.workspace-tab .ui-icon,
.view-tab .ui-icon {
  width: 18px !important;
  height: 18px !important;
}
.project-explorer-tool .ui-icon,
.project-tree-project .ui-icon,
.data-toolbar .ui-icon {
  width: 17px !important;
  height: 17px !important;
}
.pane-window-controls .ui-icon,
.pane-window-btn .ui-icon,
.pane-size-controls .ui-icon,
.tab-window-btn .ui-icon {
  width: 15px !important;
  height: 15px !important;
}
.icon-btn .ui-icon,
.metadata-sort-btn .ui-icon,
.column-order-buttons .ui-icon {
  width: 16px;
  height: 16px;
}
.menu-arrow-icon {
  width: 14px;
  height: 14px;
  margin-left: auto;
}
.menu-choice-mark .ui-icon {
  width: 15px;
  height: 15px;
}
.metadata-sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.metadata-schema-actions button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.analysis-methods-arrow.ui-icon,
.outbreak-methods-arrow.ui-icon {
  width: 15px !important;
  height: 15px !important;
  flex: 0 0 auto;
}
.multi-select-dropdown > summary > .ui-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.column-dialog {
  border: 1px solid #b6c3d4;
  border-radius: 10px;
  padding: 24px;
  color: #263548;
  background: #fff;
  min-width: 320px;
}
.column-dialog::backdrop {
  background: #172b4655;
}
.column-dialog input {
  display: block;
  width: 100%;
  margin: 10px 0 20px;
  padding: 8px;
}
.column-dialog form > div {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* One tab group by default; pane labels belong only to explicit Split view. */
body:not(.workspace-split-enabled) .dual-workspace-tabs {
  grid-template-columns: minmax(0, 1fr) !important;
}
body:not(.workspace-split-enabled) .dual-workspace-tabs .workspace-tab-group-right {
  display: none !important;
}
body:not(.workspace-split-enabled) .dual-workspace-tabs .workspace-tab-group-left {
  display: flex !important;
  grid-column: 1 !important;
  border-left: 0 !important;
}
body:not(.workspace-split-enabled) .workspace-group-label {
  display: none !important;
}
.dual-workspace-tabs .pane-size-controls {
  display: none !important;
}
.dual-workspace-tabs .view-tab.workspace-tab-closed {
  display: none !important;
}
.dual-workspace-tabs .view-tab.workspace-tab-minimized {
  opacity: 0.6;
  font-style: italic;
}
.dual-workspace-tabs .workspace-tab-group {
  overflow-x: auto;
  scrollbar-width: thin;
}
.dual-workspace-tabs .workspace-tab-group .view-tab {
  flex-shrink: 0;
}
.tab-action-cluster {
  display: flex !important;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  margin-left: auto !important;
  white-space: nowrap;
}
.tab-action-cluster > .tab-window-controls {
  margin: 0 !important;
  border: 0;
}
.tab-action-cluster > .tab-window-save {
  border: 1px solid #cbd5e1 !important;
}
.tab-window-close:hover,
.tab-window-close:focus-visible {
  background: #c42b1c !important;
  color: #fff !important;
}
/*
 * Source section 50/53: tab window btn focus visible.
 * Assembles into styles/base.css.
 * Rules remain in their original cascade order; later sections may intentionally override these
 * declarations.
 */
.tab-window-btn:focus-visible {
  outline: 2px solid #4c80b8 !important;
  outline-offset: -2px;
}
/* A minimized tab remains available to restore from the strip. */
body.workspace-has-minimized-tabs.workspace-all-closed .dual-workspace-tabs {
  display: grid !important;
  height: 32px !important;
  min-height: 32px !important;
}
body.workspace-has-minimized-tabs.workspace-all-closed .plot-shell {
  grid-template-rows: auto 32px minmax(0, 1fr) !important;
}
body.workspace-has-minimized-tabs.workspace-all-closed .workspace-document-area {
  grid-row: 3 !important;
}
/* A single surviving or maximized split view spans the document area. */
#workspaceDocumentArea.split-mode:is(
    .pane-max-left,
    .pane-max-right,
    .pane-min-left,
    .pane-min-right,
    .pane-closed-left,
    .pane-closed-right
  ):not(.workspace-empty) {
  grid-template-columns: minmax(0, 1fr) !important;
}
#workspaceDocumentArea.split-mode:is(
    .pane-max-left,
    .pane-max-right,
    .pane-min-left,
    .pane-min-right,
    .pane-closed-left,
    .pane-closed-right
  )
  > .plot-view:is(.split-primary, .split-secondary) {
  grid-column: 1 !important;
}
body.workspace-split-enabled:not(.pane-maximized) .workspace-tab-group.workspace-group-has-tabs {
  display: flex !important;
}
body.workspace-split-enabled.workspace-two-tab-groups:not(.pane-maximized) .dual-workspace-tabs {
  display: grid !important;
  grid-template-columns: minmax(0, var(--split-ratio, 50%)) 5px minmax(
      0,
      calc(100% - var(--split-ratio, 50%) - 5px)
    ) !important;
}
body.workspace-split-enabled.workspace-two-tab-groups:not(.pane-maximized) .workspace-tab-group-left {
  grid-column: 1 !important;
}
body.workspace-split-enabled.workspace-two-tab-groups:not(.pane-maximized) .workspace-tab-group-right {
  grid-column: 3 !important;
}

/* Icon audit: one 24px SVG grid, consistent strokes and comfortable controls. */
.ui-icon,
.clademap-plugin-inline-icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.topbar .toolbar-btn .ui-icon {
  width: 20px !important;
  height: 20px !important;
}
.topbar .toolbar-btn.icon-label {
  height: 46px !important;
  min-height: 46px !important;
}
body:not(.workspace-all-closed) .dual-workspace-tabs {
  height: 36px !important;
  min-height: 36px !important;
}
.dual-workspace-tabs .view-tab {
  height: 34px !important;
  min-height: 34px !important;
}
.dual-workspace-tabs .view-tab .ui-icon,
.dual-workspace-tabs .view-tab .clademap-plugin-inline-icon {
  width: 18px !important;
  height: 18px !important;
}
.project-tab-rail .rail-action-tab,
.settings-tab-rail .control-tab {
  width: 36px !important;
  min-width: 36px !important;
  height: 36px !important;
  min-height: 36px !important;
}
.project-tab-rail svg,
.settings-tab-rail svg {
  width: 18px !important;
  height: 18px !important;
}
.data-grid-toolbar button,
.data-action-strip button,
.analysis-view-actionbar button,
.shared-analysis-actionbar button,
.outbreak-actionbar button {
  min-height: 30px !important;
}
.data-grid-toolbar .ui-icon,
.data-action-strip .ui-icon,
.analysis-view-actionbar .ui-icon,
.shared-analysis-actionbar .ui-icon,
.outbreak-actionbar .ui-icon {
  width: 17px !important;
  height: 17px !important;
}
.project-explorer-tool,
.figure-card-actions button,
.cluster-card-actions button,
.outbreak-card-actions button,
.analysis-section-popout-btn {
  min-width: 30px !important;
  min-height: 30px !important;
}
.project-explorer-tool .ui-icon,
.figure-card-actions .ui-icon,
.cluster-card-actions .ui-icon,
.outbreak-card-actions .ui-icon,
.analysis-section-popout-btn .ui-icon {
  width: 18px !important;
  height: 18px !important;
}
.tab-window-controls {
  height: 30px !important;
}
.tab-action-cluster.analysis-save-wrap {
  height: 30px !important;
  min-height: 30px !important;
}
.tab-window-btn {
  width: 30px !important;
  min-width: 30px !important;
  height: 30px !important;
}
.tab-window-btn .ui-icon {
  width: 15px !important;
  height: 15px !important;
}
.workspace-save-btn {
  width: 30px !important;
  min-width: 30px !important;
  height: 30px !important;
}
.save-chevron,
.data-action-save-wrap .analysis-save-menu-btn .save-chevron {
  width: 12px !important;
  height: 12px !important;
}
.menu-arrow-icon {
  width: 14px !important;
  height: 14px !important;
}
.project-actions-btn,
.icon-btn[data-close],
.sm-direct-editor-head > button {
  min-width: 28px;
  min-height: 28px;
}
body.workspace-all-closed .workspace-empty-state img {
  width: clamp(240px, 34vw, 560px) !important;
  max-width: 72% !important;
  max-height: 56% !important;
  filter: none !important;
  opacity: 1 !important;
}

.metadata-sync-toolbar-btn {
  position: relative !important;
  overflow: visible !important;
  width: auto !important;
  min-width: max-content !important;
  padding: 4px 15px 4px 8px !important;
  display: inline-flex !important;
  gap: 6px;
  align-items: center;
}
.metadata-sync-toolbar-btn > span:not(.metadata-sync-state-dot) {
  display: inline !important;
  font-size: 12px !important;
}
.metadata-sync-toolbar-btn .metadata-sync-state-dot {
  position: absolute;
  right: 3px;
  top: 3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #97a3b3;
  box-shadow: 0 0 0 1px #fff;
}
.metadata-sync-toolbar-btn.is-current .metadata-sync-state-dot {
  background: #3f9b67;
}
.metadata-sync-toolbar-btn.is-pending .metadata-sync-state-dot {
  background: #cf3f34;
}
.metadata-sync-toolbar-btn.is-warning .metadata-sync-state-dot {
  background: #cf3f34;
}
.metadata-sync-toolbar-btn.is-pending .ui-icon,
.metadata-sync-toolbar-btn.is-warning .ui-icon {
  stroke-width: 2.2;
}

.metadata-link-popover {
  width: min(760px, calc(100% - 20px));
  padding: 7px 8px !important;
  border-radius: 7px !important;
}
.metadata-link-popover .metadata-link-popover-head {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  min-height: 26px !important;
  margin: 0 0 5px !important;
  padding: 0 0 5px !important;
  border-bottom: 1px solid #e1e6ed !important;
}
.metadata-link-popover .metadata-link-headline {
  display: flex !important;
  align-items: baseline !important;
  gap: 7px !important;
  min-width: 0 !important;
  flex: 1 1 auto !important;
}
.metadata-link-popover .metadata-link-headline strong {
  flex: 0 0 auto;
  font-size: 10.5px !important;
  color: #27364d !important;
}
.metadata-link-popover .metadata-link-headline span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 9px !important;
  color: #667489 !important;
}
.metadata-link-popover .metadata-link-close {
  display: grid !important;
  place-items: center !important;
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 4px !important;
  background: transparent !important;
  color: #67758a !important;
}
.metadata-link-popover .metadata-link-close:hover {
  background: #eef2f7 !important;
  color: #26364c !important;
}
.metadata-link-popover .metadata-link-close .ui-icon {
  width: 14px !important;
  height: 14px !important;
}
.metadata-link-sourcebar {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) minmax(110px, 1fr) minmax(105px, 0.8fr) auto;
  gap: 5px;
  align-items: end;
}
.metadata-link-sourcebar > label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  min-width: 0;
  font-size: 8.5px;
  color: #68768a;
  white-space: nowrap;
}
.metadata-link-sourcebar > label > span {
  font-weight: 650;
}
.metadata-link-sourcebar select {
  min-width: 0 !important;
  min-height: 26px !important;
  height: 26px !important;
  padding: 2px 20px 2px 5px !important;
  border-radius: 5px !important;
  font-size: 9px !important;
}
.metadata-link-source-actions {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 26px;
}
.metadata-link-source-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 26px;
  min-height: 26px;
  padding: 2px 6px;
  border: 1px solid #ccd5e0;
  border-radius: 5px;
  background: #fff;
  color: #46556c;
  font-size: 8.5px;
  white-space: nowrap;
}
.metadata-link-source-actions button:last-child {
  width: 26px;
  padding: 0;
}
.metadata-link-source-actions button:hover:not(:disabled) {
  background: #f3f6fa;
  border-color: #b7c3d2;
}
.metadata-link-source-actions button.active {
  background: #f2f5f8;
  border-color: #aebac9;
  color: #344357;
}
.metadata-link-source-actions .ui-icon {
  width: 13px;
  height: 13px;
}
.metadata-link-summaryline {
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: 6px;
  padding: 4px 0;
  border-top: 1px solid #e6eaf0;
  border-bottom: 1px solid #e6eaf0;
  font-size: 8.5px;
  color: #657287;
  white-space: nowrap;
  overflow: hidden;
}
.metadata-link-summaryline span {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  padding: 0 7px;
  border-right: 1px solid #e0e5eb;
}
.metadata-link-summaryline span:first-child {
  padding-left: 0;
}
.metadata-link-summaryline span:last-child {
  border-right: 0;
}
.metadata-link-summaryline b {
  font-size: 9.5px;
  color: #344257;
}
.metadata-link-summaryline .has-issues,
.metadata-link-summaryline .has-issues b {
  color: #a3473f;
}
.metadata-link-notice {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  padding: 5px 0 1px;
  color: #a03b33;
  font-size: 8.8px;
  line-height: 1.35;
}
.metadata-link-notice .ui-icon {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  margin-top: 0;
}
.metadata-link-popover .metadata-link-details {
  margin: 5px 0 0 !important;
  padding: 0 !important;
  border: 0 !important;
}
.metadata-link-popover .metadata-link-details > summary {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 25px;
  padding: 3px 1px;
  cursor: pointer;
  color: #3e4d62;
  font-size: 9.5px;
  font-weight: 700;
  list-style-position: inside;
  border-bottom: 1px solid #e7ebf0;
}
.metadata-link-popover .metadata-link-details > summary small {
  margin-left: auto;
  font-size: 8.5px;
  font-weight: 500;
  color: #7a8799;
}
.metadata-link-table-tools {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 0 4px;
}
.metadata-link-table-tools label {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1 1 auto;
  min-width: 0;
  height: 25px;
  padding: 0 5px;
  border: 1px solid #d1d9e3;
  border-radius: 5px;
  background: #fff;
}
.metadata-link-table-tools label:focus-within {
  border-color: #91a4bb;
  box-shadow: 0 0 0 2px rgba(71, 102, 137, 0.08);
}
.metadata-link-table-tools .ui-icon {
  width: 12px;
  height: 12px;
  color: #78869a;
}
.metadata-link-table-tools input {
  min-width: 0;
  width: 100%;
  height: 21px;
  min-height: 21px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  font-size: 8.8px !important;
}
.metadata-link-table-tools > span {
  flex: 0 0 auto;
  font-size: 8px;
  color: #7a8799;
}
.metadata-link-section-label {
  margin-top: 3px;
  padding: 3px 2px 2px;
  font-size: 8px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.045em;
  color: #728094;
}
.metadata-link-table-wrap {
  max-height: 170px;
  overflow: auto;
  border-top: 1px solid #dfe5ec;
  border-bottom: 1px solid #dfe5ec;
  background: #fff;
}
.metadata-link-issues-wrap {
  max-height: 125px;
}
.metadata-link-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 8.6px;
  color: #46556a;
}
.metadata-link-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  height: 22px;
  padding: 2px 5px;
  border-bottom: 1px solid #d8e0e8;
  background: #f5f7fa;
  text-align: left;
  font-size: 7.8px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.035em;
  color: #6b788b;
}
.metadata-link-table td {
  height: 22px;
  padding: 2px 5px;
  border-bottom: 1px solid #edf0f4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.metadata-link-table tbody tr:last-child td {
  border-bottom: 0;
}
/*
 * Source section 51/53: metadata link table tbody tr hover td.
 * Assembles into styles/base.css.
 * Rules remain in their original cascade order; later sections may intentionally override these
 * declarations.
 */
.metadata-link-table tbody tr:hover td {
  background: #f8fafc;
}
.metadata-link-table th:nth-child(1),
.metadata-link-table th:nth-child(2) {
  width: 35%;
}
.metadata-link-table th:nth-child(3) {
  width: 18%;
}
.metadata-link-table th:nth-child(4) {
  width: 30px;
}
.metadata-link-table code {
  font:
    8.5px/1.25 Consolas,
    Menlo,
    monospace;
  color: #3e4b60;
}
.metadata-link-issue-table th:nth-child(1) {
  width: 20%;
}
.metadata-link-issue-table th:nth-child(2) {
  width: 34%;
}
.metadata-link-issue-table th:nth-child(3) {
  width: auto;
}
.metadata-link-method,
.metadata-link-issue-kind {
  font-size: 7.6px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.035em;
  color: #617087;
}
.metadata-link-method.is-manual {
  color: #6b55a4;
}
.metadata-link-issue-kind {
  color: #a44a42;
}
.metadata-link-row-actions {
  text-align: right !important;
}
.metadata-link-row-action {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  min-width: 20px;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: #7b8798;
}
.metadata-link-row-action:hover {
  background: #edf1f5;
  color: #8f3c35;
}
.metadata-link-row-action .ui-icon {
  width: 12px;
  height: 12px;
}
.metadata-link-table-note {
  padding: 3px 5px;
  font-size: 7.8px;
  color: #788598;
  background: #f8fafc;
}
.metadata-link-empty {
  padding: 6px 3px;
  font-size: 8.6px;
  color: #758296;
}
.metadata-link-no-issues {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #4b7d5d;
}
.metadata-link-no-issues .ui-icon {
  width: 12px;
  height: 12px;
}
.metadata-manual-link-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 14px minmax(0, 1fr) auto;
  gap: 4px;
  align-items: center;
  margin-top: 5px;
  padding-top: 5px;
  border-top: 1px solid #e4e9ef;
}
.metadata-manual-link-label {
  font-size: 8.2px;
  font-weight: 700;
  color: #5c6a7e;
  white-space: nowrap;
}
.metadata-manual-link-row select {
  min-width: 0 !important;
  height: 25px !important;
  min-height: 25px !important;
  padding: 2px 20px 2px 5px !important;
  border-radius: 5px !important;
  font-size: 8.7px !important;
}
.metadata-manual-link-arrow {
  text-align: center;
  color: #8490a1;
}
.metadata-manual-link-row button {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 25px;
  min-height: 25px;
  padding: 2px 6px;
  border: 1px solid #c8d2de;
  border-radius: 5px;
  background: #fff;
  color: #46556b;
  font-size: 8.5px;
}
.metadata-manual-link-row button:hover:not(:disabled) {
  background: #f2f6fa;
}
.metadata-manual-link-row button .ui-icon {
  width: 12px;
  height: 12px;
}

@media (max-width: 720px) {
  .metadata-link-sourcebar {
    grid-template-columns: 1fr 1fr;
  }
  .metadata-link-source-actions {
    grid-column: 1/-1;
  }
  .metadata-manual-link-row {
    grid-template-columns: 1fr 14px 1fr auto;
  }
  .metadata-manual-link-label {
    grid-column: 1/-1;
  }
  .metadata-link-popover .metadata-link-headline span {
    display: none;
  }
}

.error-banner:not(.hidden) {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding-right: 8px;
}
.error-banner-message {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.error-banner-close {
  display: grid;
  place-items: center;
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  min-width: 26px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: currentColor;
  cursor: pointer;
}
.error-banner-close:hover {
  background: rgba(180, 35, 24, 0.08);
}
.error-banner-close:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 1px;
}
.error-banner-close .ui-icon {
  width: 15px;
  height: 15px;
}

/* R2026.10.04 — Settings section title typography alignment.
   Tree section names use the same calm hierarchy as Profile/MST and Plots. */
#tab-appearance.tree-settings .settings-compact-section > summary,
#tab-appearance.tree-settings .settings-subsection > summary,
#tab-appearance.tree-settings .settings-module-head label,
#tab-appearance.tree-settings .nested-setting-head label,
#tab-appearance.tree-settings .settings-module-head strong,
#tab-appearance.tree-settings .nested-setting-head strong {
  font-size: 10.5px !important;
  font-weight: 600 !important;
  line-height: 1.15 !important;
  color: #304158 !important;
}

/* Clear Projects / Settings collapse-expand affordance.
   Expanded panels use a tinted accent button; collapsed panels switch to a
   filled accent button with a white arrow so the restore action is obvious. */
.side-panel-topbar #projectsSlideHandle,
.side-panel-topbar #settingsSlideHandle {
  width: 28px !important;
  min-width: 28px !important;
  height: 28px !important;
  min-height: 28px !important;
  border-radius: 7px !important;
  border: 1px solid color-mix(in srgb, var(--panel-disclosure-accent, #237a76) 52%, #cbd5e1) !important;
  background: color-mix(in srgb, var(--panel-disclosure-accent, #237a76) 11%, #fff) !important;
  color: var(--panel-disclosure-accent, #237a76) !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08) !important;
}
.side-panel-topbar #projectsSlideHandle .ui-icon,
.side-panel-topbar #settingsSlideHandle .ui-icon {
  width: 15px !important;
  height: 15px !important;
  stroke-width: 2.35 !important;
}
.side-panel-topbar #projectsSlideHandle:hover,
.side-panel-topbar #settingsSlideHandle:hover {
  background: color-mix(in srgb, var(--panel-disclosure-accent, #237a76) 18%, #fff) !important;
  border-color: var(--panel-disclosure-accent, #237a76) !important;
  color: var(--panel-disclosure-accent, #237a76) !important;
}
body.inputs-collapsed .side-panel-topbar #projectsSlideHandle,
body.controls-collapsed .side-panel-topbar #settingsSlideHandle {
  background: var(--panel-disclosure-accent, #237a76) !important;
  border-color: var(--panel-disclosure-accent, #237a76) !important;
  color: #fff !important;
  box-shadow: 0 2px 6px color-mix(in srgb, var(--panel-disclosure-accent, #237a76) 28%, transparent) !important;
}
body.inputs-collapsed .side-panel-topbar #projectsSlideHandle:hover,
body.controls-collapsed .side-panel-topbar #settingsSlideHandle:hover {
  background: color-mix(in srgb, var(--panel-disclosure-accent, #237a76) 86%, #000) !important;
  color: #fff !important;
}

/* Metadata summary action — keep Plots discoverable from the metadata table.
   The action follows the selected interface accent and remains visible but
   clearly disabled when the Metadata Plots plugin is inactive. */
#metadataEditSummary {
  flex: 0 0 auto;
  min-height: 27px;
  flex-wrap: wrap;
  gap: 5px 12px;
  padding: 4px 9px;
}
.metadata-table-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 0;
}
.metadata-table-stats > span { white-space: nowrap; padding-right: 10px; margin-right: 10px; border-right: 1px solid #dde4ec; }
.metadata-table-stats > span:last-child { border: 0; padding-right: 0; margin-right: 0; }
.metadata-table-stats strong { font-weight: 500; }
#metadataTableViewSummary { white-space: nowrap; }
#metadataTableViewSummary:empty { display: none; }

/* Shared filled launch buttons in the pinned toolbar. */
#app #workspaceDocumentArea .figure-toolbar .figure-toolbar-pinned > .workspace-launch-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 0 !important;
  min-height: 25px !important;
  height: 25px !important;
  margin: 0 !important;
  padding: 0 9px !important;
  border: 1px solid var(--accent, #315fc4) !important;
  border-radius: 7px !important;
  background: var(--accent, #315fc4) !important;
  color: #fff !important;
  font: inherit !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  cursor: pointer !important;
  box-shadow: 0 1px 3px color-mix(in srgb, var(--accent, #315fc4) 24%, transparent) !important;
}
#app #workspaceDocumentArea .figure-toolbar .workspace-launch-btn .ui-icon {
  width: 14px !important;
  height: 14px !important;
  color: currentColor !important;
  stroke-width: 2 !important;
}
#app #workspaceDocumentArea .figure-toolbar .figure-toolbar-pinned > .workspace-launch-btn:is(.workspace-launch-icon-only,[data-fast-tree-label=icon]) { padding: 0 7px !important; }
.workspace-launch-icon-only > span { display: none !important; }
#app #workspaceDocumentArea .figure-toolbar .workspace-launch-btn:hover:not(:disabled),
#app #workspaceDocumentArea .figure-toolbar .workspace-launch-btn[aria-pressed=true] {
  background: color-mix(in srgb, var(--accent, #315fc4) 86%, #000) !important;
  border-color: color-mix(in srgb, var(--accent, #315fc4) 86%, #000) !important;
}
#app #workspaceDocumentArea .figure-toolbar .workspace-launch-btn:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent, #315fc4) 45%, #fff) !important;
  outline-offset: 2px !important;
}
#app #workspaceDocumentArea .figure-toolbar .workspace-launch-btn:disabled {
  background: #eef1f4 !important;
  border-color: #cfd6df !important;
  color: #8b97a7 !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
  opacity: 1 !important;
}

/* Final hardening for Cluster analysis workspace tabs. These rules live after
   the global tab styles so the selected analysis mode cannot be flattened by
   later workspace-tab overrides. */
.analysis-plugin-view .analysis-plugin-toolbar .analysis-subtabs {
  border-radius: 999px !important;
  padding: 3px !important;
  gap: 5px !important;
  background: #fff !important;
  border: 1px solid #d5deea !important;
}
.analysis-plugin-view .analysis-plugin-toolbar .analysis-subtabs > button[data-analysis-subtab] {
  border-radius: 999px !important;
  border: 1px solid #c9d4e1 !important;
  background: #f4f7fb !important;
  color: #3f5067 !important;
  min-height: 30px !important;
  height: 30px !important;
  padding: 0 12px !important;
  font-weight: 650 !important;
}
.analysis-plugin-view .analysis-plugin-toolbar .analysis-subtabs > button[data-analysis-subtab].active,
.analysis-plugin-view
  .analysis-plugin-toolbar
  .analysis-subtabs
  > button[data-analysis-subtab][aria-selected='true'] {
  background: linear-gradient(180deg, #3476e8 0%, #2459c8 100%) !important;
  border-color: #1f50b7 !important;
  color: #fff !important;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.17),
    0 2px 6px rgba(36, 89, 200, 0.3) !important;
  font-weight: 800 !important;
}
.analysis-plugin-view
  .analysis-plugin-toolbar
  .analysis-subtabs
  > button[data-analysis-subtab].active
  :is(.ui-icon, .clademap-plugin-inline-icon),
.analysis-plugin-view
  .analysis-plugin-toolbar
  .analysis-subtabs
  > button[data-analysis-subtab][aria-selected='true']
  :is(.ui-icon, .clademap-plugin-inline-icon) {
  color: #fff !important;
}

/* Panel toggles share one accent across interface themes. */
#projectsSlideHandle,
#toggleInputsPanelBtn,
#settingsSlideHandle,
#toggleControlsPanelBtn {
  --panel-disclosure-accent: #237a76;
}
#projectsSlideHandle .ui-icon,
#settingsSlideHandle .ui-icon {
  color: inherit !important;
  stroke: currentColor !important;
}
#app :is(#toggleInputsPanelBtn, #toggleControlsPanelBtn) {
  color: var(--panel-disclosure-accent) !important;
  border-color: color-mix(in srgb, var(--panel-disclosure-accent) 50%, #cbd5e1) !important;
  background: color-mix(in srgb, var(--panel-disclosure-accent) 10%, #fff) !important;
}
#app :is(#toggleInputsPanelBtn, #toggleControlsPanelBtn):is(:hover, :focus-visible) {
  background: color-mix(in srgb, var(--panel-disclosure-accent) 18%, #fff) !important;
}
#app :is(#projectsSlideHandle, #settingsSlideHandle):focus-visible {
  outline: 2px solid var(--panel-disclosure-accent) !important;
  outline-offset: 2px !important;
}

/* r65 — Metadata action bar polish.
   Keep text actions/search framed, but present compact icon actions without
   resting boxes. All action glyphs use the same optical size as Save. */
:is(#metadataView, #clustersView) .data-action-strip :is(.table-toolbar-icon, .icon-only-action, .tab-window-btn) {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 5px !important;
}
:is(#metadataView, #clustersView)
  .data-action-strip
  :is(.table-toolbar-icon, .icon-only-action, .tab-window-btn):hover:not(:disabled) {
  border: 0 !important;
  background: #edf3fa !important;
  color: #244f80 !important;
}
:is(#metadataView, #clustersView) .data-action-strip :is(.table-toolbar-icon, .icon-only-action, .tab-window-btn):focus-visible {
  outline: 2px solid #6ea0d8 !important;
  outline-offset: 1px !important;
}
:is(#metadataView, #clustersView) .data-action-strip :is(.table-toolbar-icon, .icon-only-action, .tab-window-btn):disabled {
  border: 0 !important;
  background: transparent !important;
}
:is(#metadataView, #clustersView) .data-action-strip .font-size-menu-wrap {
  border: 0 !important;
  background: transparent !important;
  padding: 0 !important;
}
:is(#metadataView, #clustersView) .data-action-strip .font-size-menu-wrap > button {
  border: 0 !important;
  background: transparent !important;
}
:is(#metadataView, #clustersView) .data-action-strip .font-size-menu-wrap > button:hover {
  background: #edf3fa !important;
}
:is(#metadataView, #clustersView) .data-action-strip .ui-icon {
  width: 15px !important;
  height: 15px !important;
}
:is(#metadataView, #clustersView) .data-action-strip .font-size-icon {
  width: 15px !important;
  height: 15px !important;
}
:is(#metadataView, #clustersView) .data-action-strip .analysis-save-menu-btn > .save-chevron {
  width: 10px !important;
  height: 10px !important;
}
#metadataLocateTreeBtn {
  width: 28px !important;
  min-width: 28px !important;
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 !important;
}

/* r65 theme repair: Enhanced color follows the selected startup color theme.
   The former rich-mode rules used fixed violet/green chrome colors, making the
   Application color selector appear ineffective. Keep the richer hierarchy,
   but derive application chrome from the selected theme variables. */
body.ui-color-rich:not([data-color-mode='colorful']) .left-panel,
body.ui-color-rich:not([data-color-mode='colorful']) .right-panel {
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--accent-soft) 68%, #fff) 0%,
    #fff 100%
  ) !important;
  border-color: var(--border-strong) !important;
  box-shadow: 0 4px 18px color-mix(in srgb, var(--accent) 10%, transparent) !important;
}
body.ui-color-rich:not([data-color-mode='colorful']) .left-panel .side-panel-topbar,
body.ui-color-rich:not([data-color-mode='colorful']) .right-panel .side-panel-topbar {
  background: linear-gradient(
    90deg,
    var(--accent-soft),
    color-mix(in srgb, var(--accent-soft) 36%, #fff)
  ) !important;
  border-bottom-color: var(--border-strong) !important;
  color: color-mix(in srgb, var(--accent) 80%, #203247) !important;
}
body.ui-color-rich:not([data-color-mode='colorful']) .project-inspector,
body.ui-color-rich:not([data-color-mode='colorful']) .settings-inspector {
  border-color: var(--border-strong) !important;
  background: #fff !important;
}
body.ui-color-rich:not([data-color-mode='colorful']) .project-tab-rail,
body.ui-color-rich:not([data-color-mode='colorful']) .settings-tab-rail {
  background: linear-gradient(180deg, var(--accent-soft), var(--panel-2)) !important;
  border-color: var(--border) !important;
}
body.ui-color-rich:not([data-color-mode='colorful']) .project-tab:hover,
body.ui-color-rich:not([data-color-mode='colorful']) .settings-tab-rail .control-tab:hover {
  background: color-mix(in srgb, var(--accent-soft) 74%, #fff) !important;
  color: var(--accent) !important;
}
body.ui-color-rich:not([data-color-mode='colorful']) .project-tab.active,
body.ui-color-rich:not([data-color-mode='colorful']) .settings-tab-rail .control-tab.active {
  color: var(--accent) !important;
  box-shadow: inset 3px 0 0 var(--accent) !important;
}
body.ui-color-rich:not([data-color-mode='colorful']) .project-tab.active span {
  background: var(--accent-soft) !important;
  color: var(--accent) !important;
}
body.ui-color-rich:not([data-color-mode='colorful']) .project-page-titlebar,
body.ui-color-rich:not([data-color-mode='colorful']) .settings-page-titlebar,
body.ui-color-rich:not([data-color-mode='colorful']) .settings-compact-section > summary {
  background: linear-gradient(90deg, var(--accent-soft), #fff) !important;
  border-color: var(--border) !important;
  color: color-mix(in srgb, var(--accent) 62%, #2f4056) !important;
}
body.ui-color-rich:not([data-color-mode='colorful']) .settings-compact-section:nth-of-type(3n + 1),
body.ui-color-rich:not([data-color-mode='colorful']) .settings-compact-section:nth-of-type(3n + 2),
body.ui-color-rich:not([data-color-mode='colorful']) .settings-compact-section:nth-of-type(3n) {
  border-left-color: var(--accent) !important;
}

/* r65 final appearance activation.
   Theme selectors must have an obvious visible effect across application chrome,
   while figure/data encodings remain semantically independent. */
/*
 * Source section 52/53: body not data color mode colorful.
 * Assembles into styles/base.css.
 * Rules remain in their original cascade order; later sections may intentionally override these
 * declarations.
 */
body:not([data-color-mode='colorful']) {
  background: var(--bg) !important;
}
body:not([data-color-mode='colorful']) .app-shell,
body:not([data-color-mode='colorful']) .workspace-grid {
  background: var(--bg) !important;
}
body:not([data-color-mode='colorful']) .topbar,
body:not([data-color-mode='colorful']) .modebar {
  border-color: var(--border-strong) !important;
}
body:not([data-color-mode='colorful']) .modebar {
  background: linear-gradient(90deg, var(--panel-2), #fff) !important;
}
body:not([data-color-mode='colorful']) .left-panel,
body:not([data-color-mode='colorful']) .right-panel {
  border-color: var(--border-strong) !important;
}
body:not([data-color-mode='colorful']) .left-panel .side-panel-topbar,
body:not([data-color-mode='colorful']) .right-panel .side-panel-topbar {
  background: linear-gradient(
    90deg,
    var(--accent-soft),
    color-mix(in srgb, var(--accent-soft) 34%, #fff)
  ) !important;
  border-bottom-color: var(--border-strong) !important;
  color: color-mix(in srgb, var(--accent) 78%, #27384b) !important;
}
body:not([data-color-mode='colorful']) .project-tab-rail,
body:not([data-color-mode='colorful']) .settings-tab-rail {
  background: linear-gradient(180deg, var(--accent-soft), var(--panel-2)) !important;
  border-color: var(--border) !important;
}
body:not([data-color-mode='colorful']) .project-page-titlebar,
body:not([data-color-mode='colorful']) .settings-page-titlebar,
body:not([data-color-mode='colorful']) .settings-compact-section > summary,
body:not([data-color-mode='colorful']) .analysis-section-title {
  background: linear-gradient(90deg, var(--accent-soft), #fff) !important;
  border-color: var(--border) !important;
  color: color-mix(in srgb, var(--accent) 60%, #334155) !important;
}
body:not([data-color-mode='colorful']) .dual-workspace-tabs {
  background: color-mix(in srgb, var(--accent-soft) 62%, #eef1f5) !important;
  border-bottom-color: var(--border-strong) !important;
}
body:not([data-color-mode='colorful']) .workspace-tab-group-left,
body:not([data-color-mode='colorful']) .workspace-tab-group-right {
  background: linear-gradient(180deg, var(--panel-2), #f7f9fb) !important;
}
body:not([data-color-mode='colorful']) .workspace-tab-group .view-tab.active,
body:not([data-color-mode='colorful']) .workspace-tab-group-left .view-tab[data-view].active,
body:not([data-color-mode='colorful']) .workspace-tab-group-right .view-tab[data-view].active {
  --tab-color: var(--accent) !important;
  --tab-soft: var(--accent-soft) !important;
  background: var(--accent-soft) !important;
  color: var(--accent) !important;
  border-color: var(--border-strong) !important;
}
body:not([data-color-mode='colorful']) .workspace-tab-group .view-tab.active:before,
body:not([data-color-mode='colorful']) .workspace-tab-group-left .view-tab[data-view].active:before,
body:not([data-color-mode='colorful']) .workspace-tab-group-right .view-tab[data-view].active:before {
  background: var(--accent) !important;
}
body:not([data-color-mode='colorful']) .canvas-action-strip,
body:not([data-color-mode='colorful']) .data-action-strip,
body:not([data-color-mode='colorful']) .analysis-view-actionbar.shared-analysis-actionbar,
body:not([data-color-mode='colorful']) .outbreak-actionbar {
  background: linear-gradient(90deg, var(--panel-2), #fff) !important;
  border-bottom-color: var(--border) !important;
}
body:not([data-color-mode='colorful']) .statusbar {
  background: linear-gradient(90deg, var(--accent-soft), var(--panel-2)) !important;
  border-top-color: var(--border) !important;
}
body:not([data-color-mode='colorful']) .status-indicator {
  background: var(--accent) !important;
}

/* Classic = restrained selected-theme chrome; Enhanced = richer selected-theme chrome. */
body.ui-classic:not([data-color-mode='colorful']) .left-panel,
body.ui-classic:not([data-color-mode='colorful']) .right-panel {
  background: #fff !important;
  box-shadow: none !important;
}
body.ui-classic:not([data-color-mode='colorful']) .settings-compact-section,
body.ui-classic:not([data-color-mode='colorful']) .settings-module,
body.ui-classic:not([data-color-mode='colorful']) .control-group {
  box-shadow: none !important;
  border-color: var(--border) !important;
}
body.ui-color-rich:not([data-color-mode='colorful']) .left-panel,
body.ui-color-rich:not([data-color-mode='colorful']) .right-panel {
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent-soft) 78%, #fff), #fff) !important;
  box-shadow: 0 4px 18px color-mix(in srgb, var(--accent) 12%, transparent) !important;
}
body.ui-color-rich:not([data-color-mode='colorful']) .settings-compact-section,
body.ui-color-rich:not([data-color-mode='colorful']) .settings-module,
body.ui-color-rich:not([data-color-mode='colorful']) .control-group {
  border-color: var(--border-strong) !important;
  box-shadow: 0 1px 4px color-mix(in srgb, var(--accent) 7%, transparent) !important;
}
body.ui-color-rich:not([data-color-mode='colorful']) .settings-compact-section:nth-of-type(3n + 1),
body.ui-color-rich:not([data-color-mode='colorful']) .settings-compact-section:nth-of-type(3n + 2),
body.ui-color-rich:not([data-color-mode='colorful']) .settings-compact-section:nth-of-type(3n) {
  border-left-color: var(--accent) !important;
}

/* Classic neutral must be visibly different from Enhanced color for every
   application color, including Colorful scientific. Keep the chosen accent for
   focus/selection, but flatten decorative gradients and shadows. */
body.ui-classic .topbar,
body.ui-classic .modebar {
  background: #fff !important;
  border-color: var(--border) !important;
}
body.ui-classic .workspace-grid {
  background: #f3f5f8 !important;
}
body.ui-classic .left-panel,
body.ui-classic .right-panel {
  background: #fff !important;
  border-color: var(--border) !important;
  box-shadow: none !important;
}
body.ui-classic .left-panel .side-panel-topbar,
body.ui-classic .right-panel .side-panel-topbar {
  background: #f7f9fc !important;
  color: #42536a !important;
  border-bottom-color: var(--border) !important;
}
body.ui-classic .project-tab-rail,
body.ui-classic .settings-tab-rail {
  background: #f4f6f9 !important;
  border-color: var(--border) !important;
}
body.ui-classic .project-page-titlebar,
body.ui-classic .settings-page-titlebar,
body.ui-classic .settings-compact-section > summary,
body.ui-classic .analysis-section-title {
  background: #f8fafc !important;
  color: #334155 !important;
  border-color: var(--border) !important;
}
body.ui-classic .settings-compact-section,
body.ui-classic .settings-module,
body.ui-classic .control-group {
  border-color: var(--border) !important;
  border-left-color: var(--border) !important;
  box-shadow: none !important;
}
body.ui-classic .dual-workspace-tabs {
  background: #eef1f5 !important;
  border-bottom-color: var(--border-strong) !important;
}
body.ui-classic .workspace-tab-group-left,
body.ui-classic .workspace-tab-group-right {
  background: #f6f8fa !important;
}
body.ui-classic .workspace-tab-group .view-tab.active,
body.ui-classic .workspace-tab-group-left .view-tab[data-view].active,
body.ui-classic .workspace-tab-group-right .view-tab[data-view].active {
  --tab-color: var(--accent) !important;
  --tab-soft: #fff !important;
  background: #fff !important;
  color: var(--accent) !important;
  border-color: var(--border-strong) !important;
  box-shadow: none !important;
}
body.ui-classic .workspace-tab-group .view-tab.active:before,
body.ui-classic .workspace-tab-group-left .view-tab[data-view].active:before,
body.ui-classic .workspace-tab-group-right .view-tab[data-view].active:before {
  background: var(--accent) !important;
}
body.ui-classic .canvas-action-strip,
body.ui-classic .data-action-strip,
body.ui-classic .analysis-view-actionbar.shared-analysis-actionbar,
body.ui-classic .outbreak-actionbar {
  background: #f8fafc !important;
  border-bottom-color: var(--border) !important;
}
body.ui-classic .statusbar {
  background: #f0f3f6 !important;
  border-top-color: var(--border) !important;
}

/* Workspace refinements: stable ID width, accessible column actions and retained Focus panels. */
#validationBadge {
  display: none !important;
}
body.focus-workspace .workspace-grid > .left-panel,
body.focus-workspace .workspace-grid > .right-panel {
  display: flex !important;
}
body.focus-workspace .workspace-grid {
  grid-template-columns: var(--pw-project-panel-width) minmax(0, 1fr) var(--pw-settings-panel-width) !important;
  gap: 5px !important;
  padding: 5px !important;
}
body.focus-workspace.inputs-collapsed .workspace-grid {
  grid-template-columns: var(--pw-side-rail-width) minmax(0, 1fr) var(--pw-settings-panel-width) !important;
}
body.focus-workspace.controls-collapsed .workspace-grid {
  grid-template-columns: var(--pw-project-panel-width) minmax(0, 1fr) var(--pw-side-rail-width) !important;
}
body.focus-workspace.inputs-collapsed.controls-collapsed .workspace-grid {
  grid-template-columns: var(--pw-side-rail-width) minmax(0, 1fr) var(--pw-side-rail-width) !important;
}
.metadata-only-columns .columns-head-row,
.metadata-only-columns .columns-row {
  grid-template-columns: minmax(90px, 1fr) 46px 70px 110px !important;
  gap: 8px !important;
}
.metadata-excluded-note {
  display: block;
  color: var(--text-muted, #667085);
  font-size: 9px;
  font-weight: 600;
}
.metadata-only-columns .column-order-buttons {
  width: 110px;
  min-width: 110px;
  flex-shrink: 0;
}
.metadata-only-columns .column-order-buttons button {
  flex: 0 0 24px;
}
.metadata-grid .sample-col {
  width: var(--metadata-sample-width, 115px) !important;
  min-width: var(--metadata-sample-width, 115px) !important;
  max-width: none !important;
  white-space: nowrap !important;
}
#clearTreeHighlightBtn,
#clearCompactHighlightBtn {
  border-radius: 999px !important;
  padding: 4px 12px !important;
}
#clearTreeHighlightBtn,
#clearCompactHighlightBtn {
  background: var(--panel, #fff) !important;
  border-color: var(--border, #d5d9df) !important;
  color: var(--text, #30343b) !important;
}
#plotSvg [data-edge-node],
#compactSvg [data-edge-node] {
  pointer-events: stroke;
}
#app
  #plugin-settings-maps
  .map-settings-shell
  .map-engine-settings
  .map-settings-section
  .map-settings-body
  [hidden] {
  display: none !important;
}
#metadataSyncAnalysisBtn,
#metadataSyncStatusBtn,
#mapLocationStatusBtn {
  border-radius: 999px !important;
  white-space: nowrap;
}
#metadataSyncAnalysisBtn.is-current,
#metadataSyncStatusBtn.is-current,
#mapLocationStatusBtn.is-good {
  color: #167455 !important;
  border: 1px solid #b4dbc9 !important;
  background: #f0faf5 !important;
}
#mapLocationStatusBtn.is-warn {
  color: #8b6506 !important;
  border: 1px solid #e7d391 !important;
  background: #fff8df !important;
}
#metadataSyncAnalysisBtn.is-pending,
#metadataSyncStatusBtn.is-pending,
#metadataSyncAnalysisBtn.is-warning,
#metadataSyncStatusBtn.is-warning,
#metadataSyncAnalysisBtn.is-error,
#metadataSyncStatusBtn.is-error {
  color: #982e25 !important;
  border: 1px solid #e9a19b !important;
  background: #fff1f0 !important;
}
#metadataSyncStatusBtn .metadata-link-status-dot {
  background: currentColor !important;
}
#metadataSyncAnalysisBtn.is-error .metadata-sync-state-dot {
  background: #cf3f34;
}
#mapLocationStatusBtn.is-error {
  color: #a33b3b !important;
  border: 1px solid #e8b7b7 !important;
  background: #fff1f1 !important;
}
#mapLocationStatusBtn .metadata-link-status-dot {
  background: currentColor !important;
}
.toolbar-refresh-group {
  margin: 0 4px;
}

/* r70 completion: Tree search, resizable metadata columns, compact readable QC */
.tree-toolbar-search {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 25px;
  min-width: 230px;
  max-width: 390px;
  padding: 0 5px;
  border: 1px solid #ccd6e3;
  border-radius: 6px;
  background: #fff;
  color: #526279;
}
.tree-toolbar-search.hidden {
  display: none !important;
}
.tree-toolbar-search > .ui-icon {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
}
.tree-toolbar-search input {
  min-width: 120px;
  flex: 1 1 auto;
  height: 21px !important;
  min-height: 21px !important;
  padding: 0 2px !important;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  font-size: 10.5px !important;
}
.tree-toolbar-search input:focus {
  outline: 0;
}
.tree-toolbar-search span {
  flex: 0 0 auto;
  font-size: 9.5px;
  color: #718096;
  white-space: nowrap;
}
.tree-toolbar-search button {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  min-width: 20px;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: #6b788b;
}
.tree-toolbar-search button .ui-icon {
  width: 12px;
  height: 12px;
}
.metadata-grid-virtual th[data-column] {
  position: sticky;
}
.metadata-column-resizer {
  position: absolute;
  top: 0;
  right: -3px;
  width: 7px;
  height: 100%;
  cursor: col-resize;
  z-index: 8;
  touch-action: none;
}
.metadata-column-resizer::after {
  content: '';
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 3px;
  width: 1px;
  background: transparent;
}
.metadata-column-resizer:hover::after,
.metadata-column-resizer:active::after {
  background: #6f8fb6;
}
.tree-quality-modal {
  width: min(780px, 92vw) !important;
  max-height: 86vh !important;
}
.tree-quality-modal .modal-head {
  min-height: 34px !important;
  padding: 6px 9px !important;
}
.tree-quality-modal .modal-head h2 {
  font-size: 13px !important;
}
.tree-quality-body {
  padding: 7px 9px !important;
  gap: 6px !important;
}
.tree-qc-status {
  align-items: center !important;
  gap: 9px !important;
  padding: 6px 8px !important;
  border-radius: 6px !important;
  font-size: 11.5px !important;
}
.tree-qc-status strong {
  font-size: 11.5px !important;
}
.tree-qc-status span {
  font-size: 11px !important;
}
.tree-qc-section {
  padding: 6px 7px !important;
  border-radius: 6px !important;
}
.tree-qc-section h3 {
  margin: 0 0 5px !important;
  font-size: 11.5px !important;
}
.tree-qc-metrics {
  border-radius: 5px !important;
}
.tree-qc-row {
  gap: 8px !important;
  padding: 4px 6px !important;
  font-size: 11px !important;
  line-height: 1.25 !important;
}
.tree-qc-issues {
  gap: 3px !important;
  padding-left: 18px !important;
  font-size: 11px !important;
  line-height: 1.3 !important;
}
.tree-qc-details {
  margin-top: 5px !important;
  font-size: 10.5px !important;
}
.tree-qc-details summary {
  padding: 3px 0 !important;
  font-size: 10.5px !important;
}
.tree-modal-actions {
  padding: 5px 9px 8px !important;
  gap: 6px !important;
}
.tree-modal-actions .wide-btn {
  min-height: 27px !important;
  font-size: 10.5px !important;
}
/* r72 storage and save feedback retain the compact application vocabulary. */
.storage-settings-dialog {
  position: fixed !important;
  z-index: 65000 !important;
  inset: auto !important;
  left: 50% !important;
  top: 74px !important;
  transform: translateX(-50%) !important;
  margin: 0 !important;
  width: min(560px, calc(100vw - 28px));
  max-height: min(78vh, 620px);
  overflow: auto;
  box-sizing: border-box;
  padding: 9px 11px;
  border: 1px solid #ccd8e8;
  border-radius: 7px;
  background: var(--panel, #fff);
  color: var(--text, #30475e);
  font: 10.5px var(--app-font-family, 'Noto Sans', 'Segoe UI', sans-serif);
  box-shadow: 0 14px 34px #1c2b4238;
  pointer-events: auto !important;
}
.storage-settings-dialog::backdrop {
  background: transparent;
  pointer-events: none;
}
.storage-settings-dialog header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #dfe6ed;
  padding-bottom: 6px;
}
/*
 * Source section 53/53: storage settings dialog header strong.
 * Assembles into styles/base.css.
 * Rules remain in their original cascade order; later sections may intentionally override these
 * declarations.
 */
.storage-settings-dialog header strong {
  font-size: 11.5px;
}
.storage-settings-dialog section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 8px 0;
}
.storage-settings-dialog section + section {
  border-top: 1px solid #e4e9ef;
}
.storage-settings-dialog .storage-project-folder-section {
  border-top: 1px solid #cfd9e5 !important;
  border-bottom: 1px solid #cfd9e5 !important;
  margin: 1px 0;
  padding: 9px 0;
}
.storage-settings-dialog .storage-project-folder-section + section {
  border-top: 0;
}
.storage-settings-dialog section > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.storage-settings-dialog small {
  color: #6b7c8e;
  font-size: 9.5px;
  line-height: 1.35;
}
.storage-settings-dialog [data-project-folder] {
  overflow-wrap: anywhere;
  white-space: normal;
  font-size: 10px;
  line-height: 1.35;
}
.storage-settings-dialog button {
  font: inherit;
  min-height: 25px;
  padding: 3px 7px;
  border: 1px solid #c6d2df;
  border-radius: 5px;
  color: inherit;
  background: var(--panel, #fff);
  cursor: pointer;
}
.storage-settings-dialog button:disabled {
  opacity: 0.5;
  cursor: default;
}
.storage-settings-dialog [data-storage-close] {
  border: 0;
  font-size: 17px;
  padding: 0 3px;
}
.storage-settings-dialog [data-storage-result] {
  font-size: 9.5px;
  color: #a64536;
  margin: 6px 0 0;
}
.storage-settings-dialog [data-storage-result]:empty {
  display: none;
}
.file-save-status {
  flex: 0 0 auto;
  white-space: nowrap;
  font-size: 10px;
  color: #3d766b;
}
.file-save-status:empty {
  display: none;
}
.file-save-status.is-error {
  color: #a64536;
}
#autoSaveControl:has(input:disabled) {
  opacity: 0.6;
  cursor: help;
}
.professional-statusbar {
  display: flex !important;
  flex-wrap: nowrap !important;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
.professional-statusbar .status-primary {
  flex: 1 1 180px !important;
  min-width: 0 !important;
  max-width: none !important;
  overflow: hidden;
  display: flex;
}
.professional-statusbar #statusLeft {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.professional-statusbar .status-primary > .status-indicator,
.professional-statusbar .status-progress-track {
  flex-shrink: 0;
}
.professional-statusbar .statusbar-spacer {
  display: block !important;
  flex: 1 1 auto !important;
  min-width: 8px !important;
}
.professional-statusbar > .status-segment:not(.status-primary) {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}
.professional-statusbar .status-segment > span[id] {
  min-width: 0;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.professional-statusbar .status-primary > span#statusLeft {
  max-width: none;
}
.professional-statusbar > #metadataMatchStatus,
.professional-statusbar > #elapsedStatus,
.professional-statusbar > .status-separator,
.professional-statusbar > .file-save-status {
  flex: 0 0 auto;
  white-space: nowrap;
}
.professional-statusbar > #statusRunId,
.professional-statusbar > .status-copyright {
  flex: 0 1 auto;
  max-width: 150px;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* r72 status surfaces: transient messages live only in the top modebar. */
#runIdPill {
  max-width: min(360px, 32vw) !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}
#runStatus.is-error {
  color: #a63b3b !important;
  font-weight: 700 !important;
}
.professional-statusbar .status-activity {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  gap: 7px !important;
  flex: 1 1 180px !important;
  min-width: 120px !important;
  max-width: 360px !important;
  padding: 0 10px !important;
}
.professional-statusbar .status-activity b {
  flex: 0 0 auto !important;
}
.professional-statusbar .footer-progress-track {
  position: relative !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  width: auto !important;
  height: 5px !important;
  flex: 1 1 auto !important;
  min-width: 54px !important;
  border-radius: 999px !important;
  opacity: 1 !important;
  background: #dce5ef !important;
  overflow: hidden !important;
}
.professional-statusbar .footer-progress-track:not(.active) #statusProgressBar {
  width: 0 !important;
}
.professional-statusbar .footer-progress-track.active #statusProgressBar {
  min-width: 2px;
}
@media (max-width: 1120px) {
  .professional-statusbar .status-activity {
    min-width: 92px !important;
    max-width: 180px !important;
  }
  .professional-statusbar .footer-progress-track {
    min-width: 38px !important;
  }
}

/* Direct figure editing is available through double-click and keyboard in Edit mode. */
.tree-figure-editor {
  width: min(540px, calc(100vw - 40px));
  max-height: 85vh;
  overflow: auto;
  border: 1px solid #cad5e2;
  border-radius: 8px;
  padding: 18px;
  background: #fff;
  color: #243244;
}
.tree-figure-editor::backdrop {
  background: rgba(15, 23, 42, 0.25);
}
.tree-figure-editor h3 {
  margin: 0 0 14px;
  font-size: 16px;
}
.tree-figure-editor-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
}
.tree-figure-editor-fields label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12px;
  min-width: 0;
}
.tree-figure-editor-fields label:has(textarea) {
  grid-column: 1/-1;
}
.tree-figure-editor-fields input,
.tree-figure-editor-fields select,
.tree-figure-editor-fields textarea {
  min-width: 0;
  width: 100%;
  font: inherit;
  padding: 6px;
  border: 1px solid #cad5e2;
  border-radius: 4px;
  color: #243244;
  background: #fff;
}
.tree-figure-editor,
.tree-figure-editor * {
  box-sizing: border-box;
}
.tree-figure-editor-fields textarea {
  display: block;
  max-width: 100%;
  resize: vertical;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.tree-figure-editor-fields {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.tree-figure-editor-fields input[type='checkbox'] {
  width: 18px;
  height: 18px;
}
.tree-figure-editor-fields input[type='color'] {
  height: 32px;
  padding: 3px;
}
.tree-legend-edit-row {
  grid-column: 1/-1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 66px 26px;
  gap: 8px;
  align-items: end;
}
.tree-legend-edit-row > button {
  height: 32px;
  border: 0;
  background: transparent;
  font-size: 18px;
  color: #667085;
  cursor: pointer;
}
.tree-legend-edit-row.is-removed input {
  opacity: 0.5;
}
.tree-legend-editor {
  width: min(480px, calc(100vw - 32px));
  padding: 12px;
  max-height: 75vh;
}
.tree-legend-editor h3 {
  font-size: 14px;
  margin-bottom: 9px;
}
.tree-legend-editor .tree-figure-editor-fields {
  gap: 6px 10px;
}
.tree-legend-editor .tree-figure-editor-fields label {
  font-size: 11px;
  gap: 3px;
}
.tree-legend-editor .tree-figure-editor-fields input,
.tree-legend-editor .tree-figure-editor-fields select {
  height: 27px;
  padding: 3px 5px;
  font-size: 11px;
}
.tree-legend-editor .tree-figure-editor-fields label {
  margin: 0 !important;
}
.tree-legend-editor .tree-figure-editor-fields input,
.tree-legend-editor .tree-figure-editor-fields select {
  min-height: 0 !important;
  height: 25px !important;
  padding: 2px 5px !important;
  line-height: 17px !important;
}
.tree-legend-editor .tree-figure-editor-fields {
  row-gap: 4px;
}
.tree-legend-editor .tree-legend-edit-row,
.tree-legend-edit-columns {
  grid-column: 1/-1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px 22px;
  gap: 6px;
  align-items: center;
}
.tree-legend-edit-columns {
  font-size: 11px;
  color: #667085;
  margin-top: 2px;
}
.tree-legend-editor .tree-legend-edit-row > button {
  height: 27px;
}
.tree-legend-editor .tree-figure-editor-fields input[type='color'] {
  padding: 2px;
}
.tree-legend-editor footer {
  margin-top: 10px;
}
.tree-figure-editor footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}
.tree-figure-editor footer button {
  padding: 6px 14px;
  border: 1px solid #cad5e2;
  background: #f5f7fa;
  border-radius: 4px;
}
.status-tree-action {
  font: inherit;
  color: #245ba8;
  text-decoration: underline;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}
.tree-highlight-notice {
  position: fixed;
  top: 96px;
  right: 56px;
  z-index: 1200;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: calc(100vw - 112px);
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #cad5e2;
  border-radius: 5px;
  box-shadow: 0 3px 12px rgba(15, 23, 42, 0.12);
  font-size: 12px;
  color: #243244;
}
.tree-highlight-notice span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tree-highlight-notice button {
  flex-shrink: 0;
}
.tree-highlight-dismiss {
  font-size: 18px;
  line-height: 18px;
  border: 0;
  background: transparent;
  color: #667085;
  cursor: pointer;
}
.figure-draggable:focus-visible {
  outline: 1px dashed #8498ef;
}
