/* AE Softball look: navy, red and white, Big Shoulders Display for headings, Archivo for text. */
:root {
  color-scheme: light;
  --navy: #141b2d; --navy-2: #232c44; --red: #c8283c; --pink: #f26b7f; --tint: #fdf0f0;
  --bg: #f3f4f7; --surface: #ffffff; --sunk: #eceef3; --fg: #141b2d; --muted: #5d6477; --line: #d9dce3;
  --good: #1f7a4d; --warn: #a15c00; --bad: #b3261e;
  --display: "Big Shoulders Display", Impact, "Arial Narrow", sans-serif;
  --body: Archivo, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}
* { box-sizing: border-box }
html, body { margin: 0 }
body { background: var(--bg); color: var(--fg); font-family: var(--body); font-size: 15px; line-height: 1.5 }
[hidden] { display: none !important }
.hero { background: var(--navy); color: #fff; border-bottom: 5px solid var(--red) }
.hero .in { max-width: 940px; margin: 0 auto; padding: 18px 16px 16px; display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; justify-content: space-between }
.org { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: .85rem }
.badge { width: 28px; height: 28px; border-radius: 50%; background: var(--red); display: grid; place-items: center; font-weight: 700; font-size: .72rem; flex: none }
.hero h1 { font-family: var(--display); font-weight: 700; font-size: 2.6rem; line-height: 1; margin: 8px 0 0; letter-spacing: .5px; text-transform: uppercase }
.hero .sub { color: var(--pink); font-weight: 600; font-size: .95rem; margin-top: 6px }
.hero button { background: transparent; color: #fff; border-color: #4a5470 }
.wrap { max-width: 940px; margin: 0 auto; padding: 22px 16px 56px; display: flex; flex-direction: column; gap: 22px }
h2 { font-family: var(--display); font-weight: 700; font-size: 1.55rem; line-height: 1.1; margin: 0 }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 18px; display: flex; flex-direction: column; gap: 16px }
.head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 10px }
legend { padding: 0; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--red); margin-bottom: 8px }
.hint { font-size: .82rem; color: var(--muted); margin: -4px 0 2px; max-width: 72ch }
label { display: flex; flex-direction: column; gap: 4px; font-size: .82rem; font-weight: 600; min-width: 0 }
label small { font-weight: 400; color: var(--muted) }
input, select, textarea { font: inherit; font-size: 16px; color: var(--fg); background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 9px 10px; width: 100%; min-width: 0 }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--red); outline-offset: 2px }
button { font: inherit; font-weight: 600; border-radius: 6px; padding: 10px 16px; cursor: pointer; border: 1px solid var(--line); background: var(--surface); color: var(--fg) }
button.primary { background: var(--red); color: #fff; border-color: var(--red) }
button.small { padding: 5px 10px; font-size: .8rem }
button.danger { color: var(--bad); border-color: var(--bad) }
button:disabled { opacity: .5; cursor: default }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center }
.msg { font-size: .85rem; color: var(--muted) } .msg.err { color: var(--bad) } .msg.ok { color: var(--good) }
details.opt { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px }
details summary { cursor: pointer; font-weight: 600; font-size: .92rem }
details summary small { font-weight: 400; color: var(--muted) }
details[open] > summary { margin-bottom: 12px }
details.panel > summary { font-family: var(--display); font-weight: 700; font-size: 1.3rem }

.scores { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 8px; overflow: hidden }
.score { background: var(--sunk); padding: 10px 12px; display: flex; flex-direction: column; gap: 1px; min-width: 0 }
.score.lead { background: var(--navy); color: #fff }
.score.lead .k, .score.lead .u { color: var(--pink); opacity: 1 }
.score.flag { box-shadow: inset 0 3px 0 var(--red) }
.score .k { font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted) }
.score .v { font-family: var(--display); font-size: 1.9rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1 }
.score .u { font-size: .72rem; color: var(--muted) }

