/* C2 frame: one map, edge panels, module ribbon (MODULES-ADDENDUM-1 §1ae). Dark by default (Andy liked the setup look). */
:root {
  color-scheme: dark;   /* native controls (dropdown lists, date pickers, scrollbars) drawn dark, so their text shows */
  --bg: #0f1720; --panel: rgba(22, 33, 44, .97); --panel2: #1d2a37; --line: #2b3a49; --text: #e6edf3; --muted: #93a4b5;
  --accent: #2dd4bf; --accent-ink: #062421; --warn: #f59e0b; --ok: #22c55e; --err: #ef4444;
  --shadow: 0 8px 28px rgba(0, 0, 0, .45); --bar: #0b1117;
  font-size: var(--fs, 14px);
  font: var(--fs, 14px)/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--text); background: var(--bg);
}
* { box-sizing: border-box; }
body.c2 { margin: 0; height: 100vh; display: flex; flex-direction: column; overflow: hidden; background: var(--bg); }
button, input, select, textarea { font: inherit; color: inherit; }
kbd { font: 11px ui-monospace, monospace; border: 1px solid var(--line); border-radius: 3px; padding: 0 4px; color: var(--muted); }
.hint { color: var(--muted); font-size: 12px; }

/* top bar */
.c2-top { display: flex; align-items: center; gap: 14px; padding: 6px 12px; background: var(--bar); border-bottom: 1px solid var(--line); z-index: 5; }
.brand { display: flex; align-items: center; gap: 6px; color: var(--text); text-decoration: none; }
.brand b { font-size: 16px; letter-spacing: .5px; }
#company { background: var(--panel2); border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px; max-width: 240px; min-width: 0; text-overflow: ellipsis; }
.mods { display: flex; gap: 2px; }
.mods:not(:has(details)) { min-width: 0; overflow-x: auto; scrollbar-width: none; }   /* card 0309: the fallback links shrink before the account links do (never with the Tools menu: it would clip its dropdown) */
.theme-btn { flex-shrink: 0; }
.mods a { white-space: nowrap; color: var(--muted); text-decoration: none; padding: 5px 10px; border-radius: 6px; }
.mods a:hover { background: var(--panel2); color: var(--text); }
.mods a.on { background: #123b38; color: var(--accent); font-weight: 600; }
.mods a.old::after { content: " ↗"; font-size: 11px; }
.ask { flex: 1; min-width: 120px; display: flex; align-items: center; gap: 8px; background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 3px 10px; max-width: 460px; margin-left: auto; }
.ask span { color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: .6px; }
.ask input { flex: 1; min-width: 0; width: 100%; background: none; border: 0; outline: 0; color: var(--text); }
.ask input::placeholder { color: var(--muted); }
.user { display: flex; gap: 12px; color: var(--muted); font-size: 13px; flex-shrink: 0; white-space: nowrap; }   /* card 0309: Log out ran off a 1440 px screen */
.user span { max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.user a { color: var(--accent); text-decoration: none; }

/* stage and map */
.c2-stage { position: relative; flex: 1; min-height: 0; }
#map { position: absolute; inset: 0; }
.tools { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); display: flex; gap: 2px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 4px; box-shadow: var(--shadow); z-index: 3; }
.tools button { background: none; border: 0; padding: 5px 10px; border-radius: 7px; cursor: pointer; color: var(--text); }
.tools button.on { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.tools button:disabled { color: #56687a; cursor: not-allowed; }
.tool-note { color: var(--muted); font-size: 12px; padding: 0 8px; }
.status { position: absolute; left: 10px; bottom: 10px; display: flex; gap: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px; font: 12px ui-monospace, monospace; color: var(--muted); z-index: 2; }
.status b { color: var(--text); }
.status:not(:has(span:not(:empty))) { display: none; }   /* card 0309: an empty pill showed as a bare bar */
.site-label { color: #fff; font: 600 12px system-ui, sans-serif; text-shadow: 0 0 3px #000, 0 0 6px #000; white-space: nowrap; pointer-events: none; }
.site-label .site-badge { pointer-events: auto; cursor: pointer; }
.site-badge { display: inline-block; margin-left: 4px; padding: 0 5px; border-radius: 8px; background: #ef4444; color: #fff; font: 700 11px system-ui, sans-serif; text-shadow: none; } /* cnMaestro devices down (CR-16) */
.site-badge.amber { background: #f59e0b; color: #111; }
.maplibregl-popup-content { background: var(--panel); color: var(--text); border: 1px solid var(--line); }
.maplibregl-popup-tip { border-top-color: var(--panel) !important; }
.popup h4 { margin: 0 0 6px; } .popup table { font-size: 12px; } .popup td:first-child { color: var(--muted); padding-right: 8px; }
.measure-label { background: var(--panel); border: 1px solid var(--accent); color: var(--text); border-radius: 6px; padding: 2px 6px; font: 600 12px system-ui; }

/* edge panels: a tab at the edge; opens on hover/click; "Pin" keeps it open */
.edge { position: absolute; z-index: 4; display: flex; pointer-events: none; }      /* the empty strip must not block the map controls under it (card 0336) */
.edge > * { pointer-events: auto; }
.edge-body { background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); display: none; flex-direction: column; min-height: 0; }
.edge.open .edge-body, .edge.pinned .edge-body { display: flex; }
.edge-tab { background: var(--panel); border: 1px solid var(--line); color: var(--text); cursor: pointer; font-size: 12px; letter-spacing: .5px; padding: 8px 6px; }
.edge.open .edge-tab, .edge.pinned .edge-tab { display: none; }
.edge-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.edge-head .pin { margin-left: auto; background: none; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); cursor: pointer; font-size: 11px; padding: 2px 8px; }
.edge.pinned .pin { background: #123b38; color: var(--accent); border-color: var(--accent); }
.edge.left { left: 0; top: 60px; bottom: 50px; align-items: flex-start; }
.edge.left .edge-tab { writing-mode: vertical-rl; transform: rotate(180deg); border-radius: 0 8px 8px 0; margin-top: 30vh; }
.edge.left .edge-body { width: 320px; height: 100%; border-radius: 0 10px 10px 0; }
.edge.right { right: 0; top: 60px; bottom: 50px; align-items: flex-start; justify-content: flex-end; }
.edge.right .edge-tab { writing-mode: vertical-rl; border-radius: 8px 0 0 8px; margin-top: 30vh; }
.edge.right .edge-body { width: 380px; height: 100%; border-radius: 10px 0 0 10px; }
.edge.bottom { left: 50%; transform: translateX(-50%); bottom: 0; flex-direction: column; align-items: center; }
.edge.bottom .edge-tab { border-radius: 8px 8px 0 0; }
.edge.bottom .edge-body { width: min(900px, 96vw); height: 220px; border-radius: 10px 10px 0 0; }
.c2-stage.bottom-open .edge.left, .c2-stage.bottom-open .edge.right { bottom: 232px; }      /* never cover Save */
.c2-stage.bottom-open .status { bottom: 232px; }
.c2-stage.left-open .status { left: 330px; }
.c2-stage.right-open .maplibregl-ctrl-top-right { right: 380px; }      /* zoom and Locate me stay clickable beside the open Details panel (card 0336) */
/* Card 0336 slice 2: share with my team. The button turns red while sharing; the pill says so and stops it in one tap. */
#share-loc, #share-link { font-size: 15px; line-height: 29px; }
#share-loc.on { background: #c62828; color: #fff; }
.share-pill { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 5; background: #c62828; color: #fff;
  border: 0; border-radius: 16px; padding: 6px 14px; font: 600 13px/1.2 system-ui, sans-serif; box-shadow: 0 1px 4px rgba(0,0,0,.35); cursor: pointer; }
#layers, #sites-tab, #devices-tab, #details, .activity { overflow-y: auto; min-height: 0; flex: 1; }
.tabs { display: flex; gap: 4px; }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted); cursor: pointer; padding: 3px 6px; }
.tabs button.on { color: var(--text); border-bottom-color: var(--accent); }

/* layers */
.layer { padding: 8px 12px; border-bottom: 1px solid var(--line); display: grid; gap: 4px; }
.layer[hidden] { display: none; }
.layer label { display: flex; align-items: center; gap: 6px; }
.layer small { color: var(--muted); }
.layer input[type=range] { width: 100%; accent-color: var(--accent); }
.layer select, .filters button, #search { background: var(--panel2); border: 1px solid var(--line); border-radius: 6px; padding: 3px 6px; }
.layer-group { padding: 8px 12px 2px; color: var(--muted); font-size: 11px; letter-spacing: .6px; text-transform: uppercase; }
.basemaps { display: flex; gap: 4px; padding: 8px 12px; }
.basemaps button, .filters button { flex: 1; cursor: pointer; color: var(--muted); }
.basemaps button { background: var(--panel2); border: 1px solid var(--line); border-radius: 6px; padding: 3px 6px; }
.basemaps button.on, .filters button.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.layer-src { margin: 4px 12px; color: var(--muted); font-size: 11px; }

/* sites list */
#search { width: calc(100% - 20px); margin: 8px 10px 4px; }
.filters { display: flex; gap: 4px; padding: 0 10px 8px; }
.sites { list-style: none; margin: 0; padding: 0; }
.site > .row { display: grid; grid-template-columns: 10px 1fr auto; gap: 8px; align-items: center; padding: 7px 12px; cursor: pointer; border-bottom: 1px solid var(--line); }
.site > .row:hover { background: var(--panel2); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--warn); } .dot.ok { background: var(--ok); }
.site .meta { color: var(--muted); font-size: 11px; }
.radios { list-style: none; margin: 0; padding: 0; display: none; }
.site.open .radios, .radios.show { display: block; }
.radio { padding: 5px 12px 5px 30px; cursor: pointer; display: grid; font-size: 13px; border-bottom: 1px solid var(--line); }
.radio:hover { background: var(--panel2); } .radio.sel { background: #123b38; box-shadow: inset 3px 0 0 var(--accent); }
.radio .need { color: var(--warn); font-size: 11px; } .radio .done { color: var(--muted); font-size: 11px; } .radio.excluded { opacity: .55; }

/* standard form (forms.js) */
.c2-form { display: flex; flex-direction: column; min-height: 0; }
.c2-form .f-head { display: flex; justify-content: space-between; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.c2-form h2 { margin: 0; font-size: 16px; } .c2-form .f-sub { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.c2-form .f-close { background: none; border: 0; color: var(--muted); font-size: 20px; cursor: pointer; }
.c2-form .f-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; padding: 12px; }
.c2-form .f-field { display: grid; gap: 3px; font-size: 12px; color: var(--muted); }
.c2-form .f-field.wide { grid-column: 1 / -1; }
.c2-form .f-field input, .c2-form .f-field select { background: var(--panel2); border: 1px solid var(--line); border-radius: 6px; padding: 5px 7px; color: var(--text); width: 100%; }
.c2-form .f-field input.changed, .c2-form .f-field select.changed { border-color: var(--warn); }
.c2-form .f-src { font-size: 11px; color: #7f93a6; line-height: 1.35; }
.c2-form .f-src b { color: var(--accent); font-weight: 600; }
.c2-form .f-actions { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-top: 1px solid var(--line); margin-top: auto; position: sticky; bottom: 0; background: #16212c; }
.c2-form .f-msg { flex: 1; font-size: 12px; color: var(--muted); } .c2-form .f-msg.ok { color: var(--ok); } .c2-form .f-msg.err { color: var(--err); }
.c2-form .f-actions button { border-radius: 6px; padding: 6px 12px; border: 1px solid var(--line); background: var(--panel2); cursor: pointer; }
.c2-form .f-actions button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.c2-form .f-actions button:disabled { opacity: .45; cursor: not-allowed; }
.c2-form .f-note { padding: 0 12px; }
.az { display: flex; gap: 8px; align-items: center; } .az input[type=number] { width: 90px; } .az input[type=range] { flex: 1; accent-color: var(--accent); }

/* activity */
.activity { list-style: none; margin: 0; padding: 0; font-size: 12px; }
.activity li { display: grid; grid-template-columns: 110px 16px 190px 1fr; gap: 8px; padding: 5px 12px; border-bottom: 1px solid var(--line); align-items: baseline; }
.activity .t { color: var(--muted); font-family: ui-monospace, monospace; }
.activity .st { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); align-self: center; }
.activity .st.ok, .activity .st.done, .activity .st.active { background: var(--ok); } .activity .st.failed { background: var(--err); }
.activity .st.warning, .activity .st.running, .activity .st.queued { background: var(--warn); }
.activity .d { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 1100px) { .user span { display: none; } }   /* card 0309: the email goes first, Log out stays on screen */
@media (max-width: 720px) {
  .c2-top { flex-wrap: wrap; gap: 6px 8px; padding: 6px 10px; } .user span { display: none; }
  .ask { order: 4; flex: 1 0 100%; max-width: none; margin: 0; }
  .user { margin-left: auto; }
  .mods { order: 3; flex: 1 0 100%; overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
  .mods a { padding: 4px 8px; font-size: 13px; }
  .status { bottom: 36px; left: 8px; right: 8px; gap: 8px; font-size: 11px; white-space: nowrap; overflow: hidden; }
  .status #cursor { display: none; }
  .c2-stage .maplibregl-ctrl-bottom-right { bottom: 66px; }
  .tools { top: 8px; bottom: auto; left: 8px; transform: none; max-width: calc(100% - 64px); overflow-x: auto; }   /* PM: free the bottom strip */
  .edge.left .edge-body, .edge.right .edge-body { width: 92vw; }
  .activity li { grid-template-columns: 70px 12px 1fr; } .activity .d { display: none; }
}
.handle { width: 16px; height: 16px; background: var(--accent); border: 2px solid #0b1117; cursor: grab; box-shadow: 0 0 0 2px rgba(45,212,191,.35); }
.handle.h-az { border-radius: 50%; } .handle.h-bw { border-radius: 3px; background: #f59e0b; box-shadow: 0 0 0 2px rgba(245,158,11,.35); }

/* Views bar + reorderable layers (front at the top), like draw.io / Photoshop / ArcGIS */
.viewbar { display: flex; gap: 6px; padding: 6px 10px; border-bottom: 1px solid var(--line); }
.viewbar select { flex: 1; background: var(--panel2); border: 1px solid var(--line); border-radius: 6px; color: var(--text); padding: 3px 6px; }
.viewbar button { background: var(--panel2); border: 1px solid var(--line); border-radius: 6px; color: var(--text); cursor: pointer; padding: 3px 10px; }
.layer .lhead { display: flex; align-items: center; gap: 6px; }
.layer .reorder { margin-left: auto; display: inline-flex; gap: 2px; }
.layer .reorder button { background: none; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); cursor: pointer; font-size: 11px; line-height: 1; padding: 1px 4px; }
.layer .reorder button:disabled { opacity: .3; cursor: default; }
.layer.dragging { opacity: .5; }
/* graph paper for a blank view */
#map.blank { background-color: #0d1420; background-image:
  linear-gradient(rgba(120,160,200,.10) 1px, transparent 1px), linear-gradient(90deg, rgba(120,160,200,.10) 1px, transparent 1px),
  linear-gradient(rgba(120,160,200,.22) 1px, transparent 1px), linear-gradient(90deg, rgba(120,160,200,.22) 1px, transparent 1px);
  background-size: 20px 20px, 20px 20px, 100px 100px, 100px 100px; }

/* Device list (Devices tab) */
.devfilter { display: flex; gap: 6px; padding: 8px 10px; }
.devfilter #devsearch { flex: 1; background: var(--panel2); border: 1px solid var(--line); border-radius: 6px; color: var(--text); padding: 4px 8px; }
.devfilter select { background: var(--panel2); border: 1px solid var(--line); border-radius: 6px; color: var(--text); padding: 4px 6px; max-width: 120px; }
#devsum { margin: 0 12px 4px; }
.devmode { display: flex; gap: 4px; padding: 0 10px 6px; }
.devmode button { background: var(--panel2); border: 1px solid var(--line); border-radius: 6px; color: var(--text); padding: 2px 10px; cursor: pointer; }
.devmode button.on { border-color: var(--accent); color: var(--accent); }
.devlist[hidden], .tdevs[hidden], .devfilter select[hidden], .devtable[hidden], .devgridbar[hidden], .devcsv[hidden] { display: none; }
.devgridbar { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 10px 6px; align-items: center; }
.devgridbar select { background: var(--panel2); border: 1px solid var(--line); border-radius: 6px; color: var(--text); padding: 3px 6px; max-width: 140px; }
.devcsv { font-size: 12px; }
.devtable { overflow: auto; max-height: calc(100vh - 220px); }
.devtable table { border-collapse: collapse; font-size: 12px; width: 100%; }
.devtable th { position: sticky; top: 0; background: var(--panel); text-align: left; border-bottom: 1px solid var(--line); padding: 4px 8px; white-space: nowrap; z-index: 1; }
.devtable th button { background: none; border: 0; color: var(--text); font: inherit; font-weight: 600; cursor: pointer; padding: 0; }
.devtable td { padding: 4px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.devtable .gridrow { cursor: pointer; } .devtable .gridrow:hover { background: var(--panel2); }
.devtable .gst.down { color: var(--err); } .devtable .gst.up { color: var(--ok); }
.tsite .thead { display: flex; align-items: center; gap: 7px; width: 100%; background: none; border: 0; border-bottom: 1px solid var(--line); color: var(--text); padding: 6px 12px; cursor: pointer; text-align: left; font: inherit; }
.tsite .thead:hover { background: var(--panel2); }
.tsite .thead.hasdown .tcounts { color: var(--err); }
.tsite .tname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.tsite .tcounts, .tsite .tnum { color: var(--muted); font-size: 11px; white-space: nowrap; }
.tsite .tcaret { width: 10px; color: var(--muted); flex: none; }
.tdevs { list-style: none; margin: 0; padding: 0 0 0 14px; }
.tdev .tstatus { font-size: 11px; width: 52px; flex: none; color: var(--muted); }
.devlist { list-style: none; margin: 0; padding: 0; }
.devrow { display: flex; align-items: center; gap: 7px; padding: 6px 12px; border-bottom: 1px solid var(--line); cursor: pointer; }
.devrow:hover { background: var(--panel2); }
.devrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.devrow .dot.up { background: var(--ok); } .devrow .dot.down { background: var(--err); }
.devrow .dot.partial, .devrow .dot.yellow, .devrow .dot.onboarding { background: var(--warn); }
.devrow.record .dname, .devrow.record .dmeta { opacity: .6; font-style: italic; }   /* C-12: a record no scan has seen */
.devrow .dot.unseen { background: none; border: 1px dashed var(--muted); }
.devrow .dicon { color: var(--accent); width: 12px; text-align: center; flex: none; }
.devrow .dname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.devrow .dmeta { color: var(--muted); font-size: 11px; max-width: 42%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.devrow .dflags { color: var(--accent); font: 600 10px ui-monospace, monospace; letter-spacing: 1px; }
.devsheet h3 { margin: 0 0 8px; } .devsheet .dflags { color: var(--accent); font: 600 11px ui-monospace, monospace; }
.devsheet .kv { width: 100%; border-collapse: collapse; font-size: 13px; }
.devsheet .kv td { padding: 3px 8px 3px 0; vertical-align: top; } .devsheet .kv td:first-child { color: var(--muted); white-space: nowrap; }

/* Layer settings gear + property sheet */
.layer .lgear, #layers > .lgear { background: none; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); cursor: pointer; font-size: 12px; line-height: 1; padding: 1px 5px; }
.layer .lhead .lgear { margin-left: 4px; }
#layers > .lgear { margin: 4px 12px; }
.layersheet h3 { margin: 0 0 10px; } .layersheet h3 small { color: var(--muted); font-weight: 400; font-size: 12px; }
.layersheet .lctl { display: grid; grid-template-columns: 76px 1fr 44px; gap: 8px; align-items: center; margin: 8px 0; font-size: 13px; }
.layersheet .lctl input[type=range] { width: 100%; accent-color: var(--accent); }
.layersheet .lctl output { color: var(--muted); font: 12px ui-monospace, monospace; text-align: right; }

/* Drawing tools */
.draft-site { width: 18px; height: 18px; border-radius: 50%; background: var(--accent); border: 3px solid #fff; box-shadow: 0 0 0 4px rgba(45,212,191,.35); cursor: grab; }
small.drawn { font-size: 10px; font-weight: 600; color: var(--accent); border: 1px solid var(--accent); border-radius: 4px; padding: 0 4px; margin-left: 4px; vertical-align: middle; }
.radios.show .radio .mini { justify-self: start; width: max-content; margin-top: 2px; background: none; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); cursor: pointer; font-size: 11px; padding: 1px 6px; }
/* wedge colour legend (Radios layer) */
.tech-legend { margin: 2px 0 0; display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 11px; color: var(--muted); }
.tech-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }
.tech-legend i.unset { background: transparent; border: 1px dashed #9ca3af; }

/* Coverage rainbow legend (turbo ramp, weak -> strong) */
.cov-legend { grid-column: 1 / -1; font-size: 11px; color: var(--muted); }
.cov-legend .ramp { display: block; height: 8px; border-radius: 4px; margin-top: 2px;
  background: linear-gradient(90deg, #30123b, #4662d7, #36aaf9, #1ae4b6, #72fe5e, #c8ef34, #faba39, #f66b19, #ca2a04, #7a0403); }
.cov-legend .ticks { display: flex; justify-content: space-between; margin-top: 2px; }
.cov-legend .ticks b { font-weight: 500; color: var(--text); }
.cov-legend small { display: block; margin-top: 2px; }

/* Layer catalogue + query layers */
.lcat-bar { display: flex; gap: 6px; padding: 8px 12px 4px; }
.lcat-bar button { flex: 1; background: var(--panel2); border: 1px dashed var(--accent); color: var(--accent); border-radius: 6px; padding: 4px 6px; cursor: pointer; font-size: 12px; }
.layer .qdot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; border: 1px solid #0b1117; margin-right: 2px; vertical-align: -1px; }
.base-row .basemaps { position: static; width: auto; background: none; padding: 0; display: flex; gap: 4px; }
.base-row .basemaps button { flex: 1; }
.catsheet h3, .qbuilder h3 { margin: 0 0 6px; }
.catsheet #cat-q { width: 100%; margin: 6px 0; background: var(--panel2); border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; color: var(--text); }
.cat-list { list-style: none; margin: 6px 0 0; padding: 0; }
.cat-list .cat-co { margin: 10px 0 2px; color: var(--muted); font-size: 11px; letter-spacing: .6px; text-transform: uppercase; }
.cat-item { border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; margin: 4px 0; display: grid; gap: 3px; }
.cat-item .cat-title { font-weight: 600; } .cat-item .cat-title small { color: var(--muted); font-weight: 400; }
.cat-item .cat-tags { display: flex; flex-wrap: wrap; gap: 3px; }
.cat-item .cat-tags span { font-size: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 0 6px; color: var(--muted); }
.cat-item .cat-tags .poll { border-color: var(--accent); color: var(--accent); }
.cat-item .cat-meta { font-size: 11px; color: var(--muted); }
.cat-item button { justify-self: start; background: var(--panel2); border: 1px solid var(--line); border-radius: 6px; color: var(--text); padding: 2px 10px; cursor: pointer; }
.cat-item button:disabled { opacity: .55; cursor: default; }
.qbuilder { display: grid; gap: 8px; }
.qbuilder label { display: grid; gap: 3px; font-size: 12px; color: var(--muted); }
.qbuilder input, .qbuilder select { background: var(--panel2); border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; color: var(--text); }
.qbuilder .qconds { display: grid; gap: 6px; }
.qbuilder .qcond { display: grid; grid-template-columns: 1fr 1fr 1.2fr auto; gap: 4px; }
.qbuilder .qcond .qdel { background: none; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); cursor: pointer; }
.qbuilder .qadd { justify-self: start; background: none; border: 1px dashed var(--line); border-radius: 6px; color: var(--muted); padding: 3px 8px; cursor: pointer; }
.qbuilder .qrow2 { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: end; }
.qbuilder .qrow2 input[type=color] { padding: 0; width: 44px; height: 28px; }
.qmsg.ok { color: var(--ok); } .qmsg.err { color: var(--err); }
.layersheet .kv { width: 100%; border-collapse: collapse; font-size: 12px; margin-bottom: 6px; }
.layersheet .kv td { padding: 2px 8px 2px 0; vertical-align: top; } .layersheet .kv td:first-child { color: var(--muted); white-space: nowrap; }
.layersheet .lpoll input { width: 100%; background: var(--panel2); border: 1px solid var(--line); border-radius: 6px; padding: 3px 6px; color: var(--text); }
.layersheet .unplaced { max-height: 160px; overflow-y: auto; font-size: 12px; padding-left: 16px; }

/* Details-panel sheets: padding and buttons like the standard form */
.catsheet, .qbuilder, .layersheet, .devsheet { padding: 10px 12px; }
.catsheet .f-actions, .qbuilder .f-actions, .layersheet .f-actions { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.catsheet .f-actions button, .qbuilder .f-actions button, .layersheet .f-actions button {
  background: var(--panel2); border: 1px solid var(--line); border-radius: 6px; color: var(--text); padding: 5px 12px; cursor: pointer; font: inherit; }
.qbuilder .f-actions button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.layersheet .f-actions button.ghost { color: var(--muted); }
.qbuilder input, .qbuilder select { width: 100%; min-width: 0; }
.qbuilder .qcond { grid-template-columns: minmax(0, 1fr) minmax(0, .9fr) minmax(0, 1fr) auto; }
.qbuilder .qrow2 input[type=color] { width: 44px; }
/* layer rows: title on one line, its description below it */
.layer .lhead label { flex: 1; flex-wrap: wrap; min-width: 0; gap: 2px 6px; }
.layer .lhead label small { flex-basis: 100%; padding-left: 22px; font-size: 11px; }
.layer .mini-btn { justify-self: start; background: var(--panel2); border: 1px solid var(--line); border-radius: 6px; color: var(--text); padding: 2px 10px; font-size: 12px; cursor: pointer; }
.layer .mini-btn:disabled { opacity: .6; cursor: default; }
.client-label { pointer-events: none; font: 600 11px system-ui, sans-serif; color: #ecfccb; text-shadow: 0 0 3px #000, 0 0 6px #000; white-space: nowrap; }

/* Filters inside a layer (show only / hide) */
.lfilter { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 8px; }
.lfilter h4 { margin: 0 0 6px; font-size: 13px; } .lfilter h4 small { color: var(--muted); font-weight: 400; }
.lrules { list-style: none; margin: 0 0 6px; padding: 0; font-size: 12px; display: grid; gap: 3px; }
.lrules li { display: flex; gap: 6px; align-items: center; } .lrules li b { color: var(--accent); font-weight: 600; }
.lrules button { margin-left: auto; background: none; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); cursor: pointer; }
.lrule-add { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1fr) minmax(0, .6fr) minmax(0, 1fr) auto; gap: 4px; }
.lrule-add select, .lrule-add input { min-width: 0; background: var(--panel2); border: 1px solid var(--line); border-radius: 6px; padding: 3px 4px; color: var(--text); font-size: 12px; }
.lrule-add button { background: var(--panel2); border: 1px solid var(--line); border-radius: 6px; color: var(--text); padding: 3px 8px; cursor: pointer; }
.popup .hide-feature { background: none; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); cursor: pointer; font-size: 11px; padding: 2px 8px; }

/* Address check */
.addrsheet { padding: 10px 12px; } .addrsheet h3 { margin: 0 0 4px; } .addrsheet h4 { margin: 12px 0 4px; font-size: 14px; }
.addrsheet ul { margin: 0; padding-left: 18px; font-size: 13px; display: grid; gap: 3px; }
.verdict { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 10px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; }
.verdict.v-likely { background: #14532d; color: #86efac; } .verdict.v-possible { background: #422006; color: #fcd34d; } .verdict.v-not-seen { background: #1f2937; color: #9ca3af; }
.addr-pin { width: 22px; height: 22px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: #f43f5e; border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.5); }

/* Field records */
.recsheet { padding: 10px 12px; display: grid; gap: 8px; } .recsheet h3 { margin: 0; } .recsheet h4 { margin: 6px 0 0; font-size: 14px; }
.recform label { display: grid; gap: 3px; font-size: 13px; } .recform label small { color: var(--muted); }
.recform input, .recform select, .recform textarea { width: 100%; box-sizing: border-box; background: rgba(255,255,255,.06); color: var(--text); border: 1px solid rgba(255,255,255,.15); border-radius: 6px; padding: 5px 7px; font: inherit; }
.recform .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.recsheet .tag { display: inline-block; padding: 0 7px; border-radius: 9px; background: #422006; color: #fcd34d; font-size: 11px; }
.rectable { font-size: 13px; border-collapse: collapse; } .rectable td { padding: 2px 8px 2px 0; vertical-align: top; } .rectable td:first-child { color: var(--muted); white-space: nowrap; }
.recbody { white-space: pre-wrap; margin: 0; font-size: 13px; }
.recfiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.recfiles figure { margin: 0; } .recfiles img { width: 100%; height: 100px; object-fit: cover; border-radius: 6px; display: block; }
.recfiles figcaption { font-size: 11px; overflow-wrap: anywhere; } .recfiles figcaption small { display: block; color: var(--muted); }
.recadd { font-size: 13px; display: grid; gap: 3px; }
.reclist { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.reclist button { width: 100%; text-align: left; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); border-radius: 6px; color: var(--text); padding: 6px 8px; cursor: pointer; }
.reclist button small { display: block; color: var(--muted); }
.rechist { font-size: 12px; } .rechist ul { padding-left: 16px; margin: 4px 0; }
.rec-draft { background: #d6c7a1 !important; }
.recorig { font-size: 12px; } .recorig .rectable { margin: 4px 0; } .recorig hr { border: 0; border-top: 1px solid rgba(255,255,255,.12); }

/* source layers and recipes (DATA-LAYERS §8) */
.layer.src-layer { padding-left: 18px; border-left: 2px solid rgba(255,255,255,.08); }
.lf-toggle { float: right; font-size: 12px; font-weight: 400; } .lf-expr { margin: 2px 0 6px; font-size: 12px; } .lf-expr.off { opacity: .45; text-decoration: line-through; }
.recipe { list-style: none; margin: 0 0 4px; padding: 0; display: grid; gap: 3px; font-size: 13px; } .recipe small { color: var(--muted); }

/* link path analysis */
.pathcard { border-top: 1px solid rgba(255,255,255,.1); padding-top: 6px; margin-top: 6px; } .pathcard p { margin: 2px 0; font-size: 13px; }
.pathsvg { width: 100%; height: 120px; background: rgba(255,255,255,.03); border-radius: 6px; display: block; }
.pathlegend { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 11px; color: var(--muted); } .pathlegend i { display: inline-block; width: 10px; height: 10px; margin-right: 4px; vertical-align: -1px; border-radius: 2px; }
.obst { margin: 2px 0; padding-left: 18px; font-size: 12px; }
.pathh { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 12px; } .pathh input { width: 64px; background: rgba(255,255,255,.06); color: var(--text); border: 1px solid rgba(255,255,255,.15); border-radius: 5px; padding: 2px 4px; }
.pathcard .assumed { color: #fcd34d; }
.pathcard > p:first-child { cursor: pointer; } .pathcard.hl { outline: 2px solid #2dd4bf; border-radius: 6px; } .pathpop .pathsvg { height: 110px; }
.rcov { padding: 6px 12px 10px; } .rcov .assumed { color: #fcd34d; }
.handle.h-rg { border-radius: 2px; transform: rotate(45deg); background: #a78bfa; box-shadow: 0 0 0 2px rgba(167,139,250,.35); }
.f-pick { background: none; border: 0; border-bottom: 1px dashed currentColor; color: #93c5fd; padding: 0; font: inherit; cursor: pointer; }
.f-pick:hover { color: #bfdbfe; }

/* device sheet, Dude-style tabs */
.dtabs { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 1px solid rgba(255,255,255,.15); margin: 6px 0; }
.dtabs button { background: none; border: 1px solid transparent; border-bottom: 0; color: var(--muted); padding: 4px 9px; font-size: 12px; cursor: pointer; border-radius: 5px 5px 0 0; }
.dtabs button.on { color: var(--text); border-color: rgba(255,255,255,.15); background: rgba(255,255,255,.05); }
/* the Site view (CR-33) */
.siteview .f-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.siteview .reclist img.svthumb { width: 48px; height: 48px; object-fit: cover; border-radius: 4px; margin: 4px 4px 0 0; }
.siteview .svhist { list-style: none; padding: 0; margin: 0; }
.siteview .svhist li { padding: 3px 0; border-bottom: 1px solid rgba(255,255,255,.06); overflow-wrap: anywhere; }
.site-label[role=button] { cursor: pointer; pointer-events: auto; }   /* CR-33: the name opens the Site view (the label was click-through) */
.dev-site { margin: 6px 0; }
.sheet-value { font-weight: 600; } .sheet-from, .sheet-stale-note { font-size: 12px; } .sheet-differ { font-size: 12px; border-left: 3px solid #d97706; padding-left: 6px; margin-top: 2px; } .sheet-stale .sheet-value { opacity: .7; }
.dtabs button:disabled { opacity: .4; cursor: default; }
.dtabs.sub button { font-size: 11px; padding: 3px 7px; }
.dtable { overflow-x: auto; } .dtable table { border-collapse: collapse; font-size: 12px; width: 100%; }
.dtable th, .dtable td { text-align: left; padding: 3px 6px; border-bottom: 1px solid rgba(255,255,255,.07); white-space: nowrap; }
.dtable th { color: var(--muted); font-weight: 600; }
.dhist { font-size: 12px; padding-left: 16px; margin: 4px 0; display: grid; gap: 3px; }

/* equipment profiles */
.eqbar { display: flex; gap: 6px; padding: 0 12px 6px; } .eqbar button { font-size: 12px; }
.eqbands input { background: rgba(255,255,255,.06); color: var(--text); border: 1px solid rgba(255,255,255,.15); border-radius: 4px; padding: 2px 4px; font: inherit; }
.eqradios { font-size: 12px; padding-left: 16px; } .eqradios li { cursor: pointer; } .eqradios li:hover { text-decoration: underline; }
.rprof { padding: 6px 12px 0; font-size: 13px; } .rprof select { max-width: 100%; }
.recform .chk { display: flex; gap: 6px; align-items: center; }

/* layer numbers and catalogue checkboxes */
.lnum { display: inline-block; min-width: 26px; padding: 0 4px; margin-right: 2px; border-radius: 4px; background: rgba(255,255,255,.08); color: var(--muted); font-size: 11px; font-weight: 600; text-align: center; }
.cat-item .cat-title { display: flex; gap: 6px; align-items: center; cursor: pointer; }
.instlayer .inst-remove { margin-top: 4px; }

/* ---------- workbook: sheets along the bottom (Andy 2026-10-12), layers palette by tag ---------- */
.sheetbar { display: flex; align-items: center; gap: 6px; padding: 3px 8px; background: var(--bar); border-top: 1px solid var(--line); min-height: 30px; overflow-x: auto; }
.sheetbar select { background: var(--panel2); color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; font-size: 12px; max-width: 220px; }
.sheettabs { display: flex; gap: 2px; align-items: flex-end; }
.sheettab { background: var(--panel2); color: var(--muted); border: 1px solid var(--line); border-top: none; border-radius: 0 0 6px 6px; padding: 3px 12px; font-size: 12px; cursor: pointer; white-space: nowrap; }
.sheettab.on { background: var(--panel); color: var(--accent); font-weight: 600; border-color: var(--accent); }
.sheettab:hover { color: var(--text); }
#sheet-add { background: none; border: 1px solid var(--line); color: var(--text); border-radius: 6px; width: 26px; height: 22px; cursor: pointer; }
#sheet-add[hidden] { display: none; }
#sheet-note { margin-left: 8px; white-space: nowrap; }
.ctxmenu { position: fixed; z-index: 50; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); padding: 4px; min-width: 150px; }
.ctxmenu button { display: block; width: 100%; text-align: left; background: none; border: 0; color: var(--text); padding: 5px 10px; border-radius: 5px; cursor: pointer; font-size: 13px; }
.ctxmenu button:hover:not(:disabled) { background: var(--panel2); }
.ctxmenu button:disabled { color: var(--muted); cursor: default; }
.ctxmenu hr { border: 0; border-top: 1px solid var(--line); margin: 3px 0; }
.lsearch-bar { display: flex; gap: 4px; padding: 6px 8px; align-items: center; }
.lsearch-bar input { flex: 1; min-width: 0; background: var(--panel2); color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px; }
.lsearch-bar button { background: var(--panel2); color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; cursor: pointer; font-size: 12px; white-space: nowrap; }
.pal-head { font-size: 11px; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); padding: 6px 10px 2px; }
#sheet-layers { border-bottom: 1px solid var(--line); padding-bottom: 4px; }
#sheet-layers:empty::after { content: 'Nothing on this sheet yet: tick a layer below, or search.'; display: block; color: var(--muted); font-size: 12px; padding: 4px 10px 8px; }
details.pcat > summary { cursor: pointer; padding: 5px 10px; font-weight: 600; font-size: 13px; color: var(--text); list-style: none; }
details.pcat > summary::before { content: '\25B8'; display: inline-block; width: 14px; color: var(--muted); transition: transform .1s; }
details.pcat[open] > summary::before { transform: rotate(90deg); }
details.pcat > summary small { color: var(--muted); font-weight: 400; }
details.pcat[hidden] { display: none; }
.ltags { display: inline-flex; gap: 3px; margin-left: 4px; vertical-align: middle; }
.ltags span { font-size: 10px; border: 1px solid var(--line); border-radius: 9px; padding: 0 6px; color: var(--muted); }
.ltags span.co { border-color: #134e4a; color: var(--accent); }
.lmore { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 15px; padding: 0 4px; }
.lmore:hover { color: var(--text); }
.layer.lhidden { display: none; }
@media (max-width: 640px) { .sheetbar { padding: 3px 4px; } .sheetbar select { max-width: 120px; } }
/* palette rows are one line (draw.io's shapes list); a layer shows its controls once it is on the sheet */
#palette .layer:not(:has(.lhead input[type=checkbox]:checked)) > :not(.lhead) { display: none; }
#palette .layer:not(:has(.lhead input[type=checkbox]:checked)) { padding-top: 3px; padding-bottom: 3px; }
#palette .layer:not(:has(.lhead input[type=checkbox]:checked)) .lhead label small { display: none; }
.lsearch-bar button { flex: none; padding: 3px 6px; }
.lsearch-bar input { min-width: 120px; }

/* ---------- Libraries dialog (draw.io's More Shapes; PM 2026-10-12): list on the left, how it connects on the right ---------- */
.libdlg { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.libdlg[hidden] { display: none; }
.lib-box { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); width: min(980px, 100%); height: min(680px, 100%); display: flex; flex-direction: column; }
.lib-box header, .lib-box footer { display: flex; align-items: center; gap: 10px; padding: 10px 14px; }
.lib-box header { border-bottom: 1px solid var(--line); }
.lib-box header .hint { flex: 1; }
.lib-x { background: none; border: 0; color: var(--muted); font-size: 22px; cursor: pointer; }
.lib-box footer { border-top: 1px solid var(--line); }
.lib-box footer label { flex: 1; }
.lib-box footer button { background: var(--panel2); color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 5px 14px; cursor: pointer; }
.lib-box footer button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.lib-filter { display: flex; gap: 6px; padding: 8px 14px; flex-wrap: wrap; }
.lib-filter input { flex: 1; min-width: 160px; }
.lib-filter input, .lib-filter select { background: var(--panel2); color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px; }
.lib-main { flex: 1; display: flex; min-height: 0; border-top: 1px solid var(--line); }
.lib-list { width: 46%; overflow: auto; border-right: 1px solid var(--line); padding-bottom: 8px; }
.lib-preview { flex: 1; overflow: auto; padding: 12px 16px; }
.lib-head { position: sticky; top: 0; background: var(--panel2); font-size: 11px; letter-spacing: .7px; text-transform: uppercase; color: var(--muted); padding: 5px 12px; z-index: 1; }
.lib-sub { font-size: 12px; color: var(--accent); padding: 6px 12px 2px; }
.lib-item { display: flex; align-items: center; gap: 6px; padding: 3px 12px 3px 18px; cursor: pointer; font-size: 13px; }
.lib-item:hover { background: var(--panel2); }
.lib-item.sel { background: #123b38; }
.lib-item .lnum, .lib-item small { color: var(--muted); }
.lib-item .nodata { color: var(--muted); font-style: italic; font-size: 11px; margin-left: auto; white-space: nowrap; }
.lib-preview h3 { margin: 0 0 4px; }
.lib-preview table { font-size: 13px; border-collapse: collapse; margin: 6px 0 10px; }
.lib-preview td { padding: 2px 10px 2px 0; vertical-align: top; }
.lib-preview td:first-child { color: var(--muted); white-space: nowrap; }
.lib-preview a { color: var(--accent); cursor: pointer; text-decoration: none; }
.lib-preview a:hover { text-decoration: underline; }
.lib-chain { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0 12px; font-size: 12px; }
.lib-chain span { border: 1px solid var(--line); border-radius: 12px; padding: 2px 9px; }
.lib-chain i { color: var(--muted); font-style: normal; }
@media (max-width: 700px) {
  .lib-main { flex-direction: column; } .lib-list { width: auto; flex: 1; border-right: 0; border-bottom: 1px solid var(--line); }
  .lib-preview { flex: none; max-height: 35%; } .lib-box header .hint, #lib-count { display: none; } .lib-box footer label { font-size: 12px; }
}
.layer.lexcl { display: none; }
.popup .corr { color: #a3e635; font-size: 12px; margin: 0 0 6px; }
fieldset.circfields { border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; margin: 8px 0; }
fieldset.circfields[hidden] { display: none; }
fieldset.circfields legend { font-weight: 600; padding: 0 4px; }
/* legend entries are switches: click to hide or show those features */
.tech-legend span.lswitch { cursor: pointer; border-radius: 4px; padding: 0 3px; user-select: none; }
.tech-legend span.lswitch:hover { background: var(--panel2); }
.tech-legend span.lswitch:focus-visible { outline: 2px solid var(--accent); }
.tech-legend span.loff { opacity: .35; text-decoration: line-through; }
/* ---------- Companies & access page ---------- */
body.c2-page { height: auto; min-height: 100vh; overflow: auto; }
main.access { max-width: 1100px; margin: 0 auto; padding: 16px; min-width: 0; width: 100%; box-sizing: border-box; }   /* min-width 0: a wide table scrolls in its .data-table box instead of widening the page on a phone */
main.access h1 { margin: 8px 0; }
section.company { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; margin: 14px 0; }
section.company h2 { margin: 0 0 6px; } section.company h3 { margin: 14px 0 6px; font-size: 14px; }
table.acc { width: 100%; border-collapse: collapse; font-size: 13px; }
table.acc th { text-align: left; color: var(--muted); font-weight: 500; border-bottom: 1px solid var(--line); padding: 4px 6px; }
table.acc td { border-bottom: 1px solid var(--line); padding: 6px; vertical-align: top; }
.pill { display: inline-block; border: 1px solid var(--line); border-radius: 10px; padding: 0 8px; font-size: 12px; margin: 1px 2px; }
.pill.co { border-color: #134e4a; color: var(--accent); }
.pill .x { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 0 2px; }
main.access form { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
main.access input, main.access select, main.access button { background: var(--panel2); color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px; }
main.access button { cursor: pointer; }
main.access .msg.err { color: var(--err); } main.access .msg.ok { color: var(--ok); }
@media (max-width: 700px) { table.acc thead { display: none; } table.acc td { display: block; border: 0; padding: 2px 0; } table.acc tr { display: block; border-bottom: 1px solid var(--line); padding: 6px 0; } }
/* projects */
.proj-chip { background: #3b0764; color: #f5d0fe; border: 1px solid #e879f9; border-radius: 12px; padding: 2px 10px; font-size: 12px; cursor: pointer; white-space: nowrap; }
.proj-chip[hidden] { display: none; }
.pstep { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; font-size: 12px; }
.pstep span { border: 1px solid var(--line); border-radius: 10px; padding: 1px 8px; color: var(--muted); }
.pstep span.done { color: var(--text); } .pstep span.on { border-color: #e879f9; color: #f5d0fe; font-weight: 600; }
.pstep i { color: var(--muted); font-style: normal; }

/* dropdown lists: the options take the dark panel colour, never the browser's white (Andy 2026-10-12: text was invisible) */
select { background-color: var(--panel2); color: var(--text); }
option, optgroup { background-color: var(--panel2); color: var(--text); }
option:disabled { color: var(--muted); }
.cov-sites { grid-column: 1 / -1; font-size: 12px; }
.cov-sites summary { cursor: pointer; color: var(--muted); }
.cov-sites-bar { display: flex; gap: 6px; margin: 4px 0; }
.cov-sites-bar input { flex: 1; min-width: 0; }
.cov-sites-list { max-height: 220px; overflow-y: auto; display: grid; gap: 2px; }
.cov-sites-list label { display: flex; gap: 6px; align-items: center; }
.cov-sites-list small { color: var(--muted); margin-left: auto; }
/* Radio Link window (link.js) */
.linkdlg { position: absolute; right: 12px; bottom: 44px; z-index: 30; width: min(620px, calc(100vw - 32px)); max-height: 72vh; overflow-y: auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 8px 10px; font-size: 12px; }
.linkdlg header { display: flex; gap: 8px; align-items: center; } .linkdlg header .hint { flex: 1; }
.linkdlg header button { background: none; border: 1px solid var(--line); color: var(--text); border-radius: 6px; cursor: pointer; }
.ln-sum { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 2px 8px; margin: 6px 0; padding: 6px; border-radius: 6px;
  border-left: 4px solid var(--ln, #94a3b8); background: var(--panel2); }
.ln-sum div { display: flex; justify-content: space-between; gap: 6px; } .ln-sum span { color: var(--muted); } .ln-sum p { grid-column: 1 / -1; margin: 2px 0; }
.ln-prof { width: 100%; height: 170px; background: #0b1220; border-radius: 6px; }
.ln-prof .g { fill: #7c5a3a; stroke: none; } .ln-prof .s { fill: none; stroke: #22c55e; stroke-width: 1; }
.ln-prof .f { fill: none; stroke: #93c5fd; stroke-width: 1; stroke-dasharray: 3 3; } .ln-prof .f6 { fill: none; stroke: #f59e0b; stroke-width: 1; stroke-dasharray: 1 3; }
.ln-prof .l { fill: none; stroke-width: 2; } .ln-prof text { fill: #cbd5e1; font-size: 10px; }
.ln-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 6px; }
.ln-form fieldset { border: 1px solid var(--line); border-radius: 6px; margin: 0; padding: 4px 6px; display: grid; gap: 3px; }
.ln-form label { display: grid; gap: 1px; } .ln-form input[type=number] { width: 100%; } .ln-form details { grid-column: 1 / -1; }
.link-end { background: #2dd4bf; color: #04201c; font-weight: 700; border-radius: 50%; width: 20px; height: 20px; display: grid; place-items: center; font-size: 11px; cursor: grab; }
/* Sandbox (sandbox.js) */
.sbxbar { position: absolute; left: 50%; transform: translateX(-50%); top: 52px; z-index: 25; max-width: calc(100vw - 32px); display: flex; flex-wrap: wrap; gap: 6px;
  align-items: center; background: var(--panel); border: 1px dashed #e879f9; border-radius: 10px; padding: 5px 10px; font-size: 12px; box-shadow: var(--shadow); }
.sbxbar[hidden] { display: none; } .sbxbar button { background: none; border: 1px solid var(--line); color: var(--text); border-radius: 6px; cursor: pointer; }
.sbx-rank { flex-basis: 100%; max-height: 40vh; overflow: auto; } .sbx-rank[hidden] { display: none; } .sbx-rank table { border-collapse: collapse; width: 100%; } .sbx-rank th, .sbx-rank td { text-align: left; padding: 2px 6px; border-bottom: 1px solid var(--line); } .sbx-rank tbody tr { cursor: pointer; }
.sbx-radios { display: flex; flex-wrap: wrap; gap: 6px; } .sbx-radios label { display: flex; gap: 3px; align-items: center; }
.sbx-radios label.on a { font-weight: 700; } .sbx-radios a { color: var(--text); }
.sbx-radios i { width: 8px; height: 8px; border-radius: 50%; background: #94a3b8; display: inline-block; }
.sbx-radios i.st-done { background: #22c55e; } .sbx-radios i.st-running { background: #eab308; } .sbx-radios i.st-failed { background: #ef4444; } .sbx-radios i.stale { outline: 2px solid #eab308; }
.sbx-pin { width: 22px; height: 22px; border-radius: 50%; background: #e879f9; color: #2a0631; font-weight: 700; font-size: 11px; display: grid; place-items: center; border: 2px dashed #fff; cursor: pointer; }   /* dashed: a proposal, never plant (CR-34) */
.tools .tool-toggle[aria-pressed="true"] { outline: 1px dashed #e879f9; }
.sbx-pin.on { box-shadow: 0 0 0 3px #2dd4bf; }
.sbx-sheet h3 { margin: 0 0 4px; } .sbx-tabs { display: flex; flex-wrap: wrap; gap: 2px; margin: 6px 0; }
.sbx-form { display: grid; gap: 4px; } .sbx-form label { display: grid; grid-template-columns: 1fr 120px; gap: 2px 6px; align-items: center; font-size: 12px; }
.sbx-form label small { grid-column: 2; color: var(--muted); } .sbx-form input, .sbx-form select { width: 100%; }
.sbx-acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; } .sbx-status.st-failed { color: #ef4444; } .sbx-status.st-running { color: #eab308; }
.sbx-res table.kv th { text-align: left; font-weight: 400; color: var(--muted); padding-right: 8px; } .sbx-fe tr.ok td { color: #22c55e; }
/* phones (desktop PM 2026-10-13..15): one ribbon row with a menu, scrollable tools and sheet tabs with + always visible,
   a half-height Layers panel */
.menu-btn { display: none; background: none; border: 1px solid var(--line); border-radius: 6px; color: var(--text); font-size: 16px; padding: 2px 9px; cursor: pointer; }
@media (max-width: 600px) {
  .c2-top { flex-wrap: nowrap; position: relative; gap: 6px; }
  .brand b { display: none; } #company { max-width: 110px; }
  .ask { order: 0; flex: 1 1 auto; min-width: 0; } .ask span { display: none; }
  .menu-btn { display: block; margin-left: auto; }
  .c2-top .mods, .c2-top .user { display: none; }
  .c2-top.menu-open { flex-wrap: wrap; }
  .c2-top.menu-open .mods, .c2-top.menu-open .user { display: flex; flex-direction: column; flex: 1 0 100%; order: 5; gap: 2px; margin: 0; }
  .c2-top.menu-open .user a { padding: 5px 10px; }
  .tools { max-width: calc(100% - 64px); overflow-x: auto; scrollbar-width: none; } .tools .tool-note { display: none; }
  .sheetbar { overflow: hidden; } .sheettabs { flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
  #sheet-add { flex: none; position: sticky; right: 0; }
  .edge.left { bottom: auto; height: 50vh; } .edge.left .edge-body { height: 50vh; }
}
/* Ask C2 (Claude) */
.askpane h3 { margin: 0 0 6px; } .askturn { border-bottom: 1px solid var(--line); padding: 6px 0; }
.askq { font-weight: 600; margin: 0 0 4px; } .aska { line-height: 1.45; } .aska a { color: var(--accent); }
.askmore { display: flex; gap: 6px; margin-top: 8px; } .askmore input { flex: 1; min-width: 0; }
.sbx-wb { display: flex; gap: 6px; align-items: center; font-size: 12px; }
/* plates strip (plates.js); .lg-hud.st-hud so these win over the later .lg-hud rules (card 0309: Status sat under Waiting on you) */
.plates { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px 8px; }
.lg-hud.st-hud { right: auto; left: 10px; bottom: 44px; width: min(560px, calc(100vw - 20px)); max-height: 40vh; z-index: 4; }   /* above Waiting on you (.q-hud, z 3) where they meet, so its toggle stays clickable */
.lg-hud.st-hud.min { width: auto; }
/* the window frames, the body scrolls: the scrollbar no longer covers the right edge and corner that resize it (Andy 11-17) */
.lg-hud.st-hud { display: flex; flex-direction: column; overflow: hidden; }
.st-hud .st-body { flex: 1 1 auto; min-height: 0; overflow: auto; }
.st-hud.c2-win-placed .st-body { padding-bottom: 6px; }
.plates[hidden] { display: none; }
.plate { border: 1px solid var(--line); border-radius: 12px; padding: 2px 9px; font-size: 11px; cursor: pointer; color: #04110f; background: #94a3b8; }
.plate.st-spinning { background: #22c55e; } .plate.st-wobbling { background: #f59e0b; } .plate.st-stopped { background: #ef4444; color: #fff; } .plate.st-done { background: #64748b; color: #fff; }
.plate.big { display: inline-block; font-size: 14px; padding: 3px 12px; } .plate.flash { animation: plateflash 1s 4; }
@keyframes plateflash { 50% { box-shadow: 0 0 0 4px rgba(255, 255, 255, .6); } }
@media (max-width: 600px) { .lg-hud.st-hud { bottom: 64px; } }
.welcome .letter { line-height: 1.6; } .welcome .letter h1 { margin-top: 8px; } .welcome .letter code { background: var(--panel2); padding: 0 4px; border-radius: 4px; }
.welcome a.btn { background: var(--accent); color: var(--accent-ink); padding: 6px 14px; border-radius: 8px; text-decoration: none; font-weight: 600; }
@media print { .welcome a, .c2-top { display: none; } body.c2-page { background: #fff; color: #000; } }
/* companies without BDC (AIM Geo-Analytics): the map without radios, coverage and filing */
body.nobdc .layer[data-layer="wedges"], body.nobdc .layer[data-layer="coverage"], body.nobdc .layer[data-layer="fabric"], body.nobdc .layer[data-layer="dude"],
body.nobdc .layer[data-layer="clients"], body.nobdc .layer[data-layer^="links"], body.nobdc .layer[data-layer="sonar-clients"], body.nobdc .layer[data-layer="tickets"],
body.nobdc .layer[data-layer="plant-aerial"], body.nobdc .layer[data-layer="circuits"], body.nobdc .layer[data-layer="fcc-pal"], body.nobdc .layer[data-layer="sales"],
body.nobdc .tools [data-tool="site"], body.nobdc .tools [data-tool="sector"], body.nobdc .tools [data-tool="sandbox"], body.nobdc .tools #sbx-toggle, body.nobdc .tool-menu[data-menu="draw"],
body.nobdc .tabs [data-tab="sites"], body.nobdc .tabs [data-tab="devices"], body.nobdc .tabs [data-tab="equipment"], body.nobdc .plates, body.nobdc #stats { display: none; }
.dropzone { position: absolute; inset: 0; z-index: 70; background: rgba(13, 148, 136, .18); border: 3px dashed var(--accent); display: grid; place-items: center; pointer-events: none; }
.dropzone[hidden] { display: none; } .dropzone div { background: var(--panel); padding: 16px 22px; border-radius: 12px; text-align: center; box-shadow: var(--shadow); }
/* the floating chat window (bdc.js chatWindow) */
.chatwin { position: absolute; right: 16px; bottom: 60px; width: min(420px, calc(100vw - 32px)); max-height: 60vh; z-index: 40; display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.chatwin[hidden] { display: none; }
.chatwin header { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-bottom: 1px solid var(--line); cursor: move; user-select: none; touch-action: none; }
.chatwin header .hint { flex: 1; } .chatwin header button { background: none; border: 1px solid var(--line); color: var(--text); border-radius: 6px; cursor: pointer; padding: 0 7px; }
.chat-turns { overflow-y: auto; padding: 4px 10px; flex: 1; } .chatwin .askmore { padding: 8px; margin: 0; }
.chatpill { position: absolute; right: 16px; bottom: 60px; z-index: 40; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 16px; padding: 6px 14px; font-weight: 600; cursor: pointer; }
.chatpill[hidden] { display: none; }
.publib-head { margin-bottom: 4px; } .publib-cat { display: grid; gap: 1px; margin: 4px 0; } .publib-cat > small { color: var(--muted); text-transform: uppercase; letter-spacing: .5px; font-size: 10px; }
.publib-cat label { display: flex; gap: 6px; align-items: center; font-size: 12px; } .publib-ask form { display: grid; gap: 4px; margin-top: 4px; }
.publib-more summary { cursor: pointer; color: var(--muted); font-size: 12px; } .publib-dim { display: flex; justify-content: space-between; gap: 6px; align-items: center; opacity: .6; font-size: 12px; margin: 2px 0; }
.publib-dim:hover { opacity: 1; }

/* themes (Andy 2026-10-15: dark by default; a quick switch at top right, press and hold for personal theme settings) */
:root[data-theme="light"] { color-scheme: light; --bg: #eef2f6; --panel: rgba(255, 255, 255, .97); --panel2: #e6ebf1; --line: #c9d3dd; --text: #13202c;
  --muted: #5b6b7b; --accent: #0f766e; --accent-ink: #ffffff; --bar: #ffffff; --shadow: 0 8px 28px rgba(15, 30, 45, .18); }
:root[data-accent="blue"] { --accent: #3b82f6; --accent-ink: #fff; } :root[data-accent="amber"] { --accent: #f59e0b; --accent-ink: #1c1203; }
:root[data-accent="violet"] { --accent: #a78bfa; --accent-ink: #160b33; }
.theme-btn { background: none; border: 1px solid var(--line); border-radius: 6px; color: var(--text); cursor: pointer; padding: 2px 8px; font-size: 14px; }
.theme-pop { position: fixed; z-index: 80; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 10px 12px; display: grid; gap: 8px; min-width: 220px; }
.theme-pop[hidden] { display: none; } .theme-pop label { display: flex; justify-content: space-between; gap: 10px; align-items: center; font-size: 13px; }
body.nobdc .isp-only, body.nobdc #new-query,
body.nobdc #circ-new { display: none !important; }
/* the library tree: a category with select-all, its layers below; locked items greyed with a lock */
details.lib-cat > summary { display: flex; align-items: center; gap: 6px; padding: 5px 12px; cursor: pointer; font-size: 13px; list-style: none; }
details.lib-cat > summary::before { content: '\25B8'; width: 12px; color: var(--muted); transition: transform .1s; }
details.lib-cat[open] > summary::before { transform: rotate(90deg); }
details.lib-cat > summary small { color: var(--muted); }
details.lib-cat .lib-item { padding-left: 34px; }
.lib-item.locked { opacity: .55; cursor: default; }
.lib-item.locked .lock { width: 13px; text-align: center; }
#lib-locknote:empty { display: none; }
#lib-locknote { margin: 0 12px; color: var(--accent); }
/* the Data page: records and uploads as tables */
.datapage section { margin-top: 18px; }
.data-filter { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0; } .data-filter input { flex: 1; min-width: 180px; }
.data-table { overflow-x: auto; } .data-table table { border-collapse: collapse; width: 100%; font-size: 13px; }
.data-table th, .data-table td { text-align: left; padding: 4px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data-table th { color: var(--muted); font-weight: 600; }
.lib-company { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 6px 12px; border-top: 1px solid var(--line); font-size: 13px; }
.lib-company[hidden] { display: none; }
.dt-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin: 0 2px 0 6px; vertical-align: -1px; }
/* NOC view: big readable widgets, phone-friendly */
.noc-bar { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin: 8px 0; font-size: 13px; }
.noc-widgets { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.noc-w { border: 1px solid var(--line); border-left: 6px solid #22c55e; border-radius: 10px; padding: 10px 12px; background: var(--panel); display: grid; }
.noc-w.warn { border-left-color: #f59e0b; } .noc-w.bad { border-left-color: #ef4444; }
.noc-w b { font-size: 30px; line-height: 1.1; } .noc-w span { color: var(--muted); font-size: 12px; } .noc-w small { margin-top: 4px; font-size: 12px; }
.noc-ticker { font: 13px/1.5 ui-monospace, monospace; max-height: 140px; overflow: auto; margin-bottom: 8px; }
.noc-ticker .bad { color: #ef4444; } .noc-ticker .ok { color: #22c55e; } .noc-ticker .warn { color: #f59e0b; }
.noc-down { list-style: none; padding: 0; margin: 0; columns: 2 320px; font-size: 13px; }
.noc-down li { break-inside: avoid; padding: 3px 0; border-bottom: 1px solid var(--line); } .noc-down small { color: var(--muted); }
.noc-down details.noc-group > summary { cursor: pointer; } .noc-more { color: #ef4444; font-weight: 600; font-size: 12px; }
.noc-down .noc-kids { list-style: none; margin: 4px 0 2px 14px; padding: 0 0 0 8px; border-left: 2px solid var(--line); } .noc-down .noc-kids li { border-bottom: 0; }
.noc-web { margin: 14px 0; } .noc-web summary { cursor: pointer; font-weight: 600; }
.noc-web-body { overflow-x: auto; } .noc-web-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 6px; }
.noc-web-table th, .noc-web-table td { text-align: left; padding: 4px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.noc-web-table th { color: var(--muted); font-weight: 600; font-size: 12px; }
.noc-web-table tr.warn td:first-child { box-shadow: inset 3px 0 0 #d4a72c; } .noc-web-table tr.bad td:first-child { box-shadow: inset 3px 0 0 #e5534b; }
.noc-w small.age { color: var(--muted); } .noc-w small.stale { color: #f59e0b; font-weight: 600; }
/* the Tools menu on the ribbon: sections side by side, over the map */
.c2-top details.toolmenu { position: relative; }
.mods a, .c2-top details.toolmenu > summary { white-space: nowrap; }
.acctmenu .toolmenu-body { left: auto; right: 0; } .acctmenu .toolmenu-body b { text-transform: none; letter-spacing: 0; }
.c2-top details.toolmenu > summary { cursor: pointer; list-style: none; padding: 4px 8px; border-radius: 6px; color: var(--text); }
.c2-top details.toolmenu > summary::after { content: ' \25BE'; color: var(--muted); }
.c2-top details.toolmenu[open] > summary { background: var(--panel2); }
.toolmenu-body { position: absolute; top: calc(100% + 6px); left: 0; z-index: 60; display: flex; gap: 18px; padding: 10px 14px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); }
.toolmenu-body > div { display: grid; gap: 2px; min-width: 110px; } .toolmenu-body b { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin-bottom: 2px; }
.toolmenu-body a { padding: 3px 6px; border-radius: 5px; } .toolmenu-body a:hover { background: var(--panel2); }
.toolmenu-body { flex-wrap: wrap; } .toolmenu-body a.toolmenu-all { flex-basis: 100%; border-top: 1px solid var(--line, rgba(128,128,128,.25)); padding-top: 6px; font-size: 12px; color: var(--muted); }
@media (max-width: 600px) { .toolmenu-body { position: static; flex-direction: column; box-shadow: none; } }
.lcheck { margin: 8px 0; } .lcheck table { font-size: 12px; } .lcheck tr.bad td { color: #ef4444; } .lcheck tr.warn td { color: #f59e0b; }
.cov-baseline { margin: 4px 0; } .cov-baseline table { font-size: 12px; }
.lib-item .lchip { margin-left: 6px; font-size: 11px; padding: 0 6px; border-radius: 8px; background: var(--panel2); color: var(--muted); white-space: nowrap; }
/* a dataset's Terms card, the first time a person turns it on (modules/library; PUBLIC-DATA-CATALOGUE §9) */
.terms-card { position: fixed; z-index: 60; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(460px, calc(100vw - 32px));
  max-height: calc(100vh - 32px); overflow: auto; background: var(--panel); color: var(--text); border: 1px solid var(--line);
  border-radius: 12px; padding: 16px; box-shadow: 0 12px 40px rgba(0, 0, 0, .45); }
.terms-card h3 { margin: 0 0 8px; font-size: 16px; } .terms-card dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 10px; font-size: 13px; margin: 0 0 8px; }
.terms-card dt { color: var(--muted); } .terms-card dd { margin: 0; } .terms-card label { display: flex; gap: 6px; align-items: center; margin: 8px 0; font-weight: 600; }
.parcel-find { display: flex; gap: 4px; margin: 4px 0; } .parcel-find input { flex: 1; min-width: 0; }
.parcel-hits { list-style: none; margin: 0; padding: 0; font-size: 12px; display: grid; gap: 2px; } .parcel-hits small { color: var(--muted); }
/* weather alerts over our sites on the NOC view (modules/library/weather.py) */
.noc-weather { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 4px; font-size: 13px; }
.noc-weather li { border-left: 4px solid #f59e0b; padding: 4px 8px; background: var(--panel2); border-radius: 4px; }
.noc-weather li.bad { border-left-color: #dc2626; }
/* phones, the other pages (readiness, review, NOC, configs...: body.c2-page has no ☰ button, PM 2026-10-18 "phone /bdc/readiness has
   no nav at all"): the page links stay as a scrollable second row and the account links stay, without the email */
@media (max-width: 600px) {
  body.c2-page .c2-top { flex-wrap: wrap; }
  body.c2-page .c2-top .mods { display: flex; order: 3; flex: 1 0 100%; overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
  body.c2-page .c2-top .user { display: flex; margin-left: auto; gap: 4px; }
  body.c2-page .c2-top .user > span { display: none; }
}
/* spot checks (/bdc/spotcheck) */
.sc-list { list-style: none; padding: 0; display: grid; gap: 6px; } .sc-row { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.sc-row.done { border-left: 4px solid var(--accent); } .sc-row .ok { color: var(--accent); } .sc-more { margin-top: 6px; }
.sc-profile { width: 100%; max-width: 520px; height: 120px; background: var(--panel2); border-radius: 6px; }
/* the bottom picker says what it is (PM 2026-10-19: two "LAT (smoke)" dropdowns looked like the same control) */
.sheetbar .wslabel { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); }
/* a row that scrolls sideways fades at its right edge only while there is more to scroll to (fade.js sets .more; PM design
   review 2026-10-22: the old fixed fade over the last 15% made "Record" read "Recor..." even at the end) */
.fade-x.more { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); }
@media (max-width: 700px) {
  .sheetbar .wslabel { font-size: 0; } .sheetbar .wslabel select { font-size: 12px; }
}
/* companies as tabs beside the picker (PM 2026-10-19) */
.c2-top .co-chips { display: flex; gap: 2px; }
.c2-top .co-chips button { background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 12px; padding: 2px 9px; font-size: 12px; cursor: pointer; white-space: nowrap; }
.c2-top .co-chips button.on { background: var(--accent, #2563eb); border-color: transparent; color: #fff; }
/* phones and narrow windows: the same chips on a row of their own, scrolling sideways; the dropdown hides while they show
   (2-8 companies; otherwise only the dropdown). One company at a time, as on the desktop (PM design review 2026-10-22) */
@media (max-width: 900px) {
  .c2-top .co-chips { display: none; }
  .c2-top.has-chips { flex-wrap: wrap; }
  .c2-top.has-chips #company { display: none; }
  .c2-top.has-chips .co-chips { display: flex; order: 9; flex: 1 0 100%; min-width: 0; gap: 4px; overflow-x: auto; scrollbar-width: none; }
  .c2-top.has-chips .co-chips::-webkit-scrollbar { display: none; }
  .c2-top.has-chips .co-chips button { padding: 5px 12px; font-size: 13px; flex: none; }
}
/* image overlays: the corner pins and the placing bar (core/overlays.py) */
.ov-pin { width: 22px; height: 22px; border-radius: 50%; background: #f59e0b; color: #111; font: 700 12px/22px system-ui; text-align: center; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.5); cursor: grab; }
.ov-bar { position: absolute; top: 56px; left: 50%; transform: translateX(-50%); z-index: 5; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 13px; box-shadow: var(--shadow); max-width: calc(100% - 24px); }
.ov-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 6px; align-items: center; margin: 4px 0; } .ov-row input[type=range] { grid-column: 1 / -1; }

/* What's waiting on Andy (queue.js): a small panel on the map, minimized to one line */
.q-hud { position: absolute; left: 40px; bottom: 84px; z-index: 3; width: min(360px, calc(100vw - 20px)); max-height: 60vh; overflow: auto;
  background: var(--panel, #fff); color: var(--text, #222); border: 1px solid var(--line, #ccc); border-radius: 8px; box-shadow: 0 2px 10px rgba(0, 0, 0, .18); font-size: 13px; }
.q-hud.min { width: auto; }
.q-hud .q-toggle { display: flex; align-items: center; gap: 6px; width: 100%; padding: 6px 10px; background: none; border: 0; color: inherit; cursor: pointer; text-align: left; font: inherit; }
.q-hud .q-count { min-width: 1.6em; padding: 0 6px; border-radius: 10px; background: #8a8a8a; color: #fff; text-align: center; font-weight: 600; }
.q-hud .q-count.q-some { background: #c77700; }
.q-hud .q-arrow { margin-left: auto; }
.q-hud .q-now { margin: 0; padding: 0 12px 4px 30px; }
.q-hud .q-now li { margin: 4px 0; }
.q-hud p { margin: 4px 12px 8px; }
.queue .q-done { opacity: .55; }
@media (max-width: 600px) { .q-hud { bottom: 104px; max-height: 30vh; width: calc(100vw - 80px); } .q-hud.min { width: auto; } }

/* the floating Legend (legend.js, CR-18): the queue panel's look, docked bottom-right clear of the right edge tab and MapLibre's credits */
.lg-hud { position: absolute; right: 40px; bottom: 84px; z-index: 3; width: min(300px, calc(100vw - 20px)); max-height: 60vh; overflow: auto;
  background: var(--panel, #fff); color: var(--text, #222); border: 1px solid var(--line, #ccc); border-radius: 8px; box-shadow: 0 2px 10px rgba(0, 0, 0, .18); font-size: 13px; }
.lg-hud.min { width: auto; }
.lg-hud .q-toggle { display: flex; align-items: center; gap: 6px; width: 100%; padding: 6px 10px; background: none; border: 0; color: inherit; cursor: pointer; text-align: left; font: inherit; }
.lg-hud .q-count { min-width: 1.6em; padding: 0 6px; border-radius: 10px; background: #8a8a8a; color: #fff; text-align: center; font-weight: 600; }
.lg-hud .q-arrow { margin-left: auto; }
.lg-body { padding: 0 10px 8px; }
.lg-layer h4 { margin: 6px 0 2px; font-size: 12px; font-weight: 600; }
.lg-layer .tech-legend, .lg-layer .cov-legend { margin: 2px 0 4px; }
/* card 0336 slice 3b: My location links */
.ll-hud { width: min(380px, calc(100vw - 20px)); bottom: auto; top: 120px; max-height: 70vh; }
.ll-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 10px; cursor: move; }
.ll-close { background: none; border: 0; color: inherit; font-size: 18px; cursor: pointer; line-height: 1; }
.ll-body { padding: 0 10px 10px; }
.ll-form { display: grid; gap: 6px; margin: 6px 0; } .ll-form label { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ll-form input:not([type=number]) { flex: 1; min-width: 8em; } #ll-url { width: calc(100% - 70px); }
.ll-table { border-collapse: collapse; width: 100%; } .ll-table th, .ll-table td { text-align: left; padding: 2px 4px; border-bottom: 1px solid var(--line, #ccc); vertical-align: top; }
.ll-end-all { margin-top: 6px; }
.tk-hud { width: min(460px, calc(100vw - 20px)); bottom: auto; top: 140px; max-height: 70vh; overflow-y: auto; }
.tk-head { position: sticky; top: 0; z-index: 1; background: var(--panel, #fff); }
.tk-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 10px; cursor: move; }
.tk-close { background: none; border: 0; color: inherit; font-size: 18px; cursor: pointer; line-height: 1; }
.tk-body { padding: 0 10px 10px; } .tk-body input[readonly] { width: calc(100% - 8px); }
.tk-table { border-collapse: collapse; width: 100%; } .tk-table th, .tk-table td { text-align: left; padding: 2px 4px; border-bottom: 1px solid var(--line, #ccc); vertical-align: top; }
.tk-table button { margin-right: 4px; }
.tk-alert-list { list-style: none; margin: 0 0 8px; padding: 0; } .tk-alert { padding: 2px 4px; border-left: 3px solid; margin-bottom: 2px; }
.tk-alert.open { border-color: #dc2626; color: #dc2626; } .tk-alert.closed { border-color: var(--line, #ccc); opacity: .75; } .tk-all { font-weight: normal; }
@media (max-width: 600px) { .tk-hud { top: 60px; max-height: 70vh; width: calc(100vw - 20px); right: 10px; } }
@media (max-width: 600px) { .lg-hud { right: 8px; bottom: 104px; max-height: 30vh; width: calc(100vw - 80px); } .lg-hud.min { width: auto; } }
@media (max-width: 600px) { .ll-hud { top: 60px; bottom: auto; max-height: 70vh; width: calc(100vw - 20px); right: 10px; } }

/* window chrome (chrome.js, CR-19): a panel moved or resized by the person; the corner grip is drawn, not an element */
.c2-win-placed { max-height: none; }
.c2-win.min.c2-win-placed { height: auto !important; }      /* keeps its width: the header stays under the pointer (a double-click docks it) */
.c2-win-back { z-index: 2 !important; }                  /* the panel last touched stays on top (3), still under the edge panels (4) */
.c2-win-moving, .c2-win-moving * { user-select: none; cursor: grabbing !important; }
@media (max-width: 600px) {                               /* card 0311: a finger-sized corner grip on the phone */
  .c2-win:not(.min) { background-image: linear-gradient(135deg, transparent 0 50%, var(--muted, #888) 50% 58%, transparent 58% 70%, var(--muted, #888) 70% 78%, transparent 78%);
    background-repeat: no-repeat; background-position: right 3px bottom 3px; background-size: 18px 18px; }
  .sheetbar .win-icon { width: 32px; height: 32px; font-size: 14px; }
}
@media (min-width: 601px) {
  .c2-win .q-head { cursor: grab; }
  .c2-win:not(.min) { background-image: linear-gradient(135deg, transparent 0 55%, var(--muted, #888) 55% 62%, transparent 62% 75%, var(--muted, #888) 75% 82%, transparent 82%);
    background-repeat: no-repeat; background-position: right 2px bottom 2px; background-size: 10px 10px; }
}

/* work orders: notes and "ask C2" (work_orders.js) */
.wo-notes { margin-top: 6px; min-width: 220px; }
.wo-note { margin: 4px 0; font-size: 13px; }
.wo-answer { margin: 2px 0 0 10px; white-space: pre-wrap; }
.wo-ask { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: 4px; }
.wo-ask input[type=text] { flex: 1 1 160px; min-width: 0; }

/* control panel (controls.html): categories as a tree */
.ctl details { margin: 4px 0; }
.ctl summary { cursor: pointer; padding: 4px 0; }
.ctl .ctl-branch > summary { font-size: 16px; }
.ctl .ctl-cat { margin-left: 18px; }
.ctl .ctl-items { margin: 2px 0 8px 22px; padding: 0; list-style: none; }
.ctl .ctl-items li { margin: 4px 0; }
.ctl .ctl-items a, .ctl .ctl-items a:visited { color: var(--accent); text-decoration: none; } .ctl .ctl-items a:hover, .ctl .ctl-items a:focus-visible { text-decoration: underline; }   /* C2 teal, not the browser blue/purple (card 0309) */

/* two-factor sign-in (auth/twofactor.html) */
.tfa .tfa-qr { margin: 8px 0; }
.tfa .tfa-qr svg { background: #fff; padding: 6px; border-radius: 4px; }
.tfa .tfa-codes { columns: 2; list-style: none; padding: 0; font-size: 16px; }
.tfa input[name=code] { font-size: 18px; letter-spacing: 2px; width: 9em; }

/* access at a glance (access_map.html): tree on the left, people x companies on the right */
.amap .am-wrap { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.amap .am-tree { flex: 0 0 240px; max-width: 100%; }
.amap .am-tree ul { list-style: none; margin: 0; padding-left: 14px; }
.amap .am-tree > ul { padding-left: 0; }
.amap .am-co { background: none; border: 0; color: inherit; cursor: pointer; padding: 2px 4px; font: inherit; text-align: left; }
.amap .am-co.on { background: var(--panel2, #eee); border-radius: 4px; font-weight: 600; }
.amap .am-grid { flex: 1 1 400px; min-width: 0; }
.amap .am-scroll { overflow-x: auto; }
.amap .am-table th[scope=row] { white-space: nowrap; text-align: left; }
.amap .am-table td { text-align: center; white-space: nowrap; }
.amap .am-mods { margin-top: 18px; }
.amap .am-mods ul { list-style: none; margin: 0; padding-left: 16px; }
.amap .am-mods summary { cursor: pointer; padding: 2px 0; }
.amap .am-mods .am-off { opacity: .55; }
.amap .am-admin { color: #e0a33a; font-weight: 600; }
.amap .am-full { color: #4fb37a; }
.amap .am-inh { opacity: .5; font-style: italic; }

/* team board tab (queue.js, core/board.py): % on the left, a colour dot: green done, blue not started, green ring in
   progress, green with a red centre when it needs Andy or is stuck */
.q-hud.q-right { left: auto; right: 40px; }
.q-hud .q-head { display: flex; align-items: center; }
.q-hud .q-head .q-toggle { flex: 1; }
.q-hud .q-side { margin-right: 6px; }
.q-hud .q-tabs { display: flex; gap: 2px; padding: 0 8px 4px; }
.q-hud .q-tabs button { flex: 1; padding: 3px 6px; font-size: 12px; background: none; border: 1px solid var(--line, #ccc); color: inherit; border-radius: 6px; cursor: pointer; }
.q-hud .q-tabs button.on { background: var(--panel2, #eee); font-weight: 600; }
.q-hud .q-board { padding: 0 10px 6px; }
.q-hud .b-seat > summary, .q-hud .b-setup > summary, .q-hud .b-sec > summary { cursor: pointer; padding: 3px 0; }
.q-hud .b-sec { margin-left: 12px; }
.q-hud .b-items { list-style: none; margin: 0 0 4px; padding: 0 0 0 4px; }
.q-hud .b-item { display: flex; align-items: baseline; gap: 6px; margin: 3px 0; }
.q-hud .b-pct { min-width: 2.8em; text-align: right; font-variant-numeric: tabular-nums; color: var(--muted, #888); font-size: 12px; }
.q-hud .b-dot { flex: 0 0 10px; width: 10px; height: 10px; border-radius: 50%; position: relative; top: 1px; box-sizing: border-box; }
.q-hud .b-done { background: #2fa36b; }
.q-hud .b-todo { background: #3a7bd5; }
.q-hud .b-doing { border: 2px solid #2fa36b; }
.q-hud .b-help { background: #2fa36b; box-shadow: inset 0 0 0 3px #2fa36b, inset 0 0 0 5px #d64545; background: radial-gradient(circle, #d64545 0 35%, #2fa36b 40%); }
.q-hud .b-title { flex: 1; min-width: 0; }
.q-hud .b-actors { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 6px; }
.q-hud .b-actor { border: 1px solid var(--line, #ccc); border-left-width: 5px; border-radius: 8px; padding: 5px 8px; }
.q-hud .b-ahead { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.q-hud .b-aage { margin-left: auto; }
.q-hud .b-adot { width: 9px; height: 9px; border-radius: 50%; background: currentColor; align-self: center; }
.q-hud .b-adoing { margin-top: 2px; overflow-wrap: anywhere; }
.q-hud .b-abar { height: 5px; background: var(--line, #ddd); border-radius: 3px; margin: 4px 0 2px; overflow: hidden; }
.q-hud .b-abar span { display: block; height: 100%; background: currentColor; opacity: .7; }
.q-hud .b-alert { color: #d64545; font-weight: 600; margin: 2px 0 6px; }
.q-hud .tone-ok { border-left-color: #2e9e5b; } .q-hud .tone-ok .b-adot { color: #2e9e5b; }
.q-hud .tone-wait { border-left-color: #d49a1a; } .q-hud .tone-wait .b-adot { color: #d49a1a; }
.q-hud .tone-bad { border-left-color: #d64545; } .q-hud .tone-bad .b-adot { color: #d64545; }
.q-hud .tone-quiet { border-left-color: #8888; } .q-hud .tone-quiet .b-adot { color: #888; }

/* the property sheet of an uploaded feature (bdc.js showFeature, 1ag): a dense two-column grid, values edited in place */
.fs-grid { width: 100%; border-collapse: collapse; font-size: 13px; }
.fs-grid th { text-align: left; font-weight: 500; color: var(--muted); padding: 3px 8px 3px 0; vertical-align: top; width: 38%; word-break: break-word; }
.fs-grid td { padding: 3px 0; vertical-align: top; word-break: break-word; }
.fs-grid .fs-v[tabindex] { cursor: text; }
.fs-grid .fs-v[tabindex]:hover { background: rgba(255,255,255,.05); }
.fs-grid .fs-act { white-space: nowrap; text-align: right; width: 1%; }
.fs-in { width: 100%; }
.fs-add { display: flex; gap: 4px; margin: 6px 0; }
.fs-add input { flex: 1 1 0; min-width: 0; }
.fs-hist { list-style: none; padding: 0; margin: 0; font-size: 13px; }
.fs-hist > li { padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
.fs-hist ul { margin: 2px 0 2px 16px; padding: 0; }
/* re-upload into a layer (data.js, C-16 step 3): a value changed in C2 since the upload stands out */
.ps-diff tr.lr-here td { background: rgba(245, 158, 11, .12); }
/* the treebar's Plan tab (CR-35) */
.q-plan .p-search { width: 100%; margin: 0 0 6px; font: inherit; padding: 4px 6px; }
.q-plan .p-tree, .q-plan .p-tree ul { padding-left: 12px; }
.q-plan .p-branch { list-style: none; }
.q-plan .p-gone { opacity: .55; text-decoration: line-through; }
.q-plan .p-card { margin: 4px 0 8px 22px; padding: 6px 8px; border-left: 3px solid var(--line, #ccc); }
.q-plan .p-card blockquote { margin: 0 0 4px; font-style: italic; }
.q-plan .p-card cite { display: block; font-style: normal; font-size: 11px; color: var(--muted); }
/* companies as super-layers (super.js, 1ah): the eye beside each chip, All, the shown list, the read-only badge */
.co-eye, .co-all { background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 12px; min-width: 32px; min-height: 28px; padding: 0 6px; cursor: pointer; font-size: 13px; }
.co-eye.on, .co-all.on { border-color: currentColor; }
.co-all.on { color: var(--text); }
.co-shown { padding: 6px 10px; border-bottom: 1px solid var(--line); }
.co-shown .co-row { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.co-shown .co-row i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.co-readonly .co-badge { margin: 0 0 6px; padding: 3px 8px; border-left: 4px solid; }

/* Publish… on a sheet (shell/publish.js, core/publish.py) */
.pub-dialog { max-width: min(760px, calc(100vw - 32px)); width: 100%; max-height: calc(100vh - 32px); overflow: auto; background: var(--panel, #111827); color: var(--text, #e2e8f0); border: 1px solid var(--line); border-radius: 10px; }
.pub-form label { display: block; margin: 6px 0; } .pub-form input[name=title], .pub-form input[name=origins] { width: 100%; }
.pub-layers, .pub-list { list-style: none; padding: 0; } .pub-layers li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.pub-f[hidden], .pub-web[hidden], .pub-viewers[hidden] { display: none !important; } .pub-aud { border: 1px solid var(--line); border-radius: 6px; margin: 6px 0; } .pub-aud label { display: block; } .pub-tag { font-size: 11px; border: 1px solid var(--line); border-radius: 8px; padding: 0 6px; } .pub-vlist { list-style: none; padding: 0; } .pub-vadd input { min-width: 220px; }
.pub-no { opacity: .6; } .pub-f { display: inline-block !important; margin: 2px 10px 2px 0 !important; font-size: 13px; }
.pub-kinds, .pub-fields { margin-left: 22px; font-size: 13px; }
.pub-frame { width: 100%; height: 420px; border: 1px solid var(--line); border-radius: 8px; margin-top: 8px; background: #fff; }
.pub-url { width: min(100%, 520px); } .pub-msg.bad { color: #f87171; } .pub-actions { margin: 8px 0; }

/* Phone window (card 0059): same window family as Legend and Status, bottom right under the Legend */
.ph-hud { right: 10px; bottom: 44px; width: min(320px, calc(100vw - 20px)); max-height: 60vh; overflow: auto; }
.ph-hud.min { width: auto; }
.ph-tabs { display: flex; gap: 4px; padding: 4px 10px; }
.ph-tabs button { flex: 1; padding: 4px 6px; border: 1px solid #8a8a8a; border-radius: 6px; background: none; color: inherit; cursor: pointer; font: inherit; }
.ph-tabs button.on { background: #2a7; color: #04110f; border-color: #2a7; }
.ph-main { padding: 4px 10px; }
.ph-main h4 { margin: 6px 0 2px; }
.vw-hud { right: 60px; bottom: 44px; width: min(340px, calc(100vw - 20px)); max-height: 60vh; overflow: auto; }
.vw-hud.min { width: auto; }
.vw-modes { padding: 4px 10px; }
.vw-hint { margin: 2px 10px; }
.vw-log { list-style: none; margin: 0; padding: 4px 10px; max-height: 30vh; overflow: auto; }
.vw-log li { margin: 3px 0; } .vw-log .vw-note { opacity: .7; font-style: italic; } .vw-log .vw-me { color: #8bd; }
.vw-form { display: flex; gap: 4px; padding: 4px 10px 8px; } .vw-text { flex: 1; min-width: 0; }
.vw-mic.on { background: #c33; color: #fff; }
@media (max-width: 600px) { .vw-hud { right: 8px; bottom: 64px; } }
@media (max-width: 600px) { .ph-hud { right: 8px; bottom: 64px; } }

/* card 0083 slice 1: a minimized window is a letter icon at the right end of the bottom ribbon */
.c2-win.c2-win-iconized { display: none !important; }
.sheetbar .win-icon { width: 24px; height: 24px; padding: 0; border-radius: 6px; border: 1px solid var(--line); background: var(--panel2); color: var(--text); font-size: 12px; font-weight: 700; cursor: pointer; flex: 0 0 auto; }
.sheetbar .win-icon:hover { border-color: var(--accent, #4ea1ff); }
.sheetbar .win-icon-first { margin-left: auto; }

/* card 0083 slice 2: every window scrolls its own rows, and once resized it is as tall as the person made it (rows are never cut off) */
.c2-win { overflow: auto; overscroll-behavior: contain; }
.c2-win-placed { max-height: none !important; }

/* card 0083 slice 3: the ribbon's caret drop-downs */
.tool-menu { position: relative; display: inline-flex; }
.tools .tool-caret .caret { font-size: 10px; opacity: .8; }
.tools .tool-caret.on { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.tool-pop { position: fixed; z-index: 60; display: flex; flex-direction: column; min-width: 150px; padding: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
.tool-pop[hidden] { display: none; }
.tool-pop button { text-align: left; white-space: nowrap; }
.tool-pop button:hover:not(:disabled) { background: var(--panel2); }
.tool-pop .tool-toggle { font-size: 12px; opacity: .9; }
.tools.menu-open { -webkit-mask-image: none !important; mask-image: none !important; }   /* the fade would hide an open drop-down */

/* card 0083 slice 4: what the colours mean lives in the Legend window (legend.js copies these blocks and keeps their switches working);
   the Layers tab keeps the tick boxes, sliders and the company-data filter */
#layers .layer > .tech-legend, #layers .layer > .cov-legend { display: none; }

/* card ops1/0035 step 2: a layer shown in a second group (its home row holds the controls) */
.layer-alias { padding: 2px 6px; font-size: 13px; opacity: .85; } .layer-alias a { font-size: 11px; margin-left: 4px; }
.layer-alias.lhidden { display: none; } .layer.aflash { outline: 2px solid var(--accent, #3b82f6); outline-offset: 1px; }
.ai-place { border: 0; background: none; padding: 0; color: var(--accent, #3b82f6); text-decoration: underline; cursor: pointer; font: inherit; font-size: 12px; }
/* card ops1/0035 step 4: drag a layer's grip onto another layer to change the drawing order */
.layer .lgrip { cursor: grab; color: var(--muted); padding: 0 3px; user-select: none; } .layer .lgrip[hidden] { display: none; }
.layer.ldragging { opacity: .5; } .layer.ldrop { box-shadow: inset 0 2px 0 var(--accent, #3b82f6); }

.ub-retired, .ub-pending { opacity: .75; border-style: dashed; } .ub-retired h2, .ub-pending h3 { color: var(--muted); }
.amap .am-pick { font: inherit; padding: 1px 2px; max-width: 9em; }
.amap .am-who { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-decoration: underline dotted; }
.amap .am-person { margin-top: 16px; }
.amap .am-person h2 { font-size: 1.05em; margin: 0 0 6px; }


/* radio history panel (card 0098) */
.rh-win { display: flex; gap: 4px; margin: 4px 0 8px; }
.rh-win .mini-btn.on { background: rgba(255,255,255,.14); color: var(--text); }
.rh-group h5, .rh h5 { margin: 10px 0 2px; font-size: 12px; color: var(--muted); }
.rh-svg { width: 100%; height: 70px; background: rgba(255,255,255,.04); border-radius: 4px; }
.rh-key { font-size: 11px; display: flex; flex-wrap: wrap; gap: 8px; }
.rh-events { list-style: none; margin: 0; padding: 0; font-size: 12px; }
.rh-events li { padding: 2px 0 2px 8px; border-left: 3px solid var(--muted); margin: 2px 0; }
.rh-events li.warning { border-color: #f59e0b; } .rh-events li.critical { border-color: #ef4444; } .rh-events li.reboot { border-color: #38bdf8; }
.rh-notes { font-size: 11px; color: var(--muted); padding-left: 16px; }

/* card ops3/0128: seat details on the Team tab */
.q-hud .b-det { margin-top: 4px; }
.q-hud .b-dsec ul { margin: 2px 0 4px; padding-left: 16px; font-size: 12px; }
.q-hud .b-dsec li.hint { list-style: none; margin-left: -16px; }
.q-hud .b-dtabs li.b-overdue { color: var(--bad, #b00020); }
/* card 0162: case badge and the read-only case panel on the NOC page */
.noc-case { font-size: 12px; }
.noc-case-dlg { max-width: min(720px, 94vw); max-height: 85vh; overflow: auto; }
.noc-case-dlg h3 small { font-weight: 400; color: #6b7280; }
.noc-case-sec h4 { margin: 12px 0 4px; }
.noc-case-row { margin: 2px 0; overflow-wrap: anywhere; }
/* the plant as of a date (card 0176) */
.asof-bar { padding: 2px 8px 6px; }
.asof-bar input[type=date] { background: var(--panel2); color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; }
.asof-strip { display: block; margin-top: 4px; padding: 4px 8px; border-radius: 6px; background: var(--panel2); border: 1px solid var(--line); font-size: 12px; }
.asof-strip[hidden] { display: none; }

/* Map columns step (card 0195) */
.mapcols { margin: 6px 0; padding: 8px; border: 1px solid var(--line, #374151); border-radius: 6px; display: block; }
.mapcols h4 { margin: 0 0 6px; }
.maptab { border-collapse: collapse; width: 100%; font-size: 13px; } .maptab th, .maptab td { text-align: left; padding: 2px 6px 2px 0; vertical-align: middle; }
.maptab select { max-width: 150px; } .mapchk ul { margin: 4px 0; padding-left: 18px; }

/* Setup / Network pages as map windows (windows.js, card 0193): one iframe under a header, same look as the other map windows */
.pw-hud { position: absolute; left: 60px; top: 60px; z-index: 3; width: min(960px, calc(100% - 120px)); height: min(70vh, calc(100% - 120px)); display: flex; flex-direction: column; overflow: hidden !important;
  background: var(--panel, #fff); color: var(--text, #222); border: 1px solid var(--line, #ccc); border-radius: 8px; box-shadow: 0 2px 10px rgba(0, 0, 0, .18); font-size: 13px; }
.pw-hud[hidden] { display: none !important; }   /* wins over .pw-hud.c2-win-placed below: a moved window closed white (Andy 11-18) */
.pw-hud.min { width: auto; height: auto; }
.pw-hud .pw-head { display: flex; align-items: center; flex: 0 0 auto; }
.pw-hud .q-toggle { display: flex; align-items: center; gap: 6px; flex: 1; padding: 6px 10px; background: none; border: 0; color: inherit; cursor: pointer; text-align: left; font: inherit; }
.pw-hud .q-arrow { margin-left: auto; }
.pw-hud .pw-new, .pw-hud .pw-x { padding: 4px 8px; background: none; border: 0; color: inherit; cursor: pointer; text-decoration: none; font: inherit; }
.pw-hud .pw-frame { flex: 1 1 auto; width: 100%; min-height: 0; border: 0; border-top: 1px solid var(--line, #ccc); background: var(--panel, #fff); visibility: hidden; }
.pw-hud .pw-frame.ready { visibility: visible; }
.pw-hud.min .pw-frame { display: none; }
.pw-hud.c2-win-placed { display: flex; }
@media (max-width: 600px) { .pw-hud { left: 4px; top: 4px; width: calc(100% - 8px); height: calc(100% - 100px); } }

/* 0206: the Tools library (tools.js) */
.tools .tool-off, .tools .tool-menu.tool-off { display: none !important; }
.tools-box { width: min(460px, 100%); height: min(560px, 100%); }
.tools-box .lib-filter { padding: 8px 14px; } .tools-box .lib-filter input { width: 100%; }
.tools-list { width: auto; flex: 1; border-right: 0; padding: 4px 14px 8px; }
.tools-group { margin: 10px 0 2px; font-weight: 600; text-transform: uppercase; font-size: 11px; }
.tools-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; cursor: pointer; }
.tools-box footer .hint { flex: 1; }

/* access review screen (card ops3/0211) */
.amap .am-review { margin-top: 1rem; }
.amap .am-changes { margin-top: .6rem; }
.amap .am-changes ul { margin: .3rem 0; padding-left: 1.1rem; font-size: .9em; }
.amap .am-changes li { margin: .15rem 0; overflow-wrap: anywhere; }
.amap .am-review-table .am-flagged { background: rgba(245, 158, 11, .12); }
.amap .am-flag { display: inline-block; margin: 0 .25rem .15rem 0; padding: 0 .4rem; border-radius: .6rem; font-size: .8em; background: rgba(245, 158, 11, .25); }
.amap .am-review textarea { width: 100%; box-sizing: border-box; }
.amap .am-review-btn.am-due { font-weight: 700; }

/* support access panel (card 0221) */
.amap .am-support { margin-top: 1rem; } .amap .am-support h3 { font-size: 13px; margin: .8rem 0 .3rem; }
.amap .am-support li { margin: .3rem 0; } .amap .am-sup-form input[type=text] { min-width: 12rem; max-width: 100%; } .amap .am-support-reason { white-space: pre-wrap; overflow-wrap: anywhere; }
.heat-ctl { margin: 4px 0 2px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.heat-ctl .heat-mode.on { background: var(--accent, #2563eb); color: #fff; }
.heat-ctl .heat-weak { width: 4.5em; }

.fs-redraw { margin: 8px 0 0; }
.fs-rd-bar { margin-top: 8px; padding: 8px; border: 1px solid var(--border, #ccc); border-radius: 6px; }
.rd-v { width: 14px; height: 14px; border-radius: 50%; background: #e8590c; border: 2px solid #fff; box-shadow: 0 0 0 1px #0006; cursor: grab; }
.rd-v.sel { background: #1971c2; width: 18px; height: 18px; }
.rd-m { width: 10px; height: 10px; border-radius: 50%; background: #fff8; border: 2px solid #e8590c; cursor: copy; }

/* card 0260: new-ticket toasts and possible-outage markers */
.tk-toasts { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 30; max-width: min(360px, calc(100vw - 32px)); }
.tk-toast { background: var(--panel2); border: 1px solid var(--line); border-left: 4px solid #f43f5e; border-radius: 8px; color: var(--text); padding: 8px 12px; font-size: 13px; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.35); }
.tk-alerts { margin: 4px 0 0; font-size: 12px; } .tk-alerts summary { cursor: pointer; color: var(--muted, #9aa); } .tk-alerts label { display: block; margin: 2px 0; } .tk-alerts .tka-msg { color: var(--text); }
.tk-outage { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; background: #dc2626; color: #fff; font-weight: 700; cursor: pointer; padding: 0; }

/* card 0286: Timeline panel */
.tl-body { margin-top: 6px; }
.tl-kinds { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 12px; }
.tl-dates { display: flex; gap: 4px; align-items: center; margin: 6px 0; }
.tl-dates input[type=date] { font-size: 12px; min-width: 0; }
.tl-scrub { display: flex; align-items: flex-end; gap: 2px; height: 44px; overflow-x: auto; }
.tl-bar { flex: 1 0 8px; min-width: 8px; padding: 0; border: 0; background: #94a3b8; border-radius: 2px 2px 0 0; cursor: pointer; }
.tl-bar.on { background: #2563eb; }
.tl-list { list-style: none; margin: 6px 0 0; padding: 0; max-height: 260px; overflow-y: auto; }
.tl-list li { border-left: 4px solid #2563eb; padding: 3px 6px; margin-bottom: 3px; cursor: pointer; font-size: 12px; background: rgba(127,127,127,.08); }
.tl-list li.on { outline: 2px solid #111; }
.tl-list li.tl-empty { cursor: default; border-left-color: transparent; }
.tl-chip { display: inline-block; padding: 0 6px; margin-right: 6px; border-radius: 8px; background: rgba(127,127,127,.25); font-size: 11px; }
.tl-skipped { color: #6b7280; font-size: 11px; }
/* card ops3/0386: the device window */
.nw-dlg { max-width: min(760px, 94vw); width: 100%; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: inherit; }
.nw-tabs { display: flex; gap: 6px; margin: 8px 0; } .nw-tabs button.on, .nw-hours button.on { border-color: #38bdf8; font-weight: 600; }
.nw-table { width: 100%; border-collapse: collapse; font-size: 13px; } .nw-table th, .nw-table td { text-align: left; padding: 3px 6px; border-bottom: 1px solid var(--line); }
.nw-table tr.nw-open td { color: #ef4444; font-weight: 600; }
.nw-kv { display: grid; grid-template-columns: 90px 1fr; gap: 4px 10px; } .nw-kv dt { color: var(--muted); } .nw-kv dd { margin: 0; }
.nw-src { color: var(--muted); } .nw-why.bad { color: #ef4444; } .nw-why.ok { color: #22c55e; } .nw-warn { color: #f59e0b; }
.nw-hist { margin: 8px 0; } .nw-spark { display: block; background: rgba(127,127,127,.08); border-radius: 4px; }
.noc-poller li { cursor: pointer; } .noc-poller button { background: none; border: 0; color: inherit; text-align: left; cursor: pointer; padding: 2px 0; }
.lib-item .lopen { width: 13px; text-align: center; opacity: .6; }
.lib-item .lopenlink { margin-left: auto; font-size: 11px; color: var(--accent, #4fd1c5); }

/* card 0332 slice 3: no half-built bar on the first paint; bdc.js removes c2-booting when the Tools menu is in */
body.c2-booting .c2-top > :not(.brand), body.c2-booting .tools { visibility: hidden; animation: c2-bar-show 0s 4s forwards; }
@keyframes c2-bar-show { to { visibility: visible; } }   /* fail-safe without JS: a script error can't keep the bar hidden */
.tk-rules { border-top: 1px solid var(--line, #ccc); margin-top: 6px; } .tk-rule { margin: 4px 0; padding: 4px 6px; } .tk-rule input { max-width: 9em; } .tk-rule input[name="notify"], .tk-rule input[name="name"] { max-width: 14em; } .tk-rule button { margin-right: 4px; }

/* Access requests (card 0471): phone first, one column of cards, big buttons */
main.grants .gr-card { border: 1px solid var(--line, #ccc); border-radius: 8px; padding: 10px 12px; margin: 10px 0; max-width: 760px; }
main.grants ul.gr-list { list-style: none; padding: 0; margin: 0; }
main.grants .gr-act { display: block; margin: 6px 0; }
main.grants fieldset { border: 0; padding: 0; margin: 8px 0; }
main.grants legend { font-weight: 600; text-transform: capitalize; }
main.grants .gr-big { min-height: 44px; padding: 0 16px; }
main.grants .gr-risk { font-size: 0.8em; border-radius: 10px; padding: 1px 8px; border: 1px solid currentColor; white-space: nowrap; }
main.grants .gr-none { color: var(--ok, #2a7); } main.grants .gr-capacity { color: #b80; }
main.grants .gr-brief_outage, main.grants .gr-config_change { color: var(--err, #c33); }
@media (max-width: 480px) { main.grants input[size] { width: 100%; box-sizing: border-box; } }

/* card ops3/0280: My status + team list in the Team layer row */
.team-mine label { display: block; margin: 4px 0; font-size: 12px; }
.team-mine select, .team-mine input { width: 100%; box-sizing: border-box; }
.team-list { width: 100%; font-size: 12px; border-collapse: collapse; margin-top: 4px; }
.team-list td { padding: 2px 4px; border-top: 1px solid var(--line, #e5e7eb); vertical-align: top; overflow-wrap: anywhere; }

/* card 0317: C2 decide's triage chip on a NOC down row */
.noc-sugg { display: inline-block; font-size: 11px; padding: 0 6px; border-radius: 9px; border: 1px solid currentColor; margin-left: 4px; white-space: nowrap; }
.noc-sugg.strong { font-weight: 600; }
.noc-sugg.muted { opacity: .7; }

/* card ops2/0546: edit in place in the device table */
.devtable .gedit { cursor: text; } .devtable .gform { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; } .devtable .gform input { min-width: 8em; }
.devtable .pmark { background: none; border: 0; color: var(--accent, #38bdf8); cursor: pointer; padding: 0 2px; font-size: .8em; }
.devtable .ppop { display: block; font-size: .85em; color: var(--muted, #94a3b8); max-width: 28em; white-space: normal; }
/* 3D path view (card ops2/0548) */
.p3d { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; padding: 16px; }
.p3d-box { background: var(--panel, #111827); color: var(--text, #e5e7eb); border-radius: 10px; padding: 12px; width: min(940px, 100%); max-height: 100%; overflow: auto; }
.p3d-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.p3d-canvas { width: 100%; height: auto; display: block; border-radius: 6px; touch-action: none; cursor: grab; }
.p3d-tools { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 13px; }
@media (max-width: 600px) { .p3d { padding: 0; } .p3d-box { border-radius: 0; height: 100%; } }
