:root {
  --navy: #071d3a;
  --navy-2: #102f57;
  --red: #c9162f;
  --red-dark: #a90f25;
  --ink: #172033;
  --muted: #657185;
  --line: #dfe4ec;
  --gray: #f4f6f9;
  --gray-2: #e9eef5;
  --white: #fff;
  --green: #12805c;
  --orange: #b65d12;
  --shadow: 0 18px 48px rgba(7, 29, 58, .12);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: Montserrat, Arial, sans-serif;
  font-weight: 400;
  line-height: 1.5;
}

button,
input,
select,
textarea {
  font: inherit;
}

input[type="checkbox"] {
  width: 17px;
  min-height: 17px;
  height: 17px;
  margin: 0;
  padding: 0;
  accent-color: var(--red);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
}

.checkbox-label span {
  display: grid;
  gap: 2px;
}

.checkbox-label small {
  color: var(--muted);
  font-size: .68rem;
  font-weight: 400;
}

.action-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.edit-panel {
  border-left: 3px solid var(--red);
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  min-height: 78px;
  padding: 7px clamp(16px, 4vw, 52px);
  background: var(--navy);
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
}

.site-logo {
  display: block;
  width: auto;
  height: auto;
  object-fit: contain;
  flex: 0 0 auto;
}

.header-logo {
  height: clamp(54px, 4.7vw, 62px);
  max-width: 82px;
  max-height: 62px;
}

.brand-mark {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 6px;
  background: rgba(255, 255, 255, .12);
  color: var(--white);
  font-size: .72rem;
  font-weight: 600;
  box-shadow: inset 0 -3px 0 var(--red);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  color: var(--white);
  font-size: .83rem;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: 0;
}

.brand small {
  color: rgba(255, 255, 255, .68);
  font-size: .62rem;
  font-weight: 500;
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  justify-content: center;
  gap: 4px;
}

.main-nav a {
  border-radius: 6px;
  color: rgba(255, 255, 255, .76);
  font-size: .76rem;
  font-weight: 500;
  padding: 8px 9px;
  text-transform: uppercase;
}

.main-nav a:hover,
.main-nav a.active {
  background: rgba(255, 255, 255, .1);
  color: var(--white);
}

.header-actions,
.button-row,
.filter-grid,
.stat-row,
.tabs,
.dashboard-tools,
.form-row,
.chip-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.header-actions {
  justify-content: flex-end;
  flex-wrap: nowrap;
}

.form-row {
  width: 100%;
}

.form-row label {
  flex: 1 1 240px;
}

.clean-form > label,
.registration-form > label {
  width: 100%;
}

.clean-form .primary-btn,
.registration-form > .primary-btn {
  justify-self: stretch;
}

.menu-toggle {
  display: none;
}

.primary-btn,
.ghost-btn,
.light-btn,
.danger-btn,
.icon-btn {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.primary-btn {
  background: var(--red);
  color: var(--white);
  padding: 0 18px;
}

.primary-btn:hover {
  background: var(--red-dark);
}

.ghost-btn {
  background: transparent;
  color: rgba(255, 255, 255, .86);
  padding: 0 10px;
}

.light-btn {
  background: var(--gray-2);
  color: var(--navy);
  padding: 0 14px;
}

.danger-btn {
  background: #fee9ed;
  color: var(--red-dark);
  padding: 0 14px;
}

.icon-btn {
  width: 42px;
  background: var(--gray);
  color: var(--navy);
}

.full {
  width: 100%;
}

.page {
  min-height: calc(100vh - 62px);
}

.hero {
  position: relative;
  display: grid;
  min-height: 560px;
  align-items: end;
  overflow: hidden;
  color: var(--white);
}

.hero::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(7, 29, 58, .96) 0%, rgba(7, 29, 58, .76) 48%, rgba(7, 29, 58, .34) 100%),
    url("https://images.unsplash.com/photo-1508344928928-7165b67de128?auto=format&fit=crop&w=1800&q=80") center / cover;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, .7fr);
  gap: clamp(22px, 4vw, 56px);
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 74px 0 54px;
}

.hero h1 {
  max-width: 780px;
  margin: 10px 0 14px;
  font-size: clamp(2.4rem, 7vw, 5.6rem);
  line-height: .96;
  letter-spacing: 0;
}

.hero p {
  max-width: 680px;
  color: rgba(255, 255, 255, .86);
  font-size: clamp(1rem, 2vw, 1.22rem);
}

