/* Section navigation for case studies (assets/toc.js builds the behaviour).
   Each page sets its own look with --toc-font, --toc-ink and --toc-accent on .toc. */
.toc{--toc-font:system-ui,sans-serif;--toc-ink:#2b2b2b;--toc-accent:#2b2b2b;
  position:fixed;z-index:40;font:500 13px/1.25 var(--toc-font);color:var(--toc-ink);
  opacity:0;visibility:hidden;transition:opacity .3s ease,visibility 0s linear .3s}
.toc.on{opacity:1;visibility:visible;transition:opacity .3s ease}
.toc ol{list-style:none;margin:0;padding:0}
.toc a{color:inherit;text-decoration:none}
.toc-btn,.toc-sheet{display:none}

/* Desktop: a quiet rail of ticks on the left edge. Hover or tab into it to see the names. */
@media (min-width:1024px){
  .toc{left:12px;top:50%;translate:0 -50%}
  .toc ol{position:relative;padding:12px 14px 12px 10px;border-radius:16px;transition:background-color .2s ease,box-shadow .2s ease}
  .toc li a{position:relative;display:flex;align-items:center;height:26px;padding:0 4px 0 36px}
  .toc li a::before{content:"";position:absolute;left:0;top:12px;width:14px;height:2px;border-radius:2px;background:currentColor;opacity:.45;
    box-shadow:0 0 0 2px rgba(255,255,255,.55);transition:width .2s ease,opacity .2s ease,background-color .2s ease}
  .toc li a span{opacity:0;translate:-6px 0;white-space:nowrap;pointer-events:none;transition:opacity .18s ease,translate .18s ease}
  .toc li a:hover::before{opacity:.6;width:18px}
  .toc li a[aria-current]::before{width:24px;opacity:1;background:var(--toc-accent)}
  .toc li a[aria-current] span{color:var(--toc-accent);font-weight:600}
  .toc:hover ol,.toc:focus-within ol{background:rgba(255,255,255,.84);backdrop-filter:blur(14px) saturate(1.4);-webkit-backdrop-filter:blur(14px) saturate(1.4);
    box-shadow:0 4px 24px rgba(0,0,0,.10),inset 0 0 0 1px rgba(255,255,255,.9)}
  .toc:hover li a span,.toc:focus-within li a span{opacity:1;translate:0 0;pointer-events:auto}
  .toc:hover li a::before,.toc:focus-within li a::before{box-shadow:none}
  .toc a:focus-visible{outline:2px solid var(--toc-accent);outline-offset:2px;border-radius:6px}
}

/* Phones and tablets: one small pill at the bottom that names where you are and opens the list. */
@media (max-width:1023.98px){
  .toc{left:50%;bottom:calc(14px + env(safe-area-inset-bottom));translate:-50% 0;width:max-content;max-width:calc(100vw - 32px)}
  .toc>ol:not(.toc-sheet){display:none}
  .toc-btn{display:flex;align-items:center;gap:8px;height:40px;max-width:calc(100vw - 32px);padding:0 14px 0 16px;border:0;border-radius:999px;cursor:pointer;
    background:rgba(255,255,255,.82);backdrop-filter:blur(14px) saturate(1.4);-webkit-backdrop-filter:blur(14px) saturate(1.4);
    box-shadow:0 2px 14px rgba(0,0,0,.14),inset 0 0 0 1px rgba(255,255,255,.9);font:inherit;color:inherit;-webkit-tap-highlight-color:transparent}
  .toc-btn b{font-weight:500;opacity:.55}
  .toc-btn em{font-style:normal;color:var(--toc-accent);font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .toc-btn svg{flex:none;width:12px;height:12px;transition:rotate .2s ease}
  .toc.open .toc-btn svg{rotate:180deg}
  .toc-sheet{display:block;position:absolute;left:50%;bottom:calc(100% + 8px);translate:-50% 8px;width:min(300px,calc(100vw - 32px));max-height:min(62vh,460px);overflow:auto;
    padding:8px;border-radius:18px;background:rgba(255,255,255,.94);backdrop-filter:blur(16px) saturate(1.4);-webkit-backdrop-filter:blur(16px) saturate(1.4);
    box-shadow:0 10px 40px rgba(0,0,0,.18),inset 0 0 0 1px rgba(255,255,255,.9);opacity:0;visibility:hidden;transition:opacity .2s ease,translate .2s ease,visibility 0s linear .2s}
  .toc.open .toc-sheet{opacity:1;visibility:visible;translate:-50% 0;transition:opacity .2s ease,translate .2s ease}
  .toc-sheet a{display:flex;gap:10px;align-items:baseline;padding:11px 12px;border-radius:12px;font-size:15px}
  .toc-sheet a i{font-style:normal;font-size:12px;opacity:.45;font-variant-numeric:tabular-nums}
  .toc-sheet a[aria-current]{background:color-mix(in srgb,var(--toc-accent) 12%,transparent);color:var(--toc-accent);font-weight:600}
  .toc-sheet a[aria-current] i{opacity:.8}
}
@media (prefers-reduced-motion:reduce){.toc,.toc *{transition:none!important}}
