/* ═══════════════════════════════════════════════════════════════════
   ESA PULSE — status platform design system  (v1)
   Built from scratch. Dark-cinematic, green heartbeat identity.
   Self-contained: public pages load ONLY this stylesheet.
   Component prefix: px-   ·  Page shell: body.px
   ═══════════════════════════════════════════════════════════════════ */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Poppins:wght@500;600;700;800&family=JetBrains+Mono:wght@400;600;700&display=swap");

/* ─────────────── 1. TOKENS ─────────────── */
:root {
    --brand: #17d773;
    --brand2: #0fb15f;
    --brand-rgb: 23, 215, 115;
    --brand-ink: #03210f;
    --brand-hi: #6affb0;

    --bg0: #030509;
    --bg1: #05080f;
    --surface: rgba(13, 20, 34, 0.72);
    --surface2: rgba(17, 26, 44, 0.88);
    --field: #0e1626;
    --line: rgba(148, 163, 184, 0.13);
    --line-hi: rgba(var(--brand-rgb), 0.36);

    --ink: #eaf0fa;
    --ink2: #c3ccdc;
    --mute: #8a97ac;
    --dim: #5e6a7e;

    --ok: #1fd6a1;       --ok-soft: rgba(31, 214, 161, 0.12);   --ok-line: rgba(31, 214, 161, 0.3);
    --warn: #ffcf5b;     --warn-soft: rgba(255, 207, 91, 0.12); --warn-line: rgba(255, 207, 91, 0.32);
    --orange: #ff9f43;   --orange-soft: rgba(255, 159, 67, 0.13);--orange-line: rgba(255, 159, 67, 0.34);
    --amber: #ff7a59;    --amber-soft: rgba(255, 122, 89, 0.13); --amber-line: rgba(255, 122, 89, 0.34);
    --crit: #ff5f76;     --crit-soft: rgba(255, 95, 118, 0.12);  --crit-line: rgba(255, 95, 118, 0.3);
    --info: #67b7ff;     --info-soft: rgba(103, 183, 255, 0.12); --info-line: rgba(103, 183, 255, 0.3);
    --upg: #a78bfa;      --upg-soft: rgba(167, 139, 250, 0.13);  --upg-line: rgba(167, 139, 250, 0.34);

    --r-sm: 10px; --r: 14px; --r-lg: 20px; --r-xl: 28px;
    --max: 1240px;
    --nav-h: 66px;
    --spring: cubic-bezier(0.22, 1, 0.36, 1);
    --glow: rgba(var(--brand-rgb), 0.55);
    --mono: "JetBrains Mono", "Courier New", monospace;
    --disp: "Poppins", sans-serif;
}

