/* Local graph surface. All geometry lives in SVG attributes; no inline styles. */
#connections-toggle, #news-toggle { align-self: stretch; padding: 12px 0; color: var(--muted); font-size: var(--text-ui); border-bottom: 2px solid transparent; }
#connections-toggle[aria-pressed="true"], #news-toggle[aria-pressed="true"] { color: var(--paper); border-bottom-color: var(--copper); }
.connections { margin: 0 24px 20px; color: var(--paper); --map-height: clamp(440px, calc(100dvh - 248px), 860px); --map-border: #2c3b50; }
.connections-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 13px 0 12px; }
.connections-heading-copy { display: flex; align-items: baseline; gap: 18px; }
.connections h2 { margin: 0; font: 580 1.7rem/1.2 var(--sans); letter-spacing: -.045em; }
.connections-heading p { margin: 0; color: #aab7c8; font-size: .83rem; }
.connections-heading-meta { text-align: right; }
.connections-stats { color: #d7dfdf; font: .67rem/1.6 var(--mono); }
.connections-edition { color: #8fa0b7; font: .6rem/1.6 var(--mono); }
.connections-toolbar { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.connections-toolbar label { display: block; margin: 0; }
.connections-search { flex: 1; min-width: 180px; max-width: 400px; }
.connections-picker { flex: 1; min-width: 180px; max-width: 440px; }
.connections input, .connections select { width: 100%; min-height: 36px; padding: 7px 11px; border: 1px solid #30415a; border-radius: 6px; background: #101e30; color: #e7e9e5; font-size: .76rem; }
.connections input::placeholder { color: #9aa9bb; }
.connections select { text-overflow: ellipsis; }
.connections-overview { border: 1px solid #35445b; border-radius: 6px; min-height: 36px; padding: 7px 13px; font-size: .74rem; color: #d2dbe0; white-space: nowrap; }
.connections-overview:hover { border-color: #bb8d61; color: #f1d2b0; }
.connections-modes { display: flex; gap: 2px; padding: 3px; margin-left: auto; border: 1px solid #30415a; border-radius: 7px; }
.connections-modes button { padding: 5px 12px; font-size: .73rem; color: #a7b6c9; border-radius: 4px; }
.connections-modes button[aria-pressed="true"] { color: #f2e8d9; background: #344258; }
.connections-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; height: var(--map-height); min-height: 0; position: relative; overflow: hidden; border: 1px solid var(--map-border); border-radius: 12px; background: #0b1627; }
.connections.is-inspector-hidden .connections-layout { grid-template-columns: minmax(0, 1fr); }
.connections-stage { min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; background: radial-gradient(ellipse at 43% 42%, #101f32, #0b1627 73%); }
.connections-stage-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 43px; padding: 8px 13px; border-bottom: 1px solid #25354a; flex-shrink: 0; }
.connections-stage-title { color: #a9b8ca; font: .66rem/1.5 var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.connections-zoom { display: flex; align-items: center; gap: 5px; flex-shrink: 0; }
.connections-zoom button { border: 1px solid #334258; border-radius: 4px; padding: 4px 8px; color: #c2ced8; font-size: .65rem; line-height: 1.4; background: #101e2e; }
.connections-zoom button:hover { border-color: #9d8060; color: #f1cfab; }
.connections-zoom button:first-child, .connections-zoom button:nth-child(3) { width: 25px; padding: 1px; font-size: 1rem; line-height: 1.4; }
.connections-zoom button:disabled { opacity: .35; cursor: default; }
.connections-zoom button[aria-pressed="true"] { color: #f1c492; border-color: #aa8059; background: #382e28; }
.connections-zoom-readout { min-width: 35px; color: #8e9eb4; text-align: center; font: .6rem/1.5 var(--mono); }
.connections-viewport { flex: 1; min-height: 0; overflow: hidden; position: relative; cursor: grab; touch-action: none; background-image: radial-gradient(#97a8ba20 .65px, transparent .8px); background-size: 24px 24px; }
.connections-viewport > svg { display: block; width: 100%; height: 100%; fill: none; stroke: none; outline: none; user-select: none; }
.connections-viewport > svg:focus-visible { outline: 1px solid #9a7755; outline-offset: -3px; }
.connections.is-panning .connections-viewport, .connections.is-panning .connections-node { cursor: grabbing; }
.connections-edge-line { fill: none; stroke: #7b8f9d; stroke-width: .8; stroke-opacity: .27; transition: stroke-opacity .12s, stroke .12s; }
.connections-edge-theme .connections-edge-line { stroke: #91a99c; stroke-dasharray: 2 6; stroke-width: .7; stroke-opacity: .28; }
.connections-edge-context .connections-edge-line { stroke: #c49a71; stroke-width: 1.1; stroke-opacity: .6; }
.connections-edge-hit { fill: none; stroke: transparent; pointer-events: stroke; cursor: pointer; }
.connections-edge.is-highlighted .connections-edge-line, .connections-edge:focus .connections-edge-line { stroke: #efb67f; stroke-opacity: .98; stroke-width: 1.5; filter: drop-shadow(0 0 2px #d59a5c55); }
.connections-edge.is-muted .connections-edge-line { stroke-opacity: .065; }
.connections-edge:focus { outline: none; }
.connections-node { cursor: pointer; outline: none; transition: opacity .13s; }
.connections-node-halo { fill: #d3a372; stroke: none; opacity: 0; pointer-events: none; }
.connections-node-core { fill: #9caeb5; stroke: #0a1426; stroke-width: 1.4; }
.connections-node-hit { fill: transparent; stroke: none; pointer-events: all; }
.connections-node-dossier .connections-node-core { fill: #e2a474; stroke: #efd7b9; stroke-width: .8; }
.connections-node-source .connections-node-core { fill: #8baaa0; stroke: #1e3c39; stroke-width: .8; }
.connections-node-topic .connections-node-core { fill: #142433; stroke: #9fb0a9; stroke-width: 1.1; stroke-dasharray: 2 2; }
.connections-node-established .connections-node-core, .connections-node-convergences .connections-node-core { fill: #b6d4bf; stroke: #d2ead8; stroke-width: .7; }
.connections-node-uncertain .connections-node-core, .connections-node-contradictions .connections-node-core { fill: #101c2d; stroke: #e2b28d; stroke-width: 1.5; }
.connections-node.is-connected .connections-node-halo { opacity: .055; }
.connections-node.is-selected .connections-node-halo, .connections-node:focus .connections-node-halo { opacity: .14; }
.connections-node.is-selected .connections-node-core, .connections-node:focus .connections-node-core { stroke: #fff1dd; stroke-width: 1.7; }
.connections-node.is-muted { opacity: .25; }
.connections-node-label { fill: #bdcbc9; stroke: #0c1829; stroke-width: 4px; stroke-linejoin: round; paint-order: stroke fill; font-family: var(--sans); font-weight: 440; letter-spacing: .005em; pointer-events: auto; user-select: none; }
.connections-node-dossier .connections-node-label { fill: #f2e6d5; font-weight: 540; }
.connections-node-topic .connections-node-label { fill: #a9bab5; font-family: var(--mono); }
.connections-node.is-selected .connections-node-label, .connections-node:focus .connections-node-label { fill: #fff5e5; font-weight: 600; }
.connections-node-label.is-label-hidden { display: none; }
.connections-map-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 33px; padding: 9px 14px; border-top: 1px solid #26364a; flex-shrink: 0; }
.connections-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; color: #a0b0c2; font-size: .61rem; line-height: 1.3; }
.connections-legend > span::before { content: ''; display: inline-block; width: 5px; height: 5px; border: 1px solid #8d9eac; border-radius: 50%; margin-right: 5px; vertical-align: 1px; }
.connections-legend-dossier::before { background: #dfa273; border-color: #dfa273 !important; }
.connections-legend-source::before { background: #8baaa0; border-color: #8baaa0 !important; }
.connections-legend-established::before { background: #bfdcc9; border-color: #bfdcc9 !important; }
.connections-legend-uncertain::before { border-color: #ddb08a !important; }
.connections-legend-topic::before { border-style: dashed !important; }
.connections-interaction-hint { color: #8395ad; font: .58rem/1.4 var(--mono); white-space: nowrap; }
.connections-stage-foot { padding: 7px 14px; color: #acb9c8; font-size: .65rem; line-height: 1.55; flex-shrink: 0; }
.connections-more { padding: 5px 14px 9px; text-align: left; color: #d7b28a; font-size: .69rem; flex-shrink: 0; }
.connections-inspector { display: flex; flex-direction: column; min-height: 0; height: 100%; border-left: 1px solid #304056; background: #101d2f; overflow: hidden; }
.connections-inspector-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 13px 19px; border-bottom: 1px solid #324056; flex-shrink: 0; }
.connections-inspector h3 { margin: 0; color: #e0e4e1; font: 560 .92rem/1.4 var(--sans); letter-spacing: -.015em; }
.connections-inspector-close { color: #9faec1; font-size: 1.3rem; line-height: 1; padding: 1px 3px; }
.connections-inspector-body { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #4d5d70 transparent; padding: 18px 20px 24px; }
.connections-inspector-body:focus-visible { outline: 1px solid #8a765e; outline-offset: -3px; }
.connections-inspector h4 { margin: 13px 0 13px; color: #f2e8d8; font: 470 1.5rem/1.3 var(--serif); letter-spacing: -.018em; overflow-wrap: anywhere; }
.connections-inspector h5 { margin: 0 0 8px; font-size: .8rem; line-height: 1.5; font-weight: 570; color: #d9ded7; }
.connections-inspector p { margin: 11px 0; color: #b9c6d4; font-size: .77rem; line-height: 1.75; }
.connections-state-chip { display: inline-block; color: #dcb48e; border: 1px solid #725f4d; border-radius: 4px; padding: 3px 6px; font: .56rem/1.5 var(--mono); letter-spacing: .04em; }
.connections-state-established, .connections-state-convergences { color: #b3d4c4; border-color: #6b8e7c; }
.connections-state-uncertain, .connections-state-contradictions, .connections-state-topic { border-style: dashed; }
.connections-state-topic { color: #b1c2bc; border-color: #6d837c; }
.connections .connections-dates { margin: 7px 0; color: #95a8be; font: .6rem/1.75 var(--mono); overflow-wrap: anywhere; }
.connections-evidence { margin: 17px 0 20px; padding-left: 12px; border-left: 1px solid #98714f; }
.connections-evidence-label { color: #baa48b; font: .6rem/1.5 var(--mono); }
.connections-evidence blockquote { margin: 9px 0 12px; color: #e0e6df; font-size: .81rem; line-height: 1.7; }
.connections-citation { padding: 11px 0; border-bottom: 1px solid #304056; }
.connections-citation a { color: #dcb58e; font-size: .75rem; line-height: 1.65; text-decoration: underline; text-decoration-color: #7e654d; text-underline-offset: 3px; overflow-wrap: anywhere; }
.connections-citation a:hover { color: #ffdfb8; }
.connections-related-dossier { display: block; width: 100%; text-align: left; padding: 11px 0; color: #e7d4bc; font: 470 1.04rem/1.42 var(--serif); border-bottom: 1px solid #344358; }
.connections-related-dossier:hover { color: #f5bc84; }
.connections-related { margin-top: 21px; padding-top: 15px; border-top: 1px solid #344358; }
.connections-related .connections-related-dossier { border-bottom: 0; padding-bottom: 4px; }
.connections-reason-button { color: #d7ab7f; font-size: .68rem; line-height: 1.6; padding: 9px 0; text-align: left; text-decoration: underline; text-underline-offset: 3px; }
.connections-open { display: block; width: 100%; margin: 15px 0 12px; padding: 9px 12px; color: #efcfaa; border: 1px solid #a07b56; border-radius: 5px; background: #3b302655; font-size: .75rem; line-height: 1.5; text-align: left; }
.connections-open:hover { background: #61422d77; border-color: #dca16b; }
.connections .connections-caution { color: #c8ad92; font-size: .71rem; border-top: 1px solid #4c463e; padding-top: 12px; }
.connections-dossier-summary { margin: 15px 0; color: #aabbcd; font-size: .73rem; }
.connections-dossier-summary summary, .connections-watch summary { cursor: pointer; color: #cbb496; font-size: .7rem; }
.connections-watch { margin-top: 19px; color: #b4c2d1; font-size: .73rem; line-height: 1.75; }
.connections-watch ul { padding-left: 18px; }
.connections-watch li { margin: 10px 0; }
.connections-link-explanation { color: #c0ad95; font-size: .72rem; line-height: 1.7; margin-bottom: 16px; }
.connections-market { margin-top: 20px; padding: 13px; border: 1px dashed #686353; border-radius: 6px; }
.connections-market h5 { font-size: .76rem; }
.connections-market p { font-size: .7rem; }
.connections-market a { display: block; margin-top: 7px; color: #cdae88; font-size: .68rem; text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.connections-market-observation { margin-top: 14px; padding-top: 12px; border-top: 1px solid #494b47; }
.connections-market-value { display: block; color: #f0e4d2; font-size: .85rem; line-height: 1.5; font-variant-numeric: tabular-nums; }
.connections-market-state { display: inline-block; margin-top: 6px; padding: 2px 5px; border: 1px solid #776d5b; border-radius: 3px; color: #d3b797; font: .56rem/1.5 var(--mono); }
.connections-market .connections-market-delay { color: #b4a58f; font-size: .66rem; line-height: 1.7; }
.connections-market-open { display: block; width: 100%; margin-top: 14px; padding: 8px 9px; border: 1px solid #877052; border-radius: 4px; color: #e4c49f; font-size: .69rem; text-align: left; }
.connections-market-open:hover { border-color: #c59867; }
.connections-method { margin-top: 9px; color: #a0b0c4; font-size: .72rem; line-height: 1.8; max-width: 1040px; }
.connections-method summary { color: #899db5; font: .63rem/1.7 var(--mono); cursor: pointer; }
.connections-method summary:hover { color: #d4b28f; }
.connections-method p { margin: 13px 0; }
.connections-list { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; padding: 18px; }
.connections-node-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; list-style: none; margin: 0; padding: 0; }
.connections-list-item { border: 1px solid #33435b; border-radius: 7px; background: #142236; padding: 14px; }
.connections-list-kind { display: block; color: #b8a98f; font: .57rem/1.5 var(--mono); margin-bottom: 7px; }
.connections-list-title { padding: 0; color: #e2e8e2; font: 480 .93rem/1.5 var(--serif); text-align: left; }
.connections-list-title:hover { color: #edbd8c; }
.connections-relations-list { margin-top: 17px; font-size: .74rem; color: #acb9c9; }
.connections-relations-list summary { cursor: pointer; color: #d5b48e; }
.connections-relations-list ul { padding-left: 18px; }
.connections-relations-list button { padding: 8px 0; text-align: left; font-size: .7rem; line-height: 1.7; }
.connections-empty { padding: 45px 26px; color: #a4b4c8; font-size: .9rem; max-width: 600px; }
.connections.is-expanded { position: fixed; inset: 0; z-index: 80; margin: 0; padding: 13px 18px; background: #0a1426; display: flex; flex-direction: column; overflow: hidden; }
.connections.is-expanded .connections-layout { height: auto; flex: 1; min-height: 0; }
.connections.is-expanded .connections-heading { padding-top: 0; }
.connections.is-expanded .connections-method { flex-shrink: 0; }
@media (min-width: 1800px) { .connections-layout { grid-template-columns: minmax(0, 1fr) 350px; } .connections-inspector-body { padding: 21px 24px; } }
@media (max-width: 1120px) {
  .connections-layout { grid-template-columns: minmax(0, 1fr); }
  .connections-inspector { position: absolute; right: 0; top: 0; bottom: 0; z-index: 8; width: min(340px, 92%); box-shadow: -12px 0 35px #030a14aa; }
  .connections-heading-copy { gap: 12px; }
}
@media (max-width: 800px) {
  .connections { margin-left: 15px; margin-right: 15px; }
  .connections-heading-copy { display: block; }
  .connections h2 { font-size: 1.5rem; }
  .connections-heading p { margin-top: 3px; font-size: .73rem; }
  .connections-heading-meta { max-width: 190px; }
  .connections-toolbar { flex-wrap: wrap; }
  .connections-search { flex-basis: calc(50% - 5px); max-width: none; }
  .connections-picker { flex-basis: calc(50% - 5px); max-width: none; }
  .connections-zoom { flex-wrap: wrap; justify-content: flex-end; }
  .connections-stage-head { align-items: flex-start; }
  .connections-stage-title { padding-top: 4px; }
  .connections-interaction-hint { display: none; }
}
@media (max-width: 520px) {
  .connections-heading-meta { max-width: 145px; }
  .connections-stats { font-size: .58rem; }
  .connections-edition { font-size: .52rem; }
  .connections-zoom { gap: 3px; }
  .connections-zoom button { padding: 4px 5px; font-size: .58rem; }
  .connections-stage-title { max-width: 100px; font-size: .58rem; }
  .connections-node-list { grid-template-columns: minmax(0, 1fr); }
  .connections-legend { gap: 7px 10px; font-size: .56rem; }
}
@media (prefers-reduced-motion: reduce) { .connections-node, .connections-edge-line { transition: none; } }
