/* ════════════════════════════════════════════════════════════
   GPXtooth — style.css
   Pure CSS · Glassmorphism · Neumorphism · 2024 Design
   ════════════════════════════════════════════════════════════ */

/* ── Custom Properties ─────────────────────────────────────── */
:root {
  /* Palette */
  --c-bg: #07080f;
  --c-bg-2: #0b0d16;
  --c-surface: #0e1020;
  --c-surface-2: #121526;

  --c-green: #00e578;
  --c-green-dim: rgba(0, 229, 120, .12);
  --c-green-glow: rgba(0, 229, 120, .25);

  --c-blue: #60a5fa;
  --c-orange: #fb923c;
  --c-purple: #c084fc;
  --c-red: #f87171;
  --c-yellow: #fbbf24;

  --c-text: #eef0f8;
  --c-text-2: #8892a8;
  --c-text-3: #4a5368;

  --c-border: rgba(255, 255, 255, .07);
  --c-border-2: rgba(255, 255, 255, .12);

  /* Glass */
  --glass-bg: rgba(255, 255, 255, .035);
  --glass-hover: rgba(255, 255, 255, .055);
  --glass-blur: blur(24px) saturate(160%);

  /* Typography */
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing */
  --gap: 1.5rem;
  --radius: 1rem;
  --radius-lg: 1.5rem;
  --radius-xl: 2rem;

  /* Shadows */
  --shadow-card: 0 1px 1px rgba(0, 0, 0, .4), 0 4px 24px rgba(0, 0, 0, .35);
  --shadow-hover: 0 2px 4px rgba(0, 0, 0, .5), 0 12px 48px rgba(0, 0, 0, .5);
  --shadow-glow: 0 0 40px var(--c-green-glow);
}

/* ── Reset & Base ───────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  background: var(--c-bg);
  color: var(--c-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

code {
  font-family: var(--font-mono);
  font-size: .88em;
  color: var(--c-green);
  background: var(--c-green-dim);
  padding: .15em .45em;
  border-radius: 4px;
}

h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -.03em;
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  cursor: pointer;
  font: inherit;
}

/* Screen-reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 5px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .1);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--c-green-glow);
}

/* ── Utility: gradient text ─────────────────────────────────── */
.text--gradient {
  background: linear-gradient(135deg, var(--c-green) 0%, #4ade80 55%, #a3f0c0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Section spacing ────────────────────────────────────────── */
.section-gap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem 6rem;
}

/* ── Glass card ─────────────────────────────────────────────── */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: border-color .25s ease, box-shadow .25s ease, background .25s ease;
}

.glass-card:hover {
  border-color: var(--c-border-2);
  background: var(--glass-hover);
  box-shadow: var(--shadow-hover);
}

/* ════════════════════════════════════════════════════════════
   NAVBAR
   ════════════════════════════════════════════════════════════ */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 1rem 2rem;
  background: rgba(7, 8, 15, .75);
  backdrop-filter: blur(28px) saturate(200%);
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  border-bottom: 1px solid var(--c-border);
  transition: transform .35s cubic-bezier(.16, 1, .3, 1), opacity .25s ease;
}

.nav--hidden {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-shrink: 0;
}

.nav__logo {
  color: var(--c-green);
  display: flex;
}

.nav__wordmark {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -.04em;
  color: var(--c-text);
}

.nav__wordmark em {
  font-style: normal;
  color: var(--c-green);
}

.nav__links {
  display: flex;
  gap: 2rem;
  margin-left: auto;
}

.nav__links a {
  font-size: .875rem;
  font-weight: 500;
  color: var(--c-text-2);
  transition: color .15s;
}

.nav__links a:hover {
  color: var(--c-text);
}

@media (max-width: 640px) {
  .nav__links {
    display: none;
  }
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font-weight: 600;
  border: none;
  white-space: nowrap;
  transition: all .18s ease;
  letter-spacing: -.015em;
}

.btn--sm {
  font-size: .8125rem;
  padding: .45rem 1rem;
  border-radius: .6rem;
}

.btn--lg {
  font-size: .9375rem;
  padding: .75rem 1.75rem;
  border-radius: .875rem;
}

