.legal-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.55rem;
    margin-top: 2rem;
}

.legal-tabs a {
    border: 1px solid rgba(255, 248, 238, 0.22);
    border-radius: 999px;
    background: rgba(255, 248, 238, 0.06);
    color: var(--on-dark-soft);
    font-size: 0.86rem;
    font-weight: 650;
    padding: 0.6rem 1.15rem;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.legal-tabs a:hover {
    color: var(--on-dark);
    border-color: rgba(255, 248, 238, 0.5);
}

.legal-tabs a[aria-current="page"] {
    border-color: transparent;
    background: linear-gradient(135deg, #C95A0B, var(--accent));
    color: #fff;
}

.legal-content-section {
    padding: clamp(2.8rem, 5vw, 4rem) 0 clamp(4rem, 7vw, 6rem);
}

.legal-card {
    min-height: 420px;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: linear-gradient(170deg, rgba(255, 253, 250, 0.82), rgba(255, 249, 240, 0.6));
    border: 1px solid rgba(255, 255, 255, 0.72);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.85),
        0 24px 50px rgba(65, 40, 21, 0.12);
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    padding: clamp(1.8rem, 4vw, 3.4rem);
}

.legal-card :where(h1, h2, h3, h4) {
    color: var(--ink) !important;
    font-family: var(--sans) !important;
    line-height: 1.22 !important;
    letter-spacing: -0.035em !important;
    margin: 2rem 0 0.8rem !important;
}

.legal-card :where(h1, h2):first-child {
    margin-top: 0 !important;
}

.legal-card h1 { font-size: clamp(1.8rem, 3vw, 2.5rem) !important; }
.legal-card h2 { font-size: clamp(1.35rem, 2.2vw, 1.75rem) !important; }
.legal-card h3 { font-size: 1.08rem !important; }

.legal-card :where(p, li, td, th) {
    color: var(--ink-soft) !important;
    font-family: var(--sans) !important;
    font-size: 0.94rem !important;
    line-height: 1.72 !important;
}

.legal-card p {
    margin: 0.85rem 0 !important;
}

.legal-card ul,
.legal-card ol {
    margin: 0.85rem 0 !important;
    padding-left: 1.35rem !important;
}

.legal-card li {
    margin: 0.45rem 0 !important;
}

.legal-card strong {
    color: var(--ink) !important;
}

.legal-card a {
    color: var(--accent) !important;
    font-weight: 650;
}

/* Links inside the body copy are underlined, not just recoloured. Accent on
   body text measures ~1.2:1 against the surrounding ink, well under the 3:1
   WCAG 1.4.1 needs before colour alone may carry meaning — and these two
   documents are almost entirely body copy and cross-references. */
.legal-card :where(p, li) a {
    text-decoration: underline;
    text-underline-offset: 0.18em;
    text-decoration-thickness: 0.06em;
}

.legal-card hr {
    border: 0 !important;
    border-top: 1px solid var(--line) !important;
    margin: 1.6rem 0 !important;
}

.legal-card table {
    width: 100% !important;
    border-collapse: collapse !important;
}

.legal-card th,
.legal-card td {
    border: 1px solid var(--line) !important;
    padding: 0.65rem 0.75rem !important;
    text-align: left !important;
}

@media (max-width: 640px) {
    .legal-card {
        border-radius: 28px;
        padding: 1.5rem 1.2rem;
    }

    .legal-card table {
        display: block;
        overflow-x: auto;
    }
}

/* ── The analytics opt-out ──────────────────────────────────────────
   Legitimate-interest processing carries a right to object, so the
   control belongs on the page every footer already links to. */
.legal-control {
    max-width: 62ch;
    margin: clamp(1.4rem, 3vw, 2.2rem) auto 0;
    padding: clamp(1.4rem, 2.8vw, 2rem);
    border: 1px solid var(--line);
    border-radius: 22px;
    background: linear-gradient(170deg, rgba(255, 253, 250, 0.86), rgba(255, 249, 240, 0.58));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 14px 32px rgba(65, 40, 21, 0.07);
}

.legal-control h2 {
    font-size: clamp(1.15rem, 1.9vw, 1.4rem);
    letter-spacing: -0.035em;
}

.legal-control p {
    margin-top: 0.7rem;
    color: var(--ink-soft);
    font-size: 0.95rem;
    line-height: 1.6;
}

.legal-control .btn { margin-top: 1.1rem; }

.legal-control-state {
    font-weight: 600;
    color: var(--ink) !important;
}

.legal-control-note {
    font-size: 0.82rem !important;
    color: var(--ink-faint) !important;
}

/* Romanian legal pages point at the single English text rather than embedding
   a second, separately-hosted copy. */
.legal-pointer {
    min-height: 0;
}

.legal-pointer h2 {
    margin-top: 0 !important;
}

.legal-pointer-cta {
    margin-top: 1.6rem !important;
}

.legal-pointer-note {
    margin-top: 1.6rem !important;
    padding-top: 1.2rem;
    border-top: 1px solid var(--hairline, rgba(0, 0, 0, 0.08));
    font-size: 0.92rem !important;
    color: var(--ink-soft) !important;
}
