/* Menu button + mega menu (assets/js/megamenu.js) for the widths where the top bar hides its links (<= 1420 px).
   Uses the page's own tokens (--ice, --amber, --line, --grot, --mono ...), so it fits E and F2 alike. */
.mm-btn { display: none; }
@media (max-width: 1420px) {
  .mm-btn { display: inline-flex; align-items: center; gap: 10px; flex: none; align-self: center; height: 36px; margin: 0 0 0 14px; padding: 0 14px 0 12px;
    appearance: none; border: 1px solid var(--line-2); background: rgba(169,220,255,.04); color: var(--text); cursor: pointer;
    font: 700 12px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; transition: border-color .2s, background .2s, color .2s; }
  .mm-btn:hover { border-color: var(--ice); background: rgba(169,220,255,.1); }
  .mm-btn:focus-visible { outline: 2px solid var(--ice); outline-offset: 2px; }
  .mm-btn[aria-expanded="true"] { border-color: var(--amber); color: var(--amber-hi); background: rgba(232,150,0,.1); }
}
.mm-ico { position: relative; width: 18px; height: 12px; }
.mm-ico i { position: absolute; left: 0; height: 2px; background: currentColor; transition: transform .3s cubic-bezier(.65,0,.2,1), opacity .2s, width .3s; }
.mm-ico i:nth-child(1) { top: 0; width: 18px; } .mm-ico i:nth-child(2) { top: 5px; width: 12px; background: var(--amber); } .mm-ico i:nth-child(3) { top: 10px; width: 18px; }
.mm-btn:hover .mm-ico i:nth-child(2) { width: 18px; }
.mm-btn[aria-expanded="true"] .mm-ico i:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.mm-btn[aria-expanded="true"] .mm-ico i:nth-child(2) { opacity: 0; }
.mm-btn[aria-expanded="true"] .mm-ico i:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* the panel drops from under the bar; the shade dims the page behind it */
.mm-open, .mm-open body { overflow: hidden; }
.mm-shade { position: fixed; inset: 54px 0 0 0; z-index: 28; background: rgba(2,4,9,.6); backdrop-filter: blur(3px); opacity: 0; transition: opacity .3s; }
.mm-shade.on { opacity: 1; }
.mm-panel { position: fixed; top: 54px; left: 0; right: var(--rail, 0px); z-index: 29; max-height: calc(100vh - 54px); max-height: calc(100dvh - 54px); overflow: auto; overscroll-behavior: contain;
  background: linear-gradient(180deg, rgba(6,11,22,.98), rgba(3,5,10,.98)); border-bottom: 1px solid var(--line-2); box-shadow: 0 30px 60px rgba(0,0,0,.55);
  clip-path: inset(0 0 100% 0); transition: clip-path .38s cubic-bezier(.65,0,.2,1); }
.mm-panel.on { clip-path: inset(0 0 -60px 0); }
.mm-in { display: grid; grid-template-columns: minmax(0, 1fr) 320px; }
.mm-k { margin: 0; padding: 16px 20px 12px; font: 700 12px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); }
.mm-links { border-right: 1px solid var(--line); }
.mm-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }

.mm-i { position: relative; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; row-gap: 5px; align-items: baseline;
  padding: 16px 40px 16px 20px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none;
  opacity: 0; transform: translateY(-6px); transition: background .2s, opacity .3s, transform .3s; transition-delay: 0s, calc(var(--i) * 22ms + 80ms), calc(var(--i) * 22ms + 80ms); }
.mm-panel.on .mm-i { opacity: 1; transform: none; }
.mm-grid .mm-i:nth-child(3n) { border-right: 0; }
.mm-i .mm-n { grid-row: 1 / span 2; font: 500 12px/1 var(--mono); color: var(--amber); padding-top: 3px; }
.mm-i b { font: 800 21px/1.05 var(--grot); letter-spacing: .06em; text-transform: uppercase; }
.mm-i small { grid-column: 2; font: 500 12px/1.4 var(--body, var(--grot)); color: var(--muted); letter-spacing: .01em; }
.mm-i .mm-go { position: absolute; right: 18px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-top: 2px solid; border-right: 2px solid; transform: rotate(45deg); color: var(--muted); transition: translate .25s, color .2s; }
.mm-i:hover, .mm-i:focus-visible { background: linear-gradient(90deg, rgba(169,220,255,.08), transparent 80%); outline: none; }
.mm-i:hover .mm-go, .mm-i:focus-visible .mm-go { translate: 5px 0; color: var(--ice); }
.mm-i:focus-visible { box-shadow: inset 0 0 0 2px var(--ice); }
.mm-i[aria-current] { background: linear-gradient(90deg, rgba(232,150,0,.12), transparent 75%); box-shadow: inset 3px 0 0 var(--amber); }
.mm-i[aria-current] .mm-go { color: var(--amber); }
.mm-i[aria-current]::after { content: "●"; position: absolute; right: 40px; top: 17px; font-size: 8px; color: var(--amber); }
/* the grid holds the page's sections only (the forum and the call for help are in the Community column); its rows
   stretch to the column's height, so the two sides end together */
