/* ==========================================================================
   Legal pages - shared typographic system
   Used by: /customer/terms, /business/terms, /business/acceptable-use,
            /business/merchant-agreement, /business/data-processing-agreement,
            /privacy-policy, /cookie-policy
   ========================================================================== */

.legal-content {
    color: #1f2937;
    font-size: 16px;
    line-height: 1.7;
}

.legal-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    scroll-margin-top: 2rem;
    padding-top: 0.25rem;
    border-top: 1px solid #e5e7eb;
    padding-top: 1.75rem;
}

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

.legal-content h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: #111827;
    margin-top: 1.75rem;
    margin-bottom: 0.5rem;
    scroll-margin-top: 2rem;
}

.legal-content p {
    margin-bottom: 1rem;
}

.legal-content ul,
.legal-content ol {
    margin: 0.5rem 0 1.25rem 1.5rem;
}

.legal-content ul {
    list-style: disc;
}

.legal-content ol {
    list-style: decimal;
}

.legal-content li {
    margin-bottom: 0.5rem;
    padding-left: 0.25rem;
}

.legal-content li::marker {
    color: rgb(70, 158, 131);
}

.legal-content a {
    color: rgb(70, 158, 131);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.legal-content a:hover {
    color: rgb(56, 130, 108);
}

.legal-content strong {
    color: #111827;
    font-weight: 600;
}

.legal-content em {
    font-style: italic;
}

.legal-content hr {
    margin: 2rem 0;
    border: 0;
    border-top: 1px solid #e5e7eb;
}

.legal-content code,
.legal-content kbd {
    font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    font-size: 0.9em;
    background: #f3f4f6;
    padding: 0.1em 0.35em;
    border-radius: 4px;
}

/* Callouts */
.legal-content .callout {
    border-left: 4px solid;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    background: #f9fafb;
}

.legal-content .callout p {
    margin: 0;
}

.legal-content .callout p + p {
    margin-top: 0.5rem;
}

.legal-content .callout-info {
    border-color: rgb(70, 158, 131);
    background: rgba(203, 243, 240, 0.35);
}

.legal-content .callout-warning {
    border-color: #d97706;
    background: #fffbeb;
}

.legal-content .callout-note {
    border-color: #6b7280;
    background: #f9fafb;
}

/* Tables (used in DPA & Cookie Policy) */
.legal-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.95rem;
}

.legal-content th,
.legal-content td {
    text-align: left;
    padding: 0.65rem 0.85rem;
    border: 1px solid #e5e7eb;
    vertical-align: top;
}

.legal-content thead th {
    background: #f9fafb;
    font-weight: 600;
    color: #111827;
}

.legal-content tbody tr:nth-child(even) {
    background: #fcfcfd;
}

/* Sticky TOC active link (optional, requires JS to toggle) */
.legal-toc a.active {
    color: rgb(70, 158, 131);
    font-weight: 600;
}

/* Print friendliness */
@media print {
    .legal-content {
        font-size: 11pt;
        line-height: 1.5;
    }
    .legal-content h2 {
        page-break-after: avoid;
    }
    .legal-content .callout {
        background: transparent !important;
    }
    nav, footer, aside { display: none !important; }
}

/* Mobile tweaks */
@media (max-width: 640px) {
    .legal-content {
        font-size: 15px;
    }
    .legal-content h2 {
        font-size: 1.25rem;
    }
}
