/* Jaarstatistieken – kleurrijk, speels */
.page--statistieken .site-main {
  margin-top: 0;
}

.ystat-shell {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: 18px 0 8px;
  box-sizing: border-box;
  background:
    radial-gradient(120% 80% at 10% 0%, rgba(170, 49, 174, 0.22), transparent 55%),
    radial-gradient(90% 70% at 95% 20%, rgba(56, 189, 248, 0.14), transparent 50%),
    linear-gradient(180deg, rgba(18, 14, 32, 0.35), transparent 120px);
}

.ystat-page {
  max-width: 1180px;
}

.ystat-hero {
  margin-bottom: 20px;
}

.ystat-hero--with-icon {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 20px;
  align-items: start;
}

.ystat-hero__inner {
  position: relative;
  min-width: 0;
}

.ystat-hero__compare-note {
  position: absolute;
  top: 0;
  right: 0;
  margin: 0;
  max-width: min(100%, 16rem);
  font-size: 0.82rem;
  font-weight: 600;
  color: #a8a3c4;
  text-align: right;
  line-height: 1.35;
}

.ystat-hero__decor {
  display: none;
  align-self: center;
  justify-self: end;
  padding: 8px 4px 0 0;
  opacity: 0.42;
  color: #c4b5fd;
  pointer-events: none;
  font-size: clamp(4.5rem, 12vw, 7.5rem);
  line-height: 1;
}

.ystat-hero__decor .bi {
  width: 1em;
  height: 1em;
}

@media (min-width: 900px) {
  .ystat-hero__decor {
    display: block;
    font-size: clamp(6.5rem, 11vw, 10rem);
    opacity: 0.48;
  }
}

body.page--statistieken .ystat-hero > .h-underline {
  font-size: clamp(2rem, 6.5vw, 3.6rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 0.12em;
  padding-bottom: 12px;
}

.ystat-hero__seo-line {
  margin: -4px 0 14px;
  color: #b8b2d8;
  font-size: 1rem;
  font-weight: 600;
}

.ystat-hero__lead,
.ystat-story {
  color: #d9d9e8;
  font-size: 1.05rem;
  line-height: 1.65;
  max-width: 78ch;
}

.ystat-hero__lead p,
.ystat-story {
  margin: 0;
}

.ystat-hero__lead a,
.ystat-story a {
  color: #f0b4ff;
}

.ystat-compare-hint {
  margin: 0 0 14px;
  font-size: 0.88rem;
  color: #a8a3c4;
}

.ystat-compare-pair {
  display: inline-flex;
  align-items: flex-end;
  flex-wrap: nowrap;
  gap: 0.5rem 0.55rem;
  white-space: nowrap;
}

.ystat-delta-wrap {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.ystat-num-val {
  font-weight: inherit;
  line-height: 1;
}

.ystat-hero-card__num .ystat-compare-pair {
  align-items: flex-end;
}

.ystat-hero-card__num .ystat-num-val {
  font-size: clamp(1.65rem, 4.5vw, 2.35rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #fff;
}

.ystat-land-pill__cnt .ystat-num-val,
.ystat-formaat-row__cnt .ystat-num-val,
.ystat-prov-row__cnt .ystat-num-val {
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
}

.ystat-compare-pair .ystat-delta {
  align-self: center;
  margin-left: 0.1em;
}

.ystat-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.ystat-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 22px;
}

.ystat-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  color: #f6f4ff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.05);
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.ystat-tab:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.35);
}

.ystat-tab.is-active {
  background: linear-gradient(135deg, rgba(170, 49, 174, 0.55), rgba(99, 102, 241, 0.45));
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 4px 20px rgba(170, 49, 174, 0.25);
}

.ystat-delta {
  display: inline-flex;
  align-items: center;
  font-size: 0.72em;
  font-weight: 800;
  margin-left: 0.35em;
  padding: 0.12em 0.45em;
  border-radius: 6px;
  vertical-align: middle;
}

.ystat-delta--up {
  color: #86efac;
  background: rgba(34, 197, 94, 0.18);
}

.ystat-delta--down {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.18);
}

.ystat-delta--flat {
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.15);
}

/* Hero cijfers */
.ystat-hero-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin: 22px 0 28px;
}

.ystat-hero-card {
  position: relative;
  padding: 18px 16px 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(145deg, rgba(40, 30, 70, 0.75), rgba(12, 10, 24, 0.9));
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
}

.ystat-hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.45;
  pointer-events: none;
}

.ystat-hero-card--total::before {
  background: radial-gradient(circle at 20% 0%, rgba(236, 72, 153, 0.35), transparent 55%);
}

.ystat-hero-card--nl::before {
  background: radial-gradient(circle at 20% 0%, rgba(249, 115, 22, 0.3), transparent 55%);
}

.ystat-hero-card--be::before {
  background: radial-gradient(circle at 20% 0%, rgba(234, 179, 8, 0.28), transparent 55%);
}

.ystat-hero-card--de::before {
  background: radial-gradient(circle at 20% 0%, rgba(56, 189, 248, 0.28), transparent 55%);
}

