:root {
  --pine: #17352a;
  --pine-soft: #2c5242;
  --clay: #b4512b;
  --clay-dark: #93401f;
  --chalk: #f6f0e2;
  --paper: #fffdf8;
  --line: #ded5c1;
  --ink: #1e2622;
  --muted: #5e675f;
  --error-bg: #fbe9e1;
  --error-ink: #8a2f10;
  --display: Rockwell, "Roboto Slab", "Rokkitt", Georgia, serif;
  --poster: Impact, Haettenschweiler, "Arial Narrow", sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--chalk);
  color: var(--ink);
  font: 16px/1.5 var(--body);
}

h1, h2 { font-family: var(--display); line-height: 1.1; margin: 0; }
a { color: var(--clay-dark); }

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

/* Top bar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px clamp(16px, 5vw, 56px);
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--pine);
  font: 700 22px var(--display);
  text-decoration: none;
}
.wordmark span { color: var(--clay); margin-left: -8px; }
.topbar nav { display: flex; align-items: center; gap: 16px; white-space: nowrap; }
.topbar nav a:not(.button), .link-button {
  color: var(--pine);
  font: 500 15px var(--body);
  text-decoration: none;
}
.topbar form { margin: 0; }
.link-button { background: none; border: 0; padding: 0; cursor: pointer; }
.topbar nav a:not(.button):hover, .link-button:hover { text-decoration: underline; }

/* Buttons */
.button {
  display: inline-block;
  padding: 13px 24px;
  border: 0;
  border-radius: 6px;
  background: var(--clay);
  color: #fff;
  font: 600 16px var(--body);
  text-decoration: none;
  cursor: pointer;
  transition: background .15s;
}
.button:hover { background: var(--clay-dark); }
.button-small { padding: 7px 14px; font-size: 15px; }
.button-full { width: 100%; }

