/* The structure graph (Structure › Graph) and the exposure flow (Dashboard › Structure), with the focus panel and the
   roll-up beneath them (public/da.js). Shared by capacity.html and structure-graph.html. */
.stackbar { display: flex; height: 10px; border-radius: 3px; overflow: hidden; background: var(--panel-2); min-width: 120px; }
.stackbar i { display: block; height: 100%; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: middle; margin-right: 4px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { border: 0; border-radius: 0; background: var(--panel); padding: 5px 10px; font-size: 12.5px; cursor: pointer; color: var(--ink-2); }
.seg button + button { border-left: 1px solid var(--line); } .seg button.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.da-orgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.da-org { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 13px; }
.da-org ul, .da-links ul { margin: 6px 0 0; padding-left: 18px; font-size: 12.5px; }
.da-links { margin-top: 10px; font-size: 13px; }
.da-crumbs { font-size: 12.5px; margin-bottom: 8px; } .da-crumbs a { color: var(--accent); }
.da-focus { border: 1px solid var(--accent); border-radius: 10px; padding: 10px 12px; background: var(--accent-soft); display: grid; gap: 6px; }
.da-kpis { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; }
.da-sides { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 10px 0 14px; }
@media (max-width: 760px) { .da-sides { grid-template-columns: 1fr; } }
.da-side-h { font-size: 11.5px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.da-rel { margin-bottom: 8px; } .da-rel-h { font-size: 12px; color: var(--ink-2); margin: 2px 0 4px; }
.da-hop { display: grid; grid-template-columns: auto 1fr; gap: 2px 6px; align-items: center; width: 100%; text-align: left; padding: 6px 8px; margin-bottom: 4px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); cursor: pointer; font-size: 12.5px; }
.da-hop:hover { border-color: var(--accent); }
.da-hop-n { grid-column: 1 / -1; color: var(--ink-2); font-size: 11.5px; } .da-hop .stackbar { grid-column: 1 / -1; }
tr.da-bind td { background: var(--warn-bg); }
.da-net { border: 1px solid var(--line); border-radius: 10px; background: var(--panel); overflow: auto; }
.da-net svg { display: block; margin: 0 auto; }
.da-net.zoomed { max-height: calc(100vh - 160px); cursor: grab; }
.da-net.zoomed.panning { cursor: grabbing; user-select: none; }
.da-zoom { display: inline-flex; vertical-align: middle; margin-right: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); overflow: hidden; }
.da-zoom button { border: none; border-radius: 0; background: none; padding: 3px 9px; font-size: 13px; min-width: 30px; color: var(--ink); cursor: pointer; }
.da-zoom button + button { border-left: 1px solid var(--line); }
.da-zoom button:hover:not(:disabled) { background: var(--panel-2); }
.da-zoom button:disabled { color: var(--ink-3); cursor: default; }
.da-zoom #dzPct { min-width: 50px; font-variant-numeric: tabular-nums; font-size: 12px; }
/* the connection map: a colour per kind of party (shape + tint) and per kind of agreement (line + arrow) */
#daNet { --p-re: var(--mock); --p-car: var(--der); --p-mga: var(--prob); --p-ret: #b4530a; --p-prog: #a3307a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) #daNet { --p-ret: #f2a065; --p-prog: #ef8cc4; } }
:root[data-theme="dark"] #daNet { --p-ret: #f2a065; --p-prog: #ef8cc4; }
#daNet .k-re { --pc: var(--p-re); } #daNet .k-car { --pc: var(--p-car); } #daNet .k-prog { --pc: var(--p-prog); } #daNet .k-mga { --pc: var(--p-mga); } #daNet .k-ret { --pc: var(--p-ret); }
#daNet .da-shape { fill: color-mix(in srgb, var(--pc) 9%, var(--panel)); stroke: var(--pc); stroke-width: 1.6; }
#daNet .da-spine { fill: var(--pc); }
#daNet .da-hole { fill: var(--panel); stroke: var(--pc); stroke-width: 1.2; }
#daNet .da-st { stroke-width: 1.4; }
#daNet .da-head { fill: var(--ink-3); } #daNet .h-re { fill: var(--p-re); } #daNet .h-car { fill: var(--p-car); } #daNet .h-prog { fill: var(--p-prog); } #daNet .h-mga { fill: var(--p-mga); } #daNet .h-ret { fill: var(--p-ret); }
#daNet .e-cap { stroke: var(--p-car); } #daNet .e-re { stroke: var(--p-re); } #daNet .e-dist { stroke: var(--p-mga); } #daNet .e-acc { stroke: var(--p-ret); }
#daNet .da-e.da-in { stroke: var(--panel); }
#daNet .ar-cap { fill: var(--p-car); } #daNet .ar-re { fill: var(--p-re); } #daNet .ar-dist { fill: var(--p-mga); } #daNet .ar-acc { fill: var(--p-ret); }
.da-net .da-e { transition: opacity .15s; }
.da-net.lit .da-e:not(.on) { opacity: .15; }
.da-net .da-e.on:not(.da-in) { filter: drop-shadow(0 0 2px color-mix(in srgb, var(--accent) 45%, transparent)); }
.da-net .da-n { cursor: grab; touch-action: none; outline: none; }
.da-net .da-n:hover .da-shape { fill: color-mix(in srgb, var(--pc) 18%, var(--panel)); }
.da-net .da-n:focus-visible .da-shape { stroke: var(--accent); stroke-width: 2.5; }
.da-net .da-n.drag { cursor: grabbing; } .da-net .da-n.drag .da-shape { filter: drop-shadow(0 3px 6px rgba(0,0,0,.18)); }
.da-legend { display: grid; gap: 4px; margin: 6px 0 10px; font-size: 12px; color: var(--ink-2); }
.da-legend > div { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }
.da-legend .lh { font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); min-width: 92px; }
.da-legend > div > span:not(.lh) { display: inline-flex; align-items: center; gap: 6px; }
.da-legend svg { overflow: visible; }
.da-legend .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }
.da-net-h { font-size: 13px; margin: 4px 0 6px; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.da-net-tools { margin-left: auto; font-size: 12px; }
.da-net-tools button.link { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font: inherit; text-decoration: underline; }
table.da-grid td.da-gx { background: var(--panel-2); }
table.da-grid th a { color: var(--accent); }
tr.da-row { cursor: pointer; } tr.da-row:hover td { background: var(--panel-2); }
.da-ok { color: var(--ok); } .da-no { color: var(--ink-3); }
details.da-plan { margin-top: 10px; } details.da-plan summary { cursor: pointer; padding: 4px 0; }
.pend { font-size: 12.5px; background: var(--warn-bg); color: var(--warn); border-radius: 6px; padding: 7px 10px; margin-bottom: 10px; }
/* exposure by seat: one row per seat, a size bar on one scale, the tightest limit as a share with a 100% line */
.ex-grid { display: grid; grid-template-columns: minmax(180px, 1.3fr) minmax(150px, 1.2fr) minmax(170px, 1.3fr) 118px 40px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.ex-row { display: contents; }
.ex-row > div { padding: 8px 10px; border-top: 1px solid var(--line); min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.ex-row[data-k] { cursor: pointer; }
.ex-row[data-k]:hover > div, .ex-row[data-k]:focus-visible > div { background: var(--panel-2); }
.ex-row[data-k]:focus-visible { outline: none; }
.ex-head > div { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); border-top: 0; padding-top: 9px; padding-bottom: 7px; }
.ex-grp { grid-column: 1 / -1; padding: 7px 10px 5px; background: var(--panel-2); border-top: 1px solid var(--line); font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); }
.ex-grp span { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--ink-3); margin-left: 6px; }
.ex-seat { flex-direction: row !important; justify-content: flex-start !important; align-items: center; gap: 8px; font-size: 13px; }
.ex-seat b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ex-seat > div { min-width: 0; }
.ex-sub { font-size: 11.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ex-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; }
.ex-bar, .ex-lim { position: relative; display: flex; height: 10px; border-radius: 3px; background: var(--panel-2); border: 1px solid var(--line); overflow: visible; }
.ex-bar i, .ex-lim i { display: block; height: 100%; border-radius: 2px; }
.ex-bar i.ex-pipe { opacity: .35; border-radius: 0 2px 2px 0; }
.ex-100 { position: absolute; top: -4px; bottom: -4px; border-left: 2px solid var(--ink); }
.ex-n { font-size: 11.5px; color: var(--ink-2); margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ex-al { color: var(--warn); font-weight: 700; text-decoration: none; font-size: 13px; }
@media (max-width: 760px) {
  .ex-grid { grid-template-columns: 1fr 1fr; }
  .ex-head { display: none; }
  .ex-row > div:nth-child(1) { grid-column: 1 / -1; border-top: 1px solid var(--line); }
  .ex-row > div:nth-child(n+2) { border-top: 0; }
  .ex-row > div:nth-child(4), .ex-row > div:nth-child(5) { padding-top: 0; }
}
