:root{
  --bg:#0c0c0c; --ps-blue:#012456; --panel:#111318; --border:#2d2d2d;
  --text:#d6d6d6; --white:#ffffff; --yellow:#ffd866; --cyan:#5ab8ff;
  --green:#3ddc6a; --red:#ff6b6b; --gray:#8a8f98; --tab-active:#1f1f1f;
  --tab-inactive:#0c0c0c; --font:"Cascadia Code","Fira Code",Consolas,monospace;
  --accent1:#59c8ff; --accent2:#8b72ff; --glow:rgba(90,184,255,.35);
}

/* ===== Color themes =====
   Switching data-pg-theme swaps every terminal color | prompt, cmdlet
   highlighting, tables, cards | in one place, so text always matches. */
html[data-pg-theme="amber"]{
  --ps-blue:#2b1400; --text:#e8c48a; --white:#ffe9c2; --yellow:#ffb648; --cyan:#ffcf7a;
  --green:#8fd66b; --red:#ff8a65; --gray:#9c7a4d; --accent1:#ffb648; --accent2:#ff7a3d;
  --glow:rgba(255,182,72,.35);
}
html[data-pg-theme="matrix"]{
  --ps-blue:#04170a; --text:#7fffa0; --white:#c9ffd6; --yellow:#c8ff5e; --cyan:#3dffb0;
  --green:#37ff8a; --red:#ff5f6b; --gray:#4f9e6a; --accent1:#3dffb0; --accent2:#37ff8a;
  --glow:rgba(61,255,176,.35);
}
html[data-pg-theme="classic"]{
  --ps-blue:#012456; --text:#d6d6d6; --white:#ffffff; --yellow:#ffd866; --cyan:#5ab8ff;
  --green:#3ddc6a; --red:#ff6b6b; --gray:#8a8f98; --accent1:#59c8ff; --accent2:#8b72ff;
  --glow:rgba(90,184,255,.35);
}

*{box-sizing:border-box}
html,body{height:100%}
body.pg-terminal-body{margin:0;background:#050608;color:var(--text);font-family:var(--font);
  display:flex;flex-direction:column;min-height:100vh}