.btn--primary {
  background: var(--c-green);
  color: #021a0a;
  /* Neumorphic top-light effect */
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .2) inset,
    0 -1px 0 rgba(0, 0, 0, .3) inset,
    0 2px 8px rgba(0, 229, 120, .3);
}

.btn--primary:hover {
  background: #14f584;
  transform: translateY(-2px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .2) inset,
    0 6px 24px rgba(0, 229, 120, .35),
    0 2px 6px rgba(0, 0, 0, .2);
}

.btn--primary:active {
  transform: translateY(0);
  background: #00c462;
  box-shadow: 0 0 0 3px rgba(0, 229, 120, .2);
}

.btn--ghost {
  background: rgba(255, 255, 255, .06);
  color: var(--c-text);
  border: 1px solid var(--c-border-2);
  box-shadow: none;
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, .1);
  border-color: rgba(255, 255, 255, .2);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .3);
}

/* ════════════════════════════════════════════════════════════
   HERO
   ════════════════════════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 7rem 2rem 4rem;
  overflow: hidden;
  transition: opacity .3s ease, visibility .3s ease;
}

.hero.hidden {
  opacity: 0;
  visibility: hidden;
  position: absolute;
  height: 0;
  pointer-events: none;
}

/* Background layers */
.hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, black 10%, transparent 100%);
}

.hero__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0;
  animation: blob-appear 1.5s ease forwards;
}

.hero__blob--1 {
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, #00e578, transparent 65%);
  top: -400px;
  left: 50%;
  transform: translateX(-52%);
  opacity: .07;
  animation: float-a 12s ease-in-out infinite;
}

.hero__blob--2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #818cf8, transparent 65%);
  bottom: -150px;
  right: -80px;
  opacity: .06;
  animation: float-b 15s ease-in-out infinite;
}

.hero__blob--3 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, #38bdf8, transparent 65%);
  top: 30%;
  left: -80px;
  opacity: .05;
  animation: float-b 10s ease-in-out infinite reverse;
}

@keyframes float-a {

  0%,
  100% {
    transform: translateX(-52%) translateY(0);
  }

  50% {
    transform: translateX(-52%) translateY(-50px);
  }
}

@keyframes float-b {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(35px);
  }
}

/* Hero content */
.hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
  width: 100%;
  max-width: min(92vw, 1200px);
  padding: 0 1rem;
}

.hero__title {
  /* Mobile: floor à 2.25rem · Tablet: ~4rem · Desktop: ~7rem · Large: jusqu'à 11rem */
  font-size: clamp(2.25rem, 8.5vw, 11rem);
  font-weight: 900;
  letter-spacing: -.05em;
  margin-bottom: 1.5rem;
  line-height: .95;
}

@media (max-width: 480px) {
  .hero__title {
    letter-spacing: -.03em;
    line-height: 1.05;
  }
}

.hero__desc {
  font-size: clamp(.9rem, 1.1vw + .5rem, 1.2rem);
  color: var(--c-text-2);
  max-width: 600px;
  margin: 0 auto 2.5rem;
  font-weight: 400;
  line-height: 1.75;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .75rem;
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: .03em;
  color: var(--c-green);
  background: var(--c-green-dim);
  border: 1px solid rgba(0, 229, 120, .25);
  border-radius: 100px;
  padding: .35rem .9rem;
  margin-bottom: 2rem;
}

.badge__dot {
  width: 6px;
  height: 6px;
  background: var(--c-green);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: .5;
    transform: scale(.7);
  }
}

/* Hero stats row */
.hero__stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  width: 100%;
  max-width: min(90vw, 860px);
  margin-top: 4rem;
}

@media (max-width: 600px) {
  .hero__stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

.stat-mini {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .25rem;
  padding: 1.25rem .75rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .032);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--c-border);
  transition: border-color .2s, background .2s, transform .2s;
}

.stat-mini:hover {
  border-color: rgba(0, 229, 120, .2);
  background: rgba(0, 229, 120, .04);
  transform: translateY(-2px);
}

.stat-mini__label {
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--c-text-3);
}

