:root {
  --bg: #f5f5f7;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --border: #d2d2d7;
  --accent: #2563eb;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0e10;
    --text: #f2f2f5;
    --muted: #9a9aa3;
    --border: #2c2c33;
    --accent: #5b8cff;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

.top, .page, .bottom {
  max-width: 720px;
  margin: 0 auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.5rem;
}
.top .app { font-weight: 600; font-size: 1.05rem; color: var(--text); text-decoration: none; }
.top .app:hover { color: var(--accent); }

.tabs { display: flex; gap: 1rem; flex-wrap: wrap; }
.tabs a { color: var(--muted); text-decoration: none; font-size: 0.9rem; }
.tabs a:hover { color: var(--accent); }
.tabs a[aria-current="page"] { color: var(--text); font-weight: 600; }

.page { padding-top: 1rem; padding-bottom: 3rem; }
.page h1 { font-size: 1.9rem; margin: 1.5rem 0 0.4rem; }
.page h2 { font-size: 1.25rem; margin: 2rem 0 0.6rem; }
.page h3 { font-size: 1.05rem; margin: 1.4rem 0 0.4rem; }
.page p, .page li { line-height: 1.65; }
.page ul { padding-left: 1.3rem; }
.page li { margin: 0.3rem 0; }
.page a { color: var(--accent); }
.page .updated { color: var(--muted); font-size: 0.9rem; margin-top: 0; }
.page hr { border: none; border-top: 1px solid var(--border); margin: 2.5rem 0 1.5rem; }

.bottom {
  border-top: 1px solid var(--border);
  padding-top: 2rem;
  padding-bottom: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.bottom .badge img { display: block; height: 47px; width: auto; }
.bottom .badge:hover { opacity: 0.85; }
.bottom small { color: var(--muted); font-size: 0.85rem; }
.bottom small a { color: var(--muted); }

@media (max-width: 520px) {
  .top { flex-direction: column; align-items: flex-start; }
}
