/* ── MultiSoc design tokens (Apple-level polish) ─────────────────────────── */
:root {
    --bg: #fbfbfd;
    --bg-elevated: #ffffff;
    --bg-soft: #f5f5f7;
    --bg-muted: #f5f5f7;
    --text: #1d1d1f;
    --text-secondary: #424245;
    --muted: #6e6e73;
    --accent: #0071e3;
    --accent-hover: #0077ed;
    --accent-ink: #0071e3;
    --accent-soft: rgba(0, 113, 227, 0.08);
    --accent-ring: rgba(0, 113, 227, 0.36);
    --danger: #bf4800;
    --danger-soft: rgba(191, 72, 0, 0.08);
    --warning: #8a6100;
    --warning-soft: rgba(138, 97, 0, 0.1);
    --success: #248a3d;
    --success-soft: rgba(36, 138, 61, 0.1);
    --border: #d2d2d7;
    --border-strong: #c6c6c8;
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.03);
    --radius: 14px;
    --radius-sm: 12px;
    --radius-lg: 18px;
    --radius-pill: 980px;
    --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
    --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
    --font-size-body: 17px;
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --nav-h: 3.25rem;
    --shell-max: 1080px;
    --ease-out: cubic-bezier(0.25, 0.1, 0.25, 1);
    --ease-spring: cubic-bezier(0.22, 1, 0.36, 1);
    --duration: 0.28s;
    --focus-ring: 0 0 0 3px rgba(0, 113, 227, 0.35);
    --focus-ring-inset: 0 0 0 3px var(--bg-elevated), 0 0 0 6px rgba(0, 113, 227, 0.4);
}

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

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

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-body);
    font-size: var(--font-size-body);
    font-optical-sizing: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: var(--text);
    line-height: 1.47059;
    letter-spacing: -0.022em;
    background-color: var(--bg);
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--duration) var(--ease-out);
}

a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
    text-underline-offset: 0.18em;
    text-decoration-thickness: 1px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
.skip-link:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 100;
    padding: var(--space-3) var(--space-4);
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    border-radius: var(--radius-pill);
}

.skip-link:focus {
    left: var(--space-4);
    top: var(--space-4);
}

.shell {
    position: relative;
    z-index: 1;
    max-width: var(--shell-max);
    margin: 0 auto;
    padding: 0 var(--space-5) var(--space-12);
}

.app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-main {
    flex: 1 1 auto;
    width: 100%;
}

/* ── Top navigation ─────────────────────────────────────────────────────── */
.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    margin: 0 calc(-1 * var(--space-5)) var(--space-8);
    padding: 0 var(--space-5);
    background: rgba(251, 251, 253, 0.72);
    border-bottom: 1px solid rgba(210, 210, 215, 0.65);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    min-height: var(--nav-h);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--text);
    text-decoration: none;
    line-height: 1;
    flex-shrink: 0;
}

.brand:hover {
    text-decoration: none;
    color: var(--text);
}

.brand:hover .brand-wordmark {
    color: var(--accent);
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 7px;
    background: #000;
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    overflow: hidden;
    flex-shrink: 0;
}

.brand-logo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-logo.is-missing {
    display: none;
}

.brand-mark-fallback {
    display: inline-grid;
    place-items: center;
    width: 100%;
    height: 100%;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.brand-wordmark {
    font-family: var(--font-display);
    font-size: 1.3125rem;
    font-weight: 600;
    letter-spacing: -0.03em;
    transition: color var(--duration) var(--ease-out);
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-1) var(--space-2);
    align-items: center;
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: -0.01em;
}

.nav-group {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-1);
}

.nav-group-secondary {
    margin-left: var(--space-1);
    padding-left: var(--space-3);
    border-left: 1px solid var(--border);
}

.nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.15rem;
    height: 1.15rem;
    padding: 0 0.3rem;
    margin-left: 0.15rem;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1;
    vertical-align: middle;
}

.nav-links a:not(.btn) {
    color: var(--text);
    text-decoration: none;
    padding: 0.35rem 0.55rem;
    border-radius: var(--radius-pill);
    opacity: 0.88;
    transition:
        color var(--duration) var(--ease-out),
        background var(--duration) var(--ease-out),
        opacity var(--duration) var(--ease-out);
}

.nav-links a:not(.btn):hover {
    color: var(--text);
    background: rgba(0, 0, 0, 0.04);
    text-decoration: none;
    opacity: 1;
}

.nav-links a:not(.btn).active {
    color: var(--text);
    background: rgba(0, 0, 0, 0.06);
    text-decoration: none;
    opacity: 1;
    font-weight: 500;
}

.nav-links a:not(.btn):focus-visible {
    box-shadow: var(--focus-ring);
}

.nav-logout {
    display: inline;
    margin: 0;
}

.nav-logout button,
.inline-logout button {
    font: inherit;
    font-size: inherit;
    font-weight: inherit;
    color: var(--muted);
    background: none;
    border: none;
    padding: 0.4rem 0.65rem;
    border-radius: 999px;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.15s ease, background 0.15s ease;
}

.nav-logout button:hover,
.inline-logout button:hover {
    color: var(--text);
    background: var(--bg-soft);
}

