/* BAE v2 — every rule is scoped to html.v2. With the flag off this file does nothing.
   Design frames keep their inline styles (fidelity over tidiness); this file only
   does the shell work Design can't: hiding v1 markup under a v2 frame, the wheel,
   the dock, and the care-tier dimming. */

/* Design draws its own header and Aura pill on every screen; the v1 HUD would double it. */
html.v2 .hud,
html.v2 .zlabel{display:none!important}
/* v1's zone backdrop (the Bridge cockpit, the Forge hangar, …) stays on under v2.
   Design's own flat radial fill fades to a tint so the scene and its lights show through. */
html.v2 .v2c,
html.v2 .v2c > div{background:transparent!important}
html.v2 .v2c > div > div[style*="position:absolute;inset:0;background"]{opacity:.45}
html.v2 .zone{z-index:0}
html.v2 .vp{background:transparent}
/* v1 shell overlays Design never drew: the section rail, the cast peek, and the
   floating sound button (it sat on Design's header). Sound moves into the v2 panel.
   The companion in the corner stays — Design's own Messages copy relies on it. */
html.v2 #srail,
html.v2 #peek,
html.v2 #sfxBtn{display:none!important}
html.v2 .vp{height:var(--v2-vp,786px)}   /* 748 + the 38px HUD it replaces */

/* A hosted screen: v1 markup stays in the DOM (v1 renderers still write to it) but is not shown. */
html.v2 .scr.v2has,
html.v2 .scr.v2only{padding:0}
html.v2 .scr.v2has > :not(.v2c){display:none!important}
html:not(.v2) .v2c,
html:not(.v2) .v2only{display:none!important}

