/* explore_vs_exploit.css
 * Editorial-Workshop view for the Explore vs Exploit dashboard.
 * All tokens reference DESIGN.md. Brick accent, warm ink/bone, Fraunces + Geist.
 * No purple, no candy, no gradients.
 */

#evx-root {
  --evx-rail-w: 280px;
  --evx-card-min: 280px;
  --evx-pad: 16px;

  display: grid;
  grid-template-columns: var(--evx-rail-w) 1fr;
  gap: 24px;
  padding: 24px;
  color: var(--bone-1, #EDE6D7);
  font-family: "Geist", system-ui, sans-serif;
  background: var(--ink-1, #12100E);
}

#evx-root * { box-sizing: border-box; }

/* ── Left rail ────────────────────────────────────────────────────────── */
.evx-rail {
  position: sticky;
  top: 12px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--ink-2, #1C1915);
  border: 1px solid var(--rule, #3A342B);
  border-radius: 6px;
  padding: 16px;
  max-height: calc(100vh - 24px);
  overflow-y: auto;
}

.evx-rail h2 {
  font-family: "Fraunces", "Geist", serif;
  font-weight: 500;
  font-variation-settings: "opsz" 60;
  font-size: 22px;
  line-height: 26px;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--bone-0, #FBF8F0);
}

.evx-rail h2 em {
  font-style: italic;
  color: var(--brick-1, #B8413A);
}

.evx-eyebrow {
  font-family: "Geist Mono", monospace;
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bone-3, #8F8670);
  margin: 0 0 8px 0;
}

.evx-meta {
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  color: var(--bone-3, #8F8670);
  line-height: 1.6;
}

/* Generate button — primary brick fill */
.evx-generate {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--brick-1, #B8413A);
  color: var(--bone-0, #FBF8F0);
  border: 1px solid var(--brick-2, #8F2D27);
  border-radius: 6px;
  padding: 11px 16px;
  font-family: "Geist", system-ui, sans-serif;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 1px 0 var(--brick-ink, #3A1510);
  transition: background 180ms cubic-bezier(0.4, 0, 0.2, 1);
}
.evx-generate:hover { background: var(--brick-0, #D45A52); }
.evx-generate:active { background: var(--brick-2, #8F2D27); }
.evx-generate[disabled] {
  background: var(--ink-3, #28241E);
  color: var(--bone-3, #8F8670);
  cursor: progress;
  box-shadow: none;
}
.evx-generate .evx-spinner {
  width: 12px; height: 12px;
  border: 1.5px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: evx-spin 700ms linear infinite;
  display: none;
}
.evx-generate.is-running .evx-spinner { display: inline-block; }
@keyframes evx-spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }

/* Progress bar — shown while a Generate job is running */
.evx-progress {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  background: var(--ink-1, #12100E);
  border: 1px solid var(--rule, #3A342B);
  border-radius: 4px;
}
.evx-progress-bar {
  height: 6px;
  background: var(--brick-1, #B8413A);
  border-radius: 3px;
  transition: width 240ms cubic-bezier(0.4, 0, 0.2, 1);
}
.evx-progress-step {
  font-family: "Geist Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bone-3, #8F8670);
}

/* Filters toggle + panel */
.evx-filters-toggle {
  background: transparent;
  border: 1px solid var(--rule, #3A342B);
  color: var(--bone-2, #C4BAA3);
  border-radius: 6px;
  padding: 8px 12px;
  font-family: "Geist", system-ui, sans-serif;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}
.evx-filters-toggle:hover:not([disabled]) { color: var(--bone-0, #FBF8F0); }
.evx-filters-toggle[disabled] { opacity: 0.5; cursor: not-allowed; }
.evx-filter-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  padding: 0 6px;
  height: 16px;
  background: var(--brick-1, #B8413A);
  color: var(--bone-0, #FBF8F0);
  border-radius: 9999px;
  font-family: "Geist Mono", monospace;
  font-size: 10px;
  font-weight: 600;
}
.evx-filters {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
  background: var(--ink-1, #12100E);
  border: 1px solid var(--rule, #3A342B);
  border-radius: 4px;
}
.evx-filters-hint {
  font-family: "Geist", system-ui, sans-serif;
  font-size: 11px;
  color: var(--bone-3, #8F8670);
  line-height: 1.4;
}
.evx-filter-group { display: flex; flex-direction: column; gap: 6px; }
.evx-filter-group-head {
  display: flex; align-items: center; justify-content: space-between;
}
.evx-filter-clear {
  background: transparent; border: none; color: var(--brick-0, #D45A52);
  font-family: "Geist Mono", monospace; font-size: 10px;
  letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer;
}
.evx-filter-options {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.evx-filter-opt {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 8px;
  background: var(--ink-2, #1C1915);
  border: 1px solid var(--rule, #3A342B);
  border-radius: 9999px;
  font-family: "Geist", system-ui, sans-serif;
  font-size: 11px;
  color: var(--bone-2, #C4BAA3);
  cursor: pointer;
  user-select: none;
}
.evx-filter-opt input[type="checkbox"] { margin: 0; width: 11px; height: 11px; accent-color: var(--brick-1, #B8413A); }
.evx-filter-opt:hover { background: var(--ink-3, #28241E); }
.evx-filter-opt.is-on {
  background: var(--brick-wash, rgba(184,65,58,0.10));
  color: var(--brick-0, #D45A52);
  border-color: var(--brick-rule, rgba(184,65,58,0.32));
}
.evx-filter-src {
  font-family: "Geist Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.06em;
  color: var(--bone-3, #8F8670);
  margin-left: 4px;
  opacity: 0.6;
}

/* Family toggle */
.evx-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--ink-3, #28241E);
  border: 1px solid var(--rule, #3A342B);
  border-radius: 6px;
}
.evx-toggle-row label {
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bone-2, #C4BAA3);
}
.evx-switch {
  position: relative;
  width: 34px; height: 18px;
  background: var(--ink-4, #362F27);
  border: 1px solid var(--rule, #3A342B);
  border-radius: 9999px;
  cursor: pointer;
  transition: background 180ms cubic-bezier(0.4, 0, 0.2, 1);
}
.evx-switch::after {
  content: "";
  position: absolute;
  left: 1px; top: 1px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--bone-2, #C4BAA3);
  transition: transform 180ms cubic-bezier(0.4, 0, 0.2, 1),
              background 180ms cubic-bezier(0.4, 0, 0.2, 1);
}
.evx-switch.is-on {
  background: var(--brick-1, #B8413A);
  border-color: var(--brick-2, #8F2D27);
}
.evx-switch.is-on::after {
  transform: translateX(16px);
  background: var(--bone-0, #FBF8F0);
}

/* Weight sliders */
.evx-weights { display: flex; flex-direction: column; gap: 10px; }
.evx-weight-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 10px;
  background: var(--ink-1, #12100E);
  border: 1px solid var(--rule, #3A342B);
  border-radius: 4px;
}
.evx-weight-row .name {
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--bone-1, #EDE6D7);
}
.evx-weight-row .meta {
  display: flex;
  justify-content: space-between;
  font-family: "Geist Mono", monospace;
  font-size: 10px;
  color: var(--bone-3, #8F8670);
}
.evx-weight-row input[type="range"] {
  width: 100%;
  height: 4px;
  background: var(--ink-3, #28241E);
  border-radius: 2px;
  -webkit-appearance: none;
  outline: none;
}
.evx-weight-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--brick-1, #B8413A);
  border: 1px solid var(--brick-2, #8F2D27);
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.15);
}
.evx-weight-row input[type="range"]::-moz-range-thumb {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--brick-1, #B8413A);
  border: 1px solid var(--brick-2, #8F2D27);
  cursor: pointer;
}
.evx-weight-row.is-disabled { opacity: 0.5; pointer-events: none; }

.evx-reset {
  background: transparent;
  border: 1px solid var(--rule, #3A342B);
  color: var(--bone-3, #8F8670);
  border-radius: 6px;
  padding: 7px 12px;
  font-family: "Geist", system-ui, sans-serif;
  font-size: 12px;
  cursor: pointer;
  transition: color 80ms cubic-bezier(0.4, 0, 0.2, 1);
}
.evx-reset:hover { color: var(--bone-1, #EDE6D7); }

/* Band filter chips */
.evx-filter-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.evx-chip {
  padding: 4px 10px;
  border-radius: 9999px;
  border: 1px solid var(--rule, #3A342B);
  background: transparent;
  color: var(--bone-2, #C4BAA3);
  font-family: "Geist Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}
.evx-chip.is-active {
  background: var(--brick-wash, rgba(184,65,58,0.10));
  color: var(--brick-0, #D45A52);
  border-color: var(--brick-rule, rgba(184,65,58,0.32));
}

/* ── Right column — toolbar + grid ────────────────────────────────────── */
.evx-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.evx-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: var(--ink-2, #1C1915);
  border: 1px solid var(--rule, #3A342B);
  border-radius: 6px;
}
.evx-toolbar .left, .evx-toolbar .right { display: flex; gap: 8px; align-items: center; }
.evx-toolbar select {
  background: var(--ink-1, #12100E);
  color: var(--bone-1, #EDE6D7);
  border: 1px solid var(--rule, #3A342B);
  border-radius: 4px;
  padding: 5px 8px;
  font-family: "Geist Mono", monospace;
  font-size: 11px;
}
.evx-counts {
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  color: var(--bone-3, #8F8670);
  font-variant-numeric: tabular-nums;
}
.evx-counts b { color: var(--bone-0, #FBF8F0); font-weight: 600; }

/* Grid */
.evx-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--evx-card-min), 1fr));
  gap: 16px;
}

/* Card */
.evx-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  background: var(--ink-2, #1C1915);
  border: 1px solid var(--rule, #3A342B);
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.35);
  cursor: pointer;
  transition: background 80ms cubic-bezier(0.4, 0, 0.2, 1),
              border-color 80ms cubic-bezier(0.4, 0, 0.2, 1);
  animation: evx-fade-in 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.evx-card:hover { background: var(--ink-3, #28241E); border-color: var(--rule-strong, #4D453A); }

@keyframes evx-fade-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* Spectrum rail at top of card */
.evx-rail-strip {
  position: relative;
  height: 4px;
  background: linear-gradient(to right,
    var(--moss, #6B9460) 0%,
    var(--moss, #6B9460) 33%,
    var(--slate, #7A8A9C) 33%,
    var(--slate, #7A8A9C) 66%,
    var(--brick-1, #B8413A) 66%,
    var(--brick-1, #B8413A) 100%);
  border-radius: 2px;
  opacity: 0.5;
}
.evx-rail-strip .dot {
  position: absolute;
  top: -2px;
  width: 8px; height: 8px;
  margin-left: -4px;
  border-radius: 50%;
  background: var(--bone-0, #FBF8F0);
  border: 1.5px solid var(--ink-0, #0B0907);
  box-shadow: 0 1px 2px rgba(0,0,0,0.45);
}

/* Band-tinted card background tint */
.evx-card.band-explore  { background: linear-gradient(180deg, rgba(107,148,96,0.06), transparent 60%), var(--ink-2, #1C1915); }
.evx-card.band-middle   { background: linear-gradient(180deg, rgba(122,138,156,0.06), transparent 60%), var(--ink-2, #1C1915); }
.evx-card.band-exploit  { background: linear-gradient(180deg, rgba(184,65,58,0.08), transparent 60%), var(--ink-2, #1C1915); }

/* Card header */
.evx-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.evx-card-title {
  font-family: "Fraunces", "Geist", serif;
  font-weight: 500;
  font-variation-settings: "opsz" 60;
  font-size: 15px;
  line-height: 1.25;
  letter-spacing: -0.005em;
  color: var(--bone-0, #FBF8F0);
  margin: 0;
}
.evx-band-pill {
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 9999px;
  font-family: "Geist Mono", monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-width: 1px;
  border-style: solid;
}
.evx-band-pill.band-explore  { background: rgba(107,148,96,0.14); color: var(--moss, #6B9460); border-color: rgba(107,148,96,0.32); }
.evx-band-pill.band-middle   { background: rgba(122,138,156,0.14); color: var(--slate, #7A8A9C); border-color: rgba(122,138,156,0.32); }
.evx-band-pill.band-exploit  { background: rgba(184,65,58,0.14); color: var(--brick-0, #D45A52); border-color: var(--brick-rule, rgba(184,65,58,0.32)); }

/* Axis summary */
.evx-axes { display: grid; grid-template-columns: 72px 1fr; gap: 4px 8px; }
.evx-axes .lane {
  font-family: "Geist Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bone-3, #8F8670);
  align-self: center;
}
.evx-axes .val {
  font-family: "Geist", system-ui, sans-serif;
  font-size: 13px;
  color: var(--bone-1, #EDE6D7);
  line-height: 1.3;
  word-break: break-word;
}
.evx-axes .val.unset { color: var(--bone-4, #645C4C); font-style: italic; }

/* Numeric strip */
.evx-nums {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: var(--bone-1, #EDE6D7);
  padding: 6px 0;
  border-top: 1px solid var(--rule, #3A342B);
  border-bottom: 1px solid var(--rule, #3A342B);
}
.evx-nums .k { display: block; color: var(--bone-3, #8F8670); font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; }

/* Hypothesis blurb */
.evx-hypo {
  font-family: "Geist", system-ui, sans-serif;
  font-size: 12px;
  line-height: 1.5;
  color: var(--bone-2, #C4BAA3);
}
.evx-hypo strong { color: var(--bone-1, #EDE6D7); font-weight: 500; }

/* Confidence breakdown */
.evx-conf-breakdown {
  font-family: "Geist Mono", monospace;
  font-size: 10px;
  line-height: 1.5;
  color: var(--bone-3, #8F8670);
  padding: 6px 0;
  border-top: 1px dashed var(--rule, #3A342B);
}
.evx-conf-eyebrow {
  display: block;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bone-2, #C4BAA3);
  margin-bottom: 2px;
}
.evx-conf-breakdown b { color: var(--bone-0, #FBF8F0); font-weight: 600; }
.evx-conf-breakdown sup { font-size: 8px; }

.evx-evidence-head {
  font-family: "Geist Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bone-3, #8F8670);
  margin-bottom: 2px;
}
.evx-evw { color: var(--moss, #6B9460); font-weight: 600; }

/* Evidence chips */
.evx-evidence { display: flex; flex-direction: column; gap: 4px; }
.evx-evchip {
  display: flex;
  gap: 6px;
  font-family: "Geist Mono", monospace;
  font-size: 10px;
  color: var(--bone-3, #8F8670);
  padding: 4px 6px;
  background: var(--ink-1, #12100E);
  border: 1px solid var(--rule, #3A342B);
  border-radius: 4px;
}
.evx-evchip .src { color: var(--brick-0, #D45A52); font-weight: 600; }
.evx-evchip .snip { color: var(--bone-2, #C4BAA3); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* "Add to brief queue" — secondary CTA in card footer */
.evx-card-actions {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--rule, #3A342B);
  display: flex;
  justify-content: flex-end;
}
.evx-add-btn {
  background: transparent;
  border: 1px solid var(--brick-rule, rgba(184,65,58,0.32));
  color: var(--brick-0, #D45A52);
  border-radius: 6px;
  padding: 6px 12px;
  font-family: "Geist", system-ui, sans-serif;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 80ms cubic-bezier(0.4, 0, 0.2, 1),
              color 80ms cubic-bezier(0.4, 0, 0.2, 1);
}
.evx-add-btn:hover:not([disabled]) {
  background: var(--brick-wash, rgba(184,65,58,0.10));
  color: var(--brick-1, #B8413A);
}
.evx-add-btn[disabled] {
  cursor: default;
  opacity: 0.7;
}
.evx-add-btn.is-added {
  background: rgba(107,148,96,0.14);
  color: var(--moss, #6B9460);
  border-color: rgba(107,148,96,0.32);
}
.evx-card-title { cursor: pointer; }

/* Family card variants */
.evx-card.is-family { padding-bottom: 16px; }
.evx-family-meta {
  display: flex;
  justify-content: space-between;
  font-family: "Geist Mono", monospace;
  font-size: 10px;
  color: var(--bone-3, #8F8670);
  padding-top: 4px;
}
.evx-family-coverage { font-variant-numeric: tabular-nums; }

/* Mini family-spectrum: variant dots on a rail */
.evx-mini-spectrum {
  position: relative;
  height: 14px;
  margin: 4px 0;
}
.evx-mini-spectrum .rail {
  position: absolute;
  top: 6px; left: 0; right: 0;
  height: 2px;
  background: var(--rule, #3A342B);
}
.evx-mini-spectrum .vdot {
  position: absolute;
  top: 3px;
  width: 6px; height: 6px;
  margin-left: -3px;
  border-radius: 50%;
  background: var(--bone-3, #8F8670);
}
.evx-mini-spectrum .vdot.band-explore { background: var(--moss, #6B9460); }
.evx-mini-spectrum .vdot.band-middle  { background: var(--slate, #7A8A9C); }
.evx-mini-spectrum .vdot.band-exploit { background: var(--brick-1, #B8413A); }

/* Expanded family-variant list */
.evx-variants {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 8px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--rule, #3A342B);
  animation: evx-fade-in 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.evx-variants .v {
  padding: 8px;
  background: var(--ink-1, #12100E);
  border: 1px solid var(--rule, #3A342B);
  border-radius: 4px;
  font-size: 11px;
  color: var(--bone-2, #C4BAA3);
}
.evx-variants .v .lane { color: var(--bone-3, #8F8670); font-family: "Geist Mono", monospace; font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; }
.evx-variants .v .val  { color: var(--bone-1, #EDE6D7); font-size: 12px; }

/* Empty / loading states */
.evx-empty {
  padding: 48px 24px;
  text-align: center;
  color: var(--bone-3, #8F8670);
  border: 1px dashed var(--rule, #3A342B);
  border-radius: 6px;
  font-family: "Geist", system-ui, sans-serif;
}
.evx-empty h3 {
  font-family: "Fraunces", "Geist", serif;
  font-variation-settings: "opsz" 60;
  font-size: 18px;
  color: var(--bone-1, #EDE6D7);
  margin: 0 0 8px 0;
}

/* ── Concept-detail modal ───────────────────────────────────────────── */
#evx-modal {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; justify-content: center; align-items: flex-start;
  padding: 48px 24px;
  font-family: "Geist", system-ui, sans-serif;
}
.evx-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
}
.evx-modal-panel {
  position: relative;
  width: min(960px, 100%);
  max-height: calc(100vh - 96px);
  overflow-y: auto;
  background: var(--ink-2, #1C1915);
  border: 1px solid var(--rule, #3A342B);
  border-radius: 16px;
  padding: 32px 36px 24px;
  color: var(--bone-1, #EDE6D7);
  box-shadow: 0 20px 48px rgba(0,0,0,0.55);
  animation: evx-fade-in 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.evx-modal-loading {
  padding: 64px; text-align: center;
  font-family: "Geist Mono", monospace; font-size: 12px;
  color: var(--bone-3, #8F8670); letter-spacing: 0.1em;
  text-transform: uppercase;
}
.evx-modal-close {
  position: absolute; top: 12px; right: 12px;
  width: 32px; height: 32px; border-radius: 50%;
  background: transparent; border: 1px solid var(--rule, #3A342B);
  color: var(--bone-2, #C4BAA3);
  font-family: "Geist Mono", monospace; font-size: 18px; line-height: 1;
  cursor: pointer;
}
.evx-modal-close:hover { background: var(--ink-3, #28241E); color: var(--bone-0, #FBF8F0); }

.evx-modal-head { margin-bottom: 24px; }
.evx-modal-eyebrow {
  display: block;
  font-family: "Geist Mono", monospace;
  font-size: 10px; letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bone-3, #8F8670);
  margin-bottom: 6px;
}
.evx-modal-title {
  font-family: "Fraunces", "Geist", serif;
  font-variation-settings: "opsz" 96;
  font-weight: 500;
  font-size: 28px; line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--bone-0, #FBF8F0);
  margin: 0 0 12px;
}
.evx-modal-stats {
  display: flex; gap: 16px;
  font-family: "Geist Mono", monospace; font-size: 12px;
  color: var(--bone-3, #8F8670);
}
.evx-modal-stats b { color: var(--bone-0, #FBF8F0); font-weight: 600; }

.evx-modal-section {
  padding: 16px 0;
  border-top: 1px solid var(--rule, #3A342B);
}
.evx-modal-section:first-of-type { border-top: none; padding-top: 0; }
.evx-modal-section h3 {
  font-family: "Fraunces", "Geist", serif;
  font-variation-settings: "opsz" 60;
  font-weight: 500;
  font-size: 18px;
  margin: 0 0 12px;
  color: var(--bone-0, #FBF8F0);
}
.evx-modal-subhead {
  font-family: "Geist Mono", monospace;
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--bone-3, #8F8670);
  margin: 12px 0 6px;
}
.evx-modal-tag {
  display: inline-block;
  padding: 3px 9px;
  background: var(--ink-3, #28241E);
  border: 1px solid var(--rule, #3A342B);
  border-radius: 9999px;
  font-family: "Geist Mono", monospace;
  font-size: 10px; letter-spacing: 0.08em;
  color: var(--bone-2, #C4BAA3);
  margin: 0 6px 6px 0;
}
.evx-modal-tag.is-on {
  background: var(--brick-wash, rgba(184,65,58,0.10));
  color: var(--brick-0, #D45A52);
  border-color: var(--brick-rule, rgba(184,65,58,0.32));
}
.evx-modal-field { margin: 8px 0; }
.evx-modal-field-label {
  display: block;
  font-family: "Geist Mono", monospace;
  font-size: 10px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--bone-3, #8F8670);
  margin-bottom: 2px;
}
.evx-modal-field-value {
  font-size: 13px; line-height: 1.5;
  color: var(--bone-1, #EDE6D7);
  white-space: pre-wrap; word-break: break-word;
}

.evx-modal-ads { display: flex; flex-direction: column; gap: 10px; }
.evx-modal-ad {
  display: flex; gap: 12px;
  padding: 10px 12px;
  background: var(--ink-1, #12100E);
  border: 1px solid var(--rule, #3A342B);
  border-radius: 6px;
}
.evx-modal-ad-img {
  width: 96px; height: 96px;
  object-fit: cover; border-radius: 4px; flex-shrink: 0;
  background: var(--ink-3, #28241E);
}
.evx-modal-ad-body-col { flex: 1; min-width: 0; }
.evx-modal-ad-meta {
  display: flex; gap: 12px; flex-wrap: wrap;
  font-family: "Geist Mono", monospace; font-size: 11px;
  color: var(--moss, #6B9460);
  margin-bottom: 4px;
}
.evx-modal-ad-meta b { color: var(--bone-0, #FBF8F0); }
.evx-modal-ad-matches {
  display: flex; gap: 4px; flex-wrap: wrap;
  margin-bottom: 4px;
}
.evx-modal-ad-match {
  font-family: "Geist Mono", monospace; font-size: 9px;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 1px 6px;
  background: var(--brick-wash, rgba(184,65,58,0.10));
  color: var(--brick-0, #D45A52);
  border: 1px solid var(--brick-rule, rgba(184,65,58,0.32));
  border-radius: 9999px;
}
.evx-modal-ad-head {
  font-weight: 600; color: var(--bone-1, #EDE6D7);
  font-size: 13px; margin-bottom: 2px;
}
.evx-modal-ad-body {
  font-size: 12px; line-height: 1.4;
  color: var(--bone-2, #C4BAA3);
}
.evx-modal-counts {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 6px 0 10px;
}
.evx-modal-count {
  font-family: "Geist Mono", monospace; font-size: 11px;
  padding: 3px 9px;
  background: var(--ink-1, #12100E);
  border: 1px solid var(--rule, #3A342B);
  border-radius: 9999px;
  color: var(--bone-2, #C4BAA3);
}
.evx-modal-count b { color: var(--bone-0, #FBF8F0); font-weight: 600; }
.evx-modal-tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0; }
.evx-modal-list { display: flex; flex-direction: column; gap: 6px; }
.evx-modal-row {
  padding: 8px 12px;
  background: var(--ink-1, #12100E);
  border: 1px solid var(--rule, #3A342B);
  border-radius: 6px;
}
.evx-modal-row-head {
  font-family: "Geist", system-ui, sans-serif;
  font-weight: 600; color: var(--bone-1, #EDE6D7);
  font-size: 12px;
}
.evx-modal-row-sub {
  font-family: "Geist", system-ui, sans-serif;
  font-size: 12px; line-height: 1.4;
  color: var(--bone-2, #C4BAA3);
  margin-top: 2px;
}
.evx-modal-row-sub b {
  color: var(--bone-3, #8F8670);
  font-weight: 600; font-family: "Geist Mono", monospace;
  font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase;
  margin-right: 4px;
}
.evx-modal-row-meta {
  font-family: "Geist Mono", monospace; font-size: 10px;
  color: var(--bone-3, #8F8670);
  margin-top: 2px;
}
.evx-modal-evidence {
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px dashed var(--rule, #3A342B);
}
.evx-modal-empty {
  padding: 12px;
  background: var(--ink-1, #12100E);
  border: 1px dashed var(--rule, #3A342B);
  border-radius: 6px;
  font-family: "Geist", system-ui, sans-serif;
  font-size: 12px; color: var(--bone-3, #8F8670); font-style: italic;
}

.evx-modal-voc { display: flex; flex-direction: column; gap: 8px; }
.evx-modal-voc-row {
  padding: 8px 12px;
  background: var(--ink-1, #12100E);
  border-left: 2px solid var(--brick-1, #B8413A);
  border-radius: 0 4px 4px 0;
}
.evx-modal-voc-meta {
  display: flex; gap: 10px;
  font-family: "Geist Mono", monospace; font-size: 10px;
  color: var(--bone-3, #8F8670);
  margin-bottom: 4px;
  text-transform: uppercase; letter-spacing: 0.08em;
}
.evx-modal-voc-text {
  font-family: "Fraunces", "Geist", serif;
  font-style: italic; font-size: 13px; line-height: 1.5;
  color: var(--bone-1, #EDE6D7);
}

.evx-modal-footer {
  position: sticky; bottom: 0;
  margin: 16px -36px -24px;
  padding: 16px 36px;
  background: var(--ink-2, #1C1915);
  border-top: 1px solid var(--rule, #3A342B);
  display: flex; justify-content: flex-end;
}
.evx-modal-add {
  padding: 10px 20px;
  background: var(--brick-1, #B8413A);
  color: var(--bone-0, #FBF8F0);
  border: 1px solid var(--brick-2, #8F2D27);
  border-radius: 6px;
  font-family: "Geist", system-ui, sans-serif;
  font-weight: 600; font-size: 13px;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 1px 0 var(--brick-ink, #3A1510);
}
.evx-modal-add:hover:not([disabled]) { background: var(--brick-0, #D45A52); }
.evx-modal-add.is-added {
  background: rgba(107,148,96,0.18);
  color: var(--moss, #6B9460);
  border-color: rgba(107,148,96,0.4);
  cursor: default;
}

/* ── View toggle (3-way: Concepts | Families | Matrix) ──────────────── */
.evx-view-toggle {
  display: inline-flex;
  align-items: stretch;
  background: var(--ink-1, #12100E);
  border: 1px solid var(--rule, #3A342B);
  border-radius: 6px;
  padding: 2px;
  margin-right: 12px;
}
.evx-view-btn {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 6px 12px;
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bone-3, #8F8670);
  cursor: pointer;
  border-radius: 4px;
  transition: background 140ms ease, color 140ms ease;
}
.evx-view-btn:hover {
  color: var(--bone-1, #EDE6D7);
  background: rgba(255,255,255,0.03);
}
.evx-view-btn.is-active {
  background: var(--brick-1, #B8413A);
  color: var(--bone-0, #FBF8F0);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12);
}

/* ── Select-mode toggle + checkboxes on cards ───────────────────────── */
.evx-select-toggle.is-active {
  background: rgba(184, 65, 58, 0.15);
  border-color: var(--brick-1, #B8413A);
  color: var(--brick-0, #D45A52);
}
.evx-select-checkbox {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ink-2, #1C1915);
  border: 1px solid var(--rule, #3A342B);
  border-radius: 3px;
  cursor: pointer;
  z-index: 3;
}
.evx-select-checkbox input[type="checkbox"] {
  margin: 0;
  width: 12px;
  height: 12px;
  accent-color: var(--brick-1, #B8413A);
  cursor: pointer;
}
.evx-card.is-selected {
  outline: 2px solid var(--brick-1, #B8413A);
  outline-offset: -2px;
  box-shadow: 0 0 0 1px rgba(184, 65, 58, 0.35),
              0 4px 12px rgba(184, 65, 58, 0.18);
}
.evx-card { position: relative; }

/* ── Sticky selection footer ───────────────────────────────────────── */
.evx-select-footer {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--ink-2, #1C1915);
  border-top: 1px solid var(--rule, #3A342B);
  box-shadow: 0 -4px 16px rgba(0,0,0,0.35);
  z-index: 200;
  animation: evxFooterIn 220ms cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes evxFooterIn {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.evx-select-footer-inner {
  max-width: 1600px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.evx-select-counts {
  font-family: "Geist Mono", monospace;
  font-size: 12px;
  color: var(--bone-1, #EDE6D7);
  letter-spacing: 0.04em;
}
.evx-select-counts b {
  color: var(--brick-0, #D45A52);
  font-weight: 600;
}
.evx-select-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.evx-select-add {
  padding: 8px 16px;
  font-size: 12px;
}

/* ── Expanded family variants — full enumeration grid ───────────────── */
.evx-variants {
  margin-top: 10px;
  padding: 12px;
  background: var(--ink-1, #12100E);
  border-top: 1px solid var(--rule, #3A342B);
  border-radius: 0 0 4px 4px;
}
.evx-variants-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.evx-variants-count {
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  color: var(--bone-3, #8F8670);
  letter-spacing: 0.04em;
}
.evx-variants-count b { color: var(--bone-1, #EDE6D7); }
.evx-variants-actions {
  display: inline-flex;
  gap: 6px;
}
.evx-variants-add-all {
  background: rgba(184, 65, 58, 0.15);
  border-color: var(--brick-1, #B8413A);
  color: var(--brick-0, #D45A52);
}
.evx-variants-add-all:hover {
  background: rgba(184, 65, 58, 0.25);
}
.evx-variants-add-all.is-added {
  background: rgba(107,148,96,0.18);
  color: var(--moss, #6B9460);
  border-color: rgba(107,148,96,0.4);
}
.evx-variants-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}
.evx-variants-grid .v {
  position: relative;
  background: var(--ink-2, #1C1915);
  border: 1px solid var(--rule, #3A342B);
  border-radius: 4px;
  padding: 8px 10px;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.evx-variants-grid .v.is-selected {
  outline: 1px solid var(--brick-1, #B8413A);
  outline-offset: -1px;
}
.evx-variants-grid .v .lane {
  font-family: "Geist Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bone-3, #8F8670);
  margin-right: 4px;
}
.evx-variants-grid .v .val {
  color: var(--bone-1, #EDE6D7);
}
.evx-variant-checkbox {
  position: absolute;
  top: 6px;
  right: 6px;
}
.evx-variant-checkbox input { accent-color: var(--brick-1, #B8413A); cursor: pointer; }
.v-mini-spectrum {
  position: relative;
  height: 4px;
  margin-bottom: 4px;
}
.v-mini-spectrum .rail {
  position: absolute;
  inset: 0;
  background: var(--ink-3, #28241E);
  border-radius: 2px;
}
.v-mini-spectrum .vdot {
  position: absolute;
  top: -2px;
  width: 8px; height: 8px;
  margin-left: -4px;
  border-radius: 50%;
  background: var(--bone-3, #8F8670);
}
.v-mini-spectrum .vdot.band-exploit { background: var(--brick-1, #B8413A); }
.v-mini-spectrum .vdot.band-explore { background: var(--moss, #6B9460); }
.v-mini-spectrum .vdot.band-middle  { background: var(--bone-3, #8F8670); }
.v-meta {
  display: flex;
  gap: 8px;
  font-family: "Geist Mono", monospace;
  font-size: 10px;
  color: var(--bone-3, #8F8670);
  font-variant-numeric: tabular-nums;
}
.v-band {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 1px 4px;
  border-radius: 2px;
  font-weight: 600;
}
.v-band.band-exploit {
  background: rgba(184, 65, 58, 0.15);
  color: var(--brick-0, #D45A52);
}
.v-band.band-explore {
  background: rgba(107, 148, 96, 0.15);
  color: var(--moss, #6B9460);
}
.v-band.band-middle {
  background: rgba(143, 134, 112, 0.15);
  color: var(--bone-3, #8F8670);
}
.v-actions {
  display: flex;
  gap: 4px;
  margin-top: 4px;
}
.v-actions .evx-chip {
  padding: 3px 6px;
  font-size: 10px;
}
.evx-family-expand-btn {
  margin-left: auto;
  background: transparent;
  border: 1px solid var(--rule, #3A342B);
  color: var(--bone-3, #8F8670);
  padding: 3px 8px;
  border-radius: 3px;
  font-family: "Geist Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.06em;
  cursor: pointer;
}
.evx-family-expand-btn:hover {
  border-color: var(--brick-1, #B8413A);
  color: var(--brick-0, #D45A52);
}

/* ── Matrix cells view ─────────────────────────────────────────────── */
.evx-matrix-pane {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.evx-matrix-pickers {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  padding: 12px 16px;
  background: var(--ink-2, #1C1915);
  border: 1px solid var(--rule, #3A342B);
  border-radius: 6px;
}
.evx-matrix-picker {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 160px;
}
.evx-matrix-picker select {
  appearance: none;
  background: var(--ink-1, #12100E);
  color: var(--bone-1, #EDE6D7);
  border: 1px solid var(--rule, #3A342B);
  border-radius: 4px;
  padding: 6px 10px;
  font-family: "Geist", system-ui, sans-serif;
  font-size: 12px;
  cursor: pointer;
}
.evx-matrix-metric-pills {
  display: inline-flex;
  gap: 4px;
}
.evx-matrix-wrap {
  overflow: auto;
  background: var(--ink-2, #1C1915);
  border: 1px solid var(--rule, #3A342B);
  border-radius: 6px;
}
.evx-mx-table {
  border-collapse: collapse;
  width: 100%;
  font-family: "Geist Mono", monospace;
}
.evx-mx-table th,
.evx-mx-table td {
  border: 1px solid var(--rule, #3A342B);
  padding: 0;
}
.evx-mx-corner {
  background: var(--ink-1, #12100E);
  padding: 10px 12px !important;
  font-family: "Fraunces", "Geist", serif;
  font-size: 14px;
  font-weight: 500;
  font-style: italic;
  color: var(--bone-3, #8F8670);
  text-align: left;
  white-space: nowrap;
  min-width: 160px;
}
.evx-mx-corner em {
  font-style: normal;
  color: var(--brick-1, #B8413A);
  margin: 0 4px;
}
.evx-mx-col-head {
  background: var(--ink-1, #12100E);
  padding: 10px 8px !important;
  font-family: "Fraunces", "Geist", serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--bone-0, #FBF8F0);
  text-align: center;
  vertical-align: bottom;
  min-width: 96px;
  max-width: 140px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.evx-mx-row-head {
  background: var(--ink-1, #12100E);
  padding: 10px 12px !important;
  font-family: "Fraunces", "Geist", serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--bone-0, #FBF8F0);
  text-align: left;
  vertical-align: middle;
  min-width: 160px;
  letter-spacing: -0.01em;
}
.evx-mx-cell {
  position: relative;
  padding: 12px 10px !important;
  min-width: 96px;
  height: 76px;
  /* Background is set inline by the renderer using a diverging red→amber→green
     palette computed from the cell's percentile rank within the active cohort. */
  color: var(--bone-0, #FBF8F0);
  cursor: pointer;
  text-align: center;
  vertical-align: middle;
  transition: filter 120ms ease;
}
.evx-mx-cell:hover {
  filter: brightness(1.15);
  outline: 1px solid var(--brick-1, #B8413A);
  outline-offset: -1px;
}
.evx-mx-cell.is-dark {
  background: var(--ink-1, #12100E);
  color: var(--bone-3, #8F8670);
}
.evx-mx-cell.is-selected {
  outline: 2px solid var(--brick-1, #B8413A);
  outline-offset: -2px;
}
.evx-mx-val {
  font-family: "Geist Mono", monospace;
  font-size: 16px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.evx-mx-cell.is-dark .evx-mx-val { font-weight: 400; opacity: 0.6; }
.evx-mx-sub {
  margin-top: 4px;
  font-size: 10px;
  color: rgba(255, 248, 240, 0.7);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}
.evx-mx-cell.is-dark .evx-mx-sub { color: var(--bone-3, #8F8670); }
.evx-mx-cell.is-untested .evx-mx-val {
  font-family: "Geist Mono", monospace;
  font-style: italic;
  color: var(--bone-2, #C9C0A8);
  opacity: 0.85;
}
.evx-mx-cell.is-untested.is-dark .evx-mx-val {
  color: var(--bone-3, #8F8670);
}
.evx-mx-ev-pill {
  font-family: "Geist Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--moss, #6B9460);
  padding: 1px 5px;
  border: 1px solid rgba(107, 148, 96, 0.35);
  border-radius: 2px;
  background: rgba(107, 148, 96, 0.08);
}
.evx-mx-cell.is-dark .evx-mx-ev-pill {
  color: var(--bone-3, #8F8670);
  border-color: var(--rule, #3A342B);
  background: transparent;
}
.evx-mx-na {
  font-family: "Geist Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bone-3, #8F8670);
  opacity: 0.7;
}

/* ── Color legend ─────────────────────────────────────────────────────── */
.evx-mx-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 10px 14px;
  background: var(--ink-2, #1C1915);
  border: 1px solid var(--rule, #3A342B);
  border-radius: 6px;
  font-family: "Geist Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.04em;
}
.evx-mx-legend-both {
  flex-direction: column;
  align-items: flex-start;
}
.evx-mx-legend-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}
.evx-mx-legend-label {
  text-transform: uppercase;
  font-weight: 600;
  color: var(--bone-1, #EDE6D7);
  min-width: 90px;
}
.evx-mx-legend-bar {
  flex: 1;
  height: 10px;
  border-radius: 2px;
  border: 1px solid var(--rule, #3A342B);
  min-width: 180px;
}
.evx-mx-legend-perf {
  background: linear-gradient(to right,
    var(--ink-3, #28241E) 0%,
    var(--brick-2, #8F2D27) 60%,
    var(--brick-1, #B8413A) 100%);
}
.evx-mx-legend-ev {
  background: linear-gradient(to right,
    var(--ink-3, #28241E) 0%,
    #3D5A38 60%,
    var(--moss, #6B9460) 100%);
}
.evx-mx-legend-diverging {
  background: linear-gradient(to right,
    rgb(76, 27, 24) 0%,
    rgb(143, 45, 39) 22%,
    rgb(157, 116, 70) 45%,
    rgb(120, 130, 90) 55%,
    rgb(107, 148, 96) 78%,
    rgb(40, 78, 50) 100%);
}
.evx-mx-legend-cap {
  text-transform: uppercase;
  color: var(--bone-3, #8F8670);
  font-size: 9px;
}
.evx-mx-legend-cap-right { margin-left: -4px; }
.evx-mx-legend-cap-mid {
  position: relative;
  flex: 0 0 auto;
}
.evx-mx-legend-hint {
  flex-basis: 100%;
  font-family: "Geist", system-ui, sans-serif;
  font-size: 11px;
  letter-spacing: normal;
  color: var(--bone-3, #8F8670);
  font-style: italic;
}
.evx-mx-thumb {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 28px;
  height: 28px;
  object-fit: cover;
  border-radius: 3px;
  border: 1px solid rgba(0,0,0,0.4);
  background: var(--ink-1, #12100E);
}
.evx-mx-checkbox {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 14px;
  height: 14px;
}
.evx-mx-checkbox input { accent-color: var(--brick-1, #B8413A); cursor: pointer; }

/* Reserve bottom padding for sticky footer so cards aren't covered. */
#evx-root:has(.evx-select-footer) main.evx-main {
  padding-bottom: 80px;
}

/* ───────────────────────────────────────────────────────────────────────
   Competitor Coverage Matrix — added 2026-05-22 (covers strip, cell badges,
   top-opps sidebar). Mirrors DESIGN.md tokens: --brick-1 for you_only,
   --moss for both, --amber for them_only, --bone-2 + dashed --rule for
   whitespace. No new colors introduced.
   ──────────────────────────────────────────────────────────────────────── */

.evx-strip {
  margin: var(--s-12, 12px) 0 var(--s-16, 16px);
  padding: var(--s-12, 12px);
  border: 1px solid var(--rule, #3A342B);
  border-radius: var(--r-sm, 4px);
  background: var(--ink-2, #1C1915);
}
.evx-strip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-8, 8px);
  margin-bottom: var(--s-8, 8px);
}
.evx-strip-legend {
  display: flex; flex-wrap: wrap; gap: var(--s-8, 8px);
  font: 500 10px/1 'Geist Mono', monospace;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--bone-3, #8F8670);
}
.evx-strip-key {
  padding: 2px 8px;
  border: 1px solid var(--rule, #3A342B);
  border-radius: var(--r-pill, 9999px);
}
.evx-strip-key.is-cov-you_only   { color: #D45A52; border-color: rgba(184,65,58,0.45); }
.evx-strip-key.is-cov-both       { color: #6B9460; border-color: rgba(107,148,96,0.45); }
.evx-strip-key.is-cov-them_only  { color: #C8872E; border-color: rgba(200,135,46,0.45); }
.evx-strip-key.is-cov-whitespace { color: var(--bone-2, #C4BAA3); border-style: dashed; }

.evx-strip-empty {
  padding: var(--s-8, 8px) var(--s-12, 12px);
  margin-bottom: var(--s-8, 8px);
  border: 1px dashed var(--rule, #3A342B);
  border-radius: var(--r-sm, 4px);
  color: var(--bone-3, #8F8670);
  font: 400 12px/1.5 'Geist', sans-serif;
}

.evx-strip-row {
  display: grid;
  grid-template-columns: 96px 1fr;
  align-items: center;
  gap: var(--s-12, 12px);
  padding: var(--s-6, 6px) 0;
  border-top: 1px solid var(--rule, #3A342B);
}
.evx-strip-row:first-of-type { border-top: 0; }
.evx-strip-row-head {
  font: 500 11px/1 'Geist Mono', monospace;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--bone-3, #8F8670);
}
.evx-strip-cells {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-6, 6px);
}
.evx-strip-cell {
  display: inline-flex; align-items: center; gap: var(--s-4, 4px);
  padding: 4px 8px;
  border: 1px solid var(--rule, #3A342B);
  border-radius: var(--r-sm, 4px);
  background: var(--ink-3, #28241E);
  color: var(--bone-1, #EDE6D7);
  font: 400 12px/1.2 'Geist', sans-serif;
  cursor: pointer;
  transition: transform 80ms cubic-bezier(0.4, 0, 0.2, 1), border-color 80ms;
}
.evx-strip-cell:hover { transform: translateY(-1px); border-color: var(--rule-strong, #4D453A); }
.evx-strip-cell.is-cov-you_only   { background: rgba(184,65,58,0.16); border-color: rgba(184,65,58,0.55); }
.evx-strip-cell.is-cov-both       { background: rgba(107,148,96,0.18); border-color: rgba(107,148,96,0.55); }
.evx-strip-cell.is-cov-them_only  { background: rgba(200,135,46,0.16); border-color: rgba(200,135,46,0.55); }
.evx-strip-cell.is-cov-whitespace { background: rgba(196,186,163,0.04); border-style: dashed; color: var(--bone-2, #C4BAA3); }
.evx-strip-cell-glyph {
  font: 500 12px/1 'Geist Mono', monospace;
}
.evx-strip-cell-label { font-weight: 500; }
.evx-strip-cell-counts {
  font: 500 10px/1 'Geist Mono', monospace;
  letter-spacing: 0.06em;
  color: var(--bone-3, #8F8670);
}
.evx-strip-axes-label {
  font: 500 10px/1 'Geist Mono', monospace;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--bone-3, #8F8670);
  align-self: center;
  margin: 0 4px 0 8px;
}
.evx-strip-pin {
  display: flex; align-items: center; gap: var(--s-6, 6px);
  margin-left: auto;
}

/* Per-cell coverage layer. Sits on top of the existing diverging heat. */
.evx-mx-cell { position: relative; }
.evx-mx-cov-badge {
  position: absolute; top: 4px; left: 4px;
  font: 500 11px/1 'Geist Mono', monospace;
  color: var(--bone-1, #EDE6D7);
  opacity: 0.85;
  pointer-events: none;
}
.evx-mx-comp-count {
  position: absolute; top: 4px; right: 4px;
  font: 500 10px/1 'Geist Mono', monospace;
  letter-spacing: 0.06em;
  padding: 2px 5px;
  border-radius: var(--r-pill, 9999px);
  background: rgba(200,135,46,0.20);
  color: #EDE6D7;
  border: 1px solid rgba(200,135,46,0.45);
}
.evx-mx-cell.is-ev-strong { box-shadow: inset 0 0 0 2px rgba(237,230,215,0.30); }
.evx-mx-cell.is-ev-med    { box-shadow: inset 0 0 0 1px rgba(237,230,215,0.20); }
.evx-mx-cell.is-ev-weak   { box-shadow: none; }
.evx-mx-cell.is-cov-whitespace { border-style: dashed; }
.evx-mx-cell.evx-cell-flash {
  outline: 2px solid var(--brick-1, #B8413A);
  outline-offset: 2px;
  animation: evxCellFlash 1.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes evxCellFlash {
  0%   { outline-color: var(--brick-1, #B8413A); }
  50%  { outline-color: rgba(184,65,58,0.60); }
  100% { outline-color: transparent; }
}

/* Top-Opportunities sidebar — appears in 'coverage' + 'decision' heatBy modes. */
.evx-matrix-shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-16, 16px);
}
.evx-matrix-shell.has-sidebar {
  grid-template-columns: minmax(0, 1fr) 320px;
}
.evx-opps {
  border: 1px solid var(--rule, #3A342B);
  border-radius: var(--r-sm, 4px);
  background: var(--ink-2, #1C1915);
  padding: var(--s-12, 12px);
  max-height: 720px;
  overflow-y: auto;
}
.evx-opps-list {
  list-style: none;
  margin: var(--s-8, 8px) 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-6, 6px);
}
.evx-opps-row {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: var(--s-8, 8px);
  padding: var(--s-8, 8px);
  border: 1px solid var(--rule, #3A342B);
  border-radius: var(--r-sm, 4px);
  background: var(--ink-3, #28241E);
  cursor: pointer;
  transition: transform 80ms, border-color 80ms;
}
.evx-opps-row:hover { transform: translateX(2px); border-color: var(--rule-strong, #4D453A); }
.evx-opps-row.is-cov-whitespace { border-color: var(--bone-3, #8F8670); border-style: dashed; }
.evx-opps-row.is-cov-them_only  { border-color: rgba(200,135,46,0.55); }
.evx-opps-row.is-cov-you_only   { border-color: rgba(184,65,58,0.55); }
.evx-opps-row.is-cov-both       { border-color: rgba(107,148,96,0.55); }
.evx-opps-rank {
  font: 500 14px/1 'Fraunces', serif;
  color: var(--bone-2, #C4BAA3);
  text-align: center;
}
.evx-opps-title {
  font: 500 13px/1.3 'Geist', sans-serif;
  color: var(--bone-0, #FBF8F0);
}
.evx-opps-title em {
  font-style: italic;
  color: var(--brick-1, #B8413A);
  margin: 0 4px;
}
.evx-opps-reason {
  margin-top: 2px;
  font: 400 11px/1.4 'Geist', sans-serif;
  color: var(--bone-3, #8F8670);
}
.evx-opps-meta {
  margin-top: 4px;
  display: flex; gap: var(--s-8, 8px); align-items: center;
}
/* ── Strategy Plan CTA + modal ─────────────────────────────────────── */
.evx-strategy-plan-btn {
  width: 100%;
  background: var(--ink-2, #1C1915);
  color: var(--bone-1, #EDE6D7);
  border: 1px solid var(--moss, #6B9460);
  border-radius: 6px;
  padding: 10px 14px;
  font-family: "Geist", system-ui, sans-serif;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  transition: background 140ms ease;
}
.evx-strategy-plan-btn:hover:not([disabled]) {
  background: rgba(107, 148, 96, 0.12);
}
.evx-strategy-plan-btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.evx-strategy-panel {
  max-width: 720px;
}

.evx-strategy-total-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.evx-strategy-total-input {
  width: 100px;
  padding: 8px 12px;
  background: var(--ink-1, #12100E);
  color: var(--bone-0, #FBF8F0);
  border: 1px solid var(--rule, #3A342B);
  border-radius: 4px;
  font-family: "Geist Mono", monospace;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.evx-strategy-total-input:focus {
  outline: none;
  border-color: var(--brick-1, #B8413A);
}

.evx-strategy-source-chip {
  font-family: "Geist Mono", monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  background: var(--ink-3, #28241E);
  color: var(--bone-3, #8F8670);
  border: 1px solid var(--rule, #3A342B);
  border-radius: 3px;
}
.evx-strategy-source-chip.moss {
  color: var(--moss, #6B9460);
  border-color: rgba(107, 148, 96, 0.4);
  background: rgba(107, 148, 96, 0.08);
}

.evx-strategy-rationale {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  margin-bottom: 12px;
  background: rgba(107, 148, 96, 0.06);
  border-left: 2px solid var(--moss, #6B9460);
  border-radius: 0 4px 4px 0;
  font-family: "Geist", system-ui, sans-serif;
  font-size: 12px;
  font-style: italic;
  color: var(--bone-2, #C9C0A8);
}

.evx-strategy-sliders {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 10px;
}

.evx-strategy-slider-row {
  display: grid;
  grid-template-columns: 160px 1fr 60px 80px;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--ink-2, #1C1915);
  border-radius: 6px;
  border-left: 3px solid var(--rule, #3A342B);
}
.evx-strategy-slider-row.tone-moss  { border-left-color: var(--moss,  #6B9460); }
.evx-strategy-slider-row.tone-amber { border-left-color: #A07A3A; }
.evx-strategy-slider-row.tone-brick { border-left-color: var(--brick-1, #B8413A); }

.evx-strategy-slider-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.evx-strategy-slider-label > span:first-child {
  font-family: "Fraunces", "Geist", serif;
  font-weight: 500;
  font-size: 14px;
  color: var(--bone-0, #FBF8F0);
}
.evx-strategy-slider-hint {
  font-family: "Geist Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--bone-3, #8F8670);
}

.evx-strategy-slider-row input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: var(--ink-3, #28241E);
  border-radius: 2px;
  outline: none;
}
.evx-strategy-slider-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--brick-1, #B8413A);
  cursor: pointer;
  border: 2px solid var(--bone-0, #FBF8F0);
}
.evx-strategy-slider-row.tone-moss input[type="range"]::-webkit-slider-thumb { background: var(--moss, #6B9460); }
.evx-strategy-slider-row.tone-amber input[type="range"]::-webkit-slider-thumb { background: #A07A3A; }

.evx-strategy-slider-pct {
  font-family: "Geist Mono", monospace;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  color: var(--bone-1, #EDE6D7);
  text-align: right;
}
.evx-strategy-slider-pct b {
  font-weight: 600;
  color: var(--bone-0, #FBF8F0);
}
.evx-strategy-slider-count {
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  color: var(--bone-3, #8F8670);
  text-align: right;
}

.evx-strategy-toggle {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: var(--ink-2, #1C1915);
  border: 1px solid var(--rule, #3A342B);
  border-radius: 6px;
  cursor: pointer;
}
.evx-strategy-toggle input[type="checkbox"] {
  margin-top: 3px;
  accent-color: var(--brick-1, #B8413A);
  cursor: pointer;
}
.evx-strategy-toggle span {
  font-size: 12px;
  line-height: 1.5;
  color: var(--bone-2, #C9C0A8);
}
.evx-strategy-toggle span b {
  color: var(--bone-0, #FBF8F0);
  font-weight: 600;
}

.evx-strategy-name-input {
  width: 100%;
  padding: 8px 12px;
  background: var(--ink-1, #12100E);
  color: var(--bone-1, #EDE6D7);
  border: 1px solid var(--rule, #3A342B);
  border-radius: 4px;
  font-family: "Geist", system-ui, sans-serif;
  font-size: 13px;
}
.evx-strategy-name-input:focus {
  outline: none;
  border-color: var(--brick-1, #B8413A);
}

.evx-strategy-preview {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  background: var(--ink-1, #12100E);
  border: 1px solid var(--rule, #3A342B);
  border-radius: 6px;
}
.evx-strategy-preview-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Geist Mono", monospace;
  font-size: 13px;
  color: var(--bone-1, #EDE6D7);
  font-variant-numeric: tabular-nums;
}
.evx-strategy-preview-row b {
  font-weight: 600;
  font-size: 16px;
  color: var(--bone-0, #FBF8F0);
  min-width: 32px;
  text-align: right;
}
.evx-strategy-preview-band {
  font-family: "Geist Mono", monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 3px;
  min-width: 84px;
  text-align: center;
}
.evx-strategy-preview-band.band-explore { background: rgba(107, 148, 96, 0.16); color: var(--moss, #6B9460); }
.evx-strategy-preview-band.band-middle  { background: rgba(157, 116, 70, 0.16); color: #C99A6B; }
.evx-strategy-preview-band.band-exploit { background: rgba(184, 65, 58, 0.16); color: var(--brick-0, #D45A52); }

.evx-strategy-preview-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--rule, #3A342B);
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  color: var(--bone-3, #8F8670);
}

/* Reserve bottom padding for sticky footer so cards aren't covered. */
#evx-root:has(.evx-select-footer) main.evx-main {
  padding-bottom: 80px;
}

/* Tight viewports */
@media (max-width: 1100px) {
  #evx-root { grid-template-columns: 1fr; }
  .evx-rail { position: static; max-height: none; }
  .evx-matrix-shell.has-sidebar { grid-template-columns: 1fr; }
}

/* ───────────────────────────────────────────────────────────────────────
   EXPLOIT MODE — card grid, family accordion, "Start a New Family" modal.
   Mirrors DESIGN.md tokens (--moss for profit-positive, --brick for
   spend/loss, --bone for surfaces). No new colors introduced.
─────────────────────────────────────────────────────────────────────── */

/* Toolbar */
.evx-exploit-toolbar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--rule, #3A342B);
  background: var(--ink-2, #1C1915);
  position: sticky; top: 0; z-index: 8;
}
.evx-exploit-toolbar-spacer { flex: 1 1 auto; }
.evx-exploit-view-toggle { display: flex; gap: 4px; }
.evx-exploit-angle-toggle { display: flex; gap: 4px; align-items: center; }
.evx-exploit-tag-refresh { font-weight: 600; }
.evx-exploit-progress {
  margin: 0; padding: 4px 14px;
  background: var(--ink-2, #1C1915);
  border-bottom: 1px solid var(--rule, #3A342B);
}

/* Card grid */
.evx-exploit-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  padding: 14px;
}
.evx-exploit-card {
  display: flex; flex-direction: column;
  background: var(--ink-2, #1C1915);
  border: 1px solid var(--rule, #3A342B);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 120ms ease, transform 120ms ease;
}
.evx-exploit-card:hover {
  border-color: var(--brick-1, #B8413A);
  transform: translateY(-1px);
}
.evx-exploit-card-media {
  position: relative;
  background: var(--ink-1, #12100E);
  aspect-ratio: 4 / 5;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.evx-exploit-card-media img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.evx-exploit-card-media.no-img,
.evx-exploit-card-media .evx-no-img-placeholder {
  color: var(--bone-3, #8F8670);
  font-size: 11px; text-align: center; padding: 24px;
}
.evx-video-badge {
  position: absolute; top: 8px; left: 8px;
  background: rgba(0,0,0,0.7); color: var(--bone-0, #FBF8F0);
  font-family: "Geist Mono", monospace; font-size: 10px;
  padding: 2px 6px; border-radius: 3px;
}
.evx-class-pill {
  position: absolute; top: 8px; right: 8px;
  font-family: "Geist Mono", monospace; font-size: 10px;
  padding: 2px 6px; border-radius: 3px;
  background: rgba(0,0,0,0.7); color: var(--bone-0, #FBF8F0);
}
.evx-class-pill.is-winner   { background: rgba(107, 148, 96, 0.85); }
.evx-class-pill.is-scaling  { background: rgba(80, 200, 120, 0.85); }
.evx-class-pill.is-exception{ background: rgba(201, 154, 107, 0.85); }
.evx-class-pill.is-loser    { background: rgba(184, 65, 58, 0.7); }
.evx-class-pill.is-declining{ background: rgba(143, 45, 39, 0.7); }

.evx-exploit-card-body {
  padding: 10px 12px; flex: 1 1 auto;
  display: flex; flex-direction: column; gap: 6px;
}
.evx-exploit-card-title {
  font-size: 12px; font-weight: 600;
  color: var(--bone-0, #FBF8F0);
  line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.evx-exploit-card-headline {
  font-size: 11px; color: var(--bone-2, #C4BAA3);
  line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}

/* Perf row */
.evx-perf-row {
  display: flex; flex-wrap: wrap; gap: 4px 8px;
  font-family: "Geist Mono", monospace; font-size: 10px;
}
.evx-perf-item {
  color: var(--bone-2, #C4BAA3);
  display: inline-flex; align-items: center; gap: 2px;
}
.evx-perf-item.is-profit.is-pos { color: var(--moss, #6B9460); font-weight: 600; }
.evx-perf-item.is-profit.is-neg { color: var(--brick-0, #D45A52); font-weight: 600; }

/* Tag chips */
.evx-tag-chips {
  display: flex; flex-wrap: wrap; gap: 3px;
  margin-top: 2px;
}
.evx-tag-chip {
  font-size: 10px; padding: 2px 6px; border-radius: 3px;
  background: var(--ink-3, #28241E);
  color: var(--bone-2, #C4BAA3);
  border: 1px solid var(--rule, #3A342B);
}
.evx-tag-chip.is-product   { background: rgba(201, 154, 107, 0.16); color: #C99A6B; border-color: rgba(201, 154, 107, 0.35); }
.evx-tag-chip.is-audience  { background: rgba(74, 144, 217, 0.16); color: #6BA8E0; border-color: rgba(74, 144, 217, 0.35); }
.evx-tag-chip.is-angle     { background: rgba(184, 65, 58, 0.16); color: var(--brick-0, #D45A52); border-color: rgba(184, 65, 58, 0.35); }
.evx-tag-chip.is-offer     { background: rgba(107, 148, 96, 0.16); color: var(--moss, #6B9460); border-color: rgba(107, 148, 96, 0.35); }
.evx-tag-chip.is-format    { background: rgba(168, 85, 247, 0.16); color: #C084FC; border-color: rgba(168, 85, 247, 0.35); }
.evx-tag-chip.is-hook      { background: rgba(255, 179, 71, 0.16); color: #FFB347; border-color: rgba(255, 179, 71, 0.35); }
.evx-tag-chip.is-empty     { font-style: italic; color: var(--bone-3, #8F8670); }

.evx-exploit-card-actions {
  display: flex; gap: 6px;
  padding: 8px 12px;
  border-top: 1px solid var(--rule, #3A342B);
  background: var(--ink-1, #12100E);
}
.evx-exploit-card-actions .evx-chip { font-size: 11px; padding: 3px 8px; }
.evx-exploit-card-actions .evx-chip.is-primary {
  background: var(--brick-1, #B8413A);
  color: var(--bone-0, #FBF8F0);
  border-color: var(--brick-2, #8F2D27);
  font-weight: 600;
}

/* Family accordion */
.evx-exploit-families {
  display: flex; flex-direction: column; gap: 12px;
  padding: 14px;
}
.evx-exploit-family {
  border: 1px solid var(--rule, #3A342B);
  border-radius: 8px; overflow: hidden;
  background: var(--ink-2, #1C1915);
  transition: border-color 120ms;
}
.evx-exploit-family.is-selected {
  border-color: var(--brick-1, #B8413A);
  box-shadow: 0 0 0 1px rgba(184, 65, 58, 0.3);
}
.evx-exploit-family-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center; gap: 12px;
  padding: 10px 14px;
  background: var(--ink-3, #28241E);
  border-bottom: 1px solid var(--rule, #3A342B);
}
.evx-exploit-family-select input { transform: scale(1.2); cursor: pointer; }
.evx-exploit-family-name {
  font-weight: 600; color: var(--bone-0, #FBF8F0); font-size: 13px;
}
.evx-exploit-family-totals {
  display: flex; gap: 12px;
  font-family: "Geist Mono", monospace; font-size: 11px;
  color: var(--bone-2, #C4BAA3);
}
.evx-exploit-family-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 14px;
}
@media (max-width: 1100px) {
  .evx-exploit-family-body { grid-template-columns: 1fr; }
}
.evx-exploit-family-ads {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 6px;
}
.evx-exploit-mini-card {
  aspect-ratio: 4 / 5;
  background: var(--ink-1, #12100E);
  border: 1px solid var(--rule, #3A342B);
  border-radius: 4px;
  overflow: hidden; position: relative;
}
.evx-exploit-mini-card img {
  width: 100%; height: 100%; object-fit: cover;
}
.evx-exploit-mini-card .evx-no-img-placeholder {
  font-size: 10px; color: var(--bone-3, #8F8670);
  text-align: center; padding: 18px 4px;
}
.evx-exploit-mini-meta {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7);
  font-family: "Geist Mono", monospace; font-size: 10px;
  color: var(--bone-0, #FBF8F0);
  padding: 2px 4px; text-align: center;
}
.evx-exploit-mini-more {
  display: flex; align-items: center; justify-content: center;
  background: var(--ink-1, #12100E);
  color: var(--bone-3, #8F8670);
  font-size: 11px;
  border: 1px dashed var(--rule, #3A342B);
  border-radius: 4px;
  aspect-ratio: 4 / 5;
}

.evx-exploit-family-formats { display: flex; flex-direction: column; gap: 8px; }
.evx-format-row {
  display: flex; flex-wrap: wrap; gap: 4px;
}
.evx-format-chip {
  font-size: 11px; padding: 4px 8px; border-radius: 4px;
  background: var(--ink-3, #28241E);
  color: var(--bone-2, #C4BAA3);
  border: 1px solid var(--rule, #3A342B);
  cursor: pointer; transition: all 120ms;
}
.evx-format-chip.is-present {
  background: rgba(107, 148, 96, 0.12);
  color: var(--moss, #6B9460);
  border-color: rgba(107, 148, 96, 0.35);
  cursor: default;
}
.evx-format-chip.is-present em {
  font-style: normal; color: var(--bone-3, #8F8670); margin-left: 4px;
}
.evx-format-chip.is-missing:hover {
  border-color: var(--brick-1, #B8413A);
  color: var(--bone-0, #FBF8F0);
}
.evx-format-chip.is-picked {
  background: var(--brick-1, #B8413A);
  color: var(--bone-0, #FBF8F0);
  border-color: var(--brick-2, #8F2D27);
}
.evx-format-chip.is-empty {
  cursor: default; font-style: italic; color: var(--bone-3, #8F8670);
}

/* Selection footer bar (sticky) */
.evx-exploit-footer-bar {
  position: sticky; bottom: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px;
  background: var(--ink-2, #1C1915);
  border-top: 2px solid var(--brick-1, #B8413A);
  box-shadow: 0 -4px 16px rgba(0,0,0,0.4);
  color: var(--bone-1, #EDE6D7);
  font-size: 12px;
  z-index: 9;
}

/* "Start a New Family" modal */
.evx-modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex; align-items: center; justify-content: center;
  z-index: 30;
}
.evx-exploit-newfam-modal {
  background: var(--ink-1, #12100E);
  border: 1px solid var(--rule, #3A342B);
  border-radius: 10px;
  max-width: 720px; width: calc(100% - 32px);
  max-height: 80vh;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.evx-exploit-newfam-modal .evx-modal-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--rule, #3A342B);
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 12px;
}
.evx-exploit-newfam-modal .evx-modal-header h3 {
  margin: 4px 0 0 0; color: var(--bone-0, #FBF8F0); font-size: 16px;
}
.evx-exploit-newfam-modal .evx-modal-body {
  padding: 14px 16px; overflow-y: auto;
}
.evx-exploit-newfam-modal .evx-modal-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--rule, #3A342B);
  display: flex; justify-content: flex-end; gap: 8px;
  background: var(--ink-2, #1C1915);
}