.quick-panel {
  align-self: end;
  background: rgba(255, 255, 255, .96);
  color: var(--ink);
  border-radius: 8px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.quick-panel h2 {
  margin: 0 0 14px;
  font-size: 1.05rem;
}

.score-strip {
  display: grid;
  gap: 10px;
}

.home-league-grid {
  display: grid;
  grid-template-columns: minmax(280px, .85fr) minmax(0, 1.15fr);
  gap: 18px;
  align-items: start;
}

.mini-section-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 14px;
}

.mini-section-head h3 {
  margin: 0;
  color: var(--navy);
  font-size: 1.1rem;
  font-weight: 600;
}

.score-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.score-item strong {
  display: block;
  color: var(--navy);
  font-size: .86rem;
}

.score-item span {
  color: var(--muted);
  font-size: .76rem;
  font-weight: 500;
}

.score-badge {
  align-self: center;
  color: var(--red);
  font-size: .9rem;
  font-weight: 600;
}

.section {
  padding: clamp(34px, 6vw, 72px) clamp(16px, 4vw, 52px);
}

.section.gray {
  background: var(--gray);
}

.section-inner {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 22px;
}

.centered-section-head {
  max-width: 720px;
  margin: 0 auto 24px;
  text-align: center;
}

.section-head h2,
.centered-section-head h2,
.page-title h1,
.dashboard-title h1 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(1.65rem, 3vw, 2.6rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: 0;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--red);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: uppercase;
}

.instagram-section {
  background: var(--white);
}

.instagram-inner {
  max-width: 960px;
}

.instagram-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(10px, 2vw, 16px);
}

.instagram-tile {
  position: relative;
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--gray);
  box-shadow: 0 8px 24px rgba(7, 29, 58, .05);
}

.instagram-tile img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform .2s ease, filter .2s ease;
}

.instagram-tile span {
  position: absolute;
  inset: auto 0 0;
  padding: 28px 12px 12px;
  color: var(--white);
  font-size: .78rem;
  font-weight: 600;
  line-height: 1.25;
  background: linear-gradient(180deg, transparent, rgba(7, 29, 58, .78));
  opacity: 0;
  transition: opacity .2s ease;
}

.instagram-tile:hover img {
  transform: scale(1.04);
  filter: saturate(1.06);
}

.instagram-tile:hover span {
  opacity: 1;
}

.center-actions {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: .82rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card,
.table-card,
.panel,
.team-profile,
.bracket-round,
.dashboard-panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(7, 29, 58, .05);
}

.card {
  overflow: hidden;
}

.card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
}

.card-body {
  padding: 16px;
}

.news-card .tag {
  margin-bottom: 12px;
}

.blog-page-head {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  align-items: end;
  margin-bottom: 24px;
}

.blog-page-head h2 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(1.7rem, 3vw, 2.55rem);
  font-weight: 600;
  line-height: 1.05;
}

.blog-page-head .filters {
  min-width: min(330px, 100%);
  margin: 0;
}

.blog-grid {
  gap: clamp(18px, 3vw, 28px);
}

.blog-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.blog-card-link:hover {
  border-color: rgba(199, 44, 50, .35);
  box-shadow: 0 14px 30px rgba(7, 29, 58, .1);
  transform: translateY(-2px);
}

.blog-card-link img {
  aspect-ratio: 16 / 11;
  background: var(--gray);
}

.blog-card-link .card-body {
  padding: 17px 18px 20px;
}

.blog-card-link .blog-meta {
  display: grid;
  grid-template-columns: minmax(124px, max-content) auto;
  column-gap: 12px;
  row-gap: 6px;
  align-items: center;
  min-height: 32px;
}

.blog-card-link .blog-meta .tag {
  justify-self: start;
  align-self: center;
  margin-bottom: 0;
  white-space: nowrap;
}

.blog-card-link .blog-meta span:not(.tag) {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  line-height: 1;
  white-space: nowrap;
}

.blog-card-link h3 {
  margin: 0 0 9px;
  color: var(--navy);
  font-size: clamp(1rem, 1.45vw, 1.22rem);
  line-height: 1.28;
}

.blog-card-link p {
  margin: 0;
  color: var(--muted);
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 34px 0 26px;
  padding-bottom: 28px;
}

.pagination button {
  width: 38px;
  min-height: 38px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--navy);
  font-weight: 600;
}

