/* East Forsyth Broncos — Region 8-5A
   efhsfb.athlete-hub.org — shared stylesheet */

:root {
  --ground: #F0F2F5;
  --card: #FFFFFF;
  --card-2: #F5F7FA;
  --ink: #101A2B;
  --muted: #55637A;
  --faint: #8590A3;
  --line: #DBE0E8;
  --line-strong: #C0C8D4;
  --navy: #16233A;
  --navy-2: #1E3050;
  --orange: #E2600F;
  --accent-ink: #B04808;
  --accent-wash: #FCF0E7;
  --win: #2F7D4F;
  --loss: #B23A3A;
  --on-navy: #EAF0F8;
  --on-navy-dim: #9AAAC2;
  --shadow: 0 1px 2px rgba(16,26,43,.06), 0 8px 24px -16px rgba(16,26,43,.24);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #0B1119;
    --card: #131B26;
    --card-2: #18222E;
    --ink: #E7ECF3;
    --muted: #93A2B5;
    --faint: #6F7E92;
    --line: #212C3A;
    --line-strong: #354356;
    --navy: #16233A;
    --navy-2: #1E3050;
    --orange: #F97A2A;
    --accent-ink: #FF9147;
    --accent-wash: #2B1A0F;
    --win: #5FBE86;
    --loss: #E77B7B;
    --on-navy: #EAF0F8;
    --on-navy-dim: #9AAAC2;
    --shadow: 0 1px 2px rgba(0,0,0,.45), 0 10px 28px -18px rgba(0,0,0,.95);
  }
}
:root[data-theme="dark"] {
  --ground: #0B1119;
  --card: #131B26;
  --card-2: #18222E;
  --ink: #E7ECF3;
  --muted: #93A2B5;
  --faint: #6F7E92;
  --line: #212C3A;
  --line-strong: #354356;
  --navy: #16233A;
  --navy-2: #1E3050;
  --orange: #F97A2A;
  --accent-ink: #FF9147;
  --accent-wash: #2B1A0F;
  --win: #5FBE86;
  --loss: #E77B7B;
  --on-navy: #EAF0F8;
  --on-navy-dim: #9AAAC2;
  --shadow: 0 1px 2px rgba(0,0,0,.45), 0 10px 28px -18px rgba(0,0,0,.95);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; border-radius: 3px; }

/* ---------------- site chrome ---------------- */

.topbar {
  background: var(--navy);
  border-bottom: 3px solid var(--orange);
}
.topbar-in {
  max-width: 940px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 10px 26px;
  flex-wrap: wrap;
  min-height: 60px;
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 9px;
  text-decoration: none;
  margin-right: auto;
  padding: 12px 0;
}
/* The school's own mascot, from efhs.forsyth.k12.ga.us. STANDING RULE: the
   school mark goes in the header of the team sites, not only the hub - a
   parent should recognise the team before reading a word. Same asset the hub
   serves; sized here, never scaled in the file. */
.brand .mark { height: 40px; width: auto; display: block; flex: none; }
@media (max-width: 620px) { .brand .mark { height: 32px; } }
.brand .sub b { font-weight: 700; color: var(--on-navy); }
.brand .sub {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--on-navy-dim);
}
nav.site { display: flex; gap: 4px; padding-bottom: 2px; }
nav.site a {
  font-family: Oswald, "Arial Narrow", sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--on-navy-dim);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 5px;
  border-bottom: 2px solid transparent;
}
nav.site a:hover { color: var(--on-navy); background: var(--navy-2); }
nav.site a[aria-current="page"] { color: var(--on-navy); border-bottom-color: var(--orange); }

.wrap {
  max-width: 940px;
  margin: 0 auto;
  padding: 34px 20px 76px;
  display: flex;
  flex-direction: column;
  gap: 38px;
}

/* ---------------- headings ---------------- */

.eyebrow {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent-ink);
  display: flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::after {
  content: "";
  flex: 1;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--orange), transparent);
}
h1 {
  font-family: Oswald, "Arial Narrow", sans-serif;
  font-weight: 600;
  font-size: clamp(32px, 6.5vw, 52px);
  line-height: 1.03;
  text-transform: uppercase;
  margin: 0;
  text-wrap: balance;
}
h2 {
  font-family: Oswald, "Arial Narrow", sans-serif;
  font-weight: 500;
  font-size: 22px;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}
