/* CLAUDE DECODER — page styles. Builds on the shared dz-* system from
 * mastery-pro-decoder.css; everything Claude-specific is cd-* prefixed.
 * Claude brand accent: warm coral/copper on the dark LineAlgo shell. */

:root {
  --cd-accent: #e8825a;
  --cd-accent-soft: rgba(232, 130, 90, 0.16);
  --cd-accent-line: rgba(232, 130, 90, 0.45);
  --cd-ok: #3ecf8e;
  --cd-err: #ff6b6b;
}

.cd-brand-chip {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.15rem 0.6rem; border-radius: 999px;
  background: var(--cd-accent-soft); border: 1px solid var(--cd-accent-line);
  color: var(--cd-accent); font-weight: 700; letter-spacing: 0.06em;
  font-size: 0.78rem; text-transform: uppercase;
}

/* progress panel tones */
#cd-report-progress[data-tone="busy"] { border-left: 3px solid var(--cd-accent); }
#cd-report-progress[data-tone="ok"] { border-left: 3px solid var(--cd-ok); }
#cd-report-progress[data-tone="ok"] .cd-spinner { display: none; }
#cd-report-progress[data-tone="error"] { border-left: 3px solid var(--cd-err); }
#cd-report-progress[data-tone="error"] .cd-spinner { display: none; }
#cd-report-progress[data-tone="error"] #cd-report-progress-text { color: var(--cd-err); }

.cd-spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--cd-accent-line); border-top-color: var(--cd-accent);
  animation: cd-spin 0.9s linear infinite; flex: 0 0 auto;
}
@keyframes cd-spin { to { transform: rotate(360deg); } }

.cd-progress-head { display: flex; gap: 0.75rem; align-items: flex-start; }
#cd-report-progress-elapsed { opacity: 0.7; font-variant-numeric: tabular-nums; margin-left: 0.5rem; }

/* status line */
#cd-status[data-tone="error"] { color: var(--cd-err); font-weight: 600; }
#cd-status[data-tone="ok"] { color: var(--cd-ok); }
#cd-status[data-tone="busy"] { color: var(--cd-accent); }
#cd-save-status[data-tone="busy"] { color: var(--cd-accent); font-weight: 700; }
#cd-save-status[data-tone="ok"] { color: var(--cd-ok); font-weight: 700; }
#cd-save-status[data-tone="error"] { color: var(--cd-err); font-weight: 700; }

/* tiles */
.cd-tile-row, .cd-user-card-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.5rem; margin: 0.6rem 0;
}
.cd-tile {
  position: relative;
  background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px; padding: 0.55rem 2.3rem 0.55rem 0.7rem; display: flex; flex-direction: column; gap: 0.15rem;
}
.cd-tile > .cd-info-btn { position: absolute; top: 0.42rem; right: 0.42rem; margin: 0; z-index: 2; }
.cd-tile-v { font-size: 1.05rem; font-weight: 700; color: #fff; overflow-wrap: anywhere; }
.cd-tile-l { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; opacity: 0.65; }

/* tables */
.cd-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; margin: 0.5rem 0; }
.cd-table th {
  text-align: left; padding: 0.4rem 0.5rem; font-size: 0.72rem; text-transform: uppercase;
  letter-spacing: 0.05em; opacity: 0.7; border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  position: sticky; top: 0; background: rgba(7, 17, 31, 0.92);
}
.cd-table td { padding: 0.35rem 0.5rem; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.cd-pos { color: var(--cd-ok); font-weight: 600; }
.cd-neg { color: var(--cd-err); font-weight: 600; }
.cd-miss { color: #fbbf24; font-weight: 600; }
/* HMF algorithm-match chips on lineup cards (HIT / MISS / FAIL) */
.cd-hmf-row { display: inline-flex; flex-wrap: wrap; gap: 0.25rem; margin-left: 0.35rem; vertical-align: middle; }
.cd-hmf-chip {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.12rem 0.38rem;
  border-radius: 999px;
  border: 1px solid transparent;
  line-height: 1.2;
  white-space: nowrap;
}
.cd-hmf-hit {
  color: #052e16;
  background: linear-gradient(180deg, #86efac, #4ade80);
  border-color: rgba(34, 197, 94, 0.7);
}
.cd-hmf-fail {
  color: #450a0a;
  background: linear-gradient(180deg, #fca5a5, #f87171);
  border-color: rgba(239, 68, 68, 0.7);
}
.cd-hmf-miss {
  color: #422006;
  background: linear-gradient(180deg, #fde68a, #fbbf24);
  border-color: rgba(245, 158, 11, 0.75);
}
.cd-hmf-stack {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
  margin-left: 0.25rem;
}
.cd-hmf-banner {
  margin: 0.35rem 0 0.45rem;
  padding: 0.45rem 0.55rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.22);
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}
.cd-hmf-banner-empty { opacity: 0.75; }
.cd-hmf-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
  margin-bottom: 0.1rem;
}
.cd-hmf-lane {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.28rem;
  font-size: 0.72rem;
}
.cd-hmf-lane-title {
  font-weight: 800;
  letter-spacing: 0.06em;
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.55);
  min-width: 3.6rem;
}
.cd-hmf-unit {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.1rem 0.35rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.cd-hmf-unit-lab {
  font-weight: 700;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.7rem;
}
.cd-grade-num {
  display: inline-block;
  margin-left: 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.55);
  vertical-align: middle;
}
.cd-tier-anchor td:first-child { border-left: 3px solid var(--cd-accent); }
.cd-tier-core td:first-child { border-left: 3px solid rgba(232, 130, 90, 0.5); }
.cd-tier-spice td:first-child { border-left: 3px solid rgba(255, 255, 255, 0.15); }

/* scrollable table hosts keep the page light on mobile */
#cd-exposure, #cd-signals, #cd-census { max-height: 560px; overflow: auto; }

/* field panel */
#cd-user-search { width: 100%; max-width: 340px; }
.cd-user-card-grid .cd-tile { background: var(--cd-accent-soft); border-color: var(--cd-accent-line); }

/* census lane banner — hindsight lane must be unmissable */
.cd-census-lane-banner {
  background: rgba(255, 107, 107, 0.12); border: 1px solid rgba(255, 107, 107, 0.4);
  color: #ffb3b3; border-radius: 10px; padding: 0.6rem 0.8rem;
  font-weight: 600; font-size: 0.85rem; margin-bottom: 0.6rem;
}

/* restored badge — the anti-stale-progress marker */
.cd-restored-badge {
  display: inline-block; margin-bottom: 0.5rem; padding: 0.25rem 0.7rem;
  border-radius: 999px; background: rgba(62, 207, 142, 0.14);
  border: 1px solid rgba(62, 207, 142, 0.5); color: var(--cd-ok);
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.05em;
}

/* doctrine + honesty */
.cd-doctrine-line { margin: 0.3rem 0; font-size: 0.95rem; }
.cd-honesty-line { margin: 0.3rem 0; font-size: 0.85rem; opacity: 0.9; }

/* structure grid */
.cd-struct-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 760px) { .cd-struct-grid { grid-template-columns: 1fr; } }

/* library cards */
#cd-library { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0.7rem; }
.cd-lib-card {
  border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px; padding: 0.7rem 0.85rem;
  background: rgba(255, 255, 255, 0.03); display: flex; flex-direction: column; gap: 0.45rem;
}
.cd-lib-superseded { opacity: 0.6; }
.cd-lib-head { display: flex; align-items: center; gap: 0.5rem; justify-content: space-between; }
.cd-lib-tag {
  font-size: 0.68rem; padding: 0.1rem 0.5rem; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2); opacity: 0.8; text-transform: uppercase;
}
.cd-lib-tag-live { border-color: var(--cd-ok); color: var(--cd-ok); opacity: 1; }
.cd-lib-meta { font-size: 0.78rem; opacity: 0.7; }
.cd-lib-times {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  margin: 0.35rem 0 0.25rem;
  font-size: 0.8rem;
  line-height: 1.35;
  color: #d7e4f7;
}
.cd-lib-time em {
  font-style: normal;
  font-weight: 700;
  color: #ffd27a;
  margin-right: 0.25rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 0.68rem;
}
.cd-lib-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* dropzone drag state */
.cd-drag { outline: 2px dashed var(--cd-accent); outline-offset: -6px; }

/* keep long tables from trapping mobile scroll */
@media (max-width: 640px) {
  .cd-table { font-size: 0.78rem; }
  .cd-tile-row, .cd-user-card-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
}

/* =============================================================================
 * v2 — two-column shell, left nav, deep forensics, DPC lab, lineup cards, swaps
 * ============================================================================= */

