/* The public pages: what fostaire says to anyone, signed in or not. The front
   page, Texts, Privacy and Terms share this sheet, the top and the foot.

   Colour is the site's own. pages.js sets the palette this visitor would have
   in the shell and every colour here is one of its slots (--p-*, from
   kit/1/palettes.js, the one source). No colour is written in this file: until
   the palette arrives, and for a visitor without script, the fallbacks are the
   browser's own system colours, which are high contrast by definition. The
   scheme starts dark because the site's default palette is.

   Type is the site's face (--font-ui, kit/1/faces.css) and large: these pages
   are read by people with poor sight, and on phones. */
:root {
    color-scheme: dark;
    --bg: var(--p-bg, Canvas);
    --panel: var(--p-bg-2, Canvas);
    --ink: var(--p-ink, CanvasText);
    --soft: var(--p-ink-2, CanvasText);
    --line: var(--p-ink-2, CanvasText);
    --link: var(--p-accent, LinkText);
    --edge: 24px;
}

html { background: var(--bg); color: var(--ink); font: 20px/1.6 var(--font-ui, ui-monospace, monospace); -webkit-text-size-adjust: 100%; }
body { margin: 0; }

.top .in, main, .foot .in { box-sizing: border-box; max-width: 46rem; margin: 0 auto; padding-left: var(--edge); padding-right: var(--edge); }
main { padding-top: 8px; padding-bottom: 56px; }

h1 { font-size: 2rem; line-height: 1.2; margin: 1.2em 0 0.5em; }
h2 { font-size: 1.4rem; line-height: 1.25; margin: 2.2em 0 0.5em; padding-top: 0.9em; border-top: 2px solid var(--line); }
p, ul, ol { margin: 0 0 1em; }
ul, ol { padding-left: 1.4em; }
li { margin-bottom: 0.6em; }
.lead { font-size: 1.15rem; }
a { color: var(--link); text-underline-offset: 0.18em; overflow-wrap: anywhere; }
a:focus-visible, .button:focus-visible { outline: 3px solid var(--link); outline-offset: 3px; }

/* The top: the name, the three pages, and the way in. */
.top { border-bottom: 2px solid var(--line); }
.top .in { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 26px; padding-top: 16px; padding-bottom: 16px; }
.top .name { font-size: 1.5rem; font-weight: 700; color: var(--ink); text-decoration: none; margin-right: auto; }
.top nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 26px; }

/* A control is a word in a box, the same box the Texts step's Continue is. */
.button {
    display: inline-block; box-sizing: border-box; padding: 10px 22px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
    color: var(--ink); background: var(--panel); border: 2px solid var(--link); border-radius: var(--radius, 6px);
}

/* The carriers' and the step's own words, quoted. */
blockquote { margin: 0 0 1em; padding: 14px 18px; background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius, 6px); }
blockquote p:last-child { margin-bottom: 0; }

/* The Texts step, twice: the component itself, read-only, and its picture.
   Side by side where the window is wide enough for both, wider than the text. */
.step { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; margin: 0 0 1em; }
.step figure { margin: 0; min-width: 0; }
.step figcaption { margin-bottom: 10px; }
.step hud-texts, .step img { display: block; box-sizing: border-box; width: 100%; border: 2px solid var(--line); border-radius: var(--radius, 6px); }
.step img { height: auto; }
@media (min-width: 1180px) {
    .step { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); width: min(72rem, 100vw - 2 * var(--edge)); margin-left: 50%; transform: translateX(-50%); align-items: start; }
}

/* The foot, the same on every public page. */
.foot { border-top: 2px solid var(--line); }
.foot .in { padding-top: 22px; padding-bottom: 40px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 26px; margin-bottom: 0.8em; }
.foot p { margin: 0 0 0.4em; color: var(--soft); }

@media (max-width: 520px) {
    :root { --edge: 16px; }
    html { font-size: 18px; }
    h1 { font-size: 1.7rem; }
}