.pagination button.active,
.pagination button:hover {
  border-color: var(--navy);
  background: var(--navy);
  color: var(--white);
}

.pagination.compact {
  margin: 16px 0 0;
  padding-bottom: 0;
}

.admin-toolbar-panel {
  display: grid;
  gap: 16px;
}

.nested-admin-section {
  margin-top: 22px;
}

.admin-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  align-items: end;
}

.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(7, 29, 58, .58);
}

.admin-modal-card {
  width: min(920px, 100%);
  max-height: min(86vh, 900px);
  overflow: auto;
  padding: 20px;
  border-radius: 8px;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.admin-modal-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.admin-modal-head h2 {
  margin: 2px 0 0;
  color: var(--navy);
}

.email-editor-form {
  display: grid;
  gap: 14px;
}

.notification-summary,
.email-preview-panel,
.admin-help {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  padding: 16px;
}

.notification-summary {
  background: #f8fafc;
  border-left: 4px solid var(--red);
}

.notification-summary h3,
.email-preview-panel h3 {
  margin: 3px 0 6px;
  color: var(--navy);
}

.notification-summary p {
  margin: 0;
  color: var(--muted);
}

.notification-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.notification-facts span {
  display: grid;
  gap: 2px;
  min-height: 56px;
  align-content: center;
  border-radius: 6px;
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--navy);
  padding: 10px;
  text-transform: capitalize;
}

.notification-facts strong {
  color: var(--muted);
  font-size: .66rem;
  font-weight: 600;
  text-transform: uppercase;
}

.admin-help summary {
  cursor: pointer;
  color: var(--navy);
  font-weight: 600;
}

.admin-help p {
  margin: 10px 0;
}

.blog-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: .78rem;
}

.blog-detail {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 8px 24px rgba(7, 29, 58, .05);
}

.blog-detail > img {
  display: block;
  width: 100%;
  max-height: 460px;
  object-fit: cover;
}

.blog-detail-body {
  width: min(860px, 100%);
  margin: 0 auto;
  padding: clamp(20px, 4vw, 42px);
}

.blog-detail-body h2 {
  margin: 0 0 16px;
  color: var(--navy);
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  line-height: 1.08;
  font-weight: 600;
}

.blog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -2px 0 22px;
}

.blog-content {
  display: grid;
  gap: 16px;
  color: var(--ink);
  font-size: 1.02rem;
  line-height: 1.72;
}

.blog-content p {
  margin: 0;
}

.blog-content h3 {
  margin: 12px 0 -4px;
  color: var(--navy);
  font-size: 1.18rem;
  font-weight: 600;
}

.blog-share {
  display: grid;
  gap: 14px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.blog-share h3 {
  margin: 0;
  color: var(--navy);
  font-size: 1.05rem;
  font-weight: 600;
}

.share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.share-btn {
  min-height: 40px;
  border: 1px solid rgba(16, 47, 87, .22);
  border-radius: 6px;
  background: #f3f7fd;
  color: var(--navy-2);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-size: .82rem;
  font-weight: 600;
  padding: 0 13px;
  text-decoration: none;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}

.share-btn:hover {
  border-color: var(--navy-2);
  background: var(--navy-2);
  color: var(--white);
}

.related-posts {
  margin-top: clamp(28px, 5vw, 48px);
}

.related-posts .section-head {
  padding: 0 clamp(12px, 2vw, 18px);
}

.blog-editor-form {
  display: grid;
  gap: 16px;
}

.featured-preview {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--gray);
}

.featured-preview img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: cover;
}

.content-editor {
  min-height: 240px;
}

.preserve-lines {
  white-space: pre-line;
}

.compact-list {
  display: grid;
  gap: 10px;
}

.card h3,
.panel h3,
.dashboard-panel h3,
.team-profile h2 {
  margin: 0 0 8px;
  color: var(--navy);
  font-size: 1rem;
}

.card p,
.panel p {
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
}

.feature-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.feature-list li:last-child {
  border-bottom: 0;
}

.tag,
.status,
.chip {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 500;
  padding: 4px 10px;
}

.tag {
  background: #eef3fa;
  color: var(--navy-2);
}

.status {
  background: #eef8f4;
  color: var(--green);
}

.status.warn {
  background: #fff2e4;
  color: var(--orange);
}

