:root {
  --edge-hierarchy: #59e0a3;
  --edge-content: #55b8e8;
  --edge-software: #f4ce72;
  --edge-hierarchy-dash: none;
  --edge-content-dash: 10 7;
  --edge-software-dash: 2 7;
  --semver-bg: #071014;
  --semver-panel: #0d191e;
  --semver-panel-2: #102127;
  --semver-line: rgba(128, 171, 160, .2);
  --semver-green: #59e0a3;
  --semver-green-soft: rgba(89, 224, 163, .12);
  --semver-gold: #f4ce72;
  --semver-text: #e8f0ee;
  --semver-muted: #9cb0b2;
  --semver-danger: #ff9090;
  color-scheme: dark;
}

body.semver-page {
  min-width: 320px;
  margin: 0;
  color: var(--semver-text);
  background: radial-gradient(circle at 18% 8%, rgba(38, 119, 91, .13), transparent 34rem), var(--semver-bg);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
body.semver-page * { box-sizing: border-box; }
body.semver-page a { color: inherit; }
.semver-container { width: min(1240px, calc(100% - 2rem)); margin-inline: auto; }
.semver-header { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--semver-line); background: rgba(7, 16, 20, .9); backdrop-filter: blur(16px); }
.semver-header-inner { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.semver-brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; font-weight: 900; letter-spacing: -.03em; }
.semver-brand-logo { display: block; width: 40px; height: 40px; object-fit: cover; border: 1px solid rgba(89, 224, 163, .45); border-radius: 14px; box-shadow: 0 0 24px rgba(89, 224, 163, .1); }
.semver-brand-mark { display: grid; width: 40px; height: 40px; place-items: center; border: 1px solid rgba(89, 224, 163, .45); border-radius: 14px; color: var(--semver-green); background: linear-gradient(145deg, rgba(89, 224, 163, .18), rgba(89, 224, 163, .03)); box-shadow: 0 0 24px rgba(89, 224, 163, .1); font-size: 1.35rem; }
.semver-nav { display: flex; align-items: center; gap: 1.2rem; color: var(--semver-muted); font-size: .9rem; font-weight: 700; }
.semver-nav a { text-decoration: none; transition: color .18s ease; }
.semver-nav a:hover, .semver-nav a:focus-visible { color: var(--semver-green); }
.semver-menu-toggle { display: none; min-width: 44px; min-height: 44px; border: 1px solid var(--semver-line); border-radius: 12px; color: var(--semver-text); background: var(--semver-panel); font-size: 1.2rem; }
.semver-hero { position: relative; overflow: hidden; padding: clamp(2rem, 6vw, 5rem) 0 3rem; border-bottom: 1px solid var(--semver-line); background-image: linear-gradient(rgba(89, 224, 163, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(89, 224, 163, .045) 1px, transparent 1px), radial-gradient(circle at 68% 25%, rgba(89, 224, 163, .12), transparent 30rem); background-size: 34px 34px, 34px 34px, auto; }
.semver-hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr); align-items: center; gap: clamp(1.5rem, 4vw, 3.5rem); }
.semver-eyebrow { margin: 0 0 .85rem; color: var(--semver-green); font-size: .74rem; font-weight: 900; letter-spacing: .12em; }
.semver-hero h1 { max-width: 780px; margin: 0 0 1rem; font-size: clamp(2.2rem, 5.5vw, 4.7rem); line-height: 1.05; letter-spacing: -.055em; }
.semver-hero h1 span { color: var(--semver-green); }
.semver-hero-copy > p:not(.semver-eyebrow) { max-width: 700px; margin: 0; color: var(--semver-muted); font-size: clamp(1rem, 1.6vw, 1.15rem); line-height: 1.9; }
.semver-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.semver-button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; gap: .45rem; border: 1px solid var(--semver-line); border-radius: 12px; padding: .7rem 1rem; color: var(--semver-text); background: var(--semver-panel); font: inherit; font-size: .9rem; font-weight: 800; text-decoration: none; cursor: pointer; transition: transform .18s ease, border-color .18s ease, background .18s ease; }
.semver-button:hover { transform: translateY(-1px); border-color: rgba(89, 224, 163, .55); }
.semver-button:focus-visible, .semver-page input:focus-visible, .semver-page select:focus-visible, .semver-page textarea:focus-visible { outline: 2px solid var(--semver-green); outline-offset: 2px; }
.semver-button-primary { border-color: transparent; color: #052117; background: linear-gradient(135deg, #72efb3, #40ca8c); box-shadow: 0 8px 24px rgba(40, 194, 126, .18); }
.semver-button-subtle { background: transparent; }
.semver-button-danger { color: #ffd2d2; border-color: rgba(255, 144, 144, .3); }
.semver-button:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.semver-proof-row { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.5rem 0 0; padding: 0; list-style: none; }
.semver-proof-row li { border: 1px solid var(--semver-line); border-radius: 999px; padding: .45rem .75rem; color: var(--semver-muted); background: rgba(13, 25, 30, .78); font-size: .78rem; }
.semver-proof-row strong { color: var(--semver-gold); }
.orbit-card, .semver-card { border: 1px solid var(--semver-line); border-radius: 22px; background: linear-gradient(155deg, rgba(16, 33, 39, .94), rgba(9, 20, 24, .96)); box-shadow: 0 22px 60px rgba(0, 0, 0, .23), inset 0 1px rgba(255, 255, 255, .025); }
.orbit-card { overflow: hidden; padding: 1rem; }
.orbit-card-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.orbit-card-head strong { font-size: .9rem; }
.orbit-card-head .semver-button { min-height: 38px; padding: .45rem .7rem; font-size: .78rem; }
.orbit-canvas-wrap { position: relative; margin-top: .75rem; border: 1px solid rgba(89, 224, 163, .16); border-radius: 16px; background: radial-gradient(circle at 50% 50%, rgba(89, 224, 163, .07), transparent 65%), #071014; overflow: hidden; }
#orbit-canvas { display: block; width: 100%; height: clamp(250px, 32vw, 340px); }
.orbit-caption { display: flex; justify-content: space-between; gap: .7rem; margin-top: .75rem; color: var(--semver-muted); font-size: .74rem; }
.orbit-note { margin: .7rem 0 0; color: var(--semver-muted); font-size: .75rem; line-height: 1.7; }
.semver-section { padding: clamp(2.2rem, 5vw, 4rem) 0; }

.node-plan-section { padding-top: clamp(1.5rem, 4vw, 3rem); }
.node-plan-card { overflow: hidden; border: 1px solid #d6e4e8; border-radius: 8px; color: #142b35; background: #fff; box-shadow: 0 26px 70px rgba(0, 0, 0, .25); }
.node-plan-brand { display: flex; align-items: center; gap: .65rem; min-height: 72px; padding: .85rem 1.2rem; color: #101820; background: #fff; font-size: clamp(1.1rem, 2.3vw, 1.55rem); font-weight: 900; }
.node-plan-brand img { width: 38px; height: 38px; object-fit: cover; border-radius: 10px; }
.node-plan-close { margin-inline-start: auto; color: #8b9aa0; font-size: 2rem; font-weight: 300; line-height: 1; }
.node-plan-content { padding: clamp(1.2rem, 4vw, 2.5rem) clamp(1rem, 6vw, 4.3rem) 2rem; }
.node-plan-kicker { margin: 0 0 .4rem; color: #239ac3; font-size: .7rem; font-weight: 900; letter-spacing: .12em; }
.node-plan-content h2 { margin: 0; color: #1d9aca; font-size: clamp(1.55rem, 4vw, 2.45rem); letter-spacing: -.04em; text-align: center; text-transform: uppercase; }
.node-plan-lead { max-width: 700px; margin: .7rem auto 1.1rem; color: #5e7076; font-size: .92rem; line-height: 1.75; text-align: center; }
.node-plan-stats { display: flex; justify-content: center; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.2rem; }
.node-plan-stats span { border: 1px solid #d3e5ea; border-radius: 999px; padding: .35rem .7rem; color: #5a7179; font-size: .72rem; }
.node-plan-stats strong { color: #1c9bc5; }
.node-plan-flow { display: grid; grid-template-columns: 1.05fr auto 1.2fr auto 1.15fr auto 1fr auto .9fr; align-items: center; gap: .55rem; min-height: 205px; border-top: 1px solid #dce7e9; border-bottom: 1px solid #dce7e9; padding: 1.2rem .2rem; background: linear-gradient(180deg, #fbfefe, #f4fafb); }
.node-plan-stage { position: relative; min-width: 0; min-height: 150px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: .45rem; text-align: center; }
.node-plan-stage-title { position: absolute; top: 0; color: #45616b; font-size: .6rem; font-weight: 900; letter-spacing: .05em; }
.node-plan-arrow { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 50%; color: #fff; background: #2a9ec5; font-size: .65rem; font-weight: 900; box-shadow: 0 3px 8px rgba(42, 158, 197, .24); }
.node-plan-source { display: grid; width: 43px; height: 43px; place-items: center; border: 1px solid #62c5df; border-radius: 50%; color: #198eb6; background: #e8f8fc; font-size: 1.1rem; }
.node-plan-source small, .node-plan-stage > small { display: block; color: #5a7179; font-size: .57rem; }
.node-plan-source-one { transform: translateX(-24px); }.node-plan-source-two { transform: translateX(18px); }.node-plan-source-three { transform: translateX(-8px); }
.node-plan-stack { display: grid; gap: .28rem; width: 100%; max-width: 130px; margin-top: .55rem; }
.node-plan-stack span { border: 1px dashed #63bdd0; padding: .25rem .2rem; color: #4a6973; background: #fff; font-size: .54rem; }
.node-plan-box { display: grid; width: 82px; height: 62px; place-items: center; border: 1px solid #63bdd0; color: #238eaf; background: #f4fcfd; box-shadow: 8px 8px 0 #e5f3f5; }
.node-plan-box b { font-size: 1.05rem; }.node-plan-box small { color: #5a7179; font-size: .55rem; }
.node-plan-mini-row { display: flex; gap: .3rem; color: #2a9ec5; }.node-plan-mini-row i { display: grid; width: 22px; height: 22px; place-items: center; border: 1px solid #8bcddd; border-radius: 5px; font-size: .65rem; font-style: normal; }
.node-plan-analysis { display: grid; grid-template-columns: repeat(3, 28px); gap: .3rem; margin-top: .55rem; }.node-plan-analysis span { display: grid; height: 54px; place-items: center; border: 1px dashed #62c5df; color: #2a9ec5; background: #fff; font-size: 1.2rem; }
.node-plan-publish { display: grid; width: 54px; height: 54px; place-items: center; border: 1px solid #62c5df; border-radius: 13px; color: #fff; background: #2a9ec5; font-size: 1.5rem; }
.node-plan-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem 1.5rem; margin: 1.2rem 0 0; padding: 0; list-style: none; counter-reset: plan-step; }
.node-plan-steps li { display: grid; grid-template-columns: 25px 1fr; align-items: start; gap: .55rem; color: #1d2529; font-size: .82rem; line-height: 1.65; }
.node-plan-steps li > span { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; color: #fff; background: #2a9ec5; font-size: .66rem; font-weight: 900; }
.node-plan-steps p { margin: 0; }
.semver-section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.semver-section-head h2 { margin: 0 0 .45rem; font-size: clamp(1.55rem, 3vw, 2.25rem); letter-spacing: -.035em; }
.semver-section-head p { max-width: 750px; margin: 0; color: var(--semver-muted); line-height: 1.8; }
.semver-kicker { margin: 0 0 .45rem; color: var(--semver-green); font-size: .72rem; font-weight: 900; letter-spacing: .12em; }
.semver-stat-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.semver-stat { border: 1px solid var(--semver-line); border-radius: 15px; padding: .85rem 1rem; background: rgba(13, 25, 30, .75); }
.semver-stat span { display: block; color: var(--semver-muted); font-size: .72rem; }
.semver-stat strong { display: block; margin-top: .2rem; color: var(--semver-green); font-size: 1.3rem; }
.node-toolbar { position: sticky; top: 70px; z-index: 10; display: grid; grid-template-columns: minmax(250px, 1.35fr) repeat(3, minmax(135px, .55fr)) auto; align-items: end; gap: .65rem; margin: 0 -.35rem .8rem; padding: .7rem; border: 1px solid rgba(89, 224, 163, .2); border-radius: 16px; background: rgba(7, 16, 20, .9); box-shadow: 0 12px 30px rgba(0, 0, 0, .18); backdrop-filter: blur(14px); }
.search-control { position: relative; display: flex; align-items: center; }
.search-control .semver-input { padding-inline: 2rem 2.25rem; transition: border-color .18s ease, box-shadow .18s ease; }
.search-control .semver-input:focus { border-color: var(--semver-green); box-shadow: 0 0 0 3px rgba(89, 224, 163, .12); }
.search-icon { position: absolute; inset-inline-start: .7rem; z-index: 1; color: var(--semver-green); font-size: 1.2rem; pointer-events: none; }
.search-jump { width: 28px; border: 0; border-inline-start: 1px solid var(--semver-line); color: var(--semver-green); background: transparent; font-size: 1rem; font-weight: 900; cursor: pointer; }
.search-jump:hover, .search-jump:focus-visible { color: var(--semver-gold); background: rgba(89,224,163,.08); outline: none; }
.search-clear { position: absolute; inset-inline-end: .45rem; z-index: 1; width: 28px; height: 28px; border: 0; border-radius: 50%; color: var(--semver-muted); background: transparent; font: inherit; font-size: 1.15rem; line-height: 1; cursor: pointer; }
.search-clear:hover, .search-clear:focus-visible { color: var(--semver-text); background: rgba(89, 224, 163, .12); }
.node-toolbar .semver-select { transition: border-color .18s ease, background .18s ease; }
.node-toolbar .semver-select:hover { border-color: rgba(89, 224, 163, .45); background: #0b1b20; }
.semver-field-label { display: grid; gap: .4rem; color: var(--semver-muted); font-size: .75rem; font-weight: 800; }
.semver-input, .semver-select, .semver-textarea { width: 100%; min-width: 0; border: 1px solid var(--semver-line); border-radius: 11px; padding: .72rem .8rem; color: var(--semver-text); background: #071014; font: inherit; font-size: .9rem; }
.semver-input::placeholder, .semver-textarea::placeholder { color: #70868a; }
.node-toolbar-controls { display: flex; flex-wrap: wrap; gap: .4rem; }
.node-toolbar-controls .semver-button { min-width: 42px; min-height: 42px; padding: .45rem .65rem; }
.knowledge-connection { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; min-height: 2.2rem; margin-top: .45rem; padding: .4rem .55rem; border: 1px solid rgba(89,224,163,.16); border-radius: 12px; color: var(--semver-muted); background: rgba(7,16,20,.42); font-size: .72rem; }
.knowledge-connection-dot { width: .55rem; height: .55rem; flex: 0 0 auto; border-radius: 50%; background: #9cb0b2; box-shadow: 0 0 0 4px rgba(156,176,178,.08); }
.knowledge-connection-dot[data-state="loading"] { background: var(--semver-gold); box-shadow: 0 0 0 4px rgba(244,206,114,.12); }
.knowledge-connection-dot[data-state="online"] { background: var(--semver-green); box-shadow: 0 0 0 4px rgba(89,224,163,.12); }
.knowledge-connection-dot[data-state="error"] { background: var(--semver-danger); box-shadow: 0 0 0 4px rgba(255,144,144,.12); }
.knowledge-connection .semver-button { margin-inline-start: auto; min-height: 30px; padding: .3rem .65rem; font-size: .68rem; }
.quick-node-results { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: .45rem; margin: -.35rem 0 .8rem; padding: .55rem; border: 1px solid rgba(89,224,163,.2); border-radius: 14px; background: rgba(13,25,30,.86); }
.quick-node-result { display: grid; gap: .18rem; min-width: 0; padding: .55rem .65rem; border: 1px solid rgba(89,224,163,.18); border-radius: 10px; color: var(--semver-text); background: rgba(7,16,20,.8); text-align: start; cursor: pointer; }
.quick-node-result:hover, .quick-node-result:focus-visible { border-color: var(--semver-green); background: rgba(89,224,163,.1); outline: none; }
.quick-node-result strong { color: var(--semver-green); font-size: .78rem; }
.quick-node-result span { overflow: hidden; color: var(--semver-muted); font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.quick-node-result-meta { grid-column: 1 / -1; margin: 0; color: var(--semver-muted); font-size: .7rem; }
.advanced-node-search { margin: 0 0 .8rem; border: 1px solid rgba(89, 224, 163, .2); border-radius: 14px; background: rgba(13, 25, 30, .72); }
.advanced-node-search summary { padding: .75rem .9rem; color: var(--semver-green); font-size: .8rem; font-weight: 800; cursor: pointer; }
.advanced-node-search-body { display: grid; grid-template-columns: repeat(3, minmax(150px, 1fr)); gap: .65rem; padding: 0 .9rem .85rem; }
.advanced-node-search-help { grid-column: 1 / -1; margin: 0; color: var(--semver-muted); font-size: .74rem; line-height: 1.6; }
.advanced-node-results { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .45rem; margin-top: .1rem; }
.advanced-node-result { display: grid; gap: .18rem; width: 100%; padding: .55rem .65rem; border: 1px solid rgba(89, 224, 163, .18); border-radius: 10px; background: rgba(7, 16, 20, .78); color: var(--semver-text); text-align: start; cursor: pointer; transition: border-color .18s ease, transform .18s ease, background .18s ease; }
.advanced-node-result:hover, .advanced-node-result:focus-visible { border-color: var(--semver-green); background: rgba(89, 224, 163, .1); transform: translateY(-1px); outline: none; }
.advanced-node-result strong { color: var(--semver-green); font-size: .78rem; }
.advanced-node-result span { overflow: hidden; color: var(--semver-muted); font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.advanced-node-result-empty { grid-column: 1 / -1; margin: 0; color: var(--semver-muted); font-size: .75rem; }
#zoom-level { min-width: 3.4rem; align-self: center; color: var(--semver-muted); text-align: center; font-size: .76rem; }
.node-map-shell { border: 1px solid rgba(89, 224, 163, .28); border-radius: 18px; padding: .45rem; background: linear-gradient(145deg, rgba(7, 16, 20, .9), rgba(9, 27, 26, .8)); box-shadow: inset 0 0 38px rgba(89, 224, 163, .045); }
.pipe-flow-controls { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem; margin: 0 0 .45rem; border: 1px solid rgba(244, 206, 114, .25); border-radius: 12px; padding: .55rem .7rem; color: var(--semver-muted); background: rgba(22, 24, 14, .72); font-size: .76rem; }
.pipe-flow-controls strong { color: var(--semver-gold); }
.pipe-flow-controls #pipe-flow-status { margin-inline-end: auto; }
.pipe-flow-controls .semver-button { min-height: 34px; padding: .35rem .65rem; font-size: .72rem; }
.pipe-flow-indicator { width: .62rem; height: .62rem; border: 2px solid var(--semver-gold); border-radius: 50%; box-shadow: 0 0 0 4px rgba(244, 206, 114, .1), 0 0 14px rgba(244, 206, 114, .7); }
.pipe-flow-indicator.is-off { border-color: var(--semver-muted); box-shadow: 0 0 0 4px rgba(156, 176, 178, .08); }
.node-viewport { position: relative; height: min(72vh, 780px); min-height: 430px; overflow: auto; touch-action: pan-x pan-y; direction: ltr; border-radius: 14px; background-image: radial-gradient(rgba(89, 224, 163, .11) 1px, transparent 1px); background-size: 22px 22px; overscroll-behavior: contain; scrollbar-color: #295445 #0a1418; }
.network-stage-wrap { position: relative; }
.network-stage { position: absolute; inset: 0 auto auto 0; transform-origin: top left; direction: ltr; }
#network-canvas { position: absolute; z-index: 3; display: block; cursor: grab; touch-action: pan-x pan-y; pointer-events: auto; user-select: none; -webkit-user-select: none; }
#network-canvas:active { cursor: grabbing; }
#node-lines, #node-network { position: absolute; inset: 0 auto auto 0; visibility: hidden; pointer-events: none; }
#node-lines { overflow: visible; pointer-events: none; }
.network-connection { fill: none; stroke: var(--edge-hierarchy); stroke-dasharray: var(--edge-hierarchy-dash); stroke-width: 2.5; pointer-events: stroke; cursor: pointer; transition: stroke .16s ease, stroke-width .16s ease, filter .16s ease; }
.network-connection.edge-content { stroke: var(--edge-content); stroke-dasharray: var(--edge-content-dash); }
.network-connection.edge-software { stroke: var(--edge-software); stroke-dasharray: var(--edge-software-dash); }
.network-connection:hover, .network-connection:focus-visible, .network-connection.edge-focused { stroke: var(--semver-gold); stroke-width: 5; filter: drop-shadow(0 0 4px rgba(244, 206, 114, .65)); outline: none; }
.network-node.edge-node-focused { outline: 3px solid var(--semver-gold); outline-offset: 5px; box-shadow: 0 0 24px rgba(244, 206, 114, .5); }
.network-connection.path-active { stroke: var(--semver-gold); stroke-width: 3; opacity: .92; }
.network-connection.flow-active { stroke: var(--semver-gold); stroke-width: 3.5; stroke-dasharray: 8 7; animation: connectionFlow .8s linear infinite; }
@keyframes connectionFlow { to { stroke-dashoffset: -30; } }
#node-network { direction: ltr; }
.network-level-label { position: absolute; z-index: 1; border: 1px solid rgba(89, 224, 163, .22); border-radius: 999px; padding: .28rem .55rem; color: var(--semver-green); background: rgba(7, 16, 20, .92); font-size: .66rem; font-weight: 800; white-space: nowrap; }
.network-node { position: absolute; z-index: 2; display: grid; width: 60px; height: 60px; place-content: center; gap: 0; border: 2px solid rgba(89, 224, 163, .72); border-radius: 12px; padding: 0; color: #dfffee; background: linear-gradient(145deg, #183c31, #081411 78%); box-shadow: 0 0 18px rgba(89, 224, 163, .2); cursor: pointer; transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease; }
.network-node:hover, .network-node:focus-visible { z-index: 4; transform: scale(1.12); border-color: var(--semver-gold); box-shadow: 0 0 20px rgba(244, 206, 114, .28); }
.network-node[data-active="true"] { border-color: var(--semver-gold); background: radial-gradient(circle at 35% 25%, #574925, #17140b 75%); }
.network-node.is-path { outline: 2px solid rgba(244, 206, 114, .78); outline-offset: 4px; }
.network-node.is-highlighted { z-index: 5; outline: 2px solid var(--semver-gold); outline-offset: 3px; }
.network-node.is-flowing { animation: nodeFlow .6s ease-in-out 3; }
@keyframes nodeFlow { 50% { box-shadow: 0 0 24px rgba(244, 206, 114, .7); transform: scale(1.16); } }
.network-node[hidden], .network-connection[hidden], .network-level-label[hidden] { display: none !important; }
.node-plus { color: var(--semver-green); font-size: 1.3rem; line-height: .9; }
.node-id { color: #e5fff3; font-size: .68rem; font-weight: 900; letter-spacing: -.02em; }
.node-badge { position: absolute; top: -8px; inset-inline-start: 27px; max-width: 92px; overflow: hidden; border: 1px solid rgba(244, 206, 114, .6); border-radius: 999px; padding: .12rem .3rem; color: #ffefbd; background: #221d0e; font-size: .48rem; text-overflow: ellipsis; white-space: nowrap; }
.node-badge[hidden] { display: none; }

.relation-customizer { margin-bottom: .8rem; border: 1px solid rgba(89, 224, 163, .2); border-radius: 14px; background: rgba(13, 25, 30, .72); }
.relation-customizer summary { padding: .75rem .9rem; color: var(--semver-green); font-size: .8rem; font-weight: 800; cursor: pointer; }
.relation-control-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; padding: 0 .9rem .75rem; }
.relation-control-grid label { display: grid; gap: .35rem; color: var(--semver-muted); font-size: .7rem; font-weight: 800; }
.relation-control-grid label > span { display: flex; gap: .35rem; }
.relation-color { width: 36px; min-width: 36px; height: 36px; padding: 2px; border: 1px solid var(--semver-line); border-radius: 8px; background: #071014; cursor: pointer; }
.relation-style { min-width: 0; flex: 1; border: 1px solid var(--semver-line); border-radius: 8px; padding: .4rem; color: var(--semver-text); background: #071014; font: inherit; font-size: .72rem; }
.relation-customizer > .semver-button { margin: 0 .9rem .85rem; min-height: 34px; padding: .4rem .65rem; font-size: .72rem; }
.edge-legend { display: inline-flex; align-items: center; gap: .3rem; }
.edge-legend i { display: inline-block; width: 22px; border-top: 3px solid; }
.legend-hierarchy { border-color: var(--edge-hierarchy); }.legend-content { border-color: var(--edge-content); border-top-style: dashed; }.legend-software { border-color: var(--edge-software); border-top-style: dotted; }
.node-map-legend { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem; padding: .7rem .35rem .2rem; color: var(--semver-muted); font-size: .73rem; }
.node-map-legend strong { color: var(--semver-gold); }
.node-centrality-panel { margin: 1rem 0; padding: 1rem; border: 1px solid rgba(89, 224, 163, .2); border-radius: 16px; background: linear-gradient(145deg, rgba(13, 25, 30, .95), rgba(10, 28, 28, .85)); }
.node-centrality-head { display: flex; align-items: start; justify-content: space-between; gap: 1rem; }
.node-centrality-head h2 { margin: 0 0 .3rem; font-size: 1.1rem; }
.node-centrality-head p { margin: 0; color: var(--semver-muted); font-size: .78rem; line-height: 1.7; }
.node-centrality-method { flex: 0 0 auto; border: 1px solid rgba(244, 206, 114, .25); border-radius: 999px; padding: .35rem .6rem; color: var(--semver-gold); font-size: .7rem; }
.node-centrality-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin-top: .8rem; }
.node-centrality-grid h3 { margin: 0 0 .4rem; color: var(--semver-green); font-size: .82rem; }
.node-centrality-grid ol { display: grid; gap: .35rem; margin: 0; padding-inline-start: 1.5rem; }
.node-centrality-grid li { color: var(--semver-muted); font-size: .75rem; }
.node-centrality-grid button { width: 100%; border: 1px solid var(--semver-line); border-radius: 8px; padding: .45rem .55rem; color: var(--semver-text); background: rgba(16, 33, 39, .85); font: inherit; text-align: start; cursor: pointer; }
.node-centrality-grid button:hover, .node-centrality-grid button:focus-visible { border-color: var(--semver-gold); color: var(--semver-gold); outline: none; }
.network-node.centrality-focus { border-color: var(--semver-gold); box-shadow: 0 0 0 4px rgba(244, 206, 114, .18), 0 0 24px rgba(244, 206, 114, .4); z-index: 8; }
.node-status, .hub-status { min-height: 1.4em; margin: .65rem 0 0; color: var(--semver-muted); font-size: .8rem; }
.sovereign-dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; }
.sovereign-panel { min-width: 0; border: 1px solid rgba(6, 182, 212, .38); border-radius: 16px; padding: 1rem; background: linear-gradient(145deg, rgba(11, 15, 25, .98), rgba(7, 16, 20, .94)); box-shadow: 0 16px 45px rgba(0, 0, 0, .2); }
.sovereign-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: .7rem; border-bottom: 1px solid var(--semver-line); padding-bottom: .6rem; }
.sovereign-panel-heading h3 { margin: 0; color: var(--semver-green); font-size: 1rem; }
.sovereign-live { color: var(--semver-green); font-size: .68rem; font-weight: 900; white-space: nowrap; }
.swarm-toggle { width: 100%; min-height: 36px; margin-top: .7rem; padding: .4rem .7rem; font-size: .75rem; }
.network-node.is-swarm-active { z-index: 8; border-color: var(--semver-gold); color: #071014; background: var(--semver-gold); box-shadow: 0 0 0 5px rgba(244,206,114,.18), 0 0 24px rgba(244,206,114,.48); animation: swarm-node-pulse 1s ease-in-out infinite alternate; }
@keyframes swarm-node-pulse { from { transform: scale(1); } to { transform: scale(1.12); } }
.sovereign-muted { margin: .6rem 0 0; color: var(--semver-muted); font-size: .75rem; line-height: 1.7; }
.swarm-report-panel { margin-top: .85rem; }
.swarm-report-actions { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .7rem; }
.swarm-report-actions .semver-button { min-height: 36px; padding: .4rem .7rem; font-size: .72rem; }
.swarm-report-log { display: grid; gap: .35rem; max-height: 230px; overflow: auto; margin-top: .7rem; padding: .5rem; border: 1px solid #1f2937; border-radius: 10px; background: #010409; }
.swarm-report-entry { display: grid; grid-template-columns: auto 1fr auto; gap: .5rem; align-items: center; padding: .4rem .5rem; border-bottom: 1px solid rgba(128,171,160,.12); color: var(--semver-muted); font-size: .68rem; }
.swarm-report-entry:last-child { border-bottom: 0; }
.swarm-report-entry strong { color: var(--semver-green); }
.swarm-report-entry code { overflow: hidden; color: #38bdf8; text-overflow: ellipsis; white-space: nowrap; }
.agent-code-view { display: grid; gap: .18rem; min-height: 170px; margin-top: .75rem; overflow: hidden; border: 1px solid #1f2937; border-radius: 10px; padding: .75rem; color: #38bdf8; background: #010409; font: .68rem/1.7 ui-monospace, SFMono-Regular, Menlo, monospace; }
.agent-code-line { overflow: hidden; padding: .2rem .3rem; opacity: .4; text-overflow: ellipsis; white-space: nowrap; transition: opacity .25s ease, background .25s ease, color .25s ease; }
.agent-code-line.is-active { opacity: 1; color: #fff; background: rgba(6, 182, 212, .15); }
.surah-radar { display: grid; gap: .55rem; min-height: 170px; place-content: center; margin-top: .75rem; border: 1px solid #1f2937; border-radius: 10px; padding: 1rem; text-align: center; background: radial-gradient(circle, rgba(6, 182, 212, .14), transparent 62%), #010409; }
.surah-radar strong { color: var(--semver-gold); font-size: 1.25rem; }
.surah-radar span { color: var(--semver-muted); font-size: .75rem; }
.radar-meter { height: 6px; overflow: hidden; border-radius: 999px; background: #1f2937; }
.radar-meter span { display: block; height: 100%; width: 1%; border-radius: inherit; background: linear-gradient(90deg, #06b6d4, #10b981); transition: width .3s ease; }
.sovereign-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .65rem; margin-top: .85rem; }
.sovereign-metrics > div { border: 1px solid var(--semver-line); border-inline-start: 3px solid var(--semver-green); border-radius: 12px; padding: .7rem .8rem; background: rgba(13, 25, 30, .72); }
.sovereign-metrics span { display: block; color: var(--semver-muted); font-size: .7rem; }
.sovereign-metrics strong { display: block; margin-top: .2rem; color: #06b6d4; font-size: 1.15rem; }
.semver-note { margin: .75rem 0 0; border-inline-start: 3px solid var(--semver-gold); border-radius: 8px; padding: .75rem .9rem; color: var(--semver-muted); background: rgba(244, 206, 114, .055); font-size: .8rem; line-height: 1.8; }
.report-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.report-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .6rem; margin: .85rem 0; }
.report-metric, .report-card { border: 1px solid var(--semver-line); border-radius: 13px; padding: .8rem; background: rgba(7, 16, 20, .7); }
.report-metric span { display: block; color: var(--semver-muted); font-size: .72rem; }
.report-metric strong { display: block; margin-top: .25rem; color: var(--semver-green); font-size: 1.2rem; }
.report-card { display: grid; gap: .35rem; }
.report-card strong { color: var(--semver-green); font-size: .88rem; }
.report-card small, .report-card p { overflow-wrap: anywhere; margin: 0; color: var(--semver-muted); font-size: .75rem; line-height: 1.7; }
.report-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: .65rem; max-height: 640px; overflow: auto; }

.report-tunnel { display: grid; grid-template-columns: minmax(250px, .72fr) minmax(0, 1.28fr); gap: .8rem; align-items: start; }
.info-chat-panel { min-width: 0; border: 1px solid rgba(89, 224, 163, .22); border-radius: 16px; padding: .85rem; background: linear-gradient(160deg, rgba(12, 32, 35, .96), rgba(7, 19, 23, .96)); }
.info-chat-heading { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; border-bottom: 1px solid var(--semver-line); padding-bottom: .6rem; }
.info-chat-heading .semver-kicker { margin: 0; }
.info-chat-heading h3 { flex: 1 1 100%; order: 3; margin: 0; color: var(--semver-text); font-size: 1.05rem; }
.info-chat-live { color: var(--semver-green); font-size: .68rem; font-weight: 900; }
.info-chat-intro { margin: .65rem 0; color: var(--semver-muted); font-size: .74rem; line-height: 1.7; }
.info-chat-log { display: grid; gap: .55rem; max-height: 570px; overflow: auto; padding-inline-end: .15rem; }
.info-chat-message { border: 1px solid rgba(89, 224, 163, .15); border-radius: 13px 13px 4px 13px; padding: .65rem; background: rgba(18, 42, 45, .72); }
.info-chat-message.info-chat-system { border-color: rgba(244, 206, 114, .28); border-radius: 13px; color: var(--semver-gold); background: rgba(78, 63, 25, .24); font-size: .76rem; line-height: 1.6; }
.info-chat-message strong { display: block; color: var(--semver-green); font-size: .75rem; overflow-wrap: anywhere; }
.info-chat-message p { margin: .28rem 0 .5rem; color: var(--semver-muted); font-size: .72rem; line-height: 1.6; overflow-wrap: anywhere; }
.info-chat-actions { display: flex; justify-content: flex-start; }
.info-chat-preview { border: 1px solid rgba(89, 224, 163, .35); border-radius: 999px; padding: .35rem .55rem; color: var(--semver-green); background: rgba(89, 224, 163, .07); font: inherit; font-size: .68rem; font-weight: 800; cursor: pointer; }
.info-chat-preview:hover, .info-chat-preview:focus-visible { border-color: var(--semver-green); background: rgba(89, 224, 163, .15); }
.validator-grid, .grammar-grid, .example-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; }
.validator-row { display: flex; gap: .6rem; }
.validator-row .semver-input { flex: 1; }
.version-result { min-height: 3rem; margin-top: .75rem; border: 1px solid var(--semver-line); border-radius: 12px; padding: .8rem; color: var(--semver-muted); background: rgba(7, 16, 20, .7); line-height: 1.7; }
.version-result.valid { border-color: rgba(89, 224, 163, .42); color: var(--semver-green); }
.version-result.invalid { border-color: rgba(255, 144, 144, .42); color: var(--semver-danger); }
.example-buttons { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .7rem; }
.example-chip { border: 1px solid var(--semver-line); border-radius: 999px; padding: .35rem .6rem; color: var(--semver-muted); background: transparent; font: inherit; font-size: .74rem; cursor: pointer; }
.mod9-card { border: 1px solid #06b6d4; border-radius: 16px; padding: clamp(1rem, 3vw, 1.5rem); color: #f9fafb; background: #0b0f19; box-shadow: 0 18px 55px rgba(0, 0, 0, .24), inset 0 0 28px rgba(6, 182, 212, .04); font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Courier New", monospace; }
.mod9-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: .8rem; }
.mod9-heading h2 { margin: 0; color: #06b6d4; font-family: system-ui, sans-serif; font-size: clamp(1.25rem, 3vw, 1.7rem); }
.mod9-badge { flex: 0 0 auto; border: 1px solid rgba(16, 185, 129, .4); border-radius: 999px; padding: .35rem .55rem; color: #10b981; background: rgba(16, 185, 129, .08); font-size: .68rem; }
.mod9-citation { margin: .75rem 0 0; color: #9ca3af; font-family: system-ui, sans-serif; font-size: .78rem; line-height: 1.8; }
.mod9-note { max-width: 850px; margin: .7rem 0 1rem; color: #9ca3af; font-family: system-ui, sans-serif; font-size: .8rem; line-height: 1.8; }
.mod9-input-row { display: flex; align-items: end; gap: .65rem; }
.mod9-input-row .semver-field-label { flex: 1; color: #10b981; }
.mod9-input-row .semver-input { border-color: #1f2937; color: #38bdf8; background: #030712; }
.mod9-input-row .semver-button { border-color: transparent; color: #030712; background: #06b6d4; }
.mod9-help { margin: .55rem 0 0; color: #64748b; font-size: .68rem; }
.mod9-results { min-height: 118px; margin-top: .8rem; border: 1px solid #1f2937; border-radius: 10px; padding: .85rem; color: #e5e7eb; background: #030712; font-size: .75rem; line-height: 1.9; }
.mod9-results[data-state="error"] { border-color: rgba(255, 144, 144, .55); color: #ffb4b4; }
.mod9-summary { display: flex; flex-wrap: wrap; gap: .45rem; margin: 0 0 .65rem; }
.mod9-summary span { border: 1px solid rgba(6, 182, 212, .3); border-radius: 999px; padding: .2rem .45rem; color: #38bdf8; }
.mod9-operation { display: grid; grid-template-columns: minmax(145px, .8fr) minmax(120px, 1fr) minmax(100px, .65fr); gap: .55rem; align-items: center; border-top: 1px solid #1f2937; padding: .42rem 0; }
.mod9-operation strong { color: #f9fafb; font-weight: 600; }
.mod9-operation code { overflow-wrap: anywhere; color: #cbd5e1; }
.mod9-root { color: #10b981; font-weight: 800; }
.mod9-root.is-neutral { color: #f59e0b; }
.mod9-explanation { margin: .65rem 0 0; color: #94a3b8; font-family: system-ui, sans-serif; font-size: .75rem; line-height: 1.7; }
.quran-analysis-panel { margin-top: 1rem; border: 1px solid rgba(244, 206, 114, .36); border-radius: 14px; padding: .9rem; background: linear-gradient(145deg, rgba(31, 28, 13, .7), rgba(7, 16, 20, .8)); }
.quran-analysis-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; }
.quran-analysis-heading .semver-kicker { margin: 0 0 .2rem; color: var(--semver-gold); }
.quran-analysis-heading h3 { margin: 0; color: #f8e7ad; font-family: system-ui, sans-serif; font-size: 1rem; }
.quran-analysis-heading > span { color: var(--semver-muted); font-size: .72rem; white-space: nowrap; }
.quran-analysis-controls { display: flex; align-items: end; gap: .6rem; margin-top: .75rem; }
.quran-analysis-controls .semver-field-label { flex: 1; color: var(--semver-gold); }
.quran-analysis-controls .semver-button { min-height: 40px; border-color: rgba(244, 206, 114, .45); color: #1b1708; background: var(--semver-gold); }
.quran-analysis-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .45rem; margin-top: .7rem; }
.quran-analysis-summary span { border: 1px solid rgba(244, 206, 114, .24); border-radius: 9px; padding: .45rem .5rem; color: #e8dcae; background: rgba(244, 206, 114, .06); font-size: .72rem; }
.quran-analysis-note { margin: .65rem 0 0; color: var(--semver-muted); font-family: system-ui, sans-serif; font-size: .7rem; line-height: 1.7; }
.grammar-card { padding: 1rem; }
.grammar-card h3 { margin: 0 0 .75rem; font-size: 1rem; }
.grammar-card pre { overflow: auto; margin: 0; border: 1px solid rgba(89, 224, 163, .14); border-radius: 12px; padding: .9rem; color: #d5e7df; background: #071014; direction: ltr; text-align: left; font: .77rem/1.85 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.semver-footer { border-top: 1px solid var(--semver-line); padding: 1.5rem 0 2rem; color: var(--semver-muted); }
.semver-footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .7rem; font-size: .85rem; }
.semver-footer a { color: var(--semver-text); font-weight: 800; }
.site-license-notice { max-width: 72rem; margin: 1rem auto 0; border-top: 1px solid var(--semver-line); padding: 1rem 1rem 0; text-align: center; font-size: .82rem; line-height: 1.75; }
.site-license-notice p { margin: 0 0 .35rem; }
.site-license-notice img { width: 1em; height: 1em; vertical-align: middle; }
.hub-modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 1rem; background: rgba(2, 6, 8, .78); backdrop-filter: blur(12px); }
.hub-modal[hidden] { display: none !important; }
.hub-dialog { width: min(1040px, 100%); max-height: min(94vh, 1000px); overflow: auto; border: 1px solid rgba(89, 224, 163, .38); border-radius: 20px; padding: clamp(1rem, 3vw, 1.5rem); background: linear-gradient(150deg, #102127, #091317 70%); box-shadow: 0 24px 90px rgba(0, 0, 0, .62); }
.hub-dialog.is-fullscreen { width: 100vw; height: 100vh; max-height: 100vh; border-radius: 0; }
.hub-dialog.is-minimized { width: min(540px, 100%); max-height: 76px; overflow: hidden; padding-block: .75rem; }
.hub-dialog.is-minimized > :not(.hub-dialog-head) { display: none; }
.hub-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .8rem; }
.hub-dialog-head h2 { margin: .2rem 0 .4rem; font-size: 1.45rem; }
.hub-dialog-head p { margin: 0; color: var(--semver-muted); font-size: .83rem; line-height: 1.7; }
.hub-number { color: var(--semver-green); font-family: ui-monospace, monospace; }
.hub-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .85rem; margin-top: 1rem; }
.hub-form-grid .full { grid-column: 1 / -1; }
.semver-textarea { min-height: 150px; resize: vertical; line-height: 1.65; }
.hub-tip { margin: .65rem 0 0; color: var(--semver-muted); font-size: .75rem; line-height: 1.8; }
.hub-actions { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .8rem; padding: .65rem 0; background: linear-gradient(180deg, #102127 78%, rgba(16, 33, 39, 0)); }
.hub-actions .semver-button { min-height: 40px; padding: .55rem .72rem; font-size: .78rem; }
.browser-frame { overflow: hidden; margin-top: .75rem; border: 1px solid var(--semver-line); border-radius: 14px; background: #fff; }
.browser-toolbar { display: flex; align-items: center; gap: .4rem; padding: .55rem .7rem; border-bottom: 1px solid #d4dfdd; color: #34524c; background: #f2f7f5; font-size: .72rem; }
.browser-dot { width: 9px; height: 9px; border-radius: 50%; background: #ff7979; }
.browser-dot:nth-child(2) { background: #f4c75e; }
.browser-dot:nth-child(3) { background: #52d09a; }
.browser-address { min-width: 0; overflow: hidden; margin-inline-start: .4rem; color: #36524e; text-overflow: ellipsis; white-space: nowrap; }
.hub-preview { display: block; width: 100%; height: clamp(300px, 58vh, 680px); border: 0; background: #fff; }
.hub-extraction { margin-top: .75rem; border: 1px solid rgba(89, 224, 163, .2); border-radius: 12px; padding: .8rem; color: var(--semver-muted); background: rgba(7, 16, 20, .7); font-size: .78rem; line-height: 1.75; }
.hub-extraction strong { color: var(--semver-gold); }
.hub-extraction pre { max-height: 180px; overflow: auto; margin: .4rem 0 0; color: var(--semver-text); white-space: pre-wrap; overflow-wrap: anywhere; }

/* بطاقة العقدة مستوحاة من المعاينة البيضاء في الصورة المرجعية */
.hub-dialog { color: #142b35; border-color: rgba(36, 153, 194, .28); background: #fff; box-shadow: 0 26px 90px rgba(2, 29, 39, .34); }
.hub-dialog .semver-kicker { color: #1d9fc9; }
.hub-dialog-head { padding-bottom: 1rem; border-bottom: 1px solid #dbe8eb; }
.hub-title-block { display: flex; align-items: center; gap: .85rem; min-width: 0; }
.hub-site-logo { width: 54px; height: 54px; flex: 0 0 auto; object-fit: cover; border: 1px solid #c7e4ed; border-radius: 16px; box-shadow: 0 7px 18px rgba(19, 120, 155, .12); }
.hub-dialog-head h2 { color: #16343f; }
.hub-dialog-head p, .hub-tip, .hub-status { color: #60767d; }
.hub-number { color: #1c9bc5; }
.hub-dialog .semver-button { border-color: #c9dde2; color: #1b4654; background: #f5fafb; }
.hub-dialog .semver-button:hover { border-color: #1c9bc5; background: #eaf8fc; }
.hub-dialog .semver-button-primary { color: #fff; border-color: transparent; background: linear-gradient(135deg, #26a9d2, #147ea4); }
.hub-dialog .semver-button-danger { color: #a33d3d; border-color: #efcaca; background: #fff7f7; }
.hub-dialog .semver-input, .hub-dialog .semver-textarea { color: #16343f; border-color: #cbdde1; background: #fbfdfd; }
.hub-dialog .semver-input::placeholder, .hub-dialog .semver-textarea::placeholder { color: #8aa0a5; }
.hub-dialog .semver-field-label { color: #52717a; }
.hub-link-state { margin-top: .7rem; padding: .55rem .75rem; border: 1px solid #d5e8ed; border-radius: 10px; color: #52717a; background: #f7fbfc; font-size: .76rem; }
.hub-link-state[data-state="healthy"] { color: #147a56; border-color: #9ad9bd; background: #effbf5; }
.hub-link-state[data-state="checking"] { color: #8a6714; border-color: #ead69a; background: #fff9e7; }
.hub-link-state[data-state="needs-review"], .hub-link-state[data-state="cors-blocked"] { color: #9a4e22; border-color: #efc49d; background: #fff7ef; }
.hub-link-state[data-state="local-only"] { color: #52717a; }
.hub-analysis { margin-top: 1rem; border: 1px solid #d5e8ed; border-radius: 16px; padding: 1rem; background: linear-gradient(145deg, #fff, #f2f9fb); }
.hub-analysis-heading { display: flex; align-items: baseline; justify-content: space-between; gap: .7rem; border-bottom: 1px solid #dbe8eb; padding-bottom: .65rem; }
.hub-analysis-label { color: #248eae; font-size: .66rem; font-weight: 900; letter-spacing: .12em; }
.hub-analysis h3 { margin: 0; color: #173945; font-size: 1.05rem; }
.hub-analysis-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem 1.4rem; margin: .85rem 0 0; padding: 0 1.35rem 0 0; color: #60767d; counter-reset: analysis; }
.hub-analysis-list li { padding: .15rem 0 .15rem .15rem; line-height: 1.6; }
.hub-analysis-list li::marker { color: #219fc7; font-weight: 900; }
.hub-analysis-list strong { display: block; color: #1b4958; font-size: .82rem; }
.hub-analysis-list span { display: block; font-size: .75rem; }
.hub-quran-analysis { margin-top: 1rem; border: 1px solid rgba(89, 224, 163, .22); border-radius: 16px; padding: 1rem; color: var(--semver-text); background: linear-gradient(145deg, rgba(16, 33, 39, .98), rgba(7, 16, 20, .98)); }
.hub-quran-analysis .hub-analysis-heading { border-bottom-color: rgba(89, 224, 163, .18); }
.hub-quran-analysis .hub-analysis-label { color: var(--semver-green); }
.hub-quran-analysis h3 { margin: 0; color: var(--semver-text); font-size: 1.05rem; }
.hub-quran-analysis-body { display: grid; gap: .7rem; margin-top: .8rem; }
.hub-quran-analysis-body strong { color: var(--semver-gold); font-size: .86rem; }
.hub-quran-values { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .45rem; }
.hub-quran-values span { border: 1px solid rgba(89, 224, 163, .16); border-radius: 10px; padding: .48rem .55rem; color: var(--semver-muted); background: rgba(7, 16, 20, .55); font-size: .72rem; }
.hub-quran-analysis-body small { color: var(--semver-muted); line-height: 1.7; }
.hub-quran-tests { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem; }
.hub-quran-tests span { border-inline-start: 3px solid var(--semver-gold); border-radius: 8px; padding: .42rem .55rem; color: var(--semver-text); background: rgba(244, 206, 114, .06); font-size: .7rem; }
.hub-quran-tests small { grid-column: 1 / -1; }
.hub-quran-api-controls { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; }
.hub-quran-api-controls input { min-width: 220px; flex: 1; border: 1px solid rgba(89, 224, 163, .24); border-radius: 8px; padding: .5rem .6rem; color: var(--semver-text); background: rgba(7, 16, 20, .75); }
.hub-quran-api-controls input:focus { outline: 2px solid rgba(89, 224, 163, .5); outline-offset: 1px; }
.hub-quran-api-controls span { color: var(--semver-muted); font-size: .68rem; }
.hub-quran-api-controls span[data-state="ok"] { color: var(--semver-green); }
.hub-quran-api-controls span[data-state="error"] { color: #f3a6a6; }
.hub-dialog .browser-frame { border-color: #cbdde1; }
.hub-dialog .browser-toolbar { color: #38606b; background: #f1f8f9; }
.hub-dialog .hub-extraction { border-color: #cfe5ea; color: #60767d; background: #f7fbfc; }
.hub-dialog .hub-extraction strong { color: #1885a6; }
.hub-dialog .hub-extraction pre { color: #294c57; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }

@media (max-width: 980px) {
  .semver-hero-grid { grid-template-columns: 1fr; }
  .orbit-card { max-width: 720px; }
  .node-toolbar { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .advanced-node-search-body { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .node-toolbar-controls { grid-column: 1 / -1; }
  .sovereign-dashboard-grid { grid-template-columns: 1fr; }
  .sovereign-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .semver-container { width: min(100% - 1.1rem, 1240px); }
  .semver-header-inner { min-height: 62px; flex-wrap: wrap; padding-block: .5rem; }
  .semver-menu-toggle { display: inline-grid; place-items: center; }
  .semver-nav { display: none; width: 100%; align-items: stretch; flex-direction: column; gap: 0; padding: .25rem 0 .5rem; }
  .semver-nav.is-open { display: flex; }
  .semver-nav a { padding: .7rem .2rem; border-top: 1px solid var(--semver-line); }
  .node-plan-content { padding-inline: .9rem; }
  .node-plan-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
  .node-plan-arrow { display: none; }
  .node-plan-stage { min-height: 125px; }
  .node-plan-steps { grid-template-columns: 1fr; }
  .semver-hero { padding-top: 2rem; }
  .semver-hero h1 { font-size: clamp(2rem, 11vw, 3.1rem); }
  .semver-section-head { align-items: flex-start; flex-direction: column; }
  .semver-stat-row { gap: .45rem; }
  .semver-stat { padding: .65rem; }
  .semver-stat strong { font-size: 1.05rem; }
  .node-toolbar { grid-template-columns: 1fr; margin-inline: 0; }
  .relation-control-grid { grid-template-columns: 1fr; }
  .node-toolbar-controls { grid-column: auto; }
  .node-toolbar-controls .semver-button { flex: 1; }
  .sovereign-metrics { gap: .45rem; }
  .sovereign-metrics > div { padding: .6rem; }
  .mod9-heading { flex-direction: column; }
  .mod9-input-row { align-items: stretch; flex-direction: column; }
  .mod9-input-row .semver-button { width: 100%; }
  .mod9-operation { grid-template-columns: 1fr; gap: .12rem; }
  .mod9-operation code, .mod9-operation span { padding-inline-start: .2rem; }
  .pipe-flow-controls #pipe-flow-status { flex-basis: 100%; order: 3; }
  .pipe-flow-controls .semver-button { margin-inline-start: auto; }
  .node-viewport { position: relative; height: 62vh; min-height: 390px; }
  .validator-grid, .grammar-grid, .example-grid { grid-template-columns: 1fr; }
  .validator-row { flex-direction: column; }
  .report-tunnel { grid-template-columns: 1fr; }
  .info-chat-log { max-height: 360px; }
  .hub-form-grid { grid-template-columns: 1fr; }
  .hub-form-grid .full { grid-column: auto; }
  .hub-analysis-list { grid-template-columns: 1fr; }
  .hub-analysis-heading { align-items: flex-start; flex-direction: column; }
  .hub-dialog { max-height: 98vh; border-radius: 15px; }
  .hub-actions { position: static; }
  .hub-actions .semver-button { flex: 1 1 135px; }
  .hub-preview { height: 48vh; min-height: 260px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
.report-preview-button { justify-self: start; border: 1px solid rgba(89, 224, 163, .35); border-radius: 999px; padding: .38rem .6rem; color: var(--semver-green); background: rgba(89, 224, 163, .07); font: inherit; font-size: .68rem; font-weight: 800; cursor: pointer; }
.report-preview-button:hover, .report-preview-button:focus-visible { border-color: var(--semver-green); background: rgba(89, 224, 163, .15); }

.external-link-modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: clamp(.7rem, 3vw, 2rem); background: rgba(3, 10, 13, .72); backdrop-filter: blur(10px); }
.external-link-modal[hidden] { display: none !important; }
.external-link-dialog { display: grid; grid-template-rows: auto auto minmax(0, 1fr); width: min(1120px, 100%); height: min(90vh, 900px); overflow: hidden; border: 1px solid #cfe2e7; border-radius: 18px; background: #fff; box-shadow: 0 30px 100px rgba(0, 0, 0, .45); }
.external-link-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1rem 1.2rem; border-bottom: 1px solid #dbe8eb; }
.external-link-heading { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.external-link-heading img { width: 44px; height: 44px; object-fit: cover; border-radius: 12px; border: 1px solid #cce4ea; }
.external-link-kicker { display: block; color: #208eae; font-size: .65rem; font-weight: 900; letter-spacing: .12em; }
.external-link-header h2 { margin: .18rem 0 .15rem; color: #183b47; font-size: 1.15rem; }
.external-link-header p { max-width: 65vw; margin: 0; overflow: hidden; color: #71868c; font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.external-link-close { width: 42px; height: 42px; flex: 0 0 auto; border: 0; border-radius: 50%; color: #345762; background: #edf5f7; font: inherit; font-size: 1.8rem; line-height: 1; cursor: pointer; }
.external-link-close:hover, .external-link-close:focus-visible { color: #fff; background: #239bc2; }
.external-link-actions { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .55rem 1.2rem; color: #607980; background: #f4fafb; font-size: .75rem; }
.external-link-actions a { border: 1px solid #b9dce6; border-radius: 999px; padding: .35rem .65rem; color: #197c9f; font-weight: 800; text-decoration: none; }
.external-link-frame { width: 100%; height: 100%; min-height: 300px; border: 0; background: #fff; }
@media (max-width: 640px) { .external-link-dialog { height: 94vh; border-radius: 14px; } .external-link-header { padding: .8rem; } .external-link-actions { padding-inline: .8rem; } .external-link-actions span { max-width: 58%; } }
/* Dark external preview: avoid a bright white modal surface */
.external-link-dialog { border-color: rgba(89, 224, 163, .28); color: var(--semver-text); background: #0d191e; box-shadow: 0 30px 100px rgba(0, 0, 0, .62); }
.external-link-header { border-bottom-color: rgba(128, 171, 160, .2); background: #102127; }
.external-link-heading img { border-color: rgba(89, 224, 163, .35); }
.external-link-header h2 { color: var(--semver-text); }
.external-link-header p { color: var(--semver-muted); }
.external-link-close { color: var(--semver-text); background: #183238; }
.external-link-close:hover, .external-link-close:focus-visible { color: #061317; background: var(--semver-green); }
.external-link-actions { color: var(--semver-muted); background: #0a1519; }
.external-link-actions a { border-color: rgba(89, 224, 163, .35); color: var(--semver-green); background: rgba(89, 224, 163, .06); }
.external-link-frame { background: #0a1519; }
/* Dark input area for adding node links and local HTML */
.hub-dialog .hub-form-grid { padding: .85rem; border: 1px solid rgba(89, 224, 163, .18); border-radius: 14px; background: #0a1519; }
.hub-dialog .semver-input, .hub-dialog .semver-textarea { color: #e8f0ee; border-color: rgba(89, 224, 163, .28); background: #071014; caret-color: var(--semver-green); }
.hub-dialog .semver-input:focus, .hub-dialog .semver-textarea:focus { border-color: var(--semver-green); box-shadow: 0 0 0 3px rgba(89, 224, 163, .12); }
.hub-dialog .semver-input::placeholder, .hub-dialog .semver-textarea::placeholder { color: #789296; }

.node-import-file { display: none; }
@media (max-width: 640px) { .node-toolbar-controls .semver-button { flex: 1 1 135px; } .advanced-node-search-body { grid-template-columns: 1fr; } }

.network-node { touch-action: none; user-select: none; }
.network-node.is-dragging { z-index: 8; cursor: grabbing; border-color: var(--semver-gold); box-shadow: 0 0 26px rgba(244, 206, 114, .45); }

.network-node { cursor: grab; -webkit-tap-highlight-color: transparent; }
.network-node:active, .network-node.is-dragging { cursor: grabbing; }
@media (hover: none) and (pointer: coarse) {
  .network-node { width: 50px; height: 50px; }
  .node-viewport { touch-action: pan-x pan-y; -webkit-overflow-scrolling: touch; }
  .network-node { touch-action: none; }
}

.node-chat-room { border: 1px solid rgba(89,224,163,.25); border-radius: 22px; padding: clamp(1rem,3vw,1.5rem); background: linear-gradient(145deg,#0d191e,#081216); box-shadow: 0 22px 60px rgba(0,0,0,.22); }
.node-chat-room-head { display:flex; align-items:flex-start; justify-content:space-between; gap:1rem; border-bottom:1px solid var(--semver-line); padding-bottom:1rem; }.node-chat-brand { display:flex; align-items:center; gap:.75rem; }.node-chat-brand img { width:46px; height:46px; object-fit:cover; border-radius:14px; border:1px solid rgba(89,224,163,.4); }.node-chat-brand h2 { margin:.15rem 0 .3rem; font-size:clamp(1.25rem,3vw,1.8rem); }.node-chat-brand p:last-child { margin:0; color:var(--semver-muted); font-size:.78rem; }.node-chat-room-search { display:grid; gap:.4rem; max-width:520px; margin:1rem 0; color:var(--semver-muted); font-size:.75rem; font-weight:800; }.node-chat-room-search input { margin-top:.1rem; }.node-chat-room-log { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,250px),1fr)); gap:.55rem; max-height:520px; overflow:auto; padding:.15rem; }.node-chat-message { display:grid; gap:.3rem; border:1px solid rgba(128,171,160,.16); border-radius:13px; padding:.7rem; background:#0f2025; cursor:pointer; }.node-chat-message:hover,.node-chat-message.is-selected { border-color:rgba(89,224,163,.55); background:#122a2e; }.node-chat-message strong { color:var(--semver-green); font-size:.8rem; }.node-chat-message span { color:var(--semver-muted); font-size:.7rem; line-height:1.6; overflow-wrap:anywhere; }.node-chat-room-status { min-height:1.4em; margin:.8rem 0 0; color:var(--semver-muted); font-size:.75rem; }
.ollama-panel { margin-top: 1rem; border: 1px solid rgba(96,184,255,.28); border-radius: 16px; padding: 1rem; background: linear-gradient(145deg, rgba(11,25,38,.94), rgba(7,16,20,.96)); }
.ollama-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:.8rem; border-bottom:1px solid var(--semver-line); padding-bottom:.65rem; }.ollama-heading h3 { margin:.15rem 0 0; color:#b9dcff; font-size:1.05rem; }.ollama-heading .semver-kicker { margin:0; color:#60b8ff; }
.ollama-note { margin:.65rem 0; color:var(--semver-muted); font-size:.72rem; line-height:1.7; }.ollama-config { display:grid; grid-template-columns:1.5fr 1fr; gap:.6rem; }.ollama-config .semver-field-label,.ollama-prompt-label { color:#b9dcff; font-size:.74rem; }.ollama-config input,.ollama-prompt-label textarea { margin-top:.3rem; border-color:rgba(96,184,255,.3); }
.ollama-constraints { display:flex; flex-wrap:wrap; gap:.35rem; margin:.65rem 0; }.ollama-constraints span { border:1px solid rgba(96,184,255,.22); border-radius:999px; padding:.25rem .45rem; color:#9dc8ee; background:rgba(96,184,255,.06); font-size:.64rem; }
.ollama-prompt-label { display:grid; margin-top:.55rem; }.ollama-prompt-label textarea { resize:vertical; }.ollama-actions { display:flex; flex-wrap:wrap; gap:.45rem; margin-top:.55rem; }.ollama-answer { min-height:70px; margin-top:.65rem; border:1px solid #1f2937; border-radius:10px; padding:.75rem; color:#e5f2ff; background:#030712; font-size:.76rem; line-height:1.8; white-space:pre-wrap; }.ollama-answer[data-state="error"] { border-color:rgba(255,144,144,.55); color:#ffb4b4; }
@media (max-width:640px) { .node-chat-room-head { align-items:flex-start; flex-direction:column; } .node-chat-room-log { grid-template-columns:1fr; } }
.node-ai-controls { flex-wrap: wrap; }.node-ai-controls input { min-width: 0; }.node-ai-model-grid { grid-template-columns:1fr; }
.node-ai-panel { margin-top:1rem; border:1px solid rgba(6,182,212,.28); border-radius:16px; padding:.9rem; background:linear-gradient(145deg,rgba(7,26,33,.96),rgba(7,16,20,.96)); }.node-ai-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:.8rem; }.node-ai-heading h3 { margin:0; color:#c9fbff; font-size:1.05rem; }.node-ai-heading p:not(.semver-kicker) { margin:.35rem 0 0; color:var(--semver-muted); font-size:.72rem; line-height:1.7; }.node-ai-controls { display:flex; gap:.5rem; margin-top:.75rem; }.node-ai-controls input { flex:1; }.node-ai-local-model { margin-top:.7rem; color:var(--semver-muted); font-size:.72rem; }.node-ai-local-model summary { cursor:pointer; color:var(--semver-green); }.node-ai-model-grid { display:grid; grid-template-columns:.8fr 1.5fr .8fr; gap:.5rem; margin-top:.6rem; }.node-ai-model-grid label { display:grid; gap:.25rem; color:var(--semver-muted); }.node-ai-model-grid .semver-input,.node-ai-model-grid .semver-select { width:100%; min-width:0; }.node-ai-chat-log { display:grid; gap:.55rem; max-height:420px; overflow:auto; margin-top:.75rem; }.node-ai-message { border:1px solid rgba(89,224,163,.16); border-radius:12px; padding:.65rem .75rem; color:var(--semver-muted); background:rgba(18,42,45,.72); font-size:.76rem; line-height:1.75; white-space:pre-wrap; }.node-ai-message.user { border-color:rgba(6,182,212,.3); color:#b9f5ff; background:rgba(6,182,212,.08); }.node-ai-message strong { display:block; margin-bottom:.25rem; color:var(--semver-green); font-size:.7rem; }

.node-plan-stack-explicit { display: grid; gap: .32rem; }
.node-plan-stack-explicit span { border-inline-start: 2px solid var(--semver-green); padding-inline-start: .55rem; }
.node-plan-stack-explicit span:nth-child(2) { border-color: #6ee7b7; }
.node-plan-stack-explicit span:nth-child(3) { border-color: #83e8cf; }
.node-plan-stack-explicit span:nth-child(4) { border-color: #9be4d1; }
.node-plan-stack-explicit span:nth-child(5) { border-color: #c8e39c; }
.node-plan-stack-explicit span:nth-child(6) { border-color: var(--semver-gold); }
.node-plan-stack-explicit small { margin-top: .2rem; color: var(--semver-muted); }
.network-level-intro { border-color: rgba(244, 206, 114, .58); color: var(--semver-gold); box-shadow: 0 0 18px rgba(244, 206, 114, .08); }

/* شبكة كاملة قابلة للتمرير: تبقى جميع العقد موجودة، وتبرز العلاقات عند اختيار عقدة. */
.node-map-shell { position: relative; overflow: hidden; }
.node-viewport { cursor: grab; -webkit-overflow-scrolling: touch; }
.node-viewport:active { cursor: grabbing; }
.node-viewport > * { touch-action: pan-x pan-y; }
.quran-ayah-search { display:flex; align-items:end; gap:.6rem; margin-top:.75rem; }.quran-ayah-search .semver-field-label { flex:1; color:var(--semver-gold); }.quran-ayah-search input { margin-top:.3rem; }.quran-ayah-search .semver-button { min-height:40px; border-color:rgba(244,206,114,.45); color:#1b1708; background:var(--semver-gold); }.quran-ayah-result { margin-top:.7rem; border:1px solid rgba(244,206,114,.2); border-radius:10px; padding:.7rem; color:#e8dcae; background:rgba(244,206,114,.045); font-family:system-ui,sans-serif; font-size:.75rem; line-height:1.8; }.quran-ayah-result[data-state="error"] { border-color:rgba(255,144,144,.55); color:#ffb4b4; }.quran-ayah-result strong { color:var(--semver-gold); }.quran-ayah-result p { margin:.4rem 0; font-family:serif; font-size:1rem; line-height:2; }.quran-ayah-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:.4rem; }.quran-ayah-metrics span { border:1px solid rgba(244,206,114,.2); border-radius:8px; padding:.35rem; color:var(--semver-muted); font-size:.68rem; }
@media (max-width:640px) {
  .ollama-config { grid-template-columns: 1fr; }
  .ollama-heading { flex-direction: column; }
  .ollama-actions .semver-button { flex: 1 1 140px; }
}
@media (max-width:640px) {
  .quran-ayah-search { align-items: stretch; flex-direction: column; }
  .quran-ayah-search .semver-button { width: 100%; }
  .quran-ayah-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
.node-ai-constraints { display:flex; flex-wrap:wrap; gap:.35rem; margin-top:.65rem; }
.node-ai-constraints span { border:1px solid rgba(96,184,255,.22); border-radius:999px; padding:.25rem .45rem; color:#9dc8ee; background:rgba(96,184,255,.06); font-size:.64rem; }

.cosmic-swarm-bridge{margin:12px 0;padding:10px;border:1px solid #315b4e;border-radius:12px;background:radial-gradient(circle at 50% 0,#102d28,#081619)}.cosmic-swarm-bridge-heading{display:flex;justify-content:space-between;gap:8px;align-items:center;color:#59e0a3;font-size:.85rem}.cosmic-swarm-bridge-heading span{color:#99b8aa;font-size:.75rem}#cosmic-bridge-canvas{display:block;width:100%;height:180px;margin-top:8px;border:1px solid #25423b;border-radius:8px;background:#020b0b}@media(max-width:650px){.cosmic-swarm-bridge-heading{flex-direction:column;align-items:flex-start}}

.cosmic-bridge-equations{margin-top:7px;color:#99b8aa;font:11px/1.6 ui-monospace,SFMono-Regular,Consolas,monospace;direction:ltr;text-align:left;overflow-wrap:anywhere}
