/* ---- A boss pull by pull (bosspulls.js; mockup D of .impeccable/mocks/boss-pulls/, 2026-10-29) ----
   The render of a boss with pulls is a button; it turns the guild's band into a raid journal: the
   bosses as heads in tabs, then a stage with the render, four numbers, the encounter graph, every
   pull as a bar under it and the raid nights under that, all on one x axis. */

/* The opener: a small step-line mark in the render's corner, lit on hover and focus. */
.gb__open { position: absolute; inset: 0; z-index: 2; display: grid; place-items: end start; padding: 0 0 6px 6px; border: 0;
  background: transparent; cursor: pointer; }
.gb__open-mark { width: 22px; height: 17px; padding: 3px 4px 2px; background: var(--ink-900, #0a0b0d); opacity: .7;
  fill: none; stroke: var(--paper-dim, #c9d0d8); stroke-width: 1.6; stroke-linejoin: round;
  clip-path: polygon(0 0, 100% 0, calc(100% - 3px) 100%, 0 100%);
  transition: opacity var(--t-fast, 160ms) var(--ease, ease), background var(--t-fast, 160ms) var(--ease, ease); }
.gb__open:hover { background: color-mix(in srgb, var(--paper, #eef1f5) 5%, transparent); }
.gb__open:hover .gb__open-mark, .gb__open:focus-visible .gb__open-mark { opacity: 1; background: var(--guild, var(--jade, #3fd9a4)); stroke: var(--ink-900, #0a0b0d); }
.gb__open:focus-visible { outline: 2px solid var(--jade, #3fd9a4); outline-offset: -2px; }

/* The journal takes the boss line's place, beside the guild panel. */
.gar--journal .bp { min-width: 0; background: var(--ink-850, #0e1014); border-left: 1px solid var(--ink-700, #1e2228); }
.bp-tabrow { display: flex; align-items: stretch; gap: 1px; background: var(--ink-750, #171a1f); border-bottom: 1px solid var(--ink-700, #1e2228); }
.bp-back { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; padding: 0 14px 0 10px; border: 0; background: var(--ink-900, #0a0b0d);
  color: var(--paper-dim, #c9d0d8); font: 800 12px/1 var(--f-display, sans-serif); letter-spacing: .1em; text-transform: uppercase; cursor: pointer; white-space: nowrap; }
.bp-back svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; }
.bp-back:hover { color: var(--jade, #3fd9a4); }
.bp-back:focus-visible { outline: 2px solid var(--jade, #3fd9a4); outline-offset: -2px; }
.bp-tabs { flex: 1 1 auto; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 1px; min-width: 0; }
.bp-tab { display: grid; justify-items: center; gap: 3px; min-width: 0; padding: 6px 2px 5px; border: 0; border-top: 2px solid transparent;
  background: var(--ink-850, #0e1014); cursor: pointer; transition: background var(--t-fast, 160ms) var(--ease, ease); }
.bp-tab__n { font-size: 12px; line-height: 1.2; color: var(--ink-300, #818b98); white-space: nowrap; min-height: 1.2em; }
.bp-tab.is-kill .bp-tab__n { color: var(--jade, #3fd9a4); }
.bp-tab.is-empty { cursor: default; }
.bp-tab.is-empty .bp-head img { filter: brightness(0); opacity: .5; }
.bp-tab:not(.is-empty):hover { background: var(--ink-800, #131519); }
.bp-tab[aria-selected="true"] { border-top-color: var(--guild, var(--jade, #3fd9a4)); background: var(--ink-800, #131519); }
.bp-tab:focus-visible { outline: 2px solid var(--jade, #3fd9a4); outline-offset: -2px; }
/* A boss head: the top of its render in a slanted tile, as in the Hall of fame. */
.bp-head { flex: 0 0 auto; display: grid; place-items: center; width: 34px; height: 34px; overflow: hidden; background: var(--ink-750, #171a1f);
  clip-path: polygon(0 0, 100% 0, calc(100% - 5px) 100%, 0 100%); }
.bp-head img { width: 100%; height: 150%; object-fit: cover; object-position: 50% 0; align-self: start; }
.bp-head b { font-weight: 800; color: var(--ink-400, #5b6470); }

/* The stage: the render in the guild's glow (jade once killed), then the facts and the chart. */
.bp-stage { display: grid; grid-template-columns: 170px minmax(0, 1fr); }
.bp-stage__art { position: relative; overflow: hidden; min-height: 300px;
  background: radial-gradient(ellipse at 50% 80%, color-mix(in srgb, var(--guild, var(--jade, #3fd9a4)) 26%, var(--ink-800, #131519)), var(--ink-900, #0a0b0d) 72%); }
.bp-stage.is-kill .bp-stage__art { background: radial-gradient(ellipse at 50% 80%, color-mix(in srgb, var(--jade, #3fd9a4) 22%, var(--ink-800, #131519)), var(--ink-900, #0a0b0d) 72%); }
.bp-stage__art img { position: absolute; left: 8px; right: 8px; bottom: 0; width: calc(100% - 16px); height: calc(100% - 14px);
  max-height: var(--nat-h, 100%); margin: 0 auto; object-fit: contain; object-position: 50% 100%; }
.bp-stage__body { display: grid; gap: 10px; align-content: start; min-width: 0; padding: 16px 16px 16px 18px; }
.bp-stage__top { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.bp-stage__h { font-size: clamp(20px, 2vw, 24px); font-weight: 800; line-height: 1.1; color: var(--paper, #eef1f5); text-wrap: balance; }
.bp-g { color: var(--guild, var(--paper, #eef1f5)); }
.bp-vs { color: var(--ink-300, #818b98); font-weight: 600; }
.bp-facts { display: flex; flex-wrap: wrap; gap: 2px 0; font-size: 12.5px; color: var(--ink-300, #818b98); }
.bp-fact + .bp-fact::before { content: "·"; padding: 0 7px; color: var(--ink-500, #3a414b); }
.bp-fact--kill { color: var(--jade, #3fd9a4); font-weight: 600; }
.bp-fact--gold { color: var(--gold, #d8b263); font-weight: 600; }
.bp-fact--g { color: var(--guild, var(--paper, #eef1f5)); font-weight: 700; }
.bp-stats { display: grid; grid-template-columns: repeat(4, minmax(0, auto)); justify-content: start; gap: 4px 28px; }
.bp-stats div { display: grid; gap: 2px; }
.bp-stats dt { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-300, #818b98); }
.bp-stats dd { font-size: 24px; font-weight: 700; line-height: 1.1; color: var(--paper, #eef1f5); }
.bp-stats dd.bp-stats__sub { font-size: 12px; font-weight: 600; line-height: 1.3; color: var(--ink-300, #818b98); cursor: help; }
.bp-stage__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.bp-src { font-size: 12px; color: var(--ink-300, #818b98); text-decoration: none; }
.bp-src:hover { color: var(--jade, #3fd9a4); }
.bp-src:focus-visible { outline: 2px solid var(--jade, #3fd9a4); outline-offset: 2px; }
.bp-x { flex: 0 0 auto; display: grid; place-items: center; width: 36px; height: 36px; border: 0; background: var(--ink-800, #131519); cursor: pointer;
  clip-path: polygon(0 0, 100% 0, calc(100% - 5px) 100%, 0 100%); }
.bp-x svg { width: 14px; height: 14px; fill: none; stroke: var(--paper-dim, #c9d0d8); stroke-width: 2; stroke-linecap: square; }
.bp-x:hover { background: var(--ink-700, #1e2228); }
.bp-x:focus-visible { outline: 2px solid var(--jade, #3fd9a4); outline-offset: 2px; }

/* Vergelijk: a slanted chip per guild that pulled it; pressed = its best line is drawn. */
.bp-cmp { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.bp-cmp__l { margin-right: 4px; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-300, #818b98); }
.bp-chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px 0 8px; border: 0; background: var(--ink-800, #131519);
  color: var(--ink-200, #a8b1bc); font: 700 12px/1 var(--f-mono, monospace); cursor: pointer; clip-path: polygon(0 0, 100% 0, calc(100% - 4px) 100%, 0 100%); }
.bp-chip i { width: 10px; height: 10px; box-shadow: inset 0 0 0 2px var(--guild, var(--jade, #3fd9a4)); }
.bp-chip[aria-pressed="true"] { background: var(--ink-700, #1e2228); color: var(--paper, #eef1f5); }
.bp-chip[aria-pressed="true"] i { background: var(--guild, var(--jade, #3fd9a4)); }
.bp-chip:hover { color: var(--paper, #eef1f5); }
.bp-chip:focus-visible { outline: 2px solid var(--jade, #3fd9a4); outline-offset: 2px; }

/* The chart well, as Voortgang's. */
.bp-plot { position: relative; min-height: 190px; background: var(--ink-850, #0e1014); border: 1px solid var(--ink-700, #1e2228); }
.bp-svg { display: block; width: 100%; height: auto; touch-action: pan-y; }
.bp-svg:focus-visible { outline: 2px solid var(--jade, #3fd9a4); outline-offset: 2px; }
.bp-night { fill: color-mix(in srgb, var(--jade, #3fd9a4) 4.5%, transparent); }
.bp-nightline { stroke: var(--ink-600, #2a2f37); stroke-width: 1; stroke-dasharray: 3 4; }
.bp-level { stroke: var(--ink-700, #1e2228); stroke-width: 1; }
.bp-base { stroke: var(--ink-600, #2a2f37); stroke-width: 1; }
.bp-axis { fill: var(--ink-300, #818b98); font: 400 12px var(--f-mono, monospace); }
.bp-axis--y { text-anchor: end; }
.bp-axis--n { fill: var(--ink-400, #5b6470); text-anchor: middle; }
.bp-all { fill: none; stroke: color-mix(in srgb, var(--guild, var(--paper, #eef1f5)) 38%, var(--ink-500, #3a414b)); stroke-width: 1; stroke-linejoin: round; }
.bp-step { fill: none; stroke: var(--guild, var(--jade, #3fd9a4)); stroke-width: 2.5; stroke-linejoin: round; }
.bp-step--rival { stroke-width: 1.5; opacity: .85; }
.bp-end { fill: var(--guild, var(--paper, #eef1f5)); font: 700 12px var(--f-mono, monospace); }
.bp-node { fill: var(--ink-850, #0e1014); stroke: var(--guild, var(--jade, #3fd9a4)); stroke-width: 2; }
.bp-node--kill { fill: var(--jade, #3fd9a4); stroke: var(--ink-850, #0e1014); }
.bp-lab { fill: var(--guild, var(--paper, #eef1f5)); font: 700 12px var(--f-mono, monospace); }
.bp-killtag { fill: var(--jade, #3fd9a4); font: 800 12px var(--f-display, sans-serif); letter-spacing: .12em; text-transform: uppercase; text-anchor: end; }
.bp-ring { fill: var(--ink-900, #0a0b0d); stroke: var(--paper, #eef1f5); stroke-width: 2; pointer-events: none; }
/* The bars under the line. */
.bp-strip { border-top: 1px solid var(--ink-700, #1e2228); }
.bp-bar { fill: var(--ink-500, #3a414b); }
.bp-bar--best { fill: color-mix(in srgb, var(--guild, var(--jade, #3fd9a4)) 70%, var(--ink-500, #3a414b)); }
.bp-bar--kill { fill: var(--jade, #3fd9a4); }
.bp-bar.is-on { fill: var(--paper, #eef1f5); }
.bp-beat { stroke: var(--paper-dim, #c9d0d8); stroke-width: 1; stroke-dasharray: 3 3; opacity: .8; }
/* Gold only for the race's first kill. */
.bp-bar--kill.is-first, .bp-node--kill.is-first, .bp-killtag.is-first { fill: var(--gold, #d8b263); }

/* The raid nights: each as wide as its stretch of the chart. */
.bp-led { list-style: none; display: grid; grid-template-columns: var(--cols); padding: 0 var(--pr, 0) 0 var(--pl, 0); border-top: 1px solid var(--ink-700, #1e2228); }
.bp-ln { display: grid; align-content: start; gap: 3px; min-width: 0; padding: 7px 6px 9px; overflow: hidden; border-top: 2px solid transparent;
  transition: background var(--t-fast, 160ms) var(--ease, ease); }
.bp-ln.is-shade { background: color-mix(in srgb, var(--jade, #3fd9a4) 4.5%, transparent); }
.bp-ln.is-gain { border-top-color: var(--guild, var(--jade, #3fd9a4)); }
.bp-ln.is-kill { border-top-color: var(--jade, #3fd9a4); background: color-mix(in srgb, var(--jade, #3fd9a4) 9%, transparent); }
.bp-ln.is-kill.is-first { border-top-color: var(--gold, #d8b263); }
.bp-ln.is-on { background: var(--ink-750, #171a1f); }
.bp-n__day { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 6px; font-size: 12px; white-space: nowrap; }
.bp-n__day b { color: var(--paper, #eef1f5); font-weight: 700; }
.bp-n__day span { color: var(--ink-300, #818b98); }
.bp-n__best { font-size: 12.5px; font-weight: 700; color: var(--paper-dim, #c9d0d8); }
.bp-ln.is-gain .bp-n__best { color: var(--guild, var(--paper, #eef1f5)); }
.bp-n__gain { font-size: 12px; color: var(--guild, var(--jade, #3fd9a4)); }
.bp-n__none { font-size: 12px; color: var(--ink-400, #5b6470); }
.bp-n__kill { display: inline-block; padding: 1px 6px 1px 5px; background: var(--jade, #3fd9a4); color: var(--ink-900, #0a0b0d);
  font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; clip-path: polygon(0 0, 100% 0, calc(100% - 4px) 100%, 0 100%); }
.bp-n__kill.is-first { background: var(--gold, #d8b263); }
.bp-n__seal { display: block; width: 18px; height: 18px; }
.bp-n__seal.is-first { background: var(--gold, #d8b263); }
/* The stretch past this guild's last pull, there only for a compared guild that went on: no nights of
 * its own, so a darker ink field behind a dashed edge, and under it where each of them ended. */
.bp-ext { fill: var(--ink-900, #0a0b0d); opacity: .55; }
.bp-extline { stroke: var(--ink-500, #3a414b); stroke-width: 1; stroke-dasharray: 3 3; }
.bp-ln--ext { background: color-mix(in srgb, var(--ink-900, #0a0b0d) 55%, transparent); }
.bp-ln--ext .bp-n__day b { color: var(--ink-300, #818b98); font-weight: 600; }
.bp-n__end { display: flex; gap: 6px; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bp-n__end b { color: var(--guild, var(--paper, #eef1f5)); font-weight: 700; }
.bp-n__end span { color: var(--paper-dim, #c9d0d8); }
/* Phones: a list, a row per night. */
.bp-led--list { grid-template-columns: minmax(0, 1fr); padding: 0; }
.bp-led--list .bp-ln { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 10px; padding: 7px 10px; border-top: 0; }
.bp-led--list .bp-ln + .bp-ln { box-shadow: inset 0 1px 0 var(--ink-750, #171a1f); }
.bp-led--list .bp-n__day { grid-column: 1; }
.bp-led--list .bp-n__best { grid-column: 2; grid-row: 1; text-align: right; }
.bp-led--list .bp-ln > span:not(.visually-hidden) { grid-column: 1 / -1; }
.bp-led--list .bp-ln--ext > p { grid-column: 1 / -1; }
.bp-led--list .bp-ln.is-gain .bp-n__day b { color: var(--guild, var(--paper, #eef1f5)); }

/* The readout over the chart: a flat ink panel, as the kill rank's popover. */
.bp-tip { position: absolute; left: var(--x, 0); top: var(--y, 0); z-index: 4; display: grid; gap: 2px; min-width: 150px; padding: 8px 10px;
  transform: translate(-50%, calc(-100% - 12px)); background: var(--ink-750, #171a1f); border: 1px solid var(--ink-500, #3a414b);
  font-size: 12px; color: var(--paper-dim, #c9d0d8); pointer-events: none; white-space: nowrap; }
.bp-tip[hidden] { display: none; }
.bp-tip b { color: var(--paper, #eef1f5); font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.bp-tip__v { color: var(--guild, var(--paper, #eef1f5)); font-weight: 700; font-size: 14px; }
.bp-tip__d { color: var(--ink-300, #818b98); }
.bp-tip__kill, .bp-tip__best { justify-self: start; padding: 1px 6px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.bp-tip__kill { background: var(--jade, #3fd9a4); color: var(--ink-900, #0a0b0d); }
.bp-tip__best { background: var(--ink-900, #0a0b0d); color: var(--guild, var(--jade, #3fd9a4)); letter-spacing: .02em; text-transform: none; font-weight: 700; }

/* Waiting, or only the new bests known: said as such, not a fake chart. */
.bp-wait { padding: 24px 14px; font-size: 13px; color: var(--ink-300, #818b98); background: var(--ink-850, #0e1014); border: 1px solid var(--ink-700, #1e2228); }
.bp-only { padding: 12px 14px; background: var(--ink-850, #0e1014); border: 1px solid var(--ink-700, #1e2228); font-size: 13px; color: var(--ink-200, #a8b1bc); }
.bp-only p { max-width: 70ch; }
.bp-only__list { list-style: none; display: grid; gap: 2px; margin-top: 10px; }
.bp-only__list li { display: flex; gap: 14px; font-size: 12.5px; }
.bp-only__list b { color: var(--guild, var(--paper, #eef1f5)); }

@media (max-width: 900px) {
  .gar--journal .bp { border-left: 0; border-top: 1px solid var(--ink-700, #1e2228); }
  .bp-tabrow { flex-direction: column; }
  .bp-back { height: 36px; }
  .bp-tabs { grid-auto-flow: row; grid-template-columns: repeat(5, minmax(0, 1fr)); }
  /* In rows the mark goes under the chosen head, not on the row above it. */
  .bp-tab { border-top: 0; border-bottom: 2px solid transparent; }
  .bp-tab[aria-selected="true"] { border-bottom-color: var(--guild, var(--jade, #3fd9a4)); }
  .bp-stage { grid-template-columns: minmax(0, 1fr); }
  .bp-stage__art { min-height: 150px; }
  .bp-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; }
}
@media (max-width: 600px) {
  .bp-stage__h { font-size: 18px; }
  .bp-stage__body { padding: 14px 12px; }
}
@media (prefers-reduced-motion: reduce) { .gb__open-mark, .bp-tab, .bp-ln { transition: none; } }