.nav-logout button:focus-visible,
.inline-logout button:focus-visible {
    box-shadow: var(--focus-ring);
    outline: none;
}

.inline-logout {
    display: inline;
    margin: 0;
}

.inline-logout button {
    padding: 0;
    color: inherit;
    text-decoration: underline;
    background: none;
}

.inline-logout button:hover {
    background: none;
    color: var(--accent-ink);
}

.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--bg-elevated) 80%, transparent);
    color: var(--text);
    cursor: pointer;
    padding: 0;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.2s var(--ease-out);
}

.nav-toggle:hover {
    background: var(--bg-soft);
    border-color: var(--border-strong);
}

.nav-toggle:active {
    transform: scale(0.96);
}

.nav-toggle-bars {
    display: block;
    width: 1rem;
    height: 1.5px;
    background: currentColor;
    box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

@media (max-width: 719px) {
    .nav-toggle {
        display: inline-flex;
    }

    .nav-toggle[aria-expanded="true"] .nav-toggle-bars {
        box-shadow: none;
        background: transparent;
        position: relative;
    }

    .nav-toggle[aria-expanded="true"] .nav-toggle-bars::before,
    .nav-toggle[aria-expanded="true"] .nav-toggle-bars::after {
        content: "";
        position: absolute;
        left: 0;
        width: 1rem;
        height: 1.5px;
        background: currentColor;
        transition: transform 0.28s var(--ease-out);
    }

    .nav-toggle[aria-expanded="true"] .nav-toggle-bars::before {
        transform: rotate(45deg);
    }

    .nav-toggle[aria-expanded="true"] .nav-toggle-bars::after {
        transform: rotate(-45deg);
    }

    body.nav-open {
        overflow: hidden;
    }

    body.nav-open::before {
        content: "";
        position: fixed;
        inset: 0;
        z-index: 40;
        background: rgba(0, 0, 0, 0.22);
        backdrop-filter: blur(8px) saturate(1.1);
        -webkit-backdrop-filter: blur(8px) saturate(1.1);
        animation: nav-scrim-in 0.28s var(--ease-out) both;
    }

    .topbar {
        z-index: 50;
    }

    .nav-links {
        display: flex;
        position: absolute;
        top: calc(var(--nav-h) + 1px);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-3);
        padding: var(--space-3) var(--space-5) var(--space-5);
        background: color-mix(in srgb, var(--bg-elevated) 86%, transparent);
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-md);
        max-height: calc(100dvh - var(--nav-h) - 1px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        backdrop-filter: blur(24px) saturate(1.4);
        -webkit-backdrop-filter: blur(24px) saturate(1.4);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-10px);
        transition:
            opacity 0.28s var(--ease-out),
            transform 0.32s var(--ease-out),
            visibility 0.32s;
    }

    .nav-links.is-open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }

    .nav-group {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-1);
        margin: 0;
        padding: 0;
        border: 0;
    }

    .nav-group-secondary {
        padding-top: var(--space-3);
        border-top: 1px solid var(--border);
    }

    .nav-links a:not(.btn) {
        padding: 0.8rem 0.85rem;
        border-radius: var(--radius-sm);
        font-size: 1rem;
    }

    .nav-logout button {
        width: 100%;
        text-align: left;
        padding: 0.8rem 0.85rem;
        border-radius: var(--radius-sm);
        font-size: 1rem;
    }

    .nav-links .btn {
        width: 100%;
        margin-top: var(--space-1);
        justify-content: center;
    }
}

@keyframes nav-scrim-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ── Landing hero (marketing) ───────────────────────────────────────────── */
body.is-landing {
    background-image: none;
}

body.is-landing .shell {
    max-width: none;
    padding-left: 0;
    padding-right: 0;
    padding-bottom: 0;
}

body.is-landing .topbar {
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 0;
    padding-left: max(var(--space-5), calc((100vw - var(--shell-max)) / 2 + var(--space-5)));
    padding-right: max(var(--space-5), calc((100vw - var(--shell-max)) / 2 + var(--space-5)));
}

body.is-landing #main {
    padding: 0;
}

.landing {
    position: relative;
    isolation: isolate;
    display: grid;
    align-items: center;
    min-height: calc(100vh - var(--nav-h) - 1px);
    min-height: calc(100dvh - var(--nav-h) - 1px);
    overflow: hidden;
}

/* Dominant full-bleed visual plane (edge-to-edge; not a card) */
.landing-visual {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    animation: landing-plane-in 1.15s var(--ease-out) both;
}

.landing-visual-plane {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            105deg,
            #fbfbfd 0%,
            #f5f5f7 38%,
            transparent 62%
        ),
        linear-gradient(
            180deg,
            #fbfbfd 0%,
            #f5f5f7 100%
        );
}

.landing-visual-plane::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 55% 70% at 78% 48%, rgba(0, 113, 227, 0.08), transparent 68%),
        radial-gradient(ellipse 40% 45% at 92% 18%, rgba(0, 0, 0, 0.03), transparent 60%),
        radial-gradient(ellipse 50% 40% at 60% 88%, rgba(0, 0, 0, 0.02), transparent 55%);
}

