/* ============================================================
   LEGAL PAGES — legal.php / privacy.php / terms.php
   ============================================================
   Three long documents, one sheet. They ride on the site header
   and footer, so nothing here defines colour from scratch: it
   borrows the variables the theme already publishes and only
   handles what a body of running text needs — measure, rhythm,
   and headings that can be scanned without being read.
   ============================================================ */

.legal-wrap {
    max-width: 860px;                 /* ~85 characters — past that the eye loses the line */
    margin: 0 auto;
    padding: 3rem 1.5rem 5rem;
    color: var(--text-secondary, #b8c0cc);
    font-size: .95rem;
    line-height: 1.75;
}

.legal-wrap h1 {
    font-size: clamp(1.6rem, 4vw, 2.3rem);
    line-height: 1.2;
    margin: 0 0 .4rem;
    color: var(--text-primary, #e6edf3);
    letter-spacing: -.01em;
}

/* The date is the second most useful thing on a legal page after
   the contact address: it tells the reader which version binds them. */
.legal-meta {
    font-size: .8rem;
    opacity: .65;
    margin: 0 0 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, .09));
}

.legal-wrap h2 {
    font-size: 1.12rem;
    margin: 2.6rem 0 .8rem;
    color: var(--text-primary, #e6edf3);
    letter-spacing: .01em;
}

.legal-wrap h2::before {
    content: '';
    display: inline-block;
    width: 6px; height: 6px;
    margin-right: .6rem;
    vertical-align: middle;
    background: var(--accent-gold, #fbbf24);
    transform: rotate(45deg);
    opacity: .8;
}

.legal-wrap h3 {
    font-size: .98rem;
    margin: 1.6rem 0 .5rem;
    color: var(--text-primary, #e6edf3);
}

.legal-wrap p  { margin: 0 0 1rem; }
.legal-wrap ul { margin: 0 0 1.2rem; padding-left: 1.2rem; }
.legal-wrap li { margin-bottom: .45rem; }

.legal-wrap a {
    color: var(--accent-gold, #fbbf24);
    text-decoration: none;
    border-bottom: 1px solid rgba(251, 191, 36, .3);
    transition: border-color .2s;
}
.legal-wrap a:hover { border-bottom-color: var(--accent-gold, #fbbf24); }

.legal-wrap strong { color: var(--text-primary, #e6edf3); font-weight: 600; }

/* A short table of contents. On a 4 000-word document, the reader
   who arrives from the footer is looking for one section, not the
   whole text — this is the only reason these pages get read at all. */
.legal-toc {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem .9rem;
    margin: 0 0 2.5rem;
    padding: 1rem 1.2rem;
    background: rgba(255, 255, 255, .025);
    border: 1px solid var(--border-color, rgba(255, 255, 255, .08));
    border-radius: 10px;
    font-size: .82rem;
}
.legal-toc a { border-bottom: none; opacity: .85; }
.legal-toc a:hover { opacity: 1; }

/* Used for the one thing on each page a reader must not miss:
   the trademark disclaimer, the data-transfer notice, the escrow. */
.legal-note {
    margin: 1.6rem 0;
    padding: 1rem 1.2rem;
    border-left: 2px solid var(--accent-gold, #fbbf24);
    background: rgba(251, 191, 36, .05);
    border-radius: 0 8px 8px 0;
    font-size: .9rem;
}

.legal-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    margin-top: 3.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color, rgba(255, 255, 255, .09));
    font-size: .85rem;
}

/* Light theme — the site ships one, so these pages must hold in it.
   Only the two hard-coded fallbacks above need answering. */
[data-theme="light"] .legal-wrap { color: #3d4451; }
[data-theme="light"] .legal-wrap h1,
[data-theme="light"] .legal-wrap h2,
[data-theme="light"] .legal-wrap h3,
[data-theme="light"] .legal-wrap strong { color: #14181f; }
[data-theme="light"] .legal-toc { background: rgba(0, 0, 0, .03); }
[data-theme="light"] .legal-note { background: rgba(180, 83, 9, .06); }

@media (max-width: 640px) {
    .legal-wrap { padding: 2rem 1.1rem 4rem; font-size: .92rem; }
    .legal-toc  { font-size: .78rem; }
}