.status.danger {
  background: #fee9ed;
  color: var(--red-dark);
}

.chip {
  background: var(--gray);
  border: 1px solid var(--line);
  color: var(--navy);
}

.page-title,
.dashboard-title {
  width: 100%;
  margin: 0;
  padding: 42px max(16px, calc((100vw - 1180px) / 2)) 28px;
  background: var(--gray);
  border-bottom: 1px solid var(--line);
}

.page-title p,
.dashboard-title p {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
}

.filters {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.filter-grid {
  align-items: end;
}

label {
  display: grid;
  gap: 7px;
  color: var(--navy);
  font-size: .78rem;
  font-weight: 500;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  color: var(--ink);
  padding: 9px 11px;
}

textarea {
  min-height: 110px;
  resize: vertical;
}

.table-card {
  overflow: auto;
}

.game-list {
  display: grid;
  gap: 12px;
}

.game-list.compact .game-card {
  grid-template-columns: 112px minmax(0, 1fr) auto;
  padding: 13px;
}

.game-list.compact .game-date strong,
.game-list.compact .game-matchup strong {
  font-size: .82rem;
}

.game-list.compact .game-score {
  min-width: 68px;
  font-size: .82rem;
}

.game-card {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.game-date,
.game-matchup {
  display: grid;
  gap: 4px;
}

.game-date strong {
  color: var(--red);
  font-size: .86rem;
  font-weight: 600;
  text-transform: uppercase;
}

.game-date span,
.game-matchup small {
  color: var(--muted);
  font-size: .82rem;
}

.game-date small {
  width: fit-content;
  padding: 2px 7px;
  border-radius: 5px;
  background: var(--gray);
  color: var(--navy);
  font-size: .68rem;
  font-weight: 500;
  text-transform: uppercase;
}

.game-matchup span {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 12px;
  color: var(--muted);
  font-size: .76rem;
  text-transform: uppercase;
}

.game-matchup strong {
  color: var(--navy);
  font-size: .92rem;
  font-weight: 600;
  text-transform: none;
}

.game-score {
  min-width: 74px;
  border-radius: 6px;
  background: var(--navy);
  color: var(--white);
  font-weight: 600;
  padding: 8px 10px;
  text-align: center;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  background: var(--navy);
  color: var(--white);
  font-size: .72rem;
  letter-spacing: 0;
  text-transform: uppercase;
  white-space: nowrap;
}

td {
  font-size: .88rem;
}

tr:last-child td {
  border-bottom: 0;
}

.score-details {
  min-width: 180px;
}

.score-details summary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(7, 29, 58, .16);
  border-radius: 6px;
  background: #f7f9fc;
  cursor: pointer;
  color: var(--navy);
  font-weight: 600;
}

.score-details summary::marker {
  color: var(--red);
}

.score-details[open] summary {
  border-color: rgba(201, 22, 47, .28);
  background: #fff6f7;
  color: var(--red-dark);
}

.score-detail-panel {
  margin-top: 12px;
  width: min(640px, calc(100vw - 72px));
  min-width: min(420px, calc(100vw - 72px));
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
  box-shadow: 0 12px 28px rgba(7, 29, 58, .08);
}

.score-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
  align-items: stretch;
}

.score-detail-grid + .score-detail-grid {
  margin-top: 10px;
}

.score-field {
  position: relative;
  overflow: hidden;
  min-height: 84px;
  padding: 11px 12px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
}

.score-field::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
}

.score-detail-grid span {
  display: block;
  margin-bottom: 5px;
  color: inherit;
  font-size: .68rem;
  font-weight: 700;
  opacity: .68;
  text-transform: uppercase;
}

.score-detail-grid strong {
  display: block;
  color: inherit;
  font-size: .86rem;
  font-weight: 600;
  line-height: 1.35;
}

.score-field-score {
  background: #eef4ff;
  border-color: #c8d9f6;
  color: var(--navy);
}

.score-field-score::before {
  background: var(--navy);
}

.score-field-player {
  background: #fff4f5;
  border-color: #f2c9cf;
  color: var(--red-dark);
}

.score-field-player::before {
  background: var(--red);
}

.score-field-innings {
  background: #eef9f5;
  border-color: #bfdfd3;
  color: #0d5f45;
}

.score-field-innings::before {
  background: var(--green);
}

.score-field-pitches {
  background: #fff8ed;
  border-color: #efd6b8;
  color: #8a470d;
}

