/* Network uses the dashboard's navy/gold palette and fits beneath its live header. */
html:has(body.on-network), body.on-network { overflow: hidden; }
body.on-network .ftr { display: none; }
body.on-network .bt-fab { bottom: 16px; right: 18px; width: 44px; height: 44px; }
body.on-network .bt-fab .bt-mark { width: 30px; }
.net-page { height: calc(100dvh - var(--bt-hdr, var(--hdr-h))); display: flex; flex-direction: column; color: var(--ink); }
.net-heading { flex: none; min-height: 85px; padding: 16px 26px; display: flex; justify-content: space-between; align-items: center; gap: 16px; background: #fff; border-bottom: 1px solid var(--line); }
.net-eyebrow { color: var(--ink-2); font-size: 10px; letter-spacing: .15em; font-weight: 700; text-transform: uppercase; }
.net-eyebrow i { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--gold-500); vertical-align: 1px; }
.net-heading > div:first-child { flex: none; }
.net-heading h1 { margin: 2px 0 0; font-size: 23px; line-height: 1.2; white-space: nowrap; }
.net-heading h1 span { font-weight: 500; margin-left: 5px; }
.net-heading-tools { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 10px 16px; font-size: 12px; }
.net-heading label { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.net-heading input { accent-color: var(--navy-700); }
.net-heading select { max-width: 170px; padding: 8px; border-radius: 7px; border: 1px solid var(--line); color: var(--ink); font: inherit; background: #fff; }
.net-demo { color: var(--warn-ink); background: var(--gold-100); border: 1px solid #e9d59c; border-radius: 20px; padding: 6px 10px; font-size: 10px; font-weight: 700; white-space: nowrap; }
/* Location: a navy pill with a gold pin, a native select that keeps its keyboard and screen-reader behaviour,
 * and a gold badge with the live supplier count. */
.net-loc { display: inline-flex; align-items: center; gap: 8px; padding: 5px 6px 5px 6px; border-radius: 16px; background: linear-gradient(120deg, #0d2b49 0%, #1f5f9c 100%); box-shadow: 0 6px 16px rgba(13, 43, 73, .28); transition: box-shadow .25s, transform .25s; }
.net-loc:hover { box-shadow: 0 10px 24px rgba(13, 43, 73, .36); transform: translateY(-1px); }
.net-loc:focus-within { outline: 2px solid var(--gold-400); outline-offset: 2px; }
.net-loc-pin { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 50%; color: var(--navy-900); background: var(--gold-500); box-shadow: 0 0 0 3px rgba(233, 179, 42, .25); }
.net-loc label { display: flex; align-items: center; gap: 8px; color: #fff; }
.net-loc label small { font-size: 9px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #bcd4ec; }
.net-loc select { appearance: none; -webkit-appearance: none; max-width: 200px; padding: 7px 30px 7px 11px; border: 1px solid rgba(255, 255, 255, .28); border-radius: 10px; background: rgba(255, 255, 255, .1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23ffd66b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 11px center / 12px 8px; color: #fff; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.net-loc select:hover { background-color: rgba(255, 255, 255, .18); }
.net-loc select option { color: var(--ink); background: #fff; font-weight: 500; }
.net-loc-count { padding: 4px 10px; border-radius: 20px; background: var(--gold-500); color: var(--navy-900); font-size: 10px; font-weight: 800; letter-spacing: .02em; white-space: nowrap; font-variant-numeric: tabular-nums; }
/* Theater picker: four icon tiles. Each has its own accent, and a dot for the theater's dashboard status. */
.net-theater { display: flex; gap: 4px; padding: 4px; background: #eef3f9; border: 1px solid #d6e0ec; border-radius: 14px; }
.net-theater button { --accent: #3f86c5; display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px 4px 4px; font: inherit; font-size: 11px; font-weight: 800; letter-spacing: .04em; color: var(--ink-2); background: transparent; border: 1px solid transparent; border-radius: 10px; cursor: pointer; transition: background .2s, border-color .2s, box-shadow .2s; }
.net-theater button.rocky { --accent: #3f86c5; } .net-theater button.sandy { --accent: #d08a1c; }
.net-theater button.rainy { --accent: #5b7da8; } .net-theater button.africom { --accent: #2f9a78; }
.net-theater-mark { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 8px; color: var(--accent); background: color-mix(in srgb, var(--accent) 15%, #fff); }
.net-theater button:hover { background: #fff; border-color: color-mix(in srgb, var(--accent) 50%, #fff); }
.net-theater button[aria-checked="true"] { color: #fff; background: var(--accent); box-shadow: 0 4px 12px color-mix(in srgb, var(--accent) 45%, transparent); }
.net-theater button[aria-checked="true"] .net-theater-mark { background: #fff; }
.net-theater-dot { width: 9px; height: 9px; border-radius: 50%; background: #b9c4d0; box-shadow: 0 0 0 2px #fff; }
.net-theater button[data-tone="ok"] .net-theater-dot { background: var(--ok); }
.net-theater button[data-tone="warn"] .net-theater-dot { background: var(--warn); }
.net-theater button[data-tone="crit"] .net-theater-dot { background: var(--crit); }
.net-theater button:focus-visible { outline: 2px solid var(--blue-500); outline-offset: 2px; }
.net-workspace { display: grid; grid-template-columns: minmax(0, 1fr) 350px; flex: 1; min-height: 0; }
.net-canvas-wrap { position: relative; min-width: 0; min-height: 0; background-color: #f1f5fa; background-image: radial-gradient(#b4c6da 1px, transparent 1px); background-size: 19px 19px; }
.net-canvas { position: absolute; inset: 0 0 70px; overflow: auto; overscroll-behavior: contain; }
.net-canvas svg { display: block; max-width: none; user-select: none; }
/* Column headings: a plate with an accent bar, a numbered badge, a name and a count. */
.net-col-head.owner { --tone: #8a97a6; }
.net-col-head.tier2 { --tone: #5aa0dd; }
.net-col-head.tier1 { --tone: #317bc1; }
.net-col-head.site { --tone: #c99a2e; }
.net-col-plate { fill: #fff; stroke: #d3dfeb; stroke-width: 1; }
.net-col-bar { fill: var(--tone); }
.net-col-badge { fill: var(--tone); }
.net-col-num { fill: #fff; font-size: 11px; font-weight: 800; text-anchor: middle; pointer-events: none; }
.net-col-label { fill: var(--ink); font-size: 12px; font-weight: 800; letter-spacing: .02em; }
.net-col-count { fill: var(--ink-2); font-size: 10px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
/* Links: the colour says what the link is. Ownership (slate) is drawn as thick as the share; supply is blue,
 * support for a site is gold, and a single-source dependency is dashed amber. */
.net-line { stroke: #9aafc6; stroke-width: 1.6; fill: none; }
.net-edge.owns .net-line { stroke: #5b6f86; stroke-width: var(--w, 2px); }
.net-edge.supplies .net-line { stroke: #317bc1; stroke-width: 2px; }
.net-edge.supports .net-line { stroke: #c99a2e; stroke-width: 2.2px; }
.net-edge.sole .net-line { stroke: #d97706; stroke-width: 2.8px; stroke-dasharray: 7 4; }
.net-edge.chosen .net-line { stroke: var(--navy-700); stroke-width: calc(var(--w, 2px) + 1.8px); stroke-dasharray: none; }
.net-edge.dim, .net-card.dim { opacity: .14; }
.net-hit { stroke: transparent; stroke-width: 14; fill: none; cursor: pointer; }
.net-edge-label { pointer-events: none; }
.net-edge-label rect { fill: #5b6f86; }
.net-edge-label text { font-size: 10px; fill: #fff; font-weight: 800; text-anchor: middle; }
.net-card { cursor: pointer; outline: none; }
.net-canvas[data-layout="free"] .net-card { touch-action: none; cursor: grab; }
.net-canvas[data-layout="free"] .net-card:active { cursor: grabbing; }
.net-card-bg { fill: #fff; stroke: #c2d0df; stroke-width: 1; }
.net-card:hover .net-card-bg, .net-card:focus-visible .net-card-bg { stroke: var(--blue-500); stroke-width: 2.5; }
.net-card.selected .net-card-bg { stroke: var(--navy-700); stroke-width: 3; fill: #e8f1fb; }
.net-card.target .net-card-bg { stroke: var(--gold-500); stroke-width: 3; stroke-dasharray: 6 3; }
.net-card-name { fill: var(--ink); font-size: 11.5px; font-weight: 700; pointer-events: none; }
.net-card-sub { fill: var(--ink-2); font-size: 10px; pointer-events: none; }
/* Cards carry their tier colour on the stripe and the badge, and their risk as three rising bars. */
.net-card { --tone: var(--tone-owner); }
.net-card.tier2 { --tone: var(--tone-tier2); } .net-card.tier1 { --tone: var(--tone-tier1); } .net-card.site { --tone: var(--tone-site); }
.net-stripe { fill: var(--tone); }
.net-card.high .net-card-bg { fill: #fff9f6; stroke: #e3b3a2; }
.net-card.site .net-card-bg { fill: #fff9e9; stroke: #ddc78e; }
.net-card.representative .net-card-bg { fill: #f6f8fa; stroke: #b7c4d2; stroke-dasharray: 5 4; }
.net-badge { color: #fff; }
.net-badge-bg { fill: var(--tone); }
.net-card.representative .net-badge-bg { fill: #b7c4d2; }
.net-badge-num { fill: #fff; font-size: 12px; font-weight: 800; text-anchor: middle; pointer-events: none; }
.net-sole-ring { fill: none; stroke: #d97706; stroke-width: 2; stroke-dasharray: 3 2.5; }
.net-pips rect { fill: #d9e1eb; }
.net-pips.low rect.on { fill: var(--ok); } .net-pips.medium rect.on { fill: var(--warn); } .net-pips.high rect.on { fill: var(--crit); }
/* Legend: swatches for the four tiers and a line sample for each kind of link. */
.net-legend { position: absolute; left: 18px; bottom: 76px; display: grid; gap: 7px; padding: 8px 12px; background: #ffffffef; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-1); pointer-events: none; font-size: 10px; font-weight: 500; color: var(--ink-2); }
.lg-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
.lg-node, .lg-line { display: inline-flex; align-items: center; gap: 6px; }
.lg-node i { width: 11px; height: 11px; border-radius: 3px; background: var(--tone); }
.lg-node.owner { --tone: var(--tone-owner); } .lg-node.tier2 { --tone: var(--tone-tier2); } .lg-node.tier1 { --tone: var(--tone-tier1); } .lg-node.site { --tone: var(--tone-site); }
.lg-line svg path { fill: none; stroke: currentColor; stroke-width: 2.2px; }
.lg-line svg path:last-child { fill: currentColor; stroke: none; }
.lg-line.owns { color: #5b6f86; } .lg-line.supplies { color: #317bc1; } .lg-line.supports { color: #c99a2e; } .lg-line.sole { color: #d97706; }
.lg-line.sole svg path:first-child { stroke-dasharray: 5 3; stroke-width: 2.8px; }
.net-controls { position: absolute; inset: auto 0 0; min-height: 64px; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #f5f8fcef; border-top: 1px solid var(--line); }
.net-controls [role="group"] { display: flex; padding: 3px; border: 1px solid #cfdae7; border-radius: 30px; background: #fff; }
.net-controls a, .net-controls button { padding: 7px 12px; font-size: 11px; font-weight: 700; background: transparent; color: var(--ink); border: 0; border-radius: 22px; cursor: pointer; white-space: nowrap; }
.net-controls button[aria-pressed="true"] { background: var(--navy-700); color: #fff; }
.net-controls button:hover, .net-controls a:hover { background: var(--gold-100); color: var(--ink); }
.net-sidebar { background: #fff; border-left: 1px solid var(--line); overflow-y: auto; overscroll-behavior: contain; padding-bottom: 65px; }
.net-sidebar-head { padding: 20px; border-bottom: 1px solid var(--line); }
.net-sidebar-head > .net-eyebrow { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 20px; background: var(--navy-700); color: #fff; }
.net-sidebar-head > .net-eyebrow::before { content: '→'; font-size: 12px; letter-spacing: 0; }
.net-sidebar h2 { font-size: 25px; margin: 3px 0 5px; }
.net-sidebar p { font-size: 12px; line-height: 1.6; color: var(--ink-2); margin: 6px 0 12px; }
.net-sidebar label { display: block; font-size: 11px; font-weight: 600; margin: 12px 0 6px; }
.net-sidebar input[type="search"] { width: 100%; padding: 10px 11px; border: 1px solid #cbd7e4; border-radius: 8px; color: var(--ink); background: #f8fafc; font: inherit; font-size: 12px; }
.net-sidebar button { cursor: pointer; }
.net-sidebar input:focus-visible, .net-sidebar button:focus-visible, .net-controls :focus-visible { outline: 2px solid var(--blue-500); outline-offset: 2px; }
#net-results button, #net-connect-results button, .net-owner-list button { display: flex; flex-direction: column; gap: 3px; text-align: left; width: 100%; padding: 10px 0; border: 0; border-bottom: 1px solid var(--line); background: #fff; color: var(--ink); font-size: 12px; }
#net-results button:hover, #net-connect-results button:hover, .net-owner-list button:hover { color: var(--blue-600); }
#net-results span, #net-connect-results span, .net-owner-list span { font-size: 10px; color: var(--ink-2); }
.net-intro, .net-owner-list, .net-profile, .net-steps { padding: 18px 20px; }
.net-intro { border-bottom: 1px solid var(--line); }
.net-intro-mark { width: 34px; height: 34px; border-radius: 9px; background: var(--gold-100); color: var(--warn-ink); display: grid; place-items: center; font-size: 25px; margin-bottom: 12px; }
.net-sidebar h3 { margin: 0 0 8px; font-size: 14px; line-height: 1.4; }
.net-owner-list h3, .net-steps h3 { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.net-steps h3 span { display: inline-block; min-width: 22px; margin-left: 4px; padding: 1px 7px; border-radius: 20px; background: var(--navy-700); color: #fff; text-align: center; letter-spacing: 0; }
/* How much of the network is on screen, as counts with a bar. */
#net-summary { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px 18px; margin: 10px 0 14px; font-size: 12px; color: var(--ink-2); }
.net-count { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 2px 4px; }
.net-count b { font-size: 17px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.net-bar { flex-basis: 100%; display: block; height: 5px; margin-top: 4px; background: #e3eaf2; border-radius: 3px; overflow: hidden; }
.net-bar i { display: block; height: 100%; background: var(--tone-tier1); border-radius: 3px; }
/* An owner's reach as two counters: suppliers and sites. */
.net-mini { display: inline-flex; align-items: center; gap: 12px; margin-top: 2px; }
.net-mini i { display: inline-flex; align-items: center; gap: 5px; font-style: normal; font-size: 12px; font-weight: 800; color: var(--ink); }
.net-mini i:nth-child(1) .gl-ic { color: var(--tone-tier1); } .net-mini i:nth-child(2) .gl-ic { color: var(--tone-site); }
.net-mini > .gl-ic { margin-left: auto; color: var(--ink-3); }
/* A search result's type, as a colour swatch beside its place. */
.net-meta { display: inline-flex; align-items: center; gap: 6px; }
.net-meta small { margin-left: 4px; font-size: 10px; color: var(--ink-3); }
.net-swatch { flex: none; width: 10px; height: 10px; border-radius: 3px; background: var(--tone-owner); }
.net-swatch.tier2 { background: var(--tone-tier2); } .net-swatch.tier1 { background: var(--tone-tier1); } .net-swatch.site { background: var(--tone-site); }
/* An entity as a chip, in its tier's colour. */
.net-chip { --tone: var(--tone-owner); display: inline-flex; align-items: center; gap: 6px; min-width: 0; padding: 3px 10px 3px 3px; font-size: 10.5px; font-weight: 700; color: var(--ink); background: color-mix(in srgb, var(--tone) 10%, #fff); border: 1px solid color-mix(in srgb, var(--tone) 40%, #fff); border-radius: 20px; }
.net-chip.tier2 { --tone: var(--tone-tier2); } .net-chip.tier1 { --tone: var(--tone-tier1); } .net-chip.site { --tone: var(--tone-site); }
.net-chip i { flex: none; display: grid; place-items: center; width: 18px; height: 18px; font-style: normal; font-size: 10px; font-weight: 800; color: #fff; background: var(--tone); border-radius: 50%; }
.net-chip > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.net-profile { position: relative; }
.net-profile h3 { font-size: 19px; margin-top: 6px; padding-right: 12px; }
.net-clear { position: absolute; right: 14px; top: 12px; border: 0; background: none; font-size: 24px; color: var(--ink-2); }
.net-profile-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.net-profile-links a, .net-profile-links button { display: inline-block; font: inherit; font-size: 10px; font-weight: 700; color: var(--navy-700); background: #edf3fb; padding: 6px 9px; border: 1px solid #cedeed; border-radius: 5px; }
.net-profile .ladder { width: calc(100% - 28px); margin: 6px 0 12px; }
.net-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 6px; margin: 4px 0 2px; }
.net-tags .risk-meter { margin-right: 6px; }
.net-notice { display: grid; gap: 3px; margin: 12px 0; padding: 10px 12px; border: 1px solid #e9d59c; border-radius: 8px; background: repeating-linear-gradient(135deg, #fff9eb 0 10px, #fff4da 10px 20px); font-size: 11px; line-height: 1.5; color: #6b4b00; }
.net-notice b { font-size: 9px; letter-spacing: .16em; text-transform: uppercase; color: #8a5d00; }
.net-basis { margin: 12px 20px; padding: 10px; color: var(--ink-2); font-size: 10px; background: #fff9eb; border-left: 2px solid var(--gold-500); }
.net-profile .net-basis { margin: 12px 0; }.net-basis p { font-size: 10px; }.net-basis a { display: block; margin-top: 7px; text-decoration: underline; }
.net-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 20px; }
.net-metrics div { border: 1px solid var(--line); border-top: 3px solid var(--gold-500); border-radius: 7px; padding: 10px; }
.net-metrics div.sites { border-top-color: var(--navy-700); }
.net-metrics div.hops { border-top-color: #317bc1; }
.net-metrics div.deps { border-top-color: #5aa0dd; }
.net-metrics div.sole { border-top-color: #b47a04; }
.net-metrics b { display: block; font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }.net-metrics span { display: block; font-size: 10px; color: var(--ink-2); }
.net-connection { padding: 10px; background: #edf3fb; font-size: 11px; border-radius: 7px; margin-top: 12px; }.net-connection button { border: 0; background: none; color: var(--navy-700); font-size: 11px; text-decoration: underline; }
.net-pair { display: flex; align-items: center; gap: 8px; }
.net-pair .net-chip { flex: 1; }
.net-both { flex: none; display: inline-flex; color: var(--ink-3); }
.net-steps ol { list-style: none; padding: 0; margin: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.net-steps li { border-bottom: 1px solid var(--line); padding: 10px; }.net-steps li:last-child { border: 0; }.net-steps li.chosen { background: #edf3fb; }
/* One step of a trace: the two entities as chips, with the relationship drawn as an arrow between them. */
.net-step { width: 100%; display: grid; grid-template-columns: 20px 56px minmax(0, 1fr); grid-template-areas: "no a a" "no rel b"; align-items: center; gap: 5px 7px; text-align: left; border: 0; padding: 0; color: var(--ink); background: none; font-size: 11px; }
.net-step > :nth-child(1) { grid-area: no; align-self: start; }
.net-step > :nth-child(2) { grid-area: a; justify-self: start; max-width: 100%; }
.net-step > :nth-child(3) { grid-area: rel; }
.net-step > :nth-child(4) { grid-area: b; justify-self: start; max-width: 100%; }
.net-step-no { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--surface-2); color: var(--ink-2); font-size: 10px; font-weight: 800; }
.net-rel { display: grid; justify-items: center; gap: 1px; color: #5b6f86; }
.net-rel svg { width: 100%; height: 14px; overflow: visible; }
.net-rel path:first-child { fill: none; stroke: currentColor; stroke-width: var(--w, 2px); }
.net-rel path:last-child { fill: currentColor; stroke: none; }
.net-rel.supplies { color: #317bc1; } .net-rel.supports { color: #c99a2e; } .net-rel.sole { color: #d97706; }
.net-rel.sole path:first-child { stroke-dasharray: 5 3; stroke-width: 2.6px; }
.net-rel.rev svg { transform: scaleX(-1); }
.net-rel em { font-style: normal; font-size: 9px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.net-steps details { font-size: 10px; margin: 8px 0 0 26px; color: var(--ink-2); }.net-steps summary { cursor: pointer; }.net-steps details p { font-size: 10px; }
.net-synth { display: inline-block; margin-right: 7px; padding: 1px 7px; border-radius: 20px; background: var(--gold-100); color: #7a5200; font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.net-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
@media (max-width: 1300px) { .net-demo { display: none; } }
/* On narrower screens only the current theater keeps its name; the other tiles shrink to their icon. */
@media (max-width: 1100px) { .net-theater button b { display: none; }.net-theater button[aria-checked="true"] b { display: inline; }.net-heading-tools { gap: 9px; }.net-demo { display: none; }.net-workspace { grid-template-columns: minmax(0, 1fr) 320px; }.net-controls { gap: 5px; padding-inline: 8px; }.net-controls a, .net-controls button { padding-inline: 8px; } }
@media (max-width: 760px) {
  html:has(body.on-network), body.on-network { overflow: auto; }
  .net-page { height: auto; min-height: calc(100dvh - var(--bt-hdr, var(--hdr-h))); }
  .net-heading { padding: 14px 16px; align-items: flex-start; flex-direction: column; gap: 10px; }
  .net-heading-tools { width: 100%; flex-direction: column; align-items: stretch; gap: 8px; }
  .net-loc { width: 100%; }.net-loc label { flex: 1; min-width: 0; display: grid; gap: 3px; }.net-loc select { width: 100%; max-width: none; }.net-heading select { max-width: none; }
  .net-workspace { display: flex; flex-direction: column; }.net-canvas-wrap { height: 62dvh; min-height: 390px; flex: none; }
  .net-canvas { bottom: 105px; }.net-controls { min-height: 94px; flex-wrap: wrap; justify-content: center; }
  .net-legend { bottom: 108px; left: 8px; right: 8px; gap: 6px; padding: 6px 9px; font-size: 9px; }.net-sidebar { border-left: 0; border-top: 1px solid var(--line); overflow: visible; }
}
