/* STATWIRE NHL Playoff Map (/nhl/playoffs), Option #1: c8 converging 16-team Stanley Cup tree with a diamond
   Stanley Cup emblem + c4 East/West standings. Loaded after /assets/site.css. Script: /assets/nhl-playoffs.js.
   Built on /assets/nfl-playoffs.css (same bracket geometry). */
html[data-league="nhl"] { --accent: #0284C7; --accent2: #0369A1; }
.card[data-tone="playoffs"] { --tone: #84CC16; }

/* ---------- bracket card ---------- */
#bracketCard { display: flex; flex-direction: column; }
#bracketCard > .note { margin: 0 0 10px; }
.bk-scroll { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; margin: 0 -2px; padding: 0 2px 4px; flex: 1 1 auto; display: flex; }
.bk-scroll::-webkit-scrollbar { height: 6px; }
.bk-scroll::-webkit-scrollbar-thumb { background: #C0D0B0; border-radius: 3px; }
.bk {
  position: relative; flex: 1 1 auto; min-width: 680px; min-height: 420px;
  display: grid; grid-template-columns: minmax(0, 1.18fr) 22px minmax(0, 1fr) 104px minmax(0, 1fr) 22px minmax(0, 1.18fr);
  grid-template-rows: auto minmax(0, 1fr); column-gap: 0; row-gap: 8px;
}
.bk > .empty { grid-column: 1 / -1; grid-row: 1 / -1; align-self: center; text-align: center; color: var(--muted); font-size: 13px; }
.bk-wires { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; z-index: 0; }
.bk-wires path { fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.bk-wires .west { stroke: #0284C7; } .bk-wires .east { stroke: #B91C1C; }
.bk-wires .faint { stroke-dasharray: 3 3; opacity: .65; }

.bk-hd { grid-row: 1; align-self: end; justify-self: center; font-family: var(--mono); font-size: 9.5px; font-weight: 800; letter-spacing: .12em;
  padding: 3px 8px; border-radius: 5px; white-space: nowrap; position: relative; z-index: 1; }
.bk-hd.west { background: #E0F2FE; color: #0369A1; } .bk-hd.east { background: #FEE2E2; color: #B91C1C; }
.bk-hd.sc { background: #0C0C11; color: #A3E635; }
.bk-col { grid-row: 2; display: flex; flex-direction: column; justify-content: space-around; gap: 10px; position: relative; z-index: 1; min-width: 0; }
.bk-col.c1 { grid-column: 1; } .bk-col.c2 { grid-column: 3; } .bk-col.c3 { grid-column: 4; align-items: center; justify-content: center; }
.bk-col.c4 { grid-column: 5; } .bk-col.c5 { grid-column: 7; }
.bk-hd.h1 { grid-column: 1; } .bk-hd.h2 { grid-column: 3; } .bk-hd.h3 { grid-column: 4; } .bk-hd.h4 { grid-column: 5; } .bk-hd.h5 { grid-column: 7; }

/* matchup cards */
.mc { background: #FFFFFF; border: 1.5px solid #CFD9DF; border-radius: 10px; overflow: hidden; min-width: 0; box-shadow: 0 1px 2px rgba(12,12,17,.05); }
.mc-h { display: flex; justify-content: space-between; gap: 6px; padding: 4px 8px; font-family: var(--mono); font-size: 9px; font-weight: 800;
  letter-spacing: .08em; color: #6B6B76; background: #F5F8F1; border-bottom: 1px solid #E3EAD9; white-space: nowrap; overflow: hidden; }
.mc-h b { color: #0C0C11; font-weight: 800; }
.mc-t { display: grid; grid-template-columns: 30px auto minmax(0, 1fr) auto; align-items: center; gap: 6px; width: 100%; min-height: 30px;
  padding: 4px 8px; border: 0; background: transparent; font: inherit; text-align: left; color: var(--ink); cursor: pointer; }
.mc-t + .mc-t { border-top: 1px solid #EEF2EA; }
.mc-t:hover { background: #F7FAF2; }
.mc-t:focus-visible { outline: 2px solid #0284C7; outline-offset: -2px; }
.mc-t .s { font-family: var(--mono); font-size: 11px; font-weight: 700; color: #6B6B76; text-align: right; }
.mc-t .nm { font-size: 12.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-t .r { font-family: var(--mono); font-size: 11px; color: #6B6B76; white-space: nowrap; }
.mc-t.home .nm::after { content: "H"; margin-left: 5px; font-family: var(--mono); font-size: 8.5px; font-weight: 800; color: #0369A1;
  border: 1px solid #BAE6FD; border-radius: 3px; padding: 0 3px; vertical-align: 1px; }
.mc-tbd { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 6px; align-items: center; min-height: 30px; padding: 4px 8px;
  font-size: 11.5px; font-style: italic; color: #6B6B76; }
.mc-tbd + .mc-tbd, .mc-t + .mc-tbd { border-top: 1px solid #EEF2EA; }
.mc-tbd .s { font-style: normal; font-family: var(--mono); font-size: 11px; color: #9A9AA6; text-align: right; }
.mc-tbd b { font-style: normal; font-family: var(--mono); font-size: 9px; letter-spacing: .06em; color: #0C0C11; }
.mc.rs { border: 1.5px dashed #CEDBC0; background: #F5F8F1; box-shadow: none; }
.mc.rs .mc-h { background: transparent; border-bottom: 1px dashed #CEDBC0; }
.mc.rs .mc-tbd + .mc-tbd { border-top: 1px dashed #DCE6D0; }

.mc-t .s, .mc-tbd .s { font-size: 10px; text-align: left; }
.mc-t .r b { color: #0C0C11; font-weight: 800; }
.mc-t .r i { font-style: normal; }
.mc.rs .mc-tbd { min-height: 34px; }

/* diamond Stanley Cup emblem */
.sc-em { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.sc-dia { width: 72px; height: 72px; transform: rotate(45deg); border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, #0C0C11, #075985); border: 2.5px solid #84CC16;
  box-shadow: 0 8px 20px rgba(12,12,17,.28), 0 0 0 4px rgba(132,204,22,.14); margin-top: 12px; }
.sc-in { transform: rotate(-45deg); display: flex; flex-direction: column; align-items: center; line-height: 1.05; text-align: center; }
.sc-in b { font-family: var(--mono); font-size: 10.5px; font-weight: 800; color: #A3E635; letter-spacing: .02em; white-space: nowrap; }
.sc-in b + b { margin-top: 1px; }
.sc-in span { font-family: var(--mono); font-size: 9.5px; font-weight: 700; color: #E0F2FE; letter-spacing: .12em; margin-top: 3px; white-space: nowrap; }
.sc-cap { margin-top: 10px; font-family: var(--mono); font-size: 9.5px; font-weight: 800; letter-spacing: .12em; color: #0C0C11; white-space: nowrap; }
.sc-cap i { font-style: normal; color: #0284C7; } .sc-cap em { font-style: normal; color: #B91C1C; }
.sc-cap small { font-weight: 600; color: #9A9AA6; margin: 0 3px; }

/* wild card bubble strip */
.hunt { margin-top: 12px; background: #FFFBEB; border: 1.5px dashed #D97706; border-radius: 9px; padding: 9px 12px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; flex: 0 0 auto; }
.hunt-k { font-family: var(--mono); font-size: 10px; font-weight: 800; letter-spacing: .12em; color: #92400E; margin-right: 2px; white-space: nowrap; }
.hunt-g { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.hunt-c { font-family: var(--mono); font-size: 9px; font-weight: 800; letter-spacing: .1em; padding: 2px 5px; border-radius: 4px; }
.hunt-c.west { background: #E0F2FE; color: #0369A1; } .hunt-c.east { background: #FEE2E2; color: #B91C1C; }
.hunt-sep { width: 1px; align-self: stretch; background: #FCD34D; }
.chip-t { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border: 1px solid #FCD34D; border-radius: 7px; background: #FFFFFF;
  font: inherit; font-size: 12px; color: var(--ink); cursor: pointer; white-space: nowrap; }
.chip-t:hover { border-color: #D97706; }
.chip-t .s { font-family: var(--mono); font-size: 10.5px; font-weight: 700; color: #92400E; }
.chip-t .r, .chip-t .gb { font-family: var(--mono); font-size: 10.5px; color: #6B6B76; }
.chip-t .gb { color: #B45309; font-weight: 700; }
.hunt-none { font-family: var(--mono); font-size: 10.5px; color: #6B6B76; }

/* ---------- standings card ---------- */
#seedList .grp { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr) 30px 34px 40px; gap: 6px; align-items: end;
  padding: 10px 4px 4px; border-bottom: 1px solid var(--line); cursor: default; font-family: var(--mono); font-size: 9px; font-weight: 800;
  letter-spacing: .1em; color: #6B6B76; text-transform: uppercase; }
#seedList .grp:first-child { padding-top: 2px; }
#seedList .grp b { color: #0C0C11; font-weight: 800; letter-spacing: .12em; }
#seedList .grp span { text-align: right; }
#seedList .row { grid-template-columns: 34px auto minmax(0, 1fr) 30px 34px 40px; gap: 6px; min-height: 34px; padding: 3px 4px; }
#seedList .row .n { font-size: 10.5px; font-weight: 800; text-align: left; color: #0C0C11; }
#seedList .row .nm { font-size: 13px; display: flex; align-items: center; gap: 6px; min-width: 0; }
#seedList .row .nm > span:first-child { overflow: hidden; text-overflow: ellipsis; }
#seedList .row .c { font-family: var(--mono); font-size: 12px; text-align: right; color: #6B6B76; }
#seedList .row .c.pts { color: #0C0C11; font-weight: 800; }
#seedList .row .df { font-family: var(--mono); font-size: 12px; text-align: right; font-weight: 700; }
.df.pos { color: #15803D; } .df.neg { color: #DC2626; } .df.zero { color: #6B6B76; }
#seedList .row.wcin { background: #FEFCE8; border: 1.5px solid #FDE047; border-radius: 8px; }
#seedList .row.wcin + .row.wcin { margin-top: 3px; }
#seedList .row.cut { border-bottom: 2px dashed #DC2626; }
#seedList .row.out .n, #seedList .row.out .nm { color: #6B6B76; }
.tg { flex: 0 0 auto; font-family: var(--mono); font-size: 8.5px; font-weight: 800; letter-spacing: .06em; padding: 1px 5px; border-radius: 4px; white-space: nowrap; }
.tg.clin { background: #0C0C11; color: #A3E635; }
.tg.elim { background: #F3F4F6; color: #6B6B76; }
.cutlbl { list-style: none; font-family: var(--mono); font-size: 9px; font-weight: 800; letter-spacing: .12em; color: #DC2626; text-align: right; padding: 2px 4px 0; cursor: default; border: 0; }

/* sheet bits */
.sh-tier { display: inline-block; font-family: var(--mono); font-size: 10px; font-weight: 800; letter-spacing: .08em; padding: 2px 7px; border-radius: 5px; }

@media (min-width: 1100px) {
  .bk { min-height: 552px; }
  /* standings list fills the card flush with the bracket card: rows stretch to the space, scroll only if it runs out */
  #standingsCard .rows { display: flex; flex-direction: column; height: 0; min-height: 0; overflow-y: auto; }
  #standingsCard .rows > .row { flex: 1 0 auto; }
}
/* below the desktop grid the tree keeps a readable width and scrolls sideways inside the card */
@media (max-width: 1099px) { .bk { min-width: 780px; } .mc-t .r i { display: none; } .mc-t { grid-template-columns: 26px auto minmax(0, 1fr) auto; gap: 5px; } .mc-tbd { grid-template-columns: 26px minmax(0, 1fr); gap: 5px; } #standingsCard .rows { max-height: 620px; overflow-y: auto; } }
@media (max-width: 719px) {
  .bk { min-height: 400px; }
  .hunt { gap: 8px; }
  .hunt-sep { display: none; }
}
