/* Design switcher: the dock, and the 3D "design studio" transition between the two designs.
   Neutral styling on purpose: it has to sit comfortably on top of both designs. */
html.nv-in::after { content: ''; position: fixed; inset: 0; z-index: 2147483646; background: #0b0c10; }
html.nv-lock, html.nv-lock body { overflow: hidden !important; }
html.nv-3d { background: #0b0c10 !important; }
html.nv-3d body { position: relative; z-index: 1; will-change: transform, clip-path; transform-style: flat; }
html.nv-3d .nv-dock { opacity: 0 !important; transition: none; }
/* keep the 3D phase light: nothing off-screen paints, and no live backdrop blurs inside the moving page */
html.nv-3d .nv-off { visibility: hidden !important; }
html.nv-3d body * { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }

/* ---------- dock ---------- */
.nv-dock {
  position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 40;
  display: flex; align-items: center; gap: 4px; padding: 5px; border-radius: 999px;
  background: rgba(14, 15, 20, .72); border: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 18px 50px -18px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .06);
  font: 500 13px/1 ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif; color: #e9eaf0;
  transform: translate(-50%, 140%); opacity: 0; transition: transform .7s cubic-bezier(.2, .8, .2, 1), opacity .5s;
}
.nv-dock.on { transform: translate(-50%, 0); opacity: 1; }
.nv-dock .lbl { display: flex; align-items: center; gap: 7px; padding: 0 10px 0 9px; color: #9a9db0; font: 11px/1 ui-monospace, 'Cascadia Mono', Consolas, monospace; letter-spacing: .08em; text-transform: uppercase; }
.nv-dock .lbl svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.7; }
.nv-dock button { white-space: nowrap; position: relative; z-index: 1; display: flex; align-items: center; gap: 8px; border: 0; background: none; color: #a9acbd; font: inherit; padding: 9px 14px; border-radius: 999px; cursor: pointer; transition: color .25s; }
.nv-dock button:hover { color: #fff; }
.nv-dock button[aria-pressed="true"] { color: #fff; cursor: default; }
.nv-dock button i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.nv-dock button[data-d="redteam"] i { background: #ff3b2f; box-shadow: 0 0 10px rgba(255, 59, 47, .7); border-radius: 2px; }
.nv-dock button[data-d="hologram"] i { background: #00e5ff; box-shadow: 0 0 10px rgba(0, 229, 255, .7); }
.nv-dock button[data-d="glass"] i { background: linear-gradient(135deg, #22d3ee, #6e7bff 55%, #b46cff); box-shadow: 0 0 10px rgba(110, 123, 255, .7); }
.nv-dock button[data-d="dusk"] i { background: linear-gradient(180deg, #f5b58a, #e7798f 55%, #7d5fd6); box-shadow: 0 0 10px rgba(245, 181, 138, .7); }
.nv-dock button[data-d="world"] i { background: conic-gradient(#ff9f43, #f5c56b, #ff5470, #b18cff, #4cc9f0, #ff9f43); box-shadow: 0 0 10px rgba(255, 159, 67, .7); }
.nv-dock button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.nv-dock .ind { position: absolute; top: 5px; bottom: 5px; left: 0; width: 0; border-radius: 999px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .12); transition: left .45s cubic-bezier(.2, .8, .2, 1), width .45s cubic-bezier(.2, .8, .2, 1); }
.nv-tip { position: absolute; left: 50%; bottom: calc(100% + 12px); transform: translate(-50%, 6px); white-space: nowrap; background: #fff; color: #0b0c10; font-weight: 600; font-size: 12.5px; padding: 8px 12px; border-radius: 10px; opacity: 0; pointer-events: none; transition: opacity .4s, transform .4s; }
.nv-tip::after { content: ''; position: absolute; left: 50%; top: 100%; margin-left: -6px; border: 6px solid transparent; border-top-color: #fff; }
.nv-tip.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- workspace (behind the artboard) ---------- */
.nv-ws { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: radial-gradient(120% 90% at 50% 40%, #12141b 0%, #0b0c10 60%, #08090c 100%); opacity: 0; --nv-acc: #fff; }
.nv-ws .dots { position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .09) 1px, transparent 1.6px); background-size: 26px 26px; mask-image: radial-gradient(70% 70% at 50% 45%, #000 30%, transparent 100%); -webkit-mask-image: radial-gradient(70% 70% at 50% 45%, #000 30%, transparent 100%); }
.nv-ws .floor { position: absolute; left: -50%; right: -50%; bottom: -30%; height: 75%; transform: perspective(520px) rotateX(72deg); transform-origin: 50% 0; background-image: linear-gradient(var(--nv-grid) 1px, transparent 1px), linear-gradient(90deg, var(--nv-grid) 1px, transparent 1px); background-size: 64px 64px; mask-image: linear-gradient(transparent, #000 35%, #000 70%, transparent); -webkit-mask-image: linear-gradient(transparent, #000 35%, #000 70%, transparent); animation: nv-floor 2.4s linear infinite; }
@keyframes nv-floor { to { background-position: 0 64px, 0 0; } }
.nv-ws .glow { position: absolute; left: 50%; top: 52%; width: 70vmin; height: 70vmin; margin: -35vmin 0 0 -35vmin; border-radius: 50%; background: var(--nv-acc); filter: blur(120px); opacity: .14; transition: background 1s; }

/* ---------- artboard stage (in front of the page; shares its 3D transform) ---------- */
.nv-stage { position: fixed; inset: 0; z-index: 2; pointer-events: none; }
.nv-board { position: absolute; inset: 0; transform-origin: 50% 50%; }
.nv-frame { position: absolute; inset: 0; border: 1.5px solid var(--nv-acc); border-radius: 22px; opacity: 0; box-shadow: 0 0 0 1px rgba(0, 0, 0, .3), 0 0 34px -14px var(--nv-acc), 0 50px 120px -40px rgba(0, 0, 0, .9); transition: opacity .35s; }
.nv-frame i { position: absolute; width: 14px; height: 14px; background: #fff; border: 2px solid var(--nv-acc); border-radius: 3px; }
.nv-frame i:nth-child(1) { left: -8px; top: -8px; } .nv-frame i:nth-child(2) { right: -8px; top: -8px; }
.nv-frame i:nth-child(3) { left: -8px; bottom: -8px; } .nv-frame i:nth-child(4) { right: -8px; bottom: -8px; }
.nv-frame b { position: absolute; left: 0; bottom: calc(100% + 14px); font: 600 20px/1 ui-sans-serif, system-ui, sans-serif; color: var(--nv-acc); white-space: nowrap; display: flex; gap: 12px; align-items: center; }
.nv-frame b span { color: #8b8fa3; font: 400 16px/1 ui-monospace, 'Cascadia Mono', Consolas, monospace; }
.nv-frame em { position: absolute; left: 50%; top: calc(100% + 16px); transform: translateX(-50%); font: 500 16px/1 ui-monospace, 'Cascadia Mono', Consolas, monospace; font-style: normal; color: #0b0c10; background: var(--nv-acc); padding: 7px 12px; border-radius: 7px; white-space: nowrap; }
.nv-board.show-frame .nv-frame { opacity: 1; }
.nv-wire { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 22px; opacity: 0; overflow: hidden; }
.nv-wire.on { opacity: 1; }
.nv-wire .st { fill: none; stroke: var(--nv-acc); stroke-width: 1.4; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .7s cubic-bezier(.6, 0, .2, 1), stroke-opacity .6s; transition-delay: var(--d, 0s); }
.nv-wire .tx { fill: transparent; stroke: var(--nv-acc); stroke-width: 1; stroke-dasharray: 2200; stroke-dashoffset: 2200; transition: stroke-dashoffset 1.1s cubic-bezier(.6, 0, .2, 1), fill .6s, stroke-opacity .6s; transition-delay: var(--d, 0s); }
.nv-wire.draw .st, .nv-wire.draw .tx { stroke-dashoffset: 0; }
.nv-wire .fl { fill-opacity: 0; transition: fill-opacity .7s; transition-delay: var(--f, 0s); }
.nv-wire.filled .fl { fill-opacity: 1; }
.nv-wire.filled .st { stroke-opacity: .28; }
.nv-wire.filled .st.keep { stroke-opacity: 1; }
.nv-wire.filled .tx { stroke-opacity: 0; fill: var(--nv-fg); }
.nv-wire.filled .tx .acc { fill: var(--nv-hl); }
.nv-wire .dash { stroke-dasharray: 3 7; stroke-dashoffset: 0; opacity: 0; transition: opacity .6s .5s; }
.nv-wire.draw .dash { opacity: .8; }

/* ---------- studio UI (toolbar, inspector, cursor) ---------- */
.nv-ui { position: fixed; inset: 0; z-index: 3; pointer-events: none; color: #e9eaf0; font: 13px/1.45 ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif; --nv-acc: #fff; }
.nv-panel { background: rgba(20, 21, 28, .86); border: 1px solid rgba(255, 255, 255, .1); border-radius: 14px; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .9); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.nv-tools { position: absolute; left: 50%; top: 16px; display: flex; align-items: center; gap: 4px; padding: 5px; transform: translate(-50%, -140%); transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.nv-ui.in .nv-tools { transform: translate(-50%, 0); }
.nv-tools i { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; color: #9a9db0; transition: background .25s, color .25s; }
.nv-tools i svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nv-tools i.on { background: var(--nv-acc); color: #0b0c10; }
.nv-tools .sep { width: 1px; height: 20px; background: rgba(255, 255, 255, .12); margin: 0 4px; }
.nv-tools .apply { padding: 9px 14px; border-radius: 9px; font-weight: 650; font-size: 12.5px; color: #0b0c10; background: var(--nv-acc); transition: transform .15s; white-space: nowrap; }
.nv-tools .apply.press { transform: scale(.92); }
.nv-insp { position: absolute; right: 16px; top: 50%; width: 248px; padding: 16px; transform: translate(130%, -50%); transition: transform .7s cubic-bezier(.2, .8, .2, 1); }
.nv-ui.in .nv-insp { transform: translate(0, -50%); }
.nv-insp h5 { font: 11px/1 ui-monospace, 'Cascadia Mono', Consolas, monospace; color: #8b8fa3; letter-spacing: .1em; text-transform: uppercase; display: flex; justify-content: space-between; margin-bottom: 12px; }
.nv-insp h5 b { color: var(--nv-acc); font-weight: 400; }
.nv-spec { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border: 1px dashed rgba(255, 255, 255, .12); border-radius: 10px; margin-bottom: 12px; }
.nv-aa { position: relative; width: 58px; height: 46px; flex: none; }
.nv-aa span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 38px; line-height: 1; letter-spacing: -.04em; transition: opacity .6s, transform .7s cubic-bezier(.2, .8, .2, 1), filter .6s; }
.nv-aa .to { opacity: 0; transform: translateY(12px); filter: blur(6px); }
.nv-ui.morph .nv-aa .from { opacity: 0; transform: translateY(-12px); filter: blur(6px); }
.nv-ui.morph .nv-aa .to { opacity: 1; transform: none; filter: none; }
.nv-sw { display: flex; gap: 6px; }
.nv-sw i { width: 22px; height: 22px; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15); transition: background .9s cubic-bezier(.2, .8, .2, 1), border-radius .8s; transition-delay: calc(var(--i) * .12s); }
.nv-tok { display: grid; gap: 6px; font: 11.5px/1.35 ui-monospace, 'Cascadia Mono', Consolas, monospace; }
.nv-tok div { display: grid; grid-template-columns: 70px 1fr; gap: 8px; opacity: .4; transition: opacity .3s; }
.nv-tok div.done { opacity: 1; }
.nv-tok dt { color: #6f7386; } .nv-tok dd { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nv-tok dd s { color: #5d6174; } .nv-tok dd b { color: var(--nv-acc); font-weight: 400; }
.nv-bar { margin-top: 14px; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.nv-bar i { display: block; height: 100%; width: 0; background: var(--nv-bar, var(--nv-acc)); }
.nv-status { position: absolute; left: 18px; bottom: 16px; font: 11px/1.6 ui-monospace, 'Cascadia Mono', Consolas, monospace; color: #6f7386; letter-spacing: .06em; opacity: 0; transition: opacity .4s; }
.nv-status b { color: var(--nv-acc); font-weight: 400; }
.nv-ui.in .nv-status { opacity: 1; }
.nv-cur { position: absolute; left: 0; top: 0; opacity: 0; transition: opacity .3s; will-change: transform; }
.nv-cur svg { width: 22px; height: 22px; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .6)); }
.nv-cur span { position: absolute; left: 18px; top: 18px; padding: 3px 8px; border-radius: 6px 6px 6px 2px; background: var(--nv-acc); color: #0b0c10; font: 600 11px/1.3 ui-sans-serif, system-ui, sans-serif; white-space: nowrap; }
.nv-ui.in .nv-cur { opacity: 1; }
.nv-cur.click::after { content: ''; position: absolute; left: -10px; top: -10px; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--nv-acc); animation: nv-ping .5s ease-out forwards; }
@keyframes nv-ping { from { transform: scale(.3); opacity: 1; } to { transform: scale(1.8); opacity: 0; } }
.nv-ui.out .nv-tools { transform: translate(-50%, -140%); } .nv-ui.out .nv-insp { transform: translate(130%, -50%); } .nv-ui.out .nv-status, .nv-ui.out .nv-cur { opacity: 0; }

@media (max-width: 760px) {
  .nv-insp { display: none; }
  .nv-tools i { width: 30px; height: 30px; } .nv-tools .apply { padding: 8px 10px; font-size: 12px; }
  .nv-dock .lbl span { display: none; } .nv-dock .lbl { padding: 0 6px 0 8px; } .nv-dock button { padding: 9px 12px; }
  /* four designs on a phone: drop the palette icon and tighten so the dock fits */
  .nv-dock { gap: 2px; font-size: 12.5px; } .nv-dock .lbl { display: none; } .nv-dock button { padding: 9px 10px; gap: 6px; }
  .nv-frame b { font-size: 14px; } .nv-frame b span { font-size: 12px; } .nv-frame em { font-size: 12px; }
}
/* five designs on a narrow phone: names only, so the dock still fits on one line */
@media (max-width: 440px) { .nv-dock button { padding: 9px 8px; } .nv-dock button i { display: none; } .nv-dock { font-size: 12px; } }
@media print { .nv-dock, .nv-ws, .nv-stage, .nv-ui { display: none !important; } }
