/* Privacy Policy and Terms of Use. Uses variables from index.css. */

.legal-page {
    max-width: 860px;
    margin: 0 auto;
    padding: 56px var(--pad) 96px;
}

.page-head {
    margin-bottom: 28px;
}

.eyebrow {
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--primary);
}

.page-title {
    font-family: var(--font-display);
    font-size: clamp(40px, 6vw, 60px);
    font-weight: 400;
    line-height: 1;
    letter-spacing: 0.01em;
}

.page-lead {
    margin-top: 10px;
    max-width: 660px;
    color: var(--text-dim);
}

.legal-updated {
    margin-top: 12px;
    font-size: 13px;
    color: var(--text-muted);
}

/* the short version, then the list of sections */
.legal-summary,
.legal-toc,
.legal-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 22px 24px;
    margin-bottom: 16px;
}

.legal-summary {
    border-color: rgba(174, 232, 117, 0.35);
}

.legal-summary h2,
.legal-toc h2 {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--primary);
}

.legal-toc ol {
    margin: 0;
    padding-left: 20px;
    columns: 2;
    column-gap: 32px;
}

.legal-toc li {
    margin-bottom: 4px;
    break-inside: avoid;
}

.legal-toc a {
    color: var(--text-dim);
}

.legal-toc a:hover {
    color: var(--primary);
}

.legal-section h2 {
    margin: 0 0 12px;
    font-size: 20px;
    line-height: 1.25;
}

.legal-section h3 {
    margin: 18px 0 6px;
    font-size: 14px;
    letter-spacing: 0.02em;
}

.legal-section p,
.legal-summary p {
    margin: 0 0 12px;
    line-height: 1.65;
    color: var(--text-dim);
}

.legal-section p:last-child,
.legal-summary p:last-child {
    margin-bottom: 0;
}

.legal-section ul,
.legal-summary ul {
    margin: 0 0 12px;
    padding-left: 20px;
    line-height: 1.65;
    color: var(--text-dim);
}

.legal-section li,
.legal-summary li {
    margin-bottom: 6px;
}

.legal-section strong,
.legal-summary strong {
    color: var(--text);
}

.legal-section a,
.legal-summary a {
    color: var(--primary);
}

/* a small table of who gets what */
.legal-table {
    width: 100%;
    margin: 4px 0 12px;
    border-collapse: collapse;
    font-size: 14px;
}

.legal-table th,
.legal-table td {
    padding: 9px 10px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
    line-height: 1.5;
    color: var(--text-dim);
}

.legal-table th {
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.legal-table td:first-child {
    color: var(--text);
    font-weight: 600;
    /* (it may wrap: kept on one line, "IP address and technical data (including what Cloudflare sees)" pushed the table past its card and left
       the other two columns a few letters wide between 640px and 760px) */
    min-width: 7em;
}

@media (max-width: 640px) {
    .legal-page {
        padding-top: 36px;
    }

    .legal-summary,
    .legal-toc,
    .legal-section {
        padding: 18px;
    }

    .legal-toc ol {
        columns: 1;
    }

    /* the tables become one block per row, each cell with its heading in front */
    .legal-table,
    .legal-table tbody,
    .legal-table tr,
    .legal-table td {
        display: block;
        width: 100%;
    }

    .legal-table thead {
        display: none;
    }

    .legal-table tr {
        padding: 10px 0;
        border-bottom: 1px solid var(--border);
    }

    .legal-table td {
        padding: 2px 0;
        border-bottom: 0;
    }

    .legal-table td:first-child {
        white-space: normal;
        font-size: 15px;
    }

    .legal-table td:not(:first-child)::before {
        display: block;
        margin-top: 4px;
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: var(--text-muted);
    }

    .legal-table--why td:nth-child(2)::before { content: "Purpose"; }
    .legal-table--why td:nth-child(3)::before { content: "Legal basis (GDPR)"; }
    .legal-table--who td:nth-child(2)::before { content: "What for"; }
    .legal-table--who td:nth-child(3)::before { content: "Where"; }
}
