:root {
    color-scheme: light;
    --bg: #f5f6f8;
    --surface: #ffffff;
    --surface-soft: #f0f6ff;
    --text: #191c20;
    --muted: #616973;
    --line: #dfe3e8;
    --accent: #1769e0;
    --accent-dark: #0e4fae;
    --focus: #ffbf47;
    --summary: #e7f1ff;
    --warning: #fff6db;
    --max: 1080px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 88px;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 17px;
    line-height: 1.62;
    text-rendering: optimizeLegibility;
}

a {
    color: var(--accent-dark);
    text-underline-offset: 0.16em;
}

a:hover {
    text-decoration-thickness: 2px;
}

a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid rgba(23, 28, 35, 0.12);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(14px);
}

.topbar-inner {
    width: min(100% - 32px, var(--max));
    min-height: 64px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--text);
    font-weight: 800;
    letter-spacing: -0.02em;
    text-decoration: none;
}

.brand-logo {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    object-fit: cover;
}

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

.doc-link {
    font-size: 0.88rem;
    font-weight: 650;
    text-decoration: none;
    white-space: nowrap;
}

.lang-switcher {
    display: inline-flex;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--bg);
}

.lang-switcher button {
    min-width: 44px;
    min-height: 36px;
    padding: 6px 10px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 750;
}

.lang-switcher button.active {
    background: var(--text);
    color: #fff;
}

.document {
    width: min(100% - 32px, var(--max));
    margin: 0 auto;
    padding: 46px 0 72px;
}

.document[hidden] {
    display: none;
}

.hero {
    padding: clamp(26px, 6vw, 58px);
    border-radius: 24px;
    background: var(--surface);
    box-shadow: 0 12px 36px rgba(22, 31, 43, 0.07);
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--accent-dark);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

h1 {
    max-width: 820px;
    margin: 0;
    font-size: clamp(2.05rem, 7vw, 4.25rem);
    line-height: 1.04;
    letter-spacing: -0.045em;
}

.lead {
    max-width: 760px;
    margin: 24px 0 0;
    color: var(--muted);
    font-size: clamp(1.05rem, 2.6vw, 1.28rem);
    line-height: 1.5;
}

.meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin-top: 26px;
    color: var(--muted);
    font-size: 0.88rem;
}

.quick-read {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 28px;
}

.quick-card {
    padding: 18px;
    border-radius: 16px;
    background: var(--surface-soft);
}

.quick-card strong {
    display: block;
    margin-bottom: 5px;
    font-size: 0.96rem;
    line-height: 1.25;
}

.quick-card span {
    display: block;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.45;
}

.toc {
    display: flex;
    gap: 8px;
    margin: 20px 0 0;
    padding: 0 2px 10px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.toc a {
    flex: 0 0 auto;
    padding: 9px 13px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
    font-size: 0.83rem;
    font-weight: 650;
    text-decoration: none;
}

.legal-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 250px;
    gap: clamp(28px, 6vw, 70px);
    margin-top: 28px;
    padding: clamp(24px, 5vw, 48px);
    border-radius: 20px;
    background: var(--surface);
}

.legal-copy {
    min-width: 0;
}

h2 {
    margin: 0 0 20px;
    font-size: clamp(1.42rem, 3.5vw, 2rem);
    line-height: 1.2;
    letter-spacing: -0.025em;
}

h3 {
    margin: 26px 0 8px;
    font-size: 1.04rem;
    line-height: 1.35;
}

p {
    margin: 0 0 14px;
}

ul,
ol {
    margin: 10px 0 18px;
    padding-left: 1.25em;
}

li {
    margin: 7px 0;
    padding-left: 0.2em;
}

.section-summary {
    align-self: start;
    position: sticky;
    top: 88px;
    padding: 18px;
    border-radius: 15px;
    background: var(--summary);
    color: #12345c;
    font-size: 0.9rem;
    line-height: 1.5;
}

.section-summary strong {
    display: block;
    margin-bottom: 7px;
    color: #0d3971;
    font-size: 0.77rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.note {
    margin: 20px 0;
    padding: 16px 18px;
    border-left: 4px solid var(--accent);
    border-radius: 0 12px 12px 0;
    background: var(--surface-soft);
}

.note.warning {
    border-left-color: #d79500;
    background: var(--warning);
}

.table-wrap {
    width: 100%;
    margin: 18px 0;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 13px;
}

table {
    width: 100%;
    min-width: 620px;
    border-collapse: collapse;
    font-size: 0.92rem;
    line-height: 1.45;
}

th,
td {
    padding: 13px 15px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

th {
    background: #f4f6f8;
    font-size: 0.8rem;
    letter-spacing: 0.02em;
}

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

.contact-card {
    display: grid;
    gap: 8px;
    margin-top: 18px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
}

.footer {
    margin-top: 28px;
    padding: 24px 4px 0;
    color: var(--muted);
    font-size: 0.86rem;
}

@media (max-width: 800px) {
    body {
        font-size: 16px;
    }

    html {
        scroll-padding-top: 74px;
    }

    .topbar-inner {
        width: min(100% - 24px, var(--max));
        min-height: 58px;
    }

    .doc-link {
        display: none;
    }

    .document {
        width: min(100% - 20px, var(--max));
        padding: 14px 0 48px;
    }

    .hero {
        padding: 25px 20px;
        border-radius: 18px;
    }

    .quick-read {
        grid-template-columns: 1fr;
    }

    .legal-section {
        grid-template-columns: 1fr;
        gap: 18px;
        margin-top: 12px;
        padding: 24px 20px;
        border-radius: 16px;
    }

    .section-summary {
        grid-row: 1;
        position: static;
    }

    .legal-copy {
        grid-row: 2;
    }

    .toc {
        margin-top: 12px;
    }

    table {
        min-width: 560px;
    }
}

@media (max-width: 420px) {
    .topbar-inner {
        width: calc(100% - 18px);
    }

    .brand {
        font-size: 0.95rem;
    }

    .lang-switcher button {
        min-width: 40px;
        min-height: 34px;
    }

    .document {
        width: calc(100% - 12px);
    }

    .hero,
    .legal-section {
        padding-left: 17px;
        padding-right: 17px;
    }

    .meta {
        display: grid;
        gap: 4px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

@media print {
    .topbar,
    .toc {
        display: none;
    }

    body {
        background: #fff;
        color: #000;
        font-size: 11pt;
    }

    .document {
        width: 100%;
        padding: 0;
    }

    .hero,
    .legal-section {
        box-shadow: none;
        break-inside: avoid;
    }

    .legal-section {
        grid-template-columns: 1fr 210px;
        border: 1px solid #bbb;
    }

    .section-summary {
        position: static;
    }
}
