/* ============================================================
   ASK ECE - shared site navigation, styles
   File: /nav.css   Load with a version query: /nav.css?v=1
   Bump the version on every change or browsers keep the old file.

   WHY THIS EXISTS. On 15 Aug 2026 the site navigation existed as FOUR
   near-identical copies: index.html, fdc.html, leader.html and roster.html.
   There is no build step (static HTML, whole-file deploys), so a standalone
   page had no way to include a shared fragment and each one carried its own.
   Changing a menu item meant remembering three files, and nothing failed
   loudly when one drifted.

   index.html is DELIBERATELY NOT migrated: its nav calls navGo() to switch
   sections in the single page app rather than linking out, so it is a
   different thing that happens to look the same.

   The rules that were learned the hard way and must not be undone:
   MEDIA QUERIES STAY WRAPPED. A first attempt at sharing this CSS flattened
   33 rules out of their @media blocks and one out of @media print, so the
   mobile rule .main-nav{display:none} applied at every width and a print rule
   hid the top bar on screen. The nav was invisible through three fixes.
   ============================================================ */

/* The bar's height and colour are reserved here so the page does not jump
   when nav.js injects the markup a moment later. */
#askece-nav{min-height:62px;background:var(--plum,#523B86);}
@media(max-width:900px){ #askece-nav{min-height:60px;} }

/* Aliases the navigation expects. It was written against an older variable
   vocabulary; these map it onto whatever the page already defines. Without
   them every rule below resolves to nothing and the bar collapses. */
:root{
  --plum-800:#2F2350; --sand:#ECEAF3;
  --border:var(--line); --charcoal:var(--ink); --clay-pale:var(--clay-100);
  --plum-pale:var(--plum-100); --text-muted:var(--muted); --text-secondary:var(--ink-2);
}


/* House navigation, lifted from fdc.html 10 Aug 2026. Media queries are
   PRESERVED: a first pass flattened 33 rules out of their @media blocks,
   so the mobile rule .main-nav{display:none} applied at every width and
   the desktop nav never appeared, and a print rule hid the top bar and
   the tabs outright. */
.topbar{display:flex;align-items:center;gap:16px;padding:0 28px;height:62px;background:var(--plum);position:sticky;top:0;z-index:200;flex-wrap:nowrap;box-shadow:0 2px 14px rgba(45,42,50,0.12);}
.logo{display:flex;align-items:center;gap:10px;cursor:pointer;text-decoration:none;flex-shrink:0;}
.logo svg text{font-family:'Sora',sans-serif;}
.main-nav{display:flex;gap:4px;flex:1;overflow:visible;align-items:center;justify-content:center;}
.nav-btn{padding:9px 14px;font-size:13px;font-weight:500;color:rgba(255,255,255,0.82);background:transparent;border:none;border-radius:10px;cursor:pointer;font-family:'Inter',sans-serif;transition:all 0.18s;white-space:nowrap;display:flex;align-items:center;gap:6px;text-decoration:none;}
.nav-btn:hover{color:#fff;background:rgba(255,255,255,0.12);}
.nav-btn.active{color:#fff;background:rgba(255,255,255,0.16);}
.nav-signin{background:rgba(255,255,255,0.1);border:1px solid rgba(255,255,255,0.2);border-radius:8px;padding:7px 14px;font-size:12px;font-weight:500;color:#fff;cursor:pointer;font-family:'Inter',sans-serif;text-decoration:none;}
.nav-dropdown{position:relative;display:flex;align-items:center;align-self:stretch;}
.nav-dropdown::after{content:'';position:absolute;top:100%;left:0;right:0;height:8px;}
.nav-drop-toggle .nav-caret{margin-left:1px;transition:transform 0.2s;}
.nav-dropdown.open .nav-caret{transform:rotate(180deg);}
.nav-dropdown-menu{position:absolute;top:100%;left:0;z-index:1150;display:none;margin-top:2px;}
.nav-dropdown.open .nav-dropdown-menu{display:flex;}
.dd-tag{font-size:10px;font-weight:700;color:var(--clay-600);background:var(--clay-pale);padding:2px 7px;border-radius:100px;margin-left:auto;}
.askx-mega{display:grid;grid-template-columns:1fr 1fr 1.1fr;gap:32px;padding:28px 32px;background:#fff;border:1px solid var(--border);border-radius:18px;box-shadow:0 26px 64px rgba(58,50,67,.16);}
.askx-mega h4{font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:var(--text-muted);font-family:'Inter',sans-serif;font-weight:700;margin:0 0 12px;}
.askx-mega a{display:flex;align-items:center;gap:9px;padding:9px 12px;border-radius:10px;font-size:14.5px;color:var(--charcoal);text-decoration:none;cursor:pointer;}
.askx-mega a:hover{background:var(--sand);color:var(--plum);}
.askx-mega .dot{width:9px;height:9px;border-radius:3px;flex:none;}
.askx-mega-feature{background:var(--plum-pale);border-radius:14px;padding:20px;display:flex;flex-direction:column;justify-content:space-between;}
.askx-mega-feature b{font-family:'Sora',sans-serif;font-size:18px;color:var(--charcoal);line-height:1.2;}
.nav-dropdown-menu.mega{width:660px;max-width:92vw;padding:0;}
.nav-dropdown-menu.mega.narrow{width:460px;}
.nav-dropdown-menu.mega .askx-mega{width:100%;}
.askx-mega.cols-2{grid-template-columns:1fr 1.1fr;}
.askx-mega-setting{grid-column:1/-1;border-top:1px solid var(--border);margin-top:4px;padding-top:16px;}
.askx-mega-setting h4{font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:var(--text-muted);font-family:'Inter',sans-serif;font-weight:700;margin:0 0 10px;}
.setting-items .dd-tag{margin-left:0;}
.dd-tag-soon{color:var(--text-muted);background:var(--sand);}
.dd-current{background:var(--sand);color:var(--plum);font-weight:600;}
.nav-hamburger{display:none;}
.mobile-drawer{display:none;}
.md-group{border-bottom:1px solid rgba(255,255,255,.12);}
.md-group-head{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:52px;padding:12px 14px;background:none;border:0;font-family:'Sora',sans-serif;font-weight:600;font-size:18px;color:#fff;cursor:pointer;text-align:left;}
.md-chev{transition:transform .2s ease;flex-shrink:0;}
.md-group.open .md-chev{transform:rotate(90deg);}
.md-group-body{max-height:0;overflow:hidden;transition:max-height .28s ease;}
.md-group.open .md-group-body{max-height:600px;}
.md-sub{display:block;min-height:46px;padding:11px 14px 11px 26px;font-family:'Inter',sans-serif;font-weight:500;font-size:15.5px;color:rgba(255,255,255,.92);cursor:pointer;text-decoration:none;}
.md-sub:active{background:rgba(255,255,255,.08);}
.logo-box{display:flex;align-items:center;gap:14px;flex-wrap:wrap;min-height:44px;}
.logo-img{max-height:64px;max-width:220px;border:1px solid var(--line);border-radius:8px;padding:6px;background:var(--white);}
.logo-note{font-size:13px;color:var(--danger);margin:10px 0 0;}
/* PORTAL LAYOUT. Rail left, content right, collapsing to a horizontal scroller
   at narrow widths because an FDC educator is very often on a phone. Deliberately
   NOT a sticky sidebar: the page is short and a sticky rail on a small screen eats
   the space the answer needs. */
.portal{display:grid;grid-template-columns:212px 1fr;gap:26px;align-items:start;}
.portal-main{min-width:0;}
.nav-dropdown.open .nav-dropdown-menu,.nav-dropdown:hover .nav-dropdown-menu,.plan-menu.open{animation:ae-panel .2s cubic-bezier(.16,1,.3,1) both;}
/* ---- 2. Topbar and top nav ---------------------------------------- */
.topbar{gap:18px;padding:0 22px;height:60px;}
/* Centred (11 Sep 2026, Vish): the tabs sit between the logo and the right cluster. */
.main-nav{justify-content:center;flex:1;gap:2px;margin-left:0;}
.nav-btn{padding:9px 13px;font-size:13.5px;font-weight:500;border-radius:9px;transition:background .18s ease,color .18s ease;}
/* One label, no leading icon: the row reads as words, not as a toolbar.
   Delete this rule to bring the icons back. */
.main-nav .nav-btn > i:first-child{display:none;}
.nav-btn.active{position:relative;background:rgba(255,255,255,0.16);}
.nav-btn.active::after{content:'';position:absolute;left:13px;right:13px;bottom:3px;height:2px;border-radius:2px;background:var(--clay);}
/* ---- 3. Mega panels, calmer and one row --------------------------- */
.nav-dropdown-menu.mega{padding:0;}
#dd-tools.mega{width:980px;max-width:94vw;}
#dd-resources.mega{width:772px;max-width:94vw;}
#dd-community.mega.narrow{width:500px;max-width:94vw;}
.askx-mega{gap:28px;padding:24px 26px;border-radius:16px;box-shadow:0 26px 64px rgba(58,50,67,.14);}
#dd-tools .askx-mega{grid-template-columns:1fr 1fr 1fr 1.05fr;}
#dd-resources .askx-mega{grid-template-columns:1fr 1fr 1.05fr;}
.askx-mega.cols-2{grid-template-columns:1fr 1.1fr;}
/* Her setting now lives in the plan chip in the bar, so this column is not
   needed in the panel. Hidden, not deleted: markSettingInMenu still finds it. */
.askx-mega-setting{display:none !important;}
.askx-mega h4{font-family:'Sora',sans-serif;font-size:10px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--text-muted);margin:0 0 12px;padding-left:2px;}
.askx-mega a{display:flex;align-items:center;gap:10px;padding:9px 10px;border-radius:9px;font-family:'Inter',sans-serif;font-size:14px;font-weight:600;color:var(--text-secondary);cursor:pointer;text-decoration:none;transition:background .16s ease,color .16s ease,transform .16s cubic-bezier(.16,1,.3,1);}
.askx-mega a:hover{background:var(--plum-050);color:var(--plum-700);transform:translateX(3px);}
.askx-mega .dot{width:7px;height:7px;border-radius:999px;flex-shrink:0;}
.dd-tag{font-size:9.5px;font-weight:700;color:var(--clay-600);background:var(--clay-100);padding:2px 6px;border-radius:999px;}
.askx-mega-feature{background:var(--plum-050);border:1px solid var(--plum-100);border-radius:12px;padding:18px;}
.askx-mega-feature b{font-family:'Sora',sans-serif;font-size:16px;font-weight:600;color:var(--plum-800);line-height:1.25;}
.plan-chip .plan-dot{width:7px;height:7px;border-radius:999px;background:var(--clay);flex-shrink:0;}
.plan-chip .nav-caret{font-size:13px;color:rgba(255,255,255,0.75);}
.plan-tools a{display:flex;align-items:center;gap:10px;padding:9px 10px;border-radius:9px;font-family:'Inter',sans-serif;font-size:14px;font-weight:600;color:var(--text-secondary);cursor:pointer;text-decoration:none;transition:background .16s ease,color .16s ease,transform .16s cubic-bezier(.16,1,.3,1);}
.plan-tools a:hover{background:var(--plum-050);color:var(--plum-700);transform:translateX(3px);}
.plan-tools .dot{width:7px;height:7px;border-radius:999px;flex-shrink:0;}
.portal{max-width:1100px;margin:22px 0 26px;padding:36px 32px 34px;
  background:linear-gradient(135deg,var(--plum-050) 0%,var(--warm-white) 30%,
    var(--sand) 58%,var(--clay-100) 100%);border-radius:24px;}
/* ---- The elsewhere card, footer right ------------------------------- */
/* From a Uiverse pattern by vinodjangid07, rebuilt on the brand: four panels
   stack out of the bottom left corner on hover and the wordmark steps aside.
   Namespaced aee-s* because .card, .logo, .icon and .box are all taken. */
.aee-social{position:relative;width:200px;height:200px;border-radius:28px;overflow:hidden;
  border:2px solid var(--white);box-shadow:0 7px 29px rgba(47,35,80,.20);
  transition:transform .5s cubic-bezier(.16,1,.3,1);}

@media(hover:hover){
  .nav-dropdown:hover .nav-dropdown-menu{display:flex;}
  .nav-dropdown:hover .nav-caret{transform:rotate(180deg);}
}
@media(max-width:900px){
  .askx-mega{grid-template-columns:1fr;gap:18px;}
}
@media(max-width:1200px){
  .main-nav{display:none;}
  .nav-hamburger{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;min-width:44px;border:none;background:none;color:#fff;cursor:pointer;border-radius:10px;flex-shrink:0;margin-left:-4px;}
  .mobile-drawer{display:flex;flex-direction:column;position:fixed;inset:0;z-index:1100;background:var(--plum);transform:translateX(-100%);transition:transform .25s ease;overflow-y:auto;}
  .mobile-drawer.open{transform:translateX(0);}
  .md-head{display:flex;align-items:center;justify-content:space-between;padding:16px 18px;flex-shrink:0;}
  .md-logo{display:flex;align-items:center;gap:8px;font-family:'Sora',sans-serif;font-weight:600;font-size:18px;color:#fff;}
  .md-close{width:44px;height:44px;border:none;background:none;color:#fff;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:10px;}
  .md-nav{display:flex;flex-direction:column;padding:4px 8px;flex:1;}
  .md-row{display:flex;align-items:center;justify-content:space-between;min-height:52px;padding:12px 14px;font-family:'Sora',sans-serif;font-weight:600;font-size:18px;color:#fff;cursor:pointer;border-bottom:1px solid rgba(255,255,255,.12);text-decoration:none;}
  .md-tools{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:16px 16px 8px;flex-shrink:0;}
  .md-tool{min-height:48px;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.18);border-radius:12px;color:#fff;font-family:'Inter',sans-serif;font-size:13.5px;font-weight:500;cursor:pointer;padding:10px 12px;text-align:left;text-decoration:none;display:flex;align-items:center;}
  .md-signin{margin:12px 16px 18px;min-height:50px;background:var(--clay);color:var(--cta-ink);border:none;border-radius:14px;font-family:'Sora',sans-serif;font-weight:600;font-size:15px;cursor:pointer;flex-shrink:0;display:flex;align-items:center;justify-content:center;text-decoration:none;}
}
@media(max-width:820px){
  .portal{grid-template-columns:1fr;gap:16px;}
}
@media(max-width:760px){
  .md-plan{margin:4px 14px 14px;padding:12px 14px;background:rgba(255,255,255,0.08);border:1px solid rgba(255,255,255,0.16);border-radius:14px;}
  .md-plan-head{display:flex;align-items:center;justify-content:space-between;gap:10px;}
  .md-plan-label{font-family:'Sora',sans-serif;font-size:9.5px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:rgba(255,255,255,0.6);}
  .md-plan-name{display:flex;align-items:center;gap:8px;margin-top:5px;font-family:'Inter',sans-serif;font-size:14.5px;font-weight:600;color:#fff;}
  .md-plan-name .plan-dot{width:7px;height:7px;border-radius:999px;background:var(--clay);}
  .md-plan-change{min-height:44px;padding:8px 12px;font-family:'Inter',sans-serif;font-size:12px;font-weight:600;color:#fff;background:rgba(255,255,255,0.12);border:1px solid rgba(255,255,255,0.2);border-radius:999px;cursor:pointer;}
  .md-plan-tools{display:flex;flex-direction:column;margin-top:10px;padding-top:10px;border-top:1px solid rgba(255,255,255,0.14);}
  .md-plan-tools a{display:flex;align-items:center;gap:10px;min-height:44px;padding:0 4px;font-family:'Inter',sans-serif;font-size:14.5px;font-weight:600;color:rgba(255,255,255,0.9);}
  .md-plan-tools .dot{width:6px;height:6px;border-radius:999px;flex-shrink:0;}
  .md-row,.md-group-head{min-height:48px;}
  .md-sub{min-height:44px;}
  .md-signin{min-height:50px;}
}
@media(prefers-reduced-motion:reduce){
  .askx-mega a:hover,.plan-tools a:hover{transform:none;}
}
@media(max-width:820px){
  .portal{padding:20px 16px 22px;border-radius:20px;margin:14px 0 18px;}
}


/* The account area on the right. Scoped to .topbar so a page's own buttons
   are never restyled by the navigation. */
.topbar .top-right{display:flex;align-items:center;gap:9px;flex-shrink:0;margin-left:auto;}
.topbar .nav-signin{background:rgba(255,255,255,0.1);border:1px solid rgba(255,255,255,0.2);border-radius:8px;
  padding:7px 14px;font-size:12px;font-weight:500;color:#fff;text-decoration:none;white-space:nowrap;}
.topbar .nav-signin:hover{background:rgba(255,255,255,0.18);}
.topbar .btn-primary{background:var(--clay);color:var(--cta-ink);border:none;border-radius:10px;
  padding:9px 16px;font-size:13px;font-weight:600;font-family:'Sora',sans-serif;text-decoration:none;
  display:inline-flex;align-items:center;white-space:nowrap;}
.topbar .btn-primary:hover{background:#F6CE4B;}
