/* =============================================================================
   Portal home page: a dark, technical look (grid, scan line, HUD frames, neon
   accents). Motion is decoration only and switches off with "reduce motion".
   ========================================================================== */
:root {
	--p-bg: #04091a;
	--p-bg2: #081430;
	--p-ink: #e7eefb;
	--p-muted: #93a8c9;
	--p-line: rgba(120, 170, 255, .17);
	--p-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}
.acc-cyan { --acc: #22d3ee; --acc-rgb: 34, 211, 238; }
.acc-blue { --acc: #60a5fa; --acc-rgb: 96, 165, 250; }
.acc-violet { --acc: #a78bfa; --acc-rgb: 167, 139, 250; }
.acc-green { --acc: #34d399; --acc-rgb: 52, 211, 153; }
.acc-amber { --acc: #fbbf24; --acc-rgb: 251, 191, 36; }
.acc-rose { --acc: #fb7185; --acc-rgb: 251, 113, 133; }

html { overflow-x: clip; }
body.portal { background: var(--p-bg); color: var(--p-ink); overflow-x: hidden; min-height: 100vh; }
body.portal a { color: inherit; }
.skip-link { position: absolute; left: -999px; top: .5rem; z-index: 100; padding: .5rem .9rem; border-radius: .5rem; background: #22d3ee; color: #04122a; font-weight: 700; }
.skip-link:focus { left: .75rem; }
body.portal :focus-visible { outline: 2px solid #22d3ee; outline-offset: 3px; border-radius: .4rem; }

/* ---- Backdrop ---------------------------------------------------------------- */
.portal-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
	background: radial-gradient(120% 80% at 70% -10%, #0b1d45 0%, transparent 60%), radial-gradient(90% 70% at 0% 100%, #07173a 0%, transparent 65%), var(--p-bg); }
.pb-grid { position: absolute; inset: -56px 0 0 0; background-image: linear-gradient(rgba(80, 140, 255, .08) 1px, transparent 1px), linear-gradient(90deg, rgba(80, 140, 255, .08) 1px, transparent 1px);
	background-size: 56px 56px; -webkit-mask-image: radial-gradient(ellipse at 50% 15%, #000 15%, transparent 78%); mask-image: radial-gradient(ellipse at 50% 15%, #000 15%, transparent 78%); animation: pb-drift 24s linear infinite; }
.pb-glow { position: absolute; width: 52vw; height: 52vw; border-radius: 50%; filter: blur(90px); opacity: .28; }
.pb-g1 { left: -12vw; top: 8vh; background: #1d4ed8; animation: pb-float 26s ease-in-out infinite; }
.pb-g2 { right: -14vw; top: 40vh; background: #0891b2; animation: pb-float 31s ease-in-out -9s infinite reverse; }
.pb-scan { position: absolute; left: 0; right: 0; top: 0; height: 160px; background: linear-gradient(180deg, transparent, rgba(34, 211, 238, .06), transparent); animation: pb-scan 11s linear infinite; }
#portal-net { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; opacity: .75; }
.portal-nav, main, .portal-foot { position: relative; z-index: 2; }
@keyframes pb-drift { to { transform: translateY(56px); } }
@keyframes pb-float { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(6vw, -5vh); } }
@keyframes pb-scan { from { transform: translateY(-200px); } to { transform: translateY(110vh); } }

/* ---- Header -------------------------------------------------------------------- */
.portal-nav { position: sticky; top: 0; z-index: 20; padding: .6rem 0; background: rgba(4, 9, 26, .62); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid var(--p-line); transition: box-shadow .25s, background-color .25s; }
.portal-nav.is-scrolled { background: rgba(4, 9, 26, .85); box-shadow: 0 10px 30px -18px rgba(0, 0, 0, .8); }
.pn-brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; min-width: 0; }
.pn-brand img { height: 2.4rem; width: auto; filter: drop-shadow(0 0 10px rgba(34, 211, 238, .35)); }
.pn-brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.pn-brand-text strong { font-size: 1rem; letter-spacing: .12em; }
.pn-brand-text small { font-family: var(--p-mono); font-size: .66rem; letter-spacing: .22em; color: #22d3ee; }
.pn-links { gap: 1.6rem; }
.pn-links a { text-decoration: none; color: var(--p-muted); font-weight: 600; font-size: .92rem; position: relative; padding: .25rem 0; }
.pn-links a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -2px; height: 2px; background: #22d3ee; box-shadow: 0 0 10px #22d3ee; transition: right .25s; }
.pn-links a:hover { color: #fff; }
.pn-links a:hover::after { right: 0; }
.pn-burger { display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem; border: 1px solid var(--p-line); border-radius: .6rem; background: rgba(255, 255, 255, .04); color: #fff; font-size: 1.5rem; }
.pn-mobile { display: grid; gap: .15rem; padding-top: .6rem; padding-bottom: .8rem; }
.pn-mobile a { display: flex; align-items: center; gap: .7rem; padding: .7rem .6rem; border-radius: .6rem; text-decoration: none; font-weight: 600; }
.pn-mobile a:hover { background: rgba(255, 255, 255, .05); color: #22d3ee; }

/* ---- Buttons --------------------------------------------------------------------- */
.btn-neon, .btn-ghost { position: relative; display: inline-flex; align-items: center; gap: .55rem; padding: .8rem 1.35rem; border-radius: .75rem; font-weight: 700; text-decoration: none; overflow: hidden; transition: transform .2s, box-shadow .2s, border-color .2s, background-color .2s; }
.btn-neon { color: #031326; background: linear-gradient(135deg, #22d3ee, #3b82f6); box-shadow: 0 0 0 1px rgba(34, 211, 238, .5), 0 10px 30px -10px rgba(34, 211, 238, .65); }
.btn-neon::after { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent); transform: skewX(-20deg); transition: left .6s; }
.btn-neon:hover { color: #031326; transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(34, 211, 238, .8), 0 16px 36px -10px rgba(34, 211, 238, .8); }
.btn-neon:hover::after { left: 130%; }
.btn-neon-sm { padding: .5rem .95rem; font-size: .88rem; }
.btn-ghost { color: #fff; border: 1px solid var(--p-line); background: rgba(255, 255, 255, .03); }
.btn-ghost:hover { color: #fff; border-color: rgba(34, 211, 238, .7); background: rgba(34, 211, 238, .08); transform: translateY(-2px); }

/* ---- Hero ------------------------------------------------------------------------- */
.p-hero { padding: clamp(2.5rem, 7vw, 5.5rem) 0 clamp(2rem, 5vw, 3.5rem); }
.p-eyebrow { margin: 1.25rem 0 .35rem; font-family: var(--p-mono); font-size: .8rem; letter-spacing: .28em; text-transform: uppercase; color: var(--p-muted); }
.p-title { margin: 0; font-size: clamp(2.5rem, 6.4vw, 4.6rem); font-weight: 800; line-height: 1.04; letter-spacing: -.035em; background: linear-gradient(120deg, #fff 30%, #7dd3fc 70%, #22d3ee); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: 0 0 40px rgba(34, 211, 238, .25); }
.p-sub { margin: 1.1rem 0 0; max-width: 38rem; font-size: 1.1rem; color: var(--p-muted); }
.p-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.8rem; }
.p-finder { display: flex; align-items: center; gap: .7rem; margin-top: 1.6rem; max-width: 30rem; padding: .35rem .5rem .35rem .95rem; border: 1px solid var(--p-line); border-radius: .8rem; background: rgba(8, 20, 48, .7); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: border-color .2s, box-shadow .2s; }
.p-finder:focus-within { border-color: rgba(34, 211, 238, .75); box-shadow: 0 0 0 4px rgba(34, 211, 238, .12); }
.p-finder i { color: #22d3ee; }
.p-finder input { flex: 1; min-width: 0; padding: .55rem 0; border: 0; outline: 0; background: transparent; color: #fff; font-size: 1rem; }
.p-finder input::placeholder { color: #6f86ab; }
.p-finder kbd { padding: .1rem .5rem; border: 1px solid var(--p-line); border-radius: .4rem; background: rgba(255, 255, 255, .05); color: var(--p-muted); font-family: var(--p-mono); font-size: .78rem; }
@keyframes blink { 50% { opacity: 0; } }

/* ---- Reactor ------------------------------------------------------------------------ */
.reactor { --size: min(440px, 84vw); --R: calc(var(--size) * .39); position: relative; width: var(--size); height: var(--size); margin: 0 auto; }
.rx-ring { position: absolute; border-radius: 50%; }
.rx-r1 { inset: 0; border: 1px dashed rgba(34, 211, 238, .4); animation: spin 70s linear infinite; }
.rx-r2 { inset: 9%; border: 2px solid transparent; border-top-color: rgba(34, 211, 238, .8); border-bottom-color: rgba(96, 165, 250, .55); filter: drop-shadow(0 0 8px rgba(34, 211, 238, .5)); animation: spin 22s linear infinite reverse; }
.rx-r3 { inset: 21%; border: 1px dotted rgba(167, 139, 250, .6); animation: spin 38s linear infinite; }
.rx-sweep { position: absolute; inset: 3%; border-radius: 50%; background: conic-gradient(from 0deg, transparent 0%, rgba(34, 211, 238, .34) 24%, transparent 25%); -webkit-mask: radial-gradient(circle, transparent 34%, #000 35%); mask: radial-gradient(circle, transparent 34%, #000 35%); animation: spin 7s linear infinite; }
.rx-orbit { position: absolute; inset: 0; animation: spin 60s linear infinite; }
.rx-node { position: absolute; left: 50%; top: 50%; width: 3rem; height: 3rem; margin: -1.5rem 0 0 -1.5rem; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(var(--acc-rgb), .6); background: rgba(6, 16, 40, .92); color: var(--acc); font-size: 1.25rem; box-shadow: 0 0 18px -2px rgba(var(--acc-rgb), .55); transform: rotate(var(--a)) translateY(calc(var(--R) * -1)) rotate(calc(var(--a) * -1)); }
.rx-node i { animation: spin 60s linear infinite reverse; }
.rx-core { position: absolute; left: 50%; top: 50%; width: 38%; aspect-ratio: 1; transform: translate(-50%, -50%); display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #dbe7ff 60%, #b6caf2); box-shadow: 0 0 0 8px rgba(34, 211, 238, .12), 0 0 60px rgba(34, 211, 238, .45); animation: core-pulse 4.5s ease-in-out infinite; }
.rx-core img { width: 60%; height: auto; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .3)); }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes core-pulse { 0%, 100% { box-shadow: 0 0 0 8px rgba(34, 211, 238, .12), 0 0 50px rgba(34, 211, 238, .35); } 50% { box-shadow: 0 0 0 14px rgba(34, 211, 238, .06), 0 0 80px rgba(34, 211, 238, .6); } }
.rx-orbit .rx-node { animation: none; }

/* ---- HUD figures ----------------------------------------------------------------------- */
.p-stats { padding: .5rem 0 1rem; }
.hud-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .9rem; }
.hud { position: relative; padding: 1rem 1.1rem; border: 1px solid var(--p-line); background: linear-gradient(160deg, rgba(14, 28, 60, .7), rgba(7, 16, 38, .7)); clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px); }
.hud > i { position: absolute; right: .9rem; top: .8rem; color: #22d3ee; opacity: .8; }
.hud-value { font-family: var(--p-mono); font-size: 2.1rem; font-weight: 700; line-height: 1.1; color: #fff; text-shadow: 0 0 18px rgba(34, 211, 238, .45); font-variant-numeric: tabular-nums; }
.hud-sso { color: #34d399; text-shadow: 0 0 18px rgba(52, 211, 153, .5); }
.hud-label { margin-top: .25rem; font-family: var(--p-mono); font-size: .68rem; letter-spacing: .18em; color: var(--p-muted); }

/* ---- Sections ---------------------------------------------------------------------------- */
.p-section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.p-head { max-width: 42rem; margin-bottom: 1.8rem; }
.p-kicker { font-family: var(--p-mono); font-size: .8rem; letter-spacing: .24em; color: #22d3ee; }
.p-head h2, .p-about h2 { margin: .35rem 0 .5rem; font-size: clamp(1.7rem, 3.6vw, 2.5rem); font-weight: 800; letter-spacing: -.025em; }
.p-head p { color: var(--p-muted); margin: 0; }
.p-lead { color: var(--p-muted); font-size: 1.05rem; }
.p-empty, .p-none { padding: 1.6rem; border: 1px dashed var(--p-line); border-radius: .9rem; color: var(--p-muted); text-align: center; }

.p-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.4rem; }
.chip { display: inline-flex; align-items: center; gap: .45rem; padding: .4rem .9rem; border: 1px solid var(--p-line); border-radius: 999px; background: rgba(255, 255, 255, .03); color: var(--p-muted); font-family: var(--p-mono); font-size: .76rem; letter-spacing: .06em; text-transform: uppercase; transition: color .2s, border-color .2s, background-color .2s, box-shadow .2s; }
.chip span { padding: 0 .4rem; border-radius: 999px; background: rgba(255, 255, 255, .1); }
.chip:hover { color: #fff; border-color: rgba(34, 211, 238, .6); }
.chip.is-active { color: #031326; border-color: transparent; background: linear-gradient(135deg, #22d3ee, #60a5fa); box-shadow: 0 0 20px -4px rgba(34, 211, 238, .7); }
.chip.is-active span { background: rgba(3, 19, 38, .2); }

/* ---- Application modules -------------------------------------------------------------------- */
.mods { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); grid-auto-flow: dense; gap: 1.1rem; }
.mod { --rx: 0deg; --ry: 0deg; position: relative; display: flex; flex-direction: column; gap: .55rem; padding: 1.3rem 1.3rem 1.1rem; border: 1px solid var(--p-line); border-radius: .95rem; color: inherit; text-decoration: none; overflow: hidden;
	background: linear-gradient(160deg, rgba(14, 28, 60, .85), rgba(7, 16, 38, .88)); transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry)); transition: transform .2s ease-out, border-color .25s, box-shadow .25s; will-change: transform; }
.mod[hidden] { display: none; }
.mod::before, .mod::after { content: ""; position: absolute; width: 16px; height: 16px; border: 2px solid var(--acc); opacity: .85; transition: width .25s, height .25s, opacity .25s; pointer-events: none; }
.mod::before { top: 9px; left: 9px; border-right: 0; border-bottom: 0; border-top-left-radius: 5px; }
.mod::after { right: 9px; bottom: 9px; border-left: 0; border-top: 0; border-bottom-right-radius: 5px; }
.mod:hover { border-color: rgba(var(--acc-rgb), .6); box-shadow: 0 22px 44px -26px rgba(var(--acc-rgb), .7), inset 0 0 0 1px rgba(var(--acc-rgb), .12); }
.mod:hover::before, .mod:hover::after { width: 30px; height: 30px; }
.mod-glow { position: absolute; inset: 0; opacity: 0; pointer-events: none; background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), rgba(var(--acc-rgb), .2), transparent 62%); transition: opacity .25s; }
.mod:hover .mod-glow { opacity: 1; }
.mod > * { position: relative; }
.mod-top { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .35rem; }
.mod-icon { display: grid; place-items: center; width: 2.9rem; height: 2.9rem; border-radius: .8rem; border: 1px solid rgba(var(--acc-rgb), .45); background: rgba(var(--acc-rgb), .12); color: var(--acc); font-size: 1.4rem; box-shadow: 0 0 22px -6px rgba(var(--acc-rgb), .6); transition: transform .25s; }
.mod:hover .mod-icon { transform: scale(1.08) rotate(-4deg); }
.mod-tag { font-family: var(--p-mono); font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; color: var(--acc); text-align: right; }
.mod h3 { margin: 0; font-size: 1.2rem; font-weight: 750; letter-spacing: -.01em; }
.mod p { margin: 0; color: var(--p-muted); font-size: .92rem; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.mod-foot { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-top: auto; padding-top: .8rem; border-top: 1px dashed var(--p-line); }
.mod-foot code { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--p-muted); font-size: .78rem; background: transparent; }
.mod-go { flex: 0 0 auto; font-family: var(--p-mono); font-size: .74rem; letter-spacing: .14em; color: var(--acc); }
.mod-go i { display: inline-block; transition: transform .25s; }
.mod:hover .mod-go i { transform: translate(3px, -3px); }
@media (min-width: 992px) { .mod-feature { grid-column: span 2; } .mod-feature h3 { font-size: 1.45rem; } .mod-feature p { -webkit-line-clamp: 5; } }

/* "Transformer" unfold: a module opens like folded plates that snap into place. */
@keyframes unfold {
	0% { clip-path: inset(49% 0 49% 0); opacity: 0; transform: perspective(900px) rotateX(-38deg) scaleY(.55); filter: brightness(2.2) saturate(1.6); }
	45% { clip-path: inset(0 0 0 0); opacity: 1; filter: brightness(1.5); }
	100% { clip-path: inset(0 0 0 0); opacity: 1; transform: perspective(900px) rotateX(0) rotateY(0); filter: none; }
}
.mod.unfold { opacity: 0; }
.mod.unfold-in { animation: unfold .8s cubic-bezier(.2, .8, .2, 1) var(--delay, 0ms) both; }

/* ---- About and the SSO network ----------------------------------------------------------------- */
.p-about { border-top: 1px solid var(--p-line); background: linear-gradient(180deg, rgba(8, 20, 48, .45), transparent); }
.p-points { display: grid; gap: .8rem; margin: 1.5rem 0 0; padding: 0; list-style: none; }
.p-points li { display: flex; gap: .85rem; align-items: flex-start; padding: .8rem .95rem; border: 1px solid var(--p-line); border-radius: .8rem; background: rgba(8, 20, 48, .55); }
.pp-icon { flex: 0 0 auto; display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: .65rem; color: #22d3ee; background: rgba(34, 211, 238, .1); border: 1px solid rgba(34, 211, 238, .35); }
.p-points strong { display: block; }
.p-points span:not(.pp-icon) { display: block; font-size: .9rem; color: var(--p-muted); }
.sso-net { position: relative; width: min(100%, 440px); aspect-ratio: 1; margin: 0 auto; }
.sn-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.sn-lines line { stroke: rgba(34, 211, 238, .55); stroke-width: 1.2; vector-effect: non-scaling-stroke; stroke-dasharray: 5 6; animation: flow 2.4s linear infinite; animation-delay: calc(var(--i) * -.35s); }
.sn-node { position: absolute; width: 3.1rem; height: 3.1rem; margin: -1.55rem 0 0 -1.55rem; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(var(--acc-rgb), .65); background: rgba(6, 16, 40, .95); color: var(--acc); font-size: 1.3rem; box-shadow: 0 0 20px -2px rgba(var(--acc-rgb), .55); animation: node-bob 5s ease-in-out infinite; animation-delay: calc(var(--i) * -.8s); }
.sn-core { position: absolute; left: 50%; top: 50%; width: 5.6rem; height: 5.6rem; margin: -2.8rem 0 0 -2.8rem; display: grid; place-items: center; align-content: center; border-radius: 50%; color: #031326; background: linear-gradient(135deg, #22d3ee, #3b82f6); box-shadow: 0 0 0 8px rgba(34, 211, 238, .14), 0 0 50px rgba(34, 211, 238, .6); animation: core-pulse 4.5s ease-in-out infinite; }
.sn-core i { font-size: 1.5rem; line-height: 1; }
.sn-core b { font-family: var(--p-mono); letter-spacing: .18em; font-size: .85rem; }
@keyframes flow { to { stroke-dashoffset: -22; } }
@keyframes node-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

/* ---- Footer ------------------------------------------------------------------------------------- */
.portal-foot { padding: 1.5rem 0; border-top: 1px solid var(--p-line); background: rgba(4, 9, 26, .8); }
.pf-name { font-weight: 700; letter-spacing: .04em; }
.pf-note { font-size: .85rem; color: var(--p-muted); }
.pf-sys { font-family: var(--p-mono); font-size: .72rem; letter-spacing: .2em; color: #34d399; }
.pf-sys i { font-size: .5rem; margin-right: .4rem; animation: blink 1.6s ease-in-out infinite; }

/* ---- Reveal helpers (set by assets/js/portal.js) ------------------------------------------------------ */
.rv { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--delay, 0ms); }
.rv.rv-in { opacity: 1; transform: none; }

@media (max-width: 991.98px) { .reactor { margin-top: 1rem; } }
@media (max-width: 575.98px) { .pn-brand-text small { display: none; } .p-title { letter-spacing: -.025em; } .rx-node { width: 2.5rem; height: 2.5rem; margin: -1.25rem 0 0 -1.25rem; font-size: 1.05rem; } }

@media (prefers-reduced-motion: reduce) {
	.pb-grid, .pb-glow, .pb-scan, .rx-ring, .rx-sweep, .rx-orbit, .rx-node i, .rx-core, .sn-lines line, .sn-node, .sn-core, .pt-cursor, .mod-scan, .pf-sys i { animation: none !important; }
	.rv, .rv.rv-in, .mod.unfold, .mod.unfold-in { opacity: 1 !important; transform: none !important; transition: none !important; animation: none !important; clip-path: none !important; filter: none !important; }
	.mod { transition: none; }
	#portal-net { display: none; }
}

/* ---- System status strip ------------------------------------------------------------------------ */
.p-status { padding: 0 0 .5rem; }
.sysbar { --lv: #94a3b8; position: relative; display: grid; grid-template-columns: minmax(0, 1.2fr) auto; gap: 1rem 2rem; align-items: center; padding: 1rem 1.25rem 1.15rem; border: 1px solid var(--p-line); background: linear-gradient(160deg, rgba(14, 28, 60, .7), rgba(7, 16, 38, .7)); clip-path: polygon(16px 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%, 0 16px); }
.sysbar.lv-ok { --lv: #34d399; }
.sysbar.lv-warn { --lv: #fbbf24; }
.sysbar.lv-down { --lv: #fb7185; }
.sb-main { display: flex; align-items: center; gap: .9rem; min-width: 0; }
.sb-lamp { position: relative; flex: 0 0 auto; width: .85rem; height: .85rem; border-radius: 50%; background: var(--lv); box-shadow: 0 0 14px var(--lv); }
.sb-lamp::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 1px solid var(--lv); opacity: 0; animation: lamp-ping 2.6s ease-out infinite; }
.sysbar.lv-unknown .sb-lamp::after { animation: none; }
.sb-kicker { display: block; font-family: var(--p-mono); font-size: .68rem; letter-spacing: .22em; color: #22d3ee; }
.sb-label { display: block; font-family: var(--p-mono); font-size: 1.05rem; letter-spacing: .08em; color: var(--lv); text-shadow: 0 0 16px color-mix(in srgb, var(--lv) 55%, transparent); }
.sb-metrics { display: flex; flex-wrap: wrap; gap: .4rem 2rem; margin: 0; }
.sb-metrics > div { min-width: 0; }
.sb-metrics dt { font-family: var(--p-mono); font-size: .62rem; letter-spacing: .18em; font-weight: 400; color: var(--p-muted); }
.sb-metrics dd { margin: 0; font-family: var(--p-mono); font-size: 1.3rem; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sb-metrics dd i { font-style: normal; font-size: .72rem; font-weight: 400; margin-left: .2rem; color: var(--p-muted); }
.sb-bars { grid-column: 1 / -1; display: flex; gap: 4px; }
.sb-seg { flex: 1 1 0; height: 6px; border-radius: 3px; background: rgba(148, 163, 184, .28); transition: background-color .4s, box-shadow .4s; }
.sb-seg.s-up { background: #34d399; box-shadow: 0 0 8px rgba(52, 211, 153, .55); }
.sb-seg.s-slow { background: #fbbf24; box-shadow: 0 0 8px rgba(251, 191, 36, .55); }
.sb-seg.s-down { background: #fb7185; box-shadow: 0 0 8px rgba(251, 113, 133, .6); }
@keyframes lamp-ping { 0% { transform: scale(.6); opacity: .85; } 100% { transform: scale(2.1); opacity: 0; } }
@media (max-width: 767.98px) { .sysbar { grid-template-columns: 1fr; } .sb-metrics { gap: .4rem 1.4rem; } }

.mod-stat { display: inline-flex; align-items: center; gap: .45rem; align-self: flex-start; padding: .15rem .6rem .15rem .5rem; border-radius: 999px; border: 1px solid rgba(148, 163, 184, .3); background: rgba(148, 163, 184, .08); font-family: var(--p-mono); font-size: .68rem; letter-spacing: .1em; color: #94a3b8; }
.mod-stat[hidden] { display: none; }
.mod-stat i { width: .5rem; height: .5rem; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.mod-stat em { font-style: normal; color: var(--p-muted); letter-spacing: .04em; }
.mod-stat.s-up { color: #34d399; border-color: rgba(52, 211, 153, .4); background: rgba(52, 211, 153, .08); }
.mod-stat.s-slow { color: #fbbf24; border-color: rgba(251, 191, 36, .4); background: rgba(251, 191, 36, .08); }
.mod-stat.s-down { color: #fb7185; border-color: rgba(251, 113, 133, .45); background: rgba(251, 113, 133, .1); }

/* ---- Command palette (Ctrl+K) ---------------------------------------------------------------------- */
.pn-cmd { display: inline-flex; align-items: center; gap: .55rem; height: 2.5rem; padding: 0 .8rem; border: 1px solid var(--p-line); border-radius: .6rem; background: rgba(255, 255, 255, .04); color: var(--p-muted); font-family: var(--p-mono); font-size: .8rem; transition: color .2s, border-color .2s, background-color .2s; }
.pn-cmd[hidden] { display: none; }
.pn-cmd:hover { color: #fff; border-color: rgba(34, 211, 238, .6); background: rgba(34, 211, 238, .08); }
.pn-cmd i { color: #22d3ee; font-size: 1.05rem; }
kbd { font-family: var(--p-mono); }
.pn-cmd kbd, .cmdk kbd { padding: .05rem .4rem; border: 1px solid var(--p-line); border-bottom-width: 2px; border-radius: .35rem; background: rgba(255, 255, 255, .06); color: var(--p-muted); font-size: .7rem; }
body.cmdk-open { overflow: hidden; }
.cmdk { position: fixed; inset: 0; z-index: 100; display: flex; justify-content: center; align-items: flex-start; padding: 12vh 1rem 1rem; }
.cmdk[hidden] { display: none; }
.cmdk-back { position: absolute; inset: 0; background: rgba(2, 6, 18, .72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.cmdk-box { position: relative; width: min(640px, 100%); max-height: 76vh; display: flex; flex-direction: column; border: 1px solid rgba(34, 211, 238, .45); background: linear-gradient(160deg, rgba(10, 22, 50, .97), rgba(5, 12, 30, .98)); box-shadow: 0 0 0 1px rgba(34, 211, 238, .08), 0 30px 80px -20px rgba(0, 0, 0, .9), 0 0 60px -20px rgba(34, 211, 238, .5); clip-path: polygon(18px 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%, 0 18px); animation: cmdk-in .22s cubic-bezier(.2, .8, .2, 1); }
@keyframes cmdk-in { from { opacity: 0; transform: translateY(-10px) scale(.97); } to { opacity: 1; transform: none; } }
.cmdk-bar { display: flex; align-items: center; gap: .7rem; padding: .9rem 1.1rem; border-bottom: 1px solid var(--p-line); }
.cmdk-prompt { font-family: var(--p-mono); font-weight: 700; color: #22d3ee; text-shadow: 0 0 12px #22d3ee; }
.cmdk-bar input { flex: 1 1 auto; min-width: 0; border: 0; outline: 0; background: transparent; color: #fff; font-family: var(--p-mono); font-size: 1rem; }
.cmdk-bar input:focus-visible { outline: 0; }
.cmdk-bar input::placeholder { color: #5f7396; }
.cmdk-list { margin: 0; padding: .45rem; list-style: none; overflow-y: auto; overscroll-behavior: contain; }
.cmdk-group { padding: .6rem .7rem .25rem; font-family: var(--p-mono); font-size: .64rem; letter-spacing: .22em; color: #5f7396; }
.cmdk-item { display: grid; grid-template-columns: 2.2rem minmax(0, 1fr) auto; gap: .75rem; align-items: center; padding: .55rem .7rem; border-radius: .6rem; border-left: 2px solid transparent; cursor: pointer; }
.cmdk-item.is-active { background: rgba(34, 211, 238, .1); border-left-color: #22d3ee; }
.cmdk-ic { display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: .55rem; border: 1px solid rgba(var(--acc-rgb, 34, 211, 238), .4); background: rgba(var(--acc-rgb, 34, 211, 238), .1); color: var(--acc, #22d3ee); }
.cmdk-tx { min-width: 0; }
.cmdk-tx strong { display: block; font-weight: 650; }
.cmdk-tx span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .8rem; color: var(--p-muted); }
.cmdk-meta { display: inline-flex; align-items: center; gap: .4rem; font-family: var(--p-mono); font-size: .68rem; letter-spacing: .08em; color: #5f7396; }
.cmdk-meta i { width: .5rem; height: .5rem; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.cmdk-meta.s-up { color: #34d399; } .cmdk-meta.s-slow { color: #fbbf24; } .cmdk-meta.s-down { color: #fb7185; }
.cmdk-item.is-active .cmdk-meta:not([class*=" s-"])::after { content: "↵"; font-size: .9rem; color: #22d3ee; }
.cmdk-empty { padding: 1.4rem; text-align: center; color: var(--p-muted); font-size: .9rem; }
.cmdk-foot { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1.1rem; padding: .6rem 1.1rem; border-top: 1px solid var(--p-line); font-size: .72rem; color: #5f7396; }
.cmdk-foot kbd { margin-right: .15rem; }
.cmdk-hint { margin-left: auto; font-family: var(--p-mono); letter-spacing: .1em; }
@media (max-width: 575.98px) { .cmdk { padding-top: 6vh; } .cmdk-foot span:not(.cmdk-hint) { display: none; } }

@media (prefers-reduced-motion: reduce) {
	.sb-lamp::after, .cmdk-box { animation: none; }
}

/* ---- SSO network: data packets, a hot path on hover, live status ----------------------------------- */
.sn-link line { stroke: rgba(var(--acc-rgb), .5); transition: stroke .25s, stroke-width .25s; }
.sn-pk { fill: var(--acc); filter: drop-shadow(0 0 2px var(--acc)); }
.sn-pk-back { fill: #fff; opacity: .85; }
.sn-link { transition: opacity .25s; }
.sn-node { cursor: default; transition: opacity .25s, border-color .25s, box-shadow .25s, color .25s; }
.sn-node.s-slow, .sn-link.s-slow { --acc: #fbbf24; --acc-rgb: 251, 191, 36; }
.sn-node.s-down, .sn-link.s-down { --acc: #fb7185; --acc-rgb: 251, 113, 133; }
.sn-link.s-down .sn-pk { display: none; }
.sn-link.s-down line { stroke-dasharray: 2 9; animation: none; }
.sso-net.has-hot .sn-link:not(.is-hot) { opacity: .22; }
.sso-net.has-hot .sn-node:not(.is-hot) { opacity: .5; }
.sn-link.is-hot line { stroke: var(--acc); stroke-width: 2; }
.sn-node.is-hot { box-shadow: 0 0 0 4px rgba(var(--acc-rgb), .18), 0 0 30px 2px rgba(var(--acc-rgb), .75); z-index: 3; }
.sn-label { position: absolute; left: 50%; top: calc(100% + .45rem); transform: translateX(-50%); padding: .15rem .55rem; border: 1px solid rgba(var(--acc-rgb), .5); border-radius: .4rem; background: rgba(4, 9, 26, .94); color: #fff; font-family: var(--p-mono); font-style: normal; font-size: .68rem; letter-spacing: .06em; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .2s; }
.sn-node.is-hot .sn-label { opacity: 1; }

/* ---- Header clock and the build label ------------------------------------------------------------------ */
.pn-clock { flex-direction: column; justify-content: center; padding-left: 1rem; border-left: 1px solid var(--p-line); line-height: 1.15; font-family: var(--p-mono); visibility: hidden; }
.pn-clock.is-on { visibility: visible; }
.pn-clock time { font-size: .95rem; font-weight: 700; color: #fff; letter-spacing: .08em; font-variant-numeric: tabular-nums; text-shadow: 0 0 12px rgba(34, 211, 238, .5); }
.pn-clock small { font-size: .62rem; letter-spacing: .16em; color: var(--p-muted); }
.pf-build { margin-left: 1rem; padding-left: 1rem; border-left: 1px solid var(--p-line); color: var(--p-muted); letter-spacing: .14em; }
@media (prefers-reduced-motion: reduce) { .sn-pk { display: none; } }

/* ---- Hero terminal: a log of what the system reports (real figures, updated as they change) --------- */
.p-term { max-width: 34rem; margin-top: 1.5rem; border: 1px solid rgba(34, 211, 238, .3); border-radius: .75rem; overflow: hidden; background: linear-gradient(160deg, rgba(5, 14, 34, .88), rgba(3, 8, 22, .92)); box-shadow: 0 18px 50px -28px rgba(34, 211, 238, .6), inset 0 0 0 1px rgba(255, 255, 255, .02); font-family: var(--p-mono); }
.pt-head { display: flex; align-items: center; gap: .75rem; padding: .5rem .8rem; border-bottom: 1px solid var(--p-line); background: rgba(34, 211, 238, .05); }
.pt-dots { display: inline-flex; gap: .3rem; }
.pt-dots i { width: .55rem; height: .55rem; border-radius: 50%; background: rgba(148, 163, 184, .4); }
.pt-dots i:first-child { background: #fb7185; } .pt-dots i:nth-child(2) { background: #fbbf24; } .pt-dots i:nth-child(3) { background: #34d399; }
.pt-title { font-size: .7rem; letter-spacing: .1em; color: var(--p-muted); }
.pt-body { margin: 0; padding: .7rem .85rem .2rem; list-style: none; font-size: .78rem; line-height: 1.7; min-height: 6.4rem; }
.pt-line { display: flex; gap: .7rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #cbd8ef; animation: pt-in .35s ease-out both; }
.pt-line > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.pt-tag { flex: 0 0 auto; font-weight: 700; letter-spacing: .04em; }
.pt-line.lv-ok .pt-tag { color: #34d399; } .pt-line.lv-warn .pt-tag { color: #fbbf24; } .pt-line.lv-fail .pt-tag { color: #fb7185; } .pt-line.lv-info .pt-tag { color: #22d3ee; }
.pt-prompt { display: flex; align-items: center; gap: .55rem; padding: .15rem .85rem .75rem; font-size: .78rem; color: #22d3ee; }
.pt-prompt em { font-style: normal; color: var(--p-muted); font-variant-numeric: tabular-nums; }
.pt-cursor { width: .5em; height: 1.05em; background: #22d3ee; animation: blink 1s steps(2) infinite; }
@keyframes pt-in { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }

/* ---- Card scan: a laser passes over the card and its footer shows the technical read-out ----------- */
.mod-addr { position: relative; display: grid; min-width: 0; }
.mod-addr > code { grid-area: 1 / 1; min-width: 0; transition: opacity .2s; }
.mod-read { opacity: 0; color: var(--acc) !important; letter-spacing: .02em; }
.mod:hover .mod-host, .mod:focus-visible .mod-host { opacity: 0; }
.mod:hover .mod-read, .mod:focus-visible .mod-read { opacity: 1; }
.mod-scan { position: absolute !important; left: 0; right: 0; top: 0; height: 2px; opacity: 0; pointer-events: none; background: linear-gradient(90deg, transparent, var(--acc) 20%, #fff 50%, var(--acc) 80%, transparent); box-shadow: 0 0 14px 2px rgba(var(--acc-rgb), .8), 0 12px 28px 8px rgba(var(--acc-rgb), .1); }
.mod:hover .mod-scan, .mod:focus-visible .mod-scan { animation: mod-scan .95s cubic-bezier(.4, 0, .2, 1) both; }
@keyframes mod-scan { 0% { top: 0; opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { top: calc(100% - 2px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .pt-line, .pt-cursor, .mod-scan { animation: none !important; } }

/* ---- Depth: the backdrop moves in layers (scroll and pointer), with a floor grid and fine noise ----- */
.portal-bg { --sy: 0; --px: 0; }
.pb-grid { translate: 0 calc(var(--sy) * -0.04px); }
.pb-grid2 { position: absolute; left: 0; right: 0; top: -700px; bottom: -700px; background-image: linear-gradient(rgba(34, 211, 238, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(34, 211, 238, .06) 1px, transparent 1px); background-size: 168px 168px; -webkit-mask-image: radial-gradient(ellipse at 72% 45%, #000 5%, transparent 70%); mask-image: radial-gradient(ellipse at 72% 45%, #000 5%, transparent 70%); translate: calc(var(--px) * -12px) calc(var(--sy) * -0.14px); transition: translate .25s ease-out; }
.pb-g1 { translate: calc(var(--px) * 26px) calc(var(--sy) * -0.1px); transition: translate .3s ease-out; }
.pb-g2 { translate: calc(var(--px) * -32px) calc(var(--sy) * -0.22px); transition: translate .3s ease-out; }
.pb-noise { position: absolute; inset: 0; opacity: .07; mix-blend-mode: overlay; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .7 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.pb-floor { position: absolute; left: 0; right: 0; bottom: 0; height: 42vh; overflow: hidden; perspective: 380px; -webkit-mask-image: linear-gradient(to top, #000 0%, transparent 88%); mask-image: linear-gradient(to top, #000 0%, transparent 88%); }
.pb-floor::before { content: ""; position: absolute; left: -60%; right: -60%; bottom: -30%; height: 160%; transform-origin: 50% 100%; transform: rotateX(64deg); background-image: linear-gradient(rgba(34, 211, 238, .22) 1px, transparent 1px), linear-gradient(90deg, rgba(34, 211, 238, .22) 1px, transparent 1px); background-size: 72px 72px; animation: pb-floor 5s linear infinite; }
@keyframes pb-floor { to { background-position: 0 72px; } }
@media (prefers-reduced-motion: reduce) { .pb-floor::before { animation: none; } .pb-grid, .pb-grid2, .pb-g1, .pb-g2 { translate: none; transition: none; } }

/* ---- Interface sound switch ------------------------------------------------------------------------ */
.pn-sfx { display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem; border: 1px solid var(--p-line); border-radius: .6rem; background: rgba(255, 255, 255, .04); color: var(--p-muted); font-size: 1.15rem; transition: color .2s, border-color .2s, background-color .2s; }
.pn-sfx[hidden] { display: none; }
.pn-sfx:hover { color: #fff; border-color: rgba(34, 211, 238, .6); }
.pn-sfx[aria-pressed="true"] { color: #22d3ee; border-color: rgba(34, 211, 238, .55); background: rgba(34, 211, 238, .1); box-shadow: 0 0 16px -4px rgba(34, 211, 238, .6); }

/* ---- The logo is the heart of the reactor: it beats, and a click opens search & commands ----------- */
/* Centred with negative margins, not transform: the beat animates `scale`, which is applied before `transform` and would drag a translate(-50%, -50%) off the centre. */
.rx-core { transform: none; margin: -19% 0 0 -19%; }
.reactor { --beat: 34, 211, 238; }
.reactor.lv-warn { --beat: 251, 191, 36; }
.reactor.lv-down { --beat: 251, 113, 133; }
.rx-core { cursor: pointer; text-decoration: none; color: inherit; box-shadow: 0 0 0 8px rgba(var(--beat), .12), 0 0 60px rgba(var(--beat), .45); animation: rx-beat 1.5s ease-in-out infinite; transition: filter .2s; }
.rx-core::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(var(--beat), .65); opacity: 0; pointer-events: none; animation: rx-ripple 1.5s ease-out infinite; }
.rx-core:hover, .rx-core:focus-visible { filter: brightness(1.08) drop-shadow(0 0 18px rgba(var(--beat), .7)); animation-duration: .95s; }
.rx-core:hover::after, .rx-core:focus-visible::after { animation-duration: .95s; }
.rx-core:focus-visible { outline: 2px solid #fff; outline-offset: 8px; }
.rx-hint { position: absolute; top: calc(100% + 1.1rem); left: 50%; transform: translateX(-50%); display: inline-flex; align-items: center; gap: .5rem; padding: .25rem .7rem; border: 1px solid rgba(var(--beat), .5); border-radius: 999px; background: rgba(4, 9, 26, .92); color: #e7eefb; font-family: var(--p-mono); font-size: .64rem; letter-spacing: .14em; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .2s; }
.rx-hint kbd { padding: 0 .35rem; border: 1px solid var(--p-line); border-radius: .3rem; background: rgba(255, 255, 255, .08); color: #22d3ee; font-size: .62rem; letter-spacing: .06em; }
.rx-core:hover .rx-hint, .rx-core:focus-visible .rx-hint { opacity: 1; }
/* lub-dub: a small beat, then a bigger one, then rest */
@keyframes rx-beat {
	0%, 54%, 100% { scale: 1; box-shadow: 0 0 0 8px rgba(var(--beat), .12), 0 0 50px rgba(var(--beat), .35); }
	10% { scale: 1.07; box-shadow: 0 0 0 12px rgba(var(--beat), .18), 0 0 70px rgba(var(--beat), .55); }
	20% { scale: 1.01; }
	32% { scale: 1.12; box-shadow: 0 0 0 16px rgba(var(--beat), .22), 0 0 90px rgba(var(--beat), .75); }
	44% { scale: 1.02; }
}
@keyframes rx-ripple { 0%, 28% { transform: scale(1); opacity: 0; } 32% { opacity: .7; } 78% { transform: scale(1.55); opacity: 0; } 100% { transform: scale(1.55); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .rx-core, .rx-core::after { animation: none !important; } }

/* The header never wraps: what does not fit at a width is hidden by its breakpoint instead. */
.pn-brand-text, .pn-links a, .btn-neon-sm, .pn-cmd { white-space: nowrap; }
