/* site.css — taco-bowl.teamlovetaco.com, the Taco Bowl fantasy league's awards.
   Built by scripts/build_awards_site.py. The tokens are the Team Love Taco site's
   own (tokens.css there), so the two read as one brand on two addresses. */

:root {
  color-scheme: light;
  --pink: #F23A7C;
  --pink-dark: #B91D5E;
  --pink-pale: #FCE4EE;
  --grey-50: #F5F4F1;
  --grey-100: #E8E6E1;
  --grey-500: #6E6962;
  --grey-700: #3E3A33;
  --black: #111111;
  --white: #FFFFFF;
  --font-display: 'Bungee', 'Archivo Black', system-ui, sans-serif;
  --font-subhead: 'Archivo Black', 'Archivo', system-ui, sans-serif;
  --font-body: 'Archivo', system-ui, -apple-system, sans-serif;
  --font-hand: 'Caveat', 'Bradley Hand', cursive;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--grey-50); color: var(--black);
  font-family: var(--font-body); font-size: 16px; line-height: 1.55;
}
img { max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { text-wrap: balance; }

.tb-container {
  max-width: 1040px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* ---- the site's own header and footer ---- */
.tb-top { background: var(--white); border-bottom: 3px solid var(--black); }
.tb-top-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; }
.tb-brand {
  font-family: var(--font-display); font-size: 1.25rem; line-height: 1; text-decoration: none;
  color: var(--black); text-shadow: 2px 2px 0 var(--pink); white-space: nowrap;
}
.tb-top-nav { display: flex; gap: 18px; flex-wrap: wrap; justify-content: flex-end; }
.tb-top-nav a {
  font-family: var(--font-subhead); font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  text-decoration: none; color: var(--black);
}
.tb-top-nav a:hover, .tb-top-nav a[aria-current] { color: var(--pink); }
.tb-foot {
  margin-top: 24px; border-top: 4px solid var(--black);
  background: repeating-linear-gradient(-45deg, var(--pink-pale) 0 10px, var(--grey-50) 10px 24px);
}
.tb-foot .tb-container { padding-top: 22px; padding-bottom: 30px; }
.tb-foot p { margin: 0; color: var(--grey-500); font-size: .86rem; }
.tb-foot .tb-hand { margin: 0 0 4px; color: var(--black); font-size: 1.25rem; }
.tb-foot a { color: var(--pink-dark); }

  /* ---- hero: striped, leads with the blowout; also the link-preview frame ---- */
  .tb-hero {
    background: repeating-linear-gradient(-45deg, var(--pink-pale) 0 10px, var(--grey-50) 10px 24px);
    border-bottom: 4px solid var(--black);
  }
  .tb-hero-in {
    padding-top: 34px; padding-bottom: 38px;
    display: flex; align-items: center; gap: 26px; flex-wrap: wrap;
  }
  .tb-hero-copy { flex: 1 1 340px; min-width: 0; }
  .tb-eyebrow {
    font-family: var(--font-subhead); font-size: 12px; letter-spacing: .2em;
    text-transform: uppercase; color: var(--pink); margin: 0;
  }
  .tb-h1 {
    font-family: var(--font-display); font-weight: normal;
    font-size: clamp(2.6rem, 10vw, 4.4rem); line-height: .9;
    margin: 10px 0 0; color: var(--black); text-shadow: 4px 4px 0 var(--pink);
  }
  .tb-bar { width: 72px; height: 5px; background: var(--black); margin: 18px 0 14px; }
  .tb-headline {
    font-family: var(--font-subhead); font-size: clamp(1rem, 3.4vw, 1.2rem);
    margin: 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere;
  }
  .tb-big { color: var(--pink); }
  .tb-lose { color: var(--grey-500); }
  .tb-hand {
    font-family: var(--font-hand); font-weight: 700; font-size: 1.4rem;
    color: var(--grey-500); margin: 6px 0 0; line-height: 1.25;
  }
  .tb-stickers { flex: 0 0 auto; position: relative; width: 230px; height: 190px; }
  .tb-stickers .tb-zoom { position: absolute; }
  .tb-stickers img {
    background: var(--white); border: 3px solid var(--black); border-radius: 12px;
    box-shadow: 6px 6px 0 var(--black); padding: 5px;
  }
  /* Scoped under .tb-stickers so they outrank .tb-zoom's width: 100%. */
  .tb-stickers .tb-s1 { width: 150px; right: 0; top: 0; transform: rotate(6deg); }
  .tb-stickers .tb-s2 { width: 96px; left: 0; bottom: 4px; transform: rotate(-12deg); }
  @media (max-width: 560px) { .tb-stickers { display: none; } }

  /* ---- week picker ---- */
  .tb-weeks { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 22px; padding-bottom: 4px; }
  .tb-week {
    font-family: var(--font-subhead); font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
    padding: 7px 12px; border: 2.5px solid var(--black); border-radius: 999px; line-height: 1;
    background: var(--white); color: var(--black); text-decoration: none; box-shadow: 2px 2px 0 var(--black);
  }
  .tb-week:hover { background: var(--pink-pale); }
  .tb-week.is-current { background: var(--pink); color: var(--white); }

  /* ---- sections ---- */
  .tb-sec { padding-top: 34px; padding-bottom: 34px; }
  .tb-sechead { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
  .tb-sechead h2 {
    font-family: var(--font-display); font-weight: normal;
    font-size: clamp(1.3rem, 4.6vw, 1.75rem); margin: 0; color: var(--black);
  }
  .tb-sechead p { margin: 0; color: var(--grey-500); font-size: .95rem; }

  /* ---- the trophy wall ---- */
  .tb-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 22px; }
  .tb-wall figure { margin: 0; min-width: 0; }
  .tb-zoom {
    display: block; width: 100%; padding: 0; border: 0; background: none;
    font: inherit; color: inherit; cursor: zoom-in;
  }
  .tb-zoom img { display: block; width: 100%; height: auto; }
  .tb-zoom:focus-visible { outline: 3px solid var(--pink); outline-offset: 4px; }
  .tb-wall .tb-zoom img {
    border: 3px solid var(--black); border-radius: 14px;
    box-shadow: 7px 7px 0 var(--black); background: var(--white);
    transition: transform .12s var(--ease-out);
  }
  .tb-wall .tb-zoom:hover img { transform: translate(-2px, -3px) rotate(-.6deg); }
  .tb-wall figcaption { margin-top: 12px; }
  .tb-aw {
    font-family: var(--font-subhead); font-size: 11px; letter-spacing: .15em;
    text-transform: uppercase; color: var(--pink); margin: 0;
  }
  .tb-win { font-family: var(--font-display); font-size: 1rem; line-height: 1.2; margin: 3px 0 0; overflow-wrap: anywhere; }
  .tb-note { color: var(--grey-500); font-size: .88rem; margin: 3px 0 0; overflow-wrap: anywhere; }

  /* ---- results ---- */
  .tb-games { display: grid; gap: 10px; max-width: 880px; }
  .tb-game {
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px;
    background: var(--white); border: 3px solid var(--black); border-radius: 12px;
    padding: 11px 14px; box-shadow: 4px 4px 0 var(--black); font-variant-numeric: tabular-nums;
  }
  .tb-w { font-weight: 700; min-width: 0; }
  .tb-l { color: var(--grey-500); text-align: right; min-width: 0; }
  .tb-pts { font-family: var(--font-subhead); font-size: .95rem; white-space: nowrap; }
  .tb-m { font-family: var(--font-subhead); font-size: 11px; letter-spacing: .08em; color: var(--pink); white-space: nowrap; }
  .tb-nm { display: block; font-size: .92rem; overflow-wrap: anywhere; }

  /* ---- standings ---- */
  .tb-tablewrap { overflow-x: auto; max-width: 880px; }
  .tb-tablewrap table { border-collapse: collapse; width: 100%; min-width: 420px; }
  .tb-tablewrap th, .tb-tablewrap td { padding: 9px 10px; text-align: left; border-bottom: 2px solid var(--grey-100); }
  .tb-tablewrap th {
    font-family: var(--font-subhead); font-size: 10px; letter-spacing: .14em;
    text-transform: uppercase; color: var(--grey-500);
  }
  /* Under .tb-tablewrap to outrank the cell rule that left-aligns everything. */
  .tb-tablewrap .tb-n { text-align: right; font-variant-numeric: tabular-nums; }
  .tb-tablewrap tr.tb-cut td { border-bottom: 3px dashed var(--pink); }
  .tb-rank { font-family: var(--font-subhead); color: var(--grey-500); width: 2.4rem; }
  /* The trophy count is the way into a team's case, so it reads as a button. */
  .tb-trophies {
    display: inline-block; min-width: 2.2em; text-align: center;
    font-family: var(--font-subhead); font-size: .85rem; line-height: 1;
    padding: 5px 9px; border: 2px solid var(--black); border-radius: 999px;
    background: var(--white); color: var(--black); text-decoration: none;
    box-shadow: 2px 2px 0 var(--black);
  }
  .tb-trophies:hover { background: var(--pink); color: var(--white); }
  .tb-trophies:focus-visible { outline: 3px solid var(--pink); outline-offset: 2px; }
  .tb-cutnote { color: var(--grey-500); font-size: .85rem; margin: 10px 0 0; }

  /* ---- lightbox ---- */
  .tb-lightbox {
    /* Above the site's sticky header, which otherwise covers the controls. */
    position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 10000;
    background: rgba(17, 17, 17, .9);
    display: grid; grid-template-rows: auto minmax(0, 1fr) auto; justify-items: center; gap: 10px;
    padding: calc(10px + env(safe-area-inset-top, 0px)) 16px calc(14px + env(safe-area-inset-bottom, 0px));
  }
  .tb-lightbox[hidden] { display: none !important; }
  .tb-lb-bar {
    width: 100%; max-width: 1040px; display: flex; align-items: center;
    justify-content: space-between; gap: 12px;
  }
  .tb-lb-count {
    font-family: var(--font-subhead); font-size: 11px; letter-spacing: .14em;
    text-transform: uppercase; color: var(--grey-50); font-variant-numeric: tabular-nums;
  }
  .tb-lb-nav { display: flex; gap: 10px; }
  .tb-lb-btn {
    font-family: var(--font-subhead); font-size: 13px; letter-spacing: .06em; color: var(--black);
    background: var(--grey-50); border: 3px solid var(--black); border-radius: 10px;
    box-shadow: 3px 3px 0 #000; padding: 6px 12px; cursor: pointer; white-space: nowrap;
  }
  .tb-lb-btn:focus-visible { outline: 3px solid var(--pink); outline-offset: 3px; }
  #tb-lb-img {
    /* The grid row alone doesn't bound a replaced element's height. */
    width: auto; height: auto; max-width: 100%; max-height: calc(100vh - 150px);
    max-height: calc(100dvh - 150px); object-fit: contain;
    border: 3px solid var(--black); border-radius: 14px; background: var(--white);
  }
  .tb-lb-cap {
    width: 100%; max-width: 1040px; text-align: center; color: var(--grey-50);
    font-size: .9rem; margin: 0; overflow-wrap: anywhere;
  }
  .tb-lb-cap b { font-family: var(--font-display); font-weight: 400; display: block; font-size: 1rem; }

  @media (max-width: 560px) {
    .tb-game { grid-template-columns: 1fr auto; }
    .tb-l { grid-column: 1 / -1; text-align: left; }
    .tb-m { grid-row: 1; grid-column: 2; }
  }
  @media (prefers-reduced-motion: reduce) {
    .tb-wall .tb-zoom img { transition: none; }
    .tb-wall .tb-zoom:hover img { transform: none; }
  }

/* ---- trophy case ---- */
/* A team name runs far longer than "Week 9 / Awards", so the case's title steps
   down a size and is allowed to break anywhere. */
.tb-h1--team { font-size: clamp(2rem, 7vw, 3.6rem); overflow-wrap: anywhere; }
.tb-tally { font-size: clamp(.9rem, 2.8vw, 1rem); margin-top: 4px; }
.tb-empty { font-family: var(--font-hand); font-weight: 700; font-size: 1.5rem; color: var(--grey-500); margin: 0; }
.tb-cases { display: flex; flex-wrap: wrap; gap: 10px; }
.tb-case { display: inline-flex; align-items: center; gap: 8px; text-transform: none; letter-spacing: .02em; font-size: 13px; }
.tb-case-n {
  font-size: 11px; min-width: 1.6em; text-align: center; padding: 3px 6px;
  border-radius: 999px; background: var(--black); color: var(--white);
}
.tb-case.is-current .tb-case-n { background: var(--white); color: var(--pink); }
