/* Layout: sticky black header with tabs, then a street map beside an activity feed; columns stack on phones.
   Theme: one deliberate black-and-red look for every visitor (no light variant). */
:root{
  color-scheme:dark;
  --bg:#0a0a0b; --surface:#141416; --surface-2:#1c1c1f; --ink:#f3f3f4; --muted:#a3a3aa; --line:#2b2b30;
  --accent:#e1251b; --accent-hi:#ff3b30; --accent-ink:#ff6a60; --on-accent:#ffffff;
  --stolen:#ff4a40; --sighting:#ff9a3d; --safe:#4cc26a;
  --stolen-soft:#361312; --sighting-soft:#382514; --safe-soft:#13301b; --accent-soft:#2a0f0e;
  --suspect:#bb92f2; --suspect-soft:#2a1f3d;
  --map-bg:#111113;
  /* bike drawings sit on a light studio backdrop, like a product photo */
  --stage:#e4e7ea; --stage-hi:#f8f9fa; --sil:#1d2125; --metal:#9aa1a8; --seat:#1d2125; --glass:rgba(45,60,75,.55);
  --plate-bg:#ffffff; --plate-ink:#111111;
  --shadow:0 1px 2px rgba(0,0,0,.4),0 8px 24px rgba(0,0,0,.35);
  --f-display:"Barlow Condensed","Arial Narrow","Roboto Condensed",sans-serif;
  --f-body:"IBM Plex Sans",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  --f-mono:"IBM Plex Mono",ui-monospace,Consolas,"Courier New",monospace;
}
*{box-sizing:border-box}
[hidden]{display:none!important}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--ink);font-family:var(--f-body);font-size:15px;line-height:1.5;padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px)}
body::before{content:"";position:fixed;inset:0 0 auto;height:env(safe-area-inset-top,0px);z-index:30;background:#000}
img{max-width:100%}
.wrap{max-width:1240px;margin:0 auto;padding-left:max(16px,env(safe-area-inset-left,0px));padding-right:max(16px,env(safe-area-inset-right,0px))}
h1,h2,h3{font-family:var(--f-display);font-weight:700;line-height:1.1;margin:0;text-wrap:balance;letter-spacing:.01em}
h1{font-size:2.1rem}
h2{font-size:1.45rem}
h3{font-size:1.2rem}
p{margin:0}
button,input,select,textarea{font:inherit;color:inherit}
:focus-visible{outline:3px solid var(--accent);outline-offset:2px}
.meta{color:var(--muted);font-size:.875rem}
.eyebrow{font-size:.72rem;font-weight:600;letter-spacing:.09em;text-transform:uppercase;color:var(--muted)}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

.proto{background:var(--accent-soft);color:var(--ink);font-size:.82rem;border-bottom:1px solid var(--line)}
.proto .wrap{padding-block:7px}
.proto b{font-weight:600}

/* header */
.top{position:sticky;top:env(safe-area-inset-top,0px);z-index:20;background:#000;border-bottom:3px solid var(--accent)}
.top-inner{display:flex;align-items:center;gap:14px;flex-wrap:wrap;padding-block:12px}
.brand{display:flex;align-items:center;gap:10px;text-decoration:none;color:var(--ink);flex-shrink:0}
.brand-mark{position:relative;width:40px;height:40px;border-radius:9px;background:var(--accent);overflow:hidden;flex-shrink:0}
/* the helmet artwork is black on white: multiply turns the white into the red tile, so the visor and cut lines show red */
.brand-mark img{position:absolute;width:52px;height:52px;max-width:none;left:-6px;top:-5px;mix-blend-mode:multiply}
.brand-name{font-family:var(--f-display);font-weight:700;font-size:1.65rem;letter-spacing:.02em;line-height:1}
.brand-name span{color:var(--accent-ink);margin-left:3px}
.search{flex:1 1 300px;display:flex;min-width:0;border:1.5px solid var(--line);border-radius:999px;background:var(--surface-2);overflow:hidden}
.search:focus-within{border-color:var(--ink)}
.search input{flex:1;min-width:0;border:0;background:transparent;padding:9px 16px;outline:none}
.search button{border:0;background:var(--accent);color:var(--on-accent);padding:0 18px;font-weight:600;cursor:pointer}
.search button:hover{background:var(--accent-hi)}
.top-actions{display:flex;gap:8px;flex-wrap:wrap}
.tabs{display:flex;gap:4px;overflow-x:auto;scrollbar-width:none}
.tab{border:0;background:none;padding:10px 14px 11px;font-weight:600;color:var(--muted);cursor:pointer;border-bottom:3px solid transparent;white-space:nowrap;display:flex;gap:6px;align-items:center}
.tab[aria-selected="true"]{color:var(--ink);border-bottom-color:var(--accent)}
.tab .n{font-size:.72rem;background:var(--surface-2);border:1px solid var(--line);border-radius:999px;padding:0 7px;font-variant-numeric:tabular-nums}

/* buttons */
.btn{border:1.5px solid var(--line);background:var(--surface);color:var(--ink);padding:8px 14px;border-radius:8px;font-weight:600;cursor:pointer;display:inline-flex;align-items:center;gap:6px;font-size:.9rem;line-height:1.2}
.btn:hover{border-color:var(--ink)}
.btn-accent{background:var(--accent);border-color:var(--accent);color:var(--on-accent)}
.btn-accent:hover{background:var(--accent-hi);border-color:var(--accent-hi)}
.btn-light{background:var(--ink);border-color:var(--ink);color:var(--bg)}
.btn-light:hover{background:#fff;border-color:#fff}
.btn-stolen{background:var(--accent);border-color:var(--accent);color:#fff}
.btn-stolen:hover{border-color:var(--ink)}
.btn[disabled]{opacity:.55;cursor:not-allowed}
.btn-sm{padding:4px 10px;font-size:.8rem;border-radius:999px}
.btn-fb{background:#1877f2;border-color:#1877f2;color:#fff;justify-content:center;padding:11px 14px;font-size:.95rem}
.btn-fb:hover{border-color:var(--ink)}
.btn-wide{width:100%;justify-content:center;padding:11px 14px;font-size:.95rem}
.user-chip{display:inline-flex;align-items:center;gap:8px}
.avatar{width:24px;height:24px;border-radius:50%;background:#1877f2;color:#fff;font-size:.7rem;font-weight:600;display:grid;place-items:center}
/* profile menu under the signed-in button */
.user-wrap{position:relative;display:flex}
.user-menu{position:absolute;right:0;top:calc(100% + 6px);z-index:40;min-width:230px;background:var(--surface);border:1.5px solid var(--line);border-radius:10px;box-shadow:var(--shadow);padding:6px;display:flex;flex-direction:column}
.user-menu>button,.user-menu>a{border:0;background:none;text-align:left;padding:9px 10px;border-radius:7px;color:var(--ink);text-decoration:none;font-weight:500;cursor:pointer;font-size:.92rem}
.user-menu>button:hover,.user-menu>a:hover{background:var(--surface-2)}
.um-head{display:flex;flex-direction:column;padding:6px 10px 10px;margin-bottom:4px;border-bottom:1px solid var(--line)}
.um-head b{font-weight:600}
.user-menu .um-out{color:var(--accent-ink);margin-top:4px;border-top:1px solid var(--line);border-radius:0 0 7px 7px}
.or{display:flex;align-items:center;gap:10px;color:var(--muted);font-size:.8rem}
.or::before,.or::after{content:"";flex:1;height:1px;background:var(--line)}

/* plates and pills */
.plate{display:inline-flex;align-items:baseline;gap:6px;font-family:var(--f-mono);font-weight:600;font-size:.95rem;letter-spacing:.08em;background:var(--plate-bg);color:var(--plate-ink);border:2px solid var(--plate-ink);border-radius:5px;padding:1px 8px;line-height:1.35}
.plate small{font-size:.58rem;letter-spacing:.06em;font-weight:500}
.plate.none{font-size:.72rem;letter-spacing:.04em}
.pill{display:inline-flex;align-items:center;gap:5px;font-size:.72rem;font-weight:600;letter-spacing:.05em;text-transform:uppercase;padding:2px 8px;border-radius:999px}
.pill-stolen{background:var(--stolen-soft);color:var(--stolen)}
.pill-recovered,.pill-safespot{background:var(--safe-soft);color:var(--safe)}
.pill-sighting,.pill-warning{background:var(--sighting-soft);color:var(--sighting)}
.pill-hotspot{background:var(--stolen-soft);color:var(--stolen)}
.pill-question{background:var(--surface-2);color:var(--muted);border:1px solid var(--line)}
.demo{font-size:.66rem;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);border:1px dashed var(--line);border-radius:4px;padding:0 5px}
.dot{width:10px;height:10px;border-radius:50%;display:inline-block;flex-shrink:0}
.dot-stolen{background:var(--stolen)}
.dot-sighting{background:var(--sighting);border-radius:2px;transform:rotate(45deg) scale(.85)}
.dot-safespot,.dot-recovered{background:var(--safe);border-radius:3px}
.dot-hotspot{background:transparent;border:2px dashed var(--stolen)}
.dot-warning{background:var(--sighting)}
.dot-question{background:var(--muted)}

main{padding-block:22px 40px}
.view{display:flex;flex-direction:column;gap:18px}
.view-head{display:flex;justify-content:space-between;align-items:flex-end;gap:12px;flex-wrap:wrap}
.view-head p{color:var(--muted);max-width:62ch;margin-top:4px}

/* map view */
.map-layout{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);gap:18px;align-items:start}
.card{background:var(--surface);border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow)}
.map-card{overflow:hidden}
.map-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border-bottom:1px solid var(--line)}
.stat{padding:12px 16px;display:flex;flex-direction:column;gap:2px;min-width:0}
.stat+.stat{border-left:1px solid var(--line)}
.stat b{font-family:var(--f-display);font-size:1.9rem;line-height:1;font-variant-numeric:tabular-nums}
.stat span{font-size:.8rem;color:var(--muted)}
.stat.s-stolen b{color:var(--stolen)}
.stat.s-sighting b{color:var(--sighting)}
.map-tools{display:flex;flex-wrap:wrap;gap:8px;align-items:center;padding:10px 12px;border-bottom:1px solid var(--line)}
.chip{border:1.5px solid var(--line);background:var(--surface);border-radius:999px;padding:4px 11px;font-size:.82rem;font-weight:500;cursor:pointer;display:inline-flex;align-items:center;gap:7px}
.chip[aria-pressed="true"]{border-color:var(--ink);background:var(--surface-2)}
.chip[aria-pressed="false"]{color:var(--muted)}
.chip[aria-pressed="false"] .dot{opacity:.35}
.map-tools select{border:1.5px solid var(--line);border-radius:999px;background:var(--surface);padding:4px 10px;font-size:.82rem}
.map-tools .spacer{flex:1}
.map-wrap{position:relative;isolation:isolate;z-index:0}
#map{height:clamp(380px,64vh,660px);background:var(--map-bg)}
#map.pinning{cursor:crosshair}
.map-fail{padding:40px 20px;text-align:center;color:var(--muted)}
.pin-hint{position:absolute;left:50%;top:12px;transform:translateX(-50%);z-index:1001;background:var(--ink);color:var(--surface);font-size:.85rem;font-weight:500;padding:6px 14px;border-radius:999px;box-shadow:var(--shadow);white-space:nowrap;pointer-events:none}
.view-btns{position:absolute;left:54px;top:10px;z-index:1000;display:flex;gap:6px}
.view-btns button{border:2px solid rgba(0,0,0,.2);background-clip:padding-box;background:var(--surface);color:var(--ink);border-radius:6px;font-size:.8rem;font-weight:600;padding:4px 10px;cursor:pointer}
.leaflet-container{font-family:var(--f-body);background:var(--map-bg)}
.leaflet-bar a,.leaflet-bar a:hover{background:var(--surface);color:var(--ink);border-bottom-color:var(--line)}
.leaflet-control-attribution{background:var(--surface)!important;color:var(--muted)}
.leaflet-control-attribution a{color:var(--muted)}
.leaflet-control-scale-line{background:var(--surface);color:var(--ink);border-color:var(--ink)}
.leaflet-tile-pane{filter:invert(1) hue-rotate(180deg) brightness(.85) contrast(.9) saturate(.35)}
/* markers */
.mk{width:24px;height:24px;display:grid;place-items:center;font:700 13px/1 var(--f-body);color:#fff;box-shadow:0 1px 4px rgba(0,0,0,.45)}
.mk-theft{background:#cf2e2e;border:3px solid #fff;border-radius:50%}
.mk-sight{width:18px;height:18px;margin:3px;background:#e07000;border:2.5px solid #fff;border-radius:3px;transform:rotate(45deg)}
.mk-safe{width:22px;height:22px;margin:1px;background:#24803a;border:2.5px solid #fff;border-radius:6px}
.mk-hot{width:14px;height:14px;margin:5px;background:#cf2e2e;border:2px solid #fff;border-radius:50%}
.mk-sus{background:#7438b8;border:3px solid #fff;border-radius:6px;font-size:14px}
.dot-suspect{background:var(--suspect);border-radius:3px}
.btn-sus{background:var(--suspect);border-color:var(--suspect);color:#fff}
.btn-sus:hover{border-color:var(--ink)}
.linkbtn{border:0;background:none;padding:0;font:inherit;font-weight:600;color:var(--suspect);text-decoration:underline;cursor:pointer}
.signs{display:flex;flex-wrap:wrap;gap:6px}
.sign{font-size:.74rem;font-weight:500;padding:2px 9px;border-radius:999px;background:var(--suspect-soft);color:var(--suspect)}
.checks{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:6px 14px}
.check{display:flex;gap:8px;align-items:flex-start;font-size:.88rem;cursor:pointer}
.check input{width:auto;margin-top:4px;accent-color:var(--suspect)}
.legend{font-size:.82rem;font-weight:600;margin-bottom:6px;padding:0}
.matches{display:flex;flex-direction:column;gap:8px}
.match{display:flex;gap:12px;align-items:center;padding:8px;border:1px solid var(--line);border-radius:10px;background:var(--surface)}
.match .d-sil{width:104px}
.match>div:last-child{min-width:0;display:flex;flex-direction:column;gap:2px;flex:1}
.match .score{font-size:.7rem;font-weight:600;letter-spacing:.07em;text-transform:uppercase;color:var(--suspect)}
.result-hit{border:1.5px solid var(--stolen);background:var(--stolen-soft);border-radius:12px;padding:12px 14px;display:flex;flex-direction:column;gap:8px}
.result-hit h3{color:var(--stolen)}
.blur-wrap{position:relative;max-width:100%;touch-action:none;user-select:none;-webkit-user-select:none}
.blur-wrap canvas{display:block;max-width:100%;height:auto;border-radius:8px;cursor:crosshair}
.blur-box{position:absolute;border:2px dashed #fff;outline:1px solid #000;pointer-events:none}
.thumb .bl{position:absolute;left:4px;bottom:4px;border:0;border-radius:999px;background:rgba(0,0,0,.7);color:#fff;font-size:.68rem;font-weight:600;padding:2px 8px;cursor:pointer}
.thumb .blurred{position:absolute;left:4px;top:4px;font-size:.62rem;font-weight:600;background:#24803a;color:#fff;padding:1px 6px;border-radius:999px}
.mk.sel{outline:3px solid #fff;outline-offset:3px}
.mk-pin{width:24px;height:24px;background:#111;border:4px solid #e1251b;border-radius:50% 50% 50% 0;transform:translate(0,-12px) rotate(-45deg)}
.hot-area{stroke:#cf2e2e;fill:#cf2e2e;fill-opacity:.12;stroke-width:2;stroke-dasharray:6 5}
.trail{stroke:#e07000;stroke-width:3;stroke-dasharray:2 8;stroke-linecap:round;fill:none}
.map-note{font-size:.8rem;color:var(--muted);padding:9px 14px;border-top:1px solid var(--line)}
.detail{border-top:1px solid var(--line);padding:14px 16px;display:flex;flex-direction:column;gap:10px;background:var(--surface-2)}
.d-kind{display:flex;align-items:center;gap:8px;font-size:.75rem;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);flex-wrap:wrap}
.d-main{display:flex;gap:14px;align-items:center}
.d-sil{width:140px;flex-shrink:0;background:radial-gradient(ellipse at 50% 80%,var(--stage-hi) 0%,var(--stage) 75%);border-radius:10px;overflow:hidden;aspect-ratio:16/10;display:grid;place-items:center}
.d-sil .sil{width:96%}
.d-sil img{width:100%;height:100%;object-fit:cover}
.d-main>div:last-child{min-width:0;display:flex;flex-direction:column;align-items:flex-start;gap:4px}
.d-actions{display:flex;gap:8px;flex-wrap:wrap}

.feed{display:flex;flex-direction:column;gap:14px}
.feed-card{padding:16px}
.feed-card h2{margin-bottom:6px}
.feed-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}
.feed-item{display:flex;gap:11px;align-items:flex-start;padding:10px 4px;border-top:1px solid var(--line);cursor:pointer;background:none;border-left:0;border-right:0;border-bottom:0;text-align:left;width:100%}
.feed-list li:first-child .feed-item{border-top:0}
.feed-item:hover{background:var(--surface-2)}
.feed-item .dot{margin-top:6px}
.feed-item .t{font-weight:500;line-height:1.35}
.feed-item .meta{font-size:.8rem}

.ad{border:1.5px dashed var(--line);border-radius:12px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-height:120px;color:var(--muted);background:repeating-linear-gradient(135deg,transparent 0 10px,var(--surface-2) 10px 20px);text-align:center;padding:12px}
.ad b{font-size:.8rem;letter-spacing:.08em;text-transform:uppercase}
.ad small{font-size:.75rem}

.safety{padding:16px;display:flex;flex-direction:column;gap:8px;border-left:4px solid var(--stolen)}
.safety h2{font-size:1.2rem}
.nums{display:grid;grid-template-columns:auto 1fr;gap:3px 12px;font-size:.88rem}
.nums b{font-family:var(--f-mono);user-select:all}

/* bikes */
.filters{display:flex;gap:8px;flex-wrap:wrap}
.filters select{border:1.5px solid var(--line);border-radius:8px;background:var(--surface);padding:7px 10px}
.bike-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:14px}
.bike-card{display:flex;flex-direction:column;text-align:left;padding:0;cursor:pointer;overflow:hidden;background:var(--surface);border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow)}
.bike-card:hover{border-color:var(--ink)}
.bike-img{position:relative;aspect-ratio:16/9;max-width:100%;background:radial-gradient(ellipse at 50% 80%,var(--stage-hi) 0%,var(--stage) 75%);display:grid;place-items:center;border-bottom:1px solid var(--line);overflow:hidden}
.bike-img .sil{width:86%}
.bike-img img{width:100%;height:100%;object-fit:cover}
/* profile photos: square crop shown over a blurred copy of itself so it fills any frame */
.pfp-fill{position:absolute;inset:-24px;background-size:cover;background-position:center;filter:blur(18px) brightness(.75)}
.bike-img img.pfp-main,.bike-hero img.pfp-main,.d-sil img.pfp-main{position:relative;width:auto;height:100%;aspect-ratio:1;object-fit:cover}
.d-sil,.bike-hero{position:relative}
.ava{border-radius:50%;object-fit:cover;flex-shrink:0;border:2px solid var(--stolen);background:var(--stage)}
.ava-s{width:30px;height:30px}
.ava-l{width:64px;height:64px;border-width:3px}
.mk-photo{width:42px;height:42px;border-radius:50%;border:3px solid #cf2e2e;background:#fff;box-shadow:0 1px 5px rgba(0,0,0,.5);position:relative}
.mk-photo img{width:100%;height:100%;border-radius:50%;object-fit:cover;display:block}
.mk-photo span{position:absolute;right:-5px;top:-5px;width:17px;height:17px;border-radius:50%;background:#cf2e2e;color:#fff;font:700 11px/13px var(--f-body);text-align:center;border:2px solid #fff}
.mk-photo.sel{outline:3px solid #fff;outline-offset:2px}
.pfp-row{display:flex;gap:14px;align-items:center}
.pfp-pick{width:84px;height:84px;border-radius:50%;border:2px dashed var(--line);background:var(--surface-2);display:grid;place-items:center;cursor:pointer;padding:0;overflow:hidden;flex-shrink:0;color:var(--muted)}
.pfp-pick:hover{border-color:var(--ink)}
.pfp-pick img{width:100%;height:100%;object-fit:cover}
.pfp-pick.has{border:3px solid var(--stolen)}
.pfp-row>div{min-width:0;display:flex;flex-direction:column;gap:4px}
.crop-box{width:min(320px,100%);aspect-ratio:1;position:relative;border-radius:12px;overflow:hidden;touch-action:none;cursor:grab;background:#000;margin:0 auto}
.crop-box:active{cursor:grabbing}
.crop-box canvas{width:100%;height:100%;display:block}
.crop-box::after{content:"";position:absolute;inset:0;border-radius:50%;box-shadow:0 0 0 400px rgba(0,0,0,.55);border:2px solid rgba(255,255,255,.9);pointer-events:none}
.crop-zoom{display:flex;align-items:center;gap:10px;width:min(320px,100%);margin:0 auto;font-size:.8rem;color:var(--muted)}
.crop-zoom input{flex:1;accent-color:var(--accent)}
.photo-count{position:absolute;right:8px;bottom:8px;background:rgba(0,0,0,.6);color:#fff;font-size:.72rem;font-weight:600;padding:2px 8px;border-radius:999px}
.bike-body{padding:12px 14px 14px;display:flex;flex-direction:column;gap:4px;min-width:0}
.bike-row{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:4px}
.sight-count{font-size:.82rem;font-weight:600;color:var(--sighting);margin-top:2px}
.sight-count.zero{color:var(--muted);font-weight:500}
.empty{padding:28px;text-align:center;color:var(--muted);border:1.5px dashed var(--line);border-radius:14px}

/* search */
.result-banner{padding:16px 18px;border-radius:12px;display:flex;flex-direction:column;gap:6px}
.result-banner.hit{background:var(--stolen-soft);border:1.5px solid var(--stolen)}
.result-banner.hit h2{color:var(--stolen)}
.result-banner.miss{background:var(--surface);border:1.5px solid var(--line)}
.result-banner a{color:inherit;font-weight:600}

/* community */
.comm-layout{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(0,1fr);gap:18px;align-items:start}
.posts{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:12px}
.post{padding:14px 16px;display:grid;grid-template-columns:auto minmax(0,1fr);gap:4px 14px}
.vote{grid-row:span 3;display:flex;flex-direction:column;align-items:center;border:1.5px solid var(--line);background:var(--surface);border-radius:10px;padding:6px 8px;cursor:pointer;min-width:52px;font-variant-numeric:tabular-nums;align-self:start}
.vote b{font-size:1.05rem}
.vote small{font-size:.66rem;color:var(--muted);text-transform:uppercase;letter-spacing:.06em}
.vote[aria-pressed="true"]{border-color:var(--accent);background:var(--accent-soft)}
.post-top{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.steps{margin:0;padding-left:20px;display:flex;flex-direction:column;gap:6px;font-size:.92rem}
.side{display:flex;flex-direction:column;gap:14px}
.side .card{padding:16px;display:flex;flex-direction:column;gap:10px}

/* gear */
.layers{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border:1px solid var(--line);border-radius:12px;overflow:hidden;background:var(--surface)}
.layer{padding:12px 14px;display:flex;flex-direction:column;gap:2px;min-width:0}
.layer+.layer{border-left:1px solid var(--line)}
.layer b{font-family:var(--f-display);font-size:1.15rem}
.layer span{font-size:.82rem;color:var(--muted)}
.gear-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:14px}
.gear{padding:16px;display:flex;flex-direction:column;gap:8px}
.gear .price{font-family:var(--f-mono);font-size:.9rem;font-variant-numeric:tabular-nums}
.gear dl{margin:0;display:flex;flex-direction:column;gap:6px;font-size:.88rem}
.gear dt{font-size:.7rem;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.gear dd{margin:0}
.gear .foot{margin-top:auto;padding-top:8px;display:flex;justify-content:space-between;align-items:center;gap:8px;border-top:1px solid var(--line);font-size:.8rem;color:var(--muted)}

footer{border-top:1px solid var(--line);background:var(--surface)}
footer .wrap{padding-block:18px;font-size:.82rem;color:var(--muted);display:flex;flex-direction:column;gap:4px}

/* dialogs */
dialog{border:0;border-radius:16px;padding:0;width:min(600px,calc(100vw - 24px));max-height:calc(100dvh - 40px);background:var(--surface);color:var(--ink);box-shadow:0 20px 60px rgba(0,0,0,.35)}
dialog::backdrop{background:rgba(8,12,16,.6)}
.dlg{display:flex;flex-direction:column;max-height:calc(100dvh - 40px)}
.dlg-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding:18px 20px 12px;border-bottom:1px solid var(--line)}
.dlg-head p{color:var(--muted);font-size:.88rem;margin-top:4px}
.x{border:0;background:var(--surface-2);width:34px;height:34px;border-radius:50%;cursor:pointer;font-size:1.2rem;line-height:1;flex-shrink:0}
.dlg-body{padding:16px 20px;overflow-y:auto;display:flex;flex-direction:column;gap:14px}
.dlg-foot{padding:12px 20px 18px;border-top:1px solid var(--line);display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.field{display:flex;flex-direction:column;gap:5px;min-width:0}
.field label{font-size:.82rem;font-weight:600}
.field .opt{font-weight:400;color:var(--muted)}
.field .hint{font-size:.78rem;color:var(--muted)}
.field input,.field select,.field textarea{border:1.5px solid var(--line);border-radius:8px;background:var(--surface-2);padding:9px 11px;width:100%}
.field input:focus,.field select:focus,.field textarea:focus{border-color:var(--ink);outline:none}
.field textarea{min-height:84px;resize:vertical}
.row{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px}
.drop{border:1.5px dashed var(--line);border-radius:10px;padding:14px;display:flex;flex-direction:column;align-items:center;gap:2px;text-align:center;cursor:pointer;background:var(--surface-2)}
.drop:hover,.drop.over{border-color:var(--ink)}
.drop b{font-size:.9rem}
.drop span{font-size:.78rem;color:var(--muted)}
.thumbs{display:grid;grid-template-columns:repeat(auto-fill,minmax(78px,1fr));gap:8px}
.thumb{position:relative;aspect-ratio:1;border-radius:8px;overflow:hidden;border:1.5px solid var(--line);padding:0;background:var(--stage);cursor:pointer}
.thumb img{width:100%;height:100%;object-fit:cover;display:block}
.thumb[aria-current="true"]{border-color:var(--accent);border-width:3px}
.thumb .rm{position:absolute;top:4px;right:4px;width:22px;height:22px;border-radius:50%;border:0;background:rgba(0,0,0,.65);color:#fff;font-size:.9rem;line-height:1;cursor:pointer}
.notice{border-radius:10px;padding:10px 12px;font-size:.86rem;display:flex;flex-direction:column;gap:2px}
.notice.warn{background:var(--stolen-soft);border:1px solid var(--stolen)}
.notice.info{background:var(--surface-2);border:1px solid var(--line)}
.err{color:var(--stolen);font-size:.85rem;font-weight:500}
.bike-hero{background:radial-gradient(ellipse at 50% 80%,var(--stage-hi) 0%,var(--stage) 75%);border-radius:12px;display:grid;place-items:center;aspect-ratio:16/9;max-width:100%;overflow:hidden}
.bike-hero .sil{width:84%}
.bike-hero img{width:100%;height:100%;object-fit:cover}
.facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 16px;margin:0}
.facts div{min-width:0}
.facts dt{font-size:.7rem;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.facts dd{margin:0;font-weight:500;overflow-wrap:anywhere}
.facts .mono{font-family:var(--f-mono);font-size:.9rem}
.timeline{list-style:none;margin:0;padding:0 0 0 18px;border-left:2px dashed var(--line);display:flex;flex-direction:column;gap:12px}
.timeline li{position:relative}
.timeline li::before{content:"";position:absolute;left:-25px;top:6px;width:10px;height:10px;background:var(--sighting);transform:rotate(45deg);border-radius:2px}
.timeline li.origin::before{background:var(--stolen);border-radius:50%;transform:none}
.timeline li.rec::before{background:var(--safe);transform:none}
.share-fallback{width:100%;min-height:80px;font-size:.85rem;border:1.5px solid var(--line);border-radius:8px;padding:8px;background:var(--surface-2)}

.toast{position:fixed;left:50%;bottom:calc(20px + env(safe-area-inset-bottom,0px));transform:translateX(-50%);background:var(--ink);color:var(--surface);padding:10px 18px;border-radius:999px;font-weight:500;font-size:.9rem;box-shadow:var(--shadow);z-index:2000;max-width:calc(100vw - 32px);text-align:center}

@media (max-width:900px){
  .map-layout,.comm-layout{grid-template-columns:minmax(0,1fr)}
  .layers{grid-template-columns:repeat(2,minmax(0,1fr))}
  .layer:nth-child(3){border-left:0}
  .layer:nth-child(n+3){border-top:1px solid var(--line)}
}
@media (max-width:560px){
  h1{font-size:1.75rem}
  .top-actions{width:100%}
  .top-actions .btn,.top-actions .user-wrap{flex:1 1 40%;justify-content:center}
  .user-wrap .btn{flex:1}
  .stat b{font-size:1.5rem}
  .stat{padding:10px 12px}
  .facts{grid-template-columns:minmax(0,1fr)}
  .d-sil{width:100px}
}
@media (prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}

/* footer links */
.foot-links{display:flex;flex-wrap:wrap;gap:6px 18px;margin-bottom:6px}
.foot-links a{color:var(--ink);text-decoration:none;font-weight:500}
.foot-links a:hover{color:var(--accent-ink);text-decoration:underline}

/* text pages: about, privacy, terms, contact, guides */
.doc{max-width:74ch;margin:0 auto;padding-block:32px 48px;display:flex;flex-direction:column;gap:14px}
.doc h1{font-size:2.4rem}
.doc h2{font-size:1.5rem;margin-top:18px}
.doc h3{font-size:1.15rem;margin-top:6px}
.doc p,.doc li{color:var(--ink);opacity:.92}
.doc ul,.doc ol{margin:0;padding-left:22px;display:flex;flex-direction:column;gap:6px}
.doc a{color:var(--accent-ink)}
.doc .lede{font-size:1.08rem;color:var(--muted);opacity:1}
.doc .updated{font-size:.82rem;color:var(--muted)}
.callout{border-left:4px solid var(--accent);background:var(--surface);border-radius:0 10px 10px 0;padding:12px 16px;display:flex;flex-direction:column;gap:6px}
.callout.warn{border-left-color:var(--sighting)}
.top-simple .top-inner{justify-content:space-between}
.page-nav{display:flex;gap:8px;flex-wrap:wrap}
.checklist{list-style:none;padding:0!important}
.checklist li{display:flex;gap:10px;align-items:flex-start}
.checklist li::before{content:"";flex-shrink:0;width:18px;height:18px;margin-top:3px;border:2px solid var(--accent);border-radius:4px}
.red-flags li::before{content:"!";border:0;background:var(--accent);color:#fff;font-weight:700;font-size:.75rem;display:grid;place-items:center;border-radius:50%}
.contact-form{display:flex;flex-direction:column;gap:12px;background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:18px}
a.btn{text-decoration:none}

/* rewards, checks, tags */
.tags{display:flex;flex-wrap:wrap;gap:6px;margin-top:2px}
.reward{display:inline-flex;align-items:center;font-size:.72rem;font-weight:700;letter-spacing:.05em;text-transform:uppercase;padding:2px 8px;border-radius:999px;background:var(--accent);color:#fff}
.verified{display:inline-flex;align-items:center;font-size:.72rem;font-weight:600;padding:2px 8px;border-radius:999px;background:var(--safe-soft);color:var(--safe)}
.btn-flag{color:var(--muted)}
.btn-flag:hover{color:var(--ink)}
.stat.s-safe b,.stat-card.s-safe b{color:var(--safe)}
.stat-card.s-stolen b{color:var(--stolen)}
.stat-card.s-sighting b{color:var(--sighting)}
.map-stats{grid-template-columns:repeat(4,minmax(0,1fr))}
@media (max-width:560px){.map-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.map-stats .stat:nth-child(3){border-left:0}.map-stats .stat:nth-child(n+3){border-top:1px solid var(--line)}}

/* garage mode on the report form hides the stolen-only fields */
#dlg-report.register .stolen-only{display:none}

/* parts */
.part-card .bike-body{padding:14px}

/* stats page */
.stats-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:14px}
.stat-card{padding:16px;display:flex;flex-direction:column;gap:2px}
.stat-card b{font-family:var(--f-display);font-size:2.4rem;line-height:1;font-variant-numeric:tabular-nums}
.stat-card span{color:var(--muted);font-size:.85rem}
.chart{padding:16px;display:flex;flex-direction:column;gap:8px}
.chart h2{font-size:1.2rem;margin-bottom:4px}
.bar-row{display:grid;grid-template-columns:minmax(0,9.5rem) 1fr 2ch;gap:10px;align-items:center;font-size:.85rem}
.bar-row span:first-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bar{height:10px;background:var(--surface-2);border-radius:999px;overflow:hidden}
.bar i{display:block;height:100%;background:var(--accent);border-radius:999px}
.bar-row b{text-align:right;font-variant-numeric:tabular-nums}
.tips{margin:0;padding-left:18px;display:flex;flex-direction:column;gap:6px;font-size:.9rem}
.tips a{color:var(--accent-ink)}

/* moderator view */
.admin-card{padding:16px;display:flex;flex-direction:column;gap:10px}
.admin-row{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;padding-top:10px;border-top:1px solid var(--line)}
.admin-row>div:first-child{display:flex;flex-direction:column;gap:2px;min-width:0}
.mono{font-family:var(--f-mono)}

/* printing: flyer and claim pack */
.print-area{display:none}
@media print{
  @page{size:A4;margin:12mm}
  body.printing{background:#fff!important;color:#000!important;padding:0!important}
  body.printing::before{display:none}
  body.printing>*:not(#printArea){display:none!important}
  body.printing #printArea{display:block}
  #printArea{-webkit-print-color-adjust:exact;print-color-adjust:exact;font-family:var(--f-body);color:#000}
  .flyer{display:flex;flex-direction:column;gap:10px}
  .fl-head{background:#e1251b;color:#fff;text-align:center;padding:8px 0 4px;display:flex;flex-direction:column;align-items:center;line-height:1}
  .fl-head span{font-family:var(--f-display);font-weight:700;font-size:96px;letter-spacing:.06em}
  .fl-head small{font-family:var(--f-display);font-weight:700;font-size:24px;letter-spacing:.4em;padding:2px 0 8px}
  .fl-photo{height:78mm;display:grid;place-items:center;overflow:hidden;position:relative;background:#f1f3f5;border:1px solid #ddd}
  .fl-photo img{width:100%;height:100%;object-fit:cover}
  .fl-photo img.pfp-main{width:auto;height:100%;aspect-ratio:1;position:relative}
  .fl-photo .sil{width:80%}
  .flyer h1{font-family:var(--f-display);font-size:40px;text-align:center;margin:0;color:#000}
  .fl-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:6px 14px;border-top:2px solid #000;border-bottom:2px solid #000;padding:8px 0}
  .fl-grid div{display:flex;flex-direction:column}
  .fl-grid span{font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:#555}
  .fl-grid b{font-size:16px}
  .fl-reward{background:#000;color:#fff;text-align:center;font-family:var(--f-display);font-weight:700;font-size:30px;letter-spacing:.04em;padding:6px}
  .fl-desc{font-size:14px;margin:0}
  .fl-foot{display:grid;grid-template-columns:1fr 34mm;gap:14px;align-items:center}
  .fl-call{display:flex;flex-direction:column;gap:4px;font-size:14px}
  .fl-call>b{font-family:var(--f-display);font-size:26px}
  .fl-qr svg{width:34mm;height:34mm;display:block}
  .fl-url{font-size:10px;color:#555;text-align:center}
  .claim{display:flex;flex-direction:column;gap:10px;font-size:12px}
  .cl-head{border-bottom:3px solid #e1251b;padding-bottom:6px}
  .cl-head div{display:flex;justify-content:space-between;gap:10px}
  .claim h1{font-family:var(--f-display);font-size:30px;margin:0;color:#000}
  .claim h2{font-family:var(--f-display);font-size:18px;margin:6px 0 0;color:#000}
  .cl-table{border-collapse:collapse;width:100%}
  .cl-table th,.cl-table td{border:1px solid #bbb;padding:5px 8px;text-align:left;vertical-align:top}
  .cl-table th{width:34%;background:#f1f3f5}
  .cl-photos{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}
  .cl-photos img{width:100%;aspect-ratio:4/3;object-fit:cover;border:1px solid #ccc}
  .cl-list{margin:0;padding-left:18px;display:flex;flex-direction:column;gap:3px}
  .cl-foot{font-size:10px;color:#555}
}

/* public data layers */
.dot-crime{background:rgba(225,37,27,.45);border:1px solid #e1251b}
.dot-parking{background:#2f6fd6;border-radius:3px}
.crime-area{fill:#e1251b;fill-opacity:.16;stroke:#e1251b;stroke-opacity:.35;stroke-width:1}
.mk-park{width:20px;height:20px;border-radius:5px;background:#2f6fd6;border:2px solid #fff;color:#fff;font:700 11px/16px var(--f-body);text-align:center;box-shadow:0 1px 4px rgba(0,0,0,.45)}
.leaflet-tooltip{background:var(--surface);color:var(--ink);border:1px solid var(--line);box-shadow:var(--shadow)}
.leaflet-tooltip span{color:var(--muted);font-size:.78rem}
.bar-row{grid-template-columns:minmax(0,9.5rem) 1fr auto}

/* comments */
.comments{display:flex;flex-direction:column;gap:8px}
.comment-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px}
.comment-list li{padding:10px 12px;background:var(--surface-2);border-radius:10px;display:flex;flex-direction:column;gap:3px}
.comment-list li.meta{background:none;padding:0}
.comment-form{display:flex;flex-direction:column;gap:8px;align-items:flex-start}
.comment-form textarea{width:100%;min-height:64px;border:1.5px solid var(--line);border-radius:8px;background:var(--surface-2);padding:9px 11px;resize:vertical}
.quiz-cta{display:flex;justify-content:space-between;align-items:center;gap:14px;flex-wrap:wrap;padding:16px 18px;text-decoration:none;color:var(--ink);border-left:4px solid var(--accent)}
.quiz-cta>span:first-child{display:flex;flex-direction:column;gap:2px}
.quiz-cta b{font-family:var(--f-display);font-size:1.3rem}

/* search boxes inside column layouts must not stretch to fill the column */
.doc .search,.card .search,.dlg-body .search{flex:0 0 auto}
/* buttons inside text pages keep their own colours rather than the link colour */
.doc a.btn{color:var(--ink)}
.doc a.btn-accent,.doc a.btn-stolen{color:#fff}

/* safer parking spots and rider ratings */
.dot-safer{background:#1f8a4c;border-radius:5px;box-shadow:inset 0 0 0 2px #fff}
.mk-safer{width:26px;height:26px;margin:-1px;border-radius:8px;background:#1f8a4c;border:2px solid #fff;font-size:11px}
.mk-safer.street{background:#11633a;border-radius:13px}
.mk-safer.down{background:#6b6b70}
.score-row{display:grid;grid-template-columns:auto 1fr auto;gap:10px;align-items:center}
.score-num{font-family:var(--f-display);font-size:1.8rem;line-height:1;color:var(--safe)}
.rate{display:flex;flex-direction:column;gap:6px;padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:var(--surface)}
.rate .btn[aria-pressed="true"].rate-up{background:var(--safe-soft);border-color:var(--safe);color:var(--safe)}
.rate .btn[aria-pressed="true"].rate-down{background:var(--stolen-soft);border-color:var(--stolen);color:var(--stolen)}
.rate-why{display:flex;flex-direction:column;gap:6px}
.rate-why .sign{border:1px solid transparent;cursor:pointer;font:inherit;font-size:.74rem}
.rate-why .sign.on{border-color:var(--suspect)}
#map.far .rw-safer{display:none}
a.tab{text-decoration:none}

/* phones: a compact header that tucks away while scrolling down and comes back on scroll up */
.top{transition:transform .25s ease}
.top.tucked{transform:translateY(-100%)}
@media (max-width:700px){
  .top-inner{gap:8px;padding-block:8px}
  .brand-mark{width:32px;height:32px;border-radius:7px}
  .brand-mark img{width:42px;height:42px;left:-5px;top:-4px}
  .brand-name{font-size:1.35rem}
  .search{flex-basis:100%}
  .search input{padding:7px 12px;font-size:.9rem}
  .search button{padding:0 14px;font-size:.9rem}
  .top-actions{display:grid;grid-template-columns:1fr 1fr;gap:6px;width:100%}
  .top-actions .btn{padding:6px 8px;font-size:.8rem;justify-content:center}
  .top-actions .btn[hidden]{display:none!important}
  .user-wrap .btn{flex:1}
  .user-menu{left:0;right:auto}
  .tab{padding:7px 10px 8px;font-size:.88rem}
  #map{height:min(58vh,520px)}
}
@media (prefers-reduced-motion:reduce){.top{transition:none}}
/* "use two fingers" hint shown when someone swipes the map with one finger on a phone */
.map-hint{position:absolute;inset:0;z-index:1002;display:grid;place-items:center;background:rgba(0,0,0,.45);color:#fff;font-weight:600;font-size:1rem;pointer-events:none;opacity:0;transition:opacity .2s}
.map-hint.show{opacity:1}

/* ad placeholders stay hidden until AdSense is approved (config.js: showAdSlots) */
html:not(.ads-on) .ad{display:none!important}
