/*
 * Amazon GeoScout — stylesheet for the App Store support, privacy and marketing pages.
 *
 * One file, no build step, no framework, nothing fetched from a third party. These pages are
 * linked from an App Store listing, so they must render for an Apple reviewer on an unknown
 * device and network, and a privacy notice has to stay readable if CSS is unavailable.
 *
 * Colours follow Amazon's brand palette (Squid Ink #232F3E, Amazon Orange #FF9900), as
 * flex.amazon.com does. Typography uses the system stack rather than Amazon Ember: Ember is
 * licensed for Amazon-owned properties and is not served from a public CDN, and any webfont
 * would add a blocking third-party request to a page whose entire job is to load.
 */

:root {
    /* Brand */
    --squid-ink: #232f3e;
    --squid-ink-deep: #131a22;
    --amazon-orange: #ff9900;

    /* Text */
    --ink: #0f1111;
    --ink-muted: #565959;
    --ink-inverse: #ffffff;
    --ink-inverse-muted: #d5d9d9;

    /* Surfaces */
    --bg: #ffffff;
    --bg-soft: #f7f8f8;
    --bg-card: #ffffff;
    --rule: #d5d9d9;
    --rule-soft: #eaeded;

    --link: #007185;
    --link-hover: #c7511f;

    --shadow-card: 0 1px 3px rgba(15, 17, 17, 0.08), 0 2px 10px rgba(15, 17, 17, 0.04);
    --radius: 8px;
    --measure: 46rem;
}

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

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: "Amazon Ember", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
        Arial, sans-serif;
    font-size: 17px;
    line-height: 1.65;
    color: var(--ink);
    background: var(--bg-soft);
    text-rendering: optimizeLegibility;
}

.wrap {
    max-width: var(--measure);
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* ---------------------------------------------------------------- Hero / header */

header.site {
    background: var(--squid-ink);
    /* The orange rule is the one strong brand cue on an otherwise quiet page. */
    border-bottom: 4px solid var(--amazon-orange);
    color: var(--ink-inverse);
}

header.site .wrap {
    padding: 3rem 1.25rem 2.75rem;
}

header.site h1 {
    font-size: clamp(2rem, 6vw, 2.75rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin: 0;
    font-weight: 700;
}

header.site p {
    margin: 0.6rem 0 0;
    color: var(--ink-inverse-muted);
    font-size: 1.0625rem;
}

/* ---------------------------------------------------------------- Content */

main.wrap {
    padding-top: 2.5rem;
    padding-bottom: 3.5rem;
}

h2 {
    font-size: 1.375rem;
    line-height: 1.3;
    letter-spacing: -0.01em;
    margin: 2.75rem 0 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--rule);
    font-weight: 700;
}

h2:first-child {
    margin-top: 0;
}

/* FAQ question: sits tighter to its own answer than to the question above it. */
h3 {
    font-size: 1.0625rem;
    line-height: 1.4;
    margin: 1.75rem 0 0.4rem;
    font-weight: 700;
}

p {
    margin: 0 0 1rem;
}

ul {
    margin: 0 0 1.25rem;
    padding-left: 1.25rem;
}

li {
    margin-bottom: 0.4rem;
}

li::marker {
    color: var(--amazon-orange);
}

a {
    color: var(--link);
    text-decoration: none;
    border-bottom: 1px solid currentColor;
}

a:hover {
    color: var(--link-hover);
}

a:focus-visible {
    /* The default focus ring is easy to lose against the soft background. */
    outline: 2px solid var(--link);
    outline-offset: 3px;
    border-radius: 2px;
}

code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.9em;
    background: var(--rule-soft);
    padding: 0.1em 0.35em;
    border-radius: 4px;
}

/* ---------------------------------------------------------------- Table */

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 1.25rem 0 1.75rem;
    font-size: 0.9375rem;
    background: var(--bg-card);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

th,
td {
    text-align: left;
    padding: 0.75rem 0.9rem;
    vertical-align: top;
    border-bottom: 1px solid var(--rule-soft);
}

