:root {
    --ink: #172033;
    --muted: #5d6575;
    --line: #dfe3ea;
    --paper: #ffffff;
    --canvas: #f6f7fb;

    --accent: #7b1837;
    --accent-dark: #5f1029;
    --accent-soft: #fff1f5;

    --info: #174c67;
    --info-soft: #eef8fc;

    --warning: #7a4d00;
    --warning-soft: #fff7e7;

    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--canvas);
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    font-size: 17px;
    line-height: 1.72;
}

button,
input,
select,
textarea {
    font: inherit;
}

a {
    color: var(--accent);
    text-underline-offset: 3px;
}

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

[hidden] {
    display: none !important;
}

.shell {
    width: min(1120px, calc(100% - 36px));
    margin-inline: auto;
}

/* Accessibility */

.skip-link {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 100;
    padding: 10px 14px;
    color: #ffffff;
    background: var(--ink);
    border-radius: 8px;
    transform: translateY(-160%);
}

.skip-link:focus {
    transform: none;
}

/* Draft warning */

.draft-warning {
    padding: 10px 18px;
    color: #442b00;
    background: #ffe7a8;
    border-bottom: 1px solid #e4bd58;
    text-align: center;
    font-size: 14px;
}

/* Header */

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.header-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    flex-shrink: 0;
    color: var(--ink);
    font-size: 22px;
    font-weight: 850;
    letter-spacing: -0.03em;
    text-decoration: none;
}

.site-header nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px 22px;
}

.site-header nav a {
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.site-header nav a:hover,
.site-header nav a:focus-visible {
    color: var(--accent);
}

/* Legal page */

.legal-layout {
    padding-block: 58px 80px;
}

.legal-document {
    max-width: 860px;
    margin: auto;
    padding: clamp(26px, 5vw, 64px);
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 18px 60px rgba(23, 32, 51, 0.07);
}

/* Language switcher */

.language-switcher {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 0 0 28px;
    padding: 4px;
    background: #f0f1f5;
    border: 1px solid var(--line);
    border-radius: 999px;
}

.language-button {
    min-height: 42px;
    padding: 8px 18px;
    color: var(--muted);
    background: transparent;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.2;
    transition:
        color 0.18s ease,
        background-color 0.18s ease,
        box-shadow 0.18s ease;
}

.language-button:hover {
    color: var(--accent);
}

.language-button.is-active {
    color: #ffffff;
    background: var(--accent);
    box-shadow: 0 3px 10px rgba(123, 24, 55, 0.2);
}

.language-button:focus-visible {
    outline: 3px solid rgba(123, 24, 55, 0.25);
    outline-offset: 2px;
}

/* Legal content */

.eyebrow {
    color: var(--accent);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

h1,
h2,
h3 {
    color: var(--ink);
    line-height: 1.22;
    letter-spacing: -0.025em;
}

h1 {
    max-width: 720px;
    margin: 10px 0 16px;
    font-size: clamp(35px, 6vw, 58px);
}

h2 {
    margin: 48px 0 14px;
    padding-top: 8px;
    font-size: clamp(23px, 4vw, 31px);
}

h3 {
    margin: 28px 0 8px;
    font-size: 20px;
}

p,
li {
    color: #333c4f;
}

.lead {
    max-width: 720px;
    color: var(--muted);
    font-size: 20px;
}

.meta {
    margin: 24px 0 42px;
    color: var(--muted);
    font-size: 14px;
}

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

li + li {
    margin-top: 7px;
}

/* Notices */

.notice {
    margin: 26px 0;
    padding: 18px 20px;
    background: var(--accent-soft);
    border-left: 4px solid var(--accent);
    border-radius: 10px;
}

.notice.info {
    background: var(--info-soft);
    border-color: var(--info);
}

.notice.warning {
    background: var(--warning-soft);
    border-color: #d5941a;
}

.notice p:first-child,
.notice h2:first-child,
.notice h3:first-child {
    margin-top: 0;
}

.notice p:last-child {
    margin-bottom: 0;
}

/* Tables */

.table-wrap {
    max-width: 100%;
    margin: 20px 0 30px;
    overflow-x: auto;
    border-radius: 10px;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
    font-size: 15px;
}

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

th {
    color: var(--ink);
    background: #f4f5f8;
}

code {
    font-size: 0.9em;
}

/* Footer */

.site-footer {
    padding: 0 0 42px;
    color: var(--muted);
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(180px, 0.8fr) minmax(280px, 1.4fr);
    gap: 28px 48px;
    align-items: start;
    padding-top: 32px;
    border-top: 1px solid var(--line);
}

.footer-company {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.footer-company strong {
    color: var(--ink);
    font-size: 14px;
    letter-spacing: 0.02em;
}

.footer-tagline {
    color: var(--muted);
    font-size: 14px;
}

.footer-legal-navigation {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px 20px;
}

.footer-legal-navigation a {
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.footer-legal-navigation a:hover,
.footer-legal-navigation a:focus-visible {
    color: var(--accent);
    text-decoration: underline;
}

/* ANPC and SAL */

.footer-consumer-protection {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 12px;
    padding-top: 6px;
}

.consumer-protection-link {
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    color: var(--ink);
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 10px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 750;
    line-height: 1.3;
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.18s ease;
}

.consumer-protection-link:hover {
    color: var(--accent);
    border-color: rgba(123, 24, 55, 0.38);
    box-shadow: 0 7px 18px rgba(23, 32, 51, 0.08);
    transform: translateY(-1px);
}

.consumer-protection-link:focus-visible {
    outline: 3px solid rgba(123, 24, 55, 0.2);
    outline-offset: 2px;
}

.consumer-protection-badge {
    min-width: 54px;
    padding: 6px 8px;
    color: #ffffff;
    background: var(--accent);
    border-radius: 6px;
    text-align: center;
    font-size: 12px;
    font-weight: 850;
    letter-spacing: 0.05em;
}

.footer-bottom {
    grid-column: 1 / -1;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 13px;
}

/* Tablet and mobile */

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

    .shell {
        width: min(100% - 24px, 1120px);
    }

    .site-header {
        position: static;
    }

    .header-inner {
        padding-block: 16px;
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
    }

    .site-header nav {
        width: 100%;
        justify-content: flex-start;
        gap: 9px 16px;
    }

    .site-header nav a {
        min-height: 36px;
        display: inline-flex;
        align-items: center;
    }

    .legal-layout {
        padding-block: 22px 48px;
    }

    .legal-document {
        padding: 24px 20px 34px;
        border-radius: 14px;
    }

    .language-switcher {
        width: 100%;
        margin-bottom: 24px;
    }

    .language-button {
        flex: 1;
        min-height: 46px;
        padding-inline: 12px;
    }

    h1 {
        font-size: clamp(31px, 10vw, 43px);
    }

    h2 {
        margin-top: 38px;
    }

    .lead {
        font-size: 18px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .footer-legal-navigation {
        justify-content: flex-start;
        gap: 10px 18px;
    }

    .footer-consumer-protection,
    .footer-bottom {
        grid-column: 1;
    }

    .footer-consumer-protection {
        flex-direction: column;
    }

    .consumer-protection-link {
        width: 100%;
        min-height: 54px;
    }

    .footer-bottom {
        line-height: 1.5;
    }
}

@media (max-width: 420px) {
    .site-header nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 14px;
    }

    .legal-document {
        padding-inline: 17px;
    }

    .language-button {
        font-size: 13px;
    }

    th,
    td {
        padding: 11px 12px;
    }
}

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

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}