.brand-copy {
  display: grid;
  gap: 1px;
  line-height: 1.05;
}

.brand-copy strong {
  font-size: 14px;
}

.brand-copy small {
  color: var(--ice);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.mobile-athlete-name,
.mobile-action-copy {
  display: none;
}

.starter-athlete {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.starter-athlete > strong,
.starter-athlete > span {
  min-width: 0;
}

.starter-card.expanded {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}

.starter-card .player-expand {
  grid-column: 1 / -1;
}

.standings-sort {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 800;
  text-transform: uppercase;
}

.standings-sort.active {
  color: var(--ice);
}

.mobile-hub-list {
  display: grid;
  border-top: 1px solid var(--line);
}

.mobile-hub-list a,
.mobile-hub-list button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  min-height: 62px;
  padding: 11px 4px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  background: transparent;
  border-top: 0;
  border-left: 0;
  border-right: 0;
  text-align: left;
  text-decoration: none;
  width: 100%;
}

.mobile-hub-list a:hover,
.mobile-hub-list a:focus-visible,
.mobile-hub-list button:hover,
.mobile-hub-list button:focus-visible {
  color: var(--ice);
  background: rgba(143, 213, 255, .04);
}

.mobile-hub-list a > span,
.mobile-hub-list button > span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.mobile-hub-list a small,
.mobile-hub-list button small {
  color: var(--muted);
  line-height: 1.3;
}

.mobile-hub-list a > b,
.mobile-hub-list button > b {
  color: var(--ice);
  font-size: 24px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: -4px 0 18px;
  border-bottom: 1px solid var(--line);
}

.public-shell {
  padding-bottom: 0;
}

.auth-tabs a {
  padding: 10px;
  color: var(--muted);
  text-align: center;
  text-decoration: none;
}

.auth-tabs a.active {
  border-bottom: 2px solid var(--red);
  color: var(--text);
}

.auth-message {
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(143, 213, 255, .08);
  color: var(--ice);
}

.terms-check {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  margin: 15px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 700px) {
  .brand {
    gap: 8px;
  }

  .brand-copy strong {
    font-size: 12px;
  }

  .brand-copy small {
    font-size: 8px;
  }

  .demo-tools {
    max-width: 112px;
  }

  .page {
    padding-top: 14px;
  }

  .page-title {
    margin-bottom: 12px;
  }

  .page h1 {
    font-size: 28px;
  }

  .home-view .page {
    padding-top: 10px;
  }

  .home-view .page-title {
    margin-bottom: 8px;
  }

  .home-view .dashboard-main {
    gap: 8px;
  }

  .home-view .dashboard-performance,
  .home-view .weekly-review {
    display: none;
  }

  .home-view .dashboard-now,
  .home-view .dashboard-scorecard {
    padding: 11px 12px;
  }

  .home-view .dashboard-now .section-head {
    margin-bottom: 8px;
  }

  .home-view .dashboard-now-grid {
    gap: 6px;
  }

  .home-view .dashboard-now-actions {
    margin-top: 9px;
  }

  .home-view .dashboard-scorecard {
    gap: 10px;
  }

  .home-view .scorecard-group + .scorecard-group {
    padding-top: 10px;
  }

  .hero {
    min-height: calc(100dvh - 50px - var(--mobile-nav-height));
    padding: 24px 16px;
  }

  .public-shell .hero {
    min-height: calc(100dvh - 50px);
  }

  .hero h1 {
    max-width: 340px;
    font-size: 48px;
  }

  .hero .lede {
    margin: 14px 0;
  }

  .hero-actions {
    margin-top: 14px;
  }

  .squad-compact-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .squad-compact-stats > span {
    min-height: 36px;
    padding: 7px 8px;
    border-left: 0;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: rgba(255, 255, 255, .025);
  }

  .squad-compact-stats > span.ok {
    background: rgba(57, 217, 138, .07);
  }

  .squad-compact-stats > span.bad {
    background: rgba(227, 61, 79, .07);
  }

  .squad-compact-stats b {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
  }

  .person-icon {
    display: inline-block !important;
    min-height: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    font-size: 15px;
    line-height: 1;
  }

  .squad-builder-line {
    grid-template-columns: minmax(0, 1.45fr) minmax(104px, .55fr);
    gap: 8px;
  }

  .player-directory-toolbar {
    padding: 9px 10px;
  }

  .player-directory-toolbar .input {
    min-height: 34px;
    padding: 6px 8px;
  }

  .player-table-wrap {
    overflow: visible;
  }

  .player-athlete-row {
    min-width: 0;
    grid-template-columns: 13px minmax(0, 1fr) 27px 42px 48px 30px;
    gap: 5px;
    min-height: 50px;
    padding: 7px 5px;
  }

  .player-athlete-row > .player-popularity {
    display: block;
    grid-column: 1;
    justify-self: center;
  }

  .player-athlete-row > .player-athlete-name {
    display: flex;
    grid-column: 2;
    min-width: 0;
  }

  .player-athlete-row > .player-fis,
  .player-athlete-row > .player-gender,
  .player-athlete-row > .player-discipline-point {
    display: none;
  }

  .player-athlete-row > .player-nation {
    display: flex;
    grid-column: 3;
    justify-content: center;
    font-size: 19px;
  }

  .player-athlete-row > .player-total {
    display: block;
    grid-column: 4;
    text-align: left;
  }

  .player-athlete-row > .player-price {
    display: block;
    grid-column: 5;
    font-size: 11px;
    text-align: left;
  }

  .player-athlete-row > .athlete-select-toggle,
  .player-athlete-row > .player-team-count {
    display: grid;
    grid-column: 6;
    place-items: center;
    justify-self: end;
  }

  .player-athlete-row > .athlete-select-toggle {
    width: 25px;
    min-width: 25px;
    height: 25px;
    min-height: 25px !important;
    padding: 0 !important;
    border: 2px solid var(--ice);
    border-radius: 50%;
    background: transparent;
  }

  .player-athlete-row.owned > .athlete-select-toggle {
    border-color: var(--green);
    background: rgba(57, 217, 138, .16);
    color: var(--green);
  }

  .desktop-action-copy,
  .desktop-athlete-name {
    display: none;
  }

  .mobile-action-copy,
  .mobile-athlete-name {
    display: inline;
  }

  .mobile-athlete-name {
    max-width: 100%;
    max-height: 2.3em;
    overflow: hidden;
    overflow-wrap: anywhere;
    line-height: 1.12;
    white-space: normal !important;
    text-overflow: clip !important;
  }

  .player-athlete-name button {
    width: 100%;
    min-width: 0;
    line-height: 1.12;
    overflow: hidden;
  }

  .player-athlete-name .news-link {
    flex: 0 0 auto;
    padding: 0 2px;
  }

  .player-athlete-name small,
  .player-nation small {
    display: none;
  }

  .player-athlete-row > .player-expand {
    display: grid;
    grid-column: 1 / -1;
  }

  .starter-grid {
    gap: 3px;
    margin-top: 8px;
  }

  .starter-card {
    min-height: 43px;
    padding: 4px 7px;
    align-items: center;
  }

  .starter-athlete {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1px 5px;
  }

  .starter-athlete > .small {
    grid-column: 1 / -1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .starter-athlete .badge {
    padding: 2px 5px;
    font-size: 9px;
  }

  .starter-controls .button {
    min-width: 58px;
    min-height: 27px;
    padding: 3px 7px;
    font-size: 11px;
  }

  .race-selection-details {
    padding: 0 10px 10px;
  }

  .race-week-toggle,
  .race-week-main {
    min-width: 0;
    overflow: hidden;
  }

  .race-week-main strong,
  .race-week-main small {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .league-quick-links {
    order: -1;
  }

  .dashboard-main > .panel:has(.pending-request-list) {
    order: -1;
  }

  .league-heading {
    display: flex;
    align-items: flex-start;
  }

  .league-heading-actions {
    margin: 0;
    flex: 0 0 auto;
  }

  .league-heading-actions .button {
    min-height: 32px;
    padding: 6px 8px;
    font-size: 11px;
  }

  .standings-controls {
    display: block;
    margin-bottom: 7px;
  }

  .standings-controls .input {
    width: 100%;
    min-height: 32px;
    padding: 5px 8px;
    font-size: 12px;
  }

  .standings-controls select {
    display: none;
  }

  .standings-table-wrap .table,
  .standings-table-wrap .table thead,
  .standings-table-wrap .table tbody {
    display: block;
    width: 100%;
  }

  .standings-table-wrap .table thead {
    color: var(--muted);
    background: rgba(255, 255, 255, .035);
  }

  .standings-table-wrap .table tr {
    display: grid;
    grid-template-columns: 27px minmax(70px, 1.35fr) minmax(62px, 1fr) 42px 46px 17px;
    gap: 4px;
    align-items: center;
    padding: 7px 3px;
  }

  .standings-table-wrap .table th,
  .standings-table-wrap .table td {
    display: block;
    min-width: 0;
    padding: 0;
    border: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 10.5px;
    text-align: left;
  }

  .standings-table-wrap .table td:nth-child(n) {
    grid-column: auto;
    grid-row: auto;
    align-self: center;
    text-align: left;
  }

  .standings-table-wrap .table td:nth-child(4),
  .standings-table-wrap .table td:nth-child(5) {
    text-align: right;
  }

  .standings-table-wrap .table td:nth-child(6) {
    text-align: center;
  }

  .standings-table-wrap .table td:nth-child(1) {
    color: var(--ice);
    font-weight: 800;
  }

  .standings-table-wrap .table td:nth-child(2) a {
    text-decoration: none;
  }

  .standings-manager {
    display: flex !important;
    gap: 3px;
  }

  .manager-marker-slot {
    width: auto;
    min-height: 14px;
    flex: 0 0 auto;
  }

  .manager-name {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .player-marker {
    font-size: 8px;
  }

  .league-directory .section-head {
    margin-bottom: 8px;
  }

  .league-directory .section-head p {
    font-size: 12px;
  }

  .league-search {
    margin-bottom: 8px;
  }

  .league-search .input {
    min-height: 32px;
    padding: 5px 8px;
  }

  .league-directory .table-wrap {
    overflow: visible;
  }

  .league-directory-table,
  .league-directory-table thead,
  .league-directory-table tbody {
    display: block;
    width: 100%;
  }

  .league-directory-table tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 58px 40px 54px;
    gap: 6px;
    align-items: center;
    padding: 8px 0;
  }

  .league-directory-table th,
  .league-directory-table td {
    min-width: 0;
    padding: 0;
    border: 0;
    white-space: normal;
    font-size: 10.5px;
  }

  .league-directory-table th:nth-child(3),
  .league-directory-table td:nth-child(3) {
    text-align: center;
  }

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

  .league-directory-name {
    display: -webkit-box;
    overflow: hidden;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.18;
    text-decoration: none;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .league-directory-description {
    overflow: hidden;
    margin-top: 2px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .league-directory-table .badge {
    padding: 4px 5px;
    font-size: 9px;
  }

  .league-directory-action .row-action {
    min-width: 48px;
    padding: 6px !important;
  }
}

@media (max-width: 700px) and (min-height: 760px) {
  body:has(.home-view > .hero),
  body:has(.home-compact) {
    overflow: hidden;
  }

  .home-compact .page {
    height: calc(100dvh - 50px - var(--mobile-nav-height));
    overflow: hidden;
  }
}
