/* House style for the web edition of the user guide.
 *
 * Deliberately not the app's stylesheet: these pages must not load the app
 * bundle or Tailwind at all, because they are read by people who have never
 * signed in and often on a phone signal at a venue. The palette is copied from
 * the app (see apps/web/src/index.css) so the two look like one product.
 *
 * No webfont. The wordmark on the PDF cover uses Anton, but a content page
 * that blocks on a font download to show text is a worse page. System stack.
 */

:root {
  --bg: #100e0c;
  --surface: #1a1613;
  --border: #332b25;
  --ink: #efe7d8;
  --body: #cfc5b8;
  --muted: #8e847a;
  --brand: #e8712b;
  --brand-hi: #f2914e;
}

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

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

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

.wrap { max-width: 44rem; margin: 0 auto; padding: 0 16px; }

/* ---- masthead ---- */

.masthead {
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  margin-bottom: 2.5rem;
}
.masthead .wrap { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.wordmark {
  font-weight: 800;
  letter-spacing: 0.06em;
  text-decoration: none;
  font-size: 1.05rem;
}
.wordmark .set { color: var(--ink); }
.wordmark .forge { color: var(--brand); }
.masthead .kicker { color: var(--muted); font-size: 0.85rem; }
.masthead a.kicker:hover { color: var(--brand-hi); }

/* ---- type ---- */

h1 {
  color: var(--ink);
  font-size: clamp(1.7rem, 5vw, 2.3rem);
  line-height: 1.2;
  margin: 0 0 0.6rem;
  letter-spacing: -0.01em;
}
h2 {
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1.3;
  margin: 2.6rem 0 0.7rem;
}
h3 {
  color: var(--ink);
  font-size: 1.08rem;
  margin: 1.9rem 0 0.5rem;
}
p, ul, ol { margin: 0 0 1.05rem; }
li { margin-bottom: 0.4rem; }
strong { color: var(--ink); font-weight: 600; }
em { color: var(--ink); font-style: italic; }

a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--brand-hi); }

.standfirst {
  color: var(--muted);
  font-size: 1.08rem;
  margin: 0 0 2.2rem;
}

code {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.1em 0.35em;
  font-size: 0.9em;
}

hr { border: 0; border-top: 1px solid var(--border); margin: 2.5rem 0; }

blockquote {
  margin: 0 0 1.05rem;
  padding-left: 1rem;
  border-left: 3px solid var(--border);
  color: var(--muted);
}

/* ---- figures ---- */

figure { margin: 2rem 0; }
figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
}
figcaption {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.5;
  margin-top: 0.6rem;
}

/* ---- contents list on the index ---- */

.toc { list-style: none; padding: 0; margin: 0; }
.toc li { margin: 0 0 0.9rem; }
.toc a { font-size: 1.1rem; font-weight: 600; text-decoration: none; }
.toc p { color: var(--muted); font-size: 0.92rem; margin: 0.15rem 0 0; }

/* ---- prev/next ---- */

.pager {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--border);
  margin-top: 3rem;
  padding-top: 1.2rem;
  font-size: 0.95rem;
}
.pager span { color: var(--muted); }

/* ---- calls to action + footer ---- */

.cta {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 8px;
  padding: 1.1rem 1.2rem;
  margin: 3rem 0 0;
}
.cta p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.cta strong { display: block; margin-bottom: 0.25rem; }

footer.site {
  border-top: 1px solid var(--border);
  margin-top: 3rem;
  padding: 1.5rem 0 3rem;
  color: var(--muted);
  font-size: 0.82rem;
}
footer.site .wrap { display: flex; gap: 1rem; flex-wrap: wrap; }

@media (max-width: 480px) {
  body { font-size: 16px; }
  h2 { margin-top: 2.1rem; }
}
