
:root{
  --bg:#f3f6f8; --card:#fff; --ink:#17212b; --muted:#6b7785;
  --line:#dfe6eb; --accent:#0f5c7a; --accent2:#1785ac; --soft:#e8f3f7;
}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--ink);font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
.topbar{display:flex;justify-content:space-between;align-items:flex-end;padding:26px 34px 20px;background:#102a3a;color:white}
h1,h2,p{margin-top:0}.topbar h1{font-size:34px;margin-bottom:4px}.subtitle{color:#c8d8e2;margin-bottom:0}
.eyebrow{text-transform:uppercase;letter-spacing:.12em;font-size:11px;font-weight:800;color:#79bdd7;margin-bottom:7px}
.status{font-size:12px;color:#c8d8e2;padding:8px 10px;border:1px solid rgba(255,255,255,.18);border-radius:8px}
main{padding:22px 28px 34px;max-width:1600px;margin:0 auto}
.card{background:var(--card);border:1px solid var(--line);border-radius:14px;box-shadow:0 5px 18px rgba(20,40,55,.05)}
.filters{padding:15px 18px;display:grid;grid-template-columns:repeat(3,minmax(210px,1fr));gap:14px}
label span{display:block;font-size:12px;font-weight:700;color:var(--muted);margin-bottom:6px}
select{width:100%;padding:10px 11px;border:1px solid #ccd7df;border-radius:9px;background:white;font-size:14px;color:var(--ink)}
.kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin:14px 0}
.kpi{padding:15px 17px}.kpi span{display:block;color:var(--muted);font-size:12px;font-weight:700}.kpi strong{display:block;font-size:25px;margin-top:7px}
.layout{display:grid;grid-template-columns:minmax(0,2fr) minmax(320px,.8fr);gap:14px}
.map-card,.details,.ranking-card{padding:16px}
.section-head{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-bottom:12px}
.section-head h2{font-size:18px;margin-bottom:3px}.section-head p{font-size:12px;color:var(--muted);margin-bottom:0}
.legend{font-size:12px;color:var(--muted);white-space:nowrap}.dot{width:12px;height:12px;border-radius:50%;background:rgba(23,133,172,.55);display:inline-block;vertical-align:-2px;margin-right:5px;border:2px solid #0f5c7a}
#map{height:620px;border-radius:10px;overflow:hidden;background:#eef3f5}
.details{min-height:620px}.muted{color:var(--muted)}.detail-summary{font-size:13px;line-height:1.5;padding-bottom:12px;border-bottom:1px solid var(--line)}
.org-bars{margin-top:14px}.org-row{margin-bottom:12px}.org-head{display:flex;justify-content:space-between;gap:10px;font-size:12px;margin-bottom:5px}.org-name{font-weight:700}.org-value{white-space:nowrap;color:#3c4a55}
.bar-track{height:10px;background:#edf2f5;border-radius:20px;overflow:hidden}.bar-fill{height:100%;background:linear-gradient(90deg,var(--accent),var(--accent2));border-radius:20px}
.ranking-card{margin-top:14px}.ranking{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px 18px}.rank-column{min-width:0}.rank-row{display:grid;grid-template-columns:28px minmax(110px,1fr) 105px;align-items:center;gap:8px;padding:7px 0;border-bottom:1px solid #eef2f4;font-size:13px}.rank-n{font-weight:800;color:#81909c}.rank-town{font-weight:700}.rank-value{text-align:right}
.footnote{margin-top:14px;padding:13px 16px;font-size:12px;color:#51606b}
.leaflet-popup-content{margin:12px 14px;min-width:180px}.popup-title{font-weight:800;font-size:14px;margin-bottom:6px}.popup-value{font-size:18px;font-weight:800;color:#0f5c7a}.popup-meta{font-size:11px;color:#6b7785;margin-top:4px}
@media(max-width:1200px){.ranking{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:1000px){.layout{grid-template-columns:1fr}.filters{grid-template-columns:1fr}.kpis{grid-template-columns:1fr 1fr}.ranking{grid-template-columns:1fr}.details{min-height:auto}#map{height:520px}}

.rank-value{
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  white-space: nowrap;
}

.sporttao-bubble-wrap{
  background:transparent !important;
  border:none !important;
}
.sporttao-bubble{
  position:relative;
  border-radius:50%;
  background:rgba(23,133,172,.50);
  border:2px solid #0f5c7a;
  box-shadow:0 2px 8px rgba(15,92,122,.28);
  cursor:pointer;
  transition:transform .12s ease, background .12s ease;
}
.sporttao-bubble:hover{
  transform:scale(1.08);
  background:rgba(23,133,172,.68);
}
.sporttao-bubble-label{
  display:none;
}

/* v006: stronger county-map bubbles */
.sporttao-bubble{
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(23,133,172,.58);
  border:3px solid #0f5c7a;
  box-shadow:0 3px 12px rgba(15,92,122,.38);
}
.sporttao-bubble.selected{
  background:rgba(15,92,122,.82);
  border:4px solid #083e52;
  box-shadow:0 0 0 4px rgba(23,133,172,.18), 0 4px 14px rgba(15,92,122,.45);
}
.sporttao-bubble-dot{
  width:6px;
  height:6px;
  border-radius:50%;
  background:#fff;
  opacity:.95;
}

/* v008: independent HTML overlay bubbles above Leaflet */
#map{position:relative}
.bubble-overlay{
  position:absolute;
  inset:0;
  z-index:1000;
  pointer-events:none;
  overflow:hidden;
}
.map-bubble{
  position:absolute;
  transform:translate(-50%,-50%);
  border-radius:50%;
  border:3px solid #0f5c7a;
  background:rgba(23,133,172,.58);
  box-shadow:0 3px 12px rgba(15,92,122,.38);
  pointer-events:auto;
  cursor:pointer;
  padding:0;
  margin:0;
  display:flex;
  align-items:center;
  justify-content:center;
  transition:transform .12s ease, background .12s ease;
}
.map-bubble:hover{
  transform:translate(-50%,-50%) scale(1.08);
  background:rgba(23,133,172,.72);
}
.map-bubble.selected{
  background:rgba(15,92,122,.85);
  border:4px solid #083e52;
  box-shadow:0 0 0 4px rgba(23,133,172,.20),0 4px 14px rgba(15,92,122,.46);
}
.map-bubble-core{
  width:7px;
  height:7px;
  border-radius:50%;
  background:#fff;
}

/* v010: SVG county map */
.county-map{
  position:relative;
  height:620px;
  background:#eef3f5;
  border-radius:10px;
  overflow:hidden;
}
.county-svg{
  width:100%;
  height:100%;
  display:block;
  touch-action:none;
  user-select:none;
}
.county-shape{
  fill:#e9f2f4;
  stroke:#9b2f2f;
  stroke-width:.006;
  vector-effect:non-scaling-stroke;
}
.county-bubble{
  fill:rgba(23,133,172,.55);
  stroke:#0f5c7a;
  stroke-width:.0045;
  vector-effect:non-scaling-stroke;
}
.county-bubble.selected{
  fill:rgba(15,92,122,.88);
  stroke:#082f3f;
  stroke-width:.007;
}
.county-bubble-dot{
  fill:#fff;
  pointer-events:none;
}
.map-controls{
  position:absolute;
  right:12px;
  bottom:12px;
  z-index:20;
  display:flex;
  flex-direction:column;
  gap:5px;
}
.map-controls button{
  width:34px;
  height:34px;
  border:1px solid #c8d4da;
  border-radius:8px;
  background:rgba(255,255,255,.94);
  color:#17313f;
  font-size:20px;
  line-height:1;
  cursor:pointer;
  box-shadow:0 2px 8px rgba(20,40,55,.12);
}
.map-tooltip{
  position:absolute;
  z-index:30;
  pointer-events:none;
  background:#fff;
  border:1px solid #d6e0e5;
  border-radius:8px;
  box-shadow:0 4px 14px rgba(20,40,55,.16);
  padding:8px 10px;
  font-size:12px;
  color:#17212b;
}

/* v011 — visible Hajdú-Bihar county silhouette */
.county-map{
  background:#f7f9fa !important;
}
.county-shape{
  fill:#dfeef2 !important;
  fill-opacity:1 !important;
  stroke:#9b2f2f !important;
  stroke-width:3px !important;
  vector-effect:non-scaling-stroke !important;
  stroke-linejoin:round !important;
  stroke-linecap:round !important;
}
.county-bubble{
  fill:rgba(23,133,172,.58) !important;
  stroke:#0f5c7a !important;
  stroke-width:2.5px !important;
  vector-effect:non-scaling-stroke !important;
}
.county-bubble.selected{
  fill:rgba(15,92,122,.90) !important;
  stroke:#082f3f !important;
  stroke-width:4px !important;
}

/* v012 — faint map context */
.town-context-group{
  pointer-events:none;
}
.town-context-dot{
  fill:#7d8d95;
  opacity:.45;
}
.town-context-label{
  fill:#5e6b72;
  opacity:.58;
  font-size:0.022px;
  font-weight:500;
  paint-order:stroke;
  stroke:#f7f9fa;
  stroke-width:.004px;
  stroke-opacity:.75;
}
.town-context-label.major{
  fill:#3f4c53;
  opacity:.78;
  font-weight:700;
  font-size:0.026px;
}
.town-context-label.selected-town{
  fill:#17313f;
  opacity:.95;
  font-weight:800;
  font-size:0.026px;
}

/* v013 — subtle relief and smaller labels */
.county-shape{
  fill:#e4eed2 !important;
}
.county-relief-overlay{
  opacity:.55;
  pointer-events:none;
}
.county-relief-noise{
  fill:#7b8f63;
  opacity:.22;
  pointer-events:none;
}
.town-context-label{
  font-size:0.018px !important;
  opacity:.52 !important;
}
.town-context-label.major{
  font-size:0.021px !important;
  opacity:.72 !important;
}
.town-context-label.selected-town{
  font-size:0.021px !important;
  opacity:.90 !important;
}

/* v013 — interactive TOP count */
.map-head-actions{
  display:flex;
  align-items:center;
  gap:16px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.top-count-control{
  display:flex;
  align-items:center;
  gap:6px;
  color:#5b6b74;
  font-size:12px;
  white-space:nowrap;
}
.top-count-control button{
  width:26px;
  height:26px;
  border:1px solid #cbd7dd;
  border-radius:7px;
  background:#fff;
  color:#17313f;
  font-size:17px;
  line-height:1;
  cursor:pointer;
}
.top-count-control button:disabled{
  opacity:.35;
  cursor:default;
}
.top-count-control strong{
  min-width:24px;
  text-align:center;
  color:#17313f;
  font-variant-numeric:tabular-nums;
  font-size:13px;
}

/* v014 — organization drill-down */
.org-link{
  color:inherit;
  text-decoration:none;
  border-bottom:1px dotted rgba(23,49,63,.45);
}
.org-link:hover{
  color:#0f5c7a;
  border-bottom-style:solid;
}
.org-link:focus-visible{
  outline:2px solid #0f5c7a;
  outline-offset:2px;
  border-radius:2px;
}
.org-page{max-width:1180px;margin:0 auto;padding:22px;}
.org-backline{font-size:13px;color:#667780;margin-bottom:10px;}
.org-title{margin:0 0 6px;font-size:30px;line-height:1.15;}
.org-meta{color:#667780;margin:0;}
.org-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:18px 0;}
.org-table-card{overflow:hidden;}
.org-table-wrap{overflow-x:auto;}
.org-table{width:100%;border-collapse:collapse;font-variant-numeric:tabular-nums;}
.org-table th,.org-table td{padding:12px 14px;border-bottom:1px solid #e5ecef;text-align:right;white-space:nowrap;}
.org-table th:first-child,.org-table td:first-child,.org-table th:nth-child(2),.org-table td:nth-child(2){text-align:left;}
.org-table thead th{font-size:12px;text-transform:uppercase;letter-spacing:.03em;color:#65767f;background:#f7f9fa;}
.org-table tbody tr:hover{background:#f8fbfc;}
.org-total-row td{font-weight:800;border-top:2px solid #cbd8dd;background:#f3f7f8;}
.org-empty{padding:28px;color:#667780;}
@media(max-width:760px){
  .org-page{padding:14px;}
  .org-title{font-size:24px;}
  .org-kpis{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}
  .org-table th,.org-table td{padding:10px 9px;font-size:13px;}
}


/* v015 — globális SPORTTAO főoldal navigáció */
.topbar-main{
  display:flex;
  align-items:center;
  gap:14px;
  min-width:0;
}
.topbar-title{min-width:0}
.home-link{
  flex:0 0 auto;
  width:48px;
  height:48px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.24);
  background:rgba(255,255,255,.08);
  color:#fff;
  text-decoration:none;
  box-shadow:0 3px 12px rgba(0,0,0,.12);
  transition:background .15s ease, transform .15s ease, border-color .15s ease;
}
.home-link:hover,
.home-link:focus-visible{
  background:rgba(255,255,255,.16);
  border-color:rgba(255,255,255,.42);
  transform:translateY(-1px);
  outline:none;
}
.home-link-icon{
  font-size:25px;
  line-height:1;
}
@media(max-width:700px){
  .topbar{align-items:flex-start;gap:12px;padding:18px 16px 16px}
  .topbar-main{gap:10px}
  .home-link{width:44px;height:44px;border-radius:12px}
  .home-link-icon{font-size:23px}
  .topbar h1{font-size:26px}
}


/* v016 — egyértelmű főoldal navigáció */
.home-link{
  width:auto !important;
  min-width:48px;
  padding:0 13px !important;
  gap:8px;
  white-space:nowrap;
}
.home-link-label{
  font-size:13px;
  font-weight:700;
  line-height:1;
}
@media(max-width:700px){
  .home-link{
    min-width:44px;
    height:44px;
    padding:0 10px !important;
    gap:6px;
  }
  .home-link-label{
    font-size:11px;
  }
}
@media(max-width:420px){
  .home-link-label{
    display:none;
  }
  .home-link{
    width:44px !important;
    padding:0 !important;
  }
}

/* v017 — verziószám a főoldal navigáció mellett */
.home-link-version{
  font-size:11px;
  font-weight:600;
  opacity:.72;
  padding-left:8px;
  margin-left:2px;
  border-left:1px solid rgba(255,255,255,.28);
  line-height:1;
}
@media(max-width:700px){
  .home-link-version{
    font-size:10px;
    padding-left:6px;
  }
}
@media(max-width:420px){
  .home-link-version{
    display:none;
  }
}
