/*
 * The public website: learningbreaks.com (/, /developers, /privacy, /terms,
 * /delete-my-data). A plain file, not a build output: the production image has
 * no asset-build stage (see RootRouteTest).
 *
 * The owner's rule, which is firm: anything that can be pressed looks like a
 * button - filled or outlined, never bare coloured words. Plain links are
 * allowed only inside running prose and in the footer.
 *
 * System fonts only, and no external requests of any kind: the pages start no
 * session and set no cookie, and a font CDN would tell a third party about
 * every visitor.
 */

:root {
    color-scheme: light;

    /* Brand, from branding/ in the Android repo. */
    --book: #0C60FC;
    --blue: #0052F2;
    --navy: #001A82;

    /* Neutrals. Every text colour here is at least 4.5:1 on --paper and --soft. */
    --ink: #111a33;
    --muted: #465170;
    --paper: #ffffff;
    --soft: #f2f5fd;
    --line: #d5dcee;

    /* The one warm accent: decoration only, never text on white. */
    --warm: #ffb547;
    --warm-soft: #fff4e0;

    --radius: 14px;
    --focus: 3px solid #001A82;
    --wrap: 70rem;
}

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

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

body {
    margin: 0;
    font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--ink);
    background: var(--paper);
}

img, svg { max-width: 100%; height: auto; }

h1, h2, h3 { color: var(--navy); line-height: 1.2; margin: 0 0 0.75rem; }
h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.1rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

/* Prose links: underlined, so they read as links inside a sentence. */
a { color: var(--blue); text-underline-offset: 0.15em; }
a:hover { color: var(--navy); }

:focus-visible { outline: var(--focus); outline-offset: 3px; border-radius: 6px; }

code {
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
    font-size: 0.9em;
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 5px;
    padding: 0.05em 0.35em;
    overflow-wrap: anywhere;
}

pre {
    background: #0b1330;
    color: #eef2ff;
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
    overflow-x: auto;
    font-size: 0.85rem;
    line-height: 1.5;
}

pre code { background: none; border: 0; padding: 0; color: inherit; overflow-wrap: normal; }

.skip {
    position: absolute;
    left: 1rem;
    top: -4rem;
    z-index: 10;
}
.skip:focus { top: 0.75rem; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: 1rem; }
.narrow { max-width: 46rem; }

/* -- Buttons ---------------------------------------------------------------- */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 48px;
    padding: 0.6rem 1.25rem;
    border: 2px solid var(--blue);
    border-radius: 999px;
    background: var(--blue);
    color: #ffffff;
    font: inherit;
    font-weight: 650;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.button:hover { background: var(--navy); border-color: var(--navy); color: #ffffff; }

.button.secondary { background: var(--paper); color: var(--blue); }
.button.secondary:hover { background: var(--soft); color: var(--navy); border-color: var(--navy); }

.button.small { min-height: 44px; padding: 0.45rem 1rem; font-size: 0.95rem; }

.button[aria-current="page"] { background: var(--soft); color: var(--navy); border-color: var(--navy); }

/* Not a link, and says so: "Coming soon to Google Play" is a status. */
.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    background: var(--warm-soft);
    border: 1px dashed #b86e00;
    color: #5c3700;
    font-weight: 650;
}

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin-top: 1.5rem; }

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

.site-header { border-bottom: 1px solid var(--line); background: var(--paper); }

.site-header .wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.5rem;
    padding-block: 0.75rem;
}

.logo-link { display: inline-flex; padding: 0.25rem; border-radius: 8px; }
.logo-link img { display: block; height: 44px; width: auto; }

.site-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* -- Notices ---------------------------------------------------------------- */

.notice {
    border: 2px solid #b86e00;
    background: var(--warm-soft);
    color: #4a2c00;
    border-radius: var(--radius);
    padding: 0.9rem 1.1rem;
    margin: 1.5rem 0;
}

