.ste{--bg:#0b1020;--card:#121a31;--card2:#0e1530;--ink:#e8edf9;--mut:#9fb0d0;--line:#26365e;--glow:rgba(120,160,255,.25);
  --analytics:#4f9dff;--ads:#ff7a59;--tagmgr:#a78bfa;--heatmap:#ff5d8f;--abtest:#22d3a7;--crm:#f4b942;--chat:#38bdf8;--perf:#7dd87d;--consent:#c0b283;--seo:#facc15;--custom:#94a3b8;
  font-family:system-ui,Segoe UI,Roboto,Arial,sans-serif;color:var(--ink);max-width:1100px;margin:0 auto;font-size:17px;line-height:1.55}
.ste *{box-sizing:border-box}
.ste-head{text-align:center;margin-bottom:1em}
.ste-h2{font-size:clamp(1.7em,3.4vw,2.4em);margin:0;letter-spacing:.5px}
.ste-sub{color:var(--mut);margin:.4em auto 0;max-width:680px;font-size:1.08em}
.ste-form{display:flex;gap:.5em;margin:1.1em auto;max-width:720px}
.ste-input{flex:1;padding:.9em 1.1em;border-radius:.7em;border:1px solid var(--line);background:#0a1228;color:var(--ink);font-size:1.1em}
.ste-input:focus{outline:none;border-color:#6c8cff;box-shadow:0 0 0 4px var(--glow)}
.ste-btn{padding:.9em 1.4em;border:0;border-radius:.7em;cursor:pointer;font-weight:700;font-size:1.1em;
  background:linear-gradient(135deg,#6c8cff,#a78bfa);color:#08101f;box-shadow:0 6px 20px rgba(108,140,255,.35)}
.ste-btn:hover{filter:brightness(1.07)}
.ste-btn[disabled]{opacity:.6;cursor:wait}
.ste-toolbar{display:flex;flex-wrap:wrap;gap:.6em;justify-content:space-between;align-items:center;margin:.5em 0 1em}
.ste-stat{display:flex;flex-wrap:wrap;gap:.45em}
.ste-pill{display:inline-flex;align-items:center;gap:.35em;padding:.35em .7em;border-radius:999px;background:var(--card);border:1px solid var(--line);font-size:.95em;color:var(--mut)}
.ste-pill b{color:var(--ink)}
.ste-tools{display:flex;gap:.45em}
/* !important on the backgrounds: the bb-theme's button :hover/:focus sets a light grey (#646e7c)
   that otherwise overrides ours and lingers (focus) after a click. */
.ste-mini{padding:.5em .85em;border-radius:.55em;border:1px solid var(--line);background:var(--card)!important;color:var(--ink);cursor:pointer;font-size:.98em;font-weight:600}
.ste-mini:hover,.ste-mini:focus,.ste-mini:active{background:var(--card)!important;border-color:#6c8cff;color:var(--ink);outline:none}
.ste-mini.is-on{background:linear-gradient(135deg,#6c8cff,#a78bfa)!important;color:#08101f;border-color:transparent}
/* green "Copied" state, matching the card copy buttons (.ste-copy.done) */
.ste-mini.done,.ste-mini.done:hover,.ste-mini.done:focus{background:rgba(34,211,167,.14)!important;color:#5ff0ce!important;border-color:#22d3a7}
.ste-status{min-height:1.2em;text-align:center;color:var(--mut);margin:.3em 0;font-size:1.02em}
.ste-status .err{color:#ff9b9b}
.ste-status .spin{display:inline-block;width:1em;height:1em;border:2px solid var(--line);border-top-color:#7aa2ff;border-radius:50%;animation:ste-spin .7s linear infinite;vertical-align:-2px;margin-right:.4em}
@keyframes ste-spin{to{transform:rotate(360deg)}}

/* ---- stage ----
   FLAT on purpose. A previous CSS-3D parallax (perspective + preserve-3d + translateZ + mouse tilt)
   offset pointer hit-testing, so real clicks on the Copy/Details/ⓘ buttons landed on the card/tree
   behind them. Cards still read as raised via box-shadow. Do NOT reintroduce 3D transforms. */
.ste-stage{padding:1.5em .5em 2.5em}
.ste-trunk{margin:0 0 1.6em;opacity:0;animation:ste-rise .6s cubic-bezier(.2,.8,.2,1) forwards}
@keyframes ste-rise{from{opacity:0;transform:translateY(18px)}to{opacity:1;transform:translateY(0)}}

/* container = raised slab. Cards hug their content (no giant empty rectangles). */
.ste-node{position:relative;display:inline-flex;align-items:flex-start;gap:.75em;padding:.9em 1.1em;border-radius:.9em;
  background:linear-gradient(160deg,var(--card),var(--card2));border:1px solid var(--line);
  box-shadow:0 18px 30px -16px rgba(0,0,0,.8),0 2px 0 rgba(255,255,255,.03) inset;
  width:fit-content;min-width:340px;max-width:min(680px,100%)}
.ste-node.is-container{border-left:8px solid var(--tagmgr);box-shadow:0 26px 44px -18px rgba(0,0,0,.85),0 0 0 1px rgba(167,139,250,.18) inset}
.ste-node.is-direct{border-left:8px solid #5b6b95}
.ste-ico{font-size:1.55em;line-height:1.4;filter:drop-shadow(0 2px 4px rgba(0,0,0,.5))}
.ste-body{flex:1;min-width:0}
.ste-titlerow{display:flex;align-items:center;gap:.55em;flex-wrap:wrap}
.ste-name{font-weight:700;font-size:1.14em;word-break:break-word}
.ste-name.ste-num{font-family:ui-monospace,Menlo,Consolas,monospace;font-size:1.08em;letter-spacing:.3px;color:#dbe7ff}
.ste-id{font-family:ui-monospace,Menlo,Consolas,monospace;font-size:.95em;background:rgba(255,255,255,.06);padding:.14em .5em;border-radius:.35em;color:#cfe0ff}
.ste-sub2{color:var(--mut);font-size:.95em;margin-top:.3em}
.ste-loc{font-size:.74em;font-weight:800;letter-spacing:.06em;padding:.16em .5em;border-radius:.3em;text-transform:uppercase}
.ste-loc.head{background:rgba(79,157,255,.18);color:#9cc4ff}
.ste-loc.body{background:rgba(125,216,125,.16);color:#a7e6a7}
.ste-loc.footer{background:rgba(244,185,66,.16);color:#f4cd7a}
.ste-badge{font-size:.78em;font-weight:700;padding:.16em .55em;border-radius:999px}
.ste-badge.ok{background:rgba(34,211,167,.16);color:#5ff0ce}
.ste-badge.bad{background:rgba(255,107,107,.16);color:#ff9b9b}
.ste-badge.cnt{background:rgba(255,255,255,.07);color:var(--mut)}
.ste-badge.dupe{background:rgba(255,80,80,.22);color:#ff9b9b;border:1px solid rgba(255,80,80,.55)}
.ste-badge.attn{background:rgba(255,80,80,.22);color:#ff9b9b;border:1px solid rgba(255,80,80,.55)}

/* "Attention & recommendations" section — sits BELOW the key, titled so it reads as a distinct
   block from the tag list above. */
.ste-alerts{max-width:820px;margin:1.8em auto .4em;padding-top:1.2em;border-top:1px solid var(--line)}
.ste-alerts-h{font-size:1.18em;font-weight:800;color:var(--ink);text-align:center;margin:0 0 .2em}
.ste-alerts-sub{color:var(--mut);font-size:.92em;text-align:center;margin:0 0 1.1em}
.ste-alerts .ste-dupes{margin:0 auto .8em}
.ste-alerts .ste-insights{margin:0 auto}

/* duplicate warnings banner — red border + red shadow (attention) */
.ste-dupes{max-width:820px;margin:1.8em auto .4em;border:1px solid #ff5b5b;background:linear-gradient(160deg,#241114,#150b0c);border-radius:.7em;padding:1em 1.2em;box-shadow:0 14px 30px -12px rgba(255,50,50,.45),0 0 0 1px rgba(255,80,80,.15)}
.ste-dupe-h{font-weight:800;color:#ff8f8f;font-size:1.05em;margin-bottom:.5em}
.ste-dupe-row{font-size:.95em;color:var(--ink);padding:.45em 0;border-top:1px solid rgba(255,90,90,.2)}
.ste-dupe-row:first-of-type{border-top:0}
.ste-dupe-row code{font-family:ui-monospace,Menlo,Consolas,monospace;background:rgba(255,255,255,.08);padding:.06em .35em;border-radius:.3em;color:#ffd0d0}
.ste-dupe-fix{color:var(--mut);font-size:.88em;margin-top:.2em}
/* attention-needed nodes (duplicates + confidently-dead tags): slight red tint + red shadow */
.ste-leaf.is-dupe,.ste-leaf.is-attention{
  background:linear-gradient(160deg,#2a1519,#1d1014);
  border-color:rgba(255,80,80,.55);
  box-shadow:0 0 0 1px rgba(255,80,80,.3),0 12px 22px -10px rgba(255,40,40,.45)}
/* removal advice shown directly on a deprecated card */
.ste-attn{color:#ffb3b3;font-size:.86em;line-height:1.45;margin-top:.4em;max-width:46em}

/* config insights — soft advisories below the duplicate banner (warn=amber, info=blue) */
.ste-insights{max-width:820px;margin:1em auto .4em;display:flex;flex-direction:column;gap:.7em}
.ste-ins-row{border-radius:.7em;padding:.85em 1.1em;border:1px solid var(--line);background:linear-gradient(160deg,var(--card),var(--card2));box-shadow:0 12px 26px -16px rgba(0,0,0,.8)}
.ste-ins-row.lvl-warn{border:1px solid #ff5b5b;background:linear-gradient(160deg,#241114,#150b0c);box-shadow:0 14px 30px -12px rgba(255,50,50,.4),0 0 0 1px rgba(255,80,80,.12)}
.ste-ins-row.lvl-info{border-color:rgba(79,157,255,.4);background:linear-gradient(160deg,#0f1b34,#0c1426)}
.ste-ins-t{font-weight:800;font-size:1.02em;margin-bottom:.3em}
.ste-ins-row.lvl-warn .ste-ins-t{color:#ff8f8f}
.ste-ins-row.lvl-info .ste-ins-t{color:#9cc4ff}
.ste-ins-b{color:var(--mut);font-size:.92em;line-height:1.5}

/* Uniform top-right control cluster: ⓘ then Copy/Details, in the same spot on every card. */
.ste-ctl{display:flex;align-items:center;gap:.45em;align-self:flex-start;margin-left:auto;flex:none}
/* Copy/Details button — a normal IN-FLOW flex item inside .ste-ctl (no absolute positioning). */
.ste-copy{display:inline-flex;align-items:center;gap:.35em;border:1px solid var(--line);
  background:rgba(255,255,255,.05);color:var(--mut);cursor:pointer;border-radius:.5em;padding:.34em .6em;
  font-size:.82em;font-weight:600;flex:none}
.ste-copy svg{width:17px;height:17px;display:block}
.ste-copy:hover{border-color:#6c8cff;color:var(--ink);background:rgba(108,140,255,.12)}
.ste-copy.done{color:#5ff0ce;border-color:#22d3a7;background:rgba(34,211,167,.12)}
.ste-copy.ste-det{color:#9cc4ff;border-color:rgba(108,140,255,.4)}

/* ℹ info affordance + teaser popup */
.ste-info{display:inline-flex;align-items:center;justify-content:center;width:1.55em;height:1.55em;border-radius:50%;
  border:1.5px solid #6c8cff;background:rgba(108,140,255,.22);color:#cfe0ff;font-family:Georgia,"Times New Roman",serif;
  font-style:italic;font-weight:700;font-size:.82em;line-height:1;cursor:pointer;padding:0;flex:none}
.ste-info:hover,.ste-info:focus{border-color:#9cc4ff;color:#fff;background:rgba(108,140,255,.42);outline:none}
/* Tooltip card — deliberately lighter/elevated with a blue glow so it lifts off the tag cards
   underneath. Visibility + opacity are driven from JS for the proximity fade (see tag-explorer.js). */
.ste-pop{position:absolute;z-index:99999;width:300px;max-width:88vw;font-size:16px;
  font-family:system-ui,Segoe UI,Roboto,Arial,sans-serif;color:#eef3ff;
  background:linear-gradient(160deg,#2c3b66,#1b2746);border:1px solid #6379b6;border-radius:.7em;
  padding:.9em 1em;box-shadow:0 26px 54px -12px rgba(0,0,0,.95),0 0 0 1px rgba(130,160,255,.18),0 0 24px rgba(90,130,255,.18);
  opacity:0;visibility:hidden;pointer-events:none;transition:opacity .14s ease}
.ste-pop-t{font-weight:800;font-size:1.02em;margin-bottom:.35em;color:#eaf1ff}
.ste-pop-b{font-size:.92em;line-height:1.5;color:#cdd8f2;margin-bottom:.75em}
/* color !important: the popup is appended to <body> (outside .ste), so the theme's <a> colour
   would otherwise win over this class. */
.ste-pop-btn,.ste-pop-btn:link,.ste-pop-btn:visited,.ste-pop-btn:hover,.ste-pop-btn:focus{
  display:inline-block;font-weight:700;font-size:.9em;color:#fff !important;text-decoration:none !important;
  background:linear-gradient(135deg,#3d5afe,#7c3aed);padding:.5em .95em;border-radius:.5em;
  border:1px solid rgba(255,255,255,.2);box-shadow:0 4px 14px -4px rgba(61,90,254,.6)}
.ste-pop-btn:hover{filter:brightness(1.12)}

/* children branch list with ∟ connectors, indented well clear of the parent */
.ste-children{list-style:none;margin:.7em 0 0;padding:0 0 0 6em}
.ste-child{position:relative;margin:.65em 0}
.ste-child::before{content:"";position:absolute;left:-2em;top:-.65em;bottom:50%;width:2em;
  border-left:2px solid var(--line);border-bottom:2px solid var(--line);border-bottom-left-radius:.5em}
.ste-child:first-child::before{top:-.8em}
.ste-leaf{position:relative;display:inline-flex;align-items:center;gap:.7em;padding:.6em .85em;border-radius:.7em;
  background:linear-gradient(160deg,#101a36,#0d1530);border:1px solid var(--line);
  box-shadow:0 10px 18px -12px rgba(0,0,0,.8);width:fit-content;min-width:300px;max-width:min(620px,100%)}
.ste-leaf .ste-name{font-size:1.04em}
.cat-analytics{border-left:6px solid var(--analytics)} .cat-ads{border-left:6px solid var(--ads)}
.cat-tagmgr{border-left:6px solid var(--tagmgr)} .cat-heatmap{border-left:6px solid var(--heatmap)}
.cat-abtest{border-left:6px solid var(--abtest)} .cat-crm{border-left:6px solid var(--crm)}
.cat-chat{border-left:6px solid var(--chat)} .cat-perf{border-left:6px solid var(--perf)}
.cat-consent{border-left:6px solid var(--consent)} .cat-custom{border-left:6px solid var(--custom)}
.cat-seo{border-left:6px solid var(--seo)}

.ste-legend{display:flex;flex-wrap:wrap;gap:.6em;justify-content:center;margin:.5em 0 1em}
.ste-lg{display:inline-flex;align-items:center;gap:.4em;font-size:.9em;color:var(--mut)}
.ste-dot{width:.8em;height:.8em;border-radius:50%}
.ste-foot{color:var(--mut);font-size:.9em;text-align:center;margin-top:1em;line-height:1.55}
.ste-foot a{color:#9cc4ff}
.ste-empty{text-align:center;color:var(--mut);padding:1em;font-size:1em}
.ste-note{text-align:left;color:var(--mut);font-size:.95em;padding:.4em 0 .2em;max-width:560px}
@media (max-width:600px){
  .ste-node{min-width:0;max-width:100%}
  .ste-leaf{min-width:0;max-width:100%}
  .ste-children{padding-left:3.2em}.ste-child::before{left:-1.8em;width:1.8em}
  .ste-copy span{display:none}.ste-copy{padding:.34em .42em}
}
@media (prefers-reduced-motion:reduce){.ste-trunk{animation:none;opacity:1}.ste-tree{transition:none}}
