:root {
    --paper: #f2efe8;
    --ink: #111;
    --accent: #e30613;
    --muted: color-mix(in srgb, var(--ink) 62%, transparent);
    --line: color-mix(in srgb, var(--ink) 24%, transparent);
    --font: "Inter Tight", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --m: clamp(16px, 2.8vw, 42px);
    --chrome: 54px;
}

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

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font);
    font-size: clamp(1rem, .94rem + .22vw, 1.12rem);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

body.night {
    --paper: #111;
    --ink: #f2efe8;
    --muted: color-mix(in srgb, var(--ink) 70%, transparent);
    --line: color-mix(in srgb, var(--ink) 28%, transparent);
}

/* Same paper tile as the homepage */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 60;
    pointer-events: none;
    background: url("assets/paper.svg?v=3") 0 0 / 400px 400px;
    mix-blend-mode: multiply;
    opacity: .5;
}

body.night::after {
    filter: invert(1);
    mix-blend-mode: screen;
    opacity: .35;
}

@media print {
    body::after {
        display: none;
    }
}

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

:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

.legal-chrome {
    position: sticky;
    top: 0;
    z-index: 20;
    height: var(--chrome);
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 18px;
    padding: 0 var(--m);
    background: color-mix(in srgb, var(--paper) 94%, transparent);
    border-bottom: 1px solid var(--line);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: inherit;
    text-decoration: none;
    font-weight: 800;
    font-size: 14px;
    line-height: 1;
}

.brand img {
    height: 26px;
    width: auto;
    filter: brightness(0);
}

body.night .brand img {
    filter: brightness(0) invert(.94);
}