.notice strong { color: #3a2200; }

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

.section { padding-block: clamp(2.5rem, 2rem + 3vw, 4.5rem); }
.section.soft { background: var(--soft); }
.section.navy { background: var(--navy); color: #ffffff; }
.section.navy h2, .section.navy h3 { color: #ffffff; }
.section.navy p { color: #dfe6ff; }

.section-head { max-width: 44rem; margin-bottom: 2rem; }
.lede { font-size: 1.15rem; color: var(--muted); }
.eyebrow {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--blue);
    margin-bottom: 0.5rem;
}
.section.navy .eyebrow { color: var(--warm); }

.hero { padding-block: clamp(2.5rem, 2rem + 4vw, 5rem); background: linear-gradient(180deg, var(--soft), var(--paper)); }
.hero .wrap { display: grid; gap: 2.5rem; align-items: center; }
.hero-mark { justify-self: center; width: min(100%, 22rem); }

@media (min-width: 820px) {
    .hero .wrap { grid-template-columns: 1.25fr 1fr; }
}

.grid { display: grid; gap: 1.25rem; }
@media (min-width: 640px) { .grid.two { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) {
    .grid.three { grid-template-columns: repeat(3, 1fr); }
    .grid.four { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 640px) and (max-width: 899px) {
    .grid.three, .grid.four { grid-template-columns: repeat(2, 1fr); }
}

.card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.4rem;
}
.section.navy .card { background: #0b2596; border-color: #3350c4; }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps > li { position: relative; padding-top: 3.5rem; }
.steps > li::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    top: 1.4rem;
    left: 1.4rem;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: var(--warm);
    color: var(--navy);
    font-weight: 800;
    display: grid;
    place-items: center;
}
.steps > li.card { padding-top: 4.25rem; }

.icon { width: 2.5rem; height: 2.5rem; margin-bottom: 0.75rem; }

.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; }
.checks li { position: relative; padding-left: 2rem; }
.checks li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.3rem;
    width: 1.2rem;
    height: 1.2rem;
    border-radius: 50%;
    background: var(--book) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 80% no-repeat;
}

/* The break illustration: shapes, not a screenshot. */
.break-figure { display: grid; gap: 1rem; align-items: center; }
@media (min-width: 820px) { .break-figure { grid-template-columns: 1fr 1.1fr; gap: 2.5rem; } }

.split { display: grid; gap: 2rem; align-items: start; }
@media (min-width: 820px) { .split { grid-template-columns: 1fr 1fr; gap: 3rem; } }

/* -- Legal and docs pages ---------------------------------------------------- */

.doc { padding-block: 2.5rem 4rem; }
.doc h1 { margin-bottom: 0.5rem; }
.doc h2 { font-size: 1.45rem; margin-top: 2.5rem; }
.doc h3 { margin-top: 1.75rem; }
.doc ul, .doc ol { padding-left: 1.4rem; margin: 0 0 1rem; }
.doc li { margin-bottom: 0.4rem; }
.doc .meta { color: var(--muted); }
.doc .operator { font-style: normal; margin: 0 0 1rem; padding: 0.75rem 1rem; border-left: 3px solid var(--line); }

.doc table { width: 100%; border-collapse: collapse; margin: 0 0 1.25rem; font-size: 0.95rem; }
.doc th, .doc td { border: 1px solid var(--line); padding: 0.5rem 0.6rem; text-align: left; vertical-align: top; }
.doc th { background: var(--soft); }
.table-scroll { overflow-x: auto; }

.toc { background: var(--soft); border-radius: var(--radius); padding: 1rem 1.25rem; margin: 1.5rem 0; }
.toc h2 { font-size: 1rem; margin: 0 0 0.5rem; }
.toc ol { margin: 0; }

.doc .card + .card { margin-top: 1.25rem; }
.stack > * + * { margin-top: 1rem; }

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

.site-footer { background: var(--soft); border-top: 1px solid var(--line); color: var(--ink); padding-block: 2.5rem; font-size: 0.95rem; }
.site-footer a { color: var(--blue); }
.site-footer a:hover { color: var(--navy); }
.site-footer .wrap { display: grid; gap: 1.5rem; }
@media (min-width: 720px) { .site-footer .wrap { grid-template-columns: 1fr auto; align-items: end; } }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; list-style: none; margin: 0; padding: 0; }
.footer-brand img { height: 36px; width: auto; }
.footer-note { color: var(--muted); margin: 0.75rem 0 0; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition: none !important;
        animation: none !important;
        scroll-behavior: auto !important;
    }
}

@media (max-width: 420px) {
    body { font-size: 16px; }
    .logo-link img { height: 38px; }
    .site-nav ul { width: 100%; }
    .site-nav li { flex: 1 1 auto; }
    .site-nav .button { width: 100%; padding-inline: 0.75rem; }
    .actions .button { width: 100%; }
}

.muted { color: var(--muted); }
.doc .card h1 { font-size: clamp(1.8rem, 1.4rem + 1.6vw, 2.4rem); }
.doc .card h2 { margin-top: 0; }

/* Tables in the rendered integration guide scroll on their own on a phone. */
.guide table { display: block; overflow-x: auto; }
.guide h1 { margin-top: 0.5rem; }

/* On navy, a blue button would sit below 3:1 against its background. */
.section.navy .button { background: #ffffff; color: var(--navy); border-color: #ffffff; }
.section.navy .button:hover { background: var(--warm-soft); border-color: var(--warm); color: var(--navy); }
.section.navy .button.secondary { background: transparent; color: #ffffff; border-color: #ffffff; }
.section.navy .checks li::before { background-color: var(--warm); }
.section.navy :focus-visible { outline-color: var(--warm); }

/* On a phone the mark sits small above the headline, not a screen below it. */
@media (max-width: 819px) {
    .hero .wrap { gap: 1.25rem; }
    .hero-mark { order: -1; justify-self: start; width: 5.5rem; }
}
