/* css.slopped.site exhibit: A header that knows it’s stuck. From css/exhibits/stuck.mjs. */
.x-stuck .paper { height: 380px; overflow-y: auto; overscroll-behavior: contain; border: 1.5px solid var(--ink); border-radius: 12px; background: var(--paper); }
.x-stuck .paper:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.x-stuck .sec { padding: 0 0 20px; }
.x-stuck .sec ul { margin: 0; padding: 4px 22px 0 40px; }
.x-stuck .sec li { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 17px; }
.x-stuck .sec-head { margin: 0; font-size: 22px; letter-spacing: -.5px; }
.x-stuck .sec-name { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 22px; background: var(--paper); border-bottom: 1.5px solid var(--ink); transition: background-color .2s, box-shadow .2s, padding .2s; }
@media (prefers-reduced-motion: reduce) { .x-stuck .sec-name { transition: none; } }
/* key */
/* every heading sticks to the top of the box, and is a container whose stuck state CSS can ask about */
.x-stuck .sec-head {
  position: sticky; top: 0; z-index: 1;
  container-type: scroll-state;
}
/* while it is stuck: lift it off the page and say so */
@container scroll-state(stuck: top) {
  .x-stuck .sec-name { background: var(--ink); color: var(--paper); box-shadow: 0 10px 18px rgb(0 0 0 / .25); }
  .x-stuck .sec-name::after { content: "reading now"; margin-left: auto; padding: 2px 10px; border-radius: 999px; background: var(--acid); color: var(--on-acid); font: 700 12px/1.6 Arial, sans-serif; letter-spacing: 0; }
}
/* /key */
@media (forced-colors: active) { .x-stuck .sec-name { border: 1px solid CanvasText; } }

/* live support notes (built from css/exhibits.js) */
.sup-scroll-state .sup-no { display: none; }
@supports not (container-type: scroll-state) { .sup-scroll-state .sup-yes { display: none; } .sup-scroll-state .sup-no { display: inline; } .sup-scroll-state { --sup: var(--no); } }
