/* Палитра повторяет DesignSystem/Theme.swift приложения. */
:root {
  --bg: #f2f5f3;
  --card: #ffffff;
  --text: #182420;
  --muted: #5b6a63;
  --border: #dde5e0;
  --accent: #0fa77c;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101614;
    --card: #18211d;
    --text: #e6efe9;
    --muted: #8fa198;
    --border: #26332d;
    --accent: #2dd9a5;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}
/* Верхний отступ оставляет место переключателю языка: он зафиксирован
   в правом верхнем углу и иначе наезжает на навигацию. */
.wrap { max-width: 720px; margin: 0 auto; padding: 64px 20px 64px; }
.lang { display: none; }
body.en .lang-en, body.ru .lang-ru { display: block; }

.top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; padding: 0 0 28px;
}
.brand {
  display: inline-flex; align-items: center; gap: 9px;
  font-weight: 700; font-size: 17px; color: var(--text); text-decoration: none;
}
.mark { width: 24px; height: 24px; color: var(--accent); flex: none; }
nav { display: flex; gap: 18px; flex-wrap: wrap; }
nav a { color: var(--muted); text-decoration: none; font-size: 15px; }
nav a:hover, nav a.active { color: var(--accent); }

h1 { font-size: 30px; line-height: 1.25; margin: 0 0 10px; letter-spacing: -0.02em; }
h2 { font-size: 19px; margin: 34px 0 12px; letter-spacing: -0.01em; }
h3 { font-size: 16px; margin: 0 0 6px; }
p { margin: 0 0 12px; }
p:last-child { margin-bottom: 0; }
.tagline { font-size: 18px; color: var(--text); margin-bottom: 14px; }
.lead { color: var(--muted); margin-bottom: 26px; }
.updated { color: var(--muted); font-size: 14px; margin: -4px 0 20px; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 20px;
  margin: 0 0 14px;
}
.card h2 { margin-top: 0; }
.card p { color: var(--muted); }
.grid { display: grid; gap: 14px; grid-template-columns: 1fr; margin-bottom: 8px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, 1fr); } }

details.card > summary {
  cursor: pointer; font-weight: 600; list-style: none;
  display: flex; justify-content: space-between; gap: 12px; align-items: flex-start;
}
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary::after {
  content: "+"; color: var(--accent); font-weight: 700; flex: none; line-height: 1.4;
}
details.card[open] > summary::after { content: "–"; }
details.card > p { margin-top: 12px; color: var(--muted); }

.links { list-style: none; padding: 0; margin: 0; }
.links li { margin-bottom: 8px; }
a { color: var(--accent); }
.back { display: inline-block; margin-bottom: 18px; text-decoration: none; font-size: 15px; }
.mail { font-weight: 600; }
.note { font-size: 14px; color: var(--muted); }

.switch {
  position: fixed; top: 14px; right: 14px; z-index: 10;
  display: flex; border: 1px solid var(--border); border-radius: 999px;
  overflow: hidden; background: var(--card);
}
.switch button {
  appearance: none; border: 0; background: transparent; color: var(--muted);
  font: inherit; font-size: 13px; font-weight: 600;
  padding: 7px 13px; cursor: pointer; min-width: 44px;
}
.switch button[aria-pressed="true"] { background: var(--accent); color: var(--bg); }

footer {
  margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--border);
  color: var(--muted); font-size: 14px;
}
footer p { margin-bottom: 6px; }
