* {
  box-sizing: border-box;
}

a {
  color: #b91c1c;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

body {
  font-family: "Assistant", "Heebo", sans-serif;
  line-height: 1.4;
  margin: 0;
  padding: 0 1rem 3rem;
  max-width: 72rem;
  margin-inline: auto;
  color: #101828;
  background: radial-gradient(circle at 8% -18%, #fee2e2 0%, #fff1f2 46%, #ffffff 100%);
}

header {
  padding: 1rem 0 0.8rem;
  border-bottom: 1px solid #d0d5dd;
}

nav {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

nav a {
  color: #b91c1c;
  text-decoration: none;
  font-weight: 600;
  padding: 0.3rem 0.55rem;
  border-radius: 0.5rem;
}

nav a:hover {
  background: #fee2e2;
}

main section {
  margin-top: 1.5rem;
}

/* ── Hero ── */

.records-hero {
  background: linear-gradient(140deg, #450a0a 0%, #7f1d1d 54%, #b91c1c 100%);
  color: #fff1f2;
  border-radius: 1rem;
  padding: 1.25rem;
  box-shadow: 0 18px 35px -28px #7f1d1d;
}

.records-hero p {
  margin: 0;
}

.records-hero .eyebrow {
  color: #fecdd3;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.45rem;
}

.stats-grid {
  display: grid;
  gap: 0.7rem;
  margin-top: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.stat-card {
  background: rgb(255 255 255 / 0.14);
  border: 1px solid rgb(251 113 133 / 0.45);
  border-radius: 0.85rem;
  padding: 0.75rem;
}

.stat-card strong {
  display: block;
  font-size: 1.35rem;
  line-height: 1.1;
}

.stat-card span {
  font-size: 0.85rem;
  color: #ffe4e6;
}

/* ── Panel ── */

.records-panels {
  display: grid;
  gap: 1rem;
}

.records-panel {
  background: #fff;
  border: 1px solid #d0d5dd;
  border-radius: 1rem;
  padding: 1rem;
  box-shadow: 0 10px 24px -24px #0f172a;
}

.records-panel h2 {
  margin: 0;
  color: #0f172a;
}

/* ── Filter bar ── */

.records-filter-bar {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 0.8rem;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: end;
}

/* toggle button groups */
.btn-group {
  display: inline-flex;
  border: 1px solid #cbd5e1;
  border-radius: 0.55rem;
  overflow: hidden;
}

.btn-toggle {
  border: none;
  background: #fff;
  color: #334155;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  cursor: pointer;
  border-right: 1px solid #cbd5e1;
  transition: background 0.12s, color 0.12s;
}

.btn-toggle:last-child {
  border-right: none;
}

.btn-toggle:hover {
  background: #fee2e2;
}

.btn-toggle.active {
  background: #b91c1c;
  color: #fff;
}

.btn-toggle.active:hover {
  background: #991b1b;
}

/* dropdown selects in filter row */
.filter-row label {
  display: grid;
  gap: 0.2rem;
  font-size: 0.82rem;
  color: #334155;
}

.filter-row select,
.filter-row input[type="search"] {
  min-height: 2.15rem;
  border-radius: 0.5rem;
  border: 1px solid #cbd5e1;
  background: #fff;
  padding: 0.3rem 0.5rem;
  color: #0f172a;
  font: inherit;
  font-size: 0.88rem;
}

.filter-row select:focus,
.filter-row input[type="search"]:focus {
  outline: 2px solid #b91c1c;
  outline-offset: -1px;
}

.search-label {
  flex: 1 1 10rem;
  min-width: 8rem;
}

.search-label input {
  width: 100%;
}

.btn-reset {
  min-height: 2.15rem;
  border-radius: 0.5rem;
  border: 1px solid #cbd5e1;
  background: #ffe4e6;
  color: #9f1239;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 0.3rem 0.85rem;
  cursor: pointer;
  transition: background 0.12s;
  align-self: end;
}

.btn-reset:hover {
  background: #fecdd3;
}

/* ── Result count ── */

.filter-result {
  margin: 0.2rem 0 0.75rem;
  color: #475467;
  font-size: 0.9rem;
}

/* ── Table ── */

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  min-width: 36rem;
}

th,
td {
  border: 1px solid #e4e7ec;
  padding: 0.45rem 0.55rem;
  text-align: start;
  vertical-align: middle;
}

th {
  background: #f8fafc;
  color: #334155;
  font-weight: 700;
  font-size: 0.85rem;
  white-space: nowrap;
}

.records-table tbody tr:nth-child(odd) {
  background: #fcfdff;
}

.records-table tbody tr:hover {
  background: #fff1f2;
}

.col-rank {
  text-align: center;
  color: #64748b;
  font-variant-numeric: tabular-nums;
  width: 2.5rem;
}

.col-wc {
  white-space: nowrap;
  font-weight: 600;
}

.record-kg {
  font-weight: 800;
  color: #b91c1c;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.record-kg span {
  font-weight: 600;
  color: #475467;
  font-size: 0.8em;
}

.col-lifter {
  font-weight: 600;
}

.col-fed {
  color: #475467;
  font-size: 0.85rem;
}

.col-date {
  white-space: nowrap;
  color: #64748b;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}

/* ── Sort-active column ── */
.sort-active {
  background: #fff1f2;
  font-weight: 800;
}

th.sortable {
  cursor: pointer;
  user-select: none;
}

th.sortable:hover {
  background: #fee2e2;
}

th.active-sort {
  color: #b91c1c;
}

td .empty {
  color: #cbd5e1;
}

.is-hidden {
  display: none;
}

/* ── Footer ── */

footer {
  margin-top: 2rem;
  border-top: 1px solid #d0d5dd;
  padding-top: 1rem;
  color: #475467;
}

/* ── Responsive ── */

@media (max-width: 48rem) {
  .filter-row {
    gap: 0.5rem;
  }

  .btn-group {
    flex: 1 1 auto;
  }

  .btn-toggle {
    flex: 1 1 auto;
    text-align: center;
    padding: 0.4rem 0.4rem;
    font-size: 0.82rem;
  }
}

@media (max-width: 42rem) {
  body {
    padding-inline: 0.7rem;
  }

  .records-hero,
  .records-panel {
    border-radius: 0.8rem;
    padding: 0.85rem;
  }

  table {
    min-width: 30rem;
  }
}

/* ── Lifter detail page ── */

.lifter-hero {
  background: linear-gradient(140deg, #450a0a 0%, #7f1d1d 54%, #b91c1c 100%);
  color: #fff1f2;
  border-radius: 1rem;
  padding: 1.25rem;
  box-shadow: 0 18px 35px -28px #7f1d1d;
  text-align: center;
}

.lifter-hero h1 {
  margin: 0 0 0.3rem;
  font-size: 1.6rem;
}

.lifter-hero p {
  margin: 0 0 0.5rem;
  color: #fecdd3;
}

.lifter-hero a {
  color: #ffe4e6;
  text-decoration: underline;
  font-size: 0.9rem;
}

.lifter-hero a:hover {
  color: #fff;
}

.lifter-chart {
  background: #fff;
  border: 1px solid #d0d5dd;
  border-radius: 1rem;
  padding: 1rem;
  box-shadow: 0 10px 24px -24px #0f172a;
  margin-top: 1rem;
}

.lifter-chart canvas {
  width: 100%;
  height: 300px;
}

.lifter-meets {
  margin-top: 1rem;
}

.lifter-meets .records-table {
  background: #fff;
  border: 1px solid #d0d5dd;
  border-radius: 1rem;
  padding: 1rem;
  box-shadow: 0 10px 24px -24px #0f172a;
}

/* ── Lifter name links in rankings table ── */

.col-lifter a {
  color: #b91c1c;
  text-decoration: none;
  font-weight: 600;
}

.col-lifter a:hover {
  text-decoration: underline;
  background: #fee2e2;
  border-radius: 0.25rem;
}

/* ── Post/update detail pages ── */

.content-detail {
  margin-top: 1.5rem;
  background: #fff;
  border: 1px solid #e4e7ec;
  border-radius: 1rem;
  padding: 1.25rem;
  box-shadow: 0 10px 24px -24px #0f172a;
}

.content-kicker {
  margin: 0 0 0.5rem;
  color: #b42318;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.content-meta {
  color: #667085;
  font-size: 0.92rem;
}

.content-body {
  margin-top: 1rem;
  font-size: 1rem;
  line-height: 1.8;
}

.content-body p {
  margin: 0 0 1rem;
}

.content-backlink {
  margin-top: 1rem;
}

.content-backlink a {
  color: #b91c1c;
  font-weight: 600;
  text-decoration: none;
}

.content-backlink a:hover {
  text-decoration: underline;
}

/* ── Posts/Updates listing pages ── */

.content-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 1.25rem;
}

.content-list-item {
  background: #fff;
  border: 1px solid #e4e7ec;
  border-radius: 1rem;
  padding: 1.25rem;
  box-shadow: 0 10px 24px -24px #0f172a;
}

.content-list-item strong a {
  font-size: 1.1rem;
}
