/* Standings — season points, week results, skins. Reuses app.css tokens; everything here is prefixed st-. */

.standings-head .eyebrow .icon { width: 16px; height: 16px; }
.standings-tabs { margin-bottom: 4px; }

/* ---------- hero tiles ---------- */
.st-tile { position: relative; overflow: hidden; min-width: 0; }
.st-tile .stat-label { display: inline-flex; align-items: center; gap: 6px; }
.st-tile .stat-label .icon { width: 15px; height: 15px; color: var(--gold); }
.st-tile .stat-value { font-size: 28px; overflow-wrap: anywhere; }
.st-tile .stat-sub { overflow-wrap: anywhere; }
.st-of { font-size: 0.55em; font-weight: 700; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }
.st-tile-crown { padding-right: 76px; }
.st-tile-crown .stat-value.st-tbd { font-size: 21px; line-height: 1.1; }
.st-crest {
  position: absolute; top: 50%; right: 14px; width: 54px; height: 54px; transform: translateY(-50%);
  filter: drop-shadow(0 0 14px rgba(215, 178, 93, 0.35));
  opacity: 0.95;
}

/* ---------- season layout ---------- */
.st-layout { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
@media (max-width: 960px) {
  .st-layout { grid-template-columns: minmax(0, 1fr); }
}
.st-aside .card-head { margin-bottom: 8px; }
.st-footnote { margin: 10px 2px 0; line-height: 1.5; }
.st-section-title { flex-wrap: wrap; align-items: baseline; row-gap: 4px; }
.st-section-title .h2 { white-space: nowrap; }

/* ---------- tables ---------- */
.st-table-wrap { box-shadow: var(--shadow); }
.st-table td { vertical-align: middle; }
.st-col-rank { width: 56px; }
.st-table .rank { width: auto; font-size: 20px; line-height: 1; }
.st-table .rank small, .st-mini .rank small { font-size: 0.6em; margin-right: 1px; vertical-align: 0.15em; }
.st-move { display: block; height: 11px; margin-top: 3px; font-size: 11px; font-weight: 700; letter-spacing: 0.02em; line-height: 1; }
.st-move.is-up { color: var(--green); }
.st-move.is-down { color: var(--red); }
.st-move.is-flat { color: var(--faint); }

.st-player { display: flex; align-items: center; gap: 10px; min-width: 0; }
.st-player-text { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.st-name { font-weight: 600; color: var(--text); white-space: nowrap; }
.st-sub { font-size: 12px; color: var(--muted); white-space: nowrap; }
.st-tie { font-size: 12px; color: var(--gold); white-space: normal; max-width: 52ch; line-height: 1.35; }
.st-you { padding: 1px 7px; font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; margin-left: 4px; vertical-align: 1px; }
.st-pts { font-family: var(--font-display); font-size: 19px; font-weight: 800; letter-spacing: 0.02em; color: var(--text); }
.st-last { font-family: var(--font-display); font-size: 16px; font-weight: 700; color: var(--text-2); }
.st-ns { font-size: 11.5px; color: var(--red); margin-left: 2px; }
.st-pts.red, .st-last.red { color: var(--red); } /* a negative week (−2) */
.st-net strong { font-family: var(--font-display); font-size: 18px; }
.st-net .show-sm { display: block; margin-top: 2px; }
.st-table tbody tr:first-child .st-pts { color: var(--gold-strong); }

@media (max-width: 640px) {
  .st-table th, .st-table td { padding: 10px 8px; }
  .st-table th:first-child, .st-table td:first-child { padding-left: 12px; }
  .st-table th:last-child, .st-table td:last-child { padding-right: 12px; }
  .st-col-rank { width: 40px; }
  .st-table .avatar-sm { width: 26px; height: 26px; font-size: 10px; }
  .st-player { gap: 8px; }
  .st-tie { max-width: 30ch; }
  .st-tile .stat-value { font-size: 24px; }
  .st-tile-crown { padding-right: 16px; }
  .st-tile-crown > :not(.st-crest) { position: relative; }
  .st-crest { top: auto; bottom: -16px; right: -16px; width: 88px; height: 88px; transform: none; opacity: 0.1; filter: none; }
  .st-tile-crown .stat-value.st-tbd { font-size: 18px; }
}

/* ---------- season table: penalties, playoffs, ties ---------- */
.st-po { font-size: 12px; font-weight: 600; color: var(--text-2); white-space: normal; line-height: 1.35; }
.st-po.is-bye { color: var(--gold-strong); }
.st-po.is-play-in, .st-po.is-seed-tie, .st-po.is-cut { color: var(--blue); }
.st-po.is-out { color: var(--muted); font-weight: 500; }
.st-po.is-ineligible { color: var(--red); }
.st-po.is-left { color: var(--muted); font-weight: 500; }
.st-left { font-size: 12px; color: var(--muted); white-space: normal; max-width: 52ch; line-height: 1.35; }
.st-drop { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.st-season-table td.num { white-space: nowrap; }
.st-dues-line { line-height: 1.6; color: var(--text-2); }
.st-ties .card-head { margin-bottom: 8px; }
.st-missed-who .title, .st-missed-who .sub { display: block; }
.st-ties .st-rules-list { font-size: 14px; }

/* ---------- playoff picture ---------- */
.st-po-label { margin-top: 4px; font-family: var(--font-display); font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.st-po-list { list-style: none; margin: 6px 0 12px; padding: 0; display: grid; gap: 6px; font-size: 14.5px; color: var(--text); }
.st-po-list li { display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; row-gap: 4px; }
.st-po-seed {
  flex: none; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  background: var(--bg-elev); border: 1px solid var(--line); color: var(--text-2);
  font-family: var(--font-display); font-size: 12.5px; font-weight: 700;
}
.st-po-v { color: var(--muted); font-size: 12.5px; }

/* ---------- this week (provisional) mini board ---------- */
.st-mini .list-item { padding: 10px 0; gap: 10px; }
.st-mini .rank { width: 1.8em; font-size: 17px; }
.st-mini .list-item.is-me { background: var(--gold-soft); margin: 0 -10px; padding: 10px; border-radius: var(--radius-sm); }
.st-mini-net { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; }
.st-mini-net strong { font-family: var(--font-display); font-size: 18px; }
.st-live .card-foot a { display: inline-flex; align-items: center; gap: 2px; }
.st-live .card-foot .icon { width: 16px; height: 16px; }

/* ---------- rules ---------- */
.st-rules-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 14.5px; color: var(--text-2); }
.st-rules-list li { position: relative; padding-left: 18px; line-height: 1.45; }
.st-rules-list li::before {
  content: ""; position: absolute; left: 2px; top: 0.55em; width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 8px rgba(215, 178, 93, 0.6);
}
.st-rules-list li.muted::before { background: var(--faint); box-shadow: none; }
.st-rules-list strong { color: var(--text); }

/* ---------- week picker ---------- */
.st-weekpicker { display: flex; align-items: center; gap: 12px; margin-top: 18px; min-width: 0; }
.st-weekpicker-label { flex: none; font-family: var(--font-display); font-size: 12.5px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.st-weekchips { min-width: 0; }
.st-weekchips a { min-width: 44px; text-align: center; font-family: var(--font-display); font-weight: 700; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.st-live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 8px var(--blue); }
.st-weekchips a.is-active .st-live-dot { background: var(--gold-ink); box-shadow: none; }

/* ---------- week header ---------- */
.st-weekhead-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.st-weekhead-top .badge .icon { width: 14px; height: 14px; }
.st-tee-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: 0; border: 1px solid rgba(255, 255, 255, 0.35); }
.st-weekhead-stats {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px;
  margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line);
}
.st-weekhead-stats .stat { min-width: 0; }
.st-sm-value { font-size: 24px; overflow-wrap: anywhere; }
.st-weekhead-stats .stat-sub a { display: inline-flex; align-items: center; gap: 2px; }
.st-weekhead-stats .stat-sub .icon { width: 15px; height: 15px; }
@media (max-width: 640px) {
  .st-weekhead-top { flex-direction: column-reverse; gap: 10px; }
  .st-weekhead-stats { gap: 10px; }
  .st-sm-value { font-size: 19px; }
  .st-weekhead-stats .stat-label { font-size: 11px; letter-spacing: 0.08em; }
  .st-weekhead-stats .stat-sub { font-size: 12px; }
}
.st-week-extras .card { min-width: 0; }
.st-chip-me { border-color: var(--gold-line); color: var(--gold-strong); }
.empty-state > .icon { width: 36px; height: 36px; color: var(--gold); margin: 0 auto; }
.st-empty-crest { margin: 0 auto 6px; filter: drop-shadow(0 0 14px rgba(215, 178, 93, 0.3)); }

/* ---------- skins ---------- */
.st-pot-row { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; }
@media (max-width: 860px) { .st-pot-row { grid-template-columns: minmax(0, 1fr); } }
.st-pot { display: flex; flex-direction: column; justify-content: space-between; }
.st-pot-main { display: flex; align-items: center; gap: 16px; }
.st-pot-icon {
  display: grid; place-items: center; flex: none; width: 58px; height: 58px; border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, rgba(236, 201, 116, 0.28), rgba(215, 178, 93, 0.08));
  border: 1px solid var(--gold-line); color: var(--gold-strong);
}
.st-pot-icon .icon { width: 30px; height: 30px; }
.st-pot-value { font-size: 46px; color: var(--gold-strong); margin: 4px 0 2px; }
.st-pot-split { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--gold-line); }
.st-pot-split > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.st-pot-half { font-family: var(--font-display); font-size: 21px; font-weight: 800; letter-spacing: 0.02em; }
.st-pot-meta .notice { margin-top: 12px; }
.st-pot-meta .st-rules-list { font-size: 14px; gap: 6px; }

