.graph-mode .workspace {display:block;max-width:98rem;padding-top:1.7rem}
.graph-mode .workspace>aside {display:none}
.graph-mode #content {background:none;padding:0;border:0}
.graph-head,.graph-tools,.graph-legend,.graph-modes,.graph-zoom {display:flex;align-items:center}
.graph-head {justify-content:space-between;gap:1rem;margin-bottom:1.1rem}
#content .graph-head h2 {margin:0;font-size:clamp(2rem,3.6vw,3.1rem)}
.graph-head p {margin:.2rem 0;color:#625e53;font-size:.91rem}
.graph-head select {font:inherit;font-size:.87rem;max-width:20rem;width:100%;color:#254238;background:white;padding:.48rem;border:1px solid #9cb3a7;border-radius:5px}
.graph-layout {display:grid;grid-template-columns:minmax(0,1fr) minmax(15rem,20rem);align-items:start;gap:1.2rem}
.graph-main {min-width:0}.graph-board {background:#fffdf7;border:1px solid #c9c3b4;border-radius:2px;overflow:hidden}
.graph-tools {justify-content:space-between;gap:.6rem;flex-wrap:wrap;padding:.72rem 1rem;border-bottom:1px solid #d2cdbf}
.graph-modes,.graph-zoom {gap:2px}
.graph-tools button {cursor:pointer;font:600 .82rem/1.25 "Segoe UI",sans-serif;border:1px solid transparent;background:transparent;color:#23483d;border-radius:5px;padding:.48rem .65rem}
.graph-modes {padding:3px;background:#eeebe1;border-radius:6px}.graph-modes [aria-pressed=true] {background:white;border-color:#c4d2c7;box-shadow:0 1px 2px #173b2920}
.graph-tools button:hover {background:#e1ece4}.graph-zoom button {border-color:#c4d2c7}
.graph-zoom output {color:#4b6156;font: .75rem/1.2 monospace;min-width:4ch;text-align:center}
.graph-viewport {height:clamp(21rem,50vh,33rem);background-color:#f8f6ef;background-image:radial-gradient(#d4cfc0 .8px,transparent .8px);background-size:15px 15px;overflow:hidden}
.graph-viewport svg {width:100%;height:100%;display:block;cursor:grab;touch-action:none;user-select:none}
.graph-viewport svg:active {cursor:grabbing}
.graph-edge {fill:none;stroke-width:2.3;stroke:#aca79a}.graph-edge.ancestor {stroke:#217768}.graph-edge.descendant {stroke:#946022;stroke-dasharray:6 3}
.arrow-ancestor {fill:#217768}.arrow-descendant {fill:#946022}.arrow-other {fill:#aca79a}
.graph-node {cursor:pointer;text-decoration:none;--line:#c7c1b1;--fill:#fffdf7;--ink:#3a3931;--dot:#a2b3a7}
.graph-node.ancestor {--line:#4e9482;--fill:#edfaf2;--ink:#123f34;--dot:#1e7763}
.graph-node.descendant {--line:#bb884c;--fill:#fff7e9;--ink:#5b3c19;--dot:#a26922}
.graph-node.selected {--line:#682a22;--fill:#843629;--ink:white;--dot:#efc8a6}
.graph-node .tile {stroke:var(--line);fill:var(--fill);stroke-width:1.4}
.graph-node.selected .tile {stroke-width:2.5}.graph-node:hover .tile,.graph-node:focus .tile {stroke:#26382c;stroke-width:3}
.graph-node .tile-title {font:600 12.5px "Segoe UI",sans-serif;fill:var(--ink)}.graph-node .tile-ref {font:11px "Segoe UI",sans-serif;fill:var(--ink)}.node-dot {fill:var(--dot)}
.graph-legend {gap:.65rem 1.2rem;flex-wrap:wrap;padding:.65rem 1rem;border-top:1px solid #d2cdbf;font-size:.78rem;color:#4c6156}
.graph-legend span {display:inline-flex;align-items:center;gap:.4rem}
.graph-legend i {width:10px;height:10px;border-radius:3px;background:#843629}.graph-legend .ancestor {background:#cff0de;border:1px solid #4e9482}.graph-legend .descendant {background:#ffe8c1;border:1px solid #bb884c}
.graph-caption {font-size:.82rem;color:#625e53;margin:.6rem 0 1rem}
#content .graph-inspector {margin:0;border:1px solid #cfcabb;border-top:4px solid #843629;background:#fffdf7;padding:1.2rem;border-radius:2px}
#content .graph-inspector h3 {font:500 1.75rem/1.13 Georgia,serif;margin:.4rem 0}
.graph-inspector>p {font-size:.92rem;line-height:1.5}
.graph-read {display:inline-block;background:#843629;color:white;padding:.45rem .95rem;text-decoration:none;border-radius:4px}
.graph-relation {border-top:1px solid #d6e0d5;margin-top:1rem;padding-top:.8rem}
.graph-relation h4 {margin:0 0 .55rem}.graph-relation a {font-size:.91rem;font-weight:600}
.graph-relation p {margin:.25rem 0 .7rem;color:#625e53;font-size:.84rem}
@media(max-width:880px){.graph-layout{grid-template-columns:1fr}.graph-inspector {width:auto}.graph-viewport{height:clamp(19rem,50vh,26rem)}}
@media(max-width:560px){.graph-head{align-items:flex-start;flex-direction:column}.graph-head select{max-width:100%}.graph-tools{padding:.5rem}.graph-tools button{padding:.38rem .48rem}.graph-legend{gap:.5rem}.graph-mode .workspace{padding:1.2rem .75rem}.graph-viewport{height:20rem}}
