/* Self-hosted JetBrains Mono — no third-party font CDN (#19/#72) */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/jbm-400-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/jbm-400-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/jbm-400-greek.woff2') format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/jbm-400-vietnamese.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/jbm-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/jbm-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/jbm-500-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/jbm-500-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/jbm-500-greek.woff2') format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/jbm-500-vietnamese.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/jbm-500-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/jbm-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/jbm-600-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/jbm-600-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/jbm-600-greek.woff2') format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/jbm-600-vietnamese.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/jbm-600-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/jbm-600-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ─────────────────────────────────────────────────────────────
   Linear-inspired base — dark, hairline, dense Inter typography.
   Shared by every page.
───────────────────────────────────────────────────────────── */

:root,
[data-theme="dark"] {
  /* Backgrounds — Boris-style warm dark gray */
  --bg:           #1a1a1a;
  --bg-elev:      #222222;
  --bg-elev-2:    #2a2a2a;
  --bg-input:    rgba(255,255,255,0.04);

  /* Hairlines */
  --line:         rgba(255,255,255,0.08);
  --line-strong:  rgba(255,255,255,0.12);
  --line-emph:    rgba(255,255,255,0.20);

  /* Type — Boris-style neutral */
  --text:         #e5e5e5;
  --text-muted:   #888888;
  --text-dim:     #8a8a8a;
  --text-faint:   #707070;

  /* Accents — Boris orange */
  --accent:       #E07A41;
  /* Акцент для ТЕКСТА: на тёмной теме = --accent; на светлой затемняется до AA (см. light). */
  --accent-text:  #E07A41;
  --accent-soft:  rgba(224,122,65,0.12);
  --accent-line:  rgba(224,122,65,0.30);
  --accent-pink:  #f0a06a;
  --accent-cyan:  #E07A41;
  --accent-green: #4ade80;
  --accent-green-text: #4ade80;  /* зелёный для ТЕКСТА: = green на тёмной */

  /* Shadows */
  --shadow-card:   0 1px 0 rgba(255,255,255,0.04) inset, 0 12px 40px -16px rgba(0,0,0,0.5);
  --shadow-hero:   0 60px 120px -40px rgba(224,122,65,0.15);

  --radius:        12px;
  --radius-lg:     16px;
  --radius-pill:   9999px;

  /* Floating nav: ~44px высоты + 18px top inset = ~62px занято. +18px воздуха под якорный скролл. */
  --header-h:     80px;
}

[data-theme="light"] {
  --bg:           #fafafa;
  --bg-elev:      #ffffff;
  --bg-elev-2:    #f0f0f0;
  --bg-input:    rgba(0,0,0,0.03);
  --line:         rgba(0,0,0,0.08);
  --line-strong:  rgba(0,0,0,0.12);
  --line-emph:    rgba(0,0,0,0.20);
  --text:         #1a1a1a;
  --text-muted:   #555555;
  --text-dim:     #666666;   /* AA: 5.04:1 на #f0f0f0, 5.50:1 на #fafafa */
  --text-faint:   #6c6c6c;   /* AA: 4.61:1 на #f0f0f0, 5.03:1 на #fafafa */
  --accent-soft:  rgba(224,122,65,0.10);
  --accent-line:  rgba(224,122,65,0.30);
  --shadow-card:  0 1px 0 rgba(255,255,255,0.8) inset, 0 8px 30px -12px rgba(0,0,0,0.08);
  /* Затемнённый оранжевый для текста: 5.00:1 на #fafafa, 5.22:1 на #ffffff, 4.58:1 на #f0f0f0 (открытый FAQ / hover-карточки) — проходит WCAG AA на всех elevated-поверхностях. */
  --accent-text:  #B44D1E;
  --accent-green-text: #177c43;  /* зелёный для ТЕКСТА на светлой: 5.03:1 на #fafafa */
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}
@media (max-width: 760px) {
  :root { --header-h: 76px; }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'JetBrains Mono', 'SF Mono', Monaco, Menlo, monospace;
  font-size: 14px;
  line-height: 1.6;
  font-feature-settings: "ss01", "cv11";
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  position: relative;
}

