/* Privacy, terms and support pages. Loaded after landing_page.css, which
   supplies the colours, header and footer; this adds the reading column. */

:root {
    /* The landing accent is 3.7:1 on white, too faint for body links. */
    --legal-link: #4c51bf;
    --legal-note-bg: #fef3c7;
    --legal-note-text: #713f12;
    --legal-note-border: #d97706;
}

[data-theme="dark"] {
    --legal-link: #fbbf24;
    --legal-note-bg: #2b2106;
    --legal-note-text: #fde68a;
    --legal-note-border: #fbbf24;
}

.legal-logo {
    text-decoration: none;
    min-height: 44px;
}

.legal-theme-toggle {
    margin-right: 0;
    min-height: 44px;
    padding: 0.5rem 0.9rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-heading);
    border-color: var(--text-secondary);
}

.legal-theme-toggle:hover {
    background: var(--text-heading);
    color: var(--bg-primary);
}

.legal {
    max-width: 720px;
    /* Clears the fixed header. */
    padding-top: 6.5rem;
    padding-bottom: 4rem;
    font-size: 1.0625rem;
    line-height: 1.7;
    overflow-wrap: break-word;
}

.legal h1 {
    font-size: clamp(1.875rem, 6vw, 2.5rem);
    font-weight: 800;
    line-height: 1.2;
    color: var(--text-heading);
    margin-bottom: 0.5rem;
}

.legal h2 {
    font-size: 1.375rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-heading);
    margin: 2.5rem 0 0.75rem;
}

.legal h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-heading);
    margin: 1.5rem 0 0.5rem;
}

.legal p,
.legal ul,
.legal ol {
    margin-bottom: 1rem;
}

.legal ul,
.legal ol {
    padding-left: 1.4rem;
}

.legal li {
    margin-bottom: 0.5rem;
}

.legal a {
    color: var(--legal-link);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.legal-meta {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.legal-summary {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.25rem 1.25rem 0.5rem;
    margin: 1.5rem 0;
}

.legal-summary h2 {
    margin-top: 0;
}

.legal-draft {
    background: var(--legal-note-bg);
    color: var(--legal-note-text);
    border: 2px solid var(--legal-note-border);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 2rem;
}

.legal-todo {
    background: var(--legal-note-bg);
    color: var(--legal-note-text);
    border: 1px solid var(--legal-note-border);
    border-radius: 4px;
    padding: 0 0.25rem;
    font-weight: 600;
    /* A placeholder that wraps keeps its box on both lines. */
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}

.legal a:focus-visible,
.legal-logo:focus-visible,
.legal-theme-toggle:focus-visible,
.footer-links a:focus-visible {
    outline: 3px solid var(--legal-link);
    outline-offset: 2px;
}
