/* ---------- map deck (panels over the map) ---------- */
.deck { position: absolute; inset: 0; pointer-events: none; }
.deck > * { pointer-events: auto; }
.deck-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; font: 600 11.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink2); margin-bottom: 8px; }
.prefs-note { margin-top: 8px; font-size: 11.5px; color: var(--ink3); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.prefs-note a { font-weight: 600; }
.list-tools { display: flex; gap: 6px; margin-bottom: 8px; }
.list-tools .inp { flex: 1; height: 32px; }
.list-tools select.inp { flex: 0 0 auto; }
.scroll { overflow: auto; flex: 1; margin: 0 -4px; padding: 0 4px; }
.ent { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 8px 8px; border-radius: 10px; cursor: pointer; border: 1px solid transparent; }
.ent:hover, .ent.sel { background: var(--hover); border-color: var(--line); }
.ent .n { font-weight: 600; font-size: 12.5px; line-height: 1.3; color: var(--ink); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ent .s { grid-column: 1; font-size: 11px; color: var(--ink3); }
.ent .c { grid-row: 1 / span 2; grid-column: 2; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.nb { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--coral); color: #fff; font: 700 11px var(--font); }
.nb.zero { background: var(--line); color: var(--ink3); }
.oc { font: 600 11px var(--mono); color: var(--green); }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { padding: 8px 4px; border-bottom: 1px solid var(--line); font-size: 12px; line-height: 1.35; }
.feed li.fresh { animation: rise .5s ease, flash 3s ease; }
.feed li a { color: var(--ink); display: block; text-decoration: none; }
.feed li a:hover { color: var(--aqua); }
.feed .ft { display: inline-block; font: 600 10px var(--mono); padding: 1px 6px; border-radius: 5px; margin-right: 4px; color: var(--green); background: color-mix(in srgb, var(--green) 14%, transparent); }
.feed .ft.c { color: var(--amber); background: color-mix(in srgb, var(--amber) 14%, transparent); }
.feed .fm { display: block; color: var(--ink3); font-size: 11px; margin-top: 3px; }
.lp-sec { font: 600 10px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--aqua); margin: 14px 0 6px; }
.legend { display: grid; gap: 6px; margin-top: 10px; font-size: 11.5px; color: var(--ink2); }
.legend .lg { display: flex; align-items: center; gap: 8px; }
.legend i { flex: 0 0 auto; display: inline-block; width: 12px; height: 12px; border-radius: 50%; }
.legend i.sq { border-radius: 3px; transform: rotate(45deg); width: 10px; height: 10px; }
.legend i.ring { background: transparent !important; border: 2px solid; }
.credits { font-size: 10.5px; margin-top: 10px; line-height: 1.4; color: var(--ink3); }
.deck-card { position: absolute; left: 396px; top: 12px; width: 400px; max-height: calc(100% - 24px); overflow: auto; padding: 14px 16px; animation: rise .3s ease; }
.dc-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 8px 0 10px; }
.dc-kpis div { padding: 8px; border-radius: 10px; background: var(--hover); }
.dc-kpis b { display: block; font: 700 19px var(--display); } .dc-kpis span { font-size: 10px; color: var(--ink3); }
.dc-wx { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; padding: 8px 10px; border-radius: 10px; background: color-mix(in srgb, var(--blue) 9%, transparent); }
.dc-list { margin-top: 8px; display: grid; gap: 2px; }
.dc-it { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 8px; border-radius: 10px; color: var(--ink); text-decoration: none !important; font-size: 12.5px; }
.dc-it:hover { background: var(--hover); }
.dc-it .cd { min-width: 0; }
.dc-meta { font-size: 12px; color: var(--ink3); margin-top: 2px; }
.map-tip { font-size: 12px; } .map-tip span { color: var(--ink3); }

/* Map page: clean on opening — a slim row of layer buttons, a panel only when a layer is on, the basemap picker. */
.map-deck { --mc-top: calc(12px + var(--mc-h, 44px) + 8px); }
.map-chips { position: absolute; top: 12px; left: 12px; max-width: calc(100% - 24px); display: flex; flex-wrap: wrap; gap: 5px; align-items: center; padding: 5px; border-radius: 22px;
  background: var(--chrome); border: 1px solid var(--line); box-shadow: var(--shadow-sm); backdrop-filter: blur(12px); scrollbar-width: none; }
.map-chips::-webkit-scrollbar { display: none; }
.mc-label { font: 600 10.5px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink3); padding: 0 4px 0 8px; white-space: nowrap; }
.mchip { position: relative; flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 11px 0 5px; border-radius: 999px; border: 1px solid var(--line2); background: var(--field); color: var(--ink2);
  font: 500 12.5px var(--font); white-space: nowrap; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.mchip:hover { border-color: var(--c); color: var(--ink); }
.mchip:focus-visible { outline: 2px solid var(--c); outline-offset: 2px; }
.mchip .mc-ic { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 16%, transparent); color: var(--c); transition: background .15s, color .15s; }
.mchip svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mchip .mc-ok { display: none; position: absolute; left: 19px; top: 2px; width: 13px; height: 13px; border-radius: 50%; background: #fff; color: var(--c); place-items: center; box-shadow: 0 1px 2px rgba(0, 0, 0, .35); }
.mchip .mc-ok svg { width: 9px; height: 9px; stroke-width: 3.4; }
.mchip.on { background: color-mix(in srgb, var(--c) 17%, var(--field)); border-color: var(--c); color: var(--ink); box-shadow: 0 0 0 1px var(--c) inset; }
.mchip.on .mc-ic { background: var(--c); color: #fff; }
.mchip.on .mc-ok { display: inline-grid; }

.mp { position: absolute; left: 12px; top: var(--mc-top); width: 372px; max-height: calc(100% - var(--mc-top) - 128px); display: flex; flex-direction: column; padding: 8px 10px; overflow: hidden; animation: rise .25s ease; }
.mp[hidden], .mp-reopen[hidden], .bm-tray[hidden] { display: none; }
.mp-head { display: flex; align-items: flex-start; gap: 6px; }
.mp-tabs { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.mp-tabs::-webkit-scrollbar { display: none; }
.mp-tabs button { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 8px; border: 1px solid transparent; background: none; color: var(--ink2); font: 500 12px var(--font); white-space: nowrap; cursor: pointer; }
.mp-tabs button i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.mp-tabs button.on { background: color-mix(in srgb, var(--c) 14%, transparent); border-color: color-mix(in srgb, var(--c) 45%, transparent); color: var(--ink); font-weight: 600; }
.mp-act { display: flex; gap: 2px; flex: 0 0 auto; }
.mp-act .btn { width: 28px; padding: 0; justify-content: center; font-size: 15px; }
.mp-body { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; margin-top: 8px; }
.mp-body > .scroll { min-height: 80px; }
.mp.collapsed .mp-body { display: none; }
.mp-sum { font-size: 12px; color: var(--ink2); margin-bottom: 4px; line-height: 1.45; }
.mp-sum b { color: var(--ink); font-variant-numeric: tabular-nums; }
.mp .prefs-note { margin: 2px 0 6px; }
.legend.row { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 2px 0 8px; font-size: 11px; }
.legend.row .lg { gap: 6px; }
.mp-reopen { position: absolute; left: 12px; top: var(--mc-top); display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line2);
  background: var(--chrome); color: var(--ink); box-shadow: var(--shadow-sm); backdrop-filter: blur(12px); font: 500 12.5px var(--font); cursor: pointer; }
.mp-reopen:hover { border-color: var(--aqua); }
.mp-reopen svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.mp-reopen b { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--aqua); color: #fff; font-size: 11px; display: inline-grid; place-items: center; }
.map-deck .deck-card { left: auto; right: 12px; top: var(--mc-top); width: 380px; max-height: calc(100% - var(--mc-top) - 214px); }

.bm { position: absolute; left: 12px; bottom: 28px; } /* clear of the attribution line */
.bm-btn { position: relative; display: block; width: 78px; height: 78px; padding: 0; border-radius: 14px; overflow: hidden; border: 2px solid var(--surface-solid); background: var(--surface-solid);
  box-shadow: var(--shadow-sm), 0 0 0 1px var(--line2); cursor: pointer; transition: box-shadow .15s; }
.bm-btn img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bm-btn:hover, .bm-btn[aria-expanded="true"] { box-shadow: var(--shadow-sm), 0 0 0 2px var(--aqua); }
.bm-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 16px 6px 5px; background: linear-gradient(transparent, rgba(0, 0, 0, .75)); color: #fff; font: 600 11px/1.15 var(--font); text-align: left; }
.bm-cap small { display: block; font: 500 8.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; opacity: .85; margin-bottom: 1px; }
.bm-tray { position: absolute; left: 88px; bottom: 0; display: flex; flex-wrap: wrap; gap: 6px 4px; padding: 8px; width: max-content; max-width: min(760px, calc(100vw - var(--rail) - 130px)); animation: rise .2s ease; }
.bm-opt { width: 70px; padding: 0; border: 0; background: none; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--ink2); font: 500 11px/1.2 var(--font); }
.bm-img { position: relative; width: 64px; height: 64px; border-radius: 10px; overflow: hidden; background: var(--line); box-shadow: 0 0 0 1px var(--line2); transition: box-shadow .15s, transform .15s; }
.bm-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bm-opt:hover .bm-img { transform: translateY(-1px); box-shadow: 0 0 0 2px color-mix(in srgb, var(--aqua) 55%, transparent); }
.bm-opt:focus-visible { outline: none; } .bm-opt:focus-visible .bm-img { box-shadow: 0 0 0 3px var(--aqua); }
.bm-opt.on { color: var(--ink); font-weight: 700; }
.bm-opt.on .bm-img { box-shadow: 0 0 0 3px var(--aqua); }
.bm-ok { position: absolute; right: 4px; top: 4px; width: 18px; height: 18px; border-radius: 50%; background: var(--aqua); color: #fff; display: none; place-items: center; box-shadow: 0 1px 3px rgba(0, 0, 0, .35); }
.bm-ok svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.bm-opt.on .bm-ok { display: grid; }
.bm-l { text-align: center; max-width: 70px; }
#map .view-ctrl button { display: grid; place-items: center; }
#map .view-ctrl button svg { width: 18px; height: 18px; fill: none; stroke: var(--ink2); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
#map .view-ctrl button:hover svg { stroke: var(--ink); }
#map .view-ctrl button.on svg { stroke: var(--aqua); }
#map .maplibregl-ctrl-scale { background: var(--chrome); color: var(--ink2); border-color: var(--ink3); }
@media (max-width: 1150px) { .map-deck .deck-card { width: 330px; } }
@media (max-width: 760px) {
  .map-deck { --mc-top: calc(8px + var(--mc-h, 44px) + 6px); }
  .map-chips { left: 8px; right: 8px; top: 8px; max-width: none; border-radius: 14px; flex-wrap: nowrap; overflow-x: auto; }
  .mc-label { display: none; }
  .mp { left: 8px; right: 8px; width: auto; top: auto; bottom: 108px; max-height: 44%; z-index: 2; }
  .mp-reopen { left: 8px; }
  .map-deck .deck-card { left: 8px; right: 8px; width: auto; bottom: auto; max-height: 46%; z-index: 3; }
  .bm { left: 8px; bottom: 30px; }
  .bm-btn { width: 66px; height: 66px; }
  .bm-tray { left: 0; bottom: 76px; max-width: calc(100vw - 16px); z-index: 4; }
}

/* ---------- explorer ---------- */
.explorer { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 18px; align-items: start; }
.filters { position: sticky; top: 12px; padding: 16px; max-height: calc(100vh - var(--top) - 40px); overflow: auto; }
.filters .fg { margin-bottom: 16px; }
.filters .fg > label { display: block; font: 600 10.5px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink3); margin-bottom: 7px; }
.filters .chips { max-height: 170px; overflow: auto; }
.filters .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.saved-list { display: grid; gap: 4px; }
.saved-it { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 6px; padding: 5px 6px; border-radius: 8px; font-size: 12.5px; cursor: pointer; }
.saved-it:hover { background: var(--hover); }
.saved-it .pin { border: 0; background: none; color: var(--ink3); padding: 0; } .saved-it .pin.on { color: var(--amber); }
.saved-it .pin svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; } .saved-it .pin.on svg { fill: currentColor; }
.saved-it .del { border: 0; background: none; color: var(--ink3); }
.saved-it small { color: var(--ink3); font: 600 10.5px var(--mono); }
.viewbar { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 12px; }
.viewbar .chip { height: 32px; padding: 0 14px; font-size: 12.5px; }
.resbar { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.resbar .count { font: 600 13px var(--mono); color: var(--ink2); }
.tablewrap { border-radius: var(--r2); overflow: hidden; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-sm); }
.tablewrap .tbl td.c-dead { width: 170px; } .tablewrap .tbl td.c-rel { width: 140px; } .tablewrap .tbl td.c-where { width: 160px; } .tablewrap .tbl td.c-star { width: 44px; }
.relbar { display: flex; align-items: center; gap: 8px; }
.relbar .track { flex: 1; height: 5px; border-radius: 5px; background: var(--line); overflow: hidden; min-width: 50px; }
.relbar .track i { display: block; height: 100%; border-radius: 5px; }
.topic-dots { display: flex; gap: 3px; margin-top: 5px; flex-wrap: wrap; }
.topic-dots i { font-style: normal; font-size: 10.5px; padding: 0 6px; border-radius: 5px; background: var(--hover); color: var(--ink2); border-left: 3px solid; }
.who { display: grid; gap: 1px; margin-top: 4px; font-size: 12px; color: var(--ink3); }
.who b { color: var(--ink2); font-weight: 600; }
@media (max-width: 1000px) { .explorer { grid-template-columns: minmax(0, 1fr); } /* 1fr let the widest filter row stretch the page past a phone screen */ .filters { position: static; max-height: none; } }

