/* Prospect Radar: UI layer (accessibility, motion, dashboard layout). Loaded after styles.css. */
@property --pct{syntax:'<number>';inherits:false;initial-value:0}

/* ---------- accessibility ---------- */
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible,[tabindex]:focus-visible{outline:3px solid #3B82F6;outline-offset:2px;border-radius:8px}
button,select,summary,a.btn,label.switch,.tab,.chip{cursor:pointer}
button:disabled,select:disabled{cursor:not-allowed}
.skip{position:absolute;left:12px;top:-64px;background:#0B1324;color:#fff;padding:10px 18px;border-radius:999px;z-index:3000;font-weight:600;transition:top .2s ease-out}
.skip:focus{top:12px}
.score b,.kpi b,.val,.conf,.kpi span{font-variant-numeric:tabular-nums}
button.chip{font:inherit;font-size:13px;font-weight:600;color:var(--ink);border:1.5px solid transparent;line-height:1.2}
button.chip.on{color:#fff}

/* ---------- map: tier shapes (not colour alone), tools, stepper ---------- */
.pin.hot{border-radius:50%}
.pin.warm{border-radius:32%}
.pin.cool{border-radius:50%;background:#fff !important;border:3px solid #94A3B8}
.pinwrap.hl .pin{box-shadow:0 0 0 6px rgba(29,78,216,.35),0 2px 6px rgba(11,19,36,.45);animation:none}
.map-legend i{display:inline-block;width:11px;height:11px;margin-right:6px;vertical-align:-1px}
.map-legend i.lg-hot{background:#DC2626;border-radius:50%}
.map-legend i.lg-warm{background:#F59E0B;border-radius:32%}
.map-legend i.lg-cool{background:#fff;border:2px solid #94A3B8;border-radius:50%;width:11px;height:11px}
.map-tools{position:absolute;right:12px;top:12px;z-index:700;display:flex;gap:8px}
.hud-btn{font:600 12.5px "Plus Jakarta Sans",system-ui,sans-serif;background:rgba(255,255,255,.95);border:1px solid var(--line);border-radius:999px;padding:8px 14px;box-shadow:var(--card-shadow);color:var(--ink);transition:background .2s ease-out,border-color .2s ease-out}
.hud-btn:hover{border-color:var(--accent);color:var(--accent)}
.stepper{list-style:none;display:flex;gap:6px;padding:0;margin:0 0 14px;flex-wrap:wrap}
.stepper li{flex:1 1 120px;display:flex;align-items:center;gap:8px;font-size:12.5px;font-weight:600;color:var(--muted);background:#fff;border:1px solid var(--line);border-radius:999px;padding:7px 12px;transition:background .3s ease-out,color .3s ease-out,border-color .3s ease-out}
.stepper li::before{content:attr(data-n);width:20px;height:20px;border-radius:50%;display:grid;place-items:center;font-size:11px;background:var(--accent-soft);color:var(--accent-strong);flex:0 0 auto}
.stepper li.active{border-color:var(--accent);color:var(--ink);background:var(--accent-tint)}
.stepper li.active::before{background:var(--accent);color:#fff;animation:pulse 1.2s ease-in-out infinite}
.stepper li.done{color:var(--ink)}
.stepper li.done::before{content:"\2713";background:#16A34A;color:#fff}
@keyframes pulse{0%,100%{box-shadow:0 0 0 0 rgba(29,78,216,.45)}50%{box-shadow:0 0 0 6px rgba(29,78,216,0)}}

/* ---------- results: entrance, skeleton, rings, sort ---------- */
@keyframes rise{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}
.result{content-visibility:auto;contain-intrinsic-size:auto 250px;transition:box-shadow .2s ease-out,border-color .2s ease-out,transform .2s ease-out}
.result:hover{border-color:#93C5FD;box-shadow:var(--card-shadow-hover)}
.result.enter,.req.new{animation:rise .5s cubic-bezier(.2,.7,.2,1) both;animation-delay:calc(var(--i,0)*45ms)}
.score{transition:--pct .9s cubic-bezier(.2,.7,.2,1)}
.skel{background:linear-gradient(90deg,#EAF1FB 25%,#F6F9FE 37%,#EAF1FB 63%);background-size:400% 100%;animation:shimmer 1.4s ease infinite;border-radius:8px}
@keyframes shimmer{0%{background-position:100% 50%}100%{background-position:0 50%}}
.skel-card{display:grid;grid-template-columns:1fr 84px;gap:16px;background:#fff;border:1px solid var(--line);border-radius:var(--radius-sm);padding:18px 20px}
.skel-card+.skel-card{margin-top:12px}
.skel.t{height:18px;width:52%}.skel.l{height:12px;margin-top:11px}.skel.l.s{width:70%}.skel.r{width:64px;height:64px;border-radius:50%;margin:0 auto}
.toolbar select.sel{font:inherit;font-size:13.5px;padding:10px 12px;border-radius:999px;border:1.5px solid var(--line);background:#fff;color:var(--ink)}
.whys{margin-top:8px;font-size:12.5px}
.whys summary{color:var(--accent);font-weight:600;width:max-content}
.whys ul{list-style:none;margin:8px 0 0;padding:0;display:grid;gap:4px;max-width:420px}
.whys li{display:flex;justify-content:space-between;gap:12px;padding:5px 10px;border-radius:8px;background:var(--accent-tint)}
.whys li b{font-variant-numeric:tabular-nums}
.whys li b.neg{color:#16A34A}.whys li b.pos{color:var(--accent-strong)}
.whys small{display:block;margin-top:6px;color:var(--muted)}
.onboard{display:grid;gap:12px;background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:26px;box-shadow:var(--card-shadow)}
.onboard h3{font-size:20px}
.onboard .step{display:grid;grid-template-columns:44px 1fr;gap:14px;align-items:start}
.onboard .step i{width:44px;height:44px;border-radius:14px;background:var(--accent-soft);color:var(--accent);display:grid;place-items:center}
.onboard .step svg{width:22px;height:22px}
.onboard .step b{display:block;font-size:14.5px}
.onboard .step span{font-size:13.5px;color:var(--muted)}
.onboard kbd{font:600 11.5px ui-monospace,Menlo,Consolas,monospace;background:var(--accent-tint);border:1px solid var(--line);border-radius:6px;padding:2px 6px}
.btn.busy::after,#fetchBtn.busy::after{content:"";display:inline-block;width:14px;height:14px;margin-left:8px;border:2px solid rgba(255,255,255,.45);border-top-color:#fff;border-radius:50%;animation:spin .7s linear infinite;vertical-align:-2px}
@keyframes spin{to{transform:rotate(360deg)}}

/* ---------- reduced motion: no non-essential movement ---------- */
@media (prefers-reduced-motion:reduce){
  .result.enter,.req.new,.skel,.stepper li.active::before,.pin{animation:none !important}
  .score,.stepper li,.result,.hud-btn,.skip{transition:none !important}
  .btn.busy::after,#fetchBtn.busy::after{animation-duration:2s}
}

/* ---------- review fixes: mobile overflow, touch targets, map corners ---------- */
.page-hero .mode,.page-hero .modes{display:flex;flex-wrap:wrap;max-width:100%;border-radius:22px;gap:4px}
.page-hero .mode a,.page-hero .modes a{white-space:normal;text-align:center;flex:1 1 150px;display:inline-flex;justify-content:center;align-items:center}
.page-hero .lede,.status,.log,.result .nm,.result .sub,.box{max-width:100%;overflow-wrap:anywhere}
.status{border-radius:18px}
.nav .wrap,.wrap{min-width:0}
.mapbox .map-legend{right:auto;left:12px;bottom:12px}
@media (pointer:coarse),(max-width:640px){
  button:not(.rm):not(.delScan),.btn,.tab,.chip,select,.hud-btn,.acts a,.acts button,.link-btn,summary{min-height:44px}
  .acts a,.acts button,.hud-btn{display:inline-flex;align-items:center}
  input:not([type=checkbox]):not([type=range]),select,textarea{min-height:44px}
  .rm,.delScan,#aiClose,.targets li button{min-width:44px;min-height:44px}
  .tmeta input,.tmeta select{min-height:44px;font-size:14px}
  .draft .copyD{min-height:44px;padding:6px 14px}
  /* map controls: Leaflet's zoom buttons and attribution links are 30px by default */
  .leaflet-bar a,.leaflet-touch .leaflet-bar a{width:44px;height:44px;line-height:44px;font-size:22px}
  .leaflet-control-attribution{font-size:12px;padding:2px 6px}
  .leaflet-control-attribution a{display:inline-block;padding:11px 5px;margin:-11px 0}
}

/* ---------- verification levels ---------- */
.badge.v-official{background:#DCFCE7;color:#166534}
.badge.v-cross{background:#EDE9FE;color:#5B21B6}
.badge.v-unconf{background:#F1F5F9;color:#475569}
.badge.v-conflict{background:#FEE2E2;color:#991B1B}
.ver{margin-top:10px;border:1.5px solid var(--line);border-radius:12px;background:#fff;font-size:13px}
.ver>summary{padding:10px 14px;font-weight:600;list-style:none;display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.ver>summary::-webkit-details-marker{display:none}
.ver[data-level=official]{border-color:#86EFAC}.ver[data-level=cross-checked]{border-color:#C4B5FD}.ver[data-level=conflict]{border-color:#FCA5A5}
.ver .vlist{list-style:none;margin:0;padding:0 14px 12px;display:grid;gap:6px}
.ver .vlist li{display:grid;grid-template-columns:104px 1fr;gap:10px}
.ver .vs{font-size:11px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;padding:2px 8px;border-radius:999px;text-align:center;align-self:start}
.ver .vs.pass{background:#DCFCE7;color:#166534}.ver .vs.fail{background:#FEE2E2;color:#991B1B}.ver .vs.warn{background:#FEF3C7;color:#92400E}.ver .vs.unknown{background:#F1F5F9;color:#475569}
.ver .vlist small{display:block;color:var(--muted)}
.ver .vnote{padding:0 14px 12px;color:var(--muted);font-size:12px}
.vexplain{margin:0 0 14px;font-size:13px;background:#fff;border:1px solid var(--line);border-radius:12px;padding:10px 14px}
.vexplain summary{font-weight:600;color:var(--accent);cursor:pointer}
.vexplain ul{margin:8px 0 0;padding-left:18px;color:var(--muted)}
@media (max-width:520px){.ver .vlist li{grid-template-columns:1fr}}

/* ---------- brand logo ---------- */
.brand{gap:12px}
.brand-logo{display:block;height:40px;width:auto;flex:0 0 auto}
.brand-sub{font:600 11.5px "Plus Jakarta Sans",system-ui,sans-serif;letter-spacing:.16em;text-transform:uppercase;color:var(--muted);border-left:1.5px solid var(--line);padding:4px 0 4px 12px;white-space:nowrap}
.brand-name{font:800 19px "Plus Jakarta Sans",system-ui,sans-serif;letter-spacing:-.01em;color:var(--ink);white-space:nowrap}
@media (max-width:420px){.brand-sub{font-size:10.5px;letter-spacing:.1em;padding-left:9px}.brand-logo{height:34px}}
.ai-badge{margin-right:6px;vertical-align:middle;white-space:nowrap}
