/* Request 603: the provider-network map (/network/). The site is dark under both colour-scheme settings (#407), so the
   map is too; its colours are tokens in this one block. Node groups: a categorical order checked for colour-blind
   separation on the dark surface (dataviz validator: all checks pass); edge modes: red / magenta / grey. */
.net {
  --n-surface: var(--surface); --n-ink: var(--ink); --n-muted: var(--muted); --n-line: var(--line);
  --g-acute: #9085e9; --g-urgent: #d95926; --g-office: #199e70; --g-post: #c98500; --g-ems: #3987e5;
  --m-emergency: #e66767; --m-scheduled: #d55181; --m-other: #8b93a7; --e-solid: #c3c2b7;
}
.net { color: var(--n-ink); }
.net-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 16px; }
.net-tabs { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--n-line); border-radius: 12px; background: var(--n-surface); }
.net-tabs [role="tab"] { min-height: 44px; padding: 8px 14px; border: 0; border-radius: 8px; background: transparent; color: var(--n-muted); font: 600 14px/1.2 var(--sans); cursor: pointer; }
.net-tabs [role="tab"][aria-selected="true"] { background: var(--n-ink); color: var(--n-surface); }
.net-tabs [role="tab"]:focus-visible, .net .edge:focus-visible, .net .node:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.net-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 18px; padding: 0; font-size: 13.5px; color: var(--n-muted); }
.net-legend li { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.net-legend b { color: var(--n-ink); font: 600 12px/1 var(--mono); }
.net-legend .sw { width: 44px; height: 12px; flex: none; }
.net-legend .sw.dot { width: 18px; height: 18px; }
.net-legend line { stroke-width: 2; stroke: var(--m-other); }
.net-legend .lg-thick { stroke: var(--e-solid); stroke-width: 8; stroke-linecap: round; }
.net-legend .lg-solid { stroke: var(--e-solid); stroke-width: 3; }
.net-legend .lg-planned { stroke: var(--m-other); }
.net-legend .m-emergency { stroke: var(--m-emergency); }
.net-legend .m-scheduled { stroke: var(--m-scheduled); }

.net-panel { margin: 0 0 32px; }
.net-panel .panel-title { font-size: clamp(1.25rem, 1rem + 1vw, 1.625rem); margin: 0 0 12px; }
.js .net-panel .panel-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.net-stage { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .js .net-stage { grid-template-columns: minmax(0, 560px) minmax(0, 1fr); align-items: start; } }
.net-fig { margin: 0; padding: 12px; border: 1px solid var(--n-line); border-radius: var(--r); background: var(--n-surface); }
.net-fig figcaption { font-size: 13px; color: var(--n-muted); margin-top: 6px; }
.net-svg { display: block; width: 100%; height: auto; max-width: 560px; margin: 0 auto; }

.net .node circle { stroke-width: 2; }
.net .node .glyph { font: 700 11px/1 var(--mono); fill: var(--n-ink); text-anchor: middle; pointer-events: none; }
.net .node .name { font: 500 12.5px/1 var(--sans); fill: var(--n-ink); text-anchor: middle; paint-order: stroke; stroke: var(--n-surface); stroke-width: 4px; stroke-linejoin: round; }
/* phones: after the base font rules, so it wins (cloud ef43adb5) */
@media (max-width: 600px) { .net-fig { padding: 6px; } .net .node .name { font-size: 15px; } .net .node .glyph { font-size: 12px; } }
.net .node.external circle { stroke-dasharray: 4 3; }
.net .node:hover circle, .net .node.is-on circle { stroke-width: 4; }
.net .node.is-dim, .net .edge.is-dim { opacity: .28; }
.net .g-acute { fill: color-mix(in srgb, var(--g-acute) 26%, var(--n-surface)); stroke: var(--g-acute); }
.net .g-urgent { fill: color-mix(in srgb, var(--g-urgent) 26%, var(--n-surface)); stroke: var(--g-urgent); }
.net .g-office { fill: color-mix(in srgb, var(--g-office) 26%, var(--n-surface)); stroke: var(--g-office); }
.net .g-post { fill: color-mix(in srgb, var(--g-post) 26%, var(--n-surface)); stroke: var(--g-post); }
.net .g-ems { fill: color-mix(in srgb, var(--g-ems) 26%, var(--n-surface)); stroke: var(--g-ems); }

.net .edge { cursor: pointer; }
.net .edge path { fill: none; }
.net .edge .hit { stroke: transparent; stroke-width: 16; }
.net .edge .line { stroke: var(--m-other); stroke-linecap: round; }
.net .edge.planned .line { stroke-dasharray: 5 4; }
.net .edge.planned.m-emergency .line { stroke: var(--m-emergency); }
.net .edge.planned.m-scheduled .line { stroke: var(--m-scheduled); }
.net .edge.solid .line { stroke: var(--e-solid); }
/* highlight: dashed lines thicken; solid lines keep their count-based width attribute and glow instead */
.net .edge.planned:hover .line, .net .edge.planned.is-on .line { stroke-width: 3; }
.net .edge.solid:hover .line, .net .edge.solid.is-on .line { filter: drop-shadow(0 0 3px var(--n-ink)); }
.net .e-count { pointer-events: none; }
.net .e-count rect { fill: var(--n-surface); stroke: var(--e-solid); stroke-width: 1.5; }
.net .e-count text { font: 700 11px/1 var(--mono); fill: var(--n-ink); text-anchor: middle; }
.net .mk path { fill: var(--m-other); }
.net .mk-solid path { fill: var(--e-solid); }
.net .mk-emergency path { fill: var(--m-emergency); }
.net .mk-scheduled path { fill: var(--m-scheduled); }
.net .walker { fill: var(--n-ink); stroke: var(--n-surface); stroke-width: 3; }

.net-cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.js .net-cards { display: block; }
.js .net-cards .org-card { display: none; }
.js .net-cards .org-card.is-open { display: block; }
.js .net-cards::before { content: "Tap a site in the diagram to see who it is."; color: var(--n-muted); font-size: 14px; }
.js .net-cards.has-open::before { content: none; }
.org-card { padding: 16px 18px; border: 1px solid var(--n-line); border-radius: var(--r); background: var(--n-surface); }
.org-card h3 { font-size: 1.125rem; margin: 0 0 10px; }
.org-card dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 14px; margin: 0; font-size: 14.5px; }
.org-card dt { color: var(--n-muted); }
.org-card dd { margin: 0; }
.org-card p { font-size: 14.5px; margin: 12px 0 0; }
.org-card .ring { display: block; width: 100%; max-width: 460px; height: auto; margin: 10px auto 0; }
.ring .chords path { fill: none; stroke: var(--e-solid); opacity: .8; }
.ring .sites circle { fill: var(--g-urgent); }
.ring .sites text { font: 500 13px/1 var(--sans); fill: var(--n-ink); }
.ring .sites .no { display: none; font: 700 20px/1 var(--mono); }
.org-card .sites-list { columns: 2; margin: 8px 0 0; padding-left: 1.6em; }
@media (max-width: 600px) { .ring .sites .nm { display: none; } .ring .sites .no { display: inline; } }

