/* ============================================================================
 * FantasyStakes — UI/UX Rev 4.2 · The Week and Ledger layouts
 * Sprint 7 Package 3
 * ========================================================================== */

/* ── The Week · header ─────────────────────────────────────────────────────
 * One compact switch. Rev 4.2 removed the kickoff clock and the
 * Preview/Results/Review selector; nothing takes their space. */

.fs-wkhead {
  padding: var(--fs-space-3) var(--fs-gutter) var(--fs-space-2);
}

.fs-wkswitch {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--fs-space-3);
}

.fs-wkswitch__opt {
  /* Visual size is the POR's; the hit area is padded up to a phone-usable
   * target without changing the type. */
  min-height: 32px;
  padding: 2px var(--fs-space-3);
  border: 0;
  border-radius: 4px;
  background: transparent;
  font-family: inherit;
  font-size: var(--fs-size-fine);
  font-weight: var(--fs-weight-strong);
  letter-spacing: var(--fs-track-eyebrow);
  color: var(--g2);
  cursor: pointer;
}

/* The selected week is emphasised in weight and colour, and underscored, so
 * the choice is legible without a second control saying which mode it is. */
.fs-wkswitch__opt.is-selected {
  color: var(--gold);
  background: var(--goldbg);
  box-shadow: inset 0 -1px 0 var(--gold);
}

.fs-wkswitch__opt:focus-visible { outline: 1px solid var(--gold); outline-offset: 1px; }

.fs-wkswitch__mid {
  font-size: var(--fs-size-eyebrow);
  letter-spacing: var(--fs-track-eyebrow);
  color: var(--g2);
}

.fs-wkhead__sub {
  margin-top: 3px;
  text-align: center;
  font-size: var(--fs-size-micro);
  color: var(--g1);
}

/* ── The Week · three modules ──────────────────────────────────────────────
 * The column scrolls; each module sizes to its own content. Yahoo and Bets
 * carry bounded snap carousels so a long slate cannot push Pools off the
 * dashboard. */

.fs-wkscroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 var(--fs-gutter) var(--fs-space-4);
}

.fs-wkmod + .fs-wkmod { margin-top: var(--fs-space-2); }

/* Vertical snap carousel — one card presented at a time, with a deliberate
 * peek at the next card's identity line so the rail reads as scrollable. The
 * height is set so that peek lands on the next card's HEADER rather than part
 * way through its market row: a card sliced through its middle looks like a
 * layout fault, while a visible next-card title reads as an invitation. */
.fs-vcar {
  max-height: 180px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
}

.fs-vcar.is-compact { max-height: 162px; }

.fs-vcar::-webkit-scrollbar { display: none; }

