/* ============================================================
   Wanderland Cities Plugin Styles
   Scoped entirely to .wan_ct wrapper – no global leakage
   ============================================================ */

.wan_ct {
  --wan-bg:      #0b1020;
  --wan-panel:   #121933;
  --wan-panel-2: #0f1530;
  --wan-text:    #e8ecff;
  --wan-muted:   #a8b2d1;
  --wan-line:    #243056;
  --wan-accent:  #8b5cf6;
  --wan-accent2: #22c55e;
  --wan-gold:    #fbbf24;
  --wan-shadow:  0 12px 30px rgba(0,0,0,.25);
  --wan-radius:  20px;
  --wan-max:     1200px;

  box-sizing: border-box;
  margin: 0;
  padding: 0;
  background: linear-gradient(180deg, #09101f, #10172f 35%, #0b1020);
  color: var(--wan-text) !important;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

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

.wan_ct a { color: inherit !important; text-decoration: none; }
.wan_ct img { max-width: 100%;     max-height: 550px; }

/* ---------- Layout ---------- */
.wan_ct .wan_ct-container {
  max-width: var(--wan-max);
  margin: 0 auto;
  padding: 0px;
}

/* ---------- Topbar / Nav ---------- */
.wan_ct .wan_ct-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
  background: rgba(9,16,31,.7);
  border-bottom: 1px solid rgba(255,255,255,.06);
  margin-top: 0;
}
.wan_ct .wan_ct-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}
.wan_ct .wan_ct-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: .2px;
}
.wan_ct .wan_ct-brand-badge {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--wan-accent), #4f46e5);
  display: grid;
  place-items: center;
  box-shadow: var(--wan-shadow);
}
.wan_ct .wan_ct-nav-links {
  display: flex;
  gap: 18px;
  color: var(--wan-muted);
  font-size: 14px;
}

/* ---------- Typography (scoped) ---------- */
.wan_ct .wan_ct-h1 {
  font-size: clamp(34px, 6vw, 56px);
  line-height: 1;
  margin: 0 0 20px;
  color: var(--wan-text);
}
.wan_ct .wan_ct-h2 {
  font-size: 28px;
  margin: 0 0 14px;
  color: var(--wan-text);
}
.wan_ct .wan_ct-h3 {
  font-size: 18px;
  margin: 0 0 10px;
  color: var(--wan-text);
}
.wan_ct .wan_ct-p {
  color: var(--wan-muted);
  line-height: 1.65;
  margin: 0;
}

/* ---------- Hero ---------- */
.wan_ct .wan_ct-hero { padding: 56px 0 24px; }
.wan_ct .wan_ct-hero-grid {
  display: grid;
  grid-template-columns: 2.2fr 1fr;
  gap: 22px;
}
.wan_ct .wan_ct-hero-card,
.wan_ct .wan_ct-panel {
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.01));
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: var(--wan-shadow);
  border-radius: var(--wan-radius);
}
.wan_ct .wan_ct-hero-card { padding: 32px; }

.wan_ct .wan_ct-eyebrow {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(139,92,246,.12);
  color: #d7cbff;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
}
.wan_ct .wan_ct-hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

/* ---------- Buttons ---------- */
.wan_ct .wan_ct-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 18px;
  border-radius: 14px;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
}
.wan_ct .wan_ct-btn-primary {
  background: linear-gradient(135deg, var(--wan-accent), #4f46e5);
  color: white;
}
.wan_ct .wan_ct-btn-secondary {
  border-color: rgba(255,255,255,.12);
  color: var(--wan-text);
  background: rgba(255,255,255,.02);
}

/* ---------- KPI Stack ---------- */
.wan_ct .wan_ct-kpi-stack { padding: 24px; display: grid; gap: 14px; }
.wan_ct .wan_ct-kpi {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-radius: 16px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.05);
}
.wan_ct .wan_ct-kpi strong { font-size: 28px; }

/* ---------- Sections & Cards ---------- */
.wan_ct .wan_ct-section { padding: 18px 0 34px; }
.wan_ct .wan_ct-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.wan_ct .wan_ct-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.wan_ct .wan_ct-card {
  padding: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.01));
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: var(--wan-shadow);
  border-radius: var(--wan-radius);
}
.wan_ct .wan_ct-card .wan_ct-value {
  font-size: 34px;
  font-weight: 800;
  margin: 8px 0;
}