thead th {
    background: var(--squid-ink);
    color: var(--ink-inverse);
    font-weight: 600;
    font-size: 0.875rem;
    border-bottom: none;
}

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

tbody tr:nth-child(even) {
    background: var(--bg-soft);
}

/* First column names the data category, so it reads as a row heading. */
tbody td:first-child {
    font-weight: 600;
}

/* A three-column table of prose does not fit a phone; reflow to stacked rows. */
@media (max-width: 34rem) {
    table,
    thead,
    tbody,
    tr,
    th,
    td {
        display: block;
    }

    thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
    }

    tbody tr {
        border-bottom: 1px solid var(--rule);
        padding: 0.5rem 0;
    }

    tbody tr:last-child {
        border-bottom: none;
    }

    tbody td {
        border-bottom: none;
        padding: 0.3rem 0.9rem;
    }

    tbody td:first-child {
        font-size: 1.0625rem;
        padding-top: 0.75rem;
    }
}

/* ---------------------------------------------------------------- Meta list */

dl.meta {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.25rem 1rem;
    margin: 0 0 2rem;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    font-size: 0.9375rem;
    box-shadow: var(--shadow-card);
}

dl.meta dt {
    font-weight: 600;
    color: var(--ink-muted);
}

dl.meta dd {
    margin: 0;
}

/* ---------------------------------------------------------------- Draft banner */

/*
 * Marks content that is not final. Loud on purpose: these pages are reachable from a public App
 * Store listing, and a placeholder that looks like finished copy is how draft text ships by
 * accident. The styling has to survive a skim.
 */
.draft {
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
    border: 1px solid #d5a6a0;
    border-left: 5px solid #b12704;
    border-radius: var(--radius);
    background: #fff6f5;
}

.draft p {
    margin: 0;
    font-size: 0.9375rem;
}

.draft p + p {
    margin-top: 0.75rem;
}

.draft strong {
    color: #b12704;
}

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

footer.site {
    background: var(--squid-ink-deep);
    color: var(--ink-inverse-muted);
    font-size: 0.875rem;
}

footer.site .wrap {
    padding: 2rem 1.25rem 2.5rem;
}

footer.site p {
    margin: 0 0 0.5rem;
}

footer.site p:last-child {
    margin-bottom: 0;
    color: #8d9096;
}

footer.site a {
    color: var(--ink-inverse);
}

footer.site a:hover {
    color: var(--amazon-orange);
}

footer.site a:focus-visible {
    outline-color: var(--amazon-orange);
}

/* ---------------------------------------------------------------- Dark mode */

@media (prefers-color-scheme: dark) {
    :root {
        --ink: #e3e6e6;
        --ink-muted: #a0a4a4;
        --bg: #0f1111;
        --bg-soft: #16191c;
        --bg-card: #1d2126;
        --rule: #3a4553;
        --rule-soft: #2a3038;
        --link: #4db2bf;
        --link-hover: #ffa366;
        --shadow-card: none;
    }

    header.site {
        background: var(--squid-ink-deep);
    }

    .draft {
        background: #2a1514;
        border-color: #6b2b24;
    }

    .draft strong {
        color: #ff8a7a;
    }

    code {
        background: #2a3038;
    }
}

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

/*
 * A privacy notice gets printed and filed. Drop the dark chrome so it does not drain a toner
 * cartridge, and reveal link targets, since a printed page cannot be clicked.
 */
@media print {
    body {
        background: #fff;
        color: #000;
        font-size: 11pt;
    }

    header.site,
    footer.site {
        background: #fff;
        color: #000;
        border-bottom: 2px solid #000;
    }

    header.site p,
    footer.site p {
        color: #000;
    }

    thead th {
        background: #eee;
        color: #000;
    }

    table,
    dl.meta {
        box-shadow: none;
    }

    a {
        color: #000;
    }

    main.wrap a[href^="mailto"]::after {
        content: " (" attr(href) ")";
        font-size: 0.85em;
        word-break: break-all;
    }
}
