/*
 * Shared styling for the static content pages: /about, /help, /privacy.
 *
 * These three are plain files in public/ rather than React routes, for the
 * same reasons /i/index.html is: they must render for a reviewer with no
 * account, they must not depend on src/firebase/config.js resolving its
 * top-level await, and they carry their own <meta name="robots"> rather than
 * inheriting public/index.html's site-wide "noindex, nofollow".
 *
 * A shared stylesheet rather than the inlined CSS /i/ uses, because these are
 * long pages read once, not a label scan where a second request is a second
 * chance to fail. The visual language is deliberately identical to /i/ so a
 * customer who lands on both sees one product.
 */

@font-face {
    font-family: "BellBold";
    src: local("BellBold"), url("/fonts/bell-mt-bold.ttf") format("truetype");
    font-display: swap;
}

:root {
    color-scheme: light;

    --ink: #111111;
    --paper: #fafafa;
    --card: #ffffff;
    --muted: #777777;
    --rule: #dddddd;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 1.5rem 1rem 3rem 1rem;
    background-color: var(--paper);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto",
        "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans",
        "Helvetica Neue", sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.frame {
    max-width: 46rem;
    margin: 0 auto;
    border: 1rem solid var(--ink);
    background-color: var(--paper);
    padding: 2.5rem 2.5rem 3rem 2.5rem;
}

/* The masthead is centred; everything below it reads as a document. */
.masthead {
    text-align: center;
    margin-bottom: 2.5rem;
}

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

.logo {
    width: 8rem;
    max-width: 50%;
    height: auto;
}

.tagline {
    margin: 0.25rem 0 0 0;
    font-family: "BellBold";
    font-size: 1.375rem;
    line-height: 1.2;
    color: var(--ink);
}

h1 {
    margin: 0 0 0.5rem 0;
    font-size: 1.875rem;
    line-height: 1.2;
}

h2 {
    margin: 2.5rem 0 0.75rem 0;
    font-size: 1.25rem;
    line-height: 1.3;
    padding-bottom: 0.5rem;
    border-bottom: 0.0625rem solid var(--rule);
}

h3 {
    margin: 1.75rem 0 0.5rem 0;
    font-size: 1.0625rem;
    line-height: 1.35;
}

p,
li {
    font-size: 1.0625rem;
    line-height: 1.6;
}

p {
    margin: 0 0 1rem 0;
}

ul,
ol {
    margin: 0 0 1rem 0;
    padding-left: 1.5rem;
}

li {
    margin-bottom: 0.5rem;
}

a {
    color: var(--ink);
}

strong {
    font-weight: 600;
}

.lede {
    font-size: 1.1875rem;
    line-height: 1.55;
}

.updated {
    margin: 0 0 2rem 0;
    color: var(--muted);
    font-size: 0.9375rem;
}

.muted {
    color: var(--muted);
    font-size: 0.9375rem;
}

/* Used for the subprocessor list and the data-collection summary. */
.table-scroll {
    overflow-x: auto;
    margin: 0 0 1.5rem 0;
}

table {
    border-collapse: collapse;
    width: 100%;
    min-width: 30rem;
    background-color: var(--card);
}

th,
td {
    border: 0.0625rem solid var(--rule);
    padding: 0.625rem 0.75rem;
    text-align: left;
    font-size: 0.9375rem;
    line-height: 1.5;
    vertical-align: top;
}

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

.callout {
    margin: 0 0 1.5rem 0;
    padding: 1rem 1.25rem;
    border-left: 0.25rem solid var(--ink);
    background-color: var(--card);
}

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

.cta {
    display: inline-block;
    margin: 0.5rem 0.5rem 0.5rem 0;
    padding: 0.875rem 2rem;
    background-color: var(--ink);
    color: var(--paper);
    font-size: 1.0625rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0.25rem;
}

.cta:active {
    background-color: var(--muted);
}

.cta-secondary {
    background-color: transparent;
    color: var(--ink);
    border: 0.125rem solid var(--ink);
    padding: 0.75rem 1.875rem;
}

/* Question-and-answer blocks on /help. */
.qa {
    margin: 0 0 1.5rem 0;
    padding-bottom: 1.5rem;
    border-bottom: 0.0625rem solid var(--rule);
}

.qa:last-of-type {
    border-bottom: none;
}

.qa h3 {
    margin-top: 0;
}

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

footer {
    margin: 2rem auto 0 auto;
    max-width: 46rem;
    text-align: center;
}

footer a {
    color: var(--muted);
    font-size: 0.875rem;
    margin: 0 0.5rem;
}

footer p {
    color: var(--muted);
    font-size: 0.875rem;
    margin: 0.75rem 0 0 0;
}

/* Mirrors the breakpoints the React app already uses. */
@media (max-width: 55em) {
    .frame {
        border-width: 0.5rem;
        padding: 1.5rem 1.25rem 2rem 1.25rem;
    }

    .tagline {
        font-size: 1.125rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.125rem;
    }

    p,
    li {
        font-size: 1rem;
    }

    .lede {
        font-size: 1.0625rem;
    }
}

@media (max-width: 45em) {
    .logo {
        width: 6.5rem;
    }

    .cta {
        display: block;
        text-align: center;
        margin-right: 0;
    }
}
