﻿:root {
    --bg-top: #04070c;
    --bg-bottom: #071828;
    --surface: #0b1521;
    --surface-soft: #102033;
    --border: rgba(66, 183, 255, 0.16);
    --text: #E9FBFB;
    --muted: #A9B8CC;
    --accent: #42b7ff;
    --max-width: 820px;
    --radius: 20px;
    --shadow: 0 18px 36px rgba(2, 11, 12, 0.26);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 10% -15%, rgba(66, 183, 255, 0.12), transparent 42%),
        radial-gradient(circle at 85% 10%, rgba(105, 240, 138, 0.08), transparent 26%),
        linear-gradient(160deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
    line-height: 1.68;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(10px);
    background: rgba(5, 8, 12, 0.8);
    border-bottom: 1px solid rgba(66, 183, 255, 0.12);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-weight: 700;
    font-size: 1.1rem;
}

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

.brand-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
}

.header-links {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-links a {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 12px;
    border-radius: 12px;
    color: var(--muted);
    font-size: 0.95rem;
    transition: background 180ms ease, color 180ms ease;
}

.header-links a:hover,
.header-links a:focus-visible {
    color: var(--text);
    background: rgba(55, 214, 200, 0.12);
    text-decoration: none;
}

.terms-layout {
    width: min(1120px, calc(100% - 32px));
    margin: 28px auto 80px;
    display: grid;
    grid-template-columns: 270px minmax(0, var(--max-width));
    justify-content: center;
    gap: 28px;
}

.toc-desktop {
    position: sticky;
    top: 96px;
    align-self: start;
}

.toc-card {
    border-radius: 18px;
    background: rgba(8, 16, 26, 0.86);
    border: 1px solid var(--border);
    padding: 18px;
    box-shadow: var(--shadow);
}

.toc-label {
    margin: 0 0 12px;
    font-size: 0.78rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--muted);
}

.toc-card ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.toc-card a {
    display: block;
    padding: 8px 10px;
    border-radius: 10px;
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.35;
    border: 1px solid transparent;
}

.toc-card a:hover,
.toc-card a:focus-visible {
    color: var(--text);
    background: rgba(66, 183, 255, 0.12);
    text-decoration: none;
}

.toc-card a.active {
    color: var(--text);
    border-color: rgba(66, 183, 255, 0.28);
    background: rgba(66, 183, 255, 0.16);
}

.terms-content {
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(10, 18, 30, 0.96) 0%, rgba(8, 14, 23, 0.96) 100%);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    padding: 34px 34px 24px;
}

.terms-hero {
    border-bottom: 1px solid rgba(169, 200, 200, 0.22);
    padding-bottom: 20px;
    margin-bottom: 8px;
}

.kicker {
    margin: 0;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.76rem;
}

h1 {
    margin: 10px 0 12px;
    font-size: clamp(2rem, 4.9vw, 2.75rem);
    line-height: 1.15;
    letter-spacing: -0.01em;
}

.last-updated {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.toc-mobile {
    display: none;
    margin-top: 18px;
    border-radius: 14px;
    border: 1px solid rgba(66, 183, 255, 0.2);
    background: rgba(7, 14, 22, 0.72);
    overflow: hidden;
}

.toc-mobile summary {
    cursor: pointer;
    padding: 13px 14px;
    font-weight: 600;
}

.toc-mobile ul {
    list-style: none;
    margin: 0;
    padding: 0 10px 10px;
}

.toc-mobile a {
    display: block;
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 0.92rem;
    color: var(--muted);
}

.toc-mobile a.active {
    color: var(--text);
    background: rgba(66, 183, 255, 0.16);
}

.term-section {
    padding: 26px 0 18px;
    border-bottom: 1px solid rgba(169, 200, 200, 0.16);
    scroll-margin-top: 112px;
}

.term-section:last-child {
    border-bottom: none;
    padding-bottom: 4px;
}

h2 {
    margin: 0 0 12px;
    font-size: clamp(1.28rem, 2.8vw, 1.62rem);
    line-height: 1.25;
    letter-spacing: -0.01em;
}

p {
    margin: 0 0 12px;
    color: var(--text);
}

ul {
    margin: 0 0 12px 18px;
    padding: 0;
}

li {
    margin-bottom: 8px;
    color: var(--text);
}

strong {
    color: var(--text);
}

.site-footer {
    border-top: 1px solid rgba(66, 183, 255, 0.14);
    background: rgba(3, 8, 12, 0.86);
}

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

.footer-inner p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

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

.footer-inner nav a {
    color: var(--muted);
    font-size: 0.92rem;
}

.footer-inner nav a:hover,
.footer-inner nav a:focus-visible {
    color: var(--text);
    text-decoration: none;
}

@media (max-width: 1080px) {
    .terms-layout {
        grid-template-columns: minmax(0, var(--max-width));
    }

    .toc-desktop {
        display: none;
    }

    .toc-mobile {
        display: block;
    }
}

@media (max-width: 760px) {
    .header-inner {
        min-height: 66px;
        width: calc(100% - 22px);
    }

    .header-links {
        gap: 2px;
    }

    .header-links a {
        min-height: 38px;
        padding: 0 8px;
        font-size: 0.86rem;
    }

    .terms-layout {
        margin-top: 14px;
        width: calc(100% - 20px);
    }

    .terms-content {
        padding: 22px 16px 16px;
        border-radius: 18px;
    }

    .term-section {
        scroll-margin-top: 90px;
    }

    .footer-inner {
        width: calc(100% - 22px);
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        padding: 14px 0;
    }
}
