/* AURDON DESKTOP — cinematic launch, authentication, portal and exit layers (desktop app only). */
.dx { position: fixed; inset: 0; z-index: 2147483000; background: #000; overflow: hidden; color: #b8ffd0; font-family: "VT323", "Consolas", monospace; cursor: default; user-select: none; transition: opacity .45s ease; }
.dx.fade { opacity: 0; pointer-events: none; }
.dx canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.dx-layer { position: absolute; inset: 0; }
/* depth: the far layer is softer and dimmer; colours change on the GPU via filters */
.dx-rain { transition: filter .8s ease, opacity .8s ease; }
.dx-rain.far { filter: brightness(.85); opacity: .8; } /* low-resolution layer reads soft without a costly blur */
.dx-rain.mid { opacity: .92; }
.dx-rain.text { }
[data-tint="red"] .dx-rain { filter: hue-rotate(-128deg) saturate(2.4) brightness(1.15); }
[data-tint="red"] .dx-rain.far { filter: hue-rotate(-128deg) saturate(2.4) brightness(.8); }
[data-tint="granted"] .dx-rain.far { filter: hue-rotate(52deg) saturate(1.6); }
[data-tint="granted"] .dx-rain.mid { filter: hue-rotate(34deg) saturate(1.4) brightness(1.1); }
[data-tint="granted"] .dx-rain.near { filter: sepia(1) saturate(3.2) hue-rotate(-14deg) brightness(1.2); }
[data-tint="granted"] .dx-rain.text { filter: hue-rotate(40deg); }
/* screen texture: scanlines, vignette, faint CRT flicker */
.dx::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at center, rgba(0,0,0,0) 55%, rgba(0,0,0,.75) 100%); z-index: 40; }
@keyframes dx-flicker { 0%, 96%, 100% { opacity: 1; } 97% { opacity: .82; } 98% { opacity: .95; } }
/* status readout (only true facts about the launch) */
.dx-status { position: absolute; left: 3vw; bottom: 4vh; z-index: 30; font-size: clamp(14px, 1.25vw, 20px); line-height: 1.35; color: #7dffa7; text-shadow: 0 0 8px rgba(40,255,120,.6); max-width: 60vw; }
.dx-status div { white-space: pre; animation: dx-type .25s steps(12); }
.dx-status .ok::before { content: "▸ "; color: #d6ffe2; } .dx-status .step::before { content: "… "; } .dx-status .bad { color: #ff6a7d; text-shadow: 0 0 10px rgba(255,40,80,.7); }
@keyframes dx-type { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.dx-hint { position: absolute; right: 3vw; bottom: 4vh; z-index: 30; font-size: 14px; letter-spacing: .25em; color: rgba(140,255,180,.45); }
/* ── authentication ── */
.dx-auth { position: absolute; inset: 0; z-index: 35; display: grid; place-items: center; pointer-events: none; }
.dx-frame { position: relative; pointer-events: auto; width: min(680px, 92vw); padding: 38px 44px 30px; background: linear-gradient(180deg, rgba(0,22,10,.82), rgba(0,10,5,.9)); border: 1px solid rgba(80,255,150,.55);
  clip-path: polygon(22px 0, calc(100% - 22px) 0, 100% 22px, 100% calc(100% - 22px), calc(100% - 22px) 100%, 22px 100%, 0 calc(100% - 22px), 0 22px);
  box-shadow: 0 0 0 1px rgba(0,0,0,.6) inset, 0 0 60px rgba(30,255,120,.18) inset; animation: dx-open .7s cubic-bezier(.2,.9,.2,1) both; }
@keyframes dx-open { from { clip-path: polygon(50% 49%, 50% 49%, 50% 51%, 50% 51%, 50% 51%, 50% 51%, 50% 49%, 50% 49%); opacity: .4; } 60% { opacity: 1; } }
.dx-frame::before { content: ""; position: absolute; left: 0; right: 0; height: 2px; top: 0; background: linear-gradient(90deg, transparent, rgba(160,255,200,.9), transparent); animation: dx-scan 2.6s linear infinite; box-shadow: 0 0 18px rgba(80,255,150,.9); }
@keyframes dx-scan { 0% { top: 0; } 100% { top: 100%; } }
.dx-kicker { font-size: 15px; letter-spacing: .45em; color: rgba(150,255,190,.7); }
.dx-title { margin: 6px 0 22px; white-space: nowrap; font: 400 clamp(22px, 2.35vw, 40px)/1 "Silkscreen", "VT323", monospace; letter-spacing: .12em; color: #eafff0; text-shadow: 0 0 14px rgba(70,255,140,.85), 0 0 2px #fff; }
.dx-form { display: flex; gap: 10px; }
.dx-pass { flex: 1; min-width: 0; background: rgba(0,0,0,.65); border: 1px solid rgba(80,255,150,.5); color: #eafff0; font: 26px "VT323", Consolas, monospace; letter-spacing: .3em; padding: 10px 14px; outline: none; caret-color: #6dff9c; }
.dx-pass:focus { border-color: #8dffb5; box-shadow: 0 0 18px rgba(80,255,150,.35); }
.dx-btn { background: rgba(40,255,120,.12); border: 1px solid rgba(80,255,150,.7); color: #d9ffe6; font: 22px "VT323", Consolas, monospace; letter-spacing: .25em; padding: 0 18px; cursor: pointer; }
.dx-btn:hover, .dx-btn:focus-visible { background: rgba(40,255,120,.25); outline: none; }
.dx-btn[disabled] { opacity: .5; cursor: wait; }
.dx-hello { margin-top: 14px; width: 100%; padding: 10px; font-size: 20px; }
.dx-hello::before { content: "◉  "; color: #8dfff0; }
.dx-enroll { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 18px; color: rgba(190,255,215,.8); cursor: pointer; }
.dx-enroll input { accent-color: #46ff7a; width: 18px; height: 18px; }
.dx-msg { min-height: 26px; margin-top: 14px; font-size: 20px; color: #9dffbc; letter-spacing: .06em; }
.dx-msg.bad { color: #ff7c8c; }
.dx-foot { display: flex; justify-content: space-between; margin-top: 10px; font-size: 14px; letter-spacing: .25em; color: rgba(140,255,180,.45); }
.dx-foot button { background: none; border: 0; color: inherit; font: inherit; letter-spacing: inherit; cursor: pointer; padding: 0; }
.dx-foot button:hover { color: #d9ffe6; }
.dx-auth.gone .dx-frame { animation: dx-dissolve .7s ease-in forwards; }
@keyframes dx-dissolve { to { transform: scale(1.06); filter: blur(10px) brightness(2.4); opacity: 0; clip-path: polygon(50% 50%, 50% 50%, 50% 50%, 50% 50%, 50% 50%, 50% 50%, 50% 50%, 50% 50%); } }
/* ── the big verdicts ── */
.dx-big { position: absolute; inset: 0; z-index: 38; display: grid; place-items: center; pointer-events: none; white-space: nowrap; text-align: center; font: 400 clamp(40px, 6.8vw, 130px)/1 "Silkscreen", "VT323", monospace; letter-spacing: .08em; opacity: 0; }
.dx-big.on { opacity: 1; }
.dx-big.denied { color: #ff2d4f; text-shadow: -6px 0 rgba(0,255,255,.55), 6px 0 rgba(255,0,60,.8), 0 0 40px rgba(255,20,60,.85); animation: dx-shake .09s steps(2) infinite; }
.dx-big.granted { color: #ffe39a; text-shadow: 0 0 18px rgba(255,210,110,.9), 0 0 60px rgba(60,255,220,.55); animation: dx-glow 1s ease-out both; }
@keyframes dx-shake { 0% { transform: translate(3px, -2px) skewX(-2deg); } 100% { transform: translate(-3px, 2px) skewX(2deg); } }
@keyframes dx-glow { from { letter-spacing: .6em; opacity: 0; filter: blur(8px); } to { letter-spacing: .08em; opacity: 1; filter: blur(0); } }
.dx-sub { position: absolute; left: 50%; bottom: 9vh; transform: translateX(-50%); z-index: 39; max-width: 70vw; padding: 8px 18px; background: rgba(0,0,0,.6); border-left: 2px solid currentColor; font: 22px "Chakra Petch", sans-serif; color: #ffd2d8; opacity: 0; transition: opacity .25s; }
.dx-sub.on { opacity: 1; }
.dx-sub b { color: #ff9aa8; letter-spacing: .15em; font-weight: 600; margin-right: 10px; }
.dx[data-tint="red"]::before { content: ""; position: absolute; inset: 0; z-index: 36; background: radial-gradient(ellipse at center, rgba(255,0,40,.12), rgba(80,0,10,.45)); pointer-events: none; animation: dx-alarm .5s ease-in-out 3; }
@keyframes dx-alarm { 50% { opacity: .35; } }
.dx-flash { position: absolute; inset: 0; z-index: 45; background: #eaffff; opacity: 0; pointer-events: none; transition: opacity .35s ease; }
.dx-flash.on { opacity: 1; }
/* diagnostics (startup failure) */
.dx-diag { pointer-events: auto; width: min(760px, 92vw); }
.dx-diag .dx-title { font-size: clamp(22px, 2.4vw, 36px); color: #ffd1d8; text-shadow: 0 0 12px rgba(255,60,90,.7); }
.dx-diag p { font: 18px "Chakra Petch", sans-serif; color: #cfe; line-height: 1.5; margin: 0 0 18px; user-select: text; }
.dx-diag .row { display: flex; flex-wrap: wrap; gap: 10px; }
.dx-diag .dx-btn { padding: 10px 16px; font-size: 19px; }
/* the EXIT AURDON control (desktop app only), beside the existing top-right controls */
.hq-exit { position: fixed; top: 13px; right: 150px; z-index: 60; display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border: 1px solid rgba(255,140,160,.32); background: rgba(10,4,8,.4); color: rgba(255,205,212,.85); font: 600 11px/1 "Chakra Petch", sans-serif; letter-spacing: .2em; cursor: pointer; backdrop-filter: blur(4px); }
.hq-exit:hover { background: rgba(60,10,20,.75); border-color: rgba(255,140,160,.8); }
@media (prefers-reduced-motion: reduce) { .dx::after { animation: none; } .dx-big.denied { animation: none; } }

/* inside the app the window is always fullscreen, so the browser fullscreen toggle is not needed */
.aurdon-desktop [data-fs] { display: none !important; }
/* keep EXIT clear of an open profile panel (its close button sits in the same corner) */
body:has(#drawer.open) .hq-exit { display: none; }

/* GPU engine layers */
.dx-gl { position: absolute; inset: 0; width: 100%; height: 100%; }
.dx-frags { position: absolute; inset: 0; pointer-events: none; z-index: 2; transition: opacity .3s; }
.dx-frag { position: absolute; white-space: pre; font-family: "VT323", Consolas, monospace; color: #d8ffe4; text-shadow: 0 0 6px rgba(80,255,140,.9), 0 0 18px rgba(40,255,110,.5); }
.dx-frag.hex { color: #6dff9a; opacity: .75; }
[data-tint="red"] .dx-frag { color: #ffd0d6; text-shadow: 0 0 8px rgba(255,40,70,.9); }
/* arrival: Headquarters appears out of the same white the flight ended in */
.dx-whiteout { position: fixed; inset: 0; z-index: 2147483000; background: #eaffff; pointer-events: none; transition: opacity 1.1s ease-out; }
.dx-whiteout.fade { opacity: 0; }

/* opening line before the code ignites */
.dx-intro { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 30; font: 400 clamp(26px, 3vw, 54px)/1 "VT323", Consolas, monospace; letter-spacing: .14em; color: #d8ffe4; text-shadow: 0 0 10px rgba(60,255,130,.9), 0 0 30px rgba(40,255,110,.5); white-space: pre; transition: opacity .5s ease, transform .5s ease, filter .5s ease; }
.dx-intro.cursor::after { content: "▌"; animation: dx-blink .5s steps(1) infinite; }
@keyframes dx-blink { 50% { opacity: 0; } }
.dx-intro.gone { opacity: 0; transform: translate(-50%, -50%) scale(1.6); filter: blur(6px); }

/* desktop app: SIGN OUT is a clearly labelled button beside EXIT AURDON (the fullscreen toggle it sat next to is hidden) */
.aurdon-desktop .hq-signout { top: 13px; right: 16px; height: 26px; padding: 0 10px; border: 1px solid rgba(255,140,160,.32); background: rgba(10,4,8,.4); color: rgba(255,205,212,.85); font: 600 11px/1 "Chakra Petch", sans-serif; letter-spacing: .2em; backdrop-filter: blur(4px); }
.aurdon-desktop .hq-signout b { max-width: 120px; font-weight: 600; }
.aurdon-desktop .hq-signout:hover { background: rgba(60,10,20,.75); border-color: rgba(255,140,160,.8); }
body:has(#drawer.open) .hq-signout { display: none; }

/* desktop app: pointer only while the mouse is moving */
html.dx-nocursor, html.dx-nocursor * { cursor: none !important; }

/* the green screens (launch, sign-in, exit) use AURDON's own pointer: a neon terminal arrow; a green text cursor in fields */
.dx, .dx * { cursor: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2732%27%20height%3D%2732%27%20viewBox%3D%270%200%2032%2032%27%3E%3Cdefs%3E%3Cfilter%20id%3D%27g%27%20x%3D%27-50%25%27%20y%3D%27-50%25%27%20width%3D%27200%25%27%20height%3D%27200%25%27%3E%3CfeGaussianBlur%20stdDeviation%3D%271.4%27%20result%3D%27b%27%2F%3E%3CfeMerge%3E%3CfeMergeNode%20in%3D%27b%27%2F%3E%3CfeMergeNode%20in%3D%27SourceGraphic%27%2F%3E%3C%2FfeMerge%3E%3C%2Ffilter%3E%3C%2Fdefs%3E%3Cg%20filter%3D%27url(%23g)%27%3E%3Cpath%20d%3D%27M4%203%20L4%2023%20L9.5%2018%20L13.5%2027%20L17%2025.4%20L13%2016.6%20L20.5%2016.6%20Z%27%20fill%3D%27rgba(0%2C22%2C10%2C.85)%27%20stroke%3D%27%2350ff94%27%20stroke-width%3D%271.6%27%20stroke-linejoin%3D%27miter%27%2F%3E%3Cpath%20d%3D%27M6.5%208%20L6.5%2017.5%27%20stroke%3D%27%23d8ffe4%27%20stroke-width%3D%271.1%27%2F%3E%3Crect%20x%3D%2722%27%20y%3D%273%27%20width%3D%272%27%20height%3D%272%27%20fill%3D%27%2350ff94%27%2F%3E%3Crect%20x%3D%2726%27%20y%3D%273%27%20width%3D%272%27%20height%3D%272%27%20fill%3D%27%2350ff94%27%20opacity%3D%27.5%27%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E") 4 3, default; }
.dx button, .dx label, .dx [data-a], .dx .dx-cancel { cursor: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2732%27%20height%3D%2732%27%20viewBox%3D%270%200%2032%2032%27%3E%3Cdefs%3E%3Cfilter%20id%3D%27g%27%20x%3D%27-50%25%27%20y%3D%27-50%25%27%20width%3D%27200%25%27%20height%3D%27200%25%27%3E%3CfeGaussianBlur%20stdDeviation%3D%271.4%27%20result%3D%27b%27%2F%3E%3CfeMerge%3E%3CfeMergeNode%20in%3D%27b%27%2F%3E%3CfeMergeNode%20in%3D%27SourceGraphic%27%2F%3E%3C%2FfeMerge%3E%3C%2Ffilter%3E%3C%2Fdefs%3E%3Cg%20filter%3D%27url(%23g)%27%3E%3Cpath%20d%3D%27M4%203%20L4%2023%20L9.5%2018%20L13.5%2027%20L17%2025.4%20L13%2016.6%20L20.5%2016.6%20Z%27%20fill%3D%27rgba(30%2C120%2C60%2C.9)%27%20stroke%3D%27%23c8ffdc%27%20stroke-width%3D%271.6%27%2F%3E%3Ccircle%20cx%3D%2724%27%20cy%3D%275%27%20r%3D%272.2%27%20fill%3D%27%2350ff94%27%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E") 4 3, pointer; }
.dx input, .dx .dx-pass { cursor: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2724%27%20height%3D%2730%27%20viewBox%3D%270%200%2024%2030%27%3E%3Cdefs%3E%3Cfilter%20id%3D%27g%27%20x%3D%27-50%25%27%20y%3D%27-50%25%27%20width%3D%27200%25%27%20height%3D%27200%25%27%3E%3CfeGaussianBlur%20stdDeviation%3D%271.4%27%20result%3D%27b%27%2F%3E%3CfeMerge%3E%3CfeMergeNode%20in%3D%27b%27%2F%3E%3CfeMergeNode%20in%3D%27SourceGraphic%27%2F%3E%3C%2FfeMerge%3E%3C%2Ffilter%3E%3C%2Fdefs%3E%3Cg%20filter%3D%27url(%23g)%27%3E%3Cpath%20d%3D%27M8%203%20L16%203%20M12%203%20L12%2027%20M8%2027%20L16%2027%27%20stroke%3D%27%2350ff94%27%20stroke-width%3D%272%27%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E") 12 15, text; }
