:root {
  --navy: #1b2a4a;
  --slate: #6b85ac;
  --ink: #1b2a4a;
  --muted: #5d6a80;
  --bg: #ffffff;
  --rule: #e6eaf1;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.65 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--navy); text-decoration: none; border-bottom: 1px solid var(--slate); }
a:hover { color: var(--slate); }

/* --- home --- */
main.home {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8vh 24px 6vh;
}
.logo { width: 148px; height: auto; display: block; margin: 0 auto 28px; }
main.home h1 {
  margin: 0;
  font-size: clamp(30px, 6vw, 42px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--navy);
}
.rule { width: 52px; height: 3px; margin: 26px auto; border-radius: 2px; background: var(--slate); }
.tagline { margin: 0; max-width: 34ch; color: var(--muted); }
.contact { margin-top: 34px; font-size: 16px; }

/* --- document pages --- */
main.doc { flex: 1; width: 100%; max-width: 68ch; margin: 0 auto; padding: 56px 24px 72px; }
main.doc .back { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; border-bottom: none; color: var(--muted); }
main.doc .back:hover { color: var(--navy); }
main.doc .back img { width: 26px; height: auto; }
main.doc h1 { font-size: 32px; font-weight: 600; letter-spacing: -0.02em; margin: 28px 0 6px; color: var(--navy); }
main.doc .updated { margin: 0 0 36px; color: var(--muted); font-size: 15px; }
main.doc h2 { font-size: 19px; font-weight: 600; margin: 36px 0 10px; color: var(--navy); }
main.doc p, main.doc li { color: #33405a; }
main.doc ul { padding-left: 22px; }
main.doc li { margin: 7px 0; }
main.doc code {
  font: 400 14px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
  background: #f2f5f9; padding: 2px 6px; border-radius: 4px; color: var(--navy);
}

footer {
  border-top: 1px solid var(--rule);
  padding: 22px 24px;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}
footer a { border-bottom: none; color: var(--muted); }
footer a:hover { color: var(--navy); }
.sep { margin: 0 10px; color: var(--rule); }

@media (prefers-color-scheme: dark) {
  :root { --bg: #0e1524; --ink: #e8ecf3; --muted: #9aa7bd; --rule: #223049; --navy: #ffffff; }
  main.doc p, main.doc li { color: #c8d2e2; }
  main.doc code { background: #1a2540; color: #e8ecf3; }
  /* The mark ships with a white plate baked in; a soft card stops it reading
     as a hard rectangle against the dark page. */
  .logo, main.doc .back img { background: #fff; border-radius: 18px; padding: 10px; }
  main.doc .back img { border-radius: 7px; padding: 3px; }
}
