/* Circle 5 — shared design system.
   Greens and cream sampled straight out of the contest logo. */

:root {
  --green-deep: #0C2415;
  --green-dark: #143520;
  --green: #1F4E28;          /* the logo's field */
  --green-lift: #2A6435;
  --cream: #ECEBDA;          /* the logo's type */
  --cream-dim: #C3C6B4;
  --gold: #D4AF37;
  --gold-dim: #8A7326;
  --crimson: #C8102E;
  --line: rgba(236, 235, 218, 0.14);
  --line-strong: rgba(236, 235, 218, 0.28);
  --muted: #8FA394;

  --display: "Anton", "Arial Narrow", sans-serif;
  --body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--green-deep);
  color: var(--cream);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--gold); }

/* ---------- shell ---------- */

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 1.25rem; }
main.wrap { padding-bottom: 3rem; }

/* ---------- hero / footer ---------- */

.hero, footer {
  background:
    linear-gradient(180deg, var(--green) 0%, var(--green-dark) 100%);
  border-bottom: 3px solid var(--gold-dim);
  position: relative;
  overflow: hidden;
}
footer {
  border-bottom: none;
  border-top: 3px solid var(--gold-dim);
  margin-top: 3rem;
  padding: 1.5rem 0;
  text-align: center;
}

/* faint fairway striping, same trick as the World Cup page */
.hero::before, footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    rgba(236, 235, 218, 0.035) 0 1px,
    transparent 1px 58px
  );
  pointer-events: none;
}

/* Only the vertical padding here — a `padding` shorthand would clobber the
   horizontal padding .wrap supplies, and the hero would run edge-to-edge. */
.hero-inner { position: relative; padding-top: 2rem; padding-bottom: 2.25rem; }

.eyebrow, .footer-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 1.6rem;
  height: 2px;
  background: var(--gold);
  vertical-align: 0.28em;
  margin-right: 0.6rem;
}

.hero img.logo {
  display: block;
  width: min(420px, 78vw);
  height: auto;
  margin: 0.9rem 0 0.5rem;
}

.hero .dateline {
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cream-dim);
  margin-bottom: 0.9rem;
}

.hero p.lede {
  max-width: 62ch;
  margin: 0 0 1.25rem;
  color: var(--cream);
  opacity: 0.92;
}

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.42rem 0.7rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(12, 36, 21, 0.45);
}
.chip b { color: var(--gold); font-weight: 700; }

/* ---------- sections ---------- */

section { margin-top: 2.5rem; }

h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.5rem, 4.5vw, 2.1rem);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin: 0;
}
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}
.section-head .sub {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- tables ---------- */

.table-scroll { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 0.85rem;
}
thead th {
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  text-align: left;
  padding: 0.4rem 0.55rem;
  border-bottom: 1px solid var(--line-strong);
  white-space: nowrap;
}
tbody td {
  padding: 0.5rem 0.55rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  white-space: nowrap;
}
tbody tr:hover { background: rgba(236, 235, 218, 0.035); }

td.pos, th.pos { width: 2.6rem; color: var(--muted); }
tbody tr.leader td.pos { color: var(--gold); font-weight: 700; }
td.player {
  font-family: var(--body);
  font-size: 0.95rem;
  white-space: nowrap;
}
tbody tr.leader td.player { color: var(--gold); font-weight: 600; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.score {
  text-align: right;
  font-weight: 700;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}
td.dim, th.dim { color: var(--muted); }

/* ---------- circled-hole badge row ---------- */

.holes { display: flex; gap: 3px; }
.hole {
  width: 1.55rem;
  text-align: center;
  font-size: 0.6rem;
  letter-spacing: 0.02em;
  color: var(--muted);
  line-height: 1.15;
}
.hole .mark {
  display: block;
  margin-top: 2px;
  height: 1.55rem;
  line-height: 1.55rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--cream-dim);
  font-size: 0.74rem;
  font-variant-numeric: tabular-nums;
}
.hole.on .mark {
  background: var(--cream);
  color: var(--green-deep);
  border-color: var(--cream);
  font-weight: 700;
}
/* the one hole that counts for both contests */
.hole.shared .mark {
  box-shadow: 0 0 0 2px var(--gold);
}
.hole.decided .mark {
  border-color: var(--gold);
  color: var(--gold);
}
.hole.on.decided .mark { color: var(--green-deep); }

/* ---------- notes / panels ---------- */

.panel {
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--gold);
  background: rgba(31, 78, 40, 0.35);
  border-radius: 4px;
  padding: 0.9rem 1.1rem;
  margin-top: 1rem;
}
.panel h3 {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.5rem;
}
.panel p { margin: 0.35rem 0; font-size: 0.9rem; }
.panel ul { margin: 0.35rem 0; padding-left: 1.2rem; font-size: 0.9rem; }

.empty {
  border: 1px dashed var(--line-strong);
  border-radius: 4px;
  padding: 2rem 1rem;
  text-align: center;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---------- rules prose ---------- */

.rules { max-width: 68ch; }
.rules h3 {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 1.4rem 0 0.4rem;
}
.rules p, .rules li { opacity: 0.92; }
.rules ol, .rules ul { padding-left: 1.3rem; }
.rules code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: rgba(236, 235, 218, 0.1);
  padding: 0.1em 0.35em;
  border-radius: 3px;
}

/* ---------- buttons / inputs ---------- */

button, .btn {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 0.55rem 0.95rem;
  border-radius: 4px;
  border: 1px solid var(--line-strong);
  background: rgba(236, 235, 218, 0.06);
  color: var(--cream);
  cursor: pointer;
}
button:hover { background: rgba(236, 235, 218, 0.13); }
button.primary {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--green-deep);
  font-weight: 700;
}
button.primary:hover { background: #E4C155; }
button.danger { border-color: rgba(200, 16, 46, 0.6); color: #FF9AA5; }
button:disabled { opacity: 0.45; cursor: not-allowed; }

input, select {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--cream);
  background: rgba(12, 36, 21, 0.6);
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  padding: 0.35rem 0.45rem;
}
input:focus, select:focus {
  outline: 2px solid var(--gold);
  outline-offset: -1px;
  background: var(--green-deep);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  margin: 1rem 0;
}
.toolbar .spacer { flex: 1; }
.status {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.status.ok { color: #7BD39A; }
.status.bad { color: #FF9AA5; }

@media (max-width: 640px) {
  .hero-inner { padding-top: 1.5rem; padding-bottom: 1.75rem; }
  td.player { font-size: 0.88rem; }
  /* Keep the player's name readable while the holes scroll under it. */
  td.player, th.player {
    position: sticky; left: 0; z-index: 1;
    background: var(--green-deep);
  }
  tbody tr:hover td.player { background: #16311f; }
}
