/* ==========================================================================
   Jarvis V3 — design system (dark, harness-style)
   Tokens mirror the reference layout: 1140px container, pill buttons,
   16px panel radius, hairline borders on near-black surfaces.
   ========================================================================== */

:root {
    /* palette (dark) */
    --brand: #6799fe;
    --brand-strong: #4d6bfe;
    --text-primary: #fff;
    --text-secondary: hsla(0, 0%, 100%, .8);
    --text-description: hsla(0, 0%, 100%, .5);
    --text-placeholder: hsla(0, 0%, 100%, .3);

    --bg-page: #0a0a0a;
    --bg-surface-1: hsla(0, 0%, 100%, .06);
    --bg-surface-2: hsla(0, 0%, 100%, .04);
    --bg-surface-3: hsla(0, 0%, 100%, .02);
    --bg-surface-4: hsla(0, 0%, 100%, .015);
    --bg-surface-5: hsla(0, 0%, 100%, .12);
    --bg-raised: hsla(0, 0%, 100%, .25);
    --bg-overlay: #262626;
    --bg-hover: hsla(0, 0%, 100%, .06);
    --bg-input: hsla(0, 0%, 100%, .08);
    --bg-input-hover: hsla(0, 0%, 100%, .12);
    --bg-code: rgba(0, 0, 0, .35);

    --border-subtle: hsla(0, 0%, 100%, .08);
    --border-default: hsla(0, 0%, 100%, .06);
    --border-divider: hsla(0, 0%, 100%, .25);
    --border-hover: hsla(0, 0%, 100%, .2);
    --border-strong: hsla(0, 0%, 100%, .24);

    --btn-primary-bg: #fff;
    --btn-primary-text: #0a0a0a;
    --btn-primary-hover: rgba(0, 0, 0, .2);
    --btn-secondary-bg: hsla(0, 0%, 100%, .06);
    --btn-secondary-text: #fff;
    --btn-secondary-border: hsla(0, 0%, 100%, .15);
    --btn-secondary-hover-bg: hsla(0, 0%, 100%, .2);
    --btn-secondary-hover-border: hsla(0, 0%, 100%, .6);
    --btn-ghost-text: #fff;
    --btn-ghost-hover-bg: hsla(0, 0%, 100%, .08);
    --btn-ghost-hover-border: hsla(0, 0%, 100%, .2);

    --state-success: #4ed17e;
    --state-warn: #f7ad31;
    --state-error: #f87171;
    --state-business: var(--brand);
    /* legacy alias used by cabinet.js when it draws the usage chart */
    --blue: #6799fe;

    /* type */
    --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-display: 'Montserrat', 'Inter', system-ui, sans-serif;
    --font-mono: 'Fragment Mono', 'Roboto Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    /* geometry */
    --radius-card: 24px;
    --radius-panel: 16px;
    --radius-media: 12px;
    --radius-input: 10px;
    --radius-sm: 8px;
    --radius-pill: 100px;

    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    --space-7: 40px;
    --space-8: 56px;
    --space-9: 80px;
    --space-10: 120px;
    --space-11: 160px;

    --container: 1140px;
    --header-width: 1140px;
    --header-width-compact: 1070px;
    --blur-glass: 20px;
    --shadow-card: hsla(0, 0%, 100%, .12) 0 1px 0 0 inset;
}

/* ------------------------------------------------------------------ reset */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg-page);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overscroll-behavior: none;
}

body.no-scroll { overflow: hidden; }

h1, h2, h3, h4, h5, h6 { margin: 0; font-size: inherit; font-weight: inherit; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; padding: 0; }
hr { border: 0; border-top: 1px solid var(--border-default); margin: 0; }
code, pre, kbd { font-family: var(--font-mono); }
table { border-collapse: collapse; width: 100%; }
::selection { background: var(--brand-strong); color: #fff; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: hsla(0, 0%, 100%, .16); border-radius: 999px; border: 3px solid var(--bg-page); }
::-webkit-scrollbar-thumb:hover { background: hsla(0, 0%, 100%, .28); }

/* ------------------------------------------------------------- primitives */
.jx-container { width: min(100% - 48px, var(--container)); margin-inline: auto; }
.jx-container--wide { width: min(100% - 48px, 1280px); margin-inline: auto; }
.jx-container--narrow { width: min(100% - 48px, 820px); margin-inline: auto; }

.jx-eyebrow {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--text-description);
}

.jx-display { font-family: var(--font-display); font-weight: 500; letter-spacing: -.02em; line-height: 1.5; }
.jx-h1 { font-family: var(--font-display); font-size: 40px; font-weight: 500; letter-spacing: -.02em; line-height: 1.5; }
.jx-h2 { font-family: var(--font-display); font-size: 28px; font-weight: 500; letter-spacing: -.02em; line-height: 1.5; }
.jx-h3 { font-size: 20px; font-weight: 500; letter-spacing: -.01em; line-height: 1.5; }
.jx-h4 { font-size: 17px; font-weight: 600; letter-spacing: -.01em; line-height: 1.4; }
.jx-body { font-size: 16px; line-height: 1.6; text-wrap: pretty; }
.jx-small { font-size: 15px; line-height: 1.6; }
.jx-caption { font-size: 14px; line-height: 1.5; color: var(--text-description); }
.jx-muted { color: var(--text-description); }
.jx-secondary-text { color: var(--text-secondary); }
.jx-brand-text { color: var(--brand); }
.jx-mono { font-family: var(--font-mono); }
.jx-center { text-align: center; }
.jx-nowrap { white-space: nowrap; }

/* --------------------------------------------------------------- buttons */
.jx-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: var(--radius-pill);
    border: 1px solid transparent;
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.2;
    padding: 11px 18px;
    cursor: pointer;
    overflow: hidden;
    isolation: isolate;
    transition: border-color .25s ease, background-color .25s ease, opacity .2s ease;
    white-space: nowrap;
}

.jx-btn::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 150%;
    aspect-ratio: 1;
    border-radius: 50%;
    opacity: 0;
    z-index: -1;
    transform: translate(-50%, -50%) scale(0);
    transition: transform .36s ease-out, opacity .1s ease;
}

