/* AIFlasher shared header v2 — Repair OS navigation.
   Scoped to #aif-header and hardened (!important on layout-critical props) because
   legacy page stylesheets ship broad element selectors (header, nav, a, button). */
@font-face{font-family:"Space Grotesk";font-style:normal;font-weight:500;font-display:swap;src:url(/assets/fonts/space-grotesk-latin-500-normal.woff2) format("woff2")}
@font-face{font-family:"Space Grotesk";font-style:normal;font-weight:700;font-display:swap;src:url(/assets/fonts/space-grotesk-latin-700-normal.woff2) format("woff2")}
@font-face{font-family:"JetBrains Mono";font-style:normal;font-weight:400;font-display:swap;src:url(/assets/fonts/jetbrains-mono-latin-400-normal.woff2) format("woff2")}
@font-face{font-family:"JetBrains Mono";font-style:normal;font-weight:600;font-display:swap;src:url(/assets/fonts/jetbrains-mono-latin-600-normal.woff2) format("woff2")}

#aif-header{--h-bg:rgba(10,13,17,.92);--h-line:#222a34;--h-text:#e9edf2;--h-muted:#98a4b3;--h-gold:#efbd58;--h-gold-2:#ffd990;--h-panel:#121821;--h-hover:#1a222c;
 position:sticky!important;top:0!important;inset:auto;z-index:60!important;display:block!important;width:100%!important;max-width:none!important;margin:0!important;padding:0!important;
 background:var(--h-bg)!important;-webkit-backdrop-filter:saturate(140%) blur(10px);backdrop-filter:saturate(140%) blur(10px);border:0!important;border-bottom:1px solid var(--h-line)!important;box-shadow:none!important;color:var(--h-text)!important;font:14px/1.4 "Segoe UI","Nirmala UI",system-ui,-apple-system,sans-serif!important;text-align:left!important}
#aif-header *,#aif-header *::before,#aif-header *::after{box-sizing:border-box;font-family:"Segoe UI","Nirmala UI",system-ui,-apple-system,sans-serif!important;letter-spacing:normal;text-transform:none;text-shadow:none!important}
#aif-header a{text-decoration:none!important;color:inherit}
#aif-header ul{list-style:none;margin:0;padding:0}
#aif-header .aif-vh{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;white-space:nowrap!important}
#aif-header .aif-header-inner{max-width:1320px!important;margin:0 auto!important;padding:10px 24px!important;display:flex!important;align-items:center!important;gap:18px!important;min-height:64px;flex-wrap:nowrap!important;grid-template-columns:none!important}

/* Brand */
#aif-header .aif-brand{display:flex!important;align-items:center;gap:10px;flex-shrink:0;color:#f5dfb5!important}
#aif-header .aif-brand img{display:block;width:40px!important;height:40px!important;object-fit:contain}
#aif-header .aif-brand strong{display:block;font:700 19px/1.05 "Space Grotesk","Segoe UI",sans-serif!important;letter-spacing:-.02em!important;color:#f6e2b6!important;background:none!important;-webkit-text-fill-color:currentColor!important}
#aif-header .aif-brand small{display:block;margin-top:3px;font:600 9.5px/1 "JetBrains Mono",ui-monospace,monospace!important;letter-spacing:.16em!important;text-transform:uppercase!important;color:var(--h-muted)!important}

/* Primary nav */
#aif-header #aif-navigation{display:block!important;flex:1 1 auto!important;min-width:0!important;margin:0!important;padding:0!important;background:none!important;border:0!important;border-radius:0!important}
#aif-header .aif-nav{display:flex;align-items:center;gap:2px;justify-content:center}
#aif-header .aif-nav>li{position:relative}
#aif-header .aif-nav>li>a,#aif-header .aif-dd-btn{display:inline-flex!important;align-items:center;gap:6px;min-height:38px!important;padding:8px 12px!important;border:1px solid transparent!important;border-radius:8px!important;background:none!important;color:#d4dbe4!important;font-size:14px!important;font-weight:550!important;line-height:1.2!important;white-space:nowrap;cursor:pointer;margin:0!important;width:auto!important;box-shadow:none!important}
#aif-header .aif-dd-btn::after{content:"";width:6px;height:6px;border-right:1.6px solid currentColor;border-bottom:1.6px solid currentColor;transform:translateY(-2px) rotate(45deg);opacity:.7;transition:transform .15s}
#aif-header .aif-dd-btn[aria-expanded=true]::after{transform:translateY(1px) rotate(225deg)}
#aif-header .aif-nav>li>a:hover,#aif-header .aif-dd-btn:hover,#aif-header .aif-dd-btn[aria-expanded=true]{background:var(--h-hover)!important;color:#fff!important}
#aif-header .aif-nav a[aria-current=page],#aif-header .aif-dd-btn.aif-current{color:var(--h-gold-2)!important}
#aif-header .aif-nav>li>a.aif-nav-engine{border-color:#5a4a26!important;background:linear-gradient(180deg,#2a2314,#1c1810)!important;color:#f6d78f!important}
#aif-header .aif-nav>li>a.aif-nav-engine::before{content:"";width:7px;height:7px;border-radius:50%;background:var(--h-gold);box-shadow:0 0 0 3px rgba(239,189,88,.18)}

