:root {
  color-scheme: light;
  --bg: #f6f2e8;
  --ink: #171914;
  --muted: #696f65;
  --line: #d8d0bf;
  --surface: #fffaf0;
  --green: #0f6b4f;
  --red: #b7363b;
  --gold: #c69a2b;
  --shadow: 0 24px 80px rgb(38 39 30 / 14%);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgb(15 107 79 / 14%), transparent 34%),
    linear-gradient(210deg, rgb(183 54 59 / 12%), transparent 42%),
    var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

main {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 32px 0 56px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  align-items: stretch;
  min-height: 420px;
}

.hero-copy,
.countdown-panel,
.toolbar,
.calendar-panel,
.schedule,
.match-detail {
  background: rgb(255 250 240 / 86%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: clamp(28px, 5vw, 56px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  max-width: 720px;
  font-size: clamp(54px, 8vw, 116px);
  line-height: 0.92;
  letter-spacing: 0;
}

.next-card {
  margin-top: 36px;
}

.next-card .meta,
.muted,
#status {
  color: var(--muted);
}

.next-card h2 {
  margin-top: 10px;
  font-size: clamp(32px, 6vw, 72px);
  line-height: 1;
  letter-spacing: 0;
}

.next-card h2 span,
.match-main h3 span {
  color: var(--red);
  font-size: 0.56em;
  font-weight: 800;
  vertical-align: middle;
}

.time {
  margin-top: 18px;
  font-size: 28px;
  font-weight: 800;
}

.venue {
  margin-top: 8px;
  color: var(--muted);
  font-size: 18px;
}

.text-link,
.text-button {
  display: inline-block;
  margin-top: 18px;
  color: var(--green);
  font-weight: 800;
  text-decoration: none;
}

.text-button {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.countdown-panel {
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    linear-gradient(180deg, rgb(15 107 79 / 92%), rgb(12 73 58 / 94%)),
    var(--green);
  color: white;
}

.countdown-panel span {
  color: rgb(255 255 255 / 72%);
  font-weight: 700;
}

.countdown-panel strong {
  display: block;
  margin: 24px 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1;
  letter-spacing: 0;
}

button,
input,
select {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
}

button {
  padding: 0 18px;
  background: var(--ink);
  color: white;
  border-color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}

.primary-action {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  background: var(--green);
  color: white;
  border-radius: 6px;
  font-weight: 800;
  text-decoration: none;
}

.primary-action.alt {
  background: var(--ink);
}

.market-action {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  background: var(--red);
  color: white;
  border-radius: 6px;
  font-weight: 800;
  text-decoration: none;
}

button:hover {
  transform: translateY(-1px);
}

.countdown-panel button {
  background: white;
  color: var(--green);
  border: 0;
}

.toolbar {
  margin-top: 18px;
  padding: 16px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 160px 180px auto;
  gap: 12px;
  align-items: end;
}

.calendar-panel {
  margin-top: 18px;
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(260px, auto) minmax(280px, auto);
  gap: 16px;
  align-items: center;
}

.calendar-panel h2 {
  font-size: 24px;
}

.panel-note {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.45;
}

.reminder-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.reminder-row label {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  color: var(--ink);
}

.reminder-row input {
  width: auto;
  min-height: 0;
}

.calendar-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.calendar-links a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 6px;
  background: var(--ink);
  color: white;
  font-weight: 800;
  text-decoration: none;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select {
  width: 100%;
  padding: 0 12px;
  background: white;
  color: var(--ink);
}

.content-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 18px;
  align-items: start;
}

.schedule {
  padding: 24px;
}

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

.section-head h2 {
  font-size: 28px;
}

.match-list {
  display: grid;
}

.match-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}

.match-row:hover h3 {
  color: var(--green);
}

.match-row.selected {
  margin: 0 -12px;
  padding-right: 12px;
  padding-left: 12px;
  background: rgb(15 107 79 / 9%);
  border-radius: 6px;
}

.match-time strong {
  display: block;
  font-size: 28px;
}

.match-time span,
.match-main p {
  color: var(--muted);
}

.match-main h3 {
  font-size: 24px;
  line-height: 1.16;
  letter-spacing: 0;
}

.match-main p {
  margin-top: 6px;
}

.empty {
  padding: 32px 0;
  color: var(--muted);
}

.match-detail {
  padding: 24px;
  position: static;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.match-detail h2 {
  font-size: clamp(30px, 5vw, 54px);
  line-height: 1;
  letter-spacing: 0;
}

.detail-grid {
  margin: 22px 0 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.action-row {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.link-section {
  margin-top: 18px;
}

.link-section h3 {
  font-size: 20px;
}

.link-grid {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.link-grid a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.detail-grid div,
.market-card {
  padding: 16px;
  border: 1px solid var(--line);
  background: white;
}

dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

dd {
  margin: 6px 0 0;
  font-size: 18px;
  font-weight: 800;
}

.market-card {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.market-card.compact {
  align-self: auto;
}

.market-card h3 {
  font-size: 24px;
  line-height: 1.1;
}

.market-card p:not(.eyebrow) {
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.market-card a {
  margin-top: 20px;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  background: var(--red);
  color: white;
  border-radius: 6px;
  font-weight: 800;
  text-decoration: none;
}

@media (max-width: 860px) {
  main {
    width: min(100% - 20px, 640px);
    padding-top: 10px;
  }

  .hero,
  .toolbar,
  .calendar-panel,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 0;
  }

  .countdown-panel {
    min-height: 220px;
  }

  .section-head,
  .match-row {
    display: block;
  }

  .calendar-links {
    justify-content: flex-start;
  }

  .match-detail {
    position: static;
  }

  #status {
    margin-top: 8px;
  }

  .match-time {
    margin-bottom: 8px;
  }
}