.jx-btn:hover::after { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.jx-btn svg { width: 16px; height: 16px; flex: none; }
.jx-btn[disabled], .jx-btn.is-disabled { opacity: .5; pointer-events: none; }

.jx-btn--primary { background: var(--btn-primary-bg); color: var(--btn-primary-text); }
.jx-btn--primary::after { background: var(--btn-primary-hover); }

.jx-btn--secondary {
    background: var(--btn-secondary-bg);
    color: var(--btn-secondary-text);
    border-color: var(--btn-secondary-border);
}
.jx-btn--secondary::after { background: var(--btn-secondary-hover-bg); }
.jx-btn--secondary:hover { border-color: var(--btn-secondary-hover-border); }

.jx-btn--ghost { background: transparent; color: var(--btn-ghost-text); font-weight: 400; }
.jx-btn--ghost::after { background: var(--btn-ghost-hover-bg); }
.jx-btn--ghost:hover { border-color: var(--btn-ghost-hover-border); }

.jx-btn--brand { background: var(--brand-strong); color: #fff; }
.jx-btn--brand::after { background: rgba(255, 255, 255, .16); }

.jx-btn--danger { background: rgba(248, 113, 113, .14); color: #ffb4b4; border-color: rgba(248, 113, 113, .3); }
.jx-btn--danger::after { background: rgba(248, 113, 113, .2); }

.jx-btn--s { font-size: 14px; padding: 8px 14px; }
.jx-btn--xs { font-size: 13px; padding: 6px 12px; }
.jx-btn--lg { font-size: 16px; padding: 14px 24px; }
.jx-btn--block { width: 100%; }
.jx-btn--icon { padding: 10px; }
.jx-btn--icon svg { width: 18px; height: 18px; }

.jx-btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.jx-btn-row--center { justify-content: center; }

/* ---------------------------------------------------------------- header */
.jx-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    margin: 0 auto;
    z-index: 50;
    width: min(100% - 48px, var(--header-width));
    padding: var(--space-2) 0 0;
    transition: width .5s cubic-bezier(.19, 1, .22, 1);
}

/* compact state: the whole bar pulls in and the nav items move closer together */
.jx-header.is-scrolled { width: min(100% - 48px, var(--header-width-compact)); }

.jx-header__bar {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    min-height: 40px;
    padding: 4px 0;
    border-radius: var(--radius-pill);
    border: 1px solid transparent;
}

.jx-header__bar::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: var(--bg-raised);
    border: 0;
    backdrop-filter: blur(var(--blur-glass));
    -webkit-backdrop-filter: blur(var(--blur-glass));
    opacity: 0;
    visibility: hidden;
    transition: opacity .4s ease-in-out, visibility 0s .4s;
    pointer-events: none;
    z-index: -1;
}

/* the plate alone grows sideways — the logo/nav row keeps its own width */
@media (min-width: 1300px) {
    .jx-header__bar::before { inset: 0 -48px; }
}

.jx-header__bar.is-scrolled::before { opacity: 1; visibility: visible; transition: opacity .4s ease-in-out, visibility 0s; }

.jx-header__side { display: flex; align-items: center; gap: var(--space-3); transition: gap .5s cubic-bezier(.19, 1, .22, 1); }
.jx-header.is-scrolled .jx-header__side { gap: 10px; }
.jx-header__nav { display: flex; align-items: center; gap: 6px; transition: gap .5s cubic-bezier(.19, 1, .22, 1); }
.jx-header.is-scrolled .jx-header__nav { gap: 0; }

.jx-header__link {
    padding: 8px 14px;
    border-radius: var(--radius-pill);
    font-size: 15px;
    color: var(--text-secondary);
    transition: color .2s ease, background-color .2s ease, padding .5s cubic-bezier(.19, 1, .22, 1);
}

.jx-header.is-scrolled .jx-header__link { padding: 8px 9px; }

.jx-header__link:hover { color: var(--text-primary); background: var(--bg-hover); }
.jx-header__link.is-active { color: var(--text-primary); }

/* logo */
.jx-logo { display: inline-flex; align-items: center; gap: 9px; min-width: 0; }
.jx-logo__mark { width: 27px; height: 27px; flex: none; border-radius: 8px; box-shadow: 0 0 0 1px hsla(0, 0%, 100%, .12); }
.jx-logo__word {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 600;
    letter-spacing: .1em;
    color: var(--text-primary);
    line-height: 1;
}
.jx-logo__chip {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: .12em;
    padding: 4px 7px;
    border-radius: 5px;
    background: rgba(255, 255, 255, .92);
    color: #111;
    line-height: 1;
}

/* locale toggle */
.jx-locale {
    display: flex;
    align-items: center;
    height: 32px;
    padding: 3px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-default);
    background: hsla(0, 0%, 100%, .04);
}

.jx-locale__item {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 0 12px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-description);
    transition: color .2s, background-color .2s, box-shadow .2s;
}

.jx-locale__item:hover { color: var(--text-primary); }
.jx-locale__item.is-active {
    background: hsla(0, 0%, 100%, .16);
    color: var(--text-primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .18);
}

.jx-burger { display: none; width: 40px; height: 40px; align-items: center; justify-content: center; color: var(--text-primary); border-radius: 50%; }
.jx-burger:hover { background: var(--bg-hover); }

/* mobile menu */
.jx-mobile {
    position: fixed;
    inset: 0;
    z-index: 60;
    background: var(--bg-page);
    display: flex;
    flex-direction: column;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .22s ease, transform .22s ease, visibility 0s .22s;
}

.jx-mobile.is-open { opacity: 1; visibility: visible; transform: none; transition: opacity .22s ease, transform .22s ease, visibility 0s; }
.jx-mobile__head { display: flex; align-items: center; justify-content: space-between; padding: var(--space-4) var(--space-5); }
.jx-mobile__body { flex: 1; overflow-y: auto; padding: var(--space-3) var(--space-5); }
.jx-mobile__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: var(--space-4) 0;
    font-size: 17px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-subtle);
    text-align: left;
}
.jx-mobile__item:last-child { border-bottom: 0; }
.jx-mobile__item.is-disabled { opacity: .6; cursor: default; border-bottom: 1px solid var(--border-subtle); }
.jx-mobile__item .jx-badge { font-size: 11px; }
.jx-mobile__foot { padding: var(--space-4) var(--space-5); border-top: 1px solid var(--border-subtle); }

/* ---------------------------------------------------- download split menu */
.jx-dl { position: relative; display: inline-flex; align-items: stretch; }

.jx-dl__main { border-top-right-radius: 0; border-bottom-right-radius: 0; padding-right: 14px; }
.jx-dl__arrow { border-top-left-radius: 0; border-bottom-left-radius: 0; padding-left: 8px; padding-right: 8px; border-left: 1px solid rgba(0, 0, 0, .16); }
.jx-dl__arrow svg { width: 14px; height: 14px; transition: transform .25s ease; }
.jx-dl.is-open .jx-dl__arrow svg { transform: rotate(180deg); }

.jx-dl__menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 60;
    min-width: 280px;
    padding: 6px;
    border-radius: 14px;
    border: 1px solid var(--border-subtle);
    background: rgba(28, 28, 30, .94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 20px 48px rgba(0, 0, 0, .5);
    opacity: 0;
    visibility: hidden;
    transform: scale(.96);
    transform-origin: top right;
    transition: opacity .18s ease, transform .18s ease, visibility 0s .18s;
}

.jx-dl.is-open .jx-dl__menu { opacity: 1; visibility: visible; transform: none; transition: opacity .18s ease, transform .18s ease, visibility 0s; }

.jx-dl__option {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 10px 12px;
    border-radius: 10px;
    transition: background-color .18s ease;
}
.jx-dl__option:hover { background: var(--bg-hover); }
.jx-dl__option.is-disabled { opacity: .6; cursor: default; }
.jx-dl__option.is-disabled:hover { background: transparent; }

.jx-dl__title { display: flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 500; }
.jx-dl__title svg { width: 15px; height: 15px; flex: none; color: var(--text-description); }
.jx-dl__title .jx-badge { font-size: 11px; padding: 2px 8px; }
.jx-dl__note { font-size: 12px; color: var(--text-description); padding-left: 23px; }

/* ------------------------------------------------------------------ hero */
.jx-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-11) 0 var(--space-10);
    overflow: hidden;
    isolation: isolate;
}