/* two-column shell */
.cd-shell { display: flex; align-items: flex-start; gap: 1rem; }
.cd-main { flex: 1 1 auto; min-width: 0; }
.cd-nav {
  flex: 0 0 232px; position: sticky; top: 0.75rem;
  max-height: calc(100vh - 1.5rem); overflow: auto;
  background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px; padding: 0.7rem 0.55rem; font-size: 0.8rem;
  scrollbar-width: thin;
}
.cd-nav-title {
  font-weight: 800; letter-spacing: 0.08em; color: var(--cd-accent);
  font-size: 0.75rem; padding: 0.2rem 0.45rem 0.5rem;
}
.cd-nav-group {
  margin: 0.7rem 0 0.25rem; padding: 0 0.45rem; font-size: 0.66rem;
  text-transform: uppercase; letter-spacing: 0.1em; opacity: 0.55; font-weight: 700;
}
.cd-nav-item {
  display: flex; align-items: flex-start; gap: 0.42rem; padding: 0.3rem 0.45rem; border-radius: 8px;
  color: inherit; text-decoration: none; opacity: 0.85; line-height: 1.25;
  border-left: 2px solid transparent;
}
.cd-stage-light {
  flex: 0 0 8px; width: 8px; height: 8px; margin-top: 0.23rem; border-radius: 50%;
  background: #596273; box-shadow: none;
}
.cd-stage-light[data-status="muted"] { background: #596273; box-shadow: none; }
.cd-stage-light[data-status="working"] {
  background: #fff; box-shadow: 0 0 8px rgba(255,255,255,.95);
  animation: cd-stage-pulse 1.25s ease-in-out infinite;
}
.cd-stage-light[data-status="complete"] { background: #31e981; box-shadow: 0 0 7px rgba(49,233,129,.75); }
.cd-stage-light[data-status="error"] {
  background: #ff4058; box-shadow: 0 0 8px rgba(255,64,88,.9);
  animation: cd-stage-pulse .8s ease-in-out infinite;
}
.cd-stage-error-detail {
  display: block; flex: 1 1 100%; margin: 0.24rem 0 0 0.1rem; color: #ff9bab;
  font-size: 0.67rem; line-height: 1.3;
}
.cd-nav-item[data-stage-status="error"] { flex-wrap: wrap; border-left-color: #ff4058; background: rgba(255,64,88,.08); }
@keyframes cd-stage-pulse { 50% { opacity: .28; transform: scale(.78); } }
@media (prefers-reduced-motion: reduce) {
  .cd-stage-light[data-status="working"], .cd-stage-light[data-status="error"] { animation: none; }
}
.cd-nav-item:hover { background: rgba(255, 255, 255, 0.06); opacity: 1; }
.cd-nav-active {
  background: var(--cd-accent-soft); border-left-color: var(--cd-accent);
  color: var(--cd-accent); opacity: 1; font-weight: 600;
}
@media (max-width: 900px) {
  .cd-shell { display: block; }
  .cd-nav { position: static; max-height: 220px; margin-bottom: 0.8rem; flex: none; }
}

/* chips */
.cd-chip {
  display: inline-block; padding: 0.08rem 0.45rem; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18); background: rgba(255, 255, 255, 0.05);
  font-size: 0.68rem; margin: 0.08rem 0; white-space: nowrap;
}
.cd-chip-ok { border-color: rgba(62, 207, 142, 0.5); color: var(--cd-ok); }
.cd-chip-bad { border-color: rgba(255, 107, 107, 0.55); color: var(--cd-err); }
.cd-chip-dpc { border-color: var(--cd-accent-line); color: var(--cd-accent); font-weight: 700; }
.cd-chip-rnk { border-color: rgba(240, 200, 80, 0.55); color: #f0d46a; background: rgba(100, 80, 20, 0.22); font-weight: 700; }
/* SYSTEM line movements — moneyline · run line · totals · steam (same tier as RNK/DPC) */
.cd-chip-lm {
  border-color: rgba(56, 189, 248, 0.65) !important;
  color: #7dd3fc !important;
  background: rgba(14, 165, 233, 0.14) !important;
  font-weight: 700;
}
.cd-chip-fam { opacity: 0.85; font-style: italic; }
.cd-hmf-ids { display: flex; flex-wrap: wrap; gap: 4px; max-width: 42rem; }
/* WHY: 98–100% pctl — bright glowing #!!! (elite top-of-slate scream) */
.cd-pctl-elite {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  font-weight: 900;
  color: #fff8e7;
  letter-spacing: 0.01em;
}
/* Lineup builds: player name gold when they have ≥1 gold #!!! column (no WHY open needed) */
.cd-lu-name-elite {
  color: #ffd54a !important;
  font-weight: 900;
  letter-spacing: 0.01em;
  text-shadow:
    0 0 4px rgba(255, 239, 138, 0.95),
    0 0 10px rgba(255, 196, 0, 0.85),
    0 0 18px rgba(255, 138, 0, 0.55);
  animation: cd-lu-name-gold-pulse 1.35s ease-in-out infinite;
}
.cd-lu-name-elite .cd-lu-name-hash {
  margin-left: 0.28em;
  font-size: 0.78em;
  vertical-align: 0.08em;
}
.cd-lu-row-elite td:first-child {
  box-shadow: inset 3px 0 0 0 rgba(255, 200, 40, 0.95);
}
@keyframes cd-lu-name-gold-pulse {
  0%, 100% {
    color: #ffd54a;
    filter: brightness(1);
  }
  50% {
    color: #ffe98a;
    filter: brightness(1.12);
  }
}
.cd-pctl-elite-hash {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.6em;
  padding: 0.05em 0.18em;
  border-radius: 0.28em;
  font-weight: 950;
  font-size: 1.12em;
  line-height: 1;
  letter-spacing: 0.02em;
  color: #fffef0;
  background: linear-gradient(180deg, rgba(255, 220, 80, 0.45), rgba(255, 140, 20, 0.22));
  box-shadow:
    0 0 0 1px rgba(255, 230, 120, 0.55),
    0 0 12px rgba(255, 180, 0, 0.65),
    0 0 22px rgba(255, 120, 0, 0.45);
  text-shadow:
    0 0 4px #ffef8a,
    0 0 10px #ffc400,
    0 0 18px #ff8a00,
    0 0 28px rgba(255, 140, 0, 0.9);
  animation: cd-pctl-hash-pulse 1.2s ease-in-out infinite;
}
.cd-chip-dpc-elite {
  border-color: rgba(255, 210, 60, 0.95) !important;
  color: #fff8d0 !important;
  background: linear-gradient(180deg, rgba(255, 190, 50, 0.38), rgba(255, 120, 20, 0.18)) !important;
  box-shadow:
    0 0 0 1px rgba(255, 220, 90, 0.5),
    0 0 18px rgba(255, 170, 0, 0.55),
    inset 0 0 14px rgba(255, 230, 120, 0.16);
}
.cd-chip-dpc-elite .cd-pctl-elite-hash {
  margin-right: 0.18rem;
}
.cd-why-table td .cd-pctl-elite {
  font-variant-numeric: tabular-nums;
}
@keyframes cd-pctl-hash-pulse {
  0%, 100% {
    filter: brightness(1);
    transform: scale(1);
    text-shadow:
      0 0 4px #ffef8a,
      0 0 10px #ffc400,
      0 0 18px #ff8a00,
      0 0 28px rgba(255, 140, 0, 0.85);
    box-shadow:
      0 0 0 1px rgba(255, 230, 120, 0.55),
      0 0 12px rgba(255, 180, 0, 0.65),
      0 0 22px rgba(255, 120, 0, 0.45);
  }
  50% {
    filter: brightness(1.35);
    transform: scale(1.06);
    text-shadow:
      0 0 6px #fff6b0,
      0 0 14px #ffd000,
      0 0 26px #ff9500,
      0 0 42px rgba(255, 170, 0, 1);
    box-shadow:
      0 0 0 1px rgba(255, 245, 160, 0.85),
      0 0 18px rgba(255, 200, 40, 0.9),
      0 0 32px rgba(255, 140, 0, 0.7);
  }
}

/* deep sections */
.cdd-body h4 { margin: 0.8rem 0 0.25rem; color: var(--cd-accent); font-size: 0.88rem; }
.cdd-pos { margin: 0.5rem 0; border: 1px solid rgba(255, 255, 255, 0.09); border-radius: 10px; padding: 0.45rem 0.7rem; background: rgba(255, 255, 255, 0.02); }
.cdd-pos summary { cursor: pointer; padding: 0.2rem 0; }
.cdd-pos[open] summary { border-bottom: 1px solid rgba(255, 255, 255, 0.08); margin-bottom: 0.45rem; }
#cdd-registry-host, #cdd-dpc-wrap { max-height: 640px; overflow: auto; }

/* DPC# lab cards */
.cd-dpc-wrap { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 0.6rem; margin: 0.6rem 0; }
.cd-dpc-card {
  border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px; padding: 0.6rem 0.7rem;
  background: linear-gradient(180deg, rgba(232, 130, 90, 0.06), rgba(255, 255, 255, 0.02));
  display: flex; flex-direction: column; gap: 0.4rem;
}
.cd-dpc-head { display: flex; justify-content: space-between; align-items: center; gap: 0.4rem; }
.cd-dpc-serial { font-weight: 800; letter-spacing: 0.04em; color: var(--cd-accent); font-size: 0.82rem; }
.cd-dpc-lift { font-size: 0.78rem; font-weight: 700; }
.cd-dpc-cols { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.cd-dpc-meta, .cd-dpc-carriers { font-size: 0.7rem; opacity: 0.7; }
.cd-dpc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.35rem; }
.cd-dpc-cell {
  border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 8px; padding: 0.3rem;
  display: flex; flex-direction: column; align-items: center; gap: 0.1rem;
}
.cd-dpc-cell span { font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.04em; opacity: 0.6; }
.cd-dpc-cell strong { font-size: 0.92rem; }
.cd-dpc-cell em { font-size: 0.62rem; opacity: 0.55; font-style: normal; }

/* red flags */
.cd-flag {
  border: 1px solid rgba(255, 107, 107, 0.3); border-left: 4px solid var(--cd-err);
  border-radius: 10px; padding: 0.55rem 0.75rem; margin: 0.5rem 0;
  background: rgba(255, 107, 107, 0.05);
}
.cd-flag-head { font-size: 0.92rem; }
.cd-flag-reps { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.35rem; }

/* NEXT-LEVEL lineup cards
 * LAW: never clip WHY / swap expansions. overflow:hidden on the card was
 * chopping Column/Pctl/Loads/Contribution off the right edge of the card. */
.cd-lu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr));
  gap: 0.8rem;
  margin-top: 0.8rem;
  align-items: start;
}
.cd-lu-card {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  overflow: visible; /* was hidden — clipped WHY evidence tables */
  min-width: 0;
  max-width: 100%;
  background: linear-gradient(180deg, rgba(232, 130, 90, 0.09), rgba(255, 255, 255, 0.02));
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.35);
}
.cd-lu-head,
.cd-lu-salbar,
.cd-lu-comp {
  border-radius: 0;
}
.cd-lu-head { border-radius: 14px 14px 0 0; }
.cd-lu-comp { border-radius: 0 0 14px 14px; }
.cd-lu-head {
  display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
  padding: 0.55rem 0.75rem; background: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.cd-lu-num { font-weight: 800; color: var(--cd-accent); letter-spacing: 0.05em; }
.cd-lu-sort-rank {
  font-weight: 900;
  font-size: 1.15em;
  color: #fff;
  letter-spacing: 0.04em;
  background: linear-gradient(180deg, #3b82f6, #1d4ed8);
  border-radius: 6px;
  padding: 0.08rem 0.4rem;
  margin-right: 0.2rem;
}
.cd-lu-build-idx {
  display: inline-block;
  margin-left: 0.2rem;
  font-size: 0.65em;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.4);
  vertical-align: middle;
}
.cd-lu-proj { font-weight: 700; font-size: 0.85rem; }
.cd-lu-sal { margin-left: auto; font-variant-numeric: tabular-nums; font-size: 0.85rem; }
.cd-lu-sal em { font-style: normal; opacity: 0.6; font-size: 0.75rem; }
.cd-lu-salbar { height: 4px; background: rgba(255, 255, 255, 0.08); }
.cd-lu-salbar span { display: block; height: 100%; background: linear-gradient(90deg, var(--cd-accent), #ffb38a); }
.cd-lu-table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  table-layout: fixed; /* lets WHY cell use full card width for scroll */
}
.cd-lu-table td {
  padding: 0.35rem 0.55rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: top;
}
.cd-lu-table td:nth-child(1) { width: 2.4rem; }
.cd-lu-table td:nth-child(2) { width: auto; overflow-wrap: anywhere; word-break: break-word; }
.cd-lu-table td:nth-child(3) { width: 3.6rem; }
.cd-lu-table td:nth-child(4) { width: 5.2rem; }
.cd-lu-slot { font-weight: 800; opacity: 0.65; width: 2.2rem; font-size: 0.72rem; }
/* Matchup: always VIS @ HOME · player club bright white · opponent grey */
.cd-lu-matchup { margin-left: 0.35rem; white-space: nowrap; font-size: 0.78rem; vertical-align: baseline; }
.cd-lu-team {
  font-weight: 900;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  opacity: 1;
}
/* Player's own team — always bright white (whether VIS or HOME side) */
.cd-lu-team-own,
.cd-lu-team.cd-lu-team-own {
  color: #ffffff !important;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.35);
}
/* Opponent — always grey */
.cd-lu-team-opp,
.cd-lu-team.cd-lu-team-opp,
.cd-lu-opp {
  color: #94a3b8 !important;
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  text-shadow: none;
}
/* "@" = at home park (visitor @ home) */
.cd-lu-at {
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: #64748b;
  margin: 0 0.12rem;
}
/* legacy VS (if any remain) */
.cd-lu-vs {
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: #64748b;
  margin: 0 0.15rem;
}
.cd-lu-sp-vs-alert {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.12rem 0.45rem;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: #fff;
  background: linear-gradient(180deg, #ef4444, #b91c1c);
  border: 1px solid #fca5a5;
  animation: cd-sp-vs-pulse 1.2s ease-in-out infinite;
}
.cd-lu-sp-vs-banner {
  margin: 0;
  padding: 0.45rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fecaca;
  background: rgba(185, 28, 28, 0.35);
  border-bottom: 1px solid rgba(248, 113, 113, 0.5);
}
.cd-lu-card-sp-vs {
  border-color: rgba(239, 68, 68, 0.65) !important;
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.35), 0 8px 28px rgba(127, 29, 29, 0.25);
}
.cd-lu-row-sp-vs { background: rgba(239, 68, 68, 0.12) !important; }
.cd-chip-bad {
  border-color: rgba(248, 113, 113, 0.55) !important;
  color: #fecaca !important;
  background: rgba(127, 29, 29, 0.35) !important;
}
@keyframes cd-sp-vs-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.55); }
  50% { box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15); }
}
.cd-lu-psal { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* HARD GATES live monitor (collapsible) */
.cdb-gate-monitor { margin: 0.65rem 0 0.35rem; }
.cdb-gates {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
  padding: 0.55rem 0.75rem 0.65rem;
}
.cdb-gates > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.92rem;
  user-select: none;
}
.cdb-gates > summary::-webkit-details-marker { display: none; }
.cdb-gate-summary-light,
.cdb-gate-light {
  display: inline-block;
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 50%;
  flex: 0 0 auto;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.25);
}
.cdb-gate-ok { background: #22c55e; box-shadow: 0 0 10px rgba(34, 197, 94, 0.55); }
.cdb-gate-bad { background: #ef4444; box-shadow: 0 0 10px rgba(239, 68, 68, 0.6); }
.cdb-gate-pending { background: #64748b; }
.cdb-gate-checked { font-size: 0.72rem; opacity: 0.55; font-weight: 500; margin-left: auto; }
.cdb-gate-list { margin-top: 0.55rem; display: flex; flex-direction: column; gap: 0.35rem; }
.cdb-gate-row {
  display: grid;
  grid-template-columns: 0.85rem 1fr auto;
  gap: 0.55rem;
  align-items: start;
  padding: 0.4rem 0.5rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
}
.cdb-gate-row.is-fail {
  background: rgba(127, 29, 29, 0.22);
  border-color: rgba(248, 113, 113, 0.35);
}
.cdb-gate-label { font-size: 0.82rem; line-height: 1.35; }
.cdb-gate-law { display: block; font-size: 0.7rem; opacity: 0.55; margin-top: 0.1rem; }
.cdb-gate-samples { margin-top: 0.25rem; font-size: 0.72rem; color: #fecaca; font-weight: 600; }
.cdb-gate-status {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  opacity: 0.85;
  white-space: nowrap;
}

/* Gold #!!! admin */
.cdb-gold-elite-admin { margin: 0.65rem 0 0.35rem; }
.cdb-gold-admin {
  border: 1px solid rgba(250, 204, 21, 0.28);
  border-radius: 12px;
  background: rgba(66, 32, 6, 0.28);
  padding: 0.55rem 0.75rem 0.7rem;
}
.cdb-gold-admin > summary {
  cursor: pointer;
  list-style: none;
  font-size: 0.92rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}
.cdb-gold-admin > summary::-webkit-details-marker { display: none; }
.cdb-gold-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin: 0.55rem 0;
}
.cdb-gold-toolbar label { font-size: 0.82rem; display: inline-flex; align-items: center; gap: 0.35rem; }
.cdb-gold-toolbar input[type="number"],
.cdb-gold-table input[type="number"] {
  width: 4.2rem;
  padding: 0.25rem 0.35rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
}
.cdb-gold-table-wrap {
  max-height: 22rem;
  overflow: auto;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.cdb-gold-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}
.cdb-gold-table th,
.cdb-gold-table td {
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-align: left;
  vertical-align: middle;
}
.cdb-gold-table th {
  position: sticky;
  top: 0;
  background: rgba(20, 12, 4, 0.95);
  z-index: 1;
}
.cdb-gold-table code { font-size: 0.74rem; color: #fde68a; }
.cdb-gold-eff { font-weight: 700; color: #fbbf24; white-space: nowrap; }
.cd-provenance-strip {
  margin: 0.35rem 0 0.75rem;
  font-size: 0.75rem;
  opacity: 0.75;
  letter-spacing: 0.01em;
}
.cd-provenance-strip code {
  color: #93c5fd;
  font-size: 0.72rem;
}
.cd-lu-swapped { background: rgba(62, 207, 142, 0.07); }
.cd-lu-comp { padding: 0.45rem 0.7rem; display: flex; flex-wrap: wrap; gap: 0.25rem; background: rgba(0, 0, 0, 0.18); }
.cd-swap-btn { font-size: 0.7rem; padding: 0.18rem 0.5rem; white-space: nowrap; }
.cd-swap-row td {
  background: rgba(232, 130, 90, 0.05);
  max-width: 0; /* inherit table fixed width so content scrolls inside */
  overflow-x: auto;
  white-space: normal;
}
.cd-swap-apply { font-size: 0.72rem; margin: 0.15rem 0.15rem 0.15rem 0; white-space: normal; max-width: 100%; }

/* library kind tags */
.cd-lib-tag-build { border-color: var(--cd-accent-line); color: var(--cd-accent); opacity: 1; }
.cd-lib-tag-src { border-color: rgba(255, 255, 255, 0.35); opacity: 0.9; }

/* skill doctrine blocks */
.cd-skill-block { margin: 0.6rem 0 0.9rem; }
.cd-skill-block h4 { margin: 0 0 0.3rem; color: var(--cd-accent); }
.cd-skill-line { margin: 0.25rem 0; font-size: 0.88rem; padding-left: 0.9rem; position: relative; }
.cd-skill-line::before { content: "•"; position: absolute; left: 0; }
.cd-skill-good::before { color: var(--cd-ok); }
.cd-skill-warn::before { color: var(--cd-err); }
.cd-skill-info::before { color: var(--cd-accent); }

/* =============================================================================
 * PLAYER CHIP — /mastery-style player identity used everywhere a player name
 * is displayed: initials avatar (hashed color, stable per name) + clean name
 * + team pill. Replaces bare "name · TEAM" text.
 * ============================================================================= */
.cd-chip-player {
  display: inline-flex; align-items: center; gap: 0.45rem;
  max-width: 100%;
}
.cd-chip-player-avatar {
  flex: 0 0 auto; width: 1.7rem; height: 1.7rem; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.62rem; font-weight: 800; letter-spacing: 0.02em;
  color: #0a0c12;
  background: linear-gradient(135deg,
    hsl(var(--cd-avatar-hue, 20), 78%, 62%),
    hsl(calc(var(--cd-avatar-hue, 20) + 38), 72%, 46%));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14) inset, 0 1px 3px rgba(0, 0, 0, 0.35);
}
.cd-chip-player-name {
  font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cd-team-pill {
  flex: 0 0 auto; padding: 0.05rem 0.42rem; border-radius: 999px;
  font-size: 0.66rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase;
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.75);
}
.cd-chip-player-warn .cd-chip-player-avatar {
  box-shadow: 0 0 0 2px var(--cd-err) inset, 0 1px 3px rgba(0, 0, 0, 0.35);
}
.cd-table td:has(> .cd-chip-player) { min-width: 10rem; }

/* =============================================================================
 * "i" INFO SYSTEM — white info badge + popover. Full theory/logic/laws for
 * every section, a narrated LESSON script, local video/audio lesson uploads,
 * and a personal notes field. Modeled on /decoder + /mastery "i" boxes, built
 * nicer: glowing white badge, cool header, color-coded sections.
 * ============================================================================= */
:root {
  --cd-info: #f4f6fa;
  --cd-info-soft: rgba(255, 255, 255, 0.14);
  --cd-info-line: rgba(255, 255, 255, 0.42);
}

.cd-info-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.35rem; height: 1.35rem; margin-left: 0.35rem;
  border-radius: 50%; border: 1px solid var(--cd-info-line);
  background: radial-gradient(circle at 30% 25%, #ffffff, var(--cd-info) 72%);
  color: #0a0b0e; font-style: italic; font-weight: 900; font-family: Georgia, "Times New Roman", serif;
  font-size: 0.78rem; line-height: 1; cursor: pointer; vertical-align: middle;
  box-shadow: 0 0 0 3px var(--cd-info-soft), 0 1px 4px rgba(0, 0, 0, 0.4);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.cd-info-btn:hover, .cd-info-btn:focus-visible {
  transform: scale(1.14);
  box-shadow: 0 0 0 5px var(--cd-info-soft), 0 0 14px rgba(255, 255, 255, 0.45);
  outline: none;
}

.cd-help-backdrop {
  position: fixed; inset: 0; z-index: 9998;
  background: rgba(6, 8, 14, 0.72); backdrop-filter: blur(3px);
}
.cd-help-pop {
  position: fixed; z-index: 9999; top: 4vh; left: 50%; transform: translateX(-50%);
  width: min(720px, 92vw); max-height: 92vh; overflow-y: auto;
  background: linear-gradient(180deg, #141820 0%, #0a0c10 65%);
  border: 1px solid var(--cd-info-line); border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}
body.cd-help-open { overflow: hidden; }

.cd-help-head {
  display: flex; align-items: flex-start; gap: 0.8rem;
  padding: 1.1rem 1.2rem 0.9rem;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.03));
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px 16px 0 0;
  position: sticky; top: 0; z-index: 1;
}
.cd-help-head-badge {
  flex: 0 0 auto; width: 2.3rem; height: 2.3rem; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-style: italic; font-weight: 900; font-family: Georgia, "Times New Roman", serif; font-size: 1.15rem;
  color: #0a0b0e;
  background: radial-gradient(circle at 30% 25%, #ffffff, var(--cd-info) 72%);
  box-shadow: 0 0 0 4px var(--cd-info-soft), 0 0 20px rgba(255, 255, 255, 0.35);
}
.cd-help-head-text { flex: 1 1 auto; min-width: 0; }
.cd-help-title { margin: 0 0 0.15rem; font-size: 1.08rem; color: #f5f7fa; }
.cd-help-tagline { margin: 0; font-size: 0.86rem; opacity: 0.78; }
.cd-help-close {
  flex: 0 0 auto; width: 1.9rem; height: 1.9rem; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28); background: rgba(255, 255, 255, 0.08);
  color: #fff; font-size: 1.1rem; line-height: 1; cursor: pointer;
}
.cd-help-close:hover { background: rgba(255, 255, 255, 0.16); }

.cd-help-body { padding: 0.4rem 1.2rem 1.3rem; }
.cd-help-section { margin: 0.95rem 0; }
.cd-help-section h4 {
  margin: 0 0 0.3rem; font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: #e8ecf2; opacity: 0.92;
}
.cd-help-section p { margin: 0; font-size: 0.9rem; line-height: 1.55; opacity: 0.92; }
.cd-help-theory h4 { color: var(--cd-accent); }
.cd-help-laws {
  padding: 0.65rem 0.8rem; border-radius: 10px;
  background: rgba(255, 107, 107, 0.07); border: 1px solid rgba(255, 107, 107, 0.28);
}
.cd-help-laws h4 { color: var(--cd-err); }

.cd-help-lesson {
  padding: 0.85rem 0.9rem 0.7rem; border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.03));
  border: 1px solid var(--cd-info-line);
}
.cd-help-lesson h4 { color: #f0f3f7; font-size: 0.82rem; text-transform: none; letter-spacing: 0.02em; }
.cd-help-lesson p { font-size: 0.92rem; }
.cd-help-lesson [data-copy-lesson] { margin-top: 0.6rem; }

.cd-help-media { padding: 0.7rem 0.85rem; border-radius: 12px; background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.08); }
.cd-help-media-row { margin: 0 0 0.7rem; }
.cd-help-media-row:last-child { margin-bottom: 0; }
.cd-help-media-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; font-size: 0.84rem; opacity: 0.9; }
.cd-help-media-actions { display: flex; gap: 0.4rem; flex: 0 0 auto; }
.cd-help-media-preview { display: block; width: 100%; margin-top: 0.4rem; border-radius: 8px; max-height: 220px; background: #000; }

/* ---- deep-logic overhaul (F1-F6): banners, why? expander, excluded list ---- */
.cd-chip-warn { border-color: rgba(232, 165, 90, 0.5); color: #e8a55a; font-weight: 700; }
.cd-banner {
  margin: 0.55rem 0; padding: 0.6rem 0.8rem; border-radius: 10px;
  font-size: 0.9rem; line-height: 1.45; overflow-wrap: anywhere; word-break: break-word;
}
.cd-banner-warn { background: rgba(232, 165, 90, 0.1); border: 1px solid rgba(232, 165, 90, 0.4); }
.cd-banner strong { color: #e8a55a; }
.cd-excluded { margin: 0.5rem 0; font-size: 0.86rem; }
.cd-excluded summary { cursor: pointer; color: var(--cd-accent); font-weight: 600; }
.cd-excluded ul { margin: 0.4rem 0 0; padding-left: 1.1rem; }
.cd-excluded li { margin: 0.15rem 0; overflow-wrap: anywhere; }
.cd-why-btn { font-size: 0.78rem; opacity: 0.85; }
/* WHY expansion: full card width + internal horizontal scroll — never clip columns */
.cd-why-row > td {
  background: rgba(255, 255, 255, 0.03);
  padding: 0.55rem 0.55rem !important;
  max-width: 0; /* with table-layout:fixed, forces cell = full card width */
  width: 100%;
  overflow: visible;
}
.cd-why {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.cd-why-terms {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
  max-width: 100%;
}
.cd-why-scroll {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
  /* visible edge so users know they can scroll if needed */
  scrollbar-gutter: stable;
}
.cd-why-table {
  width: max(100%, 22rem);
  min-width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  display: table; /* not block — keeps column alignment */
  table-layout: auto;
  margin: 0;
}
.cd-why-table th,
.cd-why-table td {
  text-align: left;
  padding: 0.32rem 0.55rem;
  vertical-align: top;
}
.cd-why-table th:nth-child(1),
.cd-why-table td:nth-child(1) {
  min-width: 9rem;
  max-width: 16rem;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.cd-why-table th:nth-child(2),
.cd-why-table td:nth-child(2),
.cd-why-table th:nth-child(3),
.cd-why-table td:nth-child(3) {
  white-space: nowrap;
  min-width: 3.25rem;
}
.cd-why-table th:nth-child(4),
.cd-why-table td:nth-child(4) {
  white-space: nowrap;
  min-width: 5.75rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
.cd-why-table thead th {
  color: var(--cd-accent);
  font-weight: 700;
  border-bottom: 1px solid var(--cd-accent-line);
  position: sticky;
  top: 0;
  background: rgba(12, 18, 32, 0.96);
  z-index: 1;
}
.cd-why-table tbody tr:nth-child(even) { background: rgba(255, 255, 255, 0.02); }
.cd-why-table .cd-lu-team { display: inline; margin-left: 0.2rem; }
audio.cd-help-media-preview { max-height: none; }

.cd-help-notes-box {
  width: 100%; box-sizing: border-box; resize: vertical;
  background: rgba(0, 0, 0, 0.28); border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 8px;
  color: #f2ecff; padding: 0.5rem 0.6rem; font-size: 0.86rem; font-family: inherit;
}
.cd-help-notes-status { margin: 0.3rem 0 0; font-size: 0.72rem; opacity: 0.65; min-height: 1em; }

.cd-btn-sm { font-size: 0.72rem; padding: 0.22rem 0.55rem; }

@media (max-width: 640px) {
  .cd-help-pop { top: 0; left: 0; transform: none; width: 100vw; max-height: 100vh; border-radius: 0; }
  .cd-help-head { border-radius: 0; }
}

/* =============================================================================
 * LIVE / FINAL DKS toggle — left-nav switch + gated DKS badges/scoreboard.
 * Pure display: values only ever appear when <body class="cd-live-on">.
 * ============================================================================= */
.cd-live-toggle-row {
  display: flex; align-items: center; gap: 0.55rem;
  margin: 0 0 0.7rem; padding: 0.55rem 0.6rem; border-radius: 10px;
  background: rgba(62, 207, 142, 0.06); border: 1px solid rgba(62, 207, 142, 0.28);
}
.cd-live-toggle-switch { position: relative; display: inline-block; width: 2.15rem; height: 1.15rem; flex: 0 0 auto; }
.cd-live-toggle-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.cd-live-toggle-track {
  position: absolute; inset: 0; border-radius: 999px;
  background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.18);
  transition: background 0.15s ease, border-color 0.15s ease;
}
.cd-live-toggle-track::after {
  content: ""; position: absolute; top: 1px; left: 1px; width: 0.95rem; height: 0.95rem;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  transition: transform 0.15s ease;
}
.cd-live-toggle-switch input:checked ~ .cd-live-toggle-track {
  background: var(--cd-ok); border-color: var(--cd-ok);
}
.cd-live-toggle-switch input:checked ~ .cd-live-toggle-track::after { transform: translateX(1rem); }
.cd-live-toggle-switch input:focus-visible ~ .cd-live-toggle-track { box-shadow: 0 0 0 3px rgba(62, 207, 142, 0.35); }

/* CLAUDE BUILD control policy: inactive inputs remain visible for education,
   but cannot silently influence a mode that does not consume them. */
.cdb-recipe-control.is-inactive,
.cdb-range-control.is-inactive { opacity: 0.42; }
.cdb-seed-policy {
  display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
  margin-top: 0.65rem; color: var(--cd-muted); font-size: 0.78rem;
}
.cdb-seed-policy label { color: var(--cd-text); font-weight: 700; }
.cdb-build-action { display: inline-flex; align-items: center; gap: 0.35rem; }
.cdb-build-policy {
  display: flex; flex-wrap: wrap; gap: 0.42rem; align-items: center;
  margin-top: 0.7rem; padding: 0.65rem 0.75rem; border: 1px solid var(--cd-border);
  border-radius: 6px; background: rgba(8, 18, 32, 0.72); font-size: 0.76rem;
}
.cdb-build-policy > strong { color: var(--cd-text); margin-right: 0.15rem; }
.cdb-build-policy > span { padding: 0.2rem 0.42rem; border-radius: 4px; }
.cdb-policy-on { color: var(--cd-ok); background: rgba(62, 207, 142, 0.1); }
.cdb-policy-off { color: var(--cd-muted); background: rgba(148, 163, 184, 0.08); }
.cd-live-toggle-label { font-size: 0.78rem; font-weight: 650; opacity: 0.9; display: inline-flex; align-items: center; }
.cd-field-user-toggle {
  align-self: end; min-height: 2.45rem; margin: 0; padding: 0.48rem 0.6rem;
  white-space: nowrap; cursor: pointer;
}
.cd-field-user-toggle .cd-live-toggle-label strong { margin-left: 0.28rem; color: var(--cd-ok); }

/* DKS badges ALWAYS paint on chips/lineup cards when hydrated (operator law).
 * Live toggle only gates dedicated scoreboard tables (.cd-live-only), not per-player DKS. */
.cd-dks-badge {
  display: inline-flex; align-items: center;
  margin-left: 0.4rem; padding: 0.04rem 0.4rem; border-radius: 999px;
  font-size: 0.66rem; font-weight: 800; letter-spacing: 0.01em; white-space: nowrap;
  background: rgba(62, 207, 142, 0.14); border: 1px solid rgba(62, 207, 142, 0.4); color: var(--cd-ok);
}
.cd-dks-badge.is-empty {
  background: rgba(148, 163, 184, 0.1); border-color: rgba(148, 163, 184, 0.35); color: #94a3b8;
}
.cd-dks-badge.is-live::before,
body.cd-live-on .cd-dks-badge:not(.is-empty)::before {
  content: "●"; margin-right: 0.3rem; font-size: 0.55rem; animation: cd-live-pulse 1.6s ease-in-out infinite;
}
.cd-dks-badge.is-final::before { content: "●"; margin-right: 0.3rem; font-size: 0.55rem; animation: none; opacity: 1; }
@keyframes cd-live-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.cd-live-only { display: none; }
body.cd-live-on .cd-live-only { display: block; }
body.cd-live-on th.cd-live-only,
body.cd-live-on td.cd-live-only { display: table-cell; }
.cd-live-off-only { display: block; }
body.cd-live-on .cd-live-off-only { display: none; }

/* Lineup LIVE/FINAL total — FIRST badge after # on every card (operator law). */
.cd-lu-live-total {
  display: inline-flex;
  align-items: baseline; gap: 0.35rem; margin-left: 0.15rem; margin-right: 0.25rem;
  padding: 0.2rem 0.7rem; border-radius: 999px;
  font-size: 0.92rem; font-weight: 900; letter-spacing: 0.02em; white-space: nowrap;
  background: rgba(56, 189, 248, 0.16); border: 1.5px solid rgba(56, 189, 248, 0.55);
  color: #7dd3fc;
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.12), 0 2px 8px rgba(0, 0, 0, 0.25);
}
.cd-lu-live-total em { font-style: normal; font-weight: 700; opacity: 0.75; font-size: 0.82em; }
.cd-lu-live-total::before { content: "●"; margin-right: 0.1rem; font-size: 0.65rem; animation: cd-live-pulse 1.6s ease-in-out infinite; }
.cd-lu-live-total.is-final {
  background: rgba(62, 207, 142, 0.22); border-color: rgba(62, 207, 142, 0.65); color: #4ade80;
  font-size: 1rem;
}
.cd-lu-live-total.is-final::before { animation: none; opacity: 1; }
.cd-lu-live-total.is-empty {
  background: rgba(248, 113, 113, 0.12); border-color: rgba(248, 113, 113, 0.45); color: #fca5a5;
  font-weight: 700; font-size: 0.82rem;
}
.cd-lu-live-total.is-empty::before { content: "○"; animation: none; opacity: 0.55; }

.cd-lu-scores { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.35rem 0; }
.cd-lu-score-chip {
  font-size: 0.68rem; font-weight: 800; letter-spacing: 0.01em; white-space: nowrap;
  padding: 0.1rem 0.5rem; border-radius: 999px;
  background: rgba(62, 207, 142, 0.14); border: 1px solid rgba(62, 207, 142, 0.4); color: var(--cd-ok);
}

/* ---- DK export verdict box (fix 2B: validate-or-refuse) ------------------ */
/* Box grows with its content — never clip an error list, the operator has to
   be able to read every unverifiable id before re-exporting. */
.cd-export-status {
  margin: 0.6rem 0 0; padding: 0.7rem 0.9rem; border-radius: 10px;
  font-size: 0.86rem; line-height: 1.45;
  overflow-wrap: anywhere; word-break: break-word; height: auto; max-height: none;
}
.cd-export-status p { margin: 0.4rem 0; }
.cd-export-status ul { margin: 0.35rem 0 0; padding-left: 1.15rem; }
.cd-export-status li { margin: 0.15rem 0; }
.cd-export-ok {
  background: rgba(62, 207, 142, 0.1); border: 1px solid rgba(62, 207, 142, 0.4);
}
.cd-export-ok strong { color: var(--cd-ok); }
.cd-export-neg {
  background: rgba(226, 92, 92, 0.1); border: 1px solid rgba(226, 92, 92, 0.45);
}
.cd-export-neg strong { color: var(--cd-err); }

/* ---- SP start-status badge (display only) -------------------------------- */
/* ALL CAPS per the UI chrome casing rule. Inline-flex so it never breaks the
   player name row, and the label is never truncated. */
.cd-sp-badge {
  display: inline-flex; align-items: baseline; white-space: nowrap;
  margin-left: 0.35rem; padding: 0.06rem 0.45rem; border-radius: 999px;
  font-size: 0.66rem; font-weight: 800; letter-spacing: 0.02em;
}
.cd-sp-ok   { background: rgba(62, 207, 142, 0.14); border: 1px solid rgba(62, 207, 142, 0.42); color: var(--cd-ok); }
.cd-sp-warn { background: rgba(232, 165, 90, 0.13); border: 1px solid rgba(232, 165, 90, 0.42); color: #e8a55a; }
.cd-sp-neg  { background: rgba(226, 92, 92, 0.13); border: 1px solid rgba(226, 92, 92, 0.45); color: var(--cd-err); }

/* ---- Deep forensics dual view (SOURCE PRO ↔ CLAUDE BUILD book) ---------- */
.cd-deep-view-toggle {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem;
  margin: 0 0 0.85rem; padding: 0.65rem 0.75rem;
  border: 1px solid rgba(232, 130, 90, 0.4); border-radius: 10px;
  background: rgba(8, 16, 28, 0.85);
}
.cd-deep-view-toggle .dz-btn.is-disabled,
.cd-deep-view-toggle .dz-btn:disabled {
  opacity: 0.45; cursor: not-allowed;
}

/* ---- Lineup book exposure / stack chips / delete ------------------------ */
.cd-chip-exp {
  background: rgba(56, 189, 248, 0.12); border-color: rgba(56, 189, 248, 0.4);
  color: #7dd3fc; font-weight: 700;
}
.cd-chip-exp.cd-tier-lock { background: rgba(251, 191, 36, 0.15); border-color: rgba(251, 191, 36, 0.5); color: #fbbf24; }
.cd-chip-exp.cd-tier-anchor { background: rgba(167, 139, 250, 0.14); border-color: rgba(167, 139, 250, 0.45); color: #c4b5fd; }
.cd-chip-exp.cd-tier-core { background: rgba(52, 211, 153, 0.12); border-color: rgba(52, 211, 153, 0.4); color: #6ee7b7; }
.cd-chip-stack-exp {
  background: rgba(232, 130, 90, 0.12); border-color: rgba(232, 130, 90, 0.4);
  color: #fdba74; font-weight: 700;
}
.cd-lu-delete {
  margin-left: auto; font-size: 0.68rem !important; padding: 0.15rem 0.45rem !important;
  border-color: rgba(239, 68, 68, 0.45) !important; color: #fecaca !important;
}
.cd-lu-delete:hover { background: rgba(239, 68, 68, 0.15) !important; }
.cd-lu-head { flex-wrap: wrap; gap: 0.3rem; align-items: center; }

/* Always-visible Adapt logic strip (strict / T1 / V1) under BUILD row */
.cdb-build-action {
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.45rem;
}
.cdb-adapt-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.75rem;
  width: 100%;
  margin: 0.65rem 0 0.15rem;
  padding: 0.55rem 0.7rem;
  border-radius: 12px;
  border: 1px solid rgba(232, 130, 90, 0.28);
  background: linear-gradient(180deg, rgba(232, 130, 90, 0.08), rgba(8, 16, 28, 0.35));
  box-sizing: border-box;
}
.cdb-adapt-bar-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fdba74;
  margin-right: 0.15rem;
  white-space: nowrap;
}
.cdb-adapt-item {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  flex: 0 1 auto;
}
.cdb-adapt-item .cd-help-btn,
.cdb-adapt-item .cd-i-btn,
.cdb-adapt-item button.cd-help {
  flex-shrink: 0;
}
.cdb-adapt-btn {
  border-color: rgba(232, 130, 90, 0.55) !important;
  color: #fdba74 !important;
  background: rgba(232, 130, 90, 0.12) !important;
  font-weight: 700 !important;
  white-space: nowrap;
}
.cdb-adapt-btn:hover:not(:disabled) {
  background: rgba(232, 130, 90, 0.22) !important;
  color: #ffedd5 !important;
}
.cdb-adapt-btn:disabled {
  opacity: 0.45; cursor: not-allowed;
}
.cdb-adapt-t1, #cdb-fail-adapt-t1 {
  border-color: rgba(56, 189, 248, 0.55) !important;
  color: #7dd3fc !important;
  background: rgba(14, 165, 233, 0.12) !important;
  font-weight: 700 !important;
}
.cdb-adapt-t1:hover:not(:disabled), #cdb-fail-adapt-t1:hover:not(:disabled) {
  background: rgba(14, 165, 233, 0.22) !important;
  color: #e0f2fe !important;
}
.cdb-adapt-v1, #cdb-fail-adapt-v1 {
  border-color: rgba(167, 139, 250, 0.55) !important;
  color: #c4b5fd !important;
  background: rgba(139, 92, 246, 0.12) !important;
  font-weight: 700 !important;
}
.cdb-adapt-v1:hover:not(:disabled), #cdb-fail-adapt-v1:hover:not(:disabled) {
  background: rgba(139, 92, 246, 0.22) !important;
  color: #ede9fe !important;
}
.cdb-fail-actions-adapt {
  justify-content: flex-start !important;
}
.cdb-fail-actions-adapt .dz-btn {
  font-size: 0.78rem !important;
}

/* ---- BUILD failure dialog (What Needs Adjusted + Adapt Best Case) -------- */
.cdb-fail-overlay {
  position: fixed; inset: 0; z-index: 12000;
  display: flex; align-items: center; justify-content: center;
  padding: 1.25rem;
  background: rgba(2, 8, 18, 0.72);
  backdrop-filter: blur(4px);
}
.cdb-fail-modal {
  width: min(640px, 100%);
  max-height: min(88vh, 900px);
  overflow: auto;
  border-radius: 14px;
  border: 1px solid rgba(232, 130, 90, 0.45);
  background: linear-gradient(180deg, rgba(18, 28, 44, 0.98), rgba(8, 16, 28, 0.99));
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  color: #e8eef7;
  padding: 1.1rem 1.25rem 1.15rem;
}
.cdb-fail-modal-wide { width: min(820px, 100%); }

/* Full-stack FADE chart (process save report) */
.cdb-fade-chart { margin-top: 0.35rem; }
.cdb-fade-law {
  margin: 0 0 0.65rem; font-size: 0.8rem; line-height: 1.45; color: #cbd5e1;
}
/* FADE scope + keep-alive good plays (full-stack only · not a bat ban) */
.cdb-fade-scope {
  margin: 0.45rem 0 0.35rem;
  padding: 0.4rem 0.55rem;
  border-radius: 8px;
  border: 1px solid rgba(251, 191, 36, 0.4);
  background: rgba(251, 191, 36, 0.1);
  font-size: 0.78rem;
  line-height: 1.4;
  color: #fde68a;
}
.cdb-fade-scope strong { color: #fbbf24; }
.cdb-fade-keepalive {
  margin: 0 0 0.45rem;
  padding: 0.4rem 0.55rem;
  border-radius: 8px;
  border: 1px solid rgba(52, 211, 153, 0.4);
  background: rgba(16, 185, 129, 0.12);
  font-size: 0.78rem;
  line-height: 1.4;
  color: #a7f3d0;
}
.cdb-fade-keepalive strong { color: #6ee7b7; }
.cdb-fade-keepalive em { font-style: normal; font-weight: 700; color: #ecfdf5; }
.cdb-fade-keepalive.is-soft {
  border-color: rgba(148, 163, 184, 0.35);
  background: rgba(148, 163, 184, 0.08);
  color: #cbd5e1;
}
.cdb-fade-keepalive.is-soft strong { color: #e2e8f0; }
.cdb-fade-rows { display: flex; flex-direction: column; gap: 0.55rem; }
.cdb-fade-row {
  border-radius: 10px;
  border: 1px solid rgba(248, 113, 113, 0.35);
  background: rgba(127, 29, 29, 0.18);
  padding: 0.65rem 0.75rem 0.7rem;
}
.cdb-fade-row-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.55rem;
  margin-bottom: 0.45rem;
}
.cdb-fade-badge {
  font-weight: 800; font-size: 0.78rem; letter-spacing: 0.04em;
  color: #fecaca; text-transform: uppercase;
}
.cdb-fade-denials {
  font-size: 0.72rem; color: #fca5a5;
  background: rgba(127, 29, 29, 0.55); padding: 0.14rem 0.5rem; border-radius: 999px;
  border: 1px solid rgba(248, 113, 113, 0.45); font-weight: 700;
}
/* Gate-denial tiers (CLE lesson): hard red → grey risk → green possible */
.cdb-fade-denials.is-hard_fade {
  color: #fecaca;
  background: rgba(153, 27, 27, 0.65);
  border-color: rgba(248, 113, 113, 0.55);
}
.cdb-fade-denials.is-risk_to_stack {
  color: #e2e8f0;
  background: rgba(71, 85, 105, 0.75);
  border-color: rgba(148, 163, 184, 0.55);
}
.cdb-fade-denials.is-possible_stack {
  color: #052e16;
  background: rgba(134, 239, 172, 0.85);
  border-color: rgba(74, 222, 128, 0.7);
}
.cdb-fade-denial-tag {
  font-style: normal; font-size: 0.62rem; letter-spacing: 0.04em;
  text-transform: uppercase; opacity: 0.95; margin-right: 0.15rem;
}
.cdb-fade-row.is-denial-risk_to_stack {
  border-color: rgba(148, 163, 184, 0.45);
  background: rgba(30, 41, 59, 0.35);
}
.cdb-fade-row.is-denial-possible_stack {
  border-color: rgba(74, 222, 128, 0.5);
  background: rgba(6, 78, 59, 0.22);
}
.cdb-fade-row.is-denial-hard_fade {
  border-color: rgba(248, 113, 113, 0.4);
}
.cdb-fade-tier-legend {
  display: flex; flex-wrap: wrap; gap: 0.4rem 0.55rem; align-items: center;
}
.cdb-fade-legend-chip {
  display: inline-block; font-size: 0.68rem; font-weight: 700;
  padding: 0.2rem 0.5rem; border-radius: 999px; letter-spacing: 0.02em;
}
.cdb-fade-legend-chip.is-hard {
  color: #fecaca; background: rgba(153, 27, 27, 0.55); border: 1px solid rgba(248, 113, 113, 0.45);
}
.cdb-fade-legend-chip.is-risk {
  color: #e2e8f0; background: rgba(71, 85, 105, 0.7); border: 1px solid rgba(148, 163, 184, 0.5);
}
.cdb-fade-legend-chip.is-possible {
  color: #052e16; background: rgba(134, 239, 172, 0.85); border: 1px solid rgba(74, 222, 128, 0.65);
}
.cdb-fade-hmf {
  font-size: 0.68rem; font-weight: 700; padding: 0.1rem 0.4rem; border-radius: 4px;
  background: rgba(255, 255, 255, 0.08); color: #e2e8f0;
}
.cdb-fade-hmf[data-hmf="FAIL"] { background: rgba(239, 68, 68, 0.25); color: #fecaca; }
.cdb-fade-hmf[data-hmf="HIT"] { background: rgba(49, 233, 129, 0.18); color: #86efac; }
.cdb-fade-hmf[data-hmf="MISS"] { background: rgba(56, 189, 248, 0.18); color: #7dd3fc; }
.cdb-fade-grade {
  font-size: 0.65rem; font-weight: 800; letter-spacing: 0.03em; text-transform: uppercase;
  padding: 0.12rem 0.4rem; border-radius: 4px; background: rgba(148,163,184,.2); color: #e2e8f0;
}
.cdb-fade-grade[data-grade="CONFIRMED_FADE"] { background: rgba(34,197,94,.22); color: #86efac; }
.cdb-fade-grade[data-grade="FALSE_FADE"] { background: rgba(251,191,36,.25); color: #fde68a; }
.cdb-fade-grade[data-grade="GATE_ONLY"] { background: rgba(148,163,184,.18); color: #cbd5e1; }
.cdb-fade-row.is-false-fade-row {
  border-color: rgba(251, 191, 36, 0.55);
  background: rgba(120, 53, 15, 0.22);
}
.cdb-fade-row.is-confirmed-fade-row {
  border-color: rgba(34, 197, 94, 0.4);
}
.cdb-fade-verdict.is-false-fade {
  border: 1px solid rgba(251, 191, 36, 0.45);
  background: rgba(251, 191, 36, 0.12);
  color: #fde68a;
}
.cdb-fade-true-law {
  margin: 0 0 0.45rem;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  border: 1px solid rgba(96, 165, 250, 0.35);
  background: rgba(30, 58, 138, 0.28);
  font-size: 0.74rem;
  line-height: 1.35;
  color: #bfdbfe;
}
.cdb-fade-true-law strong { color: #93c5fd; }
.cdb-fade-true-stack {
  font-size: 0.65rem; font-weight: 800; letter-spacing: 0.02em;
  padding: 0.12rem 0.4rem; border-radius: 4px;
}
.cdb-fade-true-stack.is-no {
  background: rgba(34, 197, 94, 0.2); color: #86efac;
}
.cdb-fade-true-stack.is-yes {
  background: rgba(251, 191, 36, 0.28); color: #fde68a;
}
.cdb-fade-learn {
  margin: 0.35rem 0 0.45rem;
  padding: 0.4rem 0.55rem;
  border-radius: 8px;
  border: 1px solid rgba(167, 139, 250, 0.4);
  background: rgba(76, 29, 149, 0.22);
  font-size: 0.76rem;
  line-height: 1.4;
  color: #e9d5ff;
}
.cdb-fade-learn strong { color: #d8b4fe; display: block; margin-bottom: 0.25rem; }
.cdb-fade-op-notes {
  margin: 0; padding-left: 1.1rem;
}
.cdb-fade-op-notes li { margin: 0.15rem 0; }
.cdb-fade-metrics {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.5rem;
}
@media (max-width: 720px) {
  .cdb-fade-metrics { grid-template-columns: 1fr; }
}
.cdb-fade-why-list {
  margin: 0.35rem 0 0; padding: 0; list-style: none;
  display: flex; flex-direction: column; gap: 0.35rem;
}
.cdb-fade-why-item {
  padding: 0.4rem 0.5rem; border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(0, 0, 0, 0.22);
  font-size: 0.76rem; line-height: 1.35; color: #e2e8f0;
}
.cdb-fade-why-item strong { display: block; margin-bottom: 0.15rem; font-size: 0.78rem; }
.cdb-fade-why-detail { color: #cbd5e1; font-size: 0.72rem; }
.cdb-fade-why-item.is-neg {
  border-color: rgba(248, 113, 113, 0.45);
  background: rgba(127, 29, 29, 0.28);
}
.cdb-fade-why-item.is-neg strong { color: #fecaca; }
.cdb-fade-why-item.is-pos {
  border-color: rgba(52, 211, 153, 0.45);
  background: rgba(6, 78, 59, 0.28);
}
.cdb-fade-why-item.is-pos strong { color: #6ee7b7; }
.cdb-fade-why-item.is-mix {
  border-color: rgba(251, 191, 36, 0.4);
  background: rgba(120, 53, 15, 0.22);
}
.cdb-fade-why-item.is-mix strong { color: #fde68a; }
.cdb-fade-why-stack > summary,
.cdb-fade-why-sp > summary {
  cursor: pointer; font-size: 0.8rem; color: #f8fafc; padding: 0.25rem 0;
}
.cdb-fade-why-sp { border-color: rgba(52, 211, 153, 0.35); }
.cdb-fade-why-stack { border-color: rgba(248, 113, 113, 0.35); }
.cdb-fade-sp-rank {
  margin: 0.35rem 0 0.45rem; font-size: 0.78rem; color: #a7f3d0;
}
.cdb-fade-sp-board {
  margin: 0 0 0.75rem; padding: 0.55rem 0.7rem; border-radius: 10px;
  border: 1px solid rgba(52, 211, 153, 0.4);
  background: rgba(6, 78, 59, 0.25);
  font-size: 0.78rem; color: #d1fae5;
}
.cdb-fade-sp-board strong { color: #6ee7b7; }
.cdb-fade-sp-board ol { margin: 0.35rem 0 0; padding-left: 1.2rem; }
.cdb-fade-sp-board li { margin: 0.2rem 0; }
.cdb-fade-bat.is-zero { color: #fca5a5; font-weight: 700; }
.cdb-fade-zero-n { color: #fca5a5; font-weight: 700; }
/* STAR keep-alive (Tolbert law) */
.cdb-fade-stars {
  margin: 0.5rem 0 0.55rem;
  padding: 0.55rem 0.65rem 0.65rem;
  border-radius: 12px;
  border: 1px solid rgba(250, 204, 21, 0.55);
  background: linear-gradient(165deg, rgba(113, 63, 18, 0.45), rgba(20, 20, 30, 0.55));
  box-shadow: 0 0 0 1px rgba(250, 204, 21, 0.12), 0 8px 24px rgba(0, 0, 0, 0.25);
}
.cdb-fade-stars-head {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.35rem 0.65rem;
  margin-bottom: 0.45rem;
}
.cdb-fade-stars-head strong {
  font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: #fde68a;
}
.cdb-fade-stars-head span { font-size: 0.72rem; color: #fef3c7; opacity: 0.9; }
.cdb-fade-star-card {
  margin-top: 0.45rem; padding: 0.55rem 0.6rem;
  border-radius: 10px;
  border: 1px solid rgba(253, 224, 71, 0.35);
  background: rgba(0, 0, 0, 0.28);
}
.cdb-fade-star-title {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.5rem;
  font-size: 0.92rem; color: #fffbeb; margin-bottom: 0.35rem;
}
.cdb-fade-star-badge {
  font-size: 0.65rem; font-weight: 800; letter-spacing: 0.06em;
  padding: 0.15rem 0.45rem; border-radius: 999px;
  background: linear-gradient(90deg, #f59e0b, #eab308); color: #1c1917;
}
.cdb-fade-star-badge.is-solid {
  background: linear-gradient(90deg, #0ea5e9, #38bdf8); color: #0c4a6e;
}
.cdb-fade-star-card.is-solid {
  border-color: rgba(56, 189, 248, 0.4);
  background: rgba(8, 47, 73, 0.35);
}
.cdb-fade-star-rank {
  font-size: 0.7rem; font-weight: 700; color: #fde68a;
  background: rgba(250, 204, 21, 0.15); padding: 0.1rem 0.4rem; border-radius: 4px;
}
.cdb-fade-star-metrics {
  display: flex; flex-wrap: wrap; gap: 0.35rem 0.75rem;
  font-size: 0.78rem; color: #fef9c3; margin-bottom: 0.35rem;
}
.cdb-fade-star-metrics em {
  font-style: normal; font-size: 0.62rem; text-transform: uppercase;
  letter-spacing: 0.04em; color: #a8a29e; margin-right: 0.2rem;
}
.cdb-fade-star-summary {
  margin: 0 0 0.4rem; font-size: 0.78rem; line-height: 1.45; color: #fef3c7;
}
.cdb-fade-star-why > summary {
  cursor: pointer; font-size: 0.76rem; font-weight: 700; color: #fde68a; padding: 0.2rem 0;
}
.cdb-fade-star-sigs {
  margin: 0.35rem 0 0; padding: 0; list-style: none;
  display: flex; flex-direction: column; gap: 0.3rem;
}
.cdb-fade-star-sig {
  padding: 0.35rem 0.45rem; border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.45);
  font-size: 0.74rem; line-height: 1.35; color: #e2e8f0;
}
.cdb-fade-star-sig strong { display: block; color: #f8fafc; margin-bottom: 0.1rem; }
.cdb-fade-star-sig span { color: #cbd5e1; font-size: 0.72rem; }
.cdb-fade-star-sig.is-exclusive {
  border-color: rgba(250, 204, 21, 0.5);
  background: rgba(113, 63, 18, 0.35);
}
.cdb-fade-star-sig.is-exclusive strong { color: #fde68a; }
.cdb-fade-star-board {
  margin: 0 0 0.65rem; padding: 0.55rem 0.7rem; border-radius: 10px;
  border: 1px solid rgba(250, 204, 21, 0.45);
  background: rgba(113, 63, 18, 0.28);
  font-size: 0.78rem; color: #fef3c7;
}
.cdb-fade-star-board strong { color: #fde68a; }
.cdb-fade-star-board-law { margin: 0.25rem 0 0.35rem; font-size: 0.72rem; color: #fde68a; opacity: 0.95; }
.cdb-fade-star-board ol { margin: 0.25rem 0 0; padding-left: 1.2rem; }
.cdb-fade-star-board li { margin: 0.2rem 0; }
.cdb-fade-metric {
  border-radius: 8px; padding: 0.45rem 0.55rem;
  background: rgba(0, 0, 0, 0.22); border: 1px solid rgba(255, 255, 255, 0.06);
}
.cdb-fade-metric-label {
  font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.05em;
  color: #94a3b8; margin-bottom: 0.2rem;
}
.cdb-fade-metric-val { font-size: 0.86rem; line-height: 1.35; color: #f8fafc; }
.cdb-fade-metric-val strong { color: #fde68a; font-size: 1.05rem; }
.cdb-fade-metric-sub { display: block; font-size: 0.7rem; color: #94a3b8; margin-top: 0.15rem; }
.cdb-fade-sp { font-size: 0.8rem !important; }
.cdb-fade-starters {
  margin: 0.45rem 0 0; font-size: 0.72rem; line-height: 1.4; color: #cbd5e1;
}
.cdb-fade-verdict {
  margin: 0.5rem 0 0.25rem; padding: 0.4rem 0.5rem; border-radius: 6px;
  font-size: 0.76rem; line-height: 1.4;
  background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
}
.cdb-fade-verdict.is-good-fade {
  background: rgba(49, 233, 129, 0.1); border-color: rgba(49, 233, 129, 0.35); color: #bbf7d0;
}
.cdb-fade-verdict.is-mixed-fade {
  background: rgba(251, 191, 36, 0.1); border-color: rgba(251, 191, 36, 0.35); color: #fde68a;
}
.cdb-fade-verdict.is-pending-fade {
  background: rgba(148, 163, 184, 0.1); border-color: rgba(148, 163, 184, 0.3); color: #cbd5e1;
}
.cdb-fade-mini {
  margin: 0.25rem 0 0; font-size: 0.7rem; color: #94a3b8; font-style: italic;
}
.cdb-fade-dp {
  margin-top: 0.4rem; font-size: 0.72rem; color: #cbd5e1;
}
.cdb-fade-dp summary {
  cursor: pointer; color: #fdba74; font-weight: 600; list-style: none;
}
.cdb-fade-dp summary::-webkit-details-marker { display: none; }
.cdb-fade-dp ul { margin: 0.35rem 0 0; padding-left: 1.1rem; }
.cdb-fade-dp li { margin: 0.15rem 0; }
.cdb-fade-dp-k { color: #94a3b8; }

/* Stack discipline wizard + multi-path Adapt */
.cdb-stack-wizard {
  padding: 0.75rem 0.85rem; border-radius: 12px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  background: rgba(8, 47, 73, 0.35);
}
.cdb-wiz-step { margin: 0.55rem 0; }
.cdb-wiz-step.is-disabled { opacity: 0.45; pointer-events: none; }
.cdb-wiz-step-label {
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.05em;
  text-transform: uppercase; color: #7dd3fc; margin-bottom: 0.4rem;
}
.cdb-wiz-choices {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
}
.cdb-wiz-choice, .cdb-wiz-depth-btn, .cdb-wiz-rank-btn {
  display: flex; flex-direction: column; align-items: flex-start;
  text-align: left; max-width: 220px; font-size: 0.78rem !important;
  line-height: 1.25 !important; padding: 0.45rem 0.6rem !important;
}
.cdb-wiz-choice-sub {
  display: block; font-size: 0.65rem; font-weight: 500; opacity: 0.75; margin-top: 0.15rem;
}
.cdb-wiz-choice.is-selected, .cdb-wiz-depth-btn.is-selected, .cdb-wiz-rank-btn.is-selected {
  outline: 2px solid #38bdf8; background: rgba(56, 189, 248, 0.15) !important;
}
.cdb-wiz-actions {
  display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.65rem;
}
.cdb-wiz-status {
  margin-top: 0.5rem; font-size: 0.78rem; color: #cbd5e1; min-height: 1.2em;
}
.cdb-wiz-status.cd-neg { color: #fecaca; }
.cdb-wiz-test-out { margin-top: 0.55rem; overflow: auto; }
.cdb-wiz-test-table {
  width: 100%; border-collapse: collapse; font-size: 0.72rem;
}
.cdb-wiz-test-table th, .cdb-wiz-test-table td {
  border: 1px solid rgba(255,255,255,0.08); padding: 0.3rem 0.4rem; text-align: left;
}
.cdb-wiz-test-table tr.is-best { background: rgba(49, 233, 129, 0.12); }
.cdb-adapt-paths {
  display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.5rem;
  align-items: center;
}
.cdb-adapt-paths .dz-btn { font-size: 0.78rem !important; }
.cdb-adapt-paths-extra {
  margin-top: 0.75rem; padding-top: 0.65rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.cdb-adapt-paths-label {
  width: 100%; font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase; color: #94a3b8;
  margin-bottom: 0.15rem;
}
/* Footer Adapt CTAs (strict / T1 / V1) */
.cdb-fail-actions .dz-btn-primary#cdb-fail-adapt {
  font-weight: 800 !important;
  min-width: 10rem;
}
.cdb-fail-actions #cdb-fail-adapt-t1,
.cdb-fail-actions #cdb-fail-adapt-v1 {
  font-weight: 700 !important;
  min-width: 10rem;
}

/* FAIL unban panel */
.cdb-unban-toolbar {
  display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; margin: 0.4rem 0;
}
.cdb-unban-sort-lab { font-size: 0.72rem; color: #94a3b8; }
.cdb-unban-sort-lab select {
  margin-left: 0.25rem; background: #0f172a; color: #e2e8f0;
  border: 1px solid rgba(255,255,255,0.15); border-radius: 6px; padding: 0.2rem 0.35rem;
}
.cdb-unban-salary {
  display: flex; flex-wrap: wrap; gap: 0.65rem; align-items: center;
  margin: 0.35rem 0 0.5rem; font-size: 0.72rem; color: #cbd5e1;
}
.cdb-unban-salary input {
  width: 5.5rem; margin-left: 0.25rem; background: #0f172a; color: #e2e8f0;
  border: 1px solid rgba(255,255,255,0.15); border-radius: 6px; padding: 0.2rem 0.35rem;
}
.cdb-unban-pos-alert {
  margin: 0.35rem 0; padding: 0.45rem 0.55rem; border-radius: 8px;
  background: rgba(251, 191, 36, 0.12); border: 1px solid rgba(251, 191, 36, 0.4);
  font-size: 0.76rem; color: #fde68a; line-height: 1.4;
}
.cdb-unban-list {
  max-height: 240px; overflow: auto; margin: 0.35rem 0 0.5rem;
  border: 1px solid rgba(255,255,255,0.08); border-radius: 8px;
}
.cdb-unban-table {
  width: 100%; border-collapse: collapse; font-size: 0.7rem;
}
.cdb-unban-table th, .cdb-unban-table td {
  border-bottom: 1px solid rgba(255,255,255,0.06); padding: 0.28rem 0.35rem;
  text-align: left; white-space: nowrap;
}
.cdb-unban-table th {
  position: sticky; top: 0; background: #0f172a; color: #94a3b8; font-weight: 700;
}
.cdb-unban-sigs { white-space: normal !important; max-width: 160px; color: #94a3b8; }
.cdb-fail-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem;
  margin-bottom: 0.55rem;
}
.cdb-fail-head h2 {
  margin: 0; font-size: 1.05rem; font-weight: 800; letter-spacing: 0.01em;
  color: #ffb4a2;
}
.cdb-fail-x {
  border: 0; background: transparent; color: #94a3b8; font-size: 1.4rem;
  line-height: 1; cursor: pointer; padding: 0.1rem 0.35rem; border-radius: 6px;
}
.cdb-fail-x:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.cdb-fail-summary {
  margin: 0 0 0.65rem; font-size: 0.9rem; line-height: 1.45; color: #f1f5f9;
}
.cdb-fail-gates {
  margin: 0 0 0.75rem; padding: 0.55rem 0.7rem; border-radius: 8px;
  background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.35);
  font-size: 0.8rem; line-height: 1.4; color: #fecaca;
}
.cdb-fail-section { margin: 0.85rem 0; }
.cdb-fail-section h3 {
  margin: 0 0 0.4rem; font-size: 0.82rem; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--cd-accent, #e8825a); font-weight: 800;
}
.cdb-fail-list {
  margin: 0; padding-left: 1.15rem; font-size: 0.84rem; line-height: 1.45;
}
.cdb-fail-list li { margin: 0.28rem 0; }
.cdb-fail-depth {
  margin: 0.5rem 0 0.75rem; padding: 0.55rem 0.7rem; border-radius: 8px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.78rem; line-height: 1.4; color: #cbd5e1;
  display: flex; flex-direction: column; gap: 0.35rem;
}
.cdb-fail-adapt {
  padding: 0.7rem 0.8rem; border-radius: 10px;
  background: rgba(232, 130, 90, 0.1); border: 1px solid rgba(232, 130, 90, 0.35);
}
.cdb-fail-adapt p { margin: 0 0 0.45rem; font-size: 0.84rem; line-height: 1.45; }
.cdb-fail-note { margin: 0; font-size: 0.82rem; color: #94a3b8; }
.cdb-fail-actions {
  display: flex; flex-wrap: wrap; gap: 0.55rem; justify-content: flex-end;
  margin-top: 1rem; padding-top: 0.85rem; border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ─── LINEUP INTEGRITY MONITOR (SP-vs-hitters + tonight starters) ─── */
.cd-integrity-light {
  margin: 0.45rem 0 0.65rem;
  padding: 0;
}
.cd-integrity-light-inner {
  display: flex; align-items: flex-start; gap: 0.5rem;
  padding: 0.55rem 0.6rem; border-radius: 10px;
  border: 2px solid rgba(255,255,255,0.12);
  background: rgba(15, 23, 42, 0.9);
}
.cd-integrity-lamp {
  width: 0.72rem; height: 0.72rem; border-radius: 999px;
  margin-top: 0.2rem; flex: 0 0 auto;
  background: #64748b; box-shadow: 0 0 0 2px rgba(100,116,139,0.35);
}
.cd-integrity-ok { border-color: rgba(62, 207, 142, 0.65); }
.cd-integrity-ok .cd-integrity-lamp {
  background: #3ecf8e; box-shadow: 0 0 10px rgba(62, 207, 142, 0.75);
}
.cd-integrity-bad { border-color: rgba(248, 113, 113, 0.75); background: rgba(127, 29, 29, 0.35); }
.cd-integrity-bad .cd-integrity-lamp {
  background: #f87171; box-shadow: 0 0 12px rgba(248, 113, 113, 0.85);
  animation: cd-integrity-pulse 1.1s ease-in-out infinite;
}
.cd-integrity-pending .cd-integrity-lamp { background: #94a3b8; }
@keyframes cd-integrity-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}
.cd-integrity-copy { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.cd-integrity-label {
  font-size: 0.72rem; font-weight: 900; letter-spacing: 0.04em;
  text-transform: uppercase; color: #f8fafc;
}
.cd-integrity-sub {
  font-size: 0.68rem; line-height: 1.35; color: #cbd5e1;
  overflow-wrap: anywhere;
}
.cd-integrity-ok .cd-integrity-label { color: #3ecf8e; }
.cd-integrity-bad .cd-integrity-label { color: #fecaca; }

.cd-integrity-book-banner {
  margin: 0 0 0.85rem; padding: 0.75rem 0.9rem; border-radius: 12px;
  font-size: 0.86rem; line-height: 1.45;
}
.cd-integrity-book-banner.is-ok {
  background: rgba(62, 207, 142, 0.12); border: 2px solid rgba(62, 207, 142, 0.65);
  color: #bbf7d0;
}
.cd-integrity-book-banner.is-bad {
  background: rgba(127, 29, 29, 0.45); border: 2px solid rgba(248, 113, 113, 0.85);
  color: #fecaca;
}
.cd-integrity-book-banner ul {
  margin: 0.4rem 0 0.35rem; padding-left: 1.15rem;
}
.cd-integrity-book-banner li { margin: 0.15rem 0; }

.cd-lu-integrity {
  display: inline-flex; align-items: center; gap: 0.25rem;
  font-size: 0.68rem; font-weight: 900; letter-spacing: 0.04em;
  text-transform: uppercase; padding: 0.18rem 0.45rem; border-radius: 999px;
  border: 1px solid transparent; white-space: nowrap;
}
.cd-lu-integrity-ok {
  color: #3ecf8e; border-color: rgba(62, 207, 142, 0.55);
  background: rgba(62, 207, 142, 0.14);
}
.cd-lu-integrity-bad {
  color: #fecaca; border-color: rgba(248, 113, 113, 0.75);
  background: rgba(248, 113, 113, 0.18);
}
.cd-lu-integrity-pending {
  color: #94a3b8; border-color: rgba(148, 163, 184, 0.4);
}
.cd-lu-card[data-integrity="bad"] {
  border-color: rgba(248, 113, 113, 0.75) !important;
  box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.35);
}
.cd-lu-card[data-integrity="ok"] {
  border-color: rgba(62, 207, 142, 0.35);
}
