/* ══════════════════════════════════════════════════════════════
   Start/Sit — the weekly decision desk, inside the app shell.
   Drawn in the app UI kit's language (app_ui.css): colours are the
   app tokens (--bg, --surface, --text, --accent…) and the --ui-*
   values, so the page follows the theme toggle with no palette of
   its own. The only local colours are the three rank tones, which
   carry meaning (top 25% / middle 50% / bottom 25%) and are tuned
   per theme for AA.
   ══════════════════════════════════════════════════════════════ */

.fr-start-sit {
  --ss-ink: var(--text);
  --ss-muted: var(--text-muted);
  --ss-line: var(--ui-line);
  --ss-line2: var(--ui-line2);
  --ss-panel: var(--surface);
  --ss-panel-raised: var(--surface-2);
  --ss-pink: var(--accent);          /* pink as TEXT */
  --ss-pink-fill: var(--ui-pink);    /* pink as a FILL — ink on it is --ui-on-pink */
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: 16px clamp(18px, 4vw, 56px) 72px;
  color: var(--ss-ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
}

.fr-start-sit__header,
.fr-start-sit__section-head,
.fr-start-sit__player-topline,
.fr-start-sit__production-head,
.fr-start-sit__matchup,
.fr-start-sit__controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.fr-start-sit__header {
  align-items: flex-end;
  gap: 24px;
  padding: 0 0 32px;
}

.fr-start-sit__header > div:first-child { flex: 1; min-width: 0; }

/* Clash caps labels. */
.fr-start-sit__eyebrow,
.fr-start-sit__step,
.fr-start-sit__player-topline,
.fr-start-sit__metric-label,
.fr-start-sit__market span,
.fr-start-sit__scoring-label {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  line-height: 1.3;
  text-transform: uppercase;
}

.fr-start-sit__eyebrow.fr-start-sit__eyebrow { margin: 0; }

.fr-start-sit__header h1 em {
  color: var(--ss-pink);
  font-style: normal;
}

.fr-start-sit__lede.fr-start-sit__lede { max-width: 550px; }

/* The S/S roundel. */
.fr-start-sit__mark {
  display: flex;
  width: 68px;
  height: 68px;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 2px solid var(--ui-charcoal);
  border-radius: 50%;
  background: var(--ui-yellow);
  box-shadow: 3px 3px 0 var(--ui-sh);
  color: var(--ui-charcoal);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.02em;
  transform: rotate(-8deg);
}

.fr-start-sit__mark span { padding: 0 2px; color: var(--ui-charcoal); opacity: .6; }

/* Ink-bordered, hard-shadow cards. */
.fr-start-sit__setup,
.fr-start-sit__player-card {
  border: 2px solid var(--ui-edge);
  border-radius: 0;
  background: var(--ss-panel);
  box-shadow: 4px 4px 0 var(--ui-sh);
}

.fr-start-sit__setup { padding: clamp(18px, 3vw, 28px); }

.fr-start-sit__section-head {
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 14px;
  margin-bottom: 22px;
}

.fr-start-sit__step { margin: 0 0 8px; color: var(--ui-label); font-size: 12px; letter-spacing: .14em; }
.fr-start-sit__step span { margin-left: 6px; }

.fr-start-sit__section-head h2 {
  margin: 0;
  font-family: var(--font-headline);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: normal;
  line-height: 1.1;
}

.fr-start-sit__selection-count {
  font-family: var(--font-data);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

.fr-start-sit__selection-count,
.fr-start-sit__scoring-label {
  color: var(--ss-muted);
  white-space: nowrap;
}

.fr-start-sit__picker { position: relative; z-index: 2; }

.fr-start-sit__search-label,
.fr-start-sit__controls label > span {
  display: block;
  color: var(--ss-muted);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.fr-start-sit__search-label { margin-bottom: 7px; }

.fr-start-sit__search-wrap { position: relative; }

.fr-start-sit__search-icon {
  position: absolute;
  top: 50%;
  left: 18px;
  color: var(--ss-muted);
  font-size: 24px;
  line-height: 1;
  transform: translateY(-55%);
}

/* Pill field, as the kit's .fr-input. */
.fr-start-sit__search-wrap input {
  width: 100%;
  height: 48px;
  padding: 0 18px 0 46px;
  border: 2px solid var(--ss-line2);
  border-radius: 999px;
  outline: none;
  background: var(--ui-field);
  color: var(--ss-ink);
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  transition: border-color .12s ease, box-shadow .12s ease;
}

.fr-start-sit__search-wrap input::placeholder { color: var(--text-dim); opacity: 1; }
.fr-start-sit__search-wrap input:hover { border-color: var(--ui-ol); }

.fr-start-sit__search-wrap input:focus {
  border-color: var(--ui-ol);
  box-shadow: 3px 3px 0 var(--ss-pink-fill);
}

.fr-start-sit__results {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  overflow: hidden;
  border: 2px solid var(--ui-edge);
  border-radius: 0;
  background: var(--ss-panel);
  box-shadow: 4px 4px 0 var(--ui-sh);
}
.fr-start-sit__results[hidden] { display: none; }

.fr-start-sit__result {
  display: grid;
  width: 100%;
  min-height: 48px;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  border: 0;
  border-bottom: 1px solid var(--ss-line);
  background: transparent;
  color: var(--ss-ink);
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.45;
  text-align: left;
}

.fr-start-sit__result:last-child { border-bottom: 0; }
.fr-start-sit__result:hover, .fr-start-sit__result:focus-visible, .fr-start-sit__result[aria-selected="true"] { outline: none; background: var(--ui-hov); }
.fr-start-sit__result[aria-selected="true"] { box-shadow: inset 4px 0 var(--ss-pink-fill); }
.fr-start-sit__status { margin: 24px 0; color: var(--ss-muted); font-size: 14px; }
.fr-start-sit__status[hidden] { display: none; }
.fr-start-sit__result > span:last-child { color: var(--ss-pink); font-size: 20px; }
.fr-start-sit__result-name, .fr-start-sit__selected-name { font-weight: 600; overflow-wrap: anywhere; }
.fr-start-sit__result-team, .fr-start-sit__selected-team {
  color: var(--ss-muted);
  font-family: var(--font-display);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.fr-start-sit__result-note { padding: 14px; color: var(--ss-muted); font-size: 13px; }

.fr-start-sit__selected {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0 20px;
}

.fr-start-sit__selected-player,
.fr-start-sit__empty-slot {
  display: flex;
  min-width: 0;
  min-height: 52px;
  align-items: center;
  gap: 10px;
  padding: 7px 10px 7px 12px;
  border: 2px solid var(--ui-ol);
  border-radius: 999px;
  background: var(--ui-field);
}

.fr-start-sit__selected-name { flex: 1; min-width: 0; font-size: 14px; line-height: 1.3; }
.fr-start-sit__selected-team, .fr-start-sit__position, .fr-start-sit__remove { flex-shrink: 0; }

/* Position badge: solid brand pill, charcoal border, Clash caps. */
.fr-start-sit__position {
  display: inline-grid;
  min-width: 42px;
  height: 21px;
  place-items: center;
  padding: 0 8px;
  border: 1.5px solid var(--ui-charcoal);
  border-radius: 999px;
  background: transparent;
  color: var(--ss-ink);
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  line-height: 1;
}

.fr-start-sit__position--qb { background: var(--ui-orange); color: var(--ui-charcoal); }
.fr-start-sit__position--rb { background: var(--ui-green); color: var(--ui-cream); }
.fr-start-sit__position--wr { background: var(--ui-blue); color: var(--ui-charcoal); }
.fr-start-sit__position--te { background: var(--ui-yellow); color: var(--ui-charcoal); }
.fr-start-sit__position--k, .fr-start-sit__position--def { border-color: var(--ss-line2); color: var(--ss-muted); }

.fr-start-sit__remove {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 2px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: var(--ss-muted);
  cursor: pointer;
  font-size: 21px;
  line-height: 1;
}

.fr-start-sit__remove:hover { border-color: var(--ui-ol); color: var(--ss-ink); }
.fr-start-sit__remove:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.fr-start-sit__empty-slot {
  padding-left: 16px;
  padding-right: 18px;
  border-style: dashed;
  border-color: var(--ss-line2);
  background: transparent;
  color: var(--ss-muted);
  font-family: inherit;
  font-size: 12px;
  text-align: left;
}

button.fr-start-sit__empty-slot { cursor: pointer; }
button.fr-start-sit__empty-slot:hover { border-color: var(--ui-ol); background: var(--ui-hov); }
button.fr-start-sit__empty-slot:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.fr-start-sit__empty-slot span:first-child { color: var(--ss-pink); font-size: 20px; line-height: 1; }
.fr-start-sit__empty-slot span:nth-child(2) { color: var(--ss-ink); font-size: 14px; font-weight: 600; }
.fr-start-sit__empty-slot span:last-child { margin-left: auto; }

.fr-start-sit__controls {
  align-items: flex-end;
  justify-content: flex-start;
  gap: 12px;
  padding-top: 18px;
  border-top: 2px solid var(--ss-line);
}

.fr-start-sit__controls label { display: grid; gap: 7px; }
.fr-start-sit__controls select {
  min-width: 150px;
  height: 46px;
  padding: 0 36px 0 16px;
  border: 2px solid var(--ss-line2);
  border-radius: 999px;
  background-color: var(--ui-field);
  color: var(--ss-ink);
  font: inherit;
  font-size: 16px;
  font-weight: 500;
}
.fr-start-sit__controls select:hover { border-color: var(--ui-ol); }
.fr-start-sit__controls select:focus { outline: none; border-color: var(--ui-ol); box-shadow: 3px 3px 0 var(--ss-pink-fill); }

/* Primary action: the pink pill, dark ink. */
.fr-start-sit__submit {
  display: flex;
  min-height: 46px;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  padding: 0 22px;
  border: 2px solid var(--ui-charcoal);
  border-radius: 999px;
  background: var(--ss-pink-fill);
  box-shadow: 3px 3px 0 var(--ui-sh);
  color: var(--ui-on-pink);
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .08em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  transition: transform .12s ease, box-shadow .12s ease;
}

.fr-start-sit__submit:hover:not(:disabled) { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ui-sh); }
.fr-start-sit__submit:active:not(:disabled) { transform: translate(2px, 2px); box-shadow: none; }
.fr-start-sit__submit:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.fr-start-sit__submit:disabled { cursor: not-allowed; opacity: .5; box-shadow: none; }
.fr-start-sit__submit span { font-family: var(--font); font-size: 17px; }

.fr-start-sit__comparison { padding-top: 40px; }
.fr-start-sit__section-head--results { margin-bottom: 16px; }
.fr-start-sit__scoring-label {
  padding: 4px 11px;
  border: 1.5px solid var(--ss-line2);
  border-radius: 999px;
  color: var(--ss-ink);
  font-size: 10.5px;
  letter-spacing: .06em;
}

.fr-start-sit__cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }

.fr-start-sit__player-card {
  overflow: hidden;
  padding: 0 19px 19px;
}

/* The card's charcoal bar: "PLAYER 01" and the position badge. */
.fr-start-sit__player-topline {
  margin: 0 -19px;
  padding: 10px 19px;
  background: var(--shell-bar);
  color: var(--shell-cream);
  font-size: 12px;
  letter-spacing: .14em;
}
.fr-start-sit__player-card h3 { margin: 16px 0 4px; font-family: var(--font-headline); font-size: 30px; font-weight: 500; letter-spacing: normal; line-height: 1.05; overflow-wrap: anywhere; }
.fr-start-sit__team-name { margin: 0 0 18px; color: var(--ss-muted); font-size: 13px; }

.fr-start-sit__matchup {
  gap: 12px;
  min-height: 88px;
  padding: 14px;
  border: 2px solid var(--ss-line);
  border-radius: 0;
  background: var(--ss-panel-raised);
}

.fr-start-sit__matchup > div { display: grid; min-width: 0; gap: 5px; overflow-wrap: anywhere; }
.fr-start-sit__metric-label { color: var(--ss-muted); font-size: 10.5px; }
.fr-start-sit__matchup strong { font-family: var(--font); font-size: 22px; font-weight: 600; line-height: 1.3; letter-spacing: normal; }
.fr-start-sit__matchup small { color: var(--ss-muted); font-size: 12.5px; line-height: 1.5; }
.fr-start-sit__venue {
  flex-shrink: 0;
  padding: 3px 10px;
  border: 1.5px solid var(--ss-line2);
  border-radius: 999px;
  color: var(--ss-ink);
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
}

.fr-start-sit__market { display: grid; grid-template-columns: 1fr 1fr; margin-top: 14px; border-bottom: 2px solid var(--ss-line); }
.fr-start-sit__market > div { display: grid; gap: 5px; padding: 0 0 13px; }
.fr-start-sit__market > div + div { padding-left: 14px; border-left: 2px solid var(--ss-line); }
.fr-start-sit__market span { color: var(--ss-muted); font-size: 10.5px; }
.fr-start-sit__market strong { font-family: var(--font-data); font-size: 18px; font-weight: 600; }

.fr-start-sit__production { padding-top: 15px; }
.fr-start-sit__production-head { flex-wrap: wrap; gap: 6px 12px; }
.fr-start-sit__production-head strong { font-family: var(--font-data); font-size: 24px; font-weight: 600; }
.fr-start-sit__production-head strong small { color: var(--ss-muted); font-family: var(--font); font-size: 12px; font-weight: 500; }
.fr-start-sit__weeks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 11px; }
.fr-start-sit__weeks > div { display: grid; gap: 6px; padding: 9px 10px; border: 2px solid var(--ss-line); border-radius: 0; }
.fr-start-sit__weeks span { color: var(--ss-muted); font-family: var(--font-display); font-size: 10px; font-weight: 700; letter-spacing: .08em; }
.fr-start-sit__weeks strong { font-family: var(--font-data); font-size: 18px; font-weight: 600; }
.fr-start-sit__market strong, .fr-start-sit__production-head strong, .fr-start-sit__weeks strong { font-variant-numeric: tabular-nums; line-height: 1.35; }
.fr-start-sit__unavailable, .fr-start-sit__footnote { color: var(--ss-muted); font-size: 13px; line-height: 1.55; }
.fr-start-sit__footnote { margin: 18px 2px 0; max-width: 90ch; text-wrap: pretty; }

/* ── Rank tones (conditional formatting) ───────────────────── */
.fr-start-sit {
  --ss-high-ink: #14643c;
  --ss-high-bg: #e2f1e7;
  --ss-middle-ink: #74551a;
  --ss-middle-bg: #f5ecd4;
  --ss-low-ink: #a22b45;
  --ss-low-bg: #f7e4e9;
}

html[data-theme="dark"] .fr-start-sit {
  --ss-high-ink: #a3e2bb;
  --ss-high-bg: #223a2e;
  --ss-middle-ink: #eed597;
  --ss-middle-bg: #3a3323;
  --ss-low-ink: #ffb6c4;
  --ss-low-bg: #432b34;
}

.fr-start-sit [data-rank-tone="high"] { color: var(--ss-high-ink); background: var(--ss-high-bg); border-color: currentColor; }
.fr-start-sit [data-rank-tone="middle"] { color: var(--ss-middle-ink); background: var(--ss-middle-bg); border-color: currentColor; }
.fr-start-sit [data-rank-tone="low"] { color: var(--ss-low-ink); background: var(--ss-low-bg); border-color: currentColor; }
.fr-start-sit__legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0 0 18px; color: var(--ss-muted); font-size: 12.5px; line-height: 1.5; }
.fr-start-sit__legend-key {
  padding: 3px 10px;
  border: 1.5px solid;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.fr-start-sit__rank-headline { display: grid; gap: 5px; margin: 0 0 16px; padding: 10px 12px; border: 2px solid var(--ss-line); border-radius: 0; }
.fr-start-sit__rank-headline .fr-start-sit__metric-label { color: inherit; }
.fr-start-sit__rank-badge { font-family: var(--font-data); font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.fr-start-sit__week-rank { font-family: var(--font-data); font-size: 11px; line-height: 1.45; overflow-wrap: anywhere; }
.fr-start-sit__weeks [data-rank-tone]:not([data-rank-tone="neutral"]) > span { color: inherit; }
.fr-start-sit__average-context { min-height: 0; margin: 6px 0 0; font-size: 12px; font-weight: 600; }
.fr-start-sit__average-context:empty { display: none; }
.fr-start-sit__production[data-average-tone="high"] .fr-start-sit__production-head strong,
.fr-start-sit__production[data-average-tone="high"] .fr-start-sit__average-context { color: var(--ss-high-ink); }
.fr-start-sit__production[data-average-tone="low"] .fr-start-sit__production-head strong,
.fr-start-sit__production[data-average-tone="low"] .fr-start-sit__average-context { color: var(--ss-low-ink); }
.fr-start-sit__production[data-average-tone="high"] .fr-start-sit__average-context { background: var(--ss-high-bg); }
.fr-start-sit__production[data-average-tone="low"] .fr-start-sit__average-context { background: var(--ss-low-bg); }
.fr-start-sit__average-context:not(:empty) { display: inline-block; padding: 4px 10px; border: 1.5px solid currentColor; border-radius: 999px; }

/* Empty state, as the kit's .fr-empty. */
.fr-start-sit__empty-state {
  display: grid;
  min-height: 210px;
  place-content: center;
  justify-items: center;
  padding: 40px 24px;
  border: 2px dashed var(--ss-line2);
  background: var(--ss-panel);
  text-align: center;
}
.fr-start-sit__empty-state > span {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 2px solid var(--ui-charcoal);
  border-radius: 50%;
  background: var(--ui-yellow);
  box-shadow: 2px 2px 0 var(--ui-sh);
  color: var(--ui-charcoal);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
}
.fr-start-sit__empty-state p { margin: 16px 0 8px; font-family: var(--font-headline); font-size: 28px; font-weight: 500; line-height: 1.1; }
.fr-start-sit__empty-state small { max-width: 420px; color: var(--ss-muted); font-size: 14px; line-height: 1.5; text-wrap: pretty; }

@media (min-width: 1000px) {
  .fr-start-sit__cards--count-3,
  .fr-start-sit__cards--count-5,
  .fr-start-sit__cards--count-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .fr-start-sit__mark { width: 52px; height: 52px; font-size: 17px; }
  .fr-start-sit__selected, .fr-start-sit__cards { grid-template-columns: 1fr; }
  .fr-start-sit__controls { flex-wrap: wrap; }
  .fr-start-sit__submit { width: 100%; justify-content: center; margin: 4px 0 0; }
}

@media (max-width: 430px) {
  .fr-start-sit__header { align-items: flex-start; gap: 16px; }
  .fr-start-sit__mark { width: 44px; height: 44px; font-size: 14px; }
  .fr-start-sit__empty-slot:not(button) span:last-child { display: none; }
  .fr-start-sit__controls label { flex: 1 1 100%; min-width: 0; }
  .fr-start-sit__controls select { width: 100%; min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .fr-start-sit__submit { transition: none; }
  .fr-start-sit__submit:hover:not(:disabled) { transform: none; }
}
