/* PubLeague: the pub wall, a chalkboard, beer mats and a poster. Light theme is the same board in daylight. Every
   selector sits under .plp. */
.plp {
  --pl-wall: #2A1D14;
  --pl-board: #1F2C27;
  --pl-ink: #EEF0EA;
  --pl-ink-2: rgba(238, 240, 234, .66);
  --pl-yellow: #F3D55B;
  --pl-pink: #F29BB5;
  --pl-blue: #9FD3EE;
  --pl-frame: #6B4427;
  --pl-frame-2: #8C5A35;
  --pl-line: rgba(238, 240, 234, .18);
  --pl-mat: #F2ECE0;
  --pl-mat-ink: #2A1D14;
  --pl-poster: #F2ECE0;
  --pl-poster-ink: #C8202A;
  --pl-slab: 'Alfa Slab One', "Alfa Slab One Fallback: Georgia", 'Rockwell', serif;
  --pl-chalk: 'Kalam', "Kalam Fallback: Segoe UI", "Kalam Fallback: Arial", 'Segoe Print', cursive;
  --pa-primary-bg: var(--pl-yellow);
  --pa-primary-fg: #1F2C27;
  --pa-secondary-fg: var(--pl-ink);
  --pa-secondary-border: var(--pl-ink-2);
  --pa-focus: var(--pl-yellow);
  padding-top: clamp(6rem, 11vw, 7.5rem);
  background: var(--pl-wall);
  color: var(--pl-ink);
  font-size: 1.0625rem;
  line-height: 1.6;
}
[data-theme="light"] .plp {
  --pl-wall: #EEF0EC;
  --pl-board: #FBFBF8;
  --pl-ink: #191B1A;
  --pl-ink-2: #555B58;
  --pl-yellow: #C8202A;
  --pl-pink: #187A43;
  --pl-blue: #1F4FBF;
  --pl-frame: #191B1A;
  --pl-frame-2: #191B1A;
  --pl-line: rgba(25, 27, 26, .14);
  --pl-mat: #FFFFFF;
  --pl-poster: #FFF6E0;
  --pa-primary-fg: #FFFFFF;
}
[data-theme="light"] .plp .plp-board { border-width: 3px; background-image: linear-gradient(var(--pl-line) 1px, transparent 1px); background-size: 100% 40px; }
.plp-wrap { max-width: 1280px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 56px); }
.plp p { max-width: none; }
.plp-section { padding-top: 6rem; }
.plp-h2, .plp-title, .plp-closing-line { color: var(--pl-ink); font-family: var(--pl-slab); font-weight: 400; letter-spacing: 0; line-height: 1; }
.plp-h2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); text-wrap: balance; }
.plp-h3 { color: var(--pl-yellow); font-family: var(--pl-chalk); font-size: 1.5rem; font-weight: 700; letter-spacing: 0; }
.plp .plp-sub, .plp .plp-steps p, .plp .plp-lede { color: var(--pl-ink-2); }
.plp .plp-sub { max-width: 38em; margin-top: 1rem; }
.chalk { font-family: var(--pl-chalk); font-weight: 700; }
.plp-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 2rem; }
.plp-actions--center { justify-content: center; }

/* The board: chalk on slate in a wooden frame */
.plp-board {
  position: relative;
  padding: clamp(28px, 4vw, 56px) clamp(20px, 4.5vw, 64px);
  border: 18px solid var(--pl-frame);
  border-image: linear-gradient(135deg, var(--pl-frame-2), var(--pl-frame) 40%, var(--pl-frame-2) 70%, var(--pl-frame)) 18;
  background: var(--pl-board);
}
.plp-board::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: .5;
  pointer-events: none;
}
[data-theme="light"] .plp .plp-board::before { opacity: 0; }
.plp-hero { display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 56px; }
.plp-status { color: var(--pl-pink); font-size: 1.5rem; }
.plp-title { margin: 1.25rem 0 1.75rem; font-size: clamp(3.2rem, 7.5vw, 5.5rem); line-height: .92; }
.plp-title span { display: block; }
.plp-title span:nth-child(2) { color: var(--pl-yellow); }
.plp .plp-lede { max-width: 30em; font-size: 1.15rem; }
.plp .plp-langnote { margin-top: .75rem; color: var(--pl-ink-2); font-size: .95rem; }
@media (max-width: 960px) { .plp-hero { grid-template-columns: 1fr; gap: 40px; } }