/* Messages */
.flashes { max-width: 440px; margin: 0 auto; padding: 0 16px; }
.flash { margin: 8px 0; padding: 10px 14px; border-radius: 6px; }
.flash-error { background: var(--error-bg); color: var(--error-ink); }
.flash-success { background: #e2eee5; color: var(--pine); }

/* Home */
.page-home { background: var(--pine); }
.page-home .wordmark, .page-home .topbar nav a:not(.button), .page-home .link-button { color: var(--chalk); }
.page-home .wordmark span { color: #e58a60; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 5vw, 72px);
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(24px, 6vw, 72px) clamp(16px, 5vw, 56px);
  color: var(--chalk);
}
.eyebrow {
  margin: 0 0 12px;
  color: var(--clay);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.page-home .eyebrow { color: #e58a60; }
.hero h1 { font-size: clamp(38px, 6vw, 68px); }
.lede { max-width: 34em; margin: 20px 0 28px; color: #d8dccf; font-size: clamp(17px, 2vw, 20px); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.text-link { color: var(--chalk); }

.diamond { width: 100%; max-width: 480px; justify-self: center; }
.diamond .grass { fill: var(--pine-soft); }
.diamond .clay { fill: var(--clay); }
.diamond .infield { fill: #3b6a55; }
.diamond .chalk { fill: none; stroke: var(--chalk); stroke-width: 3; }
.diamond .mound { fill: var(--clay); }
.diamond .base { fill: var(--chalk); }

/* Forms */
.card {
  width: min(440px, calc(100% - 32px));
  margin: 24px auto 56px;
  padding: clamp(24px, 5vw, 36px);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.card h1 { margin-bottom: 20px; color: var(--pine); font-size: 32px; }
.social-buttons { display: grid; gap: 10px; }
.social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}
.social:hover { border-color: var(--pine); }

.divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--muted); font-size: 14px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

form label { display: block; margin-bottom: 16px; font-size: 14px; font-weight: 600; }
form input:not([type=hidden]) {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 11px 12px;
  background: #fff;
  border: 1px solid #b9b09b;
  border-radius: 6px;
  color: var(--ink);
  font: 16px var(--body);
}
form small { display: block; margin-top: 4px; color: var(--muted); font-weight: 400; }
form small[hidden] { display: none; }
.card-footer { margin: 20px 0 0; color: var(--muted); font-size: 15px; text-align: center; }

/* Dugout */
.dugout { max-width: 960px; margin: 0 auto; padding: 32px clamp(16px, 5vw, 56px) 56px; }
.dugout h1 { color: var(--pine); font-size: clamp(34px, 6vw, 52px); overflow-wrap: anywhere; }
.meta { margin: 8px 0 32px; color: var(--muted); }
.panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.panel { padding: 24px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; }
.panel h2 { margin-bottom: 8px; color: var(--pine); font-size: 22px; }
.panel p { margin: 0; color: var(--muted); }

.panel-wide { grid-column: 1 / -1; }
.highlight-form {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
  margin: 12px 0 20px;
}
.highlight-form label { margin: 0; }
.upload-progress { grid-column: 1 / -1; }
.upload-progress progress { display: block; width: 100%; margin-bottom: 4px; accent-color: var(--clay); }
.video-status { color: var(--muted); font-size: 15px; }
.highlights { margin: 0; padding: 0; list-style: none; }
.highlights li {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.highlights time { color: var(--muted); font-size: 15px; }
.highlights a { font-weight: 600; }
.highlights form { margin: 0; }
.highlights .link-button { color: var(--muted); font: 14px var(--body); }
.highlights .link-button:hover { color: var(--error-ink); text-decoration: underline; }

/* Member pages */
.member-menu {
  display: flex;
  overflow-x: auto;
  padding: 0 clamp(16px, 5vw, 56px);
  background: #e8e1d0;
  border-top: 1px solid var(--line);
  border-bottom: 2px solid var(--pine);
}
.member-menu a {
  padding: 12px 20px;
  color: var(--pine);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.member-menu a:hover { background: #dcd3bd; }
.member-menu a[aria-current="page"] { background: var(--pine); color: var(--chalk); }
.page-member .site-footer {
  margin-top: 24px;
  padding: 16px clamp(16px, 5vw, 56px);
  border-top: 2px solid var(--pine);
  text-align: right;
}

/* Player page */
.player {
  max-width: 1160px;
  margin: 0 auto;
  padding: 28px clamp(16px, 5vw, 56px) 40px;
  --link: #2a4cb0;
}
.player a:not(.button, .pill) { color: var(--link); }
.player-header {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 28px;
  padding-bottom: 32px;
  border-bottom: 3px solid var(--ink);
}
.player-photo {
  align-self: start;
  aspect-ratio: 10 / 13;
  overflow: hidden;
  background: #e2e4e8;
  border: 2px solid var(--ink);
}
.player-photo svg { display: block; width: 100%; height: 100%; fill: #9ca3af; }
.player-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.player-title { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-bottom: 6px; }
.player h1, .player h2 { color: var(--ink); font-family: var(--poster); font-weight: 400; }
.player h1 { font-size: clamp(36px, 5vw, 48px); overflow-wrap: anywhere; }
.player-info p { margin: 0 0 4px; font-size: 15px; }
.not-set { color: var(--muted); }

.table-scroll { overflow-x: auto; }
.summary { width: 100%; min-width: 520px; border-collapse: collapse; }
.summary th, .summary td { padding: 8px 10px; text-align: left; font-size: 15px; }
.summary thead th { color: var(--muted); font-weight: 700; }
.summary thead th:first-child { color: var(--ink); font-family: var(--poster); font-size: 17px; font-weight: 400; letter-spacing: .04em; text-transform: uppercase; }
.summary th:first-child { width: 15%; border-right: 1px solid var(--line); }
.summary .career td { font-size: 20px; font-weight: 700; }
.table-note { margin: 4px 0 0; padding: 0 10px 12px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px; }

.player-section { margin-top: 36px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.section-heading h2 { font-size: 28px; }
.pill {
  padding: 7px 16px;
  background: #fffdf8;
  border: 1px solid #b9b09b;
  border-radius: 999px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.pill:hover { border-color: var(--ink); }

.reel {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.player .reel a { display: block; color: var(--ink); text-decoration: none; }
.reel-video {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  margin-bottom: 8px;
  background: #1f2633;
  border-radius: 6px;
}
.reel li:nth-child(even) .reel-video { background: #3a4252; }
.reel-video img, .reel-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}
.reel-play {
  position: relative;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, .15);
  border: 2px solid #fff;
  border-radius: 50%;
}
.reel-play::after {
  content: "";
  margin-left: 4px;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-left: 14px solid #fff;
}
.reel a:hover strong { text-decoration: underline; }
.reel strong { display: block; font-size: 15px; }
.reel small { display: block; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }

.stats { width: 100%; background: #fff; border: 1px solid var(--line); border-collapse: collapse; font-size: 14px; }
.stats th, .stats td { padding: 8px 10px; text-align: left; white-space: nowrap; }
.stats th { background: #eef0f0; border-bottom: 2px solid var(--ink); }
.stats td { border-bottom: 1px solid var(--line); }

/* Edit profile */
.privacy-help { clear: both; display: block; margin-top: 10px; color: var(--muted); font-size: 14px; }
.region-field { position: relative; font-size: 14px; font-weight: 600; }
.region-field input { font-weight: 400; }
#region-options {
  position: absolute;
  z-index: 10;
  left: 0;
  right: 0;
  margin: 2px 0 0;
  padding: 4px 0;
  background: #fff;
  border: 1px solid #b9b09b;
  border-radius: 6px;
  box-shadow: 0 6px 16px rgba(23, 53, 42, .15);
  font-size: 16px;
  font-weight: 400;
  list-style: none;
}
#region-options li { padding: 8px 12px; cursor: pointer; }
#region-options li:hover, #region-options li[aria-selected="true"] { background: #e9e1cf; }
.photo-field { clear: both; display: flex; align-items: flex-start; gap: 20px; }
.photo-field img { flex: none; border: 1px solid var(--ink); object-fit: cover; }
.photo-field > div { flex: 1; min-width: 0; }
.form-actions { display: flex; align-items: center; gap: 20px; }
.profile-form { display: grid; gap: 16px; justify-items: start; }
.profile-form .panel { width: 100%; margin: 0; }
.profile-form fieldset { min-width: 0; }
.profile-form legend {
  float: left;
  width: 100%;
  margin-bottom: 12px;
  padding: 0;
  color: var(--pine);
  font: 700 22px var(--display);
}
.choices {
  clear: both;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  gap: 10px 16px;
}
.choices label { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 15px; font-weight: 500; }
.choices input:not([type=hidden]) { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--clay); }
.profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.profile-grid label { margin: 0; }
.profile-wide { grid-column: 1 / -1; }
form select {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 11px 12px;
  background: #fff;
  border: 1px solid #b9b09b;
  border-radius: 6px;
  color: var(--ink);
  font: 16px var(--body);
}
form select:disabled { background: #eee9dc; color: var(--muted); }

/* Policy */
.policy { max-width: 720px; margin: 0 auto; padding: 24px 16px 40px; }
.policy h1 { color: var(--pine); font-size: clamp(32px, 6vw, 44px); }
.policy h2 { margin: 28px 0 8px; color: var(--pine); font-size: 22px; }
.policy p, .policy ul { margin: 0 0 12px; }
.policy .meta { color: var(--muted); }

/* Footer */
.site-footer { padding: 16px; font-size: 14px; text-align: center; }
.page-home .site-footer a { color: var(--chalk); }

@media (max-width: 760px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .diamond { max-width: 320px; }
  .panels { grid-template-columns: minmax(0, 1fr); }
  .highlight-form { grid-template-columns: minmax(0, 1fr); }
  .player-header { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .player-photo { width: 120px; }
  .reel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 420px) {
  .topbar { gap: 8px; }
  .topbar nav { gap: 10px; }
  .wordmark { font-size: 19px; }
  .wordmark span { margin-left: -7px; }
}
