:root {
  color-scheme: dark;
  --bg: #050505;
  --panel: rgba(15, 15, 15, 0.88);
  --panel-strong: #111;
  --line: rgba(255, 255, 255, 0.11);
  --line-strong: rgba(255, 255, 255, 0.2);
  --text: #f5f3ed;
  --muted: #99978f;
  --faint: #68665f;
  --accent: #ece9df;
  --danger: #d98989;
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 15% -10%, rgba(255, 255, 255, 0.08), transparent 32rem),
    linear-gradient(180deg, #080808 0%, #030303 100%);
  color: var(--text);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

button,
a {
  font: inherit;
}

a {
  color: inherit;
}

.records-shell {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.records-header {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-family: Georgia, serif;
  font-size: 20px;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  letter-spacing: 0.04em;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.user-chip {
  color: var(--muted);
  font-size: 13px;
}

.text-link {
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
  font-size: 13px;
}

.hero {
  padding: 64px 0 42px;
}

.eyebrow {
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(42px, 8vw, 76px);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.045em;
}

.hero-copy {
  width: min(620px, 100%);
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.record-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  backdrop-filter: blur(18px);
}

.panel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 24px;
  border-bottom: 1px solid var(--line);
}

.panel-head h2 {
  margin: 0;
  font-size: 26px;
  font-weight: 500;
}

.period-toggle {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #080808;
}

.period-button {
  min-width: 86px;
  padding: 8px 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.period-button.is-active {
  background: var(--accent);
  color: #0b0b0b;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--line);
}

.summary-strip > div {
  padding: 18px 24px;
}

.summary-strip > div + div {
  border-left: 1px solid var(--line);
}

.summary-strip span,
.summary-strip strong {
  display: block;
}

.summary-strip span {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.summary-strip strong {
  font-size: 19px;
  font-weight: 500;
}

.records-status {
  padding: 28px 24px;
  color: var(--muted);
}

.records-status.is-error {
  color: var(--danger);
}

.record-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.record-row {
  display: grid;
  grid-template-columns: 52px minmax(160px, 1.7fr) minmax(130px, 1fr) minmax(110px, 0.8fr);
  align-items: center;
  min-height: 82px;
  padding: 0 24px;
  border-top: 1px solid var(--line);
}

.record-rank {
  color: var(--faint);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
}

.record-period strong,
.record-period span {
  display: block;
}

.record-period strong {
  font-size: 15px;
  font-weight: 500;
}

.record-period span,
.record-detail {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.record-focus {
  justify-self: end;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
  white-space: nowrap;
}

.record-overflow {
  justify-self: end;
  text-align: right;
}

.record-overflow strong,
.record-overflow span {
  display: block;
}

.record-overflow strong {
  font-size: 13px;
  font-weight: 500;
}

.record-overflow span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}

.records-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 2px 0;
  color: var(--faint);
  font-size: 11px;
}

@media (max-width: 680px) {
  .records-shell {
    width: min(100% - 20px, 980px);
    padding-top: 12px;
  }

  .records-header {
    align-items: flex-start;
    padding: 8px 0 14px;
  }

  .user-chip {
    display: none;
  }

  .hero {
    padding: 46px 2px 30px;
  }

  .panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .period-toggle {
    width: 100%;
  }

  .period-button {
    min-width: 0;
  }

  .summary-strip {
    grid-template-columns: 1fr;
  }

  .summary-strip > div + div {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .record-row {
    grid-template-columns: 38px 1fr auto;
    gap: 8px;
    min-height: 92px;
    padding: 14px 16px;
  }

  .record-overflow {
    grid-column: 2 / 4;
    justify-self: start;
    display: flex;
    gap: 10px;
    text-align: left;
  }

  .record-overflow strong,
  .record-overflow span {
    display: inline;
    margin: 0;
  }

  .records-footer {
    flex-direction: column;
    gap: 6px;
  }
}
