:root {
  --ink: #161b26;
  --ink-soft: #5f6676;
  --paper: #f7f3ee;
  --accent: #1d2433;
  --accent-soft: #efe9e1;
  --highlight: #9a7b45;
  --highlight-deep: #6f5530;
  --sport-gold: #d8b26a;
  --sport-gold-deep: #b3873b;
  --panel: #ffffff;
  --line: #e6ded2;
  --shadow: 0 28px 60px rgba(22, 27, 38, 0.12);
  --serif: "Instrument Serif", "Georgia", serif;
  --sans: "Instrument Sans", "Segoe UI", sans-serif;
  --display: "Instrument Serif", "Georgia", serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  min-height: 100vh;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  margin: 0;
  font-weight: 500;
  letter-spacing: -0.025em;
}

h2 {
  font-family: var(--serif);
  text-transform: none;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2.6rem, 5vw, 4.6rem);
  font-family: var(--serif);
  text-transform: none;
  letter-spacing: -0.01em;
}

p {
  line-height: 1.6;
}

.hero {
  padding: 5rem 8vw 4rem;
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #f7f3ee 0%, #efe7dc 50%, #f7f3ee 100%);
}

.hero--sport {
  color: var(--ink);
  background: linear-gradient(135deg, #f7f3ee 0%, #efe7dc 50%, #f7f3ee 100%);
}

.hero--sport::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 10%, rgba(183, 145, 89, 0.18), transparent 55%),
    radial-gradient(circle at 75% 30%, rgba(120, 95, 56, 0.12), transparent 60%);
  pointer-events: none;
}

.hero--parallax {
  background-attachment: fixed;
}

.hero__content {
  max-width: 720px;
  position: relative;
  z-index: 1;
}

.hero__content--wide {
  max-width: 1100px;
}

.hero__title-row {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.brand__logo {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  box-shadow: 0 12px 26px rgba(22, 27, 38, 0.2);
  object-fit: cover;
}

.brand__logo--xl {
  width: 90px;
  height: 90px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
  color: var(--highlight);
  margin-bottom: 0.75rem;
}

.lede {
  color: var(--ink-soft);
  font-size: 1.1rem;
}

.hero__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1rem;
  color: var(--highlight-deep);
  font-weight: 600;
  text-decoration: none;
}

.hero__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.hero__link:hover {
  text-decoration: underline;
}

.layout {
  display: grid;
  gap: 2.5rem;
  padding: 0 4vw 4rem;
  grid-template-columns: minmax(0, 1fr);
}

.layout--sport {
  margin-top: -2rem;
}

.lineal-layout {
  margin-top: 2rem;
}

.layout--sport:not(.lineal-layout) {
  margin-top: 2rem;
}

.panel {
  background: var(--panel);
  border-radius: 20px;
  padding: 0;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.panel--sport {
  border-radius: 24px;
  border: 1px solid var(--line);
}

.panel__header {
  padding: 2rem 2rem 0;
  margin-bottom: 2.5rem;
}

.mobile-filter-toggle {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  font-weight: 600;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  display: none;
}

.mobile-filter-bar {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  z-index: 60;
  transition: transform 0.25s ease;
}

.mobile-filter-bar.is-visible {
  transform: translateX(-50%) translateY(0);
}

.mobile-filter-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  opacity: 0;
  pointer-events: none;
  z-index: 55;
  transition: opacity 0.2s ease;
}

.controls-panel {
  position: relative;
}

.controls-panel__header {
  display: none;
  align-items: center;
  justify-content: space-between;
}

.controls-panel__header h3 {
  margin: 0;
  font-size: 1.2rem;
}

.controls-panel__close {
  border: none;
  background: #ffffff;
  color: var(--ink);
  font-weight: 600;
  cursor: pointer;
}

body.filters-open .mobile-filter-overlay {
  opacity: 1;
  pointer-events: auto;
}

.sport-band {
  padding: 3.5rem 6vw 2.5rem;
  background: #f5f0e8;
  color: var(--ink);
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.sport-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 50%, rgba(183, 145, 89, 0.12), transparent 55%),
    radial-gradient(circle at 80% 20%, rgba(120, 95, 56, 0.1), transparent 60%);
  opacity: 0.9;
}

.sport-band__content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.6fr);
  gap: 2.5rem;
  align-items: center;
}

.sport-band__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.7rem;
  color: rgba(95, 102, 118, 0.8);
  margin-bottom: 0.75rem;
}

.sport-band__copy h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  margin-bottom: 1rem;
}

.sport-band__copy p {
  color: var(--ink-soft);
}

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

