:root {
  color-scheme: light dark;
  --bg: #0b0c10;
  --bg-elevated: #14161c;
  --text: #f2f2f0;
  --text-muted: #a3a6ad;
  --accent: #7c9eff;
  --border: #23262f;
  --max-width: 780px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #fafafa;
    --bg-elevated: #ffffff;
    --text: #16171a;
    --text-muted: #5a5d66;
    --accent: #3a5edb;
    --border: #e5e5e8;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
}

a {
  color: var(--accent);
}

header.site-header {
  border-bottom: 1px solid var(--border);
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
  padding-bottom: 20px;
}

.brand {
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  color: var(--text);
}

main {
  padding: 48px 0 80px;
}

.hero {
  padding: 40px 0 24px;
}

.hero h1 {
  font-size: 2.25rem;
  margin: 0 0 12px;
}

.hero p.tagline {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin: 0;
}

section {
  margin-top: 56px;
}

section h2 {
  font-size: 1.4rem;
  margin-bottom: 16px;
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.app-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  background: var(--bg-elevated);
}

.app-card h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.app-card p {
  margin: 0 0 12px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.app-card .legal-links {
  font-size: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
}

footer.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 80px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

footer.site-footer .wrap {
  padding: 24px 0;
}

/* Legal document pages */
.legal-doc h1 {
  font-size: 1.8rem;
  margin-bottom: 4px;
}

.legal-doc .meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 32px;
}

.legal-doc h2 {
  font-size: 1.2rem;
  margin-top: 36px;
}

.legal-doc p,
.legal-doc li {
  color: var(--text);
}

.legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-bottom: 32px;
  font-size: 0.9rem;
}

.legal-nav a.current {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}
