/* Shared styling for the public legal pages: /privacy and /terms.
   These pages render long-form static prose (Privacy Policy + EULA),
   so the goal here is simple, readable typography on a neutral surface
   that matches the marketing site's chrome (same #1A2238 dark navy used
   in the AppBar / footer for the page header band, calm body copy
   below). All selectors are scoped to .legal-page so they cannot
   accidentally restyle anything elsewhere in the app. */

.legal-page {
    background: #f7f8fb;
    min-height: calc(100vh - 64px);
    padding-bottom: 80px;
}

.legal-page__hero {
    background: linear-gradient(135deg, #1E2240 0%, #3B3F7A 100%);
    color: #ffffff;
    padding: 56px 24px 40px;
    text-align: center;
}

.legal-page__hero h1 {
    margin: 0 0 8px;
    font-size: 2.2rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

/* Suppress the browser's default focus ring on the hero H1.
   Routes.razor declares <FocusOnNavigate Selector="h1" />, which
   programmatically focuses the first H1 on every navigation so
   screen readers announce the new page's topic — that's the right
   accessibility behaviour and we keep it. The visible side-effect,
   however, is the browser drawing a thin blue rectangle around the
   full-width centred H1 inside the contrasting dark hero band, which
   reads as a stray UI artefact rather than a focus state to sighted
   users (you can never tab to an H1 manually so a sighted user never
   sees this on any other element). Hiding the outline on this one
   element preserves the screen-reader behaviour and removes the
   visual artefact. The .legal-page__hero scope keeps the global H1
   focus styling intact everywhere else, in case any future page
   wires up an interactive H1. */
.legal-page__hero h1:focus,
.legal-page__hero h1:focus-visible {
    outline: none;
}

.legal-page__hero .legal-page__meta {
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.95rem;
}

.legal-page__container {
    max-width: 880px;
    margin: -28px auto 0;
    padding: 0 16px;
}

.legal-page__paper {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 6px 24px rgba(15, 22, 50, 0.08);
    padding: 40px clamp(20px, 4vw, 56px);
    color: #2A2E55;
    line-height: 1.65;
    font-size: 0.97rem;
}

.legal-page__paper h2 {
    margin: 32px 0 12px;
    font-size: 1.35rem;
    font-weight: 600;
    color: #1E2240;
    line-height: 1.3;
}

.legal-page__paper h2:first-child {
    margin-top: 0;
}

.legal-page__paper h3 {
    margin: 22px 0 10px;
    font-size: 1.08rem;
    font-weight: 600;
    color: #2A2E55;
    line-height: 1.35;
}

.legal-page__paper p {
    margin: 0 0 14px;
}

.legal-page__paper ul,
.legal-page__paper ol {
    margin: 0 0 16px;
    padding-left: 26px;
}

.legal-page__paper li {
    margin-bottom: 6px;
}

.legal-page__paper li > p {
    margin-bottom: 6px;
}

.legal-page__paper hr {
    border: 0;
    border-top: 1px solid #e6e8ef;
    margin: 28px 0;
}

.legal-page__paper a {
    color: #3F8E98;
    text-decoration: none;
    border-bottom: 1px solid rgba(63, 142, 152, 0.35);
}

.legal-page__paper a:hover {
    border-bottom-color: #3F8E98;
}

.legal-page__paper strong {
    color: #1E2240;
    font-weight: 600;
}

.legal-page__paper em {
    font-style: italic;
}

.legal-page__paper code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.92em;
    background: rgba(15, 22, 50, 0.05);
    padding: 1px 5px;
    border-radius: 4px;
}

.legal-page__back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 28px;
    color: #3B3F7A;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid rgba(59, 63, 122, 0.3);
}

.legal-page__back:hover {
    border-bottom-color: #3B3F7A;
}

@media (max-width: 600px) {
    .legal-page__hero {
        padding: 40px 16px 32px;
    }
    .legal-page__hero h1 {
        font-size: 1.7rem;
    }
    .legal-page__paper {
        padding: 28px 18px;
        font-size: 0.94rem;
    }
}

/* Phone — small phones (≤480px). Long-form legal copy needs comfortable
   reading width even on narrow viewports, so we tighten the paper padding
   and reduce list indents (browser default + 26px is too aggressive on a
   ~360px viewport — it eats most of the column). H2/H3 sizes drop a touch
   so section breaks are clear without dominating the page. */
@media (max-width: 480px) {
    .legal-page__hero {
        padding: 32px 14px 24px;
    }
    .legal-page__hero h1 {
        font-size: 1.45rem;
    }
    .legal-page__hero .legal-page__meta {
        font-size: 0.85rem;
    }
    .legal-page__container {
        padding: 0 12px;
    }
    .legal-page__paper {
        padding: 22px 14px;
        font-size: 0.92rem;
    }
    .legal-page__paper h2 {
        font-size: 1.2rem;
        margin-top: 26px;
    }
    .legal-page__paper h3 {
        font-size: 1rem;
    }
    .legal-page__paper ul,
    .legal-page__paper ol {
        padding-left: 20px;
    }
}
