/* EVADR — Know the road.
   Layout: the map fills the screen; search, layers, results and details float over it.
   Phones use bottom sheets; desktop uses a left column and a right detail panel. */
:root{
  --bg:#E9EFED; --surface:#FFFFFF; --surface-2:#F2F6F4; --surface-3:#E6EEEA;
  --text:#132A30; --muted:#5A6E71; --line:#DCE5E1; --line-strong:#C3D2CC;
  --brand:#0F2B33; --accent:#13A97C; --accent-ink:#0B6E52; --accent-soft:#E2F4EC;
  --btn-bg:#0F2B33; --btn-fg:#FFFFFF;
  --warn-bg:#FFF2DF; --warn-text:#7A4A0E;
  --focus:#13A97C; --scrim:rgba(15,43,51,.32);
  --shadow:0 8px 28px rgba(15,43,51,.16); --shadow-sm:0 2px 10px rgba(15,43,51,.12);
  --t-fixed:#C02F43; --t-mobile:#A9520A; --t-phone:#7B3FB8; --t-p2p:#1B64B1; --t-sensor:#0B7B7B; --t-traffic:#3E5C77; --t-cctv:#5B6276;
  --radius:16px; --radius-sm:11px;
  --font:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  --top:52px;
  color-scheme:light;
}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){
  --bg:#0B181C; --surface:#12232A; --surface-2:#182D34; --surface-3:#1F363E;
  --text:#E5EFEC; --muted:#93A8A5; --line:#24393F; --line-strong:#33505A;
  --brand:#E5EFEC; --accent:#7FE3BC; --accent-ink:#7FE3BC; --accent-soft:#173A33;
  --btn-bg:#7FE3BC; --btn-fg:#0B181C;
  --warn-bg:#3A2B14; --warn-text:#F3CF95;
  --focus:#7FE3BC; --scrim:rgba(0,0,0,.45);
  --shadow:0 10px 30px rgba(0,0,0,.45); --shadow-sm:0 2px 10px rgba(0,0,0,.35);
  --t-fixed:#FF7A8A; --t-mobile:#F4A35A; --t-phone:#C59AF2; --t-p2p:#7AB4F2; --t-sensor:#5FD0CC; --t-traffic:#9DB8D2; --t-cctv:#B3B8C8;
  color-scheme:dark}}
:root[data-theme="dark"]{
  --bg:#0B181C; --surface:#12232A; --surface-2:#182D34; --surface-3:#1F363E;
  --text:#E5EFEC; --muted:#93A8A5; --line:#24393F; --line-strong:#33505A;
  --brand:#E5EFEC; --accent:#7FE3BC; --accent-ink:#7FE3BC; --accent-soft:#173A33;
  --btn-bg:#7FE3BC; --btn-fg:#0B181C;
  --warn-bg:#3A2B14; --warn-text:#F3CF95;
  --focus:#7FE3BC; --scrim:rgba(0,0,0,.45);
  --shadow:0 10px 30px rgba(0,0,0,.45); --shadow-sm:0 2px 10px rgba(0,0,0,.35);
  --t-fixed:#FF7A8A; --t-mobile:#F4A35A; --t-phone:#C59AF2; --t-p2p:#7AB4F2; --t-sensor:#5FD0CC; --t-traffic:#9DB8D2; --t-cctv:#B3B8C8;
  color-scheme:dark}

*{box-sizing:border-box}
html,body{height:100%}
body{margin:0;font:15px/1.5 var(--font);color:var(--text);background:var(--bg);-webkit-text-size-adjust:100%}
[hidden]{display:none!important}
a{color:var(--accent-ink)}
button,input{font:inherit;color:inherit}
button{cursor:pointer;touch-action:manipulation}
:focus-visible{outline:3px solid var(--focus);outline-offset:2px}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
h1,h2,h3{text-wrap:balance;margin:0}

