:root {
  --bg: #f6f4f1;
  --bg-alt: #ffffff;
  --accent: #23455c;
  --accent-2: #6d90ff;
  --accent-3: #f2f4ff;
  --text: #1a1a1a;
  --muted: #6f6f6f;
  --card: #ffffff;
  --card-strong: #eef1ff;
  --stroke: rgba(31, 77, 92, 0.1);
  --shadow: 0 18px 32px rgba(26, 59, 88, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Manrope", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: #f8f9fb;
  min-height: 100vh;
  overflow-x: hidden;
}

.page {
  padding: clamp(24px, 5vh, 48px) clamp(16px, 6vw, 88px) clamp(48px, 10vh, 96px);
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(20px, 4vw, 48px);
  max-width: 100vw;
  overflow-x: hidden;
}

.hero {
  grid-column: 1 / -1;
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(16px, 3vw, 28px);
  text-align: center;
}

.hero-logo {
  width: clamp(140px, 18vw, 220px);
  flex: 0 0 auto;
}

.hero-logo img {
  width: 100%;
  height: auto;
}

.hero-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  max-width: 720px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 11px;
  color: var(--accent);
  margin: 0 0 12px;
}

h1 {
  font-family: "Playfair Display", serif;
  font-size: clamp(38px, 5.5vw, 72px);
  margin: 0 0 12px;
  color: var(--accent);
}

.subhead {
  margin: 0;
  max-width: 520px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.hero-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(140px, 1fr));
  gap: 16px;
  padding: 20px 26px;
  border-radius: 20px;
  background: var(--card);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  min-width: 280px;
}

.hero-label {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 6px;
}

.hero-value {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

.board {
  display: grid;
  gap: clamp(16px, 2.5vw, 24px);
  padding: clamp(18px, 3vw, 28px) clamp(18px, 3vw, 28px) clamp(24px, 4vw, 36px);
  border-radius: clamp(20px, 3vw, 28px);
  background: var(--bg-alt);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  grid-column: 1 / -1;
  width: 100%;
  max-width: 100%;
}

.board-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.board-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 11px;
  color: var(--muted);
  margin: 0 0 8px;
}

.board h2 {
  margin: 0;
  font-size: clamp(20px, 3vw, 28px);
  color: var(--accent);
  font-family: "Playfair Display", serif;
}

.podium {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: clamp(12px, 2vw, 20px);
}

.podium-top {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  align-items: stretch;
  --podium-base-1: 140px;
  --podium-base-2: 140px;
  --podium-base-3: 140px;
}

@media (min-width: 900px) {
  .podium-top {
    grid-template-columns: repeat(3, 1fr);
  }
}

.podium-top .podium-card {
  position: relative;
  padding: clamp(16px, 2.5vw, 24px);
  border-radius: clamp(16px, 2vw, 18px);
  background: var(--card);
  border: 1px solid var(--stroke);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.5vw, 16px);
  box-shadow: var(--shadow);
  align-items: center;
  text-align: center;
  align-self: stretch;
  min-height: clamp(260px, 35vw, 380px);
  width: 100%;
}

.podium-first,
.podium-second,
.podium-third {
  --podium-base-height: var(--podium-base-1);
  transform: none;
}

.podium-top .podium-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(140deg, rgba(109, 144, 255, 0.18), transparent 60%);
  opacity: 0.6;
  pointer-events: none;
}

@media (min-width: 1920px) {
  .board {
    grid-column: span 6;
  }
}

.podium-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.podium-rank {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--accent);
}

.podium-name {
  font-size: clamp(16px, 2.5vw, 24px);
  font-weight: 600;
  margin: 0;
}

.podium-medal {
  font-size: clamp(84px, 11vw, 108px);
  line-height: 1;
  filter: drop-shadow(0 18px 28px rgba(26, 59, 88, 0.24));
}

.podium-metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.podium-metric-value {
  font-size: clamp(20px, 3vw, 32px);
  font-weight: 600;
  color: var(--accent);
}

