:root{
  --bg:#f8fafc;
  --card:#ffffff;
  --text:#0f172a;
  --muted:#475569;
  --brand:#0ea5e9;
  --border:#e2e8f0;
  --shadow:0 8px 24px rgba(2,6,23,.06)
}
*{box-sizing:border-box}
html,body{margin:0;padding:0;background:var(--bg);color:var(--text);font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;line-height:1.5}
a{color:var(--brand);text-decoration:none}
.container{max-width:900px;margin:0 auto;padding:20px}

/* Header / Nav (sticky + z-index so it sits above content) */
.site-header{
  background:#0b1220;
  color:#fff;
  position:sticky;
  top:0;
  z-index:2000;
}
.nav{ position:relative; z-index:2001; }
.nav-inner{display:flex;justify-content:space-between;align-items:center;position:relative;min-height:60px}
.brand a{color:#fff;font-weight:700;font-size:18px}
.menu{list-style:none;display:flex;gap:16px;margin:0;padding:0; z-index:2002;}
.menu a{color:#fff;opacity:.9}
.menu a:hover{opacity:1}

/* Cards / UI */
.card{background:var(--card);border:1px solid var(--border);border-radius:14px;box-shadow:var(--shadow);padding:20px;margin:18px auto}
.hero-title{font-size:28px;margin:12px 0 6px}
.hero-sub{color:var(--muted);margin:0 0 16px}
.tool-grid{display:grid;grid-template-columns:1fr;gap:14px}
@media (min-width:640px){.tool-grid{grid-template-columns:1fr 1fr}}
.label{font-weight:600;margin-bottom:6px;display:block}
.input,.select{width:100%;padding:10px 12px;border:1px solid var(--border);border-radius:10px;background:#fff}
.row{display:flex;gap:10px;margin-bottom:10px}
.row .grow{flex:1}
.btn{background:var(--brand);border:0;color:#fff;padding:10px 14px;border-radius:10px;font-weight:600;cursor:pointer}
.btn.secondary{background:#0b1220}
.btn.ghost{background:#fff;color:var(--brand);border:1px solid var(--brand)}
.actions{display:flex;gap:10px;flex-wrap:wrap}

/* Results tiles */
.results{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:10px}
.result{background:#f1f5f9;border:1px solid var(--border);border-radius:12px;padding:12px;text-align:center}
.result .k{font-size:12px;color:var(--muted)}
.result .v{font-size:20px;font-weight:700;margin-top:4px}

/* Table */
.table-wrap{overflow:auto}
.table{width:100%;border-collapse:separate;border-spacing:0;border:1px solid var(--border);border-radius:12px;overflow:hidden}
.table th,.table td{padding:10px 12px;border-bottom:1px solid var(--border);text-align:left}
.table th{background:#f8fafc;font-size:14px}
.table tr:last-child td{border-bottom:0}

/* Badges / Misc */
.badge{display:inline-block;background:#eef6ff;color:#034c81;padding:2px 8px;border-radius:999px;font-size:12px;font-weight:600;border:1px solid #cce7ff}
.section-title{font-size:20px;margin:22px 0 8px}
.muted{color:var(--muted)}
.breadcrumbs{font-size:13px;color:var(--muted);margin-bottom:8px}
.center{display:flex;justify-content:center}
.small{font-size:12px}
.copy-wrap{display:flex;gap:8px;align-items:center;margin-top:8px}
.copy-field{flex:1}

/* Layout: sticky footer structure */
html, body { height:100%; }
body { display:flex; flex-direction:column; }
.site-header { flex:0 0 auto; }
main.container { flex:1 0 auto; }
.site-footer {
  flex:0 0 auto;
  background:#0b1220; color:#cbd5e1;
  border-top:1px solid rgba(148,163,184,.2);
}
.footer-inner { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:16px 20px; }
.footer-menu a { color:#cbd5e1; margin-left:14px; }
.footer-menu a:hover { color:#fff; }
.footer-brand { color:#fff; font-weight:700; }

/* Space first card from sticky header */
main.container > .card:first-child{ margin-top:22px; }

/* Hamburger (desktop hidden) */
.hamburger{
  display:none;
  font-size:24px;
  background:none;
  border:none;
  color:#fff;
  cursor:pointer;
  line-height:1;
}

/* Mobile menu */
@media (max-width:768px){
  .hamburger{ display:block; }
  .menu{
    display:none;
    flex-direction:column;
    background:#0b1220;
    position:absolute;
    top:60px; right:0; left:0;
    padding:10px 0;
    border-top:1px solid rgba(148,163,184,.2);
    z-index:2002;
    box-shadow:0 8px 24px rgba(2,6,23,.2);
  }
  .menu li{ margin:10px 0; text-align:center; }
  .menu.open{ display:flex; }
}

/* Home search UI */
.search-wrap{ display:flex; gap:8px; align-items:center; max-width:640px; margin:8px auto 0; width:100%; }
.search-input{ flex:1; }
.search-results{
  display:none;
  background:#fff;
  border:1px solid var(--border);
  border-radius:12px;
  box-shadow:var(--shadow);
  margin-top:8px;
  max-width:640px;
  width:100%;
  max-height:320px;
  overflow:auto;
}
.search-item{ padding:10px 12px; cursor:pointer; }
.search-item:hover{ background:#f1f5f9; }

/* Country directory */
.country-block{ padding:10px 0; border-top:1px solid var(--border); }
.country-block:first-child{ border-top:0; }
.country-header{ display:flex; align-items:center; gap:12px; margin:6px 0 10px; }
.region-grid{ display:grid; grid-template-columns:1fr; gap:12px; }
@media (min-width: 700px){
  .region-grid{ grid-template-columns:1fr 1fr; }
}
.region-card{
  border:1px solid var(--border);
  border-radius:12px;
  padding:12px;
  background:#fff;
}
.region-title{ font-weight:700; margin-bottom:6px; }
.region-list{ list-style:none; margin:0; padding:0; }
.region-list li{ padding:6px 0; border-top:1px dashed var(--border); }
.region-list li:first-child{ border-top:0; }

/* Lazy reveal for directory */
.hidden-row { display: none; }
.hidden-chunk { display: none; }
.btn-show-more.small { padding:6px 10px; font-size:12px; border-radius:8px; }
