/* bis-compare.css - page styles for /midnight-season-2-bis-compare/.

   CHROME-NEUTRAL BY CONSTRUCTION, the tier-stats.css contract: every selector
   is `.bc-*` prefixed, there are ZERO token declarations, and there is no
   :root / body / bare-element rule anywhere in this file. The page is FRAMED
   (it shares header.php + footer.php + the theme engine with the rest of the
   site), so it must inherit the standard site look with no scoping fix - a
   single bare-element rule here would leak into the shared chrome.

   Every colour is a var() off the site's own theme tokens with a conservative
   fallback, so all themes and the per-viewer font picker follow for free. */

.bc-wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 18px 16px 48px;
}

.bc-title {
  margin: 0 0 10px;
  font-size: 1.6rem;
  letter-spacing: .2px;
  color: var(--text-primary, #e8e8ea);
}

.bc-lead,
.bc-howto,
.bc-stale {
  color: var(--text-secondary, #b6b7bd);
  line-height: 1.62;
}

.bc-lead {
  margin: 0 0 16px;
  max-width: 78ch;
}

.bc-lead b { color: var(--text-primary, #e8e8ea); }

/* ── headline rollup ─────────────────────────────────────────────────────── */

.bc-headline {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 1px solid var(--border-color, #33343a);
  border-left: 3px solid var(--accent-color, #7d5fff);
  border-radius: 8px;
  background: var(--surface-2, rgba(255, 255, 255, .03));
}

.bc-headline-num {
  font-size: 2.1rem;
  font-weight: 700;
  line-height: 1;
  color: var(--accent-color, #7d5fff);
  font-variant-numeric: tabular-nums;
}

.bc-headline-txt {
  flex: 1 1 320px;
  color: var(--text-secondary, #b6b7bd);
  line-height: 1.55;
}

.bc-headline-txt b { color: var(--text-primary, #e8e8ea); }

/* ── stale-source notice ─────────────────────────────────────────────────── */

.bc-stale {
  margin: 0 0 16px;
  padding: 13px 16px;
  border: 1px solid var(--border-color, #33343a);
  border-left: 3px solid var(--warning-color, #d8a33a);
  border-radius: 8px;
  background: var(--surface-2, rgba(255, 255, 255, .03));
  max-width: 88ch;
}

.bc-stale-title {
  font-weight: 650;
  margin-bottom: 6px;
  color: var(--text-primary, #e8e8ea);
}

.bc-stale-body { margin: 0 0 8px; }
.bc-stale-body:last-child { margin-bottom: 0; }

/* ── how to read this ────────────────────────────────────────────────────── */

.bc-howto {
  margin: 0 0 16px;
  max-width: 88ch;
  font-size: 13px;
}

.bc-howto > summary {
  list-style: none;
  cursor: pointer;
  color: var(--text-muted, #8b8c93);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.bc-howto > summary::-webkit-details-marker { display: none; }

.bc-howto > summary::before {
  content: "";
  width: 0;
  height: 0;
  flex-shrink: 0;
  border-left: 5px solid currentColor;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  transition: transform .12s;
}

.bc-howto[open] > summary::before { transform: rotate(90deg); }
.bc-howto > summary:hover { color: var(--text-primary, #e8e8ea); }

.bc-howto-list { margin: 9px 0 0; padding-left: 20px; }
.bc-howto-list li { margin: 5px 0; }
.bc-howto-list b { color: var(--text-primary, #e8e8ea); }

/* ── provenance + crosslinks ─────────────────────────────────────────────── */

.bc-prov {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0 0 14px;
}

.bc-prov-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border: 1px solid var(--border-color, #33343a);
  border-radius: 999px;
  font-size: .8rem;
  color: var(--text-secondary, #b6b7bd);
  background: var(--surface-2, rgba(255, 255, 255, .03));
}

.bc-prov-chip b { color: var(--text-primary, #e8e8ea); font-weight: 600; }

.bc-prov-chip-stale { border-style: dashed; opacity: .82; }

.bc-prov-flag {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--warning-color, #d8a33a);
}

.bc-crosslinks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin: 0 0 18px;
  font-size: .88rem;
  color: var(--text-secondary, #b6b7bd);
}

.bc-crosslinks-label { color: var(--text-muted, #8b8c93); }
.bc-crosslinks a { color: var(--accent-color, #7d5fff); text-decoration: none; }
.bc-crosslinks a:hover { text-decoration: underline; }
.bc-crosslinks-sep { color: var(--text-muted, #8b8c93); }

/* ── spec picker ─────────────────────────────────────────────────────────── */

.bc-picker {
  padding: 14px 16px;
  border: 1px solid var(--border-color, #33343a);
  border-radius: 8px;
  margin: 0 0 18px;
}

.bc-picker-label {
  font-weight: 650;
  margin-bottom: 10px;
  color: var(--text-primary, #e8e8ea);
}

.bc-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px 18px;
}

.bc-picker-class-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: .87rem;
  margin-bottom: 4px;
  padding-bottom: 3px;
  border-bottom: 1px solid var(--border-color, #33343a);
}

.bc-spec-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 7px;
  margin: 2px 0;
  border-radius: 5px;
  text-decoration: none;
  color: var(--text-secondary, #b6b7bd);
  font-size: .88rem;
}

.bc-spec-chip:hover { background: var(--surface-3, rgba(255, 255, 255, .06)); }

.bc-spec-chip.is-active {
  background: var(--accent-soft, rgba(125, 95, 255, .16));
  color: var(--text-primary, #e8e8ea);
}

.bc-spec-chip-name { flex: 1 1 auto; }

.bc-spec-chip-pct {
  font-size: .78rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted, #8b8c93);
}

.bc-prompt {
  margin: 22px 0;
  padding: 20px;
  text-align: center;
  border: 1px dashed var(--border-color, #33343a);
  border-radius: 8px;
  color: var(--text-muted, #8b8c93);
}

/* ── spec section ────────────────────────────────────────────────────────── */

/* NO-SCRIPT FALLBACK. Sections ship with the native `hidden` attribute and
   bis-compare.js toggles it. With scripting off nothing would ever un-hide,
   so :target reveals whichever section the picker link points at - every chip
   is a real <a href="#id">, which makes the page usable without the script.
   display must beat `hidden`'s UA display:none, hence the explicit value. */
.bc-spec-section:target { display: block !important; }

.bc-spec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 10px;
}

.bc-spec-name {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 1.22rem;
}

.bc-spec-roll {
  font-size: .9rem;
  color: var(--text-secondary, #b6b7bd);
}

.bc-spec-roll b { color: var(--text-primary, #e8e8ea); }

.bc-spec-roll-pct {
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
  background: var(--accent-soft, rgba(125, 95, 255, .16));
  color: var(--accent-color, #7d5fff);
  font-weight: 600;
}

/* ── the table ───────────────────────────────────────────────────────────── */

/* Wide by nature (4 data columns of item names), so it scrolls inside its own
   box rather than pushing the page sideways - the .ts-scroll idiom. */
.bc-scroll {
  overflow-x: auto;
  border: 1px solid var(--border-color, #33343a);
  border-radius: 8px;
}

.bc-table { width: 100%; min-width: 860px; border-collapse: collapse; }

.bc-table th,
.bc-table td {
  padding: 7px 10px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border-color, #33343a);
}

.bc-table th {
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--text-muted, #8b8c93);
  white-space: nowrap;
}

.bc-col-slot { width: 118px; white-space: nowrap; color: var(--text-secondary, #b6b7bd); }
.bc-col-agree { width: 130px; }
.bc-col-src { min-width: 210px; }
.bc-col-src-stale { opacity: .6; }

.bc-pair-mark {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: .66rem;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--text-muted, #8b8c93);
  border: 1px solid var(--border-color, #33343a);
}

.bc-item { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.bc-item-name a { text-decoration: none; }
.bc-item-name a:hover { text-decoration: underline; }

.bc-ico,
.bc-item-ico {
  border-radius: 3px;
  vertical-align: middle;
  flex: none;
}

.bc-ilvl {
  font-size: .76rem;
  font-variant-numeric: tabular-nums;
  padding: 1px 6px;
  border-radius: 999px;
  color: var(--text-muted, #8b8c93);
  background: var(--surface-3, rgba(255, 255, 255, .06));
}

.bc-ilvl-none { background: none; padding-left: 2px; }

.bc-item-src {
  display: block;
  margin-top: 2px;
  font-size: .76rem;
  color: var(--text-muted, #8b8c93);
}

.bc-nodata {
  font-size: .84rem;
  font-style: italic;
  color: var(--text-muted, #8b8c93);
}

.bc-cell-agree { background: var(--accent-soft, rgba(125, 95, 255, .09)); }

/* ── agreement chips ─────────────────────────────────────────────────────── */

.bc-chip {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid transparent;
}

.bc-chip-all {
  background: var(--accent-soft, rgba(125, 95, 255, .18));
  color: var(--accent-color, #7d5fff);
  border-color: var(--accent-color, #7d5fff);
}

.bc-chip-partial {
  background: var(--surface-3, rgba(255, 255, 255, .06));
  color: var(--text-secondary, #b6b7bd);
  border-color: var(--border-color, #33343a);
}

.bc-chip-split,
.bc-chip-none {
  background: none;
  color: var(--text-muted, #8b8c93);
  border-color: var(--border-color, #33343a);
  font-weight: 500;
}

.bc-row-all td { background: var(--accent-soft, rgba(125, 95, 255, .045)); }

/* ── caveats + sources ───────────────────────────────────────────────────── */

.bc-assume {
  margin: 22px 0 0;
  padding: 13px 16px;
  border: 1px solid var(--border-color, #33343a);
  border-radius: 8px;
  background: var(--surface-2, rgba(255, 255, 255, .03));
  max-width: 88ch;
}

.bc-assume-title {
  font-weight: 650;
  margin-bottom: 8px;
  color: var(--text-primary, #e8e8ea);
}

.bc-assume-list {
  margin: 0;
  padding-left: 20px;
  color: var(--text-secondary, #b6b7bd);
  line-height: 1.6;
}

.bc-assume-list li { margin: 5px 0; }

.bc-sources {
  margin: 14px 0 0;
  font-size: .84rem;
  line-height: 1.65;
  color: var(--text-muted, #8b8c93);
  max-width: 88ch;
}

.bc-sources b { color: var(--text-secondary, #b6b7bd); }

/* ── narrow viewports ────────────────────────────────────────────────────── */

@media (max-width: 720px) {
  .bc-wrap { padding: 14px 11px 36px; }
  .bc-title { font-size: 1.36rem; }
  .bc-headline-num { font-size: 1.7rem; }
  .bc-picker-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .bc-spec-head { flex-direction: column; align-items: flex-start; gap: 4px; }
}
