/* ninja-sports.app — shared styles =====================================
 * Palette: cool whites, slate-blacks. Distinct from ninjaverband.at
 * (warm beige + red accent). Fonts: Inter for body, Space Grotesk
 * for display, JetBrains Mono for code.
 * ===================================================================== */

*, *::before, *::after { box-sizing: border-box; }

:root {
  /* Cool, light palette */
  --ink: #0f172a;          /* slate-900 */
  --ink-soft: #334155;     /* slate-700 */
  --paper: #ffffff;        /* pure white */
  --paper-2: #f8fafc;      /* slate-50 */
  --paper-3: #f1f5f9;      /* slate-100 */
  --line: #e2e8f0;         /* slate-200 */
  --line-strong: #cbd5e1;  /* slate-300 */
  --muted: #64748b;        /* slate-500 */
  --accent: #16a34a;       /* green-600 */
  --accent-soft: #dcfce7;  /* green-100 */
  --accent-strong: #15803d; /* green-700 */

  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Consolas, monospace;
}

html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  font-size: 16px;
  font-feature-settings: 'cv11', 'ss03';
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); text-decoration: underline; }

main { flex: 1; }

.wrap {
  max-width: 920px;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 3.5rem) clamp(1.5rem, 5vw, 2.5rem);
  width: 100%;
}
.narrow { max-width: 640px; }
.wide { max-width: 1200px; }

/* === Site nav (sticky top) === */
.site-nav {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.site-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: .85rem clamp(1.5rem, 5vw, 2.5rem);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.site-nav-brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -.015em;
  color: var(--ink);
  text-decoration: none;
}
.site-nav-brand:hover { color: var(--accent); text-decoration: none; }
.site-nav-links {
  display: flex;
  gap: .3rem;
}
.site-nav-link {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 500;
  padding: .4rem .85rem;
  border-radius: 6px;
  transition: background .15s, color .15s;
}
.site-nav-link:hover { background: var(--paper-2); color: var(--ink); text-decoration: none; }
.site-nav-link.is-active {
  background: var(--ink);
  color: #fff;
}
.site-nav-link.is-active:hover { background: var(--ink); color: #fff; }

/* === Headings (display font) === */
h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.05;
  letter-spacing: -.02em;
  margin: 0 0 1.2rem 0;
  font-weight: 600;
  color: var(--ink);
}
.lead {
  font-size: 1.08rem;
  color: var(--ink-soft);
  margin: 0 0 .8rem 0;
  line-height: 1.5;
}
section { margin: 2.6rem 0 0 0; }
h2 {
  font-family: var(--font-display);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1rem 0;
}
h2 .count {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
p { margin: 0 0 .8rem 0; color: var(--ink-soft); }

/* === Disclaimer === */
.disclaimer {
  background: var(--accent-soft);
  border: 1px solid #bbf7d0;
  padding: .9rem 1.1rem;
  border-radius: 6px;
  margin: 1.4rem 0;
  font-size: .92rem;
  color: var(--ink-soft);
}
.disclaimer strong { color: var(--ink); }

/* === Code & endpoints === */
code {
  font-family: var(--font-mono);
  font-size: .85em;
  background: var(--paper-3);
  padding: .15rem .4rem;
  border-radius: 4px;
  color: var(--ink);
}
pre {
  background: var(--ink);
  color: #f1f5f9;
  padding: 1rem 1.2rem;
  border-radius: 8px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: .85rem;
  line-height: 1.55;
  margin: .8rem 0 1.2rem 0;
}
pre code { background: none; padding: 0; color: inherit; }
.endpoint {
  display: inline-block;
  background: var(--ink);
  color: #f1f5f9;
  padding: .5rem .9rem;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: .88rem;
  margin: .3rem 0 1rem 0;
}

/* === Big nav cards (landing) === */
.nav-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
.nav-card {
  display: block;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.6rem 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: all .18s ease;
}
.nav-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -8px rgba(22,163,74,.15);
  text-decoration: none;
}
.nav-card-icon {
  font-size: 1.7rem;
  margin-bottom: .8rem;
  display: block;
}
.nav-card-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 .4rem 0;
  letter-spacing: -.01em;
}
.nav-card-desc {
  font-size: .92rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}
