/* Legal pages — imprint, privacy policy, terms.
   Deliberately plain: these texts are read, not skimmed, so the job here is line length,
   line height and a clear hierarchy. Everything else stays out of the way. */

.legal {
    padding: 7rem 0 4rem;
    background: var(--body-bg, #fff);
}

.legal-container {
    max-width: 52rem;   /* ~75 characters per line, which is where reading stays comfortable */
    margin: 0 auto;
}

.legal h1 {
    font-size: 2.25rem;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

.legal h2 {
    font-size: 1.4rem;
    line-height: 1.3;
    margin: 2.5rem 0 0.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color, #e5e7eb);
}

.legal h3 {
    font-size: 1.1rem;
    margin: 1.75rem 0 0.5rem;
}

.legal h4 {
    font-size: 1rem;
    margin: 1.25rem 0 0.5rem;
}

.legal p,
.legal li {
    line-height: 1.7;
    margin-bottom: 0.9rem;
}

.legal ul {
    padding-left: 1.25rem;
    margin-bottom: 1rem;
}

.legal a {
    color: var(--primary, #4f46e5);
}

/* The lead paragraph under the title. */
.legal-meta {
    color: var(--text-color-muted, #6b7280);
    font-size: 1.05rem;
    margin-bottom: 2rem;
}

/* Draft warning. Loud on purpose — nobody should publish these by accident. */
.legal-draft {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    color: #78350f;
    padding: 1rem 1.25rem;
    border-radius: 0.5rem;
    margin-bottom: 2.5rem;
}

.legal-draft code {
    background: rgba(0, 0, 0, 0.06);
    padding: 0.1em 0.35em;
    border-radius: 0.25rem;
}

/* A note to the reader about something that needs judgement, not a rule. */
.legal-hint {
    color: var(--text-color-muted, #6b7280);
    font-style: italic;
}

.legal-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0 1.5rem;
    font-size: 0.95rem;
}

.legal-table th,
.legal-table td {
    border: 1px solid var(--border-color, #e5e7eb);
    padding: 0.6rem 0.8rem;
    text-align: left;
    vertical-align: top;
}

.legal-table th {
    background: var(--component-hover-bg, #f9fafb);
    font-weight: 600;
}

/* Wide tables scroll inside themselves rather than pushing the page sideways. */
.legal-table-scroll {
    overflow-x: auto;
}

/* The withdrawal notice: set apart, because it is a prescribed text and not our prose. */
.legal-box {
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 0.75rem;
    padding: 1.5rem;
    background: var(--component-hover-bg, #f9fafb);
    margin: 1.5rem 0;
}

.legal-box h3 {
    margin-top: 0;
}

.legal-address,
.legal-form {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.9rem;
    line-height: 1.7;
    background: #fff;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 0.5rem;
    padding: 1rem;
}

.legal-updated {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color, #e5e7eb);
    color: var(--text-color-muted, #6b7280);
    font-size: 0.9rem;
}

@media (max-width: 640px) {
    .legal {
        padding: 5.5rem 0 3rem;
    }

    .legal h1 {
        font-size: 1.75rem;
    }

    .legal-table {
        font-size: 0.85rem;
        display: block;
        overflow-x: auto;
    }
}
