/* ══════════════════════════════════════════════════════════════════
   assets/legal.css — long-form legal documents
   ══════════════════════════════════════════════════════════════════

   style.css styles marketing pages: two-column prose grids, headings
   that are meant to be read at a glance from across the room. A
   privacy notice is the opposite kind of document — a single column
   somebody reads top to bottom, looking for one specific paragraph.

   Loaded only by /it/privacy.php and /en/privacy.php, so none of this
   weight lands on the pages that do not need it.

   The document body comes from <lang>/docs/Privacy.html, which is only
   semantic tags: h2, h3, p, ul, ol, table, dl. Everything here is
   element-scoped under .legal-doc for that reason — the file that a
   lawyer edits should never have to carry a class name. */

.legal-doc {
    max-width: 760px;
    font-size: 16px;
    line-height: 1.75;
    color: var(--text-mid);
}

/* ── Headings ─────────────────────────────────────────────────── */

.legal-doc h2 {
    font-family: var(--f-cond);
    font-weight: 900;
    font-size: 27px;
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: var(--text);
    margin: 56px 0 6px;
    padding-top: 26px;
    border-top: 1px solid var(--border-soft);
}

.legal-doc h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

/* The section number is generated, not typed. Renumbering a notice by
   hand after inserting a section is exactly the kind of edit that
   leaves "7. 7. 9." behind in a document nobody rereads in full. */
.legal-doc { counter-reset: legal-section; }

.legal-doc h2::before {
    counter-increment: legal-section;
    content: counter(legal-section) ".";
    font-family: var(--f-mono);
    font-size: 14px;
    font-weight: 500;
    color: var(--blue);
    margin-right: 12px;
    vertical-align: 2px;
}

/* Opt out where numbering would be wrong: the preamble, the closing
   note. <h2 class="unnumbered"> */
.legal-doc h2.unnumbered::before { content: none; }

.legal-doc h3 {
    font-family: var(--f-body);
    font-weight: 600;
    font-size: 16.5px;
    color: var(--text);
    margin: 30px 0 4px;
}

/* ── Body ─────────────────────────────────────────────────────── */

.legal-doc p { margin: 0 0 16px; }
.legal-doc p strong { color: var(--text); font-weight: 600; }

.legal-doc a {
    color: var(--blue);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.legal-doc a:hover { color: var(--blue-dk); }

.legal-doc ul, .legal-doc ol { margin: 0 0 18px; padding-left: 22px; }
.legal-doc li { margin-bottom: 8px; }
.legal-doc li::marker { color: var(--blue); }

.legal-doc code {
    font-family: var(--f-mono);
    font-size: 13.5px;
    background: var(--blue-50);
    border: 1px solid var(--border-soft);
    border-radius: 3px;
    padding: 1px 5px;
    color: var(--text);
    /* Cookie and storage-key names sit inside running text. Breaking
       one across two lines would make it unrecognisable as an
       identifier the reader is meant to go and look for. */
    white-space: nowrap;
}

/* ── Tables: what we collect, why, how long ───────────────────── */

.legal-doc table {
    width: 100%;
    border-collapse: collapse;
    margin: 4px 0 22px;
    font-size: 14.5px;
}

.legal-doc thead th {
    font-family: var(--f-cond);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-soft);
    text-align: left;
    padding: 0 14px 8px 0;
    border-bottom: 1px solid var(--border);
}

.legal-doc tbody td {
    padding: 11px 14px 11px 0;
    border-bottom: 1px solid var(--border-soft);
    vertical-align: top;
}

.legal-doc tbody tr:last-child td { border-bottom: 0; }
.legal-doc tbody td:first-child { color: var(--text); font-weight: 600; }

/* Below ~600px a four-column table stops being a table. Rather than
   scroll it sideways — which hides columns behind an edge with no
   sign they are there — each row becomes a labelled block. The
   labels come from data-label on each cell. */
@media (max-width: 600px) {
    .legal-doc thead { position: absolute; left: -9999px; }
    .legal-doc tbody tr {
        display: block;
        padding: 12px 0;
        border-bottom: 1px solid var(--border-soft);
    }
    .legal-doc tbody td {
        display: block;
        padding: 2px 0;
        border: 0;
    }
    .legal-doc tbody td[data-label]::before {
        content: attr(data-label) " ";
        font-family: var(--f-cond);
        font-weight: 700;
        font-size: 11px;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        color: var(--text-faint);
        display: block;
    }
}

/* ── Callout, for the two or three things that matter most ────── */

.legal-doc .legal-note {
    border-left: 2px solid var(--blue);
    background: var(--blue-50);
    padding: 16px 20px;
    margin: 0 0 22px;
    border-radius: 0 4px 4px 0;
}
.legal-doc .legal-note p:last-child { margin-bottom: 0; }
.legal-doc .legal-note.warn { border-left-color: var(--orange); background: var(--orange-50); }

/* ── Version bar, written by privacy.php not by the document ──── */

.legal-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px 18px;
    max-width: 760px;
    margin: 0 0 44px;
    padding: 14px 18px;
    background: var(--bg-white);
    border: 1px solid var(--border-soft);
    border-radius: 4px;
    font-size: 13.5px;
    color: var(--text-soft);
}

.legal-meta .legal-version {
    font-family: var(--f-mono);
    font-size: 13px;
    color: var(--text);
    font-weight: 500;
}

.legal-meta .legal-sep { color: var(--text-faint); }

/* There is no version history on the page. One filename holds one
   version; superseded texts live in the git history of
   docs/Privacy.html. Rules for a .legal-history list and a
   .legal-superseded banner were written and then removed with the
   ?v= mechanism they belonged to — do not add them back without the
   PHP that fills them, or they are dead weight on every page load. */

@media (max-width: 700px) {
    .legal-doc { font-size: 15.5px; }
    .legal-doc h2 { font-size: 23px; margin-top: 44px; }
}

/* ── Print: people file these ─────────────────────────────────── */

@media print {
    .aq-nav, footer, .page-hero::before { display: none !important; }
    .legal-doc, .legal-meta { max-width: none; }
    .legal-doc a { color: inherit; text-decoration: none; }
    /* A URL that only exists as a hyperlink is lost on paper. */
    .legal-doc a[href^="http"]::after {
        content: " (" attr(href) ")";
        font-size: 11px;
        color: #555;
        word-break: break-all;
    }
    .legal-doc h2 { break-after: avoid; }
    .legal-doc table, .legal-doc .legal-note { break-inside: avoid; }
}