.ystat-hero-card__num {
  position: relative;
}

.ystat-hero-card__label {
  position: relative;
  margin-top: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #c4b5fd;
}

.ystat-hero-card__flag {
  width: 22px;
  height: auto;
  margin-bottom: 6px;
  border-radius: 2px;
}

/* Secties */
.ystat-section {
  margin-bottom: 28px;
  padding: 20px 18px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(22, 20, 36, 0.72);
  backdrop-filter: blur(6px);
}

.ystat-section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 16px;
}

.ystat-section__head h2 {
  margin: 0;
  font-size: 1.35rem;
}

.ystat-section__note {
  font-size: 0.85rem;
  color: #a8a3c4;
}

/* Landen-grid */
.ystat-land-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ystat-land-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  width: auto;
  max-width: 100%;
}

.ystat-land-pill img {
  flex: 0 0 auto;
  width: 20px;
  height: auto;
  border-radius: 2px;
}

.ystat-land-pill__name {
  font-size: 0.88rem;
  font-weight: 600;
  color: #e8e4ff;
  white-space: nowrap;
}

.ystat-land-pill__cnt {
  flex: 0 0 auto;
  white-space: nowrap;
}

/* Formaat-balken */
.ystat-formaat-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ystat-formaat-row {
  display: grid;
  grid-template-columns: minmax(9.5rem, 15rem) minmax(0, 1fr) minmax(8.5rem, 10rem);
  gap: 10px 14px;
  align-items: center;
}

.ystat-formaat-row__label {
  font-size: 0.88rem;
  font-weight: 600;
  color: #ddd6fe;
}

