:root {
  --paper: #f4f5f0;
  --surface: #fcfcf8;
  --ink: #243a34;
  --muted: #576b61;
  --line: #d4ddd3;
  --accent: #245b70;
  --mono: "IBM Plex Mono", Consolas, monospace;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
button, [role="button"] { -webkit-tap-highlight-color: transparent; }
button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
button svg { pointer-events: none; }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }

main { max-width: 1512px; margin: auto; padding: 0 clamp(22px, 4vw, 60px); }
.masthead { display: flex; align-items: center; gap: 17px; padding: 27px 0 23px; }
.project-number {
  display: grid; grid-auto-flow: column; place-content: center;
  width: 44px; height: 44px; flex: none; background: #263e35; color: #fff;
  font: 500 18px var(--mono); letter-spacing: -1px;
}
.project-number span { color: #b8d1bf; }
.eyebrow {
  margin: 0 0 3px; color: var(--muted); font: 600 10px var(--mono);
  letter-spacing: .12em; text-transform: uppercase;
}
h1 { margin: 0; font-size: clamp(22px, 3vw, 36px); font-weight: 580; line-height: 1.07; letter-spacing: -.045em; }
.heading-note { margin: 0 0 1px auto; align-self: end; color: var(--muted); font-size: 12px; }

.ecosystem { position: relative; isolation: isolate; border: 1px solid var(--line); background: var(--surface); }
.maps {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(136px, 13vw, 182px) minmax(0, 1fr);
  padding: 0 18px 9px;
  column-gap: 11px;
  background-image: radial-gradient(#d5dfd5 0.7px, transparent 0.7px);
  background-size: 16px 16px;
}
.map-panel { min-width: 0; }
.panel-heading { height: 53px; display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.panel-heading h2 { margin: 0; font-size: 14px; font-weight: 650; }
.panel-heading > span { color: var(--muted); font: 10px var(--mono); }
.map-panel > svg { width: 100%; height: auto; display: block; overflow: visible; }
.bridge { display: grid; grid-template-rows: 53px 1fr; min-width: 0; padding-bottom: 1px; }
.bridge .panel-heading { justify-content: center; }
.bridge h2 { color: var(--muted); font: 600 10px var(--mono); letter-spacing: .05em; }
.bridge-lanes {
  position: relative; display: grid; grid-template-rows: repeat(6, minmax(30px, 1fr));
  gap: 6px; align-items: center; padding: 6px 0;
}
.bridge-lanes::before {
  content: ""; position: absolute; inset: 0 50% 0 auto;
  border-left: 1px dashed #cbd6cf; opacity: .68; pointer-events: none;
}
.active .bridge-lanes::before { opacity: .3; }
.junction, .publishing {
  position: relative; z-index: 2; align-self: center;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center; gap: 7px; min-height: 30px; width: 100%;
  font-size: 11px; line-height: 1.1; text-align: left; padding: 5px 7px;
  border: 1px solid var(--firm, #7b9297); border-radius: 4px;
  color: var(--firm, #345b66); background: var(--firm-pale, #eef4f4);
}
.junction { grid-row: var(--lane); }
@media (min-width: 761px) {
  .junction[data-org="A"] { grid-row: 4; }
  .junction[data-org="B"] { grid-row: 1; }
}
.junction .short-name { display: none; }
.junction b {
  display: grid; place-items: center; width: 17px; height: 17px;
  border: 1px solid currentColor; border-radius: 2px; font: 600 10px var(--mono);
}
.junction strong { font-weight: 650; }
.junction[aria-expanded="true"], .publishing[aria-expanded="true"] {
  color: white; background: var(--firm, #345b66);
}
.junction.is-muted { opacity: .48; }
.junction:hover, .junction:focus-visible { opacity: 1; }
.publishing { grid-row: 6; border-style: dashed; }
.publishing svg, .detail-icon {
  width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor;
  stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}

[data-org="A"] { --firm: #245e86; --firm-pale: #e9f2f8; }
[data-org="B"] { --firm: #28634b; --firm-pale: #e7f2e9; }
[data-org="C"] { --firm: #855522; --firm-pale: #f7efe1; }
[data-org="D"] { --firm: #6e4f8a; --firm-pale: #f0eaf8; }
[data-org="E"] { --firm: #764c48; --firm-pale: #f6ece8; }

.land { fill: #e6ebe2; stroke: #c8d4ca; stroke-width: .75; }
.country-focus { fill: #e1e8dd; }
.graticule { fill: none; stroke: #dfe7df; stroke-width: .65; }
.country-label { font: 10px var(--mono); letter-spacing: 2.5px; fill: #607469; }
.map-note { font-size: 10px; fill: #566b60; }
.country-group-label { font: 10px var(--mono); fill: #566b60; }
.country-group-box { fill: #f9faf5; stroke: #adbeb2; stroke-dasharray: 3 3; rx: 5; }
.office, .facility { cursor: pointer; }
.office .hit { fill: transparent; stroke: none; }
.office .office-dot { fill: var(--surface); stroke: #60766a; stroke-width: 1.5; }
.office .office-core { fill: #60766a; }
.office text, .facility-label, .facility-id {
  paint-order: stroke fill; stroke: var(--surface); stroke-width: 3px; stroke-linejoin: round;
}
.office text { font-size: 13px; font-weight: 550; fill: var(--ink); }
.office .org-letter { fill: #566b60; font: 10px var(--mono); }
.office .office-role { font-size: 10px; fill: #51655a; }
.office .leader { fill: none; stroke: #94aa9a; stroke-width: .9; }
.office .country-badge { fill: #f9faf6; stroke: #b0c0b3; rx: 3; }
.office:is(:hover, .lit, :focus-visible) .country-badge { fill: var(--firm-pale); stroke: var(--firm); }
.office:is(:hover, .lit, :focus-visible) .office-dot { stroke: var(--firm); fill: var(--firm-pale); stroke-width: 2; }
.office.lit :is(.office-core, text, .org-letter) { fill: var(--firm); }
.office.lit .leader { stroke: var(--firm); stroke-width: 1.2; }
.office:is(.map-emphasis, [aria-pressed="true"], :focus-visible) text { font-weight: 750; }
.office:is(.map-emphasis, [aria-pressed="true"], :focus-visible) :is(.country-badge, .office-dot) { stroke-width: 2.8; }

.site-plane { fill: #eff2eb; }
.site-boundary { fill: none; stroke: #b5c6b8; stroke-width: .9; }
.building-shadow { fill: #bec9bd; opacity: .4; transform: translate(7px, 15px); }
.roof { fill: #fbfcf8; stroke: #7e9484; stroke-width: 1.2; }
.wall-left { fill: #e0e7dc; stroke: #91a390; stroke-width: 1; }
.wall-right { fill: #cbd7c5; stroke: #91a390; stroke-width: 1; }
.roof-detail { fill: none; stroke: #adbcad; stroke-width: .7; }
.facility:is(:hover, .lit, :focus-visible) .roof { fill: #e1eff3; stroke: var(--accent); stroke-width: 1.8; }
.facility.lit .wall { fill: #cfdee3; stroke: #7495a4; }
.facility.lit .label-leader { stroke: var(--accent); }
.facility:is([aria-pressed="true"], :focus-visible) :is(.roof, .utility) { stroke-width: 2.8; }
.facility.lit .facility-label { font-weight: 750; fill: var(--accent); }
.roof-id { fill: #677f6e; font: 18px var(--mono); pointer-events: none; }
.label-leader { fill: none; stroke: #8b9f8f; stroke-width: .8; }
.facility-id { fill: #4c6f70; font: 11px var(--mono); }
.facility-label { fill: var(--ink); font-size: 13px; font-weight: 600; }
.utility { stroke-width: 2; stroke-dasharray: 6 4; fill: none; }
.utility-hit { stroke: transparent; stroke-width: 26; fill: none; }
.utility-junction { fill: #f8f9f6; stroke: #8c9f92; }
.infrastructure :is(.utility, .utility-junction) { visibility: hidden; pointer-events: none; }
.infrastructure:is(:hover, .lit, :focus-visible) :is(.utility, .utility-junction) { visibility: visible; }
.infrastructure:is(:hover, .lit, :focus-visible) .utility { stroke: var(--accent); stroke-width: 3; }
.north-mark { fill: #6c8071; stroke: #6c8071; stroke-width: .7; font-size: 8px; }
.north-mark text { stroke: none; }
.office:focus, .facility:focus { outline: none; }
.dimmed { opacity: .39; }

.routes { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 1; }
.route { color: var(--firm); }
.route path { fill: none; stroke: currentColor; stroke-width: 1.45; stroke-linecap: round; }
.route .terminal { fill: currentColor; stroke: var(--surface); stroke-width: 1.5; }
.route.is-muted { opacity: .21; }
.route.is-active path { stroke-width: 2; }

.diagram-caption {
  position: relative; display: flex; align-items: center; gap: 17px;
  min-height: 68px; padding: 9px 17px; border-top: 1px solid var(--line);
  background: var(--surface);
}
.selection { display: flex; align-items: center; gap: 10px; flex: 1; }
.selection-id {
  align-self: center; border: 1px solid #a9bdc2; border-radius: 3px;
  padding: 4px 6px; color: var(--accent); background: #edf4f4; font: 600 11px var(--mono);
}
.selection strong { font-size: 13px; line-height: 1.2; }
.selection p { margin: 3px 0 0; font-size: 11px; line-height: 1.3; color: var(--muted); }
.route-key { display: flex; flex-wrap: wrap; gap: 5px 18px; white-space: nowrap; font-size: 11px; color: var(--muted); }
.route-key span { display: inline-flex; align-items: center; gap: 6px; }
.route-key span::before { content: ""; width: 19px; border-top: 2px solid #4b6870; }
.icon-button {
  display: grid; place-items: center; width: 29px; height: 29px; flex: none;
  padding: 0; border: 1px solid transparent; border-radius: 4px;
  background: transparent; color: var(--muted); font-size: 21px; line-height: 1;
}
.icon-button:hover { color: var(--ink); border-color: var(--line); background: #eef2ed; }
#dismiss { margin-left: -7px; }

.overlay {
  position: fixed; margin: 0; border-radius: 6px;
  border: 1px solid #a8bbb1; background: #fffefa;
  box-shadow: 0 8px 26px #203c3426, 0 2px 5px #203c3414;
}
.detail {
  z-index: 4; width: min(318px, calc(100vw - 20px));
  border-top: 3px solid var(--firm, #456e79);
}
.detail-inner { overflow: auto; max-height: inherit; overscroll-behavior: contain; }
.detail-header {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 10px;
  padding: 10px 11px 9px 13px; border-bottom: 1px solid var(--line);
  background: var(--firm-pale, #edf3f4);
}
.detail-header h3 { margin: 2px 0 0; font-size: 15px; font-weight: 700; line-height: 1.2; color: var(--firm, #345b66); }
.detail-status { display: block; color: #4f635a; font: 10px var(--mono); }
.detail-section { padding: 9px 12px; }
.detail-section + .detail-section { border-top: 1px solid var(--line); }
.detail-section h4 { margin: 0 0 6px; font-size: 11px; font-weight: 650; color: #50675b; }
.offices-list { display: grid; gap: 4px; }
.office-group { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 5px; }
.office-group + .office-group { margin-top: 3px; }
.office-group .group-label { flex-basis: 100%; font-size: 10px; color: var(--muted); }
.office-group .group-label:empty { display: none; }
.map-ref, .badge {
  display: inline-flex; align-items: center; gap: 5px; min-height: 27px;
  border: 1px solid #d0dbd4; border-radius: 4px; padding: 4px 6px;
  background: #fcfdf9; text-align: left; font-size: 11px;
}
.map-ref b { color: var(--firm, var(--accent)); font: 600 10px var(--mono); }
.map-ref[aria-current="true"] { border-color: var(--firm); background: var(--firm-pale); }
.map-ref:hover, .badge:hover, .badge[aria-expanded="true"], .discipline:hover {
  border-color: var(--firm, var(--accent)); background: var(--firm-pale, #edf3f4);
}
.detail-note { font-size: 11px; line-height: 1.38; color: var(--muted); margin: 6px 0 0; }
.detail-note:first-child { margin-top: 0; }
.disciplines { display: grid; gap: 4px; }
.discipline {
  display: flex; align-items: center; justify-content: space-between; gap: 4px;
  border: 1px solid #d0dbd4; border-radius: 4px; background: #f9faf6;
  text-align: left; padding: 5px 7px; width: 100%; min-height: 28px; font-size: 12px; font-weight: 650;
}
.discipline[aria-expanded="true"] { color: var(--firm); background: var(--firm-pale); border-color: var(--firm); }
.chain { padding: 7px 0 5px; }
.chain-row { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.chain-row + .chain-row { margin-top: 5px; }
.chain-link { color: var(--muted); font: 12px var(--mono); }
.badge .detail-icon { width: 14px; height: 14px; color: var(--firm, var(--accent)); }
.delivery-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.delivery-grid .badge { min-height: 37px; }
.delivery-grid small { display: block; font-size: 9px; color: var(--muted); }

.popover { width: min(222px, calc(100vw - 20px)); z-index: 5; padding: 10px 11px; overflow: auto; overscroll-behavior: contain; }
.popover-heading { display: flex; align-items: center; gap: 7px; margin-bottom: 6px; }
.popover-heading .detail-icon { width: 22px; height: 22px; color: var(--firm, var(--accent)); }
.popover-heading strong { display: block; font-size: 13px; line-height: 1.15; }
.popover-heading small { color: var(--muted); font: 10px var(--mono); }
.popover p { margin: 0; font-size: 12px; line-height: 1.35; color: #435a50; }

@media (max-width: 1000px) {
  .maps { padding-inline: 11px; column-gap: 6px; }
  .panel-heading > span { font-size: 9px; }
  .junction { gap: 5px; font-size: 10px; }
}
@media (max-width: 760px) {
  main { padding: 0 10px 10px; }
  .masthead { padding: 12px 0; gap: 9px; }
  .project-number { width: 33px; height: 34px; font-size: 14px; }
  .eyebrow { font-size: 9px; }
  .heading-note { display: none; }
  .maps { grid-template-columns: 1fr; padding: 0 7px 4px; }
  .panel-heading { height: 29px; }
  .panel-heading h2 { font-size: 12px; }
  .bridge { display: block; padding: 0; }
  .bridge .panel-heading { display: none; }
  .bridge-lanes { grid-template: 35px / repeat(5, minmax(0, 1fr)); padding: 4px 0 2px; gap: 4px; }
  .bridge-lanes::before { inset: 0; border: 0; border-block: 1px dashed #cbd6cf; }
  .junction {
    grid-row: 1; grid-column: var(--lane);
    display: flex; flex-direction: column; justify-content: center; gap: 2px;
    min-height: 33px; font-size: 9px; padding: 2px; text-align: center;
  }
  .junction b { height: 11px; width: 11px; font-size: 8px; }
  .junction > span { display: none; }
  .junction .short-name { display: inline; }
  .junction .long-name { display: none; }
  .junction[data-org="A"] { grid-column: 5; }
  .junction[data-org="B"] { grid-column: 3; }
  .geography-panel .map-note { display: none; }
  .plant-panel .panel-heading > span { visibility: hidden; }
  .publishing { position: absolute; right: 0; top: calc(100% + 3px); width: auto; min-height: 23px; font-size: 10px; padding: 3px 5px; }
  .publishing svg { height: 13px; width: 13px; }
  .office text, .facility-label { font-size: 17px; }
  .office .office-role { font-size: 13px; }
  .office .org-letter, .facility-id, .country-group-label, .map-note { font-size: 12px; }
  .route path { stroke-width: 1.15; }
  .route.is-active path { stroke-width: 1.6; }
  .diagram-caption { min-height: 57px; padding: 6px 7px; gap: 9px; }
  .selection { gap: 5px; }
  .selection strong { font-size: 12px; }
  .selection p { font-size: 10px; }
  .selection-id { padding: 3px; font-size: 9px; }
  .route-key { display: grid; gap: 3px; font-size: 9px; }
  .route-key span { gap: 4px; }
  .route-key span::before { width: 12px; }
  .detail { width: min(250px, calc(100vw - 20px)); }
  .detail-header { align-items: center; padding: 5px 7px 5px 9px; }
  .detail-header h3 { font-size: 13px; }
  .detail-header .icon-button { min-height: 25px; min-width: 25px; width: 25px; height: 25px; }
  .detail-status { font-size: 9px; }
  .detail-section { padding: 6px 8px; }
  .detail-section h4 { margin-bottom: 4px; }
  .office-group .group-label { font-size: 9px; }
  .chain { padding: 4px 0 1px; }
  .detail-note { font-size: 10px; }
}
@media (max-width: 350px) {
  .junction { font-size: 8.5px; letter-spacing: -.03em; }
}
@media (max-width: 760px) and (min-width: 500px) {
  .map-panel > svg { max-height: min(35vh, 275px); }
}
@media (pointer: coarse) {
  .discipline, .map-ref, .badge { min-height: 35px; }
  .icon-button { min-width: 34px; min-height: 34px; }
}

