/* BBNET / HL – static site stylesheet */
:root {
  --bg: #f3f5f8;
  --surface: #ffffff;
  --text: #1c2430;
  --muted: #5b6676;
  --border: #dde2e9;
  --brand: #10345c;
  --brand-2: #1b4c80;
  --brand-ink: #ffffff;
  --accent: #c8102e;
  --link: #0b5cad;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.08);
  --maxw: 1280px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f141b;
    --surface: #171e27;
    --text: #e4e8ee;
    --muted: #9aa5b4;
    --border: #2a3441;
    --brand: #0c2542;
    --brand-2: #133a63;
    --link: #6cb2ff;
    --accent: #ff4d63;
    --shadow: none;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--link); }
a:hover { text-decoration-thickness: 2px; }
img { max-width: 100%; height: auto; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 100; }

/* Header: the original banner logo, always on white (it is drawn for a white background) */
.site-header { background: #fff; border-bottom: 1px solid #e5e8ec; }
.site-header .wrap { display: flex; justify-content: center; padding-top: 10px; padding-bottom: 10px; }
.logo { display: block; line-height: 0; }
.logo img { display: block; width: 976px; max-width: 100%; height: auto; }

/* Menu bar */
.menubar { background: linear-gradient(180deg, var(--brand-2), var(--brand)); color: var(--brand-ink);
  border-bottom: 3px solid var(--accent); position: sticky; top: 0; z-index: 40; }
.menubar .wrap { display: flex; align-items: center; min-height: 48px; }
.nav-toggle { display: none; background: none; border: 1px solid rgba(255,255,255,.4); color: inherit;
  border-radius: 8px; padding: 6px 12px; margin: 6px 0; font: inherit; cursor: pointer; }
.nav { width: 100%; }
.nav > ul { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; flex-wrap: wrap; gap: 2px; }
.nav li { position: relative; }
.nav a, .nav .nav-label { display: block; padding: 12px 14px; color: var(--brand-ink); text-decoration: none;
  font-size: .95rem; font-weight: 500; white-space: nowrap; }
.nav > ul > li > a:hover, .nav > ul > li:hover > .nav-label, .nav > ul > li:focus-within > .nav-label { background: rgba(255,255,255,.12); }
.nav > ul > li.is-active > a, .nav > ul > li.is-active > .nav-label { box-shadow: inset 0 -3px 0 #fff; }
.nav > ul > li > .nav-label::after { content: ""; display: inline-block; margin-left: 6px; vertical-align: 2px;
  border: 4px solid transparent; border-top-color: currentColor; border-bottom: 0; }
.nav ul ul { list-style: none; margin: 0; padding: 6px; position: absolute; left: 0; top: 100%; z-index: 50;
  min-width: 280px; background: var(--surface); border: 1px solid var(--border); border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: 0 12px 30px rgba(0,0,0,.18); display: none; }
.nav > ul > li:nth-last-child(-n+2) > ul { left: auto; right: 0; }
.nav ul ul ul { position: static; display: block; box-shadow: none; border: 0; padding: 0 0 4px 10px; min-width: 0; }
.nav li:hover > ul, .nav li:focus-within > ul { display: block; }
.nav ul ul a, .nav ul ul .nav-label { color: var(--text); white-space: normal; padding: 7px 10px; font-weight: 400; border-radius: 6px; }
.nav ul ul .nav-label { font-weight: 700; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding-top: 10px; }
.nav ul ul a:hover { background: var(--bg); }
.nav ul ul [aria-current="page"] { background: var(--bg); font-weight: 600; }
.nav .ext::after { content: " \2197"; font-size: .8em; opacity: .7; }
/* Dividers between menu items */
.nav > ul > li + li { border-left: 1px solid rgba(255,255,255,.2); }
.nav ul ul li + li { border-top: 1px solid var(--border); }
.nav ul ul a, .nav ul ul .nav-label { border-radius: 0; }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .menubar { position: static; }
  .menubar .wrap { flex-wrap: wrap; }
  .nav { display: none; padding-bottom: 12px; }
  .nav.open { display: block; }
  .nav > ul { flex-direction: column; }
  .nav a, .nav .nav-label { padding: 9px 10px; }
  .nav ul ul { position: static; display: block; box-shadow: none; border: 0; background: transparent; padding: 0 0 0 14px; min-width: 0; }
  .nav ul ul a { color: var(--brand-ink); }
  .nav ul ul .nav-label { color: rgba(255,255,255,.65); }
  .nav ul ul a:hover, .nav ul ul [aria-current="page"] { background: rgba(255,255,255,.12); }
  .nav > ul > li > .nav-label::after { display: none; }
  .nav > ul > li + li { border-left: 0; border-top: 1px solid rgba(255,255,255,.2); }
  .nav ul ul li + li { border-top-color: rgba(255,255,255,.12); }
  .nav > ul > li.is-active > a, .nav > ul > li.is-active > .nav-label { box-shadow: none; }
}

/* Breadcrumbs + page */
.crumbs { font-size: .875rem; color: var(--muted); margin: 18px 0 6px; }
.crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li + li::before { content: "/"; margin-right: 6px; opacity: .6; }
.crumbs a { color: inherit; }
main { padding-bottom: 40px; }
.page-title { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem); line-height: 1.2; margin: 4px 0; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 24px; margin-bottom: 16px; }
.lead { color: var(--muted); max-width: 75ch; margin: 4px 0 0; }
.button { display: inline-block; padding: 8px 14px; border-radius: 8px; background: var(--brand); color: #fff;
  text-decoration: none; font-weight: 600; font-size: .9rem; white-space: nowrap; }
