* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}
body {
  margin: 0;
  background: var(--idv-background);
  color: var(--idv-text);
  font-family: var(--idv-font);
  line-height: 1.55;
}
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  color: var(--idv-accent);
}
button,
input,
select {
  font: inherit;
}
button {
  border: 1px solid #498154;
  background: var(--idv-primary);
  color: var(--idv-onPrimary);
  padding: 0.65rem 1rem;
  border-radius: 7px;
  cursor: pointer;
  font-weight: 650;
  min-height: 44px;
}
button:hover {
  filter: brightness(1.15);
}
button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
button.quiet {
  background: transparent;
  border-color: var(--idv-border);
}
:focus-visible {
  outline: 3px solid var(--idv-focus);
  outline-offset: 4px;
}
header {
  min-height: 80px;
  border-bottom: 1px solid var(--idv-border);
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 1rem max(5vw, calc((100vw - 1200px) / 2));
  background: var(--idv-sidebar);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.brand b {
  color: var(--idv-accent);
}
nav {
  display: flex;
  flex: 1;
  justify-content: flex-end;
  gap: 1.7rem;
  font-size: 0.9rem;
  color: var(--idv-textMuted);
}
header form {
  margin: 0;
}
main {
  max-width: 1200px;
  margin: auto;
  padding: 0 24px 60px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  line-height: 1.1;
  letter-spacing: -0.045em;
  max-width: 780px;
  overflow-wrap: anywhere;
  margin-bottom: 1rem;
}
h2 {
  font-size: 1.65rem;
  letter-spacing: -0.025em;
  margin-bottom: 0;
}
h3 {
  font-size: 1.15rem;
  overflow-wrap: anywhere;
}
section {
  margin: 3.5rem 0;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--idv-accent);
  margin-bottom: 0.6rem;
}
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 3rem 0 1rem;
}
.hero > div {
  flex: 1;
}
.hero > img {
  object-fit: contain;
  width: 190px;
  height: auto;
  filter: drop-shadow(0 10px 35px #0006);
}
.hero > div > p:not(.eyebrow) {
  color: var(--idv-textMuted);
  font-size: 1.1rem;
}
.hero-meta {
  display: flex;
  gap: 1.3rem;
  flex-wrap: wrap;
  align-items: center;
  color: var(--idv-textMuted);
  font-size: 0.85rem;
}
.badge {
  border: 1px solid #47654c;
  background: #243c2a;
  color: #a1dcac;
  border-radius: 4px;
  padding: 0.25rem 0.65rem;
}
.phase-track {
  display: flex;
  padding: 1rem 0;
  list-style: none;
  border-block: 1px solid var(--idv-border);
  gap: 1rem;
  justify-content: space-between;
  flex-wrap: wrap;
  font-size: 0.85rem;
  text-transform: capitalize;
  color: var(--idv-textMuted);
}
.phase-track li {
  display: flex;
  gap: 0.5rem;
}
.phase-track span {
  font-size: 0.7rem;
  opacity: 0.7;
}
.phase-track [aria-current] {
  color: var(--idv-accent);
  font-weight: 700;
}
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.section-title > span {
  color: var(--idv-textMuted);
  font-size: 0.8rem;
}
.team-grid,
.round-grid,
.series-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.panel,
.team-card,
.participants article {
  background: var(--idv-surface);
  border: 1px solid var(--idv-border);
  border-radius: 10px;
  padding: 1.25rem;
}
.team-card {
  border-top: 3px solid #478452;
}
.team-card:nth-child(2) {
  border-top-color: var(--idv-accent);
}
.team-card:nth-child(3) {
  border-top-color: var(--idv-brown);
}
.team-heading {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.team-heading h3 {
  margin-bottom: 0.1rem;
}
.team-heading p {
  font-size: 0.8rem;
  color: var(--idv-textMuted);
  margin: 0;
}
.team-number {
  font-size: 1.6rem;
  letter-spacing: -0.04em;
  color: var(--idv-accent);
  font-weight: 800;
}
.roster {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}
.roster li {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 1rem;
  border-bottom: 1px solid var(--idv-border);
  padding: 0.8rem 0;
  font-size: 0.9rem;
}
.route {
  color: var(--idv-textMuted);
  font-size: 0.8rem;
}
.roster small {
  display: block;
  font-size: 0.65rem;
  color: var(--idv-textMuted);
}
.leader {
  font-size: 0.65rem;
  background: var(--idv-accent);
  color: #171a18;
  border-radius: 3px;
  padding: 0 0.2rem;
}
.muted {
  color: var(--idv-textMuted);
}
.team-card > p {
  font-size: 0.75rem;
  margin: 0;
}
details {
  margin-top: 1rem;
}
summary {
  cursor: pointer;
  color: var(--idv-accent);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.2rem 0;
}
form {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: 1rem;
}
label {
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
input,
select {
  width: 100%;
  min-width: 0;
  border: 1px solid #536057;
  border-radius: 6px;
  background: #171c18;
  color: var(--idv-text);
  padding: 0.65rem;
  min-height: 44px;
}
select option {
  color: var(--idv-text);
  background: var(--idv-background);
}
.participants {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}
.participants p {
  font-size: 0.8rem;
  margin: 0.3rem 0 0;
}
.participants strong {
  overflow-wrap: anywhere;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}
.inline {
  display: inline-flex;
  margin: 0;
}
.pick-panel {
  margin-top: 1.5rem;
}
.pick-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.pick-grid form {
  margin: 0;
}
.pick-grid small {
  display: block;
  font-size: 0.75rem;
  color: var(--idv-textMuted);
  margin-top: 0.4rem;
}
.round-grid ol {
  padding-left: 1.3rem;
  font-size: 0.8rem;
}
.round-grid li {
  padding: 0.4rem 0;
}
.round-grid li span {
  display: block;
  color: var(--idv-textMuted);
}
.table-wrap {
  overflow: auto;
  border: 1px solid var(--idv-border);
  border-radius: 9px;
}
table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
  font-size: 0.9rem;
}
th,
td {
  text-align: left;
  padding: 1.2rem;
  border-bottom: 1px solid var(--idv-border);
}
thead {
  background: var(--idv-surface);
  color: var(--idv-textMuted);
  font-size: 0.75rem;
}
tbody th span {
  margin-left: 0.75rem;
}
.points {
  color: var(--idv-accent);
  font-weight: 800;
}
.series-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.series-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--idv-textMuted);
  margin-bottom: 1rem;
}
.score {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}
.score span {
  color: var(--idv-textMuted);
  font-size: 1.1rem;
}
.games {
  list-style: none;
  padding: 0;
}
.games li {
  padding: 0.8rem 0;
  border-top: 1px solid var(--idv-border);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem;
  font-size: 0.85rem;
}
.games li > strong {
  text-align: right;
  overflow-wrap: anywhere;
}
.games details {
  grid-column: 1 / -1;
  margin: 0;
}
.games form {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
}
.final-section {
  border: 1px solid #726037;
  border-radius: 12px;
  padding: 2rem;
  background: linear-gradient(130deg, #303025, #202521);
}
.champion {
  border-left: 3px solid var(--idv-accent);
  padding: 1rem 1.5rem;
  margin: 1rem 0 2rem;
  background: #e9b84709;
}
.champion h3 {
  font-size: 2.3rem;
  margin-bottom: 0.4rem;
}
.champion p {
  color: var(--idv-textMuted);
  font-size: 0.85rem;
  margin-bottom: 0;
}
.final-score {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  text-align: center;
}
.final-score > span {
  font-size: 2.8rem;
  font-weight: 800;
  white-space: nowrap;
  color: var(--idv-accent);
}
.center {
  text-align: center;
}
.leg-scores {
  display: flex;
  justify-content: center;
  gap: 3rem;
}
.final-games {
  margin-bottom: 2rem;
}
.final-games li {
  padding: 1rem 0;
}
.notice,
#feedback {
  border: 1px solid var(--idv-accent);
  padding: 1rem;
  border-radius: 8px;
  margin: 1rem 0;
  background: #e9b8470c;
}
.admin-banner {
  font-size: 0.8rem;
  color: var(--idv-accent);
  padding-top: 1rem;
}
.login,
.empty {
  max-width: 520px;
  margin: 5rem auto;
}
.login h1 {
  font-size: 2rem;
}
.empty {
  max-width: 650px;
}
.empty form {
  max-width: 420px;
}
footer {
  border-top: 1px solid var(--idv-border);
  text-align: center;
  padding: 2.5rem;
  color: var(--idv-textMuted);
  font-size: 0.75rem;
}
footer > span {
  font-weight: 800;
  letter-spacing: 0.15em;
  color: var(--idv-text);
}
footer p {
  margin: 0.5rem 0;
}
dialog {
  background: var(--idv-surface);
  color: var(--idv-text);
  border: 1px solid var(--idv-accent);
  border-radius: 12px;
  max-width: 540px;
  padding: 2rem;
  width: calc(100% - 2rem);
}
dialog::backdrop {
  background: #000b;
}
dialog h2 {
  margin-bottom: 1rem;
}
.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  background: var(--idv-background);
  padding: 1rem;
}
.skip-link:focus {
  top: 0;
}
body[aria-busy="true"] button {
  pointer-events: none;
  opacity: 0.6;
}
@media (max-width: 800px) {
  header {
    flex-wrap: wrap;
    gap: 0.8rem;
    padding: 1rem 24px;
  }
  nav {
    order: 3;
    flex-basis: 100%;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.8rem;
  }
  header > form {
    margin-left: auto;
  }
  .hero {
    padding-top: 1rem;
    gap: 0.75rem;
  }
  .hero > img {
    width: 110px;
  }
  .hero .eyebrow {
    font-size: 0.6rem;
  }
  .hero-meta {
    gap: 0.6rem;
  }
  .team-grid,
  .round-grid {
    grid-template-columns: 1fr;
  }
  .participants {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .pick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .section-title {
    align-items: start;
  }
  .section-title > span {
    max-width: 120px;
    text-align: right;
  }
  .series-grid {
    grid-template-columns: 1fr;
  }
  .final-section {
    padding: 1.2rem;
  }
  .final-score {
    gap: 0.8rem;
  }
  .final-score > strong {
    font-size: 0.85rem;
  }
  .final-score > span {
    font-size: 2rem;
  }
  .phase-track {
    font-size: 0.7rem;
    gap: 0.75rem;
  }
  .phase-track li {
    gap: 0.2rem;
  }
  section {
    margin: 2.5rem 0;
  }
  main {
    padding-inline: 18px;
  }
  .games form {
    grid-template-columns: 1fr;
  }
  .participants article {
    padding: 1rem;
  }
  .participants strong {
    font-size: 0.9rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}
