/* Black ground, green and blue throughout. Team colours live in the generated teams.css. */

:root {
  color-scheme: dark;

  --bg: #000000;
  --panel: #0b0f14;
  --panel-2: #111820;
  --line: #1e2a36;
  --line-bright: #2c3a48;

  --ink: #eaf2f8;
  --muted: #8c9bab;

  --green: #17c964;
  --green-deep: #0b7a3b;
  --blue: #2e9bff;
  --blue-deep: #0b4f8a;

  --warn: #ffb84d;
  --warn-bg: #23180a;
  --danger: #ff6b6b;
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  background:
    radial-gradient(1100px 600px at 15% -10%, rgba(46, 155, 255, .16), transparent 60%),
    radial-gradient(900px 520px at 90% 0%, rgba(23, 201, 100, .13), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--ink);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

.wrap {
  max-width: 48rem;
  margin: 0 auto;
  padding: 1.25rem 1rem 7rem; /* bottom room for the sticky save bar */
}

h1 {
  font-size: 1.9rem;
  line-height: 1.15;
  margin: 0 0 .4rem;
  letter-spacing: -.02em;
  background: linear-gradient(92deg, var(--green) 0%, var(--blue) 70%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

h2 { font-size: 1.05rem; margin: 0 0 .6rem; color: var(--blue); letter-spacing: -.01em; }

.lede { color: var(--muted); margin: 0 0 1.25rem; font-size: 1.02rem; }

a { color: var(--blue); }

.card {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  margin: 0 0 .9rem;
}

.card ol, .card ul { margin: 0; padding-left: 1.2rem; }
.card li { margin: .35rem 0; }

.lock { border-color: rgba(255, 184, 77, .45); background: linear-gradient(180deg, #1b1408, #120e06); }
.lock h2 { color: var(--warn); }
.stamp { font-variant-numeric: tabular-nums; font-size: .85rem; color: var(--warn); margin: .5rem 0 0; }

/* ---------------------------------------------------------------- forms */

form.join { display: grid; gap: .45rem; margin-top: .9rem; }
label { font-weight: 600; font-size: .9rem; }

input[type="text"], input[type="password"] {
  font: inherit;
  padding: .75rem .8rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #05080b;
  color: var(--ink);
  width: 100%;
}
input[type="text"]:focus, input[type="password"]:focus {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
  border-color: var(--blue);
}

button {
  font: inherit;
  font-size: 1.02rem;
  font-weight: 700;
  padding: .85rem 1.1rem;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(92deg, var(--green) 0%, var(--blue) 100%);
  color: #04140a;
  cursor: pointer;
  width: 100%;
  letter-spacing: .01em;
}
button:hover { filter: brightness(1.08); }
button:disabled { opacity: .4; cursor: not-allowed; filter: none; }

/* ---------------------------------------------------------------- nav */

nav.bar {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: center;
  margin-bottom: 1rem;
  font-size: .9rem;
  padding-bottom: .7rem;
  border-bottom: 1px solid var(--line);
}
nav.bar a { color: var(--green); text-decoration: none; font-weight: 700; }
nav.bar a:hover { color: var(--blue); }
nav.bar .who { color: var(--muted); margin-left: auto; font-weight: 400; }

/* ---------------------------------------------------------------- week strip */

.weeks { display: flex; flex-wrap: wrap; gap: .3rem; margin: 0 0 1.1rem; padding: 0; list-style: none; }
.weeks a {
  display: block;
  min-width: 2.5rem;
  text-align: center;
  padding: .4rem .25rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  text-decoration: none;
  color: var(--muted);
  font-size: .85rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: var(--panel);
}
.weeks a:hover { border-color: var(--blue); color: var(--ink); }
.weeks a.part { border-color: var(--blue-deep); color: var(--blue); }
.weeks a.done {
  background: linear-gradient(180deg, var(--green), var(--green-deep));
  color: #04140a;
  border-color: var(--green);
}
.weeks a.here { outline: 2px solid var(--blue); outline-offset: 1px; color: var(--ink); }

/* ---------------------------------------------------------------- games */

ul.games { list-style: none; margin: 0; padding: 0; }
ul.games li {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  padding: .6rem .7rem;
  margin-bottom: .55rem;
}
ul.games li.picked { border-color: var(--line-bright); background: var(--panel-2); }

.matchup { display: flex; gap: .5rem; align-items: stretch; }
.matchup .side { flex: 1 1 0; position: relative; }
.matchup input { position: absolute; opacity: 0; width: 0; height: 0; }

.matchup .side label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .1rem;
  min-height: 3.2rem;
  padding: .5rem .4rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  text-align: center;
  cursor: pointer;
  background: #05080b;
  color: var(--ink);
  transition: background .12s ease, border-color .12s ease;
}
.matchup .side label:hover { border-color: var(--blue); }

.matchup .abbr { font-weight: 800; font-size: 1.05rem; letter-spacing: .02em; }
.matchup .full { font-size: .72rem; opacity: .78; line-height: 1.15; }

/* Team colours applied on :checked live in teams.css, generated from the nflverse data. */

.matchup input:focus-visible + label { outline: 2px solid var(--blue); outline-offset: 2px; }
.at { align-self: center; color: var(--muted); font-size: .72rem; padding: 0 .15rem; font-weight: 700; }

.when { font-size: .76rem; color: var(--muted); margin: 0 0 .4rem; letter-spacing: .01em; }
.when .divg { color: var(--green); font-weight: 700; }
.when .tbd { color: var(--warn); font-weight: 700; }

.locked .matchup .side label { opacity: .5; cursor: not-allowed; }

/* ---------------------------------------------------------------- the sticky save bar */

.savebar {
  position: sticky;
  bottom: 0;
  z-index: 20;
  margin: 1rem -1rem 0;
  padding: .7rem 1rem calc(.7rem + env(safe-area-inset-bottom, 0px));
  background: rgba(0, 0, 0, .93);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  display: flex;
  gap: .7rem;
  align-items: center;
}
.savebar .tally {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  font-size: .95rem;
  white-space: nowrap;
  color: var(--muted);
}
.savebar .tally.full { color: var(--green); }
.savebar button { width: auto; flex: 1 1 auto; }

/* ---------------------------------------------------------------- misc */

.note { font-size: .85rem; color: var(--muted); }
.problem {
  background: var(--warn-bg);
  border: 1px solid rgba(255, 184, 77, .5);
  color: var(--warn);
  border-radius: 11px;
  padding: .8rem .9rem;
  margin: 0 0 1rem;
  font-weight: 600;
}
.actions { display: flex; gap: .6rem; flex-wrap: wrap; margin: 1rem 0; }
.actions a {
  flex: 1 1 12rem;
  text-align: center;
  padding: .8rem 1rem;
  border-radius: 11px;
  text-decoration: none;
  font-weight: 700;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--ink);
}
.actions a.primary {
  background: linear-gradient(92deg, var(--green), var(--blue));
  color: #04140a;
  border-color: transparent;
}

.foot { color: var(--muted); font-size: .78rem; margin-top: 2.5rem; }
.foot a { color: var(--muted); }

table.review { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.review th, table.review td {
  text-align: left;
  padding: .5rem .35rem;
  border-bottom: 1px solid var(--line);
}
table.review th { color: var(--blue); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }
table.review td.n { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
table.review tr.incomplete td { color: var(--warn); }
table.review tr.incomplete td a { color: var(--warn); }
table.review a { color: var(--green); text-decoration: none; font-weight: 700; }

@media (max-width: 420px) {
  .matchup .full { display: none; }
  h1 { font-size: 1.6rem; }
}

/* ---------------------------------------------------------------- groups */

.grouplist { list-style: none; margin: 0; padding: 0; }
.grouplist li {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .55rem 0;
  border-bottom: 1px solid var(--line);
}
.grouplist li:last-child { border-bottom: 0; }
.grouplist a { font-weight: 700; text-decoration: none; color: var(--green); }
.grouplist .code {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  letter-spacing: .12em;
  font-size: .78rem;
  color: var(--muted);
}

.joincode {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: .3em;
  text-align: center;
  margin: .6rem 0 .2rem;
  padding: .7rem .4rem;
  border-radius: 12px;
  border: 1px dashed var(--blue);
  background: #04080d;
  color: var(--blue);
  font-variant-numeric: tabular-nums;
}

table.review tr.you td { color: var(--green); font-weight: 700; }
.tag {
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: .1rem .35rem;
  border-radius: 5px;
  background: var(--green-deep);
  color: #eafff2;
  vertical-align: middle;
}
.hint { font-weight: 400; color: var(--muted); font-size: .85em; }
.joincode.joinpass {
  font-size: 1.4rem;
  letter-spacing: .06em;
  border-style: solid;
  border-color: var(--green);
  color: var(--green);
}

table.scoring {
  width: 100%;
  border-collapse: collapse;
  margin-top: .9rem;
  font-size: .92rem;
}
table.scoring th {
  text-align: left;
  color: var(--blue);
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  padding: .35rem .4rem;
  border-bottom: 1px solid var(--line);
}
table.scoring th:last-child, table.scoring td.n { text-align: right; }
table.scoring td {
  padding: .45rem .4rem;
  border-bottom: 1px solid var(--line);
}
table.scoring tr:last-child td { border-bottom: 0; }
table.scoring td.n {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  color: var(--green);
}
table.review td.done { color: var(--green); font-weight: 700; }
table.review td.todo { color: var(--warn); font-weight: 600; }
table.review td.pts { color: var(--green); font-weight: 800; }
table.review td.pctile, table.review th.pctile { color: var(--blue); }
@media (max-width: 560px) {
  table.review .status, table.review .pctile { display: none; }
}

.chip {
  display: inline-block;
  min-width: 2.9rem;
  text-align: center;
  padding: .12rem .35rem;
  border-radius: 6px;
  border: 1px solid var(--line);
  font-weight: 800;
  font-size: .78rem;
  letter-spacing: .03em;
  margin-right: .35rem;
}
h2.section { margin: 1.6rem 0 .6rem; color: var(--green); }
h3.roundname {
  margin: .9rem 0 .4rem;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--blue);
}
li.waiting { opacity: .45; }
label.ghost {
  display: block; text-align: center; padding: .8rem .5rem;
  border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); font-weight: 700;
}
tr.bye td.seed { color: var(--green); font-weight: 800; }
.champ { margin-top: .7rem; font-size: 1.05rem; color: var(--green); }
.weeks li.sep { width: .5rem; }
.weeks a.rnd { min-width: 3.1rem; font-size: .72rem; letter-spacing: .04em; }
.weeks a.wait { opacity: .4; }
.seedpair { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 620px) { .seedpair { grid-template-columns: 1fr; } }
table.seeds td.seed { color: var(--green); font-weight: 800; }
table.seeds th { white-space: nowrap; }
.matchup .side label.won {
  background: var(--green-deep); color: #eafff2; border-color: var(--green); font-weight: 800;
}
.matchup .side label.lost { opacity: .4; }
.card.win { border-color: var(--green); background: linear-gradient(180deg, #0c1a12, #080f0b); }
.champ.big { font-size: 1.6rem; font-weight: 800; margin: .3rem 0 0; }
ul.slots { list-style: none; margin: 0 0 .8rem; padding: 0; }
ul.slots li.slot {
  display: flex; gap: .6rem; align-items: center;
  padding: .45rem 0; border-bottom: 1px solid var(--line); font-size: .92rem;
}
ul.slots li.slot:last-child { border-bottom: 0; }
ul.slots .rn {
  min-width: 3.4rem; font-size: .72rem; font-weight: 800; color: var(--blue);
  font-variant-numeric: tabular-nums;
}
ul.slots li.empty .pickline { color: var(--muted); }
ul.slots .over { color: var(--muted); font-size: .85em; }