/* Dropdowns */
#aif-header .aif-dd-panel{position:absolute;top:calc(100% + 8px);left:50%;transform:translateX(-50%);min-width:300px;padding:8px;background:var(--h-panel);border:1px solid #2c3643;border-radius:12px;box-shadow:0 24px 60px -20px rgba(0,0,0,.75);display:none;z-index:70}
#aif-header .aif-dd-panel.aif-open{display:grid;gap:2px}
#aif-header .aif-dd-wide.aif-open{grid-template-columns:repeat(3,minmax(190px,1fr));gap:4px 10px;min-width:640px;padding:14px}
#aif-header .aif-dd-cap{margin:2px 10px 6px!important;font:600 10.5px/1 "JetBrains Mono",ui-monospace,monospace!important;letter-spacing:.14em!important;text-transform:uppercase!important;color:var(--h-gold)!important}
#aif-header .aif-dd-col{display:flex;flex-direction:column}
#aif-header .aif-dd-panel a{display:block;padding:8px 10px;border-radius:7px;color:#d4dbe4!important;font-size:13.5px!important;line-height:1.35!important}
#aif-header .aif-dd-panel a b{display:block;font-weight:600;color:#eef2f6}
#aif-header .aif-dd-panel a span{display:block;font-size:12px;color:var(--h-muted)}
#aif-header .aif-dd-panel a:hover,#aif-header .aif-dd-panel a:focus-visible{background:var(--h-hover)}
#aif-header .aif-dd-panel a[aria-current=page]{background:#231e13}
#aif-header .aif-dd-panel a[aria-current=page] b,#aif-header .aif-dd-col a[aria-current=page]{color:var(--h-gold-2)!important}

/* Right tools */
#aif-header .aif-tools{display:flex!important;align-items:center;gap:8px;flex-shrink:0}
#aif-header .aif-language-label{display:block!important;margin:0!important;padding:0!important}
#aif-header .aif-language{height:36px!important;min-height:36px!important;padding:0 8px!important;background:#121821!important;color:#d9e0e8!important;border:1px solid #2c3643!important;border-radius:8px!important;font-size:12.5px!important;max-width:96px;cursor:pointer;margin:0!important}
#aif-header #aif-search{position:relative;display:flex!important;align-items:center;margin:0!important;padding:0!important;border:0!important;background:none!important;width:auto!important}
#aif-header #aif-search input{width:210px!important;height:36px!important;min-height:36px!important;padding:0 36px 0 12px!important;background:#121821!important;border:1px solid #2c3643!important;border-radius:8px!important;color:#fff!important;font-size:13px!important;margin:0!important;transition:border-color .15s,width .2s}
#aif-header #aif-search input::placeholder{color:#7f8b9a!important}
#aif-header #aif-search input:focus{border-color:#7a6230!important;outline:none}
#aif-header #aif-search button{position:absolute;right:3px;top:3px;width:30px!important;height:30px!important;min-height:30px!important;padding:0!important;display:grid;place-items:center;border:0!important;border-radius:6px!important;background:transparent!important;color:#aab5c3!important;cursor:pointer;margin:0!important}
#aif-header #aif-search button:hover{color:var(--h-gold)!important}
#aif-header .aif-ask{display:inline-flex!important;align-items:center;gap:8px;height:36px!important;min-height:36px!important;padding:0 14px!important;border:1px solid #d2a24b!important;border-radius:8px!important;background:var(--h-gold)!important;color:#17130b!important;font-size:13px!important;font-weight:700!important;cursor:pointer;white-space:nowrap;margin:0!important;width:auto!important}
#aif-header .aif-ask:hover{background:var(--h-gold-2)!important}
#aif-header .aif-ask-dot{width:7px;height:7px;border-radius:50%;background:#17130b;box-shadow:0 0 0 3px rgba(23,19,11,.18)}
#aif-header #aif-menu{display:none!important;align-items:center;gap:8px;height:38px!important;min-height:38px!important;padding:0 12px!important;border:1px solid #2c3643!important;border-radius:8px!important;background:#121821!important;color:#e9edf2!important;font-size:13px!important;font-weight:600!important;cursor:pointer;margin:0 0 0 auto!important;width:auto!important}
#aif-header .aif-burger{position:relative;width:16px;height:2px;background:currentColor;border-radius:2px}
#aif-header .aif-burger::before,#aif-header .aif-burger::after{content:"";position:absolute;left:0;width:16px;height:2px;background:currentColor;border-radius:2px}
#aif-header .aif-burger::before{top:-5px}#aif-header .aif-burger::after{top:5px}
#aif-header :focus-visible{outline:2px solid var(--h-gold)!important;outline-offset:2px}

