/* File: maparea/static/css/mts.css
   Purpose: iVerify Market-to-Location (Level 2) screen styling. NSG green/brass,
            mirrors natscreen.css conventions. 2026-07-04 v1.0. */
:root{--nsg-green:#16432e;--nsg-green2:#1f5a3d;--brass:#b08d57;--ink:#1f2d3d;
  --muted:#5b6b7a;--line:#e3e8e4;--wash:#f5f7f5;--flood:#a12a1e;}
*{box-sizing:border-box}
body{margin:0;font-family:'DM Sans',system-ui,sans-serif;color:var(--ink);background:#fff;}
a{color:var(--nsg-green2);text-decoration:none}a:hover{text-decoration:underline}
.mts-topnav{background:var(--nsg-green);color:#fff;padding:14px 22px;display:flex;
  justify-content:space-between;align-items:center;font-size:14px}
.mts-topnav a{color:#dfeee6}.mts-brand{font-weight:700}
.mts-wrap{max-width:1180px;margin:0 auto;padding:26px 22px 80px}
.mts-eyebrow{color:var(--brass);font-weight:700;letter-spacing:.08em;text-transform:uppercase;
  font-size:12px;margin-bottom:6px}
h1{font-family:'Instrument Serif',Georgia,serif;font-weight:400;font-size:40px;margin:0 0 10px}
h2{font-family:'Instrument Serif',Georgia,serif;font-weight:400;font-size:26px;margin:0 0 6px}
.mts-lede{font-size:17px;line-height:1.5;color:#33424f;max-width:820px}
.mts-vintage{color:var(--muted);font-size:13px;margin-top:12px}
.mts-controls{background:var(--wash);border:1px solid var(--line);border-radius:12px;
  padding:16px 18px;margin:22px 0}
.mts-row{display:flex;flex-wrap:wrap;gap:14px;align-items:center;margin-bottom:10px}
.mts-row:last-child{margin-bottom:0}
.mts-label{color:var(--brass);font-weight:700;text-transform:uppercase;font-size:11px;
  letter-spacing:.06em;margin-right:4px}
.mts-btn{border:1px solid var(--line);background:#fff;border-radius:999px;padding:7px 16px;
  font:600 13px 'DM Sans';cursor:pointer;color:var(--ink)}
.mts-btn.active{background:var(--nsg-green);color:#fff;border-color:var(--nsg-green)}
.mts-band{width:54px;padding:6px 8px;border:1px solid var(--line);border-radius:8px;font:500 13px 'DM Mono'}
.mts-note{color:var(--muted);font-size:13px;line-height:1.45;margin:8px 0 0}
.mts-map-wrap{position:relative;margin:18px 0}
.mts-map{height:440px;border-radius:12px;overflow:hidden;border:1px solid var(--line)}
.mts-mapbtn{position:absolute;left:10px;bottom:10px;z-index:2;background:#fff;border:1px solid var(--line);
  border-radius:8px;padding:5px 10px;font:600 12px 'DM Sans';cursor:pointer}
.mts-legend{display:flex;flex-wrap:wrap;gap:14px;margin-top:10px;font-size:12px;color:var(--muted)}
.mts-legend span{display:inline-flex;align-items:center;gap:6px}
.mts-dot{width:12px;height:12px;border-radius:50%;display:inline-block}
table.mts-tbl{width:100%;border-collapse:collapse;margin-top:8px;font-size:14px}
.mts-tbl th{background:var(--nsg-green);color:#fff;text-align:left;padding:9px 10px;font-weight:600;
  position:sticky;top:0}
.mts-tbl td{padding:8px 10px;border-bottom:1px solid var(--line)}
.mts-tbl tr[data-id]{cursor:pointer}.mts-tbl tr[data-id]:hover{background:var(--wash)}
.mts-num{text-align:right;font-family:'DM Mono',monospace}
.mts-scorecell{font-weight:700;text-align:right;font-family:'DM Mono',monospace}
.mts-badge{display:inline-block;padding:1px 8px;border-radius:999px;font-size:11px;font-weight:600}
.mts-badge.gen{background:#eef4f1;color:var(--nsg-green2)}
.mts-badge.corr{background:#f3eee6;color:#7a5c2e}
.mts-badge.flood{background:#fbe2e1;color:var(--flood)}
.mts-badge.conf-high{background:#e6efe9;color:var(--nsg-green2)}
.mts-badge.conf-medium{background:#fef1d1;color:#7a5c05}
.mts-badge.conf-low{background:#f0eef0;color:#6b5b6b}
.mts-drill{border:1px solid var(--line);border-radius:12px;padding:0;margin:16px 0;display:none}
.mts-drill.open{display:block}
.mts-drill-body{padding:18px 20px}
.mts-drill h3{margin:0 0 8px;font-family:'Instrument Serif',serif;font-weight:400;font-size:22px}
.mts-drill .close{float:right;cursor:pointer;color:var(--muted);font-size:20px;line-height:1}
.mts-comp{display:flex;flex-wrap:wrap;gap:10px;margin:10px 0}
.mts-comp span{background:var(--wash);border:1px solid var(--line);border-radius:8px;padding:5px 10px;
  font:500 12px 'DM Mono'}
.mts-drill-actions{display:flex;gap:10px;margin-top:14px}
.mts-drill-actions a{border:1px solid var(--nsg-green);border-radius:999px;padding:7px 15px;
  font-weight:600;font-size:13px}
.mts-drill-actions a.primary{background:var(--nsg-green);color:#fff}
.mts-suppressed{margin-top:20px}
.mts-suppressed summary{cursor:pointer;font-weight:600;color:var(--muted);padding:8px 0}
.mts-null{background:#fef7ec;border:1px solid #f0d9a8;border-radius:12px;padding:18px 20px;
  margin:16px 0;color:#7a5c05;font-size:15px;line-height:1.5;display:none}
.mts-unknowns{color:var(--muted);font-size:12.5px;font-style:italic;margin-top:8px}
.mts-methodology{margin-top:30px;padding-top:18px;border-top:2px solid var(--line);
  color:#33424f;font-size:14px;line-height:1.55}
.mts-methodology code{background:var(--wash);padding:1px 5px;border-radius:4px;font-family:'DM Mono'}
/* detail modal (dot tap) */
/* V3 (2026-07-14, Michael): desktop = non-blocking right DOCK, not a modal.
   This was position:fixed;inset:0 with a dimming backdrop at z-index:1000 -- the card
   is only 452px on the right, but the backdrop covered the whole viewport, so the map
   and the ranked table were both dead while a candidate was open ("I can't look
   around. I can't click on the table... it's pretty useless"). The full-bleed layer no
   longer dims or eats clicks; only the card takes pointer events. Mobile re-asserts
   the backdrop below -- the bottom sheet needs it. */
.mts-modal{position:fixed;inset:0;background:transparent;pointer-events:none;z-index:1000;display:none}
.mts-modal.open{display:block}
.mts-modal-card{pointer-events:auto}
.mts-modal-card{position:absolute;top:0;right:0;height:100%;width:452px;max-width:92vw;
  background:#fff;border-radius:0;padding:0;overflow-y:auto;
  box-shadow:-12px 0 44px rgba(0,0,0,.28);transform:translateX(100%);transition:transform .22s ease}
.mts-modal.open .mts-modal-card{transform:translateX(0)}
/* WO4 inspect: 15-second summary pinned at the top of the drawer; detail scrolls under it */
.mts-ins-sum{position:sticky;top:0;z-index:3;background:#fff;padding:20px 24px 14px;border-bottom:1px solid var(--line)}
.mts-ins-body{padding:14px 24px 24px}
.mts-drv{margin:12px 0 2px;display:flex;flex-direction:column;gap:5px}
.mts-drv-row{display:flex;justify-content:space-between;align-items:baseline;font-size:14px;border-bottom:1px solid #f0ece3;padding-bottom:4px}
.mts-drv-row:last-child{border-bottom:0}
.mts-drv-row dt{color:#5b6b7a}
.mts-drv-row dd{margin:0;font-weight:600;color:#16432e}
.mts-ins-risk{margin-top:10px;font-size:13px;font-weight:600;color:#7a5c2e}
.mts-ins-risk.ok{color:var(--muted);font-weight:500}
.mts-ins-sec{margin-top:16px;padding-top:14px;border-top:1px solid var(--line)}
.mts-ins-sec h4{margin:0 0 6px;font:700 11px 'DM Sans';letter-spacing:.07em;text-transform:uppercase;color:var(--brass)}
@media (max-width:900px){
  /* Mobile is a bottom SHEET, not a dock: it needs the dimming backdrop back, and the
     layer must take pointer events again so tapping outside dismisses it. */
  .mts-modal{background:rgba(20,30,25,.45);pointer-events:auto}
  .mts-modal-card{top:auto;bottom:0;right:0;left:0;width:100%;max-width:100%;height:auto;max-height:86vh;
    border-radius:16px 16px 0 0;box-shadow:0 -12px 44px rgba(0,0,0,.28);transform:translateY(100%)}
  .mts-modal.open .mts-modal-card{transform:translateY(0)}
}
.mts-modal-x{position:absolute;top:14px;right:16px;border:none;background:none;font-size:26px;
  line-height:1;cursor:pointer;color:var(--muted)}
.mts-modal-head{display:flex;gap:14px;align-items:flex-start;margin-bottom:8px}
.mts-modal-rank{flex:none;width:46px;height:46px;border-radius:50%;background:var(--nsg-green);color:#fff;
  display:flex;align-items:center;justify-content:center;font:700 20px 'DM Sans';margin-top:2px}
.mts-modal-rank.supp{background:#c2c2c2}
.mts-modal-head h3{margin:0;font-family:'Instrument Serif',serif;font-weight:400;font-size:24px}
.mts-modal-sub{margin:2px 0 0;color:var(--muted);font-size:13px}
.mts-modal-score{display:flex;align-items:center;gap:8px;margin:14px 0 6px;padding-bottom:12px;border-bottom:1px solid var(--line)}
.mts-modal-num{font:700 40px 'Instrument Serif',serif;color:var(--nsg-green);line-height:1}
.mts-modal-out{color:var(--muted);font-size:15px}
.mts-modal-list{margin:12px 0 0;padding-left:20px;line-height:1.6;font-size:15px}
.mts-modal-list li{margin-bottom:7px}
.mts-modal-rank.clicked{background:var(--brass)}
.mts-model-notready{opacity:.75;border-style:dashed}

/* WS-C map expand/shrink + WS-D model info icon (usability order 2026-07-05) */
.mts-model-info { opacity:.55; font-size:12px; margin-left:3px; cursor:help; }
.mts-model-info:hover { opacity:1; }
.map-expand-btn { position:absolute; top:10px; right:10px; z-index:30; background:#fff;
  border:1px solid #16432e; border-radius:999px; padding:5px 13px; font-weight:600;
  font-size:13px; cursor:pointer; box-shadow:0 1px 4px rgba(0,0,0,.18); color:#16432e; }
.map-fullscreen { position:fixed !important; inset:0 !important; width:100vw !important;
  height:100vh !important; z-index:1000 !important; border-radius:0 !important; }
body.map-lock { overflow:hidden; }

/* ============================================================================
   2026-07-08 Application layout: compact header + two-column body
   (left control rail, right map-first workspace). Map is above the fold on
   desktop; on narrow screens everything stacks with the map before the rail.
   Presentation only -- no scoring change.
   ============================================================================ */
html, body { height: 100%; }
body { display: flex; flex-direction: column; height: 100vh; margin: 0; overflow: hidden; }
.mts-topnav { flex: none; }
.mts-app { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; }

/* compact header bar */
.mts-head { flex: none; display: flex; align-items: center; justify-content: space-between;
  gap: 18px; flex-wrap: wrap; padding: 12px 22px; border-bottom: 1px solid var(--line); }
.mts-head .mts-eyebrow { margin-bottom: 2px; }
.mts-head h1 { font-size: 26px; margin: 0 0 4px; }
.mts-head-facts { display: flex; flex-wrap: wrap; gap: 18px; font-size: 13.5px; color: #33424f; }
.mts-hf-k { color: var(--brass); font-weight: 700; text-transform: uppercase; font-size: 10.5px;
  letter-spacing: .06em; margin-right: 6px; }
.mts-hf-sub { color: var(--muted); }

/* two-column body */
.mts-body { flex: 1 1 auto; display: grid; grid-template-columns: 344px 1fr; min-height: 0; }
.mts-rail { min-height: 0; overflow-y: auto; padding: 16px 18px 40px; border-right: 1px solid var(--line);
  background: var(--wash); }
.mts-work { min-height: 0; overflow-y: auto; padding: 14px 20px 48px; display: flex; flex-direction: column; }

/* map first, tall enough to dominate the viewport */
.mts-work .mts-map-wrap { flex: none; margin: 0 0 8px; }
.mts-work .mts-map { height: 60vh; min-height: 380px; }
.mts-map-instr { margin: 0 0 8px; font-size: 14px; color: #33424f; }
.mts-bandrow { margin: 12px 0; background: var(--wash); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 14px; }

/* actions in the header */
.mts-head .mts-actions { margin: 0; }

/* compact model list (replaces big cards) */
.mts-rail-sec { margin-bottom: 16px; }
.mts-modellist { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.mts-modelitem { display: flex; gap: 9px; align-items: flex-start; text-align: left; width: 100%;
  border: 1px solid var(--line); background: #fff; border-radius: 9px; padding: 9px 11px;
  cursor: pointer; font-family: 'DM Sans', sans-serif; color: var(--ink); }
.mts-modelitem:hover { border-color: var(--nsg-green2); }
.mts-modelitem.active { border-color: var(--nsg-green); box-shadow: inset 0 0 0 1px var(--nsg-green); background: #fbfdfb; }
.mts-mi-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; margin-top: 4px;
  border: 2px solid var(--line); background: #fff; }
.mts-modelitem.active .mts-mi-dot { border-color: var(--nsg-green); background: var(--nsg-green); }
.mts-mi-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mts-mi-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mts-mi-name { font-weight: 700; font-size: 13.5px; }
.mts-mi-mean { font-size: 12px; line-height: 1.4; color: var(--muted); }

/* signal band words + calm status tags (shared vocabulary) */
.mts-band { font-weight: 700; }
.band-strong { color: var(--nsg-green); } .band-solid { color: var(--nsg-green2); }
.band-moderate { color: #7a5c05; } .band-light { color: var(--muted); }
.mts-status { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 10px;
  font-weight: 700; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.status-ready { background: #e6efe9; color: var(--nsg-green2); }
.status-pilot { background: #eef2f5; color: #3d5266; }
.status-review { background: #f3eee6; color: #7a5c2e; }

/* four-part reasoning panel (stacks in the rail) */
.mts-panel { display: flex; flex-direction: column; gap: 8px; margin: 0 0 14px; }
.mts-fac { border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; background: #fff; }
.mts-fac-k { display: block; color: var(--brass); font-weight: 700; text-transform: uppercase;
  font-size: 10px; letter-spacing: .06em; margin-bottom: 5px; }
.mts-fac-tag { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11px;
  font-weight: 700; margin-bottom: 5px; }
.tag-strong { background: #e6efe9; color: var(--nsg-green); }
.tag-solid { background: #e6efe9; color: var(--nsg-green2); }
.tag-moderate { background: #fef1d1; color: #7a5c05; }
.tag-light { background: #eef0f2; color: var(--muted); }
.tag-neutral { background: #eef2f5; color: #3d5266; }
.tag-open { background: #f3eee6; color: #7a5c2e; }
.mts-fac-line { display: block; font-size: 12.5px; line-height: 1.45; color: #33424f; }

/* collapsible drawers (native <details>) */
.mts-drawer { margin-top: 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.mts-drawer > summary { cursor: pointer; padding: 10px 13px; font-weight: 600; font-size: 13px;
  color: var(--nsg-green2); list-style: none; }
.mts-drawer > summary::-webkit-details-marker { display: none; }
.mts-drawer > summary::before { content: '\25B8'; margin-right: 8px; font-size: 11px; color: var(--muted); }
.mts-drawer[open] > summary::before { content: '\25BE'; }
.mts-drawer-body { padding: 2px 13px 13px; font-size: 13px; line-height: 1.5; color: #33424f; }
.mts-methodology .mts-drawer-body code { background: var(--wash); padding: 1px 5px; border-radius: 4px; font-family: 'DM Mono'; }

/* candidate table */
.mts-tblhead { font-family: 'Instrument Serif', serif; font-size: 20px; margin: 14px 0 6px; }
#mts-table .mts-tbl th { position: sticky; top: 0; }
#mts-table .mts-tbl tr[data-id] { cursor: pointer; }
#mts-table .mts-tbl tr[data-id]:hover { background: var(--wash); }

/* WO1 review queue: pager bar + fixed-height ten-row body (never a second scroll page) */
.mts-queue-bar { display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin: 6px 0 6px; flex-wrap: wrap; }
.mts-queue-range { font-size: 13px; font-weight: 600; color: var(--muted); }
.mts-queue-btns { display: flex; gap: 8px; }
.mts-queue-btn { font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 600;
  padding: 6px 13px; border: 1px solid var(--line); border-radius: 7px; background: #fff;
  color: var(--nsg-green2); cursor: pointer; }
.mts-queue-btn:hover:not([disabled]) { background: var(--wash); }
.mts-queue-btn[disabled] { opacity: .4; cursor: default; }
.mts-queue-body { height: 520px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.mts-queue-body .mts-tbl { margin-top: 0; }

/* WO3 candidate details: driver star bands + a compact detail line under each row */
tr.mts-qrow > td { border-bottom: none; padding-bottom: 3px; }
tr.mts-qdetail > td { border-bottom: 1px solid var(--line); padding: 0 10px 8px; }
tr.mts-qrow:hover, tr.mts-qrow:hover + tr.mts-qdetail { background: var(--wash); }
tr.mts-qdetail:hover { background: var(--wash); }
.mts-detchips { color: var(--muted); font-size: 11.5px; }
.mts-detrisk { color: #7a5c2e; font-size: 11.5px; font-weight: 600; margin-left: 8px; }
.mts-detrisk::before { content: '\26A0'; margin-right: 3px; }

.map-expand-btn { padding: 8px 16px; font-size: 14px; }
.mts-dot-ring { background: #f3f3f3; border: 2px solid #8a8f98; }
.mts-anchor-chip { display:inline-block; font-size:10px; font-weight:700; letter-spacing:.3px; text-transform:uppercase; color:#8a6d3b; background:#f4ecdd; border:1px solid #d9c39a; border-radius:4px; padding:1px 5px; }
.mts-idpop-kick { font-size:10px; font-weight:700; letter-spacing:.3px; text-transform:uppercase; color:#8a6d3b; margin-bottom:2px; }
.mts-modal-rank.anchor { background:#b08d57; color:#fff; }
.mts-signal { display:inline-block; font-size:11px; font-weight:600; border-radius:4px; padding:1px 7px; white-space:nowrap; }
.mts-signal.hi { background:#e4f0e8; color:#16432e; border:1px solid #b9d8c6; }
.mts-signal.mid { background:#fbf1dd; color:#7a5c05; border:1px solid #e8d3a0; }
.mts-signal.lo { background:#eef1f4; color:#4b5563; border:1px solid #cfd6dd; }
.mts-signal.na, .mts-signal.supp { background:#eef1f4; color:#8a8f98; border:1px solid #d7dce1; }
.mts-verdict { font-size:12.5px; color:#2b3a2e; font-weight:600; margin-bottom:4px; }
.mts-thin-actions { margin-top:10px; display:flex; gap:8px; flex-wrap:wrap; }
.mts-thin-btn { font-size:12px; font-weight:600; border:1px solid #d8b355; background:#fff; color:#7a5c05; border-radius:6px; padding:5px 12px; cursor:pointer; }
.mts-thin-btn:hover { background:#fbf1dd; }

/* ---- narrow screens: stack; map (workspace) comes before the rail ---- */
@media (max-width: 900px) {
  body { height: auto; overflow: auto; display: block; }
  .mts-app { height: auto; display: block; }
  .mts-head { position: sticky; top: 0; z-index: 40; background: #fff; }
  .mts-body { display: flex; flex-direction: column; height: auto; }
  .mts-work { order: -1; overflow: visible; }
  .mts-rail { overflow: visible; border-right: none; border-top: 1px solid var(--line); }
  .mts-work .mts-map { height: 56vh; min-height: 320px; }
}

/* WO5 GIS layers: the toggle panel (anchored inside the positioned .mts-map-wrap) */
.mts-layer-panel{position:absolute;top:10px;right:10px;z-index:5;background:rgba(255,255,255,.96);
  border:1px solid var(--line);border-radius:10px;padding:9px 11px;box-shadow:0 4px 14px rgba(0,0,0,.14);
  font-size:12.5px;max-width:220px}
.mts-lp-head{font-weight:700;color:#16432e;font-size:11px;text-transform:uppercase;letter-spacing:.06em;margin-bottom:6px}
.mts-lp-row{display:flex;align-items:center;gap:7px;padding:2px 0 2px 5px;cursor:pointer;color:#33424f;line-height:1.3;border-left:3px solid transparent}
.mts-lp-row input{margin:0;cursor:pointer}
.mts-lp-label{cursor:pointer;flex:1}
/* WO13 active-layer emphasis: the row whose label was clicked owns the screen */
.mts-lp-row.active{border-left-color:var(--brass);background:#f4ecdd;border-radius:0 5px 5px 0}
.mts-lp-row.active .mts-lp-label{font-weight:700;color:#16432e}
@media (max-width:640px){ .mts-layer-panel{top:6px;right:6px;padding:7px 9px;font-size:11.5px;max-width:180px} }

/* WO7 map<->queue sync: selected row highlight + jump-to-rank input */
tr.mts-qrow-sel > td { background: #f4ecdd; }
tr.mts-qrow.mts-qrow-sel > td:first-child { box-shadow: inset 3px 0 0 var(--brass); }
.mts-q-jump { width: 72px; padding: 4px 7px; border: 1px solid var(--line); border-radius: 6px;
  font-size: 12px; margin-right: 8px; vertical-align: middle; }

/* WO8 shortlist: star toggles, header counts, shortlist view */
.mts-star { background: #fff; border: 1px solid var(--brass); border-radius: 3px; cursor: pointer;
  font-size: 10.5px; padding: 2px 7px; color: #6b5b3e; white-space: nowrap;
  padding: 0 3px 0 0; line-height: 1; vertical-align: baseline; }
.mts-star.on { background: #f4ecdd; color: #4a3d24; font-weight: 600; }
.mts-star:hover { border-color: #d4a017; }
.mts-tblhead { overflow: hidden; }
.mts-qcounts { float: right; font-size: 12px; color: var(--muted); font-weight: 400; }
.mts-qcounts b { color: #16432e; }
.mts-sl-toggle { margin-left: 10px; padding: 2px 9px; font-size: 11.5px; }
.mts-star-btn { display: inline-block; margin-top: 12px; padding: 7px 13px; border: 1px solid var(--brass);
  border-radius: 8px; background: #fff; color: #7a5c05; font-weight: 600; font-size: 13px; cursor: pointer; }
.mts-star-btn.on { background: #f4ecdd; }
.mts-sl-empty { padding: 24px 12px; color: var(--muted); text-align: center; font-size: 13px; }

/* WO10 mobile polish: one-handed phone use of header, bands, queue */
@media (max-width: 640px) {
  .mts-head-facts { flex-direction: column; gap: 4px; align-items: flex-start; }
  .mts-bandrow { flex-wrap: wrap; gap: 4px 8px; }
  .mts-tblhead .mts-qcounts { float: none; display: block; margin-top: 4px; }
  .mts-queue-bar { flex-wrap: wrap; gap: 6px; row-gap: 8px; }
  .mts-q-jump { width: 64px; }
  .mts-tbl { font-size: 12.5px; }
  .mts-tbl th, .mts-tbl td { padding-left: 6px; padding-right: 6px; }
  .mts-ins-sum, .mts-ins-body { padding-left: 16px; padding-right: 16px; }
  .mts-queue-body { height: 460px; }
}

/* WO11 click-identity popup: a context dot answers "what is this?" before any score.
   Single styling block (G13); maplibregl.Popup carries .mts-idpop as its inner content. */
.mts-idpop{font-family:'DM Sans',system-ui,sans-serif;color:var(--ink);font-size:13px;line-height:1.35;min-width:120px}
.mts-idpop-name{font-weight:700;color:var(--nsg-green);font-size:13.5px;margin-bottom:2px}
.mts-idpop-line{color:var(--ink)}
.mts-idpop-src{color:var(--muted);font-size:11px;margin-top:2px;text-transform:uppercase;letter-spacing:.04em}
.mts-idpop-eval{display:inline-block;margin-top:8px;font-weight:600;color:var(--nsg-green2);font-size:12.5px;cursor:pointer}
.mts-idpop-eval:hover{text-decoration:underline}
.maplibregl-popup-content:has(.mts-idpop){padding:10px 12px;border-radius:8px;box-shadow:0 2px 10px rgba(0,0,0,.18)}

/* WO12 basemap switcher: Map / Satellite / Hybrid, stacked under the zoom control.
   Horizontal segmented bar; overrides the default 29px square ctrl-group buttons.
   mts.css loads after maplibre-gl.css so these win at equal specificity. */
.mts-basemap-ctrl{display:flex;overflow:hidden}
.mts-basemap-ctrl button{width:auto;height:auto;display:block;border:0;background:#fff;color:var(--ink);
  font:600 11.5px 'DM Sans',system-ui,sans-serif;padding:5px 9px;cursor:pointer;border-right:1px solid var(--line)}
.mts-basemap-ctrl button:last-child{border-right:0}
.mts-basemap-ctrl button:hover{background:#f4ecdd}
.mts-basemap-ctrl button.active{background:var(--nsg-green);color:#fff}

/* WO15 drawer progression: evidence data card, amber narrative, sub-cards, footer. */
.mts-ev-card{margin:0 0 4px;border:1px solid var(--line);border-radius:8px;overflow:hidden;background:#fff}
.mts-ev-row{display:flex;justify-content:space-between;gap:14px;padding:8px 12px;font-size:13.5px}
.mts-ev-row:not(:last-child){border-bottom:1px solid var(--line)}
.mts-ev-k{color:var(--brass);font-weight:700;font-size:11px;letter-spacing:.05em;text-transform:uppercase;
  white-space:nowrap;flex:none;padding-top:1px}
.mts-ev-v{color:var(--ink);text-align:right;line-height:1.45}
.mts-ev-amber{margin:0 0 10px;padding:8px 11px;border-radius:6px;background:#fdf3d8;
  border:1px solid #ecd9a6;color:#7a5c05;font-size:13px;font-weight:600;line-height:1.4}
.mts-ins-sub{margin-top:12px}
.mts-ins-sub h5{margin:0 0 4px;font:700 10.5px 'DM Sans';letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.mts-foot{margin:14px 0 0;padding-top:12px;border-top:1px solid var(--line);
  color:var(--muted);font-size:11.5px;font-style:italic;line-height:1.5}

/* WO16 explore / evaluate / develop mode bar: show/hide of EXISTING UI only, no new
   panels. Bar mirrors the WO12 basemap segmented control; mode rides body classes. */
.mts-modebar{display:inline-flex;align-self:flex-start;margin:0 0 12px;border:1px solid var(--nsg-green);
  border-radius:999px;overflow:hidden}
.mts-modeseg{border:0;background:#fff;color:var(--nsg-green);cursor:pointer;
  font:600 12.5px 'DM Sans',system-ui,sans-serif;padding:6px 16px;border-right:1px solid var(--line)}
.mts-modeseg:last-child{border-right:0}
.mts-modeseg:hover{background:#f4ecdd}
.mts-modeseg.active{background:var(--nsg-green);color:#fff}
/* Explore: bigger map (vh-based, same sizing idea as Expand-map), identity-only
   clicks; below-map evaluation furniture hidden. Layer panel stays (layers live here). */
body.mts-mode-explore .mts-work .mts-map{height:82vh}
body.mts-mode-explore #mts-table,
body.mts-mode-explore .mts-work .mts-legend,
body.mts-mode-explore .mts-work .mts-bandrow,
body.mts-mode-explore #mts-map-instr,
body.mts-mode-explore #mts-count,
body.mts-mode-explore #mts-supp-line,
body.mts-mode-explore #mts-null{display:none}
/* Develop: layer panel + ranked queue hidden; shortlist view pinned (its toggle
   removed). Header actions (always in the header) stay front and center. */
body.mts-mode-develop #mts-layer-panel,
body.mts-mode-develop .mts-work .mts-legend,
body.mts-mode-develop .mts-work .mts-bandrow,
body.mts-mode-develop #mts-map-instr,
body.mts-mode-develop #mts-count,
body.mts-mode-develop #mts-supp-line,
body.mts-mode-develop #mts-null,
body.mts-mode-develop .mts-sl-toggle{display:none}

/* P4/T1 (2026-07-18): MODELED PARKING OPPORTUNITY markers. In parking mode the
   picks are calculated opportunity locations, not observed facilities (Michael)
   — restyle every top pin: fixed size (capture scores would explode the score-
   ramped formula), rounded-square, dashed border, the drawer block's blue.
   Stylesheet !important intentionally overrides topMarker()'s inline styles —
   the one no-capped-edit path (mts_map.js is frozen). Body class is set by
   mts_parking.js. */
body.model-parking .maplibregl-marker > div {
  width: 30px !important; height: 30px !important;
  border-radius: 6px !important;
  background: #3a6bc4 !important;
  border: 2px dashed #fff !important;
  font-size: 12px !important;
}
