/* ═══════════════════════════════════════════
   DROPS Legal — Clean document styling
   Matches brutalist form/footer conventions
   ═══════════════════════════════════════════ */

/* 1. Section layout — reset viewport font-size from landing.css */
.legal-section {
    font-size: 16px;
    padding: 0 0 2em;
}

.legal-section .wrap {
    display: flex;
    justify-content: center;
    max-width: 720px;
}

/* 2. Container — airmail border, max-width for readability */
.legal-container {
    position: relative;
    width: 100%;
    padding: 2em 2.4em 2.4em;
    border-radius: 6px;
    background: var(--bg);
}

.legal-container::before {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 10px;
    background: repeating-linear-gradient(
        -45deg,
        #c00 0px, #c00 4px,
        #fff 4px, #fff 8px,
        #00c 8px, #00c 12px,
        #fff 12px, #fff 16px
    );
    opacity: 0.2;
    z-index: -1;
    pointer-events: none;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    padding: 3px;
}

/* 3. Page title (h1) — generated from frontmatter title */
.legal-container h1 {
    font-family: var(--font);
    font-size: 28px;
    font-weight: 900;
    line-height: 1.1;
    color: var(--fg);
    margin: 0 0 0.3em;
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

/* 4. Section headings (h2) */
.legal-container h2 {
    font-family: var(--font);
    font-size: 15px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--fg);
    margin: 2em 0 0.8em;
    padding-bottom: 0.4em;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.legal-container h2:first-of-type {
    margin-top: 1.2em;
}

/* 5. Sub-headings (h3) */
.legal-container h3 {
    font-family: var(--font);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(0, 0, 0, 0.6);
    margin: 1.4em 0 0.6em;
}

/* 6. Body text */
.legal-container p {
    font-family: var(--font);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.65;
    color: rgba(0, 0, 0, 0.7);
    margin: 0 0 0.8em;
}

.legal-container p:last-child {
    margin-bottom: 0;
}

/* Bold spans */
.legal-container p strong {
    font-weight: 700;
    color: var(--fg);
}

/* Italic — legal references */
.legal-container p em {
    font-style: italic;
}

/* 7. Lists */
.legal-container ul,
.legal-container ol {
    font-family: var(--font);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.65;
    color: rgba(0, 0, 0, 0.7);
    margin: 0 0 1em;
    padding-left: 1.4em;
}

.legal-container li {
    margin-bottom: 0.4em;
}

.legal-container li:last-child {
    margin-bottom: 0;
}

.legal-container li strong {
    font-weight: 700;
    color: rgba(0, 0, 0, 0.85);
}

/* 8. Links */
.legal-container a {
    color: var(--blue);
    text-decoration: underline;
    text-decoration-color: var(--blue);
    text-underline-offset: 0.12em;
    text-decoration-thickness: 1px;
    transition: text-decoration-thickness 0.15s;
}

.legal-container a:hover {
    text-decoration-thickness: 2px;
}

/* 9. Tables — data retention table */
.legal-container table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.6em 0 1.2em;
    font-family: var(--font);
    font-size: 13px;
}

.legal-container thead th {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 11px;
    color: rgba(0, 0, 0, 0.5);
    text-align: left;
    padding: 0.6em 0.8em;
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
}

.legal-container tbody td {
    font-weight: 500;
    color: rgba(0, 0, 0, 0.7);
    padding: 0.6em 0.8em;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

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

/* 10. Horizontal rules */
.legal-container hr {
    border: none;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    margin: 2em 0;
}

/* 11. Mobile responsive */
@media (max-width: 768px) {
    .legal-section {
        font-size: 15px;
    }

    .legal-section .wrap {
        max-width: 100%;
        padding: 0 12px;
    }

    .legal-container {
        padding: 1.4em 1.2em 1.6em;
    }

    .legal-container h1 {
        font-size: 22px;
    }

    .legal-container h2 {
        font-size: 13px;
    }

    .legal-container h3 {
        font-size: 12px;
    }

    .legal-container p,
    .legal-container ul,
    .legal-container ol {
        font-size: 13px;
    }

    .legal-container table {
        font-size: 12px;
    }

    .legal-container thead th {
        font-size: 10px;
    }
}
