table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 0.25rem;
  margin: 1rem auto;
}

th {
  text-align: left;
  color: var(--text-medium);
  border-bottom: 1px solid var(--ink-4);
  padding: 0.5rem 0.5rem;
}

tr {
  position: relative;
}

td {
  padding: 0.25rem 0.5rem;
  margin: 0.25rem auto;
}

/* Canonical card-table look (style guide) — shared by .list and .league-list. */
.list {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
}
.list thead th {
  padding: 10px 14px;
  background: var(--surface-2);
  color: var(--ink-3);
  font-size: 0.77rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.list tbody td {
  border-top: 1px solid var(--line-2);
  padding: 10px 14px;
}
.list tbody tr:first-child td { border-top: 0; }
.list tbody tr:hover { background: var(--surface-2); }

.league-list {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
}
.league-list thead th {
  padding: 10px 14px;
  background: var(--surface-2);
  color: var(--ink-3);
  font-size: 0.77rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.league-list tbody td {
  border-top: 1px solid var(--line-2);
  padding: 12px 14px;
}
.league-list tbody tr:first-child td { border-top: 0; }
.league-list tbody tr:hover { background: var(--surface-2); }

.league-list td:first-child:hover {
  cursor: pointer;
  background-color: var(--bg-2);
  border-radius: 10px;
}

.league-list tr:has(.season-meta-cell:hover) td:nth-child(2) {
  border-radius: 10px 0 0 10px;
}

.league-list tr:has(.season-meta-cell:hover) td:last-child {
  border-radius: 0 10px 10px 0;
}

.league-list tr:has(.season-meta-cell:hover) .season-meta-cell {
  background-color: var(--bg-2);
  cursor: pointer;
}

.league-list .league-list__empty {
  color: var(--ink-3);
  font-style: italic;
}

.league-list tbody tr.is-archived td {
  color: var(--ink-3);
}

.league-list tbody tr.is-archived .status-pill {
  vertical-align: middle;
  margin-left: 0.5rem;
}

/* td:first-child {
  position: relative;
  z-index: 2;
  background-color: white;
} */

.stretched-link::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 20%;
  z-index: 1;
  pointer-events: auto;
}

.season-meta-cell {
  border-left: none;
  border-right: none;
}

/*
  ==================
  LEAGUE LIST ITEMS
  ==================
*/

.weeks-progress-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  white-space: nowrap;
}

.progress-track {
  height: 0.75rem;
  flex-grow: 1;
  min-width: 2rem;
  background-color: var(--ink-4);
  border-radius: 99px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background-color: var(--gold);
  border-radius: 99px;
}

/*
  ==================
  REGISTRATION LIST ITEMS
  ==================
*/

tbody tr:last-child td {
  border-bottom: 1px solid var(--ink-4);
}

.registration-form-row input:not([type="submit"]),
.registration-form-row select {
  width: 100%;
  background: white;
  border: 1px solid var(--ink-4);
  border-radius: 10px;
  padding: 0.5rem;
}

input::placeholder,
textarea::placeholder,
select::placeholder {
  font-style: italic;
  color: var(--ink-4);
}

.registration-btn-row {
  display: flex;
  justify-content: flex-end;
  width: 100%;
}

.registration-form-row td {
  background-color: var(--surface-2);
  padding: 0.5rem;
  border-top: 1px solid var(--line);
}

/* Bottom corners only — top sits flush against the body rows above. */
.registration-form-row td:first-child {
  border-bottom-left-radius: var(--r-md);
}

.registration-form-row td:last-child {
  border-bottom-right-radius: var(--r-md);
}

.autocomplete-container {
  position: relative;
}

.search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  border: 1px solid var(--white);
  border-radius: 10px;
}


/*
  .standings rules moved to components/standings.css. They were misfiled
  here, and a couple of them (notably tr:first-of-type { padding: 0 }
  for group-span headers) leaked onto any other page that mounted a
  `.standings` table with a single header row, stripping its header
  padding. The replacement rules in standings.css are scoped to the
  actual group-span cells via th[colspan].
*/