.nav-card-cta {
  display: inline-block;
  margin-top: .9rem;
  font-size: .88rem;
  color: var(--accent);
  font-weight: 500;
}

/* === Search input === */
.search-bar {
  position: relative;
  margin: 0 0 .9rem 0;
}
.search-input {
  width: 100%;
  padding: .65rem 2.4rem .65rem 2.4rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: .95rem;
  font-family: inherit;
  background: var(--paper);
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(22,163,74,.15);
}
.search-input::placeholder { color: var(--muted); }
.search-icon {
  position: absolute;
  left: .85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
  font-size: .95rem;
}
.search-clear {
  position: absolute;
  right: .6rem;
  top: 50%;
  transform: translateY(-50%);
  background: var(--paper-3);
  border: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: .75rem;
  color: var(--ink-soft);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.search-clear:hover { background: var(--line-strong); color: var(--ink); }
.search-clear.show { display: flex; }

/* === Filter pills === */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin: 0 0 1rem 0;
}
.filter-pill {
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  padding: .35rem .75rem;
  border-radius: 999px;
  font-size: .85rem;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: all .12s;
  font-variant-numeric: tabular-nums;
}
.filter-pill:hover { border-color: var(--accent); color: var(--ink); }
.filter-pill.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.filter-pill .ct {
  opacity: .55;
  margin-left: .3rem;
  font-size: .8rem;
}
.filter-pill.active .ct { opacity: .8; }

.summary {
  font-size: .85rem;
  color: var(--muted);
  margin: 0 0 .8rem 0;
}
.summary strong { color: var(--ink); font-weight: 600; }

/* === Map === */
.gym-map {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--line);
  overflow: hidden;
  background: var(--paper-2);
  cursor: grab;
  box-shadow: 0 1px 3px rgba(15,23,42,.04);
}
.gym-map.is-active { cursor: default; }
.gym-map.tall {
  height: 620px;
  max-height: 80vh;
  min-height: 480px;
}
.gym-map.short {
  height: 420px;
  margin: 0 0 1.5rem 0;
}
.ninja-marker span {
  display: block;
  width: 22px;
  height: 22px;
  background: var(--accent);
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 2px 6px rgba(15,23,42,.25);
  transition: transform .15s;
}
.ninja-marker:hover span {
  transform: scale(1.3);
  background: var(--accent-strong);
}
.ninja-tooltip {
  background: var(--ink) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 6px !important;
  padding: .4rem .7rem !important;
  font-family: var(--font-body) !important;
  font-size: .82rem !important;
  box-shadow: 0 4px 12px rgba(15,23,42,.2) !important;
}
.ninja-tooltip::before { border-top-color: var(--ink) !important; }
.leaflet-popup-content-wrapper {
  border-radius: 8px !important;
  font-family: var(--font-body) !important;
}
.leaflet-popup-content {
  margin: .8rem 1rem !important;
  font-size: .88rem !important;
}

/* === Hall card grid === */
.gym-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: .9rem;
}
.gym-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: .4rem;
  transition: all .15s;
}
.gym-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 12px -2px rgba(22,163,74,.1);
  transform: translateY(-1px);
}
.gym-head {
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  margin-bottom: .2rem;
}
.gym-logo {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink-soft);
  font-size: 1rem;
}
.gym-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.gym-meta { flex: 1; min-width: 0; }
.gym-flag {
  font-size: .76rem;
  color: var(--muted);
  letter-spacing: .02em;
  margin-bottom: .1rem;
  text-transform: uppercase;
  font-weight: 500;
}
.gym-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.25;
  letter-spacing: -.005em;
}
.gym-city {
  font-size: .85rem;
  color: var(--muted);
  margin: .1rem 0 .3rem 0;
}
.gym-desc {
  font-size: .87rem;
  color: var(--ink-soft);
  line-height: 1.5;
  flex: 1;
}
.gym-link {
  font-size: .8rem;
  color: var(--accent);
  text-decoration: none;
  margin-top: .5rem;
  font-family: var(--font-mono);
  word-break: break-all;
  font-weight: 500;
}
.gym-link:hover { text-decoration: underline; }
.empty-state {
  padding: 2rem;
  text-align: center;
  color: var(--muted);
  grid-column: 1 / -1;
  font-size: .92rem;
}

