:root {
  --bg: #fbfbf9;
  --surface: #ffffff;
  --text: #1c1c1a;
  --muted: #8a8a85;
  --line: #e7e7e2;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

main {
  max-width: 60rem;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

section + section {
  margin-top: 3.5rem;
}

/* Záložky */

nav {
  display: flex;
  gap: 1.75rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--line);
}

nav a {
  padding: 0 0 0.7rem;
  margin-bottom: -1px;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

nav a:hover {
  color: var(--text);
}

nav a.active {
  color: var(--text);
  border-bottom-color: var(--text);
}

h1,
h2 {
  margin: 0 0 1.25rem;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* Tabulka */

.scroll {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

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

thead th {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}

th.team {
  font-weight: 400;
  min-width: 12rem;
}

.num {
  text-align: right;
  width: 5.5rem;
}

input {
  width: 4.5rem;
  padding: 0.4rem 0.5rem;
  font: inherit;
  text-align: right;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 5px;
}

input:hover {
  border-color: #cfcfc9;
}

input:focus {
  outline: none;
  border-color: var(--text);
}

.total {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Pořadí */

#ranking {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 34rem;
}

#ranking li {
  display: flex;
  gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
}

.place {
  width: 1.75rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.name {
  flex: 1;
}

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

/* Odpovědi */

.answers td {
  padding-top: 0.7rem;
  padding-bottom: 0.7rem;
  vertical-align: top;
  white-space: pre-line;
}

.answers .nr {
  width: 2rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.answers .answer {
  width: 38%;
  font-weight: 600;
}

.note {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.85rem;
  color: var(--muted);
}

#reset {
  margin-top: 3rem;
  padding: 0;
  font: inherit;
  font-size: 0.85rem;
  color: var(--muted);
  background: none;
  border: 0;
  cursor: pointer;
}

#reset:hover {
  color: var(--text);
  text-decoration: underline;
}