.jx-hero__backdrop { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.jx-hero__backdrop::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(46% 34% at 50% 2%, rgba(74, 122, 194, .55) 0%, rgba(35, 64, 106, 0) 72%),
        radial-gradient(40% 40% at 10% 16%, rgba(43, 82, 140, .40) 0%, rgba(35, 64, 106, 0) 76%),
        radial-gradient(44% 44% at 92% 22%, rgba(56, 60, 96, .38) 0%, rgba(35, 64, 106, 0) 74%),
        linear-gradient(180deg, #24406a 0%, #1e3557 22%, #182a45 42%, #101725 63%, #0a0a0a 88%);
}
.jx-hero__backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10, 10, 10, 0) 60%, rgba(10, 10, 10, .55) 80%, #0a0a0a 94%);
}

.jx-hero__inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-8);
    width: min(100% - 48px, 1280px);
    margin-inline: auto;
}

.jx-hero__copy {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-6);
    width: 100%;
    max-width: 800px;
    padding-top: var(--space-4);
    text-align: center;
}

.jx-hero__title-group { display: flex; flex-direction: column; align-items: center; gap: var(--space-4); }
.jx-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .14em;
    text-transform: uppercase;
    line-height: 1;
    color: hsla(0, 0%, 100%, .74);
}
.jx-hero__badge svg { width: 13px; height: 13px; }

.jx-hero__text { display: flex; flex-direction: column; gap: var(--space-1); width: 100%; max-width: 720px; color: var(--text-description); }
.jx-hero__actions { margin-top: var(--space-2); }

.jx-hero-enter { animation: jx-hero-enter .8s ease-out backwards; }
.jx-hero-preview-enter { animation: jx-preview-enter .8s ease-out .4s backwards; }

@keyframes jx-hero-enter {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: none; }
}
@keyframes jx-preview-enter {
    from { opacity: 0; transform: translateY(28px) scale(.985); }
    to { opacity: 1; transform: none; }
}

/* ------------------------------------------------- app window (real shot) */
.jx-hero-window {
    position: relative;
    width: 100%;
    max-width: 1240px;
    margin-inline: auto;
    border-radius: var(--radius-panel);
    overflow: hidden;
    background: #101113;
    box-shadow: 0 0 0 1px hsla(0, 0%, 100%, .12), 0 24px 72px rgba(0, 0, 0, .2);
}

.jx-hero-window img { display: block; width: 100%; height: auto; }

/* ------------------------------------------------- app preview (mockup) --
   Kept for reference: the hero now shows a real application screenshot.
   ------------------------------------------------------------------------ */
.jx-preview { width: 100%; max-width: 1020px; }

.jx-window {
    --u: .9px;
    position: relative;
    display: flex;
    width: 100%;
    height: calc(var(--u) * 680);
    overflow: hidden;
    border-radius: var(--radius-panel);
    background: transparent;
    box-shadow: 0 0 0 1px hsla(0, 0%, 100%, .12), 0 24px 72px rgba(0, 0, 0, .2);
    color: #f9fafb;
    font-size: calc(var(--u) * 14);
    line-height: 1.4;
    text-align: left;
    user-select: none;
}

.jx-window__sidebar {
    --u: .88px;
    display: flex;
    flex-direction: column;
    width: calc(var(--u) * 260);
    flex: none;
    min-height: 0;
    font-size: calc(var(--u) * 14);
    background:
        linear-gradient(180deg, rgba(122, 155, 240, .08), rgba(122, 155, 240, 0) 35%, rgba(143, 137, 184, 0) 68%, rgba(143, 137, 184, .07)),
        rgba(95, 102, 114, .42);
    backdrop-filter: blur(32px) saturate(125%);
    -webkit-backdrop-filter: blur(32px) saturate(125%);
    box-shadow: inset -.5px 0 hsla(0, 0%, 100%, .1);
}

.jx-window__bar {
    height: calc(var(--u) * 52);
    padding: 0 calc(var(--u) * 12) calc(var(--u) * 4);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: none;
    color: #cfd3d6;
}
.jx-window__bar svg { width: calc(var(--u) * 16); height: calc(var(--u) * 16); flex: none; }

