/*
 * Shared stylesheet for the static legal documents in this directory.
 *
 * These pages are deliberately NOT part of the SPA: no bundler, no JS, no
 * webfont, no external request of any kind. They are served straight from S3
 * (CloudFront default behavior) so they resolve for the Play Console crawler,
 * for a plain browser, and offline from the service-worker precache — none of
 * which can be relied on to boot React first.
 *
 * One neutral palette serves both apps. The per-app canvases (#0B1221 weather,
 * #000 stocks) are not worth forking a stylesheet over for a document nobody
 * reads inside the themed UI.
 */

:root {
    color-scheme: light dark;

    --page: #ffffff;
    --surface: #f6f7f9;
    --text: #14171f;
    --text-muted: #5a6473;
    --link: #2b4acb;
    --hairline: rgba(15, 23, 42, 0.14);
    --measure: 68ch;
}

@media (prefers-color-scheme: dark) {
    :root {
        --page: #0b0f18;
        --surface: #141924;
        --text: #e9ecf2;
        --text-muted: #98a1b0;
        --link: #8fa6ff;
        --hairline: rgba(255, 255, 255, 0.14);
    }
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 2rem 1.25rem 4rem;
    background: var(--page);
    color: var(--text);
    font-family:
        system-ui,
        -apple-system,
        'Segoe UI',
        Roboto,
        Helvetica,
        Arial,
        sans-serif;
    font-size: 1rem;
    line-height: 1.65;
    /* Long legal prose at a phone's default text size is unreadable; let the
       platform scale it up but never let it reflow the layout. */
    -webkit-text-size-adjust: 100%;
    text-rendering: optimizeLegibility;
}

main {
    max-width: var(--measure);
    margin: 0 auto;
}

h1 {
    font-size: 1.6rem;
    line-height: 1.25;
    letter-spacing: -0.01em;
    margin: 0 0 0.5rem;
}

h2 {
    font-size: 1.2rem;
    line-height: 1.3;
    margin: 2.5rem 0 0.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--hairline);
}

h3 {
    font-size: 1.02rem;
    margin: 1.75rem 0 0.5rem;
}

p,
li {
    margin: 0 0 0.9rem;
}

ul,
ol {
    padding-left: 1.4rem;
}

a {
    color: var(--link);
    /* Long inline URLs and mailto addresses must not push the page wide. */
    overflow-wrap: anywhere;
}

.meta {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

/* Table of contents — the source documents all open with one. */
.toc {
    background: var(--surface);
    border: 1px solid var(--hairline);
    border-radius: 12px;
    padding: 1.1rem 1.25rem 0.6rem;
    margin-bottom: 2rem;
}

.toc p {
    font-weight: 600;
    margin: 0 0 0.6rem;
}

.toc ol {
    margin: 0;
    padding-left: 1.2rem;
    color: var(--text-muted);
}

.toc li {
    margin-bottom: 0.35rem;
}

/* Emphasised blocks: the TOS's all-caps acceptance notice. */
.notice {
    background: var(--surface);
    border-left: 3px solid var(--link);
    border-radius: 0 8px 8px 0;
    padding: 0.9rem 1.1rem;
    margin: 0 0 1.25rem;
}

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

/*
 * The state-privacy-rights grid is genuinely wide. Scroll it inside its own
 * container so the page body never scrolls sideways on a phone.
 */
.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 0 1.5rem;
    border: 1px solid var(--hairline);
    border-radius: 12px;
}

table {
    border-collapse: collapse;
    width: 100%;
    min-width: 34rem;
    font-size: 0.92rem;
}

th,
td {
    text-align: left;
    vertical-align: top;
    padding: 0.7rem 0.85rem;
    border-bottom: 1px solid var(--hairline);
}

th {
    background: var(--surface);
    font-weight: 600;
}

tbody tr:last-child td {
    border-bottom: 0;
}

footer {
    margin-top: 3rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--hairline);
    color: var(--text-muted);
    font-size: 0.9rem;
}

footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

footer li {
    margin-bottom: 0.4rem;
}

.address {
    font-style: normal;
    color: var(--text-muted);
}
