/* /galaxy: the explorable tool galaxy. Loaded only by galaxy.php ($extraCss); the map is drawn by assets/js/galaxy.js.
 *
 *   .gx-stage     the full-screen map: one canvas, the system-name buttons the script places over it, and a HUD in
 *                 the /flagships "command centre" language (glass panels, hairlines, corner brackets, mono readouts).
 *   .gx-list      every category and tool as a real list (the page's content without JavaScript, and for readers).
 *
 * Two looks: dark is deep space; light is a pale star atlas (paper, ink rules, serif names), not an inverted sky.
 * Category hues arrive as --h (0-360) on each element that needs one.
 * Motion here is opacity and transforms only, and stops under prefers-reduced-motion. */

.gx {
    --gx-top: 104px;                                   /* header height; the script measures the real one */
    --gx-bg: #03050a;
    --gx-panel: rgba(7, 10, 17, .74);
    --gx-panel-solid: rgba(9, 12, 20, .975);
    --gx-line: rgba(160, 185, 225, .15);
    --gx-line-2: rgba(160, 185, 225, .32);
    --gx-ink: #e8eaed;
    --gx-mut: #a3adbd;
    --gx-faint: #7d8899;
    --gx-acc: #9cc4ff;
    --gx-gold: #f2c46d;
    --gx-serif: Georgia, 'Times New Roman', Times, serif;
    --gx-shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 18px 50px -24px rgba(0, 0, 0, .8);
    --gx-sys-ink: hsl(var(--h, 210), 80%, 78%);
    position: relative;
    color: var(--text-primary);
}
[data-theme="light"] .gx {
    --gx-bg: #f3eee2;
    --gx-panel: rgba(250, 247, 239, .86);
    --gx-panel-solid: rgba(251, 249, 243, .985);
    --gx-line: rgba(29, 39, 53, .16);
    --gx-line-2: rgba(29, 39, 53, .42);
    --gx-ink: #1c2533;
    --gx-mut: #4a5464;
    --gx-faint: #646d7b;
    --gx-acc: #1f5592;
    --gx-gold: #8a5a0b;
    --gx-shadow: 0 1px 2px rgba(60, 45, 20, .06), 0 14px 34px -20px rgba(60, 45, 20, .3);
    --gx-sys-ink: hsl(var(--h, 210), 48%, 28%);
}
body:has(.gx) .ub-ambient { display: none; }          /* this page draws its own sky */
.gx kbd {
    display: inline-block;
    min-width: 1.6em;
    padding: 0 .35em;
    border: 1px solid var(--gx-line-2);
    border-bottom-width: 2px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: .68rem;
    line-height: 1.5;
    text-align: center;
    color: var(--gx-mut);
    background: transparent;
}

/* ================================================================== stage */
.gx-stage {
    position: relative;
    overflow: hidden;
    background: var(--gx-bg);
    color: var(--gx-ink);
    scroll-margin-top: var(--gx-top);
    isolation: isolate;
}
.gx-on .gx-stage {
    height: calc(100vh - var(--gx-top));
    height: calc(100svh - var(--gx-top));
    min-height: 520px;
}
@media (pointer: coarse) {                             /* leave a strip of the page showing, so touch can scroll on */
    .gx-on .gx-stage { height: calc(100svh - var(--gx-top) - 52px); min-height: 480px; }
}
.gx-canvas, .gx-map { position: absolute; inset: 0; width: 100%; height: 100%; }
.gx-canvas { display: block; z-index: 0; }
.gx-map {
    z-index: 1;
    cursor: grab;
    touch-action: none;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}