.ystat-formaat-row__bar-wrap {
  height: 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.ystat-formaat-row__bar {
  height: 100%;
  border-radius: 999px;
  min-width: 4px;
  transition: width 0.4s ease;
}

.ystat-formaat-row:nth-child(1) .ystat-formaat-row__bar { background: linear-gradient(90deg, #a78bfa, #c084fc); }
.ystat-formaat-row:nth-child(2) .ystat-formaat-row__bar { background: linear-gradient(90deg, #38bdf8, #818cf8); }
.ystat-formaat-row:nth-child(3) .ystat-formaat-row__bar { background: linear-gradient(90deg, #34d399, #2dd4bf); }
.ystat-formaat-row:nth-child(4) .ystat-formaat-row__bar { background: linear-gradient(90deg, #fbbf24, #fb923c); }
.ystat-formaat-row:nth-child(5) .ystat-formaat-row__bar { background: linear-gradient(90deg, #f472b6, #ef4444); }

.ystat-formaat-row__cnt {
  justify-self: end;
  text-align: right;
  white-space: nowrap;
}

/* Top-lijsten */
.ystat-top-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.ystat-top-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px 18px;
  padding: 4px 0 8px;
}

.ystat-top-row-divider {
  height: 1px;
  margin: 20px 0 22px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  border: 0;
}

.ystat-top-cell {
  min-width: 0;
}

.ystat-top-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ystat-top-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ystat-top-list li:last-child {
  border-bottom: none;
}

.ystat-top-rank {
  flex: 0 0 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.8rem;
  background: rgba(170, 49, 174, 0.35);
  color: #fff;
}

.ystat-top-list li:nth-child(1) .ystat-top-rank { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #1a1200; }
.ystat-top-list li:nth-child(2) .ystat-top-rank { background: linear-gradient(135deg, #e2e8f0, #94a3b8); color: #1e293b; }
.ystat-top-list li:nth-child(3) .ystat-top-rank { background: linear-gradient(135deg, #fdba74, #ea580c); color: #1a1200; }

.ystat-top-link {
  flex: 1;
  min-width: 0;
  text-decoration: none;
  color: #f3f0ff;
  font-weight: 600;
}

.ystat-top-link:hover {
  color: #f0b4ff;
}

.ystat-top-link small {
  display: block;
  font-weight: 500;
  color: #a8a3c4;
  font-size: 0.78rem;
}

.ystat-subtitle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  font-size: 1rem;
  font-weight: 700;
  color: #e8e4ff;
}

.ystat-subtitle__flag {
  flex: 0 0 auto;
  width: 22px;
  height: auto;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.ystat-top-score {
  flex: 0 0 72px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}

.ystat-top-score__bar {
  display: block;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, #6366f1, #c084fc);
  max-width: 72px;
}

.ystat-top-score__pct {
  font-size: 0.78rem;
  font-weight: 800;
  color: #c4b5fd;
  white-space: nowrap;
}

/* Provincies */
.ystat-prov-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.ystat-prov-tab {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: transparent;
  color: #e8e4ff;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
}

.ystat-prov-tab.is-active {
  background: rgba(170, 49, 174, 0.35);
  border-color: rgba(255, 255, 255, 0.25);
}

.ystat-prov-panel[hidden] {
  display: none !important;
}

.ystat-prov-bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ystat-prov-row {
  display: grid;
  grid-template-columns: minmax(7rem, 11rem) minmax(0, 1fr) minmax(8.5rem, 10rem);
  gap: 8px 14px;
  align-items: center;
  font-size: 0.82rem;
}

.ystat-prov-row__name {
  color: #ddd6fe;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ystat-prov-row__cnt {
  justify-self: end;
  text-align: right;
  white-space: nowrap;
}

.ystat-prov-row__bar-wrap {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.ystat-prov-row__bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #6366f1, #a855f7);
  min-width: 3px;
}

/* Extra kerncijfers */
.ystat-section--highlights {
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(99, 102, 241, 0.18), transparent 55%),
    radial-gradient(90% 80% at 100% 100%, rgba(236, 72, 153, 0.12), transparent 50%),
    rgba(22, 20, 36, 0.82);
}

.ystat-highlight-layout {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ystat-highlight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

@media (min-width: 900px) {
  .ystat-highlight-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(200px, 260px);
    gap: 14px 18px;
    align-items: start;
  }

  .ystat-highlight-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 100%;
  }

  .ystat-highlight-card {
    padding: 16px 14px 14px;
  }

  .ystat-busy-lands {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
    height: 100%;
  }

  .ystat-busy-lands__grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .ystat-busy-land-card {
    padding: 8px 10px;
  }
}

.ystat-highlight-card {
  position: relative;
  padding: 18px 18px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

.ystat-highlight-card--prikkel {
  background: linear-gradient(145deg, rgba(56, 189, 248, 0.22), rgba(12, 18, 40, 0.92));
}

.ystat-highlight-card--busy {
  background: linear-gradient(145deg, rgba(251, 146, 60, 0.25), rgba(28, 16, 36, 0.92));
}

.ystat-highlight-card__badge {
  display: inline-block;
  margin-bottom: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}

.ystat-highlight-card__num {
  margin: 0;
  font-size: clamp(2rem, 5vw, 2.65rem);
  font-weight: 900;
  line-height: 1;
  color: #fff;
}

.ystat-highlight-card__txt {
  margin: 8px 0 0;
  font-size: 0.9rem;
  color: #e8e4ff;
}

.ystat-highlight-card__date {
  margin: 6px 0 0;
  font-size: 0.88rem;
  color: #d4cff0;
  line-height: 1.4;
}

.ystat-prikkel-split {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.ystat-prikkel-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 88px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.18);
}

.ystat-prikkel-chip img {
  border-radius: 2px;
}

.ystat-prikkel-chip__val {
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1;
  color: #fff;
}

.ystat-prikkel-chip__lbl {
  font-size: 0.72rem;
  font-weight: 700;
  color: #d4cff0;
  text-align: center;
}

.ystat-highlight-card__date {
  font-weight: 700;
  font-size: 1rem;
}

.ystat-highlight-card__link {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.84rem;
  font-weight: 700;
  color: #f0b4ff;
  text-decoration: none;
}

.ystat-highlight-card__link:hover {
  text-decoration: underline;
}

.ystat-busy-lands {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.ystat-busy-lands__title {
  margin: 0 0 12px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #e8e4ff;
}

.ystat-busy-lands__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.ystat-busy-land-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
}

.ystat-busy-land-card__flag {
  flex: 0 0 auto;
  margin-top: 2px;
  border-radius: 2px;
}

.ystat-busy-land-card__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.ystat-busy-land-card__land {
  font-weight: 800;
  font-size: 0.88rem;
  color: #fff;
}

.ystat-busy-land-card__count {
  font-size: 0.82rem;
  font-weight: 700;
  color: #fb923c;
}

.ystat-busy-land-card__date {
  font-size: 0.8rem;
  color: #c4b5fd;
}

/* Disclaimer */
.ystat-disclaimer__body {
  font-size: 0.9rem;
  line-height: 1.55;
  color: #c8c4de;
}

.ystat-disclaimer__body p {
  margin: 0 0 0.85em;
}

.ystat-disclaimer__body a {
  color: #f0b4ff;
}

/* Spotlight-band (home_promoted_band) op statistiekenpagina */
.page--statistieken .home-promoted-band {
  margin: 8px 0 24px;
}

/* Lijst + kaart onderaan */
.page--statistieken .ystat-overview-block {
  margin-top: 36px;
  scroll-margin-top: 72px;
}

@media (max-width: 960px) {
  .ystat-top-row {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .ystat-top-row-divider {
    margin: 8px 0 18px;
  }
}

@media (max-width: 720px) {
  .ystat-hero__compare-note {
    position: static;
    max-width: none;
    margin: 0 0 12px;
    text-align: left;
  }

  .ystat-highlight-layout {
    display: flex;
    flex-direction: column;
  }

  .ystat-formaat-row,
  .ystat-prov-row {
    grid-template-columns: 1fr 5.5rem;
  }

  .ystat-formaat-row__bar-wrap,
  .ystat-prov-row__bar-wrap {
    grid-column: 1 / -1;
  }

  .ystat-formaat-row__label,
  .ystat-prov-row__name {
    grid-column: 1 / -1;
  }

  .ystat-compare-pair {
    gap: 0.35rem 0.5rem;
  }
}
