:root {
  --bg: #f6f6f9;
  --card: #ffffff;
  --text: #17181f;
  --muted: #5d6070;
  --accent: #c8102e;
  --on-accent: #ffffff;
  --border: rgba(23, 24, 31, 0.1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161f;
    --card: #1d2030;
    --text: #eef0f7;
    --muted: #a3a8bd;
    --accent: #e5484d;
    --on-accent: #ffffff;
    --border: rgba(238, 240, 247, 0.12);
  }
}

* { box-sizing: border-box; }
/* Иначе display у .button перебивает атрибут hidden и кнопка бота видна без его имени. */
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
.top, main, .credits { max-width: 960px; margin: 0 auto; padding: 16px; }
.top { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 20px; }
.langs button { background: none; border: 1px solid var(--border); color: var(--text); border-radius: 8px; padding: 4px 8px; cursor: pointer; }
.langs button[aria-pressed='true'] { border-color: var(--accent); color: var(--accent); }
.hero { padding: 48px 0 32px; }
.hero h1 { font-size: clamp(28px, 6vw, 44px); margin: 0 0 12px; }
.lead { color: var(--muted); max-width: 640px; }
.button { display: inline-block; margin-top: 16px; background: var(--accent); color: var(--on-accent); padding: 12px 20px; border-radius: 12px; text-decoration: none; font-weight: 600; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.features article, .textbook { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 20px; }
.features h2, .textbook h2 { font-size: 18px; margin: 0 0 8px; }
.textbook { margin-top: 24px; }
.textbook a { color: var(--accent); }
.credits { color: var(--muted); font-size: 13px; }