/* Buttons */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:9px 14px;border-radius:var(--radius-sm);border:1px solid var(--line);background:var(--surface);color:var(--text);font-weight:600;font-size:14px;text-decoration:none;line-height:1.2}
.btn:hover{border-color:var(--line-strong);background:var(--surface-2)}
.btn.primary{background:var(--btn-bg);color:var(--btn-fg);border-color:transparent}
.btn.primary:hover{filter:brightness(1.12)}
.btn.quiet{background:var(--surface-2);border-color:transparent}
.btn svg{width:18px;height:18px;flex-shrink:0}
.icon-btn{width:44px;height:44px;display:grid;place-items:center;border-radius:50%;border:0;background:var(--surface-2);color:var(--text);padding:0}
.icon-btn svg{width:20px;height:20px}

/* Top bar */
.topbar{position:relative;z-index:1000;height:calc(var(--top) + env(safe-area-inset-top,0px));padding:env(safe-area-inset-top,0px) max(16px,env(safe-area-inset-right,0px)) 0 max(16px,env(safe-area-inset-left,0px));display:flex;align-items:center;gap:10px;background:var(--surface);border-bottom:1px solid var(--line)}
.brand{display:flex;align-items:center;gap:9px;text-decoration:none}
.brand .mark{width:28px;height:28px;border-radius:8px}
.brand .wm{height:17px;width:auto;display:block}
.wm-dark{display:none!important}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .wm-dark{display:block!important}:root:not([data-theme="light"]) .wm-light{display:none!important}}
:root[data-theme="dark"] .wm-dark{display:block!important}
:root[data-theme="dark"] .wm-light{display:none!important}
.region{font-size:11px;font-weight:650;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);border:1px solid var(--line);border-radius:6px;padding:3px 6px}
.topbar nav{margin-left:auto;display:flex;gap:4px}
.topbar nav a{font-size:14px;font-weight:600;color:var(--muted);text-decoration:none;min-height:44px;display:flex;align-items:center;padding:0 8px;border-radius:8px}
.topbar nav a:hover{color:var(--text)}

/* Map */
main.app{position:relative;height:calc(100% - var(--top) - env(safe-area-inset-top,0px));overflow:hidden}
.map-wrap{position:absolute;inset:0}
#basemap,#map{position:absolute;inset:0}
#basemap{background:var(--bg)}
#map{background:transparent;font-family:var(--font)}
.raster-base #map{background:var(--bg)}
.leaflet-container{background:transparent;font:inherit}
.raster-dark .leaflet-tile-pane{filter:invert(1) hue-rotate(180deg) brightness(.92) contrast(.88) saturate(.6)}
.leaflet-top,.leaflet-bottom{z-index:600}
.leaflet-control-attribution{font-size:10px;background:color-mix(in srgb,var(--surface) 85%,transparent)!important;color:var(--muted)}
.leaflet-control-attribution a{color:var(--muted)}
.map-fallback{position:absolute;inset:0;display:grid;place-items:center;padding:24px;text-align:center;color:var(--muted)}

.map-tools{position:absolute;z-index:700;right:max(14px,env(safe-area-inset-right,0px));display:flex;flex-direction:column;gap:8px}
.map-tools .tool{width:46px;height:46px;border-radius:14px;border:1px solid var(--line);background:var(--surface);color:var(--text);display:grid;place-items:center;box-shadow:var(--shadow-sm);padding:0}
.map-tools .tool svg{width:21px;height:21px}
.map-tools .zoom{display:flex;flex-direction:column;border-radius:14px;overflow:hidden;box-shadow:var(--shadow-sm);border:1px solid var(--line)}
.map-tools .zoom .tool{border:0;border-radius:0;box-shadow:none}
.map-tools .zoom .tool+.tool{border-top:1px solid var(--line)}

