:root {
  color-scheme: light;
  --bg: #f3f3ea;
  --surface: #ffffff;
  --ink: #17231b;
  --muted: #5f675d;
  --line: #dfe2cf;
  --inn-green-9: #004002;
  --inn-green-8: #105422;
  --inn-green-7: #056731;
  --inn-green-6: #067a2c;
  --inn-green-4: #b5cfb6;
  --sand-4: #c4c3ab;
  --sand-3: #dfe2cf;
  --sand-2: #eaebde;
  --sand-1: #f3f3ea;
  --fpl-purple: #37003c;
  --fpl-green: #00ff85;
  --gold: #97967f;
  --red: #c33a3a;
  --shadow: 0 18px 55px rgba(30, 45, 38, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(125deg, rgba(181, 207, 182, 0.5), transparent 38%),
    linear-gradient(235deg, rgba(55, 0, 60, 0.08), transparent 34%),
    var(--bg);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.site-header,
main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px 0 18px;
}

.brand-block {
  display: grid;
  justify-items: center;
  width: 100%;
}

.brand-logo {
  display: block;
  width: min(760px, 94vw);
  height: auto;
  object-fit: contain;
}

.status-panel {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--muted);
  font-size: 0.94rem;
  white-space: nowrap;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold);
}

.status-dot.ready {
  background: var(--inn-green-6);
}

.status-dot.error {
  background: var(--red);
}

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

.summary-grid article {
  min-height: 118px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
}

.summary-label {
  display: block;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
}

.summary-grid strong {
  display: block;
  margin-bottom: 5px;
  font-size: clamp(1.25rem, 2vw, 1.7rem);
  line-height: 1.1;
}

.summary-grid span:not(.summary-label) {
  display: block;
  color: var(--muted);
}

.table-shell {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
  font-size: 0.95rem;
}

th,
td {
  padding: 8px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

tbody td {
  height: 46px;
}

th {
  background: var(--sand-2);
  color: #434f40;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

tbody tr:hover {
  background: #fbfcf6;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.rank {
  width: 68px;
  color: var(--muted);
  font-weight: 800;
}

.team {
  font-weight: 800;
}

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

.points {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.empty {
  height: 120px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 760px) {
  .site-header {
    align-items: stretch;
  }

  .site-header {
    align-items: center;
    padding-top: 26px;
  }

  .brand-block {
    justify-items: center;
  }

  .brand-logo {
    width: min(520px, 96vw);
  }

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