:root {
  --ink: #17231b;
  --muted: #677068;
  --paper: #f5f3ed;
  --card: #fffefa;
  --line: #dcded7;
  --green: #1f6a42;
  --green-soft: #dceadf;
  --sand: #e9dfc7;
  --over: #8a4a35;
  --shadow: 0 18px 50px rgba(32, 43, 34, 0.08);
}

* { box-sizing: border-box; }

html { background: var(--paper); color: var(--ink); }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 80% -10%, rgba(58, 113, 77, 0.15), transparent 34rem),
    var(--paper);
}

button, select { font: inherit; }

.site-header {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wordmark, .home-link { color: var(--ink); text-decoration: none; }
.wordmark { font-family: Georgia, serif; font-weight: 700; font-size: 1.05rem; }
.home-link { color: var(--muted); font-size: 0.9rem; }
.home-link:hover { color: var(--green); }

.page-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 44px 0 80px;
}

.round-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 48px;
}

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

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

h1 {
  margin-bottom: 12px;
  font: 700 clamp(2.7rem, 7vw, 5.8rem)/0.92 Georgia, serif;
  letter-spacing: -0.055em;
  max-width: 760px;
}

.lede { margin-bottom: 0; color: var(--muted); font-size: 1.08rem; }

.round-picker {
  position: relative;
  display: grid;
  gap: 8px;
  min-width: 290px;
}

.round-picker::after {
  content: "";
  position: absolute;
  right: 16px;
  bottom: 18px;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--green);
  border-bottom: 2px solid var(--green);
  transform: rotate(45deg);
  pointer-events: none;
}
.round-picker span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.round-picker select {
  appearance: none;
  width: 100%;
  min-height: 50px;
  padding: 0 48px 0 16px;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(32, 43, 34, 0.06);
  cursor: pointer;
  font-weight: 650;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.round-picker select:hover {
  border-color: #aeb8af;
  box-shadow: 0 10px 28px rgba(32, 43, 34, 0.1);
}

.round-picker select:focus-visible {
  outline: 3px solid rgba(31, 106, 66, 0.18);
  outline-offset: 2px;
  border-color: var(--green);
}

.round-identity {
  padding: 28px 30px;
  background: var(--ink);
  color: white;
  border-radius: 14px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.round-identity h2 {
  margin-bottom: 8px;
  font: 700 clamp(1.7rem, 4vw, 2.6rem)/1 Georgia, serif;
  letter-spacing: -0.03em;
}

.round-meta { margin: 0; color: #bdc8c0; }
.score-lockup { text-align: right; flex: 0 0 auto; }
.score-lockup strong { display: block; font: 700 4rem/0.85 Georgia, serif; }
.score-lockup span { color: #bdc8c0; font-size: 0.85rem; }

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 14px 0 42px;
}

.metric {
  min-height: 128px;
  padding: 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.metric-label { display: block; margin-bottom: 18px; color: var(--muted); font-size: 0.78rem; }
.metric-value { display: block; font: 700 2.25rem/1 Georgia, serif; }
.metric-note { display: block; margin-top: 7px; color: var(--muted); font-size: 0.76rem; }

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.8fr);
  gap: 26px;
  align-items: start;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel-heading { padding: 24px 26px 16px; }
.panel-heading h2 { margin-bottom: 5px; font: 700 1.45rem/1.1 Georgia, serif; }
.panel-heading p { margin-bottom: 0; color: var(--muted); font-size: 0.85rem; }

.nine { padding: 0 18px 22px; overflow-x: auto; }
.nine + .nine { padding-top: 20px; border-top: 1px solid var(--line); }
.nine h3 { margin: 0 8px 10px; color: var(--muted); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; }

table { width: 100%; min-width: 600px; border-collapse: collapse; table-layout: fixed; }
th, td { padding: 10px 5px; border-top: 1px solid var(--line); text-align: center; font-size: 0.85rem; }
th[scope="row"] { width: 70px; color: var(--muted); text-align: left; font-weight: 600; }
thead th { color: var(--muted); font-size: 0.72rem; font-weight: 700; }
.total-cell { background: #f0f1ec; font-weight: 800; }
.score-cell span {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  font-weight: 800;
}
.score-cell.par span { color: var(--green); background: var(--green-soft); }
.score-cell.bogey span { box-shadow: inset 0 0 0 1px var(--sand); }
.score-cell.double span, .score-cell.worse span { color: var(--over); box-shadow: inset 0 0 0 2px var(--over); }
.score-cell.birdie span { color: white; background: var(--green); }

.putt-cell span {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 6px;
}

.putt-cell.one-putt span {
  color: var(--green);
  background: var(--green-soft);
  font-weight: 800;
}

.putt-cell.three-putt span {
  color: white;
  background: var(--over);
  font-weight: 800;
}

.gir-cell span {
  display: inline-grid;
  width: 26px;
  height: 26px;
  place-items: center;
  color: var(--green);
  background: var(--green-soft);
  border-radius: 50%;
  font-weight: 900;
}

.analysis { padding: 24px 26px 26px; }
.analysis h2 { margin-bottom: 22px; font: 700 1.45rem/1.1 Georgia, serif; }
.analysis-list { list-style: none; margin: 0; padding: 0; }
.analysis-list li { padding: 18px 0; border-top: 1px solid var(--line); }
.analysis-list li:first-child { padding-top: 0; border-top: 0; }
.analysis-list strong { display: block; margin-bottom: 6px; font-size: 0.9rem; }
.analysis-list span { color: var(--muted); font-size: 0.86rem; line-height: 1.5; }
.fine-print { margin: 22px 0 0; color: var(--muted); font-size: 0.72rem; line-height: 1.5; }

.empty { padding: 40px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }

@media (max-width: 860px) {
  .round-header { align-items: stretch; flex-direction: column; }
  .round-picker { min-width: 0; max-width: 420px; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .content-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .site-header, .page-shell { width: min(100% - 24px, 1180px); }
  .site-header { padding: 18px 0; }
  .page-shell { padding-top: 26px; }
  .round-header { margin-bottom: 30px; }
  .round-identity { align-items: flex-start; padding: 22px; }
  .score-lockup strong { font-size: 3.2rem; }
  .metric-grid { gap: 9px; margin-bottom: 26px; }
  .metric { min-height: 112px; padding: 17px; }
  .metric-value { font-size: 1.9rem; }
  .panel-heading, .analysis { padding-left: 20px; padding-right: 20px; }
}
