/* Страницы студии: без внешних шрифтов, светлая и тёмная тема, мобильная раскладка. */
:root {
  --bg: #f6f7f9; --card: #ffffff; --text: #15181d; --muted: #5a6270; --line: #d6dae1;
  --accent: #2455d6; --focus: #1a3fa8; --code-bg: #eceff4;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #101216; --card: #181b21; --text: #e8eaee; --muted: #a0a8b5; --line: #2f3540; --accent: #7ea0ff; --focus: #a9c0ff; --code-bg: #23272f; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* Язык: без JS виден русский; с JS атрибут data-ui-lang переключает блоки */
html[data-ui-lang="en"] [lang="ru"], html:not([data-ui-lang="en"]) [lang="en"] { display: none; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; min-height: 100vh; display: flex; flex-direction: column; }
.skip { position: absolute; left: -999px; top: 0; background: var(--card); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; top: 8px; }
.top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; padding: 14px 16px; max-width: 860px; width: 100%; margin: 0 auto; }
.brand { font-weight: 700; color: var(--text); text-decoration: none; font-size: 20px; letter-spacing: .02em; }
.nav { display: flex; flex-wrap: wrap; gap: 4px 16px; flex: 1; }
.nav a { color: var(--muted); text-decoration: none; padding: 8px 0; min-height: 44px; display: inline-flex; align-items: center; }
.nav a[aria-current="page"] { color: var(--text); font-weight: 600; text-decoration: underline; text-underline-offset: 6px; }
.lang { display: flex; gap: 4px; }
.lang button { font: inherit; font-size: 14px; padding: 6px 10px; min-height: 44px; min-width: 44px; border: 1px solid var(--line); background: transparent; color: var(--muted); border-radius: 8px; cursor: pointer; }
.lang button[aria-pressed="true"] { color: var(--text); border-color: var(--accent); }
main { width: 100%; max-width: 860px; margin: 0 auto; padding: 8px 16px 40px; flex: 1; }
main:focus { outline: none; }
h1 { font-size: 30px; line-height: 1.2; margin: 16px 0 8px; }
h2 { font-size: 21px; margin: 32px 0 8px; }
.lead { color: var(--muted); font-size: 18px; margin: 0 0 20px; }
a { color: var(--accent); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
code { background: var(--code-bg); padding: 1px 5px; border-radius: 5px; font-size: .92em; }
.table-wrap { overflow-x: auto; margin: 12px 0; border: 1px solid var(--line); border-radius: 10px; }
table { border-collapse: collapse; width: 100%; min-width: 640px; font-size: 15px; background: var(--card); }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }
th { color: var(--muted); font-weight: 600; }
.legal { display: grid; grid-template-columns: max-content 1fr; gap: 10px 20px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.legal dt { color: var(--muted); }
.legal dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 520px) { .legal { grid-template-columns: 1fr; gap: 2px; } .legal dd { margin-bottom: 10px; } }
.foot { max-width: 860px; width: 100%; margin: 0 auto; padding: 16px; font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); }
.foot p { margin: 4px 0; }
.foot-links { display: flex; flex-wrap: wrap; gap: 4px 18px; }
@media (max-width: 640px) {
  .top { justify-content: space-between; }
  .nav { order: 3; flex-basis: 100%; gap: 0 18px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
