:root {
  color-scheme: light dark;
  --ink: #15241b;
  --muted: #4c5e52;
  --page: #f7faf6;
  --rule: #d3ddd5;
  --fairway: #1b4a31;
  --on-fairway: #f2f7f1;
  --on-fairway-muted: #c4d8c8;
  --flag: #f4c430;
  --on-flag: #1d1a08;
  --link: #1d6a41;
  --field: #ffffff;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e5eee7;
    --muted: #a9bbad;
    --page: #0e1712;
    --rule: #2a3b30;
    --fairway: #163c28;
    --link: #8fd4a8;
    --field: #f7faf6;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-size: 1.0625rem;
  -webkit-text-size-adjust: 100%;
}

::selection {
  background: var(--flag);
  color: var(--on-flag);
}

:focus-visible {
  outline: 3px solid var(--link);
  outline-offset: 2px;
}

.masthead :focus-visible {
  outline-color: var(--flag);
}

a {
  color: var(--link);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-thickness: 2px;
}

.wrap {
  max-width: 44rem;
  margin-inline: auto;
  padding-inline: 1rem;
}

.masthead {
  background: var(--fairway);
  color: var(--on-fairway);
  padding-block: 3rem 2.5rem;
}

.masthead a {
  color: inherit;
}

h1,
.name {
  margin: 0;
  font-size: clamp(3rem, 14vw, 5.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.95;
}

.name a {
  text-decoration: none;
}

.pitch {
  margin: 1rem 0 0;
  max-width: 30ch;
  font-size: clamp(1.25rem, 4.5vw, 1.5rem);
  font-weight: 500;
  line-height: 1.3;
  text-wrap: balance;
}

.invite {
  margin-top: 2rem;
}

.invite label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--on-fairway-muted);
  font-size: 0.9375rem;
}

.field {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

input,
button {
  min-height: 3rem;
  border-radius: 0.5rem;
  font: inherit;
}

input {
  flex: 1 1 14rem;
  min-width: 0;
  border: 1px solid transparent;
  background: var(--field);
  color: #15241b;
  padding-inline: 0.875rem;
}

input::placeholder {
  color: #5d6f62;
}

button {
  flex: 0 0 auto;
  border: 0;
  background: var(--flag);
  color: var(--on-flag);
  font-weight: 700;
  padding-inline: 1.25rem;
  cursor: pointer;
  transition: transform 160ms cubic-bezier(0.16, 1, 0.3, 1);
}

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

button:disabled {
  cursor: progress;
  opacity: 0.7;
  transform: none;
}

.status {
  margin: 0.75rem 0 0;
  max-width: 34rem;
  font-weight: 500;
}

.status:empty {
  margin: 0;
}

main {
  padding-block: 1rem 2rem;
}

h2 {
  margin: 2.5rem 0 0.75rem;
  font-size: 1.375rem;
  letter-spacing: -0.015em;
  line-height: 1.25;
  text-wrap: balance;
}

section > p,
section li {
  max-width: 65ch;
}

ul {
  padding-left: 1.25rem;
}

li + li {
  margin-top: 0.375rem;
}

.sample[aria-busy="true"] {
  min-height: 22rem;
}

.sample > p {
  margin: 0 0 1rem;
  color: var(--muted);
}

.sample > .footnote {
  margin: 1rem 0 0;
  font-size: 0.9375rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

th {
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 600;
  text-align: left;
  padding: 0 0.5rem 0.5rem;
  border-bottom: 2px solid var(--ink);
}

td {
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: baseline;
}

th:first-child,
td:first-child {
  padding-left: 0;
  font-weight: 700;
  white-space: nowrap;
}

th:nth-child(3),
th:nth-child(4),
th:nth-child(5),
td:nth-child(3),
td:nth-child(4),
td:nth-child(5) {
  text-align: right;
}

th:last-child,
td:last-child {
  padding-right: 0;
  text-align: right;
}

td a {
  display: inline-block;
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 0.125rem 0.75rem;
  font-weight: 600;
  text-decoration: none;
}

td a:hover {
  background: var(--link);
  color: var(--page);
}

.unit {
  display: none;
}

footer {
  padding-bottom: 3rem;
  color: var(--muted);
}

footer p {
  margin: 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}

@media (max-width: 36rem) {
  thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  table,
  tbody {
    display: block;
  }

  tr {
    display: grid;
    grid-template-columns: auto auto 1fr auto;
    grid-template-areas:
      "time time time book"
      "course course course course"
      "holes open price price";
    align-items: baseline;
    column-gap: 0.75rem;
    row-gap: 0.125rem;
    padding-block: 0.75rem;
    border-bottom: 1px solid var(--rule);
  }

  td {
    padding: 0;
    border: 0;
  }

  td:nth-child(n) {
    text-align: left;
  }

  td:nth-child(1) { grid-area: time; }
  td:nth-child(2) { grid-area: course; font-weight: 600; }
  td:nth-child(3) { grid-area: holes; }
  td:nth-child(4) { grid-area: open; }
  td:nth-child(5) { grid-area: price; }
  td:nth-child(6) { grid-area: book; align-self: center; }

  td:nth-child(3),
  td:nth-child(4),
  td:nth-child(5) {
    color: var(--muted);
    font-size: 0.9375rem;
  }

  td a {
    padding: 0.5rem 0.875rem;
  }

  button {
    flex-basis: 100%;
  }

  .unit {
    display: inline;
  }
}

@media (prefers-reduced-motion: reduce) {
  button {
    transition: none;
  }
}