.jx-window__lights { display: flex; gap: calc(var(--u) * 9); }
.jx-window__lights i { display: block; width: calc(var(--u) * 14); height: calc(var(--u) * 14); border-radius: 50%; background: #ff6058; box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .08); }
.jx-window__lights i:nth-child(2) { background: #ffbd2e; }
.jx-window__lights i:nth-child(3) { background: #28c840; }

.jx-window__brand { display: flex; align-items: center; gap: calc(var(--u) * 7); height: calc(var(--u) * 38); padding: 0 calc(var(--u) * 12); margin-bottom: calc(var(--u) * 12); flex: none; }
.jx-window__brand svg { width: calc(var(--u) * 20); height: calc(var(--u) * 20); }
.jx-window__brand span { font-family: var(--font-display); font-size: calc(var(--u) * 13); font-weight: 600; letter-spacing: .1em; }
.jx-window__brand em { font-family: var(--font-mono); font-style: normal; font-size: calc(var(--u) * 9); letter-spacing: .1em; padding: calc(var(--u) * 3) calc(var(--u) * 5); border-radius: 4px; background: rgba(255, 255, 255, .9); color: #111; }

.jx-window__sidebar-body { flex: 1; min-height: 0; overflow: hidden; padding: 0 calc(var(--u) * 12); }

.jx-window__new {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: calc(var(--u) * 6);
    height: calc(var(--u) * 38);
    margin-bottom: calc(var(--u) * 10);
    border-radius: calc(var(--u) * 12);
    background: hsla(0, 0%, 100%, .08);
    box-shadow: inset 0 0 0 .5px hsla(0, 0%, 100%, .08);
    font-size: calc(var(--u) * 13);
}
.jx-window__new svg { width: calc(var(--u) * 15); height: calc(var(--u) * 15); }

.jx-window__nav { display: flex; align-items: center; height: calc(var(--u) * 40); padding: 0 calc(var(--u) * 8); gap: calc(var(--u) * 8); color: #e7e9ec; }
.jx-window__nav svg { width: calc(var(--u) * 16); height: calc(var(--u) * 16); flex: none; color: #adb2b8; }
.jx-window__nav.is-active { background: hsla(0, 0%, 100%, .06); border-radius: calc(var(--u) * 8); }
.jx-window__nav.is-active svg { color: #7aaaff; }

.jx-window__label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: calc(var(--u) * 36);
    padding: 0 calc(var(--u) * 8);
    margin: calc(var(--u) * 12) 0 calc(var(--u) * 4);
    color: #adb2b8;
    font-size: calc(var(--u) * 12);
    text-transform: uppercase;
    letter-spacing: .08em;
}

.jx-window__folder { display: flex; align-items: center; height: calc(var(--u) * 34); gap: calc(var(--u) * 6); padding: 0 calc(var(--u) * 8); white-space: nowrap; color: #e7e9ec; }
.jx-window__folder svg { width: calc(var(--u) * 16); height: calc(var(--u) * 16); color: #adb2b8; flex: none; }

.jx-window__account { flex: none; margin-top: auto; display: flex; align-items: center; gap: calc(var(--u) * 8); padding: calc(var(--u) * 12); }
.jx-window__avatar { display: flex; align-items: center; justify-content: center; width: calc(var(--u) * 32); height: calc(var(--u) * 32); border-radius: 50%; background: hsla(0, 0%, 100%, .06); color: #adb2b8; flex: none; }
.jx-window__avatar svg { width: calc(var(--u) * 17); height: calc(var(--u) * 17); }

.jx-window__main {
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    border-top-right-radius: inherit;
    border-bottom-right-radius: inherit;
    background: #151517;
}

.jx-window__main-bar {
    height: calc(var(--u) * 50);
    padding: 0 calc(var(--u) * 20);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: calc(var(--u) * 16);
    flex: none;
    box-shadow: inset 0 -.5px hsla(0, 0%, 100%, .1);
    color: #cfd3d6;
}
.jx-window__main-bar svg { width: calc(var(--u) * 16); height: calc(var(--u) * 16); }

.jx-window__conversation { flex: 1; min-height: 0; overflow: hidden; }
.jx-window__transcript { width: calc(100% - var(--u) * 48); max-width: calc(var(--u) * 730); margin: 0 auto; padding: calc(var(--u) * 24) 0; font-size: calc(var(--u) * 14); }

.jx-window__user {
    width: fit-content;
    max-width: 74%;
    margin: 0 0 calc(var(--u) * 26) auto;
    padding: calc(var(--u) * 10) calc(var(--u) * 16);
    border-radius: calc(var(--u) * 22);
    background: #2c2c2e;
    line-height: calc(var(--u) * 22);
}

.jx-window__analysis {
    display: flex;
    align-items: center;
    gap: calc(var(--u) * 4);
    padding-bottom: calc(var(--u) * 8);
    margin-bottom: calc(var(--u) * 10);
    border-bottom: .5px solid hsla(0, 0%, 100%, .12);
    font-size: calc(var(--u) * 13);
    color: #adb2b8;
}
.jx-window__analysis svg { width: calc(var(--u) * 14); height: calc(var(--u) * 14); transform: rotate(-90deg); }

.jx-window__reply { font-size: calc(var(--u) * 13.6); line-height: calc(var(--u) * 23); color: #e7e9ec; }
.jx-window__reply p { margin-bottom: calc(var(--u) * 14); }
.jx-window__reply p:last-child { margin-bottom: 0; }
.jx-window__reply ol { list-style: decimal; padding-left: calc(var(--u) * 19); }
.jx-window__reply li + li { margin-top: calc(var(--u) * 5); }
.jx-window__reply li::marker { color: #cfd3d6; }
.jx-window__reply strong { font-weight: 600; color: #fff; }
.jx-window__reply code { font-size: .92em; padding: 1px calc(var(--u) * 5); border-radius: 5px; background: hsla(0, 0%, 100%, .08); }

.jx-window__dock { width: calc(100% - var(--u) * 32); max-width: calc(var(--u) * 762); margin: 0 auto; padding: calc(var(--u) * 14) 0 calc(var(--u) * 18); flex: none; }
.jx-window__composer { padding: calc(var(--u) * 8); border-radius: calc(var(--u) * 22); background: #2c2c2e; box-shadow: 0 0 0 .5px hsla(0, 0%, 100%, .12), 0 4px 16px rgba(0, 0, 0, .06); }
.jx-window__placeholder { min-height: calc(var(--u) * 34); padding: calc(var(--u) * 4) calc(var(--u) * 6) 0; color: #81858c; font-size: calc(var(--u) * 14); line-height: 1.5; }

.jx-window__toolbar { display: flex; align-items: center; justify-content: space-between; gap: calc(var(--u) * 12); margin-top: calc(var(--u) * 10); font-size: calc(var(--u) * 13); color: #cfd3d6; }
.jx-window__tools { display: flex; align-items: center; gap: calc(var(--u) * 16); min-width: 0; }
.jx-window__tool { display: flex; align-items: center; gap: calc(var(--u) * 4); white-space: nowrap; }
.jx-window__tool svg { width: calc(var(--u) * 13); height: calc(var(--u) * 13); }
.jx-window__tool--muted { color: #81858c; }
.jx-window__add { display: flex; align-items: center; justify-content: center; width: calc(var(--u) * 28); height: calc(var(--u) * 28); border-radius: 50%; background: #353638; flex: none; }
.jx-window__add svg { width: calc(var(--u) * 15); height: calc(var(--u) * 15); }
.jx-window__send { display: flex; align-items: center; justify-content: center; width: calc(var(--u) * 34); height: calc(var(--u) * 34); border-radius: 50%; background: rgba(122, 170, 255, .4); color: rgba(249, 250, 251, .5); flex: none; }
.jx-window__send svg { width: calc(var(--u) * 19); height: calc(var(--u) * 19); }

/* ------------------------------------------------------------- sections */
.jx-section { padding: var(--space-11) 0; }
.jx-section--tight { padding: var(--space-10) 0; }
.jx-section--flush-top { padding-top: 0; }

.jx-section__head { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: var(--space-5); text-align: center; }
.jx-section__head--left { align-items: flex-start; text-align: left; margin: 0; }
.jx-section__title { max-width: 600px; }

.jx-grid { display: grid; gap: var(--space-6); }
.jx-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.jx-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.jx-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.jx-grid--cards { margin-top: var(--space-9); }

/* capability card */
.jx-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: var(--space-7) var(--space-7) 0;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-panel);
    background: var(--bg-surface-3);
    overflow: hidden;
}

.jx-card__copy { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); padding-bottom: var(--space-7); text-align: left; }
.jx-card__media {
    position: relative;
    margin-top: auto;
    overflow: hidden;
    border: 1px solid var(--border-default);
    border-bottom: 0;
    border-radius: var(--radius-media) var(--radius-media) 0 0;
    background: #101113;
}
.jx-card__media img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top center; }
.jx-card__media--flush { border-color: transparent; background: transparent; }
.jx-card__badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: var(--radius-pill);
    background: rgba(10, 10, 10, .62);
    border: 1px solid var(--border-subtle);
    backdrop-filter: blur(10px);
    font-size: 12px;
    color: var(--text-secondary);
}

/* code card */
.jx-code-card { display: flex; flex-direction: column; border: 1px solid var(--border-default); border-radius: var(--radius-panel); background: var(--bg-surface-3); }
.jx-code-card__body { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-7); }
.jx-code {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    margin-top: var(--space-2);
    padding: 12px 14px;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-input);
    background: var(--bg-code);
    font-size: 13.5px;
    line-height: 1.5;
}
.jx-code code { min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text-secondary); }
.jx-code code .prompt { color: var(--brand); user-select: none; }
.jx-code__copy { flex: none; font-size: 12px; color: var(--text-description); transition: color .2s ease; }
.jx-code__copy:hover { color: var(--text-primary); }

/* ------------------------------------------------------------------ CTA */
.jx-cta-wrap { position: relative; overflow: hidden; }
.jx-cta-wrap__glow { position: absolute; top: 40px; left: 0; width: 100%; height: 620px; pointer-events: none; z-index: 0; }
.jx-cta-wrap__glow span { position: absolute; border-radius: 50%; filter: blur(80px); }
.jx-cta-wrap__glow span:nth-child(1) { bottom: -120px; left: 4%; width: 540px; height: 520px; background: rgba(74, 122, 194, .46); }
.jx-cta-wrap__glow span:nth-child(2) { bottom: -80px; left: 50%; transform: translateX(-50%); width: 760px; height: 440px; background: rgba(103, 153, 254, .34); }
.jx-cta-wrap__glow span:nth-child(3) { bottom: -110px; right: 4%; width: 460px; height: 460px; background: rgba(143, 137, 184, .32); }

.jx-cta {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--space-10) 0 var(--space-10);
}
.jx-cta__text { max-width: 652px; margin-top: var(--space-5); color: var(--text-description); }
.jx-cta__actions { margin-top: var(--space-7); }

/* --------------------------------------------------------------- footer */
.jx-footer { padding-bottom: var(--space-6); }
.jx-footer__rule { width: 100%; height: 1px; background: var(--border-subtle); }
.jx-footer__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-4);
    padding-top: var(--space-5);
    text-align: center;
}
.jx-footer__links { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 12px; }
.jx-footer__links a { color: var(--text-primary); transition: opacity .2s ease; }
.jx-footer__links a:hover { opacity: .7; }
.jx-footer__links span { color: var(--text-description); }

/* ---------------------------------------------------------------- forms */
.jx-field { display: flex; flex-direction: column; gap: 6px; }
.jx-label { font-size: 13px; color: var(--text-description); }
.jx-input, .jx-select, .jx-textarea {
    width: 100%;
    padding: 11px 14px;
    border-radius: var(--radius-input);
    border: 1px solid var(--border-subtle);
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: 15px;
    line-height: 1.4;
    transition: border-color .2s ease, background-color .2s ease;
}
.jx-input::placeholder, .jx-textarea::placeholder { color: var(--text-placeholder); }
.jx-input:hover, .jx-select:hover, .jx-textarea:hover { background: var(--bg-input-hover); }
.jx-input:focus, .jx-select:focus, .jx-textarea:focus { outline: none; border-color: var(--border-strong); background: var(--bg-input-hover); }
.jx-textarea { min-height: 120px; resize: vertical; }
.jx-select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-description) 50%), linear-gradient(135deg, var(--text-description) 50%, transparent 50%); background-position: calc(100% - 18px) calc(50% - 2px), calc(100% - 13px) calc(50% - 2px); background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.jx-form-grid { display: grid; gap: var(--space-4); }
.jx-form-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.jx-hint { font-size: 13px; color: var(--text-description); }

/* ----------------------------------------------------------------- cards */
.jx-panel { border: 1px solid var(--border-default); border-radius: var(--radius-panel); background: var(--bg-surface-3); padding: var(--space-6); }
.jx-panel--raised { background: var(--bg-surface-2); }
.jx-panel__title { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-5); }

/* pricing */
.jx-price-grid { display: grid; gap: var(--space-5); grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; }
.jx-price {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    padding: var(--space-7);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-card);
    background: var(--bg-surface-3);
}
.jx-price--featured { border-color: hsla(0, 0%, 100%, .18); background: hsla(0, 0%, 100%, .045); box-shadow: var(--shadow-card); }
.jx-price__badge {
    align-self: flex-start;
    padding: 5px 10px;
    border-radius: var(--radius-pill);
    background: var(--brand-strong);
    color: #fff;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.jx-price__badge--muted { background: var(--bg-surface-5); color: var(--text-secondary); }
.jx-price__amount { font-family: var(--font-display); font-size: 38px; font-weight: 500; letter-spacing: -.02em; line-height: 1.1; }
.jx-price__amount small { font-family: var(--font-sans); font-size: 15px; font-weight: 400; color: var(--text-description); margin-left: 6px; }
.jx-price__note { font-size: 14px; color: var(--text-description); line-height: 1.55; }
.jx-price__list { list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: 15px; color: var(--text-secondary); }
.jx-price__list li { display: flex; gap: 9px; align-items: flex-start; }
.jx-price__list svg { width: 16px; height: 16px; flex: none; margin-top: 4px; color: var(--brand); }
.jx-price__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.jx-price__tags span { padding: 4px 9px; border-radius: var(--radius-sm); background: var(--bg-surface-1); font-size: 12px; color: var(--text-secondary); }
.jx-price__foot { margin-top: auto; display: flex; flex-direction: column; gap: var(--space-3); }

/* reviews */
.jx-review-grid { display: grid; gap: var(--space-5); grid-template-columns: repeat(3, minmax(0, 1fr)); }
.jx-review {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: var(--space-5);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-panel);
    background: var(--bg-surface-3);
}
.jx-review__stars { color: var(--state-warn); font-size: 14px; letter-spacing: 2px; }
.jx-review__name { font-size: 15px; font-weight: 600; }
.jx-review__text { font-size: 15px; color: var(--text-secondary); line-height: 1.6; }
.jx-review__handle { font-size: 13px; color: var(--text-description); }

/* news */
.jx-news { display: flex; flex-direction: column; }
.jx-news__row {
    display: grid;
    grid-template-columns: 120px 1fr auto;
    gap: var(--space-5);
    align-items: start;
    padding: var(--space-5) 0;
    border-top: 1px solid var(--border-subtle);
}
.jx-news__row time { font-family: var(--font-mono); font-size: 13px; color: var(--text-description); }
.jx-news__row h3 { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.jx-news__row p { font-size: 15px; color: var(--text-description); }
.jx-news__arrow { color: var(--text-description); }

/* ---------------------------------------------------------------- flash */
.jx-flashes { position: fixed; top: 74px; left: 50%; transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; gap: 8px; width: min(100% - 48px, 520px); }
.jx-flash {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius-input);
    border: 1px solid var(--border-subtle);
    background: var(--bg-overlay);
    box-shadow: 0 12px 32px rgba(0, 0, 0, .4);
    font-size: 14.5px;
    line-height: 1.5;
}
.jx-flash--success { border-color: rgba(78, 209, 126, .35); }
.jx-flash--danger { border-color: rgba(248, 113, 113, .35); }
.jx-flash--warning { border-color: rgba(247, 173, 49, .35); }

/* --------------------------------------------------------------- modals */
.jx-modal {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--space-5);
    background: rgba(0, 0, 0, .72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.jx-modal.is-open { display: flex; }
.jx-modal__box {
    position: relative;
    width: min(100%, 520px);
    max-height: min(88vh, 860px);
    overflow-y: auto;
    padding: var(--space-6);
    border-radius: var(--radius-card);
    border: 1px solid var(--border-subtle);
    background: #161617;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
}
.jx-modal__box--wide { width: min(100%, 720px); }
.jx-modal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-5); }
.jx-modal__close { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; border-radius: 50%; color: var(--text-description); }
.jx-modal__close:hover { background: var(--bg-hover); color: var(--text-primary); }
.jx-modal__close svg { width: 18px; height: 18px; }

/* plan switch + payment blocks (legacy ids reused) */
.jx-plan-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.jx-plan {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-input);
    background: var(--bg-surface-3);
    text-align: left;
    transition: border-color .2s ease, background-color .2s ease;
}
.jx-plan:hover { border-color: var(--border-hover); }
.jx-plan.is-active { border-color: var(--brand); background: hsla(215, 100%, 70%, .1); }
.jx-plan strong { font-size: 15px; }
.jx-plan span { font-size: 13px; color: var(--text-description); }

