/* Silver Dolla Bowl — palette drawn from a struck silver coin:
   die shadow, polished relief, frosted proof field, and the russet
   rim toning old silver develops. */
:root {
  --strike:  #0B0D10;
  --relief:  #E9EAEC;
  --frost:   #8A8F98;
  --tone:    #C0873C;
  --tone-dk: #96682A;
  --won:     #2F7D48;
  --lost:    #A03A34;
  --check:   #C4342B;   /* the red marker on Rob's handout */

  /* Dark is the house look and the default for everyone, whatever the
     phone is set to: half the members are on Android, half on iPhone, and
     nobody is going to be walked through a system setting. The sun/moon
     button in the header flips to light and the choice sticks per phone. */
  --bg:      #0B0D10;
  --card:    #15181D;
  --edge:    #262A31;
  --text:    var(--relief);
  --muted:   #8A8F98;
  --dim-bg:  #101318;
  --won:     #4FA96B;
  --lost:    #C4635C;
  --check:   #E0706A;   /* the light-mode red goes muddy on the dark field */
  color-scheme: dark;

  --r: 3px;
  --pad: 14px;
  font-synthesis-weight: none;
}

:root[data-theme="light"] {
  --bg:      #F2F1EE;
  --card:    #FFFFFF;
  --edge:    #D8D6D1;
  --text:    var(--strike);
  --muted:   #6B7079;
  --dim-bg:  #E7E5E1;
  --won:     #2F7D48;
  --lost:    #A03A34;
  --check:   #C4342B;
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.45 Saira, system-ui, -apple-system, sans-serif;
  -webkit-text-size-adjust: 100%;
}

.wrap { max-width: 560px; margin: 0 auto; padding: 0 12px 64px; }