.landing-visual-plane::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.35;
    background:
        radial-gradient(circle at 78% 42%, rgba(255, 255, 255, 0.85) 0%, transparent 45%);
}

.landing-visual-glow {
    position: absolute;
    inset: 18% -8% -10% 42%;
    background:
        radial-gradient(ellipse 70% 55% at 55% 45%, rgba(0, 113, 227, 0.07), transparent 70%);
    filter: blur(2px);
    animation: landing-glow-drift 14s var(--ease-out) infinite alternate;
}

.landing-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 38rem;
    justify-self: start;
    padding:
        clamp(2.5rem, 8vh, 5.5rem)
        max(var(--space-5), calc((100vw - var(--shell-max)) / 2 + var(--space-5)));
}

.hero-brand {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin: 0 0 var(--space-6);
    color: var(--text);
}

.hero-brand-logo {
    display: block;
    width: auto;
    height: clamp(2.25rem, 5vw, 3.25rem);
    border-radius: 0;
    flex-shrink: 0;
    background: #000;
}

.hero-brand-name {
    font-family: var(--font-display);
    font-size: clamp(3.2rem, 10vw, 5.5rem);
    font-weight: 700;
    letter-spacing: -0.045em;
    line-height: 1.05;
}

.hero-headline {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3.5vw, 2rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin: 0 0 var(--space-4);
    color: var(--text);
    max-width: 18ch;
}

.hero-lede {
    font-size: clamp(1.0625rem, 1.8vw, 1.1875rem);
    color: var(--muted);
    max-width: 30rem;
    margin: 0 0 var(--space-8);
    line-height: 1.47059;
    letter-spacing: -0.011em;
    font-weight: 400;
}

.landing-actions .btn {
    min-height: 2.75rem;
    padding-inline: 1.35rem;
}

.landing-actions .btn-primary:hover:not(:disabled):not(.is-loading) {
    box-shadow: none;
}

.landing-actions .btn-ghost:hover:not(:disabled):not(.is-loading) {
    transform: none;
}

@media (max-width: 719px) {
    .landing-content {
        max-width: none;
        padding-top: clamp(2rem, 6vh, 3rem);
        padding-bottom: clamp(3rem, 10vh, 4.5rem);
    }

    .hero-brand {
        gap: var(--space-2);
        margin-bottom: var(--space-5);
    }

    .hero-headline {
        max-width: 16ch;
    }

    .landing-visual-glow {
        inset: 35% -20% 0 10%;
        opacity: 0.85;
    }

    .landing-visual-plane::after {
        opacity: 0.2;
    }

    .landing-actions {
        width: 100%;
    }

    .landing-actions .btn {
        flex: 1 1 auto;
    }
}

@keyframes landing-plane-in {
    from {
        opacity: 0;
        transform: scale(1.035);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes landing-glow-drift {
    from {
        transform: translate3d(0, 0, 0) scale(1);
    }
    to {
        transform: translate3d(-2%, 3%, 0) scale(1.04);
    }
}

/* Post-hero landing bands (outside first viewport) */
.landing-band {
    position: relative;
    z-index: 1;
    padding: clamp(3rem, 8vh, 5.5rem)
        max(var(--space-5), calc((100vw - var(--shell-max)) / 2 + var(--space-5)));
    background: var(--bg);
}

.landing-band-alt {
    background: var(--bg-soft);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.landing-band-inner {
    max-width: 40rem;
}

.landing-band h2 {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 1.875rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin: 0 0 var(--space-3);
    color: var(--text);
}

.landing-band-lede {
    margin: 0 0 var(--space-8);
    color: var(--muted);
    font-size: 1.0625rem;
    line-height: 1.5;
    max-width: 32rem;
}

.landing-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: var(--space-6);
}

.landing-steps li {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--space-4);
    align-items: start;
}

.landing-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    margin-top: 0.1rem;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--accent);
    border: 1px solid rgba(0, 113, 227, 0.28);
    border-radius: 50%;
    background: var(--accent-soft);
}

.landing-steps strong {
    display: block;
    font-size: 1.0625rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-1);
    color: var(--text);
}

.landing-steps p {
    margin: 0;
    color: var(--muted);
    font-size: 0.975rem;
    line-height: 1.5;
}

.landing-platform-names {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-5);
}

.landing-platform-names li {
    font-size: 1.0625rem;
    font-weight: 500;
    letter-spacing: -0.015em;
    color: var(--text-secondary);
}

body.is-landing .site-footer {
    border-top: 1px solid var(--border);
    background: var(--bg);
}

/* Reveal animations */
[data-reveal] {
    opacity: 0;
    transform: translateY(12px);
}

[data-reveal].is-visible {
    animation: reveal-up 0.7s var(--ease-out) both;
}

[data-reveal-delay="1"].is-visible { animation-delay: 0.08s; }
[data-reveal-delay="2"].is-visible { animation-delay: 0.16s; }
[data-reveal-delay="3"].is-visible { animation-delay: 0.24s; }
[data-reveal-delay="4"].is-visible { animation-delay: 0.32s; }

