/* ════════════════════════════════════════════════════════════════
   TFFM TACTICAL WORKSHEET — Interactive Component Styles v1
   Extracted from static tactical-worksheet.html + extended with:
   - Interactive field styles (inputs, checkboxes, special controls)
   - Cluster activation states (locked / active / completed)
   - Engagement eval cells, mode cards, building diagram dots
   ════════════════════════════════════════════════════════════════ */

/* ── RESET + BASE ──────────────────────────────────────────────── */
.ws-root *, .ws-root *::before, .ws-root *::after { box-sizing: border-box; margin: 0; padding: 0; }

.ws-root {
  width: 100%;
  min-width: 1400px;
  background: #080810;
  font-family: -apple-system, 'Segoe UI', Arial, sans-serif;
  color: #e2e8f0;
  padding: 20px 24px 80px;
}

/* ── SHARED CARD ─────────────────────────────────────────────────*/
.ws-root .card {
  background: #0f0f1c;
  border: 1px solid #1a1a30;
  border-radius: 8px;
  overflow: visible;          /* allow pulse ring to show */
  display: flex;
  flex-direction: column;
  transition: opacity 0.4s ease, box-shadow 0.35s ease;
}
.ws-root .ch {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 11px; border-bottom: 1px solid #1a1a30; flex-shrink: 0;
  position: relative;
}
.ws-root .cd { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.ws-root .ct { font-size: 9px; font-weight: 800; letter-spacing: 0.15em; text-transform: uppercase; }
.ws-root .cbadge {
  margin-left: auto; background: #181828; border-radius: 3px;
  padding: 2px 6px; font-size: 8px; font-weight: 700; color: #3a3a55;
  letter-spacing: 0.1em; white-space: nowrap;
}
.ws-root .cb { padding: 9px 11px; flex: 1; }

/* ── CLUSTER COMPLETION BADGE ────────────────────────────────────*/
.ws-cluster-badge {
  display: none;
  font-size: 9px; font-weight: 800;
  position: absolute; right: 38px; top: 50%;
  transform: translateY(-50%);
}
.cluster-completed .ws-cluster-badge { display: block; }

/* ── HEADER ──────────────────────────────────────────────────────*/
.ws-root .header {
  display: flex; flex-direction: column; align-items: center;
  margin-bottom: 14px; padding-bottom: 14px;
  border-bottom: 2px solid #dc2626; position: relative;
}
.ws-root .header-logo { width: 200px; height: 133px; object-fit: contain; border-radius: 10px; margin-bottom: 8px; }
.ws-root .header-title { font-size: 34px; font-weight: 900; letter-spacing: 0.14em; color: #fff; line-height: 1; text-align: center; }
.ws-root .header-title span { color: #dc2626; }
.ws-root .header-brand { font-size: 13px; color: #888; letter-spacing: 0.12em; font-weight: 700; margin-top: 4px; text-align: center; }
.ws-root .header-brand span { color: #dc2626; }
.ws-root .header-sub { font-size: 10px; color: #555; letter-spacing: 0.18em; font-weight: 700; margin-top: 4px; text-transform: uppercase; text-align: center; }
.ws-root .corner-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; width: 270px; }
.ws-root .header-corner-left { position: absolute; left: 0; top: 0; }
.ws-root .header-corner-right { position: absolute; right: 0; top: 0; }
.ws-root .hf-label { font-size: 8px; font-weight: 700; color: #444; letter-spacing: 0.12em; text-transform: uppercase; }
.ws-root .hf-line { border-bottom: 1px solid #2a2a45; height: 16px; margin-top: 2px; margin-bottom: 6px; }

/* ── ROW GRIDS ───────────────────────────────────────────────────*/
.ws-root .row { display: grid; gap: 10px; margin-bottom: 10px; align-items: stretch; }
.ws-root .row-info  { grid-template-columns: 2fr 1.6fr 1fr 1fr; }
.ws-root .row-mode  { grid-template-columns: 2.2fr 1.9fr 1fr 1fr; }
.ws-root .row-main  { grid-template-columns: 180px 1fr 1fr 1fr 210px; }
.ws-root .row-ops   { grid-template-columns: 1.1fr 1.6fr 440px; }
.ws-root .row-mayday { grid-template-columns: 1fr; }
.ws-root .row-footer { grid-template-columns: 1fr 1fr; }

/* ── FIELD HELPERS ───────────────────────────────────────────────*/
.ws-root .fl {
  font-size: 8px; font-weight: 700; color: #3a3a55;
  letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 2px;
}
.ws-root .g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.ws-root .g3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 7px; }

/* ── INTERACTIVE INPUT FIELDS ────────────────────────────────────*/
/* Replaces .fv divs — matches the visual underline exactly */
.ws-root .ws-input {
  display: block;
  width: 100%;
  border: none;
  border-bottom: 1px solid #222240;
  border-radius: 0;
  background: transparent;
  color: #e2e8f0;
  font-size: 11px;
  font-family: inherit;
  height: 15px;
  margin-bottom: 6px;
  padding: 0 2px;
  outline: none;
  transition: border-color 0.15s;
}
.ws-root .ws-input:last-child { margin-bottom: 0; }
.ws-root .ws-input:focus { border-bottom-color: #4a4a80; }
.ws-root .ws-input.ws-invalid { border-bottom-color: #dc2626; background: rgba(220,38,38,0.06); }
.ws-root .ws-input[disabled] { opacity: 0.45; cursor: not-allowed; }
.ws-root .ws-input[data-ws-auto="true"] { color: #4a7fd4; font-style: italic; }

/* Small textarea for command notes */
.ws-root .ws-textarea {
  display: block; width: 100%;
  border: 1px solid #1a1a38;
  border-radius: 4px;
  background: #0b0b18;
  color: #e2e8f0; font-family: inherit; font-size: 11px;
  padding: 6px 8px; resize: vertical; outline: none;
  transition: border-color 0.15s; min-height: 80px;
}
.ws-root .ws-textarea:focus { border-color: #3a3a70; }
.ws-root .ws-textarea[disabled] { opacity: 0.45; cursor: not-allowed; }

/* ── INTERACTIVE CHECKBOXES ──────────────────────────────────────*/
/* Replaces .acbox, .sbbox, .ptibox, .maib divs */
.ws-root .ws-check {
  width: 11px; height: 11px;
  border: 1.5px solid #222240;
  border-radius: 2px;
  background: transparent;
  appearance: none; -webkit-appearance: none;
  cursor: pointer; flex-shrink: 0;
  position: relative; transition: border-color 0.12s, background 0.12s;
}
.ws-root .ws-check:checked { background: #3a3a70; border-color: #5a5aaa; }
.ws-root .ws-check:checked::after {
  content: '✓';
  position: absolute; top: -2px; left: 0px;
  font-size: 9px; color: #8888ff; font-weight: 900;
}
.ws-root .ws-check[disabled] { opacity: 0.4; cursor: not-allowed; }

/* Larger checkbox for mayday actions */
.ws-root .ws-check.ws-check-lg {
  width: 13px; height: 13px;
  border: 1.5px solid #7c2800;
}
.ws-root .ws-check.ws-check-lg:checked { background: #7c2800; border-color: #c24800; }
.ws-root .ws-check.ws-check-lg:checked::after { color: #f9a87a; top: -1px; }

/* ── STRATEGIC MODE CARDS ────────────────────────────────────────*/
.ws-root .mode-cards { display: flex; gap: 10px; flex: 1; }
.ws-root .mode-card {
  flex: 1; border-radius: 10px; border: 2.5px solid;
  padding: 16px 14px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  min-height: 90px; position: relative; cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  user-select: none;
}
.ws-root .mode-card.off   { border-color: #dc2626; background: #dc262614; }
.ws-root .mode-card.trans { border-color: #d97706; background: #d9770614; }
.ws-root .mode-card.def   { border-color: #2563eb; background: #2563eb14; }

.ws-root .mode-card.off.ws-selected   { background: #dc262632; box-shadow: 0 0 0 2px #dc2626; }
.ws-root .mode-card.trans.ws-selected { background: #d9770632; box-shadow: 0 0 0 2px #d97706; }
.ws-root .mode-card.def.ws-selected   { background: #2563eb32; box-shadow: 0 0 0 2px #2563eb; }

.ws-root .mode-circle {
  width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid;
  margin-bottom: 8px; flex-shrink: 0; transition: background 0.15s;
}
.ws-root .mode-card.off   .mode-circle { border-color: #dc2626; }
.ws-root .mode-card.trans .mode-circle { border-color: #d97706; }
.ws-root .mode-card.def   .mode-circle { border-color: #2563eb; }

.ws-root .mode-card.off.ws-selected   .mode-circle { background: #dc2626; }
.ws-root .mode-card.trans.ws-selected .mode-circle { background: #d97706; }
.ws-root .mode-card.def.ws-selected   .mode-circle { background: #2563eb; }

.ws-root .mode-label { font-size: 13px; font-weight: 900; letter-spacing: 0.1em; margin-bottom: 4px; }
.ws-root .mode-card.off   .mode-label { color: #dc2626; }
.ws-root .mode-card.trans .mode-label { color: #d97706; }
.ws-root .mode-card.def   .mode-label { color: #2563eb; }
.ws-root .mode-desc { font-size: 8.5px; color: #555; line-height: 1.4; }

.ws-root .mode-card[disabled], .ws-root .mode-card.ws-disabled { pointer-events: none; }

/* Tactical mode checkboxes (under mode cards) */
.ws-root .tmode-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.ws-root .tm { display: flex; align-items: center; gap: 4px; font-size: 8.5px; color: #555; cursor: pointer; }
.ws-root .tm:hover { color: #8888aa; }

/* ── ENGAGEMENT EVALUATION CELLS ─────────────────────────────────*/
.ws-root .et { width: 100%; border-collapse: collapse; }
.ws-root .et th {
  font-size: 8px; font-weight: 700; letter-spacing: 0.1em; color: #444;
  padding: 4px; border: 1px solid #1a1a30; text-align: center; background: #090910;
}
.ws-root .et .rl {
  font-size: 9px; font-weight: 700; color: #777; text-align: left;
  padding: 5px 8px; background: #0a0a18; border: 1px solid #1a1a30;
}

/* Engagement eval clickable cells — replaces colored tds */
.ws-root .ws-engage-cell {
  font-size: 9.5px; font-weight: 700; text-align: center;
  padding: 5px 4px; border: 1px solid #1a1a30;
  cursor: pointer; background: transparent; color: #555;
  transition: background 0.12s, color 0.12s, box-shadow 0.12s;
  width: 100%; font-family: inherit;
}
.ws-root .ws-engage-cell:hover  { filter: brightness(1.4); }
.ws-root .ws-engage-cell[disabled] { cursor: not-allowed; opacity: 0.4; }

/* Per-value colors (match original e1-e5 classes) */
.ws-root .ws-engage-cell[data-ws-value="1"] { background: #14532d30; color: #4ade8066; }
.ws-root .ws-engage-cell[data-ws-value="2"] { background: #1d402030; color: #86efac66; }
.ws-root .ws-engage-cell[data-ws-value="3"] { background: #1a281030; color: #bef26466; }
.ws-root .ws-engage-cell[data-ws-value="4"] { background: #38280c30; color: #fbbf2466; }
.ws-root .ws-engage-cell[data-ws-value="5"] { background: #3a101030; color: #f8717166; }

/* Selected state — full color */
.ws-root .ws-engage-cell.ws-selected[data-ws-value="1"] { background: #14532d; color: #4ade80; box-shadow: inset 0 0 0 1.5px #4ade80; }
.ws-root .ws-engage-cell.ws-selected[data-ws-value="2"] { background: #1d4020; color: #86efac; box-shadow: inset 0 0 0 1.5px #86efac; }
.ws-root .ws-engage-cell.ws-selected[data-ws-value="3"] { background: #1a2810; color: #bef264; box-shadow: inset 0 0 0 1.5px #bef264; }
.ws-root .ws-engage-cell.ws-selected[data-ws-value="4"] { background: #38280c; color: #fbbf24; box-shadow: inset 0 0 0 1.5px #fbbf24; }
.ws-root .ws-engage-cell.ws-selected[data-ws-value="5"] { background: #3a1010; color: #f87171; box-shadow: inset 0 0 0 1.5px #f87171; }

/* ── BUILDING DIAGRAM DOTS ───────────────────────────────────────*/
.ws-root .bldg-side-lbl { font-size: 11px; font-weight: 900; color: #777; letter-spacing: 0.08em; text-align: center; }
.ws-root .bldg-row { display: flex; align-items: stretch; flex: 1; }
.ws-root .bldg-b, .ws-root .bldg-d {
  writing-mode: vertical-rl; font-size: 11px; font-weight: 900; color: #888;
  width: 22px; display: flex; align-items: center; justify-content: center;
  letter-spacing: 0.1em;
}
.ws-root .bldg-b { border-right: 2px solid #2a2a50; }
.ws-root .bldg-d { border-left: 2px solid #2a2a50; transform: rotate(180deg); }
.ws-root .bldg-floors {
  flex: 1; border: 2px solid #2a2a50; border-radius: 5px;
  background: #090910; overflow: hidden;
}
.ws-root .bldg-floor {
  display: flex; align-items: center; gap: 12px;
  padding: 0 14px; border-bottom: 1px solid #181830; min-height: 72px;
}
.ws-root .bldg-floor:last-child { border-bottom: none; }
.ws-root .bfn { font-size: 11px; font-weight: 800; color: #3a3a60; width: 38px; flex-shrink: 0; letter-spacing: 0.06em; }
.ws-root .bfl { flex: 1; }
.ws-root .bfd { display: flex; gap: 8px; }

/* Building diagram dot — interactive button */
.ws-root .ws-dot {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid #252545; background: transparent;
  cursor: pointer; flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.12s;
  padding: 0;
}
.ws-root .ws-dot:hover { filter: brightness(1.4); }
.ws-root .ws-dot[disabled] { cursor: not-allowed; opacity: 0.4; }

/* Dot states */
.ws-dot.ws-dot-search    { border-color: #dc2626; background: rgba(220,38,38,0.35); box-shadow: 0 0 6px rgba(220,38,38,0.4); }
.ws-dot.ws-dot-water     { border-color: #2563eb; background: rgba(37,99,235,0.35); box-shadow: 0 0 6px rgba(37,99,235,0.4); }
.ws-dot.ws-dot-controlled { border-color: #4ade80; background: rgba(74,222,128,0.35); box-shadow: 0 0 6px rgba(74,222,128,0.4); }

.ws-root .bldg-legend { display: flex; gap: 14px; margin-top: 10px; justify-content: center; flex-wrap: wrap; }
.ws-root .bll { display: flex; align-items: center; gap: 5px; font-size: 10px; color: #555; }
.ws-root .blld { width: 10px; height: 10px; border-radius: 50%; border: 2px solid; }

/* ── FIRE FLOW ────────────────────────────────────────────────────*/
.ws-root .ff-formula {
  font-size: 15px; font-weight: 900; color: #06b6d4; letter-spacing: 0.04em;
  text-align: center; padding: 8px 0; background: #091420;
  border: 1px solid #1a3a50; border-radius: 5px; margin-bottom: 8px;
}
.ws-root .ff-row {
  display: grid; grid-template-columns: 1fr 12px 1fr 12px 1fr;
  gap: 4px; align-items: center; margin: 7px 0;
}
.ws-root .ffb {
  background: #091420; border: 1px solid #1a3a50;
  border-radius: 4px; padding: 5px; text-align: center;
}
.ws-root .ffbl { font-size: 7.5px; color: #3a3a55; letter-spacing: 0.08em; font-weight: 700; }
.ws-root .ffop { font-size: 12px; color: #3a3a55; text-align: center; font-weight: 700; }

/* ── STRUCTURAL STABILITY ─────────────────────────────────────────*/
.ws-root .stab-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.ws-root .sbl { font-size: 8px; color: #3a3a55; font-weight: 700; letter-spacing: 0.1em; }
.ws-root .sbc { display: flex; align-items: center; gap: 3px; font-size: 8.5px; color: #555; font-weight: 700; cursor: pointer; }

/* ── RECEO-VS ─────────────────────────────────────────────────────*/
.ws-root .tp-item {
  display: grid; grid-template-columns: 26px 1fr;
  gap: 9px; align-items: flex-start; padding: 6px 0;
  border-bottom: 1px solid #121228;
}
.ws-root .tp-item:last-child { border-bottom: none; }
.ws-root .tpl {
  width: 26px; height: 26px; border-radius: 4px;
  background: #1a1a2e; border: 1px solid #dc262640;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 900; flex-shrink: 0; color: #dc2626;
}
.ws-root .tpn { font-size: 12px; font-weight: 700; color: #c8d0e0; margin-bottom: 2px; }
.ws-root .tps { font-size: 8.5px; color: #444; line-height: 1.3; margin-bottom: 3px; }

/* ── BENCHMARKS ──────────────────────────────────────────────────*/
.ws-root .bm-hdr {
  display: grid; grid-template-columns: 20px 1fr 58px 62px;
  gap: 5px; padding: 0 0 4px; border-bottom: 1px solid #1a1a30; margin-bottom: 2px;
}
.ws-root .bhc { font-size: 7.5px; font-weight: 700; color: #2a2a45; letter-spacing: 0.1em; text-align: center; }
.ws-root .bm-row {
  display: grid; grid-template-columns: 20px 1fr 58px 62px;
  gap: 5px; align-items: center; padding: 5px 0;
  border-bottom: 1px solid #0e0e20;
  transition: box-shadow 0.35s ease;   /* for cluster H row-level pulse */
}
.ws-root .bm-row:last-child { border-bottom: none; }

/* Cluster H row-level states — rows within a card that has a parent cluster */
.ws-root .bm-row[data-cluster="H"].cluster-active {
  animation: ws-row-pulse 2.5s ease-in-out infinite;
  border-radius: 4px;
  padding-left: 4px; padding-right: 4px;
  /* suppress card-level ring from parent when H is active */
}
.ws-root .bm-row[data-cluster="H"].cluster-completed {
  box-shadow: inset 0 0 0 1.5px rgba(249,115,22,0.6);
  border-radius: 4px;
}
@keyframes ws-row-pulse {
  0%, 100% { box-shadow: inset 0 0 0 2px rgba(249,115,22,0.8), 0 0 0 1px rgba(249,115,22,0.5); }
  50%       { box-shadow: inset 0 0 0 2px rgba(249,115,22,1.0), 0 0 8px rgba(249,115,22,0.4); }
}

.ws-root .bmn {
  width: 20px; height: 20px; border-radius: 3px; background: #141428;
  border: 1px solid #1e1e38;
  display: flex; align-items: center; justify-content: center;
  font-size: 8px; font-weight: 700; color: #3a3a55; flex-shrink: 0;
}
.ws-root .bmt { line-height: 1.25; }
.ws-root .bmtn { font-size: 12px; font-weight: 700; color: #c8d0e0; }
.ws-root .bmts { font-size: 9px; color: #3a3a55; }
.ws-root .phase-b { display: flex; align-items: center; gap: 5px; margin: 4px 0 2px; }
.ws-root .pbl { flex: 1; height: 1px; background: #141428; }
.ws-root .pbt { font-size: 7px; font-weight: 800; color: #222240; letter-spacing: 0.14em; white-space: nowrap; }
.ws-root .p-life { border-left: 2.5px solid #dc2626; padding-left: 5px; }
.ws-root .p-fire { border-left: 2.5px solid #f97316; padding-left: 5px; }
.ws-root .p-ops  { border-left: 2.5px solid #2563eb; padding-left: 5px; }
.ws-root .bm-star      { color: #dc2626; }
.ws-root .bm-star-fire { color: #f97316; }

/* ── PAR ──────────────────────────────────────────────────────────*/
.ws-root .par-row-g {
  display: grid; grid-template-columns: 46px 1fr 46px;
  gap: 5px; align-items: center; padding: 4px 0;
  border-bottom: 1px solid #0e0e20;
}
.ws-root .par-row-g:last-child { border-bottom: none; }

/* ── RADIO CHANNELS ───────────────────────────────────────────────*/
.ws-root .rch-row {
  display: grid; grid-template-columns: 64px 1fr;
  gap: 5px; align-items: center; padding: 4px 0;
  border-bottom: 1px solid #0e0e20;
}
.ws-root .rch-row:last-child { border-bottom: none; }
.ws-root .rchl { font-size: 8px; color: #555; font-weight: 700; letter-spacing: 0.08em; }
.ws-root .rchf { border-bottom: 2px solid #2a2a55; height: 14px; background: #13131f; border-radius: 2px 2px 0 0; }

/* ── ADDITIONAL CONSIDERATIONS ────────────────────────────────────*/
.ws-root .ac-item {
  display: flex; align-items: center; gap: 6px; font-size: 9px; color: #777;
  padding: 3.5px 0; border-bottom: 1px solid #0e0e20; cursor: pointer;
}
.ws-root .ac-item:last-child { border-bottom: none; }
.ws-root .ac-item:hover { color: #9999bb; }

/* ── DIVISION/GROUP TRACKER ───────────────────────────────────────*/
.ws-root .dt-grid { display: grid; grid-template-columns: 80px 1fr 1fr 1fr 1fr 58px; }
.ws-root .dth {
  font-size: 7.5px; font-weight: 700; color: #3a3a55; letter-spacing: 0.1em;
  padding: 5px 8px; border: 1px solid #141428; text-align: center; background: #090910;
}
.ws-root .dtc { padding: 4px 6px; border: 1px solid #121228; }
.ws-root .dtst {
  padding: 5px 8px; border: 1px solid #121228;
  display: flex; gap: 4px; align-items: center; justify-content: center;
}
.ws-root .dtsd { width: 7px; height: 7px; border-radius: 50%; border: 1px solid; }

/* Dynamic row add/remove */
.ws-root .ws-add-row-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 10px; margin-top: 6px;
  background: rgba(255,255,255,0.03); border: 1px dashed #2a2a45;
  border-radius: 5px; cursor: pointer; font-size: 9px; color: #4a4a80;
  font-family: inherit; font-weight: 700; letter-spacing: 0.08em;
  transition: border-color 0.12s, color 0.12s, background 0.12s;
  width: 100%;
}
.ws-root .ws-add-row-btn:hover { border-color: #5a5aaa; color: #7a7acc; background: rgba(255,255,255,0.05); }
.ws-root .ws-add-row-btn[disabled] { opacity: 0.4; cursor: not-allowed; }

.ws-root .ws-remove-row-btn {
  background: transparent; border: none; color: #3a1010; cursor: pointer;
  font-size: 12px; padding: 2px 4px; border-radius: 3px;
  transition: color 0.12s; flex-shrink: 0;
}
.ws-root .ws-remove-row-btn:hover { color: #dc2626; }

/* ── CAN/LCAN ─────────────────────────────────────────────────────*/
.ws-root .lcan-hdr {
  display: grid; grid-template-columns: 46px 52px 1fr 1fr 1fr;
  gap: 5px; padding: 0 0 4px; border-bottom: 1px solid #1a1a30; margin-bottom: 2px;
}
.ws-root .lhc { font-size: 7.5px; font-weight: 700; letter-spacing: 0.1em; }
.ws-root .lcan-row {
  display: grid; grid-template-columns: 46px 52px 1fr 1fr 1fr;
  gap: 5px; align-items: center; padding: 4px 0;
  border-bottom: 1px solid #0e0e20; position: relative;
}
.ws-root .lcan-row:last-child { border-bottom: none; }

/* ── MAYDAY ───────────────────────────────────────────────────────*/
.ws-root .mayday-horiz { background: #110000; border: 1.5px solid #7c2800; border-radius: 8px; overflow: hidden; }
.ws-root .mayday-horiz-hd {
  background: #7c2800; padding: 9px 16px;
  display: flex; align-items: center; gap: 10px;
}
.ws-root .mayday-horiz-body {
  padding: 12px 16px;
  display: grid; grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1.3fr;
  gap: 14px; align-items: start;
}
.ws-root .mht { font-size: 11px; letter-spacing: 0.12em; font-weight: 800; }
.ws-root .lunar-col-letter {
  width: 28px; height: 28px; border-radius: 5px;
  background: #7c280025; border: 1px solid #7c280055;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 900; color: #f97316; margin-bottom: 5px;
}
.ws-root .lunar-col-label { font-size: 8px; color: #777; font-weight: 700; letter-spacing: 0.08em; margin-bottom: 4px; }
.ws-root .lunar-col-note  { font-size: 7.5px; color: #444; font-style: italic; margin-top: 3px; }
.ws-root .actions-col-title { font-size: 8.5px; color: #f97316; font-weight: 800; letter-spacing: 0.1em; margin-bottom: 6px; }
.ws-root .actions-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px 10px; }
.ws-root .mai { display: flex; align-items: center; gap: 5px; font-size: 8.5px; color: #777; padding: 3px 0; border-bottom: 1px solid #2e1010; cursor: pointer; }
.ws-root .mai:last-child { border-bottom: none; }
.ws-root .mai:hover { color: #f9a87a; }

/* ── BENCHMARK PAR INTERVALS TABLE ───────────────────────────────*/
.ws-root .par-int-table { width: 100%; border-collapse: collapse; }
.ws-root .par-int-table th {
  font-size: 7.5px; color: #3a3a55; font-weight: 700; letter-spacing: 0.1em;
  padding: 3px 6px; border: 1px solid #141428; background: #090910; text-align: left;
}
.ws-root .par-int-table td {
  font-size: 12px; color: #aaa; padding: 5px 8px;
  border: 1px solid #121228; font-weight: 600;
}
.ws-root .par-int-table td.par-int-input { padding: 4px; border: 1px solid #121228; }

/* ── FOOTER ───────────────────────────────────────────────────────*/
.ws-root .footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 12px; padding-top: 10px; border-top: 1px solid #141428;
  font-size: 8.5px; color: #2a2a45; letter-spacing: 0.08em;
}
.ws-root .key-item { font-size: 8.5px; color: #555; padding: 3px 0; border-bottom: 1px solid #0e0e20; }
.ws-root .key-item:last-child { border-bottom: none; }
.ws-root .key-item span { color: #f97316; font-weight: 700; }

/* ════════════════════════════════════════════════════════════════
   CLUSTER ACTIVATION STATES
   Applied to .card elements (or .bm-row for cluster H rows)
   ════════════════════════════════════════════════════════════════ */

/* Per-cluster CSS custom properties */
[data-cluster="A"] { --cluster-accent: #888888; --cluster-accent-rgb: 136,136,136; }
[data-cluster="B"] { --cluster-accent: #a855f7; --cluster-accent-rgb: 168,85,247;  }
[data-cluster="C"] { --cluster-accent: #dc2626; --cluster-accent-rgb: 220,38,38;   }
[data-cluster="D"] { --cluster-accent: #dc2626; --cluster-accent-rgb: 220,38,38;   }
[data-cluster="E"] { --cluster-accent: #f97316; --cluster-accent-rgb: 249,115,22;  }
[data-cluster="F"] { --cluster-accent: #a855f7; --cluster-accent-rgb: 168,85,247;  }
[data-cluster="G"] { --cluster-accent: #a855f7; --cluster-accent-rgb: 168,85,247;  }
/* H applied at row level — defined in bm-row section above */
[data-cluster="I"] { --cluster-accent: #06b6d4; --cluster-accent-rgb: 6,182,212;   }
[data-cluster="J"] { --cluster-accent: #7c2800; --cluster-accent-rgb: 124,40,0;    }

/* Base transition for all cluster-bearing elements */
.ws-root .card[data-cluster],
.ws-root [data-cluster-wrapper] {
  transition: opacity 0.4s ease, box-shadow 0.35s ease;
}

/* LOCKED — kept as a no-op. The scenario player never calls lock().
   Activation is emphasis, not gating. Students can edit any section at any time.
   The only true read-gate is setReadOnly(true) on the review screen. */
.ws-root .cluster-locked {
  /* intentional no-op */
}

/* ACTIVE — full opacity, pulsing accent ring */
.ws-root .cluster-active {
  opacity: 1 !important;
  pointer-events: auto !important;
  animation: ws-cluster-pulse 2.5s ease-in-out infinite;
}

/* COMPLETED — full opacity, quiet dim ring, ✓ badge */
.ws-root .cluster-completed {
  opacity: 1 !important;
  pointer-events: auto !important;
  animation: none !important;
  box-shadow: 0 0 0 1.5px rgba(var(--cluster-accent-rgb, 58,58,85), 0.55) !important;
}

/* Pulse keyframe — breathes between 2px and 3.5px ring */
@keyframes ws-cluster-pulse {
  0%, 100% {
    box-shadow: 0 0 0 2px var(--cluster-accent, #3a3a55);
  }
  50% {
    box-shadow:
      0 0 0 3.5px var(--cluster-accent, #3a3a55),
      0 0 16px rgba(var(--cluster-accent-rgb, 58,58,85), 0.28);
  }
}

/* ════════════════════════════════════════════════════════════════
   TEST CONTROL PANEL (Phase A standalone test only)
   ════════════════════════════════════════════════════════════════ */
#ws-test-panel {
  position: sticky; top: 0; z-index: 500;
  background: #0a0a18; border-bottom: 2px solid #1a1a30;
  padding: 10px 16px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
#ws-test-panel .tp-label {
  font-size: 9px; font-weight: 800; letter-spacing: 0.12em;
  color: #3a3a55; text-transform: uppercase; white-space: nowrap;
}
#ws-test-panel .tp-cluster-group {
  display: flex; align-items: center; gap: 4px;
}
#ws-test-panel .tp-cluster-id {
  font-size: 9px; font-weight: 900; color: #4a4a80; min-width: 14px;
}
#ws-test-panel .tp-btn {
  padding: 3px 7px; border-radius: 4px; cursor: pointer;
  font-size: 8px; font-weight: 700; font-family: inherit;
  border: 1px solid; transition: filter 0.12s;
}
#ws-test-panel .tp-btn:hover { filter: brightness(1.3); }
#ws-test-panel .tp-btn.lock   { border-color: #3a1010; background: #1a0808; color: #f87171; }
#ws-test-panel .tp-btn.active { border-color: #1a3a18; background: #081808; color: #4ade80; }
#ws-test-panel .tp-btn.done   { border-color: #1a1a3a; background: #080814; color: #7a7aff; }
#ws-test-panel .tp-divider { width: 1px; height: 24px; background: #1a1a30; }
#ws-test-panel .tp-action-btn {
  padding: 5px 12px; border-radius: 6px; cursor: pointer;
  font-size: 9px; font-weight: 800; font-family: inherit;
  letter-spacing: 0.08em; border: 1px solid; transition: filter 0.12s;
}
#ws-test-panel .tp-action-btn:hover { filter: brightness(1.2); }
#ws-test-panel .tp-prefill { border-color: #1a3a50; background: #080c14; color: #06b6d4; }
#ws-test-panel .tp-export  { border-color: #3a2a10; background: #120e06; color: #fbbf24; }
#ws-test-panel .tp-reset   { border-color: #2a1a1a; background: #100808; color: #f87171; }
