/* BLE Radar app-facing web compatibility layer, 2026-09-06.
   Loaded after legacy page CSS so public web tools share the native app's current visual system
   without changing their data, authentication or interaction contracts. */
@font-face {
  font-family: "Space Grotesk";
  src: url("/assets/space_grotesk.ttf") format("truetype-variations");
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --web-bg: #000614;
  --web-deep: #00030b;
  --web-card: #081525;
  --web-card-2: #091528;
  --web-line: #1a3748;
  --web-line-soft: rgba(45, 77, 98, .48);
  --web-text: #f2f6fa;
  --web-muted: #9aa8ba;
  --web-dim: #6f7e93;
  --web-cyan: #22d3ee;
  --web-green: #34d399;
  --web-amber: #f59e0b;
  --web-violet: #a855f7;
  --web-danger: #fb7185;
  --web-radius: 18px;
  --web-radius-lg: 24px;
  --web-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --web-display: "Space Grotesk", var(--web-font);
}

html,
body.web-page {
  min-height: 100%;
  background: var(--web-bg);
  color: var(--web-text);
  font-family: var(--web-font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.web-page::before {
  content: "";
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .52;
  background-image:
    linear-gradient(rgba(34, 211, 238, .022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, .022) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 76%);
  mask-image: linear-gradient(to bottom, #000, transparent 76%);
}

body.web-map-page::before { display: none; }

body.web-document .wrap,
body.web-profile .wrap {
  position: relative;
  z-index: 1;
  width: min(700px, calc(100% - 32px));
  max-width: none;
  margin: 0 auto;
  padding: 34px 0 110px;
}

body.web-stats .wrap,
body.web-privacy .wrap { width: min(760px, calc(100% - 32px)); }

body.web-page h1,
body.web-page h2,
body.web-page h3,
body.web-page .value,
body.web-page .num,
body.web-page .v {
  font-family: var(--web-display);
  font-variant-numeric: tabular-nums;
}

body.web-page h1 {
  margin: 0 0 8px;
  color: var(--web-text);
  font-size: clamp(30px, 8vw, 42px);
  line-height: 1.04;
  font-weight: 650;
  letter-spacing: -.045em;
}

body.web-page h2 {
  color: var(--web-text);
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: -.018em;
}

body.web-page .sub,
body.web-page .updated {
  max-width: 620px;
  margin: 0 0 28px;
  color: var(--web-muted);
  font-size: 14px;
  line-height: 1.6;
}

body.web-page .card,
body.web-page .stat,
body.web-page .panel:not(#panel),
body.web-page .equiv {
  border: 1px solid var(--web-line);
  border-radius: var(--web-radius);
  background: linear-gradient(155deg, rgba(9, 21, 40, .97), rgba(1, 8, 21, .97));
  box-shadow: inset 0 1px 0 rgba(242, 246, 250, .025);
}

body.web-page .card { padding: 20px; margin-bottom: 14px; }
body.web-page .label {
  color: var(--web-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .09em;
}
body.web-page .value { color: var(--web-cyan); }
body.web-page .hint,
body.web-page .panel-sub,
body.web-page .source,
body.web-page .muted,
body.web-page .note { color: var(--web-muted); }
body.web-page a { color: var(--web-cyan); }

body.web-page input[type="text"],
body.web-page input[type="password"],
body.web-page input[type="email"],
body.web-page select {
  min-height: 48px;
  border: 1px solid var(--web-line);
  border-radius: 12px;
  background: var(--web-deep);
  color: var(--web-text);
  font: 14px var(--web-font);
}

body.web-page button:not(.blenav-toggle):not(.panel-toggle):not(.panel-close):not(.journey-map-toggle):not(.pick):not(.brguide-launcher-open):not(.brguide-launcher-dismiss):not(.brguide-close):not(.brguide-speak):not(.brguide-ask),
body.web-page .btn {
  min-height: 48px;
  border-radius: 13px;
  font-family: var(--web-font);
}

body.web-page .blenav-update button { min-height: 0; }

body.web-page :focus-visible {
  outline: 2px solid var(--web-cyan);
  outline-offset: 3px;
}

/* My Node */
body.web-portal .wrap { width: min(680px, calc(100% - 32px)); }
body.web-portal .row { gap: 12px; }
body.web-portal .row .card { min-width: 0; }
body.web-portal .wrap button:not(.mask-btn):not(.journey-map-toggle):not(.blenav-toggle) {
  background: linear-gradient(100deg, var(--web-cyan), var(--web-green));
  color: #03131b;
  font-weight: 800;
}
body.web-portal .mask-btn {
  border: 1px solid var(--web-line) !important;
  background: var(--web-deep);
  color: var(--web-muted);
}
body.web-portal .mask-btn.active {
  border-color: var(--web-green) !important;
  background: rgba(52, 211, 153, .08);
  color: var(--web-green);
}
body.web-portal .journey { border-color: var(--web-line); background: var(--web-deep); }
body.web-portal .journey-title b { color: var(--web-text); }
body.web-portal .journey-title span,
body.web-portal .journey-step span { color: var(--web-muted); }

/* Real Impact */
body.web-impact .wrap { text-align: left; }
body.web-impact .verified {
  margin-bottom: 14px;
  border: 1px solid rgba(52, 211, 153, .32);
  border-radius: 999px;
  background: rgba(52, 211, 153, .09);
  color: var(--web-green);
  font-weight: 700;
}
body.web-impact .grid,
body.web-stats .grid { gap: 12px; }
body.web-impact .stat,
body.web-stats .stat { padding: 18px 16px; }
body.web-impact .stat .num { color: var(--web-green); }
body.web-impact .stat .lbl,
body.web-stats .stat .lbl { color: var(--web-muted); }
body.web-impact .equiv { padding: 18px; }
body.web-impact .equiv .row { color: var(--web-muted); }
body.web-impact .ask-impact {
  width: 100%;
  min-height: 52px;
  border-color: var(--web-green);
  border-radius: 14px;
  background: rgba(52, 211, 153, .09);
  color: #a7f3d0;
}

/* Network Stats */
body.web-stats .stat .num { color: var(--web-cyan); }
body.web-stats .panel { padding: 20px; }
body.web-stats .impact-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-color: var(--web-line);
  border-radius: 12px;
  background: var(--web-deep);
  color: var(--web-muted);
}

/* Privacy */
body.web-privacy { line-height: 1.65; }
body.web-privacy p,
body.web-privacy li { color: #cbd5e1; }
body.web-privacy h2 { margin-top: 38px; color: var(--web-cyan); }
body.web-privacy .card { border-radius: var(--web-radius); }
body.web-privacy .card.good { border-color: rgba(52, 211, 153, .32); }
body.web-privacy .card.bad { border-color: rgba(251, 113, 133, .32); }
body.web-privacy code { background: var(--web-deep); color: #dbeafe; }

/* Enterprise landing and signed-in purchase panel */
body.web-enterprise .wrap.marketing {
  width: min(820px, calc(100% - 32px));
  max-width: none;
  margin: 0 auto;
  padding: 34px 0 110px;
}
body.web-enterprise .mkt-hero { padding: 0 0 28px; }
body.web-enterprise .mkt-hero h1 { max-width: 680px; margin: 0 auto 12px; }
body.web-enterprise .mkt-hero p { color: var(--web-muted); }
body.web-enterprise .mkt-signal {
  border-color: var(--web-line);
  border-radius: var(--web-radius);
  background: linear-gradient(155deg, rgba(9, 21, 40, .97), rgba(1, 8, 21, .97));
  padding: 18px;
}
body.web-enterprise .mkt-signal p,
body.web-enterprise .mkt-price { color: var(--web-muted); }
body.web-enterprise button.wide {
  min-height: 50px;
  background: linear-gradient(100deg, var(--web-cyan), var(--web-green));
  color: #03131b;
  font-weight: 800;
}
body.web-enterprise .layout { background: var(--web-bg); }
body.web-enterprise #panel {
  border-color: var(--web-line);
  background: rgba(0, 6, 20, .97);
}

/* My Things map sheet */
body.web-mydevices { background: var(--web-bg); }
body.web-mydevices #map { background: var(--web-bg); }
body.web-mydevices #panel {
  border-color: var(--web-line);
  border-radius: 24px 24px 0 0;
  background: rgba(0, 6, 20, .96);
}
body.web-mydevices .grabber {
  background: linear-gradient(rgba(0, 6, 20, .99), rgba(0, 6, 20, .88));
}
body.web-mydevices .grabber span { background: #36536a; }
body.web-mydevices h1 { font-size: 30px; }
body.web-mydevices .sub { margin-bottom: 16px; }
body.web-mydevices .dev,
body.web-mydevices .addbox,
body.web-mydevices .foot { border-color: var(--web-line); }
body.web-mydevices .empty {
  border-color: var(--web-line);
  border-radius: 16px;
  background: rgba(8, 21, 37, .8);
  color: var(--web-muted);
}

/* Public profile */
body.web-profile .brand { color: var(--web-muted); }
body.web-profile .hero {
  border-color: var(--web-line);
  border-radius: var(--web-radius-lg);
  background: linear-gradient(155deg, rgba(9, 21, 40, .97), rgba(1, 8, 21, .97));
}
body.web-profile .stat { border-color: var(--web-line); background: var(--web-deep); }

/* Bike Guard */
body.web-bike .shell {
  width: min(860px, calc(100% - 32px));
  max-width: none;
  padding: 26px 0 110px;
}
body.web-bike .card { border-radius: var(--web-radius-lg); }
body.web-bike .btn:not(.secondary) {
  background: linear-gradient(100deg, var(--web-cyan), var(--web-green));
  color: #03131b;
}

/* Signal Rewards */
body.web-esim .shell {
  width: min(980px, calc(100% - 32px));
  padding: 34px 0 110px;
}
body.web-esim .hero,
body.web-esim .progress-card,
body.web-esim .tier,
body.web-esim .history,
body.web-esim .qr-card {
  border-color: var(--web-line);
  background-color: var(--web-card);
}
body.web-esim .hero { border-radius: var(--web-radius-lg); }

@media (max-width: 560px) {
  body.web-document .wrap,
  body.web-profile .wrap,
  body.web-enterprise .wrap.marketing { width: min(100% - 28px, 760px); padding-top: 26px; }
  body.web-page h1 { font-size: clamp(28px, 9vw, 38px); }
  body.web-portal .row { display: grid; grid-template-columns: 1fr 1fr; }
  body.web-portal .mask-btns { flex-wrap: wrap; }
  body.web-portal .mask-btn { flex: 1 1 42%; }
  body.web-impact .grid,
  body.web-stats .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 350px) {
  body.web-impact .grid,
  body.web-stats .grid { grid-template-columns: 1fr; }
  body.web-portal .row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  body.web-page *,
  body.web-page *::before,
  body.web-page *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