.podium-metric-label {
  font-size: 14px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.podium-photo {
  width: clamp(90px, 15vw, 160px);
  height: clamp(90px, 15vw, 160px);
  border-radius: clamp(16px, 2vw, 20px);
  background: var(--card-strong);
  display: grid;
  place-items: center;
  font-weight: 600;
  color: var(--accent);
  overflow: hidden;
}

.podium-base {
  width: 100%;
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: clamp(12px, 1.5vw, 14px);
  background: var(--card-strong);
  font-size: clamp(24px, 4vw, 40px);
  font-weight: 600;
  color: rgba(35, 69, 92, 0.75);
  min-height: clamp(60px, 10vw, var(--podium-base-height, 100px));
}

.podium-base-first {
  background: #f7f2d2;
  color: #c39b3d;
}

.podium-base-second {
  background: #eef1f6;
  color: #7c8796;
}

.podium-base-third {
  background: #f5e3cf;
  color: #b56d2a;
}

.podium-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.legend {
  display: flex;
  gap: 16px;
  color: var(--muted);
  font-size: 12px;
  flex-wrap: wrap;
}

.leaderboard-list {
  display: grid;
  gap: clamp(8px, 1.2vw, 12px);
}

.row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(10px, 1.5vw, 16px);
  padding: clamp(10px, 1.5vw, 16px) clamp(12px, 2vw, 20px);
  border-radius: clamp(14px, 2vw, 16px);
  background: var(--card);
  border: 1px solid var(--stroke);
  box-shadow: 0 8px 20px rgba(26, 59, 88, 0.06);
}

.rank-pill {
  width: clamp(32px, 4vw, 40px);
  height: clamp(32px, 4vw, 40px);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--card-strong);
  color: var(--accent);
  font-weight: 600;
  font-size: clamp(13px, 1.5vw, 15px);
}

.row-main {
  display: grid;
  gap: 8px;
}

.row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-photo {
  width: clamp(60px, 10vw, 100px);
  height: clamp(60px, 10vw, 100px);
  border-radius: clamp(14px, 2vw, 18px);
  background: var(--card-strong);
  display: grid;
  place-items: center;
  font-weight: 600;
  overflow: hidden;
  color: var(--accent);
}

.profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-name {
  margin: 0;
  font-size: clamp(14px, 2vw, 18px);
  font-weight: 600;
}