/* accents (kept compatible with esagames switcher keys) */
:root[data-accent="blue"]   { --brand:#4f9dff; --brand2:#2f7fe6; --brand-rgb:79,157,255;  --brand-ink:#04162e; --brand-hi:#9cc8ff; }
:root[data-accent="purple"] { --brand:#a78bfa; --brand2:#8b5cf6; --brand-rgb:167,139,250; --brand-ink:#1d1040; --brand-hi:#d2c2ff; }
:root[data-accent="pink"]   { --brand:#f472b6; --brand2:#ec4899; --brand-rgb:244,114,182; --brand-ink:#3d0b24; --brand-hi:#ffb1d8; }
:root[data-accent="red"]    { --brand:#fb7185; --brand2:#ef4444; --brand-rgb:251,113,133; --brand-ink:#400a12; --brand-hi:#ffb3bd; }
:root[data-accent="orange"] { --brand:#fb923c; --brand2:#f97316; --brand-rgb:251,146,60;  --brand-ink:#3c1503; --brand-hi:#ffc499; }
:root[data-accent="cyan"]   { --brand:#22d3ee; --brand2:#06b6d4; --brand-rgb:34,211,238;  --brand-ink:#032830; --brand-hi:#8feeff; }

/* light theme */
:root[data-theme="light"] {
    --bg0: #e9eef5;
    --bg1: #eff3f9;
    --surface: rgba(255, 255, 255, 0.86);
    --surface2: #ffffff;
    --field: #ffffff;
    --line: rgba(15, 23, 42, 0.10);
    --line-hi: rgba(var(--brand-rgb), 0.45);
    --ink: #0f172a;
    --ink2: #334155;
    --mute: #5b6b80;
    --dim: #7e8ba0;
    --brand: #0fb15f;
    --brand2: #0a9450;
    --glow: rgba(var(--brand-rgb), 0.35);
    --upg: #7c5cf0;
}

/* ─────────────── 2. BASE ─────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body.px {
    margin: 0;
    min-height: 100vh;
    font: 15px/1.6 "Inter", "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--bg0);
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
}
.px a { color: var(--brand); text-decoration: none; }
.px a:hover { color: var(--brand-hi); }
.px img { max-width: 100%; }
.px ::selection { background: rgba(var(--brand-rgb), .3); }
.px h1, .px h2, .px h3 { margin: 0; }
.px p { margin: 0; }
.px button { font-family: inherit; }
.px .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* scrollbar */
.px ::-webkit-scrollbar { width: 11px; height: 11px; }
.px ::-webkit-scrollbar-track { background: transparent; }
.px ::-webkit-scrollbar-thumb { background: rgba(var(--brand-rgb), .25); border-radius: 99px; border: 3px solid transparent; background-clip: padding-box; }
.px ::-webkit-scrollbar-thumb:hover { background: rgba(var(--brand-rgb), .45); background-clip: padding-box; border: 3px solid transparent; }

/* ─────────────── 3. ATMOSPHERE ─────────────── */
.px-sky {
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background:
        radial-gradient(1000px 600px at 50% -160px, rgba(var(--brand-rgb), 0.16), transparent 60%),
        radial-gradient(1200px 800px at 90% 0%, rgba(var(--brand-rgb), 0.05), transparent 55%),
        linear-gradient(180deg, var(--bg1) 0%, var(--bg0) 55%);
    transition: background 1.2s ease;
}
body.px[data-state="degraded"] .px-sky {
    background:
        radial-gradient(1000px 600px at 50% -160px, rgba(255, 190, 80, 0.13), transparent 60%),
        radial-gradient(1200px 800px at 90% 0%, rgba(var(--brand-rgb), 0.04), transparent 55%),
        linear-gradient(180deg, var(--bg1) 0%, var(--bg0) 55%);
}
body.px[data-state="outage"] .px-sky {
    background:
        radial-gradient(1000px 600px at 50% -160px, rgba(255, 95, 118, 0.14), transparent 60%),
        radial-gradient(1200px 800px at 90% 0%, rgba(255, 95, 118, 0.05), transparent 55%),
        linear-gradient(180deg, var(--bg1) 0%, var(--bg0) 55%);
}
.px-dots {
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background-image: radial-gradient(rgba(148, 163, 184, 0.13) 1px, transparent 1.4px);
    background-size: 26px 26px;
    -webkit-mask-image: radial-gradient(120% 75% at 50% 0%, #000 10%, transparent 75%);
            mask-image: radial-gradient(120% 75% at 50% 0%, #000 10%, transparent 75%);
    opacity: .55;
}
#px-net { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .85; }
:root[data-theme="light"] #px-net { opacity: .5; }

/* ─────────────── 4. NAV ─────────────── */
.px-nav {
    position: sticky; top: 0; z-index: 60;
    border-bottom: 1px solid transparent;
    transition: background .3s, border-color .3s, box-shadow .3s;
}
.px-nav.scrolled {
    background: color-mix(in srgb, var(--bg0) 78%, transparent);
    -webkit-backdrop-filter: blur(20px) saturate(1.3);
            backdrop-filter: blur(20px) saturate(1.3);
    border-bottom-color: var(--line);
    box-shadow: 0 14px 44px rgba(0, 0, 0, .35);
}
.px-nav-in {
    max-width: var(--max); margin: 0 auto; height: var(--nav-h);
    padding: 0 22px; display: flex; align-items: center; gap: 16px;
}
.px-brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink) !important; }
.px-brand img { height: 27px; width: auto; filter: drop-shadow(0 5px 16px var(--glow)); transition: transform .4s var(--spring); }
.px-brand:hover img { transform: rotate(-5deg) scale(1.07); }
.px-brand-pulse { display: inline-flex; align-items: center; gap: 7px; }
.px-brand-pulse svg { width: 44px; height: 18px; color: var(--brand); overflow: visible; }
.px-brand-pulse svg path {
    fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
    stroke-dasharray: 90 999; stroke-dashoffset: 0;
    animation: pxEcg 2.8s linear infinite;
    filter: drop-shadow(0 0 5px var(--glow));
}
@keyframes pxEcg { from { stroke-dashoffset: 0; } to { stroke-dashoffset: -178; } }
.px-brand-tag {
    font-family: var(--disp); font-size: 11px; font-weight: 700;
    letter-spacing: .2em; text-transform: uppercase; color: var(--brand);
}

.px-links { display: flex; align-items: center; gap: 2px; margin: 0 auto 0 10px; }
.px-link {
    position: relative; display: inline-flex; align-items: center; height: 36px;
    padding: 0 13px; border-radius: 999px; font-size: 13.5px; font-weight: 600;
    color: var(--ink2) !important; transition: color .18s, background .18s;
}
.px-link:hover { color: var(--ink) !important; background: rgba(148, 163, 184, .09); }
.px-link.on { color: var(--brand) !important; background: rgba(var(--brand-rgb), .10); }
.px-link.on::after {
    content: ""; position: absolute; left: 14px; right: 14px; bottom: 3px; height: 2px;
    border-radius: 2px; background: var(--brand); box-shadow: 0 0 8px var(--glow);
}

.px-acts { display: flex; align-items: center; gap: 9px; }
.px-iconbtn {
    display: grid; place-items: center; width: 38px; height: 38px;
    border-radius: 11px; border: 1px solid var(--line);
    background: rgba(148, 163, 184, .05); color: var(--ink2); cursor: pointer;
    transition: all .2s var(--spring);
}
.px-iconbtn:hover { color: var(--ink); border-color: var(--line-hi); transform: translateY(-1px); }
.px-iconbtn svg { width: 17px; height: 17px; }
.px-kbd {
    font-family: var(--mono); font-size: 10px; color: var(--dim);
    border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; margin-left: 4px;
}

/* nav status dot */
.px-nav-state { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; color: var(--ink2); padding: 0 6px; white-space: nowrap; }
.px-nav-state i { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 9px var(--ok); animation: pxBeat 2s ease-in-out infinite; }
body.px[data-state="degraded"] .px-nav-state i { background: var(--warn); box-shadow: 0 0 9px var(--warn); }
body.px[data-state="outage"] .px-nav-state i { background: var(--crit); box-shadow: 0 0 9px var(--crit); }
@keyframes pxBeat { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.35); } }

.px-burger { display: none; }

/* ─────────────── 5. BUTTONS ─────────────── */
.px-btn {
    position: relative; overflow: hidden;
    display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    height: 42px; padding: 0 19px; border-radius: 12px;
    font-size: 14px; font-weight: 700; white-space: nowrap; cursor: pointer;
    border: 1px solid var(--line); color: var(--ink); background: rgba(148, 163, 184, .06);
    transition: transform .25s var(--spring), box-shadow .25s, border-color .2s, background .2s, filter .2s, color .2s;
}
.px-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.px-btn:hover { transform: translateY(-2px); border-color: var(--line-hi); color: var(--ink); }
.px-btn:active { transform: translateY(0) scale(.97); }
.px-btn.solid {
    background: linear-gradient(135deg, var(--brand), var(--brand2));
    color: var(--brand-ink) !important; border-color: transparent;
    box-shadow: 0 10px 26px rgba(var(--brand-rgb), .3);
}
.px-btn.solid:hover { filter: brightness(1.07); box-shadow: 0 16px 38px rgba(var(--brand-rgb), .42); }
.px-btn.danger { background: var(--crit-soft); border-color: var(--crit-line); color: var(--crit) !important; }
.px-btn.lg { height: 48px; padding: 0 25px; font-size: 15px; border-radius: 13px; }
.px-btn.sm { height: 34px; padding: 0 13px; font-size: 13px; border-radius: 9px; }
.px-btn::after {
    content: ""; position: absolute; top: 0; left: 0; width: 55%; height: 100%;
    background: linear-gradient(110deg, transparent, rgba(255, 255, 255, .3), transparent);
    transform: translateX(-190%) skewX(-18deg); pointer-events: none;
}
.px-btn:hover::after { animation: pxSweep .7s ease; }
@keyframes pxSweep { to { transform: translateX(300%) skewX(-18deg); } }

/* ─────────────── 6. SHELL / SECTIONS ─────────────── */
.px-shell { position: relative; z-index: 1; max-width: var(--max); margin: 0 auto; padding: 26px 22px 70px; }
.px-sec { margin-top: 38px; }
.px-sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 15px; flex-wrap: wrap; }
.px-kicker {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 11px; font-weight: 800; letter-spacing: .17em; text-transform: uppercase; color: var(--brand);
}
.px-kicker::before { content: ""; width: 16px; height: 2px; border-radius: 2px; background: var(--brand); box-shadow: 0 0 8px var(--glow); }
.px-h2 { font-family: var(--disp); font-size: clamp(1.3rem, 2.6vw, 1.85rem); font-weight: 700; letter-spacing: -.03em; margin-top: 5px; }
.px-sub { color: var(--ink2); font-size: 14.5px; line-height: 1.7; }
.px-muted { color: var(--mute); }
.px-meta-sm { font-size: 13px; color: var(--mute); }

/* ─────────────── 7. CARDS / PANELS ─────────────── */
.px-card {
    position: relative; overflow: hidden;
    border: 1px solid var(--line); border-radius: var(--r-lg);
    background: var(--surface);
    -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
    box-shadow: 0 22px 60px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .04);
    padding: 24px 26px;
    transition: border-color .3s, box-shadow .3s, transform .3s var(--spring);
}
:root[data-theme="light"] .px-card { box-shadow: 0 18px 44px rgba(15, 23, 42, .08); }
.px-card:hover { border-color: var(--line-hi); }
.px-card > * { position: relative; z-index: 1; }
.px-card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 13px; flex-wrap: wrap; }
.px-card-h h3 { font-family: var(--disp); font-size: 16.5px; font-weight: 700; }

.px-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* ─────────────── 8. CHIPS / BADGES / PILLS ─────────────── */
.px-badge {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 11px; font-weight: 800; letter-spacing: .03em;
    padding: 5px 11px; border-radius: 999px; border: 1px solid; white-space: nowrap;
}
.px-badge.ok     { color: var(--ok);     background: var(--ok-soft);     border-color: var(--ok-line); }
.px-badge.notice { color: var(--info);   background: var(--info-soft);   border-color: var(--info-line); }
.px-badge.upg    { color: var(--upg);    background: var(--upg-soft);    border-color: var(--upg-line); }
.px-badge.minor  { color: var(--warn);   background: var(--warn-soft);   border-color: var(--warn-line); }
.px-badge.warn   { color: var(--orange); background: var(--orange-soft); border-color: var(--orange-line); }
.px-badge.major  { color: var(--amber);  background: var(--amber-soft);  border-color: var(--amber-line); }
.px-badge.crit   { color: var(--crit);   background: var(--crit-soft);   border-color: var(--crit-line); }

.px-chip {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 14px; border-radius: 12px;
    border: 1px solid var(--line); background: rgba(148, 163, 184, .05);
    font-size: 13px; font-weight: 600; color: var(--ink2);
    transition: transform .25s var(--spring), border-color .25s;
}
.px-chip:hover { transform: translateY(-2px); border-color: var(--line-hi); }
.px-chip b { color: var(--ink); font-family: var(--mono); font-weight: 700; }
.px-chip .ic { color: var(--brand); display: inline-flex; }
.px-chip .ic svg { width: 15px; height: 15px; }
.px-chip.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 9px var(--ok); animation: pxBlink 1.7s ease-in-out infinite; }
@keyframes pxBlink { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

/* ─────────────── 9. HERO (Command Center) ─────────────── */
.px-hero {
    position: relative; isolation: isolate; overflow: hidden;
    margin-top: 16px; padding: 50px 46px;
    border: 1px solid var(--line); border-radius: var(--r-xl);
    display: grid; grid-template-columns: minmax(230px, 340px) minmax(0, 1fr);
    align-items: center; gap: 50px;
    background:
        radial-gradient(85% 130% at 15% 0%, rgba(var(--brand-rgb), .1), transparent 55%),
        linear-gradient(155deg, rgba(13, 20, 34, .94), rgba(4, 7, 14, .96));
    box-shadow: 0 40px 110px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .05);
}
:root[data-theme="light"] .px-hero { background: linear-gradient(155deg, #ffffff, #e9f0f8); box-shadow: 0 30px 80px rgba(15, 23, 42, .12); }
.px-hero::before {
    content: ""; position: absolute; right: -30%; top: -50%; width: 760px; height: 760px;
    background: conic-gradient(from 0deg, transparent, rgba(var(--brand-rgb), .15), transparent 38%);
    animation: pxSpin 28s linear infinite; pointer-events: none; z-index: 0;
}
body.px[data-state="outage"] .px-hero::before { background: conic-gradient(from 0deg, transparent, rgba(255, 95, 118, .15), transparent 38%); }
body.px[data-state="degraded"] .px-hero::before { background: conic-gradient(from 0deg, transparent, rgba(255, 190, 80, .14), transparent 38%); }
@keyframes pxSpin { to { transform: rotate(360deg); } }
.px-hero::after {
    content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
    background-image: repeating-linear-gradient(180deg, rgba(255, 255, 255, .016) 0 1px, transparent 1px 4px);
    mix-blend-mode: overlay;
}
.px-hero > * { position: relative; z-index: 1; }

/* gauge */
.px-gauge { position: relative; width: 100%; max-width: 310px; margin: 0 auto; aspect-ratio: 1; display: grid; place-items: center; }
.px-gauge svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.px-gauge .tr { fill: none; stroke: rgba(148, 163, 184, .13); stroke-width: 11; }
.px-gauge .arc {
    fill: none; stroke: url(#pxGrad); stroke-width: 11; stroke-linecap: round;
    filter: drop-shadow(0 0 11px var(--glow));
    transition: stroke-dashoffset 1.8s var(--spring);
}
.px-gauge .g0 { stop-color: var(--brand2); }
.px-gauge .g1 { stop-color: var(--brand); }
.px-gauge .g2 { stop-color: var(--brand-hi); }
.px-gauge.deg .arc { stroke: var(--warn); filter: drop-shadow(0 0 11px rgba(255, 207, 91, .5)); }
.px-gauge.out .arc { stroke: var(--crit); filter: drop-shadow(0 0 11px rgba(255, 95, 118, .5)); }
.px-gauge-c { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 3px; }
.px-gauge-pct { font-family: var(--mono); font-weight: 700; font-size: clamp(2rem, 4.6vw, 2.9rem); letter-spacing: -.04em; line-height: 1; }
.px-gauge-pct sup { font-size: .44em; color: var(--brand); }
.px-gauge-lbl { font-size: 10.5px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: var(--mute); }
.px-gauge-halo { position: absolute; inset: 5%; border-radius: 50%; box-shadow: 0 0 70px var(--glow); opacity: .22; animation: pxHalo 3.6s ease-in-out infinite; pointer-events: none; }
@keyframes pxHalo { 0%, 100% { opacity: .16; } 50% { opacity: .38; } }

/* state pill + headline */
.px-state {
    display: inline-flex; align-items: center; gap: 9px;
    padding: 7px 15px; border-radius: 999px; margin-bottom: 16px;
    font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; border: 1px solid;
}
.px-state.operational { color: var(--ok); border-color: var(--ok-line); background: var(--ok-soft); box-shadow: 0 8px 26px rgba(31, 214, 161, .15); }
.px-state.degraded { color: var(--warn); border-color: var(--warn-line); background: var(--warn-soft); box-shadow: 0 8px 26px rgba(255, 207, 91, .13); }
.px-state.outage { color: var(--crit); border-color: var(--crit-line); background: var(--crit-soft); box-shadow: 0 8px 26px rgba(255, 95, 118, .15); }
.px-state i { width: 9px; height: 9px; border-radius: 50%; background: currentColor; animation: pxRing 2s infinite; }
@keyframes pxRing { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 55%, transparent); } 75% { box-shadow: 0 0 0 9px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

.px-head1 { font-family: var(--disp); font-size: clamp(1.9rem, 4.5vw, 3.2rem); line-height: 1.04; letter-spacing: -.04em; margin-bottom: 12px; }
.px-head1 .g {
    background: linear-gradient(100deg, var(--brand), var(--brand-hi) 45%, var(--brand2));
    background-size: 200% auto;
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
    animation: pxFlow 6s linear infinite;
}
@keyframes pxFlow { to { background-position: 200% center; } }
.px-hero .px-sub { max-width: 58ch; margin-bottom: 20px; }
.px-hero-meta { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 22px; }
.px-hero-cta { display: flex; flex-wrap: wrap; gap: 11px; }

/* big ecg under hero copy */
.px-ecg-strip { margin-top: 26px; height: 36px; overflow: hidden; opacity: .55; }
.px-ecg-strip svg { width: 200%; height: 100%; color: var(--brand); }
body.px[data-state="outage"] .px-ecg-strip svg { color: var(--crit); }
body.px[data-state="degraded"] .px-ecg-strip svg { color: var(--warn); }
.px-ecg-strip path {
    fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
    filter: drop-shadow(0 0 6px currentColor);
    animation: pxEcgSlide 9s linear infinite;
}
@keyframes pxEcgSlide { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ─────────────── 10. ALERT STRIPS ─────────────── */
.px-alert {
    position: relative; overflow: hidden;
    display: flex; align-items: flex-start; gap: 14px;
    margin-top: 15px; padding: 16px 20px;
    border-radius: var(--r); border: 1px solid;
}
.px-alert.crit { background: var(--crit-soft); border-color: var(--crit-line); }
.px-alert.warn { background: var(--warn-soft); border-color: var(--warn-line); }
.px-alert.maint { background: var(--info-soft); border-color: var(--info-line); }
.px-alert.okk { background: var(--ok-soft); border-color: var(--ok-line); }
.px-alert .ic { width: 38px; height: 38px; flex-shrink: 0; border-radius: 11px; display: grid; place-items: center; }
.px-alert.crit .ic { color: var(--crit); background: var(--crit-soft); }
.px-alert.warn .ic { color: var(--orange); background: var(--orange-soft); }
.px-alert.maint .ic { color: var(--info); background: var(--info-soft); }
.px-alert.okk .ic { color: var(--ok); background: var(--ok-soft); }
.px-alert b { display: block; font-size: 14.5px; }
.px-alert b a { color: var(--ink); }
.px-alert b a:hover { color: var(--brand); }
.px-alert small { color: var(--ink2); font-size: 13px; }
.px-alert .end { margin-left: auto; align-self: center; flex-shrink: 0; }
.px-alert::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(110deg, transparent 42%, rgba(255, 255, 255, .05) 50%, transparent 58%);
    transform: translateX(-100%); animation: pxAlertSheen 7s ease-in-out infinite;
}
@keyframes pxAlertSheen { 0%, 55% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }

.px-mini-progress { height: 5px; border-radius: 99px; background: rgba(148, 163, 184, .16); overflow: hidden; margin-top: 8px; }
.px-mini-progress i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--brand2), var(--brand)); box-shadow: 0 0 10px var(--glow); transition: width 1s var(--spring); }