h2 .sub {
  font-family: "IBM Plex Sans", sans-serif;
  font-weight: 400;
  font-size: 14px;
  text-transform: none;
  letter-spacing: 0;
  color: var(--faint);
}
h3 {
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 16.5px;
  font-weight: 600;
  margin: 0;
  line-height: 1.35;
  letter-spacing: -.005em;
}
section { display: flex; flex-direction: column; gap: 16px; }
p { margin: 0; }
.lede { color: var(--muted); max-width: 64ch; font-size: 15.5px; }
.lede b { color: var(--ink); font-weight: 600; }

/* ---------------- shared bits ---------------- */

.note {
  font-size: 13.5px;
  color: var(--muted);
  background: var(--card);
  border-left: 3px solid var(--line-strong);
  border-radius: 0 8px 8px 0;
  padding: 12px 16px;
}
.note b { color: var(--ink); }

.pill {
  display: inline-block;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent-ink);
  border: 1px solid var(--orange);
  border-radius: 3px;
  padding: 1px 5px;
  vertical-align: 1.5px;
}
.pill.quiet { color: var(--faint); border-color: var(--line-strong); }

footer.site {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  font-size: 13px;
  color: var(--faint);
  display: flex;
  flex-direction: column;
  gap: 7px;
}
footer.site a { text-decoration-color: var(--line-strong); text-underline-offset: 2px; }

/* ---------------- standings table ---------------- */

.table-scroll { overflow-x: auto; border-radius: 10px; box-shadow: var(--shadow); }
table { width: 100%; min-width: 620px; border-collapse: collapse; background: var(--card); font-variant-numeric: tabular-nums; }
thead th {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--faint); text-align: right; padding: 12px 14px;
  background: var(--card-2); border-bottom: 1px solid var(--line-strong); white-space: nowrap;
}
thead th:nth-child(1), thead th:nth-child(2) { text-align: left; }
tbody td {
  padding: 13px 14px; border-bottom: 1px solid var(--line); text-align: right;
  font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 14px; font-weight: 500; white-space: nowrap;
}
tbody tr:last-child td { border-bottom: none; }
td.seed { text-align: left; color: var(--faint); width: 40px; font-size: 12px; }
td.team {
  text-align: left; font-family: "IBM Plex Sans", sans-serif; font-size: 15.5px;
  font-weight: 600; letter-spacing: -.005em; width: 100%;
}
td.team .city { display: block; font-size: 12px; font-weight: 400; color: var(--faint); }
.diff-pos { color: var(--win); }
.diff-neg { color: var(--loss); }
tr.us td { background: var(--accent-wash); }
tr.us td.seed { box-shadow: inset 3px 0 0 var(--orange); color: var(--accent-ink); font-weight: 700; }

/* ---------------- score cards ---------------- */

.week { display: flex; flex-direction: column; gap: 12px; }
.week-head {
  display: flex; align-items: baseline; gap: 10px;
  padding-bottom: 3px; border-bottom: 2px solid var(--line-strong);
}
.week-num {
  font-family: Oswald, "Arial Narrow", sans-serif; font-size: 15px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em;
}
.week-date {
  font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 11.5px;
  color: var(--faint); letter-spacing: .06em; text-transform: uppercase;
}
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(285px, 1fr)); gap: 12px; }
.game {
  background: var(--card); border-radius: 10px; box-shadow: var(--shadow);
  padding: 12px 14px 13px; display: flex; flex-direction: column; gap: 7px;
}
.game.us { background: var(--accent-wash); box-shadow: var(--shadow), inset 0 0 0 1px var(--orange); }
.side { display: flex; align-items: baseline; gap: 10px; }
.side .name { flex: 1; font-size: 15px; font-weight: 500; letter-spacing: -.005em; min-width: 0; }
.side.w .name { font-weight: 700; }
.side.l .name, .side.l .pts, .side.l .rec { color: var(--faint); }
.rec {
  flex: none; width: 42px; text-align: right;
  font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 11.5px; font-weight: 600;
  font-variant-numeric: tabular-nums; color: var(--faint);
}
.pts {
  flex: none; width: 34px; text-align: right;
  font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 19px; font-weight: 700;
  font-variant-numeric: tabular-nums; letter-spacing: -.02em;
}
.side.w .pts { color: var(--accent-ink); }
.game-foot {
  font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 10.5px;
  letter-spacing: .07em; text-transform: uppercase; color: var(--faint);
  border-top: 1px solid var(--line); padding-top: 7px;
}

/* ---------------- schedule ---------------- */