.score-field-pitches::before {
  background: var(--orange);
}

.score-detail-panel .small {
  margin-top: 10px;
  max-width: 560px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.team-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 190px;
}

.team-logo {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  font-size: .75rem;
  font-weight: 600;
}

.player-photo {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
  background: var(--gray);
}

.page-layout {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 70px;
}

.team-profile {
  padding: 20px;
}

.team-profile-header {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
}

.team-profile .team-logo,
.player-profile-header .team-logo,
.player-profile-header .player-photo {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  font-size: 1rem;
}

.photo-upload-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.player-photo-editor {
  grid-column: 1 / -1;
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--gray);
}

.player-photo-editor .team-logo,
.player-photo-editor .player-photo {
  width: 70px;
  height: 70px;
  flex: 0 0 70px;
  font-size: 1.1rem;
}

.player-edit-form label {
  min-width: 0;
}

.bracket {
  display: grid;
  grid-template-columns: repeat(3, minmax(230px, 1fr));
  gap: 18px;
  overflow-x: auto;
}

.bracket-round {
  min-width: 230px;
  padding: 14px;
}

.matchup {
  position: relative;
  display: grid;
  gap: 8px;
  margin: 14px 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.matchup::after {
  position: absolute;
  right: -19px;
  top: 50%;
  width: 18px;
  height: 2px;
  background: var(--red);
  content: "";
}

.bracket-round:last-child .matchup::after {
  display: none;
}

.bracket-team {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 8px;
  border-radius: 5px;
  background: var(--gray);
  font-size: .84rem;
  font-weight: 500;
}

.bracket-team.winner {
  background: #eef8f4;
  color: var(--green);
}

.handout-list {
  display: grid;
  gap: 12px;
}

.handout-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.contact-form,
.registration-form {
  width: min(760px, 100%);
  margin: 0 auto;
}

.registration-form,
.clean-form {
  display: grid;
  gap: 16px;
}

.form-section-title {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.form-section-title span {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  place-items: center;
  border-radius: 50%;
  background: var(--red);
  color: var(--white);
  font-size: .84rem;
  font-weight: 600;
}

.form-section-title h2 {
  margin: 0 0 4px;
  color: var(--navy);
  font-size: 1.15rem;
  font-weight: 600;
}

.form-section-title p {
  margin: 0;
  color: var(--muted);
  font-size: .88rem;
}

.payment-step {
  margin-top: 10px;
}

.payment-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, .5fr);
  gap: 18px;
  align-items: center;
  max-width: 900px;
  margin-bottom: 18px;
  padding: 18px;
  background: var(--navy);
  color: var(--white);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.payment-summary.compact {
  max-width: none;
  background: var(--gray);
  color: var(--ink);
  box-shadow: none;
}

.payment-summary h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 600;
  letter-spacing: 0;
}

.payment-summary .muted {
  color: rgba(255, 255, 255, .76);
}

.payment-summary.compact .muted {
  color: var(--muted);
}

.payment-totals {
  display: grid;
  gap: 9px;
}

.payment-totals span {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(255, 255, 255, .22);
  font-size: .86rem;
}

.payment-summary.compact .payment-totals span {
  border-bottom-color: var(--line);
}

.payment-card {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.2fr) minmax(90px, .5fr) minmax(80px, .4fr);
  gap: 10px;
  padding: 14px;
  background: var(--gray);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.auth-dialog {
  width: min(460px, calc(100% - 28px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: var(--shadow);
}

.auth-dialog::backdrop {
  background: rgba(7, 29, 58, .56);
}

.dialog-card {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 24px;
}

.dialog-card h2 {
  margin: 0;
  color: var(--navy);
}

.icon-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: var(--gray);
  cursor: pointer;
}

.dashboard {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  min-height: calc(100vh - 62px);
  background: var(--gray);
}

.sidebar {
  position: sticky;
  top: 62px;
  align-self: start;
  height: calc(100vh - 62px);
  overflow: auto;
  background: var(--navy);
  color: var(--white);
  padding: 20px;
}

.sidebar h2 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.sidebar p {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, .68);
  font-size: .82rem;
}

.side-nav {
  display: grid;
  gap: 6px;
}

.side-nav button {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: rgba(255, 255, 255, .8);
  cursor: pointer;
  font-weight: 500;
  padding: 0 12px;
  text-align: left;
}

