/* ================================================================== */
/*  Legal pages (Privacy Policy, Terms, Cookies)                      */
/*  Centred long-form document with a ~720px reading column,          */
/*  clear section headings, generous line-height for body.            */
/* ================================================================== */

.legal-page {
    background: var(--deploy-bg);
    padding: 88px 0 64px;              /* horizontal padding lives on the .legal card */
}

@media (min-width: 768px) {
    .legal-page { padding: 120px 0 96px; }
}

.legal {
    max-width: var(--container-max);
    margin: 0 auto;
    background: var(--bg-elevated);
    border: 1px solid var(--deploy-guide);
    border-radius: var(--radius-md);
    padding: 32px 24px;
    box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
}

@media (min-width: 768px) {
    /* Horizontal padding kept at 24 — matches every other section title's
       distance from the container edge (about / concrete / pricing / software). */
    .legal { padding: 56px 24px; }
}


/* ---------- Header ---------- */

.legal__header {
    margin: 0 0 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--deploy-guide);
}

.legal__eyebrow {
    margin: 0 0 8px;
    font-size: var(--fs-eyebrow);
    font-weight: var(--fw-semibold);
    letter-spacing: var(--ls-caps);
    text-transform: uppercase;
    color: var(--brand-500);
}

.legal__title {
    margin: 0;
    font-size: var(--fs-h1);
    font-weight: var(--fw-semibold);
    line-height: var(--lh-heading);
    letter-spacing: var(--ls-heading);
    color: var(--text);
    text-wrap: balance;
}

.legal__updated {
    margin: 16px 0 0;
    font-size: var(--fs-body-sm);
    color: var(--text-muted);
}

/* ---------- Lead paragraphs ---------- */

.legal__lead {
    margin: 0 0 32px;
    color: var(--text);
}

.legal__lead p {
    margin: 0 0 16px;
    font-size: var(--fs-lead);
    line-height: var(--lh-loose);
}
.legal__lead p:last-child { margin-bottom: 0; }

/* ---------- Sections ---------- */

.legal__section {
    margin-top: 40px;
}

.legal__section > h2 {
    margin: 0 0 16px;
    font-size: var(--fs-h3);
    font-weight: var(--fw-semibold);
    line-height: var(--lh-heading);
    letter-spacing: var(--ls-tight);
    color: var(--text);
}
@media (min-width: 768px) {
    .legal__section > h2 { font-size: 22px; }
}

.legal__section > p {
    margin: 0 0 14px;
    font-size: var(--fs-body);
    line-height: var(--lh-loose);
    color: var(--text-muted);
}
.legal__section > p:last-child { margin-bottom: 0; }

.legal__section h3 {
    margin: 28px 0 10px;
    font-size: 16px;
    font-weight: var(--fw-semibold);
    letter-spacing: var(--ls-tight);
    line-height: var(--lh-heading);
    color: var(--text);
}
.legal__section > h2 + h3,
.legal__section h3:first-child {
    margin-top: 8px;
}

/* Fourth level — lettered sub-clauses inside a numbered sub-section
   (e.g. 11.1 (a) What we collect). One step quieter than h3. */
.legal__section h4 {
    margin: 20px 0 8px;
    font-size: 15px;
    font-weight: var(--fw-semibold);
    letter-spacing: var(--ls-tight);
    line-height: var(--lh-heading);
    color: var(--text-muted);
}

/* Bullet list. Most legal lists carry their own "(a)/(b)" labels and are
   left as plain <ul> (no marker, per the base reset); add .legal__list only
   to lists whose items are unlabelled and therefore need discs. */
.legal__list {
    margin: 0 0 16px;
    padding-left: 24px;
    list-style: disc;
}
.legal__list li {
    margin: 0 0 8px;
    font-size: var(--fs-body);
    line-height: var(--lh-loose);
    color: var(--text-muted);
}
[dir="rtl"] .legal__list {
    padding-left: 0;
    padding-right: 24px;
}

/* Definition-style list (bold label + description on one line) */
.legal__defs {
    margin: 0 0 16px;
    padding: 0;
    list-style: none;
}
.legal__defs li {
    margin: 0 0 12px;
    padding-left: 20px;
    position: relative;
    font-size: var(--fs-body);
    line-height: var(--lh-loose);
    color: var(--text-muted);
}
.legal__defs li::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 0.7em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--brand-300);
}
.legal__defs li strong {
    color: var(--text);
    font-weight: var(--fw-semibold);
    margin-right: 4px;
}
[dir="rtl"] .legal__defs li {
    padding-left: 0;
    padding-right: 20px;
}
[dir="rtl"] .legal__defs li::before {
    left: auto;
    right: 4px;
}
[dir="rtl"] .legal__defs li strong {
    margin-right: 0;
    margin-left: 4px;
}

/* Contact block */
.legal__contact {
    margin: 16px 0 0;
    font-style: normal;
    font-size: var(--fs-body);
    line-height: var(--lh-loose);
    color: var(--text);
}
.legal__contact a {
    color: var(--brand-500);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.legal__contact a:hover { color: var(--brand); }

/* Links inside body paragraphs */
.legal__section a,
.legal__lead a {
    color: var(--brand-500);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.legal__section a:hover,
.legal__lead a:hover { color: var(--brand); }