.gx-stage.is-dragging .gx-map { cursor: grabbing; }
.gx-map:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.gx-systems { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.gx-nojs { display: none; }
html:not(.gx-on) .gx-stage { padding: clamp(28px, 5vw, 56px) 0 0; background: transparent; color: var(--text-primary); }
html:not(.gx-on) .gx-canvas, html:not(.gx-on) .gx-map, html:not(.gx-on) .gx-systems, html:not(.gx-on) .gx-frame,
html:not(.gx-on) .gx-readout, html:not(.gx-on) .gx-dock, html:not(.gx-on) .gx-legend, html:not(.gx-on) .gx-search,
html:not(.gx-on) .gx-sysinfo, html:not(.gx-on) .gx-card { display: none !important; }
html:not(.gx-on) .gx-nojs { display: block; max-width: var(--max-width); margin: 14px auto 0; padding: 0 var(--gutter); color: var(--text-secondary); }
html:not(.gx-on) .gx-intro { position: static; width: auto; max-width: var(--max-width); margin: 0 auto; padding: 0 var(--gutter); border: 0; background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
html:not(.gx-on) .gx-intro::before, html:not(.gx-on) .gx-intro::after, html:not(.gx-on) .gx-lede-more, html:not(.gx-on) .gx-list__back { display: none; }
html:not(.gx-on) .gx-title { font-size: clamp(2rem, 4vw, 2.8rem); color: var(--text-primary); }
html:not(.gx-on) .gx-lede { display: block; color: var(--text-secondary); }

/* the stage frame: corner brackets */
.gx-frame { position: absolute; inset: 14px; z-index: 2; pointer-events: none; }
.gx-frame i { position: absolute; width: 18px; height: 18px; border: 0 solid var(--gx-line-2); }
.gx-frame i:nth-child(1) { left: 0; top: 0; border-left-width: 1px; border-top-width: 1px; }
.gx-frame i:nth-child(2) { right: 0; top: 0; border-right-width: 1px; border-top-width: 1px; }
.gx-frame i:nth-child(3) { right: 0; bottom: 0; border-right-width: 1px; border-bottom-width: 1px; }
.gx-frame i:nth-child(4) { left: 0; bottom: 0; border-left-width: 1px; border-bottom-width: 1px; }
[data-theme="light"] .gx-frame { display: none; }      /* the atlas has its neatline instead (drawn on the canvas) */

/* ------------------------------------------------------------------ panels */
.gx-panel {
    position: absolute;
    z-index: 3;
    border: 1px solid var(--gx-line);
    border-radius: 12px;
    background: var(--gx-panel);
    box-shadow: var(--gx-shadow);
    -webkit-backdrop-filter: blur(10px) saturate(1.2);
            backdrop-filter: blur(10px) saturate(1.2);
}
.gx-panel::after {                                     /* corner brackets, as on the /flagships panels */
    content: '';
    position: absolute;
    inset: 6px;
    pointer-events: none;
    --c: var(--gx-line-2);
    background:
        linear-gradient(var(--c), var(--c)) left top / 10px 1px,
        linear-gradient(var(--c), var(--c)) left top / 1px 10px,
        linear-gradient(var(--c), var(--c)) right top / 10px 1px,
        linear-gradient(var(--c), var(--c)) right top / 1px 10px,
        linear-gradient(var(--c), var(--c)) left bottom / 10px 1px,
        linear-gradient(var(--c), var(--c)) left bottom / 1px 10px,
        linear-gradient(var(--c), var(--c)) right bottom / 10px 1px,
        linear-gradient(var(--c), var(--c)) right bottom / 1px 10px;
    background-repeat: no-repeat;
    opacity: .8;
}
[data-theme="light"] .gx-panel {
    border-color: rgba(29, 39, 53, .3);
    border-radius: 3px;
    -webkit-backdrop-filter: none;
            backdrop-filter: none;
}
[data-theme="light"] .gx-panel::after { inset: 3px; background: none; border: 1px solid rgba(29, 39, 53, .14); border-radius: 1px; }

/* ------------------------------------------------------------------ intro + search (top left) */
.gx-intro {
    left: 28px;
    top: 28px;
    width: 352px;
    padding: 18px 20px 16px;
}
.gx-intro::before {                                    /* the lit top edge */
    content: '';
    position: absolute;
    left: 22px;
    right: 22px;
    top: -1px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gx-acc) 30%, color-mix(in srgb, var(--gx-acc) 60%, #fff) 50%, var(--gx-acc) 70%, transparent);
    opacity: .7;
}
[data-theme="light"] .gx-intro::before { display: none; }
.gx-eyebrow {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 9px;
    font-family: var(--font-mono);
    font-size: .68rem;
    font-weight: 500;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--gx-faint);
}
.gx-pulse {
    flex: none;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #7be0a5;
    box-shadow: 0 0 0 3px rgba(123, 224, 165, .16), 0 0 12px rgba(123, 224, 165, .6);
    animation: gx-breathe 2.6s ease-in-out infinite alternate;
}
[data-theme="light"] .gx-pulse { background: #1f8a58; box-shadow: 0 0 0 3px rgba(31, 138, 88, .15); }
@keyframes gx-breathe { from { opacity: .45; } to { opacity: 1; } }
.gx-title {
    margin: 0;
    font-family: var(--gx-serif);
    font-size: 1.9rem;
    font-weight: 400;
    line-height: 1.08;
    letter-spacing: -.012em;
    color: var(--gx-ink);
}
.gx-lede { margin: 9px 0 14px; font-size: .9rem; line-height: 1.5; color: var(--gx-mut); }

.gx-search { position: relative; margin: 0; }
.gx-search__icon { position: absolute; left: 12px; top: 13px; color: var(--gx-faint); pointer-events: none; }
.gx-search__input {
    width: 100%;
    height: 42px;
    padding: 0 40px 0 38px;
    border: 1px solid var(--gx-line-2);
    border-radius: 8px;
    background: color-mix(in srgb, var(--gx-bg) 70%, transparent);
    color: var(--gx-ink);
    font-family: var(--font-body);
    font-size: .92rem;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
    -webkit-appearance: none;
            appearance: none;
}
.gx-search__input::placeholder { color: var(--gx-faint); }
.gx-search__input:focus { border-color: var(--gx-acc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gx-acc) 22%, transparent); }
[data-theme="light"] .gx-search__input { border-radius: 2px; background: #fffdf8; }
.gx-search__input::-webkit-search-cancel-button { -webkit-appearance: none; }
.gx-search__kbd {
    position: absolute;
    right: 10px;
    top: 11px;
    min-width: 20px;
    height: 20px;
    border: 1px solid var(--gx-line-2);
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: .7rem;
    line-height: 18px;
    text-align: center;
    color: var(--gx-faint);
    pointer-events: none;
}
.gx-search__input:focus ~ .gx-search__kbd, .gx-search__input:not(:placeholder-shown) ~ .gx-search__kbd { opacity: 0; }
.gx-search__count {
    margin: 8px 0 0;
    font-family: var(--font-mono);
    font-size: .68rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--gx-acc);
}
.gx-search__count:empty { display: none; }
.gx-results {
    margin: 8px -8px -6px;
    padding: 4px 0 0;
    border-top: 1px solid var(--gx-line);
    list-style: none;
}
.gx-results[hidden] { display: none; }
.gx-results { max-height: min(400px, calc(100svh - var(--gx-top) - 340px)); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.gx-stage.has-results .gx-legend { visibility: hidden; }
.gx-result {
    position: relative;
    display: grid;
    gap: 1px;
    padding: 7px 10px 7px 22px;
    border-radius: 6px;
    cursor: pointer;
}
.gx-result::before {
    content: '';
    position: absolute;
    left: 9px;
    top: 13px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gx-sys-ink);
    box-shadow: 0 0 8px var(--gx-sys-ink);
}
[data-theme="light"] .gx-result::before { box-shadow: none; }
.gx-result.is-flag::before { background: var(--gx-gold); box-shadow: 0 0 8px var(--gx-gold); }
.gx-result__t { font-size: .88rem; font-weight: 500; line-height: 1.3; color: var(--gx-ink); }
.gx-result__t mark { background: none; color: var(--gx-acc); font-weight: 700; }
.gx-result__c { font-family: var(--font-mono); font-size: .66rem; letter-spacing: .04em; color: var(--gx-faint); }
.gx-result[aria-selected="true"], .gx-result:hover { background: color-mix(in srgb, var(--gx-acc) 12%, transparent); }
.gx-result[aria-selected="true"]::after {
    content: '\21B5';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: .8rem;
    color: var(--gx-acc);
}

/* ------------------------------------------------------------------ readout (top right) */
.gx-readout {
    right: 28px;
    top: 28px;
    width: 228px;
    padding: 12px 14px 12px;
}
.gx-seg {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin: 0 0 12px;
    padding: 2px;
    border: 1px solid var(--gx-line);
    border-radius: 7px;
}
.gx-seg__btn {
    padding: 5px 0;
    border: 0;
    border-radius: 5px;
    background: none;
    font-family: var(--font-mono);
    font-size: .68rem;
    font-weight: 500;
    letter-spacing: .12em;
    text-align: center;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--gx-mut);
    cursor: pointer;
}
.gx-seg__btn[aria-pressed="true"] { background: color-mix(in srgb, var(--gx-acc) 16%, transparent); color: var(--gx-ink); }
.gx-seg__btn:hover { color: var(--gx-ink); }
.gx-seg__btn:focus-visible, .gx-btn:focus-visible, .gx-back:focus-visible, .gx-card a:focus-visible, .gx-card button:focus-visible, .gx-sysinfo a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
[data-theme="light"] .gx-seg, [data-theme="light"] .gx-seg__btn { border-radius: 2px; }
.gx-ro {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px 12px;
    margin: 0;
}
.gx-ro > div { min-width: 0; }
.gx-ro dt {
    font-family: var(--font-mono);
    font-size: .6rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--gx-faint);
}
.gx-ro dd {
    margin: 1px 0 0;
    font-family: var(--font-mono);
    font-size: .74rem;
    color: var(--gx-mut);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.gx-ro dd b { font-weight: 600; color: var(--gx-ink); }
.gx-ro--xy { grid-column: 1 / -1; }
.gx-ro__where {
    margin: 10px 0 0;
    padding-top: 9px;
    border-top: 1px dashed var(--gx-line);
    font-family: var(--font-mono);
    font-size: .68rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--gx-acc);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ------------------------------------------------------------------ dock: minimap + zoom (bottom right, clear of the floating buttons) */
.gx-dock {
    position: absolute;
    z-index: 3;
    right: 28px;
    bottom: 84px;
    display: flex;
    align-items: flex-end;
    gap: 10px;
    pointer-events: none;
}
.gx-dock > * { pointer-events: auto; }
.gx-mini { position: relative; padding: 9px 10px 10px; }
.gx-mini__k {
    margin: 0 0 6px;
    font-family: var(--font-mono);
    font-size: .6rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--gx-faint);
}
.gx-mini__cv { display: block; width: 150px; height: 150px; cursor: crosshair; touch-action: none; }
.gx-zoom { display: grid; gap: 6px; }
.gx-btn {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid var(--gx-line-2);
    border-radius: 9px;
    background: var(--gx-panel);
    color: var(--gx-ink);
    cursor: pointer;
    -webkit-backdrop-filter: blur(10px);
            backdrop-filter: blur(10px);
    transition: border-color .2s ease, color .2s ease, background-color .2s ease;
}
.gx-btn:hover { border-color: var(--gx-acc); color: var(--gx-acc); }
[data-theme="light"] .gx-btn { border-radius: 2px; background: var(--gx-panel-solid); }