.fs-vcar__item {
  padding-bottom: var(--fs-space-2);
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

/* A Yahoo fixture is not a wager: no accent bar unless it is settled, and the
 * badge carries the source. */
.fs-wcard--yahoo .fs-wcard__badge { letter-spacing: .12em; }

/* ── The Week · Pools rows ─────────────────────────────────────────────────
 * All four visible together, no carousel of their own. */

.fs-poolrows {
  display: flex;
  flex-direction: column;
  gap: var(--fs-space-2);
}

.fs-poolrow {
  display: flex;
  align-items: center;
  gap: var(--fs-space-3);
  width: 100%;
  padding: var(--fs-space-3) var(--fs-space-4);
  background: var(--card);
  border: var(--fs-border);
  border-radius: var(--fs-radius-tile);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.fs-poolrow:active { background: #1a1610; }
.fs-poolrow:focus-visible { outline: 1px solid var(--gold); outline-offset: 1px; }

.fs-poolrow__badge {
  flex: 0 0 auto;
  padding: 1px var(--fs-space-2);
  border-radius: 3px;
  font-size: 7px;
  font-weight: var(--fs-weight-heavy);
  letter-spacing: .1em;
  white-space: nowrap;
}

.fs-poolrow__badge.is-team { background: var(--greenbg); color: var(--green2); }
.fs-poolrow__badge.is-matchup { background: #12202a; color: #8fc3e8; }
.fs-poolrow__badge.is-rollover { box-shadow: inset 0 0 0 1px var(--gold); }

.fs-poolrow__main { flex: 1 1 auto; min-width: 0; }

.fs-poolrow__name {
  display: block;
  font-size: 10px;
  font-weight: var(--fs-weight-strong);
  line-height: 1.25;
  color: var(--bone);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fs-poolrow__state {
  display: block;
  font-size: 8.5px;
  color: var(--g1);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fs-poolrow__fig { flex: 0 0 auto; text-align: right; }

.fs-poolrow__figlabel {
  display: block;
  font-size: 7px;
  letter-spacing: .1em;
  color: var(--g2);
}

.fs-poolrow__figvalue {
  display: block;
  font-family: var(--fs-font-money);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  font-weight: var(--fs-weight-strong);
  color: var(--bone);
}

.fs-poolrow__figvalue.is-carried { color: var(--gold); }

/* ── Matchup Preview · source banner ───────────────────────────────────────*/

.fs-srcbanner {
  margin-bottom: var(--fs-space-3);
  padding: var(--fs-space-2) var(--fs-space-3);
  border-radius: 4px;
  background: #12202a;
  color: #8fc3e8;
  font-size: var(--fs-size-eyebrow);
  font-weight: var(--fs-weight-heavy);
  letter-spacing: .12em;
  text-align: center;
}

/* ── Ledger · header ───────────────────────────────────────────────────────
 * Request Top-Off is a small text control, not a button competing with the
 * strip below it. */

.fs-topoff {
  /* A small text control by POR — padded to a usable hit area, not enlarged. */
  min-height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: var(--fs-size-micro);
  font-weight: var(--fs-weight-medium);
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.fs-topoff:focus-visible { outline: 1px solid var(--gold); outline-offset: 2px; }

/* The second strip's label reuses the subtitle typography; only its spacing
 * is local. */
.fs-seasonlabel {
  padding: var(--fs-space-3) var(--fs-gutter) var(--fs-space-1);
}

/* ── Ledger · sections ─────────────────────────────────────────────────────*/

.fs-lscroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: var(--fs-space-3) var(--fs-gutter) var(--fs-space-6);
}

.fs-lsec {
  padding: var(--fs-space-4);
  background: var(--card);
  border: var(--fs-border);
  border-radius: var(--fs-radius-card);
}

.fs-lsec + .fs-lsec, .fs-lscroll > .fs-settle { margin-top: var(--fs-space-3); }

/* Section 2 is the statement of the page: a gold edge and a lifted fill mark
 * it as the section the others explain into. */
.fs-lsec.is-elevated {
  background: #191408;
  border: var(--fs-border-edge);
  box-shadow: inset 2px 0 0 var(--gold);
}

.fs-lsec__head { display: flex; align-items: baseline; gap: var(--fs-space-2); }

.fs-lsec__num {
  font-family: var(--fs-font-money);
  font-size: var(--fs-size-micro);
  font-weight: var(--fs-weight-heavy);
  color: var(--gold);
}

.fs-lsec__title {
  font-size: var(--fs-size-fine);
  font-weight: var(--fs-weight-heavy);
  letter-spacing: var(--fs-track-eyebrow);
  color: var(--bone);
}

.fs-lsec__sub {
  margin: 2px 0 var(--fs-space-3);
  font-size: var(--fs-size-micro);
  line-height: 1.4;
  color: var(--g1);
}

.fs-lsec__body { display: flex; flex-direction: column; }

/* ── Ledger · rows ─────────────────────────────────────────────────────────*/

.fs-lrow {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--fs-space-3);
  padding: 3px 0;
  font-size: var(--fs-size-body);
}

.fs-lrow__label { color: var(--g1); }
.fs-lrow.is-lead .fs-lrow__label { color: var(--bone); font-weight: var(--fs-weight-medium); }

/* Indentation plus the ↳ marker is what makes 140 + 80 = 220 readable. */
.fs-lrow.is-level1 { padding-left: var(--fs-space-5); }
.fs-lrow.is-level1 .fs-lrow__label { color: var(--g1); }

.fs-lrow__mark { margin-right: 4px; color: var(--g2); }

.fs-lrow__value {
  font-family: var(--fs-font-money);
  font-variant-numeric: tabular-nums;
  font-weight: var(--fs-weight-medium);
  color: var(--bone);
  white-space: nowrap;
}

.fs-lrow__value.is-positive { color: var(--green2); }
.fs-lrow__value.is-negative { color: var(--red); }
.fs-lrow__value.is-state { font-family: inherit; color: var(--amber); }

.fs-lrow.is-total {
  margin-top: var(--fs-space-2);
  padding-top: var(--fs-space-2);
  border-top: var(--fs-border-hair);
}

.fs-lrow.is-total .fs-lrow__label {
  color: var(--bone);
  font-weight: var(--fs-weight-strong);
}

.fs-lrow.is-total .fs-lrow__value { font-weight: var(--fs-weight-strong); }

/* ── Ledger · groups and expandable detail ─────────────────────────────────*/

.fs-lgroup + .fs-lgroup { margin-top: var(--fs-space-4); }

.fs-lgroup__head {
  margin-bottom: var(--fs-space-1);
  font-size: var(--fs-size-eyebrow);
  font-weight: var(--fs-weight-heavy);
  letter-spacing: var(--fs-track-eyebrow);
  color: var(--gold);
}

.fs-lexp__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--fs-space-3);
  width: 100%;
  min-height: 32px;
  padding: var(--fs-space-2) 0;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: var(--fs-size-body);
  text-align: left;
  cursor: pointer;
}

.fs-lexp__head:focus-visible { outline: 1px solid var(--gold); outline-offset: 1px; }

.fs-lexp__chev {
  display: inline-block;
  margin-right: 4px;
  color: var(--g2);
  transition: transform .12s ease;
}

.fs-lexp.is-open .fs-lexp__chev { transform: rotate(90deg); }

.fs-lexp__body { display: none; }
.fs-lexp.is-open .fs-lexp__body { display: block; }

.fs-lexp__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--fs-space-3);
  padding: 2px 0 2px var(--fs-space-5);
  font-size: var(--fs-size-micro);
}

.fs-lexp__label { color: var(--g2); }

.fs-lexp__value {
  font-family: var(--fs-font-money);
  font-variant-numeric: tabular-nums;
  color: var(--g1);
  white-space: nowrap;
}

.fs-lexp__value.is-state { font-family: inherit; color: var(--amber); }

.fs-lmemo {
  margin-top: var(--fs-space-4);
  padding-top: var(--fs-space-3);
  border-top: var(--fs-border-hair);
  font-size: var(--fs-size-micro);
  line-height: 1.45;
  color: var(--g1);
}

.fs-lmemo__mark {
  margin-right: 4px;
  font-size: 7px;
  font-weight: var(--fs-weight-heavy);
  letter-spacing: .12em;
  color: var(--g2);
}

/* ── Ledger · Current Settle card ──────────────────────────────────────────
 * Inert by construction: no cursor, no hover, no tap target. */

.fs-settle {
  padding: var(--fs-space-4);
  background: var(--goldbg);
  border: var(--fs-border-edge);
  border-radius: var(--fs-radius-card);
  cursor: default;
}

.fs-settle__head {
  margin-bottom: var(--fs-space-3);
  font-size: var(--fs-size-fine);
  font-weight: var(--fs-weight-heavy);
  letter-spacing: var(--fs-track-eyebrow);
  color: var(--gold);
}

.fs-settle__row,
.fs-settle__result {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--fs-space-3);
  padding: 3px 0;
  font-size: var(--fs-size-body);
}

