/* The public pages: what fostaire says to anyone who is not signed in. The
   home page, Privacy and Terms share this sheet, the top and the foot, and
   the other public pages (a shared file, "Sign out?") take its reading rules.

   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), or mixed from two of them. 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: 20px, read
   by people with poor sight and on phones. Square corners. */
: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-muted, GrayText);
    --link: var(--p-accent, LinkText);
    --warm: var(--p-yellow, var(--p-accent, LinkText));
    --shade: color-mix(in srgb, var(--bg) 72%, black);
    --band: color-mix(in srgb, var(--bg) 60%, var(--panel));
    --edge: 28px;
}

* { box-sizing: border-box; }
html { background: var(--bg); color: var(--ink); font: 20px/1.55 var(--font-ui, ui-monospace, monospace); -webkit-text-size-adjust: 100%; }
body { margin: 0; }
a { color: var(--link); text-underline-offset: 0.2em; overflow-wrap: anywhere; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, .button:focus-visible { outline: 3px solid var(--link); outline-offset: 3px; }
.in { max-width: 72rem; margin: 0 auto; padding-left: var(--edge); padding-right: var(--edge); }

/* The top: the name and the open doors (Questions, and what the owner opened to anyone). */
.top .in { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 28px; padding-top: 22px; padding-bottom: 22px; }
.top .name { font-size: 1.5rem; font-weight: 800; letter-spacing: 0.02em; margin-right: auto; color: var(--ink); text-decoration: none; }
.top .name b { color: var(--link); font-weight: 800; }
.top nav { display: flex; flex-wrap: wrap; gap: 6px 28px; }
.top nav a { text-decoration: none; border-bottom: 2px solid transparent; padding-bottom: 2px; }
.top nav a:hover { border-color: var(--link); }

/* A reading page (Privacy, Terms, a shared file, "Sign out?"): one column. The home page's
   main is the whole width (.home), with sections of its own. */
main { max-width: 46rem; margin: 0 auto; padding: 8px var(--edge) 56px; }
main h1 { font-size: 2rem; line-height: 1.2; margin: 0.8em 0 0.5em; }
main h2 { font-size: 1.3rem; line-height: 1.25; margin: 2em 0 0.5em; padding-top: 0.9em; border-top: 2px solid var(--line); }
main p, main ul, main ol { margin: 0 0 1em; }
main ul, main ol { padding-left: 1.4em; }
main li { margin-bottom: 0.6em; }
main.home { max-width: none; padding: 0; }
main.home h2 { border-top: 0; padding-top: 0; }
.lead { font-size: 1.1rem; color: var(--soft); }

/* A control is a word in a box. */
.button { display: inline-block; padding: 12px 24px; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
          color: var(--ink); background: var(--panel); border: 2px solid var(--link); border-radius: 0; }
/* "Sign out?" (signout.html): its one button, larger than any other. */
.signout .button { font-size: 1.5rem; padding: 16px 40px; margin-top: 0.4em; }

/* The carriers' and the step's own words, quoted. */
blockquote { margin: 12px 0; padding: 14px 16px; border: 2px solid var(--line); background: var(--bg); color: var(--ink); }
blockquote p { margin: 0; }
.fine { font-size: 0.88rem; }

/* The home page's first screen: what it is on the left, the way in on the right. */
.way { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 56px; align-items: start; padding-top: 44px; padding-bottom: 64px; }
.way h1 { font-size: 3.1rem; line-height: 1.08; margin: 0 0 0.45em; font-weight: 800; letter-spacing: -0.01em; }
.way h1 em { font-style: normal; color: var(--link); }
.way .lead { margin: 0 0 1.6em; max-width: 30em; }

/* A strip of the grid: the site's own picture, decoration and nothing of the real grid. */
.tiles { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; max-width: 30rem; }
.tiles i { aspect-ratio: 1; border: 2px solid var(--line); display: grid; place-items: center; font-style: normal; font-size: 1.7rem; color: var(--soft); }
.tiles i.on { border-color: var(--link); color: var(--link); }
.tiles i.warm { border-color: var(--warm); color: var(--warm); }
.tiles i.fill { background: var(--panel); }

/* The card: Sign in or join (page-signin.js wires its form, kit/1/link-form.js gives the rules). */
.card { background: var(--panel); border: 2px solid var(--link); padding: 30px 30px 26px; box-shadow: 10px 10px 0 var(--shade); scroll-margin-top: 16px; }
.card h2 { font-size: 1.45rem; margin: 0 0 0.9em; }
.card label { display: block; font-weight: 700; margin: 0 0 6px; }
.card select, .card input[type=email], .card input[type=tel] { display: block; width: 100%; font: inherit; color: var(--ink); background: var(--bg); border: 2px solid var(--soft); padding: 12px 14px; margin: 0 0 18px; border-radius: 0; }
.card select { appearance: none; padding-right: 48px;
               background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
               background-position: calc(100% - 24px) 55%, calc(100% - 16px) 55%; background-size: 8px 8px; background-repeat: no-repeat; }
.card .choose[hidden] { display: none; }
.card .keep { display: flex; gap: 12px; align-items: center; font-weight: 400; margin: 2px 0 20px; cursor: pointer; }
.card .keep input { width: 24px; height: 24px; flex: none; margin: 0; accent-color: var(--link); }
.card button[type=submit] { width: 100%; font: inherit; font-weight: 800; font-size: 1.1rem; padding: 15px; background: var(--link); color: var(--bg); border: 2px solid var(--link); border-radius: 0; cursor: pointer; }
.card button[type=submit]:disabled { cursor: default; opacity: 0.8; }
.card p { margin: 16px 0 0; color: var(--soft); font-size: 0.92rem; }
.card .note { color: var(--ink); font-weight: 700; font-size: 1rem; }
.card .note:empty { display: none; }
.card .sent p, .card .away { color: var(--ink); font-size: 1rem; }
.card .sent p:first-child { margin-top: 0; }
.card .sent a { font-weight: 700; }
.card .again { font: inherit; padding: 0; background: none; border: 0; color: var(--link); text-decoration: underline; text-underline-offset: 0.2em; cursor: pointer; }

/* Questions: what a visitor or a vendor asks, each answered once. */
.asks { border-top: 2px solid var(--line); padding-top: 48px; padding-bottom: 30px; }
.asks > h2, .texts > h2 { font-size: 1.05rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--link); margin: 0 0 28px; }
.qa { display: grid; grid-template-columns: 1fr 1fr; gap: 34px 56px; }
.qa h3 { font-size: 1.15rem; margin: 0 0 8px; }
.qa p { margin: 0 0 10px; color: var(--soft); }
.texts { margin-top: 56px; padding: 40px var(--edge) 34px; background: var(--band); border-left: 6px solid var(--warm); scroll-margin-top: 16px; }
.texts > h2 { color: var(--warm); }

/* The foot, the same on every public page. */
.foot .in { display: flex; flex-wrap: wrap; gap: 10px 28px; padding-top: 26px; padding-bottom: 40px; color: var(--soft); border-top: 2px solid var(--line); margin-top: 30px; }
.foot p { margin: 0; flex-basis: 100%; }
.foot p[hidden] { display: none; }

@media (max-width: 860px) {
    .way { grid-template-columns: 1fr; gap: 34px; padding-top: 20px; }
    .way h1 { font-size: 2.3rem; }
    .qa { grid-template-columns: 1fr; }
    .card { order: -1; box-shadow: 6px 6px 0 var(--shade); padding: 22px; }
    .tiles { display: none; }
    .top .name { margin-right: 0; flex-basis: 100%; }
}
@media (max-width: 520px) {
    :root { --edge: 16px; }
    .texts { padding-left: 18px; padding-right: 18px; }
}