/* Old account strip (firmware portal) keeps working inside v2 */
#aif-header .aif-account{display:flex;gap:8px}
#aif-header .aif-account a{display:inline-flex;align-items:center;height:34px;padding:0 12px;border:1px solid #3a4655;border-radius:8px;font-size:13px}

/* Medium: hide search input to keep one row */
@media (max-width:1320px){#aif-header #aif-search input{width:160px!important}}
@media (max-width:1180px){
 #aif-header .aif-header-inner{flex-wrap:wrap!important;gap:10px 12px!important}
 #aif-header #aif-menu{display:inline-flex!important}
 #aif-header .aif-tools{order:2}
 #aif-header #aif-navigation{order:3;flex:1 0 100%!important;display:none!important;max-height:calc(100vh - 140px);overflow:auto;padding:6px 0 12px!important;border-top:1px solid var(--h-line)!important}
 #aif-header #aif-navigation.aif-open{display:block!important}
 #aif-header .aif-nav{flex-direction:column;align-items:stretch;gap:2px}
 #aif-header .aif-nav>li>a,#aif-header .aif-dd-btn{width:100%!important;justify-content:space-between;min-height:44px!important;font-size:15px!important}
 #aif-header .aif-nav>li>a.aif-nav-engine{justify-content:flex-start}
 #aif-header .aif-dd-panel{position:static;transform:none;min-width:0!important;box-shadow:none;border:0;background:#0f141b;margin:2px 0 6px;padding:6px}
 #aif-header .aif-dd-wide.aif-open{grid-template-columns:repeat(auto-fit,minmax(200px,1fr));min-width:0;padding:8px}
}
@media (max-width:700px){
 #aif-header .aif-header-inner{padding:8px 16px!important;min-height:56px}
 #aif-header .aif-brand img{width:34px!important;height:34px!important}
 #aif-header .aif-brand strong{font-size:17px!important}
 #aif-header .aif-tools{order:4;flex:1 0 100%;gap:6px}
 #aif-header #aif-search{flex:1}
 #aif-header #aif-search input{width:100%!important}
 #aif-header .aif-ask{display:none!important}
}
@media print{#aif-header{display:none!important}}

/* Repair Assistant launcher (site-wide, injected by assistant.js) */
.aif-fab{position:fixed;right:20px;bottom:20px;z-index:55;display:inline-flex;align-items:center;gap:10px;height:48px;padding:0 18px 0 14px;border:1px solid #d2a24b;border-radius:999px;background:#efbd58;color:#17130b;font:700 14px/1 "Segoe UI","Nirmala UI",system-ui,sans-serif;box-shadow:0 14px 40px -12px rgba(0,0,0,.8),0 0 0 6px rgba(239,189,88,.12);cursor:pointer}
.aif-fab:hover{background:#ffd990}.aif-fab:focus-visible{outline:2px solid #fff;outline-offset:3px}
.aif-fab svg{width:20px;height:20px}
@media (max-width:700px){.aif-fab{right:14px;bottom:14px;height:46px;padding:0 14px}.aif-fab .aif-fab-text{display:none}}
@media print{.aif-fab{display:none!important}}
