.systems-page {
    --systems-cyan: #55d9ff;
    --systems-cyan-rgb: 85,217,255;
    --systems-amber: #ffaa00;
    --systems-amber-rgb: 255,170,0;
    --systems-green: #55ff91;
    overflow-x: clip;
    background: #050505;
    color: #f4f4f4;
}

.systems-page .nav-link small {
    margin-left: .25rem;
    color: var(--systems-amber);
    font-size: .45rem;
}

.systems-backdrop {
    position: fixed;
    z-index: -4;
    inset: 0;
    overflow: hidden;
    background: #050505;
    pointer-events: none;
}
.systems-backdrop-grid {
    position: absolute;
    inset: 0;
    opacity: .16;
    background-image:
        linear-gradient(rgba(255,255,255,.045) 1px,transparent 1px),
        linear-gradient(90deg,rgba(255,255,255,.045) 1px,transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(circle at 50% 35%,#000,transparent 78%);
    mask-image: radial-gradient(circle at 50% 35%,#000,transparent 78%);
}
.systems-backdrop-glow { position: absolute; width: 46rem; height: 46rem; border-radius: 50%; filter: blur(110px); opacity: .1; }
.systems-backdrop-glow--cyan { top: -18rem; right: -10rem; background: var(--systems-cyan); }
.systems-backdrop-glow--amber { bottom: -22rem; left: -14rem; background: var(--systems-amber); }

.systems-hero {
    position: relative;
    min-height: 100svh;
    padding: clamp(8rem,14vh,10rem) 0 5rem;
    overflow: hidden;
    isolation: isolate;
    background:
        linear-gradient(90deg,rgba(5,5,5,.98) 0%,rgba(5,5,5,.84) 42%,rgba(5,5,5,.14) 76%,rgba(5,5,5,.56)),
        linear-gradient(180deg,transparent 65%,#070707);
}
.systems-hero::before {
    position: absolute;
    z-index: -2;
    inset: 0;
    opacity: .38;
    background: url("world-scenes/world-aerial-night.webp") center / cover;
    filter: saturate(.62) brightness(.58);
    content: "";
}
.systems-hero::after {
    position: absolute;
    z-index: 3;
    right: 0;
    bottom: 0;
    left: 0;
    height: 1px;
    background: linear-gradient(90deg,transparent,var(--systems-cyan),var(--systems-amber),transparent);
    box-shadow: 0 0 30px rgba(var(--systems-cyan-rgb),.3);
    content: "";
}
.systems-hero-canvas { position: absolute; z-index: -1; inset: 0 0 0 39%; width: 61%; height: 100%; filter: drop-shadow(0 30px 70px #000); }
.systems-hero-shade { position: absolute; z-index: 0; inset: 0; background: radial-gradient(circle at 73% 48%,rgba(var(--systems-cyan-rgb),.08),transparent 34rem); pointer-events: none; }
.systems-hero-layout { position: relative; z-index: 2; display: grid; min-height: calc(100svh - 13rem); grid-template-columns: minmax(0,1fr) minmax(310px,.43fr); align-items: center; gap: clamp(2rem,5vw,5.5rem); }
.systems-hero-copy { max-width: 900px; }
.systems-status {
    display: inline-flex;
    width: fit-content;
    margin: 0 0 1.3rem;
    padding: .55rem .75rem;
    align-items: center;
    gap: .5rem;
    border: 1px solid rgba(var(--systems-cyan-rgb),.36);
    border-radius: 999px;
    background: rgba(5,5,5,.72);
    color: #c8c8c8;
    font-family: var(--font-display);
    font-size: .58rem;
    letter-spacing: .09em;
    box-shadow: 0 0 28px rgba(var(--systems-cyan-rgb),.08);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
}
.systems-status i { width: .48rem; height: .48rem; border-radius: 50%; background: var(--systems-green); box-shadow: 0 0 13px rgba(85,255,145,.72); }
.systems-overline { margin: 0; color: var(--systems-cyan); font-family: var(--font-display); font-size: .68rem; letter-spacing: .16em; }
.systems-hero h1 {
    max-width: 13ch;
    margin: .9rem 0 1.2rem;
    color: #fff;
    font-family: var(--font-display);
    font-size: clamp(3.7rem,6.7vw,7.6rem);
    font-weight: 400;
    letter-spacing: -.035em;
    line-height: .91;
    text-transform: uppercase;
    text-shadow: 3px 3px #000,0 22px 55px #000;
}
.systems-hero h1 span { color: transparent; -webkit-text-stroke: 1px rgba(255,170,0,.9); text-shadow: 0 0 34px rgba(var(--systems-amber-rgb),.09); }
.systems-lead { max-width: 68ch; margin: 0; color: #b9b9b9; font-size: clamp(.98rem,1.25vw,1.13rem); line-height: 1.75; text-shadow: 0 4px 20px #000; }
.systems-hero-actions { display: flex; margin-top: 1.55rem; flex-wrap: wrap; gap: .65rem; }
.systems-hero-actions .btn { min-height: 52px; }
.systems-hero-metrics { display: grid; max-width: 760px; margin: 1.4rem 0 0; padding: 0; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .55rem; list-style: none; }
.systems-hero-metrics li { display: grid; min-height: 82px; padding: .75rem; align-content: center; border: 1px solid rgba(255,255,255,.1); border-radius: 5px; background: rgba(9,9,9,.66); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.systems-hero-metrics strong { color: var(--systems-amber); font-family: var(--font-display); font-size: 1.35rem; font-weight: 400; line-height: 1; }
.systems-hero-metrics span { margin-top: .32rem; color: #777; font-size: .58rem; letter-spacing: .045em; text-transform: uppercase; }

.systems-core-terminal {
    position: relative;
    align-self: center;
    overflow: hidden;
    border: 1px solid rgba(var(--systems-cyan-rgb),.24);
    border-radius: 7px;
    background: rgba(7,8,8,.76);
    box-shadow: 0 28px 80px rgba(0,0,0,.55),inset 0 1px rgba(255,255,255,.06);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
}
.systems-core-terminal::before { position: absolute; top: 0; left: 0; width: 36%; height: 1px; background: linear-gradient(90deg,var(--systems-cyan),transparent); content: ""; }
.systems-core-terminal header,
.systems-core-terminal footer { display: flex; min-height: 48px; padding: .65rem .8rem; align-items: center; justify-content: space-between; gap: .7rem; background: rgba(255,255,255,.025); }
.systems-core-terminal header { border-bottom: 1px solid rgba(255,255,255,.08); }
.systems-core-terminal header span { display: flex; align-items: center; gap: .45rem; color: #aaa; font-family: var(--font-display); font-size: .51rem; letter-spacing: .08em; }
.systems-core-terminal header i { width: .42rem; height: .42rem; border-radius: 50%; background: var(--systems-cyan); box-shadow: 0 0 10px rgba(var(--systems-cyan-rgb),.7); }
.systems-core-terminal header strong { color: var(--systems-cyan); font-family: var(--font-display); font-size: .55rem; font-weight: 400; }
.systems-core-terminal ol { display: grid; margin: 0; padding: .55rem; gap: .28rem; list-style: none; }
.systems-core-terminal li { display: grid; min-height: 42px; padding: .45rem .55rem; align-items: center; grid-template-columns: 28px 1fr auto; gap: .4rem; border: 1px solid rgba(255,255,255,.055); background: rgba(255,255,255,.018); }
.systems-core-terminal li span { color: #4d4d4d; font-family: var(--font-display); font-size: .45rem; }
.systems-core-terminal li b { min-width: 0; overflow: hidden; color: #bcbcbc; font-family: var(--font-display); font-size: .5rem; font-weight: 400; letter-spacing: .035em; text-overflow: ellipsis; }
.systems-core-terminal li small { color: #555; font-size: .47rem; letter-spacing: .07em; }
.systems-core-terminal li:last-child { border-color: rgba(var(--systems-amber-rgb),.25); background: rgba(var(--systems-amber-rgb),.05); }
.systems-core-terminal li:last-child b { color: var(--systems-amber); }
.systems-core-terminal footer { min-height: 40px; border-top: 1px solid rgba(255,255,255,.08); color: #555; font-family: var(--font-display); font-size: .44rem; letter-spacing: .08em; }
.systems-core-terminal footer b { color: var(--systems-green); font-weight: 400; }
.systems-scroll-cue { position: absolute; z-index: 5; bottom: 1.25rem; left: 50%; display: flex; align-items: center; gap: .55rem; color: #626262; font-family: var(--font-display); font-size: .48rem; letter-spacing: .12em; transform: translateX(-50%); }
.systems-scroll-cue span { width: 8px; height: 20px; border: 1px solid #5a5a5a; border-radius: 999px; }

.systems-matrix { position: relative; height: 240vh; min-height: 1650px; background: #050505; }
.systems-matrix-sticky { position: sticky; top: 0; height: 100svh; min-height: 730px; overflow: hidden; isolation: isolate; }
.systems-matrix-sticky::after { position: absolute; z-index: 5; right: 0; bottom: 0; left: 0; height: 1px; background: linear-gradient(90deg,transparent,var(--systems-cyan),var(--systems-amber),transparent); content: ""; }
.systems-matrix-canvas { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; cursor: grab; }
.systems-matrix-canvas.is-dragging { cursor: grabbing; }
.systems-matrix-shade { position: absolute; z-index: 2; inset: 0; background: linear-gradient(90deg,rgba(5,5,5,.96),rgba(5,5,5,.35) 30%,transparent 53%,rgba(5,5,5,.5) 77%,rgba(5,5,5,.96)),linear-gradient(180deg,rgba(5,5,5,.82),transparent 26%,transparent 75%,rgba(5,5,5,.88)); pointer-events: none; }
.systems-matrix-layout { position: relative; z-index: 3; display: grid; height: 100%; padding-top: clamp(6.8rem,10.5vh,8.5rem); padding-bottom: clamp(1.3rem,3.5vh,2.6rem); grid-template-columns: minmax(250px,.72fr) minmax(320px,1.1fr) minmax(260px,.72fr); grid-template-rows: auto 1fr auto; gap: 1.2rem 2rem; pointer-events: none; }
.systems-matrix-heading { grid-column: 1 / 3; max-width: 710px; }
.systems-matrix-heading > p:first-child { display: flex; margin: 0 0 .75rem; align-items: center; gap: .8rem; color: var(--systems-cyan); font-family: var(--font-display); font-size: .55rem; letter-spacing: .13em; }
.systems-matrix-heading > p:first-child::after { width: 90px; height: 1px; background: linear-gradient(90deg,var(--systems-cyan),transparent); content: ""; }
.systems-matrix-heading > p:first-child b { color: #666; font-weight: 400; }
.systems-matrix-heading h2 { margin: 0; color: #fff; font-family: var(--font-display); font-size: clamp(2.9rem,5.7vw,6.4rem); font-weight: 400; letter-spacing: -.03em; line-height: .91; text-transform: uppercase; text-shadow: 3px 3px #000,0 25px 55px #000; }
.systems-matrix-heading h2 span { color: transparent; -webkit-text-stroke: 1px rgba(var(--systems-cyan-rgb),.72); }
.systems-matrix-heading > p:last-child { max-width: 54ch; margin: .9rem 0 0; color: #8e8e8e; line-height: 1.65; }
.systems-matrix-selector { display: grid; width: min(100%,340px); align-self: end; grid-column: 1; grid-row: 2; gap: .26rem; pointer-events: auto; }
.systems-matrix-selector button { position: relative; display: grid; min-height: 47px; padding: .38rem .55rem; align-items: center; grid-template-columns: 30px 1fr; gap: .4rem; overflow: hidden; border: 1px solid rgba(255,255,255,.08); border-radius: 4px; background: rgba(10,10,10,.7); color: #666; text-align: left; cursor: pointer; transition: transform 180ms ease,border-color 180ms ease,background 180ms ease; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.systems-matrix-selector button > span:first-child { font-family: var(--font-display); font-size: .45rem; }
.systems-matrix-selector button > span:nth-child(2) { display: grid; min-width: 0; gap: .05rem; }
.systems-matrix-selector small { color: #555; font-size: .46rem; letter-spacing: .07em; text-transform: uppercase; }
.systems-matrix-selector strong { overflow: hidden; color: #aaa; font-family: var(--font-display); font-size: .49rem; font-weight: 400; letter-spacing: .035em; text-overflow: ellipsis; text-transform: uppercase; }
.systems-matrix-selector i { position: absolute; right: 0; bottom: 0; left: 0; height: 2px; background: linear-gradient(90deg,var(--systems-cyan),var(--systems-amber)); transform: scaleX(0); transform-origin: left; }
.systems-matrix-selector button:hover { border-color: rgba(var(--systems-cyan-rgb),.38); transform: translateX(4px); }
.systems-matrix-selector button.is-active { border-color: rgba(var(--systems-cyan-rgb),.48); background: linear-gradient(90deg,rgba(var(--systems-cyan-rgb),.12),rgba(8,8,8,.76)); box-shadow: inset 3px 0 var(--systems-cyan); }
.systems-matrix-selector button.is-active strong { color: #fff; }
.systems-matrix-selector button.is-active small { color: var(--systems-cyan); }
.systems-matrix-detail { width: min(100%,370px); padding: 1.15rem; align-self: center; justify-self: end; grid-column: 3; grid-row: 2; border: 1px solid rgba(var(--systems-cyan-rgb),.24); border-radius: 7px; background: linear-gradient(145deg,rgba(18,18,18,.84),rgba(5,5,5,.74)); box-shadow: 0 28px 75px rgba(0,0,0,.58),inset 0 1px rgba(255,255,255,.07); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.systems-matrix-detail::before { display: block; width: 58px; height: 2px; margin-bottom: 1rem; background: linear-gradient(90deg,var(--systems-cyan),var(--systems-amber)); box-shadow: 0 0 18px rgba(var(--systems-cyan-rgb),.4); content: ""; }
.systems-matrix-detail > p:first-child { margin: 0; color: var(--systems-cyan); font-family: var(--font-display); font-size: .51rem; letter-spacing: .1em; text-transform: uppercase; }
.systems-matrix-detail h3 { margin: .5rem 0 .65rem; color: #fff; font-family: var(--font-display); font-size: clamp(1.6rem,2.55vw,2.8rem); font-weight: 400; line-height: 1; overflow-wrap: anywhere; text-transform: uppercase; }
.systems-matrix-detail > p:nth-child(3) { margin: 0; color: #9b9b9b; font-size: .78rem; line-height: 1.7; }
.systems-matrix-detail > div { display: flex; margin-top: 1rem; padding-top: .8rem; align-items: center; justify-content: space-between; gap: .8rem; border-top: 1px solid #292929; }
.systems-matrix-detail span { color: #555; font-family: var(--font-display); font-size: .45rem; letter-spacing: .08em; }
.systems-matrix-detail code { color: var(--systems-amber); font-family: ui-monospace,SFMono-Regular,Consolas,monospace; font-size: .76rem; }
.systems-matrix-footer { display: grid; align-items: center; grid-column: 1 / -1; grid-row: 3; grid-template-columns: 1fr auto 1fr; gap: 1rem; pointer-events: auto; }
.systems-matrix-footer > span { display: flex; align-items: center; gap: .5rem; color: #5b5b5b; font-family: var(--font-display); font-size: .45rem; letter-spacing: .08em; }
.systems-matrix-footer > span i { width: .45rem; height: .45rem; border-radius: 50%; background: var(--systems-cyan); box-shadow: 0 0 12px rgba(var(--systems-cyan-rgb),.75); }
.systems-matrix-footer > span b { font-weight: 400; }
.systems-matrix-footer > div { display: flex; gap: .4rem; }
.systems-matrix-footer button { display: grid; width: 44px; height: 44px; place-items: center; border: 1px solid #393939; border-radius: 5px; background: rgba(18,18,18,.82); color: #aaa; cursor: pointer; }
.systems-matrix-footer button:hover { border-color: var(--systems-cyan); color: var(--systems-cyan); }
.systems-matrix-footer svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.systems-matrix-footer > a { display: inline-flex; justify-self: end; align-items: center; gap: .5rem; color: #aaa; font-family: var(--font-display); font-size: .52rem; letter-spacing: .07em; text-transform: uppercase; }
.systems-matrix-footer > a:hover { color: var(--systems-amber); }

.systems-directory,
.teleport-console,
.systems-principle { position: relative; padding: clamp(5rem,9vw,8rem) 0; }
.systems-directory { z-index: 2; border-top: 1px solid rgba(var(--systems-cyan-rgb),.12); background: linear-gradient(180deg,rgba(7,7,7,.96),rgba(7,7,7,.99)),url("world-scenes/crown-city-panorama.webp") center / cover fixed; }
.systems-section-heading { display: grid; grid-template-columns: minmax(0,1fr) minmax(280px,.58fr); align-items: end; gap: 2rem; }
.systems-section-heading .section-title { max-width: 15ch; margin-bottom: 0; }
.systems-section-heading > p { max-width: 62ch; margin: 0 0 .3rem; color: #929292; line-height: 1.72; }
.systems-directory-toolbar { position: sticky; z-index: 18; top: 86px; display: grid; margin: 2.3rem 0 1.1rem; padding: .65rem; grid-template-columns: minmax(230px,.35fr) minmax(0,1fr) auto; align-items: center; gap: .75rem; border: 1px solid #303030; border-radius: 6px; background: rgba(12,12,12,.94); box-shadow: 0 16px 38px rgba(0,0,0,.4); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.systems-search,
.command-search { display: flex; min-height: 44px; padding: 0 .75rem; align-items: center; gap: .5rem; border: 1px solid #363636; border-radius: 4px; background: #090909; color: #676767; }
.systems-search:focus-within,
.command-search:focus-within { border-color: var(--systems-cyan); box-shadow: 0 0 0 3px rgba(var(--systems-cyan-rgb),.09); color: var(--systems-cyan); }
.systems-search svg,
.command-search svg { width: 17px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; }
.systems-search input,
.command-search input { width: 100%; min-width: 0; padding: 0; border: 0; outline: 0; background: transparent; color: #fff; font: inherit; font-size: .76rem; }
.systems-directory-toolbar > div,
.command-toolbar > div { display: flex; min-width: 0; flex-wrap: wrap; gap: .35rem; }
.systems-directory-toolbar button,
.command-toolbar button { min-height: 44px; padding: .52rem .66rem; border: 1px solid #373737; border-radius: 4px; background: #1a1a1a; color: #8d8d8d; font-family: var(--font-display); font-size: .5rem; letter-spacing: .035em; cursor: pointer; }
.systems-directory-toolbar button span,
.command-toolbar button span { margin-left: .25rem; color: #555; }
.systems-directory-toolbar button:hover,
.command-toolbar button:hover { border-color: #646464; color: #fff; }
.systems-directory-toolbar button.is-active,
.command-toolbar button.is-active { border-color: var(--systems-cyan); background: rgba(var(--systems-cyan-rgb),.1); color: var(--systems-cyan); }
.systems-directory-toolbar button.is-active span,
.command-toolbar button.is-active span { color: var(--systems-cyan); }
.systems-directory-toolbar > p,
.command-toolbar > p { margin: 0; color: #666; font-size: .66rem; white-space: nowrap; }

.systems-card-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .9rem; perspective: 1500px; }
.system-card {
    --card-rgb: 85,217,255;
    position: relative;
    display: grid;
    min-width: 0;
    grid-template-columns: minmax(190px,.72fr) minmax(0,1fr);
    overflow: hidden;
    border: 1px solid #343434;
    border-top-color: #494949;
    border-radius: 8px;
    background: linear-gradient(145deg,rgba(var(--card-rgb),.07),#171717 43%,#0c0c0c);
    box-shadow: 0 22px 52px rgba(0,0,0,.46);
    transform-style: preserve-3d;
    will-change: transform;
}
.system-card::before { position: absolute; z-index: 5; inset: 0; opacity: 0; background: radial-gradient(430px circle at var(--pointer-x,50%) var(--pointer-y,50%),rgba(var(--card-rgb),.15),transparent 43%); content: ""; pointer-events: none; transition: opacity 180ms ease; }
.system-card::after { position: absolute; inset: 0; opacity: 0; border: 1px solid rgba(var(--card-rgb),.45); border-radius: inherit; box-shadow: inset 0 0 44px rgba(var(--card-rgb),.07); content: ""; pointer-events: none; transition: opacity 180ms ease; }
.system-card:hover::before,.system-card:hover::after,.system-card:focus-within::before,.system-card:focus-within::after { opacity: 1; }
.system-card[hidden] { display: none; }
.system-card--security { --card-rgb: 255,112,72; }
.system-card--sleep { --card-rgb: 113,157,255; }
.system-card--trade { --card-rgb: 85,255,145; }
.system-card--tab { --card-rgb: 123,213,255; }
.system-card--qol { --card-rgb: 255,174,56; }
.system-card--discord { --card-rgb: 120,126,255; }
.system-card--teleport { --card-rgb: 255,170,0; }
.system-card-visual { position: relative; display: grid; min-height: 315px; place-items: center; overflow: hidden; border-right: 1px solid rgba(255,255,255,.08); background: radial-gradient(circle at 50% 53%,rgba(var(--card-rgb),.19),transparent 36%),linear-gradient(180deg,rgba(var(--card-rgb),.055),rgba(0,0,0,.3)); transform-style: preserve-3d; }
.system-card-visual::before { position: absolute; inset: 0; opacity: .1; background-image: linear-gradient(rgba(var(--card-rgb),.35) 1px,transparent 1px),linear-gradient(90deg,rgba(var(--card-rgb),.35) 1px,transparent 1px); background-size: 34px 34px; content: ""; }
.system-card-visual::after { position: absolute; bottom: 12%; left: 50%; width: 58%; height: 12%; border: 1px solid rgba(var(--card-rgb),.4); border-radius: 50%; background: radial-gradient(ellipse,rgba(var(--card-rgb),.15),transparent 68%); box-shadow: 0 0 25px rgba(var(--card-rgb),.18); content: ""; transform: translateX(-50%); }
.system-card-visual > span { position: absolute; z-index: 3; top: .8rem; left: .8rem; color: rgba(var(--card-rgb),.55); font-family: var(--font-display); font-size: .53rem; letter-spacing: .08em; }
.system-card-visual > svg { position: relative; z-index: 2; width: 42%; max-width: 130px; fill: none; stroke: rgb(var(--card-rgb)); stroke-width: 1.8; filter: drop-shadow(0 0 24px rgba(var(--card-rgb),.35)); transform: translateZ(42px); will-change: transform; }
.system-card-visual > img { position: relative; z-index: 2; width: 38%; max-width: 112px; height: auto; object-fit: contain; filter: drop-shadow(0 0 25px rgba(var(--card-rgb),.45)); transform: translateZ(42px); will-change: transform; }
.system-card-visual > i { position: absolute; z-index: 1; width: 52%; aspect-ratio: 1; border: 1px solid rgba(var(--card-rgb),.24); border-radius: 50%; box-shadow: 0 0 50px rgba(var(--card-rgb),.08),inset 0 0 35px rgba(var(--card-rgb),.06); }
.system-card-body { display: flex; min-width: 0; padding: 1.3rem; flex-direction: column; }
.system-card-body > p:first-child { margin: 0; color: rgb(var(--card-rgb)); font-family: var(--font-display); font-size: .5rem; letter-spacing: .09em; text-transform: uppercase; }
.system-card-body h3 { margin: .42rem 0 .55rem; color: #fff; font-family: var(--font-display); font-size: clamp(1.35rem,2.2vw,2.2rem); font-weight: 400; line-height: 1; overflow-wrap: anywhere; text-transform: uppercase; }
.system-card--security h3,
.system-card--discord h3 { font-size: clamp(1.08rem,1.48vw,1.58rem); letter-spacing: -.02em; }
.system-card-body > p:nth-child(3) { margin: 0; color: #999; font-size: .78rem; line-height: 1.6; }
.system-card-entry { display: grid; margin: 1rem 0; padding: .72rem; gap: .2rem; border: 1px solid rgba(var(--card-rgb),.18); border-radius: 4px; background: rgba(0,0,0,.25); }
.system-card-entry span { color: #555; font-family: var(--font-display); font-size: .43rem; letter-spacing: .08em; }
.system-card-entry code { color: rgb(var(--card-rgb)); font-family: ui-monospace,SFMono-Regular,Consolas,monospace; font-size: .7rem; overflow-wrap: anywhere; }
.system-card-toggle { display: flex; min-height: 44px; margin-top: auto; padding: .55rem .7rem; align-items: center; justify-content: space-between; gap: .6rem; border: 1px solid #343434; border-radius: 4px; background: #181818; color: #9a9a9a; font-family: var(--font-display); font-size: .49rem; letter-spacing: .055em; cursor: pointer; }
.system-card-toggle:hover { border-color: rgba(var(--card-rgb),.48); color: #fff; }
.system-card-toggle svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; transition: transform 180ms ease; }
.system-card-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.system-card-details { display: grid; height: 0; opacity: 0; overflow: hidden; }
.system-card-details > div { padding-top: .85rem; }
.system-card-details p { margin: 0; color: #878787; font-size: .73rem; line-height: 1.65; }
.system-card-details a { display: inline-flex; margin-top: .7rem; align-items: center; gap: .4rem; color: rgb(var(--card-rgb)); font-family: var(--font-display); font-size: .48rem; text-transform: uppercase; }
.system-card-details a svg { width: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.systems-empty,.commands-empty { min-height: 320px; padding: 2rem; place-items: center; align-content: center; border: 1px dashed #404040; border-radius: 7px; background: rgba(9,9,9,.82); text-align: center; }
.systems-empty:not([hidden]),.commands-empty:not([hidden]) { display: grid; }
.systems-empty > span,.commands-empty > span { width: 48px; height: 48px; border: 2px solid #4b4b4b; border-radius: 50%; box-shadow: inset 0 0 0 8px #151515; }
.systems-empty h3,.commands-empty h3 { margin: 1rem 0 .35rem; color: #fff; font-family: var(--font-display); font-size: 1.35rem; font-weight: 400; text-transform: uppercase; }
.systems-empty p,.commands-empty p { margin: 0 0 1rem; color: #777; }

.teleport-console { border-top: 1px solid rgba(var(--systems-amber-rgb),.15); background: #080808; }
.teleport-console::before { position: absolute; inset: 0; opacity: .12; background-image: linear-gradient(rgba(255,255,255,.05) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.05) 1px,transparent 1px); background-size: 48px 48px; content: ""; pointer-events: none; }
.teleport-console > .container { position: relative; }
.teleport-console-heading .section-title { max-width: 16ch; }
.teleport-critical { display: grid; margin: 2rem 0 1rem; padding: clamp(1rem,2vw,1.4rem); grid-template-columns: 54px 1fr; gap: 1rem; border: 1px solid rgba(var(--systems-amber-rgb),.3); border-radius: 7px; background: linear-gradient(90deg,rgba(var(--systems-amber-rgb),.09),rgba(16,16,16,.92)); box-shadow: 0 20px 45px rgba(0,0,0,.32); }
.teleport-critical > span { display: grid; width: 54px; height: 54px; place-items: center; border: 1px solid rgba(var(--systems-amber-rgb),.35); border-radius: 5px; background: rgba(var(--systems-amber-rgb),.08); color: var(--systems-amber); }
.teleport-critical svg { width: 26px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.teleport-critical div > p:first-child { margin: 0 0 .25rem; color: var(--systems-amber); font-family: var(--font-display); font-size: .49rem; letter-spacing: .1em; }
.teleport-critical h3 { margin: 0 0 .45rem; color: #fff; font-family: var(--font-display); font-size: clamp(1.2rem,2vw,1.75rem); font-weight: 400; text-transform: uppercase; }
.teleport-critical div > p:last-child { margin: 0; color: #999; line-height: 1.65; }
.teleport-critical code { color: #ffd27a; font-family: ui-monospace,SFMono-Regular,Consolas,monospace; }
.command-shell { overflow: hidden; border: 1px solid #343434; border-radius: 8px; background: #0b0b0b; box-shadow: 0 30px 75px rgba(0,0,0,.48); }
.command-shell-header { display: grid; min-height: 48px; padding: .65rem .8rem; align-items: center; grid-template-columns: 1fr auto 1fr; gap: 1rem; border-bottom: 1px solid #303030; background: #141414; }
.command-shell-header > span { display: flex; gap: .35rem; }
.command-shell-header i { width: .56rem; height: .56rem; border-radius: 50%; background: #3f3f3f; }
.command-shell-header i:first-child { background: #ff6c58; }.command-shell-header i:nth-child(2) { background: #ffaa00; }.command-shell-header i:last-child { background: #55d98a; }
.command-shell-header strong { color: #888; font-family: var(--font-display); font-size: .5rem; font-weight: 400; letter-spacing: .09em; }
.command-shell-header b { justify-self: end; color: var(--systems-cyan); font-family: var(--font-display); font-size: .48rem; font-weight: 400; letter-spacing: .08em; }
.command-toolbar { position: sticky; z-index: 10; top: 86px; display: grid; padding: .65rem; grid-template-columns: minmax(230px,.34fr) minmax(0,1fr) auto; align-items: center; gap: .65rem; border-bottom: 1px solid #2d2d2d; background: rgba(13,13,13,.96); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.command-table { position: relative; }
.command-table-head,.command-row { display: grid; grid-template-columns: minmax(190px,.82fr) minmax(190px,.9fr) minmax(300px,1.7fr); gap: 1rem; }
.command-table-head { position: sticky; z-index: 8; top: 151px; min-height: 40px; padding: .6rem 1rem; align-items: center; border-bottom: 1px solid #2c2c2c; background: rgba(15,15,15,.96); color: #555; font-family: var(--font-display); font-size: .44rem; letter-spacing: .08em; text-transform: uppercase; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.command-group-label { display: grid; min-height: 62px; padding: .8rem 1rem; align-items: center; grid-template-columns: 38px 1fr auto; gap: .65rem; border-bottom: 1px solid rgba(var(--systems-cyan-rgb),.18); background: linear-gradient(90deg,rgba(var(--systems-cyan-rgb),.08),transparent); }
.command-group-label[hidden] { display: none; }
.command-group-label span { color: var(--systems-cyan); font-family: var(--font-display); font-size: .54rem; }
.command-group-label strong { color: #ddd; font-family: var(--font-display); font-size: .62rem; font-weight: 400; letter-spacing: .05em; text-transform: uppercase; }
.command-group-label small { color: #5d5d5d; font-size: .56rem; }
.command-row { min-height: 58px; padding: .72rem 1rem; align-items: center; border-bottom: 1px solid #202020; transition: background 160ms ease,border-color 160ms ease; }
.command-row:hover { border-bottom-color: rgba(var(--systems-cyan-rgb),.24); background: rgba(var(--systems-cyan-rgb),.045); }
.command-row[hidden] { display: none; }
.command-row > code { color: #d9f7ff; font-family: ui-monospace,SFMono-Regular,Consolas,monospace; font-size: .74rem; overflow-wrap: anywhere; }
.command-row > span { color: #6f8b92; font-family: ui-monospace,SFMono-Regular,Consolas,monospace; font-size: .66rem; overflow-wrap: anywhere; }
.command-row > p { margin: 0; color: #929292; font-size: .73rem; line-height: 1.55; }
.command-row > p code { color: var(--systems-amber); font-family: ui-monospace,SFMono-Regular,Consolas,monospace; }
.command-alias-note { margin: 1rem; padding: 1rem; border-left: 3px solid var(--systems-amber); background: rgba(var(--systems-amber-rgb),.055); color: #898989; font-size: .75rem; line-height: 1.65; }
.command-alias-note strong,.command-alias-note code { color: #d7af68; }
.commands-empty { margin: 1rem; }

.systems-principle { border-top: 1px solid rgba(255,255,255,.06); background: #060606; }
.systems-principle-panel { display: grid; padding: clamp(1.3rem,3vw,2.2rem); grid-template-columns: 110px minmax(0,1fr) auto; align-items: center; gap: clamp(1.2rem,3vw,2.2rem); border: 1px solid #353535; border-top-color: #4a4a4a; border-radius: 8px; background: linear-gradient(145deg,#1a1a1a,#0d0d0d); box-shadow: 0 25px 60px rgba(0,0,0,.48); }
.systems-principle-panel > img { width: 110px; height: 110px; border: 1px solid rgba(var(--systems-cyan-rgb),.25); border-radius: 7px; background: #080808; object-fit: cover; }
.systems-principle-panel h2 { max-width: 17ch; margin: .35rem 0 .55rem; color: #fff; font-family: var(--font-display); font-size: clamp(1.7rem,3.4vw,3.2rem); font-weight: 400; line-height: 1; text-transform: uppercase; }
.systems-principle-panel div > p:last-child { max-width: 66ch; margin: 0; color: #929292; line-height: 1.7; }
.systems-magnetic { will-change: transform; }

@media (max-width: 1180px) {
    .systems-hero-layout { grid-template-columns: minmax(0,1fr) minmax(285px,.38fr); }
    .systems-hero h1 { font-size: clamp(3.5rem,7vw,6.3rem); }
    .systems-matrix-layout { grid-template-columns: minmax(225px,.68fr) minmax(260px,1fr) minmax(230px,.68fr); gap-inline: 1rem; }
    .system-card { grid-template-columns: 1fr; }
    .system-card-visual { min-height: 265px; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.08); }
    .systems-directory-toolbar,.command-toolbar { grid-template-columns: minmax(220px,.35fr) minmax(0,1fr); }
    .systems-directory-toolbar > p,.command-toolbar > p { grid-column: 1 / -1; }
}

@media (min-width: 681px) and (max-height: 780px) {
    .systems-matrix-layout { padding-top: 5.7rem; padding-bottom: .75rem; gap-block: .55rem; }
    .systems-matrix-heading h2 { font-size: clamp(2.3rem,4.25vw,4rem); }
    .systems-matrix-heading > p:last-child { max-width: 48ch; margin-top: .55rem; font-size: .75rem; line-height: 1.5; }
    .systems-matrix-selector { gap: .16rem; }
    .systems-matrix-selector button { min-height: 37px; padding-block: .24rem; }
    .systems-matrix-detail { padding: .95rem; }
    .systems-matrix-footer button { width: 40px; height: 40px; }
}

@media (max-width: 940px) {
    .systems-hero-canvas { inset: 30% -10% 0 28%; width: 82%; height: 70%; opacity: .7; }
    .systems-hero-layout { grid-template-columns: 1fr; }
    .systems-core-terminal { width: min(100%,560px); justify-self: end; }
    .systems-matrix { height: 205vh; min-height: 1450px; }
    .systems-matrix-layout { grid-template-columns: minmax(240px,.72fr) minmax(300px,1fr); }
    .systems-matrix-heading { grid-column: 1 / -1; }
    .systems-matrix-detail { grid-column: 2; }
    .systems-section-heading { grid-template-columns: 1fr; align-items: start; }
    .systems-directory-toolbar,.command-toolbar { position: static; grid-template-columns: 1fr; }
    .command-table-head { top: 86px; }
    .command-table-head,.command-row { grid-template-columns: minmax(170px,.8fr) minmax(160px,.8fr) minmax(260px,1.5fr); }
    .command-table { overflow-x: auto; }
    .command-table-head,.command-row,.command-group-label { min-width: 760px; }
    .systems-principle-panel { grid-template-columns: 90px minmax(0,1fr); }
    .systems-principle-panel > img { width: 90px; height: 90px; }
    .systems-principle-panel .btn { grid-column: 2; width: fit-content; }
}

@media (max-width: 680px) {
    .systems-page .nav-link small { display: none; }
    .systems-hero { min-height: auto; padding: 6.8rem 0 4.5rem; }
    .systems-hero-canvas { display: none; }
    .systems-hero::before { opacity: .28; }
    .systems-hero h1 { font-size: clamp(2.65rem,13vw,4.2rem); }
    .systems-lead { color: #d0d0d0; }
    .systems-hero-actions .btn { width: 100%; }
    .systems-hero-metrics { grid-template-columns: 1fr; }
    .systems-hero-metrics li { min-height: 68px; }
    .systems-core-terminal { width: 100%; }
    .systems-scroll-cue { display: none; }
    .systems-matrix { height: auto; min-height: 0; }
    .systems-matrix-sticky { position: relative; height: auto; min-height: 0; padding: 5.2rem 0 3.5rem; }
    .systems-matrix-canvas { display: none; }
    .systems-matrix-shade { background: radial-gradient(circle at 50% 40%,rgba(var(--systems-cyan-rgb),.1),transparent 28rem),#050505; }
    .systems-matrix-layout { height: auto; padding-block: 0; grid-template-columns: 1fr; grid-template-rows: auto; gap: 1.3rem; }
    .systems-matrix-heading,.systems-matrix-selector,.systems-matrix-detail,.systems-matrix-footer { width: 100%; max-width: none; grid-column: 1; grid-row: auto; }
    .systems-matrix-heading h2 { font-size: clamp(2.55rem,12vw,4rem); }
    .systems-matrix-selector { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .systems-matrix-selector button { min-height: 58px; }
    .systems-matrix-detail { justify-self: stretch; }
    .systems-matrix-footer { grid-template-columns: 1fr auto; }
    .systems-matrix-footer > div { grid-column: 2; grid-row: 1; }
    .systems-matrix-footer > a { grid-column: 1 / -1; justify-self: stretch; justify-content: center; min-height: 44px; border: 1px solid #333; border-radius: 4px; }
    .systems-card-grid { grid-template-columns: 1fr; }
    .system-card-visual { min-height: 245px; }
    .teleport-critical { grid-template-columns: 1fr; }
    .command-shell-header { grid-template-columns: 1fr auto; }
    .command-shell-header strong { display: none; }
    .systems-principle-panel { grid-template-columns: 1fr; }
    .systems-principle-panel .btn { grid-column: 1; width: 100%; }
}

@media (max-width: 420px) {
    .systems-status { padding: .45rem .58rem; font-size: .49rem; }
    .systems-overline { font-size: .58rem; }
    .systems-hero h1 { margin-block: .7rem .9rem; font-size: clamp(2.3rem,11.9vw,3.05rem); }
    .systems-lead { font-size: .92rem; line-height: 1.62; }
    .systems-hero-metrics { gap: .35rem; }
    .systems-core-terminal li { grid-template-columns: 25px 1fr; }
    .systems-core-terminal li small { display: none; }
    .systems-matrix-selector { grid-template-columns: 1fr; }
    .systems-matrix-heading > p:first-child { align-items: flex-start; flex-direction: column; gap: .35rem; }
    .systems-matrix-heading > p:first-child::after { display: none; }
    .systems-directory-toolbar button,.command-toolbar button { flex: 1 1 calc(50% - .4rem); }
    .system-card-body { padding: 1.05rem; }
    .teleport-critical > span { width: 48px; height: 48px; }
    .command-shell-header b { font-size: .42rem; }
}

@media (prefers-reduced-motion: reduce) {
    .systems-matrix { height: auto; min-height: 0; }
    .systems-matrix-sticky { position: relative; }
    .systems-magnetic,.system-card,.system-card-visual > svg,.system-card-visual > img,.systems-matrix-selector button,.systems-matrix-selector i { transform: none !important; transition: none !important; }
}