@keyframes reveal-up {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes panel-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.panel[data-reveal].is-visible,
.stack > [data-reveal].is-visible {
    animation-name: panel-in;
    animation-duration: 0.45s;
}

/* ── Actions & buttons ──────────────────────────────────────────────────── */
.actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    align-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    padding: 0.7rem 1.35rem;
    min-height: 2.75rem;
    font: inherit;
    font-size: 1.0625rem;
    font-weight: 400;
    letter-spacing: -0.01em;
    line-height: 1.17648;
    cursor: pointer;
    text-decoration: none;
    transition:
        transform var(--duration) var(--ease-spring),
        background var(--duration) var(--ease-out),
        border-color var(--duration) var(--ease-out),
        box-shadow var(--duration) var(--ease-out),
        color var(--duration) var(--ease-out),
        opacity var(--duration) var(--ease-out);
}

.btn:hover {
    text-decoration: none;
}

.btn:active {
    transform: scale(0.98);
}

.btn:disabled,
.btn[disabled],
.btn.is-loading {
    opacity: 0.56;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    pointer-events: none;
}

.btn.is-loading::before {
    content: "";
    width: 0.85em;
    height: 0.85em;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: none;
}

.btn-primary:hover:not(:disabled):not(.is-loading) {
    background: var(--accent-hover);
    color: #fff;
}

.btn-primary:focus-visible {
    box-shadow: var(--focus-ring-inset);
}

.btn-ghost {
    background: transparent;
    border-color: var(--border);
    color: var(--accent);
    box-shadow: none;
}

.btn-ghost:hover:not(:disabled):not(.is-loading) {
    border-color: var(--border-strong);
    color: var(--accent-hover);
    background: rgba(0, 0, 0, 0.02);
}

.btn-danger {
    background: transparent;
    border-color: color-mix(in srgb, var(--danger) 40%, var(--border));
    color: var(--danger);
}

.btn-danger:hover:not(:disabled):not(.is-loading) {
    background: var(--danger-soft);
    color: var(--danger);
}

.btn-sm {
    padding: 0.45rem 1rem;
    min-height: 2.25rem;
    font-size: 0.875rem;
}

.btn-block {
    width: 100%;
}

/* ── Page chrome ────────────────────────────────────────────────────────── */
.page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-4) var(--space-6);
    margin-bottom: var(--space-8);
}

.page-header h1 {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin: 0 0 var(--space-2);
    line-height: 1.1;
}

.page-header .lede,
.page-lede {
    margin: 0;
    color: var(--muted);
    font-size: 1.0625rem;
    line-height: 1.47059;
    letter-spacing: -0.011em;
    max-width: 40rem;
}

.page-header-tight {
    margin-bottom: var(--space-4);
}

.page-header-tight h1 {
    font-size: clamp(1.45rem, 2.6vw, 1.75rem);
}

.panel {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    margin-bottom: var(--space-5);
    box-shadow: var(--shadow-sm);
}

.form-panel {
    max-width: 40rem;
}

.panel h1,
.panel h2 {
    font-family: var(--font-display);
    margin: 0 0 var(--space-3);
    letter-spacing: -0.025em;
    font-weight: 600;
}

.panel h1 {
    font-size: 1.75rem;
}

.panel h2 {
    font-size: 1.25rem;
    color: var(--text);
}

.panel-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.panel-header h2 {
    margin: 0;
}

.muted {
    color: var(--muted);
}

.stack {
    display: grid;
    gap: var(--space-5);
}

.grid-2 {
    display: grid;
    gap: var(--space-5);
}

@media (min-width: 720px) {
    .grid-2 {
        grid-template-columns: 1fr 1fr;
    }
}

/* ── Forms ──────────────────────────────────────────────────────────────── */
label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: var(--space-2);
    letter-spacing: -0.01em;
}

input[type="email"],
input[type="password"],
input[type="text"],
input[type="datetime-local"],
input[type="file"],
textarea,
select {
    width: 100%;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1rem;
    min-height: 3rem;
    font: inherit;
    font-size: var(--font-size-body);
    letter-spacing: -0.022em;
    transition:
        border-color var(--duration) var(--ease-out),
        box-shadow var(--duration) var(--ease-out),
        background var(--duration) var(--ease-out);
}

input[type="email"]:hover,
input[type="password"]:hover,
input[type="text"]:hover,
input[type="datetime-local"]:hover,
textarea:hover,
select:hover {
    border-color: var(--border-strong);
}

input[type="email"]:focus,
input[type="password"]:focus,
input[type="text"]:focus,
input[type="datetime-local"]:focus,
input[type="file"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: var(--focus-ring);
}

textarea {
    resize: vertical;
    min-height: 6rem;
}

.form-row {
    margin-bottom: var(--space-5);
}

.form-row:last-of-type {
    margin-bottom: var(--space-6);
}

.form-check {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin: 0;
    font-size: 1.0625rem;
    font-weight: 400;
    color: var(--text-secondary);
    cursor: pointer;
    min-height: 2.75rem;
}

.form-check input {
    width: auto;
    min-height: auto;
    accent-color: var(--accent);
}

.form-error,
.flash {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1rem;
    margin-bottom: var(--space-4);
    font-size: 0.9375rem;
    line-height: 1.45;
    letter-spacing: -0.011em;
    transition:
        opacity var(--duration) var(--ease-out),
        transform var(--duration) var(--ease-out);
}