.tablebox { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px }
table { border-collapse: collapse; width: 100%; font-size: .85rem; font-variant-numeric: tabular-nums }
th, td { padding: 8px 10px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--line) }
th:nth-child(-n+2), td:nth-child(-n+2) { text-align: left }
th { font-size: .7rem; letter-spacing: .05em; text-transform: uppercase; color: #fff; background: var(--navy); font-weight: 600 }
tr:last-child td { border-bottom: 0 }
td.pi { font-family: var(--display); font-weight: 700; font-size: 1.15rem }
td .sub { color: var(--muted); font-size: .78rem; margin-left: 5px }
.delta { font-family: var(--body); font-size: .72rem; margin-left: 6px; font-weight: 600 }
.delta.up { color: var(--good) } .delta.down { color: var(--bad) }
.pr { font-size: .62rem; font-weight: 700; letter-spacing: .05em; background: var(--red); color: #fff; border-radius: 3px; padding: 1px 4px; margin-left: 5px }
.lag { color: var(--red); font-weight: 700 }
.empty { padding: 26px 16px; text-align: center; color: var(--muted) }
.empty strong { display: block; color: var(--fg); font-family: var(--display); font-size: 1.2rem; margin-bottom: 2px }
.rules { color: var(--muted); font-size: .88rem } .rules td, .rules th { white-space: normal; text-align: left } .rules p { margin: 0 0 10px; max-width: 70ch }
.linkrow td { white-space: normal } .linkrow code { font-size: .74rem; word-break: break-all; color: var(--muted) }
.login { max-width: 420px; margin: 40px auto }
.bignum { text-align: center }
.bignum b { font-family: var(--display); font-weight: 700; font-size: 5.2rem; line-height: .95; color: transparent; -webkit-text-stroke: 2px var(--red); display: block }
.bignum span { color: var(--pink); font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase }
.foot { text-align: center; color: var(--muted); font-size: .8rem }
@media (max-width: 520px) { .hero h1 { font-size: 2rem } .bignum b { font-size: 4rem } }

/* Roster sort markers */
th[aria-sort="ascending"]::after { content: " ▲"; font-size: .6rem }
th[aria-sort="descending"]::after { content: " ▼"; font-size: .6rem }

/* Profile sheet */
.targets { background: var(--navy); color: #fff; border: 4px solid var(--red); border-radius: 9px; padding: 14px 20px 16px }
.targets .top { display: flex; flex-wrap: wrap; gap: 6px; justify-content: space-between; align-items: baseline; border-bottom: 1px solid #333c52; padding-bottom: 6px }
.targets h2 { color: #fff } .targets .top span { font-size: .78rem; color: #c9cedb }
.tg { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; text-align: center; margin-top: 10px }
.tg b { font-family: var(--display); font-weight: 700; font-size: 2.3rem; display: block; line-height: 1.1 }
.tg span { color: var(--pink); font-size: .76rem; display: block }
.lead { font-size: 1rem; margin: 0; max-width: 75ch }
.hot { background: var(--tint); border: 1px dashed var(--red) }
.hot h2 { color: var(--red) } .hot p { margin: 0; max-width: 75ch } .hot ul { margin: 0; padding-left: 18px }
.sheet td, .sheet th { white-space: normal; text-align: left }
.sheet td:first-child { font-weight: 600 } tr.tot td { background: var(--tint); font-weight: 700 }
.note { font-size: .8rem; color: var(--muted); margin: 0; max-width: 80ch }
.sheetfoot { display: flex; flex-wrap: wrap; gap: 6px; justify-content: space-between; font-size: .78rem; color: var(--muted); border-top: 3px solid var(--red); padding-top: 8px }
@media print {
  @page { size: letter; margin: 0.45in }
  body { background: #fff; font-size: 11.5px }
  .noprint { display: none !important }
  .hero, .targets, th, .score.lead, tr.tot td, .hot, .badge { -webkit-print-color-adjust: exact; print-color-adjust: exact }
  .hero .in { padding: 12px 14px } .hero h1 { font-size: 2.2rem } .bignum b { font-size: 4rem }
  .wrap { display: block; padding: 10px 0 0; max-width: none } .wrap > * { margin: 0 0 10px }
  .panel { display: block; padding: 10px 12px; break-inside: auto } .panel > * { margin-bottom: 8px } .panel > *:last-child { margin-bottom: 0 }
  tr, .targets, .hot, .lead { break-inside: avoid } h2, .head { break-after: avoid }
  th, td { padding: 5px 8px } h2 { font-size: 1.3rem } .tg b { font-size: 1.9rem } .targets { padding: 10px 16px 12px }
  .tablebox { overflow: visible }
}
#changeBox p { margin: 0 0 4px } #changeList { margin: 0 0 6px; padding-left: 18px; max-width: 80ch } #changeList li { margin-top: 3px }
