/* NSC Leagues design system, from neighborhoodsc.com brand tokens:
   cream #FFFDF6, brown #3F2E14, navy #142540, light blue #90BAF9,
   AFBrandt headings, ESBuild nav, Inter body, square corners. */

@font-face {
  font-family: "AFBrandt";
  src: url("https://neighborhoodsc.com/cdn/shop/t/1/assets/AFBrandt-Light.woff") format("woff");
  font-weight: 300 500;
  font-display: swap;
}
@font-face {
  font-family: "ESBuild";
  src: url("https://neighborhoodsc.com/cdn/shop/t/1/assets/ESBuild.woff") format("woff");
  font-weight: 400;
  font-display: swap;
}

:root {
  --cream: #fffdf6;
  --brown: #3f2e14;
  --navy: #142540;
  --blue: #90baf9;
  --muted: rgba(63, 46, 20, 0.6);
  --line: rgba(63, 46, 20, 0.18);
  --line-soft: rgba(63, 46, 20, 0.1);
  --green: #5b7042;
  --live: #c2492f;
  --head-font: "AFBrandt", "Inter", sans-serif;
  --nav-font: "ESBuild", "Inter", sans-serif;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--brown);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brown); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 980px; margin: 0 auto; padding: 0 16px 64px; }

/* Header: cream, wordmark, lowercase nav, like the shop.
   Topbar is sticky; on scroll the wordmark crossfades to the flower mark,
   same as neighborhoodsc.com. */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--cream);
  padding-top: 20px;
}
.topbar .wrap { padding-bottom: 0; }
.site-head {
  background: var(--cream);
  padding: 0;
}
.site-head .wrap { padding-bottom: 0; }
.masthead {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.masthead .logo-stack { position: relative; display: block; height: 30px; grid-column: 2; grid-row: 1; justify-self: center; }
.masthead img.wordmark { height: 30px; width: auto; display: block; transition: opacity 0.2s ease; }
.masthead img.logo-compact {
  position: absolute; left: 50%; top: 0;
  transform: translateX(-50%);
  height: 30px; width: auto;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.topbar.scrolled img.wordmark { opacity: 0; }
.topbar.scrolled img.logo-compact { opacity: 1; }
.masthead nav {
  grid-column: 3; grid-row: 1; justify-self: end;
  font-family: var(--nav-font);
  font-size: 14px;
  text-transform: lowercase;
  display: flex; gap: 18px;
}
.masthead nav a { color: var(--muted); }
.masthead nav a:hover { color: var(--brown); text-decoration: none; }

h1.page-title {
  font-family: var(--head-font);
  text-transform: uppercase;
  font-weight: 400;
  letter-spacing: 0.01em;
  font-size: clamp(30px, 6vw, 52px);
  line-height: 1.05;
  margin: 26px 0 4px;
  color: var(--brown);
}
.page-sub {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 10px;
}

/* Sections */
h2.section {
  font-family: var(--head-font);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: 24px;
  margin: 40px 0 12px;
  color: var(--brown);
  border-bottom: 1px solid var(--blue);
  padding-bottom: 8px;
}

.card {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 14px 16px;
}

.grid { display: grid; gap: 12px; }
@media (min-width: 700px) {
  .grid.cols-2 { grid-template-columns: 1fr 1fr; }
  .grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
}

/* Team chip / crest */
.crest {
  width: 34px; height: 34px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--head-font); font-size: 13px; letter-spacing: 0.02em;
  color: var(--cream); flex: 0 0 34px;
}
.crest.sm { width: 24px; height: 24px; font-size: 10px; flex-basis: 24px; }
img.crest { object-fit: contain; background: transparent; border-radius: 0; }

/* Scorekeeper */
.sk-board { background: var(--navy); color: #fff; padding: 20px 16px; margin-top: 14px; text-align: center; }
.sk-board .teams { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; }
.sk-board .tname { font-weight: 600; font-size: 15px; }
.sk-board .sc { font-family: var(--head-font); font-size: 54px; line-height: 1; }
.sk-board .clock { color: var(--blue); font-family: var(--head-font); font-size: 20px; margin-top: 8px; letter-spacing: 0.06em; }
.sk-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.bigbtn {
  border: 1px solid var(--line); background: transparent; color: var(--brown);
  font: 600 15px "Inter", sans-serif; padding: 18px 10px; cursor: pointer;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.bigbtn.primary { background: var(--navy); color: #fff; border-color: var(--navy); }
.bigbtn.danger { background: var(--live); color: #fff; border-color: var(--live); }
.bigbtn.wide { grid-column: 1 / -1; }
.sk-playergrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; margin-top: 12px; }
.sk-playergrid .bigbtn { padding: 14px 8px; text-transform: none; letter-spacing: 0; }
.sk-log { margin-top: 14px; font-size: 13px; color: var(--muted); }

/* Filter chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 4px; }
.chip {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--brown);
  border-radius: 0;
  padding: 6px 13px;
  font-size: 13px;
  font-weight: 500;
  font-family: "Inter", sans-serif;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px;
}
.chip:hover { border-color: var(--brown); }
.chip.active { background: var(--navy); color: #fff; border-color: var(--navy); }

/* Matches */
.match {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--line-soft);
}
.match:last-child { border-bottom: none; }
.match .side { display: flex; align-items: center; gap: 9px; min-width: 0; }
.match .side.home { justify-content: flex-end; text-align: right; }
.match .team-name { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; }
.match .mid { text-align: center; min-width: 74px; }
.match .score { font-family: var(--head-font); font-size: 24px; letter-spacing: 0.04em; color: var(--brown); }
.match .when { font-size: 12px; color: var(--muted); white-space: nowrap; }
.match .scorers { grid-column: 1 / -1; text-align: center; font-size: 12px; color: var(--muted); margin-top: -4px; }

.badge {
  display: inline-block; font-size: 11px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 0;
  font-family: "Inter", sans-serif;
}
.badge.live { background: var(--live); color: #fff; animation: pulse 1.6s infinite; }
.badge.final { background: var(--line-soft); color: var(--muted); }
.badge.next { background: var(--blue); color: var(--navy); }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.55; } }

/* Hero (now playing / next up), navy like the SIGN UP TO PLAY block */
.hero-match {
  background: var(--navy);
  color: #fff;
  border-radius: 0;
  padding: 18px 16px;
  margin-top: 22px;
}
.hero-match .match { border: none; }
.hero-match .team-name { color: #fff; }
.hero-match .score { color: #fff; font-size: 36px; }
.hero-match .when { color: var(--blue); }
.hero-match .scorers { color: rgba(255, 255, 255, 0.72); }

/* Archived season hero: champions + golden boot */
.season-hero { text-align: center; padding: 24px 16px 22px; }
.season-hero .champ-row {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  margin-top: 14px;
}
.season-hero .champ-row .crest { width: 52px; height: 52px; font-size: 19px; flex-basis: 52px; }
.season-hero .champ-row > div:last-child { text-align: left; }
.season-hero .champ-label {
  color: var(--blue); font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em;
}
.season-hero .champ-name {
  font-family: var(--head-font); font-size: clamp(26px, 5vw, 38px);
  text-transform: uppercase; line-height: 1.1; color: #fff;
}
.season-hero .boot-callout {
  margin-top: 14px; padding-top: 12px;
  border-top: 1px solid rgba(144, 186, 249, 0.35);
  color: var(--blue); font-size: 14px; font-weight: 600;
}

/* Tables */
table.std { width: 100%; border-collapse: collapse; font-size: 14px; }
table.std th {
  text-align: left; font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--muted); font-weight: 600;
  border-bottom: 1px solid var(--brown);
  padding: 6px 8px;
}
table.std td { padding: 9px 8px; border-bottom: 1px solid var(--line-soft); }
table.std tr:last-child td { border-bottom: none; }
table.std td.num, table.std th.num { text-align: center; }
table.std tr.hl td { background: rgba(144, 186, 249, 0.16); }
table.std .team-cell { display: flex; align-items: center; gap: 9px; font-weight: 600; }

/* Golden boot */
.boot-row { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--line-soft); }
.boot-row:last-child { border-bottom: none; }
.boot-row .rank { font-family: var(--head-font); width: 26px; color: var(--muted); }
.boot-row .goals { margin-left: auto; font-family: var(--head-font); font-size: 22px; color: var(--brown); }
.boot-row.top .goals { color: var(--navy); }
.boot-row.top { background: rgba(144, 186, 249, 0.14); }

/* Rosters, accordion rows like the play page */
details.roster { border-bottom: 1px solid var(--line); background: transparent; margin: 0; }
details.roster:first-of-type { border-top: 1px solid var(--line); }
details.roster summary {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 4px; cursor: pointer; font-weight: 600; list-style: none;
}
details.roster summary::-webkit-details-marker { display: none; }
details.roster summary::before { content: "+"; font-family: var(--head-font); font-size: 18px; color: var(--muted); width: 16px; }
details.roster[open] summary::before { content: "−"; }
details.roster summary .count { margin-left: auto; color: var(--muted); font-weight: 400; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; }
details.roster .players { padding: 0 4px 14px 32px; display: grid; gap: 4px; }
@media (min-width: 600px) { details.roster .players { grid-template-columns: 1fr 1fr; } }
.player-row { display: flex; gap: 8px; font-size: 14px; padding: 3px 0; }
.player-row .pos { color: var(--muted); font-size: 12px; margin-left: auto; }
.player-row .g { color: var(--green); font-weight: 700; font-size: 13px; }

/* Buttons and forms (admin) */
.btn {
  display: inline-block; border: none; border-radius: 0;
  background: var(--navy); color: #fff;
  font: 500 13px "Inter", sans-serif;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 10px 18px; cursor: pointer;
}
.btn:hover { background: #1d3357; }
.btn.red { background: var(--live); }
.btn.ghost { background: transparent; color: var(--brown); border: 1px solid var(--line); }
.btn.sm { padding: 6px 11px; font-size: 11px; }
input[type=text], input[type=password], input[type=date], input[type=time], input[type=number], select, textarea {
  font: 14px "Inter", sans-serif;
  border: 1px solid var(--line); border-radius: 0;
  padding: 8px 10px; background: #fff; color: var(--brown);
  width: 100%;
}
textarea { min-height: 120px; resize: vertical; }
label.f { display: block; font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin: 12px 0 4px; }

.note { font-size: 13px; color: var(--muted); }
.ok { color: var(--green); font-weight: 600; }
.err { color: var(--live); font-weight: 600; }

/* Hub cards */
.league-card { display: block; color: inherit; border: 1px solid var(--line); padding: 18px 18px 16px; }
.league-card:hover { text-decoration: none; border-color: var(--brown); }
.league-card .night {
  font-size: 11px; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted);
}
.league-card h3 {
  font-family: var(--head-font); font-weight: 400;
  text-transform: uppercase; letter-spacing: 0.01em;
  margin: 6px 0 6px; font-size: 24px; color: var(--brown);
}
.league-card .meta { font-size: 13px; color: var(--muted); }

/* Admin tabs */
.tabs { display: flex; gap: 0; flex-wrap: wrap; margin: 20px 0 16px; border-bottom: 1px solid var(--line); }
.tab {
  border: none; background: transparent;
  padding: 9px 14px; cursor: pointer;
  font-weight: 500; font-size: 13px; font-family: "Inter", sans-serif;
  color: var(--muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tab.active { color: var(--brown); border-bottom-color: var(--navy); }

/* Player pages */
.p-hero {
  position: relative; overflow: hidden;
  background: var(--navy); color: #fff;
  padding: 34px 26px; margin-top: 24px;
}
.p-watermark {
  position: absolute; right: -40px; top: 50%; transform: translateY(-50%);
  width: 260px; opacity: 0.1; pointer-events: none;
}
.p-hero-inner { position: relative; display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.p-avatar {
  width: 88px; height: 88px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--head-font); font-size: 34px; color: var(--cream);
  border: 2px solid rgba(144, 186, 249, 0.5);
  flex: 0 0 88px;
}
.p-kicker { color: var(--blue); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; }
.p-id { text-transform: none; letter-spacing: 0.04em; font-family: "Inter", monospace; opacity: 0.8; }
.p-name { font-family: var(--head-font); font-weight: 400; text-transform: uppercase; font-size: clamp(32px, 7vw, 54px); line-height: 1.02; margin: 6px 0 4px; }
.p-teams { color: rgba(255, 255, 255, 0.75); font-size: 13px; }

.p-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 12px; }
@media (min-width: 640px) { .p-tiles { grid-template-columns: repeat(4, 1fr); } }
.p-tile { border: 1px solid var(--line); padding: 14px 16px 12px; }
.p-tile .v { font-family: var(--head-font); font-size: 34px; line-height: 1; color: var(--navy); }
.p-tile .l { margin-top: 5px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }

.stint-card { border: 1px solid var(--line); padding: 14px 16px; margin-bottom: 12px; }
.stint-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.stint-head .crest { width: 44px; height: 44px; font-size: 16px; flex-basis: 44px; }
.stint-info { min-width: 160px; }
.stint-team { font-weight: 700; font-size: 16px; }
.stint-comp { font-size: 12.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 2px; }
.stint-nums { margin-left: auto; display: flex; gap: 22px; text-align: right; }
.stint-nums .n { font-size: 13px; color: var(--muted); }
.stint-nums .n b { font-family: var(--head-font); font-size: 24px; font-weight: 400; color: var(--brown); margin-right: 4px; }
.muted-x { font-size: 11px; }
.stint-games { margin-top: 10px; border-top: 1px solid var(--line-soft); padding-top: 8px; }
.stint-games summary { cursor: pointer; font-size: 12.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; list-style: none; }
.stint-games summary::before { content: "+ "; font-family: var(--head-font); }
.stint-games[open] summary::before { content: "− "; }
.stint-games .glist { padding: 8px 0 2px; }
.stint-games .g { display: flex; gap: 12px; align-items: baseline; font-size: 13.5px; padding: 3px 0; }
.stint-games .res { font-weight: 800; font-size: 11px; width: 18px; text-align: center; }
.stint-games .rW { color: var(--green); }
.stint-games .rL { color: var(--live); }
.stint-games .rD { color: var(--muted); }
.stint-games .gd { color: var(--muted); font-size: 12px; min-width: 86px; }
.stint-games .gl { color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.05em; }

.p-row { display: flex; align-items: center; gap: 12px; padding: 9px 4px; border-bottom: 1px solid var(--line-soft); color: inherit; }
.p-row:hover { text-decoration: none; background: rgba(144, 186, 249, 0.08); }
.p-row-name { font-weight: 600; min-width: 130px; }
.p-row-meta { color: var(--muted); font-size: 12.5px; flex: 1; }
.p-row-goals { color: var(--green); font-weight: 700; font-size: 13px; }

.footer {
  margin-top: 64px; padding-top: 16px; border-top: 1px solid var(--line);
  font-size: 12px; color: var(--muted); text-align: center;
  text-transform: lowercase; font-family: var(--nav-font);
}

/* Site footer, same utility bar as neighborhoodsc.com:
   light blue, cream text, copyright / flower mark / socials */
.site-foot {
  background: var(--blue);
  color: var(--cream);
  margin-top: 64px;
}
.site-foot__inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 12px 16px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  font-size: 0.75rem;
  line-height: 1.5;
}
.site-foot__copy {
  justify-self: start;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.site-foot a { color: var(--cream); }
.site-foot a:hover { text-decoration: underline; }
.site-foot__mark { display: inline-flex; justify-self: center; }
.site-foot__mark svg { width: 70px; height: auto; display: block; }
.site-foot__social { display: flex; align-items: center; gap: 14px; justify-self: end; }
.site-foot__social a { display: inline-flex; }
.site-foot__social svg { width: 20px; height: 20px; fill: var(--cream); }
.site-foot__social .social-label {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%);
}
