/* Shared styling for every legal/reference page (12 documents + /legal/ index).
   The landing page's game look (the app's menu: blue sky, plates on a navy lip, lime
   and sky keys), calmer: long text sits on one deep plate and nothing moves. */

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

:root {
    --sky-1: #2356D8;
    --sky-2: #163C9F;
    --sky-3: #0C215F;
    --sky-4: #071238;
    --ink: #0A1640;
    --plate-1: #2447A3;
    --plate-2: #172E73;
    --sheet: #10245E;
    --row: rgba(10, 22, 64, 0.5);
    --lime: #A3E635;
    --lime-text: #B7F34A;
    --lime-ink: #1A2E05;
    --sky: #7DD3FC;
    --text: #FFFFFF;
    --body: #DBEAFE;
    --text-dim: rgba(191, 219, 254, 0.88);
    --text-faint: rgba(191, 219, 254, 0.62);
    --line: rgba(147, 197, 253, 0.18);
    --radius: 18px;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Exo 2', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--sky-4);
    color: var(--text);
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* The menu's sky, drawn without extra markup so every page can share it: light at the
   top, still rays. */
body::before,
body::after { content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none; }
body::before {
    background: radial-gradient(120% 70% at 50% 0%, var(--sky-1) 0%, var(--sky-2) 30%, var(--sky-3) 60%, var(--sky-4) 100%);
}
body::after {
    background: repeating-conic-gradient(from 0deg at 50% 0%, rgba(147, 197, 253, 0.09) 0deg 8deg, transparent 8deg 20deg);
    mask-image: radial-gradient(70% 55% at 50% 0%, #000 20%, transparent 80%);
    -webkit-mask-image: radial-gradient(70% 55% at 50% 0%, #000 20%, transparent 80%);
}

.font-display { font-family: 'Exo 2', sans-serif; }

/* Russian compounds are long; never let one push the layout sideways. */
h1, h2, h3, p, li, td, th, .document-title { overflow-wrap: break-word; }

a { color: var(--lime-text); text-decoration-color: rgba(183, 243, 74, 0.45); text-underline-offset: 3px; }
a:hover { color: #D9F99D; }
a:focus-visible { outline: 3px solid var(--lime-text); outline-offset: 3px; border-radius: 8px; }

/* Back to the site: a blue key, like the menu's. */
.back-link {
    position: relative; z-index: 2;
    display: inline-flex; align-items: center; gap: 10px;
    margin: 22px 0 0 clamp(16px, 4vw, 40px);
    padding: 9px 18px 8px; border-radius: 14px;
    border: 2px solid var(--ink); border-bottom-width: 5px;
    background: linear-gradient(180deg, var(--plate-1), var(--plate-2));
    color: var(--text); text-decoration: none;
    font-size: 13px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase;
    transition: transform .15s ease;
}
.back-link:hover { color: var(--text); transform: translateY(-2px); }
.back-link:active { transform: translateY(1px); }

/* The document itself: one deep plate on its navy lip. */
.container {
    position: relative; z-index: 2;
    width: min(880px, 100% - clamp(32px, 8vw, 80px));
    margin: clamp(24px, 4vw, 40px) auto clamp(64px, 8vw, 96px);
    padding: clamp(28px, 5vw, 56px) clamp(22px, 4vw, 52px) clamp(36px, 5vw, 60px);
    border: 2px solid var(--ink); border-bottom-width: 8px; border-radius: 28px;
    background: linear-gradient(180deg, var(--plate-2), var(--sheet) 240px);
    box-shadow: 0 40px 90px -50px rgba(0, 0, 0, .9);
}

h1 {
    font-family: 'Exo 2', sans-serif; font-weight: 900;
    /* 5.6vw keeps long Russian headings ("КОНФИДЕНЦИАЛЬНОСТИ") inside a 375px screen. */
    font-size: clamp(20px, 5.6vw, 46px); line-height: 1.08;
    text-transform: uppercase; margin-bottom: 14px; color: var(--text);
    text-shadow: 0 4px 0 var(--ink);
}

.updated {
    display: inline-block; color: var(--ink); font-size: 12px; font-weight: 800;
    letter-spacing: 1.6px; text-transform: uppercase;
    background: var(--sky); border: 2px solid var(--ink); border-bottom-width: 4px;
    border-radius: 12px; padding: 3px 13px 2px; line-height: 1.6;
    margin-bottom: clamp(24px, 4vw, 40px);
}

h2 {
    font-family: 'Exo 2', sans-serif; font-size: clamp(18px, 2.2vw, 21px); font-weight: 900;
    letter-spacing: 1px; text-transform: uppercase; color: var(--text);
    margin: 44px 0 14px; padding-top: 20px; border-top: 2px solid var(--line);
    text-shadow: 0 2px 0 var(--ink);
}
h2:first-of-type { border-top: 0; padding-top: 0; }
h3 { font-family: 'Exo 2', sans-serif; font-size: 15.5px; font-weight: 800; letter-spacing: .6px; margin: 24px 0 8px; color: var(--sky); }

p { color: var(--body); margin-bottom: 14px; font-size: 15.5px; }
ul { color: var(--body); margin: 0 0 16px 22px; font-size: 15.5px; }
li { margin-bottom: 8px; }
li::marker { color: var(--lime); }
strong { color: var(--text); font-weight: 700; }
code { background: var(--row); padding: 2px 7px; border-radius: 6px; font-size: 13px; }
hr { border: none; border-top: 2px solid var(--line); margin: 40px 0; }

/* Highlighted blocks inside documents: a row inside the plate. */
.section-box, .callout {
    border: 2px solid var(--ink); border-bottom-width: 5px; border-radius: var(--radius);
    background: var(--row);
    padding: 20px 22px; margin: 22px 0; color: var(--body); font-size: 15.5px;
}
.section-box p:last-child, .callout p:last-child { margin-bottom: 0; }

/* Odds table (virtual goods policy). */
table { width: 100%; border-collapse: collapse; margin: 18px 0 22px; font-size: 15px; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 2px solid var(--line); }
th { font-family: 'Exo 2', sans-serif; font-size: 12px; font-weight: 800; letter-spacing: 1.6px; text-transform: uppercase; color: var(--sky); }
td { color: var(--body); }
tr:last-child td { border-bottom: 0; }
.rarity-common { color: var(--text-dim); font-weight: 700; }
.rarity-rare { color: #60A5FA; font-weight: 700; }
.rarity-epic { color: #C4B5FD; font-weight: 700; }
.rarity-legendary { color: #FBBF24; font-weight: 800; }

.footer-note {
    margin-top: 52px; padding-top: 26px; border-top: 2px solid var(--line);
    color: var(--text-faint); font-size: 13.5px;
}
.footer-note p { color: var(--text-faint); font-size: 13.5px; }
.footer-prevail { color: var(--text-faint); font-size: 12.5px; margin-top: 10px; }

/* ---------- /legal/ index ---------- */
.subtitle { color: var(--text-dim); font-size: 16.5px; margin-bottom: clamp(28px, 4vw, 44px); }
.language-section { margin: clamp(32px, 4vw, 48px) 0; }
.language-title {
    font-family: 'Exo 2', sans-serif; font-size: 15px; font-weight: 900;
    letter-spacing: 2px; text-transform: uppercase; color: var(--text);
    display: flex; align-items: center; gap: 12px; margin-bottom: 20px;
    padding-bottom: 14px; border-bottom: 2px solid var(--line);
}
.language-flag { font-size: 18px; }
.document-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.document-card {
    border: 2px solid var(--ink); border-bottom-width: 6px; border-radius: var(--radius); padding: 20px;
    background: linear-gradient(180deg, var(--plate-1), var(--plate-2));
    transition: transform .2s ease;
}
.document-card:hover { transform: translateY(-3px); }
.document-title { font-family: 'Exo 2', sans-serif; font-size: 15px; font-weight: 900; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 8px; color: var(--text); }
.document-description { color: var(--text-dim); font-size: 14px; margin-bottom: 14px; }
.document-link { display: inline-block; color: var(--lime-text); text-decoration: none; font-weight: 800; font-size: 13.5px; letter-spacing: .6px; }
.document-link:hover { color: #D9F99D; }
.contact {
    margin-top: clamp(32px, 4vw, 48px); padding: clamp(22px, 3vw, 32px);
    border: 2px solid var(--ink); border-bottom-width: 6px; border-radius: var(--radius);
    background: var(--row);
}
.contact h2 { margin: 0 0 14px; padding-top: 0; border-top: 0; }
.contact p { color: var(--text-dim); font-size: 14.5px; }
.last-updated { margin-top: 44px; padding-top: 24px; border-top: 2px solid var(--line); text-align: center; color: var(--text-faint); font-size: 13px; }

@media (max-width: 620px) {
    .container { border-radius: 22px; }
    h2 { margin-top: 34px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .back-link, .document-card { transition: none; }
    .back-link:hover, .document-card:hover { transform: none; }
}