.st-pot-card .card-head { align-items: flex-start; flex-wrap: wrap; row-gap: 8px; }
.st-holes { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 5px; }
.st-hole {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  padding: 5px 0 6px; border-radius: 8px; background: var(--bg-elev); border: 1px solid var(--line);
  min-width: 0;
}
.st-hole small { font-size: 10px; color: var(--faint); line-height: 1; }
.st-hole span { font-family: var(--font-display); font-size: 13px; font-weight: 800; letter-spacing: 0.02em; line-height: 1.1; color: var(--faint); }
.st-hole.is-won { background: var(--gold-soft); border-color: var(--gold-line); }
.st-hole.is-won span { color: var(--gold-strong); }
.st-hole.is-won small { color: var(--gold); }
.st-hole.is-me { box-shadow: 0 0 0 1.5px var(--gold-strong); }

.st-skin-list { margin-top: 12px; }
.st-skin-list .list-item { gap: 12px; padding: 10px 0; }
.st-skin-who .title, .st-skin-who .sub { display: block; }
.st-skin-who .sub { font-size: 13px; }
.st-skin-list .list-item.is-me { background: var(--gold-soft); margin: 0 -10px; padding: 10px; border-radius: var(--radius-sm); }
.st-hole-num {
  display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none;
  width: 46px; height: 46px; border-radius: 12px; background: var(--bg-elev); border: 1px solid var(--line);
  font-family: var(--font-display); font-size: 20px; font-weight: 800; line-height: 1;
}
.st-hole-num small { font-size: 9.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.st-amt { font-family: var(--font-display); font-size: 19px; font-weight: 800; color: var(--gold-strong); white-space: nowrap; }
.st-ties-label { color: var(--text-2); font-weight: 600; }

.st-payout-table tfoot th, .st-payout-table tfoot td {
  position: static; background: var(--bg-elev); border-top: 1px solid var(--line-strong); border-bottom: 0;
  color: var(--text); font-weight: 700;
}
.st-payout-table tfoot th { font-size: 13px; }
.st-owed { font-family: var(--font-display); font-size: 18px; font-weight: 800; color: var(--gold-strong); }
/* a team week's split (Kevin, 10-24): what each partner gets, under the team skin's value */
.st-amt-each, .st-owed-each { display: block; font-family: var(--font-body); font-size: 12px; font-weight: 500; color: var(--muted); white-space: nowrap; text-align: right; }
.section-title .h2 .icon { color: var(--gold); }

/* the week's skins card (standings/_skins-money.ejs) */
.st-week-skins .list-item { gap: 12px; padding: 8px 0; }
.st-week-skins .list-item .title, .st-week-skins .list-item .sub { display: block; }
.st-week-skins .list-item.is-me { background: var(--gold-soft); margin: 0 -10px; padding: 8px 10px; border-radius: var(--radius-sm); }

/* admins: record a 9-hole playoff (standings/season.ejs) */
.st-nine-form .row-wrap { align-items: flex-end; gap: 10px; }
.st-nine-form label { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.st-nine-select { width: auto; min-width: 128px; }
/* a team week's pot line is longer ("5 team skins · $10 a team skin, $5 to each partner"): it wraps on a phone */
.st-pot-card .card-head [data-pot-line] { white-space: normal; text-align: right; min-width: 0; line-height: 1.3; border-radius: 10px; }
.st-owed-each { white-space: normal; min-width: 4.5em; }
/* on a phone a team's name in the skins table can wrap, so its split stays in view */
@media (max-width: 640px) {
  .st-payout-table .st-name { white-space: normal; }
}