.legal-nav {
    display: flex;
    justify-content: center;
    gap: clamp(10px, 2vw, 30px);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.legal-nav a {
    text-decoration: none;
    border-top: 2px solid transparent;
    padding-top: 5px;
}

.legal-nav a[aria-current="page"] {
    color: var(--accent);
    border-top-color: var(--accent);
}

.tool {
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    color: inherit;
    background: transparent;
    border: 1.5px solid currentColor;
    padding: 6px 10px;
    cursor: pointer;
}

.tool:hover,
.tool[aria-pressed="true"] {
    background: var(--ink);
    color: var(--paper);
}

.legal-page {
    display: grid;
    grid-template-columns: minmax(12rem, 18vw) minmax(0, 56rem);
    gap: clamp(24px, 5vw, 80px);
    padding: clamp(36px, 7vw, 96px) var(--m) clamp(56px, 10vw, 120px);
    align-items: start;
}

.legal-rail {
    position: sticky;
    top: calc(var(--chrome) + 30px);
    border-top: 8px solid var(--accent);
    padding-top: 14px;
    min-height: 16rem;
}

.kicker {
    margin: 0 0 12px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.edition {
    margin: 0;
    font-size: clamp(2rem, 4vw, 4rem);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -.045em;
}

.updated {
    margin: 28px 0 0;
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
}

.legal-document {
    max-width: 100%;
}

.legal-hero {
    border-top: 8px solid var(--ink);
    padding-top: 18px;
    margin-bottom: clamp(36px, 6vw, 70px);
}

.legal-hero h1 {
    margin: 0;
    font-size: clamp(3.2rem, 9vw, 8rem);
    font-weight: 900;
    line-height: .92;
    letter-spacing: -.06em;
}

.intro {
    margin: clamp(18px, 3vw, 32px) 0 0;
    max-width: 52rem;
    font-size: clamp(1.2rem, 1rem + 1vw, 2rem);
    font-weight: 650;
    line-height: 1.15;
    letter-spacing: -.02em;
}

section {
    border-top: 2px solid var(--ink);
    padding-top: 16px;
    margin-top: 34px;
}

h2 {
    margin: 0 0 12px;
    font-size: clamp(1.3rem, 1rem + 1vw, 2rem);
    font-weight: 850;
    line-height: 1;
    letter-spacing: -.035em;
}

h3 {
    margin: 22px 0 8px;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: .01em;
    text-transform: uppercase;
}

p,
ul {
    margin: 0 0 1rem;
}

ul {
    padding-left: 1.1em;
}

li+li {
    margin-top: .35rem;
}

strong {
    font-weight: 800;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.1rem 0;
    font-size: .95rem;
}

th,
td {
    text-align: left;
    vertical-align: top;
    border-top: 2px solid var(--ink);
    padding: 10px 10px 10px 0;
}

th {
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.linklike {
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    padding: 0;
    text-decoration: underline;
    text-decoration-color: var(--accent);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
    cursor: pointer;
}

.legal-footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 18px var(--m) 24px;
    border-top: 1px solid var(--line);
    font-size: 13px;
    font-weight: 650;
}

.legal-footer p {
    margin: 0;
}

@media (max-width: 840px) {
    .legal-chrome {
        grid-template-columns: 1fr auto;
        height: auto;
        padding-top: 12px;
        padding-bottom: 0;
    }

    .tool {
        grid-column: 2;
        grid-row: 1;
    }

    .legal-nav {
        grid-column: 1 / -1;
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 8px;
    }

    .legal-page {
        grid-template-columns: 1fr;
        gap: 26px;
    }

    .legal-rail {
        position: static;
        min-height: 0;
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 8px 18px;
        align-items: end;
    }

    .legal-rail .edition {
        grid-column: 1;
        font-size: 1.35rem;
        line-height: 1.05;
        letter-spacing: -.035em;
    }

    .legal-rail .updated {
        grid-column: 2;
        grid-row: 1 / span 2;
        margin: 0;
        text-align: right;
    }
}

@media (max-width: 560px) {
    .brand span {
        display: none;
    }

    .legal-page {
        padding-top: 30px;
    }

    .legal-hero h1 {
        font-size: clamp(3rem, 16vw, 5rem);
    }

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

    th {
        padding-bottom: 2px;
    }

    td {
        border-top: 0;
        padding-top: 0;
    }
}

/* Cookie consent components, restyled to match the poster pages. */
.cookie-consent-banner {
    position: fixed;
    left: var(--m);
    bottom: var(--m);
    z-index: 100;
    width: min(34rem, calc(100vw - 2 * var(--m)));
    background: #111;
    color: #f2efe8;
    padding: 18px 20px 20px;
    border-top: 8px solid #e30613;
    transform: translateY(calc(100% + 60px));
    transition: transform .25s ease;
    font-size: 14px;
}

.cookie-consent-banner.visible {
    transform: none;
}

.cookie-text h3 {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 850;
    letter-spacing: -.02em;
}

.cookie-text p {
    margin: 0 0 14px;
}

.cookie-buttons,
.cookie-modal-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font: inherit;
    font-weight: 750;
    border: 2px solid currentColor;
    background: transparent;
    color: inherit;
    padding: 9px 14px;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary {
    background: #e30613;
    border-color: #e30613;
    color: #fff;
}

.cookie-consent-banner .btn:hover {
    background: #f2efe8;
    color: #111;
    border-color: #f2efe8;
}

.cookie-modal {
    position: fixed;
    inset: 0;
    z-index: 110;
    background: rgba(17, 17, 17, .62);
    display: grid;
    place-items: center;
    padding: var(--m);
    opacity: 0;
    transition: opacity .2s ease;
}

.cookie-modal.visible {
    opacity: 1;
}

.cookie-modal-content {
    width: min(42rem, 100%);
    max-height: calc(100vh - 2 * var(--m));
    overflow: auto;
    background: #f2efe8;
    color: #111;
    border-top: 10px solid #e30613;
}

.cookie-modal-header,
.cookie-modal-body,
.cookie-modal-footer {
    padding: 18px 22px;
}

.cookie-modal-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    padding-bottom: 0;
}

.cookie-modal-header h2 {
    margin: 0;
    font-size: 2rem;
}

.cookie-close {
    font: inherit;
    font-size: 30px;
    line-height: 1;
    background: none;
    border: 0;
    cursor: pointer;
}

.cookie-category {
    border-top: 2px solid #111;
    padding: 14px 0;
}

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
}

.cookie-category h3 {
    margin: 0;
}

.cookie-required {
    color: #e30613;
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
}

.cookie-switch {
    position: relative;
    width: 44px;
    height: 24px;
    flex: none;
}

.cookie-switch input {
    position: absolute;
    inset: 0;
    opacity: 0;
    z-index: 1;
    cursor: pointer;
}

.cookie-slider {
    position: absolute;
    inset: 0;
    border: 2px solid #111;
}

.cookie-slider::before {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: #111;
    transition: transform .15s ease;
}

.cookie-switch input:checked+.cookie-slider {
    background: #e30613;
    border-color: #e30613;
}

.cookie-switch input:checked+.cookie-slider::before {
    transform: translateX(20px);
    background: #fff;
}