/* ---------- detail drawer ---------- */
.dt { padding: 22px 26px 60px; }
.dt-head { display: flex; gap: 12px; align-items: flex-start; }
.dt-head h2 { font: 700 22px/1.25 var(--display); margin: 8px 0 6px; }
.dt-meta { color: var(--ink3); font-size: 12.5px; }
.dt-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 6px; }
.parties { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.party { padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface3); }
.party .eyebrow { margin-bottom: 4px; }
.party .pn { font: 600 15px/1.3 var(--display); color: var(--ink); }
.party .pd { font-size: 12px; color: var(--ink2); margin-top: 3px; line-height: 1.45; }
.party.funder { border-color: color-mix(in srgb, var(--teal) 35%, transparent); background: color-mix(in srgb, var(--teal) 7%, var(--surface3)); }
.party .pa { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
@media (max-width: 640px) { .parties { grid-template-columns: 1fr; } }
.dt-score { display: grid; grid-template-columns: 96px 1fr; gap: 16px; align-items: center; padding: 14px; border-radius: 16px; background: color-mix(in srgb, var(--aqua) 6%, transparent); border: 1px solid var(--line); margin: 14px 0; }
.ring { width: 96px; height: 96px; position: relative; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 9; }
.ring .bg { stroke: var(--line); }
.ring .fg { stroke-linecap: round; transition: stroke-dashoffset 1.4s cubic-bezier(.2, .8, .2, 1); }
.ring .lab { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring .lab b { font: 700 26px/1 var(--display); } .ring .lab span { font-size: 10px; color: var(--ink3); }
.track-box svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; flex: 0 0 auto; color: var(--aqua); }
.track-box { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 12px; border-radius: 12px; border: 1px dashed var(--line2); margin: 10px 0; font-size: 12.5px; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--line2); }
.timeline li { position: relative; padding: 0 0 14px 12px; font-size: 13px; }
.timeline li::before { content: ''; position: absolute; left: -25px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface-solid); border: 2px solid var(--aqua); }
.timeline li.ext::before { border-color: var(--amber); background: var(--amber); } .timeline li.corr::before { border-color: var(--violet); }
.timeline .when { font: 600 11px var(--mono); color: var(--ink3); }
.docs { display: grid; gap: 6px; }
.doc { display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--surface3); border: 1px solid var(--line); }
.doc .ext { --c: var(--coral); font: 700 10px var(--mono); text-transform: uppercase; padding: 6px 0; text-align: center; border-radius: 8px; background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); }
.doc .ext.xls, .doc .ext.xlsx, .doc .ext.csv { --c: var(--green); } .doc .ext.doc, .doc .ext.docx { --c: var(--blue-ink); }
.imgcmp { position: relative; width: 100%; aspect-ratio: 1.4; border-radius: 16px; overflow: hidden; border: 1px solid var(--line2); background: #02060c; user-select: none; }
.imgcmp img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.imgcmp .top { clip-path: inset(0 50% 0 0); }
.imgcmp .bar { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; background: #38e1ff; cursor: ew-resize; }
.imgcmp .bar::after { content: '⇆'; position: absolute; top: 50%; left: -16px; width: 32px; height: 32px; margin-top: -16px; border-radius: 50%; background: #38e1ff; color: #04121f; display: grid; place-items: center; font-weight: 700; }
.imgcmp .cap { position: absolute; bottom: 8px; padding: 3px 8px; border-radius: 6px; background: rgba(6, 15, 28, .85); color: #e8f1ff; font: 600 11px var(--mono); }
.imgcmp .cap.l { left: 8px; } .imgcmp .cap.r { right: 8px; }
.passes { display: grid; gap: 6px; }
.pass { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 8px 12px; border-radius: 10px; background: color-mix(in srgb, var(--amber) 6%, transparent); border: 1px solid color-mix(in srgb, var(--amber) 20%, transparent); font-size: 12.5px; }
.news { display: grid; gap: 8px; }
.news a { display: grid; grid-template-columns: 64px 1fr; gap: 10px; color: var(--ink); text-decoration: none; padding: 8px; border-radius: 12px; }
.news a:hover { background: var(--hover); }
.news img, .news .ph { width: 64px; height: 48px; object-fit: cover; border-radius: 8px; background: var(--line); }

/* ---------- misc views ---------- */
.src-tbl td { font-size: 12.5px; }
.st { display: inline-flex; align-items: center; gap: 6px; font: 600 11px var(--mono); }
.st i { width: 8px; height: 8px; border-radius: 50%; }
.st.ok i { background: var(--green); } .st.running i { background: var(--aqua); animation: pulse 1.4s infinite; } .st.error i { background: var(--coral); }
.st.blocked-robots i, .st.manual-review i { background: var(--amber); } .st.disabled i, .st.reference i, .st.pending i { background: var(--ink3); }
.progress { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--aqua), var(--violet)); transition: width .8s ease; }
.code { font: 12px/1.6 var(--mono); background: var(--surface3); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; overflow: auto; white-space: pre; color: var(--ink2); }
.about h3 { font: 600 17px var(--display); margin: 26px 0 8px; }
.about p, .about li { color: var(--ink2); line-height: 1.7; }
.hero-band { position: relative; padding: 26px; border-radius: 24px; overflow: hidden; background: radial-gradient(80% 140% at 0% 0%, color-mix(in srgb, var(--aqua) 14%, transparent), transparent 60%), radial-gradient(70% 120% at 100% 100%, color-mix(in srgb, var(--violet) 14%, transparent), transparent 60%), var(--surface); border: 1px solid var(--line2); }
@media (max-width: 760px) {
  .deck-card { left: 12px; right: 12px; width: auto; top: auto; bottom: 12px; max-height: 60%; z-index: 3; }
}
.about-logo img { height: 92px; width: auto; }