.v2c{position:relative;min-height:100%;overflow:hidden;overflow:clip;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
  -webkit-font-smoothing:antialiased;color:#fff}
.v2c p,.v2c h1,.v2c h2,.v2c h3{font-family:inherit}
.v2c a{color:#A394FF}
.v2c [data-v2a]{cursor:pointer;-webkit-tap-highlight-color:transparent;transition:transform .12s ease,opacity .12s ease}
.v2c [data-v2a]:active{transform:scale(.98);opacity:.86}
.v2c .v2dim{opacity:.42;pointer-events:none}

@keyframes v2breathe{0%,100%{transform:scale(1);opacity:.55}50%{transform:scale(1.08);opacity:.9}}
@keyframes v2pulse{0%,100%{box-shadow:0 0 0 3px rgba(43,196,138,.2)}50%{box-shadow:0 0 0 7px rgba(43,196,138,.04)}}

/* The daily wheel inside Design's card. Slices are drawn from BAE.DRAW weights. */
.v2wheel{position:relative;width:176px;height:176px;margin:0 auto}
.v2wheel-disc{position:absolute;inset:0;border-radius:50%;border:3px solid rgba(255,208,137,.5);
  box-shadow:0 20px 50px rgba(0,0,0,.5),inset 0 0 0 6px rgba(7,6,15,.35);
  transition:transform 3.2s cubic-bezier(.17,.67,.16,1)}
.v2wheel-pin{position:absolute;left:50%;top:-8px;width:0;height:0;margin-left:-9px;z-index:2;
  border-left:9px solid transparent;border-right:9px solid transparent;border-top:16px solid #FFD089;
  filter:drop-shadow(0 2px 4px rgba(0,0,0,.5))}
.v2wheel-hub{position:absolute;left:50%;top:50%;width:54px;height:54px;margin:-27px 0 0 -27px;border-radius:50%;
  background:#07060F;border:2px solid rgba(255,208,137,.5);display:grid;place-items:center;color:#FFD089;z-index:1}
.v2wheel-hub svg{width:24px;height:24px;stroke:currentColor;fill:none;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}

/* v1-only screen, v2 mode: a way across */
.v2crumb{display:none}
html.v2 .v2crumb{display:inline-flex;margin:0 0 12px;padding:8px 12px;border-radius:999px;border:1px solid rgba(163,148,255,.3);
  background:rgba(163,148,255,.12);color:#D6CEFF;font:600 12px/1 -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;cursor:pointer}

/* Which build is this tab? Always visible, never ambiguous. */
.v2dock{font:800 10px/1 -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;letter-spacing:.08em;color:#07060F;
  background:linear-gradient(135deg,#FFD089,#FF9CC4);border:0;border-radius:999px;padding:4px 8px;cursor:pointer}
.v2panel{position:absolute;inset:0;z-index:60;background:rgba(7,6,15,.97);backdrop-filter:blur(16px);
  overflow-y:auto;padding:18px 16px 40px;display:none;color:#fff;
  font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif}
.v2panel.on{display:block}
.v2p-head{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;margin:14px 0 12px}
.v2p-head b{font-size:20px;letter-spacing:-.03em}
.v2p-head span{font-size:11px;color:#867FAC;flex:1}
.v2p-x{background:none;border:0;color:#B8B2D4;font-size:24px;cursor:pointer;line-height:1}
.v2p-row{display:flex;gap:8px;margin-bottom:6px}
.v2p-btn{flex:1;text-align:center;padding:10px;border-radius:12px;border:1px solid rgba(163,148,255,.25);
  background:rgba(163,148,255,.1);color:#fff;font:600 12.5px/1.2 inherit;text-decoration:none;cursor:pointer}
.v2p-lbl{margin:18px 0 8px;font-size:10px;letter-spacing:.16em;font-weight:800;color:#867FAC}
.v2p-grid{display:grid;grid-template-columns:1fr 1fr;gap:6px}
.v2p-grid button{text-align:left;padding:9px 10px;border-radius:10px;border:1px solid rgba(255,255,255,.07);
  background:rgba(255,255,255,.04);color:#E9E6F7;font:500 11.5px/1.3 inherit;cursor:pointer}
.v2p-grid button i{font-style:normal;font-weight:800;color:#A394FF;margin-right:6px;font-size:10.5px}

/* chip rows wider than the phone scroll instead of clipping */
.v2c .v2hscroll{overflow-x:auto!important;scrollbar-width:none;-webkit-overflow-scrolling:touch}
.v2c .v2hscroll::-webkit-scrollbar{display:none}
.v2c .v2hscroll > *{flex-shrink:0}
/* the v1 care card, moved onto the v2 Bridge */
.v2care-slot{margin:14px 20px 0;position:relative;z-index:2}
.v2care-slot .care{margin:0}
/* Design's space-between rows can't shrink their cells (min-width:auto), so long values
   clip at the card edge — e.g. "7-day cooling period" on 13b. Let them wrap. */
.v2c [style*="justify-content:space-between"] > *{min-width:0}
.v2c .noscroll{scrollbar-width:none}
.v2c .noscroll::-webkit-scrollbar{display:none}
html.v2.v2footer .baedock{display:none!important}
html.bridge-dispatch .v2c[data-v2code="1a"] [data-classic]{display:none!important}
html:not(.bridge-dispatch) [data-dispatch-new]{display:none!important}
/* tick boxes toggled in v2: filled with the mint the Design uses for "on" */
.v2c [data-v2chk]{cursor:pointer;transition:background .12s,border-color .12s}
.v2c [data-v2chk="on"],.v2c .v2chk-on{background:#2BC48A!important;border-color:#2BC48A!important;position:relative}
.v2c [data-v2chk="on"]:not([data-v2sw])::after,.v2c .v2chk-on:not([data-v2sw])::after{content:"";position:absolute;left:50%;top:50%;width:6px;height:10px;margin:-7px 0 0 -3px;border:solid #07060F;border-width:0 2px 2px 0;transform:rotate(45deg)}
.v2c [data-v2chk="off"]{background:transparent!important}

/* Section headings in Design frames: the small grey labels become lit, scannable dividers */
.v2c p[style*="letter-spacing:.18em"],
.v2c p[style*="letter-spacing:.16em"]{font-size:12px!important;letter-spacing:.2em!important;font-weight:800!important;color:#D6CEFF!important;
  text-shadow:0 0 14px rgba(163,148,255,.6),0 0 2px rgba(255,255,255,.35);display:flex;align-items:center;gap:10px}
.v2c p[style*="letter-spacing:.18em"]::after,
.v2c p[style*="letter-spacing:.16em"]::after{content:"";flex:1;height:1px;background:linear-gradient(90deg,rgba(163,148,255,.45),transparent)}
/* switches toggled in v2 */
.v2c [data-v2sw][data-v2chk="off"]{background:rgba(255,255,255,.16)!important}
.v2c [data-v2sw][data-v2chk="off"] i{left:3px!important}
.v2c [data-v2sw][data-v2chk="on"]{background:#2BC48A!important}
.v2c [data-v2sw][data-v2chk="on"] i{left:23px!important}

/* Accessibility pass (20 Oct audit). A visible focus ring for keyboard users only,
   a floor under Design's 9px labels, and no bottom nav over a ringing call. */
html.v2 [role="button"]:focus-visible,
html.v2 .v2c [data-v2a]:focus-visible,
html.v2 button:focus-visible{outline:2px solid #A394FF;outline-offset:2px;border-radius:12px}
html.v2 .v2c [style*="font-size:9px"],
html.v2 .v2c [style*="font-size:9.5px"],
html.v2 .v2c [style*="font-size: 9px"],
html.v2 .v2c [style*="font-size: 9.5px"]{font-size:10px!important}
html.v2.v2call #nav{display:none!important}
@media (prefers-reduced-motion: reduce){
  html.v2 .zone .lit, html.v2 .v2c *{animation:none!important;transition:none!important}
}
html.v2 .v2c .v2chip-on{background:#fff!important;color:#07060F!important;border-color:#fff!important}
html.v2 .v2c .v2chip-off{background:rgba(255,255,255,.06)!important;color:#fff!important;border-color:rgba(163,148,255,.22)!important}
html.v2 .v2c .v2chip-off svg{display:none}

/* ── Quick Dial (20 Oct). Monochrome ring, white knob, fixed detents: never the Forge wheel. ── */
.qd{position:absolute;inset:0;z-index:190;pointer-events:none}
.qd-veil{position:absolute;inset:0;background:rgba(5,4,15,.62);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);opacity:0;transition:opacity .22s}
.qd.on{pointer-events:auto}
.qd.on .qd-veil{opacity:1}
.qd-dial{position:absolute;left:50%;top:54%;width:300px;height:300px;margin:-150px 0 0 -150px;transform:scale(.6);opacity:0;transition:transform .26s cubic-bezier(.2,1.3,.4,1),opacity .2s}
.qd.on .qd-dial{transform:scale(1);opacity:1}
.qd-ring{position:absolute;inset:0;border-radius:50%;background:radial-gradient(circle,#24204A 0 56%,#1B1838 57%);border:1px solid rgba(163,148,255,.22);box-shadow:0 20px 50px rgba(0,0,0,.6)}
.qd-ticks{position:absolute;inset:0;width:100%;height:100%}
.qd-ticks line{stroke:rgba(163,148,255,.14);stroke-width:1}
.qd-slot{position:absolute;width:56px;height:56px;margin:-28px 0 0 -28px;border-radius:50%;display:grid;place-items:center;border:0;background:transparent;color:#CFCBEF;cursor:pointer;padding:0;transition:color .15s,background .15s,transform .15s}
.qd-slot svg{width:24px;height:24px;stroke:currentColor;fill:none;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.qd-slot.sel{color:#fff;background:rgba(163,148,255,.2);transform:scale(1.08)}
.qd-slot.live{color:#F5A623}.qd-slot.live.sel{color:#fff}
.qd-slot:focus-visible,.qd-bar button:focus-visible,.qd-pick:focus-visible{outline:2px solid #fff;outline-offset:2px}
.qd-badge{position:absolute;top:2px;right:2px;min-width:18px;height:18px;border-radius:6px;font-size:11px;font-weight:800;line-height:18px;text-align:center;padding:0 4px;color:#fff;background:#C23B74}
.qd-badge.amber{background:#F5A623;color:#1A1205}
.qd-lock{position:absolute;bottom:-2px;right:-2px;width:16px!important;height:16px!important;padding:2px;border-radius:50%;background:#2A2650;stroke:#fff!important;display:none}
.qd.editing .qd-slot.locked{opacity:.55}.qd.editing .qd-slot.locked .qd-lock{display:block}
.qd.editing .qd-slot.swap{outline:1.5px dashed rgba(163,148,255,.7);outline-offset:-4px;animation:qdjig .9s ease-in-out infinite}
@keyframes qdjig{0%,100%{transform:rotate(-3deg)}50%{transform:rotate(3deg)}}
.qd-knob{position:absolute;left:50%;top:50%;width:150px;height:150px;margin:-75px 0 0 -75px;border-radius:50%;background:radial-gradient(circle at 50% 35%,#fff,#ECEAFB 60%,#D9D5F3);border:1px solid #C9C4EE;box-shadow:0 10px 24px rgba(0,0,0,.5);cursor:grab;touch-action:none}
.qd-rot{position:absolute;inset:0;transition:transform .32s cubic-bezier(.3,1.4,.5,1)}
.qd.dragging .qd-rot{transition:none}
.qd-dot{position:absolute;left:50%;top:12px;width:12px;height:12px;margin-left:-6px;border-radius:50%;background:#6C5CE7;box-shadow:0 0 0 3px rgba(108,92,231,.18)}
.qd-read{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;pointer-events:none;padding:18px}
.qd-face{width:44px;height:44px;border-radius:50%;overflow:hidden;border:2px solid #fff;margin-bottom:6px;background:#D9D5F3}
.qd-face img{width:100%;height:100%;object-fit:cover}
.qd-lab{font-size:14px;font-weight:700;color:#14121F;line-height:1.15}
.qd-sub{font-size:10.5px;color:#5E5885;margin-top:3px;line-height:1.3}
.qd-bar{position:absolute;left:0;right:0;bottom:96px;display:flex;justify-content:center;gap:8px;opacity:0;transition:opacity .2s}
.qd.on .qd-bar{opacity:1}
.qd-bar button{font:inherit;font-size:12px;color:#fff;background:rgba(17,16,42,.92);border:1px solid rgba(163,148,255,.18);border-radius:999px;padding:8px 16px;cursor:pointer}
.qd-bar button.pri{background:#fff;color:#14121F;border-color:#fff;font-weight:700}
.qd-sheet{position:absolute;left:0;right:0;bottom:0;background:#14122E;border-top:1px solid rgba(163,148,255,.18);border-radius:24px 24px 0 0;padding:16px 16px 24px;transform:translateY(105%);transition:transform .25s ease}
.qd-sheet.on{transform:none}
.qd-sheet b{display:block;font-size:15px;color:#fff}
.qd-sheet p{font-size:11.5px;color:#A7A1CC;margin:2px 0 12px}
.qd-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.qd-pick{display:flex;flex-direction:column;align-items:center;gap:4px;padding:10px 4px;border-radius:14px;background:rgba(255,255,255,.04);border:1px solid rgba(163,148,255,.18);color:#E7E4FA;font:inherit;font-size:11.5px;cursor:pointer;min-height:66px}
.qd-pick svg{width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.qd-pick small{font-size:10px;color:#7C76A3}
.qd-pick[disabled]{opacity:.38;cursor:default}
.qd-cancel{margin-top:12px;width:100%;font:inherit;font-size:13px;color:#fff;background:transparent;border:1px solid rgba(163,148,255,.18);border-radius:12px;padding:10px;cursor:pointer}
@media (prefers-reduced-motion:reduce){.qd *{transition:none!important;animation:none!important}}
html.qd-open .toast{bottom:auto;top:64px}

/* ── The signal stream (22 Oct). Group colour on the left bar and the chip; the lock is a countdown. ── */
.stream{margin:4px 20px 14px}
.sg-k{margin:10px 0 8px!important}
.sg-chips{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:8px}
.sg-chip{font:inherit;font-size:12px;font-weight:700;color:#CFCBEF;background:rgba(255,255,255,.05);border:1px solid rgba(163,148,255,.18);border-radius:999px;padding:6px 11px;display:inline-flex;align-items:center;gap:6px;cursor:pointer}
.sg-chip.on{border-color:var(--g);color:#fff;background:color-mix(in srgb,var(--g) 18%,transparent)}
.sg-chip .sg-n{font-size:10px;font-weight:800;opacity:.7}
.sg-chip.sg-mine.on{background:#fff;color:#14121F}
.sg-plan{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:11.5px;color:#A7A1CC;margin:0 0 10px}
.sg-link{font:inherit;font-size:11.5px;font-weight:700;color:#A394FF;background:none;border:0;padding:10px 0;margin:-10px 0;cursor:pointer}
.sg-list{display:flex;flex-direction:column;gap:10px}
.sg-card{position:relative;background:rgba(17,16,42,.72);border:1px solid rgba(163,148,255,.16);border-radius:18px;padding:12px 14px 12px 18px;cursor:pointer;overflow:hidden}
.sg-card.sg-done{opacity:.78}
.sg-bar{position:absolute;left:0;top:10px;bottom:10px;width:4px;border-radius:0 4px 4px 0}
.sg-head{display:flex;align-items:center;gap:8px;font-size:11px;margin-bottom:6px}
.sg-grp{font-weight:800;letter-spacing:.12em}
.sg-who{color:#E7E4FA;font-weight:600}
.sg-cred{color:#867FAC;font-weight:600;margin-left:4px}
.sg-time{margin-left:auto;color:#7C76A3}
.sg-row{display:flex;align-items:center;gap:8px}
.sg-sym{font-size:17px;font-weight:800;letter-spacing:-.02em}
.sg-sig{font-size:12px;color:#B8B2D4}
.sg-val{margin-left:auto;font-weight:700;color:#F5A623}
.sg-free{font-size:10.5px;color:#7C76A3;margin:6px 0 0}
.sg-headline{font-size:14px;font-weight:600;line-height:1.4;margin:0 0 6px;color:#fff}
.sg-body{font-size:12.5px;line-height:1.5;color:#B8B2D4;margin:6px 0 0}
.sg-blur{filter:blur(5px);user-select:none;pointer-events:none;opacity:.7}
.sg-risk{font-size:11px;font-weight:700;color:#FF8FB1;margin:6px 0 0;letter-spacing:.02em}
.sg-lvls{display:flex;gap:14px;margin-top:8px}
.sg-lvls span{display:flex;flex-direction:column;gap:1px}
.sg-lvls i{font-style:normal;font-size:9.5px;letter-spacing:.12em;text-transform:uppercase;color:#7C76A3}
.sg-lvls b{font-size:13.5px;color:#fff}
.sg-lock{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;margin-top:10px;padding-top:10px;border-top:1px solid rgba(163,148,255,.12)}
.sg-cd{font-size:13px;font-weight:700;color:#F5A623}
.sg-or{font-size:11.5px;color:#A7A1CC;flex:1}
.sg-btn{font:inherit;font-size:11.5px;font-weight:700;color:#fff;background:rgba(255,255,255,.07);border:1px solid rgba(163,148,255,.22);border-radius:999px;padding:7px 12px;cursor:pointer}
.sg-btn-g{background:#F5A623;color:#1A1205;border-color:#F5A623}
.sg-btn-off{opacity:.55}
.sg-act{display:flex;justify-content:flex-end;margin-top:10px}
.vd-wrong{color:#FF8FB1}
.sg-rec{margin:0 20px 12px}
.sg-recrow{display:grid;grid-template-columns:repeat(4,1fr);gap:6px}
.sg-reccell{background:rgba(17,16,42,.72);border:1px solid rgba(163,148,255,.16);border-top:3px solid var(--g);border-radius:12px;padding:8px 6px;text-align:center;display:flex;flex-direction:column;gap:2px}
.sg-reccell b{font-size:16px}
.sg-reccell span{font-size:10.5px;color:#CFCBEF;font-weight:700}
.sg-reccell i{font-style:normal;font-size:9.5px;color:#7C76A3}
html:not(.v2) .stream{margin:0 0 14px}
.sg-card.sg-bot{padding:9px 14px 9px 18px}
.sg-bot .sg-sym{font-size:15px}
.qd-act{display:inline-block;margin-top:7px;font-size:11px;font-weight:800;letter-spacing:.04em;color:#5E5885;border:1px solid rgba(94,88,133,.35);border-radius:999px;padding:3px 10px}
.qd-act.on{background:#6C5CE7;color:#fff;border-color:#6C5CE7}
.qd-read .qd-face{width:38px;height:38px;margin-bottom:4px}
.qd-lab{font-size:13.5px}
.qd-read{padding:16px 24px}
.qd-sub{font-size:10px}
/* Lite as a mode chip under the Signals tabs, not a second navigation */
.v2mode{display:flex;align-items:center;gap:6px;margin:10px 20px 0;flex-wrap:wrap}
.v2mode-k{font-size:10px;letter-spacing:.16em;font-weight:800;color:#867FAC;margin-right:2px}
.v2chip{font-size:12px;font-weight:700;color:#CFCBEF;background:rgba(255,255,255,.05);border:1px solid rgba(163,148,255,.2);border-radius:999px;padding:5px 11px;cursor:pointer}
.v2chip.on{background:#fff;color:#07060F;border-color:#fff;cursor:default}
.v2mode-s{font-size:11px;color:#867FAC;flex-basis:100%;margin-top:2px}

/* Contrast (23 Oct audit): the muted lavenders measured 4.0 to 4.4:1 on the real card backgrounds, under the 4.5 small text
   needs. Lifted two steps; the hierarchy reads the same. Applies to Design's inline colours and our own. */
html.v2 .v2c [style*="color:#867FAC"],html.v2 .v2c [style*="color: #867FAC"]{color:#9B95C4!important}
html.v2 .v2c [style*="color:#7C76A3"],html.v2 .v2c [style*="color: #7C76A3"]{color:#938DB9!important}
.sg-cred,.sg-time,.sg-free,.sg-lvls i,.sg-reccell i,.sg-chip .sg-n,.v2mode-k,.v2mode-s,.qd-sub,.sg-plan{color:#9B95C4}
.qd-sub{color:#5E5885}

/* tap targets and text floor (23 Oct audit): every chip and small control reaches 36px; no label under 10px */
.sg-chip,.flt button,.chatmode .cmbtn,.sg-btn{min-height:36px}
.thr .pin,.pin{min-width:36px;min-height:36px}
.cr-spot{min-height:32px}
.vp .prop-k,.vp .st-k,.vp .sht .st-k,.vp .nbadge,.vp .spot .sb .nbadge,.vp .sg-k{font-size:10px}
.vp .hubstrip .hs-t b{font-size:10px}
