/* Evolution & Discovery 1.0.0. All colors follow the established Atlas theme. */
.evolution-head h1 { max-width: 900px; }
.evolution-head .lead { max-width:820px; font-size:15px; line-height:1.55; }
#evolutionApp .subnav { margin:20px 0; padding:8px 0; }
#evolutionApp>section { margin-top:32px; }
#evolutionApp #relationships { margin-top:0; }
#evolutionApp #analysisQualification { padding:16px 20px; margin-bottom:18px; }
.tree-options { display:flex; align-items:center; justify-content:space-between; gap:10px; margin:10px 0 16px; }
.tree-options .field-hint { margin:0; }
.tree-options label { display:flex; align-items:center; gap:7px; font-size:.76rem; color:var(--muted); }
.tree-options input { width:16px; height:16px; }
.evolution-summary { display:grid; grid-template-columns:1.8fr 1fr 1.2fr 1.4fr; border:1px solid var(--line); border-radius:var(--radius); background:var(--surface); margin:24px 0; overflow:hidden; }
.evolution-summary>div { padding:19px 23px; border-right:1px solid var(--line); min-width:0; }
.evolution-summary>div:last-child { border:0; }
.evolution-summary span { display:block; text-transform:uppercase; letter-spacing:.09em; color:var(--muted); font-size:.68rem; font-weight:650; margin-bottom:8px; }
.evolution-summary strong { font-size:1.18rem; overflow-wrap:anywhere; }
.evolution-summary>div:first-child strong { font-size:.97rem; }
.evolution-toolbar { display:flex; gap:20px; align-items:end; justify-content:space-between; }
.evolution-toolbar .filter-field { flex:1; max-width:520px; }
.tree-view-controls { display:flex; gap:0; border:1px solid var(--line-strong); border-radius:8px; overflow:hidden; }
.tree-view-controls button { border:0; border-radius:0; background:var(--surface); color:var(--muted); }
.tree-view-controls button[aria-pressed="true"] { color:var(--accent-ink); background:var(--accent-soft); box-shadow:inset 0 -3px 0 var(--accent); }
.evolution-workspace { display:grid; grid-template-columns:minmax(0,1fr) 320px; gap:20px; align-items:start; }
.tree-card { border:1px solid var(--line); border-radius:var(--radius); background:var(--surface); overflow:hidden; }
.tree-legend { display:flex; gap:12px 18px; flex-wrap:wrap; padding:16px 20px; border-bottom:1px solid var(--line); color:var(--muted); font-size:.69rem; }
.tree-legend span,.alignment-legend span { display:flex; align-items:center; gap:7px; }
.legend-line { display:inline-block; width:22px; border-top:2px solid var(--accent); }
.legend-line.weak { border-top:2px dashed var(--muted); }
.legend-line.sensitive { border-top:2px dashed var(--amber); }
.legend-dot { width:8px; height:8px; border-radius:50%; background:var(--accent); display:inline-block; }
.tree-stage { position:relative; height:780px; min-height:430px; overflow:hidden; background:radial-gradient(circle at center,var(--surface) 50%,var(--surface-soft) 170%); }
#evolutionTree { display:block; width:100%; height:100%; touch-action:none; user-select:none; cursor:grab; }
#evolutionTree.is-panning { cursor:grabbing; }
.tree-link { fill:none; stroke:var(--muted); stroke-width:1.5; stroke-dasharray:4 3; vector-effect:non-scaling-stroke; opacity:.70; }
.tree-link.supported { stroke:var(--accent); stroke-dasharray:none; opacity:.95; stroke-width:1.9; }
.tree-link.terminal { stroke-dasharray:none; opacity:.55; }
.tree-link.sensitive { stroke:var(--amber); stroke-dasharray:3 3; opacity:.95; }
.tree-branch-hit { fill:none; stroke:transparent; stroke-width:12; vector-effect:non-scaling-stroke; cursor:help; }
.tree-node text { fill:var(--ink); font-size:15px; font-family:var(--font); }
.tree-node { cursor:pointer; outline:none; }
.tree-node circle { stroke:var(--muted); fill:var(--surface); stroke-width:1.2; }
.tree-node.has-structure circle { fill:var(--accent); stroke:var(--accent); }
.tree-node.nonhuman text { font-style:italic; }
.tree-node.search-dim { opacity:.16; }
.tree-node.search-match text { fill:var(--accent-ink); font-weight:700; }
.tree-node.is-selected text { fill:var(--accent-ink); font-weight:750; }
.tree-node .selection-halo { fill:none; stroke:var(--accent); stroke-width:2.5; display:none; }
.tree-node.is-selected .selection-halo,.tree-node:focus .selection-halo { display:block; }
.tree-node:focus text { text-decoration:underline; }
.tree-scale line { stroke:var(--muted); stroke-width:1; }
.tree-scale text { fill:var(--muted); font-size:12px; }
.tree-zoom { position:absolute; bottom:12px; left:12px; display:flex; gap:5px; padding:4px; background:var(--surface); border:1px solid var(--line); border-radius:9px; box-shadow:var(--shadow); }
.tree-zoom button { min-width:39px; min-height:38px; padding:6px 10px; }
.tree-help { margin:0; padding:15px 20px; border-top:1px solid var(--line); font-size:.75rem; color:var(--muted); }
.tree-tooltip { position:absolute; z-index:5; max-width:280px; padding:12px 15px; font-size:.77rem; color:var(--ink); background:var(--surface-raised); border:1px solid var(--line-strong); border-radius:9px; box-shadow:var(--shadow); pointer-events:none; }
.tree-tooltip strong { display:block; margin-bottom:4px; }
.domain-inspector { margin:0; max-height:895px; overflow:auto; padding:24px; }
.domain-inspector h3 { font-size:1.4rem; margin-bottom:12px; }
.domain-inspector p { font-size:.82rem; }
.domain-inspector dl { font-size:.8rem; margin:18px 0; }
.domain-inspector dt { font-size:.68rem; color:var(--muted); text-transform:uppercase; letter-spacing:.055em; margin-top:14px; }
.domain-inspector dd { margin:4px 0 0; overflow-wrap:anywhere; }
.inspector-links { display:flex; flex-wrap:wrap; gap:9px 12px; margin:15px 0; font-size:.79rem; }
.inspector-structure-list { display:flex; flex-wrap:wrap; gap:6px; }
.inspector-structure-list a { display:inline-block; border:1px solid var(--line); border-radius:5px; padding:3px 7px; font-family:var(--mono); font-size:.74rem; }
.domain-inspector select { width:100%; font-size:.78rem; }
.domain-inspector .button { font-size:.75rem; margin-top:9px; }
.inspector-source { padding-top:13px; border-top:1px solid var(--line); color:var(--muted); font-size:.74rem!important; }
.scientific-note { margin:20px 0; }
.domain-search-list { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; margin-top:18px; }
.domain-search-list button { text-align:left; padding:10px 13px; background:var(--surface-soft); color:var(--ink); border:1px solid var(--line); }
.domain-search-list button[aria-pressed="true"] { border-color:var(--accent); background:var(--accent-soft); }
.domain-search-list button span { display:block; font-size:.69rem; color:var(--muted); font-weight:400; margin-top:4px; }
.alignment-controls { display:flex; flex-wrap:wrap; align-items:end; gap:12px; padding:17px 20px; background:var(--surface); border:1px solid var(--line); border-radius:10px; }
.alignment-controls .filter-field { flex:1; min-width:160px; }
.alignment-controls .small-field { flex:0 1 110px; min-width:100px; }
.alignment-controls button { min-height:42px; }
.alignment-legend { display:flex; gap:12px 20px; flex-wrap:wrap; margin:18px 0 8px; font-size:.75rem; color:var(--muted); }
.residue-mark { width:14px; height:16px; display:inline-block; background:var(--surface-soft); border:1px solid var(--line-strong); }
.motif-mark { border-bottom:3px solid var(--accent)!important; }
.cage-mark { border-top:3px solid #b26719!important; }
.contact-mark { background-image:radial-gradient(circle at 75% 75%,var(--accent) 2px,transparent 3px)!important; }
.excluded-mark { background-image:repeating-linear-gradient(135deg,transparent 0,transparent 3px,var(--line) 3px,var(--line) 4px)!important; }
.alignment-scroll { width:100%; max-height:700px; overflow:auto; border:1px solid var(--line); border-radius:10px; background:var(--surface); }
.alignment-table { border-collapse:separate; border-spacing:0; min-width:100%; width:max-content; font-family:var(--mono); font-size:12px; }
.alignment-table th,.alignment-table td { padding:0; min-width:23px; width:23px; max-width:23px; text-align:center; border-right:1px solid var(--line); border-bottom:1px solid var(--line); height:28px; }
.alignment-table .alignment-label { position:sticky; left:0; z-index:2; min-width:190px; max-width:190px; width:190px; text-align:left; padding:7px 12px; background:var(--surface); font-family:var(--font); box-shadow:1px 0 0 var(--line-strong); }
.alignment-table .alignment-label button { background:none; border:0; color:var(--ink); font-size:.76rem; padding:0; width:100%; text-align:left; }
.alignment-table .alignment-label small { display:block; font-size:.63rem; color:var(--muted); margin-top:3px; font-weight:400; }
.alignment-table thead th { background:var(--surface-soft); color:var(--muted); font-size:10px; font-weight:550; }
.alignment-table thead tr:first-child th { position:sticky; top:0; z-index:3; height:32px; }
.alignment-table thead .alignment-label { z-index:4!important; }
.alignment-table tr.selected-row .alignment-label { background:var(--accent-soft); }
.alignment-table tr.selected-row .alignment-label button { color:var(--accent-ink); font-weight:700; }
.alignment-cell button { width:100%; height:31px; display:block; padding:0; border:0; border-radius:0; font:inherit; background:transparent; color:inherit; position:relative; min-height:0; }
.alignment-cell button:focus,.alignment-cell.is-selected button { outline:2px solid var(--accent); outline-offset:-2px; z-index:1; }
.alignment-cell.excluded { background-image:repeating-linear-gradient(135deg,transparent 0,transparent 5px,var(--line) 5px,var(--line) 6px); }
.alignment-cell.gap { color:var(--subtle); background:var(--surface-soft); }
.alignment-cell.hydrophobic { background-color:color-mix(in srgb,var(--model-a) 13%,var(--surface)); }
.alignment-cell.aromatic { background-color:color-mix(in srgb,#a47fcb 20%,var(--surface)); }
.alignment-cell.positive { background-color:color-mix(in srgb,#3289c0 17%,var(--surface)); }
.alignment-cell.negative { background-color:color-mix(in srgb,#c85e50 16%,var(--surface)); }
.alignment-cell.polar { background-color:color-mix(in srgb,#42a585 13%,var(--surface)); }
.alignment-cell.special { background-color:color-mix(in srgb,#cda44c 17%,var(--surface)); }
.alignment-cell.is-motif { border-bottom:3px solid var(--accent); }
.alignment-cell.has-cage { border-top:3px solid #b26719; }
.alignment-cell.has-contact button::after { content:""; position:absolute; right:2px; bottom:2px; width:4px; height:4px; background:var(--accent); border-radius:50%; }
.alignment-score { height:16px; margin:4px 3px; position:relative; background:var(--line); border-radius:2px; overflow:hidden; }
.alignment-score span { position:absolute; bottom:0; left:0; right:0; background:var(--accent); }
.residue-inspector { display:grid; grid-template-columns:1fr 1.4fr; gap:26px; margin:20px 0 0; }
.residue-inspector p,.residue-inspector li { font-size:.83rem; }
.residue-inspector h3 { margin-top:0; }
.residue-inspector ul { padding-left:18px; }
.residue-inspector li { margin:7px 0; }
.residue-inspector .evidence-detail { max-height:340px; overflow:auto; }
.candidate-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
.candidate-card { border:1px solid var(--line); border-top:3px solid var(--amber); border-radius:9px; background:var(--surface); padding:22px; }
.candidate-card h3 { margin:8px 0; }
.candidate-card p { font-size:.8rem; }
.candidate-card .badge { font-size:.62rem; }
.excluded-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-top:20px; }
.excluded-list>div { background:var(--surface-soft); border-radius:8px; padding:15px 18px; font-size:.8rem; }
.evolution-method-grid { display:grid; grid-template-columns:1fr 1fr; gap:20px; }
.evolution-method-grid .panel { margin:0; }
.evolution-method-grid li { margin:12px 0; font-size:.83rem; }
.evolution-method-grid .facts { font-size:.82rem; }
.evolution-downloads { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:13px; margin:20px 0; }
.download-card { display:flex; gap:13px; padding:20px; border:1px solid var(--line); background:var(--surface); border-radius:9px; align-items:start; }
.download-card strong,.download-card small { display:block; overflow-wrap:anywhere; }
.download-card strong { font-size:.83rem; }
.download-card small { color:var(--muted); font-size:.68rem; margin-top:6px; }
.download-card svg { flex-shrink:0; }
.boundary-table { overflow:auto; max-height:600px; margin-top:15px; }
.boundary-table table { font-size:.77rem; }
.sequence-warning { color:var(--amber); }
.focused-correspondence td { background:var(--accent-soft)!important; outline:1px solid var(--accent); }
.focus-context { padding:12px 18px; border:1px solid var(--accent); background:var(--accent-soft); border-radius:8px; }
@media(min-width:901px) and (max-width:1250px) { .main-nav { gap:3px; } .main-nav a { padding:8px 7px; font-size:.75rem; } .header-inner { gap:14px; } .brand { font-size:1.12rem; } }
@media(max-width:1100px) { .evolution-workspace { grid-template-columns:minmax(0,1fr) 280px; gap:14px; } .domain-inspector { padding:19px; } .evolution-summary>div { padding:18px 16px; } .tree-stage { height:700px; } }
@media(max-width:900px) { .evolution-workspace { grid-template-columns:1fr; } .domain-inspector { max-height:none; } #domainDetails { display:grid; grid-template-columns:1fr 1fr; gap:0 24px; } .domain-inspector h4,.domain-inspector select,.domain-inspector .inspector-source { grid-column:1/-1; } .evolution-summary { grid-template-columns:1fr 1fr; } .evolution-summary>div:nth-child(2) { border-right:0; } .evolution-summary>div:nth-child(-n+2) { border-bottom:1px solid var(--line); } .candidate-grid { grid-template-columns:1fr; } .evolution-downloads { grid-template-columns:repeat(2,minmax(0,1fr)); } .domain-search-list { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:650px) { .evolution-toolbar { display:block; } .evolution-toolbar .filter-field { max-width:none; } .tree-view-controls { margin-top:15px; width:100%; } .tree-view-controls button { flex:1; } .tree-stage { height:610px; } .tree-legend { padding:14px; font-size:.64rem; gap:8px 14px; } .tree-help { font-size:.7rem; padding:12px 14px; } .evolution-summary strong { font-size:1rem; } .evolution-summary>div:first-child strong { font-size:.78rem; } .evolution-summary span { font-size:.59rem; } .evolution-summary>div { padding:15px 13px; } .evolution-method-grid,.residue-inspector,.excluded-list,.evolution-downloads { grid-template-columns:1fr; } .alignment-controls { padding:13px; gap:10px; } .alignment-controls .filter-field { min-width:130px; } .alignment-controls .small-field { min-width:83px; flex-basis:83px; } .alignment-table .alignment-label { min-width:148px; max-width:148px; width:148px; padding:6px 8px; } .alignment-table .alignment-label button { font-size:.69rem; } .alignment-scroll { max-height:600px; } #domainDetails { display:block; } .domain-search-list { grid-template-columns:1fr; } }

.collapsed-label { fill:var(--muted);font:12px var(--font); }
@media(max-width:650px){.tree-options{display:block}.tree-options label{margin-top:10px}}

/* Phase 5: one coordinate system for the tree, canonical architecture and evidence. */
.phase5-tree-options {display:flex;align-items:end;flex-wrap:wrap;gap:12px 18px;margin:18px 0 8px;padding:16px 18px;background:var(--surface);border:1px solid var(--line);border-radius:10px;}
.phase5-tree-options .filter-field {flex:1 1 220px;}
.phase5-tree-options .filter-field label {display:block;font-size:.72rem;font-weight:650;margin-bottom:6px;}
.phase5-tree-options select {width:100%;font-size:.8rem;}
.phase5-tree-options .tree-check {display:flex;align-items:center;gap:7px;font-size:.74rem;padding-bottom:8px;white-space:nowrap;}
.tree-check input,.tree-canvas-actions input {width:auto;min-height:0;margin:0;accent-color:var(--accent);}
.tree-actionbar,.alignment-exportbar {display:flex;justify-content:space-between;gap:12px;align-items:center;flex-wrap:wrap;}
.tree-actionbar>div,.alignment-exportbar>div {display:flex;flex-wrap:wrap;gap:7px;}
.tree-actionbar button,.alignment-exportbar button {font-size:.74rem;padding:7px 11px;min-height:34px;}
.tree-actionbar .field-hint {margin:8px 0;}
#trackScope {font-size:.75rem;min-height:2.1em;max-width:1100px;}
#evolutionWorkspace {grid-template-columns:minmax(0,1fr) 300px;}
#evolutionWorkspace.inspector-hidden {grid-template-columns:minmax(0,1fr);}
#evolutionWorkspace.inspector-hidden .domain-inspector {display:none;}
.tree-canvas-actions {display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;border-bottom:1px solid var(--line);padding:13px 16px;font-size:.75rem;background:var(--surface-soft);}
.tree-canvas-actions>div {display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
.tree-canvas-actions label {display:flex;align-items:center;gap:6px;margin-right:6px;}
.tree-canvas-actions button {font-size:.71rem;padding:6px 9px;min-height:32px;}
.tree-stage {height:800px;min-height:520px;overflow:auto;scrollbar-gutter:stable;background:var(--surface);}
#evolutionTree {max-width:none;min-width:0;flex:none;overflow:visible;background:var(--surface);}
.tree-zoom {position:static;width:auto;border:0;border-radius:0;border-top:1px solid var(--line);padding:10px 15px;box-shadow:none;margin:0;}
.tree-zoom button {font-size:.75rem;min-height:33px;}
.tree-help {font-size:.72rem;line-height:1.6;}
.figure-export-status {margin:0;padding:0 16px;font-size:.73rem;}
.figure-export-status:not(:empty) {padding:12px 16px;border-top:1px solid var(--line);}
#evolutionTree .figure-heading {font:700 18px var(--font);letter-spacing:1.3px;fill:var(--ink);}
#evolutionTree .figure-subheading {font:12px var(--font);fill:var(--muted);}
#evolutionTree .track-heading {font:650 10px var(--font);letter-spacing:.3px;fill:var(--muted);}
#evolutionTree .figure-footnote {font:11px var(--font);fill:var(--muted);}
#evolutionTree .tree-row-band {fill:var(--surface-soft);opacity:.7;}
#evolutionTree .tree-node text {font-size:15px;letter-spacing:.05px;font-weight:550;}
#evolutionTree .tree-node.nonhuman text {font-style:italic;font-weight:450;}
#evolutionTree .tree-node.search-dim {opacity:.18;}
#evolutionTree .tree-node.search-match text,#evolutionTree .tree-node.is-selected text {font-weight:750;}
#evolutionTree .tree-link {stroke-width:1.5;opacity:.8;stroke-linejoin:round;}
#evolutionTree .tree-link.supported {stroke-width:2;opacity:1;}
#evolutionTree .tree-link.terminal {stroke:var(--muted);opacity:.65;}
#evolutionTree .tip-guide {stroke:var(--line-strong);stroke-dasharray:2 4;stroke-width:.8;}
#evolutionTree .tree-internal-node {cursor:pointer;outline:none;}
#evolutionTree .tree-internal-node circle {stroke:var(--accent);stroke-width:1.4;fill:var(--surface);}
#evolutionTree .tree-internal-node:focus circle,#evolutionTree .tree-internal-node.selected-branch circle {fill:var(--accent);stroke-width:3;}
#evolutionTree .support-label {font:9px var(--font);fill:var(--muted);paint-order:stroke;stroke:var(--surface);stroke-width:3;stroke-linejoin:round;}
#evolutionTree .collapsed-subtree {cursor:pointer;outline:none;}
#evolutionTree .collapsed-subtree path {fill:var(--accent-soft);stroke:var(--accent);stroke-width:1.3;}
#evolutionTree .collapsed-subtree text {font:650 13px var(--font);fill:var(--accent-ink);}
#evolutionTree .collapsed-subtree:focus path {stroke-width:3;}
#evolutionTree .architecture-backbone {stroke:var(--line-strong);stroke-width:2;}
#evolutionTree .architecture-domain {fill:#b5a0cd;stroke:var(--surface);stroke-width:.5;cursor:pointer;}
#evolutionTree .architecture-domain.analyzed-domain {fill:var(--accent);stroke:var(--accent-ink);stroke-width:1.1;}
#evolutionTree .architecture-feature {fill:#7f9db8;opacity:.9;cursor:pointer;}
#evolutionTree .feature-zinc-finger {fill:#c99558;}
#evolutionTree .feature-repeat {fill:#a58bbe;}
#evolutionTree .architecture-feature:focus,#evolutionTree .architecture-domain:focus {outline:2px solid var(--ink);}
#evolutionTree .architecture-construct {fill:var(--line-strong);}
#evolutionTree .architecture-observed {fill:var(--accent);}
#evolutionTree .architecture-length {font:10px var(--font);fill:var(--muted);}
#evolutionTree .architecture-axis {font:9px var(--font);fill:var(--muted);}
#evolutionTree .evidence-chip {fill:var(--surface);stroke:var(--line);stroke-width:1;}
#evolutionTree .evidence-chip.positive {fill:var(--accent-soft);stroke:var(--accent);stroke-opacity:.3;}
#evolutionTree .evidence-chip.unavailable {stroke-dasharray:3 2;fill:none;}
#evolutionTree .evidence-value {font:600 12px var(--font);fill:var(--ink);}
.clade-actions {display:grid;grid-template-columns:1fr;gap:8px;margin:15px 0;}
.clade-actions button {font-size:.77rem;}
.domain-inspector {max-height:980px;position:sticky;top:20px;}
.domain-inspector .inspector-structure-list button {font-size:.69rem;padding:4px 7px;min-height:28px;}
#relationships:fullscreen {overflow:auto;padding:24px;background:var(--background,var(--surface));}
#relationships:fullscreen #evolutionWorkspace {grid-template-columns:minmax(0,1fr) 320px;}
#relationships:fullscreen #evolutionWorkspace.inspector-hidden {grid-template-columns:minmax(0,1fr);}
#relationships:fullscreen .tree-stage {height:calc(100vh - 350px);min-height:400px;}
#relationships:fullscreen .domain-inspector {max-height:calc(100vh - 220px);}
#phase5EvolutionDiagnostics li {font-size:.83rem;margin:10px 0;}
@media(max-width:1000px){#evolutionWorkspace{grid-template-columns:minmax(0,1fr) 255px;gap:12px}.tree-stage{height:760px}.domain-inspector{padding:18px}.tree-canvas-actions{padding:11px}}
@media(max-width:800px){#evolutionWorkspace{grid-template-columns:minmax(0,1fr)}.domain-inspector{position:static;max-height:none}.tree-stage{height:650px}.tree-actionbar{align-items:start}.tree-actionbar>div{width:100%}.phase5-tree-options{padding:13px;gap:12px}.phase5-tree-options .filter-field{flex-basis:calc(50% - 18px)}#relationships:fullscreen #evolutionWorkspace{grid-template-columns:1fr}#relationships:fullscreen .tree-stage{height:65vh}}
@media(max-width:500px){.phase5-tree-options .filter-field{flex-basis:100%}.tree-canvas-actions>div{gap:5px}.tree-stage{height:580px;min-height:430px}.tree-legend{font-size:.66rem}.tree-actionbar button{flex:1 1 auto}.tree-canvas-actions{gap:8px}.tree-canvas-actions label{font-size:.7rem}}
@media(prefers-reduced-motion:reduce){#evolutionApp *{scroll-behavior:auto!important;transition:none!important;animation:none!important}}

.legend-dot.open {background:var(--surface);border:1.4px solid var(--muted);}
