:root {
    color-scheme: dark;
    --bg: #041b34;
    --bg-deep: #06182e;
    --surface: #082440;
    --surface-soft: #0b2e46;
    --line: rgba(198, 107, 255, 0.26);
    --text: #f4f7fb;
    --muted: #b9c7d6;
    --purple: #a24bff;
    --violet: #c66bff;
    --magenta: #ff5bcf;
    --gold: #f7c86b;
    --shadow: 0 22px 58px rgba(0, 0, 0, 0.32);
    --display-font: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
    --body-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        linear-gradient(180deg, rgba(162, 75, 255, 0.08), transparent 28rem),
        var(--bg);
    color: var(--text);
    font-family: var(--body-font);
    font-size: 16px;
    line-height: 1.7;
}

body::selection {
    background: var(--magenta);
    color: #ffffff;
}

a {
    color: inherit;
}

img {
    display: block;
    max-width: 100%;
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: -5rem;
    z-index: 20;
    background: var(--gold);
    color: #06182e;
    padding: 0.6rem 0.9rem;
    border-radius: 6px;
}

.skip-link:focus {
    top: 1rem;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(4, 27, 52, 0.9);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

.header-inner {
    width: min(1180px, calc(100% - 32px));
    min-height: 78px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand-link img,
.footer-logo img {
    width: 90px;
    height: auto;
    max-height: none;
}

.site-nav > ul {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-item {
    position: relative;
}

.nav-item > a,
.nav-item > button {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    font: 700 0.9rem/1 var(--body-font);
    letter-spacing: 0.02em;
    padding: 0 12px;
    text-decoration: none;
    cursor: pointer;
}

.nav-item.is-active > a,
.nav-item.is-active > button,
.nav-item > a:hover,
.nav-item > button:hover,
.nav-item:focus-within > a,
.nav-item:focus-within > button {
    background: rgba(198, 107, 255, 0.14);
    color: #ffffff;
}

.dropdown {
    position: absolute;
    left: 0;
    top: calc(100% + 10px);
    min-width: 210px;
    margin: 0;
    padding: 8px;
    list-style: none;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #06182e;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}

.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown a {
    display: block;
    border-radius: 6px;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.35;
    padding: 10px 12px;
    text-decoration: none;
}

.dropdown a:hover,
.dropdown a:focus {
    background: rgba(255, 91, 207, 0.12);
    color: #ffffff;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border-radius: 8px;
    font-weight: 800;
    line-height: 1;
    padding: 0 18px;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.button:hover,
.button:focus {
    transform: translateY(-2px);
}

.button-primary {
    background: linear-gradient(180deg, var(--violet), var(--purple));
    color: #ffffff;
    box-shadow: 0 10px 28px rgba(162, 75, 255, 0.36);
}

.button-primary:hover,
.button-primary:focus {
    box-shadow: 0 16px 34px rgba(255, 91, 207, 0.32);
}

.button-secondary {
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
}

.menu-toggle {
    display: none;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    font-weight: 800;
    min-height: 42px;
    padding: 0 14px;
}

.hero {
    position: relative;
    min-height: clamp(430px, 68vh, 560px);
    display: grid;
    align-items: end;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

.hero img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(4, 27, 52, 0.94) 0%, rgba(4, 27, 52, 0.64) 45%, rgba(4, 27, 52, 0.28) 100%),
        linear-gradient(180deg, transparent 45%, rgba(4, 27, 52, 0.92) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 68px 0 54px;
}

.hero h1,
.content-wrap h2,
.content-wrap h3 {
    font-family: var(--display-font);
    font-weight: 900;
    line-height: 0.95;
    text-transform: uppercase;
}

.hero h1 {
    max-width: 860px;
    margin: 18px 0 18px;
    font-size: clamp(42px, 8vw, 67px);
}

.hero p {
    max-width: 680px;
    margin: 0;
    color: #e8eef6;
    font-size: clamp(16px, 2vw, 20px);
}

.hero-cta {
    margin-top: 26px;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #d8e2ee;
    font-size: 0.86rem;
}

.breadcrumbs a {
    color: #ffffff;
    text-decoration: none;
}

.breadcrumbs a:hover,
.breadcrumbs a:focus {
    color: var(--gold);
}

.content-wrap {
    width: min(880px, calc(100% - 32px));
    margin: 0 auto;
    padding: 52px 0 76px;
}

.table-of-contents {
    margin-bottom: 44px;
    padding: 22px 24px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(8, 36, 64, 0.68);
}

.table-of-contents strong {
    display: block;
    margin-bottom: 10px;
    color: #ffffff;
}

.table-of-contents ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.table-of-contents a {
    color: var(--gold);
    font-weight: 700;
    text-decoration: none;
}

.article-section {
    margin-top: 46px;
}

.article-section:first-of-type {
    margin-top: 0;
}

.faq-cta {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(162, 75, 255, 0.18), rgba(255, 91, 207, 0.08));
}

.faq-cta .button {
    margin-top: 8px;
}

.article-content img,
.content-wrap img {
    height: auto;
    margin: 24px 0;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(8, 36, 64, 0.72);
}

.content-wrap h2 {
    margin: 0 0 18px;
    color: #ffffff;
    font-size: clamp(34px, 5vw, 48px);
}

.content-wrap h3 {
    margin: 28px 0 10px;
    color: #ffffff;
    font-size: clamp(25px, 4vw, 34px);
}

.content-wrap p,
.content-wrap li,
.content-wrap td,
.content-wrap th {
    font-size: 16px;
}

.content-wrap p {
    margin: 0 0 16px;
    color: var(--muted);
}

.content-wrap a {
    color: var(--gold);
    font-weight: 700;
}

.content-wrap ul,
.content-wrap ol {
    display: grid;
    gap: 8px;
    margin: 0;
    padding-left: 1.3rem;
    color: var(--muted);
}

.table-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--line);
    border-radius: 8px;
}

table {
    width: 100%;
    min-width: min(640px, 100%);
    border-collapse: collapse;
    table-layout: auto;
    background: rgba(6, 24, 46, 0.82);
}

th,
td {
    border-bottom: 1px solid rgba(198, 107, 255, 0.18);
    padding: 14px 16px;
    text-align: left;
    vertical-align: top;
}

th {
    background: rgba(255, 91, 207, 0.1);
    color: #ffffff;
}

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

tr:last-child td {
    border-bottom: 0;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: #06182e;
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 38px 0;
    display: grid;
    gap: 22px;
}

.footer-inner nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 22px;
}

.footer-inner a {
    color: #ffffff;
    font-weight: 700;
    text-decoration: none;
}

.footer-inner a:hover,
.footer-inner a:focus {
    color: var(--gold);
}

.footer-inner p {
    max-width: 840px;
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

@media (max-width: 920px) {
    .header-inner {
        min-height: 68px;
        flex-wrap: wrap;
        gap: 12px;
        padding: 12px 0;
    }

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-left: auto;
    }

    .site-nav {
        display: none;
        width: 100%;
        order: 4;
    }

    .site-nav.is-open {
        display: block;
    }

    .site-nav > ul {
        display: grid;
        gap: 6px;
        padding: 10px 0;
    }

    .nav-item > a,
    .nav-item > button {
        width: 100%;
        justify-content: space-between;
        background: rgba(255, 255, 255, 0.05);
    }

    .dropdown {
        position: static;
        min-width: 0;
        margin-top: 6px;
        padding: 6px;
        border-color: rgba(255, 255, 255, 0.12);
        background: rgba(6, 24, 46, 0.7);
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    .header-actions {
        order: 3;
    }
}

@media (max-width: 640px) {
    body {
        font-size: 15.5px;
    }

    .header-inner,
    .hero-content,
    .content-wrap,
    .footer-inner {
        width: min(100% - 24px, 1180px);
    }

    .header-actions {
        width: 100%;
    }

    .header-actions .button {
        flex: 1;
        padding: 0 12px;
    }

    .hero {
        min-height: 390px;
    }

    .hero-content {
        padding: 42px 0 36px;
    }

    .hero h1 {
        margin-top: 14px;
    }

    .content-wrap {
        padding: 36px 0 56px;
    }

    .table-of-contents {
        padding: 18px;
    }

    .table-of-contents ul {
        display: grid;
    }

    .article-section {
        margin-top: 36px;
    }

    .content-wrap p,
    .content-wrap li,
    .content-wrap td,
    .content-wrap th {
        font-size: 15.5px;
    }
}
