/* ---------- Case-study side index (Figma 4830:8883) ----------
   "Back" with a return arrow and a "Contents" heading in the small mono, then the sections in 15px type, as in the main nav: the one
   you're reading sits on a lime bar that slides from section to section as you scroll (toc-2026.js), a fainter
   lime on hover. Desktop only; phones keep the slim bar across the top. Loaded last on IBM, Notion,
   Apartments.com and DiversaTech. */
.toc-head { display: none; }
.cs-back, .dt-back { gap: 8px; }
.cs-back svg, .dt-back svg { display: block; flex: none; width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; } /* the return arrow, at every width */

@media (min-width: 901px) {
  /* The same width as the main nav (home-2026.css), so the lime bar is one size on every page */
  .cs26 .cs-sidebar, .dt-side { gap: 24px; width: 180px; min-width: 180px; }
  .cs26 .cs-back, .dt-back { display: flex; align-items: center; gap: 8px; font: 300 12px/normal var(--font-mono); text-transform: uppercase; color: #000; }
  .cs26 .cs-back:hover, .dt-back:hover { color: #000; text-decoration: underline; text-underline-offset: 3px; }

  .cs26 .cs-toc, .dt-toc { position: relative; gap: 4px; }
  .toc-head { display: block; margin: 0 0 4px; font: 300 12px/normal var(--font-mono); text-transform: uppercase; color: #2a2a2a; white-space: nowrap; }
  .cs26 .cs-toc a, .dt-toc a { position: relative; z-index: 1; display: flex; padding: 5px 8px; border-radius: 2px; font: 400 15px/normal var(--font-body); text-transform: none; color: #000; white-space: nowrap; transition: background-color .2s ease; }
  .cs26 .cs-toc a::before, .dt-toc a::before { display: none; }
  /* Compact entries, 8px in from the bar's edge (beats the older padding rules for the active/hovered link) */
  body.cs26 .cs-toc a, body.cs26 .cs-toc a:hover, body.cs26 .cs-toc a.is-active,
  body .dt-toc a, body .dt-toc a:hover, body .dt-toc a.is-active { padding: 0 8px; min-height: 17px; align-items: center; } /* 17px, the main nav's row */
  body.cs26 .cs-toc .cs-phase-items a, body.cs26 .cs-toc .cs-phase-items a:hover, body.cs26 .cs-toc .cs-phase-items a.is-active { padding-left: 28px; }
  /* Only the section you're on is full black; the rest sit a little lighter, and hover brings them forward */
  body.cs26 .cs-toc a, body .dt-toc a, body.cs26 .cs-phase.is-open > .cs-phase-link { color: rgb(0 0 0 / .55); transition: color .2s ease, background-color .2s ease; }
  body.cs26 .cs-toc a:hover, body.cs26 .cs-toc a.is-active, body .dt-toc a:hover, body .dt-toc a.is-active { color: #000; }
  .cs26 .cs-toc a:hover, .dt-toc a:hover, .cs26 .cs-toc a.is-active, .dt-toc a.is-active { color: #000; }
  .cs26 .cs-phase.is-open > .cs-phase-link { color: #000; }
  .cs26 .cs-phase-items a { font-size: 15px; }
  .cs26 .cs-phase-items > div { gap: 4px; padding-left: 0; }
  .cs26 .cs-phase-items > div > a:first-child { margin-top: 4px; }
  .cs26 .cs-phase-items > div > a:last-child { margin-bottom: 0; }

  /* Sub-sections always listed under their group, joined by a thin tree line: ├ for each, └ for the last */
  .cs26 .cs-phase .cs-phase-items { grid-template-rows: 1fr; transition: none; }
  .cs26 .cs-phase:not(.is-open) .cs-phase-items > div { visibility: visible; transition: none; }
  .cs26 .cs-toc .cs-phase-items a::before, .cs26 .cs-toc .cs-phase-items a::after {
    content: ""; display: block; position: absolute; left: 14px; width: 0; height: auto; margin: 0; opacity: 1; background: none; pointer-events: none;
  }
  .cs26 .cs-toc .cs-phase-items a::before { top: -4px; bottom: 0; border-left: 1px solid #c4c4c4; } /* the stem, bridging the 4px gap above */
  .cs26 .cs-toc .cs-phase-items a:last-child::before { bottom: 50%; } /* └ stops at the last branch */
  .cs26 .cs-toc .cs-phase-items a::after { top: 50%; width: 7px; border-top: 1px solid #c4c4c4; } /* the branch */

  /* The section you're on: lime; others light up faintly on hover */
  .cs26 .cs-toc a.is-active, .dt-toc a.is-active { background: #e4f946; }
  .cs26 .cs-toc a:not(.is-active):hover, .dt-toc a:not(.is-active):hover { background: rgb(228 249 70 / .4); }
  .has-hl a.is-active { background: none !important; }
  .toc-hl { position: absolute; left: 0; top: 0; z-index: 0; width: 100%; height: 0; border-radius: 2px; background: #e4f946; pointer-events: none; }
  .toc-hl.is-ready { transition: translate .3s cubic-bezier(.22, 1, .36, 1), height .3s cubic-bezier(.22, 1, .36, 1), opacity .2s ease; }
}
@media (max-width: 900px) { .toc-hl { display: none; } }
@media (prefers-reduced-motion: reduce) { .toc-hl.is-ready { transition: none; } }

/* Every picture, recording and media frame in a case study has the same 4px corners */
.cs-main img, .cs-main video, .dt-main img, .dt-main video,
.cs-main .cs-media, .cs-main .cs-panel, .cs-main .cs-hero, .cs-main .h26-shot, .dt-main .cs-par { border-radius: 2px; }
.cs-main .cs-media, .cs-main .cs-hero, .cs-main .h26-shot, .dt-main .cs-par { overflow: hidden; }
