/*
 * The Alicia hub's shared chrome: the skip link, the slim "back to the
 * website" bar, the hub navigation and its phone menu. Every page under
 * /core-elements/alicia/ links this ONE file and carries the same nav markup
 * (between the hub-nav:start / hub-nav:end comments), and
 * tests/unit/p3-alicia-hub/hub-nav.test.ts fails if any page's copy drifts.
 *
 * No JS: the links are simply shown, wrapping. hub-nav.js adds .hub-js to
 * <html> before first paint; only then does the phone layout fold the links
 * behind the Menu button.
 */
.hub-skip{position:absolute;left:12px;top:-60px;z-index:100;background:#0C2340;color:#fff;font:600 14px/1 'Montserrat',-apple-system,'Segoe UI',sans-serif;padding:12px 16px;border-radius:0 0 10px 10px;text-decoration:none}
.hub-skip:focus{top:0}
.hub-vh{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* visible focus, everywhere on the hub (the page CSS turns some outlines off) */
a:focus-visible,button:focus-visible,input:focus-visible,textarea:focus-visible,summary:focus-visible{outline:3px solid #435B7C;outline-offset:3px}

/* the way back to the website */
.hub-site{background:#0C2340;color:#e7ecf3;font-family:'Montserrat',-apple-system,'Segoe UI',sans-serif}
.hub-site-in{max-width:1220px;margin:0 auto;padding:0 16px;display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:36px}
.hub-site a{color:#fff;text-decoration:none;font-size:13.5px;font-weight:600;letter-spacing:.2px;padding:8px 2px;display:inline-flex;align-items:center;gap:6px}
.hub-site a:hover{text-decoration:underline;text-underline-offset:3px}
.hub-site a:focus-visible{outline-color:#fff;outline-offset:1px}
.hub-site a.hub-signin{border:1px solid rgba(255,255,255,.45);border-radius:20px;padding:5px 12px;margin:4px 0}
.hub-site a.hub-signin:hover{background:rgba(255,255,255,.12);text-decoration:none}

/* the hub nav */
.hub-nav{position:sticky;top:0;z-index:40;background:rgba(246,243,236,.96);-webkit-backdrop-filter:saturate(160%) blur(10px);backdrop-filter:saturate(160%) blur(10px);border-bottom:1px solid #E3DED2;font-family:'Montserrat',-apple-system,'Segoe UI',sans-serif;color:#0C2340}
.hub-nav-in{display:flex;align-items:center;gap:12px;max-width:1220px;margin:0 auto;padding:10px 16px;flex-wrap:wrap}
.hub-logo{display:flex;align-items:center;gap:9px;text-decoration:none;color:#0C2340;flex:none;padding:4px 0}
.hub-logo img{height:22px;width:auto;display:block}
.hub-logo b{font-family:'Lora',Georgia,serif;font-size:19px;font-weight:600;letter-spacing:.2px}
.hub-panel{display:flex;align-items:center;gap:6px;flex:1;flex-wrap:wrap;justify-content:flex-end}
.hub-links{display:flex;flex-wrap:wrap;gap:2px;list-style:none;margin:0;padding:0}
.hub-links a{display:block;font-size:14px;line-height:1.2;color:#0C2340;text-decoration:none;padding:9px 9px;border-radius:20px;white-space:nowrap;opacity:.85}
.hub-links a:hover{opacity:1;background:#ECE6DA}
.hub-links a[aria-current="page"]{opacity:1;font-weight:600;background:#E4E9F0;box-shadow:inset 0 -2px 0 #435B7C}
.hub-book{display:inline-block;font-size:14px;font-weight:600;line-height:1.2;background:#0C2340;color:#fff;text-decoration:none;border-radius:30px;padding:11px 18px;white-space:nowrap;margin-left:6px}
.hub-book:hover{background:#16355a}
.hub-menu{display:none;margin-left:auto;align-items:center;gap:8px;font:600 14px/1 'Montserrat',-apple-system,'Segoe UI',sans-serif;color:#0C2340;background:#fff;border:1px solid #E3DED2;border-radius:24px;padding:11px 16px;cursor:pointer;min-height:44px}
.hub-menu .bars{display:inline-block;width:16px;height:2px;background:currentColor;position:relative;border-radius:2px}
.hub-menu .bars::before,.hub-menu .bars::after{content:"";position:absolute;left:0;width:16px;height:2px;background:currentColor;border-radius:2px}
.hub-menu .bars::before{top:-5px}.hub-menu .bars::after{top:5px}
.hub-menu[aria-expanded="true"] .bars{background:transparent}
.hub-menu[aria-expanded="true"] .bars::before{top:0;transform:rotate(45deg)}
.hub-menu[aria-expanded="true"] .bars::after{top:0;transform:rotate(-45deg)}

/* below desktop width: the links become a menu */
@media (max-width:1140px){
  /* no JS: links shown as a wrapping row under the logo */
  .hub-panel{flex-basis:100%;justify-content:flex-start}
  .hub-book{margin-left:0}
  /* with JS: a Menu button, the panel folds away until opened */
  .hub-js .hub-menu{display:inline-flex}
  .hub-js .hub-panel{display:none;flex-direction:column;align-items:stretch;gap:10px;padding:6px 0 10px}
  .hub-js .hub-nav.open .hub-panel{display:flex}
  .hub-js .hub-links{flex-direction:column;gap:2px}
  .hub-js .hub-links a{font-size:16px;padding:13px 14px;border-radius:12px;opacity:1}
  .hub-js .hub-links a[aria-current="page"]{box-shadow:inset 3px 0 0 #435B7C}
  .hub-js .hub-book{text-align:center;padding:14px 18px;font-size:15px}
  .hub-js .hub-nav.open{max-height:100vh;max-height:100dvh;overflow-y:auto}
}
@media (max-width:1140px) and (min-width:700px){
  .hub-js .hub-links{display:grid;grid-template-columns:1fr 1fr 1fr}
}

/* the footer link back to the website, on pages with a small .foot line */
.hub-foot-site{font-weight:600}