/* --------------------------------------------------- data tables / lists */
.jx-table-wrap { border: 1px solid var(--border-default); border-radius: var(--radius-panel); overflow: hidden; background: var(--bg-surface-3); }
.jx-table { width: 100%; font-size: 14.5px; }
.jx-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--text-description);
    border-bottom: 1px solid var(--border-subtle);
    white-space: nowrap;
}
.jx-table td { padding: 12px 16px; border-bottom: 1px solid var(--border-subtle); vertical-align: middle; }
.jx-table tr:last-child td { border-bottom: 0; }
.jx-table tbody tr:hover { background: var(--bg-hover); }

.jx-stat-grid { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.jx-stat { padding: var(--space-5); border: 1px solid var(--border-default); border-radius: var(--radius-panel); background: var(--bg-surface-3); }
.jx-stat strong { display: block; font-family: var(--font-display); font-size: 30px; font-weight: 500; letter-spacing: -.02em; }
.jx-stat span { font-size: 13px; color: var(--text-description); }

.jx-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    line-height: 1.5;
    background: var(--bg-surface-5);
    color: var(--text-secondary);
}
.jx-badge--success { background: rgba(78, 209, 126, .14); color: #86e8ab; }
.jx-badge--warn { background: rgba(247, 173, 49, .14); color: #f7c877; }
.jx-badge--error { background: rgba(248, 113, 113, .14); color: #ffb4b4; }
.jx-badge--brand { background: hsla(215, 100%, 70%, .16); color: #a9c4ff; }

/* legacy badge names (cabinet.js creates .pill.off dynamically) */
.pill, .pill.ok, .pill.off, .pill.wait {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 11px;
    border-radius: var(--radius-pill);
    font-size: 12.5px;
    line-height: 1.5;
    background: var(--bg-surface-5);
    color: var(--text-secondary);
}
.pill.ok { background: rgba(78, 209, 126, .14); color: #86e8ab; }
.pill.off { background: rgba(248, 113, 113, .14); color: #ffb4b4; }
.pill.wait { background: rgba(247, 173, 49, .14); color: #f7c877; }

.jx-empty { padding: var(--space-8) var(--space-5); text-align: center; color: var(--text-description); }

/* --------------------------------------------------------------- legal */
.jx-legal { max-width: 960px; margin-inline: auto; padding: var(--space-10) 0 var(--space-10); }
.jx-legal__body { color: var(--text-secondary); font-size: 16px; line-height: 1.9; }
.jx-legal__body h1 { font-family: var(--font-display); font-size: 32px; font-weight: 500; letter-spacing: -.02em; line-height: 1.25; color: var(--text-primary); margin-bottom: 6px; }
.jx-legal__body h2, .jx-legal__body h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -.015em; line-height: 1.45; color: var(--text-primary); }
.jx-legal__body > * + * { margin-top: 16px; }
.jx-legal__body h2 { font-size: 24px; margin-top: 56px; margin-bottom: 16px; }
.jx-legal__body h3 { font-size: 20px; margin-top: 32px; }
.jx-legal__body ul { list-style: disc; padding-left: 1.4em; }
.jx-legal__body ol { list-style: decimal; padding-left: 1.4em; }
.jx-legal__body li + li { margin-top: 8px; }
.jx-legal__body a { color: var(--brand); }
.jx-legal__body a:hover { text-decoration: underline; }

/* ---------------------------------------------------------- page titles */
.jx-page-head { padding: var(--space-11) 0 var(--space-7); text-align: center; }
.jx-page-head--left { text-align: left; }
.jx-page-head__sub { margin-top: var(--space-4); color: var(--text-description); max-width: 640px; }
.jx-page-head--center .jx-page-head__sub { margin-inline: auto; }

/* ------------------------------------------------------------ utilities */
.jx-stack { display: flex; flex-direction: column; }
.jx-stack--2 { gap: var(--space-2); }
.jx-stack--3 { gap: var(--space-3); }
.jx-stack--4 { gap: var(--space-4); }
.jx-stack--5 { gap: var(--space-5); }
.jx-stack--6 { gap: var(--space-6); }
.jx-stack--7 { gap: var(--space-7); }
.jx-row { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.jx-row--between { justify-content: space-between; }
.jx-row--end { justify-content: flex-end; }
.jx-mt-2 { margin-top: var(--space-2); }
.jx-mt-4 { margin-top: var(--space-4); }
.jx-mt-5 { margin-top: var(--space-5); }
.jx-mt-6 { margin-top: var(--space-6); }
.jx-mt-7 { margin-top: var(--space-7); }
.jx-mt-9 { margin-top: var(--space-9); }
.jx-hidden { display: none !important; }
.jx-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.jx-reveal { opacity: 0; transform: translateY(30px); transition: opacity .7s ease-out, transform .7s ease-out; }
.jx-reveal.is-visible { opacity: 1; transform: none; }

.jx-divider { height: 1px; width: 100%; background: var(--border-subtle); }

/* --------------------------------------------------------- responsive */
@media (max-width: 1100px) {
    .jx-price-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .jx-review-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
    .jx-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .jx-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .jx-header__nav { display: none; }
    .jx-burger { display: flex; }
}

@media (max-width: 760px) {
    :root { --space-11: 110px; --space-10: 84px; --space-9: 56px; }
    .jx-container, .jx-container--wide, .jx-container--narrow { width: calc(100% - 32px); }
    .jx-header { width: calc(100% - 32px); }
    .jx-h1 { font-size: 30px; }
    .jx-h2 { font-size: 24px; }
    .jx-grid--2, .jx-grid--3, .jx-grid--4 { grid-template-columns: minmax(0, 1fr); }
    .jx-price-grid, .jx-review-grid { grid-template-columns: minmax(0, 1fr); }
    .jx-form-grid--2 { grid-template-columns: minmax(0, 1fr); }
    .jx-card { padding: var(--space-5) var(--space-5) 0; }
    .jx-code-card__body { padding: var(--space-5); }
    .jx-window { height: auto; min-height: 380px; }
    .jx-window__sidebar { display: none; }
    .jx-window__conversation { overflow: visible; }
    .jx-window__transcript { padding: calc(var(--u) * 20) 0 calc(var(--u) * 10); }
    .jx-news__row { grid-template-columns: 1fr; gap: var(--space-2); }
    .jx-news__arrow { display: none; }
    .jx-hero { padding-top: 120px; }
    .jx-forum, .jx-cab { padding-top: 108px; }
    .jx-topic { grid-template-columns: minmax(0, 1fr); gap: var(--space-3); padding: 16px var(--space-5); }
    .jx-topic__side { align-items: flex-start; text-align: left; min-width: 0; }
    .jx-post { padding: var(--space-5); }
    .jx-search { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
    html { scroll-behavior: auto; }
}

/* ==========================================================================
   Legacy modal markup (kept class names: the existing landing.js drives it)
   ========================================================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--space-5);
    background: rgba(0, 0, 0, .72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.modal-overlay.open { display: flex; }

.modal-dialog {
    position: relative;
    width: min(100%, 520px);
    max-height: min(88vh, 900px);
    overflow-y: auto;
    padding: var(--space-6);
    border-radius: var(--radius-card);
    border: 1px solid var(--border-subtle);
    background: #161617;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
    text-align: left;
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 22px;
    line-height: 1;
    color: var(--text-description);
}

.modal-close:hover { background: var(--bg-hover); color: var(--text-primary); }
.modal-sub { margin-top: 6px; font-size: 14px; color: var(--text-description); }

.modal-download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin: var(--space-4) 0;
    padding: 12px 18px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-subtle);
    background: var(--bg-surface-1);
    font-size: 15px;
    font-weight: 500;
    transition: background-color .2s ease, border-color .2s ease;
}

.modal-download-btn:hover { background: var(--bg-surface-5); border-color: var(--border-hover); }
.modal-download-btn em { font-style: normal; }

.modal-steps { display: flex; flex-direction: column; gap: 8px; margin-bottom: var(--space-5); }
.modal-steps .step { display: flex; gap: 10px; font-size: 14px; color: var(--text-description); line-height: 1.5; }
.modal-steps .step span {
    flex: none;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg-surface-5);
    color: var(--text-secondary);
    font-size: 11px;
    margin-top: 1px;
}
.modal-steps .step strong { color: var(--text-primary); font-weight: 600; }

.modal-username-section { display: flex; flex-direction: column; gap: 10px; }
.modal-username-label { font-size: 13px; color: var(--text-description); }
.modal-input-row { display: flex; align-items: center; gap: 8px; }
.modal-at { color: var(--text-description); }

.modal-input {
    flex: 1;
    min-width: 0;
    padding: 11px 14px;
    border-radius: var(--radius-input);
    border: 1px solid var(--border-subtle);
    background: var(--bg-input);
    font-size: 15px;
}

.modal-input:focus { outline: none; border-color: var(--border-strong); background: var(--bg-input-hover); }
.modal-note { font-size: 12.5px; color: var(--text-placeholder); line-height: 1.5; }
.modal-plans { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }

.plan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.plan-option {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 14px;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-input);
    background: var(--bg-surface-3);
    cursor: pointer;
    transition: border-color .2s ease, background-color .2s ease;
}

.plan-option:hover { border-color: var(--border-hover); }
.plan-option.active { border-color: var(--brand); background: hsla(215, 100%, 70%, .1); }
.plan-option b { font-size: 17px; font-weight: 600; }
.plan-option span { font-size: 13px; color: var(--text-description); }
.plan-option small { font-size: 11px; color: var(--text-placeholder); }
.modal-price { margin-top: 12px; text-align: center; font-family: var(--font-display); font-size: 24px; font-weight: 600; letter-spacing: -.02em; }

.modal-submit-btn {
    width: 100%;
    margin-top: 12px;
    padding: 12px 18px;
    border-radius: var(--radius-pill);
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    font-size: 15px;
    font-weight: 500;
    transition: opacity .2s ease;
}

.modal-submit-btn:hover { opacity: .88; }
.modal-submit-btn:disabled { opacity: .5; cursor: default; }
.modal-submit-btn--inline { width: auto; margin: 0; padding: 11px 14px; flex: none; }
.modal-submit-btn--ghost { background: var(--bg-surface-5); color: var(--text-primary); }
.modal-status { min-height: 18px; font-size: 13px; color: var(--text-description); text-align: center; }

.jx-hidden-mobile { display: inline; }
@media (max-width: 760px) { .jx-hidden-mobile { display: none; } }

/* --------------------------------------------------------------- forum */
.jx-forum { padding-top: 132px; padding-bottom: var(--space-10); }
.jx-forum-head { margin-bottom: var(--space-7); }

.jx-forum-stats { display: flex; flex-wrap: wrap; gap: var(--space-7); margin-top: var(--space-5); }
.jx-forum-stats > div { display: flex; align-items: baseline; gap: 8px; }
.jx-forum-stats strong { font-family: var(--font-display); font-size: 26px; font-weight: 500; letter-spacing: -.02em; }
.jx-forum-stats span { font-size: 13.5px; color: var(--text-description); }

.jx-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-4);
    margin-bottom: var(--space-5);
}

.jx-search { display: flex; flex-wrap: nowrap; align-items: center; gap: 10px; flex: 0 1 440px; min-width: 0; }
.jx-search .jx-input { flex: 1 1 auto; width: auto; min-width: 0; }

.jx-topics {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-panel);
    background: var(--bg-surface-3);
    overflow: hidden;
}

.jx-topic {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: var(--space-5);
    padding: 18px var(--space-6);
    border-bottom: 1px solid var(--border-subtle);
    transition: background-color .2s ease;
}
.jx-topic:last-child { border-bottom: 0; }
.jx-topic:hover { background: var(--bg-hover); }

.jx-topic__title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.jx-topic__meta { margin-top: 6px; font-size: 13px; color: var(--text-description); }
.jx-topic__side { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; text-align: right; min-width: 168px; }
.jx-topic__replies { font-size: 13.5px; color: var(--text-secondary); }
.jx-topic__replies b { color: var(--text-primary); font-weight: 600; }
.jx-topic__last { font-size: 12.5px; color: var(--text-placeholder); }

.jx-crumbs { display: flex; align-items: center; gap: 8px; margin-bottom: var(--space-5); font-size: 13.5px; color: var(--text-description); }
.jx-crumbs a:hover { color: var(--text-primary); }

.jx-posts { margin-top: var(--space-5); }
.jx-post {
    padding: var(--space-6);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-panel);
    background: var(--bg-surface-3);
}
.jx-post + .jx-post { margin-top: var(--space-4); }
.jx-post--head {
    background:
        radial-gradient(120% 160% at 0% 0%, rgba(74, 122, 194, .16) 0%, rgba(10, 10, 10, 0) 60%),
        var(--bg-surface-3);
}
.jx-post__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: var(--space-4); font-size: 13.5px; color: var(--text-description); }
.jx-post__head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--space-3); margin-bottom: var(--space-4); }
.jx-post__author { font-size: 15px; font-weight: 600; }
.jx-post__head time { font-size: 13px; color: var(--text-description); }
.jx-post__body { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text-secondary); font-size: 15px; line-height: 1.7; }
.jx-post--head .jx-post__body { color: var(--text-primary); font-size: 15.5px; }