.stat-mini__value {
  font-family: var(--font-mono);
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -.04em;
  color: var(--c-text);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.stat-mini__unit {
  font-family: var(--font-mono);
  font-size: .6rem;
  color: var(--c-text-3);
  letter-spacing: .05em;
}

/* ════════════════════════════════════════════════════════════
   DASHBOARD
   ════════════════════════════════════════════════════════════ */
.dashboard {
  padding: 0 0 6rem;
}

.dashboard__layout {
  width: 100%;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 0;
  align-items: stretch;
  height: 100vh;
  overflow: hidden;
}

.dashboard__main {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-width: 0;
  padding: 0;
}

/* ── Sidebar ──────────────────────────────────────── */
.sidebar {
  position: sticky;
  top: 0;
  max-height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0;
  border-radius: 0;
  border-right: 1px solid var(--c-border);
  border-top: none;
  border-bottom: none;
  border-left: none;
}

.sidebar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--c-border);
  flex-shrink: 0;
}

.sidebar__title {
  font-size: .8125rem;
  font-weight: 700;
  color: var(--c-text);
  letter-spacing: -.02em;
}

.sidebar__count {
  font-size: .7rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--c-green);
  background: var(--c-green-dim);
  padding: .15rem .5rem;
  border-radius: 100px;
}

.sidebar__filters {
  display: flex;
  gap: .25rem;
  padding: .5rem .625rem;
  border-bottom: 1px solid var(--c-border);
  flex-wrap: wrap;
  flex-shrink: 0;
}

.sidebar__filter-btn {
  padding: .2rem .5rem;
  border-radius: 100px;
  font-size: .65rem;
  font-weight: 600;
  border: 1px solid var(--c-border);
  background: transparent;
  color: var(--c-text-3);
  cursor: pointer;
  transition: all .15s;
}

.sidebar__filter-btn:hover {
  border-color: var(--c-border-2);
  color: var(--c-text);
}

.sidebar__filter-btn.active {
  background: var(--c-green-dim);
  border-color: rgba(0, 229, 120, .3);
  color: var(--c-green);
}

.sidebar__list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  flex: 1;
}

.sidebar__list::-webkit-scrollbar {
  width: 4px;
}

.sidebar__list::-webkit-scrollbar-thumb {
  background: var(--c-border-2);
  border-radius: 4px;
}

.sidebar__empty {
  padding: 2rem 1rem;
  text-align: center;
  font-size: .8125rem;
  color: var(--c-text-3);
}

.sidebar__item {
  padding: .625rem 1rem;
  border-bottom: 1px solid var(--c-border);
  cursor: pointer;
  transition: background .15s;
}

.sidebar__item:hover {
  background: rgba(255, 255, 255, .04);
}

.sidebar__item.active {
  background: var(--c-green-dim);
  border-left: 3px solid var(--c-green);
}

.sidebar__item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .4rem;
  margin-bottom: .2rem;
  min-width: 0;
}

.sidebar__item-name {
  font-size: .8125rem;
  font-weight: 600;
  color: var(--c-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.sidebar__item-top .sidebar__item-type {
  flex-shrink: 0;
}

.sidebar__item-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .15rem .4rem;
  font-size: .65rem;
  color: var(--c-text-3);
}

.sidebar__item-type {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: .6rem;
  padding: .1rem .4rem;
  border-radius: .3rem;
  background: rgba(255, 255, 255, .06);
  color: var(--c-text-2);
}

.sidebar__item-type.vtt {
  background: var(--c-green-dim);
  color: var(--c-green);
}

.sidebar__item-type.running {
  background: rgba(96, 165, 250, .12);
  color: var(--c-blue);
}

.sidebar__item-type.hiking {
  background: rgba(251, 146, 60, .12);
  color: var(--c-orange);
}

.sidebar__item-type.cycling {
  background: rgba(192, 132, 252, .12);
  color: var(--c-purple);
}

@media (max-width: 1024px) {
  .dashboard__layout {
    grid-template-columns: 220px 1fr;
  }

}

@media (max-width: 768px) {
  .dashboard {
    padding: 0;
  }

  .dashboard__layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    max-height: 280px;
    border-right: none;
    border-bottom: 1px solid var(--c-border);
  }
}

/* Panels */
.panel {
  padding: 1.5rem;
}

