.question-page [hidden] { display: none !important; }
body.question-page:has(#graph-view:not([hidden])) {
  display: flex; flex-direction: column; height: 100svh; min-height: 465px; padding-bottom: 84px;
}
.question-page #question-room:has(#graph-view:not([hidden])) { display: flex; flex: 1; min-height: 0; flex-direction: column; }
.question-page #question-status:empty { display: none; }
.question-page .page-head { position: relative; z-index: 2; }
#question-room { outline: none; }
#graph-view {
  display: grid;
  grid-template-columns: minmax(172px, 18%) minmax(0, 1fr);
  margin: 0 4vw 0;
  flex: 1; min-height: 0;
}
.graph-index { padding: clamp(20px, 4svh, 54px) 1.4vw 12px 0; min-height: 0; overflow: auto; }
.graph-index h1, .reader-top > span { font-size: clamp(22px, 1.75vw, 29px); line-height: 1.35; font-weight: 400; margin: 0; }
.graph-index h2 { font-size: 15px; font-weight: 550; margin: clamp(28px, 5svh, 72px) 0 18px; }
#topics details { margin: 0 0 12px; }
#topics summary { min-height: 25px; display: flex; align-items: baseline; gap: .65em; cursor: pointer; font-size: 13px; color: #555; list-style: none; }
#topics summary::-webkit-details-marker { display: none; }
#topics summary::before { content: ''; width: 5px; height: 5px; border-right: 1px solid; border-top: 1px solid; transform: translateY(-1px) rotate(45deg); }
#topics details[open] summary { color: #171717; font-weight: 600; }
#topics details[open] summary::before { transform: translateY(-2px) rotate(135deg); }
#topics ul { list-style: none; padding: 0 0 0 16px; margin: 7px 0 16px; }
#topics li a { display: block; font-size: 12px; line-height: 1.6; padding: 5px 0; }
#topics summary:focus-visible, #question-map a:focus-visible { outline: 1px solid #555; outline-offset: 2px; }
#index-toggle { display: none; }
#graph-plot { position: relative; min-width: 0; min-height: 0; }
#question-map { touch-action: none; display: block; width: 100%; height: 100%; overflow: visible; }
.graph-edge { fill: none; stroke: #aaa; stroke-opacity: .58; stroke-width: .8; vector-effect: non-scaling-stroke; pointer-events: none; }
.graph-edge.active { stroke: #8267ad; stroke-width: 1.2; stroke-opacity: .90; }
.graph-edge.dim { stroke-opacity: .11; }
.node-ink { fill: #181818; pointer-events: none; }
.map-node { cursor: grab; touch-action: none; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
#question-map.dragging, #question-map.dragging .map-node { cursor: grabbing; }
.map-node.dim .node-ink { fill: #cecdce; }
.node-ring { fill: none; stroke: #8c76ab; stroke-width: 1; opacity: 0; pointer-events: none; }
.map-node:is(.active,:focus-visible) .node-ring { opacity: 1; }
.node-hit { fill: transparent; }
#node-preview {
  position: absolute; z-index: 3; width: min(265px, 92%); padding: 11px 15px;
  background: #fff; border-left: 1px solid #292929;
  box-shadow: 3px 5px 18px rgb(0 0 0 / .035);
}
#node-preview strong { display: block; font-size: 14px; line-height: 1.6; }
#node-preview p { color: #555; margin: 4px 0 0; font-size: 12px; line-height: 1.7; }
#node-preview { pointer-events: none; }
.graph-hint { position: absolute; left: 0; bottom: 0; margin: 0; color: #666; font-size: 11px; pointer-events: none; }
.graph-tools { display: flex; align-items: center; gap: 8px; margin: 18px 0 0; }
.graph-tools button { font-size: 12px; color: #555; }
#motion-toggle { width: 32px; height: 32px; display: grid; place-content: center; }
#motion-toggle span { width: 7px; height: 9px; border-inline: 1px solid currentColor; }
#motion-toggle[data-paused="true"] span { width: 0; height: 0; border: 5px solid transparent; border-right: 0; border-left: 7px solid currentColor; }
@media (prefers-reduced-motion: reduce) { #motion-toggle { display:none; } }
#question-reader { padding-top: 1.5svh; }
.reader-top { position: sticky; top: 0; z-index: 1; background-color: var(--paper-base); margin: 3vh 0 clamp(50px, 9vh, 110px); display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
#graph-return { font-size: 12px; color: #444; }
#question-reader .entry-body { padding: 0; overflow-wrap: anywhere; }
#reader-title { font-size: 1.5em; line-height: 1.55; margin: 0 0 1.35em; outline: none; }
#reader-text p { white-space: pre-line; }
#reader-source { margin: 2.4em 0 0; }
#question-status { margin: 0 auto; width: max-content; max-width: 80vw; }
@media(max-width:760px) {
  body.question-page:has(#graph-view:not([hidden])) { padding-bottom: 142px; }
}
@media(max-width:700px) {
  #graph-view { display: flex; flex-direction: column; margin: 0 5vw; position: relative; }
  .graph-index { padding: 5px 0 0; overflow: visible; }
  .graph-tools { position: absolute; right: 90px; top: 9px; margin: 0; }
  .index-heading { display: flex; align-items: center; justify-content: space-between; }
  #index-toggle { display: block; padding: 10px 0 10px 12px; font-size: 12px; }
  #topic-index { display: none; }
  #topic-index.open { display: block; position: absolute; z-index: 4; top: 44px; left: 0; right: 0; bottom: 0; overflow: auto; padding: 8px 12px 20px 0; background: var(--paper-base); }
  .graph-index h2 { margin: 10px 0 20px; }
  #topics summary, #topics li a { min-height: 40px; padding: 7px 0; }
  #graph-plot { flex: 1; }
  #node-preview { width: min(265px, 90%); }
  .reader-top { margin: 3vh 0 9vh; }
}
@media(prefers-reduced-motion:no-preference) {
  .graph-edge, .node-ring { transition: stroke-opacity 140ms, opacity 140ms; }
  .node-ink { transition: fill 140ms; }
}

/* Read during this visit: the node stays black, with a small white pinhole. */
.node-read { fill: #fff; opacity: 0; pointer-events: none; }
.map-node.read .node-read { opacity: 1; }
/* Reader: the text's group, and the graph's own edges at the end of the text. */
.reader-group { margin: 0 0 .9em; font-size: 12px; line-height: 1.8; color: #777; }
.reader-more { max-width: 42em; margin: 4.5em 0 0; padding-top: 1.8em; border-top: 1px solid #e7e7e7; }
.reader-more h2 { margin: 0 0 1em; font-size: 12px; font-weight: 400; color: #777; }
.reader-more ul { list-style: none; margin: 0 0 2.2em; padding: 0; }
.reader-more li a { display: grid; grid-template-columns: 14px minmax(0, 1fr); align-items: baseline; padding: .45em 0; font-size: 14px; line-height: 1.8; }
.reader-more li a::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: #181818; transform: translateY(-2px); }
.reader-more li a:hover { text-decoration: underline; text-underline-offset: .3em; }
.reader-end-return { font-size: 12px; color: #444; }
@media (max-width: 700px) { .reader-more li a { padding: .6em 0; } }

.question-trail-start { display:block; width:fit-content; margin:0 0 1.5em; padding:.4em 0; font-size:13px; text-decoration:underline; text-underline-offset:.3em; }
.question-trail { max-width:42em; margin:3em 0 0; }
.question-trail h2 { font-size:1em; font-weight:500; margin:0 0 1.1em; }
.question-trail ol { list-style:none; margin:0; padding:0; border-inline-start:1px solid #ddd; }
.question-trail li { margin:0; }
.question-trail li > * { display:grid; grid-template-columns:6.8em minmax(0,1fr); gap:.2em .4em; margin-inline-start:-1px; padding:.45em .9em; border-inline-start:1px solid transparent; text-decoration:none; align-items:baseline; }
.question-trail time,.trail-note { font-size:12px; color:#626262; line-height:1.7; }
.question-trail .trail-title { font-size:14px; line-height:1.6; }
.question-trail .trail-note { grid-column:2; }
.question-trail [aria-current=step] { border-color:#222; }
.question-trail a:is(:hover,:focus-visible) .trail-title { text-decoration:underline; text-underline-offset:.25em; }
.reader-top .work-return { margin-inline-start:auto; }
.reader-top:has(.work-return) { flex-wrap:wrap; }
#question-reader .work-readings { display:flex; flex-wrap:wrap; gap:.5em 1.8em; margin:2em 0; }
#question-reader :is(.work-readings a,.work-return) { font-size:12px; color:#545454; text-decoration:underline; text-underline-offset:.25em; }
@media(max-width:700px) {
 .question-trail li > * { grid-template-columns:minmax(0,1fr); padding-block:.7em; }
 .question-trail .trail-note { grid-column:auto; }
}

/* Editorial questions sit between the edges and the original, draggable dots. */
.map-prompt { cursor: grab; touch-action: none; -webkit-user-select: none; user-select: none; }
#question-map.dragging .map-prompt { cursor: grabbing; }
.prompt-leader { stroke: #a9a6a2; stroke-width: .7; pointer-events: none; }
.prompt-hit { fill: transparent; }
.prompt-text { pointer-events: none; fill: #494743; font-family: inherit; font-size: 11px;
  stroke: var(--paper-base,white); stroke-width: 3.5; stroke-linejoin: round; paint-order: stroke; }