.jx-attachments { display: flex; flex-wrap: wrap; gap: 8px; margin-top: var(--space-4); }
.jx-file-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-subtle);
    background: var(--bg-surface-1);
    font-size: 13px;
    transition: border-color .2s ease;
}
.jx-file-chip:hover { border-color: var(--border-hover); }
.jx-file-chip span { color: var(--text-description); }

.jx-span-2 { grid-column: 1 / -1; }
.jx-form-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--space-4); }
.jx-form-grid input[type="file"] { padding: 9px 12px; font-size: 13.5px; color: var(--text-description); }

/* ------------------------------------------------------------- cabinet */
.jx-cab { padding-top: 132px; padding-bottom: var(--space-10); }
.jx-cab__head { margin-bottom: var(--space-7); }

.jx-cab-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-6);
    padding: var(--space-7);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-card);
    background:
        radial-gradient(120% 160% at 0% 0%, rgba(74, 122, 194, .20) 0%, rgba(10, 10, 10, 0) 60%),
        var(--bg-surface-3);
}

.jx-cab-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    flex: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #4d6bfe, #2a4a86);
    color: #fff;
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 600;
    box-shadow: 0 0 0 1px hsla(0, 0%, 100%, .16), 0 8px 24px rgba(0, 0, 0, .35);
}