/* === Notice / info banner === */
.notice {
  display: flex;
  gap: .8rem;
  align-items: flex-start;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  padding: .9rem 1.1rem;
  border-radius: 6px;
  margin: 1rem 0 1.4rem 0;
  font-size: .9rem;
  color: var(--ink-soft);
}
.notice-icon {
  flex-shrink: 0;
  font-size: 1rem;
  line-height: 1.4;
  color: var(--accent);
}
.notice-body { flex: 1; line-height: 1.5; }
.notice-body strong { color: var(--ink); }

/* === Sources === */
.sources {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.5rem 1.6rem;
  margin: 1rem 0;
}
.sources p { font-size: .92rem; }
.sources-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: .55rem .9rem;
}
.sources-list li {
  font-size: .87rem;
  color: var(--ink-soft);
  padding-left: 1rem;
  position: relative;
}
.sources-list li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}
.sources-list a { color: var(--ink-soft); }
.sources-list a:hover { color: var(--accent); }

/* === GitHub-style badges === */
.badges {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin: 1rem 0 1.5rem 0;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  background: var(--paper-2);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 500;
  padding: .25rem .55rem;
  border-radius: 999px;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
}
.badge-success {
  background: var(--accent-soft);
  border-color: #bbf7d0;
  color: var(--accent-strong);
}
.badge-success::before { background: var(--accent); }
.badge-planned {
  color: var(--muted);
}
.badge-planned::before { background: var(--line-strong); }

/* === Stat grid (repo-header-like) === */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 1.5rem 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--paper);
}
.stat {
  padding: 1.2rem 1rem;
  text-align: center;
  border-right: 1px solid var(--line);
}
.stat:last-child { border-right: none; }
.stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.stat-label {
  display: block;
  margin-top: .35rem;
  font-size: .78rem;
  color: var(--muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .05em;
}
@media (max-width: 540px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: none; }
  .stat:nth-child(1), .stat:nth-child(2) { border-bottom: 1px solid var(--line); }
}

/* === Dataset list (file-tree-like) === */
.dataset-list {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--paper);
  margin: 1rem 0;
}
.dataset-row {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: .8rem;
  align-items: center;
  padding: .8rem 1.1rem;
  border-bottom: 1px solid var(--line);
  font-size: .9rem;
  transition: background .12s;
}
.dataset-row:last-child { border-bottom: none; }
.dataset-row.is-live:hover { background: var(--paper-2); }
.dataset-status {
  font-family: var(--font-mono);
  font-size: .9rem;
  color: var(--accent);
  text-align: center;
}
.dataset-status.is-planned { color: var(--line-strong); }
.dataset-info {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  min-width: 0;
}
.dataset-name {
  font-family: var(--font-mono);
  font-size: .92rem;
  color: var(--ink);
  font-weight: 500;
}
.dataset-name a {
  color: var(--ink);
  text-decoration: none;
}
.dataset-name a:hover {
  color: var(--accent);
  text-decoration: none;
}
.dataset-desc {
  font-size: .82rem;
  color: var(--muted);
}
.dataset-meta {
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--muted);
  white-space: nowrap;
}

/* === CTA row === */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin: 1.5rem 0;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .65rem 1.2rem;
  border-radius: 8px;
  font-size: .92rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  font-family: inherit;
  cursor: pointer;
  transition: all .15s;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.btn-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn-secondary {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--line);
}
.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* === Section heading with descriptive text === */
.section-head {
  margin-bottom: 1rem;
}
.section-head h2 {
  margin-bottom: .35rem;
}
.section-head .section-desc {
  font-size: .9rem;
  color: var(--muted);
  margin: 0;
}

/* === Footer === */
footer {
  padding: 1.6rem clamp(1.5rem, 5vw, 2.5rem);
  font-size: .82rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  margin-top: 3rem;
  background: var(--paper-2);
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .8rem;
}
footer a { color: var(--muted); text-decoration: underline; }
footer a:hover { color: var(--ink); }
