/* The website's look, shared by its pages. */
:root {
  --bg: #101216;
  --panel: #1b1e24;
  --border: #2a2e37;
  --text: #e6e8ec;
  --muted: #9aa2b1;
  --accent: #3ddc97;
  --accent-ink: #06281a;
  --heart: #e86a8a;
  color-scheme: dark;
}
/* The manual in the app's Help window, when the app is light; the website itself is always dark. */
:root[data-theme="light"] {
  --bg: #eef0f3;
  --panel: #ffffff;
  --border: #c8ced8;
  --text: #1c2028;
  --muted: #5b6472;
  --accent: #0e9060;
  --accent-ink: #ffffff;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }

header { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 22px 0; }
header a, header .name { white-space: nowrap; }
header img { width: 40px; height: 40px; }
header .name { font-weight: 650; font-size: 18px; color: var(--text); }
header .spacer { flex: 1; }
header a { color: var(--muted); text-decoration: none; }
header a:hover { color: var(--text); }

.hero { padding: 36px 0 28px; }
h1 { margin: 0 0 16px; font-size: clamp(32px, 6vw, 52px); line-height: 1.1; letter-spacing: -0.02em; text-wrap: balance; }
.lead { max-width: 640px; margin: 0 0 28px; font-size: 19px; color: var(--muted); }
.downloads { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.button {
  display: inline-flex;
  flex-direction: column;
  padding: 12px 22px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 650;
  text-decoration: none;
}
.button:hover { background: #5be6ab; }
.button small { font-weight: 500; font-size: 13px; opacity: 0.8; }
/* A button that asks for less than a download does: outlined, in the colour of a heart. */
.button.secondary { background: transparent; color: var(--text); border: 1px solid var(--border); }
.button.secondary:hover { background: var(--panel); border-color: var(--heart); }
.sponsor { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.sponsor .note { margin: 0; flex: 1 1 420px; }
header a.sponsor-link, .heart { color: var(--heart); }
.version { margin: 0; font-size: 14px; color: var(--muted); }

.screenshot { display: block; width: 100%; height: auto; margin: 20px 0 8px; border: 1px solid var(--border); border-radius: 12px; }

h2 { margin: 64px 0 20px; font-size: 26px; letter-spacing: -0.01em; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.features div, .steps div { padding: 20px 22px; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; }
h3 { margin: 0 0 8px; font-size: 17px; }
.features p, .steps p, .steps ol { margin: 0; font-size: 15.5px; color: var(--muted); }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.steps ol { padding-left: 20px; }
.steps li { margin-bottom: 4px; }
.note { max-width: 720px; font-size: 15.5px; color: var(--muted); }

footer { margin-top: 72px; padding: 28px 0 44px; border-top: 1px solid var(--border); font-size: 14px; color: var(--muted); }
footer p { margin: 0 0 6px; }

/* The list of changes, on its own page. */
.changes { max-width: 760px; }
.changes h1 { margin-top: 36px; }
.changes .intro { margin: 0 0 8px; color: var(--muted); }
.changes h2 { display: flex; align-items: baseline; gap: 14px; margin: 48px 0 12px; font-size: 24px; }
.changes h2 .date { font-size: 15px; font-weight: 400; color: var(--muted); }
.changes p, .changes ul { margin: 0 0 12px; font-size: 16px; }
.changes ul { padding-left: 22px; }
.changes li { margin-bottom: 8px; }
.changes li::marker { color: var(--accent); }
code { font: 0.92em ui-monospace, SFMono-Regular, Menlo, monospace; }

/* The manual: contents beside the text, above it on a phone. */
.manual { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 40px; align-items: start; }
.manual-nav { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; font-size: 14.5px; }
.manual-nav summary { display: none; }
.manual-nav .nav-heading { margin: 18px 0 6px; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.manual-nav ul { margin: 0; padding: 0; list-style: none; }
.manual-nav li a { display: block; padding: 3px 10px; border-radius: 6px; color: var(--text); text-decoration: none; }
.manual-nav li a:hover { background: var(--panel); }
.manual-nav li.on a { background: var(--panel); color: var(--accent); }
.manual-text { max-width: 780px; font-size: 16.5px; }
.manual-text h1 { margin: 12px 0 18px; font-size: clamp(30px, 5vw, 42px); }
.manual-text h2 { margin: 44px 0 12px; font-size: 24px; }
.manual-text h3 { margin: 28px 0 8px; font-size: 18px; }
.manual-text p, .manual-text ul, .manual-text ol { margin: 0 0 14px; }
.manual-text ul, .manual-text ol { padding-left: 22px; }
.manual-text li { margin-bottom: 6px; }
.manual-text li::marker { color: var(--accent); }
.manual-text figure { margin: 18px 0 22px; }
.manual-text figure img { display: block; max-width: 100%; height: auto; border: 1px solid var(--border); border-radius: 10px; }
.manual-text figcaption { margin-top: 6px; font-size: 14px; color: var(--muted); }
.manual-text pre { overflow-x: auto; padding: 12px 14px; background: var(--panel); border: 1px solid var(--border); border-radius: 8px; font-size: 14px; }
.manual-text .muted { color: var(--muted); font-size: 15px; }
.note-box { margin: 0 0 16px; padding: 12px 16px; background: var(--panel); border-left: 3px solid var(--accent); border-radius: 6px; font-size: 15.5px; }
.table { overflow-x: auto; margin: 0 0 18px; }
.manual-text table { width: 100%; border-collapse: collapse; font-size: 15px; }
.manual-text th { text-align: left; font-weight: 600; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; }
.manual-text th, .manual-text td { padding: 7px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.manual-text table.keys { table-layout: fixed; }
.manual-text table.keys th:nth-child(1), .manual-text table.keys th:nth-child(2) { width: 27%; }
.manual-text table.keys td:not(:last-child) { color: var(--text); font-weight: 500; }
.manual-text table.reference td:first-child { white-space: nowrap; }
.manual-text .keys-title { margin-top: 36px; }
.swatch { display: inline-block; width: 12px; height: 12px; vertical-align: -1px; border: 1px solid var(--border); border-radius: 3px; }
.layer { margin-bottom: 36px; }
.pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 48px; padding-top: 18px; border-top: 1px solid var(--border); font-size: 15px; }
.pager a { text-decoration: none; }
@media (max-width: 820px) {
  .manual { grid-template-columns: 1fr; gap: 8px; }
  .manual-nav { position: static; max-height: none; padding: 10px 14px; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; }
  .manual-nav summary { display: list-item; cursor: pointer; font-weight: 600; }
}

/* In the app's Help window: no header, as its toolbar leads home, and the words its search found marked. */
.in-app header { display: none; }
.in-app .manual { padding-top: 24px; }
.in-app .manual-nav { top: 24px; max-height: calc(100vh - 48px); }
::highlight(found) { background: rgba(61, 220, 151, 0.35); color: inherit; }
:root[data-theme="light"]::highlight(found) { background: rgba(14, 144, 96, 0.25); }