/* ─────────────── 11. SERVICE BOARD ─────────────── */
.px-board {
    border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
    background: linear-gradient(180deg, rgba(13, 20, 34, .72), rgba(8, 13, 24, .72));
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    box-shadow: 0 28px 70px rgba(0, 0, 0, .34);
}
:root[data-theme="light"] .px-board { background: var(--surface); box-shadow: 0 22px 56px rgba(15, 23, 42, .1); }
.px-board-top { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 15px 24px; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--mute); }
.px-board-top .sp { margin-left: auto; }

/* range switcher (section head) */
.px-sec-head-r { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.px-range { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 11px; background: rgba(148, 163, 184, .05); }
:root[data-theme="light"] .px-range { background: rgba(15, 23, 42, .03); }
.px-range-btn { font-family: var(--mono); font-size: 12px; font-weight: 600; padding: 5px 12px; border-radius: 8px; color: var(--mute); transition: color .15s, background .15s; }
.px-range-btn:hover { color: var(--ink2); }
.px-range-btn.on { color: var(--brand); background: rgba(var(--brand-rgb), .12); }

/* board tools: search + filters */
.px-board-tools { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 24px; border-bottom: 1px solid var(--line); }
.px-search { display: flex; align-items: center; gap: 8px; flex: 1 1 200px; min-width: 170px; max-width: 340px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--field); }
.px-search svg { width: 15px; height: 15px; color: var(--dim); flex-shrink: 0; }
.px-search input { border: none; background: none; outline: none; color: var(--ink); font: inherit; font-size: 13px; width: 100%; }
.px-search input::placeholder { color: var(--dim); }
.px-search input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.px-toggle { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink2); cursor: pointer; -webkit-user-select: none; user-select: none; }
.px-toggle input { accent-color: var(--brand); width: 15px; height: 15px; cursor: pointer; }
.px-tools-count { margin-left: auto; font-size: 11.5px; color: var(--dim); }
.px-board-empty { padding: 34px 24px; text-align: center; color: var(--mute); font-size: 14px; border-top: 1px solid var(--line); }
.px-leg { display: inline-flex; align-items: center; gap: 6px; }
.px-leg i { width: 10px; height: 10px; border-radius: 3px; }
.px-leg.up i { background: var(--brand); box-shadow: 0 0 6px var(--glow); }
.px-leg.notice i { background: var(--info); }
.px-leg.upg i { background: var(--upg); }
.px-leg.deg i { background: var(--warn); }
.px-leg.down i { background: var(--crit); }