/* Markers */
.mk{display:grid;place-items:center}
.mk i{display:block;width:18px;height:18px;border:2.5px solid #fff;box-shadow:0 1px 4px rgba(0,0,0,.45)}
.mk-fixed i{background:#D63B50;border-radius:50%}
.mk-p2p i{background:#1F73C9;border-radius:5px}
.mk-sensor i{background:#0E8C8C;border-radius:3px;transform:rotate(45deg);width:15px;height:15px}
.mk-traffic i,.mk-cctv i{border-radius:6px;position:relative}
.mk-traffic i{background:#44617A}.mk-cctv i{background:#6B6F80}
.mk-traffic i::after,.mk-cctv i::after{content:"";position:absolute;inset:4px;border-radius:50%;background:#fff}
.mk-unverified i{background:transparent;border:2px dashed #888;border-radius:50%}
.mk.sel i{width:24px;height:24px;border-width:3px;box-shadow:0 0 0 4px rgba(19,169,124,.45),0 2px 6px rgba(0,0,0,.5)}
.mk-sensor.sel i{width:20px;height:20px}
.cl{display:grid;place-items:center;border-radius:50%;background:var(--ring);box-shadow:0 2px 8px rgba(0,0,0,.35)}
.cl b{display:grid;place-items:center;width:calc(100% - 8px);height:calc(100% - 8px);border-radius:50%;background:#0F2B33;color:#fff;font:700 13px/1 var(--font);font-variant-numeric:tabular-nums}
:root[data-theme="dark"] .cl b{background:#0B181C}

/* Floating search + layer row */
.search-controls{position:absolute;z-index:800;top:12px;left:max(12px,env(safe-area-inset-left,0px));right:max(12px,env(safe-area-inset-right,0px));pointer-events:none}
.search-controls>*{pointer-events:auto}
.searchbox{display:flex;align-items:center;gap:4px;height:54px;padding:5px 5px 5px 14px;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow)}
.searchbox .glyph{width:20px;height:20px;color:var(--muted);flex-shrink:0}
.searchbox input{flex:1;min-width:0;height:44px;border:0;background:transparent;font-size:16px;padding:0 6px;outline:none}
.searchbox input::placeholder{color:var(--muted)}
.searchbox input::-webkit-search-cancel-button{display:none}
.searchbox:focus-within{border-color:var(--accent)}
#clearSearch{width:40px;height:40px;border:0;background:transparent;color:var(--muted);border-radius:50%;display:grid;place-items:center;padding:0}
#searchGo{width:44px;height:44px;border:0;border-radius:12px;background:var(--btn-bg);color:var(--btn-fg);display:grid;place-items:center;padding:0}
#clearSearch svg,#searchGo svg{width:20px;height:20px}
.primary-row{display:flex;align-items:center;gap:8px;margin-top:9px;width:max-content;max-width:100%}
#layersButton{box-shadow:var(--shadow-sm);background:var(--btn-bg);color:var(--btn-fg);border:0}
.active-filter{display:inline-flex;align-items:center;min-height:36px;padding:6px 12px;border-radius:999px;background:var(--surface);border:1px solid var(--line);font-size:13px;font-weight:600;box-shadow:var(--shadow-sm);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:52vw}
#reset{min-height:36px;padding:6px 12px;border-radius:999px;font-size:13px;box-shadow:var(--shadow-sm)}

/* Toast */
.toast{position:absolute;z-index:850;left:50%;transform:translateX(-50%);top:142px;max-width:min(440px,calc(100% - 24px));background:var(--surface);color:var(--text);border:1px solid var(--line);border-radius:12px;padding:9px 14px;font-size:13px;box-shadow:var(--shadow);text-align:center}

/* Results sheet / panel */
.explorer{position:absolute;z-index:750;background:var(--surface);border:1px solid var(--line);box-shadow:var(--shadow);display:flex;flex-direction:column;overflow:hidden}
.sheet-grip{width:36px;height:4px;border-radius:4px;background:var(--line-strong);margin:8px auto 0;flex-shrink:0}
.resulthead{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 16px 10px;flex-shrink:0}
.resulthead h2{font-size:16px;font-variant-numeric:tabular-nums}
.resulthead span{display:block;font-size:12px;color:var(--muted)}
#resultContent{display:none;flex-direction:column;min-height:0;flex:1}
.show-list #resultContent{display:flex}
.scope{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 16px 6px;font-size:13px;flex-shrink:0}
.scope label{display:flex;align-items:center;gap:8px;min-height:40px}
.scope input{width:18px;height:18px;accent-color:var(--accent)}
#searchSummary{color:var(--muted);font-size:12px}
.results{overflow-y:auto;overscroll-behavior:contain;flex:1;min-height:0;padding:0 8px}
.result{display:block;width:100%;text-align:left;border:1px solid transparent;border-radius:12px;background:transparent;padding:11px 10px;min-height:68px}
.result+.result{border-top-color:var(--line);border-top-left-radius:0;border-top-right-radius:0}
.result:hover{background:var(--surface-2)}
.result.selected{background:var(--accent-soft);border-color:var(--accent)}
.result strong{display:block;font-size:15px;margin:3px 0 1px;overflow-wrap:anywhere}
.result .meta{font-size:12.5px;color:var(--muted)}
.tag{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:650;color:var(--t-fixed)}
.tag.mobile{color:var(--t-mobile)}.tag.phone{color:var(--t-phone)}.tag.p2p{color:var(--t-p2p)}.tag.sensor{color:var(--t-sensor)}.tag.traffic{color:var(--t-traffic)}.tag.cctv{color:var(--t-cctv)}
.dot{display:inline-block;width:10px;height:10px;border-radius:50%;background:#D63B50;flex-shrink:0}
.dot.mobile{background:#C2620A;border-radius:2px;transform:rotate(45deg);width:9px;height:9px}
.dot.phone{background:#8A4FC8;border-radius:2px}
.dot.p2p{background:#1F73C9;border-radius:3px}
.dot.sensor{background:#0E8C8C;border-radius:1px;transform:rotate(45deg);width:9px;height:9px}
.dot.traffic{background:#44617A;border-radius:3px}
.dot.cctv{background:#6B6F80;border-radius:3px}
#more{margin:6px 16px;flex-shrink:0}
.datafoot{font-size:11.5px;color:var(--muted);padding:8px 16px 12px;border-top:1px solid var(--line);flex-shrink:0;line-height:1.6}
.empty{padding:18px 10px;color:var(--muted);font-size:14px}
.empty strong{display:block;color:var(--text);margin-bottom:4px}
.loading-bar{height:3px;background:linear-gradient(90deg,transparent,var(--accent),transparent);background-size:50% 100%;background-repeat:no-repeat;animation:load 1.1s linear infinite}
@keyframes load{from{background-position:-50% 0}to{background-position:150% 0}}

/* Welcome card */
.welcome{position:absolute;z-index:760;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);padding:16px 16px 14px}
.welcome h2{font-size:19px;letter-spacing:-.01em}
.welcome p{margin:6px 0 12px;color:var(--muted);font-size:14px}
.welcome .row{display:flex;gap:8px;flex-wrap:wrap}

/* Dialogs / sheets */
dialog{color:var(--text);background:var(--surface);border:1px solid var(--line);box-shadow:var(--shadow);padding:0}
dialog::backdrop{background:var(--scrim)}
#layerDialog{width:min(460px,calc(100% - 24px));max-height:min(86dvh,760px);border-radius:22px;overflow:auto;overscroll-behavior:contain}
.sheet-inner{padding:18px 20px 20px}
.panel-heading{display:flex;align-items:flex-start;gap:12px}
.panel-heading h2{font-size:21px;letter-spacing:-.01em}
.eyebrow{font-size:11px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:var(--accent-ink)}
.panel-heading .icon-btn{margin-left:auto;flex-shrink:0}
.section-label{font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);margin:18px 0 8px}
.seg{display:grid;grid-template-columns:repeat(3,1fr);gap:4px;padding:4px;background:var(--surface-2);border-radius:14px}
.seg button{border:0;background:transparent;border-radius:10px;min-height:52px;padding:6px 4px;font-weight:650;font-size:14px;display:flex;flex-direction:column;align-items:center;justify-content:center;line-height:1.15}
.seg button small{font-weight:500;font-size:11.5px;color:var(--muted);font-variant-numeric:tabular-nums}
.seg button[aria-pressed="true"]{background:var(--surface);box-shadow:var(--shadow-sm)}
.filters{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.filter{display:flex;align-items:center;gap:9px;min-height:50px;padding:8px 11px;border-radius:12px;border:1px solid var(--line);background:var(--surface);text-align:left;font-size:13.5px;font-weight:600}
.filter span.t{flex:1;min-width:0;line-height:1.25}
.filter small{display:block;color:var(--muted);font-weight:500;font-size:12px;font-variant-numeric:tabular-nums}
.filter[aria-pressed="true"]{border-color:var(--accent);background:var(--accent-soft);box-shadow:inset 0 0 0 1px var(--accent)}
.filter.all{grid-column:1/-1}
.chips{display:flex;flex-wrap:wrap;gap:6px}
.chips button{min-height:40px;padding:6px 12px;border-radius:999px;border:1px solid var(--line);background:var(--surface);font-weight:600;font-size:13px}
.chips button[aria-pressed="true"]{background:var(--btn-bg);color:var(--btn-fg);border-color:transparent}
.legend{display:grid;gap:9px;font-size:13.5px}
.legend p{margin:0;display:flex;align-items:center;gap:10px}
.legend .sym{width:26px;display:grid;place-items:center;flex-shrink:0}
.legend .line{display:block;width:26px;border-top:3px dashed #C2620A}
.legend .line.phone{border-color:#8A4FC8}
.legend .line.p2p{border-top-style:solid;border-color:#1F73C9;border-top-width:4px}
.legend .mk i{width:14px;height:14px;border-width:2px}
.legend .cl{width:26px;height:26px}
.legend .cl b{font-size:10px}
.note{font-size:13px;color:var(--muted);margin:14px 0 0}
.sheet-actions{position:sticky;bottom:0;background:var(--surface);padding:12px 20px calc(16px + env(safe-area-inset-bottom,0px));border-top:1px solid var(--line)}
.sheet-actions .btn{width:100%;min-height:50px}

#details{position:fixed;margin:0;inset:auto;z-index:900;border-radius:22px;overflow:auto;overscroll-behavior:contain}
.detail-controls{position:sticky;top:0;z-index:2;display:flex;align-items:center;gap:6px;padding:10px 14px 6px;background:var(--surface)}
.detail-controls .btn{min-height:40px;padding:6px 12px;font-size:13px}
.detail-controls .icon-btn{margin-left:auto}
#detailBody{padding:0 20px 20px}
.detail-title{font-size:24px;letter-spacing:-.02em;line-height:1.15;margin:8px 0 3px;overflow-wrap:anywhere}
.detail-subtitle{margin:0;color:var(--muted);font-size:14px}
.trust-row{display:flex;flex-wrap:wrap;gap:6px;margin:12px 0}
.trust-pill{display:inline-flex;align-items:center;gap:5px;font-size:12px;font-weight:650;padding:5px 9px;border-radius:999px;background:var(--accent-soft);color:var(--accent-ink)}
.trust-pill.warning{background:var(--warn-bg);color:var(--warn-text)}
.detail-note{margin:0 0 14px;padding:12px 14px;border-radius:12px;background:var(--surface-2);font-size:14.5px}
.detail-note.warning{background:var(--warn-bg);color:var(--warn-text)}
.detail-actions{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 14px}
.detail-actions .btn{flex:1 1 auto}
.detail-facts{display:grid;grid-template-columns:auto 1fr;gap:6px 14px;font-size:13.5px;margin:0 0 14px}
.detail-facts dt{color:var(--muted)}
.detail-facts dd{margin:0;overflow-wrap:anywhere}
.share-fallback{display:grid;gap:6px;font-size:13px;margin:0 0 14px}
.share-fallback input{min-height:44px;border:1px solid var(--line);border-radius:10px;padding:8px;background:var(--surface-2);font-size:13px}
.evidence{border-top:1px solid var(--line);padding-top:6px}
.evidence summary{min-height:44px;display:flex;align-items:center;font-weight:650;font-size:14px;cursor:pointer}
.evidence dl{display:grid;grid-template-columns:130px minmax(0,1fr);gap:8px 12px;font-size:12.5px;margin:6px 0 12px}
.evidence dt{color:var(--muted)}
.evidence dd{margin:0;overflow-wrap:anywhere}
.evidence .small{font-size:12.5px;color:var(--muted)}
#details.collapsed .detail-hide{display:none}

/* ---------- Phone layout ---------- */
@media (max-width:760px){
  :root{--top:48px}
  .brand .wm{height:15px}
  .region{display:none}
  .explorer{left:max(8px,env(safe-area-inset-left,0px));right:max(8px,env(safe-area-inset-right,0px));bottom:calc(8px + env(safe-area-inset-bottom,0px));border-radius:22px;max-height:calc(100% - 150px)}
  .show-list .explorer{height:min(56dvh,calc(100% - 150px))}
  .map-tools{bottom:calc(var(--sheet-h,78px) + 18px + env(safe-area-inset-bottom,0px))}
  .map-tools .zoom{display:none}
  .leaflet-bottom{bottom:calc(var(--sheet-h,78px) + 10px + env(safe-area-inset-bottom,0px))}
  .show-list .leaflet-bottom{bottom:calc(var(--sheet-h,78px) + 10px + env(safe-area-inset-bottom,0px))}
  .detail-open .explorer,.detail-open .map-tools,.detail-open .welcome{visibility:hidden}
  .welcome{left:12px;right:12px;bottom:calc(var(--sheet-h,78px) + 18px + env(safe-area-inset-bottom,0px))}
  #details{left:max(8px,env(safe-area-inset-left,0px));right:max(8px,env(safe-area-inset-right,0px));bottom:calc(8px + env(safe-area-inset-bottom,0px));width:auto;max-width:none;max-height:52dvh}
  #details.expanded{max-height:calc(100dvh - var(--top) - env(safe-area-inset-top,0px) - 16px)}
  #details.collapsed{max-height:200px}
  #layerDialog{margin:auto 0 0;width:100%;max-width:none;border-radius:24px 24px 0 0;max-height:88dvh;border-bottom:0}
  #layerDialog[open]{animation:sheetUp .22s ease-out}
  .toast{top:126px}
  .detail-actions .btn{flex:1 1 40%}
}
@keyframes sheetUp{from{transform:translateY(24px);opacity:.6}to{transform:none;opacity:1}}

/* ---------- Desktop layout ---------- */
@media (min-width:761px){
  .search-controls{right:auto;width:380px;top:16px;left:16px}
  .explorer{left:16px;width:380px;top:136px;bottom:auto;border-radius:20px;max-height:calc(100% - 152px)}
  .show-list .explorer{bottom:16px}
  .sheet-grip{display:none}
  .resulthead{padding-top:12px}
  .map-tools{top:16px;right:16px}
  .detail-open .map-tools{right:432px}
  #details{top:calc(var(--top) + env(safe-area-inset-top,0px) + 16px);right:16px;bottom:auto;left:auto;width:400px;max-height:calc(100dvh - var(--top) - env(safe-area-inset-top,0px) - 32px)}
  #details.collapsed{max-height:210px}
  .welcome{left:412px;top:16px;width:320px}
  .toast{top:16px}
  .detail-controls .grow{display:none}
}
@media (max-width:760px) and (max-height:520px){
  .explorer,.show-list .explorer{right:auto;width:340px;max-height:calc(100% - 16px)}
  .show-list .explorer{height:calc(100% - 80px)}
  .search-controls{right:auto;width:340px}
  #details{left:auto;width:360px;max-height:calc(100dvh - var(--top) - 16px)}
  .map-tools{bottom:16px}
  .welcome{display:none}
}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* ---------- About page ---------- */
.doc{max-width:860px;margin:0 auto;padding:36px max(20px,env(safe-area-inset-left,0px)) 64px}
.doc .eyebrow{display:block;margin-bottom:8px}
.doc h1{font-size:clamp(30px,5vw,44px);letter-spacing:-.03em;line-height:1.08}
.doc h2{font-size:23px;letter-spacing:-.01em;margin:40px 0 12px}
.doc h3{font-size:17px;margin:0 0 6px;display:flex;align-items:center;gap:10px}
.doc p{max-width:68ch}
.doc .lede{font-size:18px;color:var(--muted)}
.doc .notice{background:var(--warn-bg);color:var(--warn-text);border-radius:14px;padding:16px 18px;margin:20px 0}
.doc .cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,250px),1fr));gap:12px}
.doc article{background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:18px}
.doc article p{margin:0;font-size:14.5px;color:var(--muted)}
.doc .overflow{overflow-x:auto;border:1px solid var(--line);border-radius:14px;background:var(--surface)}
.doc table{width:100%;border-collapse:collapse;font-size:14px;min-width:620px}
.doc th,.doc td{text-align:left;vertical-align:top;padding:12px 14px;border-bottom:1px solid var(--line)}
.doc tr:last-child td{border-bottom:0}
.doc th{font-size:12px;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.doc .line{display:inline-block;width:24px;border-top:3px dashed #C2620A}
.doc .line.phone{border-color:#8A4FC8}.doc .line.p2p{border-top-style:solid;border-color:#1F73C9}
.doc .mk i{width:14px;height:14px;border-width:2px}
.doc-body{overflow:auto;height:auto}

/* ---------- v12: suggestions, saved areas, downloads, sponsor, certificate, embed ---------- */
.topbar nav a.hide-sm{display:flex}
#saveArea{width:40px;height:40px;border:0;background:transparent;color:var(--muted);border-radius:50%;display:grid;place-items:center;padding:0}
#saveArea svg{width:20px;height:20px}
#saveArea.on{color:#E0A33A}
#saveArea.on svg{fill:currentColor}
.suggest{margin-top:6px;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);overflow:hidden;max-height:min(340px,50dvh);overflow-y:auto}
.suggest button{display:flex;justify-content:space-between;align-items:baseline;gap:12px;width:100%;min-height:46px;padding:10px 16px;border:0;border-top:1px solid var(--line);background:transparent;text-align:left;font-size:15px;font-weight:600}
.suggest button:first-child{border-top:0}
.suggest button small{color:var(--muted);font-weight:500;font-size:12.5px;white-space:nowrap}
.suggest button:hover,.suggest button.active{background:var(--surface-2)}
.head-actions{display:flex;gap:6px;align-items:center}
.dl{position:relative}
.dl summary{list-style:none;cursor:pointer}
.dl summary::-webkit-details-marker{display:none}
.dl-menu{position:absolute;right:0;top:calc(100% + 6px);z-index:5;width:230px;background:var(--surface);border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow);padding:6px}
.dl-menu button{display:block;width:100%;text-align:left;min-height:44px;border:0;border-radius:10px;background:transparent;padding:8px 10px;font-weight:600;font-size:14px}
.dl-menu button:hover{background:var(--surface-2)}
.dl-menu p{margin:4px 10px 6px;font-size:12px;color:var(--muted)}
.sponsor{display:flex;flex-wrap:wrap;gap:4px 8px;align-items:baseline;padding:8px 16px;border-top:1px solid var(--line);font-size:13px;flex-shrink:0}
.sponsor:empty{display:none}
.sp-label{color:var(--muted);font-size:12px}
.sponsor a{font-weight:650}
.sp-blurb{flex-basis:100%;color:var(--muted);font-size:12.5px}
.cert{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px 14px;margin:0 0 14px;padding:12px 14px;border:1px solid var(--line);border-radius:12px}
.cert-label{display:block;font-size:12px;color:var(--muted)}
.cert strong{font-size:16px;font-variant-numeric:tabular-nums}
.cert a{font-weight:650;font-size:14px}
.more-links{display:flex;flex-wrap:wrap;gap:6px 16px;margin:0 0 12px;font-size:14px;font-weight:600}
.more-links:empty{display:none}
.embed-badge{position:absolute;z-index:850;left:12px;bottom:12px;background:var(--btn-bg);color:var(--btn-fg);font-weight:700;font-size:13px;padding:8px 12px;border-radius:10px;text-decoration:none;box-shadow:var(--shadow-sm)}
.embed{--top:0px}
.embed .topbar,.embed .welcome{display:none}
.embed .explorer{display:none}
@media (max-width:760px){.topbar nav a.hide-sm{display:none}.dl-menu{right:auto;left:-120px}}
