/* hub-dock.css: Student Hub section dock / phone tab bar, the "Summon Dani" wizard, touch targets and the Student Hub button.
   Shared file: used by many pages. Pages load it in a fixed position between their own styles, so keep the rules in this order.
   After editing, run tools/refresh-asset-versions.sh so browsers fetch the new version. */
  :root{ --c-consult:#9CCB7E; --c-consult-rgb:156,203,126; --c-clubs:#7FC8C2; --c-clubs-rgb:127,200,194; --c-slots:#FFB454; --c-slots-rgb:255,180,84;
         --c-lab:#C3A3F0; --c-lab-rgb:195,163,240; --c-ask:#EE8A70; --c-ask-rgb:238,138,112; --c-cafe:#8FB6F0; --c-cafe-rgb:143,182,240; --c-battle:#EC8FC6; --c-battle-rgb:236,143,198; }
  :root[data-theme="light"]{ --c-consult:#3E7A2A; --c-consult-rgb:62,122,42; --c-clubs:#1F7A74; --c-clubs-rgb:31,122,116; --c-slots:#964A08; --c-slots-rgb:150,74,8;
         --c-lab:#6B4BB0; --c-lab-rgb:107,75,176; --c-ask:#B23A22; --c-ask-rgb:178,58,34; --c-cafe:#2F5C9E; --c-cafe-rgb:47,92,158; --c-battle:#A3306F; --c-battle-rgb:163,48,111; }
  .hub-dock{ display:inline-flex; align-items:center; gap:3px; max-width:100%; margin:0 0 38px; padding:6px; border-radius:20px;
    border:1px solid var(--border); background:var(--bg-alt); background:color-mix(in srgb, var(--bg-alt) 86%, transparent);
    -webkit-backdrop-filter:blur(10px); backdrop-filter:blur(10px); box-shadow:0 20px 44px -32px rgba(0,0,0,.85);
    overflow-x:auto; scrollbar-width:none; view-transition-name:hub-dock; }
  .hub-dock::-webkit-scrollbar{ display:none; }
  .hub-dock a{ --ac:var(--cyan); --ac-rgb:var(--cyan-rgb); position:relative; flex-shrink:0; display:flex; align-items:center; gap:10px;
    padding:6px 15px 6px 6px; border-radius:14px; text-decoration:none; white-space:nowrap; color:var(--text-muted);
    font-family:'Space Grotesk',sans-serif; font-weight:500; font-size:0.93rem; letter-spacing:0; transition:color .2s ease, background-color .2s ease; }
  .hub-dock a.hd-consult{ --ac:var(--c-consult); --ac-rgb:var(--c-consult-rgb); }
  .hub-dock a.hd-clubs{ --ac:var(--c-clubs); --ac-rgb:var(--c-clubs-rgb); }
  .hub-dock a.hd-slots{ --ac:var(--c-slots); --ac-rgb:var(--c-slots-rgb); }
  .hub-dock a.hd-lab{ --ac:var(--c-lab); --ac-rgb:var(--c-lab-rgb); }
  .hub-dock a.hd-ask{ --ac:var(--c-ask); --ac-rgb:var(--c-ask-rgb); }
  .hub-dock a.hd-cafe{ --ac:var(--c-cafe); --ac-rgb:var(--c-cafe-rgb); }
  .hub-dock a:hover{ color:var(--text); background:rgba(var(--ac-rgb),.08); }
  .hub-dock a:focus-visible{ outline:2px solid var(--ac); outline-offset:2px; }
  .hub-dock a[aria-current="page"]{ color:var(--text); background:none; }
  .hd-glow{ position:absolute; inset:0; border-radius:inherit; background:rgba(var(--ac-rgb),.15); border:1px solid rgba(var(--ac-rgb),.6);
    box-shadow:0 12px 28px -16px rgba(var(--ac-rgb),.95); view-transition-name:hd-glow; }
  .hd-ic{ position:relative; z-index:1; width:34px; height:34px; flex-shrink:0; border-radius:10px; display:grid; place-items:center;
    color:var(--ac); background:rgba(var(--ac-rgb),.12); border:1px solid rgba(var(--ac-rgb),.28); transition:background-color .25s ease, color .25s ease, border-color .25s ease; }
  .hd-ic svg{ width:21px; height:21px; overflow:visible; }
  .hub-dock a[aria-current="page"] .hd-ic{ background:var(--ac); border-color:var(--ac); color:var(--bg); }
  .hub-dock a.hd-hub[aria-current="page"] .hd-ic{ background:rgba(var(--ac-rgb),.16); border-color:var(--ac); }
  .hd-l{ position:relative; z-index:1; }
  .hd-l .lm, .hd-l .ls{ display:none; }
  .hd-soon{ position:relative; z-index:1; margin-left:-2px; padding:1px 8px 2px; border-radius:100px; font-size:0.7rem; font-weight:600;
    color:var(--ac); background:rgba(var(--ac-rgb),.12); border:1px solid rgba(var(--ac-rgb),.3); }
  .hd-sep{ align-self:stretch; width:1px; margin:7px 5px; flex-shrink:0; background:var(--border); }
  /* labels get shorter as the screen narrows, so all eight sections always fit without a hidden one at the end */
  @media (max-width:1299px){ .hd-l .lf{ display:none; } .hd-l .lm{ display:inline; } }
  @media (max-width:1129px){ .hd-l .lm{ display:none; } .hd-l .ls{ display:inline; } .hd-soon{ display:none; } .hub-dock a{ padding-right:13px; } }
  @media (min-width:721px) and (max-width:869px){ .hub-dock{ gap:1px; padding:5px; } .hub-dock a{ gap:6px; padding:5px 9px 5px 4px; font-size:0.86rem; }
    .hd-ic{ width:30px; height:30px; } .hd-ic svg{ width:19px; height:19px; } .hd-sep{ margin:7px 3px; } }
  @media (min-width:721px){ .hub-dock.hd-mobile{ display:none; } }

  /* phones: app-style tab bar at the bottom of the screen */
  @media (max-width:720px){
    body.has-dock{ padding-bottom:calc(88px + env(safe-area-inset-bottom, 0px)); }
    .hub-dock{ position:fixed; z-index:95; left:10px; right:10px; bottom:calc(10px + env(safe-area-inset-bottom, 0px)); margin:0;
      display:grid; grid-template-columns:repeat(8, minmax(0,1fr)); gap:2px; padding:6px; border-radius:22px; overflow:visible;
      background:rgba(28,22,15,.95); border-color:var(--line-overlay); box-shadow:0 22px 46px -14px rgba(0,0,0,.8);
      transition:transform .3s ease, opacity .25s ease; }
    :root[data-theme="light"] .hub-dock{ background:rgba(253,251,246,.96); box-shadow:0 18px 40px -18px rgba(70,45,10,.4); }
    .hd-sep{ display:none; }
    .hub-dock a{ min-width:0; flex-direction:column; justify-content:center; gap:4px; padding:6px 0 5px; border-radius:16px; font-size:0.68rem; font-weight:600; }
    .hub-dock a[aria-current="page"]{ color:var(--ac); }
    .hd-ic{ width:38px; height:30px; border-radius:10px; }
    .hd-ic svg{ width:20px; height:20px; }
    .hd-l{ max-width:100%; overflow:hidden; text-overflow:clip; }
    body.dock-hidden .hub-dock{ transform:translateY(calc(100% + 30px)); opacity:0; pointer-events:none; }
  }
  /* eight sections on the smallest phones */
  @media (max-width:350px){ .hub-dock{ left:6px; right:6px; padding:5px 4px; gap:0; } .hub-dock a{ font-size:0.64rem; } .hd-ic{ width:34px; } }

  /* "Student Hub · <page>" label above each page's headline */
  .eyebrow.hub-eb{ margin:0 0 18px; font-size:1.08rem; color:var(--text); }
  /* the coloured line under each headline: a little more space between its lines when it wraps (phones, Clubs) */
  .s-hero h1 .sub, .c-hero h1 .sub, .a-hero h1 .sub, .k-hero h1 .sub, .cf-hero h1 .sub{ line-height:1.2; }
  /* the label always sits at the same height under the section bar: the headline column starts at the top, even when the box beside it is taller */
  .s-hero > div:first-child, .cl-hero > div:first-child, .c-hero > div:first-child, .a-hero > div:first-child, .k-hero > div:first-child, .cf-hero > div:first-child{ align-self:start; }
  @media (max-width:560px){ .eyebrow.hub-eb{ font-size:0.8rem; letter-spacing:0.16em; margin-bottom:14px; } }

  /* icon motion: plays on hover, and once when the page opens for the section you're on */
  .dk-i *{ transform-box:view-box; }
  .dk-sq{ transform-box:fill-box !important; transform-origin:center; }
  .dk-light{ opacity:0; transition:opacity .35s ease; }
  .dk-leaf{ transform-origin:6.5px 12px; transition:transform .5s cubic-bezier(.3,1.35,.5,1); }
  .hub-dock a:hover .dk-leaf, .hub-dock a:focus-visible .dk-leaf, .hub-dock a[aria-current="page"] .dk-leaf{ transform:scaleX(.5); }
  .hub-dock a:hover .dk-light, .hub-dock a:focus-visible .dk-light, .hub-dock a[aria-current="page"] .dk-light{ opacity:.32; }
  .dk-mer{ transform-origin:12px 12px; transform:scaleX(.42); }
  .dk-orbit{ transform-origin:12px 12px; }
  .dk-sym, .dk-ball, .dk-bb{ transform-origin:12px 12px; }
  .dk-arm{ transform-origin:20.1px 15px; }
  .dk-liq{ opacity:.32; }
  .dk-bub{ transform-origin:12px 12px; }
  .dk-tea{ opacity:.3; }
  .dk-st{ transform-origin:12px 12px; stroke-dasharray:1 1.3; stroke-dashoffset:0; }
  .dk-cupg{ transform-origin:10.5px 20px; }
  @keyframes dkSq{ 0%,100%{ transform:scale(1); } 40%{ transform:scale(.62); } }
  @keyframes dkMer{ from{ transform:scaleX(.42); } to{ transform:scaleX(-.42); } }
  @keyframes dkOrbit{ to{ transform:rotate(360deg); } }
  @keyframes dkReel{ 0%{ transform:translateY(0); opacity:1; } 30%{ transform:translateY(3px); opacity:0; } 31%{ transform:translateY(-3px); opacity:0; } 62%,100%{ transform:translateY(0); opacity:1; } }
  @keyframes dkBall{ 0%,100%{ transform:translateY(0); } 30%{ transform:translateY(4.6px); } }
  @keyframes dkArm{ 0%,100%{ transform:scaleY(1); } 30%{ transform:scaleY(.32); } }
  @keyframes dkSteam{ 0%{ stroke-dashoffset:0; transform:translateY(0); opacity:1; } 42%{ stroke-dashoffset:-1.1; transform:translateY(-2.5px); opacity:.3; } 43%{ stroke-dashoffset:1.1; transform:translateY(1.5px); opacity:1; } 100%{ stroke-dashoffset:0; transform:translateY(0); opacity:1; } }
  @keyframes dkClink{ 0%,100%{ transform:none; } 22%{ transform:rotate(-12deg); } 48%{ transform:rotate(8deg); } 72%{ transform:rotate(-3deg); } }
  @keyframes dkTea{ 0%,100%{ opacity:.3; } 40%{ opacity:.6; } }
  @keyframes dkRise{ 0%{ transform:translateY(0); opacity:0; } 20%{ opacity:1; } 100%{ transform:translateY(-8px); opacity:0; } }
  @keyframes dkPop{ 0%,100%{ transform:none; } 35%{ transform:scale(1.15) rotate(-7deg); } 65%{ transform:scale(.95) rotate(3deg); } }
  .hub-dock a:hover .dk-sq, .hub-dock a:focus-visible .dk-sq{ animation:dkSq .5s ease both; }
  .hub-dock a .dk-sq:nth-child(2){ animation-delay:.07s; } .hub-dock a .dk-sq:nth-child(4){ animation-delay:.14s; } .hub-dock a .dk-sq:nth-child(3){ animation-delay:.21s; }
  .hub-dock a:hover .dk-mer, .hub-dock a:focus-visible .dk-mer{ animation:dkMer .7s ease-in-out infinite alternate; }
  .hub-dock a:hover .dk-orbit, .hub-dock a:focus-visible .dk-orbit, .hub-dock a[aria-current="page"] .dk-orbit{ animation:dkOrbit 1.4s cubic-bezier(.45,.05,.35,1) both; }
  .hub-dock a:hover .dk-sym, .hub-dock a:focus-visible .dk-sym, .hub-dock a[aria-current="page"] .dk-sym{ animation:dkReel .38s linear 2 both; }
  .hub-dock a .dk-sym:nth-child(2){ animation-delay:.1s; } .hub-dock a .dk-sym:nth-child(3){ animation-delay:.2s; }
  .hub-dock a:hover .dk-ball, .hub-dock a:focus-visible .dk-ball, .hub-dock a[aria-current="page"] .dk-ball{ animation:dkBall .6s ease both; }
  .hub-dock a:hover .dk-arm, .hub-dock a:focus-visible .dk-arm, .hub-dock a[aria-current="page"] .dk-arm{ animation:dkArm .6s ease both; }
  .hub-dock a:hover .dk-bb, .hub-dock a:focus-visible .dk-bb, .hub-dock a[aria-current="page"] .dk-bb{ animation:dkRise 1s ease-out 2 both; }
  .hub-dock a .dk-bb + .dk-bb{ animation-delay:.35s; }
  .hub-dock a:hover .dk-bub, .hub-dock a:focus-visible .dk-bub, .hub-dock a[aria-current="page"] .dk-bub{ animation:dkPop .6s ease both; }
  .hub-dock a:hover .dk-st, .hub-dock a:focus-visible .dk-st, .hub-dock a[aria-current="page"] .dk-st{ animation:dkSteam 1s ease-in-out 2 both; }
  .hub-dock a:hover .dk-cupg, .hub-dock a:focus-visible .dk-cupg, .hub-dock a[aria-current="page"] .dk-cupg{ animation:dkClink .6s ease both; }
  .hub-dock a:hover .dk-tea, .hub-dock a:focus-visible .dk-tea, .hub-dock a[aria-current="page"] .dk-tea{ animation:dkTea .6s ease both; }
  .hub-dock a .dk-st{ animation-delay:.15s; } .hub-dock a .dk-st + .dk-st{ animation-delay:.4s; }
  .hub-dock a[aria-current="page"] .dk-cupg, .hub-dock a[aria-current="page"] .dk-tea{ animation-delay:.45s; }
  .hub-dock a[aria-current="page"] .dk-st{ animation-delay:.6s; } .hub-dock a[aria-current="page"] .dk-st + .dk-st{ animation-delay:.85s; }
  .hub-dock a[aria-current="page"] .dk-orbit, .hub-dock a[aria-current="page"] .dk-sym, .hub-dock a[aria-current="page"] .dk-ball,
  .hub-dock a[aria-current="page"] .dk-arm, .hub-dock a[aria-current="page"] .dk-bub{ animation-delay:.45s; }
  .hub-dock a[aria-current="page"] .dk-sym:nth-child(2){ animation-delay:.55s; } .hub-dock a[aria-current="page"] .dk-sym:nth-child(3){ animation-delay:.65s; }
  .hub-dock a[aria-current="page"] .dk-bb{ animation-delay:.45s; } .hub-dock a[aria-current="page"] .dk-bb + .dk-bb{ animation-delay:.8s; }

  /* moving between Student Hub pages: the highlight slides to the new section (browsers that support it) */
  @media (prefers-reduced-motion:no-preference){
    @view-transition{ navigation:auto; }
    ::view-transition-group(hd-glow){ animation-duration:.45s; animation-timing-function:cubic-bezier(.2,.8,.2,1); }
    /* the Student Hub page has no bar on wide screens: drop the old bar at once instead of fading it out over the page */
    ::view-transition-old(hd-glow):only-child, ::view-transition-old(hub-dock):only-child{ animation:none; opacity:0; }
  }
  @media (prefers-reduced-motion:reduce){
    .hub-dock *, .hub-dock *::before{ animation:none !important; transition:none !important; }
  }


  /* wizard-summon css */
  /* ================= Summon Nerd Wizard Dani (floating wand + spellbook) ================= */
  .wiz-snd{ display:inline-grid; place-items:center; width:34px; height:30px; padding:0; border:0; border-radius:8px; background:none; color:var(--text-muted); cursor:pointer; }
  .wiz-snd:hover{ color:var(--c-lab); }
  .wiz-snd:focus-visible{ outline:2px solid var(--c-lab); outline-offset:2px; }
  .wiz-snd svg{ width:22px; height:auto; display:block; }
  .wiz-snd .off{ display:none; } .wiz-snd[aria-pressed="false"] .on{ display:none; } .wiz-snd[aria-pressed="false"] .off{ display:block; }

  .wsw{ position:fixed; right:22px; bottom:22px; z-index:110; width:64px; height:64px; padding:0; cursor:pointer; color:#1F2547;
    border:4px solid #1F2547; border-image:url("data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20viewBox=%220%200%2015%2015%22%20width=%2215%22%20height=%2215%22%20shape-rendering=%22crispEdges%22%3E%3Cpath%20fill=%22%231F2547%22%20d=%22M4%200h7v1h-7zM2%201h2v1h-2zM11%201h2v1h-2zM1%202h1v1h-1zM13%202h1v1h-1zM1%203h1v1h-1zM13%203h1v1h-1zM0%204h1v1h-1zM14%204h1v1h-1zM0%205h1v1h-1zM14%205h1v1h-1zM0%206h1v1h-1zM14%206h1v1h-1zM0%207h1v1h-1zM14%207h1v1h-1zM0%208h1v1h-1zM14%208h1v1h-1zM0%209h1v1h-1zM14%209h1v1h-1zM0%2010h1v1h-1zM14%2010h1v1h-1zM1%2011h1v1h-1zM13%2011h1v1h-1zM1%2012h1v1h-1zM13%2012h1v1h-1zM2%2013h2v1h-2zM11%2013h2v1h-2zM4%2014h7v1h-7z%22/%3E%3Cpath%20fill=%22%234B3592%22%20d=%22M4%201h7v1h-7zM2%202h11v1h-11zM2%203h11v1h-11zM1%204h13v1h-13zM1%205h13v1h-13zM1%206h13v1h-13zM1%207h13v1h-13zM1%208h13v1h-13zM1%209h13v1h-13zM1%2010h13v1h-13zM2%2011h11v1h-11zM2%2012h11v1h-11z%22/%3E%3Cpath%20fill=%22%233D2A7A%22%20d=%22M4%2013h7v1h-7z%22/%3E%3C/svg%3E") 7 fill / 28px / 0 stretch; background:none;
    filter:drop-shadow(5px 5px 0 rgba(0,0,0,.3)); display:grid; place-items:center; -webkit-tap-highlight-color:transparent;
    transition:transform .35s cubic-bezier(.3,1.5,.5,1), opacity .25s ease; }
  .wsw-ic{ display:block; width:40px; height:40px; filter:drop-shadow(0 0 5px rgba(255,200,61,.45)); }
  .wsw-ic svg{ display:block; width:100%; height:100%; }
  .wsw:hover .wsw-ic, .wsw:focus-visible .wsw-ic{ animation:wsWave .6s ease-in-out; }
  .wsw:focus-visible{ outline:3px solid var(--c-lab); outline-offset:4px; }
  .wsw.away, .wsw.gone, .wsw.foot-away{ transform:scale(0) rotate(-30deg); opacity:0; pointer-events:none; visibility:hidden; transition:transform .3s ease, opacity .25s ease, visibility 0s linear .3s; }
  .wsw.flick .wsw-ic{ animation:wsFlick .45s ease; }
  .wsw-tip{ position:absolute; right:calc(100% + 12px); top:50%; transform:translate(8px,-50%); white-space:nowrap; pointer-events:none;
    padding:6px 10px 7px; font:700 .9rem/1 'Pixelify Sans','JetBrains Mono',monospace; color:#1F2547; background:#FFFDF7;
    box-shadow:0 -3px 0 #1F2547, 0 3px 0 #1F2547, -3px 0 0 #1F2547, 3px 0 0 #1F2547, 5px 5px 0 rgba(0,0,0,.25); opacity:0; transition:opacity .2s, transform .2s; }
  .wsw:hover .wsw-tip, .wsw:focus-visible .wsw-tip, .wsw.tip .wsw-tip{ opacity:1; transform:translate(0,-50%); }
  .wsw::after{ content:''; position:absolute; inset:-10px; border-radius:50%; pointer-events:none; opacity:0;
    background:radial-gradient(closest-side, rgba(var(--c-lab-rgb),.45), transparent); animation:wsHalo 3.6s ease-in-out infinite; z-index:-1; }
  @keyframes wsHalo{ 0%,100%{ opacity:.25; transform:scale(.9); } 50%{ opacity:.7; transform:scale(1.08); } }
  @keyframes wsWave{ 0%,100%{ transform:rotate(0); } 30%{ transform:rotate(-16deg); } 65%{ transform:rotate(10deg); } }
  @keyframes wsFlick{ 0%{ transform:rotate(0); } 35%{ transform:rotate(-28deg) scale(1.1); } 70%{ transform:rotate(18deg); } 100%{ transform:rotate(0); } }

  .ws-scrim{ position:fixed; inset:0; z-index:128; background:rgba(12,9,24,.5); -webkit-backdrop-filter:blur(2px); backdrop-filter:blur(2px); opacity:0; transition:opacity .35s ease; }
  :root[data-theme="light"] .ws-scrim{ background:rgba(60,44,20,.28); }
  .ws-scrim.on{ opacity:1; }
  .ws-scrim[hidden]{ display:none; }
  .ws{ position:fixed; right:18px; bottom:18px; z-index:130; width:min(460px, calc(100vw - 24px)); font-family:'Pixelify Sans','JetBrains Mono',monospace; color:#1F2547; }
  .ws[hidden]{ display:none; }
  .ws-top{ position:relative; z-index:2; display:grid; grid-template-columns:minmax(0,1fr) 168px; align-items:start; gap:4px; margin-bottom:-26px; padding-right:24px; pointer-events:none; }
  .ws-say{ position:relative; margin-top:6px; padding:11px 14px 13px; border:4px solid #1F2547; border-image:url("data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20viewBox=%220%200%2015%2015%22%20width=%2215%22%20height=%2215%22%20shape-rendering=%22crispEdges%22%3E%3Cpath%20fill=%22%231F2547%22%20d=%22M4%200h7v1h-7zM2%201h2v1h-2zM11%201h2v1h-2zM1%202h1v1h-1zM13%202h1v1h-1zM1%203h1v1h-1zM13%203h1v1h-1zM0%204h1v1h-1zM14%204h1v1h-1zM0%205h1v1h-1zM14%205h1v1h-1zM0%206h1v1h-1zM14%206h1v1h-1zM0%207h1v1h-1zM14%207h1v1h-1zM0%208h1v1h-1zM14%208h1v1h-1zM0%209h1v1h-1zM14%209h1v1h-1zM0%2010h1v1h-1zM14%2010h1v1h-1zM1%2011h1v1h-1zM13%2011h1v1h-1zM1%2012h1v1h-1zM13%2012h1v1h-1zM2%2013h2v1h-2zM11%2013h2v1h-2zM4%2014h7v1h-7z%22/%3E%3Cpath%20fill=%22%23FFFDF7%22%20d=%22M4%201h7v1h-7zM2%202h11v1h-11zM2%203h11v1h-11zM1%204h13v1h-13zM1%205h13v1h-13zM1%206h13v1h-13zM1%207h13v1h-13zM1%208h13v1h-13zM1%209h13v1h-13zM1%2010h13v1h-13zM2%2011h11v1h-11zM2%2012h11v1h-11z%22/%3E%3Cpath%20fill=%22%23ECE4D0%22%20d=%22M4%2013h7v1h-7z%22/%3E%3C/svg%3E") 7 fill / 28px / 0 stretch;
    filter:drop-shadow(6px 6px 0 rgba(0,0,0,.28)); opacity:0; transform:scale(.3); transform-origin:88% 120%; pointer-events:auto; }
  .ws-q{ margin:0; font-size:1rem; line-height:1.35; font-weight:500; }
  .ws-q span{ display:block; opacity:0; transform:translateY(4px); }
  .ws-q span:first-child{ font-weight:700; color:#5A3FA8; margin-bottom:3px; }
  .ws-tail{ position:absolute; right:16%; bottom:-20px; width:24px; height:24px; transform:scaleX(-1); }
  .ws-tail svg{ display:block; width:100%; height:100%; }
  .ws.talk .ws-say{ animation:wsPop .45s cubic-bezier(.3,1.55,.5,1) forwards; }
  .ws.talk .ws-q span{ animation:wsLine .3s ease forwards; } .ws.talk .ws-q span + span{ animation-delay:.25s; }
  @keyframes wsPop{ 0%{ opacity:0; transform:scale(.3); } 60%{ opacity:1; transform:scale(1.05); } 100%{ opacity:1; transform:none; } }
  @keyframes wsLine{ to{ opacity:1; transform:none; } }
  .ws-dani{ position:relative; display:block; width:168px; padding:0; margin:22px 0 0; border:0; background:none; cursor:pointer; pointer-events:auto; -webkit-tap-highlight-color:transparent; }
  .ws-dani:focus-visible{ outline:2px solid var(--c-lab); outline-offset:4px; border-radius:14px; }
  .ws-fly, .ws-bob{ display:block; will-change:transform; }
  .ws-dani img{ display:block; width:100%; height:auto; filter:drop-shadow(0 12px 14px rgba(0,0,0,.35)); }
  .ws.landed .ws-bob{ animation:wsBob 3.2s ease-in-out infinite; }
  @keyframes wsBob{ 0%,100%{ transform:translateY(0); } 50%{ transform:translateY(-7px) rotate(-.6deg); } }

  /* the spellbook: purple cover, two cream pages, gold pixel corners */
  .ws-book{ position:relative; z-index:1; padding:12px 12px 16px; background:#3D2A7A; perspective:1400px;
    box-shadow:0 -4px 0 #1F2547, 0 4px 0 #1F2547, -4px 0 0 #1F2547, 4px 0 0 #1F2547, 8px 10px 0 2px rgba(0,0,0,.3);
    opacity:0; transform:translateY(16px) scale(.92); transform-origin:75% 100%; clip-path:inset(-14px -14px -14px 50%);
    transition:opacity .25s ease, transform .35s cubic-bezier(.3,1.4,.5,1), clip-path .7s cubic-bezier(.55,.05,.35,1); }
  .ws.open .ws-book{ clip-path:inset(-40px -40px -40px -40px); }
  .ws-book::before{ content:''; position:absolute; inset:5px; pointer-events:none;
    background:linear-gradient(#F2C14E,#F2C14E) left top / 8px 8px no-repeat, linear-gradient(#F2C14E,#F2C14E) right top / 8px 8px no-repeat,
               linear-gradient(#F2C14E,#F2C14E) left bottom / 8px 8px no-repeat, linear-gradient(#F2C14E,#F2C14E) right bottom / 8px 8px no-repeat; }
  .ws.book .ws-book{ opacity:1; transform:none; }
  .ws-pages{ position:relative; display:grid; grid-template-columns:1fr 1fr; background:#FFF9EC;
    box-shadow:0 3px 0 #E9DDC2, 0 6px 0 #FFF9EC, 0 8px 0 #D9CBA8; }
  .ws-pages::after{ content:''; position:absolute; top:0; bottom:0; left:50%; width:28px; transform:translateX(-50%); pointer-events:none;
    background:linear-gradient(90deg, transparent, rgba(61,42,122,.10) 40%, rgba(61,42,122,.22) 50%, rgba(61,42,122,.10) 60%, transparent); }
  .ws-page{ min-height:150px; }
  .ws-l{ grid-column:1 / -1; grid-row:1; padding:12px; }
  .ws-spells{ display:grid; grid-template-columns:1fr 1fr; grid-template-rows:repeat(4, auto); grid-auto-flow:column; gap:10px 26px; opacity:0; transition:opacity .3s ease; }
  .ws.opened .ws-spells{ opacity:1; }
  .ws-sp{ position:relative; display:flex; align-items:center; gap:9px; min-width:0; padding:8px 8px 9px; color:#1F2547; text-decoration:none; background:#FFFDF7;
    box-shadow:0 -2px 0 #1F2547, 0 2px 0 #1F2547, -2px 0 0 #1F2547, 2px 0 0 #1F2547, 4px 4px 0 rgba(31,37,71,.18); transition:transform .15s ease, background-color .15s; }
  .ws-sp:hover, .ws-sp:focus-visible{ transform:translate(-1px,-2px); background:#fff; }
  .ws-sp:focus-visible{ outline:3px solid var(--k); outline-offset:3px; }
  .ws-ic{ flex-shrink:0; width:34px; height:34px; display:grid; place-items:center; color:var(--k); background:#fff;
    box-shadow:0 -2px 0 var(--k), 0 2px 0 var(--k), -2px 0 0 var(--k), 2px 0 0 var(--k); }
  .ws-ic svg{ width:22px; height:22px; }
  .ws-sp:hover .ws-ic svg, .ws-sp:focus-visible .ws-ic svg{ animation:wsWave .5s ease; }
  .ws-t{ min-width:0; display:flex; flex-direction:column; gap:2px; }
  .ws-t b{ font-size:.92rem; overflow-wrap:anywhere; font-weight:700; line-height:1.15; color:var(--k); }
  .ws-t small{ font-size:.74rem; line-height:1.25; color:#4A4F6E; font-family:inherit; }
  .ws-here{ align-self:flex-start; margin-top:2px; padding:1px 6px 2px; font-size:.66rem; color:#fff; background:var(--k); }
  .ws-sp.is-here{ background:#F6F1E4; }

  /* the cover swings open from the spine (desktop: left edge; phones: top edge) */
  .ws-cover{ position:absolute; z-index:3; top:12px; bottom:16px; left:50%; right:12px; transform-origin:left center; transform-style:preserve-3d; transition:transform .7s cubic-bezier(.55,.05,.35,1); }
  .ws-cover > span{ position:absolute; inset:0; backface-visibility:hidden; -webkit-backface-visibility:hidden; }
  .ws-cf{ display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px; background:#4B3592;
    box-shadow:inset 0 0 0 4px #2E1F5E, inset 0 0 0 7px #F2C14E, inset 0 0 0 10px #4B3592, inset 0 0 0 12px #6A52B8; }
  .ws-emb{ width:58px; } .ws-emb svg{ display:block; width:100%; height:auto; filter:drop-shadow(0 0 6px rgba(242,193,78,.6)); }
  .ws-ttl{ font-weight:700; font-size:1rem; letter-spacing:.24em; color:#F2C14E; }
  .ws-cb{ transform:rotateY(180deg); background:#FFF9EC; box-shadow:inset -10px 0 14px -10px rgba(61,42,122,.3); }
  .ws.open .ws-cover{ transform:rotateY(-180deg); }
  .ws.opened .ws-cover{ visibility:hidden; }
  .ws-ribbon{ position:absolute; z-index:4; bottom:-14px; right:58px; width:12px; height:30px; background:#C8463D;
    clip-path:polygon(0 0, 100% 0, 100% 100%, 50% 80%, 0 100%); box-shadow:inset 3px 0 0 rgba(255,255,255,.18); }
  .ws-x{ position:absolute; z-index:6; top:-4px; right:-6px; width:34px; height:34px; padding:0; display:grid; place-items:center; cursor:pointer;
    color:#FFFDF7; background:#C8463D; border:0; box-shadow:0 -3px 0 #1F2547, 0 3px 0 #1F2547, -3px 0 0 #1F2547, 3px 0 0 #1F2547, 4px 4px 0 rgba(0,0,0,.3);
    opacity:0; transition:opacity .2s ease, transform .15s ease; }
  .ws-x svg{ width:14px; height:14px; display:block; }
  .ws-x:hover{ transform:rotate(90deg); } .ws-x:focus-visible{ outline:3px solid #F2C14E; outline-offset:3px; }
  .ws-snd{ position:absolute; z-index:5; left:14px; bottom:-2px; width:30px; height:18px; color:#F2C14E; opacity:0; transition:opacity .2s; }
  .ws-snd:hover{ color:#FFF4C2; } .ws-snd svg{ width:18px; }
  .ws.opened .ws-x, .ws.opened .ws-snd{ opacity:1; }
  .ws-fx{ position:fixed; inset:0; z-index:125; pointer-events:none; overflow:hidden; }
  .ws-p{ position:absolute; left:0; top:0; width:var(--s); height:var(--s); color:#FFD34D; filter:drop-shadow(0 0 4px currentColor); }
  .ws-p svg{ display:block; width:100%; height:100%; fill:currentColor; }
  .ws-p.bit{ width:auto; height:auto; font:700 var(--s)/1 'Pixelify Sans','JetBrains Mono',monospace; filter:none; text-shadow:0 0 6px currentColor; }
  .ws-p.c2{ color:var(--c-lab); } .ws-p.c3{ color:var(--c-clubs); } .ws-p.c4{ color:#FFF2B0; }
  :root[data-theme="light"] .ws-p{ color:#E09A00; } :root[data-theme="light"] .ws-p.c4{ color:#F0B43C; }
  :root[data-theme="light"] .ws-p.c2{ color:var(--c-lab); } :root[data-theme="light"] .ws-p.c3{ color:var(--c-clubs); }

  @media (max-width:720px){
    /* phones: the wand peeks out from the right edge, so it hides as little of the page as possible */
    .wsw{ right:-16px; bottom:calc(98px + env(safe-area-inset-bottom, 0px)); width:58px; height:58px; padding-right:16px; }
    .wsw-ic{ width:32px; height:32px; }
    .wsw-ic svg{ transform:scaleX(-1); }
    .ws{ left:10px; right:10px; width:auto; bottom:calc(92px + env(safe-area-inset-bottom, 0px)); }
    body.dock-hidden .wsw{ transform:scale(0); opacity:0; pointer-events:none; visibility:hidden; }
  }
  @media (max-width:520px){
    .ws-top{ grid-template-columns:minmax(0,1fr) 128px; margin-bottom:-18px; padding-right:20px; }
    .ws-dani{ width:128px; margin-top:26px; }
    .ws-q{ font-size:.93rem; }
    .ws-pages{ grid-template-columns:1fr; grid-template-rows:auto auto; }
    .ws-pages::after{ top:50%; bottom:auto; left:0; right:0; width:auto; height:24px; transform:translateY(-50%);
      background:linear-gradient(180deg, transparent, rgba(61,42,122,.10) 40%, rgba(61,42,122,.22) 50%, rgba(61,42,122,.10) 60%, transparent); }
    .ws-l{ grid-column:1; grid-row:1 / span 2; }
    .ws-page{ min-height:0; }
    .ws-spells{ grid-template-columns:1fr; grid-template-rows:none; grid-auto-flow:row; gap:12px; }
    .ws-spells .ws-sp:nth-child(5){ margin-top:14px; }
    .ws-cover{ left:12px; right:12px; top:50%; bottom:16px; transform-origin:center top; }
    .ws-cb{ transform:rotateX(180deg); box-shadow:inset 0 10px 14px -10px rgba(61,42,122,.3); }
    .ws.open .ws-cover{ transform:rotateX(180deg); }
    .ws-book{ clip-path:inset(50% -14px -14px -14px); transform-origin:50% 100%; }
  }
  @media (max-height:620px){ .ws-dani{ width:118px; } .ws-top{ grid-template-columns:minmax(0,1fr) 118px; } .ws-t small{ display:none; } }
  @media (prefers-reduced-motion:reduce){
    .wsw::after, .ws.landed .ws-bob{ animation:none; }
    .ws-book, .ws-cover, .wsw, .ws-scrim{ transition:none; }
    .ws.talk .ws-say, .ws.talk .ws-q span{ animation:none; opacity:1; transform:none; }
  }
  @media print{ .wsw, .ws, .ws-scrim{ display:none !important; } }
  /* /wizard-summon css */


  /* decorative looping animations rest while scrolled out of view (perf) */
  .anim-off, .anim-off *, .anim-off *::before, .anim-off *::after{ animation-play-state:paused !important; }

  /* phones/tablets: the bars are ~95% solid here, so skip the costly background blur (looks the same) */
  @media (max-width:980px){ nav{ -webkit-backdrop-filter:none; backdrop-filter:none; } }
  @media (max-width:720px){ .hub-dock{ -webkit-backdrop-filter:none; backdrop-filter:none; } }
  #synapse-canvas{ height:100lvh; }

  /* touch-targets */
  @media (pointer:coarse){
    .gm-back, .ff-point, .pool-line a, .small-actions .linkbtn{ position:relative; }
    .gm-back::after, .pool-line a::after, .small-actions .linkbtn::after{ content:''; position:absolute; inset:-12px -6px; }
    .ff-point::after{ content:''; position:absolute; inset:-16px; }
    .fd-part.fd-title::before{ content:''; position:absolute; inset:-10px -4px -4px; }  /* ::before, so the green tick (::after) stays in its corner */
    .gm-hot::before{ content:''; position:absolute; inset:-10px; border-radius:50%; }
  }
  @media (max-width:480px){ .qd-q{ -webkit-line-clamp:3; } }
  /* /touch-targets */

  /* hub-btn css */
  /* Student Hub button: graduation cap that tips on hover + a soft light sweep every few seconds */
  .nav-students{ position:relative; overflow:hidden; isolation:isolate; }
  .nav-students::before{
    content:''; width:13px; height:13px; flex-shrink:0; background:currentColor;
    -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3 1 8.5l11 5.5 9-4.5V16h2V8.5L12 3Z'/%3E%3Cpath d='M5 12.6V16c0 1.9 3.1 3.5 7 3.5s7-1.6 7-3.5v-3.4l-7 3.5-7-3.5Z'/%3E%3C/svg%3E") center/contain no-repeat; mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3 1 8.5l11 5.5 9-4.5V16h2V8.5L12 3Z'/%3E%3Cpath d='M5 12.6V16c0 1.9 3.1 3.5 7 3.5s7-1.6 7-3.5v-3.4l-7 3.5-7-3.5Z'/%3E%3C/svg%3E") center/contain no-repeat;
    transform-origin:50% 75%;
  }
  .nav-students::after{
    content:''; position:absolute; inset:0; z-index:-1; pointer-events:none;
    background:linear-gradient(105deg, transparent 40%, rgba(255,255,255,.6) 49%, rgba(255,255,255,.15) 54%, transparent 62%) no-repeat;
    background-size:300% 100%; background-position:100% 0; animation:nsSheen 8s ease-in-out 2.6s infinite;
  }
  @keyframes nsSheen{ 0%{ background-position:100% 0; } 16%{ background-position:0% 0; } 16.1%, 100%{ background-position:100% 0; } }
  .nav-students:hover::before, .nav-students:focus-visible::before{ animation:nsCap .7s cubic-bezier(.3,1.6,.5,1); }
  @keyframes nsCap{ 0%{ transform:none; } 35%{ transform:translateY(-3px) rotate(-16deg); } 70%{ transform:translateY(0) rotate(6deg); } 100%{ transform:none; } }
  .nav-students:hover::after{ animation-duration:1.4s; animation-delay:0s; }
  /* the same cap on the "Student Hub" item in the phone menu */
  .navlinks .nav-mobile-only::before{
    content:''; display:inline-block; width:15px; height:15px; margin-right:9px; vertical-align:-2px; background:currentColor;
    -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3 1 8.5l11 5.5 9-4.5V16h2V8.5L12 3Z'/%3E%3Cpath d='M5 12.6V16c0 1.9 3.1 3.5 7 3.5s7-1.6 7-3.5v-3.4l-7 3.5-7-3.5Z'/%3E%3C/svg%3E") center/contain no-repeat; mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3 1 8.5l11 5.5 9-4.5V16h2V8.5L12 3Z'/%3E%3Cpath d='M5 12.6V16c0 1.9 3.1 3.5 7 3.5s7-1.6 7-3.5v-3.4l-7 3.5-7-3.5Z'/%3E%3C/svg%3E") center/contain no-repeat;
  }
  @media (prefers-reduced-motion: reduce){ .nav-students::after, .nav-students:hover::before, .nav-students:focus-visible::before{ animation:none; } .nav-students::after{ display:none; } }
  /* /hub-btn css */


  /* Study Battle in the section dock: each sword swings back from its grip and strikes the other, twice, with a spark */
  .hub-dock a.hd-battle{ --ac:var(--c-battle); --ac-rgb:var(--c-battle-rgb); }
  .dk-spark{ opacity:0; transform-box:fill-box; transform-origin:center; }
  .dk-swa{ transform-origin:15.6px 15.6px; } .dk-swb{ transform-origin:8.4px 15.6px; }
  .hub-dock a:hover .dk-swa, .hub-dock a:focus-visible .dk-swa, .hub-dock a[aria-current="page"] .dk-swa, .ws-sp:hover .dk-swa, .ws-sp:focus-visible .dk-swa{ animation:dkSwA .7s ease-in-out 2 both; }
  .hub-dock a:hover .dk-swb, .hub-dock a:focus-visible .dk-swb, .hub-dock a[aria-current="page"] .dk-swb, .ws-sp:hover .dk-swb, .ws-sp:focus-visible .dk-swb{ animation:dkSwB .7s ease-in-out 2 both; }
  .hub-dock a:hover .dk-spark, .hub-dock a:focus-visible .dk-spark, .hub-dock a[aria-current="page"] .dk-spark, .ws-sp:hover .dk-spark, .ws-sp:focus-visible .dk-spark{ animation:dkSpark .7s ease-out 2 both; }
  .hub-dock a[aria-current="page"] .dk-swa, .hub-dock a[aria-current="page"] .dk-swb, .hub-dock a[aria-current="page"] .dk-spark{ animation-delay:.45s; }
  @keyframes dkSwA{ 0%,100%{ transform:none; } 38%{ transform:rotate(-20deg); } 62%{ transform:rotate(6deg); } 80%{ transform:rotate(-2deg); } }
  @keyframes dkSwB{ 0%,100%{ transform:none; } 38%{ transform:rotate(20deg); } 62%{ transform:rotate(-6deg); } 80%{ transform:rotate(2deg); } }
  @keyframes dkSpark{ 0%,55%{ opacity:0; transform:scale(.3); } 64%{ opacity:1; transform:scale(1.4); } 100%{ opacity:0; transform:scale(1.8); } }
  @media (prefers-reduced-motion:reduce){ .dk-swa, .dk-swb, .dk-spark{ animation:none !important; } }
  /* eight sections: middle-length labels on wide screens, short ones below 1300px, a tighter bar on tablets */
  .hd-l .lf{ display:none; }
  .hd-l .lm{ display:inline; }
  @media (max-width:1299px){ .hd-l .lm{ display:none; } .hd-l .ls{ display:inline; } }
  @media (min-width:721px) and (max-width:1299px){ .hub-dock a{ padding-right:13px; } }
  @media (min-width:721px) and (max-width:1059px){ .hub-dock{ gap:0; padding:5px; } .hub-dock a{ gap:5px; padding:5px 7px 5px 4px; font-size:0.84rem; }
    .hd-ic{ width:28px; height:28px; } .hd-ic svg{ width:18px; height:18px; } .hd-sep{ margin:7px 2px; } }