.px-group {
    padding: 16px 24px 7px;
    font-family: var(--disp); font-size: 12px; font-weight: 800;
    letter-spacing: .15em; text-transform: uppercase; color: var(--mute);
    display: flex; align-items: center; gap: 9px;
}
.px-group::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }
.px-group.sub { font-size: 11px; opacity: .85; }

.px-row {
    display: grid; grid-template-columns: minmax(150px, 1fr) minmax(0, 2.1fr) auto auto;
    align-items: center; gap: 18px;
    padding: 13px 24px; border-top: 1px solid var(--line);
    transition: background .2s;
}
.px-row:hover { background: rgba(var(--brand-rgb), .045); }
.px-row-name { display: flex; align-items: center; gap: 11px; min-width: 0; }
.px-row-name .nm { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.px-dot { position: relative; width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; background: var(--ok); box-shadow: 0 0 8px var(--ok); color: var(--ok); }
.px-dot.notice { background: var(--info); box-shadow: 0 0 8px var(--info); color: var(--info); }
.px-dot.upg { background: var(--upg); box-shadow: 0 0 8px var(--upg); color: var(--upg); }
.px-dot.minor { background: var(--warn); box-shadow: 0 0 8px var(--warn); color: var(--warn); }
.px-dot.warn { background: var(--orange); box-shadow: 0 0 8px var(--orange); color: var(--orange); }
.px-dot.major { background: var(--amber); box-shadow: 0 0 8px var(--amber); color: var(--amber); }
.px-dot.crit { background: var(--crit); box-shadow: 0 0 8px var(--crit); color: var(--crit); }
.px-dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid currentColor; opacity: 0; animation: pxPing 2.6s ease-out infinite; }
@keyframes pxPing { 0% { transform: scale(.7); opacity: .5; } 100% { transform: scale(1.8); opacity: 0; } }

