/* «Лебедь»: docs/17 §7, ADR-0025. Системный шрифт и палитра приложения. */
:root {
  color-scheme: light dark;
  --bg: #F8F7F7;
  --raised: #FDFCFC;
  --sunken: #F0EEED;
  --text: #1C1A1A;
  --muted: #5C5553;
  --border: #E6E2E1;
  --border-strong: #D9D4D2;
  --accent: #D9573B;
  --accent-text: #AE3F27;
  --solid: #C44A2F;
  --solid-hover: #B23F26;
  --on-solid: #FFFAF8;
  --selection: rgba(217,87,59,.22);
  --ok: #2B7340;
  --started: #8C5A06;
  --shadow: 0 20px 64px rgba(28,26,26,.13);
  --radius: 12px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  scrollbar-color: var(--border-strong) var(--bg);
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141212;
    --raised: #1D1A1A;
    --sunken: #1A1717;
    --text: #EEEBEA;
    --muted: #B8B0AE;
    --border: #2A2625;
    --border-strong: #3A3433;
    --accent: #F07A5E;
    --accent-text: #F48B72;
    --solid: #F07A5E;
    --solid-hover: #F48B72;
    --on-solid: #1C1414;
    --selection: rgba(240,122,94,.30);
    --ok: #5DBE76;
    --started: #E3AE4A;
    --shadow: 0 20px 64px rgba(8,6,6,.5);
  }
}
* { box-sizing: border-box; }
body { margin: 0; font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
::selection { background: var(--selection); color: var(--text); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }
button, a { -webkit-tap-highlight-color: var(--selection); touch-action: manipulation; }
button { font: inherit; cursor: pointer; }
button:disabled { cursor: wait; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
h1 { font-size: clamp(44px, 6.1vw, 76px); line-height: 1.06; letter-spacing: -.035em; font-weight: 590; }
h2 { font-size: clamp(32px, 3.7vw, 48px); line-height: 1.12; letter-spacing: -.028em; font-weight: 580; }
h3 { font-size: 22px; line-height: 1.3; letter-spacing: -.015em; font-weight: 600; }
.wrap { width: min(1184px, calc(100% - 96px)); margin: 0 auto; }
.skip { position: absolute; top: -80px; left: 24px; z-index: 5; padding: 12px 20px; background: var(--raised); border-radius: 8px; }
.skip:focus { top: 12px; }
.header { height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: block; padding: 10px 0; flex-shrink: 0; }
.brand img { width: 116px; height: 38px; object-fit: contain; }
.nav { display: flex; gap: 24px; align-items: center; }
.nav > a, .language a { min-height: 44px; display: inline-flex; align-items: center; text-decoration: none; }
.nav > a { color: var(--muted); font-size: 14px; }
.nav > a:hover { color: var(--text); }
.language { display: flex; gap: 4px; align-items: center; font-size: 12px; }
.language a { min-width: 44px; justify-content: center; color: var(--muted); border-radius: 6px; }
.language [aria-current] { color: var(--text); background: var(--sunken); }
.language a:hover { background: var(--sunken); color: var(--text); }
.hero { padding-top: 64px; }
.hero p { max-width: 560px; color: var(--muted); font-size: 20px; line-height: 1.5; margin-top: 24px; }
.actions { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-top: 32px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 10px 20px; border-radius: 8px; border: 1px solid var(--border-strong); font-weight: 550; font-size: 15px; white-space: nowrap; text-decoration: none; color: var(--text); background: var(--raised); transition: background-color .14s ease, border-color .14s ease; }
.button:hover { background: var(--sunken); }
.button.primary { border-color: transparent; color: var(--on-solid); background: var(--solid); }
.button.primary:hover { background: var(--solid-hover); }
.text-link { display: inline-flex; min-height: 44px; align-items: center; font-size: 15px; color: var(--muted); }
.text-link:hover { color: var(--accent-text); }
.hero-shot { margin-top: 56px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); animation: settle 650ms cubic-bezier(.16,1,.3,1); }
.hero-shot img { width: 100%; }
@keyframes settle { from { transform: translateY(18px); clip-path: inset(0 0 10% 0 round var(--radius)); } to { transform: translateY(0); clip-path: inset(0 round var(--radius)); } }
.hero .image-note { margin-top: 16px; color: var(--muted); font-size: 12px; }
.board { display: grid; grid-template-columns: .7fr 1.3fr; gap: 56px; align-items: center; padding-top: 144px; }
.board .body { margin-top: 24px; max-width: 400px; }
.body { color: var(--muted); line-height: 1.65; }
.body + .body { margin-top: 16px; }
.shot { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: var(--raised); }
.shot img { width: 100%; }
.board .shot { width: calc(100% + 12px); }
.context { padding-top: 144px; max-width: 720px; }
.context .body { margin-top: 24px; max-width: 640px; font-size: 19px; }
.context .detail { max-width: 630px; margin-top: 16px; }
.tools { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 56px; }
.tools .shot { aspect-ratio: 1.43; display: flex; align-items: center; }
.tools .shot img { height: 100%; width: 100%; object-fit: cover; }
.tools figcaption { padding-top: 24px; }
.tools figcaption p { margin-top: 10px; color: var(--muted); max-width: 460px; }
.install-section { margin-top: 144px; padding: 64px 0 80px; border-top: 1px solid var(--border); }
.requirements { color: var(--muted); margin-top: 18px; }
.install-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 56px; margin-top: 40px; }
.install-grid p { margin-top: 12px; color: var(--muted); }
.command { display: flex; align-items: center; gap: 16px; padding: 16px; border-radius: 8px; background: var(--sunken); margin-top: 24px; }
.command code { flex: 1; min-width: 0; word-break: break-word; line-height: 1.7; font-size: 13px; user-select: all; }
code { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; }
.command .button { font-size: 13px; min-height: 44px; padding: 8px 12px; }
.install-grid .small { font-size: 13px; }
.install-grid .dmg .button { margin-top: 24px; }
.install-grid .dmg p:last-child { margin-top: 16px; font-size: 13px; }
.account { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; color: var(--muted); }
.account a { color: var(--accent-text); }
.copy-status:empty { display: none; }
.copy-status { font-size: 13px; }
.download-notice { background: var(--sunken); border-radius: 8px; padding: 16px; margin-top: 24px; }
[hidden] { display: none !important; }
.footer { padding: 28px 0 36px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 24px; color: var(--muted); font-size: 13px; }
.footer a { min-height: 44px; display: inline-flex; align-items: center; }
.footer p { padding-top: 10px; }
/* Руководство: постоянное оглавление, ограниченная длина строки, якоря. */
.guide-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 64px; padding-top: 56px; padding-bottom: 96px; }
.contents { position: sticky; top: 32px; align-self: start; font-size: 14px; }
.contents h2 { font-size: 14px; font-weight: 600; letter-spacing: 0; margin-bottom: 12px; }
.contents a { display: block; padding: 10px 0; color: var(--muted); text-decoration: none; }
.contents a:hover { color: var(--accent-text); }
.prose { max-width: 72ch; }
.prose h1 { font-size: clamp(36px, 4.7vw, 56px); margin-bottom: 28px; }
.prose h2 { font-size: 29px; margin-top: 56px; margin-bottom: 18px; }
.prose h3 { margin-top: 32px; margin-bottom: 12px; }
.prose p { margin: 16px 0; color: var(--muted); }
.prose li { padding-left: 4px; margin: 10px 0; color: var(--muted); }
.prose strong { color: var(--text); font-weight: 600; }
.prose code { background: var(--sunken); color: var(--text); font-size: .87em; padding: 2px 5px; border-radius: 4px; overflow-wrap: anywhere; }
.prose pre { background: var(--sunken); padding: 20px; border-radius: 8px; white-space: pre-wrap; overflow-wrap: anywhere; }
.prose pre code { padding: 0; }
.prose a { color: var(--accent-text); }
.prose blockquote { margin: 24px 0; padding: 2px 24px; background: var(--sunken); border-radius: 8px; }
@media (max-width: 900px) {
  .wrap { width: calc(100% - 48px); }
  .hero { padding-top: 48px; }
  .board { gap: 32px; grid-template-columns: 1fr; padding-top: 96px; }
  .board .body { max-width: 620px; }
  .board .shot { width: 100%; }
  .context { padding-top: 96px; }
  .tools { gap: 24px; }
  .install-section { margin-top: 96px; }
  .install-grid { grid-template-columns: 1fr; gap: 40px; }
  .guide-layout { grid-template-columns: 170px minmax(0, 1fr); gap: 32px; }
}
@media (max-width: 600px) {
  .wrap { width: calc(100% - 40px); }
  .header { height: 76px; gap: 16px; }
  .brand img { width: 98px; height: 34px; }
  .nav { gap: 12px; }
  .nav .install-nav { display: none; }
  .nav > a { font-size: 13px; }
  .language { gap: 0; }
  .language a { min-width: 44px; }
  .hero { padding-top: 40px; }
  h1 { font-size: clamp(32px, 9vw, 52px); }
  .hero p { font-size: 18px; margin-top: 20px; }
  .actions { gap: 12px; margin-top: 24px; }
  .hero-shot { margin-top: 40px; border-radius: 8px; }
  .board { padding-top: 80px; }
  .context { padding-top: 80px; }
  .context .body { font-size: 17px; }
  .tools { grid-template-columns: 1fr; gap: 40px; margin-top: 36px; }
  .tools .shot { aspect-ratio: 1.43; }
  .tools figcaption { padding-top: 20px; }
  .install-section { margin-top: 80px; padding-top: 40px; padding-bottom: 48px; }
  .command { flex-direction: column; align-items: stretch; }
  .command code { font-size: 13px; }
  .command button { align-self: start; }
  .footer { flex-direction: column; gap: 8px; padding-bottom: 24px; }
  .footer p { padding-top: 0; }
  .guide-layout { display: flex; flex-direction: column; gap: 36px; padding-top: 32px; }
  .contents { position: static; width: 100%; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
  .contents a { display: inline-block; margin-right: 20px; padding: 10px 0; }
  .prose h2 { font-size: 27px; }
}
@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (prefers-contrast: more) {
  :root { --muted: var(--text); --border: var(--text); --border-strong: var(--text); }
}
