:root {
  color-scheme: light;
  --bg: #f4f6fa;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --text: #111827;
  --muted: #64748b;
  --line: #d8dee8;
  --line-soft: #e8edf4;
  --accent: #b40712;
  --accent-2: #d01828;
  --accent-soft: #fff1f2;
  --navy: #101a35;
  --blue: #256fc7;
  --gold: #c91f2d;
  --green: #16834f;
  --shadow: 0 18px 46px rgba(15, 23, 42, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  background: var(--bg);
  color: var(--text);
  margin: 0;
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.appShell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.1), transparent 28%),
    linear-gradient(180deg, #c00612 0%, #8d030a 62%, #650107 100%);
  color: white;
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-height: 100vh;
  padding: 22px 12px 18px;
  position: sticky;
  top: 0;
}

.brandRow {
  align-items: center;
  display: flex;
  justify-content: space-between;
  min-width: 0;
}

.menuToggle {
  align-items: center;
  background: white;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 6px;
  color: var(--accent);
  cursor: pointer;
  display: none;
  font-size: 24px;
  font-weight: 850;
  height: 42px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  width: 42px;
}

.brand {
  align-items: center;
  display: flex;
  gap: 12px;
  padding: 0 10px 14px;
}

.brandLogo {
  background: rgba(255, 255, 255, 0.94);
  border-radius: 999px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.82), 0 6px 14px rgba(80, 0, 0, 0.22);
  flex: 0 0 46px;
  height: 56px;
  object-fit: contain;
  padding: 4px;
  width: 46px;
}

.brand h1 {
  color: white;
  font-size: 20px;
  font-weight: 850;
  line-height: 1.1;
  white-space: nowrap;
}

.nav {
  display: grid;
  gap: 6px;
}

.navItem {
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.88);
  display: block;
  font-size: 14px;
  font-weight: 760;
  padding: 13px 14px;
}

.navItem:hover,
.navItem.active {
  background: rgba(80, 0, 0, 0.32);
  color: white;
}

.sidebarFooter {
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  display: grid;
  gap: 8px;
  margin-top: auto;
  padding: 16px 10px 0;
}

.sidebarFooter span {
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
}

.sidebarFooter strong {
  font-size: 14px;
}

.mainPane {
  min-width: 0;
}

.topbar {
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 16px;
  height: 62px;
  justify-content: flex-end;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 5;
}

.topbar p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.primary {
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  font-size: 14px;
  font-weight: 760;
  height: 38px;
  padding: 0 13px;
}

.primary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.primary:disabled {
  cursor: wait;
  opacity: 0.62;
}

.secondary {
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  font-size: 14px;
  font-weight: 760;
  height: 38px;
  justify-content: center;
  padding: 0 13px;
}

.secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.primaryAction {
  align-items: center;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 6px;
  color: white;
  cursor: pointer;
  display: inline-flex;
  font-size: 14px;
  font-weight: 850;
  height: 38px;
  justify-content: center;
  padding: 0 14px;
  width: fit-content;
}

.primaryAction:disabled {
  background: #e6eaf0;
  border-color: #d5dce7;
  color: #7b8798;
  cursor: not-allowed;
}

.layout {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(520px, 0.86fr) minmax(540px, 1.14fr);
  padding: 18px 18px 24px;
}

.view[hidden] {
  display: none;
}

.leaderboard,
.details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  min-width: 0;
}

.panelTitle {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 9px;
  padding: 18px;
  padding-right: 112px;
  position: relative;
}

.helpButton {
  background: #101a35;
  border: 1px solid #101a35;
  border-radius: 999px;
  color: white;
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
  height: 30px;
  letter-spacing: 0;
  padding: 0 12px;
  position: absolute;
  right: 16px;
  top: 16px;
  z-index: 2;
}

.helpButton:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.panelTitle[data-help-target="standing-overview"] {
  padding-right: 18px;
}

.standingTitleRow {
  align-items: start;
  display: flex;
  gap: 18px;
  justify-content: space-between;
}

.standingTitle {
  display: grid;
  gap: 12px;
}

.panelTitle h2 {
  color: var(--text);
  font-size: 21px;
  font-weight: 850;
  line-height: 1.1;
}

.panelTitle p,
.detailsHeader p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  margin-top: 5px;
}

