/* V4.3 authoritative component geometry. All SVG wrappers have an explicit box. */
:root{--rail-width:48px;--map-bg:#141516;--control-size:32px;--control-icon:18px}
[data-icon],.card-open,.card-current{display:inline-grid;place-items:center;line-height:0;flex-shrink:0}
.ui-icon{display:block;overflow:visible}button{border-radius:0}
.rail{padding:12px 0;gap:4px;overflow:visible}.rail .brand-symbol{display:grid;place-items:center;width:36px;height:36px;padding:0;margin:0 0 12px}.rail-button{position:relative;display:grid;place-items:center;width:36px;height:36px;padding:0;line-height:0;flex-shrink:0}.rail-button svg{width:20px;height:20px}.rail-button.active:before{top:9px;left:0;height:18px}
.icon-button,.close-tab{width:32px;height:32px;padding:0;display:inline-grid;place-items:center;line-height:0}.icon-button svg,.close-tab svg{width:18px;height:18px}.close-tab{margin:0}.tab .close-tab{width:24px;height:24px;padding:0}.tab .close-tab svg{width:14px;height:14px}.tab>button:first-child{gap:6px}.tab>button:first-child>svg{width:14px;height:14px}.tab{font-size:12px}.new-tab{margin:0 4px 0}
.search-trigger{height:34px;padding:0 10px;font-size:12px;gap:8px}.search-trigger svg{width:16px;height:16px}.search-trigger kbd{line-height:20px}.vault-heading{margin:16px 12px 10px}.vault-heading strong{line-height:28px}.vault-heading .brand-dot{line-height:1}.directory-heading{font-size:11px;padding:0 12px 6px;height:32px;letter-spacing:0}.directory-heading .icon-button{width:28px;height:28px}.directory-heading svg{width:16px;height:16px}
.goal-picker select{height:34px;font-size:12px}.goal-picker>span:last-child{top:10px}.sort-switch{padding:2px;gap:2px}.sort-switch button{height:32px;font-size:12px;line-height:18px;gap:6px;padding:0 6px}.sort-switch button svg{width:17px;height:17px}.navigation-controls{gap:6px;margin-bottom:10px}
.tree .directory-row{min-height:27px;padding:3.5px 6px;line-height:20px;align-items:start;column-gap:4px;grid-template-columns:10px var(--directory-number-width,24px) minmax(0,1fr)}
.tree .directory-row.file-link,.tree .ranked-documents .directory-row.file-link{grid-template-columns:10px var(--directory-number-width) minmax(0,1fr) 22px}
.tree .domain-button,.tree .topic-button,.tree .file-link{font-size:12px;font-weight:400}.tree .domain-button{font-weight:500}
.tree .directory-symbol{width:16px;height:20px;display:grid;place-items:center;align-self:start}.tree .directory-symbol svg{width:14px;height:14px;display:block}
.tree .directory-number.folder-number,.tree .directory-number.file-sequence{font-size:11px;line-height:20px;height:20px;letter-spacing:0;font-family:inherit;color:inherit;opacity:.72;align-self:start}
.tree .ranked-documents .directory-number.file-sequence{font-size:10px}.tree .folder-title,.tree .file-title{line-height:20px;min-height:20px}.tree .directory-row .doc-level{line-height:20px;height:20px;font-size:9px;align-self:start;margin:0}
.tree .folder-children{margin-top:3px;margin-bottom:4px}.tree .file-link{margin-bottom:3px}.tree .folder{margin-bottom:3px}.tree .directory-row:last-child{margin-bottom:0}
/* Equal line boxes align single-line rows; wrapped titles retain first-line alignment. */
.toolbar{height:46px;gap:8px}.view-switch{padding:2px}.view-switch button{height:30px;padding:0 8px;gap:6px;font-size:12px;line-height:18px}.view-switch svg{width:16px;height:16px}.toolbar-tools{gap:2px}.breadcrumb{font-size:11px;gap:6px;margin-left:6px}.float-title{height:36px;font-size:11px}.float-title .icon-button{width:28px;height:28px;padding:0}.float-title .icon-button svg{width:16px;height:16px}.float-grip{display:flex;align-items:center}.toc-toolbar{height:30px}.toc-toolbar button{width:28px;height:28px;padding:0;display:grid;place-items:center}.toc-toolbar svg{width:16px;height:16px}
.graph-controls,.article-map-tools{padding:4px;gap:2px}.graph-controls button,.article-map-tools button{width:32px;height:32px;padding:0;line-height:0;display:grid;place-items:center}.graph-controls button svg,.article-map-tools button svg{width:18px;height:18px}.graph-controls>span{font-size:11px}.graph-controls .control-divider{height:20px}
.canvas-filters{padding:2px}.canvas-filters button{font-size:12px;line-height:18px;padding:5px 8px}.range-controls{height:36px;background:#18212e}.range-controls button{height:34px;min-width:58px;font-size:12px;padding:0 8px;gap:6px}.range-current{gap:6px;padding:0 8px;font-size:12px;background:#243650}.range-current small{font-size:10px;font-weight:400;color:#afc4df}.range-controls .ui-icon{width:18px;height:18px}#mini-range-slot .range-controls{height:32px}#mini-range-slot .range-controls button{height:30px;min-width:46px;padding:0 6px;font-size:11px}#mini-range-slot .range-current{font-size:11px;gap:4px;padding:0 6px}#mini-range-slot .range-current small{font-size:9px}
/* All three maps use the same neutral substrate; blue remains the interaction accent. */
.canvas-view,.article-map-shell,.mini-graph{background-color:var(--map-bg)}.article-map-shell{border-color:#ffffff16}.canvas-view,.article-graph,.mini-graph{background-image:radial-gradient(#86acdf19 1px,transparent 1px);background-size:24px 24px}.article-graph{background-color:transparent}#mini-range-slot{background:var(--map-bg)}
/* 4:3 cards: fixed header/footer, balanced body, two footer groups; no hover reflow. */
.graph-node.document-card,.article-graph .graph-node.document-card{width:256px;height:192px;padding:12px;gap:6px;display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;background:#172131;border:1px solid #7294c044}
.document-card .card-header{height:20px;min-height:20px;flex:none;gap:6px;align-items:center;line-height:20px}.card-topic{font-size:10px;line-height:20px;letter-spacing:0;gap:6px;min-width:0;flex:1}.card-topic .ui-icon{width:14px;height:14px}.card-distance{font-size:10px;line-height:18px;height:18px;white-space:nowrap;color:rgb(var(--distance-color,141 167 203));font-variant-numeric:tabular-nums}
.document-card .card-body{flex:1;min-height:0;display:flex;flex-direction:column;justify-content:center;gap:6px;padding:0}.graph-node.document-card strong.card-title,.graph-node.document-card.long-title strong.card-title{font-size:24px;line-height:32px;font-weight:600;letter-spacing:0;max-height:64px;-webkit-line-clamp:2;margin:0;flex:none}.document-card .card-summary{font-size:12px;line-height:18px;max-height:36px;-webkit-line-clamp:2;flex:none;color:#aab7cb}
.document-card .card-footer{height:26px;min-height:26px;flex:none;display:flex;justify-content:space-between;align-items:center;gap:8px;padding:8px 0 0;font-size:10px;line-height:16px;color:#a3b5d0;border-top:1px solid #ffffff16}.card-metrics,.card-actions{display:flex;align-items:center;gap:10px;height:16px;line-height:16px}.card-heat{margin:0;font-size:10px;line-height:16px;color:inherit}.card-connections{margin:0;gap:4px;height:16px;line-height:16px;display:flex;align-items:center}.card-connections .ui-icon,.card-open .ui-icon{width:14px;height:14px}.card-open,.document-card:hover .card-open{display:grid;place-items:center;width:16px;height:16px;line-height:0;color:inherit}.card-depth{line-height:16px}.card-open{opacity:.6}.document-card:hover .card-open{opacity:1}
[data-distance-band="0"]{--distance-color:239 99 99}[data-distance-band="1"]{--distance-color:244 151 80}[data-distance-band="2"]{--distance-color:224 190 75}[data-distance-band="3"]{--distance-color:87 189 134}[data-distance-band="4"]{--distance-color:64 186 203}[data-distance-band="5"]{--distance-color:102 151 236}[data-distance-band="6"]{--distance-color:178 133 236}
.graph-node.document-card[data-distance-band]:not([data-distance-band="none"]){background:linear-gradient(rgb(var(--distance-color)/.13),rgb(var(--distance-color)/.13)),#14181f;border-color:rgb(var(--distance-color)/.40)}.graph-node.document-card[data-distance-band]:before{background:rgb(var(--distance-color,84 141 255)/.8)}.graph-node.document-card[data-distance-band="0"],.graph-node.document-card.is-current{background:linear-gradient(rgb(239 99 99/.23),rgb(239 99 99/.23)),#14181f;border-color:#ef6363}.graph-node.document-card:hover{background:linear-gradient(rgb(var(--distance-color,102 151 236)/.23),rgb(var(--distance-color,102 151 236)/.23)),#14181f;border-color:rgb(var(--distance-color,102 151 236)/.9)}.document-card.is-current .card-summary,.document-card.is-current .card-footer{color:#d5b8bc}.document-card.is-current .card-footer{border-color:#ef636333}
.graph-overview .document-card .card-header,.graph-overview .document-card .card-summary,.graph-overview .document-card .card-footer,.mini-graph .document-card .card-header,.mini-graph .document-card .card-summary,.mini-graph .document-card .card-footer{display:none}
.graph-overview .graph-node.document-card strong.card-title{font-size:calc(16px * var(--label-scale,1));line-height:1.3;max-height:3.9em;-webkit-line-clamp:3}.graph-overview .document-card .card-body,.mini-graph .document-card .card-body{justify-content:center;padding:0}
.mini-graph .graph-node.document-card{width:160px;height:120px;padding:12px;gap:0}.mini-graph .graph-node.document-card strong.card-title,.mini-graph.graph-overview .graph-node.document-card strong.card-title{font-size:calc(15px * var(--card-scale,1));line-height:1.4;max-height:4.2em;-webkit-line-clamp:3}
@media(min-width:1700px){.tree .domain-button,.tree .topic-button,.tree .file-link{font-size:13px}}
@media(max-width:1250px) and (min-width:761px){:root{--rail-width:44px}}
@media(max-width:760px){:root{--rail-width:0px}.rail{display:none}.mobile-menu{display:inline-grid}.toolbar{height:auto;min-height:44px;padding:4px 8px;gap:4px}.toolbar-tools .icon-button{width:28px;height:32px}.view-switch button{font-size:11px;padding:0 6px;gap:4px}.view-switch svg{width:14px;height:14px}.location .icon-button{width:28px}.toolbar-tools{gap:0}.range-controls{height:38px}.range-controls button{height:36px}.canvas-top h2{font-size:12px;max-width:110px}.canvas-filters button{font-size:11px}.graph-controls button,.article-map-tools button{width:34px;height:34px}}

/* Normal titles use their real line count; summaries follow without a reserved blank line. */
.document-card .card-body{display:grid;grid-template-rows:max-content max-content;align-content:start;gap:8px;justify-content:normal}.document-card .card-title,.document-card .card-summary{align-self:start}.card-topic{font-size:11px}.document-card .card-footer,.card-heat{font-size:11px}.card-metrics{gap:8px}
.graph-overview .document-card .card-body,.mini-graph .document-card .card-body{display:flex;justify-content:center}.graph-overview .document-card .card-header,.mini-graph .document-card .card-header{display:flex;position:absolute;top:8px;right:10px;height:18px;min-height:18px}.graph-overview .document-card .card-topic,.mini-graph .document-card .card-topic{display:none}.graph-overview .document-card .card-distance{font-size:calc(10px * var(--card-scale,1));line-height:18px}.mini-graph .document-card .card-distance{font-size:12px}.graph-overview .document-card .card-body,.mini-graph .document-card .card-body{padding-top:16px}
.mobile-menu{display:none}.map-distance-key{display:flex;align-items:center;gap:8px;color:#8da1bc;font-size:10px;line-height:16px;margin-top:8px}.map-distance-key span{display:flex;align-items:center;gap:3px;white-space:nowrap}.map-distance-key i{width:6px;height:6px;background:rgb(var(--distance-color));display:block}.map-distance-key [data-distance-band="6"]{margin-right:0}
@media(max-width:760px){.mobile-menu{display:inline-grid}.map-distance-key{flex-wrap:wrap;max-width:115px;gap:2px 6px;font-size:9px}.map-distance-key i{width:4px;height:4px}}

/* Search, goal and sort share exactly the same outer rails. */
.sidebar>.search-trigger,.sidebar>.navigation-controls{width:calc(100% - 24px);margin-left:12px;margin-right:12px}.sidebar>.search-trigger{margin-bottom:6px}.goal-picker,.sort-switch{width:100%;min-width:0}.goal-picker select{box-sizing:border-box;width:100%}

/* Overview is a separate, vertically balanced component; metadata is an overlay. */
.graph-overview .document-card .card-body,.mini-graph .document-card .card-body{padding:0;display:flex;justify-content:center;align-items:stretch;gap:0}.graph-overview .document-card .card-title,.mini-graph .document-card .card-title{align-self:auto;text-box-trim:none;transform:translateY(var(--title-optical-offset,0em))}
.mini-graph .graph-node.document-card strong.card-title,.mini-graph.graph-overview .graph-node.document-card strong.card-title{font-size:16px;line-height:22px;max-height:66px;-webkit-line-clamp:3}
/* Focus stays within the shared control rails instead of widening one field. */
.sidebar>.search-trigger:focus-visible,.goal-picker select:focus-visible,.sort-switch button:focus-visible{outline-offset:-2px}
#search-dialog{background:#181b20;border-color:#ffffff20}.search-box,.search-footer{border-color:#ffffff14}

/* Visible glyph spacing, not empty SVG/number boxes, defines directory rhythm. */
.tree .directory-symbol{transform:none}
.tree{padding:8px 12px 16px}.tree .domain>.directory-row.is-priority{box-shadow:none}
.tree[data-filter-active="true"] .directory-row[data-related="false"]{background:transparent;border-left-color:transparent;color:#828b96}
.tree[data-filter-active="true"] .directory-row[data-related="false"]:hover{background:#ffffff05;color:#c6cbd3}
.tree[data-filter-active="true"] .directory-row[data-related="false"].active{background:#ffffff07;color:#dae0e9}
.tree[data-filter-active="true"] .directory-row[data-related="false"] .directory-symbol svg{stroke:currentColor}
.tree[data-filter-active="true"] .domain{margin-bottom:6px}

/* V4.3.2: halve vertical directory padding; no filter glow at any depth. */
.tree .directory-row,.tree .directory-row.is-priority{box-shadow:none}

/* V4.3.3: shared columns, stable visible arrow bounds in both states. */
.tree .directory-symbol{width:10px;height:20px;transform:none;display:flex;align-items:center;justify-content:center}.tree .directory-symbol svg{width:14px;height:14px;transform-origin:50% 50%;transition:none}.tree .directory-number.folder-number{font-size:inherit;font-weight:inherit}



/* V5.1: one vector brand; pure white reading text, independent of distance colors. */
:root{--reading-white:#FFFFFF}
.brand-mark{display:block;flex:none;object-fit:contain}
.rail .brand-symbol .brand-mark{width:28px;height:28px}
.brand-cursor{display:inline-block;width:.3em;height:.1em;margin-left:.12em;background:#79a9ff;vertical-align:.03em}
.vault-heading strong{color:var(--reading-white)}
.graph-node.document-card,.graph-node.document-card strong.card-title,
.document-card .card-topic,.document-card .card-summary,.document-card .card-footer,
.document-card.is-current .card-summary,.document-card.is-current .card-footer,
.document-card .card-heat{color:var(--reading-white)}
.document,.document h1,.document .section-heading,.document h3,.document h4,.document h5,.document h6,
.document strong,.document .lead,.document .callout,.document .callout strong,
.document .reading-pair h3,.document .reading-pair p,.document .welcome-link strong,
.document .welcome-link small,.document .backlink,.document .curriculum a,
.search-result strong{color:var(--reading-white)}

.vault-heading .brand-wordmark-image{display:block;width:auto;height:18px;object-fit:contain}
.vault-heading button[data-action="home"]{display:flex;align-items:center}
