/* ===========================================================================
   The Privacy Policy and Terms of Use (privacy.html, terms.html).
   They are drawn with landing-new.css; this adds what is theirs: the long
   text, the sun and moon in the header, and a dark page (landing-new.css has
   none of its own). The dark colours are the learning hub's and the home
   page's (fba-landing.css), so every page agrees.
   =========================================================================== */

.legal-body {
    max-width: 720px;
    margin: 0 auto;
}

.legal-body h2 {
    font-size: clamp(1.4rem, 2.5vw, 1.9rem);
    margin-top: 2.8rem;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.legal-body h3 {
    font-size: 1.1rem;
    margin-top: 1.5rem;
    margin-bottom: 0.4rem;
    letter-spacing: -0.01em;
}

.legal-body p,
.legal-body li {
    color: var(--text-muted);
    line-height: 1.7;
    font-size: 1.01rem;
}

.legal-body ul {
    padding-left: 1.4rem;
    margin: 0.6rem 0;
}

.legal-body ul li {
    list-style: disc;
    margin-bottom: 0.35rem;
}

.legal-body p+p {
    margin-top: 0.85rem;
}

.legal-updated {
    display: inline-block;
    margin-bottom: 2.5rem;
    padding: 0.35rem 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-pill);
    color: var(--text-soft);
    font-size: 0.82rem;
    font-weight: 700;
}

.legal-divider {
    border: 0;
    border-top: 1px solid var(--border-color);
    margin: 2.5rem 0;
}

/* ── The sun and moon (fba-landing.js switches it) ─────────────────────────── */
.header-bar .nav { margin-left: auto; }
.theme-toggle {
    order: 3;
    position: relative;
    display: grid;
    place-items: center;
    flex: none;
    width: 2.45rem;
    height: 2.45rem;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    background: var(--bg-panel);
    color: var(--text-main);
    font-size: 1.1rem;
    cursor: pointer;
    transition: border-color 180ms var(--ease);
}
.theme-toggle:hover { border-color: var(--border-strong); }
.theme-toggle i { position: absolute; transition: opacity 280ms ease; }
.theme-toggle .moon-icon,
.dark .theme-toggle .sun-icon { opacity: 0; }
.dark .theme-toggle .moon-icon { opacity: 1; }
.nav__link,
.nav__cta { white-space: nowrap; }

/* The menu folds away below 1100px (landing-new.css): the links, the button
   and the sun and moon need that much. */
@media (max-width: 1100px) {
    .header-bar { gap: 0.6rem; }
    /* On a narrow phone the wordmark gives way, not the buttons. */
    .header-bar > .brand { flex: 0 1 auto; min-width: 0; }
    .header-bar > .brand img { width: 100%; height: auto; max-height: clamp(1.4rem, 6vw, 2.05rem); }
    .nav-toggle { flex: none; }
    .theme-toggle {
        order: 1;
        margin-left: auto;
        width: 2.85rem;
        height: 2.85rem;
        border-radius: 0.85rem;
        font-size: 1.3rem;
    }
    .nav-toggle { order: 2; }
    /* The brand's blue in both themes. */
    .nav { background: linear-gradient(165deg, #2a567d 0%, #234d6f 42%, #142d44 100%); }
}

/* ── Dark mode ─────────────────────────────────────────────────────────────── */
.dark {
    color-scheme: dark;
    --bg-color: #0f172a;
    --bg-alt: #111827;
    --bg-panel: #1f2937;
    --text-main: #f9fafb;
    --text-muted: #a7b0bd;
    --text-soft: #8b95a5;
    --border-color: rgba(255, 255, 255, 0.1);
    --border-strong: rgba(255, 255, 255, 0.2);
    --footer-bg: #0b1120;
}
.dark body {
    background:
        radial-gradient(circle at 12% 4%, rgba(110, 164, 208, 0.08), transparent 28rem),
        #0f172a;
}
/* The faint grid drawn over the light page. */
.dark body::before { display: none; }
.dark .site-header { background: rgba(15, 23, 42, 0.86); border-bottom-color: rgba(255, 255, 255, 0.1); }
.dark .header-bar > .brand img { filter: invert(1); }
@media (min-width: 1101px) {
    .dark .nav__link:hover { background: rgba(255, 255, 255, 0.06); }
    .dark .nav__link[aria-current="page"] { background: rgba(255, 255, 255, 0.08); }
}
.dark .btn-primary { color: #0f172a; background: #f1f5f9; box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3); }
.dark .btn-primary:hover { background: #ffffff; }
.dark .eyebrow { color: #93c5fd; }
.dark .legal-body a { color: #93c5fd; }
.dark .site-footer { border-top: 1px solid rgba(255, 255, 255, 0.08); }
.dark .skip-link { color: #0f172a; }
