/* Tempero — public site.
   One stylesheet, no build step, no dependencies. SPEC.md §7.3 is the design.

   Light only: no prefers-color-scheme, no dark palette, one set of colours.
   The turquoise is the app's own severity-scale low-end anchor, converted from
   the HSB values in SeverityScale.swift so the site and a week inside the goal
   are literally the same colour. */

:root {
  --turquoise: #008c84;
  --ink: #000000;
  --rule: rgb(0 0 0 / 0.25);

  --measure: 40rem;
  --radius: 0.75rem;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }

/* Under the gradient, so nothing shows through where it does not reach. */
html { background: #ffffff; }

/* The gradient is fixed to the *window*: it neither scrolls with the page nor
   stretches to its length. A fixed-position layer behind the content rather
   than `background-attachment: fixed`, which iOS Safari does not honour
   reliably. body must therefore carry no background of its own — a background
   on the body box paints over a negative-z-index child. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to top, var(--turquoise), #ffffff);
}

/* One centred column: a fraction of a desktop window, the whole of a phone. */
body {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1.25rem 4rem;
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

/* ---- Links and focus ---------------------------------------------------- */

/* Black and underlined everywhere. A coloured link would not hold its contrast
   over the deep end of the gradient — black on full turquoise is ~5.1:1. */
a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
a:hover { text-decoration-thickness: 2px; }

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

/* ---- Masthead and footer ------------------------------------------------ */

/* Header and footer content is centred within the column; everything else is
   ranged left, which is the document default. */

header.masthead {
  padding: 2.5rem 0 2rem;
  text-align: center;
}

header.masthead a {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

footer.site {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  text-align: center;
  font-size: 0.95rem;
}

footer.site nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.25rem;
}

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

/* ---- Type --------------------------------------------------------------- */

h1 {
  font-size: 2rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
}

h2 {
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  margin: 2.5rem 0 0.6rem;
}

p { margin: 0 0 1rem; }

code {
  font-family: var(--mono);
  font-size: 0.95em;
}

/* The privacy policy's "Last updated" line. */
.updated {
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

/* ---- Screenshots -------------------------------------------------------- */

/* A screenshot is a plain figure holding an image and nothing else — no
   caption, nothing overlaid. Each is cropped to the region its section of
   `content/manual.md` is about, so the copy around it does the naming. */

figure {
  margin: 2rem 0;
  text-align: center;
}

figure img {
  /* Centred, as §7.3 requires, and capped comfortably inside the column on a
     desktop while still filling it on a phone. Nothing constrains the height:
     a cap there fights the intrinsic width/height attributes and squashes the
     tall screenshots. */
  display: block;
  margin: 0 auto;
  width: auto;
  max-width: min(100%, 28rem);
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--rule);
}
