/* STMIE V17.5 — shared base header rules.
   Loaded before homepage.css. Later homepage overrides are deliberately
   retained until their responsive cascade is fully audited. */

    .site-header{background:#fff;border-bottom:1px solid var(--border);position:sticky;top:0;z-index:1000;box-shadow:var(--shadow);min-height:var(--header-min-h);}
    .header-inner{max-width:1020px;margin:0 auto;padding:.6rem .9rem;display:flex;align-items:center;gap:1rem;justify-content:space-between;position:relative;}
    .brand{display:flex;align-items:center;gap:.75rem;text-decoration:none}
    .brand .brand-img{display:block;height:auto;max-height:none;}
    @media (max-width:640px){ .brand .brand-img{max-height:32px;} }
    #hamburger{display:none;background:var(--red);border:none;width:40px;height:40px;border-radius:.6rem;align-items:center;justify-content:center;cursor:pointer;}
    #hamburger svg{width:22px;height:22px;display:block}
    #hamburger svg rect{fill:#fff;transition:transform .18s ease, opacity .18s ease;}
    @media (max-width:840px){ #hamburger{display:inline-flex;} }
    .top-nav{display:flex;gap:.5rem;flex-wrap:wrap;margin-left:auto}
    .top-nav a{color:var(--nav1-ink);text-decoration:none;border-radius:.6rem;padding:.7rem 1rem}
    .top-nav a:hover{background:var(--nav1-hover)}
    .top-nav a.active{position:relative;background:var(--nav1-hover)}
    .top-nav a.active::after{content:"";position:absolute;left:10px;right:10px;bottom:.32rem;height:2px;background:var(--nav1-active);border-radius:2px}
    .top-nav .push-right{margin-left:auto;}
    .top-nav a.admin-btn{font:inherit;letter-spacing:normal;background:transparent;color:var(--nav1-ink);}
    .top-nav a.admin-btn:hover{background:var(--nav1-hover);color:var(--nav1-ink);}
    .top-nav a.admin-btn .admin-glyph{display:inline-block;line-height:1;font-weight:400;}
    @media (max-width:840px){
      .header-inner{flex-wrap:nowrap;}
      .site-header .top-nav{position:absolute;left:0;right:0;top:calc(var(--header-min-h) - 2px);background:#fff;border-bottom:1px solid var(--border);display:none !important;flex-direction:column;padding:.5rem;gap:.25rem;}
      .site-header .top-nav.open{display:flex !important;}
      .site-header .top-nav a{padding:.85rem 1rem;border-radius:.5rem;}
    }
    body.nav-open #hamburger svg rect:nth-child(1){transform-origin:12px 6px;transform:rotate(40deg) translate(2px,2px);}
    body.nav-open #hamburger svg rect:nth-child(2){opacity:0;}
    body.nav-open #hamburger svg rect:nth-child(3){transform-origin:12px 18px;transform:rotate(-40deg) translate(2px,-2px);}


    .auth-controls{display:flex;gap:.35rem;align-items:center;}
    .auth-btn{display:inline-flex;align-items:center;justify-content:center;padding:.35rem .7rem;border-radius:.45rem;border:1px solid rgba(255,255,255,.35);background:rgba(255,228,230,.35);color:#fff;font-size:.7rem;font-weight:600;text-decoration:none;cursor:pointer;line-height:1;}
    .auth-btn.login{background:var(--pink-login);border-color:rgba(236,64,122,.85);}
    .auth-btn.register{background:var(--pink-register);border-color:rgba(240,98,146,.85);}
    .auth-btn.logout{background:rgba(15,23,42,.1);border-color:rgba(255,255,255,.35);}
    .auth-user-pill{display:inline-flex;align-items:center;gap:.35rem;background:rgba(255,255,255,.18);border:1px solid rgba(255,255,255,.35);border-radius:999px;padding:.2rem .55rem;color:#fff;font-size:.7rem;font-weight:600;}
    .auth-user-pill .avatar{width:20px;height:20px;border-radius:999px;background:#fff;border:1px solid rgba(255,255,255,.5);}

/* STMIE V17.2 — shared responsive header layout.
   Loaded after homepage.css to preserve the established cascade.
   Other legacy header rules remain in homepage.css until the wider
   cross-page consolidation is tested. */