.net-journeys { margin: 8px 0 32px; }
.net-journeys > h2, .net-table > h2 { font-size: clamp(1.375rem, 1rem + 1vw, 1.875rem); margin: 0 0 8px; }
.net-journeys > p { color: var(--n-muted); margin: 0 0 16px; }
.net-journeys { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.net-journeys > h2, .net-journeys > p { grid-column: 1 / -1; }
.journey { padding: 16px 18px; border: 1px solid var(--n-line); border-radius: var(--r); background: var(--n-surface); }
.journey h3 { font-size: 1.0625rem; margin: 0 0 4px; }
.journey .tag { display: inline-block; font-size: 12.5px; color: var(--n-muted); border: 1px dashed var(--n-muted); border-radius: 999px; padding: 2px 10px; margin: 0 0 10px; }
.journey ol { margin: 0 0 12px; padding-left: 1.3em; font-size: 14.5px; }
.journey li { margin: 0 0 6px; }
.journey li[aria-current="step"] { color: var(--n-ink); font-weight: 600; }
.journey li[aria-current="step"]::marker { color: var(--g-acute); }

.net-table { margin: 0 0 24px; }
.js .net-table:not(.is-open) { display: none; }
.js .net.table-mode .net-map, .js .net.table-mode .net-legend { display: none; }
.net-table .tablewrap { overflow-x: auto; margin: 0 0 20px; border: 1px solid var(--n-line); border-radius: var(--r); background: var(--n-surface); }
.net-table table { width: 100%; border-collapse: collapse; font-size: 14px; }
.net-table caption { text-align: left; font-weight: 700; padding: 12px 14px 4px; }
.net-table th, .net-table td { text-align: left; vertical-align: top; padding: 8px 14px; border-top: 1px solid var(--n-line); }
.net-table th { color: var(--n-muted); font-weight: 600; }
.net-cta { margin-top: 24px; }
.net-cta h2 { font-size: clamp(1.375rem, 1rem + 1vw, 1.875rem); }
@media (prefers-reduced-motion: reduce) { .net .walker { transition: none; } }