.sport-band__value {
  display: block;
  font-family: var(--display);
  font-size: 1.8rem;
  letter-spacing: 0.08em;
}

.sport-band__label {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.sport-band__media {
  display: grid;
  gap: 1rem;
}

.image-slot {
  border-radius: 18px;
  border: 1px dashed rgba(95, 102, 118, 0.35);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.2));
  min-height: 180px;
  display: grid;
  place-items: center;
  color: rgba(95, 102, 118, 0.8);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.65rem;
}

.image-slot--photo {
  aspect-ratio: 1 / 1;
  min-height: 260px;
  overflow: hidden;
  border: 1px solid rgba(95, 102, 118, 0.25);
  border-radius: 22px;
  box-shadow: 0 18px 40px rgba(22, 27, 38, 0.16);
}

.image-slot--photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sport-band--lineal {
  background: #f5f0e8;
}

@media (max-width: 900px) {
  .sport-band__content {
    grid-template-columns: 1fr;
  }
}

.panel__title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

 .panel--side {
  border-left: 4px solid var(--highlight);
 }

.controls {
  padding: 0 2rem;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 1.5rem;
}

label {
  display: flex;
  flex-direction: column;
  font-size: 0.85rem;
  color: var(--ink-soft);
  gap: 0.5rem;
}

.player-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  min-height: 44px;
}

.player-search input[type="search"] {
  border: none;
  box-shadow: none;
  min-height: 32px;
  height: 32px;
  line-height: 32px;
  padding: 0.25rem 0.4rem;
  flex: 1 1 140px;
}

.player-search input[type="search"]:focus {
  outline: none;
}

.player-search__chips {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.player-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  background: #e5e7eb;
  color: #111827;
  font-size: 0.8rem;
  font-weight: 600;
}

.player-chip button {
  border: none;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
}

.player-search__suggestions {
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
  z-index: 30;
  max-height: 220px;
  overflow: auto;
  display: none;
}

.player-search__suggestions.is-open {
  display: block;
}

.player-suggestion {
  padding: 0.65rem 0.75rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--ink);
}

.player-suggestion:hover {
  background: #f3f6fb;
}

.range-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.status-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
}

.status-toggle__label {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.status-toggle input {
  appearance: none;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: #e5e7eb;
  position: relative;
  cursor: pointer;
  transition: background 0.2s ease;
}

.status-toggle input::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.2);
  transition: transform 0.2s ease;
}

.status-toggle input:checked {
  background: #86efac;
}

.status-toggle input:checked::after {
  transform: translateX(20px);
}

.status-toggle__slider {
  display: none;
}

.country-filter {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
}

.country-filter__label {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.country-filter__list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem 0.75rem;
  justify-items: stretch;
  align-items: start;
  max-height: 200px;
  overflow: auto;
  padding: 0.5rem 0.25rem 0.25rem;
  border-top: 1px solid var(--line);
  background: #ffffff;
  text-align: left;
}

.country-filter__dropdown {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  padding: 0.35rem 0.65rem;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
  position: relative;
}

.country-filter__dropdown summary {
  cursor: pointer;
  list-style: none;
  font-size: 0.95rem;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
  white-space: nowrap;
  overflow: hidden;
  min-height: 44px;
}

.country-filter__dropdown summary::-webkit-details-marker {
  display: none;
}

.country-filter__dropdown summary::after {
  content: "▾";
  color: var(--ink-soft);
  margin-left: auto;
}

.country-filter__dropdown[open] summary::after {
  content: "▴";
}

.country-filter__dropdown .country-filter__list {
  margin-top: 0;
  border: 0;
  padding: 0.5rem 0 0.25rem;
  justify-items: stretch;
}

.multi-summary__chips {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.4rem;
  align-items: center;
  overflow: hidden;
}

.multi-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.5rem;
  border-radius: 8px;
  background: #e5e7eb;
  color: #111827;
  font-size: 0.8rem;
  font-weight: 600;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.multi-pill--more {
  background: #e2e8f0;
  color: #475569;
}

.summary-clear {
  border: none;
  background: #e5e7eb;
  color: var(--ink);
  border-radius: 999px;
  width: 24px;
  height: 24px;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  margin-left: 0.25rem;
}

.summary-clear:hover {
  background: #d1d5db;
}

.country-filter__dropdown[open] {
  border-color: #86efac;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.18);
}

.country-filter__item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--ink);
  padding: 0.45rem 0.5rem;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  width: 100%;
  position: relative;
  margin: 0;
  align-self: stretch;
  box-sizing: border-box;
}

