.relationship-section{margin:0;padding:0}.relationship-head{display:flex;justify-content:space-between;align-items:flex-end;gap:16px}.relationship-head h3{margin:0;color:var(--primary);font-size:22px}.graph-truth-chip{display:inline-flex;align-items:center;border-radius:999px;padding:6px 10px;background:var(--brand-teal-soft);color:var(--primary);font-size:11px;font-weight:900;white-space:nowrap}.relationship-warm{margin-top:15px;padding:16px 18px;border:1px solid #cde5dd;border-radius:17px;background:linear-gradient(135deg,#f6fbf9,#fff)}.relationship-warm strong{display:block;color:var(--primary);font-size:13px}.relationship-warm p{margin:6px 0 0;color:#466268;font-size:14px;line-height:1.8}.graph-tabs{display:flex;gap:8px;margin-top:16px;flex-wrap:wrap}.graph-tabs button{border:1px solid var(--border);border-radius:999px;background:#fff;color:var(--primary);padding:8px 12px;font-size:12px;font-weight:850;cursor:pointer}.graph-tabs button[aria-selected="true"]{background:var(--primary);border-color:var(--primary);color:#fff}.graph-tabs button:hover{border-color:#bdd9df}.graph-mobile-hint{display:none;margin:9px 0 0;color:var(--muted);font-size:11px}.graph-viewport{margin-top:12px;border:1px solid var(--border);border-radius:18px;background:linear-gradient(180deg,#fbfdfc,#fff);overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}.relationship-svg{display:block;width:100%;min-width:760px;height:auto;min-height:260px;touch-action:pan-x pan-y}.graph-edge{fill:none;stroke-width:2.2;vector-effect:non-scaling-stroke}.graph-edge-catalog{stroke:#95a9b0}.graph-edge-graduate{stroke:#45b99a}.graph-edge-cross{stroke:#7a8ed1;stroke-dasharray:7 5}.graph-node rect{fill:#fff;stroke:#d7e3df;stroke-width:1.4;vector-effect:non-scaling-stroke}.graph-node text{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",sans-serif;pointer-events:none}.graph-node-title{font-size:14px;font-weight:850;fill:#17242d}.graph-node-meta{font-size:10.5px;font-weight:650;fill:#60717a}.graph-node-discipline rect{fill:#f5f8ff;stroke:#cbd8ee}.graph-node-class rect{fill:#eef8f5;stroke:#bddfd4}.graph-node-unlisted rect{fill:#fff9ef;stroke:#e5d4b8;stroke-dasharray:5 4}.graph-node-focus rect{fill:#172d67;stroke:#172d67}.graph-node-focus .graph-node-title,.graph-node-focus .graph-node-meta{fill:#fff}.graph-node-sibling[data-major-code],.graph-node-cross[data-major-code],.graph-node-focus[data-major-code]{cursor:pointer}.graph-node-sibling[data-major-code]:hover rect,.graph-node-cross[data-major-code]:hover rect,.graph-node-sibling[data-major-code]:focus rect,.graph-node-cross[data-major-code]:focus rect{stroke:#45b99a;stroke-width:2}.graph-node-cross rect{fill:#f6f7fd;stroke:#ced4ed}.graph-node-graduate rect{fill:#f0faf6;stroke:#b9dfd2}.graph-node-summary rect{fill:#f8faf9;stroke-dasharray:5 4}.graph-node-query rect{fill:#fff6ed;stroke:#f0d4bc}.graph-group-title{font-size:11px;font-weight:900;fill:#60717a;letter-spacing:.06em}.graph-empty{font-size:11px;fill:#819096}.graph-annotation{font-size:12px;font-weight:850;fill:#9b6c31}.graph-annotation-sub{font-size:10.5px;font-weight:650;fill:#927b60}.graph-legend{display:flex;gap:14px;flex-wrap:wrap;margin-top:9px;color:var(--muted);font-size:10.5px}.graph-legend span{display:inline-flex;align-items:center;gap:6px}.legend-line{display:inline-block;width:22px;height:0;border-top:2px solid #95a9b0}.legend-line.graduate{border-color:#45b99a}.legend-line.cross{border-color:#7a8ed1;border-top-style:dashed}.relationship-fallback{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:16px}.relationship-fallback>div{min-width:0;border:1px solid var(--border);border-radius:16px;padding:15px;background:#fff}.relationship-fallback h4{margin:0 0 9px;color:var(--primary);font-size:13px}.relationship-fallback p{margin:0;color:var(--muted);font-size:12px;line-height:1.7}.neighbor-list{display:grid;gap:8px}.neighbor-chip{width:100%;border:0;border-radius:12px;background:var(--soft);padding:11px 12px;text-align:left;color:var(--text);cursor:pointer}.neighbor-chip:hover{background:var(--brand-teal-soft)}.neighbor-chip.cross{background:#f5f7fd}.neighbor-chip.cross:hover{background:#eef1fb}.neighbor-chip strong{display:block;font-size:13px}.neighbor-chip span{display:block;margin-top:3px;color:var(--muted);font-size:10.5px;line-height:1.55}.graph-boundary{margin-top:13px;padding:12px 14px;border-radius:13px;background:var(--warm);border:1px solid var(--warm-border);color:var(--warm-text);font-size:12px;line-height:1.7}.second-level-note{margin:0 0 15px;padding:15px 17px;border:1px solid #d8e1ef;border-radius:15px;background:#f7f9fd}.second-level-note strong{display:block;color:#27416f;font-size:13px}.second-level-note p{margin:6px 0 0;color:#52647c;font-size:12px;line-height:1.75}.class-insight{margin-top:16px}.class-insight .relationship-warm{margin-top:0}.browse-class-head{display:flex;justify-content:space-between;gap:14px;align-items:flex-end;margin:15px 0 0}.browse-class-head strong{display:block;color:var(--primary);font-size:15px}.browse-class-head div span,.browse-class-head>span{display:block;margin-top:3px;color:var(--muted);font-size:11px}.browse-graph{margin-top:10px}.browse-class-panel .major-list{margin-top:12px}.browse-direct{margin-top:16px}.browse-direct .major-list{margin-top:12px}.path-node-note{background:#fff8ec;border-color:#ecd8b9}.graph-node:focus{outline:none}.graph-node:focus rect{stroke:#45b99a;stroke-width:2.5}
@media(max-width:760px){.relationship-head{display:block}.graph-truth-chip{margin-top:8px}.graph-mobile-hint{display:block}.relationship-svg{min-width:720px}.relationship-fallback{grid-template-columns:1fr}.browse-class-head{display:block}.browse-class-head>span{margin-top:4px}.graph-viewport{border-radius:15px}}
@media(max-width:390px){.relationship-warm{padding:14px}.relationship-head h3{font-size:20px}.graph-tabs{display:grid;grid-template-columns:1fr}.graph-tabs button{width:100%}.relationship-svg{min-width:700px}.graph-boundary,.second-level-note{padding:12px}}
@media(prefers-reduced-motion:reduce){.graph-node,.neighbor-chip,.graph-tabs button{transition:none!important}}