.panel__header {
  display: flex;
  align-items: center;
  gap: .875rem;
  margin-bottom: 1.25rem;
}

.panel__title-group {
  display: flex;
  align-items: center;
  gap: .875rem;
  flex: 1;
  min-width: 0;
}

.panel__name {
  font-size: .9375rem;
  font-weight: 600;
  letter-spacing: -.02em;
  color: var(--c-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.panel__sub {
  font-size: .75rem;
  color: var(--c-text-3);
  margin-top: 1px;
}

/* Icon pills */
.icon-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: .6rem;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, .06);
}

.icon-pill--green {
  background: rgba(0, 229, 120, .12);
  color: var(--c-green);
}

.icon-pill--blue {
  background: rgba(96, 165, 250, .12);
  color: var(--c-blue);
}

.icon-pill--orange {
  background: rgba(251, 146, 60, .12);
  color: var(--c-orange);
}

.icon-pill--red {
  background: rgba(248, 113, 113, .12);
  color: var(--c-red);
}

.icon-pill--purple {
  background: rgba(192, 132, 252, .12);
  color: var(--c-purple);
}

/* Map panel — fit map + charts in viewport, flush to sidebar */
.panel--map {
  display: flex;
  flex-direction: column;
  height: 100vh;
  min-height: 500px;
  border-radius: 0;
  border: none;
  overflow-y: auto;
}

.panel--map:hover {
  border-color: transparent;
  background: var(--glass-bg);
  box-shadow: none;
}

/* Map container */
.map-container {
  width: 100%;
  flex: 1 1 0;
  min-height: 200px;
  border-radius: 0;
  overflow: hidden;
  background: var(--c-bg);
  position: relative;
}

/* Map toolbar */
.map-toolbar {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
  margin-top: .875rem;
}

.map-toolbar__label {
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--c-text-3);
  white-space: nowrap;
}

/* Layer buttons — neumorphic feel */
.layer-group {
  display: flex;
  gap: .25rem;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: .6rem;
  padding: .2rem;
  box-shadow:
    inset 0 1px 3px rgba(0, 0, 0, .5),
    inset 0 0 0 1px rgba(255, 255, 255, .03);
}

.layer-btn {
  padding: .3rem .75rem;
  border-radius: .4rem;
  font-size: .7rem;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: .04em;
  border: none;
  background: transparent;
  color: var(--c-text-3);
  transition: all .15s;
}

.layer-btn:hover {
  color: var(--c-text);
  background: rgba(255, 255, 255, .06);
}

.layer-btn.active {
  background: var(--c-green-dim);
  color: var(--c-green);
  box-shadow:
    0 1px 4px rgba(0, 0, 0, .4),
    0 0 0 1px rgba(0, 229, 120, .2);
}

/* Metric buttons */
.metric-group {
  display: flex;
  gap: .3rem;
}

.metric-btn {
  padding: .3rem .75rem;
  border-radius: 100px;
  font-size: .75rem;
  font-weight: 500;
  border: 1px solid var(--c-border);
  background: transparent;
  color: var(--c-text-3);
  transition: all .15s;
}

.metric-btn:hover {
  color: var(--c-text);
  border-color: rgba(255, 255, 255, .15);
  background: rgba(255, 255, 255, .04);
}

.metric-btn.active {
  color: var(--c-green);
  border-color: rgba(0, 229, 120, .3);
  background: var(--c-green-dim);
}

/* Legend */
.legend {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-left: auto;
}

.legend__bar {
  width: 72px;
  height: 6px;
  border-radius: 3px;
}

.legend__label {
  font-size: .65rem;
  font-family: var(--font-mono);
  color: var(--c-text-3);
}

/* Stats grid */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
}

.stats-grid--wide {
  grid-template-columns: repeat(6, 1fr);
}

@media (max-width: 1024px) {
  .stats-grid--wide {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 540px) {
  .stats-grid--wide {
    grid-template-columns: repeat(2, 1fr);
  }
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  padding: 1rem;
  border-radius: .75rem;
  background: rgba(0, 0, 0, .25);
  border: 1px solid var(--c-border);
  /* Neumorphic inset */
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .04),
    inset 0 -1px 0 rgba(0, 0, 0, .3);
  transition: border-color .2s, transform .2s;
}

