/* The Guide: one annotated copy. Entries separate by whitespace, and on wide
   screens a pencil path runs down the margin from the corner mark, through each
   entry's label. Slides compose their own stage, so this stays out of presentation. */
.cm-guide .pmx-document { max-width: var(--cm-page-width); }
.cm-guide .pmx-document > [data-pmx-block] { border-block-end: 0; }

/* The Guide links nearly every concept, so its underlines are drawn fainter, and a
   bolded term (already marked by weight) carries none. */
.cm-guide { --cm-mark-underline: var(--cm-mark-underline-faint); }
.cm-guide :is(strong > a, a:has(> strong)) { background: none; }

@container reading (min-width: 62rem) {
  html:not([data-pmx-play-mode="presentation"]) .cm-guide .pmx-document { position: relative; }
  html:not([data-pmx-play-mode="presentation"]) .cm-guide .pmx-document::before {
    content: "";
    position: absolute;
    inset: calc(-1 * var(--cm-space-5)) auto 0 calc(var(--cm-path-x) - 6px);
    width: 12px;
    background: var(--cm-mark-color);
    mask: var(--cm-mark-path) top / var(--cm-mark-path-size) repeat-y;
    opacity: var(--cm-mark-opacity);
    pointer-events: none;
  }
}

/* The authored dock places references over the plate column. Native positioning
   and reader resizing follow its bounds. The header inset is the only remaining
   panel override because PathMX currently anchors desktop panels to viewport top. */
@media (min-width: 75rem) {
  html:has(.cm-guide) { --cm-reference-top: 4.75rem; }
  html:has(.cm-guide)[data-pmx-source-references-open] .cm-reference-dock {
    display: block;
    position: absolute;
    right: var(--cm-page-start);
    --pmx-source-reference-width: var(--cm-text);
  }
  html:has(.cm-guide) .pmx-source-reference-panel {
    top: var(--cm-reference-top) !important;
    height: calc(100dvh - var(--cm-reference-top)) !important;
    --pmx-source-reference-available: calc(100dvh - var(--cm-reference-top)) !important;
  }
}