/* Tonight's table */
.table { color: var(--pl-ink); font-family: var(--pl-chalk); }
.table .title { margin-bottom: .75rem; color: var(--pl-blue); font-size: clamp(1.6rem, 2.6vw, 2rem); font-weight: 700; }
.rows { margin: 0; padding: 0; list-style: none; }
.row { display: grid; grid-template-columns: 32px 1fr auto 96px; align-items: center; column-gap: 16px; padding: 10px 0; border-bottom: 2px solid var(--pl-line); font-size: clamp(1.25rem, 2vw, 1.55rem); }
.row .rank { color: var(--pl-ink-2); }
.row .mmr { color: var(--pl-yellow); font-weight: 700; text-align: right; }
.row .was { margin-right: 8px; opacity: .45; text-decoration: line-through; text-decoration-thickness: 3px; }
.row .up { margin-left: 8px; color: var(--pl-pink); font-size: .75em; }
.tally { justify-self: end; width: 96px; height: 26px; }
.tally path { fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; }
/* On a narrow phone the names need the room more than the tally does. */
@media (max-width: 420px) {
  .row { grid-template-columns: 24px 1fr auto; column-gap: 10px; }
  .tally { display: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .row { clip-path: inset(0 100% 0 0); animation: chalk .55s ease-out both; animation-delay: calc(.4s + var(--i) * .25s); }
  .row .was { animation: smudge .5s ease-in 2s both; }
  .row .up { animation: appear .4s ease-out 2.4s both; }
}
@keyframes chalk { to { clip-path: inset(0 -8px 0 0); } }
@keyframes smudge { from { opacity: 1; text-decoration-color: transparent; } to { opacity: .45; } }
@keyframes appear { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* Beer mats, one per game */
.plp-mats { position: relative; z-index: 2; display: flex; flex-wrap: wrap; justify-content: center; gap: 22px; margin: -40px auto 0; padding: 0 16px; list-style: none; }
.plp-mat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 172px;
  height: 172px;
  border-radius: 50%;
  background: var(--pl-mat);
  box-shadow: 0 12px 24px -12px rgba(0, 0, 0, .6), inset 0 0 0 6px var(--pl-mat), inset 0 0 0 8px rgba(0, 0, 0, .12);
  color: var(--pl-mat-ink);
  text-align: center;
}
.plp-mat:nth-child(odd) { transform: rotate(-4deg); }
.plp-mat:nth-child(even) { transform: rotate(3deg) translateY(10px); }
.plp-mat b { font-family: var(--pl-slab); font-size: 1.15rem; font-weight: 400; line-height: 1.1; }
.plp-mat small { color: #5A4A3E; font-size: .8rem; }
.plp-ball { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: radial-gradient(circle at 50% 50%, #FFFFFF 0 9px, transparent 10px), var(--c); color: #111111; font-size: 14px; font-weight: 700; }
@media (max-width: 560px) { .plp-mat { width: 148px; height: 148px; } }

/* How a ranked match counts */
.plp-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; margin: 2.5rem 0 0; padding: 0; list-style: none; }
.plp-step-no {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: .75rem;
  border-radius: 50%;
  background: radial-gradient(circle, #C8202A 0 30%, #187A43 31% 52%, #F2ECE0 53% 74%, #191B1A 75%);
  color: #FFFFFF;
  font-family: var(--pl-slab);
  font-size: 1.2rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .6);
}
@media (max-width: 860px) { .plp-steps { grid-template-columns: 1fr; } }

/* The film: its own chalkboard and wood edge are in the film, so the page adds only a shadow */
.plp .plp-film-body { max-width: 44em; margin-top: 1rem; color: var(--pl-ink-2); }
.plp-film {
  --pf-radius: 4px;
  --pf-border: 0;
  --pf-stage-bg: #1F2C27;
  --pf-shadow: 0 30px 60px -28px rgba(0, 0, 0, .7);
  --pf-accent: #F3D55B;
  --pf-accent-ink: #1F2C27;
  --pf-accent-text: var(--pl-yellow);
  --pf-ink: var(--pl-ink);
  --pf-ink-2: var(--pl-ink-2);
  --pf-chapter-bg: color-mix(in srgb, var(--pl-ink) 8%, transparent);
  --pf-pill-bg: rgba(31, 44, 39, .94);
  --pf-pill-ink: #EEF0EA;
  margin-top: 2.25rem;
}

/* Screenshots, chalk-outlined on the wall */
.plp-shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 40px; margin: 0; padding: 0; list-style: none; }
/* all five in one row where they fit, so none is left alone on a second one */
@media (min-width: 1000px) { .plp-shots { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 28px; } }
.plp-frame { margin: 0; padding: 12px; border: 3px dashed var(--pl-ink-2); border-radius: 34px; }
.plp-frame .pshot { overflow: hidden; border-radius: 24px; }
.plp-frame figcaption { margin-top: .75rem; color: var(--pl-ink-2); font-family: var(--pl-chalk); font-size: 1.15rem; line-height: 1.3; text-align: center; }

/* Competitions, as a fight-night poster */
.plp-compete { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); align-items: start; gap: 56px; }
.plp-poster { padding: 40px 32px; border: 6px double var(--pl-poster-ink); background: var(--pl-poster); box-shadow: 0 24px 48px -24px rgba(0, 0, 0, .6); color: var(--pl-poster-ink); text-align: center; transform: rotate(-1.5deg); }
.plp .plp-poster-kicker { color: #191B1A; font-family: var(--pl-slab); font-size: 1.1rem; letter-spacing: .08em; }
.plp .plp-poster-title { margin: .5rem 0; font-family: var(--pl-slab); font-size: clamp(2.6rem, 5vw, 3.6rem); line-height: .95; }
.plp .plp-poster-sub { color: #191B1A; font-family: var(--pl-chalk); font-size: 1.3rem; font-weight: 700; }
.plp-defs { margin: 1.75rem 0 0; }
.plp-defs dt { color: var(--pl-yellow); font-family: var(--pl-chalk); font-size: 1.4rem; font-weight: 700; }
.plp-defs dd { margin: 0 0 1.25rem; color: var(--pl-ink-2); }
@media (max-width: 860px) { .plp-compete { grid-template-columns: minmax(0, 1fr); } }

.plp-board--small { border-width: 12px; }
.plp-closing { padding: 7rem clamp(16px, 4vw, 56px) 6rem; text-align: center; }
.plp-closing-line { font-size: clamp(2.6rem, 6vw, 4.5rem); }
/* Phones: the phone screenshots two to a row, not one tall column */
@media (max-width: 560px) {
  .plp-shots { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .plp-frame { padding: 6px; border-width: 2px; border-radius: 22px; }
  .plp-frame .pshot { border-radius: 16px; }
  .plp-frame figcaption { font-size: 1rem; }
}
/* The smallest phones (320 px): two mats still fit side by side, and the poster's long word stays inside it */
@media (max-width: 380px) {
  .plp-mats { gap: 12px; padding: 0 8px; }
  .plp-mat { width: 136px; height: 136px; }
  .plp-poster { padding: 32px 18px; }
  .plp .plp-poster-title { font-size: 2.1rem; }
}
