/* OWIJ Graph Explorer V3 — compact projection, deterministic ink paths. */
:root{
  --graph-ink:#171717;
  --graph-muted:#6c6c6c;
  --graph-line:rgba(23,23,23,.16);
  --graph-paper:#fff;
  --graph-washi:#f8f7f3;
  --graph-vermilion:#a83c31;
}
.graph-explorer{min-height:calc(100svh - 6rem);padding:clamp(4rem,8vw,7rem) clamp(1.5rem,7vw,8rem) clamp(5rem,9vw,8rem);background:linear-gradient(180deg,#fff 0%,var(--graph-washi) 100%);position:relative;isolation:isolate;overflow:hidden}
.graph-explorer::before{content:"";position:absolute;z-index:-1;right:-12%;top:4%;width:52%;height:31rem;background:url('/assets/OWIJ_HEADER_LANDSCAPE_CROP.webp') center/cover no-repeat;filter:grayscale(1) contrast(.92);opacity:.09;mask-image:linear-gradient(90deg,transparent 2%,rgba(0,0,0,.2) 36%,#000 78%,rgba(0,0,0,.2));pointer-events:none}
.graph-explorer-intro{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(18rem,.75fr);gap:clamp(2rem,7vw,7rem);align-items:end;max-width:90rem;margin:0 auto clamp(3rem,6vw,6rem)}
.graph-explorer-stage-wrap{min-width:0}
.graph-explorer-intro h1{max-width:11ch;margin:0;font-family:var(--serif);font-weight:400;font-size:clamp(3.8rem,7.8vw,8rem);line-height:.88;letter-spacing:-.075em}
.graph-explorer-intro h1 .period{color:var(--graph-vermilion)}
.graph-explorer-lead{max-width:25rem;color:var(--graph-muted);font-size:.93rem;line-height:1.75}
.graph-proofline{display:flex;flex-wrap:wrap;gap:.55rem 1rem;margin-top:1.7rem;font-size:.58rem;line-height:1.3;letter-spacing:.1em;text-transform:uppercase;color:var(--graph-ink)}
.graph-proofline span{display:inline-flex;align-items:center;gap:.45rem}
.graph-proofline span+span::before{content:"/";color:var(--graph-vermilion)}
.graph-explorer-shell{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(15rem,.55fr);gap:clamp(2rem,6vw,6rem);max-width:90rem;margin:0 auto}
.graph-stage{position:relative;min-height:min(64vw,660px);border-top:1px solid var(--graph-line);border-bottom:1px solid var(--graph-line);background:rgba(255,255,255,.55);overflow:hidden;outline:none}
.graph-stage::before{content:"";position:absolute;inset:7% 4%;border:1px solid rgba(23,23,23,.08);border-radius:50% 45% 52% 48%;transform:rotate(-6deg);pointer-events:none}
.graph-stage::after{content:"";position:absolute;inset:17% 16%;border:1px solid rgba(23,23,23,.07);border-radius:47% 53% 45% 55%;transform:rotate(11deg);pointer-events:none}
.graph-trail-lines{position:absolute;inset:0;width:100%;height:100%;z-index:0;overflow:visible;pointer-events:none}
.graph-trail-lines path{fill:none;stroke:rgba(23,23,23,.18);stroke-width:.4;stroke-linecap:round;vector-effect:non-scaling-stroke;opacity:.82}
.graph-lines{position:absolute;inset:0;width:100%;height:100%;z-index:0;overflow:visible}
.graph-lines path{fill:none;stroke:rgba(23,23,23,.32);stroke-width:.22;stroke-linecap:round;vector-effect:non-scaling-stroke;stroke-dasharray:1.5 1.1;animation:graph-draw .75s ease both}
.graph-lines path[data-edge-type="component"]{stroke:var(--graph-vermilion);stroke-width:.32;stroke-dasharray:none}
.graph-lines path[data-edge-type="historical"]{stroke:rgba(23,23,23,.5);stroke-width:.28}
.graph-node-layer{position:absolute;inset:0;z-index:1}
.graph-node{position:absolute;left:var(--node-x);top:var(--node-y);transform:translate(-50%,-50%);display:flex;flex-direction:column;align-items:center;gap:.35rem;min-width:8rem;text-align:center;animation:graph-node-in .55s ease both}
.graph-node-trigger{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.1rem;width:8.3rem;min-height:8.3rem;padding:.75rem;border:1px solid rgba(23,23,23,.23);border-radius:50%;background:rgba(255,255,255,.88);color:var(--graph-ink);cursor:pointer;transition:transform .22s ease,border-color .22s ease,box-shadow .22s ease,background-color .22s ease}
.graph-node-trigger:hover,.graph-node-trigger:focus-visible{transform:scale(1.06);border-color:var(--graph-vermilion);box-shadow:0 0 0 .45rem rgba(168,60,49,.08);outline:none}
.graph-node.is-center .graph-node-trigger{width:11.8rem;min-height:11.8rem;border-color:var(--graph-ink);box-shadow:0 0 0 1rem rgba(255,255,255,.5)}
.graph-node.is-center .graph-node-trigger::after{content:"NOW";position:absolute;transform:translateY(4.9rem);font-size:.48rem;letter-spacing:.2em;color:var(--graph-vermilion)}
.graph-node-glyph{display:block;font-family:var(--serif);font-size:clamp(2.8rem,5.1vw,5.2rem);font-weight:400;line-height:1}
.graph-node.is-center .graph-node-glyph{font-size:clamp(4.7rem,8vw,8rem)}
.graph-node-label{display:block;margin-top:.25rem;font-family:var(--serif);font-size:.92rem;line-height:1.15}
.graph-node-reading{display:block;font-size:.5rem;letter-spacing:.12em;text-transform:uppercase;color:var(--graph-muted)}
.graph-node-story{display:inline-flex;align-items:center;justify-content:center;gap:.35rem;min-width:44px;min-height:44px;padding:.55rem .7rem;font-size:.55rem;letter-spacing:.08em;text-transform:uppercase;color:var(--graph-muted);text-decoration:underline;text-decoration-color:transparent;text-underline-offset:.25rem}
.graph-story-mark{color:var(--graph-vermilion);font-size:.9rem;line-height:1}
.graph-node-story:hover,.graph-node-story:focus-visible{color:var(--graph-vermilion);text-decoration-color:var(--graph-vermilion)}
.graph-stage.is-collapsed .graph-node{animation:none}
.graph-stage.is-activating .graph-node[data-staged="true"]{animation:graph-node-in .52s ease var(--node-delay) both}
.graph-stage.is-activating .graph-node.is-center .graph-node-trigger{animation:graph-impact .18s ease both}
.graph-lines path.is-staged{animation-delay:var(--edge-delay)}
.graph-relation-note{min-height:3.2em;padding:.75rem 0;border-top:1px solid var(--graph-line);border-bottom:1px solid var(--graph-line);font-size:.72rem;line-height:1.55;color:var(--graph-ink)}
.graph-center-caption{position:absolute;z-index:2;left:1.25rem;bottom:1.2rem;display:flex;align-items:baseline;gap:.7rem;padding:.4rem .65rem;background:rgba(255,255,255,.8);font-size:.58rem;letter-spacing:.1em;text-transform:uppercase;color:var(--graph-muted)}
.graph-center-caption strong{font-family:var(--serif);font-size:1rem;font-weight:400;letter-spacing:0;color:var(--graph-ink);text-transform:none}
.graph-center-caption [data-graph-current-glyph]{font-family:var(--serif);font-size:1.15rem;color:var(--graph-ink);text-transform:none}
.graph-first-view-hint{margin:1rem 0 0;color:var(--graph-muted);font-size:.58rem;letter-spacing:.15em}
.graph-explorer-aside{align-self:end;max-width:17rem;padding-bottom:1.3rem;color:var(--graph-muted);font-size:.83rem;line-height:1.7}
.graph-explorer-aside>.eyebrow{margin-bottom:.8rem;color:var(--graph-ink)}
.graph-legend{display:flex;align-items:center;flex-wrap:wrap;gap:.45rem;margin:1.6rem 0 2.5rem;font-size:.58rem;line-height:1.4;letter-spacing:.06em;text-transform:uppercase;color:var(--graph-ink)}
.graph-legend-line{display:inline-block;width:1.8rem;border-top:1px solid var(--graph-vermilion)}
.graph-legend-dot{display:inline-block;width:.5rem;height:.5rem;margin-left:.45rem;border:1px solid var(--graph-vermilion);border-radius:50%;background:#fff}
.graph-trail{padding:1.2rem 0;border-top:1px solid var(--graph-line);border-bottom:1px solid var(--graph-line)}
.graph-trail ol{display:flex;flex-wrap:wrap;gap:.35rem .65rem;margin:.8rem 0 0;padding:0;list-style:none}
.graph-trail li{display:flex;align-items:baseline;gap:.25rem;font-size:.65rem;color:var(--graph-ink)}
.graph-trail li+li::before{content:"→";margin-right:.3rem;color:var(--graph-vermilion)}
.graph-trail li.is-past{color:var(--graph-muted)}
.graph-trail li span:first-child{font-family:var(--serif);font-size:1.25rem}
.graph-back-link{display:inline-flex;margin-top:2rem}
.graph-status{position:absolute;inline-size:1px;block-size:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}
.character-graph-entry{display:flex;align-items:baseline;flex-wrap:wrap;gap:.6rem 1.2rem;padding:2.4rem clamp(1.5rem,7vw,8rem);border-top:1px solid var(--graph-line);border-bottom:1px solid var(--graph-line);background:var(--graph-washi)}
.character-graph-entry .eyebrow{margin:0;color:var(--graph-muted)}
.character-graph-entry .text-link{margin-right:auto}
.character-graph-entry>p:last-child{margin:0;color:var(--graph-muted);font-size:.78rem}
.canvas-continuation-links{display:inline-flex;align-items:center;gap:clamp(1rem,2.5vw,2.5rem)}
.canvas-continuation-links a:first-child{color:var(--graph-vermilion)}
@media(max-width:600px){.canvas-continuation-links{flex-direction:column;align-items:flex-end;gap:.55rem}.character-graph-entry{display:block}.character-graph-entry .eyebrow{margin-bottom:.75rem}.character-graph-entry>p:last-child{margin-top:.8rem}}
.graph-stage.is-activating .graph-lines path.is-staged{animation:graph-draw .7s ease var(--edge-delay) both}
@keyframes graph-draw{from{stroke-dashoffset:9;opacity:.1}to{stroke-dashoffset:0;opacity:1}}
@keyframes graph-node-in{from{opacity:0;transform:translate(-50%,-50%) scale(.93)}to{opacity:1;transform:translate(-50%,-50%) scale(1)}}
@keyframes graph-impact{0%{transform:scale(1)}45%{transform:scale(1.035)}100%{transform:scale(1)}}
@media(max-width:900px){
 .graph-explorer-intro{grid-template-columns:1fr;gap:1.6rem}
 .graph-explorer-shell{grid-template-columns:1fr;gap:2rem}
 .graph-explorer-aside{max-width:34rem;padding-bottom:0}
 .graph-stage{min-height:min(76vw,560px)}
}
@media(max-width:600px){
 .graph-explorer{padding: max(5.5rem,calc(env(safe-area-inset-top) + 4.5rem)) 7% 5rem}
 .graph-explorer::before{right:-50%;top:11%;width:125%;height:22rem;opacity:.08}
 .graph-explorer-intro{margin-bottom:1.75rem}
 .graph-explorer-intro h1{font-size:clamp(3.2rem,14vw,5.2rem)}
 .graph-explorer-lead{font-size:.87rem}
 .graph-proofline{font-size:.52rem;gap:.4rem .65rem}
 .graph-explorer-shell{gap:1.6rem}
 .graph-stage{min-height:86vw;max-height:390px}
 .graph-stage::before{inset:5% 2%}
 .graph-stage::after{inset:14% 10%}
 .graph-node-trigger{width:6.1rem;min-height:6.1rem;padding:.5rem}
 .graph-node.is-center .graph-node-trigger{width:8.8rem;min-height:8.8rem}
 .graph-node-glyph{font-size:2.6rem}
 .graph-node.is-center .graph-node-glyph{font-size:4.7rem}
 .graph-node-label{font-size:.72rem}
 .graph-node-reading{font-size:.43rem}
 .graph-node-story{font-size:.45rem}
 .graph-node.is-center .graph-node-trigger::after{transform:translateY(3.7rem);font-size:.42rem}
 .graph-center-caption{left:.8rem;bottom:.8rem;gap:.4rem;font-size:.49rem}
 .graph-center-caption strong{font-size:.85rem}
 .graph-center-caption [data-graph-current-glyph]{font-size:1rem}
}
@media(max-width:360px){
 .graph-stage{min-height:125vw}
 .graph-node-trigger{width:5.6rem;min-height:5.6rem}
 .graph-node.is-center .graph-node-trigger{width:8rem;min-height:8rem}
 .graph-node.is-center .graph-node-glyph{font-size:4.2rem}
}
@media(prefers-reduced-motion:reduce){
 .graph-lines path,.graph-node{animation:none}
 .graph-node-trigger{transition:none}
 .graph-stage.is-activating .graph-node.is-center .graph-node-trigger{animation:none}
}
.portal-component-focus{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:1.5rem;padding:1.4rem 0;border-top:1px solid rgba(23,23,23,.14);border-bottom:1px solid rgba(23,23,23,.14)}
.portal-component-focus .portal-component-glyph{font-family:var(--serif);font-size:4rem;line-height:1}
.portal-component-focus .portal-component-label{font-size:.58rem;letter-spacing:.16em;color:var(--graph-muted)}
.portal-component-focus p{margin:.35rem 0 0;color:var(--graph-muted);font-size:.82rem}
@media(max-width:650px){.portal-component-focus{grid-template-columns:auto 1fr}.portal-component-focus .text-link{grid-column:1 / -1}.portal-component-focus .portal-component-glyph{font-size:3.2rem}}
