/* Montserrat is served from the same origin: the document pages
   must not make requests to third-party hosts. */

@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/montserrat-400-cyrillic.woff2') format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/montserrat-400-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('fonts/montserrat-500-cyrillic.woff2') format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('fonts/montserrat-500-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('fonts/montserrat-600-cyrillic.woff2') format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('fonts/montserrat-600-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('fonts/montserrat-700-cyrillic.woff2') format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('fonts/montserrat-700-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    /* Host insets (native toolbar / bottom bar overlays) */
    --inset-top: 0px;
    --inset-bottom: 0px;

    /* Primary */
    --primary-default: #610BEF;
    --primary-default-strong: #4700AB;
    --primary-default-weak: #A996FF;
    --primary-background-strong: #BFBEFC;

    /* Grayscale */
    --grayscale-header: #14142B;
    --grayscale-header-weak: #262338;
    --grayscale-body: #4E4B66;
    --grayscale-label: #6E7191;
    --grayscale-placeholder: #A0A3BD;
    --grayscale-line: #D9DBE9;
    --grayscale-input: #EFF0F6;
    --grayscale-bg-weak: #F7F7FC;
    --grayscale-bg: #FCFCFC;

    /* Warning */
    --warning-default: #EAAC30;
    --warning-default-strong: #946300;
    --warning-bg-strong: #FFE6B0;
    --warning-bg: #FFF8E9;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--grayscale-body);
    background: var(--grayscale-bg-weak);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 720px;
    margin: 0 auto;
    padding: calc(40px + var(--inset-top)) 24px calc(80px + var(--inset-bottom));
}

/* Language Switch */

.lang-switch {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-bottom: 32px;
}

.lang-btn {
    font-family: 'Montserrat', sans-serif;
    padding: 8px 20px;
    border: 1px solid var(--grayscale-line);
    border-radius: 12px;
    background: var(--grayscale-bg);
    color: var(--grayscale-body);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.lang-btn:hover {
    border-color: var(--primary-default-weak);
    color: var(--primary-default);
    background: var(--grayscale-bg-weak);
}

.lang-btn.active {
    background: var(--primary-default);
    border-color: var(--primary-default);
    color: #fff;
}

/* Typography */

h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--grayscale-header);
    margin-bottom: 8px;
    line-height: 1.3;
}

h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--grayscale-header-weak);
    margin-top: 32px;
    margin-bottom: 12px;
    line-height: 1.4;
}

h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 17px;
    font-weight: 600;
    color: var(--grayscale-header-weak);
    margin-top: 24px;
    margin-bottom: 8px;
    line-height: 1.4;
}

.effective-date {
    color: var(--grayscale-label);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 32px;
}

code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.9em;
    background: var(--grayscale-input);
    padding: 1px 6px;
    border-radius: 6px;
    color: var(--grayscale-header-weak);
    word-break: break-all;
}

p, li {
    font-size: 17px;
    font-weight: 400;
    margin-bottom: 12px;
    color: var(--grayscale-body);
    line-height: 1.65;
}

ul, ol {
    padding-left: 24px;
    margin-bottom: 16px;
}

li {
    margin-bottom: 8px;
}

/* Blocks */

.highlight {
    background: var(--grayscale-bg-weak);
    border-left: 3px solid var(--primary-default);
    padding: 16px 20px;
    border-radius: 0 12px 12px 0;
    margin: 16px 0;
}

.highlight p {
    margin-bottom: 0;
}

.warning {
    background: var(--warning-bg);
    border-left: 3px solid var(--warning-default);
    padding: 16px 20px;
    border-radius: 0 12px 12px 0;
    margin: 16px 0;
}

.warning p {
    margin-bottom: 0;
}

/* Placeholders — must be replaced before publishing */

.placeholder {
    background: var(--warning-bg-strong);
    border-bottom: 2px solid var(--warning-default);
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 600;
    color: var(--warning-default-strong);
    white-space: nowrap;
}

/* Tables */

.table-scroll {
    overflow-x: auto;
    margin: 16px 0;
    -webkit-overflow-scrolling: touch;
}

table {
    border-collapse: collapse;
    width: 100%;
    min-width: 520px;
}

th,
td {
    text-align: left;
    vertical-align: top;
    padding: 10px 12px;
    border-bottom: 1px solid var(--grayscale-line);
    font-size: 15px;
    line-height: 1.5;
}

th {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: var(--grayscale-header-weak);
    background: var(--grayscale-input);
    border-bottom: 2px solid var(--grayscale-line);
}

td strong {
    color: var(--grayscale-header-weak);
}

/* Links */

a {
    color: var(--primary-default);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-default-strong);
    text-decoration: underline;
}

/* Footer */

.footer {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--grayscale-line);
    text-align: center;
}

.footer a {
    font-size: 14px;
}

/* Mobile */

@media (max-width: 480px) {
    .container {
        padding: calc(16px + var(--inset-top)) 20px calc(40px + var(--inset-bottom));
    }

    h1 {
        font-size: 18px;
    }

    h2 {
        font-size: 14px;
        margin-top: 24px;
        margin-bottom: 8px;
    }

    h3 {
        font-size: 13px;
        margin-top: 18px;
        margin-bottom: 6px;
    }

    p, li {
        font-size: 13px;
    }

    .effective-date {
        font-size: 11px;
        margin-bottom: 24px;
    }

    .lang-btn {
        padding: 6px 14px;
        font-size: 11px;
    }

    .lang-switch {
        margin-bottom: 24px;
    }

    .highlight,
    .warning {
        padding: 12px 16px;
    }

    th,
    td {
        font-size: 12px;
        padding: 8px 10px;
    }

    table {
        min-width: 460px;
    }
}

/* Utility */

.hidden {
    display: none;
}
