/* UGTLD Visual System V1 — additive token/component layer.
 * Single token source for new Sprint-1 surfaces; legacy module styles remain intact.
 */
:root {
  --ugtld-bg: #F7F9F6;
  --ugtld-surface: #FFFFFF;
  --ugtld-text: #23312A;
  --ugtld-text-secondary: #55655B;
  --ugtld-text-muted: #66746D;
  --ugtld-border: #DEE7DF;
  --ugtld-section: #EDF4EE;
  --ugtld-brand: #286C53;
  --ugtld-brand-strong: #173F32;
  --ugtld-brand-soft: #EDF4EE;
  --ugtld-success: #2E7D52;
  --ugtld-warning: #9A6A24;
  --ugtld-error: #A84444;
  --ugtld-blocked: #66746D;
  --ugtld-not-run: #77877D;
  --ugtld-running: #286C53;
  --ugtld-evidence-structure: #2878B5;
  --ugtld-evidence-boltz: #6256D9;
  --ugtld-evidence-biology: #2F8F6B;
  --ugtld-evidence-experimental: #B7791F;
  --ugtld-evidence-evolution: #527C8A;
  --ugtld-font-ui: Inter, "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --ugtld-font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  --ugtld-r1: 4px;
  --ugtld-r2: 8px;
  --ugtld-r3: 10px;
  --ugtld-shadow-subtle: 0 1px 2px rgba(16,24,40,.04);
  --ugtld-space-1: 4px;
  --ugtld-space-2: 8px;
  --ugtld-space-3: 12px;
  --ugtld-space-4: 16px;
  --ugtld-space-5: 24px;
  --ugtld-space-6: 32px;
  --ugtld-space-7: 40px;
  --ugtld-sidebar-width: 232px;
  --ugtld-content-max: 1480px;
}

/* RC3 UX rebuild: one researcher-first shell over the existing functional
   modules. Legacy tools remain reachable through their existing routes but no
   longer compete with the canonical workflow. */