.flash-message {
    margin: 0;
    flex: 1 1 auto;
}

.flash-dismiss {
    flex: 0 0 auto;
    display: inline-grid;
    place-items: center;
    width: 1.75rem;
    height: 1.75rem;
    margin: -0.25rem -0.2rem -0.25rem 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: inherit;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.55;
    transition:
        opacity var(--duration) var(--ease-out),
        background var(--duration) var(--ease-out);
}

.flash-dismiss:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.06);
}

.flash.is-dismissing {
    opacity: 0;
    transform: translateY(-4px);
}

.flash-success {
    background: var(--success-soft);
    border: 1px solid color-mix(in srgb, var(--success) 28%, transparent);
    color: var(--success);
}

.flash-error,
.form-error {
    background: var(--danger-soft);
    border: 1px solid color-mix(in srgb, var(--danger) 28%, transparent);
    color: var(--danger);
}

.flash-warning {
    background: var(--warning-soft);
    border: 1px solid color-mix(in srgb, var(--warning) 28%, transparent);
    color: var(--warning);
}

.form-error {
    display: block;
}

.field-label {
    display: block;
    font-size: 0.825rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--space-2);
}

.form-row-nested {
    margin-bottom: var(--space-3) !important;
}

.flash code,
.hint code {
    font-size: 0.85em;
    padding: 0.1em 0.35em;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.06);
}

.platform-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    list-style: none;
    padding: 0;
    margin: var(--space-2) 0 0;
}

.chip {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.7rem;
    border-radius: var(--radius-pill);
    background: var(--bg-soft);
    border: 1px solid var(--border);
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--text-secondary);
}

.checkbox-grid {
    display: grid;
    gap: var(--space-2);
}

.checkbox-grid label {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--text);
    font-size: 1.0625rem;
    font-weight: 400;
    margin: 0;
    padding: 0.7rem 0.9rem;
    min-height: 3rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    cursor: pointer;
    transition:
        border-color var(--duration) var(--ease-out),
        background var(--duration) var(--ease-out),
        box-shadow var(--duration) var(--ease-out);
}

.checkbox-grid label:hover {
    border-color: var(--border-strong);
    background: var(--bg-soft);
}

.checkbox-grid input {
    width: auto;
    min-height: auto;
    accent-color: var(--accent);
}

/* ── Platform cards & picker ────────────────────────────────────────────── */
.platform-card-grid {
    display: grid;
    gap: var(--space-4);
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .platform-card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 960px) {
    .platform-card-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.platform-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    padding: var(--space-5);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
    transition:
        border-color var(--duration) var(--ease-out),
        box-shadow var(--duration) var(--ease-spring);
}

.platform-card.is-connected {
    border-color: color-mix(in srgb, var(--success) 35%, var(--border));
}

.platform-card.is-unconfigured {
    opacity: 0.92;
}

.platform-card-top {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
}

.platform-card-title {
    min-width: 0;
    flex: 1;
}

.platform-card-title h2 {
    margin: 0 0 var(--space-2);
    font-size: 1.05rem;
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: -0.02em;
}

.platform-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-1);
}

.platform-card-note {
    margin: 0;
    font-size: 0.85rem;
}

.platform-card-actions {
    margin-top: auto;
    padding-top: var(--space-1);
}

.chip-account {
    gap: 0.35rem;
}

.chip-account form {
    display: inline;
    margin: 0;
}

.platform-icon {
    display: inline-grid;
    place-items: center;
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: var(--radius-sm);
    background: var(--bg-soft);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1;
}

.platform-icon-sm {
    width: 1.65rem;
    height: 1.65rem;
    font-size: 0.7rem;
}

