/* The table of contents' look. (AI;Wrote)
   The old theme drew it as dark glass (rgba(8, 8, 16, .55) with a white edge), made for the old dark theme; on the new
   site it would be a dark slab on a light page. It's now drawn as the site draws a card (Stryv4UI §3: raised, 18 px
   corners, the raised shadow, no border), in the site's colours (W30), with Slate after each comma for a page without
   Core or the theme (W14). The links are in the accent word (Stryv4UI §2.5), 4.5 : 1 or more in every accent, light and
   dark; the sub-entries are in ink 2 instead of the old 82% fade, which would have dropped them under 4.5 : 1. */

/* ===== THE TABLE OF CONTENTS ===== */
/* CodeNumber 1.1 — the box */
.aex-toc{
  --aex-card:var(--card,#eff4fa); --aex-sh-d:var(--sh-d,#c3cfe0); --aex-sh-l:var(--sh-l,#ffffff);
  --aex-ink:var(--ink,#0e1a2e); --aex-ink-2:var(--ink-2,#42557a); --aex-word:var(--accent-word,#58697e);
  margin:0 0 40px;padding:18px 24px;border-radius:18px;background:var(--aex-card);color:var(--aex-ink);
  box-shadow:9px 9px 20px var(--aex-sh-d),-9px -9px 20px var(--aex-sh-l)}
@media (prefers-color-scheme: dark){
  :root:not([data-s4c]) .aex-toc{
    --aex-card:var(--card,#2a2f39); --aex-sh-d:var(--sh-d,#181b21); --aex-sh-l:var(--sh-l,#343b47);
    --aex-ink:var(--ink,#eff3f9); --aex-ink-2:var(--ink-2,#a7b3c3); --aex-word:var(--accent-word,#a8b6c8)}
}

/* CodeNumber 1.2 — the "Contents" line that opens and closes it: the theme's section-title type */
.aex-toc__summary{cursor:pointer;list-style:none;font-size:14px;font-weight:800;letter-spacing:.1em;text-transform:uppercase;color:var(--aex-ink)}
.aex-toc__summary::-webkit-details-marker{display:none}
.aex-toc__summary::after{content:" \25BE";color:var(--aex-ink-2)}
.aex-toc[open] .aex-toc__summary::after{content:" \25B4"}
.aex-toc__summary:focus-visible{outline:2px solid var(--focus,var(--aex-word));outline-offset:4px;border-radius:6px}

/* CodeNumber 1.3 — the list */
.aex-toc__nav{margin-top:14px}
.aex-toc__list{list-style:none;margin:0;padding:0;line-height:1.5}
.aex-toc__list li{margin:5px 0}
.aex-toc__sub{padding-left:20px;font-size:.92em}
.aex-toc__sub a{color:var(--aex-ink-2)}
.aex-toc a{color:var(--aex-word);text-decoration:none;border-bottom:1px solid transparent;transition:border-color var(--ui,420ms) var(--ez,cubic-bezier(.16,1,.3,1))}
.aex-toc a:hover{border-bottom-color:currentColor}

/* CodeNumber 1.4 — a jump from the list glides, unless the reader's device asks for less motion (rule 4). The space kept
   above the heading it lands on is the theme's, which follows the header. */
@media (prefers-reduced-motion: no-preference){
  html:has(.aex-toc){scroll-behavior:smooth}
}
