/* Resources dropdown, shared by every page. Uses each page's own theme tokens, with
   fallbacks, so it follows light/dark without knowing which page it is on. */
.nav-dd { position: relative; display: inline-flex; }
.nav-dd-btn { display: inline-flex; align-items: center; gap: 5px; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.nav-dd-btn:hover, .nav-dd-btn[aria-expanded="true"] { color: var(--text, #fff); }
.nav-dd-btn:focus-visible, .nav-dd-panel a:focus-visible, .mm-dd summary:focus-visible { outline: 2px solid var(--accent, #7C3AED); outline-offset: 3px; border-radius: 6px; }
.nav-caret { font-size: .8em; transition: transform .15s ease; }
.nav-dd-btn[aria-expanded="true"] .nav-caret { transform: rotate(180deg); }
.nav-dd-panel {
  position: absolute; top: calc(100% + 12px); right: -8px; z-index: 40; min-width: 250px; padding: 14px 12px 10px;
  border: 1px solid var(--border-strong, rgba(255,255,255,.16)); border-radius: 16px;
  background: var(--card, #1A1833); color: var(--text, #ECEAFE); box-shadow: 0 24px 50px -16px rgba(0,0,0,.55);
  visibility: hidden; opacity: 0; transform: translateY(-4px); transition: opacity .12s ease, transform .12s ease, visibility .12s;
}
/* Open on click/tap (JS sets aria-expanded) and on hover or keyboard focus (works without JS). */
.nav-dd[data-open] .nav-dd-panel, .nav-dd:hover .nav-dd-panel, .nav-dd:focus-within .nav-dd-panel { visibility: visible; opacity: 1; transform: none; }
.nav-dd-head { margin: 0 6px 6px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.nav-dd-head a { color: var(--text-dim, #A39FCC); }
.nav-dd-panel ul { margin: 0; padding: 0; list-style: none; }
.nav-dd-panel li a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 10px; border-radius: 10px; color: var(--text, #ECEAFE); font-size: 14px; }
.nav-dd-panel li a:hover { background: var(--accent-soft, rgba(124,58,237,.18)); }
.nav-soon { display: inline-block; padding: 2px 7px; border: 1px solid var(--border-strong, rgba(255,255,255,.2)); border-radius: 999px; color: var(--text-dim, #A39FCC); font-size: 11px; font-weight: 600; letter-spacing: 0; text-transform: none; }
/* Mobile hamburger overlay on the homepage: nested expandable list. */
.mm-dd { width: 100%; }
.mm-dd summary { cursor: pointer; list-style: none; }
.mm-dd summary::-webkit-details-marker { display: none; }
.mm-dd summary::after { content: " ▾"; font-size: .8em; }
.mm-dd[open] summary::after { content: " ▴"; }
.mm-dd .mm-dd-head, .mm-dd .mm-dd-item { display: block; }
.mm-dd .mm-dd-head { margin-top: 6px; font-size: .78em; opacity: .75; letter-spacing: .05em; text-transform: uppercase; }
.mm-dd .mm-dd-item { padding-left: 14px; }
/* On the narrow Current Affairs nav the links sit on their own row: open the panel in flow. */
@media (max-width: 680px) {
  .nav-links .nav-dd { position: static; }
  .nav-links .nav-dd-panel { position: fixed; left: 16px; right: 16px; top: 112px; min-width: 0; }
}

/* Privacy policy and delete-account pages have no link row: put the menu inline with their back link. */
.nav-links-lite { display: inline-flex; align-items: center; margin: 0 14px; color: var(--text-dim, #A39FCC); font-size: 14px; }
/* Homepage "PYQs by subject" block. */
.pyq-home { padding-top: 48px; }
.pyq-home-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; margin: 22px 0 0; padding: 0; list-style: none; }
.pyq-home-grid a { display: grid; gap: 4px; padding: 14px 16px; border: 1px solid var(--border, rgba(255,255,255,.08)); border-radius: 16px; background: var(--glass-bg, rgba(255,255,255,.05)); color: var(--text, #ECEAFE); }
.pyq-home-grid a:hover { border-color: var(--accent, #7C3AED); }
.pyq-home-grid span { color: var(--text-dim, #A39FCC); font-size: 13px; }
.pyq-home-years { margin: 18px 0 0; color: var(--text-dim, #A39FCC); font-size: 14px; display: flex; flex-wrap: wrap; gap: 6px 12px; }
.pyq-home-years a { color: var(--text, #ECEAFE); text-decoration: underline; }

/* Homepage hamburger overlay: match the other big centred links, with the group nested under "Resources". */
.mm-links .mm-dd { width: auto; display: flex; flex-direction: column; align-items: center; }
.mm-links .mm-dd summary { font-family: 'Space Grotesk', sans-serif; font-size: 24px; font-weight: 600; color: var(--text-dim); text-align: center; }
.mm-links .mm-dd summary:hover { color: var(--text); }
.mm-links .mm-dd .mm-dd-head { margin: 14px 0 2px; font-family: 'Space Grotesk', sans-serif; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--text-mute, #6E6A95); }
.mm-links .mm-dd .mm-dd-item { padding: 6px 0; font-size: 19px; }
