/* Relate Explorer and size-normalized activity additions. */
.libraryto-enhancement { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--border, #d8dee3); }
.enhancement-heading { display:flex; justify-content:space-between; align-items:flex-start; gap:1rem; margin-bottom:1rem; }
.enhancement-heading h2 { margin:0 0 .35rem; }
.enhancement-heading p { margin:0; max-width:70rem; }
.table-scroll { max-width:100%; overflow:auto; }
.libraryto-enhancement .data-table { width:100%; border-collapse:collapse; }
.libraryto-enhancement .data-table th, .libraryto-enhancement .data-table td { text-align:left; padding:.65rem .8rem; border-bottom:1px solid var(--border, #d8dee3); white-space:nowrap; }
.libraryto-enhancement .data-table thead th { font-weight:650; background:var(--table-head, rgba(100,116,139,.08)); }
.graph-stat-line { display:flex; gap:2rem; flex-wrap:wrap; margin:.75rem 0 1.25rem; }
.graph-stat-line span { display:flex; flex-direction:column; gap:.15rem; }
.graph-stat-line strong { font-size:1.35rem; font-variant-numeric:tabular-nums; }
.graph-stat-line small { color:var(--muted, #64748b); }
.graph-relationship-group { margin:1.25rem 0; }
.graph-relationship-group h4 { display:flex; align-items:center; gap:.6rem; margin:.45rem 0; }
.graph-relationship-group h4 span { font-size:.78rem; font-weight:500; color:var(--muted, #64748b); }
.graph-relationship-group ul { list-style:none; margin:0; padding:0; border-top:1px solid var(--border, #d8dee3); }
.graph-relationship-group li { display:grid; grid-template-columns:minmax(10rem,.8fr) minmax(14rem,1.5fr) minmax(9rem,1fr); gap:.8rem; align-items:center; padding:.7rem .25rem; border-bottom:1px solid var(--border, #d8dee3); }
.graph-edge-type, .graph-relationship-group li small { color:var(--muted, #64748b); font-size:.84rem; }
.graph-relationship-group li strong { font-weight:600; }
@media (max-width:700px) {
  .graph-relationship-group li { grid-template-columns:1fr; gap:.2rem; }
  .graph-stat-line { gap:1rem; }
}

.graph-summary-tables { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1.25rem; }
.graph-summary-tables h3 { margin:.5rem 0; font-size:1rem; }
.graph-root-node { display:inline-flex; flex-direction:column; gap:.2rem; border:1px solid var(--border, #d8dee3); border-left:4px solid var(--accent, #286b83); border-radius:.5rem; padding:.8rem 1rem; margin:.5rem 0 1rem; min-width:15rem; }
.graph-root-node span, .graph-root-node small { color:var(--muted, #64748b); font-size:.82rem; }
.graph-root-node strong { font-size:1.05rem; }
@media (max-width:700px) { .graph-summary-tables { grid-template-columns:1fr; } }

/* Inspectable node details in Relate Explorer */
.graph-branch-properties{margin:1rem 0 1.5rem;}
.graph-property-table th{width:34%;font-weight:600;}
.graph-property-table td{overflow-wrap:anywhere;}
.graph-node-list{display:grid;gap:.55rem;}
.graph-node-details{border-bottom:1px solid var(--line);padding:.65rem 0;}
.graph-node-details summary{display:grid;grid-template-columns:minmax(9rem,auto) 1fr;gap:.2rem .8rem;align-items:center;cursor:pointer;}
.graph-node-details summary strong{font-weight:600;}
.graph-node-details summary small{grid-column:2;color:var(--muted);}
.graph-node-inspection{padding:.75rem 0 .25rem 1rem;}
.graph-node-inspection h5{margin:.5rem 0;font-size:.9rem;}
.branch-size-heading{display:flex;align-items:end;justify-content:space-between;gap:1rem;flex-wrap:wrap;margin-bottom:.5rem;}
.branch-size-heading h3{margin:0;}
.branch-size-heading .form-field{min-width:10rem;max-width:14rem;margin:0;}
@media (max-width:640px){.branch-size-heading{align-items:stretch;}.branch-size-heading .form-field{max-width:none;width:100%;}}


/* Branch Explorer: selection-driven connections and readable branch hours. */
.branch-explorer-block { margin: 1.35rem 0; }
.branch-explorer-block > h3 { margin: 0 0 .7rem; font-size: 1rem; }
.branch-connection-details { border-top: 1px solid var(--line); padding: .65rem 0; }
.branch-connection-details:last-child { border-bottom: 1px solid var(--line); }
.branch-connection-details > summary { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; cursor: pointer; }
.branch-connection-details > summary span { color: var(--muted); font-size: .82rem; }
.branch-hours { display: grid; gap: .2rem; min-width: 17rem; white-space: normal; line-height: 1.45; }
@media (max-width: 700px) { .branch-connection-details > summary { align-items: flex-start; flex-direction: column; gap: .2rem; } }


/* Branch Explorer insight presentation. */
.branch-overview-filter{display:flex;align-items:center;gap:.75rem;max-width:24rem;margin:0 0 1rem;}
.branch-overview-filter label{font-weight:600;}
.branch-overview-filter select{flex:1;min-width:10rem;}
.branch-explorer-block{margin:1.5rem 0 2rem;}
.branch-explorer-block>h3{margin:0 0 .7rem;font-size:1rem;font-weight:650;}
.branch-explorer-takeaways{margin:.25rem 0 1.25rem;padding:.8rem 1rem .8rem 2rem;border-left:3px solid var(--accent);background:var(--surface-soft);}
.branch-explorer-takeaways li+li{margin-top:.35rem;}

/* Branch Explorer: more useful local-network comparisons. */
.branch-explorer-metrics,.graph-inspector-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1rem;margin:1rem 0 1.35rem;padding:1rem 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.branch-explorer-metrics>div,.graph-inspector-metrics>div{display:flex;flex-direction:column;gap:.2rem;min-width:0}
.branch-explorer-metrics strong,.graph-inspector-metrics strong{font-size:1.55rem;line-height:1.2;font-variant-numeric:tabular-nums}
.branch-explorer-metrics span,.graph-inspector-metrics span{font-size:.85rem;color:var(--muted)}
.branch-service-reach{display:grid;gap:.85rem;max-width:62rem}
.branch-service-reach-row{display:grid;gap:.3rem}
.branch-service-reach-label{display:flex;justify-content:space-between;align-items:baseline;gap:1rem}
.branch-service-reach-label strong{font-size:.92rem;font-weight:600}
.branch-service-reach-label span,.branch-service-reach-row small{color:var(--muted);font-size:.8rem}
.branch-service-reach-track{height:.55rem;overflow:hidden;border-radius:999px;background:var(--surface-soft)}
.branch-service-reach-track span{display:block;height:100%;background:var(--accent);border-radius:inherit}
.branch-service-differences{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1.2rem}
.branch-service-differences section{padding:.85rem 0;border-top:1px solid var(--line)}
.branch-service-differences h4{margin:0 0 .4rem;font-size:.92rem}
.branch-service-differences p{margin:0;color:var(--muted);line-height:1.5}

/* Judge-facing, read-only graph database inspector. */
.graph-inspector-intro,.graph-inspector-section{margin-top:1.5rem;padding-top:1.25rem;border-top:1px solid var(--line)}
.graph-inspector-intro>p{max-width:78rem;line-height:1.6}
.graph-inspector-section>h2{margin:0 0 .7rem;font-size:1.15rem;font-weight:650}
.graph-inspector-section>p{max-width:78rem}
.graph-node-toolbar{display:grid;grid-template-columns:minmax(13rem,.8fr) minmax(18rem,1.4fr) auto;align-items:end;gap:.8rem;margin:1rem 0}
.graph-node-toolbar .form-field,.graph-branch-select{margin:0}
.graph-node-search-field{min-width:0}
.graph-node-actions{display:flex;justify-content:flex-start;margin-top:1rem}
.graph-node-list{max-height:58rem;overflow:auto;border-top:1px solid var(--line)}
.graph-node-details{padding:.55rem 0;border-bottom:1px solid var(--line)}
.graph-node-details>summary{display:grid;grid-template-columns:minmax(12rem,1fr) minmax(10rem,1fr);gap:.3rem 1rem;align-items:center;cursor:pointer;min-height:2.75rem}
.graph-node-details>summary strong{font-weight:600;overflow-wrap:anywhere}
.graph-node-details>summary small{color:var(--muted);overflow-wrap:anywhere}
.graph-node-inspection{padding:.8rem 0 .4rem}
.graph-inspector-properties{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 1.5rem;margin:0}
.graph-inspector-properties>div{display:grid;grid-template-columns:minmax(7rem,.7fr) minmax(8rem,1.3fr);gap:.6rem;padding:.45rem 0;border-bottom:1px solid var(--line);min-width:0}
.graph-inspector-properties dt{font-size:.82rem;font-weight:600;color:var(--muted);overflow-wrap:anywhere}
.graph-inspector-properties dd{margin:0;font-size:.86rem;overflow-wrap:anywhere;white-space:pre-wrap}
.graph-branch-record{margin-top:1rem}
.graph-branch-node,.graph-branch-connections{margin:1.25rem 0}
.graph-branch-node>h3,.graph-branch-connections>h3{margin:0 0 .35rem;font-size:1rem}
.graph-connection-group{border-top:1px solid var(--line);padding:.55rem 0}
.graph-connection-group:last-child{border-bottom:1px solid var(--line)}
.graph-connection-group>summary{display:flex;justify-content:space-between;align-items:center;gap:1rem;cursor:pointer;min-height:2.7rem}
.graph-connection-group>summary span{font-size:.82rem;color:var(--muted)}
.graph-connection-records{padding-left:1rem}
.graph-inspector-loading{min-height:10rem}
@media(max-width:800px){.graph-node-toolbar{grid-template-columns:1fr 1fr}.graph-node-toolbar>.button{grid-column:1/-1;width:fit-content}.branch-explorer-metrics,.graph-inspector-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){.graph-node-toolbar{grid-template-columns:1fr}.graph-node-toolbar>.button{grid-column:auto;width:100%}.graph-inspector-properties{grid-template-columns:1fr}.graph-node-details>summary{grid-template-columns:1fr}.branch-service-differences{grid-template-columns:1fr}.branch-service-reach-label{align-items:flex-start;flex-direction:column;gap:.15rem}}

/* Overview Graph Explorer: restrained layout, clear hierarchy, light/dark aware. */
.graph-explorer-shell { display:grid; gap:1.1rem; max-width:100%; }
.graph-explorer-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:1rem; padding:.25rem 0 .2rem; }
.graph-explorer-heading h2 { margin:0 0 .4rem; font-size:1.3rem; font-weight:650; }
.graph-explorer-heading p { margin:0; max-width:62rem; color:var(--muted); line-height:1.55; }
.graph-readonly { flex:none; align-self:flex-start; border:1px solid var(--line); border-radius:4px; padding:.3rem .55rem; color:var(--muted); font-size:.78rem; font-weight:600; }
.graph-explorer-kpis { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:.75rem; }
.graph-kpi { min-width:0; padding:.95rem 1rem; border:1px solid var(--line); border-radius:7px; background:var(--surface, #fff); display:flex; flex-direction:column; gap:.3rem; }
.graph-kpi strong { font-size:1.55rem; line-height:1.2; font-weight:650; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.graph-kpi span { font-size:.9rem; font-weight:600; }
.graph-kpi small { color:var(--muted); font-size:.78rem; line-height:1.4; }
.graph-data-warning { margin:0; padding:.75rem .9rem; border-left:3px solid #a66a22; background:var(--surface-soft); color:var(--text); line-height:1.5; }
.graph-inspector-panel { padding-top:1rem; }
.graph-inspector-panel[hidden] { display:none !important; }
.graph-inspector-panel .tabs { margin-bottom:1rem; }
.graph-insight-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; align-items:start; }
.graph-insight-section { min-width:0; border:1px solid var(--line); border-radius:7px; padding:1rem; background:var(--surface, #fff); }
.graph-section-heading { margin-bottom:.85rem; }
.graph-section-heading h3,.graph-insight-section h4 { margin:0 0 .35rem; font-size:1rem; font-weight:650; }
.graph-section-heading p { margin:0; color:var(--muted); font-size:.84rem; line-height:1.5; }
.graph-coverage-section { grid-column:1 / -1; }
.graph-coverage-row + .graph-coverage-row { margin-top:.85rem; }
.graph-coverage-label { display:flex; justify-content:space-between; align-items:baseline; gap:1rem; margin-bottom:.3rem; }
.graph-coverage-label strong { font-size:.88rem; font-weight:600; }
.graph-coverage-label span { color:var(--muted); font-size:.78rem; white-space:nowrap; }
.graph-coverage-track { height:.55rem; border-radius:3px; overflow:hidden; background:var(--surface-soft, #edf1f3); }
.graph-coverage-track span { display:block; height:100%; background:var(--accent, #286b83); }
.graph-area-list { display:grid; }
.graph-area-row { display:flex; justify-content:space-between; gap:1rem; align-items:baseline; padding:.65rem 0; border-bottom:1px solid var(--line); }
.graph-area-row:last-child { border-bottom:0; }
.graph-area-row strong { min-width:0; font-weight:600; font-size:.88rem; }
.graph-area-row span { flex:none; color:var(--muted); font-size:.8rem; }
.graph-inspector-footnote { color:var(--muted); font-size:.8rem; line-height:1.5; margin:.2rem 0 0; }
.graph-structure-header { display:flex; align-items:baseline; justify-content:space-between; gap:1rem; margin-bottom:.85rem; }
.graph-structure-header h3 { margin:0 0 .25rem; font-size:1.05rem; }
.graph-structure-header p { margin:0; color:var(--muted); font-size:.84rem; }
.graph-structure-header > span { flex:none; color:var(--muted); font-size:.8rem; }
.graph-structure-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; align-items:start; }
.graph-structure-grid .data-table { width:100%; }
.graph-structure-grid .data-table th,.graph-structure-grid .data-table td { white-space:normal; overflow-wrap:anywhere; }
.graph-schema-properties summary { cursor:pointer; color:var(--accent); font-size:.82rem; }
.graph-schema-properties p { max-width:32rem; white-space:normal; overflow-wrap:anywhere; color:var(--muted); font-size:.8rem; line-height:1.5; }
.graph-filter-note { margin:.2rem 0 .6rem; color:var(--muted); font-size:.82rem; }
.graph-node-toolbar { display:grid; grid-template-columns:minmax(13rem,.8fr) minmax(16rem,1.3fr) auto; gap:.8rem; align-items:end; padding:.9rem; border:1px solid var(--line); border-radius:7px; background:var(--surface-soft); }
.graph-node-toolbar .form-field { margin:0; min-width:0; }
.graph-node-list { display:grid; max-height:46rem; overflow:auto; border-top:1px solid var(--line); }
.graph-node-details { border-bottom:1px solid var(--line); padding:.15rem 0; }
.graph-node-details > summary { display:grid; grid-template-columns:minmax(10rem,1fr) minmax(9rem,1fr); gap:.2rem .8rem; align-items:center; min-height:2.8rem; cursor:pointer; }
.graph-node-details > summary strong { font-size:.88rem; font-weight:600; overflow-wrap:anywhere; }
.graph-node-details > summary small { color:var(--muted); font-size:.78rem; overflow-wrap:anywhere; }
.graph-node-inspection { padding:.75rem 0 .8rem .9rem; }
.graph-inspector-properties { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 1.5rem; margin:0; }
.graph-inspector-properties > div { display:grid; grid-template-columns:minmax(7rem,.7fr) minmax(8rem,1.3fr); gap:.6rem; padding:.45rem 0; border-bottom:1px solid var(--line); min-width:0; }
.graph-inspector-properties dt { color:var(--muted); font-size:.8rem; font-weight:600; overflow-wrap:anywhere; }
.graph-inspector-properties dd { margin:0; font-size:.84rem; overflow-wrap:anywhere; white-space:pre-wrap; }
.graph-branch-select { margin:0 0 1rem; max-width:26rem; }
.graph-branch-select label { display:block; margin-bottom:.35rem; font-weight:600; }
.graph-branch-record { display:grid; gap:.75rem; }
.graph-connection-summary { display:flex; justify-content:space-between; align-items:baseline; gap:1rem; padding:.85rem 1rem; border:1px solid var(--line); border-radius:7px; background:var(--surface-soft); }
.graph-connection-summary strong { font-size:.96rem; }
.graph-connection-summary span { color:var(--muted); font-size:.82rem; }
.graph-connection-group { border-bottom:1px solid var(--line); padding:.15rem 0; }
.graph-connection-group > summary { display:flex; justify-content:space-between; align-items:center; gap:1rem; cursor:pointer; min-height:2.8rem; }
.graph-connection-group > summary strong { font-size:.88rem; font-weight:600; }
.graph-connection-group > summary span { color:var(--muted); font-size:.78rem; }
.graph-connection-records { padding:0 0 .5rem 1rem; }
.graph-node-actions { display:flex; justify-content:flex-start; padding:.8rem 0; }
@media(max-width:900px) { .graph-explorer-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); } .graph-insight-grid,.graph-structure-grid { grid-template-columns:1fr; } .graph-coverage-section { grid-column:auto; } }
@media(max-width:620px) { .graph-explorer-heading { flex-direction:column; } .graph-readonly { align-self:flex-start; } .graph-explorer-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); gap:.55rem; } .graph-kpi { padding:.75rem; } .graph-kpi strong { font-size:1.25rem; } .graph-node-toolbar { grid-template-columns:1fr; } .graph-node-toolbar .button { width:100%; } .graph-inspector-properties { grid-template-columns:1fr; } .graph-coverage-label,.graph-area-row,.graph-connection-summary { align-items:flex-start; flex-direction:column; gap:.15rem; } .graph-node-details > summary { grid-template-columns:1fr; gap:.1rem; padding:.35rem 0; } }

/* Library Network Explorer: compact, readable judge-facing workspace. */
.graph-explorer-shell{gap:1.25rem}
.graph-explorer-shell>.tabs{margin:.1rem 0 .25rem}
.graph-explorer-shell .graph-inspector-panel{padding-top:.35rem}
.graph-insight-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}
.graph-insight-section{border:1px solid var(--line);border-radius:3px;padding:1.1rem;background:var(--surface)}
.graph-section-heading{margin-bottom:.7rem}
.graph-section-heading h3{font-size:1rem;letter-spacing:-.01em}
.graph-section-heading p{font-size:.82rem;max-width:46rem}
.graph-insight-section .data-table{width:100%;border-collapse:collapse}
.graph-insight-section .data-table th,.graph-insight-section .data-table td{padding:.62rem .7rem;vertical-align:top}
.graph-insight-section .data-table tbody tr:nth-child(even){background:var(--surface-soft)}
.graph-structure-grid{gap:1.1rem}
.graph-structure-grid .graph-insight-section h4{margin:0 0 .75rem}
.graph-node-toolbar{background:var(--surface);border:1px solid var(--line);border-radius:3px;padding:1rem}
.graph-node-list{max-height:40rem;margin-top:.75rem}
@media(max-width:900px){.graph-insight-grid,.graph-structure-grid{grid-template-columns:1fr}}


/* Compact confirmation that the embedded Relate engine answered the explorer queries. */
.relate-runtime-status{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:0 0 14px;color:var(--muted);font-size:.84rem;line-height:1.4}
.relate-runtime-status strong{color:var(--text);font-weight:650}
.relate-runtime-indicator{width:7px;height:7px;flex:0 0 7px;border-radius:50%;background:#16865a;box-shadow:0 0 0 3px color-mix(in srgb,#16865a 14%,transparent)}