.stat-item:hover {
  border-color: rgba(255, 255, 255, .1);
  transform: translateY(-1px);
}

.stat-item__icon {
  margin-bottom: .25rem;
}

.stat-item__val {
  font-family: var(--font-mono);
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -.04em;
  color: var(--c-text);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.stat-item__label {
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--c-text-3);
}

/* Charts row — 3 charts side by side */
.charts-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .75rem;
  margin-top: .75rem;
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .charts-row {
    grid-template-columns: 1fr;
  }
}

/* Chart panels */
.panel--chart {
  flex: 1;
  padding: .625rem .75rem;
}

.panel--chart .panel__header {
  margin-bottom: .25rem;
}

.panel--chart .panel__name {
  font-size: .75rem;
}

.chart-canvas {
  display: block;
  width: 100%;
  height: 90px;
  flex-shrink: 0;
  border-radius: .5rem;
}

/* Chart wrapper (for crosshair positioning) */
.chart-wrapper {
  position: relative;
  cursor: crosshair;
}

/* Stats panel */
.panel--stats .hr-badges {
  margin-left: auto;
  display: flex;
  gap: 1.25rem;
}

/* Crosshair vertical line */
.chart-crosshair {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1.5px;
  background: rgba(255, 255, 255, .45);
  pointer-events: none;
  opacity: 0;
  transition: opacity .12s ease;
  z-index: 5;
  box-shadow: 0 0 6px rgba(255, 255, 255, .15);
}

/* HR badges */
.hr-badges {
  display: flex;
  gap: 1.25rem;
  margin-left: auto;
}

.hr-badge {
  font-size: .75rem;
  color: var(--c-text-3);
}

.hr-badge strong {
  font-family: var(--font-mono);
  color: var(--c-red);
  font-weight: 700;
}

/* ════════════════════════════════════════════════════════════
   SECTION HEADER (shared)
   ════════════════════════════════════════════════════════════ */
.section-header {
  text-align: center;
  max-width: 540px;
  margin: 0 auto 4rem;
}

.section-header__eyebrow {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--c-green);
  margin-bottom: .75rem;
}

.section-header__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  color: var(--c-text);
  margin-bottom: .75rem;
}

.section-header__sub {
  font-size: .9375rem;
  color: var(--c-text-2);
}

/* ════════════════════════════════════════════════════════════
   FEATURES
   ════════════════════════════════════════════════════════════ */
.features {
  border-top: 1px solid var(--c-border);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

@media (max-width: 900px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 540px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
}

.feature-card {
  padding: 2rem;
  border-radius: var(--radius-lg);
  background: var(--glass-bg);
  border: 1px solid var(--c-border);
  /* Subtle neumorphic shadow */
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .04) inset,
    var(--shadow-card);
  transition: border-color .25s, transform .25s, box-shadow .25s;
}

.feature-card:hover {
  border-color: var(--c-border-2);
  transform: translateY(-4px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .05) inset,
    var(--shadow-hover);
}

.feature-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: .875rem;
  background: var(--ib, rgba(255, 255, 255, .08));
  color: var(--ic, var(--c-text));
  border: 1px solid rgba(255, 255, 255, .07);
  margin-bottom: 1.25rem;
  /* Inner glow matching icon color */
  box-shadow: 0 0 20px var(--ib, transparent);
}

.feature-card h3 {
  font-size: .9375rem;
  font-weight: 600;
  color: var(--c-text);
  margin-bottom: .5rem;
  letter-spacing: -.025em;
}

.feature-card p {
  font-size: .84375rem;
  color: var(--c-text-2);
  line-height: 1.7;
}

/* ════════════════════════════════════════════════════════════
   IMPORT / DROP ZONE
   ════════════════════════════════════════════════════════════ */
.import-section {
  border-top: 1px solid var(--c-border);
}

.drop-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .875rem;
  max-width: 600px;
  margin: 0 auto;
  padding: 5rem 3rem;
  border-radius: var(--radius-xl);
  border: 1.5px dashed rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .02);
  cursor: pointer;
  text-align: center;
  transition: all .25s ease;
}

