/* All-time records screen. Leans on the shared tokens so it tracks both
   themes; no hard-coded surface literals. */

.records-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 20px;
}

.records-screen .records-tabs {
  display: flex;
  gap: 8px;
  margin: 0;
}

/* One shared look for every "pick a season/period" control - the records/almanac
   Period picker AND the career SEASON/cycle pickers (.career-season-picker, base
   style in 06-career.css; restyled here, which loads later, so they stay in
   lockstep). background-COLOR (not the shorthand) keeps the base dropdown caret,
   and the rounded-rect shape + Inter font follow the game's input language. */
.records-season {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.records-season select,
.career-season-picker select {
  background-color: rgba(var(--surface-rgb), 0.85);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 7px 30px 7px 12px;
  font: inherit;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
}

.records-season select:hover,
.records-season select:focus,
.career-season-picker select:hover,
.career-season-picker select:focus { outline: none; border-color: var(--accent); }

.records-tab {
  background: var(--panel);
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 18px;
  font-weight: 600;
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}

.records-tab:hover { color: var(--text); }

.records-tab.active {
  color: var(--text);
  border-color: var(--accent);
  background: var(--accent-dim);
}

.records-section-title {
  font-size: 1rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 26px 0 12px;
}
.records-section-title:first-child { margin-top: 4px; }

.record-card-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.record-card {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  padding: 16px 18px;
}

.record-card-empty { border-left-color: var(--line-strong); }

.record-card h3 {
  margin: 0 0 8px;
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
}

.record-figure {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.1;
}

.record-team { font-weight: 600; color: var(--text); margin-top: 2px; }
.record-meta { font-size: .8rem; margin-top: 4px; }

.record-board-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.record-board {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
}

.record-board h3 {
  margin: 0 0 10px;
  font-size: .9rem;
  color: var(--text);
}

.record-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.record-table th {
  text-align: left;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  font-weight: 600;
  padding: 4px 6px;
  border-bottom: 1px solid var(--line);
}
.record-table td { padding: 6px 6px; border-bottom: 1px solid rgba(var(--surface-2-rgb), .6); }
.record-table tr:last-child td { border-bottom: none; }
.record-rank { color: var(--muted); width: 1.6rem; }
.record-name { font-weight: 600; color: var(--text); }
.record-team-cell { color: var(--muted); }
.record-table th:last-child { text-align: center; }
.record-value { position: relative; text-align: center; font-weight: 700; color: var(--accent); }
/* Not-out star hangs off the right edge so the digits centre cleanly. */
.record-not-out { position: absolute; right: 6px; }

/* Player ranking ladders + in-career Almanac. The format toggles reuse the
   app-standard .sr-fmt-pill (see 10-season-review.css) so every format switch
   in the app looks the same. */
.career-almanac-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin: 0 0 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.career-almanac-controls .sr-fmt-toggle { margin-bottom: 0; }
/* The Period control reads as a single inline unit on the right of the bar. */
.career-almanac-controls .records-season { margin-left: auto; }

.rank-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}
.rank-board {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
}
.rank-board h4 {
  margin: 0 0 10px;
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
}
.rank-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.rank-table th {
  text-align: left;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  font-weight: 600;
  padding: 4px 6px;
  border-bottom: 1px solid var(--line);
}
.rank-table td { padding: 6px 6px; border-bottom: 1px solid rgba(var(--surface-2-rgb), .6); }
.rank-table tr:last-child td { border-bottom: none; }
.rank-pos { color: var(--muted); width: 1.6rem; }
.rank-name { font-weight: 600; color: var(--text); }
.rank-team { color: var(--muted); }
.rank-rating { text-align: right; font-weight: 700; color: var(--accent); }

@media (max-width: 560px) {
  .record-board-grid, .record-card-row, .rank-grid { grid-template-columns: 1fr; }
}
