:root {
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-soft: #fbfcff;
  --border: #dde5ef;
  --border-strong: #c4cedb;
  --text: #172033;
  --muted: #667085;
  --blue: #2563eb;
  --blue-soft: #e9f1ff;
  --teal: #0f9f8f;
  --teal-soft: #e8f8f5;
  --green: #16a05d;
  --green-soft: #ecfdf3;
  --gold: #d99a00;
  --gold-soft: #fff6d7;
  --rose: #e65270;
  --rose-soft: #fff0f3;
  --violet: #7c3aed;
  --violet-soft: #f3edff;
  --shadow: 0 18px 45px rgba(23, 32, 51, .09);
}

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

html {
  min-width: 320px;
}

body {
  margin: 0;
  font-family: Inter, Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at 8% 0%, rgba(37, 99, 235, .16), transparent 25rem),
    radial-gradient(circle at 92% 12%, rgba(15, 159, 143, .16), transparent 22rem),
    linear-gradient(180deg, #fbfcff 0%, var(--bg) 34rem);
  color: var(--text);
}

.header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, .86);
  border-bottom: 1px solid rgba(221, 229, 239, .86);
  backdrop-filter: blur(16px);
}

.brand {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand-main {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.logo {
  width: 273px;
  height: auto;
  max-height: 61px;
  object-fit: contain;
  flex: 0 0 auto;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.header h1 {
  margin: 0;
  font-size: clamp(22px, 2.5vw, 28px);
  line-height: 1;
}

.lastUpdated {
  flex: 0 0 auto;
  border: 1px solid rgba(37, 99, 235, .18);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue-soft), #fff);
  padding: 9px 13px;
  color: #385074;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 24px 56px;
}

.card {
  position: relative;
  background: rgba(255, 255, 255, .95);
  border: 1px solid rgba(221, 229, 239, .9);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 24px;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--blue), var(--teal), var(--green), var(--gold));
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.section-heading h2,
.card h3,
.box h4 {
  margin: 0;
  line-height: 1.2;
}

.section-heading h2 {
  font-size: 24px;
}

.card h3 {
  margin: 24px 0 12px;
  color: #344054;
  font-size: 15px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.map-wrapper {
  position: relative;
  border: 1px solid #cfe0f3;
  border-radius: 8px;
  background: linear-gradient(135deg, #dff5ff, #eef8ee);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.72);
  overflow: visible;
}

.map-image {
  width: 100%;
  display: block;
  border-radius: 8px;
}

#mapSteps {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: auto;
}

.map-step {
  position: absolute;
  width: clamp(21px, 2.35vw, 29px);
  height: clamp(21px, 2.35vw, 29px);
  border: 2px solid rgba(255,255,255,.84);
  border-radius: 999px;
  background: linear-gradient(180deg, #3b82f6, #174cc7);
  color: white;
  font-size: clamp(10px, 1.1vw, 12px);
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 7px 16px rgba(37, 99, 235, .36);
  transform: translate(-50%, -50%);
  pointer-events: auto;
  transition: transform .16s ease, box-shadow .16s ease, opacity .16s ease;
}

.map-step.empty {
  background: linear-gradient(180deg, #d5dee9, #9aa8ba);
  box-shadow: 0 5px 13px rgba(102, 112, 133, .24);
  opacity: .82;
}

.map-step.occupied {
  background: linear-gradient(180deg, var(--green), #0d7b48);
  box-shadow: 0 8px 18px rgba(22, 160, 93, .36);
}

.map-step.special-step {
  width: clamp(28px, 3vw, 38px);
  height: clamp(28px, 3vw, 38px);
  font-size: clamp(15px, 1.6vw, 18px);
}

.map-step.butterfly {
  background: linear-gradient(180deg, #8b5cf6, #5b21b6);
  box-shadow: 0 8px 18px rgba(124, 58, 237, .36);
}

.map-step.star {
  background: linear-gradient(180deg, #f8c847, var(--gold));
  color: #3d2b00;
  box-shadow: 0 8px 18px rgba(217, 154, 0, .36);
}

.map-step:hover {
  z-index: 3;
  transform: translate(-50%, -50%) scale(1.12);
}

/* FIX for Screenshot 2026-05-01 at 0.00.32.jpg: Tooltip overflow */
.map-tooltip {
  position: absolute;
  /* Anchors to the left edge of the point to stay inside the map */
  left: 0; 
  bottom: calc(100% + 10px);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 12px;
  border-radius: 12px;
  width: max-content;
  min-width: 160px;
  max-width: 260px;
  max-height: 200px; /* Limits height for long lists */
  overflow-y: auto;  /* Adds scrollbar if list is too long */
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s;
}

.map-tooltip strong,
.map-tooltip span {
  display: block;
}

.map-tooltip strong {
  margin-bottom: 5px;
  font-size: 12px;
}

.map-tooltip span {
  color: #344054;
  font-size: 12px;
  font-weight: 700;
}

.map-step:hover .map-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.rules-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.rules-stats div,
.box {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 16px;
  line-height: 1.5;
}

.rules-stats div:nth-child(1) {
  background: linear-gradient(135deg, var(--blue-soft), #fff);
  border-color: #cfe0ff;
}

.rules-stats div:nth-child(2) {
  background: linear-gradient(135deg, var(--green-soft), #fff);
  border-color: #c7efd8;
}

.rules-stats div:nth-child(3) {
  background: linear-gradient(135deg, var(--gold-soft), #fff);
  border-color: #f3dda1;
}

.rules-stats div:nth-child(4) {
  background: linear-gradient(135deg, var(--rose-soft), #fff);
  border-color: #f7c8d2;
}

.rules-stats span,
.metric-box span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.rules-stats strong,
.metric-box strong {
  color: var(--text);
  font-size: 16px;
}

.rules-intro {
  border: 1px solid #cfe0ff;
  border-left: 5px solid var(--blue);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(233, 241, 255, .9), rgba(255,255,255,.9));
  padding: 12px 16px;
  color: #344054;
}

.rules-intro p {
  margin: 8px 0;
  line-height: 1.55;
}

.rules-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.criteria-grid {
  align-items: stretch;
}

.criteria-card {
  min-height: 138px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.58);
}

.criteria-card-new-voice {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.box:nth-child(3n+1) {
  border-color: #cfe0ff;
  background: linear-gradient(135deg, var(--blue-soft), #fff);
}

.box:nth-child(3n+2) {
  border-color: #c9eee9;
  background: linear-gradient(135deg, var(--teal-soft), #fff);
}

.box:nth-child(3n) {
  border-color: #ead8ff;
  background: linear-gradient(135deg, var(--violet-soft), #fff);
}

.box h4 {
  margin-bottom: 10px;
  font-size: 15px;
}

.box ol {
  margin: 0;
  padding-left: 20px;
}

.box li + li {
  margin-top: 4px;
}

.prize-grid {
  align-items: stretch;
}

.prize-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 100%;
  padding: 18px;
}

.prize-card::after {
  content: "";
  position: absolute;
  top: 16px;
  right: 16px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 35%, rgba(255,255,255,.95), rgba(255,255,255,0) 44%),
    linear-gradient(135deg, rgba(217, 154, 0, .28), rgba(37, 99, 235, .16));
}

.prize-card h4 {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border-radius: 999px;
  background: rgba(255,255,255,.76);
  padding: 7px 11px;
  color: #1f2a44;
  box-shadow: 0 6px 18px rgba(23, 32, 51, .07);
}

.prize-card-main {
  border-color: #f1d58a;
  background:
    linear-gradient(135deg, rgba(255, 246, 215, .96), rgba(255,255,255,.84) 52%),
    linear-gradient(180deg, #fff, #fff);
}

.prize-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.prize-list li {
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255,255,255,.76);
  border-radius: 8px;
  background: rgba(255,255,255,.72);
  padding: 9px 10px;
  box-shadow: 0 8px 20px rgba(23, 32, 51, .06);
}

.prize-list li + li {
  margin-top: 0;
}

.prize-list span {
  display: inline-flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--blue);
  color: white;
  font-size: 13px;
  font-weight: 900;
}

.prize-list li:nth-child(1) span {
  background: linear-gradient(180deg, #f8c847, var(--gold));
  color: #3d2b00;
}

.prize-list li:nth-child(2) span {
  background: linear-gradient(180deg, #9fb2ca, #667085);
}

.prize-list li:nth-child(3) span {
  background: linear-gradient(180deg, #d89054, #a75a24);
}

.prize-list strong {
  font-size: 15px;
}

.metric-box {
  display: flex;
  min-height: 116px;
  flex-direction: column;
  justify-content: center;
}

.box table {
  margin: -4px 0;
}

.winner-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.winner-card {
  border: 1px solid #cfe0ff;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(233, 241, 255, .95), rgba(255,255,255,.9));
  padding: 16px;
}

.winner-card:nth-child(2) {
  border-color: #c9eee9;
  background: linear-gradient(135deg, rgba(232, 248, 245, .95), rgba(255,255,255,.9));
}

.winner-card:nth-child(3) {
  border-color: #ead8ff;
  background: linear-gradient(135deg, rgba(243, 237, 255, .95), rgba(255,255,255,.9));
}

.winner-card h4 {
  margin: 0 0 12px;
}

.winner-empty {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.winner-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.winner-list li {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  gap: 8px 10px;
  align-items: center;
  border-radius: 8px;
  background: rgba(255,255,255,.76);
  padding: 9px 10px;
}

.winner-list span {
  display: inline-flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--blue);
  color: white;
  font-size: 13px;
  font-weight: 900;
}

.winner-list li:first-child span {
  background: linear-gradient(180deg, #f8c847, var(--gold));
  color: #3d2b00;
}

.winner-list em {
  color: var(--green);
  font-style: normal;
  font-weight: 900;
}

.winner-list small {
  grid-column: 2 / 4;
  color: var(--muted);
  font-weight: 800;
}

.ranking-heading {
  align-items: center;
}

.ranking-heading > div {
  min-width: 0;
}

#searchInput {
  width: min(320px, 100%);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: white;
  padding: 12px 13px;
  color: var(--text);
  font: inherit;
  outline: none;
  box-shadow: 0 4px 14px rgba(23, 32, 51, .05);
}

#searchInput:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px var(--blue-soft);
}

.ranking-table-wrapper {
  max-height: 420px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: white;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: linear-gradient(180deg, #f8fbff, #f1f6ff);
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

td {
  background: white;
}

tbody tr.rank-1 td {
  background: var(--gold-soft);
  font-weight: 800;
}

tbody tr.rank-2 td {
  background: var(--blue-soft);
  font-weight: 800;
}

tbody tr.rank-3 td {
  background: var(--teal-soft);
  font-weight: 800;
}

tbody tr.not-qualified td {
  background: #f9fafb;
  color: var(--muted);
}

tbody tr.threshold-row td {
  background: linear-gradient(90deg, var(--rose-soft), #fff);
  color: #8a2538;
  text-align: left;
}

.threshold-row span {
  display: inline-flex;
  margin-right: 10px;
  border-radius: 999px;
  background: white;
  padding: 5px 9px;
  color: var(--rose);
  font-weight: 900;
}

tbody tr:hover td {
  background: #edf8ff;
}

th:nth-child(1),
th:nth-child(3),
td:nth-child(1),
td:nth-child(3) {
  text-align: center;
}

.place-icon {
  display: inline-flex;
  width: 28px;
  height: 28px;
  margin-right: 8px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #e8edf5;
  color: #3b475c;
  font-size: 12px;
  font-weight: 900;
}

.place-1 {
  background: linear-gradient(180deg, #f8c847, var(--gold));
  color: #3d2b00;
}

.place-2 {
  background: linear-gradient(180deg, #d7e0eb, #8391a5);
  color: white;
}

.place-3 {
  background: linear-gradient(180deg, #d89054, #a75a24);
  color: white;
}

.place-4,
.place-5,
.place-6,
.place-7,
.place-8,
.place-9,
.place-10 {
  background: var(--blue);
  color: white;
}

td:nth-child(3) strong {
  display: block;
  color: var(--green);
  font-weight: 900;
}

td:nth-child(3) span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

tr:last-child td {
  border-bottom: 0;
}

@media (max-width: 820px) {
  .brand {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .lastUpdated {
    white-space: normal;
  }

  .section-heading,
  .ranking-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .rules-stats,
  .rules-grid-3,
  .winner-summary {
    grid-template-columns: 1fr 1fr;
  }

  #searchInput {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .brand,
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .brand-main {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .card {
    padding: 18px;
  }

  .rules-stats,
  .rules-grid-3,
  .winner-summary {
    grid-template-columns: 1fr;
  }

  th, td {
    padding: 10px;
  }
}
/* FIX HEADER LAYOUT */
.brand {
  align-items: center; /* vertical center */
}

/* use your existing class correctly */
.brand-main {
  display: flex;
  align-items: center;
  gap: 18px;
}

/* INLINE title + month */
.title-inline {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

/* TITLE */
.header h1 {
  margin: 0;
  font-size: clamp(22px, 2.5vw, 28px);
  line-height: 1;
}

/* MONTH (inline, not above) */
.header .eyebrow {
  margin: 0;
  font-size: 12px; /* unchanged */
}

/* Independent Map Search Styles */
.map-step.dimmed {
  opacity: 0.4; /* Increased visibility so they don't disappear */
  filter: grayscale(100%);
  z-index: 1;
  pointer-events: none;
}

.map-step.highlighted {
  opacity: 1 !important;
  filter: none !important;
  transform: translate(-50%, -50%) scale(1.3);
  z-index: 50; /* Bring found number to front */
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.9), 0 0 15px var(--accent-blue);
}

/* Optional pulse effect for the found name */
@keyframes pulse-map {
  0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7); }
  70% { box-shadow: 0 0 0 15px rgba(37, 99, 235, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}

.map-step.highlighted {
  animation: pulse-map 1.5s infinite;
}
/* --- 1. CLEAN NAVIGATION LAYOUT --- */
.sticky-nav-container {
  position: sticky;
  top: 77px; /* Sits right under the header */
  z-index: 9;
  width: 100%;
  display: flex;
  justify-content: center; /* Centers the pills */
  padding: 12px 0;
  background: rgba(247, 248, 251, 0.8); /* Matches your body --bg */
  backdrop-filter: blur(10px);
  margin-bottom: 10px;
}

.pill-nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* --- 2. THE BAR (Light Gray) --- */
.pill-group {
  display: flex;
  background-color: #e2e8f0 !important; /* LIGHT gray background for the bar */
  padding: 4px;
  border-radius: 50px;
  border: 1px solid var(--border);
}

/* --- 3. THE BUTTONS --- */
.nav-pill {
  text-decoration: none;
  padding: 8px 22px;
  border-radius: 40px;
  color: #64748b; /* Gray text for inactive pages */
  font-weight: 700;
  font-size: 14px;
  transition: all 0.2s ease;
  background-color: transparent; 
}

/* --- 4. THE HIGHLIGHT (Dark Slate) --- */
/* This ONLY applies to the page you are currently on */
.nav-pill.active {
  background-color: #172033 !important; /* DARK background for active only */
  color: #ffffff !important;           /* WHITE text for active only */
  box-shadow: 0 4px 12px rgba(23, 32, 51, 0.2);
}

/* --- 5. HOME ICON --- */
.home-btn {
  text-decoration: none;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;  /* Fixed size to keep it a perfect circle */
  height: 44px;
  border-radius: 50%;
  transition: all 0.2s ease;
}

/* THE DARK HIGHLIGHT: Applies when you are on the Home page */
.home-btn.active {
  background-color: #172033 !important; /* Dark Slate to match the pills */
  color: #ffffff !important;           /* Makes the icon white */
  box-shadow: 0 4px 12px rgba(23, 32, 51, 0.2);
}

.home-btn.active .material-symbols-outlined {
  color: #ffffff !important;           /* Ensures the icon itself is white */
  font-variation-settings: 'FILL' 1, 'wght' 700;
}

.home-btn .material-symbols-outlined {
  font-size: 28px;
  font-variation-settings: 'FILL' 0, 'wght' 400;
}