/* Aurora and grid removed — clean solid background */

/* Content sits above the decorative layers */
.shell, nav, footer { position: relative; z-index: 1; }

/* ── Shell ─────────────────────────────────────────── */
.shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.shell.narrow { max-width: 880px; }
@media (max-width: 720px) { .shell { padding: 0 20px; } }

/* ── Typography helpers ────────────────────────────── */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--bg-elev);
  white-space: nowrap;
}
.eyebrow .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 0 3px rgba(76,183,130,0.16);
}
.eyebrow.muted .dot { background: var(--text-faint); box-shadow: none; }

.kicker {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.kicker::before {
  content: '/';
  color: var(--accent-text);
  font-weight: 400;
}
.kicker.no-bar::before { display: none; }

h1.display, .display {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
  font-size: clamp(36px, 7vw, 88px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
h1.display .gradient,
.gradient {
  color: var(--text);
}
h1.display .accent-gradient,
.accent-gradient {
  color: var(--accent-text);
}

h2.headline, .headline {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
  font-size: clamp(24px, 3.8vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
h3.title, .title {
  font-weight: 500;
  font-size: 19px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

p.lede {
  font-size: 18px;
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 540px;
  text-wrap: pretty;
}
p.body, .body-text {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-muted);
  text-wrap: pretty;
}

/* ── Buttons ───────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.005em;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background .2s, border-color .2s, color .2s, transform .15s;
  white-space: nowrap;
}
.btn.primary {
  background: var(--text);
  color: var(--bg);
}
.btn.primary:hover {
  background: #fff;
  transform: translateY(-1px);
}
/* В светлой теме primary — тёмная кнопка со светлым текстом (color:var(--bg)=#fafafa).
   Базовый hover красит фон в #fff → светлый текст пропадает. Затемняем фон вместо осветления. */
[data-theme="light"] .btn.primary:hover { background: #000; }
.btn.secondary {
  background: rgba(255,255,255,0.06);
  color: var(--text);
  border-color: var(--line-strong);
}
[data-theme="light"] .btn.secondary { background: rgba(0,0,0,0.04); }
.btn.secondary:hover {
  background: rgba(255,255,255,0.10);
  border-color: var(--line-emph);
}
[data-theme="light"] .btn.secondary:hover { background: rgba(0,0,0,0.06); }
.btn.ghost {
  background: transparent;
  color: var(--text-muted);
}
.btn.ghost:hover { color: var(--text); }
.btn .arrow {
  transition: transform .2s;
}
.btn:hover .arrow { transform: translateX(2px); }

/* ── Floating pill nav ─────────────────────────────── */
.nav-pill {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 6px 6px 18px;
  background: rgba(26,26,26,0.94);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  font-size: 13px;
  max-width: calc(100vw - 24px);
}
[data-theme="light"] .nav-pill { background: rgba(250,250,250,0.94); }

@supports not ((backdrop-filter: blur(12px)) or (-webkit-backdrop-filter: blur(12px))) {
  .nav-pill { background: rgba(26,26,26,0.98); }
  [data-theme="light"] .nav-pill { background: rgba(250,250,250,0.98); }
  .nav-mobile-menu { background: rgba(26,26,26,0.98); }
  [data-theme="light"] .nav-mobile-menu { background: rgba(250,250,250,0.98); }
}

.nav-pill .brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 13.5px;
  letter-spacing: -0.01em;
  padding-right: 14px;
  border-right: 1px solid var(--line);
  margin-right: 6px;
}
.nav-pill .brand .logo-mark {
  width: 24px; height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}
.nav-pill .links {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.nav-pill .links a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  font-weight: 450;
  transition: color .15s, background .15s;
  white-space: nowrap;
}
.nav-pill .links a:hover {
  color: var(--text);
  background: rgba(255,255,255,0.04);
}
[data-theme="light"] .nav-pill .links a:hover { background: rgba(0,0,0,0.04); }
.nav-pill .links a.current { color: var(--text); }

.nav-pill .tools {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 6px;
  padding-left: 6px;
  border-left: 1px solid var(--line);
}
.nav-pill .icon-btn {
  width: 30px; height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  background: transparent;
  border: 0;
  color: var(--text-muted);
  cursor: pointer;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  transition: color .15s, background .15s;
}
.nav-pill .icon-btn:hover {
  color: var(--text);
  background: rgba(255,255,255,0.06);
}
[data-theme="light"] .nav-pill .icon-btn:hover { background: rgba(0,0,0,0.05); }

.nav-pill .cta {
  margin-left: 2px;
  height: 30px;
  padding: 0 14px;
  font-size: 12.5px;
}

/* ── Mobile nav ────────────────────────────────────── */
.nav-burger {
  display: none;
  width: 30px; height: 30px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  border-radius: var(--radius-pill);
  transition: color .15s, background .15s;
}
.nav-burger:hover {
  color: var(--text);
  background: rgba(255,255,255,0.06);
}
[data-theme="light"] .nav-burger:hover { background: rgba(0,0,0,0.05); }
.nav-burger svg { width: 16px; height: 16px; }

.nav-mobile-menu {
  display: none;
  position: fixed;
  top: 62px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 49;
  background: rgba(26,26,26,0.94);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 8px;
  min-width: 180px;
  flex-direction: column;
  gap: 2px;
}
[data-theme="light"] .nav-mobile-menu { background: rgba(250,250,250,0.94); }
.nav-mobile-menu.open { display: flex; }
.nav-mobile-menu a {
  display: block;
  padding: 10px 16px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 450;
  border-radius: 8px;
  transition: color .15s, background .15s;
}
.nav-mobile-menu a:hover,
.nav-mobile-menu a.current {
  color: var(--text);
  background: rgba(255,255,255,0.06);
}
[data-theme="light"] .nav-mobile-menu a:hover,
[data-theme="light"] .nav-mobile-menu a.current { background: rgba(0,0,0,0.05); }

@media (max-width: 760px) {
  .nav-pill .links { display: none; }
  .nav-pill .brand { padding-right: 8px; margin-right: 2px; border-right: 0; }
  .nav-pill { padding-left: 14px; padding-right: 4px; }
  .nav-burger { display: inline-flex; }
}

@media (max-width: 720px) {
  .nav-pill, .nav-mobile-menu { backdrop-filter: none; background: rgba(26,26,26,0.98); }
}

/* ── Sections ──────────────────────────────────────── */
section.spread {
  padding: 120px 0;
  position: relative;
}
section.spread + section.spread {
  border-top: 1px solid var(--line);
}
@media (max-width: 720px) { section.spread { padding: 80px 0; } }

.section-head {
  margin-bottom: 64px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 760px;
}
.section-head .meta {
  display: flex;
  gap: 14px;
  align-items: center;
  color: var(--text-faint);
  font-size: 12.5px;
  font-family: 'JetBrains Mono', monospace;
}
.section-head .meta .sep { color: var(--line-emph); }

/* ── Hairline divider ──────────────────────────────── */
hr.line,
.hairline {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong) 20%, var(--line-strong) 80%, transparent);
  margin: 0;
}

/* ── Code / Terminal ───────────────────────────────── */
.code-card {
  background: #1f1d1b;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  overflow: hidden;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  line-height: 1.7;
  max-width: 100%;
  box-shadow:
    0 25px 80px -20px rgba(0,0,0,0.5),
    0 0 0 1px rgba(255,255,255,0.03) inset;
}
.code-card .head {
  padding: 11px 16px;
  background: #181614;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 11.5px;
  color: var(--text-faint);
  display: flex;
  align-items: center;
  gap: 12px;
}
.code-card .head::before {
  content: '';
  display: inline-flex;
  gap: 6px;
  width: 48px;
  height: 12px;
  background:
    radial-gradient(circle 5px at 6px 6px, #ff5f57 5px, transparent 5px),
    radial-gradient(circle 5px at 22px 6px, #febc2e 5px, transparent 5px),
    radial-gradient(circle 5px at 38px 6px, #28c840 5px, transparent 5px);
  flex-shrink: 0;
  opacity: 0.8;
}
[data-theme="light"] .code-card { background: #f5f3f0; border-color: rgba(0,0,0,0.10); box-shadow: 0 40px 100px -30px rgba(0,0,0,0.35), 0 0 0 1px rgba(0,0,0,0.08); }
[data-theme="light"] .code-card .head { background: #eceae6; }
.code-card .head .path { color: var(--text-dim); }
.code-card .head .tag {
  margin-left: auto;
  padding: 3px 10px;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: var(--radius-pill);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--accent-green-text);
  background: rgba(52,211,153,0.06);
}
.code-card .body {
  padding: 20px 24px;
  color: var(--text-muted);
  text-align: left;
}
.code-card .body pre {
  margin: 0;
  white-space: pre;
  overflow-x: auto;
  text-align: left;
}
@media (max-width: 600px) {
  .code-card { font-size: 11px; }
  .code-card .body { padding: 14px 16px; }
}
.code-card .prompt { color: var(--accent-text); user-select: none; margin-right: 8px; }
.code-card .comment { color: var(--text-faint); font-style: italic; }
.code-card .ok { color: var(--accent-green-text); }
.typing-cursor {
  color: var(--accent-green-text);
  font-weight: 400;
  animation: cursor-blink 0.7s step-end infinite;
}
@keyframes cursor-blink { 50% { opacity: 0; } }
.code-card .warn { color: #d4a93a; }
.code-card .key { color: #e58b5f; }
.code-card .str { color: #a3c585; }
.code-card .fn { color: var(--accent-text); }
.code-card .num-c { color: #d49a3a; }
.code-card .kw { color: #c87a6c; font-style: italic; }
.code-card .out { color: var(--text); }

/* ── Reveal animations (scroll-triggered) ─────────── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.2,0.8,0.2,1),
              transform 0.6s cubic-bezier(0.2,0.8,0.2,1);
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }
.reveal.d4 { transition-delay: 0.32s; }
.reveal.d5 { transition-delay: 0.40s; }
.reveal.d6 { transition-delay: 0.48s; }

/* Без JS (.js не выставлен скриптом) контент виден сразу — иначе вся страница пустая. */
html:not(.js) .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  /* Гасим стартовые состояния анимаций — контент виден сразу, без скрытого opacity. */
  .reveal, .term-line { opacity: 1 !important; transform: none !important; }
}

::selection { background: var(--accent); color: #fff; }

/* i18n */
[data-lang]:not(.active) { display: none; }
/* Без JS язык не переключается (.active не выставляется) — показываем RU по умолчанию. */
html:not(.js) [data-lang="ru"] { display: revert; }

/* Focus styles */
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 3px;
  border-radius: 6px;
}

/* nav CTA crowds the pill on phones — contact via hero button and #contact (#58) */
@media (max-width: 760px) { .nav-pill .cta { display: none; } }

/* === Доступность и тач: skip-link, focus-visible, тач-цели (#23/#24/#55/#57) === */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: #1a1a1a; padding: 10px 18px;
  font-weight: 600; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; }
.ws-tree-item:focus-visible, .principle-cell:focus-visible { border-radius: 4px; }

@media (max-width: 760px) {
  .nav-burger, .icon-btn { width: 40px; height: 40px; }
  .nav-mobile-menu a { padding: 13px 16px; }
  .nav-mobile-menu .cta { display: flex; justify-content: center; margin-top: 8px; }
  /* Тач-цель ≥44px на мобиле: min-height перекрывает базовые height:38px (#A2/WCAG 2.5.5). */
  .btn { min-height: 44px; }
}

@media (hover: none) {
  .principle-cell .pc-cta { color: var(--accent-text); }
}