.side-nav button.active,
.side-nav button:hover {
  background: rgba(255, 255, 255, .12);
  color: var(--white);
}

.dashboard-main {
  min-width: 0;
  padding: 28px clamp(16px, 3vw, 34px) 70px;
}

.dashboard-title {
  width: auto;
  padding: 0 0 20px;
}

.dashboard-panel {
  padding: 18px;
  margin-bottom: 18px;
}

.stat-row {
  align-items: stretch;
}

.stat {
  flex: 1 1 170px;
  min-height: 108px;
  padding: 16px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.stat strong {
  display: block;
  color: var(--navy);
  font-size: 1.9rem;
  font-weight: 600;
  line-height: 1;
}

.stat span {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 500;
}

.notice {
  padding: 14px 16px;
  border-left: 4px solid var(--orange);
  background: #fff7ec;
  color: #70410d;
  border-radius: 6px;
  font-size: .9rem;
  font-weight: 500;
}

.notice.success {
  border-color: var(--green);
  background: #eef8f4;
  color: #0e5e45;
}

.locked {
  opacity: .55;
  pointer-events: none;
}

.empty-state {
  display: grid;
  gap: 6px;
  padding: 30px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  color: var(--navy);
}

.footer {
  padding: 38px clamp(16px, 4vw, 52px) 22px;
  background: var(--navy);
  color: rgba(255, 255, 255, .78);
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(260px, 1.35fr) repeat(3, minmax(150px, .65fr));
  width: min(1180px, 100%);
  margin: 0 auto;
  gap: clamp(22px, 4vw, 46px);
  font-size: .82rem;
}

.footer-logo {
  height: clamp(72px, 8vw, 92px);
  max-width: 116px;
  max-height: 92px;
  margin-bottom: 14px;
}

.footer h3,
.footer h4 {
  margin: 0 0 10px;
  color: var(--white);
  font-size: .88rem;
  font-weight: 600;
}

.footer h4 {
  color: rgba(255, 255, 255, .55);
  font-size: .68rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.footer p,
.footer a,
.footer small {
  display: block;
  margin: 0 0 8px;
  color: rgba(255, 255, 255, .7);
}

.footer p {
  max-width: 420px;
}

.footer a {
  text-decoration: none;
}

.footer a:hover {
  color: var(--white);
}

.footer-bottom {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-top: 6px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, .12);
}

.footer-bottom small {
  margin: 0;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px 18px;
}

.footer-legal a {
  margin: 0;
}

.legal-content {
  max-width: 920px;
  margin: 0 auto;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 8px 24px rgba(7, 29, 58, .05);
}

.legal-content h2 {
  margin: 26px 0 8px;
  color: var(--navy);
  font-size: 1.18rem;
  font-weight: 600;
}

.legal-content h2:first-of-type {
  margin-top: 10px;
}

.legal-content p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: .98rem;
  line-height: 1.75;
}

