/* ==========================================================================
   FireX Studio — long-document typography for the Privacy Policy and Terms.
   Loaded after styles.css; inherits every token from it.
   ========================================================================== */

.legal-hero { padding: 168px 0 56px; }
.legal-hero h1 { font-size: clamp(2.2rem, 5.2vw, 3.6rem); margin: 22px 0 20px; }
.legal-hero .lead { max-width: 62ch; }

.legal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 28px;
    margin-top: 30px;
    padding-top: 24px;
    border-top: 1px solid var(--scale);
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.6875rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--soot);
}

.legal-meta b { color: var(--smoke); font-weight: 500; }

.legal-layout {
    display: grid;
    grid-template-columns: 232px 1fr;
    gap: 64px;
    align-items: start;
    padding-bottom: 108px;
}

/* --- Sticky table of contents --------------------------------------------- */

.toc {
    position: sticky;
    top: 104px;
    border-left: 1px solid var(--scale);
    padding-left: 22px;
}

.toc h5 {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--soot);
    margin-bottom: 16px;
}

.toc ol {
    list-style: none;
    counter-reset: toc;
    display: grid;
    gap: 9px;
}

.toc li { counter-increment: toc; }

.toc a {
    display: flex;
    gap: 10px;
    font-size: 0.875rem;
    line-height: 1.45;
    color: var(--smoke);
}

.toc a::before {
    content: counter(toc, decimal-leading-zero);
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.6875rem;
    color: var(--soot);
    padding-top: 2px;
    flex-shrink: 0;
}

.toc a:hover { color: var(--tx700); }
.toc a:hover::before { color: var(--tx900); }

/* --- Document body --------------------------------------------------------- */

.legal-body { max-width: 68ch; }

.legal-body section { padding-top: 14px; margin-bottom: 46px; scroll-margin-top: 104px; }

.legal-body h2 {
    font-size: clamp(1.35rem, 2.4vw, 1.75rem);
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--scale);
}

.legal-body h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 30px 0 12px;
    color: var(--ash);
}

.legal-body p {
    color: var(--smoke);
    margin-bottom: 16px;
    font-size: 0.9688rem;
    line-height: 1.78;
}

.legal-body ul { list-style: none; margin: 0 0 20px; display: grid; gap: 11px; }

.legal-body li {
    position: relative;
    padding-left: 22px;
    color: var(--smoke);
    font-size: 0.9688rem;
    line-height: 1.7;
}

.legal-body li::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 11px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--h900);
}

.legal-body li strong,
.legal-body p strong { color: var(--ash); font-weight: 600; }

.legal-body a {
    color: var(--tx700);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.legal-body a:hover { color: var(--tx900); }

/* Callout for the clauses people actually need to notice */
.legal-note {
    border: 1px solid var(--scale-hot);
    border-radius: var(--r);
    padding: 22px 24px;
    margin: 24px 0;
    background: rgba(255, 107, 44, 0.07);
}

.legal-note p:last-child { margin-bottom: 0; }

.legal-note .temp { margin-bottom: 12px; }

/* Contact block that closes both documents */
.legal-contact {
    border: 1px solid var(--scale);
    border-radius: var(--r);
    padding: 24px 26px;
    background: var(--slag);
    box-shadow: var(--lift);
}

.legal-contact p { margin-bottom: 4px; color: var(--smoke); }
.legal-contact p:first-child { color: var(--ash); font-weight: 600; margin-bottom: 10px; }

@media (max-width: 900px) {
    .legal-layout { grid-template-columns: 1fr; gap: 40px; padding-bottom: 76px; }

    .toc {
        position: static;
        border-left: none;
        border-top: 1px solid var(--scale);
        border-bottom: 1px solid var(--scale);
        padding: 22px 0;
    }

    .toc ol { grid-template-columns: 1fr 1fr; display: grid; gap: 10px 20px; }
}

@media (max-width: 640px) {
    .legal-hero { padding: 132px 0 40px; }
    .toc ol { grid-template-columns: 1fr; }
}