.px-cells { display: flex; gap: 2px; align-items: stretch; height: 32px; min-width: 0; }
.px-cells .c {
    flex: 1 1 0; min-width: 2px; border-radius: 2.5px;
    background: var(--brand); opacity: .88; cursor: default;
    transition: transform .15s var(--spring), filter .15s; transform-origin: bottom;
}
.px-cells .c[data-c="blue"] { background: var(--info); }
.px-cells .c[data-c="upgrade"] { background: var(--upg); }
.px-cells .c[data-c="yellow"] { background: var(--warn); }
.px-cells .c[data-c="orange"] { background: var(--orange); }
.px-cells .c[data-c="amber"] { background: var(--amber); }
.px-cells .c[data-c="red"] { background: var(--crit); }
.px-cells .c:hover { transform: scaleY(1.22); filter: brightness(1.35) saturate(1.25); }

.px-pct { font-family: var(--mono); font-weight: 700; font-size: 13.5px; text-align: right; min-width: 66px; }
.px-pct.good { color: var(--ok); text-shadow: 0 0 14px rgba(31, 214, 161, .35); }
.px-pct.mid { color: var(--warn); }
.px-pct.bad { color: var(--crit); }

.px-star { background: none; border: none; cursor: pointer; padding: 5px; color: var(--dim); display: grid; place-items: center; transition: color .2s, transform .2s var(--spring); }
.px-star:hover { transform: scale(1.2); color: var(--ink2); }
.px-star.active { color: var(--brand); filter: drop-shadow(0 0 6px var(--glow)); }

.px-bar-x { display: flex; justify-content: space-between; padding: 8px 24px 14px; font-size: 11px; color: var(--dim); border-top: 1px solid var(--line); }

/* ─────────────── 12. INCIDENT LISTS / TIMELINE ─────────────── */
.px-inc {
    display: grid; grid-template-columns: auto 1fr auto; gap: 13px; align-items: center;
    padding: 13px 16px; border-radius: var(--r); border: 1px solid var(--line);
    background: rgba(148, 163, 184, .035);
    transition: transform .22s var(--spring), border-color .22s, background .22s;
}
:root[data-theme="light"] .px-inc { background: rgba(255, 255, 255, .65); }
.px-inc + .px-inc { margin-top: 9px; }
.px-inc:hover { transform: translateX(4px); border-color: var(--line-hi); }
.px-inc .rail { width: 3px; align-self: stretch; border-radius: 3px; background: var(--line); }
.px-inc.ok .rail { background: var(--ok); } .px-inc.notice .rail { background: var(--info); }
.px-inc.minor .rail { background: var(--warn); } .px-inc.warn .rail { background: var(--orange); }
.px-inc.major .rail { background: var(--amber); } .px-inc.crit .rail { background: var(--crit); box-shadow: 0 0 8px var(--crit); }
.px-inc .t { font-weight: 700; font-size: 14px; color: var(--ink); display: block; }
.px-inc .t:hover { color: var(--brand); }
.px-inc .m { margin-top: 2px; font-size: 12.5px; color: var(--mute); }

