/* The GEX instruments own their complete material pair, including nested labels. */
@layer dte-gex-reading {
  html[data-theme="light"] :is(#mkLevels,#deskLevelsMirror) {
    --gr-ink:var(--aku-text); --gr-copy:var(--aku-copy);
    --gr-bg:var(--aku-sky-2); --gr-edge:var(--aku-line);
    color:var(--gr-ink)!important;
  }
  html[data-theme="light"] :is(#mkLevels,#deskLevelsMirror) :is(.hist-confluence-deck,.gex-bars-card) {
    color:var(--aku-text)!important; background:var(--aku-card-bg,var(--aku-sky-2))!important;
    border:1px solid var(--aku-line)!important; border-radius:20px!important;
    padding:20px!important; margin-top:20px!important;
    box-shadow:0 10px 24px color-mix(in srgb,var(--aku-sky-3) 35%,transparent)!important;
  }
  html[data-theme="light"] :is(#mkLevels,#deskLevelsMirror) :where(.hist-confluence-deck,.gex-bars-card) :where(div,span,b,strong,small,em,p,h4,td,th,summary) {
    color:inherit!important; text-shadow:none!important;
  }
  html[data-theme="light"] :is(#mkLevels,#deskLevelsMirror) .dc-elev-chain-core {
    background:linear-gradient(110deg,color-mix(in srgb,var(--aku-w-knowledge) 8%,var(--aku-sky-2)),var(--aku-sky-2))!important;
    color:var(--aku-text)!important;
  }
  html[data-theme="light"] :is(#mkLevels,#deskLevelsMirror) :is(.dc-elev-gate,.dc-el-barrier,.dc-es-cabin,.dc-es-cap,.dc-est-tag,.dc-ecc-spot-hero,.elv-shaft,.dc-es-track,.dc-eg-fav,.dc-eg-dist,.dc-eg-tier,.dc-ecc-chip,.dc-elb-role,.dc-elb-rank,.dc-ehb-badge,.dc-gsc-pill,.dc-gsc-badge,.gbl-item,.gb,.gb-role,.gb-v,.gb-conf-count,.gb-conf-chip,.gul-chip) {
    background:var(--gr-bg)!important; color:var(--gr-ink)!important; border-color:var(--gr-edge)!important;
  }
  html[data-theme="light"] :is(#mkLevels,#deskLevelsMirror) :is(.is-cw,.gb-role-cw,.is-tier-res,.dc-ecc-chip.is-up,.dc-eg-fav.is-up,.dc-es-cap.is-top) {
    --gr-bg:var(--aku-box-green-bg); --gr-ink:var(--aku-box-green-ink); --gr-edge:var(--aku-box-green-border);
  }
  html[data-theme="light"] :is(#mkLevels,#deskLevelsMirror) :is(.is-pw,.gb-role-pw,.is-broken,.is-broken-dn,.is-broken-badge,.is-tier-sup,.dc-ecc-chip.is-dn,.dc-eg-fav.is-dn,.dc-es-cap.is-bot) {
    --gr-bg:var(--aku-box-red-bg); --gr-ink:var(--aku-box-red-ink); --gr-edge:var(--aku-box-red-border);
  }
  html[data-theme="light"] :is(#mkLevels,#deskLevelsMirror) :is(.is-spot,.is-zg,.gb-role-spot,.is-clash-badge,.dc-elb-rank,.dc-gsc-badge,.dc-ehb-badge,.gb-conf-count) {
    --gr-bg:var(--aku-box-amber-bg); --gr-ink:var(--aku-box-amber-sub); --gr-edge:var(--aku-box-amber-border);
  }
  html[data-theme="light"] :is(#mkLevels,#deskLevelsMirror) :is(.dc-sf-verdict.is-dn,.dc-eg-px.is-dn,.dc-elb-dist.is-dn,.elv-dir) { color:var(--aku-bad)!important; }
  html[data-theme="light"] :is(#mkLevels,#deskLevelsMirror) :is(.dc-eg-px.is-up,.dc-elb-dist.is-up) { color:var(--aku-good)!important; }
  html[data-theme="light"] :is(#mkLevels,#deskLevelsMirror) :is(.dc-eg-step b,.dc-ecc-badge,.dc-elb-dist.is-clash) { color:var(--aku-warn)!important; }
  html[data-theme="light"] :is(#mkLevels,#deskLevelsMirror) :is(.dc-gcb-desc,.dc-elbt-facs,.dc-eg-route small,.gb-conf-chip,.gb-dens-meter,.gdm-lbl,.gb-axis-gap) { color:var(--aku-copy)!important; }
  html[data-theme="light"] :is(#mkLevels,#deskLevelsMirror) :is(.dc-sf-kicker,.dc-gcb-zone,.dc-gcb-desc,.dc-gcb-pill,.dc-elb-role,.dc-elb-rank,.dc-elb-dist,.dc-elbt-facs,.dc-elbt-act,.dc-ehb-badge,.dc-eg-step,.dc-eg-fav,.dc-eg-tier,.dc-es-tick,.dc-est-tag,.dc-es-cap,.elv-car-px,.gb-role,.gb-v,.gb-conf-chip,.gb-conf-count,.gdm-lbl) {
    font-size:14px!important; line-height:1.5!important;
  }
  html[data-theme="light"] :is(#mkLevels,#deskLevelsMirror) :is(.dc-gcb-desc,.dc-gcb-zone,.dc-gsc-pill) { white-space:normal!important; overflow-wrap:anywhere; }
  html[data-theme="light"] :is(#mkLevels,#deskLevelsMirror) :is(.dc-gsc-badge,.gbl-item,.gcc-pts,.gul-chip) { font-size:14px!important; line-height:1.5!important; }
  html[data-theme="light"] :is(#mkLevels,#deskLevelsMirror) .dc-gsc-badge { max-width:100%; white-space:normal!important; }
  html[data-theme="light"] :is(#mkLevels,#deskLevelsMirror) .gex-bars { overflow-x:auto!important; overflow-y:hidden!important; overscroll-behavior-inline:contain; }
  html[data-theme="light"] :is(#mkLevels,#deskLevelsMirror) .gb { min-width:140px!important; opacity:1!important; }
  html[data-theme="light"] :is(#mkLevels,#deskLevelsMirror) :is(.gb-role,.gb-v,.gb-strike,.gb-conf-count,.gb-conf-chip,.gb-dens-meter) { opacity:1!important; }
  html[data-theme="light"] :is(#mkLevels,#deskLevelsMirror) .gb-conf-chip { height:auto!important; white-space:normal!important; }
  html[data-theme="light"] :is(#mkLevels,#deskLevelsMirror) .gcc-txt { white-space:normal!important; overflow:visible!important; text-overflow:clip!important; }
  html[data-theme="light"] :is(#mkLevels,#deskLevelsMirror) .gb-foot { color:var(--gr-ink)!important; }
  html[data-theme="light"] :is(#mkLevels,#deskLevelsMirror) .gb::after { background:var(--gr-bg)!important; }
  html[data-theme="light"] :is(#mkLevels,#deskLevelsMirror) .gb.is-orbit-wall { position:relative!important; overflow:hidden!important; isolation:isolate; }
  html[data-theme="light"] :is(#mkLevels,#deskLevelsMirror) .gb.is-orbit-wall::after {
    position:absolute!important; inset:3.2px!important; width:auto!important; height:auto!important; z-index:1!important; pointer-events:none!important;
  }
  html[data-theme="light"] :is(#mkLevels,#deskLevelsMirror) .gb.is-orbit-wall > * { position:relative!important; z-index:2!important; }
  html[data-theme="light"] :is(#mkLevels,#deskLevelsMirror) :where(.hist-confluence-deck,.gex-bars-card) summary {
    color:var(--aku-text)!important; background:var(--aku-sky-2)!important; border-color:var(--aku-line)!important;
  }
  html[data-theme="light"] :is(#mkLevels,#deskLevelsMirror,#mkMacd,#deskMacdMirror) summary::after {
    color:var(--aku-copy)!important; font-size:14px!important;
  }
  html[data-theme="light"] :is(#mkLevels,#deskLevelsMirror) .gb-v { --gr-ink:var(--aku-text); --gr-bg:var(--aku-sky-2); }
  html[data-theme="light"] :is(#mkLevels,#deskLevelsMirror) .gb-v.up { color:var(--aku-good)!important; }
  html[data-theme="light"] :is(#mkLevels,#deskLevelsMirror) .gb-v.down { color:var(--aku-bad)!important; }
  html[data-theme="light"] :is(#mkLevels,#deskLevelsMirror) > h3 .chip.c-red { color:var(--aku-box-red-ink)!important; background:var(--aku-box-red-bg)!important; }
  html[data-theme="light"] :is(#mkLevels,#deskLevelsMirror) > h3 .chip.c-green { color:var(--aku-box-green-ink)!important; background:var(--aku-box-green-bg)!important; }
  html[data-theme="light"] :is(#mkLevels,#deskLevelsMirror) :is(.dc-eg-px.is-up,.dc-elb-dist.is-up,.gb-v.up) { color:color-mix(in srgb,var(--aku-good) 75%,var(--aku-text))!important; }
  :is(#mkLevels,#deskLevelsMirror) .gb.is-orbit-wall { position:relative!important; overflow:hidden!important; isolation:isolate; }
  :is(#mkLevels,#deskLevelsMirror) .gb.is-orbit-wall::after { position:absolute!important; inset:3.2px!important; width:auto!important; height:auto!important; z-index:1!important; pointer-events:none!important; }
  :is(#mkLevels,#deskLevelsMirror) .gb.is-orbit-wall > * { position:relative!important; z-index:2!important; }
  :is(#mkLevels,#deskLevelsMirror) :is(.gb,.gb-v,.gb-conf-chip) { opacity:1!important; }
  html[data-theme="dark"] :is(#mkLevels,#deskLevelsMirror) .gb-conf-chip.is-tier-light :is(.gcc-txt,.gcc-pts) { color:var(--aku-copy)!important; }
  /* Match the accepted Market reading clearance while its Trade Desk copy is open. */
  body:has(#panel-levels:not([hidden]) #deskView-cockpit details.dk-toggle[open]) #slime-mate {
    position:relative!important; inset:auto!important; top:auto!important; right:auto!important; bottom:auto!important; left:auto!important;
    margin:16px auto!important; transform:none!important; z-index:1!important;
  }
  /* Open reference cards need the same complete day material as their labels. */
  html[data-theme="light"] :is(#mkLevels,#deskLevelsMirror) .hcd-row {
    --gr-bg:var(--aku-sky-2); --gr-ink:var(--aku-text); --gr-edge:var(--aku-line);
    background:var(--gr-bg)!important; color:var(--gr-ink)!important; border-color:var(--gr-edge)!important; opacity:1!important;
  }
  html[data-theme="light"] :is(#mkLevels,#deskLevelsMirror) .hcd-row:is(.is-res-row,.is-res-mem) {
    --gr-bg:var(--aku-box-red-bg); --gr-ink:var(--aku-box-red-ink); --gr-edge:var(--aku-box-red-border);
  }
  html[data-theme="light"] :is(#mkLevels,#deskLevelsMirror) .hcd-row:is(.is-sup-row,.is-sup-mem) {
    --gr-bg:var(--aku-box-green-bg); --gr-ink:var(--aku-box-green-ink); --gr-edge:var(--aku-box-green-border);
  }
  html[data-theme="light"] :is(#mkLevels,#deskLevelsMirror) .hcd-row:is(.is-flip-row,.is-spot-mem) {
    --gr-bg:var(--aku-box-amber-bg); --gr-ink:var(--aku-box-amber-sub); --gr-edge:var(--aku-box-amber-border);
  }
  html[data-theme="light"] :is(#mkLevels,#deskLevelsMirror) :is(.hcd-tier-pill,.hcd-code-badge,.hcd-role-tag,.hcd-dist-pill) {
    background:var(--aku-sky-2)!important; color:var(--aku-text)!important; border-color:var(--aku-line)!important;
  }
  html[data-theme="light"] :is(#mkLevels,#deskLevelsMirror) .hcd-row svg text { fill:var(--gr-ink)!important; }
  /* Keep the original compact shaft at every breakpoint. Plot marks and reading
     labels have independent lanes; existing material and state colours stay. */
  :is(#mkLevels,#deskLevelsMirror) .dc-elev-wing-right.is-ticked-shaft-layout {
    grid-template-columns:218px minmax(0,1fr)!important; gap:18px!important;
  }
  :is(#mkLevels,#deskLevelsMirror) .dc-elev-shaft-col {
    width:218px!important; max-width:100%!important; min-width:0!important; min-height:580px!important; height:auto!important;
    box-sizing:border-box!important; justify-self:center!important;
  }
  :is(#mkLevels,#deskLevelsMirror) .dc-es-track {
    min-height:420px!important; margin-block:24px!important; overflow:visible!important;
  }
  :is(#mkLevels,#deskLevelsMirror) .dc-es-tick {
    background:none!important; border:0!important; box-shadow:none!important;
    animation:none!important; transform:translateY(50%)!important;
  }
  :is(#mkLevels,#deskLevelsMirror) .dc-est-tag {
    width:92px!important; min-width:92px!important; max-width:92px!important; flex-basis:92px!important;
    line-height:1.3!important; padding:5px 6px!important;
  }
  :is(#mkLevels,#deskLevelsMirror) .dc-est-tag b,
  :is(#mkLevels,#deskLevelsMirror) .dc-es-cabin b,
  :is(#mkLevels,#deskLevelsMirror) .dc-es-cap { font-size:14px!important; line-height:1.4!important; }
  :is(#mkLevels,#deskLevelsMirror) .dc-est-tag small { font-size:12px!important; line-height:1.4!important; }
  :is(#mkLevels,#deskLevelsMirror) .dc-es-connectors {
    position:absolute!important; top:0!important; bottom:0!important; left:34px!important; right:96px!important;
    width:calc(100% - 130px)!important; height:100%!important; overflow:visible!important;
    fill:none; stroke:var(--es-mark,var(--aku-line)); stroke-width:1.3; pointer-events:none; z-index:2;
  }
  :is(#mkLevels,#deskLevelsMirror) .dc-es-connectors path { vector-effect:non-scaling-stroke; }
  :is(#mkLevels,#deskLevelsMirror) .dc-es-point {
    position:absolute!important; left:34px!important; width:7px!important; height:7px!important;
    transform:translate(-50%,50%)!important; border-radius:50%; z-index:3; pointer-events:none;
    background:var(--es-mark,var(--aku-line)); border:1px solid transparent;
  }
  :is(#mkLevels,#deskLevelsMirror) :is(.dc-es-connectors,.dc-es-point).is-minor { --es-mark:var(--aku-w-knowledge); }
  :is(#mkLevels,#deskLevelsMirror) :is(.dc-es-connectors,.dc-es-point).is-cw { --es-mark:var(--aku-good); }
  :is(#mkLevels,#deskLevelsMirror) :is(.dc-es-connectors,.dc-es-point).is-fort { --es-mark:var(--aku-warn); }
  :is(#mkLevels,#deskLevelsMirror) :is(.dc-es-connectors,.dc-es-point).is-broken { --es-mark:var(--aku-bad); }
  @media(max-width:1100px) {
    :is(#mkLevels,#deskLevelsMirror) .dc-elev-arch-grid { grid-template-columns:1fr!important; }
    :is(#mkLevels,#deskLevelsMirror) .dc-elev-wing-right.is-ticked-shaft-layout { grid-template-columns:218px minmax(0,1fr)!important; }
  }
  @media(max-width:600px) {
    :is(#mkLevels,#deskLevelsMirror) .dc-elev-wing-right.is-ticked-shaft-layout { grid-template-columns:minmax(0,1fr)!important; }
    :is(#mkLevels,#deskLevelsMirror) :is(.dc-elev-arch-grid,.dc-elev-wing-left,.dc-elev-wing-right) { min-width:0!important; }
    #deskLevelsMirror { padding:12px!important; }
    #deskLevelsMirror .hist-confluence-deck { padding:8px!important; }
    #deskLevelsMirror .hist-confluence-deck .dte-elev { padding-inline:0!important; }
  }
  @media(max-width:600px) {
  html[data-theme="light"] :is(#mkLevels,#deskLevelsMirror) :is(.hist-confluence-deck,.gex-bars-card) { padding:14px!important; }
  }
}

/* True-price ruler on the wall elevator (Audi 2026-11-10): 1px tick per $1 (per $5 on wide ranges), label on every $5. */
:is(#mkLevels,#deskLevelsMirror) .dc-es-ruler { position:absolute; inset:0; pointer-events:none; z-index:1; }
:is(#mkLevels,#deskLevelsMirror) .dc-es-rule { position:absolute; left:26px; width:6px; height:1px; background:color-mix(in srgb,var(--aku-copy) 70%,transparent); transform:translateY(50%); }
:is(#mkLevels,#deskLevelsMirror) .dc-es-rule.is-major { left:20px; width:12px; background:var(--aku-copy); }
:is(#mkLevels,#deskLevelsMirror) .dc-es-rule em { position:absolute; right:calc(100% + 3px); top:50%; transform:translateY(-50%); font:700 11px/1 var(--aku-font-body); font-style:normal; font-variant-numeric:tabular-nums; color:var(--aku-copy); }

/* With a price ruler the shaft is a solid spine, not a moving dashed line (Audi 2026-11-10). Colour still says which way the chain pulls. */
:is(#mkLevels,#deskLevelsMirror) .is-ticked-shaft-layout .dc-es-chain { width:3px; background:var(--aku-good); box-shadow:none; animation:none; }
:is(#mkLevels,#deskLevelsMirror) .is-ticked-shaft-layout .dc-es-chain.is-dn { background:var(--aku-bad); }
:is(#mkLevels,#deskLevelsMirror) .is-ticked-shaft-layout .dc-es-chain.is-even { background:var(--aku-copy); }
:is(#mkLevels,#deskLevelsMirror) .dc-es-break { position:absolute; left:42px; font:700 11px/1 var(--aku-font-body); color:var(--aku-copy); white-space:nowrap; }
:is(#mkLevels,#deskLevelsMirror) .dc-es-break.is-top { top:-2px; }
:is(#mkLevels,#deskLevelsMirror) .dc-es-break.is-bot { bottom:-2px; }
