:root {
    color-scheme: dark;
    --shell-page-bg: #0d0d10;
    --shell-surface: #15151a;
    --shell-surface-hover: #1d1d23;
    --shell-border: rgba(255, 255, 255, 0.11);
    --shell-text: #f7f7f8;
    --shell-muted: #a7a7b1;
    --shell-accent: #ef2b2f;
    --shell-content-width: 1200px;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: var(--shell-page-bg);
}

body {
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(circle at 50% -20%, rgba(239, 43, 47, 0.12), transparent 32rem),
        var(--shell-page-bg);
    color: var(--shell-text);
    font-family: ui-monospace, "SFMono-Regular", "SF Mono", Menlo, Consolas, monospace;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
}

.site-header,
.site-footer {
    width: 100%;
}

.site-header {
    position: relative;
    z-index: 10;
    background: var(--bg-dark, var(--shell-page-bg));
}

.site-header__inner,
.site-footer__inner {
    width: min(calc(100% - 48px), var(--shell-content-width));
    margin-inline: auto;
}

.site-header__inner {
    min-height: 88px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
}

.site-logo img {
    display: block;
    width: 202px;
    height: auto;
}

.back-link {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 18px;
    border: 1px solid var(--shell-border);
    border-radius: 12px;
    background: var(--shell-surface);
    color: var(--shell-text);
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.back-link:hover {
    border-color: rgba(255, 255, 255, 0.24);
    background: var(--shell-surface-hover);
    transform: translateY(-1px);
}

.back-link:focus-visible {
    outline: 3px solid rgba(239, 43, 47, 0.4);
    outline-offset: 3px;
}

.back-link svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
}

.site-footer {
    color: var(--shell-muted);
}

.site-footer__inner {
    min-height: 88px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
    text-align: center;
    font-size: 13px;
    line-height: 1.5;
}

@media (max-width: 640px) {
    .site-header__inner,
    .site-footer__inner,
    .site-header__inner {
        min-height: 72px;
        gap: 16px;
    }

    .site-logo img {
        width: 146px;
    }

    .back-link {
        width: 44px;
        min-height: 44px;
        padding: 0;
        border-radius: 11px;
    }

    .back-link span {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .site-footer__inner {
        min-height: 72px;
        font-size: 11px;
    }
}

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


.case-page {
    width: 100%;
    flex: 1;
    padding: 16px 0;
    background: transparent;
}

.case-page > .casesn-landing {
    width: min(calc(100% - 64px), 1480px);
    min-height: 0;
    margin-inline: auto;
    padding: 24px;
    overflow: hidden;
    border-radius: 32px;
    background: var(--bg-light, #f0f0f0);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.18);
}

@media (max-width: 760px) {
    .case-page {
        padding: 8px 0;
    }

    .case-page > .casesn-landing {
        width: calc(100% - 20px);
        padding: 10px;
        border-radius: 20px;
    }
}

.topic-shell > .topic-page {width:min(calc(100% - 64px),1480px);margin-inline:auto;padding:24px;border-radius:32px;background:#f0f0f0;color:#141418;overflow:hidden;}
@media(max-width:767px){.topic-shell > .topic-page{width:calc(100% - 20px);padding:10px;border-radius:20px;}}
