    /* ============================ FOOTER ============================ */
    /* `body > footer`, never a bare `footer{}` — the site footer is a direct
       child of body, and an unscoped rule reaches inside every full-screen exam
       that ends in a <footer> of its own. It was putting 90px of dead margin
       above the writing arena's part rail and the listening exam's mobile foot,
       both of which sit in a 100dvh flex column where that margin is a hole.
       Same lesson as the site header — see `body > header` in 01-header.css. */
    body > footer{ margin-top:90px; border-top:1px solid var(--glass-line); padding:34px 0; }
    .foot{ display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:16px; color:var(--muted); font-size:14px; }

    /* ============================ MODAL (login / premium popup) ============================ */
    /* The frosted scrim, restored. It was removed while hunting the login freeze,
       on the theory that a full-viewport backdrop-filter was being recomputed
       every frame. It was not the culprit: the freeze was an infinite
       MutationObserver loop kicked off by memRender() (see 28-membership.js),
       which wedged the tab about a minute after ANY page load, modal or no
       modal.

       It is also cheap now, and measurably so: with the modal up, the two rules
       below park the aurora and the orbs, and 30-band-ascent.js parks its canvas,
       so nothing behind the glass moves. A static backdrop composites once
       instead of per frame. Measured with the modal open for 60s: no long tasks,
       worst main-thread timer lag 3ms.

       If anything animated behind an open modal were ever reintroduced, this
       would start costing a full-viewport blur per frame again — so keep the
       parking rules below in step with it. */
    .overlay{ position:fixed; inset:0; background:var(--overlay); backdrop-filter:blur(6px); display:none; place-items:center; z-index:100; }
    /* Belt and braces: the page behind an open modal is dimmed and unreachable,
       so there is no reason to keep painting it. */
    body:has(.overlay.open) .aurora span,
    body:has(.overlay.open) .orb{ animation-play-state:paused; }
    .overlay.open{ display:grid; }
    .modal{
      background:var(--bg-soft); border:1px solid var(--glass-line); border-radius:22px;
      padding:34px; width:min(420px,92vw); position:relative; animation:rise .35s forwards;
    }
    .modal h3{ font-family:'Bricolage Grotesque', 'Native Emoji', sans-serif; font-size:24px; margin-bottom:8px; }
    .modal p{ color:var(--muted); margin-bottom:20px; font-size:15px; }
    .modal input{
      width:100%; padding:13px; border-radius:11px; margin-bottom:12px;
      background:rgba(0,0,0,.35); border:1px solid var(--glass-line); color:var(--text); font-size:15px; outline:none;
    }
    .modal input:focus{ border-color:var(--lime); }
    .modal .close{ position:absolute; top:16px; right:18px; background:none; border:none; color:var(--muted); font-size:22px; cursor:pointer; }
    .modal .full{ width:100%; }

    /* ============================ WRITING TOPICS ============================ */
    .topic-tabs{ display:flex; gap:8px; justify-content:center; margin-top:30px; }
    .ttab{
      font-family:'Hanken Grotesk', 'Native Emoji', sans-serif; font-weight:600; font-size:14px;
      padding:8px 18px; border-radius:999px; cursor:pointer;
      background:var(--glass); border:1px solid var(--glass-line); color:var(--muted);
      transition:all .2s;
    }
    .ttab:hover{ color:var(--text); }
    .ttab.active{ background:var(--lime); color:#0a0b10; border-color:var(--lime); }
    .topic-list{ display:grid; grid-template-columns:1fr 1fr; gap:16px; margin-top:30px; perspective:1100px; }
    .topic{
      background:var(--glass); border:1px solid var(--glass-line); border-radius:16px;
      padding:22px; position:relative; overflow:hidden; cursor:pointer;
      transform-style:preserve-3d; will-change:transform;
      transition:opacity .6s ease, filter .6s ease, transform .3s cubic-bezier(.2,.7,.2,1),
                 border-color .3s ease, box-shadow .3s ease;
    }
    .topic > *{ position:relative; z-index:1; }
    .topic:hover{ border-color:rgba(198,242,78,.35); box-shadow:0 24px 54px -28px rgba(0,0,0,.85); }
    /* cursor spotlight */
    .topic::before{
      content:""; position:absolute; inset:0; border-radius:inherit; z-index:0; pointer-events:none;
      opacity:0; transition:opacity .35s ease;
      background:radial-gradient(220px circle at var(--mx,50%) var(--my,50%), rgba(78,224,242,.18), transparent 62%);
    }
    .topic:hover::before{ opacity:1; }
    /* rotating gradient border on hover */
    .topic::after{
      content:""; position:absolute; inset:0; border-radius:inherit; z-index:2; pointer-events:none;
      padding:1.5px; opacity:0; transition:opacity .4s ease;
      background:conic-gradient(from var(--ang,0deg), #4ee0f2, #8b6dff, #c6f24e, #4ee0f2);
      -webkit-mask:linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
      -webkit-mask-composite:xor; mask-composite:exclude;
    }
    .topic:hover::after{ opacity:1; animation:spinborder 3s linear infinite; }
    /* 3D fly-up entrance. Base state VISIBLE — `.in` only plays the entrance, so
       a missed reveal can never leave these topics stranded invisible. */
    .topic-list .topic[data-reveal]{ opacity:1; filter:none; transform:none; transform-origin:center bottom; }
    .topic-list .topic[data-reveal].in{ animation:topicFlyUp .7s cubic-bezier(.2,.7,.2,1) both; }
    @keyframes topicFlyUp{
      from{ opacity:0; filter:blur(6px); transform:perspective(1100px) rotateX(-12deg) translateY(42px); }
      to{ opacity:1; filter:blur(0); transform:perspective(1100px) rotateX(0) translateY(0); }
    }
    .topic .head{ display:flex; align-items:center; gap:10px; margin-bottom:10px; }
    .topic .ttype{
      font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.5px;
      padding:4px 10px; border-radius:7px;
    }
    .ttype.t1{ background:var(--cyan); color:#0a0b10; }
    .ttype.t2{ background:var(--violet); color:#fff; }
    .topic .cat{ font-size:12px; color:var(--muted); font-weight:600; }
    .topic .date{ font-size:11px; color:var(--muted); margin-left:auto; }
    .topic .q{ font-size:15.5px; line-height:1.5; }
    .topic .try{
      margin-top:14px; font-size:13px; font-weight:700; color:var(--lime);
      background:none; border:none; cursor:pointer; padding:0;
    }
    .topic-empty{ grid-column:1/-1; text-align:center; color:var(--muted); padding:40px; }