.platform-topbar {
  --platform-topbar-h: 58px;
  background: #fff;
  color: #182126;
  border-bottom: 1px solid #DCE3E6;
  box-shadow: 0 1px 3px rgba(24,33,38,.05);
}
.platform-topbar-title { color: #182126; }
.platform-topbar-search { max-width: 360px; }
.platform-topbar-search input {
  background: #F2F5F6;
  color: #182126;
  border: 1px solid #DCE3E6;
}
.platform-topbar-search input::placeholder { color: #7C8A91; }
.platform-chip, .platform-build-chip { background: #F2F5F6; color: #52616A; border-color: #DCE3E6; }
.platform-rail {
  width: 240px;
  min-width: 240px;
  background: #fff;
  color: #52616A;
  border-right: 1px solid #DCE3E6;
}
.sidebar-brand { border-bottom: 1px solid #DCE3E6; }
.ugtld-v1-primary-nav {
  margin: 0;
  padding: 18px 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.ugtld-v1-primary-nav .platform-rail-section-label {
  color: #7C8A91;
  font-size: 10px;
}
.ugtld-v1-primary-nav .platform-rail-item {
  min-height: 38px;
  border-radius: 7px;
  color: #52616A;
}
.ugtld-v1-primary-nav .platform-rail-item:hover {
  background: #F2F5F6;
  color: #182126;
}
.ugtld-v1-primary-nav .platform-rail-item.active {
  background: #EAF3F2;
  color: #245F5A;
  box-shadow: inset 3px 0 0 #2F7F78;
}
.legacy-nav-section, .ugtld-v1-legacy-label, .platform-rail-divider {
  display: none !important;
}
.ugtld-v1-nav-note, .platform-rail-footer { display: none; }
.ugtld-home-nav { display: none; }
.platform-workspace { background: #F7F9FA; }
.ugtld-context-bar {
  top: 58px;
  min-height: 58px;
  padding: 10px 24px;
  background: #fff;
  border-bottom: 1px solid #DCE3E6;
}
.ugtld-context-bar[data-context-state="NOT_DEFINED"] .ugtld-context-items,
.ugtld-context-bar[data-context-state="NOT_DEFINED"] #contextProjectStatus,
.ugtld-context-bar[data-context-state="NOT_DEFINED"] #contextContinueResearch,
.ugtld-context-bar[data-context-state="NOT_DEFINED"] #contextOpenPackage {
  display: none;
}
.ugtld-context-bar[data-context-state="NOT_DEFINED"] .ugtld-context-actions::before {
  content: "No active project";
  color: #52616A;
  font-size: 13px;
  font-weight: 600;
  margin-right: 8px;
}
.ugtld-context-bar[data-context-state="NOT_DEFINED"] #contextChangeProject {
  display: inline-flex;
}
.platform-page > .platform-card:first-child,
.platform-page-section > .platform-card:first-child {
  border-color: #DCE3E6;
  box-shadow: 0 1px 2px rgba(24,33,38,.03);
}
@media (max-width: 900px) {
  .platform-rail { width: 208px; min-width: 208px; }
  .platform-topbar-search { display: none; }
  .ugtld-context-items { display: none; }
}

/* RC3 visual delta: make the live build and evidence-workspace identity
   immediately visible without changing scientific content or API behavior. */
.platform-build-chip {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border: 1px solid #b8d7d2;
  border-radius: 999px;
  background: #eaf5f3;
  color: #2f706b;
  font: 700 10px/1 system-ui, sans-serif;
  letter-spacing: .08em;
  white-space: nowrap;
}

.platform-topbar {
  box-shadow: 0 1px 0 rgba(24, 33, 38, .08), 0 8px 24px rgba(24, 33, 38, .04);
}

.platform-rail {
  background: #182126;
  border-right: 1px solid #2b3a40;
}

.ugtld-v1-primary-nav {
  padding: 10px 8px 14px;
  margin: 8px;
  border: 1px solid rgba(183, 215, 210, .22);
  border-radius: 10px;
  background: rgba(255, 255, 255, .045);
}

.ugtld-v1-primary-nav .platform-rail-item.active {
  background: #2f7f78;
  color: #fff;
  box-shadow: inset 3px 0 0 #b8e1db;
}

.platform-rail-section-label,
.ugtld-v1-legacy-label {
  letter-spacing: .12em;
  text-transform: uppercase;
}

html, body { background: var(--ugtld-bg); color: var(--ugtld-text); }
body { font-family: var(--ugtld-font-ui); }
.platform-workspace { background: var(--ugtld-bg); }
.platform-rail { width: var(--ugtld-sidebar-width); }

.ugtld-v1-primary-nav {
  padding: var(--ugtld-space-3) var(--ugtld-space-2) var(--ugtld-space-4);
  border-bottom: 1px solid var(--ugtld-border);
}
.ugtld-v1-primary-nav .platform-rail-item { margin: 2px 0; }
.ugtld-v1-primary-nav .platform-rail-item-label { font-weight: 600; }
.ugtld-v1-primary-nav .platform-rail-item-icon { font-size: 16px; width: 22px; text-align: center; }
.ugtld-v1-nav-note, .ugtld-v1-legacy-label {
  color: var(--ugtld-text-muted);
  font-size: 11px;
  line-height: 1.4;
}
.ugtld-v1-nav-note { margin: var(--ugtld-space-3) var(--ugtld-space-2) 0; }
.ugtld-v1-legacy-label { padding: var(--ugtld-space-4) var(--ugtld-space-3) var(--ugtld-space-2); text-transform: uppercase; letter-spacing: .08em; }
.legacy-nav-section { opacity: .84; }
.legacy-nav-section .platform-rail-section-label { font-size: 10px; }

.ugtld-context-bar {
  position: sticky;
  top: 48px;
  z-index: 20;
  display: flex;
  gap: var(--ugtld-space-5);
  align-items: center;
  min-height: 62px;
  padding: var(--ugtld-space-3) var(--ugtld-space-5);
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--ugtld-border);
  box-shadow: var(--ugtld-shadow-subtle);
}
.ugtld-context-title { min-width: 180px; display: grid; gap: 2px; }
.ugtld-context-kicker, .ugtld-kicker {
  color: var(--ugtld-text-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.ugtld-context-title strong { font-size: 14px; }
.ugtld-context-items { display: flex; flex-wrap: wrap; gap: var(--ugtld-space-3); flex: 1; }
.ugtld-context-item { display: grid; gap: 1px; min-width: 110px; }
.ugtld-context-item span { color: var(--ugtld-text-muted); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.ugtld-context-item b { font-size: 12px; font-weight: 600; }
.ugtld-context-actions { display: flex; align-items: center; gap: var(--ugtld-space-2); }

.ugtld-status-chip, .ugtld-evidence-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 22px;
  padding: 2px 8px;
  border: 1px solid currentColor;
  border-radius: var(--ugtld-r2);
  font-family: var(--ugtld-font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .02em;
  white-space: nowrap;
}
.ugtld-status-chip::before, .ugtld-evidence-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-ready { color: var(--ugtld-success); background: #EEF8F2; }
.status-running { color: var(--ugtld-running); background: #EEF4FF; }
.status-succeeded, .status-available { color: var(--ugtld-success); background: #EEF8F2; }
.status-not-run { color: var(--ugtld-not-run); background: #F2F4F7; }
.status-blocked { color: var(--ugtld-blocked); background: #F2F4F7; }
.status-failed { color: var(--ugtld-error); background: #FEF1F1; }
.status-superseded { color: #7A5CC7; background: #F5F2FF; }
.evidence-structure { color: var(--ugtld-evidence-structure); background: #EEF6FB; }
.evidence-boltz { color: var(--ugtld-evidence-boltz); background: #F2F0FF; }
.evidence-biology { color: var(--ugtld-evidence-biology); background: #EEF8F3; }
.evidence-evolution { color: var(--ugtld-evidence-evolution); background: #EFF5F6; }

.ugtld-v1-surface {
  max-width: var(--ugtld-content-max);
  margin: 0 auto;
  padding: var(--ugtld-space-6);
}
.ugtld-page-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--ugtld-space-5); margin-bottom: var(--ugtld-space-5); }
.ugtld-page-heading h1 { margin: 4px 0 6px; font-size: 30px; line-height: 1.15; letter-spacing: -.02em; }
.ugtld-page-heading p { max-width: 680px; margin: 0; color: var(--ugtld-text-secondary); font-size: 14px; line-height: 1.55; }
.ugtld-heading-actions, .ugtld-toolbar-group { display: flex; align-items: end; gap: var(--ugtld-space-2); flex-wrap: wrap; }
.ugtld-inline-field { display: grid; gap: 4px; color: var(--ugtld-text-secondary); font-size: 11px; font-weight: 700; }
.ugtld-input, .ugtld-select {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--ugtld-border);
  border-radius: var(--ugtld-r2);
  background: var(--ugtld-surface);
  color: var(--ugtld-text);
  font: inherit;
}
.ugtld-input:focus, .ugtld-select:focus, .ugtld-btn-primary:focus, .ugtld-btn-secondary:focus, .ugtld-btn-tertiary:focus { outline: 3px solid rgba(47,107,255,.22); outline-offset: 1px; }
.ugtld-btn-primary, .ugtld-btn-secondary, .ugtld-btn-tertiary {
  min-height: 34px;
  padding: 7px 12px;
  border-radius: var(--ugtld-r2);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.ugtld-btn-primary { border: 1px solid var(--ugtld-brand); background: var(--ugtld-brand); color: #fff; }
.ugtld-btn-secondary { border: 1px solid var(--ugtld-border); background: var(--ugtld-surface); color: var(--ugtld-text); }
.ugtld-btn-tertiary { border: 0; background: transparent; color: var(--ugtld-brand); padding-inline: 6px; }

.ugtld-summary-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--ugtld-space-3); margin-bottom: var(--ugtld-space-5); }
.ugtld-summary-item { padding: var(--ugtld-space-4); border: 1px solid var(--ugtld-border); border-radius: var(--ugtld-r2); background: var(--ugtld-surface); }
.ugtld-summary-item span { display: block; color: var(--ugtld-text-muted); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.ugtld-summary-item strong { display: block; margin-top: 5px; font-size: 22px; line-height: 1; }
.ugtld-evidence-coverage-block { padding: var(--ugtld-space-5); border: 1px solid var(--ugtld-border); border-radius: var(--ugtld-r2); background: var(--ugtld-surface); }
.ugtld-section-heading-row { display: flex; align-items: center; justify-content: space-between; gap: var(--ugtld-space-3); margin-bottom: var(--ugtld-space-4); }
.ugtld-section-heading-row h2 { margin: 0; font-size: 18px; }
.ugtld-helper { color: var(--ugtld-text-muted); font-size: 12px; }
.ugtld-coverage-grid { display: grid; grid-template-columns: repeat(6, minmax(100px, 1fr)); gap: var(--ugtld-space-3); }
.ugtld-coverage-item { padding: var(--ugtld-space-3); border: 1px solid var(--ugtld-border); border-radius: var(--ugtld-r2); background: var(--ugtld-section); }
.ugtld-coverage-item span { display: block; color: var(--ugtld-text-secondary); font-size: 11px; }
.ugtld-coverage-item strong { display: block; margin-top: 5px; font-family: var(--ugtld-font-mono); font-size: 15px; }
.ugtld-candidate-toolbar { display: flex; justify-content: space-between; gap: var(--ugtld-space-3); margin: var(--ugtld-space-5) 0 var(--ugtld-space-3); }
.ugtld-selection-tray { display: flex; align-items: center; justify-content: space-between; gap: var(--ugtld-space-3); margin-bottom: var(--ugtld-space-3); padding: var(--ugtld-space-3) var(--ugtld-space-4); border: 1px solid rgba(47,107,255,.3); border-radius: var(--ugtld-r2); background: #F1F5FF; }
.ugtld-preflight-result { flex-basis: 100%; color: var(--ugtld-text-secondary); font-size: 11px; }
.ugtld-table-shell { overflow-x: auto; border: 1px solid var(--ugtld-border); border-radius: var(--ugtld-r2); background: var(--ugtld-surface); }
.ugtld-table { width: 100%; min-width: 1060px; border-collapse: collapse; font-size: 12px; }
.ugtld-table th { position: sticky; top: 0; z-index: 1; padding: 10px 9px; border-bottom: 1px solid var(--ugtld-border); background: var(--ugtld-section); color: var(--ugtld-text-secondary); font-size: 10px; font-weight: 800; letter-spacing: .04em; text-align: left; text-transform: uppercase; }
.ugtld-table td { padding: 10px 9px; border-bottom: 1px solid var(--ugtld-border); vertical-align: middle; }
.ugtld-table tbody tr:hover { background: #FAFBFC; }
.ugtld-table-check { width: 30px; }
.ugtld-table-empty { padding: 28px !important; color: var(--ugtld-text-muted); text-align: center; }
.ugtld-candidate-cell { display: grid; gap: 2px; }
.ugtld-candidate-cell strong { color: var(--ugtld-text); font-family: var(--ugtld-font-mono); font-size: 12px; }
.ugtld-candidate-cell span { color: var(--ugtld-text-muted); font-size: 10px; }
.ugtld-link-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.ugtld-link-button:hover strong { color: var(--ugtld-brand); }
.ugtld-coverage-count { font-family: var(--ugtld-font-mono); font-weight: 700; }
.ugtld-v1-legacy-surface-note { margin-top: var(--ugtld-space-3); color: var(--ugtld-text-muted); font-size: 11px; }
.ugtld-context-summary { display: flex; gap: var(--ugtld-space-4); align-items: center; padding: var(--ugtld-space-4); border: 1px solid var(--ugtld-border); border-radius: var(--ugtld-r2); background: var(--ugtld-section); color: var(--ugtld-text-secondary); font-size: 12px; }
.ugtld-context-summary strong { color: var(--ugtld-text); }
.ugtld-workspace-tabs { display: flex; gap: 2px; margin-top: var(--ugtld-space-5); border-bottom: 1px solid var(--ugtld-border); overflow-x: auto; }
.ugtld-workspace-tabs button { padding: 10px 13px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--ugtld-text-secondary); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.ugtld-workspace-tabs button.is-active { border-bottom-color: var(--ugtld-brand); color: var(--ugtld-brand); }
.ugtld-workspace-body { padding-top: var(--ugtld-space-5); }
.ugtld-workspace-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--ugtld-space-4); }
.ugtld-workspace-card { padding: var(--ugtld-space-5); border: 1px solid var(--ugtld-border); border-radius: var(--ugtld-r2); background: var(--ugtld-surface); }
.ugtld-workspace-card h3 { margin: 0 0 var(--ugtld-space-3); font-size: 15px; }
.ugtld-workspace-card p { margin: 6px 0; color: var(--ugtld-text-secondary); font-size: 12px; line-height: 1.55; }

/* RC3-UX-D2: project and candidate workspace convergence. */
.ugtld-project-workspace { display: grid; gap: 18px; max-width: 1380px; margin: 0 auto; }
.ugtld-project-workspace-lead {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 28px;
  padding: 24px 26px; border: 1px solid var(--ugtld-border); border-radius: 16px;
  background: linear-gradient(135deg, #f6fbf6 0%, #fff 62%);
}
.ugtld-project-workspace-lead h2 { max-width: 780px; margin: 7px 0 8px; font-size: 24px; line-height: 1.22; color: var(--ugtld-text); }
.ugtld-project-workspace-lead p { margin: 0; color: var(--ugtld-text-secondary); font-size: 13px; }
.ugtld-project-primary-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.ugtld-project-journey {
  display: grid; grid-template-columns: repeat(11, minmax(86px, 1fr)); gap: 6px;
  overflow-x: auto; padding: 4px 0 9px;
}
.ugtld-project-journey-step {
  min-width: 86px; padding: 10px; text-align: left; border: 1px solid var(--ugtld-border);
  border-radius: 10px; background: var(--ugtld-surface); color: var(--ugtld-text-secondary); cursor: pointer;
}
.ugtld-project-journey-step span, .ugtld-project-journey-step small { display: block; }
.ugtld-project-journey-step span { font-size: 11px; font-weight: 750; }
.ugtld-project-journey-step small { margin-top: 4px; font-size: 9px; letter-spacing: .04em; text-transform: uppercase; color: var(--ugtld-text-muted); }
.ugtld-project-journey-step.is-complete { border-color: #bbd9c1; background: #f1f8f2; color: #225d32; }
.ugtld-project-journey-step.is-current { border-color: var(--ugtld-brand); box-shadow: inset 0 0 0 1px var(--ugtld-brand); }
.ugtld-project-metric-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.ugtld-project-metric {
  min-height: 126px; display: flex; flex-direction: column; align-items: flex-start; gap: 7px;
  padding: 16px; border: 1px solid var(--ugtld-border); border-radius: 12px; background: #fff;
  color: var(--ugtld-text); text-align: left; cursor: pointer;
}
.ugtld-project-metric:hover { border-color: #9fc7a7; box-shadow: 0 8px 22px rgba(36, 88, 49, .08); transform: translateY(-1px); }
.ugtld-project-metric span { font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: .045em; color: var(--ugtld-text-muted); }
.ugtld-project-metric strong { font-size: 25px; line-height: 1; }
.ugtld-project-metric small { margin-top: auto; color: var(--ugtld-text-secondary); line-height: 1.35; }
.ugtld-project-next-action {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 17px 20px; border-radius: 12px; background: #163d24; color: #fff;
}
.ugtld-project-next-action span, .ugtld-project-next-action strong { display: block; }
.ugtld-project-next-action span { color: #bcd5c2; }
.ugtld-project-next-action strong { margin-top: 4px; font-size: 15px; }
.ugtld-project-empty button { margin-top: 8px; }

.ugtld-evidence-strip {
  display: grid; grid-template-columns: repeat(6, minmax(150px, 1fr)); gap: 8px;
  margin-bottom: 16px; overflow-x: auto; padding-bottom: 3px;
}
.ugtld-evidence-strip-item {
  min-width: 150px; padding: 13px 14px; border: 1px solid var(--ugtld-border); border-top: 3px solid #7a9f82;
  border-radius: 10px; background: #fff;
}
.ugtld-evidence-strip-item.is-diagnostic { border-top-color: #94723e; background: #fffcf6; }
.ugtld-evidence-strip-item > div { display: flex; justify-content: space-between; gap: 8px; }
.ugtld-evidence-strip-item span { font-size: 12px; font-weight: 760; color: var(--ugtld-text); }
.ugtld-evidence-strip-item small { font-size: 9px; color: var(--ugtld-text-muted); white-space: nowrap; }
.ugtld-evidence-strip-item strong { display: block; margin: 11px 0 5px; font-size: 13px; color: #295e37; }
.ugtld-evidence-strip-item p { margin: 0; font-size: 10px; color: var(--ugtld-text-secondary); line-height: 1.35; overflow-wrap: anywhere; }
.ugtld-candidate-overview-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px; }
.ugtld-candidate-overview-card {
  grid-column: span 4; min-height: 170px; padding: 18px; border: 1px solid var(--ugtld-border);
  border-radius: 12px; background: #fff;
}
.ugtld-candidate-overview-card.is-priority { grid-column: span 8; background: linear-gradient(145deg, #f4faf5, #fff); }
.ugtld-candidate-overview-card:last-child { grid-column: span 8; }
.ugtld-candidate-overview-card h3 { margin: 8px 0; font-size: 18px; }
.ugtld-candidate-overview-card p { color: var(--ugtld-text-secondary); font-size: 12px; line-height: 1.55; }
.ugtld-candidate-overview-card ul { display: grid; gap: 9px; margin: 12px 0 0; padding: 0; list-style: none; }
.ugtld-candidate-overview-card li { display: grid; gap: 2px; padding-bottom: 8px; border-bottom: 1px solid var(--ugtld-border-subtle); }
.ugtld-candidate-overview-card li strong { font-size: 12px; }
.ugtld-candidate-overview-card li span { font-size: 11px; color: var(--ugtld-text-secondary); }
.ugtld-evidence-browser-heading { display: flex; justify-content: space-between; align-items: end; margin: 4px 0 14px; }
.ugtld-evidence-browser-heading h2 { margin: 5px 0; font-size: 21px; }
.ugtld-evidence-browser-heading p { margin: 0; color: var(--ugtld-text-secondary); font-size: 12px; }
.ugtld-table-subline { display: block; margin-top: 3px; color: var(--ugtld-text-muted); font-weight: 500; }
.ugtld-evidence-table td { vertical-align: top; }

.ugtld-chart-page { max-width: 1420px; margin: 0 auto; }
.ugtld-chart-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.ugtld-chart-summary > div { padding: 13px 14px; border: 1px solid var(--ugtld-border); border-radius: 10px; background: #fff; }
.ugtld-chart-summary span, .ugtld-chart-summary strong, .ugtld-chart-summary small { display: block; }
.ugtld-chart-summary span { font-size: 10px; color: var(--ugtld-text-muted); text-transform: uppercase; letter-spacing: .04em; }
.ugtld-chart-summary strong { margin: 5px 0 2px; font-size: 16px; }
.ugtld-chart-summary small { color: var(--ugtld-text-secondary); }
.ugtld-chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.ugtld-chart-card { overflow: hidden; padding: 0; border-radius: 14px; }
.ugtld-chart-preview { min-height: 290px; display: grid; place-items: center; padding: 14px; background: #f8faf8; border-bottom: 1px solid var(--ugtld-border); }
.ugtld-chart-preview object { width: 100%; height: 290px; border: 0; background: #fff; }
.ugtld-chart-card-body { display: grid; gap: 12px; padding: 17px 18px; }
.ugtld-chart-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.ugtld-chart-card-head h3 { margin: 0 0 5px; font-size: 17px; }
.ugtld-chart-card-head p { margin: 0; font-size: 12px; line-height: 1.45; color: var(--ugtld-text-secondary); }
.ugtld-chart-actions { display: flex; gap: 8px; align-items: center; }
.ugtld-chart-advanced summary { cursor: pointer; font-size: 11px; color: var(--ugtld-text-secondary); }
.ugtld-chart-files { margin-top: 10px; overflow-x: auto; }

.ugtld-research-package-hero { margin-bottom: 16px; border: 1px solid #b9d5bf; border-radius: 16px; overflow: hidden; background: linear-gradient(135deg, #f3faf4, #fff 70%); }
.ugtld-research-package-hero .platform-card-header { background: transparent !important; }
.ugtld-legacy-report-tools { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--ugtld-border); }
.ugtld-legacy-report-tools > summary { cursor: pointer; color: var(--ugtld-text-secondary); font-weight: 700; font-size: 12px; }
.ugtld-package-dossier { display: grid; gap: 17px; }
.ugtld-package-identity { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; }
.ugtld-package-identity h3 { margin: 5px 0; font-size: 22px; }
.ugtld-package-identity p { margin: 0; color: var(--ugtld-text-secondary); }
.ugtld-package-facts { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 8px; }
.ugtld-package-facts > div { padding: 11px 12px; border: 1px solid var(--ugtld-border); border-radius: 9px; background: rgba(255,255,255,.76); min-width: 0; }
.ugtld-package-facts span, .ugtld-package-facts strong { display: block; }
.ugtld-package-facts span { font-size: 9px; color: var(--ugtld-text-muted); text-transform: uppercase; letter-spacing: .05em; }
.ugtld-package-facts strong { margin-top: 4px; font-size: 11px; overflow-wrap: anywhere; }
.ugtld-package-section-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.ugtld-package-section-grid > div { display: grid; grid-template-columns: auto 1fr; gap: 2px 9px; padding: 12px; border: 1px solid var(--ugtld-border); border-radius: 10px; background: #fff; }
.ugtld-package-section-grid b { grid-row: span 2; color: #6d9576; font-size: 11px; }
.ugtld-package-section-grid span { font-size: 12px; font-weight: 720; }
.ugtld-package-section-grid small { color: var(--ugtld-text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ugtld-package-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ugtld-package-actions span { margin-left: auto; color: var(--ugtld-text-secondary); font-size: 11px; }

@media (max-width: 1500px) {
  .ugtld-project-metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ugtld-evidence-strip { grid-template-columns: repeat(3, minmax(180px, 1fr)); }
}
@media (max-width: 1100px) {
  .ugtld-project-workspace-lead, .ugtld-project-next-action { align-items: stretch; flex-direction: column; }
  .ugtld-project-primary-actions { justify-content: flex-start; }
  .ugtld-candidate-overview-card, .ugtld-candidate-overview-card.is-priority, .ugtld-candidate-overview-card:last-child { grid-column: span 12; }
  .ugtld-chart-grid { grid-template-columns: 1fr; }
  .ugtld-chart-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ugtld-package-facts, .ugtld-package-section-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.ugtld-empty-state { display: grid; gap: 6px; padding: 42px 24px; border: 1px dashed var(--ugtld-border); border-radius: var(--ugtld-r2); background: var(--ugtld-surface); text-align: center; }
.ugtld-empty-state strong { font-size: 14px; }
.ugtld-empty-state span { color: var(--ugtld-text-secondary); font-size: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 1100px) {
  .ugtld-context-bar { align-items: flex-start; flex-wrap: wrap; }
  .ugtld-context-items { flex-basis: 100%; order: 3; }
  .ugtld-page-heading { flex-direction: column; }
  .ugtld-summary-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ugtld-coverage-grid { grid-template-columns: repeat(3, minmax(100px, 1fr)); }
  .ugtld-workspace-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .ugtld-v1-surface { padding: var(--ugtld-space-4); }
  .ugtld-summary-strip { grid-template-columns: 1fr 1fr; }
  .ugtld-candidate-toolbar { align-items: stretch; flex-direction: column; }
}

/* Final UX shell overrides (must remain last so legacy theme rules cannot
   reintroduce the competing admin chrome). */
.platform-topbar { background:var(--ugtld-surface) !important; color:var(--ugtld-text) !important; border-bottom:1px solid var(--ugtld-border) !important; box-shadow:0 1px 2px rgba(35,49,42,.05) !important; }
.platform-topbar-title { color:var(--ugtld-text) !important; }
.platform-topbar-search input { background:var(--ugtld-bg) !important; color:var(--ugtld-text) !important; border:1px solid var(--ugtld-border) !important; }
.platform-topbar-search input::placeholder { color:var(--ugtld-text-muted) !important; }
.platform-chip, .platform-build-chip { background:var(--ugtld-section) !important; color:var(--ugtld-text-secondary) !important; border-color:var(--ugtld-border) !important; }
.platform-rail { width:240px !important; min-width:240px !important; background:var(--ugtld-surface) !important; color:var(--ugtld-text-secondary) !important; border-right:1px solid var(--ugtld-border) !important; }
.ugtld-v1-primary-nav { margin:0 !important; padding:18px 12px !important; border:0 !important; background:transparent !important; }
.ugtld-v1-primary-nav .platform-rail-section-label { color:var(--ugtld-text-muted) !important; font-size:10px !important; }
.ugtld-v1-primary-nav .platform-rail-item { min-height:38px; border-radius:7px; color:var(--ugtld-text-secondary) !important; }
.ugtld-v1-primary-nav .platform-rail-item:hover { background:var(--ugtld-section) !important; color:var(--ugtld-text) !important; }
.ugtld-v1-primary-nav .platform-rail-item.active { background:var(--ugtld-brand-soft) !important; color:var(--ugtld-brand-strong) !important; box-shadow:inset 3px 0 0 var(--ugtld-brand) !important; }
.legacy-nav-section, .ugtld-v1-legacy-label, .platform-rail-divider, .ugtld-v1-nav-note, .platform-rail-footer, .ugtld-home-nav { display:none !important; }
.platform-workspace { background:var(--ugtld-bg) !important; }
.ugtld-context-bar { top:58px !important; background:var(--ugtld-surface) !important; border-bottom:1px solid var(--ugtld-border) !important; }
.ugtld-context-bar[data-context-state="NOT_DEFINED"] .ugtld-context-items,
.ugtld-context-bar[data-context-state="NOT_DEFINED"] #contextProjectStatus,
.ugtld-context-bar[data-context-state="NOT_DEFINED"] #contextContinueResearch,
.ugtld-context-bar[data-context-state="NOT_DEFINED"] #contextOpenPackage { display:none !important; }
.ugtld-context-bar[data-context-state="NOT_DEFINED"] .ugtld-context-actions::before { content:"No active project"; color:var(--ugtld-text-secondary); font-size:13px; font-weight:600; margin-right:8px; }
.ugtld-home.research-home > .ugtld-home-split {
  margin-top:8px;
  padding:24px 32px;
  background:var(--ugtld-bg);
  display:grid !important;
  grid-template-columns:minmax(0,1fr) !important;
  max-width:1400px;
  width:100%;
  margin-left:auto;
  margin-right:auto;
}
.ugtld-home.research-home > .ugtld-home-split > .ugtld-home-panel:first-child { display:none; }
.ugtld-home.research-home > .ugtld-home-split > .ugtld-home-panel:last-child { width:100%; }
.ugtld-home.research-home .ugtld-panel-title span::after { content:" · CONTINUE RESEARCH"; color:var(--ugtld-brand); }
.ugtld-home.research-home .ugtld-panel-title h2 { font-size:22px; }
.ugtld-home.research-home .ugtld-activity-list { display:grid; grid-template-columns:repeat(auto-fit,minmax(300px,1fr)); gap:12px; }
.ugtld-home.research-home .ugtld-activity-item {
  min-height:84px;
  padding:16px;
  background:#fff;
  border:1px solid var(--ugtld-border);
  border-radius:9px;
}
.ugtld-home.research-home > .ugtld-hero { margin-top:24px; opacity:.88; }
.ugtld-home.research-home > .ugtld-hero h1 { font-size:clamp(32px,4vw,46px); }
.platform-topbar .pool-count,
.platform-topbar .platform-build-chip { display:none !important; }
#backendStatus {
  width:30px;
  min-width:30px;
  padding:0;
  justify-content:center;
  overflow:hidden;
  color:transparent !important;
}
#backendStatus .chip-dot { margin:0; }