/* ---------- Filters & Inputs ---------- */
.wan_ct .wan_ct-filters {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
.wan_ct .wan_ct-input,
.wan_ct .wan_ct-select {
  width: 100%;
  background: var(--wan-panel-2);
  border: 1px solid var(--wan-line);
  color: var(--wan-text);
  padding: 14px;
  border-radius: 14px;
  outline: none;
  font-family: inherit;
}

/* ---------- Table ---------- */
.wan_ct .wan_ct-table-wrap {
  overflow: auto;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: var(--wan-shadow);
}
.wan_ct .wan_ct-table-wrap table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255,255,255,.02);
}
.wan_ct .wan_ct-table-wrap th,
.wan_ct .wan_ct-table-wrap td {
  padding: 14px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,.06);
  font-size: 14px;
}
.wan_ct .wan_ct-table-wrap th {
  position: sticky;
  top: 0;
  background: #121933;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #c3cff5;
}
.wan_ct .wan_ct-table-wrap tr:hover td { background: rgba(255,255,255,.025); }
.wan_ct .wan_ct-rank { font-weight: 800; }

/* ---------- Pills ---------- */
.wan_ct .wan_ct-score-pill,
.wan_ct .wan_ct-tier-pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
}
.wan_ct .wan_ct-score-pill { background: rgba(34,197,94,.14); color: #b6f0c8; }
.wan_ct .wan_ct-tier-pill  { background: rgba(251,191,36,.14); color: #fde3a2; }
.wan_ct .wan_ct-subtle     { color: var(--wan-muted); font-size: 13px; }

/* ---------- Metric Bars ---------- */
.wan_ct .wan_ct-metric-bars { display: grid; gap: 12px; }
.wan_ct .wan_ct-metric-row {
  display: grid;
  grid-template-columns: 170px 1fr 60px;
  gap: 12px;
  align-items: center;
}
.wan_ct .wan_ct-bar {
  height: 10px;
  border-radius: 999px;
  background: #1b2547;
  overflow: hidden;
}
.wan_ct .wan_ct-bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--wan-accent), #22c55e);
}

/* ---------- City Hero ---------- */
.wan_ct .wan_ct-city-hero { padding: 38px 0 26px; }
.wan_ct .wan_ct-city-grid {
  display: grid;
  grid-template-columns: 1fr 390px;
  gap: 22px;
}
.wan_ct .wan_ct-breadcrumbs { font-size: 13px; color: var(--wan-muted); margin-bottom: 12px; }
.wan_ct .wan_ct-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.wan_ct .wan_ct-stat {
  padding: 18px;
  border-radius: 16px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
}
.wan_ct .wan_ct-stat .wan_ct-big { font-size: 28px; font-weight: 800; }
.wan_ct .wan_ct-list { display: grid; gap: 12px; }
.wan_ct .wan_ct-list-item {
  padding: 16px;
  border-radius: 16px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
}

/* ---------- Footer ---------- */
.wan_ct .wan_ct-footer {
  padding: 26px 0 50px;
  color: var(--wan-muted);
  font-size: 13px;
}

/* ---------- Notice ---------- */
.wan_ct .wan_ct-notice {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
  color: #c9d3f7;
}

/* ---------- Entry content override (scoped) ---------- */
.wan_ct .entry-content p:first-child { margin-top: 0; }
.wan_ct .entry-content h3 { margin-top: 22px; color:#e8ecff;}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .wan_ct .wan_ct-hero-grid,
  .wan_ct .wan_ct-city-grid { grid-template-columns: 1fr; }
  .wan_ct .wan_ct-grid-3    { grid-template-columns: 1fr; }
  .wan_ct .wan_ct-filters   { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .wan_ct .wan_ct-nav       { min-height: 64px; }
  .wan_ct .wan_ct-nav-links { display: none; }
  .wan_ct .wan_ct-filters   { grid-template-columns: 1fr; }
  .wan_ct .wan_ct-table-wrap th:nth-child(5),
  .wan_ct .wan_ct-table-wrap td:nth-child(5),
  .wan_ct .wan_ct-table-wrap th:nth-child(6),
  .wan_ct .wan_ct-table-wrap td:nth-child(6),
  .wan_ct .wan_ct-table-wrap th:nth-child(7),
  .wan_ct .wan_ct-table-wrap td:nth-child(7) { display: none; }
  .wan_ct .wan_ct-metric-row { grid-template-columns: 1fr; }
}
