/* nko.info v2.0 — Modern UI (light/dark + improved UX) */

:root{
  --bg:#ffffff;
  --bg2:#f7f8fb;
  --surface:rgba(255,255,255,.85);
  --card:#ffffff;
  --text:#0f172a;
  --muted:#475569;
  --muted2:#64748b;
  --line:rgba(15,23,42,.10);
  --shadow:0 18px 50px rgba(2,6,23,.10);
  --shadow2:0 10px 22px rgba(2,6,23,.08);
  --radius-xl:22px;
  --radius-lg:16px;
  --radius:14px;
  --ring:0 0 0 4px rgba(59,130,246,.14);
  --accent:#2563eb;
  --accent2:#22c55e;
  --danger:#ef4444;
  --warn:#f59e0b;
  --font:system-ui,-apple-system,Segoe UI,Roboto,Arial,"Noto Sans",sans-serif;
}
@media (prefers-color-scheme: dark){
  :root{
    --bg:#0b1220;
    --bg2:#0f172a;
    --surface:rgba(15,23,42,.65);
    --card:rgba(15,23,42,.78);
    --text:#e5e7eb;
    --muted:#a3b3cc;
    --muted2:#8fa2bf;
    --line:rgba(148,163,184,.18);
    --shadow:0 24px 70px rgba(0,0,0,.35);
    --shadow2:0 14px 26px rgba(0,0,0,.30);
    --ring:0 0 0 4px rgba(96,165,250,.18);
  }
}
html[data-theme="light"]{
  --bg:#ffffff;
  --bg2:#f7f8fb;
  --surface:rgba(255,255,255,.85);
  --card:#ffffff;
  --text:#0f172a;
  --muted:#475569;
  --muted2:#64748b;
  --line:rgba(15,23,42,.10);
  --shadow:0 18px 50px rgba(2,6,23,.10);
  --shadow2:0 10px 22px rgba(2,6,23,.08);
  --ring:0 0 0 4px rgba(59,130,246,.14);
}
html[data-theme="dark"]{
  --bg:#0b1220;
  --bg2:#0f172a;
  --surface:rgba(15,23,42,.65);
  --card:rgba(15,23,42,.78);
  --text:#e5e7eb;
  --muted:#a3b3cc;
  --muted2:#8fa2bf;
  --line:rgba(148,163,184,.18);
  --shadow:0 24px 70px rgba(0,0,0,.35);
  --shadow2:0 14px 26px rgba(0,0,0,.30);
  --ring:0 0 0 4px rgba(96,165,250,.18);
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:var(--font);
  color:var(--text);
  background:
    radial-gradient(1200px 700px at 10% 0%, rgba(37,99,235,.12), transparent 55%),
    radial-gradient(900px 600px at 90% 10%, rgba(34,197,94,.10), transparent 55%),
    var(--bg);
  line-height:1.55;
}
a{color:inherit}
img{max-width:100%}
.wrap{max-width:1160px;margin:0 auto;padding:22px 16px 72px}
.topbar{
  position:sticky;top:0;z-index:40;
  padding:10px 0 14px;
  backdrop-filter:blur(10px);
  background:linear-gradient(180deg, rgba(255,255,255,.78), rgba(255,255,255,.22), transparent);
}
html[data-theme="dark"] .topbar{
  background:linear-gradient(180deg, rgba(15,23,42,.75), rgba(15,23,42,.25), transparent);
}
.shell{
  border:1px solid var(--line);
  border-radius:var(--radius-xl);
  background:var(--surface);
  box-shadow:var(--shadow);
}
.header{
  padding:18px 18px 12px;
  display:flex;justify-content:space-between;gap:14px;flex-wrap:wrap;
}
.brand{display:flex;flex-direction:column;gap:6px}
.brand h1{margin:0;font-size:clamp(22px,2.8vw,34px);letter-spacing:-0.02em}
.brand p{margin:0;color:var(--muted);max-width:72ch}
.navrow{
  display:flex;gap:10px;flex-wrap:wrap;align-items:center;
  padding:0 18px 14px;
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
  background:linear-gradient(135deg, #f0f4ff 0%, #f7f8fb 100%);
}
html[data-theme="dark"] .navrow{background:rgba(2,6,23,.18)}
.pill{
  display:inline-flex;align-items:center;gap:8px;
  padding:10px 16px;border:2px solid transparent;border-radius:999px;
  background:linear-gradient(135deg, rgba(255,255,255,.9) 0%, rgba(255,255,255,.7) 100%);
  color:#1e40af;font-size:13px;font-weight:600;text-decoration:none;
  box-shadow:0 2px 8px rgba(37,99,235,.12);
  transition:all 0.2s ease;
}
.pill:hover{
  background:linear-gradient(135deg, rgba(37,99,235,.08) 0%, rgba(37,99,235,.04) 100%);
  border-color:#2563eb;
  box-shadow:0 4px 12px rgba(37,99,235,.2);
  color:#1e40af;
}
html[data-theme="dark"] .pill{background:rgba(255,255,255,.04);color:var(--text)}
html[data-theme="dark"] .pill:hover{background:rgba(37,99,235,.15);border-color:#3b82f6}
.pill strong{color:var(--text)}
.toolbar{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
select,input,textarea{
  width:100%;padding:11px 12px;border-radius:14px;border:1px solid var(--line);
  background:rgba(255,255,255,.7);color:var(--text);outline:none;
}
html[data-theme="dark"] select,
html[data-theme="dark"] input,
html[data-theme="dark"] textarea{background:rgba(2,6,23,.35)}
input:focus,select:focus,textarea:focus{box-shadow:var(--ring);border-color:rgba(37,99,235,.35)}
.btn{
  border:1px solid var(--line);
  background:rgba(255,255,255,.6);
  color:var(--text);
  padding:10px 12px;border-radius:14px;cursor:pointer;
  font-weight:750;display:inline-flex;align-items:center;gap:8px;
}
html[data-theme="dark"] .btn{background:rgba(255,255,255,.04)}
.btn.primary{border-color:rgba(37,99,235,.35);background:rgba(37,99,235,.10)}
.btn.ghost{background:transparent}
.btn:active{transform:translateY(1px)}
.grid{display:grid;gap:12px;padding:14px 18px 18px}
@media(min-width:920px){.grid{grid-template-columns:1.35fr .85fr}}
.row{display:flex;gap:10px;flex-wrap:wrap;align-items:flex-end}
.kpis{display:flex;gap:10px;flex-wrap:wrap}
.sectionHead{display:flex;justify-content:space-between;gap:10px;align-items:flex-end;padding:0 4px;margin:18px 6px 10px}
.sectionHead h2{margin:0;font-size:18px;letter-spacing:-0.01em}
.sectionHead .note{color:var(--muted2);font-size:12.5px}
.content{padding:14px 18px 18px}
details{
  border:1px solid var(--line);border-radius:var(--radius-lg);
  overflow:hidden;background:var(--card);box-shadow:var(--shadow2);
}
details+details{margin-top:12px}
summary{
  list-style:none;cursor:pointer;padding:12px 12px;
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  background:linear-gradient(180deg, rgba(2,6,23,.03), transparent);
}
html[data-theme="dark"] summary{background:linear-gradient(180deg, rgba(255,255,255,.04), transparent)}
summary::-webkit-details-marker{display:none}
.count{color:var(--muted2);font-size:12.5px}
.country{padding:12px;border-top:1px solid var(--line)}
.countryHead{display:flex;align-items:center;gap:10px;margin:0 0 10px;font-size:15px}
.flag{
  width:22px;height:16px;border-radius:4px;border:1px solid var(--line);
  box-shadow:0 6px 18px rgba(0,0,0,.10);flex-shrink:0;
}
.cards{display:grid;gap:12px;grid-template-columns:repeat(auto-fit,minmax(260px,1fr))}
.center{
  padding:12px;border-radius:var(--radius-lg);border:1px solid var(--line);
  background:var(--card);box-shadow:var(--shadow2);
  display:flex;flex-direction:column;gap:8px;min-height:138px;
}
.center b{font-size:14.8px}
.meta{display:flex;gap:8px;flex-wrap:wrap;color:var(--muted2);font-size:12.5px}
.tag{
  display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border-radius:999px;
  border:1px solid rgba(37,99,235,.22);background:rgba(37,99,235,.10);
  font-size:12px;font-weight:800;
}
.tag.school{border-color:rgba(34,197,94,.25);background:rgba(34,197,94,.10)}
.tag.university{border-color:rgba(168,85,247,.25);background:rgba(168,85,247,.10)}
.tag.group{border-color:rgba(245,158,11,.25);background:rgba(245,158,11,.10)}
.links{display:flex;gap:12px;flex-wrap:wrap;margin-top:auto}
.links a{
  text-decoration:none;border-bottom:1px dashed rgba(100,116,139,.55);padding-bottom:2px;
  font-weight:800;color:var(--text);
}
.links a:hover{border-bottom-style:solid}
.tabs{display:flex;gap:10px;flex-wrap:wrap;padding:0 18px 18px}
.tab{border-radius:999px}
.tab[aria-selected="true"]{background:rgba(37,99,235,.12);border-color:rgba(37,99,235,.25)}
.mapWrap{display:none;margin-top:10px;overflow:hidden;border-radius:var(--radius-xl);border:1px solid var(--line);background:var(--card);box-shadow:var(--shadow2)}
.mapHead{padding:12px 14px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap}
#map{height:440px}
.footer{
  margin-top:18px;color:var(--muted2);font-size:12.5px;padding:14px 6px;
  display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;
}
.mobileNav{display:none}
@media(max-width:720px){
  .topbar{padding-bottom:64px}
  .mobileNav{
    position:fixed;left:12px;right:12px;bottom:12px;
    display:flex;justify-content:space-between;gap:10px;
    padding:10px;border-radius:999px;border:1px solid var(--line);
    background:var(--surface);box-shadow:var(--shadow);z-index:60;
    backdrop-filter:blur(10px);
  }
  .mobileNav a{
    flex:1;text-align:center;text-decoration:none;color:var(--muted);
    font-weight:850;font-size:12.5px;padding:10px;border-radius:999px;border:1px solid transparent;
  }
  .mobileNav a.active{
    color:var(--text);border-color:rgba(37,99,235,.22);background:rgba(37,99,235,.12);
  }
}

/* Language segmented buttons */
.seg{
  display:inline-flex;
  gap:6px;
  padding:6px;
  border-radius:999px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.45);
}
html[data-theme="dark"] .seg{ background: rgba(255,255,255,.04); }

.segBtn{
  appearance:none;
  border:1px solid transparent;
  background: transparent;
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 12.5px;
  cursor:pointer;
  line-height:1;
}
.segBtn.active{
  color: var(--text);
  border-color: rgba(37,99,235,.22);
  background: rgba(37,99,235,.12);
}

.segFlag{
  width:22px;
  height:16px;
  border-radius:4px;
  border:1px solid var(--line);
  display:block;
}
.segBtn{ display:inline-flex; align-items:center; justify-content:center; }

.footer a{ color: inherit; }