.country-filter__item span {
  text-align: left;
}

.country-filter__item input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.country-filter__text {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  justify-content: flex-start;
}

.country-filter__text::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: var(--highlight-deep);
}

.country-filter__item input:checked + .country-filter__text::before {
  content: "✓";
  border-color: var(--highlight-deep);
  background: #ffffff;
}

.country-filter__item.is-hidden {
  display: none;
}

.country-filter__item:hover {
  background: #f1f5f9;
}

.country-filter__panel {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.75rem;
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 0.5rem);
  z-index: 20;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
  text-align: left;
  justify-items: start;
  align-items: start;
}

.country-filter__list {
  text-align: left;
}

.country-filter__search {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
}

.country-filter__search input {
  border: none;
  outline: none;
  font-size: 0.9rem;
}

.country-filter__search-icon {
  color: var(--ink-soft);
}

.country-filter__actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.75rem;
}

.country-filter__actions button {
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #ffffff;
  font-weight: 600;
  cursor: pointer;
}

.country-filter__actions button:last-child {
  background: var(--ink);
  color: #ffffff;
  border-color: var(--ink);
}

select,
input[type="search"] {
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #ffffff;
  font-size: 0.95rem;
  color: var(--ink);
  min-height: 44px;
  height: 44px;
  line-height: 44px;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.02);
}

input[type="range"] {
  width: 100%;
  accent-color: var(--highlight);
}

.range-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 44px;
}

.range-row input[type="range"] {
  margin: 0;
  height: 44px;
}

.range-value {
  font-size: 0.8rem;
  color: var(--ink-soft);
  min-width: 2.2rem;
  text-align: right;
}

.summary {
  padding: 0 2rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin-bottom: 1rem;
}


.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-chips__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 2rem 1rem;
  flex-wrap: wrap;
}

.filter-clear-all {
  border: none;
  background: transparent;
  color: var(--ink-soft);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0.25rem 0.4rem;
}

.filter-clear-all:hover {
  color: var(--highlight-deep);
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #f8fafc;
  color: var(--ink);
  font-size: 0.8rem;
  cursor: pointer;
}

.filter-chip__close {
  color: var(--ink-soft);
  font-weight: 700;
}

.table-wrap {
  border-radius: 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  background: #ffffff;
}

.rank-table {
  min-width: 720px;
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-wrap::-webkit-scrollbar {
  height: 8px;
}

.table-wrap::-webkit-scrollbar-thumb {
  background: #cbd5f5;
  border-radius: 999px;
}

.match-card {
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 1rem 1.25rem;
  background: #ffffff;
  display: grid;
  gap: 0.5rem;
  position: relative;
}

.match-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  border-radius: 12px 0 0 12px;
  background: #d6c9b7;
}

.match-card.win-usa::before {
  background: #b22222;
}

.match-card.win-europe::before {
  background: #1e3a8a;
}

.match-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
}

.rank-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.rank-table th,
.rank-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.rank-table th:nth-child(6),
.rank-table td:nth-child(6) {
  white-space: nowrap;
  min-width: 90px;
}

.rank-table thead {
  background: #eef3f8;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.rank-table th {
  cursor: pointer;
  position: sticky;
  top: 0;
  z-index: 2;
  background: #eef3f8;
}

.rank-table th.is-sorted {
  color: var(--highlight-deep);
}

.rank-table th::after {
  content: "↕";
  font-size: 0.75rem;
  color: #94a3b8;
  margin-left: 0.35rem;
}

.rank-table th.is-sorted-asc::after {
  content: "↑";
  color: var(--highlight-deep);
}

.rank-table th.is-sorted-desc::after {
  content: "↓";
  color: var(--highlight-deep);
}

.rank-table tbody tr {
  transition: background 0.2s ease;
}

.rank-table tbody tr:nth-child(even) {
  background: #f7f9fc;
}

.rank-table tbody tr:hover {
  background: #f3f6fb;
}

.rank-table tbody tr.is-open {
  background: #eef3f8;
}

.detail-row td {
  padding: 0;
  background: #ffffff;
}

.detail-row .player-detail {
  margin: 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: #ffffff;
  animation: expandDetail 180ms ease;
  transform-origin: top;
}