/* ===== Hero: site name + tagline ===== */
.pg-hero{display:flex;align-items:center;gap:2px;justify-content:center;padding:14px 16px 12px;background:radial-gradient(120% 160% at 50% -20%,#0d1b2e 0%,#050608 70%);border-bottom:1px solid var(--border);flex:none;text-align:left}
.pg-genie-wrap{position:relative;flex:none;width:74px;height:74px;overflow:visible}
.pg-genie-tail{display:none}
.pg-genie-icon{position:relative;z-index:2;width:64px;height:64px;display:block;animation:pgFloat 4.2s ease-in-out infinite;overflow:visible}
@keyframes pgFloat{0%,100%{transform:translateY(0) rotate(-2deg)}50%{transform:translateY(-7px) rotate(2deg)}}
.pg-hero-text{flex:none}
.pg-hero-title{margin:0;color:var(--white);font-weight:800;letter-spacing:.01em;
  font-size:clamp(24px,5vw,38px);line-height:1.05;text-shadow:0 0 22px var(--glow)}
.pg-hero-tag{margin:6px 0 0;color:var(--gray);font-size:clamp(11px,2.4vw,14px);letter-spacing:.02em}

/* ===== Title bar / brand ===== */
.pg-titlebar{display:flex;align-items:center;justify-content:space-between;height:44px;
  padding:0 10px 0 14px;background:var(--ps-blue);border-bottom:1px solid var(--border);flex:none;position:relative}
.pg-titlebar-brand{display:flex;align-items:center;gap:8px;font-weight:700;color:#fff;font-size:13px;letter-spacing:.02em}
.pg-titlebar-brand svg{height:20px;width:20px;flex:none}
.pg-titlebar-menu{display:flex;gap:6px;flex-wrap:wrap;align-items:center}
.pg-tbtn{appearance:none;border:1px solid rgba(255,255,255,.25);background:rgba(255,255,255,.06);
  color:#eaf3ff;font:600 11px/1 var(--font);letter-spacing:.03em;padding:8px 11px;border-radius:6px;cursor:pointer}
.pg-tbtn:hover{background:rgba(255,255,255,.16)}
.pg-tbtn.active{background:#fff;color:var(--ps-blue)}
.pg-tbtn-icon{padding:8px 9px}
.pg-navtoggle{display:none;appearance:none;border:1px solid rgba(255,255,255,.3);background:rgba(255,255,255,.08);
  color:#fff;border-radius:6px;width:36px;height:32px;font-size:16px;cursor:pointer;flex:none}
/* Theme swatches — square chips (not macOS-style traffic-light dots, which
   Windows Terminal doesn't have and which falsely implied min/max/close). */
.pg-win-controls{display:flex;gap:6px;margin-left:8px}
.pg-win-dot{width:24px;height:24px;padding:0;margin:0;border:1px solid rgba(255,255,255,.25);
  background:rgba(255,255,255,.06);display:inline-flex;align-items:center;justify-content:center;
  border-radius:5px;appearance:none;-webkit-appearance:none;cursor:pointer;
  transition:transform .12s ease,box-shadow .12s ease,background .12s ease}
.pg-win-dot::after{content:'';width:11px;height:11px;border-radius:3px;
  border:1px solid rgba(0,0,0,.3);display:block}
.pg-win-dot.min::after{background:#f4c744}.pg-win-dot.max::after{background:#38c172}.pg-win-dot.close::after{background:#2d9cff}
.pg-win-dot:hover{background:rgba(255,255,255,.16);transform:translateY(-1px)}
.pg-win-dot:active{transform:translateY(0) scale(.94)}
.pg-win-dot:focus-visible{outline:2px solid var(--accent1);outline-offset:2px}
/* Ring the dot that matches the active terminal theme so the control also
   doubles as a status indicator, not just a switch. */
html[data-pg-theme="amber"] .pg-win-dot.min::after{box-shadow:0 0 0 2px rgba(244,199,68,.6)}
html[data-pg-theme="matrix"] .pg-win-dot.max::after{box-shadow:0 0 0 2px rgba(56,193,114,.6)}
html[data-pg-theme="classic"] .pg-win-dot.close::after{box-shadow:0 0 0 2px rgba(45,156,255,.7)}


/* ===== Theme / CRT popover ===== */
.pg-theme-panel{position:absolute;top:46px;right:10px;z-index:40;background:#0e1016;
  border:1px solid var(--border);border-radius:10px;padding:12px;width:216px;
  box-shadow:0 12px 32px rgba(0,0,0,.5)}
.pg-theme-panel.pg-hidden{display:none}
.pg-theme-panel h5{margin:0 0 8px;color:#fff;font-size:11px;letter-spacing:.08em;text-transform:uppercase}
.pg-swatch-row{display:flex;gap:8px;margin-bottom:12px}
.pg-swatch{flex:1;border-radius:8px;border:2px solid transparent;height:38px;cursor:pointer;
  display:flex;align-items:center;justify-content:center;font:700 9px var(--font);color:#fff;letter-spacing:.03em}
.pg-swatch.active{border-color:#fff}
.pg-swatch.classic{background:linear-gradient(135deg,#012456,#5ab8ff)}
.pg-swatch.amber{background:linear-gradient(135deg,#2b1400,#ffb648)}
.pg-swatch.matrix{background:linear-gradient(135deg,#04170a,#3dffb0)}
.pg-crt-row{display:flex;align-items:center;justify-content:space-between;padding-top:8px;border-top:1px solid var(--border)}
.pg-crt-row span{font-size:12px;color:#dfe6ee}
.pg-toggle{appearance:none;width:38px;height:20px;border-radius:20px;background:#2a2f3a;position:relative;cursor:pointer;border:1px solid var(--border)}
.pg-toggle::after{content:"";position:absolute;top:1px;left:1px;width:16px;height:16px;border-radius:50%;background:#fff;transition:transform .15s}
.pg-toggle.on{background:var(--accent1)}
.pg-toggle.on::after{transform:translateX(18px)}

/* ===== Tab strip ===== */
.pg-tabstrip{display:flex;align-items:flex-end;gap:2px;background:var(--tab-inactive);
  padding:6px 8px 0;border-bottom:1px solid var(--border);flex:none;overflow-x:auto}
.pg-tab{padding:7px 14px;font-size:12px;border-radius:6px 6px 0 0;background:var(--tab-inactive);
  color:#9a9a9a;border:1px solid var(--border);border-bottom:none;cursor:pointer;white-space:nowrap}
.pg-tab.active{background:var(--tab-active);color:#fff}

/* ===== Layout: split console + explorer ===== */
.pg-shell{flex:1;display:flex;min-height:0;position:relative}
.pg-explorer{width:244px;flex:none;background:var(--panel);border-right:1px solid var(--border);
  overflow-y:auto;padding:10px 0;display:none}
.pg-shell.split .pg-explorer{display:block}
.pg-exp-group{padding:4px 0 10px}
.pg-exp-head{font:700 10px/1 var(--font);letter-spacing:.12em;color:var(--gray);padding:6px 14px;text-transform:uppercase}
.pg-exp-item{padding:8px 14px;font-size:12.5px;color:#d7d7d7;cursor:pointer;display:flex;justify-content:space-between;gap:8px}
.pg-exp-item:hover{background:#1a1d24;color:#fff}
.pg-exp-item small{color:var(--gray)}
.pg-backdrop{display:none;position:fixed;inset:0;background:rgba(0,0,0,.5);z-index:15}
.pg-backdrop.show{display:block}

/* ===== Console ===== */
.pg-console-wrap{flex:1;min-width:0;display:flex;flex-direction:column;background:var(--bg);position:relative}
.pg-console-toolbar{display:flex;align-items:center;gap:6px;min-height:38px;padding:5px 10px;background:rgba(3,7,12,.96);border-bottom:1px solid rgba(255,255,255,.07);flex:none;overflow:auto;white-space:nowrap;scrollbar-width:none}.pg-console-toolbar::-webkit-scrollbar{display:none}.pg-toolbar-btn{appearance:none;border:1px solid rgba(255,255,255,.11);background:#0d141c;color:#d9e7f0;border-radius:6px;padding:6px 10px;font:700 10.5px var(--font);cursor:pointer}.pg-toolbar-btn:hover{background:#17212c;border-color:var(--accent1);color:#fff}.pg-toolbar-btn:focus-visible{outline:2px solid var(--accent1);outline-offset:1px}.pg-toolbar-divider{width:1px;height:20px;background:rgba(255,255,255,.08);margin:0 3px}.pg-toolbar-hint{color:#6f8290;font:600 9.5px var(--font);letter-spacing:.03em}
.pg-console{flex:1;overflow-y:auto;padding:18px 20px 8px;font-size:14.5px;line-height:1.65;
  -webkit-font-smoothing:antialiased}
.pg-line{white-space:pre-wrap;word-break:break-word;margin:0 0 3px}
.pg-prompt-line{display:flex;gap:0;color:var(--white)}
.pg-prompt-path{color:var(--yellow);font-weight:600}
.pg-prompt-caret{color:var(--white);margin-right:6px}
.pg-echo-cmd{color:#fff;font-weight:600}
.pg-out{color:var(--text);margin-bottom:7px}
.pg-out.err{color:var(--red)}
.pg-out.ok{color:var(--green)}
.pg-out.info{color:var(--cyan)}
.pg-inputrow{display:flex;align-items:center;padding:2px 0 10px;flex:none}
.pg-inputrow .pg-prompt-path{margin-right:0}
.pg-input{flex:1;background:transparent;border:none;outline:none;color:#fff;font:inherit;
  caret-color:#fff;padding-left:6px;font-size:15px}
.pg-inputbar{display:flex;align-items:center;padding:0 18px;gap:10px;border-top:1px solid rgba(255,255,255,.05)}
.pg-clearbtn{flex:none;appearance:none;background:transparent;border:1px solid var(--border);
  color:var(--gray);font:600 10.5px var(--font);letter-spacing:.03em;padding:7px 10px;
  border-radius:6px;cursor:pointer;white-space:nowrap}
.pg-clearbtn:hover{color:#fff;border-color:var(--accent1)}

/* ===== Syntax tokens ===== */
.ps-cmdlet{color:var(--yellow);font-weight:700}
.ps-param{color:var(--cyan)}
.ps-string{color:var(--green)}
.ps-comment{color:var(--gray);font-style:italic}
.ps-error{color:var(--red)}
.ps-var{color:var(--accent2)}

/* ===== Tables ===== */
.pg-table{border-collapse:collapse;margin:6px 0 12px;width:100%;font-size:13px}
.pg-table th{text-align:left;color:var(--cyan);border-bottom:1px solid var(--border);padding:5px 14px 5px 0;font-weight:700}
.pg-table td{padding:4px 14px 4px 0;color:var(--text);vertical-align:top}
.pg-table tr:hover td{color:#fff}
.pg-table tr.pg-row-click{cursor:pointer}
.pg-table tr.pg-row-click:hover td{color:#fff;background:#141821}
.pg-table tr.pg-row-click:focus{outline:1px solid var(--cyan)}

/* ===== Detail cards (script code, quiz) ===== */
.pg-card{border-left:3px solid var(--cyan);padding:5px 0 5px 14px;margin:8px 0 16px;background:transparent}
.pg-card h4{margin:0 0 7px;color:#fff;font-size:14px;font-weight:700}
.pg-card .k{color:var(--cyan)}
.pg-card pre{background:#0a0c10;border:1px solid var(--border);border-radius:6px;padding:10px 12px;margin:7px 0;overflow-x:auto;font-size:13px;line-height:1.55}
.pg-card ol{margin:5px 0 9px 20px;padding:0}
.pg-card ol li{margin:3px 0}

/* ===== Format-List style output ===== */
.pg-fl{margin:6px 0 16px;padding-left:14px;border-left:3px solid var(--yellow)}
.pg-fl-title{color:#fff;font-weight:700;margin-bottom:5px;font-size:14px}
.pg-fl-row{display:flex;gap:0;white-space:pre-wrap}
.pg-fl-k{color:var(--cyan);white-space:pre}
.pg-fl-sep{color:var(--gray)}
.pg-fl-v{color:var(--text);word-break:break-word}

/* ===== In-console navigation hints ===== */
.pg-hint{color:var(--gray);font-style:italic;margin:3px 0 12px}
.pg-hint b{color:var(--cyan);font-style:normal}

/* ===== Footer status bar ===== */
.pg-statusbar{flex:none;display:flex;justify-content:space-between;padding:6px 14px;
  background:var(--ps-blue);color:#dfe9ff;font-size:11px;letter-spacing:.02em}

/* ===== CRT mode ===== */
html[data-pg-crt="on"] .pg-console-wrap::before{
  content:"";position:absolute;inset:0;pointer-events:none;z-index:5;
  background:repeating-linear-gradient(rgba(0,0,0,0) 0 2px,rgba(0,0,0,.18) 2px 4px);
  mix-blend-mode:multiply}
html[data-pg-crt="on"] .pg-console-wrap::after{
  content:"";position:absolute;inset:0;pointer-events:none;z-index:6;
  box-shadow:inset 0 0 120px rgba(0,0,0,.65);animation:pgFlicker 5s infinite}
html[data-pg-crt="on"] .pg-console{text-shadow:0 0 3px var(--glow),0 0 1px var(--glow)}
@keyframes pgFlicker{0%,96%,100%{opacity:1}97%{opacity:.94}98%{opacity:1}}

/* ===== Interaction polish ===== */
.pg-exp-item,.pg-tbtn,.pg-clearbtn{min-height:36px}
.pg-exp-item{align-items:center}
.pg-row-click{transition:background .12s ease,color .12s ease}
.pg-row-click:focus-visible{outline:2px solid var(--cyan);outline-offset:-2px}
.pg-system-note{border-left:3px solid var(--accent1);padding-left:12px;margin:2px 0 10px}
.pg-boot-splash{min-height:100%;display:grid;place-content:center;justify-items:center;gap:10px;text-align:center;padding:28px 20px;color:var(--text)}
.pg-boot-orb{width:64px;height:64px;border-radius:18px;display:grid;place-items:center;font-size:26px;color:#fff;background:linear-gradient(135deg,var(--accent1),var(--accent2));box-shadow:0 0 36px var(--glow);animation:pgBootPulse 1.25s ease-in-out infinite}
.pg-boot-title{font-size:21px;font-weight:800;color:var(--white);letter-spacing:.01em}
.pg-boot-sub{font-size:11px;color:var(--gray)}
.pg-boot-dots{display:inline-block;width:20px;text-align:left;animation:pgDots 1.1s steps(4,end) infinite}
.pg-boot-bar{width:min(290px,72vw);height:3px;border-radius:99px;background:#171b21;overflow:hidden;margin-top:4px}.pg-boot-bar span{display:block;height:100%;width:40%;background:linear-gradient(90deg,var(--accent1),var(--accent2));animation:pgBootBar 1s ease-in-out infinite}
@keyframes pgBootPulse{50%{transform:scale(1.035);box-shadow:0 0 48px var(--glow)}}@keyframes pgDots{0%,100%{opacity:.25}50%{opacity:1}}@keyframes pgBootBar{0%{transform:translateX(-120%)}100%{transform:translateX(300%)}}
@media (prefers-reduced-motion:reduce){.pg-boot-orb,.pg-boot-dots,.pg-boot-bar span{animation:none}.pg-boot-bar span{transform:translateX(80%)}}

/* ===== Mobile ===== */
@media (max-width:760px){
  body.pg-terminal-body{min-height:100svh;overflow:hidden}
  .pg-hero{padding:14px 14px 10px;gap:10px;justify-content:flex-start}
  .pg-genie-wrap{width:42px;height:42px}
  .pg-genie-icon{width:42px;height:42px}
  .pg-hero-title{font-size:25px}
  .pg-hero-tag{font-size:11px;line-height:1.4}
  .pg-titlebar{height:46px;padding:0 8px 0 12px}
  .pg-titlebar-menu{position:fixed;top:46px;left:0;right:0;z-index:30;flex-direction:column;align-items:stretch;background:#0b0f16;border-bottom:1px solid var(--border);padding:8px;gap:4px;display:none;max-height:calc(100svh - 46px);overflow-y:auto}
  .pg-titlebar-menu.pg-open{display:flex}
  .pg-tbtn{width:100%;text-align:left;padding:10px 12px;min-height:40px}
  .pg-navtoggle{display:inline-flex;align-items:center;justify-content:center;width:38px;height:36px}
  .pg-win-controls{gap:6px;margin-left:6px}.pg-win-dot{width:22px;height:22px}.pg-win-dot::after{width:9px;height:9px}
  .pg-tabstrip{padding:4px 6px 0}.pg-tab{max-width:calc(100vw - 12px);overflow:hidden;text-overflow:ellipsis}
  .pg-shell{min-height:0}
  .pg-explorer{display:none!important}
  .pg-console-wrap{min-width:0}
  .pg-console{font-size:13.5px;line-height:1.55;padding:12px 12px 5px;overscroll-behavior:contain}
  .pg-inputbar{padding:6px 10px 8px;gap:7px;min-height:48px}
  .pg-input{font-size:16px;min-width:0;padding-left:4px}
  .pg-prompt-path{white-space:nowrap;max-width:56vw;overflow:hidden;text-overflow:ellipsis}
  .pg-clearbtn{padding:8px 10px;min-height:38px}
  .pg-statusbar{font-size:9px;padding:6px 10px;min-height:26px}
  .pg-statusbar span:first-child{display:none}
  .pg-table{font-size:12px;display:block;overflow-x:auto;-webkit-overflow-scrolling:touch}
  .pg-table th,.pg-table td{padding:5px 10px 5px 0;white-space:nowrap}
  .pg-card,.pg-fl{padding-left:10px}
  .pg-card pre{font-size:11.5px;max-width:100%;white-space:pre;overflow-x:auto}
  .pg-boot-title{font-size:18px}.pg-boot-splash{padding:24px 16px}
}
@media (max-width:380px){
  .pg-hero{padding-left:10px;padding-right:10px}.pg-hero-title{font-size:22px}.pg-titlebar{padding-left:8px}
  .pg-titlebar-brand{font-size:12px}.pg-titlebar-brand svg{height:18px;width:18px}
  .pg-win-controls{display:none}.pg-prompt-path{max-width:48vw}.pg-console{padding-left:9px;padding-right:9px}
  .pg-inputbar{padding-left:7px;padding-right:7px}.pg-clearbtn{padding-left:8px;padding-right:8px}
}

.pg-hidden{display:none!important}

/* PSG v4 navigation/mobile corrections */
.pg-mobile-sectionbar{display:none}
@media (max-width:760px){
  .pg-shell{display:block;min-height:0}
  .pg-explorer{display:none!important}
  .pg-mobile-sectionbar{display:flex;align-items:center;gap:10px;padding:8px 12px;background:var(--panel);border-bottom:1px solid var(--border)}
  .pg-mobile-sectionbar label{font-size:10px;color:var(--gray);font-weight:800;letter-spacing:.08em;text-transform:uppercase;white-space:nowrap}
  .pg-mobile-sectionbar select{flex:1;min-width:0;background:#0d1118;color:#fff;border:1px solid var(--border);border-radius:8px;padding:9px 10px;font:600 12px var(--font);outline:none}
  .pg-console{padding:14px 12px 8px;font-size:13px;line-height:1.55}
  .pg-inputbar{padding:0 10px;gap:7px;align-items:flex-start}
  .pg-prompt-path{max-width:52%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .pg-input{font-size:14px;min-width:0}
  .pg-clearbtn{display:none}
  .pg-statusbar{font-size:9px;padding:5px 10px}
  .pg-statusbar span:last-child{max-width:52%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
}



/* v5 terminal UX: one mobile control, no sidebar on phone */
.pg-mobile-go,.pg-mobile-go-label{display:none}
.cmd-count{margin-top:8px;color:var(--muted,#7d8794);font-size:12px}
@media (max-width:760px){
  .pg-shell{display:block!important}
  .pg-explorer{display:none!important}
  .pg-titlebar{position:sticky;top:0;z-index:40;height:52px;padding:0 8px 0 12px;gap:7px}
  .pg-titlebar-brand{min-width:0;flex:0 0 auto}
  .pg-mobile-go-label{display:block;font-size:9px;letter-spacing:.08em;text-transform:uppercase;color:var(--gray);margin-left:auto}
  .pg-mobile-go{display:block;min-width:0;max-width:118px;height:34px;background:#0c1219;color:#fff;border:1px solid var(--border);border-radius:7px;padding:0 8px;font:600 11px var(--font)}
  .pg-console-wrap{height:calc(100svh - 52px - 28px);min-height:0}
  .pg-console{min-height:0}
  .pg-inputbar{position:sticky;bottom:0;background:var(--bg);z-index:8;border-top:1px solid rgba(255,255,255,.07);padding:6px 9px 8px}
  .pg-statusbar{position:sticky;bottom:0;z-index:9}
}
@media(max-width:420px){
  .pg-mobile-go-label{display:none}
  .pg-mobile-go{max-width:104px;font-size:10.5px}
}


/* v5.1 mobile layout: no fixed sidebar, dropdown lives in title bar, console fills remaining viewport */
@media (max-width:760px){
  body.pg-terminal-body{display:flex;flex-direction:column;height:100svh;min-height:100svh;overflow:hidden}
  .pg-hero{flex:0 0 auto}
  .pg-titlebar{flex:0 0 52px;height:52px;position:relative;top:auto}
  .pg-tabstrip{flex:0 0 auto}
  .pg-shell{display:flex!important;flex:1 1 auto;min-height:0;height:auto!important}
  .pg-explorer{display:none!important}
  .pg-console-wrap{display:flex!important;flex:1 1 auto;min-height:0;height:auto!important}
  .pg-console{flex:1 1 auto;min-height:0;overflow:auto}
  .pg-inputbar{flex:0 0 auto;position:relative;bottom:auto}
  .pg-statusbar{flex:0 0 auto;position:relative;bottom:auto}
  .pg-mobile-go-label{display:none!important}
  .pg-mobile-go{display:block!important;max-width:128px;flex:0 0 128px;height:34px}
  .pg-titlebar-brand{flex:0 0 auto;min-width:0}
}
@media(max-width:420px){.pg-mobile-go{max-width:102px;flex-basis:102px;font-size:10px;padding-left:6px;padding-right:6px}}


/* PowerShell Genie v6 terminal mobile UX */
.pg-mobile-navtoggle{display:none;appearance:none;border:1px solid rgba(255,255,255,.24);background:rgba(255,255,255,.07);color:#fff;border-radius:8px;width:40px;height:40px;font:700 17px/1 var(--font);cursor:pointer;flex:0 0 auto}
.pg-mobile-navtoggle:focus-visible{outline:2px solid var(--accent1);outline-offset:2px}
.pg-newsbar{min-height:38px;display:flex;align-items:center;gap:12px;padding:6px 14px;background:var(--ps-blue);border-bottom:1px solid rgba(255,255,255,.10);font-size:11px;line-height:1.3;flex:none;overflow:hidden}
.pg-news-label{font-size:9px;font-weight:900;letter-spacing:.11em;color:#bcdcff;white-space:nowrap}
.pg-newsbar a{display:inline-block;color:#fff;text-decoration:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:7px 4px;margin:-7px -4px}
.pg-newsbar a:hover{text-decoration:underline;color:var(--yellow)}
@media (min-width:761px){.pg-mobile-only{display:none!important}}
@media (max-width:760px){
  body.pg-terminal-body{height:100svh;min-height:100svh;overflow:hidden}
  .pg-hero{display:flex;align-items:center;justify-content:flex-start;padding:12px 12px 10px;gap:10px;text-align:left;overflow:hidden}
  .pg-genie-wrap{width:44px;height:44px}.pg-genie-icon{width:44px;height:44px}
  .pg-hero-text{min-width:0;max-width:calc(100vw - 72px)}
  .pg-hero-title{font-size:24px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .pg-hero-tag{font-size:10.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
  .pg-titlebar{height:52px;padding:0 10px 0 12px;gap:7px}
  .pg-titlebar-brand{min-width:0}.pg-titlebar-brand svg{width:20px;height:20px}
  .pg-win-controls{display:none}
  .pg-mobile-navtoggle{display:inline-flex;align-items:center;justify-content:center}
  .pg-explorer{display:block!important;position:fixed!important;top:104px!important;right:8px!important;left:auto!important;width:min(88vw,350px)!important;max-height:calc(100svh - 116px)!important;z-index:100!important;
    border:1px solid var(--border)!important;border-radius:14px!important;box-shadow:0 24px 60px rgba(0,0,0,.5)!important;transform:translateY(-8px) scale(.985);opacity:0;visibility:hidden;pointer-events:none;transition:opacity .16s ease,transform .16s ease,visibility .16s ease;padding:8px 0!important}
  .pg-explorer.pg-mobile-open{opacity:1;visibility:visible;pointer-events:auto;transform:translateY(0) scale(1)}
  .pg-exp-item{min-height:46px!important;padding:10px 14px!important;font-size:13px!important}
  .pg-exp-head{padding:8px 14px!important}
  body.pg-mobile-menu-open{overflow:hidden}
  .pg-newsbar{min-height:34px;padding:5px 10px;gap:9px;font-size:10px}
  .pg-news-label{font-size:8px}
  .pg-tabstrip{padding:4px 6px 0}
  .pg-shell{display:flex!important;flex:1 1 auto;min-height:0;height:auto!important}
  .pg-console-wrap{height:auto!important;min-height:0;display:flex!important;flex:1 1 auto}
  .pg-console{min-height:0;flex:1 1 auto;overflow:auto;padding:12px 10px 6px;font-size:13px;line-height:1.55}
  .pg-inputbar{padding:6px 8px 8px;gap:6px;min-height:48px}
  .pg-prompt-path{max-width:44vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .pg-input{font-size:16px;min-width:0;padding-left:2px}
  .pg-clearbtn{display:none}
  .pg-statusbar{font-size:8.5px;padding:5px 9px}
}
@media (max-width:420px){
  .pg-titlebar-brand{font-size:11px}.pg-titlebar-brand svg{width:18px;height:18px}
  .pg-mobile-navtoggle{width:40px;height:40px}
  .pg-newsbar{gap:7px}.pg-news-label{display:none}
  .pg-explorer{top:103px!important;right:6px!important;width:min(92vw,330px)!important}
  .pg-hero-title{font-size:21px}
}

/* PowerShell Genie v7 live update ticker */
.pg-newsbar{display:flex;align-items:center;gap:12px;min-height:40px;padding:6px 14px;background:var(--ps-blue);border-bottom:1px solid rgba(255,255,255,.10);overflow:hidden}
.pg-news-viewport{flex:1 1 auto;min-width:0;overflow:hidden;position:relative}
.pg-news-track{display:flex;align-items:center;gap:12px;min-width:max-content;white-space:nowrap}
.pg-news-track.is-live{animation:pgTicker 46s linear infinite}
.pg-news-track:hover{animation-play-state:paused}
.pg-news-item{display:inline-flex;align-items:center;gap:7px}
.pg-news-item a{color:#fff;text-decoration:none;font-weight:800}.pg-news-item a:hover{color:var(--yellow);text-decoration:underline}
.pg-news-meta{color:#bcdcff;font-size:10px}.pg-news-sep{color:#78aef8;opacity:.7}.pg-news-time{font-size:9px;color:#bcdcff;white-space:nowrap}
.pg-news-loading{color:#fff}
@keyframes pgTicker{from{transform:translateX(0)}to{transform:translateX(-50%)}}
@media(prefers-reduced-motion:reduce){.pg-news-track.is-live{animation:none}}
@media(max-width:760px){
  .pg-newsbar{min-height:36px;padding:5px 9px;gap:8px}
  .pg-news-label{font-size:8px}
  .pg-news-time{display:none}
  .pg-news-track.is-live{animation-duration:30s}
}

/* PowerShell Genie v10 | ticker lives inside the existing console title bar. */
.pg-titlebar{display:flex;align-items:center;gap:12px}
.pg-titlebar-news{min-width:0;flex:1 1 auto;display:flex;align-items:center;gap:10px;height:34px;padding:0 10px;border:1px solid rgba(255,255,255,.13);border-radius:8px;background:rgba(0,0,0,.16);overflow:hidden}
.pg-titlebar-news .pg-news-label{flex:0 0 auto;font-size:9px;font-weight:900;letter-spacing:.1em;color:#c7ddff;white-space:nowrap}
.pg-titlebar-news .pg-news-viewport{flex:1 1 auto;min-width:0;overflow:hidden;position:relative}
.pg-titlebar-news .pg-news-track{display:flex;align-items:center;gap:14px;min-width:max-content;white-space:nowrap;will-change:transform}
.pg-titlebar-news .pg-news-track.is-live{animation:pgTickerV10 92s linear infinite}
.pg-titlebar-news .pg-news-track:hover{animation-play-state:paused}
.pg-titlebar-news .pg-news-item{display:inline-flex;align-items:center;gap:7px}
.pg-titlebar-news .pg-news-item a{display:inline-block;color:#f5f8ff;text-decoration:none;font-size:11px;font-weight:800;padding:7px 4px;margin:-7px -4px}
.pg-titlebar-news .pg-news-item a:hover{text-decoration:underline;color:var(--yellow)}
.pg-titlebar-news .pg-news-meta{color:#a9c8ef;font-size:9px}
.pg-titlebar-news .pg-news-sep{color:#6fa5e9;opacity:.75}
.pg-titlebar-news .pg-news-time{flex:0 0 auto;font-size:9px;color:#a9c8ef;white-space:nowrap}
.pg-titlebar-news .pg-news-loading{color:#f5f8ff;font-size:11px}
@keyframes pgTickerV10{from{transform:translate3d(0,0,0)}to{transform:translate3d(-50%,0,0)}}

/* Remove the old standalone ticker styling/layout entirely. */
.pg-newsbar{display:none!important}

@media(max-width:760px){
  .pg-titlebar{gap:7px}
  .pg-titlebar-news{height:32px;padding:0 8px;gap:7px;border-radius:7px}
  .pg-titlebar-news .pg-news-label{display:none}
  .pg-titlebar-news .pg-news-track{gap:11px}
  .pg-titlebar-news .pg-news-track.is-live{animation-duration:105s}
  .pg-titlebar-news .pg-news-item a{font-size:10px}
  .pg-titlebar-news .pg-news-meta{font-size:8px}
  .pg-titlebar-news .pg-news-time{display:none}
}
@media(max-width:420px){
  .pg-titlebar-news{padding:0 7px;min-width:0}
  .pg-titlebar-news .pg-news-item a{font-size:9.5px}
  .pg-titlebar-news .pg-news-meta{display:none}
}
@media(prefers-reduced-motion:reduce){.pg-titlebar-news .pg-news-track.is-live{animation:none}}

/* V11: keep the homepage identity visually centered on desktop. */
@media (min-width: 761px){
  .pg-hero{justify-content:center!important;text-align:center;width:100%;}
  .pg-hero-text{text-align:center;}
}

/* V13: tighter brand lockup + terminal code copy */
.pg-code-wrap{position:relative;margin:10px 0}
.pg-code-wrap pre{margin:0;padding-right:74px}
.pg-copy-code{position:absolute;top:7px;right:7px;z-index:3;border:1px solid rgba(90,184,255,.55);background:#0b1d2d;color:#dff3ff;border-radius:6px;padding:6px 9px;font:600 11px/1 var(--font);cursor:pointer}
.pg-copy-code:hover{filter:brightness(1.18)}
.pg-copy-code:focus-visible{outline:2px solid var(--accent1);outline-offset:2px}
@media (min-width:701px){.pg-hero{gap:4px}.pg-genie-wrap{margin-right:0}.pg-hero-text{margin-left:0}}

.pg-genie-wrap{display:block;text-decoration:none;margin-right:-2px}.pg-hero-text{margin-left:0}
/* V15 header repair: keep logo visually attached to the site title */
.pg-hero{gap:0!important;justify-content:center!important;padding-top:8px!important;padding-bottom:8px!important}
.pg-genie-home{display:flex;align-items:center;margin:0 -3px 0 0;padding:0;text-decoration:none;color:inherit;line-height:0}
.pg-genie-wrap{width:54px!important;height:54px!important}
.pg-genie-icon{width:54px!important;height:54px!important}
.pg-hero-text{margin-left:0!important}
.pg-hero-title{line-height:1!important}
.pg-hero-tag{margin-top:3px!important}
@media(max-width:700px){.pg-hero{justify-content:flex-start!important;gap:0!important}.pg-genie-home{margin-right:2px}.pg-genie-wrap,.pg-genie-icon{width:46px!important;height:46px!important}}

/* V16 UI/UX header lockup: logo, title and tagline behave as one centered unit. */
.pg-hero{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
  padding:10px 16px 8px!important;
  text-align:left!important;
}
.pg-genie-home{display:flex!important;align-items:center!important;justify-content:center!important;flex:0 0 auto!important;text-decoration:none!important;line-height:0!important;}
.pg-genie-wrap{width:54px!important;height:54px!important;margin:0!important;flex:0 0 54px!important;}
.pg-genie-icon{width:54px!important;height:54px!important;}
.pg-hero-text{margin:0!important;flex:0 1 auto!important;min-width:0!important;text-align:left!important;}
.pg-hero-title{margin:0!important;line-height:1!important;}
.pg-hero-tag{margin:3px 0 0!important;line-height:1.3!important;}
@media (min-width:761px){
  .pg-hero-text{text-align:left!important;}
}
@media (max-width:700px){
  .pg-hero{justify-content:flex-start!important;gap:7px!important;padding:10px 12px 8px!important;}
  .pg-genie-wrap{width:48px!important;height:48px!important;flex-basis:48px!important;}
  .pg-genie-icon{width:48px!important;height:48px!important;}
  .pg-hero-title{font-size:clamp(21px,6vw,26px)!important;}
  .pg-hero-tag{font-size:10.5px!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;}
}

/* ===== V17 FINAL HERO LOCKUP | shared by homepage and every terminal route ===== */
/* Keep the entire logo + title + tagline as one centered visual unit on desktop. */
@media (min-width:701px){
  .pg-hero{
    display:grid!important;
    grid-template-columns:auto auto!important;
    grid-template-areas:"logo copy"!important;
    justify-content:center!important;
    justify-items:start!important;
    align-items:center!important;
    column-gap:6px!important;
    width:100%!important;
    box-sizing:border-box!important;
    padding:10px 16px 9px!important;
    text-align:left!important;
  }
  .pg-genie-home{grid-area:logo!important;display:block!important;margin:0!important;padding:0!important;line-height:0!important;}
  .pg-genie-wrap{margin:0!important;width:52px!important;height:52px!important;display:block!important;}
  .pg-genie-icon{width:52px!important;height:52px!important;display:block!important;}
  .pg-hero-text{grid-area:copy!important;margin:0!important;padding:0!important;min-width:0!important;max-width:none!important;text-align:left!important;}
  .pg-hero-title{margin:0!important;padding:0!important;line-height:1!important;font-size:clamp(26px,3vw,38px)!important;}
  .pg-hero-tag{margin:3px 0 0!important;padding:0!important;line-height:1.3!important;max-width:760px!important;}
}
@media (max-width:700px){
  .pg-hero{display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:7px!important;width:100%!important;box-sizing:border-box!important;padding:10px 12px 8px!important;text-align:left!important;}
  .pg-genie-home{display:block!important;margin:0!important;padding:0!important;line-height:0!important;flex:0 0 auto!important;}
  .pg-genie-wrap,.pg-genie-icon{width:46px!important;height:46px!important;margin:0!important;}
  .pg-hero-text{margin:0!important;min-width:0!important;flex:1 1 auto!important;text-align:left!important;}
  .pg-hero-title{margin:0!important;line-height:1!important;}
  .pg-hero-tag{margin:3px 0 0!important;line-height:1.3!important;}
}


/* ===== V18 HEADER + HERO STABILITY FIX =====
   One shared rule-set for EVERY terminal route. */
:root{--pg-bluebar-h:44px}
body.pg-terminal-body{overflow-x:hidden!important;}
.pg-hero{
  position:relative!important;
  z-index:1!important;
  width:100%!important;
  min-width:0!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
  padding:10px max(16px,env(safe-area-inset-right)) 9px max(16px,env(safe-area-inset-left))!important;
  text-align:left!important;
}
.pg-genie-home{position:relative!important;z-index:1!important;display:flex!important;align-items:center!important;justify-content:center!important;flex:0 0 auto!important;margin:0!important;padding:0!important;line-height:0!important;}
.pg-genie-wrap,.pg-genie-icon{width:52px!important;height:52px!important;margin:0!important;display:block!important;}
.pg-hero-text{margin:0!important;padding:0!important;min-width:0!important;flex:0 1 auto!important;text-align:left!important;}
.pg-hero-title{margin:0!important;padding:0!important;line-height:1!important;}
.pg-hero-tag{margin:3px 0 0!important;padding:0!important;line-height:1.3!important;max-width:min(760px,calc(100vw - 120px))!important;}
/* Blue console bar stays above everything, but remains in normal document flow. */
.pg-titlebar{
  position:sticky!important;
  top:0!important;
  z-index:999!important;
  isolation:isolate!important;
  min-height:var(--pg-bluebar-h)!important;
  background:#071d33!important;
}
.pg-tabstrip{position:relative!important;z-index:20!important;}
.pg-shell{position:relative!important;z-index:1!important;}
/* Never let menu/open states translate the hero or pull it behind the title bar. */
body.pg-mobile-menu-open .pg-hero,
.pg-hero:has(+ .pg-titlebar),
.pg-hero{transform:none!important;top:auto!important;bottom:auto!important;}
@media (min-width:701px){
  .pg-hero{justify-content:center!important;}
  .pg-hero-text{text-align:left!important;}
}
@media (max-width:700px){
  :root{--pg-bluebar-h:52px}
  .pg-hero{justify-content:flex-start!important;gap:7px!important;padding:10px 12px 8px!important;}
  .pg-genie-wrap,.pg-genie-icon{width:46px!important;height:46px!important;}
  .pg-hero-text{flex:1 1 auto!important;max-width:calc(100vw - 78px)!important;}
  .pg-hero-tag{max-width:100%!important;overflow-wrap:anywhere!important;}
}

/* V19 HEADER / HERO HARD FIX | single source of truth */
:root{--pg-titlebar-h:56px}
html,body{max-width:100%;overflow-x:hidden}
body.pg-terminal-body{padding-top:var(--pg-titlebar-h)!important}
/* The blue console bar is permanently above the document. */
.pg-titlebar{
  position:fixed!important;
  top:0!important;left:0!important;right:0!important;
  width:100%!important;
  height:var(--pg-titlebar-h)!important;
  min-height:var(--pg-titlebar-h)!important;
  z-index:999!important;
  transform:none!important;
}
/* Header stays in normal flow, so menu state can never pull it behind the bar. */
.pg-hero{
  position:relative!important;
  top:auto!important;bottom:auto!important;
  transform:none!important;
  z-index:1!important;
  width:100%!important;
  min-height:118px!important;
  margin:0!important;
  padding:12px 20px 10px!important;
  display:flex!important;
  flex-direction:row!important;
  align-items:center!important;
  justify-content:center!important;
  gap:10px!important;
  text-align:center!important;
  overflow:visible!important;
}
.pg-genie-home,.pg-genie-wrap{display:flex!important;align-items:center!important;justify-content:center!important;flex:0 0 auto!important;margin:0!important;padding:0!important}
.pg-hero-text{
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  min-width:0!important;
  margin:0!important;padding:0!important;
  text-align:center!important;
  flex:0 1 auto!important;
}
.pg-hero-title{margin:0!important;padding:0!important;text-align:center!important;line-height:1.05!important}
.pg-hero-tag{margin:4px 0 0!important;padding:0!important;text-align:center!important;max-width:min(760px,90vw)!important;white-space:normal!important;overflow-wrap:anywhere!important}
/* Menu-open classes are not allowed to alter header geometry. */
body.pg-mobile-menu-open .pg-hero,body.mobile-nav-open .pg-hero,.pg-hero:has(+ .pg-titlebar){
  position:relative!important;top:auto!important;bottom:auto!important;
  transform:none!important;margin:0!important;
}
@media(max-width:700px){
  :root{--pg-titlebar-h:64px}
  .pg-titlebar{height:var(--pg-titlebar-h)!important;min-height:var(--pg-titlebar-h)!important}
  .pg-hero{min-height:104px!important;padding:12px 12px 10px!important;gap:8px!important}
  .pg-genie-wrap,.pg-genie-icon{width:46px!important;height:46px!important}
  .pg-hero-title{font-size:clamp(22px,7vw,30px)!important}
  .pg-hero-tag{font-size:10.5px!important;max-width:calc(100vw - 82px)!important}
}

/* ===== V20 STRUCTURAL HEADER FLOW FIX =====
   Header is first in DOM, console bar follows it in normal flow.
   This intentionally overrides the earlier V19 fixed-bar experiment. */
:root{--pg-bluebar-h:44px}
html,body{max-width:100%;overflow-x:hidden!important;}
body.pg-terminal-body{
  padding-top:0!important;
}
/* Header is a single centered vertical lockup: logo -> title -> tagline. */
.pg-hero{
  position:relative!important;
  inset:auto!important;
  transform:none!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  width:100%!important;
  min-height:auto!important;
  box-sizing:border-box!important;
  margin:0!important;
  padding:18px 20px 14px!important;
  gap:4px!important;
  text-align:center!important;
  z-index:1!important;
}
.pg-genie-home,.pg-genie-wrap{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  flex:0 0 auto!important;
  margin:0!important;
  padding:0!important;
}
.pg-genie-wrap,.pg-genie-icon{width:52px!important;height:52px!important;max-width:100%!important;}
.pg-hero-text{
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  width:min(100%,900px)!important;
  margin:0!important;
  padding:0!important;
  text-align:center!important;
}
.pg-hero-title{margin:0!important;padding:0!important;line-height:1.08!important;text-align:center!important;}
.pg-hero-tag{margin:4px 0 0!important;padding:0!important;max-width:100%!important;white-space:normal!important;overflow-wrap:anywhere!important;text-align:center!important;}
/* Console/title bar is below the header and only sticks once it reaches the viewport top. */
.pg-titlebar{
  position:sticky!important;
  top:0!important;
  left:auto!important;
  right:auto!important;
  width:100%!important;
  height:var(--pg-bluebar-h)!important;
  min-height:var(--pg-bluebar-h)!important;
  box-sizing:border-box!important;
  z-index:999!important;
  transform:none!important;
}
/* Menu states must never change header geometry or move it behind the bar. */
body.pg-mobile-menu-open .pg-hero,
body.mobile-nav-open .pg-hero,
.pg-hero:has(+ .pg-titlebar){
  position:relative!important;
  inset:auto!important;
  transform:none!important;
  margin:0!important;
}
@media(max-width:700px){
  :root{--pg-bluebar-h:52px}
  .pg-hero{padding:14px 12px 12px!important;gap:3px!important;}
  .pg-genie-wrap,.pg-genie-icon{width:46px!important;height:46px!important;}
  .pg-hero-text{width:100%!important;max-width:100%!important;text-align:center!important;}
  .pg-hero-title{font-size:clamp(22px,7vw,30px)!important;white-space:normal!important;}
  .pg-hero-tag{font-size:clamp(10px,3.2vw,12px)!important;line-height:1.4!important;max-width:100%!important;}
}


/* ===== V21 HEADER DOM + CROSS-PAGE STABILITY FIX ===== */
html, body { margin:0!important; padding:0!important; max-width:100%!important; overflow-x:hidden!important; }
body.pg-terminal-body { padding-top:0!important; }
/* Header always occupies normal document flow on every route. */
.pg-terminal-body > .pg-hero {
  position:relative!important;
  top:auto!important; right:auto!important; bottom:auto!important; left:auto!important;
  transform:none!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  width:100%!important;
  box-sizing:border-box!important;
  margin:0!important;
  padding:16px 20px 14px!important;
  gap:3px!important;
  text-align:center!important;
  z-index:1!important;
}
.pg-terminal-body > .pg-hero .pg-genie-home {
  display:flex!important; width:58px!important; height:58px!important;
  align-items:center!important; justify-content:center!important;
  margin:0!important; padding:0!important; line-height:0!important;
  flex:0 0 auto!important; text-decoration:none!important;
}
.pg-terminal-body > .pg-hero .pg-genie-wrap {
  display:flex!important; width:58px!important; height:58px!important;
  align-items:center!important; justify-content:center!important;
  margin:0!important; padding:0!important;
}
.pg-terminal-body > .pg-hero .pg-genie-icon { width:58px!important; height:58px!important; display:block!important; }
.pg-terminal-body > .pg-hero .pg-hero-text {
  display:flex!important; flex-direction:column!important; align-items:center!important; justify-content:center!important;
  width:100%!important; max-width:900px!important; margin:0!important; padding:0!important; text-align:center!important;
}
.pg-terminal-body > .pg-hero .pg-hero-title { margin:0!important; padding:0!important; width:100%!important; text-align:center!important; line-height:1.08!important; }
.pg-terminal-body > .pg-hero .pg-hero-tag { margin:3px 0 0!important; padding:0!important; width:100%!important; max-width:760px!important; text-align:center!important; white-space:normal!important; overflow-wrap:anywhere!important; }
/* The blue bar follows the header in DOM flow and cannot overlap it. */
.pg-terminal-body > .pg-titlebar {
  position:sticky!important; top:0!important; inset:auto!important;
  width:100%!important; z-index:999!important;
  transform:none!important; margin:0!important;
}
/* Navigation state must never alter hero geometry. */
body.pg-mobile-menu-open > .pg-hero, body.mobile-nav-open > .pg-hero,
body.pg-mobile-menu-open .pg-hero, body.mobile-nav-open .pg-hero {
  position:relative!important; top:auto!important; transform:none!important; margin:0!important;
}
@media(max-width:700px){
 .pg-terminal-body > .pg-hero{padding:12px 12px 10px!important;}
 .pg-terminal-body > .pg-hero .pg-genie-home,.pg-terminal-body > .pg-hero .pg-genie-wrap,.pg-terminal-body > .pg-hero .pg-genie-icon{width:46px!important;height:46px!important;}
 .pg-terminal-body > .pg-hero .pg-hero-tag{max-width:calc(100vw - 24px)!important;}
}


/* ===== V22 COMPACT HORIZONTAL BRAND LOCKUP ===== */
/* Desktop: logo beside title/tagline to remove wasted vertical space. */
.pg-terminal-body > .pg-hero{
  display:flex!important;
  flex-direction:row!important;
  align-items:center!important;
  justify-content:center!important;
  padding:8px 20px!important;
  gap:10px!important;
  min-height:78px!important;
}
.pg-terminal-body > .pg-hero .pg-genie-home{width:54px!important;height:54px!important;flex:0 0 54px!important;}
.pg-terminal-body > .pg-hero .pg-genie-wrap,.pg-terminal-body > .pg-hero .pg-genie-icon{width:54px!important;height:54px!important;}
.pg-terminal-body > .pg-hero .pg-hero-text{width:auto!important;max-width:calc(100% - 64px)!important;flex:0 1 auto!important;align-items:flex-start!important;text-align:left!important;}
.pg-terminal-body > .pg-hero .pg-hero-title{width:auto!important;text-align:left!important;white-space:nowrap!important;}
.pg-terminal-body > .pg-hero .pg-hero-tag{width:auto!important;max-width:100%!important;text-align:left!important;margin-top:2px!important;}
/* Keep the complete logo+text group centered as a single unit. */
.pg-terminal-body > .pg-hero::before{content:none!important;}
@media(max-width:700px){
 .pg-terminal-body > .pg-hero{flex-direction:column!important;padding:10px 12px!important;gap:3px!important;min-height:auto!important;}
 .pg-terminal-body > .pg-hero .pg-genie-home{width:46px!important;height:46px!important;flex-basis:46px!important;}
 .pg-terminal-body > .pg-hero .pg-genie-wrap,.pg-terminal-body > .pg-hero .pg-genie-icon{width:46px!important;height:46px!important;}
 .pg-terminal-body > .pg-hero .pg-hero-text{width:100%!important;max-width:100%!important;align-items:center!important;text-align:center!important;}
 .pg-terminal-body > .pg-hero .pg-hero-title,.pg-terminal-body > .pg-hero .pg-hero-tag{width:100%!important;text-align:center!important;white-space:normal!important;}
}


/* V23 page introductions and clean mobile navigation */
.pg-page-intro{max-width:900px;padding:14px 16px!important;margin:0 0 14px;border:1px solid rgba(90,184,255,.22);border-radius:10px;background:rgba(90,184,255,.045)}
.pg-page-intro h2{margin:0 0 7px;font-size:18px;line-height:1.3;color:#fff}
.pg-page-intro p{margin:0 0 8px;color:#d7e7f7}
.pg-page-intro ul{margin:7px 0 0 18px;padding:0}
.pg-page-intro li{margin:4px 0}
@media (max-width:760px){
  /* Keep the mobile dropdown focused on navigation; desktop helper commands remain untouched. */
  .pg-explorer .pg-exp-group:nth-of-type(2){display:none!important}
}


/* V26 stability: mobile menu must always sit above the title-bar ticker */
@media (max-width:760px){
  .pg-titlebar{position:relative;z-index:50!important}
  .pg-titlebar-news{position:relative;z-index:1!important}
  .pg-explorer{z-index:5000!important;isolation:isolate!important}
  .pg-explorer.pg-mobile-open{z-index:5000!important}
}
.pg-sim-note{margin:10px 0 0;padding:10px 12px;border:1px solid rgba(75,170,255,.55);background:rgba(28,122,220,.16);color:#d9efff;border-radius:8px;font-weight:800}
.pg-lesson-why{margin:10px 0;padding:10px 12px;border-left:3px solid var(--accent1);background:rgba(90,184,255,.06)}
.pg-run-code{margin:8px 0 0;padding:7px 10px;border-radius:7px;border:1px solid rgba(90,184,255,.45);background:rgba(90,184,255,.12);color:#dff1ff;font-weight:800;cursor:pointer}

/* V27 mobile navigation stacking fix: only affects the actual overlap case. */
@media (max-width:760px){
  .pg-titlebar{
    position:relative!important;
    z-index:1000!important;
    isolation:isolate;
  }
  .pg-titlebar-news{
    position:relative!important;
    z-index:1!important;
  }
  .pg-backdrop{
    z-index:900!important;
  }
  .pg-tabstrip,
  .pg-shell,
  .pg-console-wrap{
    position:relative!important;
    z-index:1!important;
  }
  .pg-explorer{
    position:fixed!important;
    top:52px!important;
    right:8px!important;
    left:auto!important;
    z-index:1001!important;
    isolation:auto!important;
    max-height:calc(100svh - 64px)!important;
  }
  .pg-explorer.pg-mobile-open{
    z-index:1001!important;
  }
}

/* V28 mobile navigation layering: the menu opens below the blue console ticker. */
@media (max-width:760px){
  .pg-titlebar{
    position:sticky!important;
    top:0!important;
    z-index:1000!important;
  }
  .pg-titlebar-news{position:relative;z-index:1001}
  .pg-explorer{
    top:52px!important;
    z-index:900!important;
    max-height:calc(100svh - 52px)!important;
  }
  .pg-tabstrip,.pg-shell,.pg-console-wrap,.pg-console{position:relative;z-index:1}
}

/* V29 mobile menu placement: explorer is not nested inside the title bar, so use the exact title-bar height. */
@media (max-width:760px){
  :root{--pg-mobile-titlebar-h:52px;}
  .pg-titlebar{position:sticky!important;top:0!important;height:var(--pg-mobile-titlebar-h)!important;z-index:1000!important;}
  .pg-explorer{
    position:fixed!important;
    top:var(--pg-mobile-titlebar-h)!important;
    margin-top:0!important;
    transform:translateY(-8px) scale(.985);
    z-index:1001!important;
    max-height:calc(100svh - var(--pg-mobile-titlebar-h))!important;
  }
  .pg-explorer.pg-mobile-open{transform:translateY(0) scale(1)!important;}
  .pg-tabstrip,.pg-shell,.pg-console-wrap,.pg-console{z-index:1!important;}
}


/* V30 definitive mobile dropdown anchoring.
   The title bar is below the hero before scrolling, so a hard-coded viewport offset is wrong.
   JavaScript sets --pg-mobile-menu-top from the title bar's actual bottom edge. */
@media (max-width:760px){
  .pg-explorer{
    position:fixed!important;
    top:var(--pg-mobile-menu-top,52px)!important;
    margin-top:0!important;
    z-index:1001!important;
    max-height:calc(100svh - var(--pg-mobile-menu-top,52px))!important;
  }
  .pg-explorer:not(.pg-mobile-open){pointer-events:none!important;}
  .pg-titlebar{z-index:1002!important;}
}

/* v8 logo parity: terminal hero uses the same tail geometry as favicon.svg. */
.pg-terminal-body > .pg-hero .pg-genie-wrap,.pg-terminal-body > .pg-hero .pg-genie-icon{overflow:visible!important}
.pg-terminal-body > .pg-hero .pg-genie-icon{filter:drop-shadow(0 8px 16px rgba(89,200,255,.10))}


/* ===== Production shared navigation/search UI ===== */
.site-nav-btn[data-action="search"]{font-weight:800}
.site-recent-menu{display:none;position:fixed;z-index:100001;min-width:280px;max-width:min(420px,calc(100vw - 24px));padding:7px;border:1px solid var(--border,#263645);border-radius:10px;background:var(--panel,#0b1219);box-shadow:0 16px 38px rgba(0,0,0,.45);color:var(--text,#e9f2f7)}
.site-recent-menu.open{display:block}
.site-recent-title{padding:6px 8px 7px;color:var(--muted,#80919e);font:900 10px/1.2 var(--font,Consolas,monospace);letter-spacing:.1em;text-transform:uppercase}
.site-recent-menu a{display:flex;align-items:center;gap:7px;padding:8px 9px;border-radius:7px;color:var(--text,#e9f2f7);text-decoration:none;font:600 12px/1.3 var(--font,Consolas,monospace)}
.site-recent-menu a:hover,.site-recent-menu a:focus-visible{background:rgba(89,200,255,.08);color:var(--blue,#59c8ff);outline:none}
.site-recent-dot{color:var(--blue,#59c8ff);font:900 14px/1 var(--font,Consolas,monospace)}
.site-recent-empty{padding:10px;color:var(--muted,#80919e);font:600 12px/1.4 var(--font,Consolas,monospace)}

/* Search is loaded on terminal pages without bundle.css, so keep its critical UI styles here. */
.psg-search-overlay{position:fixed;inset:0;z-index:100000;display:none;align-items:flex-start;justify-content:center;padding:9vh 16px 24px;background:rgba(0,0,0,.72);backdrop-filter:blur(7px);-webkit-backdrop-filter:blur(7px)}
.psg-search-overlay.open{display:flex}
.psg-search-panel{width:min(760px,100%);max-height:min(760px,82vh);overflow:hidden;border:1px solid var(--border,#263645);border-radius:14px;background:var(--panel,#0b1219);box-shadow:0 28px 80px rgba(0,0,0,.55);color:var(--text,#e9f2f7);font-family:var(--font,Consolas,"JetBrains Mono",monospace)}
.psg-search-head{display:flex;justify-content:space-between;align-items:center;padding:18px 20px 12px}.psg-search-kicker{font-size:9px;letter-spacing:.16em;font-weight:900;color:var(--blue,#59c8ff)}.psg-search-head h2{margin:4px 0 0;font-size:20px;color:var(--text,#e9f2f7)}.psg-search-close{border:1px solid var(--border,#263645);background:transparent;color:inherit;border-radius:7px;width:32px;height:32px;font-size:22px;line-height:1;cursor:pointer}.psg-search-close:hover,.psg-search-close:focus-visible{border-color:var(--accent1,#f5d76e);outline:none}
.psg-search-box{display:flex;align-items:center;gap:9px;margin:0 20px 12px;padding:10px 12px;border:1px solid var(--border,#263645);border-radius:9px;background:var(--panel2,#111b25)}.psg-search-box>span{font-size:19px;color:var(--blue,#59c8ff)}.psg-search-box input{min-width:0;flex:1;border:0;outline:0;background:transparent;color:inherit;font:600 14px var(--font,Consolas,"JetBrains Mono",monospace)}.psg-search-box input::placeholder{color:var(--muted,#80919e)}.psg-search-box kbd{font-size:9px;padding:3px 6px;border:1px solid var(--border,#263645);border-radius:4px;color:var(--muted,#80919e)}
.psg-search-results{overflow:auto;max-height:56vh;padding:0 10px 10px}.psg-search-result{display:flex;gap:10px;padding:11px 10px;border-radius:8px;color:inherit;text-decoration:none}.psg-search-result:hover,.psg-search-result.active{background:rgba(89,200,255,.09)}.psg-search-icon{color:var(--blue,#59c8ff);font-size:18px;line-height:1}.psg-search-result strong{display:block;font-size:12px}.psg-search-result small{display:block;margin-top:3px;color:var(--muted,#80919e);font-size:9.5px;line-height:1.4}.psg-search-empty{padding:30px 16px;text-align:center;color:var(--muted,#80919e);font-size:11px}.psg-search-foot{display:flex;gap:18px;padding:9px 20px;border-top:1px solid var(--border,#263645);color:var(--muted,#80919e);font-size:9px}
@media(max-width:700px){.psg-search-overlay{padding:5vh 10px 16px}.psg-search-panel{max-height:90vh}.psg-search-results{max-height:65vh}.psg-search-head{padding:14px 14px 10px}.psg-search-box{margin:0 14px 10px}.psg-search-foot{padding:8px 14px;gap:12px}}
