/* 3OT · tonight.css
   Home: the Tonight board.
*/

.tn {
  display: grid;
  gap: 14px;
  container-type: inline-size;
  container-name: tn;
  --tn-panel: #151922;
  --tn-panel2: #11151d;
  --tn-line: #252c38;
  --tn-line2: #313a49;
  --tn-muted: #8f9bad;
  --tn-orange: #ff7a1a;
  --tn-orange2: #ffb11a;
  --tn-green: #35d66f;
  --tn-red: #ff475f;
}

.tn-game {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  background: var(--tn-panel);
  border: 1px solid var(--tn-line);
  color: inherit;
  text-decoration: none;
  transition: border-color .15s ease,transform .15s ease;
  min-width: 0;
}

.tn-game:hover {
  border-color: var(--tn-orange);
  transform: translateY(-1px);
}

.tn-game.is-live {
  border-color: rgba(255,71,95,.45);
}

.tn-teams {
  display: grid;
  gap: 6px;
}

.tn-team {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 12px 6px 27px;
  border: 2px solid transparent;
  border-radius: 10px;
  background:
    linear-gradient(#141923,#141923) padding-box,
    linear-gradient(rgba(20,25,35,.35),rgba(20,25,35,.35)) border-box,
    linear-gradient(180deg,var(--side-a),var(--side-b)) border-box;
  color: #fff;
  overflow: hidden;
  min-width: 0;
}

/* Team colour strip down the left edge. */
.tn-team::before {
  content: "";
  position: absolute;
  left: 0;
  top: -2px;
  bottom: -2px;
  width: 15px;
  background: linear-gradient(180deg,var(--side-a),var(--side-b));
}

.tn-team span {
  font-weight: 700;
  font-size: 16px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tn-team b {
  font-family: var(--score-font,inherit);
  font-size: 22px;
  font-weight: 700;
}

.tn-team b.is-loser {
  color: rgba(255,255,255,.6);
}

.tn-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--tn-muted);
}

.tn-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--tn-line2);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #dce4f2;
  white-space: nowrap;
}

.tn-chip.is-live {
  background: var(--tn-red);
  border-color: var(--tn-red);
  color: #fff;
}

.tn-chip.is-final {
  color: var(--tn-orange2);
  border-color: rgba(255,177,26,.4);
}

.tn-people.has-people {
  color: #fff;
  font-weight: 700;
}

.tn-people.has-people::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--tn-red);
  margin-right: 6px;
  vertical-align: 1px;
}

.tn-hero {
  padding: 18px;
  gap: 12px;
  background: linear-gradient(135deg,rgba(255,122,26,.16),rgba(19,31,58,.95) 55%);
  border-color: rgba(255,122,26,.35);
}

.tn-hero-kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--tn-orange2);
}

.tn-hero .tn-teams {
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.tn-hero .tn-team {
  flex-direction: column;
  align-items: flex-start;
  padding: 12px 16px 12px 31px;
}

.tn-hero .tn-team span {
  font-size: clamp(20px,4cqi,30px);
  font-weight: 800;
}

.tn-hero .tn-team b {
  font-size: clamp(34px,7cqi,52px);
  line-height: 1;
}

.tn-split {
  display: flex;
  gap: 3px;
  height: 22px;
  border-radius: 999px;
  overflow: hidden;
  font-size: 11px;
  font-weight: 700;
}

.tn-split span {
  display: flex;
  align-items: center;
  padding: 0 10px;
  background: linear-gradient(90deg,var(--side-a),var(--side-b));
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
}

.tn-split-note {
  font-size: 12px;
  color: var(--tn-muted);
  margin-top: -6px;
}

.tn-cta {
  justify-self: start;
  padding: 9px 16px;
  border-radius: 12px;
  background: linear-gradient(135deg,var(--tn-orange),var(--tn-orange2));
  color: #16100b;
  font-weight: 800;
  font-size: 14px;
}

.tn-daily {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 8px;
}

.tn-task {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  background: var(--tn-panel);
  border: 1px solid var(--tn-line);
  color: inherit;
  text-decoration: none;
  min-width: 0;
}

.tn-task:hover {
  border-color: var(--tn-orange);
}

.tn-task i {
  font-style: normal;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 10px;
  background: var(--tn-panel2);
  font-size: 16px;
}

.tn-task span {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.tn-task strong {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tn-task small {
  font-size: 11px;
  color: var(--tn-muted);
  overflow: hidden;
  text-overflow: ellipsis;
}

.tn-task.is-done i {
  background: rgba(53,214,111,.15);
  color: var(--tn-green);
  font-weight: 800;
}

.tn-task.is-done strong {
  color: var(--tn-muted);
}

.tn-dividends i {
  background: rgba(255,177,26,.14);
}

.tn-welcome h1 {
  margin: 0 0 8px;
}

.tn-welcome-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.tn-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 2px 2px 10px;
}

.tn-head h2 {
  margin: 0;
  font-size: 20px;
}

.tn-head h2 small {
  font-size: 12px;
  font-weight: 500;
  color: var(--tn-muted);
  margin-left: 6px;
}

.tn-head a {
  font-size: 13px;
  color: var(--tn-orange2);
  text-decoration: none;
  white-space: nowrap;
}

.tn-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(210px,1fr));
  gap: 10px;
}

@container tn (max-width: 760px) {
  .tn-daily {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
}

@media (max-width: 640px) {
  .tn-hero .tn-teams {
    grid-template-columns: 1fr 1fr;
  }
  .tn-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .tn-game {
    padding: 10px;
  }
  .tn-team span {
    font-size: 14px;
  }
  .tn-team b {
    font-size: 18px;
  }
  .tn-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}