.averageText {
  color: #38465f;
  font-weight: 760;
  margin-top: 2px;
  text-align: right;
  white-space: nowrap;
}

.panelTitle[data-help-target="standing-overview"] .averageText {
  padding-top: 34px;
}

.search {
  color: var(--muted);
  display: grid;
  font-size: 12px;
  font-weight: 760;
  gap: 6px;
  width: 280px;
}

.search input {
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  height: 40px;
  outline: none;
  padding: 0 12px;
}

.search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(180, 7, 18, 0.12);
}

.tableWrap,
.matchTableWrap {
  overflow: auto;
}

.tableWrap {
  max-height: calc(100vh - 144px);
}

.mobileListActions {
  display: none;
}

table {
  border-collapse: separate;
  border-spacing: 0;
  min-width: 100%;
  width: 100%;
}

.leaderboard table {
  table-layout: fixed;
}

.leaderboard th:nth-child(4),
.leaderboard td:nth-child(4) {
  width: 78px;
}

.leaderboard th:nth-child(5),
.leaderboard td:nth-child(5) {
  width: 108px;
}

.leaderboard th:nth-child(6),
.leaderboard td:nth-child(6) {
  width: 58px;
}

th {
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
  color: #566176;
  font-size: 12px;
  font-weight: 850;
  height: 40px;
  padding: 0 12px;
  position: sticky;
  text-align: left;
  top: 0;
  z-index: 1;
}

td {
  border-bottom: 1px solid var(--line-soft);
  color: var(--text);
  font-size: 13px;
  height: 48px;
  padding: 0 12px;
  vertical-align: middle;
}

tr[data-selected="true"] td {
  background: #f0f7ff;
}

tr[data-selected="true"] td:first-child {
  box-shadow: inset 3px 0 0 var(--blue);
}

tr[data-favorite="true"] td {
  background: #fff9f9;
}

tr:hover td {
  background: #f8fbff;
}

.favoriteCol {
  text-align: center;
  width: 44px;
}

.idCol,
.idCell {
  text-align: right;
  width: 68px;
}

.pointsCol,
.pointsCell {
  width: 78px;
}

.idCell {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-weight: 760;
}

.star {
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: #9aa5b5;
  cursor: pointer;
  font-size: 19px;
  height: 30px;
  line-height: 1;
  width: 30px;
}

.star:hover,
.star[aria-pressed="true"] {
  color: var(--gold);
}

.favoriteMarker {
  align-items: center;
  color: var(--gold);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 16px;
  height: 18px;
  justify-content: center;
  line-height: 1;
  margin-left: -2px;
  width: 18px;
}

.compareCheck {
  accent-color: var(--accent);
  cursor: pointer;
  height: 18px;
  width: 18px;
}

.nameButton,
.linkButton,
.sortButton {
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  font: inherit;
  padding: 0;
  text-align: left;
}