/* ---- masthead ---------------------------------------------------- */
header {
  position: sticky; top: 0; z-index: 20;
  background: var(--bg);
  padding: 14px 0 10px;
  border-bottom: 1px solid var(--edge);
}
.brand {
  font-family: "Saira Condensed", Saira, system-ui, sans-serif;
  font-weight: 700; font-size: 20px; letter-spacing: .14em;
  text-transform: uppercase; margin: 0; line-height: 1;
}
.brand span { color: var(--tone); }
.headrow { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.wk {
  font-family: "Saira Condensed", Saira, sans-serif; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-size: 14px;
}

/* ---- the five coin slots: the ante, made literal ------------------ */
.ante { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.slots { display: flex; gap: 6px; }
.slot {
  width: 15px; height: 15px; border-radius: 50%;
  border: 1.5px solid var(--frost); background: transparent;
  transition: background-color .18s ease, border-color .18s ease, transform .18s ease;
}
.slot.filled { background: var(--tone); border-color: var(--tone-dk); }
.slot.struck { animation: strike .26s ease; }
@keyframes strike {
  0% { transform: scale(.55); } 60% { transform: scale(1.15); } 100% { transform: scale(1); }
}
.ante-label { font-size: 14px; color: var(--muted); }

/* ---- day heading -------------------------------------------------- */
.day {
  display: flex; align-items: center; gap: 10px;
  font-family: "Saira Condensed", Saira, sans-serif; font-weight: 600;
  text-transform: uppercase; letter-spacing: .11em; font-size: 13px;
  color: var(--muted); margin: 22px 0 8px;
}
.day::after { content: ""; flex: 1; height: 1px; background: var(--edge); }

/* ---- a game: two stacked rows, tap the team you want ------------- */
.game { margin-bottom: 14px; }

.matchup {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 13px; color: var(--muted); margin-bottom: 5px;
  font-family: "Saira Condensed", Saira, sans-serif;
  letter-spacing: .08em; text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}

.faces {
  display: grid; grid-template-rows: 1fr 1fr; gap: 1px;
  background: var(--edge); border: 1px solid var(--edge); border-radius: var(--r);
  overflow: hidden;
}
.face {
  appearance: none; -webkit-appearance: none;
  position: relative; border: 0; margin: 0; cursor: pointer;
  background: var(--card); color: var(--text);
  padding: 9px 12px; min-height: 48px;
  display: flex; align-items: center; gap: 11px;
  font: inherit; text-align: left; width: 100%;
  transition: background-color .14s ease, color .14s ease;
}
.logo { flex: 0 0 auto; object-fit: contain; }
.tname {
  font-family: "Saira Condensed", Saira, sans-serif;
  font-weight: 600; font-size: 18px; letter-spacing: .02em; line-height: 1.1;
}
/* Subordinate to the team name: it is context, not the thing being picked.
   Lighter weight and smaller so a long name plus a record still reads as one
   label rather than two competing ones. */
.rec {
  font-weight: 500; font-size: 13px; color: var(--muted);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
/* A picked row inverts its field, and once locked that field IS --muted, so a
   muted record vanished into it. Take the row's own colour instead. */
.face[aria-pressed="true"] .rec,
.face.won .rec, .face.lost .rec, .face.tie .rec { color: inherit; opacity: .8; }
/* Labelled, not a bare number. Unlabelled, "1" reads as "you have selected
   one thing" rather than "one person took this team" -- which is exactly how
   it was misread in testing. There is no hover on a phone, so a title
   attribute cannot carry the meaning. */
.tally {
  margin-left: auto; font-size: 12px; font-weight: 600;
  color: var(--muted); font-variant-numeric: tabular-nums;
  letter-spacing: .04em; white-space: nowrap; flex: 0 0 auto;
}

.face[aria-pressed="true"] { background: var(--relief); color: var(--strike); }
.face[aria-pressed="true"] .tally { color: inherit; opacity: .75; }
[data-theme="light"] .face[aria-pressed="true"] { background: var(--strike); color: var(--relief); }
.face:focus-visible { outline: 2px solid var(--tone); outline-offset: -3px; }
/* A removal waiting for its second tap. Red is the "about to lose something"
   colour here, the same one the short-picks counter uses. */
.face.armed { box-shadow: inset 0 0 0 2px var(--check); }
.unhint {
  margin-left: auto; font-size: 12px; font-weight: 600; letter-spacing: .04em;
  color: var(--check); white-space: nowrap; flex: 0 0 auto;
}
.face.armed .tally, .face.armed .pts { display: none; }
.msg.arm { background: color-mix(in srgb, var(--check) 12%, transparent); color: var(--check); }
@media (hover: hover) {
  .face:not(:disabled):hover { background: var(--dim-bg); }
  .face[aria-pressed="true"]:not(:disabled):hover { background: var(--strike); }
}

/* A finished pick carries its own result. */
.face.won  { background: var(--won);  color: #fff; }
.face.lost { background: var(--lost); color: #fff; }
.face.tie  { background: var(--tone); color: #fff; }
.face.won .tally, .face.lost .tally, .face.tie .tally { color: #fff; opacity: .85; }

.game.locked .face { cursor: default; background: var(--dim-bg); color: var(--muted); }
.game.locked .face .logo { filter: grayscale(1); opacity: .7; }
.game.locked .face[aria-pressed="true"] { background: var(--muted); color: var(--card); }
.game.locked .face[aria-pressed="true"] .logo { filter: none; opacity: 1; }
.game.locked .face.won  { background: var(--won);  color: #fff; }
.game.locked .face.lost { background: var(--lost); color: #fff; }
.game.locked .face.tie  { background: var(--tone); color: #fff; }
.game.locked .face.won .logo, .game.locked .face.lost .logo,
.game.locked .face.tie .logo { filter: none; opacity: 1; }

.meta {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 3px; font-size: 12px; color: var(--muted);
}
.score { font-weight: 700; color: var(--text); }
.tag {
  font-family: "Saira Condensed", Saira, sans-serif; text-transform: uppercase;
  letter-spacing: .1em; font-weight: 600; font-size: 11px;
}
.granted { color: var(--tone); }

/* ---- sign in ------------------------------------------------------ */
.panel {
  background: var(--card); border: 1px solid var(--edge); border-radius: var(--r);
  padding: 18px; margin-top: 28px;
}
label { display: block; font-size: 13px; color: var(--muted); margin: 0 0 5px; }
select, input, button.primary {
  width: 100%; font: inherit; color: var(--text);
  background: var(--bg); border: 1px solid var(--edge); border-radius: var(--r);
  padding: 11px 12px; margin-bottom: 14px;
}
input[inputmode="numeric"] { letter-spacing: .5em; font-size: 20px; text-align: center; }
/* The Show PIN row: the generic input rule above would stretch the checkbox
   to full width and give it the field padding. */
.showpin { display: flex; align-items: center; gap: 8px; margin: -4px 0 14px; cursor: pointer; }
.showpin input { width: auto; margin: 0; padding: 0; accent-color: var(--tone); }
button.primary {
  background: var(--strike); color: var(--relief); border-color: var(--strike);
  font-family: "Saira Condensed", Saira, sans-serif; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; cursor: pointer; margin-bottom: 0;
}
button.primary:disabled { opacity: .5; cursor: default; }
[data-theme="light"] button.primary { background: var(--strike); color: var(--relief); border-color: var(--strike); }

.msg { font-size: 14px; margin: 0 0 12px; padding: 10px 12px; border-radius: var(--r); }
.msg.err { background: color-mix(in srgb, var(--lost) 12%, transparent); color: var(--lost); }
.msg.ok  { background: color-mix(in srgb, var(--won) 12%, transparent); color: var(--won); }

.headleft { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.who {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--muted);
}
.who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.linkish {
  background: none; border: 0; padding: 0; color: var(--muted);
  font: inherit; text-decoration: underline; cursor: pointer;
}
.linkish:hover { color: var(--text); }

.empty { color: var(--muted); text-align: center; padding: 40px 12px; }

/* ---- tabs --------------------------------------------------------- */
nav.tabs { display: flex; gap: 2px; margin-top: 10px; }
nav.tabs button {
  /* 44px is the smallest target a thumb hits reliably; at the old 12px/8px
     these were the hardest thing on the page to tap on a phone. */
  flex: 1; background: transparent; border: 0; border-bottom: 2px solid transparent;
  padding: 12px 4px; min-height: 44px; cursor: pointer; color: var(--muted);
  font-family: "Saira Condensed", Saira, sans-serif; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; font-size: 15px;
}
nav.tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--tone); }

/* ---- standings ---------------------------------------------------- */
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 10px 6px; border-bottom: 1px solid var(--edge); font-size: 15px; }
th {
  font-family: "Saira Condensed", Saira, sans-serif; font-weight: 600; font-size: 12px;
  letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
td.num, th.num { text-align: right; }
tr.inactive td { color: var(--muted); }
.rank { color: var(--muted); width: 28px; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* On a locked picked face the amber nickname falls onto grey and the
   contrast drops. Use the card colour instead -- the amber is doing no
   work there, since a locked pick can no longer be changed. */
.game.locked .face[aria-pressed="true"] .nick { color: var(--card); opacity: .8; }

.foot { font-size: 13px; color: var(--muted); margin: 10px 2px 0; line-height: 1.55; }
tbody tr[data-weeks] { cursor: pointer; }
tr.wkline td {
  font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums;
  padding-top: 0; border-bottom: 1px solid var(--edge);
}

.sub {
  font-family: "Saira Condensed", Saira, sans-serif; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; font-size: 13px;
  margin: 0 0 10px; color: var(--text);
}
.rost { display: flex; align-items: center; gap: 8px; padding: 9px 0;
        border-bottom: 1px solid var(--edge); font-size: 15px; }
.rost .nm { flex: 1; }
.rost .off { color: var(--muted); text-decoration: line-through; }
.rost button {
  background: none; border: 1px solid var(--edge); border-radius: var(--r);
  color: var(--muted); font: inherit; font-size: 12px; padding: 3px 8px; cursor: pointer;
}
.rost button:hover { color: var(--text); border-color: var(--muted); }
.pill { font-size: 11px; color: var(--tone); }
.aud { font-size: 13px; padding: 7px 0; border-bottom: 1px solid var(--edge);
       color: var(--muted); font-variant-numeric: tabular-nums; }
.aud b { color: var(--text); font-weight: 600; }

/* Who picked what. Secondary to the game itself -- it lost its rules in a
   cleanup and inherited 16px body text, which shouted louder than the row
   it belongs to. */
.who-picked {
  font-size: 12px; line-height: 1.7; color: var(--muted);
  padding: 7px 2px 2px; margin-top: 2px;
  border-top: 1px dashed var(--edge);
}
.who-picked b {
  color: var(--text); font-weight: 700;
  font-family: "Saira Condensed", Saira, sans-serif; letter-spacing: .06em;
}
.meta .linkish { font-size: 12px; }

/* ---- week nav ---------------------------------------------------- */
.wkbtn {
  background: none; border: 1px solid var(--edge); border-radius: var(--r);
  color: var(--text); font-size: 18px; line-height: 1; cursor: pointer;
  /* Grown mostly downwards. Width is the scarce dimension up here -- push it
     much past this and the brand beside it wraps onto two lines. */
  padding: 0 9px; min-width: 36px; min-height: 36px;
}
.wkbtn:disabled { opacity: .35; cursor: default; }
.wknum { display: inline-block; min-width: 64px; text-align: center; }
.wk { display: flex; align-items: center; gap: 6px; }

/* ---- live scores --------------------------------------------------- */
.pts {
  margin-left: auto; flex: 0 0 auto;
  font-family: "Saira Condensed", Saira, sans-serif;
  font-weight: 700; font-size: 21px; line-height: 1;
  font-variant-numeric: tabular-nums; color: var(--muted);
}
.pts.lead { color: var(--text); }
.face[aria-pressed="true"] .pts, .face.won .pts,
.face.lost .pts, .face.tie .pts { color: inherit; }
.face[aria-pressed="true"] .pts:not(.lead) { opacity: .7; }

.livetag {
  color: var(--lost); font-weight: 700;
  font-family: "Saira Condensed", Saira, sans-serif; letter-spacing: .08em;
}
.game.playing .faces { box-shadow: 0 0 0 1px var(--lost); }

.rost.unpaid .nm { color: var(--muted); }
.owes { margin: 0 0 10px; padding: 9px 11px; border-radius: 8px;
  border: 1px solid var(--tone); color: var(--tone); font-size: 13px; }
/* Owed rows read as a state, not a fault -- the same tone as "mark paid",
   which is the tap that clears them. */
.rost.credit .nm { color: var(--text); }
.rost.credit .pill { color: var(--tone); font-weight: 600; }
/* A removed name reads as absent rather than as a problem: dimmed, with the
   badge in the same red Rob marks his handout with. Without this it looked
   identical to a member who can still sign in. */
.rost.gone .nm { color: var(--muted); }
.pill.removed { color: var(--check); font-weight: 600; }
.rost.gone .pill.removed { color: var(--check); }
.paybtn { border-color: var(--tone) !important; color: var(--tone) !important; font-weight: 600; }
.paybtn:hover { background: var(--tone); color: #fff !important; }

/* ---- everyone's picks --------------------------------------------- */
.ep { padding: 10px 2px; border-bottom: 1px solid var(--edge); }
.ep-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.ep-name {
  font-family: "Saira Condensed", Saira, sans-serif; font-weight: 700;
  font-size: 15px; letter-spacing: .04em;
}
.wk-wins {
  font-family: "Saira Condensed", Saira, sans-serif; font-weight: 600;
  font-size: 12px; letter-spacing: .08em; color: var(--text);
  font-variant-numeric: tabular-nums;
}
.wk-wins.pending { color: var(--muted); }
/* --check is the red Rob marks his handout with; short picks are
   exactly what he used to circle on it. */
.wk-wins.short { color: var(--check); }
.ep-tail { display: flex; gap: 10px; align-items: baseline; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  border: 1px solid var(--edge); border-radius: var(--r);
  padding: 4px 8px 4px 5px; font-size: 13px; font-weight: 600;
  font-variant-numeric: tabular-nums; background: var(--card);
}
.chip img { display: block; object-fit: contain; }
.chip.won  { background: var(--won);  border-color: var(--won);  color: #fff; }
.chip.lost { background: var(--lost); border-color: var(--lost); color: #fff; opacity: .85; }
.chip.tie  { background: var(--tone); border-color: var(--tone); color: #fff; }

/* ---- how the tabs work, inside the rules overlay ------------------- */
.howhead { margin: 22px 0 2px; padding-top: 18px; border-top: 1px solid var(--edge); }
.how { margin: 0; }
.how dt {
  font-weight: 600; font-size: 16px; color: var(--text); margin-top: 14px;
}
/* The tab name carries the weight; the gloss after it is an aside, so it
   drops back rather than competing with the name people are looking for. */
.how dt span { font-weight: 400; color: var(--muted); font-size: 14px; }
.how dd {
  margin: 3px 0 0; font-size: 14px; line-height: 1.55; color: var(--muted);
}

/* The one line under the games explaining why the week arrow stops. Set apart
   from the standing ESPN note so it does not read as more of the same. */
.endnote { color: var(--text); opacity: .85; }

/* The heading over the games you picked. Same shape as a day heading so it
   reads as part of the same list, but in the accent colour: it is the one
   heading that is about you rather than about the schedule. */
.day.picks { color: var(--tone); }
.day.picks::after { background: var(--tone); opacity: .35; }

/* ---- the pot ------------------------------------------------------- */
.pot { display: flex; align-items: center; gap: 9px; margin-top: 10px; }
.eagle {
  border-radius: 50%; object-fit: cover; flex: 0 0 auto;
  border: 1px solid var(--edge);
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.potnums { line-height: 1.15; }
.potval {
  font-family: "Saira Condensed", Saira, sans-serif; font-weight: 700;
  font-size: 18px; letter-spacing: .02em; font-variant-numeric: tabular-nums;
  white-space: nowrap;   /* "The Pot is at: $2,740.00" must not wrap mid-figure */
}
.potsub { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---- rules --------------------------------------------------------- */
/* The button sits above the week stepper rather than beside it: on a 390px
   phone the two compete for the same corner, and the week nav is the one
   people tap. Stacking also keeps Rules reachable on the sign-in screen,
   where #wk is empty. */
.headright { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; }
.headtop { display: flex; align-items: center; gap: 6px; }
.themebtn { padding: 6px 9px; min-width: 36px; font-size: 15px; line-height: 1; }
.ruleslink {
  background: none; border: 1px solid var(--edge); border-radius: var(--r);
  font-family: "Saira Condensed", Saira, sans-serif; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; font-size: 13px;
  color: var(--muted); cursor: pointer; padding: 7px 12px;
}
.ruleslink:hover { color: var(--text); border-color: var(--muted); }

.overlay {
  position: fixed; inset: 0; z-index: 60; overflow-y: auto;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 22px 12px 40px;
  background: rgba(11, 13, 16, .62);
}
/* display:flex would otherwise beat the user-agent rule for [hidden]. */
.overlay[hidden] { display: none; }
body.noscroll { overflow: hidden; }

.rulesbox {
  width: 100%; max-width: 430px;
  background: var(--card); border: 1px solid var(--edge); border-radius: var(--r);
  padding: var(--pad) var(--pad) 16px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .34);
}
.ruleshead { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ruleshead .sub { margin: 0; }
.rulesclose {
  background: none; border: none; color: var(--muted);
  font-size: 26px; line-height: 1; cursor: pointer; padding: 0 2px;
}
.rulesclose:hover { color: var(--text); }

.rulelist { list-style: none; margin: 12px 0 0; padding: 0; }
.rulelist > li {
  display: flex; gap: 11px; align-items: flex-start;
  padding: 13px 0; border-top: 1px solid var(--edge);
}
.rulelist > li:first-child { border-top: none; padding-top: 4px; }
.tick {
  flex: 0 0 auto; color: var(--check);
  font-size: 19px; line-height: 1.2;
  transform: rotate(-12deg);   /* struck by hand, the way the handout was */
}
.rule { margin: 0; font-size: 15px; }
.rule strong { font-weight: 600; }
.aside { color: var(--muted); }
.subs { margin: 7px 0 0; padding-left: 15px; font-size: 13px; color: var(--muted); }
.subs li { margin: 3px 0; }