.drop-zone:hover,
.drop-zone.drag-over {
  border-color: rgba(0, 229, 120, .4);
  background: rgba(0, 229, 120, .03);
  box-shadow:
    0 0 80px rgba(0, 229, 120, .06) inset,
    0 0 0 1px rgba(0, 229, 120, .15);
  transform: scale(1.005);
}

.drop-zone__icon {
  color: var(--c-green);
  opacity: .7;
  transition: opacity .2s, transform .2s;
}

.drop-zone:hover .drop-zone__icon {
  opacity: 1;
  transform: translateY(-4px);
}

.drop-zone__title {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--c-text);
  letter-spacing: -.02em;
}

.drop-zone__sub {
  font-size: .84375rem;
  color: var(--c-text-3);
}

/* ════════════════════════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════════════════════════ */
.footer {
  border-top: 1px solid var(--c-border);
  padding: 2.5rem 2rem;
  text-align: center;
}

.footer__brand {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -.03em;
  color: var(--c-text);
  margin-bottom: .375rem;
}

.footer__brand em {
  font-style: normal;
  color: var(--c-green);
}

.footer__sub {
  font-size: .8125rem;
  color: var(--c-text-3);
}

.footer__links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: .75rem;
}

.footer__links a {
  color: var(--c-text-3);
  transition: color .15s;
}

.footer__links a:hover {
  color: var(--c-green);
}

/* ════════════════════════════════════════════════════════════
   MAP OVERRIDES (Leaflet)
   ════════════════════════════════════════════════════════════ */
.leaflet-container {
  background: var(--c-bg) !important;
  font-family: var(--font) !important;
}

.leaflet-popup-content-wrapper {
  background: #161929 !important;
  border: 1px solid var(--c-border-2) !important;
  border-radius: 12px !important;
  color: var(--c-text) !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .7), 0 4px 16px rgba(0, 0, 0, .5) !important;
  backdrop-filter: blur(20px) !important;
}

.leaflet-popup-content-wrapper p {
  margin: 0;
}

.leaflet-popup-tip {
  background: #161929 !important;
}

.leaflet-popup-close-button {
  color: var(--c-text-3) !important;
  top: 10px !important;
  right: 12px !important;
}

.leaflet-control-zoom a {
  background: #161929 !important;
  color: var(--c-text-2) !important;
  border-color: var(--c-border) !important;
  transition: all .15s !important;
}

.leaflet-control-zoom a:hover {
  background: var(--c-green-dim) !important;
  color: var(--c-green) !important;
}

.leaflet-bar {
  border: 1px solid var(--c-border) !important;
  border-radius: 10px !important;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 0, 0, .5) !important;
}

.leaflet-bar a:first-child {
  border-radius: 9px 9px 0 0 !important;
}

.leaflet-bar a:last-child {
  border-radius: 0 0 9px 9px !important;
  border-bottom: none !important;
}

.leaflet-attribution-flag {
  display: none !important;
}

.leaflet-control-attribution {
  background: rgba(7, 8, 15, .85) !important;
  color: var(--c-text-3) !important;
  border-radius: 6px !important;
  font-size: 10px !important;
  backdrop-filter: blur(8px) !important;
}

/* ════════════════════════════════════════════════════════════
   TOAST
   ════════════════════════════════════════════════════════════ */
.toast {
  position: fixed;
  bottom: 1.75rem;
  left: 50%;
  transform: translateX(-50%) translateY(60px);
  display: flex;
  align-items: center;
  gap: .625rem;
  padding: .75rem 1.25rem;
  font-size: .875rem;
  font-weight: 500;
  color: var(--c-text);
  background: rgba(20, 23, 40, .9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--c-border-2);
  border-radius: .875rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .6), 0 4px 12px rgba(0, 0, 0, .4);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  /* Spring-like bounce */
  transition:
    transform .45s cubic-bezier(.34, 1.56, .64, 1),
    opacity .25s ease;
}

.toast svg {
  color: var(--c-green);
  flex-shrink: 0;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* ════════════════════════════════════════════════════════════
   MAP EMPTY STATE
   ════════════════════════════════════════════════════════════ */
.map-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .875rem;
  color: var(--c-text-3);
  pointer-events: none;
}

