/*
 * Xavier design system.
 *
 * Xavier indigo, in two appearances. Dark is the night sky: deep navy with
 * indigo, violet and cyan light drifting through it, on every page. Light is
 * its dawn: the same aurora and grid, washed pale. Every colour is a token
 * written as light-dark(light, dark), so one set of rules serves both; the
 * page follows the system unless the visitor picks one in the footer, which
 * sets data-theme on <html> (layout/site.html). Every loop holds still under
 * Reduce Motion, and scenes only run while they are on screen (xavier.js).
 * Class names are prefixed x-.
 */

/* MARK: - Tokens */

:root {
    color-scheme: light dark;

    --accent: light-dark(#4f46e5, #818cf8);
    --accent-rgb: 99 102 241;
    --accent-hover: light-dark(#4338ca, #a5b4fc);
    --accent-soft: light-dark(#eef2ff, rgba(129, 140, 248, 0.12));
    --cyan: #06b6d4;
    --violet: #8b5cf6;
    --ok: light-dark(#10b981, #34d399);
    --warn: light-dark(#f59e0b, #fbbf24);
    --danger: light-dark(#ef4444, #f87171);
    --ok-ink: light-dark(#047857, #6ee7b7);
    --warn-ink: light-dark(#b45309, #fcd34d);
    --danger-ink: light-dark(#b91c1c, #fca5a5);

    --bg: light-dark(#f6f7fc, #060816);
    --surface: light-dark(#ffffff, #0d1022);
    --surface-2: light-dark(#f1f3fa, #12162c);
    --ink: light-dark(#0b1023, #eef0ff);
    --ink-2: light-dark(rgba(11, 16, 35, 0.66), rgba(226, 230, 255, 0.68));
    --ink-3: light-dark(rgba(11, 16, 35, 0.45), rgba(226, 230, 255, 0.45));
    --line: light-dark(rgba(11, 16, 35, 0.09), rgba(165, 180, 252, 0.12));
    --field: light-dark(#ffffff, rgba(255, 255, 255, 0.03));
    --field-line: light-dark(rgba(11, 16, 35, 0.16), rgba(165, 180, 252, 0.22));
    --toolbar: light-dark(rgba(255, 255, 255, 0.72), rgba(6, 8, 22, 0.72));
    --shadow: 0 1px 2px light-dark(rgba(11, 16, 35, 0.06), rgba(0, 0, 0, 0.5)), 0 4px 16px -6px light-dark(rgba(11, 16, 35, 0.10), transparent), 0 0 0 1px light-dark(transparent, rgba(165, 180, 252, 0.08));
    --shadow-lg: 0 40px 80px -30px light-dark(rgba(30, 27, 110, 0.35), rgba(0, 0, 0, 0.9)), 0 2px 8px light-dark(rgba(11, 16, 35, 0.06), transparent), 0 0 0 1px light-dark(transparent, rgba(165, 180, 252, 0.10));

    /* The band: the hero, the dark sections and the footer. Night in dark,
       dawn in light. */
    --night: light-dark(#eceefc, #060816);
    --night-2: light-dark(#e2e5fa, #0c1030);
    --night-raised: light-dark(#ffffff, #10143a);
    --night-ink: light-dark(#0b1023, #eef0ff);
    --night-ink-2: light-dark(rgba(11, 16, 35, 0.66), rgba(226, 230, 255, 0.68));
    --night-ink-3: light-dark(rgba(11, 16, 35, 0.48), rgba(199, 210, 254, 0.55));
    --night-line: light-dark(rgba(79, 70, 229, 0.16), rgba(165, 180, 252, 0.16));
    --night-accent: light-dark(#4f46e5, #a5b4fc);
    --night-soft: light-dark(#4338ca, #c7d2fe);
    --night-glass: light-dark(rgba(255, 255, 255, 0.78), rgba(15, 18, 48, 0.78));
    --night-glass-line: light-dark(rgba(79, 70, 229, 0.18), rgba(165, 180, 252, 0.22));
    --night-card: light-dark(rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.035));
    --night-hover: light-dark(rgba(79, 70, 229, 0.07), rgba(255, 255, 255, 0.08));
    --night-drop: light-dark(rgba(30, 27, 110, 0.18), rgba(0, 0, 0, 0.8));
    --aurora-1: light-dark(rgba(129, 140, 248, 0.55), #4f46e5);
    --aurora-2: light-dark(rgba(196, 181, 253, 0.6), #7c3aed);
    --aurora-3: light-dark(rgba(103, 232, 249, 0.5), #0891b2);
    --grid-line: light-dark(rgba(79, 70, 229, 0.08), rgba(165, 180, 252, 0.07));

    --gradient: linear-gradient(110deg, light-dark(#4f46e5, #a5b4fc) 0%, light-dark(#6366f1, #818cf8) 30%, light-dark(#7c3aed, #6366f1) 55%, light-dark(#0891b2, #22d3ee) 100%);
    --gradient-solid: linear-gradient(135deg, #6366f1, #4f46e5 55%, #0ea5e9);

    /* The console replica keeps the console's own palette (Layout.tsx) */
    --app-bg: light-dark(#f9fafb, #111827);
    --app-card: light-dark(#ffffff, #1f2937);
    --app-border: light-dark(#e5e7eb, #374151);
    --app-ink: light-dark(#111827, #f9fafb);
    --app-ink-2: light-dark(#6b7280, #9ca3af);
    --app-ink-3: light-dark(#9ca3af, #6b7280);
    --app-primary: light-dark(#4f46e5, #818cf8);
    --app-primary-soft: light-dark(#eef2ff, rgba(99, 102, 241, 0.18));
    --app-btn: light-dark(#f3f4f6, #374151);
    --app-green: light-dark(#15803d, #4ade80);
    --app-green-soft: light-dark(#dcfce7, rgba(34, 197, 94, 0.16));
    --app-amber: light-dark(#b45309, #fbbf24);
    --app-amber-soft: light-dark(#fef3c7, rgba(245, 158, 11, 0.16));
    --app-red: light-dark(#dc2626, #f87171);
    --app-red-soft: light-dark(#fee2e2, rgba(239, 68, 68, 0.16));

    --font: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

    --radius: 18px;
    --radius-sm: 12px;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

/* The few things that are not colours: which logo shows */
.x-logo-night { display: none !important; }
:root[data-theme="dark"] .x-logo-night { display: block !important; }
:root[data-theme="dark"] .x-logo-ink { display: none !important; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .x-logo-night { display: block !important; }
    :root:not([data-theme="light"]) .x-logo-ink { display: none !important; }
}

/* MARK: - Base */

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }
body.x-page {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
    /* The footer sits at the bottom of the window on short pages */
    display: flex; flex-direction: column; min-height: 100vh;
}
body.x-page > main { flex: 1 0 auto; }
.x-page *, .x-page *::before, .x-page *::after { box-sizing: border-box; }
.x-page h1, .x-page h2, .x-page h3, .x-page p { margin: 0; }
:where(.x-page) a { color: inherit; text-decoration: none; }
.x-page img { max-width: 100%; height: auto; display: block; }
.x-page ::selection { background: rgb(var(--accent-rgb) / 0.28); }
.x-page :focus-visible { outline: 3px solid rgb(var(--accent-rgb) / 0.55); outline-offset: 3px; border-radius: 8px; }

.x-container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.x-narrow { max-width: 860px; }
.x-icon { width: 1em; height: 1em; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.125em; }
.x-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* MARK: - Type */

.x-display { font-size: clamp(42px, 6vw, 82px); line-height: 0.98; font-weight: 700; letter-spacing: -0.045em; }
.x-h2 { font-size: clamp(34px, 4.8vw, 60px); line-height: 1.02; font-weight: 700; letter-spacing: -0.035em; }
.x-h3 { font-size: 19px; line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; }
.x-lead { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.5; color: var(--ink-2); }
.x-muted { color: var(--ink-2); }
.x-kicker {
    display: inline-flex; align-items: center; gap: 10px;
    font: 500 12.5px/1 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--accent);
}
.x-kicker::before { content: ""; width: 22px; height: 1px; background: currentColor; opacity: 0.6; }
.x-display .x-gradient-text { display: block; }
.x-gradient-text {
    background: var(--gradient); background-size: 200% auto;
    -webkit-background-clip: text; background-clip: text;
    color: transparent; -webkit-text-fill-color: transparent;
    animation: x-pan 8s var(--ease-in-out) infinite alternate;
}
@keyframes x-pan { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }

/* MARK: - Buttons */

.x-btn {
    position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    height: 52px; padding: 0 26px; border: 0; border-radius: 999px;
    font: 600 16px/1 var(--font); white-space: nowrap; cursor: pointer;
    transition: transform 0.3s var(--ease-spring), box-shadow 0.3s ease, background-color 0.2s ease, color 0.2s ease;
}
.x-btn:active { transform: scale(0.97); }
.x-btn .x-icon { transition: transform 0.3s var(--ease-spring); }
.x-btn:hover .x-icon { transform: translateX(3px); }
html[dir="rtl"] .x-btn .x-icon { transform: scaleX(-1); }
html[dir="rtl"] .x-btn:hover .x-icon { transform: scaleX(-1) translateX(3px); }
.x-btn-primary { background: #4f46e5; color: #fff; box-shadow: 0 10px 30px -8px rgba(79, 70, 229, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.2); }
.x-btn-primary:hover { background: #5b52f0; box-shadow: 0 16px 40px -10px rgba(99, 102, 241, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.x-btn-ghost { background: var(--night-hover); color: var(--night-ink); box-shadow: inset 0 0 0 1px var(--night-glass-line); }
.x-btn-ghost:hover { background: light-dark(rgba(79, 70, 229, 0.12), rgba(255, 255, 255, 0.12)); }
.x-btn-quiet { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.x-btn-quiet:hover { box-shadow: var(--shadow-lg); }
.x-btn-sm { height: 38px; padding: 0 16px; font-size: 14px; }
.x-link { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-weight: 600; }
.x-link .x-icon { transition: transform 0.3s var(--ease-spring); }
.x-link:hover .x-icon { transform: translateX(3px); }
html[dir="rtl"] .x-link .x-icon { transform: scaleX(-1); }

/* MARK: - Navigation
   Transparent over the band, frosted glass once the page scrolls. Pages
   that open without a band set x-nav-solid on <body>, so it starts frosted. */

.x-nav { position: fixed; inset: 0 0 auto 0; z-index: 50; transition: background-color 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease; }
.x-nav-inner { display: flex; align-items: center; gap: 28px; height: 68px; }
.x-brand { display: inline-flex; align-items: center; }
.x-brand img { height: 30px; width: auto; }
.x-nav-links { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }
.x-nav-links a:not(.x-btn) {
    padding: 8px 12px; border-radius: 999px; font-size: 14.5px; font-weight: 500;
    color: var(--night-ink-2); transition: color 0.2s ease, background-color 0.2s ease;
}
.x-nav-links a:not(.x-btn):hover { color: var(--night-ink); background: var(--night-hover); }
.x-nav-links a[aria-current="page"] { color: var(--night-ink); }
.x-nav-links .x-btn { margin-inline-start: 10px; }
.x-nav-links .x-nav-demo { color: var(--night-soft) !important; }
.x-nav-toggle { display: none; }

.x-nav.is-scrolled, .x-nav-solid .x-nav { background: var(--toolbar); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); box-shadow: 0 1px 0 var(--line); }
.x-nav-solid main { padding-top: 68px; }

@media (max-width: 900px) {
    .x-nav-toggle {
        display: inline-flex; align-items: center; justify-content: center; margin-inline-start: auto;
        width: 44px; height: 44px; border: 0; border-radius: 999px; background: transparent;
        color: var(--night-ink); font-size: 22px; cursor: pointer;
    }
    .x-nav-links {
        position: absolute; top: 68px; inset-inline: 12px; margin: 0;
        flex-direction: column; align-items: stretch; gap: 2px; padding: 10px;
        background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-lg);
        display: none;
    }
    .x-nav-links.is-open { display: flex; animation: x-rise 0.4s var(--ease-out) both; }
    .x-nav-links a:not(.x-btn) { color: var(--ink-2) !important; padding: 12px 14px; font-size: 16px; }
    .x-nav-links a[aria-current="page"] { color: var(--accent) !important; }
    .x-nav-links .x-btn { margin: 8px 0 0; }
}

/* MARK: - The band (hero and feature sections): night in dark, dawn in light */

.x-night { position: relative; isolation: isolate; overflow: hidden; background: var(--night); color: var(--night-ink); }
.x-night .x-lead, .x-night .x-muted { color: var(--night-ink-2); }
.x-night .x-kicker { color: var(--night-accent); }

/* Aurora: indigo, violet and cyan light drifting behind the night */
.x-aurora { position: absolute; inset: 0; z-index: -2; pointer-events: none; }
.x-aurora i { position: absolute; border-radius: 50%; filter: blur(90px); opacity: light-dark(0.7, 0.55); animation: x-drift 18s var(--ease-in-out) infinite alternate; }
.x-aurora i:nth-child(1) { width: 60vw; height: 60vw; max-width: 820px; max-height: 820px; inset-inline-start: -18%; top: -30%; background: radial-gradient(circle, var(--aurora-1), transparent 65%); }
.x-aurora i:nth-child(2) { width: 46vw; height: 46vw; max-width: 640px; max-height: 640px; inset-inline-end: -12%; top: 6%; background: radial-gradient(circle, var(--aurora-2), transparent 65%); opacity: 0.4; animation-duration: 22s; animation-delay: -7s; }
.x-aurora i:nth-child(3) { width: 40vw; height: 40vw; max-width: 560px; max-height: 560px; inset-inline-start: 34%; bottom: -34%; background: radial-gradient(circle, var(--aurora-3), transparent 65%); opacity: 0.35; animation-duration: 26s; animation-delay: -12s; }
@keyframes x-drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(5%, 7%) scale(1.12); } }

/* A grid that fades out from the middle, with a scan line sweeping down it */
.x-grid { position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 75%);
    mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 75%);
}
.x-grid::after { content: ""; position: absolute; inset-inline: 0; top: 0; height: 140px;
    background: linear-gradient(180deg, transparent, light-dark(rgba(99, 102, 241, 0.06), rgba(129, 140, 248, 0.12)) 70%, light-dark(rgba(99, 102, 241, 0.22), rgba(165, 180, 252, 0.35)) 99%, transparent);
    animation: x-scan 7s linear infinite;
}
@keyframes x-scan { from { transform: translateY(-160px); } to { transform: translateY(110vh); } }

/* MARK: - Hero */

.x-hero { padding: 148px 0 110px; }
.x-hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.x-hero .x-display { margin: 22px 0 24px; }
.x-hero .x-lead { max-width: 560px; margin-bottom: 36px; }
.x-hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.x-pill {
    display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px 7px 8px; border-radius: 999px;
    background: light-dark(rgba(99, 102, 241, 0.08), rgba(129, 140, 248, 0.10)); box-shadow: inset 0 0 0 1px var(--night-glass-line);
    font-size: 13.5px; font-weight: 500; color: var(--night-soft);
}
.x-pill b { white-space: nowrap; padding: 3px 9px; border-radius: 999px; background: #4f46e5; color: #fff; font: 600 11px/1.2 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; }
.x-platforms { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 44px; font: 500 13px/1 var(--font-mono); letter-spacing: 0.06em; color: var(--night-ink-3); }
.x-hero-center { text-align: center; }
.x-hero-center .x-lead { margin-inline: auto; }
.x-hero-center .x-hero-actions { justify-content: center; }
@media (max-width: 960px) {
    .x-hero { padding: 120px 0 72px; }
    .x-hero-grid { grid-template-columns: minmax(0, 1fr); gap: 56px; }
}

/* MARK: - The fleet hub
   Xavier at the centre, its rings rippling; six devices around it, each
   sending check-ins down a line. One at a time, a device lights up with
   what just happened (xavier.js). Always laid out left to right. */

.x-hub { position: relative; width: min(540px, 100%); aspect-ratio: 1; margin: 0 auto 56px; direction: ltr; }
.x-hub-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.x-hub-lines line { stroke: light-dark(rgba(79, 70, 229, 0.3), rgba(165, 180, 252, 0.22)); stroke-width: 0.35; stroke-dasharray: 1 1.4; animation: x-flow 1.4s linear infinite; }
.x-hub-lines circle { fill: light-dark(#6366f1, #a5b4fc); }
.x-hub-lines circle.is-cyan { fill: light-dark(#0891b2, #67e8f9); }
.x-hub-lines .x-hub-orbit { fill: none; stroke: light-dark(rgba(79, 70, 229, 0.14), rgba(165, 180, 252, 0.10)); stroke-width: 0.3; }
@keyframes x-flow { to { stroke-dashoffset: -4.8; } }

.x-hub-core { position: absolute; left: 50%; top: 50%; width: 27%; aspect-ratio: 1; transform: translate(-50%, -50%); }
.x-hub-core .x-ring { position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid rgba(129, 140, 248, 0.7); opacity: 0; animation: x-ripple 3.6s var(--ease-out) infinite; }
.x-hub-core .x-ring:nth-child(2) { animation-delay: 1.2s; }
.x-hub-core .x-ring:nth-child(3) { animation-delay: 2.4s; }
.x-hub-core .x-core {
    position: absolute; inset: 0; border-radius: 30%; display: grid; place-items: center;
    background: radial-gradient(120% 120% at 30% 20%, #6366f1, #3730a3 60%, #1e1b4b);
    box-shadow: 0 0 0 1px rgba(199, 210, 254, 0.35), 0 30px 80px -10px rgba(79, 70, 229, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    animation: x-float 4s var(--ease-in-out) infinite alternate;
}
.x-hub-core .x-core svg { width: 58%; height: 58%; fill: #fff; animation: x-turn 40s linear infinite; }
@keyframes x-ripple { 0% { transform: scale(1); opacity: 0.7; } 100% { transform: scale(2.6); opacity: 0; } }
@keyframes x-float { from { transform: translateY(-4px); } to { transform: translateY(5px); } }
@keyframes x-turn { to { transform: rotate(360deg); } }

.x-hub-node { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.x-hub-node .x-dev {
    position: relative; width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; font-size: 26px;
    color: var(--night-soft); background: var(--night-glass); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    box-shadow: inset 0 0 0 1px var(--night-glass-line), 0 18px 40px -16px var(--night-drop);
    animation: x-float 3.2s var(--ease-in-out) infinite alternate; animation-delay: var(--d, 0s);
    transition: color 0.3s ease, box-shadow 0.4s ease;
}
.x-hub-node small { font: 500 11px/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--night-ink-3); }
.x-hub-node .x-badge { position: absolute; top: -7px; right: -7px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; color: #fff; background: var(--tone, #10b981); transform: scale(0); stroke-width: 2.6; }
.x-hub-node.is-ping .x-dev { color: var(--night-ink); box-shadow: inset 0 0 0 1.5px var(--tone, #10b981), 0 0 40px -4px var(--tone, #10b981); }
.x-hub-node.is-ping .x-badge { animation: x-pop 0.5s var(--ease-spring) forwards; }
.x-hub-node.is-ping .x-dev::after { content: ""; position: absolute; inset: -2px; border-radius: 20px; border: 2px solid var(--tone, #10b981); animation: x-ping 1.2s var(--ease-out) forwards; }
@keyframes x-pop { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes x-ping { from { transform: scale(1); opacity: 0.9; } to { transform: scale(1.7); opacity: 0; } }
.tone-ok { --tone: #10b981; }
.tone-warn { --tone: #f59e0b; }
.tone-accent { --tone: #6366f1; }
.tone-danger { --tone: #ef4444; }

.x-hub-toast {
    position: absolute; left: 50%; bottom: -58px; transform: translateX(-50%);
    display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 999px; white-space: nowrap;
    font: 500 13px/1 var(--font-mono); color: var(--night-ink);
    background: var(--night-glass); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    box-shadow: inset 0 0 0 1px var(--night-glass-line), 0 20px 50px -20px var(--night-drop);
}
.x-hub-toast i { width: 8px; height: 8px; border-radius: 50%; background: var(--tone, #10b981); box-shadow: 0 0 12px var(--tone, #10b981); }
.x-hub-toast.is-new { animation: x-toast 0.5s var(--ease-out); }
@keyframes x-toast { from { opacity: 0; transform: translate(-50%, 8px); } }
@media (max-width: 520px) {
    .x-hub-node .x-dev { width: 46px; height: 46px; font-size: 21px; border-radius: 14px; }
    .x-hub-node small { display: none; }
    .x-hub-toast { font-size: 11.5px; padding: 8px 12px; }
}

/* A window frame for screenshots and scenes */
.x-window { position: relative; border-radius: 16px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow-lg); }
.x-window-bar { display: flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; background: var(--surface-2); border-bottom: 1px solid var(--line); direction: ltr; }
.x-window-bar i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.x-window-bar i:nth-child(2) { background: #febc2e; }
.x-window-bar i:nth-child(3) { background: #28c840; }
.x-window-bar span { margin-inline: auto; padding-inline-end: 40px; font: 500 12px/1 var(--font-mono); color: var(--ink-3); }

/* MARK: - Sections */

.x-section { position: relative; padding: 140px 0; }
.x-section-tight { padding: 96px 0; }
.x-head { max-width: 760px; margin-bottom: 64px; }
.x-head.is-center { margin-inline: auto; text-align: center; }
.x-head .x-h2 { margin: 18px 0 20px; }
@media (max-width: 700px) { .x-section { padding: 96px 0; } .x-head { margin-bottom: 44px; } }

.x-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.x-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.x-grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 960px) { .x-grid-3, .x-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .x-grid-2, .x-grid-3, .x-grid-4 { grid-template-columns: minmax(0, 1fr); } }

.x-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 72px; align-items: center; }
.x-split.is-flipped > :first-child { order: 2; }
@media (max-width: 960px) { .x-split { grid-template-columns: minmax(0, 1fr); gap: 48px; } .x-split.is-flipped > :first-child { order: 0; } }

/* MARK: - Cards
   A spotlight follows the pointer across the card's edge (xavier.js sets
   --mx and --my); the card lifts and its symbol springs on hover. */

.x-card {
    position: relative; padding: 30px; border-radius: var(--radius);
    background: var(--surface); box-shadow: var(--shadow);
    transition: transform 0.5s var(--ease-out), box-shadow 0.5s ease;
}
.x-card::before {
    content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
    background: radial-gradient(260px circle at var(--mx, 50%) var(--my, -40%), rgb(var(--accent-rgb) / 0.75), transparent 60%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
    opacity: 0; transition: opacity 0.4s ease;
}
.x-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.x-card:hover::before { opacity: 1; }
.x-card .x-h3 { margin: 20px 0 8px; }
.x-card p { color: var(--ink-2); font-size: 15.5px; }
.x-symbol {
    display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; font-size: 23px;
    color: var(--accent); background: var(--accent-soft);
    transition: transform 0.5s var(--ease-spring);
}
.x-card:hover .x-symbol { transform: rotate(-8deg) scale(1.08); }
.x-symbol.is-solid { color: #fff; background: var(--gradient-solid); box-shadow: 0 14px 30px -12px rgba(79, 70, 229, 0.9); }

.x-night .x-card { background: var(--night-card); box-shadow: inset 0 0 0 1px var(--night-line); }
.x-night .x-card p { color: var(--night-ink-2); }
.x-night .x-card:hover { box-shadow: inset 0 0 0 1px light-dark(rgba(79, 70, 229, 0.3), rgba(165, 180, 252, 0.3)), 0 40px 80px -40px light-dark(rgba(79, 70, 229, 0.35), rgba(79, 70, 229, 0.6)); }
.x-night .x-card::before { background: radial-gradient(260px circle at var(--mx, 50%) var(--my, -40%), light-dark(rgba(99, 102, 241, 0.8), rgba(165, 180, 252, 0.9)), transparent 60%); }
.x-night .x-symbol { color: var(--night-soft); background: rgba(129, 140, 248, 0.14); }

/* Big statements: a word, then a line */
.x-fact { padding: 34px 30px; }
.x-fact b { display: block; font-size: clamp(30px, 3.4vw, 42px); font-weight: 700; letter-spacing: -0.035em; line-height: 1; margin-bottom: 14px; }
.x-fact b.x-gradient-text { padding-bottom: 4px; }

/* Rows: icon, title, one line */
.x-rows { display: grid; gap: 4px; }
.x-row { display: flex; gap: 16px; align-items: flex-start; padding: 16px 0; border-top: 1px solid var(--line); }
.x-row:first-child { border-top: 0; }
.x-row > .x-icon { font-size: 22px; color: var(--accent); margin-top: 2px; }
.x-row b { display: block; font-weight: 600; font-size: 16.5px; letter-spacing: -0.01em; }
.x-row span { display: block; color: var(--ink-2); font-size: 15px; margin-top: 2px; }
.x-night .x-row { border-color: var(--night-line); }
.x-night .x-row > .x-icon { color: var(--night-accent); }
.x-night .x-row span { color: var(--night-ink-2); }

/* MARK: - Platform tiles */

.x-platform-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.x-platform { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 30px 12px 26px; text-align: center; }
.x-platform .x-symbol { width: 64px; height: 64px; border-radius: 20px; font-size: 30px; }
.x-platform b { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.x-platform span { font-size: 13px; color: var(--ink-3); line-height: 1.35; }
@media (max-width: 960px) { .x-platform-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) { .x-platform-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* MARK: - Marquee: capabilities drifting past, two rows in opposite directions */

.x-marquee { position: relative; display: grid; gap: 14px; overflow: hidden; direction: ltr;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.x-marquee-track { display: flex; gap: 14px; width: max-content; animation: x-marquee 60s linear infinite; }
.x-marquee-track.is-reverse { animation-direction: reverse; animation-duration: 70s; }
.x-marquee:hover .x-marquee-track { animation-play-state: paused; }
@keyframes x-marquee { to { transform: translateX(-50%); } }
.x-chip {
    display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; border-radius: 999px; white-space: nowrap;
    font-size: 16px; font-weight: 500; background: var(--surface); box-shadow: var(--shadow);
}
.x-chip .x-icon { font-size: 19px; color: var(--accent); }
html[dir="rtl"] .x-chip { direction: rtl; }

/* MARK: - Scenes (small, live recreations of the product) */

.x-scene { position: relative; padding: 26px; border-radius: 26px;
    background: radial-gradient(120% 90% at 50% 0%, rgb(var(--accent-rgb) / 0.16), transparent 70%), rgb(var(--accent-rgb) / 0.04);
    box-shadow: inset 0 0 0 1px var(--line);
}
.x-night .x-scene { background: radial-gradient(120% 90% at 50% 0%, light-dark(rgba(99, 102, 241, 0.16), rgba(99, 102, 241, 0.25)), transparent 70%), light-dark(rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.02)); box-shadow: inset 0 0 0 1px var(--night-line); }

/* Status pill */
.x-status { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 999px; font: 600 12px/1 var(--font-mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--tone); background: color-mix(in srgb, var(--tone) 14%, transparent); white-space: nowrap; }
.x-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }

/* Proxied delivery: device → Xavier → your storage, and no direct path */
.x-proxy { direction: ltr; }
.x-proxy-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr) auto; align-items: start; gap: 6px; }
.x-proxy-node { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; width: 96px; }
.x-proxy-node .x-symbol { width: 64px; height: 64px; border-radius: 20px; font-size: 30px; }
.x-proxy-node .x-symbol.is-solid svg.x-mark-svg { width: 32px; height: 32px; fill: #fff; stroke: none; }
.x-proxy-node b { font-size: 13.5px; font-weight: 600; }
.x-proxy-node small { font: 500 11px/1.3 var(--font-mono); color: var(--ink-3); }
.x-pipe { position: relative; height: 2px; margin-top: 31px; border-radius: 2px; background: repeating-linear-gradient(90deg, rgb(var(--accent-rgb) / 0.4) 0 6px, transparent 6px 12px); }
.x-pipe i { position: absolute; top: 50%; left: 0; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 14px var(--accent); animation: x-travel 2.4s var(--ease-in-out) infinite; }
.x-pipe i.is-back { background: var(--cyan); box-shadow: 0 0 14px var(--cyan); animation-name: x-travel-back; animation-delay: 1.2s; }
.x-pipe em { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); white-space: nowrap; font: 500 11px/1 var(--font-mono); font-style: normal; color: var(--ink-3); }
@keyframes x-travel { 0% { left: 0; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { left: calc(100% - 10px); opacity: 0; } }
@keyframes x-travel-back { 0% { left: calc(100% - 10px); opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { left: 0; opacity: 0; } }
.x-proxy-denied { position: relative; margin: 26px 48px 0; height: 44px; border: 2px dashed color-mix(in srgb, var(--danger) 45%, transparent); border-top: 0; border-radius: 0 0 22px 22px; }
.x-proxy-denied span { position: absolute; left: 50%; bottom: -14px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow); white-space: nowrap; font: 600 12px/1 var(--font-mono); color: var(--danger); }
.x-night .x-proxy-denied span { background: var(--night-raised); }
@media (max-width: 560px) {
    .x-proxy-node { width: 70px; }
    .x-proxy-node .x-symbol { width: 50px; height: 50px; font-size: 24px; border-radius: 16px; }
    .x-pipe em { display: none; }
    .x-proxy-denied { margin-inline: 34px; }
}

/* AI chat: bubbles arrive one by one, a typing indicator before each answer */
.x-chat { display: flex; flex-direction: column; gap: 12px; padding: 22px; min-height: 360px; }
.x-bubble { max-width: 82%; padding: 12px 16px; border-radius: 20px; font-size: 15px; line-height: 1.45; }
.x-bubble.is-me { align-self: flex-end; background: #4f46e5; color: #fff; border-end-end-radius: 6px; }
.x-bubble.is-ai { align-self: flex-start; background: var(--surface-2); color: var(--ink); border-end-start-radius: 6px; }
.x-bubble.is-new { animation: x-bubble 0.5s var(--ease-spring) both; }
.x-bubble.is-me.is-new { transform-origin: bottom right; }
.x-bubble.is-ai.is-new { transform-origin: bottom left; }
@keyframes x-bubble { from { opacity: 0; transform: translateY(14px) scale(0.85); } }
.x-typing { display: inline-flex; gap: 5px; padding: 15px 16px; }
.x-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); animation: x-typing 1.1s var(--ease-in-out) infinite; }
.x-typing i:nth-child(2) { animation-delay: 0.16s; }
.x-typing i:nth-child(3) { animation-delay: 0.32s; }
@keyframes x-typing { 0%, 60%, 100% { transform: translateY(0); opacity: 0.5; } 30% { transform: translateY(-5px); opacity: 1; } }

/* Ticks: short claims with a check */
.x-ticks { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 14px; }
.x-ticks li { display: flex; gap: 12px; align-items: flex-start; font-size: 16.5px; }
.x-ticks li > .x-icon { flex-shrink: 0; margin-top: 3px; font-size: 18px; color: var(--ok); stroke-width: 2.4; }

/* MARK: - Console walkthroughs
   An HTML replica of the Xavier console (Layout.tsx: white sidebar, gray
   canvas, white cards, indigo selection), driven by a cursor that clicks
   through a real task (xavier.js). Labels match the console, which is in
   English. Laid out left to right in every language, like the console. */

.x-app {
    position: relative; direction: ltr; text-align: left; overflow: hidden; border-radius: 16px;
    background: var(--app-bg); color: var(--app-ink); font-family: var(--font); font-size: 13px; line-height: 1.45;
    box-shadow: var(--shadow-lg), 0 0 0 1px var(--app-border);
    container-type: inline-size;
}
.x-app .x-window-bar { background: var(--app-card); border-color: var(--app-border); }
.x-app-body { display: flex; min-height: 400px; }
.x-app-side { width: 168px; flex-shrink: 0; padding: 14px 10px; background: var(--app-card); border-right: 1px solid var(--app-border); }
.x-app-brand { display: flex; align-items: center; gap: 8px; padding: 2px 6px 16px; }
.x-app-brand svg { width: 22px; height: 22px; fill: #4f46e5; }
.x-app-brand b { display: block; font-size: 15px; font-weight: 700; line-height: 1.1; }
.x-app-brand small { display: block; font-size: 11px; color: var(--app-primary); }
.x-app-nav { display: grid; gap: 2px; }
.x-app-nav span { display: flex; align-items: center; gap: 9px; padding: 7px 9px; border-radius: 8px; color: var(--app-ink); font-size: 12.5px; white-space: nowrap; }
.x-app-nav span .x-icon { font-size: 15px; color: var(--app-ink-2); }
.x-app-nav span.is-on { background: var(--app-primary-soft); color: var(--app-primary); font-weight: 500; }
.x-app-nav span.is-on .x-icon { color: var(--app-primary); }
.x-app-nav em { margin-left: auto; min-width: 18px; padding: 1px 6px; border-radius: 999px; background: var(--app-amber-soft); color: var(--app-amber); font: 600 10.5px/1.5 var(--font); font-style: normal; text-align: center; transition: transform 0.3s var(--ease-spring); }
.x-app-nav em.is-bump { transform: scale(1.35); }
.x-app-main { flex: 1; min-width: 0; padding: 18px 20px 22px; }
.x-app-title { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.x-app-title .x-icon { font-size: 20px; }
.x-app-sub { margin: 4px 0 14px; color: var(--app-ink-2); font-size: 12.5px; }
.x-app-card { background: var(--app-card); border: 1px solid var(--app-border); border-radius: 12px; overflow: hidden; }
.x-app-card + .x-app-card { margin-top: 12px; }
.x-app-card-pad { padding: 12px 14px; }
.x-app-cap { padding: 10px 14px 6px; font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--app-ink-3); }
.x-app-row { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--app-border); transition: opacity 0.4s ease, max-height 0.5s var(--ease-out), padding 0.5s var(--ease-out), background-color 0.3s ease; max-height: 80px; }
.x-app-row.is-head { border-top: 0; background: var(--app-bg); font-size: 10.5px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--app-ink-2); padding-top: 8px; padding-bottom: 8px; }
.x-app-row.is-picked { background: var(--app-primary-soft); }
.x-app-row.is-gone { opacity: 0; max-height: 0; padding-top: 0; padding-bottom: 0; border-top-width: 0; }
.x-app-row .x-col { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.x-app-row .x-col-2 { flex: 0.8; }
.x-app-row b { font-weight: 500; }
.x-app-row small { display: block; color: var(--app-ink-3); font: 500 11px/1.3 var(--font-mono); }
.x-app-row .x-mono { font-family: var(--font-mono); font-size: 11.5px; color: var(--app-ink-2); }
.x-app-tag { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 500; white-space: nowrap; background: var(--app-btn); color: var(--app-ink-2); }
.x-app-tag.is-green { background: var(--app-green-soft); color: var(--app-green); }
.x-app-tag.is-amber { background: var(--app-amber-soft); color: var(--app-amber); }
.x-app-tag.is-red { background: var(--app-red-soft); color: var(--app-red); }
.x-app-check { width: 15px; height: 15px; flex-shrink: 0; border-radius: 4px; border: 1.5px solid var(--app-ink-3); display: grid; place-items: center; color: #fff; font-size: 11px; transition: background-color 0.2s ease, border-color 0.2s ease; }
.x-app-check .x-icon { opacity: 0; stroke-width: 3; }
.x-app-check.is-on { background: var(--app-primary); border-color: var(--app-primary); }
.x-app-check.is-on .x-icon { opacity: 1; }
.x-app-btn { display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: 8px; font-size: 12px; font-weight: 500; white-space: nowrap; background: var(--app-btn); color: var(--app-ink); transition: transform 0.18s var(--ease-spring), background-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease; }
.x-app-btn.is-primary { background: #4f46e5; color: #fff; }
.x-app-btn.is-danger { background: var(--app-red-soft); color: var(--app-red); }
.x-app-btn.is-press { transform: scale(0.9); box-shadow: 0 0 0 5px rgba(99, 102, 241, 0.25); }
.x-app-btn .x-icon { font-size: 14px; }
.x-app-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; padding: 9px 12px; background: var(--app-card); border: 1px solid var(--app-border); border-radius: 12px; transition: opacity 0.3s ease, transform 0.4s var(--ease-out); }
.x-app-bar.is-hidden { display: none; }
.x-app-bar:not(.is-hidden) { animation: x-rise 0.35s var(--ease-out); }
.x-app-bar > div { display: flex; gap: 6px; }
.x-app-tabs { display: flex; gap: 18px; margin: 2px 0 12px; border-bottom: 1px solid var(--app-border); font-size: 12.5px; color: var(--app-ink-2); }
.x-app-tabs span { padding: 0 0 8px; }
.x-app-tabs span.is-on { color: var(--app-primary); box-shadow: inset 0 -2px 0 var(--app-primary); font-weight: 500; }
.x-app-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.x-app-stat { padding: 10px 12px; border: 1px solid var(--app-border); border-radius: 10px; }
.x-app-stat b { display: flex; justify-content: space-between; font-weight: 500; }
.x-app-stat b span { color: var(--app-green); }
.x-app-stat small { color: var(--app-ink-2); font-size: 11px; }
.x-app-key { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--app-bg); font: 500 13px/1.3 var(--font-mono); letter-spacing: 0.04em; color: var(--app-ink); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.x-app-key.is-masked span { color: var(--app-ink-3); letter-spacing: 0.1em; }

/* A confirm dialog over a dimmed console */
.x-app-dim { position: absolute; inset: 36px 0 0; z-index: 3; display: grid; place-items: center; padding: 16px; background: rgba(17, 24, 39, 0.35); opacity: 0; pointer-events: none; transition: opacity 0.25s ease; }
.x-app-dim.is-open { opacity: 1; }
.x-app-dialog { width: min(340px, 100%); padding: 18px; border-radius: 14px; background: var(--app-card); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.5); transform: scale(0.94) translateY(8px); transition: transform 0.4s var(--ease-spring); }
.x-app-dim.is-open .x-app-dialog { transform: none; }
.x-app-dialog b { display: block; font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.x-app-dialog p { color: var(--app-ink-2); font-size: 12.5px; margin-bottom: 14px; }
.x-app-dialog > div { display: flex; justify-content: flex-end; gap: 8px; }

/* A toast, bottom right, as react-hot-toast draws it */
.x-app-toast { position: absolute; right: 16px; bottom: 16px; max-width: calc(100% - 32px); z-index: 4; display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 10px; background: var(--app-card); box-shadow: 0 12px 30px -8px rgba(0, 0, 0, 0.3), 0 0 0 1px var(--app-border); font-size: 12.5px; font-weight: 500; opacity: 0; transform: translateY(10px); transition: opacity 0.3s ease, transform 0.4s var(--ease-spring); }
.x-app-toast .x-icon { color: #fff; background: #22c55e; border-radius: 50%; padding: 3px; font-size: 18px; stroke-width: 3; }
.x-app-toast.is-on { opacity: 1; transform: none; }

/* The cursor: glides to a target, presses, ripples */
.x-cursor { position: absolute; left: 0; top: 0; z-index: 6; width: 22px; height: 22px; pointer-events: none; transform: translate(70%, 80%); transition: transform 0.85s cubic-bezier(0.45, 0, 0.2, 1); filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.35)); }
.x-cursor svg { width: 100%; height: 100%; transition: transform 0.15s ease; }
.x-cursor.is-click svg { transform: scale(0.82); }
.x-cursor::after { content: ""; position: absolute; left: -12px; top: -12px; width: 24px; height: 24px; border-radius: 50%; background: rgba(99, 102, 241, 0.45); opacity: 0; }
.x-cursor.is-click::after { animation: x-click 0.5s var(--ease-out); }
@keyframes x-click { from { transform: scale(0.3); opacity: 1; } to { transform: scale(1.8); opacity: 0; } }
.x-reveal-in { animation: x-rise 0.45s var(--ease-out) both; }

@container (max-width: 640px) { .x-app-row .x-hide-md { display: none; } }
@container (max-width: 560px) {
    .x-app-body { min-height: 0; }
    .x-app-main { padding-bottom: 64px; }
    .x-app-side { display: none; }
    .x-app-row .x-hide-sm { display: none; }
}

/* MARK: - Arrive: content fades and rises into place as it scrolls in */

.x-arrive { opacity: 0; transform: translateY(26px); }
.x-arrive.is-in { opacity: 1; transform: none; transition: opacity 0.8s ease, transform 1s var(--ease-out); transition-delay: var(--d, 0s); }
@keyframes x-rise { from { opacity: 0; transform: translateY(10px); } }

/* MARK: - CTA */

.x-cta { text-align: center; padding: 160px 0; }
.x-cta .x-h2 { max-width: 820px; margin: 0 auto 22px; font-size: clamp(38px, 5.6vw, 72px); }
.x-cta .x-lead { margin: 0 auto 40px; max-width: 600px; }
.x-cta .x-hero-actions { justify-content: center; }
.x-cta-mark { width: 84px; height: 84px; margin: 0 auto 36px; border-radius: 26px; display: grid; place-items: center; background: radial-gradient(120% 120% at 30% 20%, #6366f1, #3730a3 60%, #1e1b4b); box-shadow: 0 0 0 1px rgba(199, 210, 254, 0.35), 0 30px 80px -10px rgba(79, 70, 229, 0.9); animation: x-float 4s var(--ease-in-out) infinite alternate; }
.x-cta-mark svg { width: 52%; height: 52%; fill: #fff; }

/* MARK: - Footer */

.x-footer { padding: 72px 0 40px; background: var(--night); color: var(--night-ink-2); font-size: 14px; }
.x-footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.x-footer img { height: 28px; width: auto; margin-bottom: 16px; }
.x-footer h4 { margin: 0 0 14px; font: 600 12px/1 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--night-ink); }
.x-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.x-footer a:hover { color: var(--night-ink); }
.x-footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--night-line); }
@media (max-width: 760px) { .x-footer-grid { grid-template-columns: 1fr 1fr; } .x-footer-grid > :first-child { grid-column: 1 / -1; } }

/* Language picker: a native disclosure, no script needed */
.x-lang { position: relative; }
.x-lang summary { list-style: none; display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 999px; cursor: pointer; color: var(--night-ink); box-shadow: inset 0 0 0 1px var(--night-line); }
.x-lang summary::-webkit-details-marker { display: none; }
.x-lang summary .x-icon { color: var(--night-accent); }
.x-lang-menu { position: absolute; bottom: calc(100% + 8px); inset-inline-end: 0; z-index: 60; width: 220px; max-height: 340px; overflow-y: auto; padding: 6px; border-radius: 14px; background: var(--night-raised); box-shadow: 0 30px 60px -20px var(--night-drop), inset 0 0 0 1px var(--night-line); }
.x-lang-menu a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--night-ink-2); }
.x-lang-menu a:hover, .x-lang-menu a.is-current { background: rgba(129, 140, 248, 0.16); color: var(--night-ink); }

/* Appearance: Auto, Light or Dark, beside the language picker. Hidden until
   xavier.js wires it up, since it does nothing without script. */
.x-theme { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--night-line); }
.x-theme button { display: inline-grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 999px; background: transparent; color: var(--night-ink-2); font-size: 16px; cursor: pointer; transition: background-color 0.2s ease, color 0.2s ease; }
.x-theme button:hover { color: var(--night-ink); }
.x-theme button[aria-pressed="true"] { background: rgba(129, 140, 248, 0.18); color: var(--night-accent); }
.x-footer-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

/* MARK: - Page head: a shorter band for inner pages */

.x-page-head { padding: 136px 0 72px; }
.x-page-head .x-display { font-size: clamp(38px, 5vw, 64px); margin: 18px 0 18px; }
.x-page-head .x-lead { max-width: 620px; }
.x-page-split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 64px; align-items: start; }
.x-page-split .x-display { font-size: clamp(36px, 4.4vw, 56px); }
@media (max-width: 960px) { .x-page-head { padding: 112px 0 56px; } .x-page-split { grid-template-columns: minmax(0, 1fr); gap: 40px; } }

/* A plain panel: a card that does not lift */
.x-panel { position: relative; padding: 32px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.x-night .x-panel { background: var(--night-raised); box-shadow: inset 0 0 0 1px var(--night-line), 0 40px 80px -40px var(--night-drop); }
.x-panel.is-center { text-align: center; }
.x-panel h2 { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 10px; }
.x-panel > p { color: var(--ink-2); }
.x-panel-mark { width: 56px; height: 56px; margin: 0 auto 22px; border-radius: 50%; display: grid; place-items: center; font-size: 26px; color: var(--accent); background: var(--accent-soft); stroke-width: 2.4; }
.x-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 28px; }
.x-panel.is-center .x-actions { justify-content: center; }
@media (max-width: 560px) { .x-panel { padding: 24px 20px; } }

/* MARK: - Forms */

.x-form { display: grid; gap: 22px; }
.x-form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
@media (max-width: 620px) { .x-form-row { grid-template-columns: minmax(0, 1fr); } }
.x-field label, .x-label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 600; color: var(--ink); }
.x-field label .x-req { color: var(--danger); }
.x-input {
    display: block; width: 100%; height: 50px; padding: 0 16px; border: 0; border-radius: var(--radius-sm);
    background: var(--field); color: var(--ink); font: 400 16px/1.4 var(--font);
    box-shadow: inset 0 0 0 1px var(--field-line); transition: box-shadow 0.2s ease;
}
textarea.x-input { height: auto; min-height: 150px; padding: 13px 16px; resize: vertical; }
.x-input::placeholder { color: var(--ink-3); }
.x-input:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--accent), 0 0 0 4px rgb(var(--accent-rgb) / 0.18); }
.x-page .x-input:focus-visible { outline: none; }
.x-input[aria-invalid="true"] { box-shadow: inset 0 0 0 1.5px var(--danger); }
/* A select drawn like the inputs, with its own chevron, on the inline end */
select.x-input {
    -webkit-appearance: none; appearance: none; padding-inline-end: 44px; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23818cf8' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 16px center; background-size: 20px;
}
html[dir="rtl"] select.x-input { background-position: left 16px center; }
select.x-input option { background: var(--surface); color: var(--ink); }
/* An input with fixed text either side (https:// ... .xavier-dm.com), always left to right */
.x-affix { display: flex; align-items: stretch; height: 50px; border-radius: var(--radius-sm); overflow: hidden; background: var(--field); box-shadow: inset 0 0 0 1px var(--field-line); direction: ltr; transition: box-shadow 0.2s ease; }
.x-affix:focus-within { box-shadow: inset 0 0 0 1.5px var(--accent), 0 0 0 4px rgb(var(--accent-rgb) / 0.18); }
.x-affix span { display: flex; align-items: center; padding: 0 14px; background: var(--surface-2); color: var(--ink-3); font-size: 15px; white-space: nowrap; }
.x-affix .x-input { flex: 1; min-width: 0; height: auto; border-radius: 0; box-shadow: none; background: transparent; padding: 0 12px; }
.x-affix .x-input:focus { box-shadow: none; }
.x-hint { margin-top: 8px; font-size: 14px; color: var(--ink-3); }
.x-hint.is-ok { color: var(--ok-ink); }
.x-hint.is-bad, .x-error { color: var(--danger-ink); }
.x-error { margin-top: 8px; font-size: 14px; }
.x-alert { padding: 13px 16px; border-radius: var(--radius-sm); font-size: 15px; color: var(--danger-ink); background: color-mix(in srgb, var(--danger) 10%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--danger) 30%, transparent); }
.x-check { display: flex; align-items: flex-start; gap: 12px; font-size: 14.5px; color: var(--ink-2); }
.x-check input { flex-shrink: 0; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); }
.x-fine { font-size: 14px; color: var(--ink-3); }
.x-fine a, .x-check a { color: var(--accent); font-weight: 600; }
.x-fine a:hover, .x-check a:hover { text-decoration: underline; }
.x-btn:disabled { opacity: 0.6; cursor: default; }
/* The honeypot stays in the layout, where a naive bot finds it, and out of
   the viewport, where a person never does; display:none would tip bots off. */
.x-honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* MARK: - Sidebar pages (docs, legal) */

.x-side-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 48px; align-items: start; padding-top: 40px; padding-bottom: 96px; }
.x-side { position: sticky; top: 92px; max-height: calc(100vh - 112px); overflow-y: auto; padding-inline-end: 4px; }
.x-side-title { margin: 0 0 16px; padding: 0 12px; font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.x-side-group { margin-bottom: 20px; }
.x-side-group > p { margin: 0 0 6px; padding: 0 12px; font: 600 11px/1 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.x-side .x-input { height: 40px; margin: 0 0 18px; font-size: 14.5px; }
.sidebar-link { display: block; padding: 6px 12px; border-radius: 8px; font-size: 14.5px; color: var(--ink-2); transition: background-color 0.2s ease, color 0.2s ease; }
.sidebar-link:hover { background: var(--surface-2); color: var(--ink); }
.sidebar-link.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
/* A page nested under the link above it, such as a setup guide. */
.sidebar-link.is-sub { padding-inline-start: 26px; font-size: 14px; }
@media (max-width: 960px) {
    .x-side-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; }
    .x-side { position: static; max-height: none; }
}

/* MARK: - Prose: docs and legal text */

.x-prose { padding: 44px 48px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); color: var(--ink-2); font-size: 16px; line-height: 1.7; overflow-wrap: break-word; }
@media (max-width: 620px) { .x-prose { padding: 28px 20px; } }
.x-prose h1 { font-size: clamp(28px, 3.4vw, 36px); line-height: 1.15; font-weight: 700; letter-spacing: -0.03em; color: var(--ink); margin: 0 0 10px; }
.x-prose h2 { font-size: 22px; line-height: 1.3; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); margin: 40px 0 12px; }
.x-prose > h2:first-child, .doc-section > h2:first-child { font-size: clamp(28px, 3.4vw, 36px); line-height: 1.15; letter-spacing: -0.03em; margin-top: 0; margin-bottom: 16px; }
.x-prose h3 { font-size: 18px; line-height: 1.35; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); margin: 32px 0 10px; }
.x-prose h4 { font-size: 16px; font-weight: 600; color: var(--ink); margin: 20px 0 6px; }
.x-prose p { margin: 0 0 16px; }
.x-prose ul, .x-prose ol { margin: 0 0 18px; padding-inline-start: 22px; }
.x-prose li { margin-bottom: 8px; }
.x-prose li::marker { color: var(--accent); }
.x-prose ul.x-plain { list-style: none; padding: 0; }
.x-prose ul.is-numbered { list-style: decimal; }
/* Legal clauses are lettered: (a), (b), (c) */
.x-prose.is-legal ol { list-style: lower-alpha; }
.x-prose a { color: var(--accent); font-weight: 600; }
.x-prose a:hover { color: var(--accent-hover); text-decoration: underline; }
.x-prose strong { color: var(--ink); font-weight: 600; }
.x-prose table { width: 100%; border-collapse: collapse; margin: 4px 0 20px; font-size: 14.5px; line-height: 1.55; text-align: start; }
.x-prose th { padding: 10px 16px 10px 0; text-align: start; vertical-align: bottom; color: var(--ink); font-weight: 600; border-bottom: 1px solid var(--field-line); }
.x-prose td { padding: 10px 16px 10px 0; text-align: start; vertical-align: top; border-bottom: 1px solid var(--line); }
.x-prose td:first-child { color: var(--ink); font-weight: 500; }
.x-prose .x-table, .x-prose .table-wrap { overflow-x: auto; margin-bottom: 20px; }
.x-prose .x-table table, .x-prose .table-wrap table { margin-bottom: 0; }
.x-prose code.inline { padding: 2px 6px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); font: 500 0.86em/1.4 var(--font-mono); overflow-wrap: anywhere; }
.x-prose .x-code { margin: 0 0 18px; padding: 18px 20px; border-radius: var(--radius-sm); background: #060816; box-shadow: inset 0 0 0 1px rgba(165, 180, 252, 0.16); overflow-x: auto; direction: ltr; text-align: left; }
.x-prose .x-code pre { margin: 0; }
.x-prose .x-code code { color: #a7f3d0; font: 500 13.5px/1.6 var(--font-mono); }
/* Callouts: a note, a tip, a caution */
.x-prose .x-note, .x-prose .callout { margin: 0 0 20px; padding: 16px 18px; border-radius: var(--radius-sm); font-size: 15px; color: var(--ink); background: var(--accent-soft); box-shadow: inset 0 0 0 1px rgb(var(--accent-rgb) / 0.22); --tone: var(--accent); }
.x-prose .x-note.is-ok { background: color-mix(in srgb, var(--ok) 10%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ok) 30%, transparent); }
.x-prose .x-note.is-warn { background: color-mix(in srgb, var(--warn) 12%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warn) 35%, transparent); }
.x-prose .x-note p { margin: 0; }
.x-prose .x-note p + p { margin-top: 8px; }
.x-prose .x-note a { color: inherit; text-decoration: underline; }
/* A rule: one compliance check or component, set off by a line on the inline start */
.x-prose .x-rule { margin: 0 0 22px; padding-inline-start: 18px; border-inline-start: 3px solid var(--tone, var(--line)); }
.x-prose .x-rule p:last-child { margin-bottom: 0; }
.x-prose .x-rule h4 { margin-top: 0; }
.x-prose .x-meta, .x-prose .meta { margin: -2px 0 10px; font: 500 12.5px/1.4 var(--font-mono); letter-spacing: 0.02em; color: var(--ink-3); }
.x-prose > .meta { margin-bottom: 24px; }
.x-prose .caps { text-transform: uppercase; font-size: 0.92em; }
.tone-violet { --tone: #8b5cf6; }
.tone-cyan { --tone: #06b6d4; }
/* Only the active doc section shows; the sidebar switches between them */
.doc-section { display: none; }
.doc-section.active { display: block; }
.x-prose [id] { scroll-margin-top: 92px; }
/* Unfilled legal values awaiting the owner or counsel */
.placeholder { padding: 0 4px; border-radius: 4px; background: #fef08a; color: #713f12; font-weight: 600; }
.x-draft { padding: 12px 0; font-size: 14.5px; color: var(--warn-ink); background: color-mix(in srgb, var(--warn) 14%, transparent); box-shadow: inset 0 -1px 0 color-mix(in srgb, var(--warn) 35%, transparent); }
.x-after-note { margin-top: 16px; font-size: 14px; color: var(--ink-3); }
.x-after-note a { color: var(--accent); font-weight: 600; }

/* MARK: - Status */

.x-state { display: inline-flex; align-items: center; gap: 12px; padding: 12px 20px 12px 16px; border-radius: 999px; font-size: 17px; font-weight: 600; color: var(--night-ink); background: var(--night-glass); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tone) 45%, transparent), 0 20px 50px -24px var(--tone); }
.x-state i { width: 12px; height: 12px; border-radius: 50%; background: var(--tone); box-shadow: 0 0 0 4px color-mix(in srgb, var(--tone) 22%, transparent), 0 0 16px var(--tone); animation: x-breathe 2.4s var(--ease-in-out) infinite; }
@keyframes x-breathe { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--tone) 10%, transparent), 0 0 22px var(--tone); } }
.x-checked { display: block; margin-top: 16px; font: 500 13px/1.4 var(--font-mono); color: var(--night-ink-3); }
.tone-partial { --tone: #f97316; }
.tone-muted { --tone: #94a3b8; }

.x-status-body { padding-top: 56px; padding-bottom: 104px; }
.x-incident { margin-bottom: 18px; padding: 24px 28px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow), inset 3px 0 0 var(--tone, var(--accent)); }
.x-incident .x-kicker { color: var(--tone, var(--accent)); }
.x-incident h2, .x-incident h3 { margin: 10px 0 12px; font-size: 19px; font-weight: 600; color: var(--ink); }
.x-incident p { font-size: 15px; color: var(--ink-2); }
.x-incident p + p { margin-top: 10px; }
.x-incident strong { color: var(--ink); }
.x-incident time, .x-incident small { color: var(--ink-3); font-family: var(--font-mono); font-size: 13px; }
.x-components { border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.x-component { padding: 22px 26px; }
.x-component + .x-component { border-top: 1px solid var(--line); }
.x-component-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.x-component-head b { font-weight: 600; color: var(--ink); }
.x-component-head span { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--tone); }
.x-dot { display: inline-block; flex-shrink: 0; width: 9px; height: 9px; border-radius: 50%; background: var(--tone); }
.x-bars { display: flex; gap: 2px; direction: ltr; }
.x-bar { flex: 1 1 0; min-width: 2px; height: 34px; border-radius: 3px; background: var(--tone); transition: transform 0.2s var(--ease-spring), filter 0.2s ease; }
.x-bar:hover { transform: scaleY(1.12); filter: brightness(1.15); }
.x-bar.is-none { background: var(--line); }
.bar-ok { --tone: var(--ok); }
.bar-degraded { --tone: #facc15; }
.bar-partial { --tone: #f97316; }
.bar-major { --tone: var(--danger); }
@media (max-width: 640px) { .x-bar.is-old { display: none; } }
.x-bars-scale { display: flex; justify-content: space-between; margin-top: 8px; font: 500 12px/1.4 var(--font-mono); color: var(--ink-3); }
.x-bars-scale .is-narrow { display: none; }
@media (max-width: 640px) { .x-bars-scale .is-wide { display: none; } .x-bars-scale .is-narrow { display: inline; } }
.x-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 14px 0 6px; font-size: 13px; color: var(--ink-3); }
.x-legend span { display: inline-flex; align-items: center; gap: 7px; }
.state-operational { --tone: var(--ok); }
.state-degraded { --tone: var(--warn); }
.state-outage { --tone: var(--danger); }
.state-unknown { --tone: #94a3b8; }
.x-status-section { margin-top: 56px; }
.x-status-section h2 { margin-bottom: 14px; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.x-status-section > p { color: var(--ink-2); }
.x-status-section a, .x-status-body .x-fine a { color: var(--accent); font-weight: 600; }

/* MARK: - Reduce Motion: everything holds still */

@media (prefers-reduced-motion: reduce) {
    .x-page *, .x-page *::before, .x-page *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
    .x-arrive { opacity: 1; transform: none; }
    .x-grid::after, .x-hub-lines circle, .x-pipe i, .x-cursor { display: none; }
}
