/* The project website. Same paper, ink, green and typefaces as the app. */
@font-face { font-family: "Inter Variable"; src: url("fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("fonts/instrument-serif.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --bg: #f8f7f4; --surface: #ffffff; --sunken: #f1efea; --ink: #1b1b19; --muted: #6d6b65; --line: #e4e1d9; --line-strong: #cfcbc1;
  --accent: #1f5c45; --accent-soft: #e7f0ec; --shadow: 0 18px 50px rgba(27, 27, 25, 0.12);
  --serif: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Inter Variable", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #131412; --surface: #1c1d1a; --sunken: #191a17; --ink: #edebe5; --muted: #a3a097; --line: #2c2d29; --line-strong: #3d3e39; --accent: #7fc4a4; --accent-soft: #1d2b25; --shadow: 0 18px 50px rgba(0, 0, 0, 0.5); }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-underline-offset: 3px; }
h1, h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; line-height: 1.1; margin: 0; text-wrap: balance; }
p { margin: 0 0 16px; }
img { max-width: 100%; height: auto; display: block; }
.muted { color: var(--muted); }

.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 18px 28px; border-bottom: 1px solid var(--line); }
.brand { font-family: var(--serif); font-size: 24px; color: var(--ink); text-decoration: none; }
.top nav { display: flex; gap: 22px; }
.top nav a { color: var(--muted); text-decoration: none; font-size: 16px; padding: 4px 0; }
.top nav a:hover, .top nav a[aria-current] { color: var(--ink); }

.btn { display: inline-block; padding: 11px 20px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--ink); background: var(--surface); text-decoration: none; font-weight: 500; font-size: 16px; }
.btn:hover { border-color: var(--ink); }
.btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 0; }

pre { position: relative; margin: 0 0 18px; background: var(--sunken); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; overflow-x: auto; font: 14px/1.55 var(--mono); }
pre code { font: inherit; white-space: pre; }
code { font: 0.9em var(--mono); background: var(--sunken); padding: 2px 5px; border-radius: 5px; }
pre code { background: none; padding: 0; }
.copy { position: absolute; top: 8px; right: 8px; font: 500 12px var(--sans); padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); cursor: pointer; }
pre.install { padding-right: 76px; }
pre.install code { white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---- home ---- */
main > section { max-width: 1080px; margin: 0 auto; padding: 0 28px; }
.hero { padding-top: 76px; text-align: left; }
.eyebrow { color: var(--muted); font-size: 14px; letter-spacing: 0.02em; margin-bottom: 18px; }
.hero h1 { font-size: clamp(42px, 6.4vw, 76px); max-width: 15ch; }
.lead { font-size: clamp(18px, 2vw, 21px); color: var(--muted); max-width: 60ch; margin: 22px 0 28px; line-height: 1.5; }
.hero pre, .cta pre { max-width: 860px; }
.frame { margin: 56px 0 0; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); background: var(--surface); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; padding-top: 96px !important; }
.two h2, .feature h2, .grid h2, .limits h2, .cta h2 { font-size: clamp(30px, 3.4vw, 40px); margin-bottom: 14px; }
.feature { display: grid; grid-template-columns: 5fr 7fr; gap: 56px; align-items: center; padding-top: 104px !important; }
.feature.flip .copy-col { order: 2; }
.feature .frame { margin: 0; }
.grid { padding-top: 104px !important; }
.grid ul { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 40px; }
.grid li { border-top: 1px solid var(--line); padding: 18px 0 22px; color: var(--muted); font-size: 16px; line-height: 1.5; }
.grid li strong { display: block; color: var(--ink); font-weight: 600; margin-bottom: 4px; }
.plain { padding-left: 20px; margin: 0 0 16px; }
.plain li { margin-bottom: 6px; }
.free { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; padding-top: 96px !important; }
.free h2 { font-size: clamp(30px, 3.4vw, 40px); margin-bottom: 14px; }
.free .plain { list-style: none; padding: 0; margin: 6px 0 0; }
.free .plain li { border-top: 1px solid var(--line); padding: 12px 0; margin: 0; color: var(--muted); }
.free .plain strong { color: var(--ink); font-weight: 600; }
.limits { padding-top: 96px !important; }
.limits p { max-width: 64ch; color: var(--muted); }
.cta { padding-top: 96px !important; padding-bottom: 40px !important; }
.cta h2 { margin-bottom: 22px; }

.foot { max-width: 1080px; margin: 80px auto 0; padding: 28px 28px 56px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.foot p { margin-bottom: 8px; }

/* ---- docs ---- */
.docs { max-width: 1080px; margin: 0 auto; padding: 48px 28px 0; display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px; align-items: start; }
.side { position: sticky; top: 24px; font-size: 15px; }
.side summary { display: none; }
.side-group { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }
.side ul { list-style: none; padding: 0; margin: 0 0 22px; }
.side a { display: block; padding: 5px 10px; margin-left: -10px; border-radius: 8px; color: var(--muted); text-decoration: none; }
.side a:hover { color: var(--ink); }
.side a[aria-current] { color: var(--ink); background: var(--sunken); font-weight: 500; }
.prose { max-width: 720px; min-width: 0; }
.prose h1 { font-size: clamp(36px, 5vw, 52px); margin-bottom: 20px; }
.prose h2 { font-size: 30px; margin: 44px 0 12px; }
.prose h3 { font: 600 18px/1.3 var(--sans); margin: 28px 0 8px; }
.prose ul, .prose ol { padding-left: 22px; margin: 0 0 16px; }
.prose li { margin-bottom: 6px; }
.prose li > pre { margin-top: 10px; }
.table-wrap { overflow-x: auto; margin: 0 0 18px; }
table { border-collapse: collapse; width: 100%; font-size: 15.5px; }
th, td { text-align: left; vertical-align: top; padding: 10px 14px 10px 0; border-bottom: 1px solid var(--line); }
th { font-weight: 600; font-size: 13px; color: var(--muted); }
.pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--line); }
.pager a { text-decoration: none; font-weight: 500; }
.pager a span { display: block; font-size: 13px; color: var(--muted); font-weight: 400; }
.pager .next { text-align: right; margin-left: auto; }
.edit { margin-top: 22px; font-size: 14px; }
.edit a { color: var(--muted); }

@media (max-width: 860px) {
  body { font-size: 16px; }
  .top { padding: 14px 20px; }
  .brand { font-size: 21px; }
  main > section, .docs, .foot { padding-left: 20px; padding-right: 20px; }
  .hero { padding-top: 44px; }
  .two, .feature, .free { grid-template-columns: 1fr; gap: 28px; padding-top: 64px !important; }
  .feature.flip .copy-col { order: 0; }
  .grid ul { grid-template-columns: 1fr; }
  .grid, .limits, .cta { padding-top: 64px !important; }
  .frame { margin-top: 36px; border-radius: 12px; }
  .docs { grid-template-columns: minmax(0, 1fr); gap: 20px; padding-top: 20px; }
  .side { position: static; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; background: var(--surface); }
  .side summary { display: block; cursor: pointer; font-weight: 500; padding: 4px 0; }
  .side details[open] summary { margin-bottom: 12px; }
  .side ul:last-child { margin-bottom: 4px; }
}
@media print { .top nav, .side, .pager, .edit, .copy { display: none; } }