.map-empty svg {
  opacity: .3;
}

.map-empty p {
  font-size: .875rem;
}

/* ════════════════════════════════════════════════════════════
   ANIMATIONS
   ════════════════════════════════════════════════════════════ */

/* Entrance animations on load */
.anim-fade {
  animation: fade-in .7s ease both;
}

.anim-up {
  animation: slide-up .75s cubic-bezier(.16, 1, .3, 1) both;
  animation-delay: var(--d, 0s);
}

@keyframes fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slide-up {
  from {
    opacity: 0;
    transform: translateY(28px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scroll-reveal: elements get .revealed class via JS */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity .65s cubic-bezier(.16, 1, .3, 1),
    transform .65s cubic-bezier(.16, 1, .3, 1);
  transition-delay: calc(var(--ri, 0) * .07s);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Legend hidden helper */
[hidden] {
  display: none !important;
}

/* ════════════════════════════════════════════════════════════
   TRACK HOVER TOOLTIP
   ════════════════════════════════════════════════════════════ */
.track-tooltip {
  position: fixed;
  pointer-events: none;
  z-index: 10000;
  background: rgba(14, 16, 32, 0.94);
  border: 1px solid var(--c-border-2);
  border-radius: 12px;
  padding: 10px 14px;
  min-width: 156px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, .55),
    inset 0 1px 0 rgba(255, 255, 255, .06);
  font-family: var(--font);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
}

.tt-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
}

.tt-row+.tt-row {
  margin-top: 5px;
  padding-top: 5px;
  border-top: 1px solid var(--c-border);
}

.tt-label {
  font-size: 9px;
  color: var(--c-text-3);
  text-transform: uppercase;
  letter-spacing: .09em;
  font-weight: 700;
  white-space: nowrap;
}

.tt-val {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--c-text);
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}

.tt-val--red {
  color: var(--c-red);
}

.tt-val--dim {
  font-size: 11px;
  color: var(--c-text-2);
  font-weight: 500;
}

/* ════════════════════════════════════════════════════════════
   ACTIVITIES SECTION (legacy, kept for card styles if needed)
   ════════════════════════════════════════════════════════════ */
.activities-section {
  border-top: 1px solid var(--c-border);
  padding-top: 3rem;
}

.activity-filters {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  justify-content: center;
}

.filter-pill {
  padding: .5rem 1rem;
  border-radius: 100px;
  font-size: .8125rem;
  font-weight: 500;
  border: 1px solid var(--c-border);
  background: transparent;
  color: var(--c-text-2);
  cursor: pointer;
  transition: all .15s;
}

.filter-pill:hover {
  border-color: var(--c-border-2);
  background: rgba(255, 255, 255, .04);
  color: var(--c-text);
}

.filter-pill.active {
  background: var(--c-green-dim);
  border-color: rgba(0, 229, 120, .3);
  color: var(--c-green);
}

.activities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

@media (max-width: 640px) {
  .activities-grid {
    grid-template-columns: 1fr;
  }
}

.activity-card {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}

.activity-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1rem;
}

.activity-type-badge {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: .35rem .65rem;
  border-radius: .5rem;
  background: var(--c-green-dim);
  color: var(--c-green);
  display: inline-block;
}

.activity-type-badge.running {
  background: rgba(96, 165, 250, .12);
  color: var(--c-blue);
}

.activity-type-badge.hiking {
  background: rgba(251, 146, 60, .12);
  color: var(--c-orange);
}

.activity-type-badge.cycling {
  background: rgba(192, 132, 252, .12);
  color: var(--c-purple);
}

.activity-type-badge.other {
  background: rgba(255, 255, 255, .08);
  color: var(--c-text-2);
}

.activity-card__date {
  font-size: .75rem;
  color: var(--c-text-3);
  white-space: nowrap;
}

.activity-card__name {
  font-size: .95rem;
  font-weight: 600;
  color: var(--c-text);
  margin-bottom: .875rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.activity-card__stats {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  font-size: .8125rem;
  color: var(--c-text-2);
  margin-bottom: 1.25rem;
  flex: 1;
}

.activity-card__stats span {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--c-text);
}

.activity-card__stats span::before {
  content: '→ ';
  color: var(--c-text-3);
  font-weight: 400;
}