/* timeline */
.px-tl { position: relative; padding-left: 28px; margin-top: 10px; }
.px-tl::before { content: ""; position: absolute; left: 8px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(180deg, var(--brand), var(--line)); opacity: .5; }
.px-tl-item { position: relative; padding-bottom: 22px; }
.px-tl-item:last-child { padding-bottom: 4px; }
.px-tl-item::before {
    content: ""; position: absolute; left: -27px; top: 4px; width: 14px; height: 14px; border-radius: 50%;
    background: var(--orange); border: 3px solid var(--bg0); box-shadow: 0 0 10px currentColor;
}
.px-tl-item.resolved::before { background: var(--ok); color: var(--ok); }
.px-tl-item.monitoring::before { background: var(--info); color: var(--info); }
.px-tl-item.in_progress::before, .px-tl-item.investigating::before { background: var(--orange); color: var(--orange); }
.px-tl-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.px-tl-h time { font-family: var(--mono); font-size: 12px; color: var(--mute); }
.px-tl-item p { margin-top: 6px; color: var(--ink2); font-size: 14px; line-height: 1.7; white-space: pre-line; }

/* ─────────────── 13. FORMS ─────────────── */
.px-field { display: grid; gap: 6px; margin-bottom: 15px; }
.px-field label { font-size: 13px; font-weight: 700; color: var(--ink2); }
.px input[type="text"], .px input[type="email"], .px input[type="password"], .px textarea, .px select {
    width: 100%; padding: 12px 14px; border-radius: 11px;
    border: 1px solid var(--line); background: var(--field);
    color: var(--ink); font-family: inherit; font-size: 14px; outline: none;
    transition: border-color .18s, box-shadow .18s;
}
.px input:focus, .px textarea:focus, .px select:focus {
    border-color: rgba(var(--brand-rgb), .55); box-shadow: 0 0 0 3px rgba(var(--brand-rgb), .15);
}
.px textarea { resize: vertical; min-height: 110px; }
.px-form-note { font-size: 12.5px; color: var(--mute); border: 1px dashed var(--line); border-radius: 11px; padding: 11px 14px; }
.px-msg { padding: 11px 15px; border-radius: 11px; border: 1px solid; font-size: 13.5px; font-weight: 600; margin-bottom: 14px; }
.px-msg.ok { color: var(--ok); border-color: var(--ok-line); background: var(--ok-soft); }
.px-msg.crit { color: var(--crit); border-color: var(--crit-line); background: var(--crit-soft); }
.px-check { display: flex; align-items: center; gap: 9px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 13.5px; cursor: pointer; transition: border-color .15s, background .15s; }
.px-check:hover { border-color: var(--line-hi); }
.px-check input { width: auto !important; accent-color: var(--brand); }

/* ─────────────── 14. CONFIRM PAGES ─────────────── */
.px-confirm { max-width: 520px; margin: 60px auto 0; text-align: center; }
.px-confirm .big-ic { width: 78px; height: 78px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center; border: 1px solid; }
.px-confirm .big-ic.ok { color: var(--ok); border-color: var(--ok-line); background: var(--ok-soft); box-shadow: 0 0 50px rgba(31, 214, 161, .25); }
.px-confirm .big-ic.crit { color: var(--crit); border-color: var(--crit-line); background: var(--crit-soft); box-shadow: 0 0 50px rgba(255, 95, 118, .22); }
.px-confirm .big-ic.warn { color: var(--warn); border-color: var(--warn-line); background: var(--warn-soft); }
.px-confirm .big-ic svg { width: 34px; height: 34px; }
.px-confirm h1 { font-family: var(--disp); font-size: 24px; letter-spacing: -.02em; margin-bottom: 8px; }
.px-confirm p { color: var(--ink2); font-size: 14.5px; line-height: 1.7; }
.px-confirm .acts { display: flex; gap: 10px; justify-content: center; margin-top: 22px; flex-wrap: wrap; }

/* ─────────────── 15. TERMINAL (Live) ─────────────── */
.px-term { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: #04070d; box-shadow: 0 28px 70px rgba(0, 0, 0, .45); }
:root[data-theme="light"] .px-term { background: #0b1220; }
.px-term-head { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); background: rgba(148, 163, 184, .05); }
.px-term-dots { display: flex; gap: 6px; }
.px-term-dots i { width: 11px; height: 11px; border-radius: 50%; }
.px-term-dots i:nth-child(1) { background: #ff5f57; } .px-term-dots i:nth-child(2) { background: #febc2e; } .px-term-dots i:nth-child(3) { background: #28c840; }
.px-term-title { font-family: var(--mono); font-size: 12px; color: var(--mute); flex: 1; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.px-term-live { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--ok); }
.px-term-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); animation: pxBlink 1.4s infinite; }
.px-term-body { padding: 18px 20px 22px; font-family: var(--mono); font-size: 12.8px; line-height: 1.85; max-height: 600px; overflow-y: auto; color: #b9c4d6; }
.px-term-body .ln { white-space: pre-wrap; word-break: break-word; }
.px-term-body .ln.sys { color: var(--dim); }
.px-term-body .ln.ok { color: var(--ok); }
.px-term-body .ln.info { color: var(--info); }
.px-term-body .ln.minor { color: var(--warn); }
.px-term-body .ln.warn { color: var(--orange); }
.px-term-body .ln.major { color: var(--amber); }
.px-term-body .ln.crit { color: var(--crit); }
.px-term-body .ln a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.px-term-body .cursor { display: inline-block; width: 8px; height: 14px; background: var(--brand); vertical-align: -2px; animation: pxBlink 1s steps(1) infinite; }

/* ─────────────── 16. CALENDAR HEATMAP (uptime) ─────────────── */
.px-cal-wrap { overflow-x: auto; padding-bottom: 6px; }
.px-cal { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 12px); gap: 3px; width: max-content; }
.px-cal .d {
    width: 12px; height: 12px; border-radius: 3px;
    background: rgba(148, 163, 184, .12); cursor: default;
    transition: transform .12s var(--spring), filter .12s;
}
.px-cal .d.up { background: var(--brand); opacity: .85; box-shadow: 0 0 4px rgba(var(--brand-rgb), .35); }
.px-cal .d[data-c="blue"] { background: var(--info); }
.px-cal .d[data-c="upgrade"] { background: var(--upg); }
.px-cal .d[data-c="yellow"] { background: var(--warn); }
.px-cal .d[data-c="orange"] { background: var(--orange); }
.px-cal .d[data-c="amber"] { background: var(--amber); }
.px-cal .d[data-c="red"] { background: var(--crit); }
.px-cal .d:hover { transform: scale(1.35); filter: brightness(1.3); }
.px-cal-months { display: flex; gap: 0; width: max-content; font-size: 10.5px; color: var(--dim); font-family: var(--mono); margin-bottom: 5px; }