.weeks { display: flex; flex-direction: column; gap: 22px; }
.daycard { background: var(--card); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
.dayhead {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  padding: 13px 18px; background: var(--card-2); border-bottom: 1px solid var(--line-strong);
}
.daydate {
  font-family: Oswald, "Arial Narrow", sans-serif; font-size: 17px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em;
}
.daynote {
  margin-left: auto; font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px; color: var(--faint); letter-spacing: .04em;
}
.rows { display: flex; flex-direction: column; }
.row {
  display: grid; grid-template-columns: 1fr 62px; gap: 12px; align-items: baseline;
  padding: 11px 18px; border-bottom: 1px solid var(--line);
}
.row:last-child { border-bottom: none; }
.row.us { background: var(--accent-wash); box-shadow: inset 3px 0 0 var(--orange); }
.match { font-size: 15px; letter-spacing: -.005em; }
.match .at { color: var(--faint); font-style: normal; }
.row.us .match { font-weight: 600; }
.time {
  font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 13px; font-weight: 600;
  font-variant-numeric: tabular-nums; color: var(--muted); text-align: right; white-space: nowrap;
}
.row.us .time { color: var(--accent-ink); }
.open {
  padding: 10px 18px; font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11.5px; letter-spacing: .05em; color: var(--faint);
  background: var(--card-2); border-top: 1px solid var(--line);
}

/* ---------------- home page ---------------- */

.hero {
  background: var(--navy);
  border-radius: 14px;
  padding: 30px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute; inset: 0 0 0 auto; width: 8px;
  background: var(--orange);
}
.hero .eyebrow { color: var(--orange); }
.hero .eyebrow::after { background: linear-gradient(90deg, var(--orange), transparent); opacity: .55; }
.hero h1 { color: var(--on-navy); }
.hero p { color: var(--on-navy-dim); max-width: 58ch; font-size: 15.5px; }
.hero .recordline {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-top: 4px;
}
.hero .bigrec {
  font-family: Oswald, "Arial Narrow", sans-serif; font-size: 40px; font-weight: 700;
  color: var(--orange); line-height: 1; letter-spacing: .01em;
}
.hero .reclabel {
  font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 11px;
  letter-spacing: .14em; text-transform: uppercase; color: var(--on-navy-dim);
}

.cardgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.panel {
  background: var(--card); border-radius: 12px; box-shadow: var(--shadow);
  padding: 18px 20px; display: flex; flex-direction: column; gap: 6px;
}
.panel.accent { box-shadow: var(--shadow), inset 0 0 0 1px var(--orange); }
.panel .lbl {
  font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 10.5px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink);
}
.panel .big {
  font-family: Oswald, "Arial Narrow", sans-serif; font-size: clamp(20px, 3.6vw, 26px);
  font-weight: 500; text-transform: uppercase; letter-spacing: .01em; line-height: 1.14;
}
.panel .meta {
  font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 12px;
  color: var(--muted); letter-spacing: .03em; margin-top: 3px;
}
.panel p { font-size: 14.5px; color: var(--muted); }