.fs-settle__label { color: var(--g1); }

.fs-settle__value {
  font-family: var(--fs-font-money);
  font-variant-numeric: tabular-nums;
  color: var(--bone);
  white-space: nowrap;
}

.fs-settle__value.is-positive { color: var(--green2); }
.fs-settle__value.is-negative { color: var(--red); }

.fs-settle__result {
  margin-top: var(--fs-space-2);
  padding-top: var(--fs-space-3);
  border-top: 1px solid var(--edge);
}

.fs-settle__result .fs-settle__label {
  color: var(--bone);
  font-weight: var(--fs-weight-strong);
}

.fs-settle__total {
  font-family: var(--fs-font-money);
  font-variant-numeric: tabular-nums;
  font-size: var(--fs-size-value);
  font-weight: var(--fs-weight-strong);
  white-space: nowrap;
}

.fs-settle__total.is-positive { color: var(--green2); }
.fs-settle__total.is-negative { color: var(--red); }
/* ── SKUNK OF THE WEEK (WP6A) ──────────────────────────────────────────────
 * The week's headline result, above the three modules. Not a module: it has no
 * rail, no carousel and nothing to tap, and the locked module set is three.
 *
 * THE MARGIN IS THE KEY NUMBER and the type scale says so — it is the largest
 * figure on the tab, above the final score rather than beside it. That
 * hierarchy is the product ruling's, not a styling preference: the differential
 * is what a GM repeats to the league, and the raw scores are the evidence for
 * it. Amber rather than gold: a Skunk is not an achievement. */

