:root {
  --paper: #f3f0e8;
  --paper-2: #ebe7dd;
  --ink: #151514;
  --muted: #5f5d58;
  --faint: #9a968d;
  --line: #d9d4c8;
  --button-ink: #f3f0e8;
  --grain-opacity: 0.07;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #131312;
    --paper-2: #1c1b1a;
    --ink: #efebe2;
    --muted: #a8a49b;
    --faint: #6f6c66;
    --line: #2c2b28;
    --button-ink: #131312;
    --grain-opacity: 0.05;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
/* Film grain over everything, like the app icon. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
a { color: inherit; }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 20px; }

header.top { display: flex; align-items: center; justify-content: space-between; padding: 22px 0; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; letter-spacing: -0.01em; }
.brand img { width: 28px; height: 28px; border-radius: 8px; }
.by { font-size: 13px; color: var(--faint); }
.serif { font-family: Didot, "Bodoni 72", "Bodoni MT", Georgia, serif; font-weight: 600; letter-spacing: 0.02em; color: var(--muted); }

.hero { text-align: center; padding: 56px 0 40px; }
.hero .icon { width: 128px; height: 128px; border-radius: 30px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12); }
.hero h1 { font-size: 44px; line-height: 1.1; margin: 24px 0 6px; letter-spacing: -0.03em; }
.tag { font-size: 12px; letter-spacing: 0.22em; color: var(--faint); font-weight: 500; }
.hero .lead { font-size: 22px; line-height: 1.4; max-width: 560px; margin: 26px auto 8px; letter-spacing: -0.01em; }
.hero .sub { color: var(--muted); margin: 0 auto 32px; }

.downloads { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px; border-radius: 12px; border: 1px solid var(--line);
  text-decoration: none; font-weight: 600; font-size: 15px;
  background: transparent; color: var(--ink);
  transition: transform 0.12s ease, opacity 0.12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn.primary { background: var(--ink); color: var(--button-ink); border-color: var(--ink); }
.btn svg { width: 18px; height: 18px; fill: currentColor; }
.meta { margin-top: 18px; font-size: 13px; color: var(--faint); }
.meta a { color: var(--muted); }

section { padding: 56px 0; border-top: 1px solid var(--line); }
section h2 { font-size: 26px; letter-spacing: -0.02em; margin: 0 0 8px; }
section .intro { color: var(--muted); margin: 0 0 28px; max-width: 620px; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.card { border: 1px solid var(--line); border-radius: 14px; padding: 20px; background: color-mix(in srgb, var(--paper-2) 50%, transparent); }
.card h3 { font-size: 16px; margin: 0 0 6px; }
.card p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.55; }

.list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; max-width: 680px; }
.list li { padding-left: 22px; position: relative; color: var(--muted); }
.list li::before { content: "—"; position: absolute; left: 0; color: var(--faint); }
.list b { color: var(--ink); font-weight: 600; }

details { border-top: 1px solid var(--line); padding: 16px 0; max-width: 720px; }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 600; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; float: right; color: var(--faint); }
details[open] summary::after { content: "–"; }
details p, details ol { color: var(--muted); margin: 10px 0 0; }

footer { padding: 36px 0 48px; border-top: 1px solid var(--line); font-size: 13px; color: var(--faint); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
footer a { color: var(--muted); text-decoration: none; margin-left: 16px; }

/* Plain document pages (privacy, license). */
.doc { max-width: 720px; padding: 32px 0 64px; }
.doc h1 { font-size: 34px; letter-spacing: -0.02em; margin: 8px 0 4px; }
.doc h2 { font-size: 19px; margin: 32px 0 8px; }
.doc p, .doc li { color: var(--muted); }
.doc table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 12px 0; }
.doc th, .doc td { text-align: left; border-top: 1px solid var(--line); padding: 10px 8px 10px 0; vertical-align: top; color: var(--muted); }
.doc th { color: var(--ink); }
.doc code { font-size: 12.5px; word-break: break-all; }

@media (max-width: 760px) {
  .grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 36px; }
  .hero .lead { font-size: 19px; }
  footer a { margin: 0 16px 0 0; }
}
