/* ==========================================================================
   Legal pages — plain, formal document style
   ========================================================================== */
:root {
    /* Text size for every legal page and the policy-links row. */
    --legal-font-size: 6px;
}

.legal-page {
    background: #fff;
    color: #2B1020;
    /* Side padding scales with the window: ~20% each side on desktop */
    padding: 56px 28vw 72px;
}

.legal-wrap {
    margin: 0 auto;
}

/* Side padding steps down on smaller screens so text never gets squeezed */
@media (max-width: 991.98px) { .legal-page { padding-left: 15vw; padding-right: 15vw; } }
@media (max-width: 575.98px) { .legal-page { padding-left: 16px; padding-right: 16px; } }

.legal-title {
    font-size: clamp(2rem, 4.5vw, 3.6rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    text-align: center;
    color: #111;
    margin: 0 0 48px;
}

.legal-updated {
    font-size: calc(var(--legal-font-size) + 1px);
    font-weight: 700;
    color: #111;
    margin: 0 0 40px;
}

.legal-body {
    font-size: var(--legal-font-size);
    line-height: 1.6;
    color: #222;
}

.legal-body p { margin: 0; }

/* Numbered sections: <ol class="legal-list"> <li><strong>TITLE</strong> ... */
.legal-body ol.legal-list {
    list-style: none;
    counter-reset: sec;
    padding: 0;
    margin: 0;
}

.legal-body ol.legal-list > li {
    counter-increment: sec;
    margin: 0 0 4px;
    padding-left: 26px;
    position: relative;
}

.legal-body ol.legal-list > li::before {
    content: counter(sec) ".";
    position: absolute;
    left: 10px;
    font-weight: 400;
}

.legal-body .sec-title {
    display: block;
    font-weight: 700;
    text-transform: uppercase;
    color: #111;
}

/* Sub-clauses: 1.1, 1.2 ... */
.legal-body ol.legal-list > li > ol {
    list-style: none;
    counter-reset: sub;
    padding: 0;
    margin: 0;
}

.legal-body ol.legal-list > li > ol > li {
    counter-increment: sub;
}

.legal-body ol.legal-list > li > ol > li::before {
    content: counter(sec) "." counter(sub) ". ";
}

.legal-body ul {
    margin: 0;
    padding-left: 22px;
}

.legal-body ul li { margin: 0; }

.legal-body .caps-notice {
    text-transform: uppercase;
}

.legal-body .caps-notice strong { font-weight: 700; }

.legal-body a {
    color: #111;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.legal-body a:hover { color: var(--aabruu-teal, #B3124F); }

.legal-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 2px 0 4px;
    font-size: var(--legal-font-size);
}

.legal-body th,
.legal-body td {
    border: 1px solid #d9d9d9;
    padding: 3px 6px;
    text-align: left;
    vertical-align: top;
}

.legal-body th {
    background: #f5f5f5;
    font-weight: 700;
}

.legal-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.legal-body .legal-address {
    margin: 4px 0 8px;
    padding-left: 0;
}

/* Policy links row — on every page, directly above the footer */
.legal-related {
    background: #fff;
    padding: 14px 16px;
    border-top: 1px solid #e5e5e5;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 22px;
    /* Legal text size (--legal-font-size) + 3px */
    font-size: calc(var(--legal-font-size) + 3px);
}

.legal-related a {
    color: #555;
    text-decoration: none;
}

.legal-related a:hover {
    color: #111;
    text-decoration: underline;
}

@media (max-width: 575.98px) {
    .legal-page { padding-top: 36px; }
    .legal-title { margin-bottom: 28px; }
    .legal-updated { margin-bottom: 24px; }
    .legal-body { font-size: var(--legal-font-size); }
    .legal-body ol.legal-list > li { padding-left: 24px; }
    .legal-body ol.legal-list > li::before { left: 4px; }
}