@keyframes expandDetail {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.rank-table td:last-child,
.rank-table th:last-child {
  text-align: right;
}

.lineal-table th,
.lineal-table td {
  white-space: nowrap;
}

.flag {
  font-size: 1.2rem;
  margin-right: 0.4rem;
}

.ppm-cell {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
}

.ppm-bar {
  width: 70px;
  height: 6px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
}

.ppm-bar__fill {
  display: block;
  height: 100%;
  border-radius: 999px;
}

.ppm-bar__fill--high {
  background: linear-gradient(90deg, #0f766e, #22c55e);
}

.ppm-bar__fill--mid {
  background: linear-gradient(90deg, #f59e0b, #facc15);
}

.ppm-bar__fill--low {
  background: linear-gradient(90deg, #ef4444, #f97316);
}

.ppm-bar__fill--na {
  background: #e5e7eb;
}

.player-detail {
  margin: 2rem;
  margin-top: 2rem;
  padding: 1.5rem;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid var(--line);
  position: relative;
}

.player-detail h3 {
  margin-bottom: 0.5rem;
}

.detail-meta {
  color: var(--ink-soft);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.match-list {
  display: grid;
  gap: 0.75rem;
}

.match-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #f8fafc;
  position: relative;
  overflow: hidden;
  text-align: left;
}

.match-row .meta {
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.match-row .match-result {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.match-row.result-win .match-result {
  background: #dcfce7;
  color: #166534;
}

.match-row.result-halved .match-result {
  background: #fef3c7;
  color: #92400e;
}

.match-row.result-loss .match-result {
  background: #fee2e2;
  color: #991b1b;
}

.match-row.result-win {
  background: #effaf3;
  border-color: #b9e6cc;
}

.match-row.result-halved {
  background: #fff7e6;
  border-color: #fcd9a7;
}

.match-row.result-loss {
  background: #fff1f2;
  border-color: #fbcfe8;
}

.badge {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #efe4d4;
  color: var(--ink-soft);
}

.badge--usa {
  background: #f6d9d9;
  color: #7d1f1f;
}

.badge--europe {
  background: #d6e1ff;
  color: #1e3a8a;
}

.match-meta {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.match-result {
  font-weight: 600;
  color: var(--accent);
}

.facts {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  gap: 0.75rem;
}

.hero__content--wide {
  max-width: 1100px;
}

.hero--lineal .hero__content {
  max-width: 1100px;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 2rem;
  align-items: end;
}

.lineal-card {
  position: relative;
  background: #0b1324;
  color: #f8fafc;
  padding: 1.75rem;
  border-radius: 20px;
  box-shadow: 0 16px 32px rgba(11, 19, 36, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.lineal-card--gold {
  background: linear-gradient(135deg, #f6e4b5 0%, #e6c984 45%, #d9b064 100%);
  color: #1d2433;
  border: 1px solid rgba(111, 85, 48, 0.3);
  box-shadow: 0 18px 36px rgba(141, 101, 44, 0.25);
}

.lineal-card__label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: inherit;
  margin: 0 0 0.75rem;
}

.lineal-card__name {
  margin: 0 0 0.5rem;
  font-size: clamp(1.8rem, 2.4vw, 2.4rem);
}

.lineal-card__title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.lineal-card__record {
  font-size: 0.95rem;
  font-weight: 600;
}

.lineal-card__meta {
  color: inherit;
  font-size: 0.95rem;
  margin-bottom: 1.1rem;
}

.lineal-card__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.lineal-card__stats span {
  background: rgba(17, 24, 39, 0.12);
  color: #111827;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

.lineal-card__crown {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.4rem;
}

.lineal-status {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.lineal-status--change {
  background: #dcfce7;
  color: #166534;
}

.lineal-status--retain {
  background: #e2e8f0;
  color: #334155;
}

.lineal-result {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.lineal-result--win {
  background: #dcfce7;
  color: #166534;
}

.lineal-result--draw {
  background: #fef3c7;
  color: #92400e;
}

.lineal-result--loss {
  background: #fee2e2;
  color: #991b1b;
}

.lineal-result--vacated {
  background: #e2e8f0;
  color: #334155;
}

.lineal-row--win {
  background: #f0fdf4;
}

.lineal-row--draw {
  background: #fef3c7;
}

.lineal-row--loss {
  background: #fff1f2;
}

.lineal-row--vacated {
  background: #f1f5f9;
}

.lineal-table tbody tr:nth-child(even) {
  background: transparent;
}

.lineal-table tbody tr:hover {
  background: inherit;
}

.lineal-table tbody tr:nth-child(even) {
  background: transparent;
}

.lineal-table {
  border-collapse: separate;
  border-spacing: 0 6px;
}

.lineal-group-row td {
  border-left: 2px solid var(--line);
  border-right: 2px solid var(--line);
  background-color: inherit;
  background-clip: padding-box;
}

.lineal-group-start td {
  border-top: 2px solid var(--line);
}

.lineal-group-end td {
  border-bottom: 2px solid var(--line);
}

.lineal-group-start td:first-child {
  border-top-left-radius: 10px;
}

.lineal-group-start td:last-child {
  border-top-right-radius: 10px;
}

.lineal-group-end td:first-child {
  border-bottom-left-radius: 10px;
}

.lineal-group-end td:last-child {
  border-bottom-right-radius: 10px;
}

.lineal-champions {
  list-style: none;
  margin: 0;
  padding: 0 2rem 2rem;
  display: grid;
  gap: 1.25rem;
}

.lineal-champions__body.is-collapsed {
  display: none;
}

.lineal-log__body.is-collapsed {
  display: none;
}

.lineal-champion {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem;
  align-items: start;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}

.lineal-champion__index {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #f1f5f9;
  color: var(--ink);
  font-weight: 700;
  font-size: 0.95rem;
}

.lineal-champion__header {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.lineal-champion__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

.lineal-champion__header h3 {
  margin: 0;
  font-size: 1.4rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.lineal-champion__range {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

.lineal-champion__reigns {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  background: #eef2f7;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

.toggle-button {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  font-weight: 600;
  padding: 0.35rem;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  width: 36px;
  height: 36px;
  justify-content: center;
}

.toggle-button:hover {
  background: #f3f6fb;
}

.toggle-button__icon {
  font-size: 0.85rem;
  transition: transform 0.2s ease;
}

.toggle-button.is-collapsed .toggle-button__icon {
  transform: rotate(-90deg);
}

.lineal-champion__detail {
  margin: 0.6rem 0 0;
  color: var(--ink-soft);
}

.lineal-champion__flag {
  font-size: 1.1rem;
  line-height: 1;
}

@media (max-width: 700px) {
  .lineal-champion {
    grid-template-columns: 1fr;
  }

  .lineal-champion__index {
    width: 34px;
    height: 34px;
  }
}

.lineal-layout .panel {
  overflow: hidden;
}

@media (max-width: 900px) {
  .hero__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .hero--parallax {
    background-attachment: scroll;
  }
}

@media (max-width: 900px) {
  .mobile-filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
  }

  .panel__title-row {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .controls-panel {
    position: fixed;
    inset: 0;
    background: #ffffff;
    z-index: 70;
    padding: 1.5rem 1.5rem 2rem;
    overflow: auto;
    transform: translateY(100%);
    transition: transform 0.25s ease;
  }

  .controls-panel__header {
    display: flex;
    margin-bottom: 1.5rem;
  }

  body.filters-open .controls-panel {
    transform: translateY(0);
  }

  .detail-row td {
    padding: 0 1rem 1.5rem;
  }

  .player-detail {
    margin: 0;
    border-radius: 16px;
  }

  .match-row {
    grid-template-columns: 1fr;
  }
}

.footer {
  padding: 0 4vw 2.5rem;
  color: var(--ink-soft);
}

.footer__content {
  display: grid;
  gap: 0.75rem;
  align-items: start;
  border-top: 1px solid var(--line);
  padding-top: 2rem;
  margin-top: 2rem;
}

.footer__note {
  margin: 0;
  font-size: 0.9rem;
}

.footer__details {
  margin-top: 0.5rem;
}

.footer__details summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 600;
  list-style: none;
}

.footer__details summary::-webkit-details-marker {
  display: none;
}

.footer__details summary::after {
  content: "+";
  display: inline-block;
  margin-left: 0.5rem;
  color: var(--highlight);
}

.footer__details[open] summary::after {
  content: "–";
}

@media (max-width: 720px) {
  .hero {
    padding: 3rem 6vw 2rem;
  }

  .panel__header {
    padding: 1.5rem 1.25rem 0;
  }

  .panel__title-row {
    align-items: flex-start;
  }

  .controls {
    padding: 0 1.25rem;
    grid-template-columns: minmax(0, 1fr);
  }

  .summary {
    padding: 0 1.25rem;
  }

  .filter-chips {
    padding: 0;
  }

  .filter-chips__row {
    padding: 0 1.25rem 1rem;
    flex-direction: column;
    align-items: flex-start;
  }

  .ppm-legend {
    flex-wrap: wrap;
  }


  .rank-table {
    min-width: 640px;
  }

  .player-detail {
    margin: 0;
    padding: 1rem 1.1rem;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }

  .match-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .match-row .match-result {
    margin-bottom: 0.25rem;
  }
}

@media (min-width: 900px) {
  .footer__content {
    grid-template-columns: minmax(0, 1fr);
  }
}