.fs-skunk {
  margin-bottom: var(--fs-space-3);
  padding: var(--fs-space-4);
  background: var(--card);
  border: var(--fs-border);
  border-left: 3px solid var(--amber);
  border-radius: var(--fs-radius-tile);
}

.fs-skunk__eyebrow {
  font-size: var(--fs-size-eyebrow);
  font-weight: var(--fs-weight-heavy);
  letter-spacing: var(--fs-track-eyebrow);
  color: var(--amber);
}

.fs-skunk__line {
  margin-top: var(--fs-space-2);
  font-size: var(--fs-size-body);
  line-height: 1.4;
  color: var(--g1);
  /* Team names are user data and can be long; the line wraps rather than
   * forcing the card wider than a 375px viewport. */
  overflow-wrap: anywhere;
}

.fs-skunk__loser,
.fs-skunk__winner {
  font-weight: var(--fs-weight-strong);
  color: var(--bone);
}

/* The margin block: the figure and its unit on one baseline. */
.fs-skunk__margin {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--fs-space-2);
  margin-top: var(--fs-space-3);
}

.fs-skunk__marginvalue {
  font-family: var(--fs-font-money);
  font-variant-numeric: tabular-nums;
  /* Larger than the four-cell strip value (18px) — this is the biggest number
   * on The Week, which is the point. */
  font-size: 26px;
  line-height: 1.05;
  font-weight: var(--fs-weight-heavy);
  color: var(--amber);
}

.fs-skunk__marginlabel {
  font-size: var(--fs-size-micro);
  font-weight: var(--fs-weight-heavy);
  letter-spacing: var(--fs-track-eyebrow);
  text-transform: uppercase;
  color: var(--g1);
}

/* Supporting detail — deliberately quieter than the margin above it. */
.fs-skunk__final {
  margin-top: var(--fs-space-1);
  font-family: var(--fs-font-money);
  font-variant-numeric: tabular-nums;
  font-size: var(--fs-size-fine);
  color: var(--g1);
}

.fs-skunk__fee {
  margin-top: var(--fs-space-2);
  font-size: var(--fs-size-body);
  font-weight: var(--fs-weight-strong);
  color: var(--bone);
}

.fs-skunk__note {
  margin-top: var(--fs-space-2);
  font-size: var(--fs-size-micro);
  line-height: 1.45;
  color: var(--g1);
  overflow-wrap: anywhere;
}
