:root {
  --bg: #f4f7f6;
  --surface: #ffffff;
  --text: #17201d;
  --muted: #55625e;
  --border: #dfe6e3;
  --accent: #137a62;
  --accent-soft: #e3f3ee;
  --on-accent: #ffffff;
  --radius: 18px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1513;
    --surface: #18211e;
    --text: #e6eeeb;
    --muted: #9fb0aa;
    --border: #2a3632;
    --accent: #3fd0aa;
    --accent-soft: #173a31;
    --on-accent: #062a20;
    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

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

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

.wrap {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header and footer */

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
}

.brand::before {
  content: "";
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent) url("/favicon.svg") center / cover;
}

.lang {
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}

.lang:hover {
  color: var(--text);
}

.site-footer {
  margin-top: 64px;
  padding: 24px 0 40px;
  border-top: 1px solid var(--border);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.site-footer a {
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--text);
}

/* Landing page */

.hero {
  padding: 56px 0 32px;
  text-align: center;
}

.hero h1 {
  margin: 0 auto 16px;
  max-width: 640px;
  font-size: clamp(32px, 6vw, 48px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.hero p {
  margin: 0 auto;
  max-width: 560px;
  color: var(--muted);
  font-size: 18px;
}

.badge {
  display: inline-block;
  margin-top: 28px;
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 15px;
  font-weight: 600;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 40px;
  padding: 0;
  list-style: none;
}

.feature {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.feature .icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 14px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}

.feature svg {
  width: 24px;
  height: 24px;
}

.feature h2 {
  margin: 0 0 6px;
  font-size: 18px;
}

.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.note {
  margin: 40px auto 0;
  max-width: 560px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

/* Legal pages (generated from the app) */

.legal {
  max-width: 760px;
  padding-top: 24px;
}

.legal h1 {
  margin: 0 0 4px;
  font-size: clamp(28px, 5vw, 36px);
  line-height: 1.2;
}

.legal h2 {
  margin: 40px 0 8px;
  font-size: 21px;
  line-height: 1.3;
}

.legal h3 {
  margin: 24px 0 4px;
  font-size: 17px;
}

.legal p,
.legal li {
  overflow-wrap: anywhere;
}

.updated {
  color: var(--muted);
  font-size: 14px;
}

.intro {
  font-size: 18px;
}

.summary,
.toc,
.notice {
  margin: 24px 0;
  padding: 20px 24px;
  border-radius: var(--radius);
}

.summary {
  background: var(--accent-soft);
}

.summary h2,
.toc h2 {
  margin-top: 0;
  font-size: 18px;
}

.summary .note {
  margin: 12px 0 0;
  max-width: none;
  text-align: left;
}

.toc {
  border: 1px solid var(--border);
  background: var(--surface);
}

.toc ol {
  margin: 0;
  padding-left: 22px;
}

.notice {
  border-left: 4px solid var(--accent);
  background: var(--surface);
}

.notice h3 {
  margin-top: 0;
}

.notice p:last-child {
  margin-bottom: 0;
}

.contact {
  margin: 12px 0;
  font-style: normal;
}

.contact-list dt {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

.contact-list dd {
  margin: 0;
}

section {
  scroll-margin-top: 16px;
}
