/* Location: /css/legal.css
   NEW 19-Oct-2026 (Compliance Part 4A): layout for the /legal/ pages (Terms, Privacy, Cookies, archive).
   Loaded after homepage_style.css (header + shared footer come from there). */

.legal-wrap {
    max-width: 820px;
    margin: 0 auto;
    padding: 32px 16px 56px;
    color: #1f2933;
    font-size: 16px;
    line-height: 1.7;
    box-sizing: border-box;
}
.legal-wrap h1 {
    font-size: clamp(1.7rem, 4vw, 2.3rem);
    line-height: 1.25;
    color: #003e67;
    margin: 8px 0 6px;
}
.legal-meta {
    color: #52606d;
    font-size: 0.92rem;
    margin: 0 0 18px;
}

/* Notes: yellow = superadmin only, blue = archive / info */
.legal-note {
    border-radius: 8px;
    padding: 10px 14px;
    margin: 0 0 18px;
    font-size: 0.92rem;
    background: #eef6fc;
    border: 1px solid #c9e2f5;
}
.legal-note-preview { background: #fff8e1; border-color: #f5d97a; }
.legal-note-archive { background: #eef6fc; border-color: #9cc9ec; }
.legal-note a { color: #003e67; font-weight: 600; }

.legal-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    align-items: center;
    margin: 0 0 22px;
    font-size: 0.92rem;
}
.legal-tools a { color: #003e67; }
.legal-print-btn {
    font: inherit;
    font-size: 0.9rem;
    padding: 6px 14px;
    border: 1px solid #003e67;
    border-radius: 6px;
    background: #fff;
    color: #003e67;
    cursor: pointer;
}
.legal-print-btn:hover, .legal-print-btn:focus-visible { background: #003e67; color: #fff; }

/* Table of contents */
.legal-toc {
    background: #f7f9fb;
    border: 1px solid #e4e7eb;
    border-radius: 10px;
    padding: 14px 18px;
    margin: 0 0 28px;
}
.legal-toc-title { font-weight: 700; margin: 0 0 6px; color: #003e67; }
.legal-toc ul { list-style: none; margin: 0; padding: 0; columns: 2 260px; column-gap: 28px; }
.legal-toc li { margin: 0 0 4px; break-inside: avoid; }
.legal-toc a { color: #1f2933; text-decoration: none; }
.legal-toc a:hover, .legal-toc a:focus-visible { color: #003e67; text-decoration: underline; }

/* The document text */
.legal-content { max-width: 72ch; overflow-wrap: anywhere; }
.legal-content h2 {
    font-size: 1.3rem;
    color: #003e67;
    margin: 34px 0 10px;
    line-height: 1.35;
    scroll-margin-top: 90px;          /* anchor jumps are not hidden under a sticky header */
}
.legal-content h3 { font-size: 1.08rem; margin: 22px 0 8px; line-height: 1.4; }
.legal-content h4 { font-size: 1rem; margin: 18px 0 6px; }
.legal-content p  { margin: 0 0 14px; }
.legal-content ul, .legal-content ol { margin: 0 0 14px; padding-left: 1.4em; }
.legal-content li { margin: 0 0 6px; }
.legal-content a  { color: #005a96; text-decoration: underline; }
.legal-content blockquote { margin: 0 0 14px; padding: 6px 14px; border-left: 4px solid #ff9842; background: #fffaf5; }
.legal-content hr { border: 0; border-top: 1px solid #e4e7eb; margin: 24px 0; }

/* Tables (e.g. the cookie list) scroll sideways on phones instead of widening the page */
.legal-content table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
    margin: 0 0 18px;
    font-size: 0.92rem;
}
.legal-content th, .legal-content td {
    border: 1px solid #d9dee3;
    padding: 8px 10px;
    text-align: left;
    vertical-align: top;
    min-width: 90px;
}
.legal-content th { background: #f1f4f7; }

.legal-list { padding-left: 1.2em; }
.legal-list li { margin: 0 0 8px; }
.legal-list a { color: #003e67; font-weight: 600; }
.legal-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 0.78rem;
    background: #e3f4ea;
    color: #1d6b3a;
}
.legal-coming-soon { font-size: 1.1rem; color: #52606d; }

/* Print / Save as PDF: only the document */
@media print {
    .site-header, .site-footer, footer, #ccb-banner, #csm-overlay, .legal-tools, .legal-toc,
    .legal-note-preview, .youtube-tutorial-btn, .floating-btn, .back-to-top { display: none !important; }
    body { background: #fff !important; }
    .legal-wrap { max-width: none; padding: 0; font-size: 11pt; color: #000; }
    .legal-content { max-width: none; }
    .legal-content a { color: #000; }
    .legal-content a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; }
    .legal-content h2 { break-after: avoid; }
    .legal-content table { display: table; overflow: visible; }
}
