/* The full guide (help/index.html): the app's palette from css/app.css, dark
   by default and light when the browser prefers it, system fonts, 720 px
   centred, 16 px gutters on a phone. */
:root {
  --bg: #0c1015;
  --surface: #151b22;
  --border: #27313c;
  --text: #e8eef4;
  --muted: #9aa7b4;
  --accent: #6cc4ff;
  --accent-text: #04121d;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, Menlo, Consolas, monospace;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f7fa;
    --surface: #ffffff;
    --border: #cbd5df;
    --text: #0e1620;
    --muted: #4a5866;
    --accent: #0b5f96;
    --accent-text: #ffffff;
    color-scheme: light;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.55 var(--font);
  overflow-wrap: break-word;
}

.page {
  max-width: 720px;
  margin: 0 auto;
  padding: max(24px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 48px max(16px, env(safe-area-inset-left));
}

h1, h2, h3 { line-height: 1.25; letter-spacing: -0.01em; }
h1 { margin: 16px 0 8px; font-size: 2rem; }
h2 { margin: 0 0 12px; font-size: 1.5rem; }
h3 { margin: 24px 0 6px; font-size: 1.125rem; }
p, ul, ol { margin: 0 0 12px; }
ul, ol { padding-left: 24px; }
li + li { margin-top: 6px; }
strong { font-weight: 650; }

a { color: var(--accent); text-underline-offset: 2px; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.muted { color: var(--muted); }
.lede { font-size: 1.125rem; }

/* The way back to the app: a button-sized link. */
.app-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 16px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
  text-decoration: none;
}

/* "Everything stays on your phone." */
.note {
  margin: 16px 0;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  background: var(--surface);
}
.note p:last-child { margin-bottom: 0; }

/* The contents: two columns of links where there is room. */
.contents {
  margin: 16px 0 8px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}
.contents h2 { margin-bottom: 4px; font-size: 1rem; }
.contents ol { margin: 0; padding-left: 22px; columns: 2 12em; column-gap: 24px; }
.contents li { margin: 0; break-inside: avoid; }
.contents a { display: inline-block; padding: 6px 0; }

/* Each part of the guide is a card. */
section {
  display: flow-root; /* holds the floated pictures */
  margin-top: 24px;
  padding: 20px 16px 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  scroll-margin-top: 16px;
}
section > h3:first-of-type { margin-top: 16px; }

/* Screenshots from an iPhone, beside the text they show on a wide screen
   and between paragraphs on a phone. */
figure {
  width: min(260px, 100%);
  margin: 4px auto 16px;
}
figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
}
figcaption { margin-top: 6px; color: var(--muted); font-size: 0.875rem; text-align: center; }

@media (min-width: 640px) {
  figure { float: right; clear: right; width: 240px; margin: 4px 0 16px 24px; }
}

/* Steps in Getting started: numbered, with room between them. */
.steps > li + li { margin-top: 14px; }
.steps ul { margin-top: 6px; }

/* Column names in the CSV section. */
.columns { font-family: var(--mono); font-size: 0.9375rem; }

footer { margin-top: 32px; text-align: center; }
footer p { color: var(--muted); font-size: 0.875rem; }
