/**
 * Cyberspace Landing Design System 2026 — safe override layer.
 * Loaded only on registered v2 landings and scoped to .csl-landing-body.
 */

.csl-landing-body {
    --csl-color-primary: #520f7d;
    --csl-color-primary-dark: #3c095e;
    --csl-color-indigo: #2e2a6b;
    --csl-color-accent: #8cd2d9;
    --csl-color-bg: #f5f7f9;
    --csl-color-surface: #ffffff;
    --csl-color-text: #212529;
    --csl-color-muted: #5f6872;
    --csl-color-border: #dee2e6;
    --csl-color-success: #19763a;
    --csl-color-danger: #b42318;
    --csl-radius-sm: 8px;
    --csl-radius-md: 12px;
    --csl-radius-lg: 20px;
    --csl-shadow-card: 0 14px 36px rgba(46, 42, 107, 0.08);
    background: var(--csl-color-bg);
    color: var(--csl-color-text);
    font-family: Inter, "Open Sans", Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.65;
    text-rendering: optimizeLegibility;
}

.csl-landing-body *,
.csl-landing-body *::before,
.csl-landing-body *::after {
    box-sizing: border-box;
}

.csl-landing-body :where(h1, h2, h3, h4) {
    color: var(--csl-color-text);
    line-height: 1.18;
    text-wrap: balance;
}

.csl-landing-body :where(p, li) {
    text-wrap: pretty;
}

.csl-landing-body :where(a, button, input, select, textarea, [tabindex]):focus-visible {
    outline: 3px solid var(--csl-color-accent) !important;
    outline-offset: 3px;
}

.csl-landing-body :where(button, input, select, textarea) {
    font: inherit;
}

.csl-landing-body :where(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, textarea) {
    min-height: 48px;
    max-width: 100%;
    border: 1px solid #b8c0c8;
    border-radius: var(--csl-radius-sm);
    background: #fff;
    color: var(--csl-color-text);
}

.csl-landing-body :where(input, select, textarea)[aria-invalid="true"] {
    border-color: var(--csl-color-danger) !important;
    box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.12);
}

.csl-landing-body :where(.csl-btn, [class*="__btn"], [class*="__button"]) {
    min-height: 44px;
    border-radius: var(--csl-radius-sm);
    transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.csl-landing-body :where(.csl-btn, [class*="__btn"], [class*="__button"]):hover {
    transform: translateY(-1px);
}

.csl-landing-body :where(.csl-card, [class*="__card"], [class*="__panel"]) {
    border-radius: var(--csl-radius-md);
}

.csl-landing-body img {
    height: auto;
    max-width: 100%;
}

.csl-landing-body img[loading="lazy"] {
    content-visibility: auto;
    contain-intrinsic-size: 600px 400px;
}

.csl-skip-link {
    position: fixed;
    z-index: 100000;
    top: 12px;
    left: 12px;
    transform: translateY(-160%);
    padding: 10px 16px;
    border-radius: var(--csl-radius-sm);
    background: var(--csl-color-primary);
    color: #fff !important;
    font-weight: 700;
    transition: transform 120ms ease;
}

.csl-skip-link:focus {
    transform: translateY(0);
}

.csl-runtime-alert {
    margin: 12px 0;
    padding: 12px 14px;
    border: 1px solid #f2b8b5;
    border-radius: var(--csl-radius-sm);
    background: #fff2f0;
    color: #8a1c13;
    font-size: 0.94rem;
}

.csl-runtime-alert[role="status"] {
    border-color: #9ed3ad;
    background: #edf9f0;
    color: #145c2c;
}

.csl-runtime-success {
    display: grid;
    min-height: 220px;
    place-items: center;
    padding: 28px;
    text-align: center;
}

.csl-runtime-success__icon {
    display: grid;
    width: 54px;
    height: 54px;
    margin: 0 auto 12px;
    place-items: center;
    border-radius: 999px;
    background: #e8f7ed;
    color: var(--csl-color-success);
    font-size: 28px;
    font-weight: 800;
}

.csl-landing-body [aria-busy="true"] {
    cursor: progress;
}

.csl-landing-body [aria-busy="true"] [type="submit"] {
    opacity: 0.72;
}

.csl-modal--open,
.is-open[role="dialog"],
[data-modal][aria-hidden="false"] {
    overscroll-behavior: contain;
}

@media (max-width: 767px) {
    .csl-landing-body {
        font-size: 16px;
    }

    .csl-landing-body :where(h1) {
        font-size: clamp(2rem, 10vw, 3rem);
    }

    .csl-landing-body :where(.csl-modal__content, .csl-modal__dialog, [role="dialog"]) {
        max-height: calc(100dvh - 24px);
        overflow-y: auto;
        overscroll-behavior: contain;
    }
}

@media (prefers-reduced-motion: reduce) {
    .csl-landing-body *,
    .csl-landing-body *::before,
    .csl-landing-body *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (forced-colors: active) {
    .csl-landing-body :where(button, a, input, select, textarea) {
        forced-color-adjust: auto;
    }
}