@media (max-width: 1020px) {
  .site-header {
    grid-template-columns: auto auto;
    min-height: 72px;
  }

  .brand {
    min-width: 0;
  }

  .header-logo {
    height: clamp(50px, 6vw, 58px);
    max-width: 74px;
    max-height: 58px;
  }

  .menu-toggle {
    display: inline-flex;
    justify-self: end;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--white);
    color: var(--navy);
    align-items: center;
    padding: 0 12px;
    font-weight: 600;
  }

  .main-nav,
  .header-actions {
    grid-column: 1 / -1;
    display: none;
    justify-content: flex-start;
  }

  .site-header.open .main-nav,
  .site-header.open .header-actions {
    display: flex;
  }

  .main-nav {
    border-top: 1px solid rgba(255, 255, 255, .12);
    padding-top: 10px;
    flex-wrap: wrap;
  }

  .header-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .hero-inner {
    grid-template-columns: 1fr;
  }

  .dashboard {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .side-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .score-detail-grid {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }

  .table-card {
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 17px;
    line-height: 1.56;
  }

  .site-header {
    min-height: 68px;
    padding: 8px 16px;
  }

  .brand {
    min-width: 0;
    gap: 10px;
  }

  .header-logo {
    height: 50px;
    max-width: 64px;
    max-height: 50px;
  }

  .main-nav a,
  .header-actions button,
  .header-actions a {
    flex: 1 1 calc(50% - 8px);
    text-align: center;
  }

  .page-title,
  .dashboard-title {
    padding: 30px 16px 22px;
  }

  .page-title h1,
  .dashboard-title h1,
  .section-head h2,
  .centered-section-head h2,
  .blog-page-head h2 {
    font-size: clamp(2rem, 8vw, 2.45rem);
    line-height: 1.1;
  }

  .page-title p,
  .dashboard-title p,
  .hero p,
  .section-head p,
  .centered-section-head p,
  .card p,
  .blog-card-link p,
  .handout-item p,
  .footer p,
  .footer a {
    font-size: 1.06rem;
    line-height: 1.6;
  }

  .blog-card-link h3,
  .card h3 {
    font-size: 1.3rem;
    line-height: 1.3;
  }

  .blog-meta,
  .small {
    font-size: .9rem;
  }

  .eyebrow,
  .tag {
    font-size: .82rem;
  }

  .blog-card-link .card-body,
  .card-body {
    padding: 20px;
  }

  .blog-detail-body h2 {
    font-size: clamp(2rem, 8vw, 2.55rem);
  }

  .blog-content {
    font-size: 1.12rem;
    line-height: 1.75;
  }

  .hero {
    min-height: auto;
  }

  .hero-inner {
    padding: 42px 0 28px;
  }

  .grid,
  .grid.two,
  .grid.four,
  .home-league-grid {
    grid-template-columns: 1fr;
  }

  .score-detail-panel {
    width: min(100%, calc(100vw - 48px));
    min-width: 0;
    padding: 12px;
  }

  .score-detail-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .score-field {
    min-height: auto;
    padding: 10px 10px 10px 12px;
  }

  .score-details {
    min-width: 0;
  }

  .score-details summary {
    width: 100%;
    justify-content: center;
  }

  .section-head,
  .handout-item,
  .blog-page-head {
    display: grid;
    align-items: start;
  }

  .blog-page-head .filters {
    width: 100%;
  }

  .filter-grid label,
  .filter-grid button {
    width: 100%;
  }

  .filter-grid,
  .form-row,
  .button-row,
  .dashboard-tools,
  .action-grid {
    align-items: stretch;
  }

  .button-row.compact button,
  .action-grid button,
  .action-grid a,
  .share-btn {
    flex: 1 1 140px;
  }

  .dashboard-main {
    padding: 22px 14px 54px;
  }

  .dashboard-panel {
    padding: 14px;
  }

  .feature-list li {
    display: grid;
    gap: 5px;
  }

  .team-profile-header,
  .player-profile-header {
    align-items: flex-start;
  }

  .photo-upload-form {
    grid-template-columns: 1fr;
  }

  .player-photo-editor {
    align-items: flex-start;
    padding: 12px;
  }

  .player-photo-editor .team-logo,
  .player-photo-editor .player-photo {
    width: 56px;
    height: 56px;
    flex-basis: 56px;
  }

  .admin-modal {
    padding: 10px;
    align-items: start;
  }

  .admin-modal-card {
    max-height: calc(100vh - 20px);
    padding: 14px;
  }

  .admin-modal-head {
    align-items: center;
  }

  .admin-controls {
    grid-template-columns: 1fr;
  }

  .game-card {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .game-list.compact .game-card {
    grid-template-columns: 1fr;
  }

  .game-score {
    width: fit-content;
  }

  .payment-summary,
  .payment-card {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .footer-logo {
    margin-left: auto;
    margin-right: auto;
  }

  .notification-facts {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    display: grid;
    justify-items: center;
    text-align: center;
  }

  .footer-legal {
    justify-content: center;
  }

  .bracket {
    grid-template-columns: repeat(3, 230px);
  }

  .side-nav {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .main-nav a,
  .header-actions button,
  .header-actions a {
    flex-basis: 100%;
  }

  .instagram-grid {
    gap: 8px;
  }

  .instagram-tile span {
    display: none;
  }

  .brand {
    min-width: 0;
  }

  .header-logo {
    height: 46px;
    max-width: 58px;
    max-height: 46px;
  }

  .brand strong {
    font-size: .78rem;
  }

  .brand small {
    font-size: .55rem;
  }

  .page-layout {
    width: min(100% - 24px, 1180px);
    padding-bottom: 52px;
  }

  .stat {
    flex-basis: 100%;
    min-height: 92px;
  }

  .dialog-card {
    width: min(100% - 24px, 460px);
  }

  table {
    min-width: 640px;
  }
}