.platform-icon--youtube { background: #ffe5e5; color: #b00000; }
.platform-icon--tiktok { background: #e8e8f0; color: #111; }
.platform-icon--instagram { background: #fce7f3; color: #9d174d; }
.platform-icon--facebook { background: #e0ebff; color: #1d4ed8; }
.platform-icon--linkedin { background: #e0f0ff; color: #0a66c2; }
.platform-icon--twitter { background: #eceff1; color: #0f1419; }
.platform-icon--threads { background: #eceff1; color: #0f1419; }
.platform-icon--bluesky { background: #e0f2fe; color: #0284c7; }
.platform-icon--pinterest { background: #fde8e8; color: #b91c1c; }
.platform-icon--snapchat { background: #fef9c3; color: #854d0e; }
.platform-icon--telegram { background: #e0f2fe; color: #0369a1; }
.platform-icon--line { background: #e8f8ee; color: #06c755; }
.platform-icon--whatsapp { background: #e7f8ef; color: #128c7e; }
.platform-icon--discord { background: #e8eaf6; color: #5865f2; }
.platform-icon--slack { background: #fce7f3; color: #4a154b; }
.platform-icon--mastodon { background: #ede9fe; color: #5b21b6; }
.platform-icon--google_business { background: #e8f5e9; color: #166534; }
.platform-icon--vk { background: #e0ebff; color: #0077ff; }
.platform-icon--vimeo { background: #e0f2fe; color: #0ea5e9; }
.platform-icon--dailymotion { background: #e0e7ff; color: #0066dc; }
.platform-icon--tumblr { background: #e2e8f0; color: #36465d; }

.redirect-hint {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-sm);
    background: var(--bg-muted);
    border: 1px solid var(--border);
    font-size: 0.75rem;
}

.redirect-hint-label {
    color: var(--muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.redirect-hint-code {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.72rem;
    padding: 0.15em 0.4em;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.05);
}

.platform-picker {
    display: grid;
    gap: var(--space-2);
    grid-template-columns: 1fr;
}

@media (min-width: 520px) {
    .platform-picker {
        grid-template-columns: repeat(2, 1fr);
    }
}

.platform-pick {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0;
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-muted);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
    transition: border-color 0.15s ease, background 0.15s ease;
}

.platform-pick:hover:not(.is-disabled) {
    border-color: var(--border-strong);
    background: var(--bg-elevated);
}

.platform-pick:has(input:checked) {
    border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
    background: var(--accent-soft);
}

.platform-pick.is-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.platform-pick input {
    width: auto;
    margin: 0;
    accent-color: var(--accent);
}

.platform-pick-label {
    min-width: 0;
    line-height: 1.25;
}

.callback-list {
    display: grid;
    gap: var(--space-2);
    margin: var(--space-4) 0 var(--space-6);
}

.callback-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-muted);
}

.callback-meta {
    flex: 1;
    min-width: 12rem;
    display: grid;
    gap: 0.2rem;
}

.callback-meta strong {
    font-size: 0.85rem;
    text-transform: capitalize;
}

.admin-platform-group {
    margin-top: var(--space-6);
    padding-top: var(--space-5);
    border-top: 1px solid var(--border);
}

.admin-platform-group-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
}

.admin-platform-group h3 {
    margin: 0;
    font-size: 1.05rem;
}

.callback-list--compact {
    margin: 0 0 var(--space-4);
}

.connector-readiness {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: var(--space-2);
}

.connector-readiness li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2);
}

.btn.is-copied {
    color: var(--success);
}

/* ── Tables ─────────────────────────────────────────────────────────────── */
.table-wrap {
    overflow-x: auto;
    margin: 0 calc(-1 * var(--space-1));
    border-radius: var(--radius-sm);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
    letter-spacing: -0.011em;
}

th,
td {
    text-align: left;
    padding: 0.85rem 0.7rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

tbody tr {
    transition: background var(--duration) var(--ease-out);
}

tbody tr:hover {
    background: var(--bg-soft);
}

tbody tr:last-child td {
    border-bottom: none;
}

th {
    color: var(--muted);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding-top: 0.4rem;
    padding-bottom: 0.6rem;
}

td a {
    font-weight: 550;
}

.data-table {
    border-collapse: separate;
    border-spacing: 0;
}

.data-table thead th {
    background: color-mix(in srgb, var(--bg-muted) 80%, transparent);
    border-bottom-color: var(--border-strong);
}

.data-table tbody tr:nth-child(even) {
    background: color-mix(in srgb, var(--bg-muted) 55%, transparent);
}

.data-table tbody tr:hover {
    background: var(--bg-soft);
}

.cell-truncate {
    max-width: 14rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chip-compact {
    font-size: 0.72rem;
    padding: 0.15rem 0.45rem;
    margin: 0.1rem 0.15rem 0.1rem 0;
}

.page-count {
    font-family: var(--font-body);
    font-size: 0.55em;
    font-weight: 500;
    color: var(--muted);
    letter-spacing: 0;
}

.is-unread {
    color: var(--accent-ink);
}

.admin-nav-grid {
    display: grid;
    gap: var(--space-4);
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .admin-nav-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.admin-nav-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    padding: var(--space-5);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: inherit;
    transition:
        border-color 0.15s ease,
        box-shadow 0.18s ease,
        transform 0.18s var(--ease-out);
}

.admin-nav-card:hover {
    text-decoration: none;
    color: inherit;
    border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.admin-nav-card:focus-visible {
    box-shadow: var(--focus-ring);
}

.admin-nav-card-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text);
}

.admin-nav-card-desc {
    font-size: 0.875rem;
    color: var(--muted);
    line-height: 1.4;
}

.admin-settings-form {
    margin-top: var(--space-5);
    padding-top: var(--space-5);
    border-top: 1px solid var(--border);
}

/* ── Status pills ───────────────────────────────────────────────────────── */
.status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.22rem 0.6rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.015em;
    text-transform: capitalize;
    border: 1px solid transparent;
    background: var(--bg-soft);
    color: var(--text-secondary);
    line-height: 1.2;
    white-space: nowrap;
}

.status::before {
    content: "";
    width: 0.38rem;
    height: 0.38rem;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.9;
    flex-shrink: 0;
}

.status-success,
.status-scheduled {
    color: var(--success);
    background: var(--success-soft);
    border-color: color-mix(in srgb, var(--success) 22%, transparent);
}

.status-failed {
    color: var(--danger);
    background: var(--danger-soft);
    border-color: color-mix(in srgb, var(--danger) 22%, transparent);
}

.status-partial,
.status-queued,
.status-pending {
    color: var(--warning);
    background: var(--warning-soft);
    border-color: color-mix(in srgb, var(--warning) 22%, transparent);
}

/* ── Empty states ───────────────────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: var(--space-10) var(--space-5);
    border: 1px dashed color-mix(in srgb, var(--border-strong) 80%, transparent);
    border-radius: var(--radius-lg);
    background: color-mix(in srgb, var(--bg-muted) 85%, var(--bg-elevated));
}

.empty-state-inset {
    border: none;
    background: transparent;
    padding: var(--space-8) var(--space-3);
}

.empty-state-icon {
    display: inline-grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    margin: 0 auto var(--space-4);
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 1.15rem;
    font-weight: 700;
    font-family: var(--font-display);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 12%, transparent);
}

.empty-state h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 0 var(--space-2);
    letter-spacing: -0.025em;
}

.empty-state p {
    margin: 0 auto var(--space-5);
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.5;
    max-width: 28rem;
}

.empty-state p:last-child {
    margin-bottom: 0;
}

.empty-state .actions {
    justify-content: center;
}

/* ── Auth ───────────────────────────────────────────────────────────────── */
body.is-auth .topbar {
    margin-bottom: var(--space-4);
}

body.is-auth .site-footer {
    margin-top: auto;
}

.auth-shell {
    display: grid;
    place-items: center;
    min-height: calc(100dvh - var(--nav-h) - 8rem);
    padding: var(--space-4) 0 var(--space-8);
}

.auth-box {
    width: 100%;
    max-width: 26rem;
    margin: 0 auto;
    padding: var(--space-8) var(--space-6);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-5);
}

.auth-brand .brand-mark {
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 9px;
    font-size: 0.7rem;
}

.auth-brand .brand-wordmark {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: -0.03em;
    color: var(--text);
}

.auth-box h1 {
    margin-bottom: var(--space-2);
    font-size: clamp(1.55rem, 3vw, 1.85rem);
}

.auth-sub {
    margin: 0 0 var(--space-6);
    color: var(--muted);
    font-size: 0.975rem;
    line-height: 1.45;
}

.auth-box .btn-primary {
    width: 100%;
    justify-content: center;
    margin-top: var(--space-1);
}

.auth-secondary-form {
    margin-top: var(--space-3);
}

.auth-footer {
    margin-top: var(--space-6);
    padding-top: var(--space-5);
    border-top: 1px solid var(--border);
    font-size: 0.925rem;
    text-align: center;
}

.otp-input {
    font-size: 1.45rem !important;
    font-weight: 600;
    letter-spacing: 0.4em;
    text-align: center;
    font-variant-numeric: tabular-nums;
    padding-left: 0.9rem !important;
    padding-right: 0.5rem !important;
}

.hint {
    font-size: 0.825rem;
    color: var(--muted);
    margin-top: var(--space-5);
    line-height: 1.5;
}

.form-row .hint {
    margin-top: var(--space-2);
}

.form-divider-or {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin: var(--space-2) 0 var(--space-4);
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.form-divider-or::before,
.form-divider-or::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

.breadcrumb {
    margin: 0 0 var(--space-2);
    font-size: 0.825rem;
}

.breadcrumb a {
    color: var(--muted);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--accent-ink);
}

.account-hub {
    max-width: 36rem;
}

.account-hub-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.account-hub-list > li + li {
    border-top: 1px solid var(--border);
}

.account-hub-list a,
.account-hub-locale {
    display: grid;
    gap: 0.25rem;
    padding: var(--space-4) var(--space-2);
    margin: 0 calc(-1 * var(--space-2));
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: inherit;
    transition: background 0.15s ease;
}

.account-hub-list a:hover {
    background: var(--bg-muted);
    text-decoration: none;
}

.account-hub-list a:hover .account-hub-label {
    color: var(--accent-ink);
}

.account-hub-label {
    font-weight: 600;
    font-size: 1.02rem;
    letter-spacing: -0.01em;
}

.account-hub-desc {
    font-size: 0.875rem;
    color: var(--muted);
    line-height: 1.45;
}

.account-hub-locales {
    margin: var(--space-2) 0 0;
    padding: 0;
    border: 0;
}

/* ── Locale / footer / cookie ───────────────────────────────────────────── */
.locale-switcher {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}

.locale-switcher a {
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--muted) !important;
    padding: 0.35rem 0.65rem !important;
    border-radius: var(--radius-pill);
    text-decoration: none !important;
    border: 1px solid transparent;
}

.locale-switcher a:hover,
.locale-switcher a.active {
    color: var(--accent-ink) !important;
    background: var(--accent-soft) !important;
}

.locale-switcher a.active {
    border-color: rgba(0, 113, 227, 0.22);
}

/* Floating language switcher (Heritage-style pill, MultiSoc light theme) */
.locale-floating {
    position: fixed;
    z-index: 90;
    left: max(var(--space-3), env(safe-area-inset-left));
    bottom: max(var(--space-3), env(safe-area-inset-bottom));
    font-size: 0.875rem;
}

body:has(.cookie-banner) .locale-floating {
    bottom: max(7.5rem, calc(env(safe-area-inset-bottom) + 6.5rem));
}

.locale-floating-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    padding: 0.45rem 0.7rem 0.45rem 0.55rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.92);
    color: var(--text);
    font: inherit;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    transition:
        border-color var(--duration) var(--ease-out),
        box-shadow var(--duration) var(--ease-out),
        background var(--duration) var(--ease-out);
}

.locale-floating-trigger:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-md);
}

.locale-floating-trigger:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

.locale-floating-globe {
    display: flex;
    flex-shrink: 0;
    color: var(--accent);
}

.locale-floating-label {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.15;
    text-align: left;
}

.locale-floating-title {
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.locale-floating-current {
    max-width: 9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.locale-floating-chevron {
    display: flex;
    flex-shrink: 0;
    opacity: 0.55;
    transition: transform var(--duration) var(--ease-out);
}

.locale-floating.is-open .locale-floating-chevron {
    transform: rotate(180deg);
}

.locale-floating-panel {
    position: absolute;
    left: 0;
    bottom: calc(100% + 10px);
    display: flex;
    flex-direction: column;
    min-width: min(16.5rem, calc(100vw - 1.5rem));
    max-width: min(20rem, calc(100vw - 1.5rem));
    max-height: min(70vh, 22rem);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    animation: panel-in 0.28s var(--ease-spring) both;
}

.locale-floating-panel[hidden] {
    display: none !important;
}

.locale-floating-list {
    list-style: none;
    margin: 0;
    padding: 0.35rem 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.locale-floating-list > li {
    margin: 0;
}

.locale-floating-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.65rem 1rem;
    color: var(--text-secondary) !important;
    font-weight: 500;
    text-decoration: none !important;
    transition: background 0.15s var(--ease-out), color 0.15s var(--ease-out);
}

.locale-floating-option:hover,
.locale-floating-option:focus-visible {
    background: var(--accent-soft);
    color: var(--text) !important;
    outline: none;
}

.locale-floating-option.is-current {
    color: var(--accent-ink) !important;
    font-weight: 600;
}

.locale-floating-option-label {
    line-height: 1.25;
}

.locale-floating-check {
    flex-shrink: 0;
    color: var(--accent);
    font-weight: 700;
    font-size: 0.95rem;
}

html[dir="rtl"] .locale-floating {
    left: auto;
    right: max(var(--space-3), env(safe-area-inset-right));
}

html[dir="rtl"] .locale-floating-panel {
    left: auto;
    right: 0;
}

html[dir="rtl"] .locale-floating-label {
    align-items: flex-end;
    text-align: right;
}

html[dir="rtl"] .footer-brand {
    margin-right: 0;
    margin-left: auto;
}

.site-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-3) var(--space-5);
    margin-top: var(--space-10);
    padding-top: var(--space-5);
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    margin-right: auto;
}

.footer-brand img {
    display: block;
    height: 2.25rem;
    width: auto;
    background: #000;
}

.footer-brand:hover {
    text-decoration: none;
    opacity: 0.85;
}

.footer-copy {
    color: var(--muted);
    margin-left: auto;
}

.site-footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3) var(--space-5);
}

.site-footer a {
    color: var(--muted);
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--text);
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

body.is-landing .site-footer {
    position: relative;
    z-index: 1;
    margin-top: 0;
    padding: var(--space-5)
        max(var(--space-5), calc((100vw - var(--shell-max)) / 2 + var(--space-5)))
        var(--space-6);
}

.cookie-banner {
    position: fixed;
    z-index: 80;
    left: var(--space-4);
    right: auto;
    bottom: var(--space-4);
    max-width: 22rem;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    animation: panel-in 0.4s var(--ease-spring) both;
}

.cookie-banner p {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.45;
}

.cookie-banner-actions {
    display: flex;
    justify-content: flex-end;
}

.cookie-banner-actions .btn {
    min-width: 8.5rem;
}

html[dir="rtl"] .cookie-banner {
    left: auto;
    right: var(--space-4);
}

@media (max-width: 719px) {
    .cookie-banner {
        left: var(--space-3);
        right: var(--space-3);
        max-width: none;
        bottom: var(--space-3);
    }

    html[dir="rtl"] .cookie-banner {
        left: var(--space-3);
        right: var(--space-3);
    }

    body:has(.cookie-banner) .locale-floating {
        bottom: max(9rem, calc(env(safe-area-inset-bottom) + 8rem));
    }
}

.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-4);
    align-items: center;
    margin: var(--space-3) 0 var(--space-5);
    font-size: 0.875rem;
    color: var(--muted);
}

.caption-body {
    font-size: 1rem;
    line-height: 1.55;
    margin: 0 0 var(--space-5);
    white-space: pre-wrap;
}

.privacy-doc h2 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin: var(--space-6) 0 var(--space-3);
}

.privacy-doc p {
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 46rem;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

    [data-reveal] {
        opacity: 1;
        transform: none;
    }

    .landing-visual,
    .landing-visual-glow {
        animation: none !important;
        opacity: 1;
        transform: none;
        filter: none;
    }

    .btn.is-loading::before {
        animation: none !important;
        border-right-color: currentColor;
        opacity: 0.5;
    }
}