.jx-cab-ident { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1 1 220px; }
.jx-cab-name { font-family: var(--font-display); font-size: 22px; font-weight: 500; letter-spacing: -.01em; }
.jx-cab-user { font-size: 14px; color: var(--text-description); }
.jx-cab-pills { display: flex; flex-wrap: wrap; gap: 8px; }

.jx-cab-count { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; margin-left: auto; text-align: right; }
.jx-cab-count strong { font-family: var(--font-display); font-size: 46px; font-weight: 500; letter-spacing: -.03em; line-height: 1; }
.jx-cab-count span { font-size: 13px; color: var(--text-description); }

.jx-cab-progress { margin-top: var(--space-6); }
.jx-cab-progress__bar { height: 8px; border-radius: 999px; background: var(--bg-surface-5); overflow: hidden; }
.jx-cab-progress__bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #4d6bfe, #6799fe); transition: width .5s ease; }
.jx-cab-progress__meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 12px; font-size: 13px; color: var(--text-description); }
.jx-cab-progress__meta b { color: var(--text-secondary); font-weight: 500; }

.jx-cab-stats { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-top: var(--space-5); }
.jx-cab-stat { padding: var(--space-5); border: 1px solid var(--border-default); border-radius: var(--radius-panel); background: var(--bg-surface-3); }
.jx-cab-stat span { display: block; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--text-description); }
.jx-cab-stat strong { display: block; margin-top: 8px; font-size: 17px; font-weight: 500; }

