:root {
  --bg: #f7f7f5;
  --surface: #ffffff;
  --text: #16181d;
  --muted: #5b616e;
  --line: #e3e4e8;
  --accent: #1f6f5c;
  --accent-soft: #e6f2ee;
  --radius: 14px;
  --max: 880px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111316;
    --surface: #181b1f;
    --text: #eceef1;
    --muted: #9aa1ad;
    --line: #2a2e35;
    --accent: #5cc3a5;
    --accent-soft: #17302a;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

header.site {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
header.site .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 64px; flex-wrap: wrap;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--text); text-decoration: none; font-weight: 650; letter-spacing: .01em;
}
.brand-mark {
  width: 30px; height: 30px; border-radius: 8px; flex: none;
  background: var(--accent); color: var(--surface);
  display: grid; place-items: center; font-size: 15px; font-weight: 700;
}
nav.main { display: flex; gap: 18px; flex-wrap: wrap; font-size: 15px; }
nav.main a { color: var(--muted); text-decoration: none; }
nav.main a:hover, nav.main a[aria-current="page"] { color: var(--text); }

main { padding: 48px 0 64px; }
h1 { font-size: clamp(28px, 5vw, 40px); line-height: 1.15; margin: 0 0 16px; letter-spacing: -.01em; }
h2 { font-size: 21px; margin: 40px 0 12px; line-height: 1.3; }
h3 { font-size: 17px; margin: 24px 0 8px; }
p, ul, ol { margin: 0 0 14px; }
ul, ol { padding-left: 22px; }
li { margin-bottom: 6px; }
.lead { font-size: 18px; color: var(--muted); max-width: 640px; }
.meta { color: var(--muted); font-size: 14px; margin-bottom: 28px; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 32px 0; }
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px;
}
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }

.facts { width: 100%; border-collapse: collapse; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.facts th, .facts td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.facts tr:last-child th, .facts tr:last-child td { border-bottom: 0; }
.facts th { width: 38%; color: var(--muted); font-weight: 500; }

.note {
  background: var(--accent-soft); border-radius: var(--radius);
  padding: 16px 18px; margin: 20px 0;
}
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; margin-bottom: 8px; }
.toc ol { margin: 0; }

footer.site { border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; padding: 28px 0 40px; }
footer.site .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
footer.site a { color: var(--muted); }

@media (max-width: 560px) {
  main { padding: 32px 0 48px; }
  .facts th, .facts td { display: block; width: 100%; }
  .facts th { border-bottom: 0; padding-bottom: 0; }
}