/* ------------------------------------------------------------------ legend / system panel (bottom left, clear of the floating buttons) */
.gx-legend, .gx-sysinfo { left: 28px; bottom: 84px; }
.gx-legend { width: 260px; padding: 12px 14px; }
.gx-legend p { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; font-size: .78rem; color: var(--gx-mut); }
.gx-legend .gx-legend__keys { display: block; margin: 9px 0 0; padding-top: 9px; border-top: 1px dashed var(--gx-line); font-size: .74rem; line-height: 1.75; color: var(--gx-faint); }
.gx-lg { position: relative; flex: none; width: 14px; height: 14px; }
.gx-lg::before { content: ''; position: absolute; left: 50%; top: 50%; border-radius: 50%; transform: translate(-50%, -50%); }
.gx-lg--star::before { width: 5px; height: 5px; background: #fff; box-shadow: 0 0 6px 2px rgba(170, 200, 255, .8); }
.gx-lg--flag::before { width: 7px; height: 7px; background: var(--gx-gold); box-shadow: 0 0 8px 2px color-mix(in srgb, var(--gx-gold) 70%, transparent); }
.gx-lg--trend::before { width: 11px; height: 11px; border: 1px solid var(--gx-acc); }
.gx-lg--trend::after { content: ''; position: absolute; left: 50%; top: 50%; width: 3px; height: 3px; border-radius: 50%; background: var(--gx-ink); transform: translate(-50%, -50%); }
[data-theme="light"] .gx-lg--star::before { background: var(--gx-ink); box-shadow: 0 0 0 2px var(--gx-bg); }
[data-theme="light"] .gx-lg--flag::before { box-shadow: 0 0 0 2px var(--gx-bg), 0 0 0 3px var(--gx-gold); }
[data-theme="light"] .gx-lg--trend::before { border-style: dashed; }

.gx-sysinfo { width: 300px; padding: 14px 16px; border-color: color-mix(in srgb, var(--gx-sys-ink) 34%, var(--gx-line)); }
.gx-sysinfo[hidden] { display: none; }
.gx-sysinfo::before {
    content: '';
    position: absolute;
    left: 18px;
    right: 18px;
    top: -1px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gx-sys-ink), transparent);
}
.gx-sysinfo__k { margin: 0 0 4px; font-family: var(--font-mono); font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gx-sys-ink); }
.gx-sysinfo__name { margin: 0; font-family: var(--gx-serif); font-size: 1.45rem; font-weight: 400; line-height: 1.15; color: var(--gx-ink); }
.gx-sysinfo__desc { margin: 6px 0 12px; font-size: .82rem; line-height: 1.5; color: var(--gx-mut); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.gx-sysinfo__acts { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0; }
.gx-back {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 10px;
    border: 1px solid var(--gx-line-2);
    border-radius: 7px;
    background: none;
    color: var(--gx-ink);
    font-family: var(--font-body);
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
}
.gx-back:hover { border-color: var(--gx-acc); color: var(--gx-acc); }
.gx-back kbd { font-size: .6rem; }
.gx-sysinfo__all { font-size: .8rem; font-weight: 600; color: var(--gx-sys-ink); text-decoration: none; }
.gx-sysinfo__all:hover { text-decoration: underline; text-underline-offset: 3px; }
[data-theme="light"] .gx-back { border-radius: 2px; }

/* ------------------------------------------------------------------ system labels (placed by the script) */
.gx-sys {
    position: absolute;
    left: 0;
    top: 0;
    display: inline-flex;
    align-items: baseline;
    gap: 7px;
    padding: 3px 8px 3px 7px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: none;
    color: var(--gx-ink);
    font-family: var(--font-body);
    font-size: .74rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    white-space: nowrap;
    cursor: pointer;
    pointer-events: auto;
    touch-action: none;
    text-shadow: 0 0 6px var(--gx-bg), 0 0 2px var(--gx-bg), 0 0 12px var(--gx-bg);
    will-change: transform;
    transition: opacity .25s ease, border-color .2s ease, background-color .2s ease;
}
.gx-sys__dot {
    align-self: center;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--gx-sys-ink);
    box-shadow: 0 0 8px var(--gx-sys-ink);
}
.gx-sys__n { font-family: var(--font-mono); font-size: .66rem; font-weight: 500; letter-spacing: .04em; color: var(--gx-sys-ink); }
.gx-sys__m {
    font-family: var(--font-mono);
    font-size: .62rem;
    font-weight: 600;
    letter-spacing: .06em;
    color: var(--gx-acc);
}
.gx-sys__m[hidden] { display: none; }
.gx-sys.is-hot, .gx-sys:focus-visible {
    border-color: color-mix(in srgb, var(--gx-sys-ink) 55%, transparent);
    background: color-mix(in srgb, var(--gx-panel-solid) 88%, transparent);
    text-shadow: none;
}
.gx-sys:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; opacity: 1 !important; pointer-events: auto !important; }
.gx-sys.is-here { color: var(--gx-sys-ink); }
.gx-sys.is-culled { opacity: 0; pointer-events: none; }
.gx-sys.is-dim { opacity: .4; }
.gx-sys.is-dim.is-culled { opacity: 0; }
[data-theme="light"] .gx-sys {
    font-family: var(--gx-serif);
    font-size: .76rem;
    font-weight: 400;
    letter-spacing: .2em;
    color: var(--gx-ink);
    text-shadow: 0 0 4px var(--gx-bg), 0 0 2px var(--gx-bg), 0 0 8px var(--gx-bg);
    border-radius: 2px;
}
[data-theme="light"] .gx-sys__dot { box-shadow: 0 0 0 1.5px var(--gx-bg), 0 0 0 2.5px var(--gx-sys-ink); background: var(--gx-bg); }
[data-theme="light"] .gx-sys__n { color: var(--gx-sys-ink); font-style: normal; }