.activity-card__actions {
  display: flex;
  gap: .5rem;
}

.activity-card__actions button {
  flex: 1;
}

/* ════════════════════════════════════════════════════════════
   MAP OVERLAY STATS
   ════════════════════════════════════════════════════════════ */
.map-overlay-stats {
  position: absolute;
  bottom: 2rem;
  left: 1rem;
  z-index: 500;
  background: rgba(7, 8, 15, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--c-border-2);
  border-radius: 0.875rem;
  padding: 0.875rem 1rem;
  min-width: 160px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .4);
}

.mos-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.75rem;
}

.mos-row+.mos-row {
  margin-top: 0.4rem;
  padding-top: 0.4rem;
  border-top: 1px solid var(--c-border);
}

.mos-label {
  color: var(--c-text-3);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-size: 0.65rem;
  white-space: nowrap;
}

.mos-val {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--c-text);
  font-variant-numeric: tabular-nums;
}

/* ════════════════════════════════════════════════════════════
   CHART VALUES DISPLAY
   ════════════════════════════════════════════════════════════ */
.chart-values {
  display: flex;
  gap: 1rem;
  padding: 0.375rem 0.25rem 0;
  font-size: 0.7rem;
  flex-wrap: wrap;
}

.cv-item {
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
}

.cv-label {
  color: var(--c-text-3);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 700;
  white-space: nowrap;
}

.cv-val {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--c-text);
  font-variant-numeric: tabular-nums;
}

.cv-unit {
  color: var(--c-text-3);
  font-size: 0.65rem;
  font-weight: 400;
}

/* ════════════════════════════════════════════════════════════
   FULLSCREEN MAP MODE
   ════════════════════════════════════════════════════════════ */
.panel--map.fullscreen {
  position: fixed;
  inset: 0;
  z-index: 9000;
  border-radius: 0;
  border: none;
  display: flex;
  flex-direction: column;
  background: var(--c-bg);
}

/* Header bar: contains title + layer buttons + toolbar + fullscreen btn */
.panel--map.fullscreen .panel__header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9002;
  background: rgba(7, 8, 15, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: .5rem 1.25rem;
  border-bottom: 1px solid var(--c-border);
  flex-wrap: wrap;
  gap: .5rem;
}

.panel--map.fullscreen .map-container {
  height: 100%;
  flex: 1;
  border-radius: 0;
  border: none;
}

/* Toolbar inline in the header */
.panel--map.fullscreen .map-toolbar {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9002;
  background: rgba(7, 8, 15, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: .5rem .75rem;
  border-radius: 0 0 .75rem .75rem;
  border: 1px solid var(--c-border);
  border-top: none;
  margin-top: 0;
}

/* Map overlay stats: repositioned above charts via JS */
.panel--map.fullscreen .map-overlay-stats {
  left: auto;
  right: 1rem;
  z-index: 9002;
}

/* Charts row overlaid at the bottom of the fullscreen map */
.panel--map.fullscreen .charts-row {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9001;
  background: rgba(7, 8, 15, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--c-border);
  padding: .75rem 1rem;
  gap: .75rem;
}

.panel--map.fullscreen .charts-row .panel--chart {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: .5rem;
}

.panel--map.fullscreen .charts-row .panel__header {
  position: static;
  background: transparent;
  backdrop-filter: none;
  padding: 0 0 .25rem 0;
  border-bottom: none;
}

.panel--map.fullscreen .charts-row .chart-canvas {
  height: 90px !important;
}

.panel--map.fullscreen .charts-row .chart-values {
  padding-top: .35rem;
}

/* Push Leaflet zoom controls below the header in fullscreen */
.panel--map.fullscreen .leaflet-top {
  top: 4rem;
}

/* Fullscreen button icon swap */
.panel--map.fullscreen #btnFullscreen svg path {
  d: path("M9 9H4V4h5M15 9h5V4h-5M9 15H4v5h5M15 15h5v5h-5");
}

/* ════════════════════════════════════════════════════════════
   MOBILE OPTIMIZATIONS
   ════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* Hide map overlay stats on mobile */
  .map-overlay-stats {
    display: none;
  }
}