.results-page {
  padding-top: 1rem;
  padding-bottom: 2rem;
}

.page-head {
  display: grid;
  gap: 0.25rem;
  margin-bottom: 1rem;
}

.muted {
  opacity: 0.75;
}

.results-controls {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 1rem 0 1.25rem;
}

.segmented {
  display: inline-flex;
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: 999px;
  overflow: hidden;
}

.seg-btn {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0.55rem 0.9rem;
  cursor: pointer;
  font-weight: 600;
}

.seg-btn.is-active {
  background: rgba(0,0,0,0.08);
}

.week-picker {
  display: grid;
  gap: 0.35rem;
  min-width: min(320px, 100%);
}

.week-picker .label {
  font-size: 0.9rem;
  opacity: 0.85;
}

.week-picker select {
  padding: 0.55rem 0.6rem;
  border-radius: 0.6rem;
  border: 1px solid rgba(0,0,0,0.2);
}

/* Make the subhead line stack feel intentional */
#weekSubhead > div {
  margin-top: 0.15rem;
}

/* Week container: lighter + a bit more definition */
.results-summary {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(0, 0, 0, 0.10);
  border-radius: 1rem;
  padding: 1rem;
  box-shadow: 0 1px 10px rgba(0, 0, 0, 0.05);
}

.summary-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.week-title {
  margin: 0;
  font-size: 1.25rem;
}

.summary-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn {
  border: 1px solid rgba(0,0,0,0.2);
  background: rgba(0,0,0,0.03);
  border-radius: 0.75rem;
  padding: 0.55rem 0.8rem;
  cursor: pointer;
  font-weight: 600;
}

.btn-link {
  font-weight: 700;
  text-decoration: none;
}

.is-hidden {
  display: none !important;
}

.winner-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0.75rem 0 1rem;
}

@media (max-width: 820px) {
  .winner-cards {
    grid-template-columns: 1fr;
  }
}

/* Winner cards: lighter than the container + subtle shadow */
.winner-card {
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(0, 0, 0, 0.10);
  border-radius: 1rem;
  padding: 0.9rem;
  display: grid;
  gap: 0.35rem;
  box-shadow: 0 1px 10px rgba(0, 0, 0, 0.06);
}

.winner-rank {
  font-weight: 800;
  letter-spacing: 0.02em;
  opacity: 0.8;
}

.winner-name {
  font-size: 1.05rem;
  font-weight: 800;
}

.winner-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  opacity: 0.85;
}

/* Pills: keep them slightly separated */
.pill {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.10);
  border-radius: 999px;
  padding: 0.25rem 0.5rem;
  font-size: 0.9rem;
}

.details.is-collapsed {
  display: none;
}

.table-wrap {
  overflow: auto;
  border-radius: 0.8rem;
  border: 1px solid rgba(0,0,0,0.12);
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}

.results-table th,
.results-table td {
  padding: 0.65rem 0.7rem;
  border-bottom: 1px solid rgba(0,0,0,0.10);
}

.results-table thead th {
  text-align: left;
  background: rgba(0,0,0,0.03);
}

.results-table .num {
  text-align: right;
}

.empty-state {
  margin-top: 1rem;
  padding: 0.85rem;
  border-radius: 0.75rem;
  background: rgba(0,0,0,0.03);
  border: 1px dashed rgba(0,0,0,0.25);
}