.profile-sub {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.metrics {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  color: var(--muted);
  text-align: right;
}

.metrics strong {
  color: var(--accent);
  font-weight: 600;
}

.metrics-label {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.metrics-secondary {
  font-size: 12px;
  color: var(--muted);
}

.bar {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: #edf0ff;
  overflow: hidden;
}

.bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: linear-gradient(90deg, #9aaeff, #6d90ff);
  border-radius: 999px;
  transition: width 0.6s ease;
}

.status {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--bg-alt);
  color: var(--text);
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.04em;
  border: 1px solid var(--stroke);
  box-shadow: 0 12px 24px rgba(31, 77, 92, 0.1);
}

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================

   Desktop XL:      1920px+ (side-by-side leaderboards)
   Desktop Large:   1200px - 1919px (stacked, standard spacing)
   Desktop/Laptop:  901px - 1199px (stacked, compact spacing)
   Tablet:          769px - 900px (stacked, optimized for tablets)
   Mobile Large:    481px - 768px (single column, portrait tablets)
   Mobile:          375px - 480px (single column, phones)
   Mobile Small:    < 375px (extra compact for small phones)

   Most sizing uses clamp() for fluid scaling between breakpoints
   ============================================ */

@media (max-width: 1919px) {
  .board {
    grid-column: 1 / -1 !important;
  }

  .page {
    gap: 32px;
  }
}

@media (max-width: 1200px) {
  .page {
    gap: 28px;
    padding: 40px clamp(16px, 4vw, 48px) 80px;
  }
}

@media (max-width: 900px) {
  .page {
    gap: 20px;
    padding: 28px 20px 48px;
  }

  .hero {
    gap: 20px;
  }

  .hero-main {
    gap: 20px;
  }

  .podium-top .podium-card {
    min-height: 260px;
    padding: 20px;
    gap: 12px;
  }

  .podium-photo {
    width: 100px;
    height: 100px;
  }

  .profile-photo {
    width: 70px;
    height: 70px;
  }

  .board {
    padding: 20px 18px 24px;
    gap: 20px;
  }

  .podium-metric-value {
    font-size: 26px;
  }

  .podium-name {
    font-size: 20px;
  }

  h1 {
    font-size: clamp(32px, 8vw, 48px);
    margin: 0 0 8px;
  }

  .hero-logo {
    width: clamp(100px, 14vw, 160px);
  }

  .eyebrow {
    margin: 0 0 8px;
  }

  .podium-base {
    min-height: 80px;
    font-size: 32px;
  }

  .row {
    padding: 12px 16px;
    gap: 12px;
  }

  .profile-name {
    font-size: 16px;
  }

  .rank-pill {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }

  .leaderboard-list {
    gap: 10px;
  }

  .board h2 {
    font-size: 24px;
  }

  .board-eyebrow {
    margin: 0 0 6px;
  }

  .legend {
    font-size: 11px;
    gap: 12px;
  }

  .podium {
    gap: 16px;
  }

  .podium-medal {
    font-size: clamp(70px, 9vw, 90px);
  }
}

/* Tablet Landscape: 769px - 900px */
@media (max-width: 900px) and (min-width: 769px) {
  .podium-top {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Mobile Landscape & Small Tablets: 481px - 768px */
@media (max-width: 768px) {
  .page {
    gap: 20px;
    padding: 24px 16px 48px;
  }

  .hero-card {
    grid-template-columns: 1fr 1fr;
    width: 100%;
    padding: 16px 20px;
  }

  .podium {
    grid-template-columns: 1fr;
  }

  .podium-top {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .podium-top .podium-card {
    min-height: 280px;
    padding: 18px;
  }

  .podium-first,
  .podium-second,
  .podium-third {
    transform: none;
  }

  .podium-photo {
    width: 110px;
    height: 110px;
  }

  .profile-photo {
    width: 75px;
    height: 75px;
  }

  .board {
    padding: 18px 16px 22px;
  }

  h1 {
    font-size: clamp(28px, 7vw, 42px);
  }

  .hero-logo {
    width: clamp(90px, 12vw, 140px);
  }

  .podium-medal {
    font-size: clamp(64px, 8vw, 80px);
  }

  .podium-metric-value {
    font-size: 24px;
  }

  .podium-name {
    font-size: 18px;
  }

  .board h2 {
    font-size: 22px;
  }
}

/* Mobile Portrait: 320px - 480px */
@media (max-width: 480px) {
  .page {
    gap: 16px;
    padding: 20px 12px 40px;
  }

  .hero {
    gap: 16px;
  }

  .hero-main {
    gap: 16px;
  }

  .hero-card {
    grid-template-columns: 1fr;
    padding: 14px 18px;
    gap: 12px;
    min-width: auto;
  }

  .hero-card > div {
    text-align: center;
  }

  h1 {
    font-size: clamp(24px, 6vw, 32px);
    margin: 0 0 6px;
  }

  .hero-logo {
    width: clamp(80px, 20vw, 120px);
  }

  .eyebrow {
    font-size: 10px;
    margin: 0 0 6px;
  }

  .board {
    padding: 16px 14px 20px;
    gap: 16px;
    border-radius: 20px;
  }

  .board h2 {
    font-size: 20px;
  }

  .board-eyebrow {
    font-size: 10px;
    margin: 0 0 4px;
  }

  .legend {
    font-size: 10px;
    gap: 8px;
  }

  .podium {
    gap: 12px;
  }

  .podium-top .podium-card {
    min-height: 260px;
    padding: 16px;
    gap: 10px;
    border-radius: 16px;
  }

  .podium-photo {
    width: 90px;
    height: 90px;
    border-radius: 16px;
  }

  .podium-medal {
    font-size: clamp(56px, 12vw, 72px);
  }

  .podium-name {
    font-size: 16px;
  }

  .podium-metric-value {
    font-size: 20px;
  }

  .podium-metric-label {
    font-size: 11px;
  }

  .podium-rank {
    font-size: 10px;
  }

  .podium-base {
    min-height: 60px;
    font-size: 24px;
    border-radius: 12px;
  }

  .leaderboard-list {
    gap: 8px;
  }

  .row {
    padding: 10px 12px;
    gap: 10px;
    border-radius: 14px;
  }

  .rank-pill {
    width: 32px;
    height: 32px;
    font-size: 13px;
  }

  .profile-photo {
    width: 60px;
    height: 60px;
    border-radius: 14px;
  }

  .profile-name {
    font-size: 14px;
  }

  .profile-sub {
    font-size: 11px;
  }

  .metrics {
    gap: 2px;
  }

  .metrics-label {
    font-size: 10px;
  }

  .metrics-secondary {
    font-size: 11px;
  }

  .bar {
    height: 6px;
  }

  .status {
    bottom: 12px;
    right: 12px;
    padding: 8px 12px;
    font-size: 11px;
  }
}

/* Extra Small Mobile: < 375px */
@media (max-width: 374px) {
  .page {
    padding: 16px 10px 32px;
    gap: 14px;
  }

  h1 {
    font-size: 22px;
  }

  .hero-logo {
    width: 70px;
  }

  .podium-top .podium-card {
    min-height: 240px;
    padding: 14px;
  }

  .podium-photo {
    width: 80px;
    height: 80px;
  }

  .podium-name {
    font-size: 15px;
  }

  .podium-metric-value {
    font-size: 18px;
  }

  .profile-photo {
    width: 52px;
    height: 52px;
  }

  .profile-name {
    font-size: 13px;
  }

  .board {
    padding: 14px 12px 18px;
  }

  .board h2 {
    font-size: 18px;
  }
}
