:root {
    --bg: #f7f1e7;
    --paper: #fffaf1;
    --ink: #211c17;
    --muted: #6c5c4b;
    --accent: #b52d2a;
    --accent-dark: #6f1d1b;
    --line: #dcc9ac;
    --shadow: 0 18px 48px rgba(48, 34, 21, .14);
    --max-width: 1040px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background:
        linear-gradient(135deg, rgba(181, 45, 42, .08), transparent 36%),
        linear-gradient(315deg, rgba(44, 94, 74, .1), transparent 34%),
        var(--bg);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.7;
}

img {
    max-width: 100%;
    height: auto;
}

.hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background:
        linear-gradient(rgba(40, 28, 20, .58), rgba(40, 28, 20, .58)),
        radial-gradient(circle at 24% 12%, rgba(226, 172, 84, .56), transparent 34%),
        linear-gradient(135deg, #753a2c, #263f37 62%, #171d23);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("covert.png");
    background-position: center;
    background-size: cover;
    opacity: .22;
}

.hero__inner {
    position: relative;
    z-index: 1;
    width: min(var(--max-width), calc(100% - 32px));
    margin: 0 auto;
    padding: clamp(40px, 9vw, 84px) 0 clamp(32px, 7vw, 60px);
}

.eyebrow {
    margin: 0 0 10px;
    color: rgba(255, 255, 255, .78);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 2px;
    font-size: clamp(2.8rem, 12vw, 6rem);
    line-height: .95;
}

h2 {
    margin-bottom: 18px;
    color: var(--accent-dark);
    font-size: clamp(1.55rem, 4vw, 2.25rem);
    line-height: 1.2;
}

.subtitle {
    margin: 0;
    color: rgba(255, 255, 255, .9);
    font-size: clamp(1.1rem, 3vw, 1.65rem);
    font-weight: 700;
}

.language-switcher {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

.language-switcher a {
    min-width: 96px;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, .42);
    border-radius: 999px;
    color: #fff;
    text-align: center;
    text-decoration: none;
}

.language-switcher a[aria-current="page"] {
    background: #fff;
    color: var(--accent-dark);
}

.rulebook {
    width: min(var(--max-width), calc(100% - 32px));
    margin: clamp(28px, 6vw, 56px) auto;
}

.page {
    margin: 0 0 24px;
    padding: clamp(22px, 4vw, 40px);
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 250, 241, .92);
    box-shadow: var(--shadow);
}

.page--intro,
.page--split {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(220px, .9fr);
    gap: clamp(20px, 5vw, 44px);
    align-items: center;
}

.page-number {
    margin-bottom: 8px;
    color: var(--muted);
    font-size: .86rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.page p:not(.page-number) {
    max-width: 64rem;
}

.references {
    margin: 30px 0 0;
    padding: 0 4px;
    color: var(--muted);
}

.references h2 {
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 1rem;
}

.reference-list {
    display: grid;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: .92rem;
}

.reference-list li {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

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

.figure {
    margin: 0;
}

.figure img {
    display: block;
    width: 100%;
    image-rendering: pixelated;
    border: 1px solid #2a211b;
    border-radius: 6px;
    background: #111;
    box-shadow: 0 14px 28px rgba(33, 28, 23, .16);
}

.figure figcaption {
    margin-top: 10px;
    color: var(--muted);
    font-size: .9rem;
    text-align: center;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
}

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

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

thead th {
    color: #fff;
    background: var(--accent-dark);
    font-size: .92rem;
}

tbody th {
    width: 22%;
    color: var(--accent-dark);
    background: rgba(181, 45, 42, .07);
}

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

@media (max-width: 720px) {
    .hero__inner,
    .rulebook {
        width: min(100% - 24px, var(--max-width));
    }

    .page--intro,
    .page--split {
        grid-template-columns: 1fr;
    }

    .language-switcher a {
        flex: 1 1 120px;
    }

    .page {
        padding: 20px;
    }

    .table-wrap {
        overflow-x: visible;
    }

    table {
        min-width: 0;
    }

    table,
    thead,
    tbody,
    tr,
    th,
    td {
        display: block;
    }

    thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    tbody tr {
        border-bottom: 1px solid var(--line);
    }

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

    tbody th {
        width: 100%;
        border-bottom: 1px solid var(--line);
    }

    tbody td {
        border-bottom: 0;
    }

    tbody td::before {
        content: attr(data-mobile-label);
        display: block;
        margin-bottom: 2px;
        color: var(--muted);
        font-size: .78rem;
        font-weight: 700;
        text-transform: uppercase;
    }
}

@media (max-width: 480px) {
    body {
        line-height: 1.65;
    }

    .rulebook {
        margin: 18px auto;
    }

    .page {
        padding: 18px 14px;
    }

    th,
    td {
        padding: 12px;
    }
}
