/* Public legal pages: terms, privacy, cookies.
   Long-form reading, so the measure is capped and the type is sized for it
   rather than for the dense app screens. */

.legal-page {
    margin: 0;
    background: #fff;
    color: #33404d;
    font-size: 16px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

.legal-shell {
    width: 100%;
    max-width: 820px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Header ------------------------------------------------------------- */

.legal-header {
    border-bottom: 1px solid #edf1f5;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 10;
}

.legal-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 14px;
    padding-bottom: 14px;
}

.legal-brand img {
    height: 34px;
    width: auto;
    display: block;
}

.legal-nav {
    display: flex;
    gap: 20px;
}

    .legal-nav a {
        color: #6b7a89;
        text-decoration: none;
        font-size: .88rem;
        font-weight: 500;
    }

        .legal-nav a:hover {
            color: #2E6EA4;
        }

    /* The one action link in a row of reading links, so it gets a button
       treatment rather than blending in as a fourth document. */
    .legal-nav a.legal-nav-login {
        color: #fff;
        background: #2E6EA4;
        padding: 6px 16px;
        border-radius: 30px;
        font-weight: 600;
    }

        .legal-nav a.legal-nav-login:hover {
            background: #24567f;
            color: #fff;
        }

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

.legal-main {
    padding-top: 40px;
    padding-bottom: 64px;
}

.legal-eyebrow {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #9aa7b4;
    margin-bottom: 8px;
}

.legal-doc h1 {
    font-size: 2.1rem;
    font-weight: 700;
    color: #1f2d3a;
    line-height: 1.2;
    margin: 0 0 14px;
}

.legal-lede {
    font-size: 1.05rem;
    line-height: 1.65;
    color: #55636f;
    margin-bottom: 18px;
}

.legal-dates {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    padding: 12px 16px;
    border-radius: 8px;
    background: #f7fafc;
    border: 1px solid #eaeff4;
    font-size: .82rem;
    color: #6b7a89;
}

    .legal-dates strong {
        color: #45525f;
        font-weight: 600;
    }

.legal-doc-head {
    margin-bottom: 34px;
}

/* --- Contents ----------------------------------------------------------- */

.legal-toc {
    padding: 18px 20px;
    border: 1px solid #eaeff4;
    border-radius: 10px;
    margin-bottom: 40px;
    background: #fcfdfe;
}

.legal-toc-title {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #9aa7b4;
    margin-bottom: 10px;
}

.legal-toc ol {
    margin: 0;
    padding: 0;
    list-style: none;
    columns: 2;
    column-gap: 28px;
}

.legal-toc li {
    break-inside: avoid;
    margin-bottom: 5px;
}

.legal-toc a {
    color: #4a5a68;
    text-decoration: none;
    font-size: .86rem;
    line-height: 1.5;
}

    .legal-toc a:hover {
        color: #2E6EA4;
        text-decoration: underline;
    }

    .legal-toc a.active {
        color: #2E6EA4;
        font-weight: 600;
    }

/* --- Sections ----------------------------------------------------------- */

.legal-doc section {
    margin-bottom: 38px;
    scroll-margin-top: 84px; /* clears the sticky header on anchor jumps */
}

.legal-doc h2 {
    font-size: 1.32rem;
    font-weight: 700;
    color: #1f2d3a;
    line-height: 1.35;
    margin: 0 0 14px;
    padding-bottom: 9px;
    border-bottom: 1px solid #eef2f6;
}

.legal-doc h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #2b3946;
    margin: 22px 0 8px;
}

.legal-doc p {
    margin: 0 0 14px;
}

.legal-doc ul,
.legal-doc ol:not(.legal-toc ol) {
    margin: 0 0 14px;
    padding-left: 22px;
}

.legal-doc li {
    margin-bottom: 8px;
}

.legal-doc a {
    color: #2E6EA4;
}

    .legal-doc a:hover {
        color: #24567f;
    }

.legal-doc code {
    font-family: Consolas, Monaco, "Courier New", monospace;
    font-size: .84em;
    background: #f2f5f8;
    border: 1px solid #e6ecf2;
    border-radius: 4px;
    padding: 1px 5px;
    color: #37474f;
    word-break: break-word;
}

.legal-muted {
    color: #8a97a3;
    font-size: .88em;
}

.legal-note {
    font-size: .86rem;
    color: #6b7a89;
    font-style: italic;
}

/* --- Callout pairs ------------------------------------------------------ */

.legal-callout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin: 18px 0;
}

.legal-callout-item {
    padding: 16px 18px;
    border: 1px solid #eaeff4;
    border-radius: 10px;
    background: #fcfdfe;
}

    .legal-callout-item h3 {
        margin-top: 0;
        margin-bottom: 7px;
        font-size: .92rem;
        color: #2E6EA4;
    }

    .legal-callout-item p {
        margin-bottom: 0;
        font-size: .88rem;
        line-height: 1.6;
        color: #55636f;
    }

/* --- Tables ------------------------------------------------------------- */

.legal-table-wrap {
    overflow-x: auto;
    margin: 16px 0 18px;
    border: 1px solid #eaeff4;
    border-radius: 10px;
}

.legal-table {
    width: 100%;
    min-width: 520px;
    border-collapse: collapse;
    font-size: .86rem;
}

    .legal-table th {
        text-align: left;
        font-weight: 700;
        color: #45525f;
        background: #f7fafc;
        padding: 11px 14px;
        border-bottom: 1px solid #eaeff4;
        white-space: nowrap;
    }

    .legal-table td {
        padding: 11px 14px;
        border-bottom: 1px solid #f2f6f9;
        vertical-align: top;
        line-height: 1.55;
    }

    .legal-table tr:last-child td {
        border-bottom: none;
    }

/* --- Contact block ------------------------------------------------------ */

.legal-contact {
    padding: 16px 18px;
    border-radius: 10px;
    background: #f7fafc;
    border: 1px solid #eaeff4;
    font-style: normal;
    line-height: 1.8;
    font-size: .9rem;
    margin-bottom: 14px;
}

/* --- Footer ------------------------------------------------------------- */

.legal-footer {
    border-top: 1px solid #edf1f5;
    background: #fcfdfe;
    padding: 22px 0;
}

.legal-footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 20px;
    font-size: .82rem;
    color: #8a97a3;
}

.legal-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

    .legal-footer-links a {
        color: #6b7a89;
        text-decoration: none;
    }

        .legal-footer-links a:hover {
            color: #2E6EA4;
        }

/* --- Narrow screens ----------------------------------------------------- */

@media screen and (max-width: 700px) {
    .legal-page {
        font-size: 15px;
    }

    .legal-shell {
        padding: 0 18px;
    }

    .legal-doc h1 {
        font-size: 1.6rem;
    }

    .legal-doc h2 {
        font-size: 1.15rem;
    }

    .legal-lede {
        font-size: .98rem;
    }

    /* One column: two columns of contents at this width leaves each entry
       wrapping over three lines. */
    .legal-toc ol {
        columns: 1;
    }

    .legal-callout {
        grid-template-columns: 1fr;
    }

    .legal-header {
        position: static;
    }

    .legal-nav {
        gap: 14px;
    }

    .legal-footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* --- Print -------------------------------------------------------------- */

@media print {
    .legal-header,
    .legal-footer,
    .legal-toc {
        display: none;
    }

    .legal-page {
        font-size: 11pt;
    }

    .legal-doc section {
        page-break-inside: avoid;
    }

    .legal-doc a {
        color: inherit;
        text-decoration: none;
    }
}