.linkButton {
  color: var(--blue);
  font-size: 13px;
  font-weight: 760;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.linkButton:hover {
  color: var(--accent);
}

.nameButton {
  color: var(--text);
  display: block;
  font-weight: 760;
  max-width: 100%;
  overflow: hidden;
  overflow-wrap: anywhere;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nameHeader,
.nameCell {
  align-items: center;
  display: flex;
  gap: 10px;
  min-width: 0;
  width: 100%;
}

.nameHeader {
  justify-content: space-between;
}

.nameCell {
  justify-content: flex-start;
}

.rowAvatar {
  align-items: center;
  background: #e8f1ff;
  border: 1px solid #cbdcf5;
  border-radius: 999px;
  color: #2459a6;
  display: inline-flex;
  flex: 0 0 28px;
  font-size: 10px;
  font-weight: 850;
  height: 28px;
  justify-content: center;
  letter-spacing: 0;
  width: 28px;
}

.mobilePoints,
.mobilePointsHeader {
  display: none;
}

.sortButton {
  align-items: center;
  color: #566176;
  display: inline-flex;
  font-size: 12px;
  font-weight: 850;
  gap: 6px;
  height: 100%;
}

.pointsCell {
  color: var(--navy);
  font-size: 14px;
  font-weight: 850;
  text-align: left;
}

.details {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 104px);
}

.detailsHeader {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 14px;
  grid-template-columns: 50px minmax(0, 1fr) 68px;
  padding: 18px;
}

.avatar {
  align-items: center;
  background: linear-gradient(160deg, #1c79d1, #254c9f);
  border-radius: 999px;
  color: white;
  display: flex;
  font-size: 15px;
  font-weight: 850;
  height: 46px;
  justify-content: center;
  width: 46px;
}

.detailsHeader h2 {
  color: var(--text);
  font-size: 21px;
  font-weight: 850;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.score {
  align-items: center;
  background: var(--accent-soft);
  border: 1px solid #f3c4c9;
  border-radius: 6px;
  color: var(--accent);
  display: flex;
  font-size: 24px;
  font-weight: 900;
  height: 50px;
  justify-content: center;
}

.score.aboveAverage {
  background: #ecfdf3;
  border-color: #b7e4c7;
  color: #087443;
}

.score.belowAverage {
  background: var(--accent-soft);
  border-color: #f3c4c9;
  color: var(--accent);
}

.bonus {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 14px 18px;
}

.bonusItem {
  min-width: 0;
}

.bonusItem > span {
  color: var(--muted);
  display: block;
  font-size: 11px;
  font-weight: 850;
  margin-bottom: 3px;
  text-transform: uppercase;
}

.bonusItem strong {
  color: var(--text);
  align-items: center;
  display: flex;
  gap: 6px;
  font-size: 13px;
  font-weight: 780;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.matchSectionTitle {
  align-items: center;
  display: flex;
  min-height: 54px;
  padding: 0 18px;
}

.matchSectionTitle h3 {
  color: var(--text);
  font-size: 15px;
  font-weight: 850;
}

.compareHeader {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 18px;
}

.compareHeader h2 {
  color: var(--text);
  font-size: 21px;
  font-weight: 850;
  line-height: 1.2;
}

.compareHeader p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  margin-top: 4px;
}

.segmentedControl {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  display: inline-flex;
  flex: 0 0 auto;
  padding: 2px;
}

.segment {
  background: transparent;
  border: 0;
  border-radius: 4px;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
  height: 30px;
  padding: 0 10px;
}

.segment.active {
  background: white;
  color: var(--accent);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.compareScoreCards {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 14px 18px;
}

.compareScoreCard {
  background: var(--surface-soft);
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  min-width: 0;
  padding: 10px 12px;
}

.compareScoreCard span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 760;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compareScoreCard strong {
  color: var(--text);
  display: block;
  font-size: 22px;
  font-weight: 900;
  margin-top: 4px;
}

.compareEmpty {
  color: var(--muted);
  font-size: 13px;
  padding: 18px;
}

.matches th {
  top: 0;
}

.matches {
  min-width: 860px;
  table-layout: fixed;
}

.matches th:nth-child(1),
.matches td:nth-child(1) {
  width: 42px;
}

.matches th:nth-child(2),
.matches td:nth-child(2) {
  width: 300px;
}

.matches th:nth-child(3),
.matches td:nth-child(3),
.matches th:nth-child(4),
.matches td:nth-child(4),
.matches th:nth-child(5),
.matches td:nth-child(5) {
  width: 112px;
}

.matches th:nth-child(6),
.matches td:nth-child(6),
.matches th:nth-child(7),
.matches td:nth-child(7) {
  width: 91px;
}

.matches td {
  height: 40px;
}

.compareMatches {
  min-width: 760px;
  table-layout: auto;
}

.compareMatches th,
.compareMatches td {
  width: auto;
}

.compareMatches th:nth-child(n),
.compareMatches td:nth-child(n) {
  width: auto;
}

.compareTip {
  color: var(--text);
  font-size: 12px;
  font-weight: 760;
  margin-bottom: 2px;
}

.modalOverlay {
  align-items: center;
  background: rgba(15, 23, 42, 0.42);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 18px;
  position: fixed;
  z-index: 50;
}

.modalOverlay[hidden] {
  display: none;
}

.modalPanel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.2);
  max-height: min(680px, 90vh);
  max-width: 440px;
  overflow: hidden;
  width: min(100%, 440px);
}

.modalHeader {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 16px 18px;
}

.modalHeader h2 {
  color: var(--text);
  font-size: 19px;
  font-weight: 850;
}

.modalHeader p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

.iconButton {
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 34px;
  font-size: 22px;
  height: 34px;
  justify-content: center;
  line-height: 1;
  width: 34px;
}

.iconButton:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.helpOverlay {
  background: rgba(244, 246, 250, 0.62);
  backdrop-filter: blur(5px);
  inset: 0;
  position: fixed;
  z-index: 70;
}

.helpOverlay[hidden] {
  display: none;
}

.helpArrow {
  inset: 0;
  pointer-events: none;
  position: fixed;
  z-index: 72;
}

.helpArrow path {
  fill: none;
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-width: 3;
}

.helpArrow marker path {
  fill: var(--accent);
}

.helpPopover {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
  display: grid;
  gap: 8px;
  padding: 16px;
  position: fixed;
  z-index: 90;
}

.helpStepCount {
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.helpPopover h2 {
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.2;
}

.helpPopover p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.helpActions {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 6px;
}

.helpActions .iconButton {
  height: 38px;
  width: 38px;
}

.helpActions .secondary:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.helpFocus {
  border-radius: 8px;
  box-shadow: 0 0 0 4px rgba(180, 7, 18, 0.24), 0 18px 46px rgba(15, 23, 42, 0.22);
  position: relative;
  z-index: 82;
}

.predictionRows {
  display: grid;
  max-height: 520px;
  overflow: auto;
  padding: 8px 18px 18px;
}

.predictionRow {
  align-items: center;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  justify-content: space-between;
  min-height: 38px;
}

.predictionRow strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 850;
}

.predictionRow span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.matchName {
  min-width: 230px;
}

.matchName strong {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  font-size: 13px;
  font-weight: 760;
}

.matchName > span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  margin-top: 2px;
}

.positive {
  color: var(--green);
  font-weight: 850;
}

.negative {
  color: var(--accent);
  font-weight: 850;
}

.flag {
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.12);
  flex: 0 0 18px;
  height: 13px;
  object-fit: cover;
  width: 18px;
}