.jx-seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: var(--radius-pill); border: 1px solid var(--border-default); background: var(--bg-surface-3); }
.jx-seg button { padding: 6px 13px; border-radius: var(--radius-pill); font-size: 13.5px; color: var(--text-description); transition: background-color .2s ease, color .2s ease; }
.jx-seg button:hover { color: var(--text-primary); }
.jx-seg button.active { background: hsla(0, 0%, 100%, .14); color: var(--text-primary); }

.jx-chart { position: relative; height: 300px; margin-top: var(--space-5); }
.jx-chart canvas { width: 100% !important; }
.jx-chart__empty {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-description);
    font-size: 14px;
    line-height: 1.6;
}

.jx-cab-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: var(--space-5); }

.jx-danger {
    margin-top: var(--space-5);
    padding: var(--space-5);
    border: 1px solid rgba(248, 113, 113, .22);
    border-radius: var(--radius-panel);
    background: rgba(248, 113, 113, .05);
}
.jx-danger p { font-size: 14px; color: var(--text-description); line-height: 1.6; }
.jx-danger strong { color: var(--text-primary); }

.jx-login-card { width: min(100%, 460px); margin: var(--space-7) auto 0; text-align: center; }
.jx-login-card .jx-btn, .jx-login-card .tg-fallback { margin-top: var(--space-4); }
.jx-tg-widget { display: flex; justify-content: center; margin: var(--space-5) 0; min-height: 48px; }

/* ================================================================ admin */
:root { color-scheme: dark; }

.jx-admin { display: flex; min-height: 100vh; align-items: flex-start; }

.jx-admin__side {
    position: sticky;
    top: 0;
    flex: none;
    display: flex;
    flex-direction: column;
    width: 272px;
    height: 100vh;
    padding: 22px 14px 18px;
    border-right: 1px solid var(--border-subtle);
    background: #0d0d0e;
    overflow-y: auto;
}

.jx-admin__brand { display: flex; align-items: center; gap: 10px; padding: 0 10px; }
.jx-admin__brand img { border-radius: 9px; box-shadow: 0 0 0 1px hsla(0, 0%, 100%, .12); flex: none; }
.jx-admin__brand span { font-family: var(--font-display); font-size: 15px; letter-spacing: .08em; }
.jx-admin__brand b { font-weight: 600; }
.jx-admin__brand em { font-style: normal; font-size: 11px; color: var(--text-description); }
.jx-admin__caption { padding: 0 10px; margin-top: 7px; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-placeholder); }

.jx-admin__nav { display: flex; flex-direction: column; gap: 2px; margin-top: 18px; }
.jx-admin__group { padding: 16px 10px 6px; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-placeholder); }

.jx-admin__tab {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 10px;
    font-size: 14px;
    color: var(--text-secondary);
    transition: background-color .18s ease, color .18s ease, box-shadow .18s ease;
}
.jx-admin__tab:hover { background: var(--bg-hover); color: var(--text-primary); }
.jx-admin__tab.is-active { background: hsla(215, 100%, 70%, .14); color: #fff; box-shadow: inset 0 0 0 1px hsla(215, 100%, 70%, .26); }
.jx-admin__ico { width: 18px; flex: none; text-align: center; font-size: 14px; color: var(--text-description); }
.jx-admin__tab.is-active .jx-admin__ico { color: var(--brand); }
.jx-admin__count { margin-left: auto; padding: 1px 8px; border-radius: 999px; background: hsla(215, 100%, 70%, .2); color: #a9c4ff; font-size: 11.5px; font-weight: 600; }

.jx-admin__foot { margin-top: auto; padding-top: 20px; display: flex; flex-direction: column; gap: 8px; }

.jx-admin__main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.jx-admin__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-5);
    padding: 38px 40px 22px;
    border-bottom: 1px solid var(--border-subtle);
}
.jx-admin__status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 13px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-default);
    background: var(--bg-surface-3);
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
}
.jx-admin__status i { width: 7px; height: 7px; border-radius: 50%; background: var(--state-success); box-shadow: 0 0 0 3px rgba(78, 209, 126, .16); }
.jx-admin__content { padding: 26px 40px 80px; }
.jx-admin__content.jx-legacy { padding-top: 26px; padding-bottom: 80px; font-size: 14.5px; }

/* admin login */
.jx-auth { min-height: 100vh; display: grid; place-items: center; padding: 40px 20px; }
.jx-auth__card {
    width: min(100%, 420px);
    padding: 40px;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-card);
    background:
        radial-gradient(120% 140% at 50% 0%, rgba(74, 122, 194, .18) 0%, rgba(10, 10, 10, 0) 62%),
        var(--bg-surface-3);
    text-align: center;
}
.jx-auth__logo { margin: 0 auto 20px; border-radius: 15px; box-shadow: 0 0 0 1px hsla(0, 0%, 100%, .12), 0 14px 34px rgba(0, 0, 0, .45); }
.jx-auth__card form { text-align: left; }

@media (max-width: 1000px) {
    .jx-admin { flex-direction: column; }
    .jx-admin__side { position: static; width: auto; height: auto; border-right: 0; border-bottom: 1px solid var(--border-subtle); }
    .jx-admin__nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
    .jx-admin__foot { flex-direction: row; }
    .jx-admin__head, .jx-admin__content, .jx-admin__content.jx-legacy { padding-left: 20px; padding-right: 20px; }
    .jx-admin__head { padding-top: 26px; }
}

/* ------------------------------------------------------------- countdown */
.jx-countdown { display: flex; align-items: center; gap: 10px; }
.jx-countdown > div { display: flex; flex-direction: column; align-items: center; min-width: 62px; padding: 10px 8px; border: 1px solid var(--border-default); border-radius: var(--radius-input); background: var(--bg-surface-3); }
.jx-countdown strong { font-family: var(--font-display); font-size: 26px; font-weight: 500; letter-spacing: -.02em; line-height: 1.1; }
.jx-countdown small { font-size: 11px; color: var(--text-description); }
.jx-countdown i { font-style: normal; color: var(--text-placeholder); }

/* ------------------------------------------------------- admin overrides */
.jx-admin-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding: var(--space-3) 0; }
.jx-admin-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: var(--space-4) 0; }
.jx-admin-tab { padding: 7px 13px; border-radius: var(--radius-pill); border: 1px solid var(--border-default); background: var(--bg-surface-3); font-size: 13.5px; color: var(--text-secondary); }
.jx-admin-tab:hover { border-color: var(--border-hover); color: var(--text-primary); }
.jx-admin-tab.is-active { background: hsla(0, 0%, 100%, .12); color: var(--text-primary); border-color: var(--border-hover); }
.jx-admin-section { margin-top: var(--space-6); }
.jx-admin-section > h2 { font-size: 18px; font-weight: 600; margin-bottom: var(--space-4); }