.news { display: flex; flex-direction: column; gap: 0; background: var(--card); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
.item { padding: 15px 20px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 5px; }
.item:last-child { border-bottom: none; }
.item .src {
  font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 10.5px;
  letter-spacing: .1em; text-transform: uppercase; color: var(--faint);
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
}
.item h3 a { color: var(--ink); text-decoration: none; }
.item h3 a:hover { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 2px; }
.item p { font-size: 14.5px; color: var(--muted); }

.btnrow { display: flex; gap: 10px; flex-wrap: wrap; }
.btn {
  font-family: Oswald, "Arial Narrow", sans-serif; font-size: 14px; font-weight: 500;
  letter-spacing: .07em; text-transform: uppercase; text-decoration: none;
  padding: 10px 18px; border-radius: 7px;
  background: var(--orange); color: #FFFFFF;
}
.btn.ghost { background: transparent; color: var(--accent-ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn:hover { filter: brightness(1.06); }

.facts { display: flex; flex-direction: column; }
.fact {
  display: grid; grid-template-columns: 132px 1fr; gap: 14px;
  padding: 10px 0; border-bottom: 1px solid var(--line); align-items: baseline;
}
.fact:last-child { border-bottom: none; }
.fact dt {
  font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 10.5px;
  letter-spacing: .1em; text-transform: uppercase; color: var(--faint);
}
.fact dd { margin: 0; font-size: 14.5px; }

@media (max-width: 560px) {
  .fact { grid-template-columns: 1fr; gap: 2px; }
  .hero { padding: 24px 20px; }
}

/* ---------------- phones ----------------
   Most visitors are on a phone. The standings table is the one thing that
   does not survive a 390px viewport — 7 columns behind a sideways swipe
   means nobody ever sees a record. Below 620px each row becomes its own
   card: team on top, a labelled stat strip underneath. */

@media (max-width: 620px) {

  .wrap { padding: 26px 16px 60px; gap: 30px; }
  .topbar-in { padding: 0 16px; }

  .table-scroll { overflow: visible; border-radius: 0; box-shadow: none; }
  table { min-width: 0; display: block; background: transparent; }
  thead { display: none; }
  tbody { display: flex; flex-direction: column; gap: 9px; }

  tbody tr {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    column-gap: 6px;
    row-gap: 11px;
    background: var(--card);
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 12px 14px;
  }
  tbody tr.us { background: var(--accent-wash); box-shadow: var(--shadow), inset 3px 0 0 var(--orange); }

  tbody td { border: none; padding: 0; text-align: left; white-space: normal; }

  td.seed {
    grid-area: 1 / 1 / 2 / 2;
    width: auto; font-size: 13px; font-weight: 700; color: var(--faint);
  }
  tr.us td.seed { box-shadow: none; color: var(--accent-ink); }
  td.team { grid-area: 1 / 2 / 2 / 6; width: auto; font-size: 16px; }
  td.team .city { display: inline; margin-left: 7px; }

  tbody td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: .08em;
    color: var(--faint);
    margin-bottom: 1px;
  }
  tbody td[data-label] { font-size: 13.5px; }

  /* score cards and schedule rows already stack; just tighten them */
  .games { grid-template-columns: 1fr; }
  .row { padding: 11px 14px; }
  .dayhead { padding: 12px 14px; }
  .open { padding: 10px 14px; }
  .item { padding: 14px 16px; }
  .panel { padding: 16px 17px; }

  nav.site a { padding: 8px 10px; }
}

/* ---- televised -------------------------------------------------------------
   Written by make_tv.py. One network, NFHS Network, and it is a paid
   subscription - the badge has to say so rather than reading as a free
   stream. */
.tvblock { display: flex; flex-direction: column; gap: 12px; }
.tvblock .rows { display: flex; flex-direction: column; gap: 8px; }
.tvblock .lvl { font-family: "IBM Plex Mono", ui-monospace, monospace;
                font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase;
                color: var(--muted); margin-right: 6px; }
/* .row is the schedule's two-column layout (matchup | kickoff time) and .time
   is nowrap, which is right for "7:30" and wrong for a network name plus a
   FREE/SUBSCRIPTION pill. On a 390px phone that pushed the page 101px wide.
   These rows carry more on the right, so they stack. */
.tvblock .row { align-items: flex-start; gap: 6px; }
.tvblock .time { white-space: normal; display: flex; flex-wrap: wrap;
                 align-items: center; gap: 6px; justify-content: flex-end; }
/* The network name is two words and was breaking across lines in a narrow
   right column. It is a name - keep it on one line and let the column widen. */
.tvblock .time a { white-space: nowrap; }
.tvblock .match { flex: 1 1 auto; min-width: 0; }
@media (max-width: 620px) {
  .tvblock .row { flex-direction: column; }
  .tvblock .match, .tvblock .time { width: 100%; }
}

/* ---- sortable tables -------------------------------------------------------
   MISSING UNTIL 4 Oct 2026. roster.html shipped with the sortable markup and
   the sorting JS but none of this, so the headers had no pointer cursor, no
   hover, no arrows - nothing saying they could be clicked. It sorted; it just
   looked completely inert, which is indistinguishable from broken.

   Bryan: "we advertise we can sort but it doesnt sort". */
table.sortable th[data-sort] { cursor: pointer; user-select: none; white-space: nowrap; }
table.sortable th[data-sort]:hover { color: var(--accent-ink); }
table.sortable th[data-sort]:focus-visible { outline: 2px solid var(--orange); outline-offset: -2px; }
table.sortable th[data-sort]::after { content: " \2195"; opacity: .4; font-size: .85em; }
table.sortable th[aria-sort="ascending"]::after  { content: " \2191"; opacity: 1; }
table.sortable th[aria-sort="descending"]::after { content: " \2193"; opacity: 1; }

/* Under 620px the table becomes stacked cards and `thead` is display:none -
   there IS no column heading to tap, on the device most people are holding.
   The JS builds this control and it appears exactly where the headers go. */
.sortbar { display: none; align-items: center; gap: 8px; margin: 0 0 10px;
           font-size: 13.5px; color: var(--muted); }
.sortbar select, .sortbar button {
  font: inherit; color: var(--ink); background: var(--card);
  border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px;
  min-height: 40px; }
.sortbar button { cursor: pointer; }
.sortbar button:hover { border-color: var(--orange); color: var(--accent-ink); }
@media (max-width: 620px) { .sortbar { display: flex; } }