.button:hover { background: var(--accent); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.card.flush { padding: 0; overflow: hidden; }
.embed { display: block; width: 100%; border: 0; height: calc(100vh - 120px); min-height: 640px; background: #fff; }
.embed-note { font-size: .85rem; color: var(--muted); padding: 10px 16px; margin: 0; border-top: 1px solid var(--border); }

/* Section overview tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.tile { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; text-decoration: none; color: var(--text); box-shadow: var(--shadow); transition: transform .15s, border-color .15s; }
.tile:hover { transform: translateY(-2px); border-color: var(--accent); }
.tile strong { display: block; color: var(--link); }
.tile span { color: var(--muted); font-size: .9rem; }
.tile.ext strong::after { content: " \2197"; font-size: .85em; }
.section-title { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 28px 0 10px; }

/* Home: photo strip, photos side by side at full height, scrolling continuously (no cropping, no empty bands) */
.strip { margin-top: 20px; height: clamp(180px, 26vw, 340px); overflow: hidden; border-radius: var(--radius);
  box-shadow: var(--shadow); background: #282828; }
.strip-track { display: flex; gap: 4px; height: 100%; width: max-content; animation: strip-scroll 70s linear infinite; }
.strip-track img { display: block; height: 100%; width: auto; max-width: none; flex: none; }
@keyframes strip-scroll { to { transform: translateX(calc(-50% - 2px)); } }   /* half the track = one full set (+ half a gap) */

/* Home: left modules | text | right modules (as on the old site) */
.home-grid { display: grid; grid-template-columns: 260px minmax(0, 1fr) 260px; grid-template-areas: "left main right";
  gap: 20px; margin-top: 20px; align-items: start; }
.col-left { grid-area: left; } .col-main { grid-area: main; } .col-right { grid-area: right; }
@media (max-width: 1000px) {
  .home-grid { grid-template-columns: 1fr 1fr; grid-template-areas: "main main" "left right"; }
}
@media (max-width: 600px) {
  .home-grid { grid-template-columns: 1fr; grid-template-areas: "main" "left" "right"; }
}
.home-title { margin: 0 0 12px; font-size: 1.5rem; text-align: center; }
.content p { text-align: justify; hyphens: auto; }
.module { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px; margin-bottom: 20px; }
.module-title { margin: 0 0 10px; font-size: 1rem; padding-bottom: 8px; border-bottom: 2px solid var(--accent); }
.module-link { display: block; border-radius: 6px; overflow: hidden; background: #fff; line-height: 0; }
.module-link img { width: 100%; transition: transform .2s; }
.module-link:hover img { transform: scale(1.03); }
.plot-link { display: block; background: #fff; border-radius: 6px; overflow: hidden; line-height: 0; }
.plot-img { width: 100%; aspect-ratio: 1024/800; object-fit: contain; }
.plot-bar { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.plot-bar button { flex: none; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-size: 1.2rem; line-height: 1; cursor: pointer; }
.plot-bar button:hover { border-color: var(--accent); }
.plot-cap { flex: 1; text-align: center; font-size: .85rem; line-height: 1.3; }
.plot-cap strong { display: block; }
.plot-cap span { color: var(--muted); }

/* Station plot pages */
.station-plot { padding: 12px; text-align: center; }
.station-plot img { display: block; margin: 0 auto; background: #fff; }
.station-plot .embed-note { border: 0; padding: 8px 0 0; }
.plot-missing { padding: 40px 0; color: var(--muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: .875rem; text-align: center; }
.site-footer .wrap { padding-top: 20px; padding-bottom: 24px; }
.logos { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-bottom: 10px; }
.logos img { height: 64px; width: auto; background: #fff; border-radius: 4px; }
@media (max-width: 600px) { .content p { text-align: left; } }

/* Real Time Catalogue */
.cat-form { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; }
.cat-form label { font-weight: 600; font-size: .95rem; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cat-form select { font: inherit; font-weight: 400; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); }
.cat-note { font-size: .9rem; color: var(--muted); }
.cat-status { margin: 16px 0 12px; font-weight: 600; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 8px; max-height: 75vh; }
.cat-table { border-collapse: collapse; width: 100%; font-size: .875rem; white-space: nowrap; }
.cat-table th { position: sticky; top: 0; background: var(--brand); color: #fff; text-align: left; padding: 8px 10px; font-weight: 600; }
.cat-table td { padding: 6px 10px; border-top: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.cat-table td.loc { white-space: normal; min-width: 180px; }
.cat-table tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--bg) 60%, transparent); }
.cat-table tbody tr:hover td { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.badge { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: .78rem; font-weight: 600; }
.badge.auto { background: #ffe3dc; color: #8a2a12; }
.badge.manual { background: #d9f2e4; color: #145a32; }
.catalogue .embed { border: 1px solid var(--border); border-radius: 8px; }

/* Plots for past dates */
.hp-form { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: flex-end; }
.hp-form label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: .85rem; color: var(--muted); }
.hp-form select, .hp-form input { font: inherit; font-size: 1rem; color: var(--text); background: var(--surface);
  padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; min-width: 150px; }
#hp-net { border-left: 6px solid var(--net, var(--border)); }
.hp-day { display: flex; gap: 6px; align-items: center; }
.hp-day input { min-width: 0; }
.hp-day button { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface);
  color: var(--text); font-size: 1.2rem; line-height: 1; cursor: pointer; }
.hp-day button:hover { border-color: var(--accent); }
.hp-status { margin: 16px 0 10px; font-weight: 600; }
.hp-plot { text-align: center; }
.hp-img { display: block; margin: 0 auto; width: 100%; max-width: 1024px; height: auto; background: #fff;
  border: 1px solid var(--border); border-radius: 6px; }

/* Stations Information */
.st-map { height: clamp(320px, 45vw, 520px); isolation: isolate; }   /* keep Leaflet z-indexes (400-1000) below the menu */
.stations { margin-top: 20px; }
.st-filter { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: flex-end; margin-bottom: 14px; }
.st-filter label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: .85rem; color: var(--muted); }
.st-filter input[type=search], .st-filter select { font: inherit; font-size: .95rem; color: var(--text); background: var(--surface);
  padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; min-width: 180px; }
.st-filter .st-check { flex-direction: row; align-items: center; gap: 6px; padding-bottom: 8px; }
.st-count { margin-left: auto; padding-bottom: 8px; color: var(--muted); font-size: .9rem; }
.st-list { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.st-row { display: grid; grid-template-columns: 70px minmax(140px, 1.4fr) 80px 80px 60px 95px 95px minmax(120px, 1fr) 85px minmax(90px, .8fr);
  gap: 8px; align-items: center; padding: 7px 12px; font-size: .875rem; }
.st-head { background: var(--brand); color: #fff; font-weight: 600; }
.st { border-top: 1px solid var(--border); }
.st:nth-of-type(even) > summary { background: color-mix(in srgb, var(--bg) 60%, transparent); }
.st > summary { cursor: pointer; list-style: none; }
.st > summary::-webkit-details-marker { display: none; }
.st > summary:hover { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.st[open] > summary { background: color-mix(in srgb, var(--accent) 10%, transparent); font-weight: 600; }
.st-code { font-weight: 700; color: var(--link); }
.st-code::before { content: "▸"; display: inline-block; width: 1em; color: var(--muted); transition: transform .15s; }
.st[open] .st-code::before { transform: rotate(90deg); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.badge.closed { background: #e5e8ec; color: #4b5563; }
.st-body { padding: 4px 16px 18px 30px; background: var(--surface); }
.st-body h4 { margin: 14px 0 6px; font-size: .9rem; }
.st-links { margin: 10px 0 0; font-size: .875rem; }
.st-table { border-collapse: collapse; width: 100%; font-size: .825rem; white-space: nowrap; }
.st-table th { text-align: left; background: var(--bg); padding: 5px 8px; font-weight: 600; }
.st-table td { padding: 5px 8px; border-top: 1px solid var(--border); }
@media (max-width: 1000px) {
  .st-head { display: none; }
  .st-row { grid-template-columns: 70px 1fr auto; }
  .st-row > span:nth-child(n+3):not(:nth-child(7)) { display: none; }   /* phones: code, site, status */
  .st-body { padding-left: 16px; }
}
/* Stations Information: the intro line spans the page, centred above the map */
.st-head-block, .st-head-block > div { display: block; width: 100%; }
.st-head-block .lead { max-width: 110ch; margin: 6px auto 0; text-align: center; }

/* Equipment Details */
.eq-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 16px; }
@media (max-width: 600px) { .eq-grid { grid-template-columns: 1fr; } }
.eq-card { display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.eq-photo { flex: none; width: 96px; height: 96px; object-fit: contain; background: #fff; border-radius: 6px; border: 1px solid var(--border); }
.eq-body { min-width: 0; flex: 1; }
.eq-body h3 { margin: 0 0 8px; font-size: 1.05rem; }
.eq-body > p { margin: 0 0 8px; font-size: .9rem; color: var(--muted); }
.eq-body dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 0; font-size: .875rem; }
.eq-body dt { color: var(--muted); font-weight: 600; }
.eq-body dd { margin: 0; overflow-wrap: anywhere; }
.eq-body dd a { margin-right: 2px; }
.eq-pz { margin-top: 10px; font-size: .85rem; }
.eq-pz summary { cursor: pointer; color: var(--link); font-weight: 600; }
.eq-pz p { margin: 6px 0; color: var(--muted); }
.eq-pz .st-table { font-variant-numeric: tabular-nums; }
.eq-src { margin: 8px 0 0 !important; font-size: .78rem !important; }

/* Network map */
.nm-map { height: clamp(380px, 60vh, 680px); isolation: isolate; }
.nm-list { margin-top: 20px; }
.nm-table th[data-sort] { cursor: pointer; user-select: none; }
.nm-table th[data-sort]::after { content: " ↕"; opacity: .5; font-size: .8em; }
.nm-table th[aria-sort="ascending"]::after { content: " ↑"; opacity: 1; }
.nm-table th[aria-sort="descending"]::after { content: " ↓"; opacity: 1; }
.nm-locate { border: 0; background: none; color: var(--accent); font-size: 1rem; cursor: pointer; padding: 0 4px; }
.nm-locate:hover { transform: scale(1.2); }
.nm-icon { background: none; border: 0; }
.nm-label { background: rgba(255,255,255,.85); border: 0; box-shadow: none; padding: 0 4px; font-size: 11px; font-weight: 700; color: #1c2430; }
.nm-label::before { display: none; }
.nm-pop h4 { margin: 0 0 6px; font-size: .95rem; }
.nm-pop table { border-collapse: collapse; font-size: .8rem; margin-bottom: 6px; }
.nm-pop th { text-align: left; padding: 1px 10px 1px 0; color: #5b6676; font-weight: 600; }
.nm-pop td { padding: 1px 0; }
.nm-pop p { margin: 4px 0 0 !important; font-size: .8rem; }
.nm-legend { background: rgba(255,255,255,.92); padding: 6px 10px; border-radius: 6px; font-size: 12px; line-height: 1.7; color: #1c2430; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.nm-key { display: inline-block; width: 0; height: 0; border-left: 6px solid transparent; border-right: 6px solid transparent;
  border-bottom: 11px solid var(--c); margin-right: 4px; vertical-align: -1px; }
/* full-screen version */
body.nm-full { margin: 0; display: flex; flex-direction: column; height: 100vh; }
.nm-bar { display: flex; gap: 16px; align-items: center; padding: 8px 16px; background: var(--brand); color: #fff; border-bottom: 3px solid var(--accent); }
.nm-bar a { color: #fff; }
body.nm-full .nm-map { flex: 1; height: auto; }
.nm-table { font-size: .82rem; }
.nm-table th, .nm-table td { padding: 6px 8px; }
.nm-table td:nth-child(4) { white-space: normal; min-width: 140px; }
.nm-links { white-space: nowrap; }
/* station balloon: links as a 2x2 grid of buttons */
.nm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; }
.leaflet-container .nm-actions a, .nm-actions a { display: block; white-space: nowrap; text-align: center; padding: 5px 8px; border-radius: 6px; font-size: .78rem; font-weight: 600;
  text-decoration: none; color: #10345c; background: #eef3f9; border: 1px solid #d5e0ec; }
.leaflet-container .nm-actions a:hover, .nm-actions a:hover { background: #c8102e; border-color: #c8102e; color: #fff; }
.nm-legend-n { color: #5b6676; margin-left: 2px; }
.leaflet-control-layers-overlays label { font-weight: 600; }
.nm-lead { max-width: none; margin: -4px auto 16px; text-align: center; text-wrap: balance; }
.embed[style*="max-width"] { margin: 0 auto; }
.hp-form .hp-check { flex-direction: row; align-items: center; gap: 6px; padding-bottom: 9px; color: var(--text); }
.hp-form .hp-check input { min-width: 0; width: auto; padding: 0; }
