/* ============================================================
   LEGAL PAGE
   ============================================================ */

.legal-page__hero {
    padding: 3rem 0 1.25rem;
}

.legal-page__title {
    font-family: var(--font-heading);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0;
    line-height: 1.3;
}

.legal-page__wrap {
    padding: 1.5rem 0 5rem;
}

.legal-page__body {
    /* full container width */
}

/* ── Document header (lead + meta row) ─────────────────────── */

.legal-doc-header {
    margin-bottom: 2.5rem;
    padding-bottom: 0;
}

.legal-lead {
    font-family: var(--font-heading);
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--color-text-muted);
    font-style: italic;
    margin: 0 0 1.25rem;
}

.legal-doc-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem 2.5rem;
    font-family: var(--font-heading);
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.legal-doc-meta strong {
    color: var(--color-text-primary);
    font-weight: 600;
}

/* ── Section typography ────────────────────────────────────── */

.legal-page__body h2 {
    font-family: var(--font-heading);
    font-size: 1.1875rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 2.5rem 0 0.375rem;
    line-height: 1.4;
}

.legal-page__body h3 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 1.75rem 0 0.375rem;
}

.legal-page__body p {
    font-family: var(--font-heading);
    font-size: 1.0625rem;
    line-height: 1.75;
    color: var(--color-text-primary);
    margin: 0 0 1rem;
}

.legal-page__body ul,
.legal-page__body ol {
    margin: 0 0 1rem 0;
    padding: 0;
    list-style: none;
}

.legal-page__body ol {
    counter-reset: legal-counter;
}

.legal-page__body li {
    font-family: var(--font-heading);
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--color-text-primary);
    margin-bottom: 0.2rem;
    padding-left: 1.5rem;
    position: relative;
}

.legal-page__body ul > li::before {
    content: '–';
    position: absolute;
    left: 0;
    color: var(--color-text-primary);
    font-weight: 600;
    line-height: 1.65;
}

.legal-page__body ol > li::before {
    counter-increment: legal-counter;
    content: counter(legal-counter) '.';
    position: absolute;
    left: 0;
    color: var(--color-text-primary);
    font-weight: 600;
    font-size: 0.9375rem;
    line-height: 1.65;
}

.legal-page__body em {
    font-style: italic;
    color: var(--color-text-muted);
}

.legal-page__body strong {
    font-weight: 600;
    color: var(--color-text-primary);
}

/* Premium reveal underline (same technique as the Cardinals site for
   content links): no underline at rest; on hover/focus a navy line draws in
   left -> right. Implemented by animating the width of a currentColor
   gradient background from 0% to 100% — unlike a ::after scaleX bar this
   renders correctly on inline links that wrap across lines. */
.legal-page__body a {
    color: var(--color-text-primary);
    font-weight: 500;
    text-decoration: none;
    background-image: linear-gradient(currentColor, currentColor);
    background-position: 0 100%;
    background-repeat: no-repeat;
    background-size: 0% 1.5px;
    /* Replaces the inherited `transition: opacity` so the link never fades;
       only the underline width animates. */
    transition: background-size 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Neutralise the global `a:hover { opacity:.75 }` / `color:#000` so the link
   stays crisp — only the underline reveals. */
.legal-page__body a:hover,
.legal-page__body a:focus-visible {
    opacity: 1;
    color: var(--color-text-primary);
    background-size: 100% 1.5px;
}

/* ── Info box ──────────────────────────────────────────────── */

.legal-info-box {
    background: #fff;
    border-left: 3px solid var(--color-text-primary);
    padding: 1.25rem 1.5rem;
    margin: 1.25rem 0 1.5rem;
    border-radius: 0 5px 5px 0;
}

.legal-info-box p {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 1.0625rem;
    line-height: 2.1;
}

/* ── Cookie table ──────────────────────────────────────────── */

.legal-cookie-table {
    width: fit-content;
    max-width: 100%;
    border-collapse: collapse;
    display: block;
    overflow: hidden;
    border-radius: 8px;
    border: 1.5px solid #c8c4be;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
    margin: 0.75rem auto 1.75rem;
    font-size: 0.875rem;
}

.legal-cookie-table thead th {
    background: var(--color-text-primary);
    color: #fff;
    padding: 0.65rem 0.875rem;
    text-align: left;
    font-weight: 600;
    font-family: var(--font-heading);
    white-space: nowrap;
    border-right: 1px solid rgba(255, 255, 255, 0.15);
}

.legal-cookie-table thead th:last-child {
    border-right: none;
}

.legal-cookie-table tbody tr:nth-child(even) {
    background: #f0ece5;
}

.legal-cookie-table tbody tr:last-child td {
    border-bottom: none;
}

.legal-cookie-table tbody td {
    padding: 0.5rem 0.875rem;
    border-bottom: 1px solid #dcd9d4;
    border-right: 1px solid #e8e5e0;
    vertical-align: top;
    font-family: var(--font-heading);
    color: var(--color-text-primary);
    line-height: 1.55;
}

.legal-cookie-table tbody td:first-child {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.8125rem;
    font-weight: 500;
    white-space: nowrap;
}

.legal-cookie-table tbody td:last-child {
    border-right: none;
}

/* ── AML monitoring table ──────────────────────────────────── */

.legal-table {
    width: fit-content;
    max-width: 100%;
    border-collapse: collapse;
    display: block;
    overflow: hidden;
    border-radius: 8px;
    border: 1.5px solid #c8c4be;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
    margin: 1.25rem auto 1.75rem;
    font-size: 1.0625rem;
}

.legal-table th {
    background: var(--color-text-primary);
    color: #fff;
    padding: 0.75rem 1.125rem;
    text-align: left;
    font-weight: 600;
    font-family: var(--font-heading);
    white-space: nowrap;
    border-right: 1px solid rgba(255, 255, 255, 0.15);
}

.legal-table th:last-child {
    border-right: none;
}

.legal-table tbody tr:nth-child(even) {
    background: #f0ece5;
}

.legal-table tbody tr:last-child td {
    border-bottom: none;
}

.legal-table td {
    padding: 0.75rem 1.125rem;
    border-bottom: 1px solid #dcd9d4;
    border-right: 1px solid #e8e5e0;
    vertical-align: top;
    font-family: var(--font-heading);
    color: var(--color-text-primary);
    line-height: 1.6;
}

.legal-table td:last-child {
    border-right: none;
}

/* ── Document footer line ──────────────────────────────────── */

.legal-page__meta {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e8e6e2;
    font-size: 0.875rem;
    color: var(--color-text-muted);
    font-family: var(--font-heading);
}