/* ------------------------------------------------------------------ the star card */
.gx-card {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 5;
    width: 300px;
    padding: 14px 16px 12px;
    border: 1px solid color-mix(in srgb, var(--gx-sys-ink) 38%, var(--gx-line));
    border-left: 2px solid var(--gx-sys-ink);
    border-radius: 8px;
    background: var(--gx-panel-solid);
    box-shadow: 0 18px 44px -18px rgba(0, 0, 0, .7), 0 0 0 1px rgba(0, 0, 0, .2);
    opacity: 0;
    transition: opacity .16s ease;
}
.gx-card.is-on { opacity: 1; }
.gx-card[hidden] { display: none; }
.gx-card.is-flag { border-left-color: var(--gx-gold); }
[data-theme="light"] .gx-card { border-radius: 2px; box-shadow: 0 1px 2px rgba(60, 45, 20, .08), 0 16px 36px -18px rgba(60, 45, 20, .38); border-color: rgba(29, 39, 53, .32); border-left-color: var(--gx-sys-ink); }
[data-theme="light"] .gx-card.is-flag { border-left-color: var(--gx-gold); }
.gx-card__k {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 6px;
    font-family: var(--font-mono);
    font-size: .62rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--gx-sys-ink);
}
.gx-card__dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.gx-card__fn { margin-left: auto; padding: 1px 6px; border: 1px solid var(--gx-line-2); border-radius: 4px; color: var(--gx-faint); letter-spacing: .06em; }
.gx-card__title { margin: 0; font-size: 1.02rem; font-weight: 650; line-height: 1.3; color: var(--gx-ink); }
[data-theme="light"] .gx-card__title { font-family: var(--gx-serif); font-weight: 400; font-size: 1.12rem; }
.gx-card__desc { margin: 6px 0 0; font-size: .82rem; line-height: 1.5; color: var(--gx-mut); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.gx-card__desc[hidden] { display: none; }
.gx-card__tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 9px 0 0; font-family: var(--font-mono); font-size: .64rem; letter-spacing: .04em; color: var(--gx-faint); }
.gx-card__tags:empty { display: none; }
.gx-card__tags span { padding: 1px 6px; border: 1px solid var(--gx-line); border-radius: 4px; }
.gx-card__tags .is-flag { border-color: color-mix(in srgb, var(--gx-gold) 60%, transparent); color: var(--gx-gold); }
.gx-card__tags .is-trend { border-color: color-mix(in srgb, var(--gx-acc) 60%, transparent); color: var(--gx-acc); }
.gx-card__acts { display: flex; align-items: center; justify-content: space-between; margin: 11px 0 0; padding-top: 10px; border-top: 1px dashed var(--gx-line); }
.gx-card__open {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    background: var(--gx-sys-ink);
    color: #0b0e14;
    font-size: .82rem;
    font-weight: 700;
    text-decoration: none;
}
.gx-card.is-flag .gx-card__open { background: var(--gx-gold); }
.gx-card__open:hover { filter: brightness(1.1); }
[data-theme="light"] .gx-card__open { color: #fbf9f3; border-radius: 2px; }
.gx-card__x {
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 6px;
    background: none;
    color: var(--gx-faint);
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
}
.gx-card__x:hover { border-color: var(--gx-line-2); color: var(--gx-ink); }

/* ================================================================== the list */
.gx-list {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: clamp(36px, 5vw, 64px) var(--gutter) 40px;
    scroll-margin-top: var(--gx-top);
}
.gx-list__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; margin-bottom: 18px; }
.gx-list .gx-eyebrow { color: var(--text-tertiary); }
.gx-list__title { margin: 0; font-family: var(--gx-serif); font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 400; line-height: 1.15; }
.gx-list__title:focus { outline: none; }
.gx-list__back, .gx-list__foot a { font-size: .9rem; font-weight: 600; color: var(--text-secondary); text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 4px; }
.gx-list__back:hover, .gx-list__foot a:hover { color: var(--accent); }
.gx-list__toc {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 30px;
    padding: 14px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.gx-list__toc a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: .8rem;
    color: var(--text-secondary);
    text-decoration: none;
}
.gx-list__toc a::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: hsl(var(--h), 65%, 62%); }
[data-theme="light"] .gx-list__toc a::before { background: hsl(var(--h), 50%, 38%); }
.gx-list__toc a span { font-family: var(--font-mono); font-size: .7rem; color: var(--text-tertiary); }
.gx-list__toc a:hover { border-color: hsl(var(--h), 55%, 55%); color: var(--text-primary); }
.gx-list__grid { columns: 3 320px; column-gap: 40px; }
.gx-list__cat {
    break-inside: avoid;
    margin: 0 0 30px;
    padding-top: 14px;
    border-top: 2px solid hsl(var(--h), 60%, 60%);
    scroll-margin-top: calc(var(--gx-top) + 16px);
}
[data-theme="light"] .gx-list__cat { border-top-color: hsl(var(--h), 48%, 40%); }
.gx-list__name { display: flex; align-items: center; gap: 9px; margin: 0 0 4px; font-size: 1.05rem; font-weight: 700; }
.gx-list__name a { color: var(--text-primary); text-decoration: none; }
.gx-list__name a:hover { text-decoration: underline; text-underline-offset: 3px; }
.gx-list__ico { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; background: hsla(var(--h), 65%, 60%, .12); color: hsl(var(--h), 65%, 66%); }
[data-theme="light"] .gx-list__ico { color: hsl(var(--h), 50%, 34%); background: hsla(var(--h), 50%, 45%, .1); }
.gx-list__ico svg { width: 15px; height: 15px; }
.gx-list__n { margin-left: auto; font-family: var(--font-mono); font-size: .72rem; font-weight: 500; color: var(--text-tertiary); }
.gx-list__desc { margin: 0 0 10px; font-size: .86rem; line-height: 1.5; color: var(--text-secondary); }
.gx-list__tools { margin: 0; padding: 0; list-style: none; }
.gx-list__tools li { margin: 0; }
.gx-list__tools a {
    display: block;
    padding: 3px 0;
    font-size: .88rem;
    line-height: 1.4;
    color: var(--text-secondary);
    text-decoration: none;
}
.gx-list__tools a:hover { color: var(--text-primary); text-decoration: underline; text-decoration-color: hsl(var(--h), 55%, 55%); text-underline-offset: 3px; }
.gx-list__tools a[data-flag] { color: var(--text-primary); font-weight: 600; }
.gx-list__tools a[data-flag]::after { content: ' \2605'; color: var(--accent); font-size: .8em; }
.gx-list a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
.gx-list__foot { display: flex; justify-content: center; gap: 10px; margin: 20px 0 0; color: var(--text-tertiary); }