.teamWithFlag {
  align-items: center;
  display: inline-flex;
  gap: 7px;
  min-width: 0;
  vertical-align: middle;
}

.teamWithFlag .teamName {
  display: inline;
  margin: 0;
  text-transform: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.matchDash {
  color: var(--muted);
}

.empty,
.error {
  color: var(--muted);
  padding: 18px;
}

.error {
  color: var(--accent);
}

.statsView {
  padding: 18px 18px 24px;
}

.statsHeader,
.chartPanel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.statsHeader {
  margin-bottom: 18px;
  padding: 20px;
}

.statsHeader h2 {
  color: var(--text);
  font-size: 24px;
  font-weight: 850;
  line-height: 1.15;
}

.statsHeader p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 6px;
}

.statsGrid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.statsBadges {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.statBadge {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  min-width: 0;
  padding: 13px 14px;
}

.statBadge span {
  color: var(--muted);
  display: block;
  font-size: 11px;
  font-weight: 850;
  margin-bottom: 5px;
  text-transform: uppercase;
}

.statBadge strong {
  align-items: center;
  color: var(--text);
  display: flex;
  font-size: 15px;
  font-weight: 850;
  gap: 8px;
  min-width: 0;
}

.statBadge .teamWithFlag {
  align-items: center;
  gap: 11px;
}

.statBadge .teamWithFlag .flag {
  align-self: center;
  margin-right: 5px;
}

.statCount {
  margin-left: 8px;
}

.chartPanel {
  min-width: 0;
  overflow: hidden;
}

.chartPanel h3 {
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  font-weight: 850;
  line-height: 1.35;
  min-height: 64px;
  padding: 16px 18px;
}

.chart {
  display: grid;
  gap: 10px;
  max-height: calc(100vh - 226px);
  overflow: auto;
  padding: 16px 18px 18px;
}

.barRow {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(90px, 0.92fr) minmax(96px, 1.4fr) 34px;
  min-height: 26px;
}

.barLabel {
  color: var(--text);
  font-size: 12px;
  font-weight: 760;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.barTrack {
  background: #eef2f7;
  border-radius: 6px;
  height: 12px;
  overflow: hidden;
}

.barFill {
  background: linear-gradient(90deg, var(--accent), #e04b55);
  border-radius: inherit;
  height: 100%;
  min-width: 4px;
}

.barValue {
  color: var(--navy);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 850;
  text-align: right;
}

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

  .sidebar {
    min-height: auto;
    position: static;
  }

  .sidebarFooter {
    display: none;
  }

  .sidebar {
    width: 100%;
  }

  .brand {
    padding-bottom: 0;
  }

  .menuToggle {
    display: inline-flex;
    flex: 0 0 42px;
  }

  .nav {
    display: none;
  }

  .sidebar.menuOpen .nav {
    display: grid;
  }

  .layout {
    grid-template-columns: 1fr;
  }

  .details,
  .tableWrap {
    max-height: none;
  }

  .statsGrid {
    grid-template-columns: 1fr;
  }

  .statsBadges {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .compareScoreCards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chart {
    max-height: none;
  }
}

@media (max-width: 720px) {
  .brand h1 {
    font-size: 20px;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
    height: auto;
    max-width: 100vw;
    overflow: hidden;
    padding: 12px 14px;
    width: 100vw;
  }

  .topbar p {
    display: block;
    font-size: 12px;
    line-height: 1.35;
    max-width: 100%;
    overflow: hidden;
    overflow-wrap: normal;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
  }

  .primary {
    justify-content: center;
    width: 100%;
  }

  .layout {
    max-width: 100vw;
    overflow: hidden;
    padding: 14px;
  }

  .statsView {
    padding: 14px;
  }

  .statsHeader,
  .chartPanel {
    max-width: 100%;
  }

  .barRow {
    grid-template-columns: minmax(96px, 1fr) minmax(94px, 1.2fr) 28px;
  }

  .statsBadges {
    grid-template-columns: 1fr;
  }

  .leaderboard,
  .details,
  .compareDetails,
  .tableWrap,
  .matchTableWrap {
    max-width: 100%;
  }

  .compareHeader {
    align-items: stretch;
    display: grid;
  }

  .segmentedControl {
    width: 100%;
  }

  .segment {
    flex: 1;
  }

  .compareScoreCards {
    grid-template-columns: 1fr;
  }

  .mobileListActions {
    border-top: 1px solid var(--line);
    display: flex;
    padding: 12px 14px 14px;
  }

  .mobileListActions .secondary {
    width: 100%;
  }

  .panelTitle {
    align-items: stretch;
  }

  .standingTitleRow {
    display: grid;
  }

  .averageText {
    text-align: left;
  }

  .search {
    width: 100%;
  }

  .desktopOnly {
    display: none;
  }

  .favoriteCol {
    width: 38px;
  }

  .idCol,
  .idCell {
    width: 54px;
  }

  .nameCol {
    width: auto;
  }

  .nameHeader,
  .nameCell {
    justify-content: flex-start;
  }

  .leaderboard th:nth-child(3),
  .leaderboard td:nth-child(3) {
    width: auto;
  }

  .leaderboard table,
  .leaderboard thead,
  .leaderboard tbody {
    display: block;
    min-width: 0;
    width: 100%;
  }

  .leaderboard thead tr,
  .leaderboard tbody tr {
    display: grid;
    grid-template-columns: 38px 54px minmax(0, 1fr);
    position: relative;
    width: 100%;
  }

  .leaderboard th,
  .leaderboard td {
    align-items: center;
    display: flex;
    min-width: 0;
  }

  .leaderboard .favoriteCol {
    justify-content: center;
  }

  .leaderboard .idCol,
  .leaderboard .idCell {
    justify-content: flex-end;
    text-align: right;
  }

  .leaderboard .pointsCol,
  .leaderboard .pointsCell {
    display: none;
  }

  .mobilePoints,
  .mobilePointsHeader {
    display: inline-flex;
    flex: 0 0 auto;
    font-weight: 850;
    justify-content: flex-end;
    text-align: right;
  }

  .mobilePoints {
    color: var(--navy);
  }

  .mobilePointsHeader {
    color: #566176;
    font-size: 12px;
  }

  .leaderboard .desktopOnly {
    display: none;
  }

  .detailsHeader {
    grid-template-columns: 42px minmax(0, 1fr) 54px;
    padding: 14px;
  }

  .avatar {
    height: 38px;
    width: 38px;
  }

  .detailsHeader h2 {
    font-size: 18px;
  }

  .score {
    font-size: 20px;
    height: 42px;
  }

  .bonus {
    grid-template-columns: 1fr;
  }

  td,
  th {
    padding-left: 9px;
    padding-right: 9px;
  }
}
