/* ==========================================================
   CG-FX · RE-01 RELATIVITY DIAGNOSTIC TUNEUP PANEL
   Styles for js/relativity.js. Uses the existing chassis assets
   (breakers, LEDs, slot, knobs) and variables from style.css.
   Own class namespace (re-*) so no legacy selector or script
   hook ever matches these elements.
   ========================================================== */

.re01-retired { display: none !important; }

.re-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 10px;
}
.re-panel button:focus-visible,
.re-panel input:focus-visible,
.re-tune-readout:focus-visible { outline: 2px solid var(--blue2); outline-offset: 2px; }

/* ---------- ROOT · RELATIVITY ENGINE (governing center) ---------- */
.re-root {
  border: 2px solid #174fae;
  background: #121722;
  box-shadow: 0 0 14px rgba(47, 111, 255, .14);
}
.re-root-head {
  position: sticky;
  top: 0;
  z-index: 6;
  background: #121722;
  padding: 10px 10px 9px;
  border-bottom: 1px solid #1f2c47;
}
.re-root-bar { display: flex; align-items: center; gap: 9px; }
.re-root-titles { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.re-root-title { font-size: 12px; font-weight: 800; color: var(--blue2); letter-spacing: .04em; }
.re-root-sub { font-size: 10px; font-style: italic; color: var(--soft); }
.re-tune-state {
  flex: none;
  padding: 4px 7px;
  border: 1px solid #222;
  background: #080808;
  font: 700 11px Consolas, monospace;
  color: var(--blue2);
  letter-spacing: .03em;
  white-space: nowrap;
}
.re-tune-state.drift { color: var(--red); border-color: #5a1f26; }

.re-balance { margin-top: 9px; }
.re-balance-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.re-balance-label { font-size: 9.5px; font-weight: 800; color: var(--soft); letter-spacing: .06em; }
.re-balance-readout { font: 700 10.5px Consolas, monospace; color: var(--blue2); white-space: nowrap; }
.re-balance-readout.drift { color: var(--red); }
.re-meter {
  position: relative;
  height: 22px;
  margin-top: 5px;
  border: 1px solid #262626;
  background-color: #0a0a0a;
  background-image: repeating-linear-gradient(90deg, #333 0, #333 1px, transparent 1px, transparent 10%);
}
.re-meter-band {
  position: absolute;
  left: 25%;
  width: 50%;
  top: 0;
  bottom: 0;
  background: rgba(47, 111, 255, .12);
  border-left: 1px solid #2b4a85;
  border-right: 1px solid #2b4a85;
}
.re-meter-center { position: absolute; left: calc(50% - 1px); top: 0; bottom: 0; width: 2px; background: #6d6d6d; }
.re-meter-needle {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 3px;
  margin-left: -1.5px;
  background: var(--blue2);
  box-shadow: 0 0 8px var(--blue2);
  transition: left .15s ease-out;
}
.re-meter-needle.drift { background: var(--red); box-shadow: 0 0 8px var(--red); }
.re-meter-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 3px;
  font: 400 9px Consolas, monospace;
  color: #858585;
}
.re-root-actions { display: flex; gap: 8px; margin-top: 9px; flex-wrap: wrap; }
.re-root-body { display: flex; flex-direction: column; gap: 7px; padding: 9px 8px 8px; }

/* ---------- RE-01 groups ---------- */
.re-group { display: flex; flex-direction: column; }
.re-group-head {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 2px 6px;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  color: var(--blue2);
  font: 800 12px Montserrat, "Segoe UI", Arial, sans-serif;
  letter-spacing: .04em;
}
.re-group-head:hover .re-group-title { color: #6f9bff; }
.re-group-arrow { flex: none; width: 10px; font-size: 9px; color: var(--blue2); }
.re-group-title { flex: 1 1 auto; min-width: 0; }
.re-group-summary {
  flex: none;
  font: 700 10px Consolas, monospace;
  color: #9fb6ff;
  letter-spacing: .02em;
  white-space: nowrap;
}
.re-group-summary.drift { color: var(--red); }
.re-rule {
  height: 1px;
  margin: 2px 14px;
  background: #1254bb;
  box-shadow: 0 0 6px rgba(47, 111, 255, .55);
}
.re-group-body { display: flex; flex-direction: column; gap: 7px; padding: 8px 0 4px; }
.re-group-body[hidden] { display: none; }
.re-group-desc,
.re-link-desc {
  margin: 0 2px;
  font-size: 10.5px;
  line-height: 1.45;
  color: var(--soft);
}
.re-subhead {
  margin: 4px 2px 0;
  font-size: 9.5px;
  font-weight: 800;
  color: var(--soft);
  letter-spacing: .07em;
}
.re-led { flex: none; }

/* ---------- relationship rows ---------- */
.re-link {
  border: 2px solid #2e2e2e;
  background: #191919;
  padding: 5px 8px 7px;
}
.re-link[data-state="drift"] { border-color: #5a1f26; background: #1d1416; }
.re-link-head { display: flex; align-items: center; gap: 7px; }
.re-link-toggle {
  flex: none;
  width: 18px;
  height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #7a7a7a;
  font-size: 10px;
  cursor: pointer;
}
.re-link-toggle[aria-expanded="true"] { color: var(--blue2); }
.re-link-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.re-link-line { display: flex; align-items: baseline; gap: 7px; }
.re-link-label {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 11px;
  font-weight: 800;
  color: #a8a8a8;
  letter-spacing: .02em;
  line-height: 1.2;
}
.re-link-value { flex: none; font: 700 13px Consolas, monospace; color: var(--blue2); }
.re-link[data-state="drift"] .re-link-value { color: var(--red); }
.re-link[data-state="off"] .re-link-value { color: #6a6a6a; }
.re-tag {
  flex: none;
  padding: 1px 4px;
  border: 1px solid #333;
  font: 700 8.5px Consolas, monospace;
  color: #8a8a8a;
  letter-spacing: .04em;
}
.re-tag.live { color: #9fb6ff; border-color: #174fae; }
.re-bars { display: flex; flex-direction: column; gap: 4px; }
.re-bar { position: relative; background: #0a0a0a; border: 1px solid #262626; border-radius: 3px; }
.re-bar-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: 2px;
  background: var(--blue2);
  box-shadow: 0 0 6px rgba(47, 111, 255, .5);
}
.re-bar.drift .re-bar-fill { background: var(--red); box-shadow: 0 0 6px rgba(233, 75, 85, .55); }
.re-bar.off .re-bar-fill { background: #4a4a4a; box-shadow: none; }
.re-bar-spec {
  position: absolute;
  top: -4px;
  width: 2px;
  height: calc(100% + 8px);
  margin-left: -1px;
  background: #d8d8d8;
}

/* coupling switch: same artwork as the chassis breaker */
.re-breaker {
  flex: none;
  width: 78px;
  min-width: 78px;
  height: 31px;
  padding: 0;
  border: 0;
  cursor: pointer;
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  background-image: url("../app_images/breaker/breaker_off.png"), url("../app_images/breaker/breaker/breaker_off.png");
}
.re-breaker.on {
  background-image: url("../app_images/breaker/breaker_on.png"), url("../app_images/breaker/breaker/breaker_on.png");
}
.re-lock {
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border: 1px solid #2f2f2f;
  background: #0d0d0d;
  font: 700 10px Consolas, monospace;
  color: #9fb6ff;
}

.re-link-body { display: flex; flex-direction: column; gap: 7px; padding: 8px 0 2px; }
.re-link-body[hidden] { display: none; }
.re-dir { display: flex; flex-direction: column; gap: 5px; padding: 8px; border: 1px solid #262626; background: #141414; }
.re-dir-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  font-weight: 800;
  color: var(--blue2);
  letter-spacing: .05em;
}
.re-dir.drift .re-dir-title { color: #ef8c93; }

/* slider: same slot + knob artwork as .demo-slider */
.re-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 32px;
  margin: 0;
  outline: none;
  background-color: transparent;
  background-image: url("../app_images/slot/slot.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 13px;
}
.re-slider::-webkit-slider-runnable-track { height: 32px; background: transparent; border: 0; }
.re-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 30px;
  height: 30px;
  margin-top: 1px;
  border: 0;
  border-radius: 0;
  background-color: transparent;
  background-image: url("../app_images/knobs/knob_normal.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  cursor: pointer;
}
.re-slider::-webkit-slider-thumb:hover,
.re-slider:active::-webkit-slider-thumb { background-image: url("../app_images/knobs/knob_highlight.png"); }
.re-slider::-moz-range-track { height: 32px; background: transparent; border: 0; }
.re-slider::-moz-range-thumb {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 0;
  background-color: transparent;
  background-image: url("../app_images/knobs/knob_normal.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  cursor: pointer;
}
.re-slider::-moz-range-thumb:hover { background-image: url("../app_images/knobs/knob_highlight.png"); }

.re-scale { position: relative; height: 20px; margin: 0 15px; }
.re-scale-band {
  position: absolute;
  top: 2px;
  height: 6px;
  border-left: 1px solid #6f8fd0;
  border-right: 1px solid #6f8fd0;
  background: rgba(47, 111, 255, .12);
}
.re-scale-spec { position: absolute; top: 0; width: 2px; height: 10px; margin-left: -1px; background: #e0e0e0; }
.re-scale-label { position: absolute; top: 11px; font: 400 9px Consolas, monospace; color: #8c8c8c; white-space: nowrap; }
.re-readout {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  font: 700 10px Consolas, monospace;
  color: #cfcfcf;
}
.re-readout .ok { color: var(--blue2); }
.re-readout .bad { color: var(--red); }

.re-btn {
  align-self: flex-start;
  min-height: 30px;
  padding: 6px 11px;
  border: 1px solid #2f2f2f;
  background: #0f0f0f;
  color: #9a9a9a;
  font: 800 10.5px Montserrat, "Segoe UI", Arial, sans-serif;
  letter-spacing: .04em;
  cursor: pointer;
}
.re-btn:hover { color: #c4c4c4; border-color: #3c3c3c; background: #181818; }

/* ganglion = coupling row + its instruments */
.re-ganglion { display: flex; flex-direction: column; gap: 6px; }
.re-ganglion + .re-ganglion { padding-top: 6px; border-top: 1px dashed #263a5e; }
.re-instruments { display: flex; flex-direction: column; gap: 6px; }
.re-instruments-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 8px;
  border: 1px solid #262626;
  background: #151515;
  color: #a8a8a8;
  font: 800 11px Montserrat, "Segoe UI", Arial, sans-serif;
  letter-spacing: .04em;
  cursor: pointer;
  text-align: left;
}
.re-instruments-head .re-group-arrow { color: #7a7a7a; }
.re-instruments-body { display: flex; flex-direction: column; gap: 6px; }
.re-instruments-body[hidden] { display: none; }

/* ---------- header TUNE readout ---------- */
.re-tune-readout {
  margin-left: 10px;
  padding: 6px 10px;
  border: 1px solid #222;
  background: #080808;
  font: 700 13px Consolas, monospace;
  color: var(--blue2);
  letter-spacing: .04em;
  white-space: nowrap;
}
.re-tune-readout.drift { color: var(--red); border-color: #5a1f26; }

/* ---------- RE-01 relativity map (workbench overlay) ---------- */
.re-map {
  position: absolute;
  left: 14px;
  top: 14px;
  z-index: 4;
  width: 382px;
  max-width: calc(100% - 28px);
  padding: 10px 14px 12px;
  background: rgba(8, 10, 14, .9);
  border: 1px solid #2a3a55;
  pointer-events: none;
}
.re-map[hidden] { display: none; }
.re-map-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.re-map-title { font-size: 10px; font-weight: 800; color: var(--blue2); letter-spacing: .05em; }
.re-map-note { font: 400 8.5px Consolas, monospace; color: #8c8c8c; }
.re-map-stage { position: relative; width: 350px; height: 190px; }
.re-map-node {
  position: absolute;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #4a4a4a;
  background: #141414;
  font: 800 8.5px Montserrat, "Segoe UI", Arial, sans-serif;
  color: #b8b8b8;
  letter-spacing: .03em;
}
.re-map-node.root { border-color: #3b67c4; background: #1a2133; }
.re-map-node.drift { border-color: var(--red); color: #ef8c93; }
.re-map-seg { position: absolute; background: var(--blue2); }
.re-map-seg.drift { background: var(--red); box-shadow: 0 0 6px rgba(233, 75, 85, .8); }
.re-map-seg.off { background: #4a4a4a; }
.re-map-boundary { position: absolute; left: 2px; top: 2px; width: 346px; height: 150px; border: 1px dashed var(--blue2); opacity: .8; }
.re-map-sc { position: absolute; left: 8px; top: 136px; font: 400 8px Consolas, monospace; color: #9fb6ff; }
.utility-button.re-map-toggle.active { color: var(--blue2); border-color: #174fae; }

/* ==========================================================
   ROOT RELATIVITY ENGINE — PARADIGM chassis (ROOT only).
   One chassis for the top level and its three sub-categories;
   graphite surfaces, restrained blue for state and readouts only.
   Everything below is scoped to .re-paradigm.
   ========================================================== */
.re-root.re-paradigm { border: 1px solid #3a3b3f; background: #161719; box-shadow: none; }
.re-paradigm .re-root-head { position: sticky; top: 0; z-index: 6; padding: 0; border-bottom: 0; background: #161719; }
.re-paradigm .re-root-body { display: flex; flex-direction: column; gap: 6px; padding: 6px; }
.re-paradigm.re-collapsed .re-root-body { display: none; }
.re-paradigm .re-top-body { display: flex; }
.re-paradigm .re-sub-list { display: flex; flex-direction: column; gap: 6px; }

/* chassis: arrow · LED · label · breaker (status on the top row) · INFO */
.re-paradigm .drawer-head.re-chassis-head,
.re-paradigm .re-sub-list > .drawer > .drawer-head {
  min-height: 48px !important;
  padding: 5px 9px !important;
  gap: 9px !important;
  background: #232427;
  color: #bdbdbd;
}
/* top row columns line up with the sub-category rows (6px inset + 1px frame) */
.re-paradigm .drawer-head.re-chassis-head.re-top-head { border-bottom: 1px solid #2f3034; padding-left: 16px !important; padding-right: 16px !important; }
.re-paradigm .drawer-head > .arrow {
  flex: 0 0 15px !important;
  width: 15px !important;
  font-size: 14px !important;
  line-height: 1;
  text-align: center;
  color: #e4e4e4 !important;
}
.re-paradigm .drawer-head > .drawer-title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 10.5px !important;   /* reference proportion at the fixed panel width */
  font-weight: 700 !important;
  letter-spacing: .05em;
  line-height: 1.2;
  color: #d4d4d4;
}
.re-paradigm .re-chassis-head > .re-breaker { width: 92px; min-width: 92px; height: 37px; margin-left: auto; }
.re-paradigm .re-top-head > .re-tune-state {
  margin-left: auto;
  width: 92px;
  box-sizing: border-box;
  padding: 4px 0;
  text-align: center;
  background: #08090b;
  border: 1px solid #2c2d31;
  font: 700 11px Consolas, monospace;
  color: var(--blue2);
}
.re-paradigm .re-top-head > .re-tune-state.drift { color: var(--red); border-color: #5a1f26; }

/* sub-category frames: graphite header over a slightly darker body */
.re-paradigm .re-chassis-row,
.re-paradigm .re-sub-list > .drawer { margin: 0 !important; padding: 0; border: 1px solid #36373b !important; background: #1c1d20; }
.re-paradigm .re-chassis-row[data-state="drift"] { border-color: #5a1f26; }
.re-paradigm .re-param-body { display: flex; flex-direction: column; gap: 6px; padding: 10px; background: #1a1b1e; border-top: 1px solid #2c2d31; }
.re-paradigm .re-param-body[hidden] { display: none; }
.re-paradigm .re-sub-list > .drawer[data-category="ROOT"] > .drawer-body { background: #1a1b1e; border-top: 1px solid #2c2d31; }

/* slider: dark groove, quiet ticks, restrained blue needle */
.re-paradigm .re-sub-list > .drawer[data-category="ROOT"] .drawer-body > .control-line.re-param-line { display: block !important; margin: 0; }
.re-paradigm .re-param-line > span,
.re-paradigm .re-param-line > output,
.re-paradigm .re-param-line > .category-primary-readout { display: none !important; }
.re-paradigm .re-param-slider {
  -webkit-appearance: none !important;
  appearance: none !important;
  display: block;
  width: 100% !important;
  height: 22px !important;
  margin: 0 !important;
  background: transparent !important;
  background-image: none !important;
}
.re-paradigm .re-param-slider::-webkit-slider-runnable-track {
  height: 8px !important;
  background: #050506 !important;
  background-image: none !important;
  border: 1px solid #2a2b2f !important;
  border-radius: 1px !important;
}
.re-paradigm .re-param-slider::-webkit-slider-thumb {
  -webkit-appearance: none !important;
  width: 4px !important;
  height: 22px !important;
  margin-top: -8px !important;
  border: 0 !important;
  border-radius: 1px !important;
  background: #5d7bff !important;
  background-image: none !important;
  box-shadow: 0 0 6px rgba(93, 123, 255, .6) !important;
}
.re-paradigm .re-param-slider::-moz-range-track { height: 8px; background: #050506; border: 1px solid #2a2b2f; }
.re-paradigm .re-param-slider::-moz-range-thumb { width: 4px; height: 22px; border: 0; border-radius: 1px; background: #5d7bff; background-image: none; box-shadow: 0 0 6px rgba(93, 123, 255, .6); }
.re-paradigm .re-param-ticks {
  height: 9px;
  margin: 0 2px;
  background:
    repeating-linear-gradient(90deg, #56575c 0, #56575c 1px, transparent 1px, transparent 25%) top / 100% 9px no-repeat,
    repeating-linear-gradient(90deg, #393a3e 0, #393a3e 1px, transparent 1px, transparent 5%) top / 100% 5px no-repeat;
}

/* readout strip: − MINIMUM · POSITION % · MAXIMUM +   (− and + are display only) */
.re-paradigm .re-param-strip { display: flex; align-items: center; gap: 6px; }
/* ROOT: the calibration plate is one full-width strip; its SAVE sits below it. */
.re-paradigm .re-param-calib { display: block; margin: 0 !important; padding: 0 !important; border: 0 !important; }
.re-paradigm .re-param-calib .cg-calib-plate {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center;
  justify-content: flex-start !important;
  gap: 6px;
  width: 100%;
  box-sizing: border-box;
  padding: 0 !important;
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
}
.re-paradigm .re-param-calib .cg-calib-track { display: none !important; }
.re-paradigm .re-param-bookend,
.re-paradigm .re-param-calib .cg-calib-bookend {
  flex: none;
  width: 12px;
  text-align: center;
  color: #8e8e8e;
  font: 700 15px Consolas, monospace;
}
.re-paradigm .re-param-value,
.re-paradigm .re-param-calib .cg-calib-value {
  flex: 1 1 0 !important;
  width: auto !important;
  min-width: 0;
  height: 24px;
  line-height: 22px;
  box-sizing: border-box;
  padding: 0 6px;
  text-align: right;
  background: #08090b;
  border: 1px solid #2c2d31;
  color: #6d8bff;
  font: 700 13px Consolas, monospace;
  letter-spacing: .04em;
  overflow: hidden;
  white-space: nowrap;
}
.re-paradigm .re-param-calib .cg-calib-value::after { content: "%"; }
.re-paradigm .re-param-calib .cg-calib-save { display: block; width: 100% !important; margin-top: 6px !important; }

/* reset bars */
.re-paradigm .re-param-reset {
  align-self: stretch;
  width: 100%;
  min-height: 28px;
  padding: 5px 10px;
  text-align: center;
  background: #141517;
  border: 1px solid #2c2d31;
  color: #a3a3a3;
  font: 800 10.5px Montserrat, "Segoe UI", Arial, sans-serif;
  letter-spacing: .05em;
}
.re-paradigm .re-param-reset:hover { color: #d0d0d0; border-color: #45464b; background: #18191b; }

/* ==========================================================
   MASK — dark checkerboard treatment (MASK only): graphite
   headers over slightly darker bodies, as in RELATIVITY.
   ========================================================== */
.re-panel > .drawer.drawer[data-category="MASK"] { border: 1px solid #2e2f33 !important; background: #141517 !important; }  /* outranks the even-row checker rule in style.css */
.re-panel > .drawer[data-category="MASK"] > .drawer-head { background: #141517 !important; }
.re-panel > .drawer[data-category="MASK"] > .drawer-body { background: #161719 !important; padding: 6px !important; }
.drawer[data-category="MASK"] .mask-top-subcategory,
.re-section[data-group="AUTO_MASK"] .mask-top-subcategory,
.re-section[data-group="EDIT_MASK"] .mask-top-subcategory { border: 1px solid #36373b !important; background: #1c1d20 !important; margin: 0 0 6px !important; }
.drawer[data-category="MASK"] .mask-top-subcategory > .mask-top-subcategory-toggle { background: #232427 !important; }
.drawer[data-category="MASK"] .mask-top-subcategory > .mask-function-body,
.re-section[data-group="AUTO_MASK"] .mask-top-subcategory > .mask-function-body,
.re-section[data-group="EDIT_MASK"] .mask-top-subcategory > .mask-function-body { background: #1a1b1e !important; border-top: 1px solid #2c2d31; }
.drawer[data-category="MASK"] .mask-station,
.re-section[data-group="EDIT_MASK"] .mask-station { border-color: #2c2d31 !important; background: #161719; }

/* MANUAL MASK: the preview window spans exactly the height of the tool list beside it */
.drawer[data-category="MASK"] .mask-workshop .mask-station,
.re-section[data-group="EDIT_MASK"] .mask-workshop .mask-station { align-items: stretch !important; }
.drawer[data-category="MASK"] .mask-workshop .mask-preview-column,
.re-section[data-group="EDIT_MASK"] .mask-workshop .mask-preview-column { display: contents; }
.drawer[data-category="MASK"] .mask-workshop .mask-preview-frame,
.re-section[data-group="EDIT_MASK"] .mask-workshop .mask-preview-frame { grid-column: 1; grid-row: 1; height: auto !important; min-height: 0; align-self: stretch; }
.drawer[data-category="MASK"] .mask-workshop .mask-preview-name,
.re-section[data-group="EDIT_MASK"] .mask-workshop .mask-preview-name { grid-column: 1; grid-row: 2; }
.drawer[data-category="MASK"] .mask-workshop .mask-action-list,
.re-section[data-group="EDIT_MASK"] .mask-workshop .mask-action-list { grid-column: 2; grid-row: 1; align-self: start; }
.drawer[data-category="MASK"] #maskPreviewCanvas,
.re-section[data-group="EDIT_MASK"] #maskPreviewCanvas {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain;
}

/* AUTO MASK: the selected-mask preview below the grid spans the panel width at 16:9 (masks are 3840 × 2160) */
.drawer[data-category="MASK"] .mask-top-subcategory[data-mask-subcategory="AUTO_MASK"] .mask-preview-frame,
.re-section[data-group="AUTO_MASK"] .mask-top-subcategory[data-mask-subcategory="AUTO_MASK"] .mask-preview-frame {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 16 / 9;
  box-sizing: border-box;
}
.drawer[data-category="MASK"] #autoMaskPreviewCanvas,
.re-section[data-group="AUTO_MASK"] #autoMaskPreviewCanvas {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain;
}

/* ==========================================================
   Top-level category rows (RELATIVITY, MASK): alternating
   graphite, a quiet light outline on the open category, and
   thin blue separators between them. Colour only — no layout.
   ========================================================== */
.re-panel > .re-root.re-paradigm:not(.re-collapsed),
.re-panel > .drawer.drawer[data-category="MASK"].open { border-color: #67686d !important; }
/* Top-level separators and lettering: the COLOR row's treatment, applied to
   RELATIVITY, MASK and IMAGE (backgrounds keep the light/dark checker). */
.re-panel > .re-root .drawer-head.re-top-head,
.re-panel > .drawer[data-category="MASK"] > .drawer-head,
.re-panel > .effect-family-section[data-family-section="TEXTURE"] .family-subcategory[data-subcategory="CLUSTER"] > .family-subcategory-toggle,
.re-panel > .effect-family-section[data-family-section="RELATIONAL"] .family-subcategory[data-subcategory="RELATIONAL_FIELD"] > .family-subcategory-toggle,
.re-panel > .effect-family-section[data-family-section="VOLUMETRIC"] .family-subcategory[data-subcategory="VOLUMETRIC_INTEGRAL"] > .family-subcategory-toggle,
.re-panel > .drawer[data-category="LUMENS_DNA"] > .drawer-head,
.re-panel > .drawer[data-category="USER_IMAGE"] > .drawer-head { position: relative; }
.re-panel > .re-root .drawer-head.re-top-head::before,
.re-panel > .re-root .drawer-head.re-top-head::after,
.re-panel > .drawer[data-category="MASK"] > .drawer-head::before,
.re-panel > .drawer[data-category="MASK"] > .drawer-head::after,
.re-panel > .effect-family-section[data-family-section="TEXTURE"] .family-subcategory[data-subcategory="CLUSTER"] > .family-subcategory-toggle::before,
.re-panel > .effect-family-section[data-family-section="TEXTURE"] .family-subcategory[data-subcategory="CLUSTER"] > .family-subcategory-toggle::after,
.re-panel > .effect-family-section[data-family-section="RELATIONAL"] .family-subcategory[data-subcategory="RELATIONAL_FIELD"] > .family-subcategory-toggle::before,
.re-panel > .effect-family-section[data-family-section="RELATIONAL"] .family-subcategory[data-subcategory="RELATIONAL_FIELD"] > .family-subcategory-toggle::after,
.re-panel > .effect-family-section[data-family-section="VOLUMETRIC"] .family-subcategory[data-subcategory="VOLUMETRIC_INTEGRAL"] > .family-subcategory-toggle::before,
.re-panel > .effect-family-section[data-family-section="VOLUMETRIC"] .family-subcategory[data-subcategory="VOLUMETRIC_INTEGRAL"] > .family-subcategory-toggle::after,
.re-panel > .drawer[data-category="LUMENS_DNA"] > .drawer-head::before,
.re-panel > .drawer[data-category="LUMENS_DNA"] > .drawer-head::after,
.re-panel > .drawer[data-category="USER_IMAGE"] > .drawer-head::before,
.re-panel > .drawer[data-category="USER_IMAGE"] > .drawer-head::after {
  content: "";
  display: block;
  position: absolute;
  left: 5%;
  width: 90%;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg,
    rgba(47,111,255,0) 0%, rgba(47,111,255,.18) 12%, rgba(47,111,255,.62) 34%, rgba(47,111,255,.95) 50%,
    rgba(47,111,255,.62) 66%, rgba(47,111,255,.18) 88%, rgba(47,111,255,0) 100%);
  box-shadow: 0 0 3px rgba(47,111,255,.38), 0 0 7px rgba(47,111,255,.16);
}
.re-panel > .re-root .drawer-head.re-top-head::before,
.re-panel > .drawer[data-category="MASK"] > .drawer-head::before,
.re-panel > .effect-family-section[data-family-section="TEXTURE"] .family-subcategory[data-subcategory="CLUSTER"] > .family-subcategory-toggle::before,
.re-panel > .effect-family-section[data-family-section="RELATIONAL"] .family-subcategory[data-subcategory="RELATIONAL_FIELD"] > .family-subcategory-toggle::before,
.re-panel > .effect-family-section[data-family-section="VOLUMETRIC"] .family-subcategory[data-subcategory="VOLUMETRIC_INTEGRAL"] > .family-subcategory-toggle::before,
.re-panel > .drawer[data-category="LUMENS_DNA"] > .drawer-head::before,
.re-panel > .drawer[data-category="USER_IMAGE"] > .drawer-head::before { top: 0; }
.re-panel > .re-root .drawer-head.re-top-head::after,
.re-panel > .drawer[data-category="MASK"] > .drawer-head::after,
.re-panel > .effect-family-section[data-family-section="TEXTURE"] .family-subcategory[data-subcategory="CLUSTER"] > .family-subcategory-toggle::after,
.re-panel > .effect-family-section[data-family-section="RELATIONAL"] .family-subcategory[data-subcategory="RELATIONAL_FIELD"] > .family-subcategory-toggle::after,
.re-panel > .effect-family-section[data-family-section="VOLUMETRIC"] .family-subcategory[data-subcategory="VOLUMETRIC_INTEGRAL"] > .family-subcategory-toggle::after,
.re-panel > .drawer[data-category="LUMENS_DNA"] > .drawer-head::after,
.re-panel > .drawer[data-category="USER_IMAGE"] > .drawer-head::after { bottom: 0; }
.re-panel > .re-root .drawer-head.re-top-head > .drawer-title,
.re-panel > .drawer[data-category="MASK"] > .drawer-head > .drawer-title,
.re-panel > .drawer[data-category="USER_IMAGE"] > .drawer-head > .drawer-title { color: var(--blue2) !important; }

/* Category and subcategory LEDs in the control panel: always the existing
   blue ready artwork (colour only; LED status classes are untouched). */
body[data-app="neuro-image"] .control-scroll .mini-led,
body[data-app="neuro-image"] .control-scroll .fx-mini-led {
  background-image: url("../app_images/knobs/ready_LED.png") !important;
  background-color: transparent !important;
  box-shadow: none !important;
}

/* IMAGE (top level, below MASK): the light graphite row */
.re-panel > .drawer.drawer[data-category="USER_IMAGE"] { border: 1px solid #2e2f33 !important; background: #232427 !important; }
.re-panel > .drawer[data-category="USER_IMAGE"] > .drawer-head,
.re-panel > .drawer[data-category="USER_IMAGE"] > .drawer-body { background: #232427 !important; }

/* COLOR (top level, below IMAGE): the dark graphite row; its three
   sub-categories alternate light / dark / light graphite inside it. */
.re-panel > .effect-family-section[data-family-section="COLOR"] { border: 1px solid #2e2f33 !important; background: #141517 !important; padding: 0 !important; margin: 0 !important; }
.re-panel > .effect-family-section[data-family-section="COLOR"] > .effect-family-heading { background: #141517 !important; }
.re-panel > .effect-family-section[data-family-section="COLOR"] > .family-subcategory-list { background: #141517 !important; padding: 6px !important; }
.re-panel > .effect-family-section[data-family-section="COLOR"] .family-subcategory { border: 1px solid #36373b !important; background: #1a1b1e !important; }
.re-panel > .effect-family-section[data-family-section="COLOR"] .family-subcategory > .family-subcategory-toggle { background: #232427 !important; }
.re-panel > .effect-family-section[data-family-section="COLOR"] .family-subcategory[data-subcategory="GREEN MAGENTA"] > .family-subcategory-toggle { background: #1c1d20 !important; }
.re-panel > .effect-family-section[data-family-section="COLOR"] .family-subcategory > .mask-function-body { background: #1a1b1e !important; }


/* ==========================================================
   GLOBAL TOP-LEVEL CATEGORY VISUAL STANDARD
   RELATIVITY / MASK / IMAGE / COLOR
   Typography is uniform; checker backgrounds and tapered blue
   separators remain unchanged. Open outlines match RELATIVITY.
   ========================================================== */
:root {
  --cgfx-category-font-family: Montserrat, "Segoe UI", Arial, sans-serif;
  --cgfx-category-font-style: normal;
  --cgfx-category-font-size: 12px;
  --cgfx-category-font-weight: 800;
  --cgfx-category-font-color: var(--blue2);
  --cgfx-category-letter-spacing: .04em;
  --cgfx-category-open-outline: #67686d;
}

/* One font standard for every TOP-LEVEL category label. */
.re-panel > .re-root .drawer-head.re-top-head > .drawer-title,
.re-panel > .drawer[data-category="MASK"] > .drawer-head > .drawer-title,
.re-panel > .drawer[data-category="USER_IMAGE"] > .drawer-head > .drawer-title,
.re-panel > .effect-family-section[data-family-section="COLOR"] > .effect-family-heading,
.re-panel > .effect-family-section[data-family-section="LIGHT"] > .effect-family-heading,
.re-panel > .effect-family-section[data-family-section="TEXTURE_MAIN"] > .effect-family-heading,
.re-panel > .effect-family-section[data-family-section="TEXTURE"] .family-subcategory[data-subcategory="CLUSTER"] > .family-subcategory-toggle > span:not([class]),
.re-panel > .effect-family-section[data-family-section="RELATIONAL"] .family-subcategory[data-subcategory="RELATIONAL_FIELD"] > .family-subcategory-toggle > span:not([class]),
.re-panel > .effect-family-section[data-family-section="VOLUMETRIC"] .family-subcategory[data-subcategory="VOLUMETRIC_INTEGRAL"] > .family-subcategory-toggle > span:not([class]),
.re-panel > .drawer[data-category="LUMENS_DNA"] > .drawer-head > .drawer-title {
  font-family: var(--cgfx-category-font-family) !important;
  font-style: var(--cgfx-category-font-style) !important;
  font-size: var(--cgfx-category-font-size) !important;
  font-weight: var(--cgfx-category-font-weight) !important;
  color: var(--cgfx-category-font-color) !important;
  letter-spacing: var(--cgfx-category-letter-spacing) !important;
  line-height: 1.2 !important;
}

/* COLOR heading children keep their own controls/icons; only the text inherits blue. */
.re-panel > .effect-family-section[data-family-section="COLOR"] > .effect-family-heading,
.re-panel > .effect-family-section[data-family-section="LIGHT"] > .effect-family-heading,
.re-panel > .effect-family-section[data-family-section="TEXTURE_MAIN"] > .effect-family-heading {
  color: var(--cgfx-category-font-color) !important;
}

/* Closed categories retain their existing frame. OPEN categories all use
   the exact same outline colour currently used by open RELATIVITY. */
.re-panel > .re-root.re-paradigm:not(.re-collapsed),
.re-panel > .drawer.drawer[data-category="MASK"].open,
.re-panel > .drawer.drawer[data-category="USER_IMAGE"].open,
.re-panel > .effect-family-section[data-family-section="COLOR"]:has(> .family-subcategory-list:not([hidden])),
.re-panel > .effect-family-section[data-family-section="LIGHT"]:has(> .family-subcategory-list:not([hidden])),
.re-panel > .effect-family-section[data-family-section="TEXTURE_MAIN"]:has(> .family-subcategory-list:not([hidden])) {
  border: 1px solid var(--cgfx-category-open-outline) !important;
  box-shadow: none !important;
}


/* ==========================================================
   OPEN CATEGORY INTERNAL TYPOGRAPHY STANDARD
   Reference: SCOPE · CONDITIONING internal labels.
   Keep top-level category typography unchanged.
   ========================================================== */

:root {
  --cgfx-internal-font-family: Montserrat, "Segoe UI", Arial, sans-serif;
  --cgfx-internal-font-style: normal;
  --cgfx-internal-font-size: 11px;
  --cgfx-internal-font-weight: 800;
  --cgfx-internal-font-color: #96979b;
  --cgfx-internal-letter-spacing: .04em;
}

/* RELATIVITY internal sub-category labels */
.re-panel > .re-root.re-paradigm .re-sub-list .drawer-title,
.re-panel > .re-root.re-paradigm .re-sub-list .re-chassis-title {
  font-family: var(--cgfx-internal-font-family) !important;
  font-style: var(--cgfx-internal-font-style) !important;
  font-size: var(--cgfx-internal-font-size) !important;
  font-weight: var(--cgfx-internal-font-weight) !important;
  color: var(--cgfx-internal-font-color) !important;
  letter-spacing: var(--cgfx-internal-letter-spacing) !important;
}

/* MASK internal sub-category labels */
.re-panel > .drawer[data-category="MASK"] .mask-top-subcategory-toggle {
  font-family: var(--cgfx-internal-font-family) !important;
  font-style: var(--cgfx-internal-font-style) !important;
  font-size: var(--cgfx-internal-font-size) !important;
  font-weight: var(--cgfx-internal-font-weight) !important;
  color: var(--cgfx-internal-font-color) !important;
  letter-spacing: var(--cgfx-internal-letter-spacing) !important;
}

/* IMAGE internal action/field labels */
.re-panel > .drawer[data-category="USER_IMAGE"] #userImageBrowseBtn,
.re-panel > .drawer[data-category="USER_IMAGE"] .readout-row > span {
  font-family: var(--cgfx-internal-font-family) !important;
  font-style: var(--cgfx-internal-font-style) !important;
  font-size: var(--cgfx-internal-font-size) !important;
  font-weight: var(--cgfx-internal-font-weight) !important;
  color: var(--cgfx-internal-font-color) !important;
  letter-spacing: var(--cgfx-internal-letter-spacing) !important;
}

/* COLOR internal sub-category labels */
.re-panel > .effect-family-section[data-family-section="COLOR"] .family-subcategory-toggle,
.re-panel > .effect-family-section[data-family-section="LIGHT"] .family-subcategory-toggle {
  font-family: var(--cgfx-internal-font-family) !important;
  font-style: var(--cgfx-internal-font-style) !important;
  font-size: var(--cgfx-internal-font-size) !important;
  font-weight: var(--cgfx-internal-font-weight) !important;
  color: var(--cgfx-internal-font-color) !important;
  letter-spacing: var(--cgfx-internal-letter-spacing) !important;
}

/* Preserve INFO / arrow / LED / breaker visuals; typography rule is for labels only. */
.re-panel .info-dot,
.re-panel .arrow,
.re-panel .mini-led,
.re-panel .breaker,
.re-panel .re-breaker {
  font-family: inherit;
}

/* LIGHT (top level, below COLOR): the light graphite row, same frame and
   sub-category treatment as COLOR. */
.re-panel > .effect-family-section[data-family-section="LIGHT"] { border: 1px solid #2e2f33 !important; background: #232427 !important; padding: 0 !important; margin: 0 !important; }
.re-panel > .effect-family-section[data-family-section="LIGHT"] > .effect-family-heading { background: #232427 !important; }
.re-panel > .effect-family-section[data-family-section="LIGHT"] > .family-subcategory-list { background: #141517 !important; padding: 6px !important; }
.re-panel > .effect-family-section[data-family-section="LIGHT"] .family-subcategory { border: 1px solid #36373b !important; background: #1a1b1e !important; }
.re-panel > .effect-family-section[data-family-section="LIGHT"] .family-subcategory > .family-subcategory-toggle { background: #1c1d20 !important; }
.re-panel > .effect-family-section[data-family-section="LIGHT"] .family-subcategory:nth-child(even) > .family-subcategory-toggle { background: #232427 !important; }
.re-panel > .effect-family-section[data-family-section="LIGHT"] .family-subcategory > .mask-function-body { background: #1a1b1e !important; }

/* COLOR / LIGHT master breaker: same artwork and size as every breaker,
   right-aligned before INFO as in the IMAGE row. */
.re-panel > .effect-family-section[data-family-section] > .effect-family-heading > span.breaker.breaker { flex: 0 0 92px !important; margin-left: auto !important; }
.re-panel > .effect-family-section[data-family-section] > .effect-family-heading > span.breaker.breaker + .info-dot { margin-left: 0 !important; }

/* TEXTURE (top level, below LIGHT): COLOR's exact heading values from
   style.css, the dark graphite row of MASK / COLOR, and COLOR's frame. */
.re-panel > .effect-family-section[data-family-section="TEXTURE_MAIN"] > .effect-family-heading { display:flex !important; align-items:center !important; gap:9px !important; box-sizing:border-box !important; height:47px !important; min-height:47px !important; max-height:47px !important; padding:5px 9px !important; margin:0 !important; border:0 !important; outline:0 !important; box-shadow:none !important; position:relative !important; overflow:visible !important; cursor:pointer !important; }
.re-panel > .effect-family-section[data-family-section="TEXTURE_MAIN"] > .effect-family-heading > span:not(.mini-led):not(.info-dot) { display:inline !important; }
.re-panel > .effect-family-section[data-family-section="TEXTURE_MAIN"] > .effect-family-heading > span:not(.texture-family-arrow):not(.mini-led):not(.info-dot) { color:var(--blue2) !important; }
.re-panel > .effect-family-section[data-family-section="TEXTURE_MAIN"] > .effect-family-heading > .info-dot { display:inline-grid !important; }
.re-panel > .effect-family-section[data-family-section="TEXTURE_MAIN"] > .effect-family-heading > .mini-led { display:inline-block !important; visibility:visible !important; opacity:1 !important; width:28px !important; height:28px !important; min-width:28px !important; min-height:28px !important; max-width:28px !important; max-height:28px !important; flex:0 0 28px !important; margin:0 8px 0 4px !important; border:0 !important; border-radius:50% !important; background-color:transparent !important; background-image:url("../app_images/knobs/ready_LED.png") !important; background-repeat:no-repeat !important; background-position:center !important; background-size:28px 28px !important; box-shadow:none !important; }
.re-panel > .effect-family-section[data-family-section="TEXTURE_MAIN"] > .effect-family-heading .texture-family-arrow { width:9px; flex:0 0 9px; font-size:8px; color:#777; }
.re-panel > .effect-family-section[data-family-section="TEXTURE_MAIN"] > .effect-family-heading[aria-expanded="true"] .texture-family-arrow { color:#aaa; }
.re-panel > .effect-family-section[data-family-section="TEXTURE_MAIN"] > .effect-family-heading::before,
.re-panel > .effect-family-section[data-family-section="TEXTURE_MAIN"] > .effect-family-heading::after { content:"" !important; display:block !important; position:absolute !important; left:5% !important; width:90% !important; height:1px !important; pointer-events:none !important; background:linear-gradient(90deg, rgba(47,111,255,0) 0%, rgba(47,111,255,.18) 12%, rgba(47,111,255,.62) 34%, rgba(47,111,255,.95) 50%, rgba(47,111,255,.62) 66%, rgba(47,111,255,.18) 88%, rgba(47,111,255,0) 100%) !important; box-shadow:0 0 3px rgba(47,111,255,.38), 0 0 7px rgba(47,111,255,.16) !important; }
.re-panel > .effect-family-section[data-family-section="TEXTURE_MAIN"] > .effect-family-heading::before { top:0 !important; }
.re-panel > .effect-family-section[data-family-section="TEXTURE_MAIN"] > .effect-family-heading::after { bottom:0 !important; }
.re-panel > .effect-family-section[data-family-section="TEXTURE_MAIN"] > .family-subcategory-list[hidden] { display:none !important; }
.re-panel > .effect-family-section[data-family-section="TEXTURE_MAIN"] { border: 1px solid #2e2f33 !important; background: #141517 !important; padding: 0 !important; margin: 0 !important; }
.re-panel > .effect-family-section[data-family-section="TEXTURE_MAIN"] > .effect-family-heading { background: #141517 !important; }
.re-panel > .effect-family-section[data-family-section="TEXTURE_MAIN"] > .family-subcategory-list { background: #141517 !important; padding: 6px !important; }

/* PATTERN keeps its existing frame shade now that TEXTURE BANK no longer
   precedes it (the zebra rule counts .family-subcategory siblings). */
html body[data-app="neuro-image"] .control-scroll [data-family="TEXTURE"] > .family-subcategory[data-subcategory="CLUSTER"]:nth-child(n of .family-subcategory) { background: #232323 !important; }

/* ==========================================================
   MAIN ROW GEOMETRY + TEXTURES/LIGHT CHASSIS SYMMETRY
   2026-10-07 checkpoint: geometry only; no wiring changes.
   ========================================================== */

/* COLOR and LIGHT: exact closed MAIN-row footprint; hidden children contribute zero height. */
.re-panel > .effect-family-section[data-family-section="COLOR"] > .effect-family-heading,
.re-panel > .effect-family-section[data-family-section="LIGHT"] > .effect-family-heading {
  box-sizing: border-box !important;
  height: 47px !important;
  min-height: 47px !important;
  max-height: 47px !important;
  margin: 0 !important;
}
.re-panel > .effect-family-section[data-family-section="COLOR"] > .family-subcategory-list[hidden],
.re-panel > .effect-family-section[data-family-section="LIGHT"] > .family-subcategory-list[hidden] {
  display: none !important;
}

/* TEXTURES: use LIGHT's internal sub-category chassis 1:1. */
.re-panel > .effect-family-section[data-family-section="TEXTURE_MAIN"] .family-subcategory {
  border: 1px solid #36373b !important;
  background: #1a1b1e !important;
  margin: 0 !important;
}
.re-panel > .effect-family-section[data-family-section="TEXTURE_MAIN"] .family-subcategory > .family-subcategory-toggle {
  box-sizing: border-box !important;
  width: 100% !important;
  height: 47px !important;
  min-height: 47px !important;
  max-height: 47px !important;
  margin: 0 !important;
  background: #1c1d20 !important;
}
.re-panel > .effect-family-section[data-family-section="TEXTURE_MAIN"] .family-subcategory:nth-child(even) > .family-subcategory-toggle {
  background: #232427 !important;
}
.re-panel > .effect-family-section[data-family-section="TEXTURE_MAIN"] .family-subcategory-toggle {
  font-family: var(--cgfx-internal-font-family) !important;
  font-style: var(--cgfx-internal-font-style) !important;
  font-size: var(--cgfx-internal-font-size) !important;
  font-weight: var(--cgfx-internal-font-weight) !important;
  color: var(--cgfx-internal-font-color) !important;
  letter-spacing: var(--cgfx-internal-letter-spacing) !important;
}
.re-panel > .effect-family-section[data-family-section="TEXTURE_MAIN"] .family-subcategory > .family-subcategory-body {
  background: #1a1b1e !important;
}

/* Empty BANK shells must not change row geometry when clicked. */
.re-panel > .effect-family-section[data-family-section="TEXTURE_MAIN"] .family-subcategory > .family-subcategory-body:empty {
  display: none !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
}

/* CG-FX FIX — LIGHT SUBCATEGORY SPACING
   Match COLOR's visible subcategory separation. relativity.css loads after style.css,
   so LIGHT spacing is fixed here at the authoritative later layer. */
html body[data-app="neuro-image"] .control-scroll .re-panel
  > .effect-family-section[data-family-section="LIGHT"] > .family-subcategory-list:not([hidden]) {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  row-gap: 8px !important;
}
html body[data-app="neuro-image"] .control-scroll .re-panel
  > .effect-family-section[data-family-section="LIGHT"] > .family-subcategory-list > .family-subcategory {
  margin: 0 !important;
}

/* ==========================================================
   FINAL LIGHT CLOSE/RESET REPAIR + ARROW STANDARD
   Reference arrow: RELATIVITY.
   No engine, breaker, render, or state logic changes.
   ========================================================== */

/* style.css currently forces LIGHT's list to display:flex !important.
   Restore the hidden state so LIGHT can close normally and GLOBAL RESET works. */
html body[data-app="neuro-image"] .control-scroll .re-panel
  > .effect-family-section[data-family-section="LIGHT"]
  > .family-subcategory-list[hidden] {
  display: none !important;
}

/* When LIGHT is open, keep the required visible separation. */
html body[data-app="neuro-image"] .control-scroll .re-panel
  > .effect-family-section[data-family-section="LIGHT"]
  > .family-subcategory-list:not([hidden]) {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  row-gap: 8px !important;
}

/* Standardize MAIN + SUB-CATEGORY dropdown arrows to RELATIVITY's arrow geometry. */
html body[data-app="neuro-image"] .control-scroll .re-panel .drawer-head > .arrow,
html body[data-app="neuro-image"] .control-scroll .re-panel .re-group-head > .re-group-arrow,
html body[data-app="neuro-image"] .control-scroll .re-panel .re-instruments-head > .re-group-arrow,
html body[data-app="neuro-image"] .control-scroll .re-panel .family-subcategory-toggle > .family-subcategory-arrow,
html body[data-app="neuro-image"] .control-scroll .re-panel .mask-top-subcategory-toggle > .mask-function-arrow,
html body[data-app="neuro-image"] .control-scroll .re-panel .mask-function-toggle > .mask-function-arrow,
html body[data-app="neuro-image"] .control-scroll .re-panel .effect-family-heading > .color-family-arrow,
html body[data-app="neuro-image"] .control-scroll .re-panel .effect-family-heading > .light-family-arrow,
html body[data-app="neuro-image"] .control-scroll .re-panel .effect-family-heading > .texture-family-arrow {
  width: 15px !important;
  min-width: 15px !important;
  max-width: 15px !important;
  flex: 0 0 15px !important;
  font-size: 14px !important;
  line-height: 1 !important;
  color: #e4e4e4 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  opacity: 1 !important;
}

/* Expanded arrows keep the same size and brightness. */
html body[data-app="neuro-image"] .control-scroll .re-panel [aria-expanded="true"] > .arrow,
html body[data-app="neuro-image"] .control-scroll .re-panel [aria-expanded="true"] > .re-group-arrow,
html body[data-app="neuro-image"] .control-scroll .re-panel [aria-expanded="true"] > .family-subcategory-arrow,
html body[data-app="neuro-image"] .control-scroll .re-panel [aria-expanded="true"] > .mask-function-arrow,
html body[data-app="neuro-image"] .control-scroll .re-panel .effect-family-heading[aria-expanded="true"] > .color-family-arrow,
html body[data-app="neuro-image"] .control-scroll .re-panel .effect-family-heading[aria-expanded="true"] > .light-family-arrow,
html body[data-app="neuro-image"] .control-scroll .re-panel .effect-family-heading[aria-expanded="true"] > .texture-family-arrow {
  font-size: 14px !important;
  color: #e4e4e4 !important;
}


/* ==========================================================
   RELATIVITY · LEFT PANEL · VERTICAL
   Six master sections (.re-section) use the RELATIVITY MAIN-row chassis
   (.re-root.re-paradigm); relationship rows use the ROOT sub-row chassis
   (.re-chassis-row). Below: only the vertical-row additions.
   ========================================================== */
.re-panel > .re-section:nth-child(even of .re-section) .drawer-head.re-chassis-head.re-top-head { background: #1c1d20; }
.re-section .re-top-head > .re-section-state { width: auto; min-width: 92px; padding: 4px 8px; white-space: nowrap; }

.re-section .re-v-caption { display: flex; align-items: center; gap: 8px; margin: 6px 2px 0; }
.re-section .re-v-caption > .re-v-plate { margin-left: auto; }

.re-section .re-v-title { display: flex; flex-direction: column; gap: 3px; }
.re-section .re-v-name { display: block; }
.re-section .re-v-sub { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.re-section .re-v-values { font: 700 9px Consolas, monospace; letter-spacing: .04em; color: #6f7278; }
.re-section .re-v-plate {
  padding: 1px 5px;
  border: 1px solid #3a3b40;
  background: #08090a;
  font: 700 8px Consolas, monospace;
  letter-spacing: .06em;
  white-space: nowrap;
}
.re-section .re-v-plate.active { color: #ffad33; border-color: #7a5418; background: #0b0805; }
.re-section .re-v-plate.nyc { color: #8b8d93; border-style: dashed; border-color: #55575d; }
.re-section .re-v-plate.status { color: var(--blue2); }

.re-section .re-v-dir { display: flex; flex-direction: column; gap: 6px; }
.re-section .re-v-dir + .re-v-dir { margin-top: 4px; padding-top: 8px; border-top: 1px solid #2c2d31; }
.re-section .re-v-dirhead,
.re-section .re-v-governs { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.re-section .re-v-label { font-size: 10px; font-weight: 800; letter-spacing: .1em; color: #9a9ca2; }
.re-section .re-v-readout {
  min-width: 54px;
  padding: 3px 8px;
  text-align: right;
  background: #08090b;
  border: 1px solid #2c2d31;
  font: 700 11px Consolas, monospace;
  color: var(--blue2);
}
.re-section .re-v-track { position: relative; }
.re-section .re-v-track > .re-param-slider { width: 100%; }
.re-section .re-v-spec { position: absolute; top: -5px; width: 2px; height: 8px; margin-left: -1px; background: #d8d8d8; pointer-events: none; }
.re-section .re-v-governs { padding: 5px 8px; background: #111214; border: 1px solid #2c2d31; }
.re-section .re-v-govout { font: 700 9.5px Consolas, monospace; letter-spacing: .04em; color: #6f7278; }
.re-section .re-v-govout.live { color: var(--blue2); }

.re-section .re-v-locked .re-v-lock { margin-left: auto; min-width: 0; white-space: nowrap; }
.re-section .re-v-statusrow { display: flex; align-items: center; gap: 6px; padding: 8px; background: #111214; border: 1px solid #2c2d31; }
.re-section .re-v-statusrow > .re-v-label { margin-right: auto; }
.re-section .re-v-status {
  padding: 4px 8px;
  background: #050607;
  border: 1px solid #2a2b2f;
  font: 700 10px Consolas, monospace;
  letter-spacing: .06em;
  color: #4b4d52;
}
.re-section .re-v-status.lit[data-status="READY"] { color: var(--blue2); border-color: #3a3b40; }
.re-section .re-v-status.lit[data-status="PROCESSING"] { color: var(--red); border-color: #5a1f26; }
.re-section .re-v-status.lit[data-status="RENDERED"] { color: #ffad33; border-color: #7a5418; }

/* RELATIVITY LED · dependency-diagram toggle. The halo (outline) means
   DIAGRAM OPEN; the LED artwork / .on class remains the tune status. */
.re-panel .re-top-head > .mini-led.re-diagram-toggle { cursor: pointer; }
.re-panel .re-top-head > .mini-led.re-diagram-open {
  outline: 2px solid var(--blue2) !important;
  outline-offset: 3px !important;
}
.re-diagram-panel {
  position: fixed;
  top: 110px;
  right: 20px;
  left: 460px;
  max-height: calc(100vh - 130px);
  overflow: auto;
  z-index: 90;
  background: #0b0c0e;
  border: 1px solid #2f3034;
  border-radius: 8px;
  padding: 8px;
  box-sizing: border-box;
}
.re-diagram-panel[hidden] { display: none !important; }
.re-diagram-img { display: block; width: 100%; height: auto; }