/* ================================================================== smaller screens */
@media (max-width: 1100px) {
    .gx-intro { width: 300px; padding: 14px 16px 14px; }
    .gx-title { font-size: 1.5rem; margin-bottom: 12px; }
    .gx-eyebrow { letter-spacing: .1em; }
    .gx-lede { display: none; }
    .gx-readout { width: 200px; }
    .gx-ro > .gx-ro--xy, .gx-ro__where { display: none; }
    .gx-mini__cv { width: 120px; height: 120px; }
    .gx-legend { display: none; }
}
@media (max-width: 900px) {
    .gx-intro { left: 12px; right: 12px; top: 12px; width: auto; padding: 12px 14px; }
    .gx-eyebrow, .gx-lede { display: none; }
    .gx-title { margin-bottom: 10px; font-size: 1.22rem; }
    .gx-search__input { height: 40px; font-size: 16px; }    /* 16px: no zoom-on-focus on iOS */
    .gx-search__icon { top: 12px; }
    .gx-search__kbd { display: none; }
    .gx-results { max-height: 40vh; overflow: auto; }
    .gx-readout {
        top: auto;
        right: auto;
        left: 12px;
        bottom: 76px;
        width: auto;
        padding: 8px 10px;
        display: flex;
        align-items: center;
        gap: 10px;
    }
    .gx-readout .gx-seg { margin: 0; }
    .gx-seg__btn { padding: 4px 8px; }
    .gx-ro { grid-template-columns: auto; gap: 1px 0; }
    .gx-ro > div { display: flex; align-items: baseline; gap: 6px; }
    .gx-ro > .gx-ro--xy, .gx-ro > .gx-ro--n, .gx-ro__where { display: none; }
    .gx-ro dd { margin: 0; }
    .gx-dock { right: 12px; bottom: 76px; gap: 8px; }
    .gx-mini { padding: 6px; }
    .gx-mini__k { display: none; }
    .gx-mini__cv { width: 84px; height: 84px; }
    .gx-btn { width: 36px; height: 36px; }
    .gx-zoom { gap: 5px; }
    .gx-zoom .gx-btn[data-act="home"] { display: none; }
    .gx-sysinfo { left: 12px; right: 12px; width: auto; bottom: auto; top: 112px; padding: 10px 12px; }
    .gx-sysinfo__name { font-size: 1.1rem; }
    .gx-sysinfo__desc { display: none; }
    .gx-sysinfo__k { margin-bottom: 2px; }
    .gx-sysinfo__acts { margin-top: 8px; }
    .gx-frame { inset: 6px; }
    .gx-sys { font-size: .66rem; padding: 2px 6px; gap: 5px; }
    [data-theme="light"] .gx-sys { font-size: .66rem; letter-spacing: .1em; }
    .gx-card.is-sheet {
        left: 10px;
        right: 10px;
        top: auto;
        bottom: 76px;
        width: auto;
        transform: none !important;
        visibility: visible !important;
    }
    .gx-card.is-sheet .gx-card__open { padding: 9px 16px; font-size: .9rem; }
    .gx-card.is-sheet .gx-card__x { width: 40px; height: 40px; }
    .gx-list__grid { columns: 2 280px; }
}
@media (min-width: 600px) and (max-width: 900px) {
    .gx-intro { right: auto; width: min(560px, calc(100% - 24px)); }
    .gx-title { font-size: 1.5rem; }
    .gx-sysinfo { right: auto; width: min(560px, calc(100% - 24px)); }
    .gx-sysinfo__desc { display: -webkit-box; }
    .gx-mini__cv { width: 112px; height: 112px; }
    .gx-zoom .gx-btn[data-act="home"] { display: grid; }
}
@media (max-width: 900px) and (max-height: 700px) {
    .gx-mini { display: none; }
}

/* ================================================================== motion */
@media (prefers-reduced-motion: reduce) {
    .gx-pulse { animation: none; }
    .gx-card, .gx-sys { transition: none; }
}