.px-stat-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.px-stat-tile { padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r); background: rgba(148, 163, 184, .045); transition: transform .25s var(--spring), border-color .25s; }
.px-stat-tile:hover { transform: translateY(-3px); border-color: var(--line-hi); }
.px-stat-tile b { display: block; font-family: var(--mono); font-size: 23px; font-weight: 700; letter-spacing: -.02em; }
.px-stat-tile b.good { color: var(--ok); } .px-stat-tile b.mid { color: var(--warn); } .px-stat-tile b.bad { color: var(--crit); }
.px-stat-tile span { display: block; margin-top: 3px; font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }

.px-svc-tabs { display: flex; gap: 7px; flex-wrap: wrap; }
.px-svc-tab {
    display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px;
    border-radius: 999px; border: 1px solid var(--line); background: rgba(148, 163, 184, .05);
    color: var(--ink2) !important; font-size: 13px; font-weight: 600; transition: all .18s;
}
.px-svc-tab:hover { border-color: var(--line-hi); color: var(--ink) !important; }
.px-svc-tab.on { color: var(--brand) !important; border-color: rgba(var(--brand-rgb), .4); background: rgba(var(--brand-rgb), .1); }

/* ─────────────── 17. NETWORK (PoP cards) ─────────────── */
.px-pop {
    position: relative; overflow: hidden;
    border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px 24px;
    background: var(--surface);
    transition: transform .3s var(--spring), border-color .3s;
}
.px-pop:hover { transform: translateY(-4px); border-color: var(--line-hi); }
.px-pop .flag { font-size: 26px; }
.px-pop h3 { font-family: var(--disp); font-size: 17px; margin-top: 8px; }
.px-pop .loc { color: var(--mute); font-size: 13px; margin-top: 2px; }
.px-pop .net-st { display: inline-flex; align-items: center; gap: 7px; margin-top: 14px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.px-pop .net-st i { width: 9px; height: 9px; border-radius: 50%; }
.px-pop .net-st.online { color: var(--ok); } .px-pop .net-st.online i { background: var(--ok); box-shadow: 0 0 9px var(--ok); animation: pxBeat 2s infinite; }
.px-pop .net-st.degraded { color: var(--warn); } .px-pop .net-st.degraded i { background: var(--warn); }
.px-pop .net-st.offline { color: var(--crit); } .px-pop .net-st.offline i { background: var(--crit); }
.px-pop .coords { position: absolute; top: 18px; right: 20px; font-family: var(--mono); font-size: 10.5px; color: var(--dim); }

/* ─────────────── 18. COMMAND PALETTE ─────────────── */
.px-pal { position: fixed; inset: 0; z-index: 100; display: none; }
.px-pal.open { display: block; }
.px-pal-bg { position: absolute; inset: 0; background: rgba(2, 4, 9, .7); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.px-pal-box {
    position: relative; max-width: 620px; margin: 11vh auto 0; padding: 0;
    border: 1px solid var(--line-hi); border-radius: 18px; overflow: hidden;
    background: var(--surface2);
    box-shadow: 0 50px 130px rgba(0, 0, 0, .6), 0 0 0 1px rgba(var(--brand-rgb), .12), 0 0 60px rgba(var(--brand-rgb), .12);
    animation: pxPalIn .22s var(--spring);
}
@keyframes pxPalIn { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.px-pal-in { display: flex; align-items: center; gap: 11px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.px-pal-in svg { width: 17px; height: 17px; color: var(--brand); flex-shrink: 0; }
.px-pal-in input { flex: 1; background: none !important; border: none !important; box-shadow: none !important; padding: 0 !important; font-size: 15px; color: var(--ink); outline: none; }
.px-pal-list { max-height: 380px; overflow-y: auto; padding: 8px; }
.px-pal-item {
    display: flex; align-items: center; gap: 11px; padding: 11px 13px; border-radius: 11px;
    color: var(--ink2); font-size: 14px; cursor: pointer;
}
.px-pal-item .ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: rgba(148, 163, 184, .08); color: var(--brand); flex-shrink: 0; }
.px-pal-item .ico svg { width: 15px; height: 15px; }
.px-pal-item .lab { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.px-pal-item .cat { font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: .06em; }
.px-pal-item:hover, .px-pal-item.sel { background: rgba(var(--brand-rgb), .12); color: var(--ink); }
.px-pal-empty { padding: 26px; text-align: center; color: var(--mute); font-size: 13.5px; }
.px-pal-foot { display: flex; gap: 14px; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 11px; color: var(--dim); }
.px-pal-foot b { font-family: var(--mono); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; font-weight: 600; }

/* ─────────────── 19. TOAST ─────────────── */
.px-toast {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(80px);
    z-index: 110; display: flex; align-items: center; gap: 10px;
    padding: 12px 19px; border-radius: 13px; border: 1px solid var(--line-hi);
    background: var(--surface2); color: var(--ink); font-size: 13.5px; font-weight: 600;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .5), 0 0 30px rgba(var(--brand-rgb), .15);
    opacity: 0; transition: transform .35s var(--spring), opacity .35s;
    pointer-events: none;
}
.px-toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.px-toast i { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 8px var(--glow); }

/* ─────────────── 20. REACTIONS + COMMENTS ─────────────── */
.px-react { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.px-react-btn {
    display: inline-flex; align-items: center; gap: 9px; height: 42px; padding: 0 17px;
    border-radius: 12px; border: 1px solid var(--line); background: rgba(148, 163, 184, .05);
    color: var(--ink2); font-size: 13.5px; font-weight: 600; cursor: pointer;
    transition: all .2s var(--spring);
}
.px-react-btn:hover { transform: translateY(-2px); border-color: var(--line-hi); color: var(--ink); }
.px-react-btn.active { border-color: rgba(var(--brand-rgb), .5); background: rgba(var(--brand-rgb), .12); color: var(--brand); }
.px-react-btn .n { font-family: var(--mono); font-weight: 700; background: rgba(148, 163, 184, .12); padding: 1px 8px; border-radius: 99px; font-size: 12px; }
.px-react-btn.active .n { background: rgba(var(--brand-rgb), .2); }

.px-comment { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r); background: rgba(148, 163, 184, .035); }
.px-comment + .px-comment { margin-top: 10px; }
.px-comment.admin { border-color: rgba(var(--brand-rgb), .35); background: rgba(var(--brand-rgb), .06); }
.px-comment.hidden-c { opacity: .45; }
.px-comment-h { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.px-comment-h .who { font-weight: 700; font-size: 13.5px; }
.px-comment-h time { font-size: 12px; color: var(--dim); margin-left: auto; }
.px-comment-b { margin-top: 6px; font-size: 13.5px; color: var(--ink2); line-height: 1.65; }

/* ─────────────── 21. FOOTER ─────────────── */
.px-foot { position: relative; z-index: 1; margin-top: 60px; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--bg0) 72%, transparent); }
.px-foot::before { content: ""; position: absolute; top: -1px; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--brand), transparent); opacity: .55; }
.px-foot-in { max-width: var(--max); margin: 0 auto; padding: 44px 22px 24px; display: grid; grid-template-columns: minmax(0, 1.5fr) 1fr 1fr 1fr; gap: 32px; }
.px-foot-brand p { margin-top: 13px; color: var(--ink2); font-size: 13.5px; line-height: 1.7; max-width: 46ch; }
.px-foot-k { font-family: var(--disp); font-size: 11.5px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; color: var(--brand); margin-bottom: 4px; }
.px-foot-col { display: grid; gap: 10px; align-content: start; }
.px-foot-col a { color: var(--ink2); font-size: 13.5px; }
.px-foot-col a:hover { color: var(--brand); }
.px-foot-bot { max-width: var(--max); margin: 0 auto; padding: 16px 22px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--mute); }
.px-foot-bot strong { color: var(--ink); }
.px-foot-tags { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.px-tag { font-size: 12px; font-weight: 700; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink2) !important; transition: all .2s var(--spring); }
.px-tag:hover { transform: translateY(-2px); border-color: var(--line-hi); color: var(--ink) !important; }