.mm-links { display: flex; flex-direction: column; }
.mm-grid { flex: 1; grid-auto-rows: 1fr; }
.mm-i { align-content: center; }
.mm-f svg { width: 21px; height: 16px; overflow: visible; grid-row: 1 / span 2; align-self: start; margin-top: 2px; }
.mm-panel svg .bk { fill: none; stroke: var(--ice); stroke-width: 1.4; opacity: .6; } .mm-panel svg .fr { fill: var(--ice); }
.mm-panel svg .d { fill: #0a1630; transform-box: fill-box; transform-origin: center; animation: fType 1.5s ease-in-out infinite; }
.mm-panel svg .d2 { animation-delay: .18s; } .mm-panel svg .d3 { animation-delay: .36s; }

.mm-side { display: flex; flex-direction: column; }
.mm-f { position: relative; display: grid; gap: 8px; padding: 20px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--text); transition: filter .2s; }
.mm-f b { font: 900 26px/1 var(--grot); letter-spacing: .06em; text-transform: uppercase; }
.mm-f span { font: 500 13px/1.5 var(--body, var(--grot)); color: #b6c3d8; }
.mm-f em { font: 700 12px/1 var(--mono); font-style: normal; letter-spacing: .1em; text-transform: uppercase; }
.mm-f.mm-forum { background: radial-gradient(120% 120% at 0% 0%, rgba(63,127,255,.4), transparent 60%), linear-gradient(180deg, #102a58, #0a1630); box-shadow: inset 0 0 0 1px rgba(169,220,255,.35); }
.mm-f.mm-forum svg { width: 30px; height: 23px; margin: 0 0 2px; }
.mm-f.mm-forum em { color: var(--ice); }
.mm-f.mm-forum.mm-here em::before { content: "● "; }
/* [10] We need you: the call for help keeps its amber and its ping */
.mm-f.mm-call { gap: 6px; align-content: start; padding-right: 48px; background: linear-gradient(90deg, rgba(232,150,0,.16), rgba(232,150,0,.03) 80%); }
.mm-f.mm-call .mm-cn { display: flex; align-items: center; gap: 8px; font: 500 12px/1 var(--mono); color: var(--amber); }
.mm-f.mm-call .mm-cn::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--amber); animation: callPing 1.6s infinite; }
.mm-f.mm-call b { font-size: 22px; color: var(--amber-hi); }
.mm-f.mm-call span { color: var(--muted); }
.mm-f.mm-call em { position: absolute; right: 20px; top: 50%; margin-top: -14px; font: 800 28px/1 var(--grot); color: var(--amber); transition: translate .25s; }
.mm-f.mm-call:hover em, .mm-f.mm-call:focus-visible em { translate: 4px 0; }
.mm-f.mm-call[aria-current] { box-shadow: inset 3px 0 0 var(--amber); }
/* the sign-up page (2026-12-02): outlined ice, as E's SIGN UP in the bar */
.mm-f.mm-su { gap: 6px; padding-right: 48px; background: linear-gradient(90deg, rgba(169,220,255,.12), rgba(169,220,255,.02) 80%); box-shadow: inset 0 0 0 1px rgba(169,220,255,.3); }
.mm-f.mm-su b { font-size: 22px; color: var(--ice); }
.mm-f.mm-su span { color: var(--muted); }
.mm-f.mm-su em { position: absolute; right: 20px; top: 50%; margin-top: -14px; font: 800 28px/1 var(--grot); color: var(--ice); transition: translate .25s; }
.mm-f.mm-su:hover em, .mm-f.mm-su:focus-visible em { translate: 4px 0; }
.mm-f.mm-dl { background: var(--amber); color: #120900; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%); }
.mm-f.mm-dl span { color: #3a2400; }
.mm-f.mm-dl em { position: absolute; right: 20px; top: 18px; font: 800 26px/1 var(--grot); }
.mm-f:hover { filter: brightness(1.12); }
.mm-f:focus-visible { outline: 2px solid var(--ice); outline-offset: -4px; }

@media (max-width: 1100px) {
  .mm-in { grid-template-columns: 1fr; }
  .mm-links { border-right: 0; }
  .mm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mm-grid .mm-i:nth-child(3n) { border-right: 1px solid var(--line); } .mm-grid .mm-i:nth-child(2n) { border-right: 0; }
  .mm-grid .mm-i:last-child:nth-child(odd) { grid-column: span 2; border-right: 0; }   /* nine sections: no empty cell */
  .mm-side { flex-direction: row; } .mm-f { flex: 1; } .mm-side > .mm-k { display: none; }
}
/* phones and small tablets (<= 860 px): no button in the bar; a dock at the bottom of the screen, in thumb reach,
   slides the menu up as a sheet */
.mm-dock, .mm-sheet-h { display: none; }
@media (max-width: 860px) {
  .mm-btn { display: none; }
  body { padding-bottom: 80px; }                            /* the page's end stays clear of the dock */
  .mm-dock { position: fixed; z-index: 31; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); translate: -50% 0;
    display: flex; align-items: center; gap: 12px; height: 50px; max-width: calc(100vw - 28px); padding: 0 18px 0 16px; cursor: pointer;
    appearance: none; border: 0; color: var(--text); isolation: isolate; backdrop-filter: blur(10px);
    background: linear-gradient(120deg, var(--ice), #3f7fff 55%, var(--amber));   /* the border colours; the fill sits 1 px inside */
    font: 700 12.5px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase;
    clip-path: polygon(11px 0, 100% 0, 100% calc(100% - 11px), calc(100% - 11px) 100%, 0 100%, 0 11px);
    transition: transform .4s cubic-bezier(.2,.8,.2,1), opacity .3s; }
  .mm-dock::before { content: ""; position: absolute; inset: 1px; z-index: -1; pointer-events: none; background: linear-gradient(180deg, rgba(16,30,58,.97), rgba(6,11,22,.97));
    clip-path: polygon(10.6px 0, 100% 0, 100% calc(100% - 10.6px), calc(100% - 10.6px) 100%, 0 100%, 0 10.6px); }
  .mm-dock .mm-ico { flex: none; }
  .mm-dock .mm-where { display: flex; align-items: baseline; gap: 7px; min-width: 0; padding-left: 12px; border-left: 1px solid var(--line-2);
    font: 500 12px/1 var(--mono); letter-spacing: .04em; text-transform: none; color: var(--ice); }
  .mm-dock .mm-where b { color: var(--amber); font-weight: 700; }
  .mm-dock .mm-where span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 44vw; }
  .mm-dock:focus-visible { outline: 2px solid var(--ice); outline-offset: 3px; }
  .mm-dock.tuck { transform: translateY(calc(100% + 34px)); opacity: 0; }
  .mm-dock[aria-expanded="true"] { transform: translateY(calc(100% + 34px)); opacity: 0; pointer-events: none; }

  /* the sheet */
  .mm-shade { inset: 0; z-index: 32; }
  .mm-panel { top: auto; bottom: 0; left: 0; right: 0; z-index: 33; max-height: 86vh; max-height: 86dvh; padding-bottom: env(safe-area-inset-bottom, 0px);
    clip-path: polygon(14px 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%, 0 14px); border-bottom: 0;
    transform: translateY(calc(100% + 24px)); transition: transform .42s cubic-bezier(.2,.8,.2,1); box-shadow: none; }
  .mm-panel.on { clip-path: polygon(14px 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%, 0 14px); transform: none; }
  .mm-panel.drag { transition: none; }
  .mm-sheet-h { display: flex; position: sticky; top: 0; z-index: 2; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 16px 12px 20px;
    background: linear-gradient(180deg, #0b1630, rgba(6,11,22,.98)); border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line); touch-action: none; }
  .mm-grip { position: absolute; left: 50%; top: 8px; width: 46px; height: 4px; margin-left: -23px; border-radius: 2px; background: rgba(169,220,255,.4); }
  .mm-sh-t { font: 700 12px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
  .mm-x { appearance: none; display: inline-flex; align-items: center; gap: 9px; height: 34px; padding: 0 12px; cursor: pointer; border: 1px solid var(--line-2); background: rgba(169,220,255,.06);
    color: var(--text); font: 700 12px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
  .mm-x i { position: relative; width: 12px; height: 12px; }
  .mm-x i::before, .mm-x i::after { content: ""; position: absolute; left: 0; top: 5px; width: 12px; height: 2px; background: currentColor; transform: rotate(45deg); }
  .mm-x i::after { transform: rotate(-45deg); }
  .mm-x:focus-visible { outline: 2px solid var(--ice); outline-offset: 2px; }
  .mm-links > .mm-k { display: none; }
  .mm-i { transform: translateY(12px); }
}
@media (max-width: 600px) {
  .mm-grid { grid-template-columns: 1fr; } .mm-grid .mm-i { border-right: 0 !important; padding: 13px 40px 13px 18px; } .mm-grid .mm-i:last-child:nth-child(odd) { grid-column: auto; }
  .mm-i b { font-size: 19px; }
  .mm-side { flex-direction: column; }
  .mm-f { padding: 16px 18px; } .mm-f b { font-size: 22px; }
}
@media (max-width: 380px) {
  .topbar .brand { padding: 0 8px 0 10px; } .topbar .brand img { height: 26px; }
  .topbar .play { padding: 0 11px; gap: 7px; font-size: 13px; letter-spacing: .08em; } .topbar .play span[aria-hidden] { display: none; }
  .mm-dock .mm-where span { max-width: 36vw; }
}
