:root {
  color-scheme: light dark;
  --bg: #f5f5f7;
  --fg: #1d1d1f;
  --muted: #6e6e73;
  --card: #ffffff;
  --accent: #0a7aff;
  --line: rgba(0, 0, 0, 0.08);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1c1e;
    --fg: #f5f5f7;
    --muted: #a1a1a6;
    --card: #2c2c2e;
    --accent: #0a84ff;
    --line: rgba(255, 255, 255, 0.1);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

header.site {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 960px;
  margin: 0 auto;
  padding: 20px 24px;
}

header.site .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--fg);
}

header.site .brand img { width: 28px; height: 28px; border-radius: 7px; }
header.site nav a { margin-left: 20px; color: var(--muted); }

/* Keep standalone document navigation inside narrow screens. Landing pages
   have their own compact header layout. */
@media (max-width: 600px) {
  body:not(.landing) header.site {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  body:not(.landing) header.site nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
  }
  body:not(.landing) header.site nav a { margin-left: 0; }
}

main { max-width: 960px; margin: 0 auto; padding: 0 24px 24px; }

.hero { text-align: center; padding: 40px 0 24px; }
.hero img { width: 128px; height: 128px; border-radius: 28px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18); }
.hero h1 { font-size: 44px; margin: 20px 0 8px; letter-spacing: -0.02em; }
.hero .tag { font-size: 22px; color: var(--muted); margin: 0 0 24px; }
.hero .actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.cta {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 12px 22px;
  border-radius: 12px;
  font-weight: 600;
}
.cta.soon { background: var(--card); color: var(--muted); border: 1px solid var(--line); }
.cta:hover { text-decoration: none; filter: brightness(1.05); }

section { margin: 40px 0; }
section > h2 { font-size: 26px; letter-spacing: -0.01em; margin: 0 0 6px; }
section > p.lead { color: var(--muted); margin: 0 0 20px; max-width: 64ch; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.card h3 { margin: 0 0 6px; font-size: 17px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }

.doc h1 { font-size: 34px; letter-spacing: -0.02em; margin: 24px 0 4px; }
.doc h2 { font-size: 22px; margin: 32px 0 8px; }
.doc h3 { font-size: 17px; margin: 24px 0 4px; }
.doc p, .doc li { max-width: 72ch; }
.doc .meta { color: var(--muted); margin-top: 0; }
.doc code { font: 14px ui-monospace, "SF Mono", Menlo, monospace; background: var(--card); padding: 1px 5px; border-radius: 5px; }

/* Framed documents add "embed" in their page script: hide the standalone
   header and footer, and use the dialog background. */
.embed body { background: transparent; }
.embed header.site, .embed footer.site, .embed .doc h1 { display: none; }
.embed main { max-width: none; margin: 0; padding: 4px 22px 30px; }
.embed .doc h2 { font-size: 20px; margin: 26px 0 8px; }
.embed .doc h3 { margin: 20px 0 4px; }
.embed .doc .meta { margin: 4px 0 0; }

footer.site {
  max-width: 960px;
  margin: 40px auto 0;
  padding: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}
footer.site a { color: var(--muted); }