/* ─────────────── 22. TOOLTIP ─────────────── */
.px .tooltip, .px-tip {
    position: fixed; z-index: 120; max-width: 320px; pointer-events: none;
    background: var(--surface2); border: 1px solid var(--line-hi); border-radius: 11px;
    padding: 10px 13px; font-size: 12.5px; color: var(--ink2); line-height: 1.55;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .5);
}
.px .tooltip .t-title, .px-tip .t-title { font-weight: 700; color: var(--ink); font-family: var(--mono); font-size: 12px; }
.px .tooltip .t-muted, .px-tip .t-muted { color: var(--mute); font-family: var(--mono); font-size: 11.5px; margin-top: 2px; }

/* ─────────────── 23. SCROLL PROGRESS / REVEAL / UTIL ─────────────── */
.px-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 90; background: linear-gradient(90deg, var(--brand2), var(--brand), var(--brand-hi)); box-shadow: 0 0 12px var(--glow); }
.px .rv { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--spring), transform .7s var(--spring); }
.px .rv.in { opacity: 1; transform: none; }
.px .rv-d1 { transition-delay: .07s; } .px .rv-d2 { transition-delay: .14s; } .px .rv-d3 { transition-delay: .21s; }
.px-row-flex { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.px-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.px-back { display: inline-flex; align-items: center; gap: 7px; color: var(--mute) !important; font-size: 13px; font-weight: 600; margin-top: 20px; }
.px-back:hover { color: var(--brand) !important; }
.px-back svg { width: 14px; height: 14px; }
.px-empty { text-align: center; padding: 30px 0; color: var(--mute); }
.px-empty svg { width: 36px; height: 36px; color: var(--ok); margin-bottom: 8px; }
.px-empty b { display: block; color: var(--ok); font-size: 14.5px; }
.px-pages { display: flex; gap: 6px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }

/* ─────────────── 24. RESPONSIVE ─────────────── */
@media (max-width: 980px) {
    .px-hero { grid-template-columns: 1fr; gap: 28px; padding: 34px 24px; text-align: center; }
    .px-gauge { max-width: 235px; }
    .px-hero-meta, .px-hero-cta { justify-content: center; }
    .px-grid2 { grid-template-columns: 1fr; }
    .px-foot-in { grid-template-columns: 1fr 1fr; }
    .px-foot-brand { grid-column: 1 / -1; }
    .px-nav-state span { display: none; }
    .px-stat-tiles { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
    .px-links {
        position: fixed; inset: var(--nav-h) 0 auto 0; z-index: 59;
        flex-direction: column; align-items: stretch; gap: 5px; margin: 0; padding: 12px 16px 18px;
        background: color-mix(in srgb, var(--bg0) 95%, transparent);
        -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--line);
        transform: translateY(-12px); opacity: 0; pointer-events: none;
        transition: transform .22s, opacity .22s;
    }
    .px-links.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
    .px-link { height: 44px; }
    .px-burger {
        display: flex; flex-direction: column; justify-content: center; gap: 4px;
        width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--line);
        background: rgba(148, 163, 184, .05); cursor: pointer;
    }
    .px-burger span { display: block; width: 17px; height: 2px; margin: 0 auto; background: var(--ink); border-radius: 2px; transition: transform .2s, opacity .2s; }
    .px-burger.active span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
    .px-burger.active span:nth-child(2) { opacity: 0; }
    .px-burger.active span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
    .px-hide-sm { display: none !important; }
    .px-row { grid-template-columns: 1fr auto auto; gap: 9px 13px; padding: 13px 17px; }
    .px-cells { grid-column: 1 / -1; order: 4; height: 26px; }
    .px-board-top, .px-group { padding-left: 17px; padding-right: 17px; }
    .px-bar-x { padding-left: 17px; padding-right: 17px; }
    .px-foot-in { grid-template-columns: 1fr; }
    .px-card { padding: 19px 18px; }
    .px-brand-pulse svg { display: none; }
}

/* ─────────────── 25. REDUCED MOTION ─────────────── */
@media (prefers-reduced-motion: reduce) {
    .px *, .px *::before, .px *::after { animation: none !important; transition: none !important; }
    .px .rv { opacity: 1; transform: none; }
}
