/* Общие стили aipro.youit.school: темы, рамка, шапка, кнопки, карточки. Цвета — только через переменные. */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@800;900&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Контраст (impeccable, 22.11): белый на фирменном #00b25a — 2,8:1, мало для текста. Заливки с белым текстом — #078847 (4,5:1),
     крупные зелёные заголовки — #00a352 (3,1:1 на светло-зелёном фоне, норма для крупного), мелкий зелёный текст — #077f42 (5,1:1).
     Фирменный #00b25a остался рамкой, графиками и зелёным на тёмных плашках (4,6:1 на #323232). */
  --green: #078847; --green-bright: #00b25a; --green-display: #00a352; --green-dark: #077f42; --green-soft: #e9f6ed;
  --green-on-dark: #2bd27a; /* мелкий зелёный текст на светлых пятнах тёмных плашек (#404040): 5,2:1 */
  --bg: #ffffff; --bg-2: #f1faf4; --frame: #00b25a; --card: #ffffff; --line: #e2e8e4;
  --ink: #141414; --ink-2: #5b5f5d; --ink-3: #6b706d; --dark: #323232; --on-dark: #ffffff; --on-green: #ffffff;
  --code: rgba(20, 60, 40, .05); --shadow: 0 24px 60px rgba(0, 40, 20, .10);
  --chart-1: #00b25a; --chart-2: #39c2d7; --chart-3: #f15a31; --chart-4: #bd5697; --danger: #d13b2f; --warn: #e59d0c;
  --font-head: 'Montserrat', 'Arial Black', sans-serif; --font-text: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', Menlo, monospace;
  --r-l: 32px; --r-m: 22px; --r-s: 14px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --green: #00c464; --green-bright: #00c464; --green-display: #00c464; --green-dark: #3ddc8a; --green-soft: rgba(0, 196, 100, .13); --green-on-dark: #00c464;
  --bg: #0f1311; --bg-2: #121814; --frame: #07100b; --card: #171c19; --line: #29302c;
  --ink: #f2f5f3; --ink-2: #b9c2bd; --ink-3: #8f9893; --dark: #232a26; --on-dark: #f2f5f3; --on-green: #04150c;
  --code: rgba(255, 255, 255, .035); --shadow: 0 30px 80px rgba(0, 0, 0, .45);
  --chart-1: #00c464; --chart-2: #4fd3e6; --chart-3: #ff7a52; --chart-4: #d775b2; --danger: #ff6b5e; --warn: #fcbf3d;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { font-family: var(--font-text); color: var(--ink); background: var(--frame); -webkit-font-smoothing: antialiased; line-height: 1.45; }
a { color: inherit; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
svg { fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 6px; }

/* Рамка и лист — как слайды собрания */
.frame { padding: 14px; min-height: 100vh; }
.sheet { position: relative; max-width: 1400px; margin: 0 auto; background: linear-gradient(160deg, var(--bg) 55%, var(--bg-2)); border-radius: 36px;
  overflow: hidden; overflow: clip; padding: 0 56px 48px; } /* clip: лист не прокручиваемый контейнер — внутри работает position: sticky */
:root[data-theme="dark"] .sheet { background: radial-gradient(900px 520px at 88% -8%, rgba(0, 196, 100, .16), transparent 60%),
  radial-gradient(700px 420px at -10% 35%, rgba(57, 194, 215, .07), transparent 60%), var(--bg); }
.code-bg { position: absolute; inset: 0; pointer-events: none; font-family: var(--font-mono); font-size: 28px; color: var(--code); white-space: nowrap; overflow: hidden; }
.code-bg span { position: absolute; transform: rotate(-4deg); }
.sheet > *:not(.code-bg) { position: relative; }

/* Шапка */
.site-header { display: flex; align-items: center; gap: 24px; padding: 24px 0 8px; }
.logo { height: 38px; width: auto; }
.site-header > a:first-child { padding: 4px 0; margin: -4px 0; } /* зона нажатия логотипа ≥ 40 px */
:root[data-theme="dark"] .logo { filter: brightness(0) invert(1); }
.nav { display: flex; gap: 24px; margin-left: auto; font-family: var(--font-mono); font-size: 14px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.nav a { text-decoration: none; }
.nav a:hover { color: var(--green-dark); }
.theme-toggle { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; color: var(--ink-2); flex: none; }
.theme-toggle:hover { border-color: var(--green); color: var(--green-dark); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }
.back { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; text-decoration: none; color: var(--ink-2);
  padding: 11px 0; margin: -11px 0; } /* зона нажатия 44 px по высоте, раскладка прежняя */
.back:hover { color: var(--green-dark); }
.back svg { width: 18px; height: 18px; }

/* Заголовки */
.kicker { font-family: var(--font-mono); font-size: 15px; letter-spacing: .14em; text-transform: uppercase; color: var(--green-dark); }
.title { font-family: var(--font-head); font-weight: 900; font-size: 64px; line-height: 1; text-transform: uppercase; letter-spacing: -.01em; text-wrap: balance; }
.title em, .h2 em { font-style: normal; color: var(--green-display); }
.h2 { font-family: var(--font-head); font-weight: 900; font-size: 44px; line-height: 1.02; text-transform: uppercase; text-wrap: balance; }
.lead { font-size: 19px; line-height: 1.55; color: var(--ink-2); text-wrap: pretty; }

/* Кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; padding: 0 26px; border-radius: 18px;
  background: var(--green); color: var(--on-green); font-weight: 700; font-size: 17px; text-decoration: none; transition: filter .15s, transform .15s; }
.btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn svg { width: 20px; height: 20px; stroke-width: 2.4; }
.btn--ghost { background: transparent; color: var(--ink); border: 2px solid var(--line); }
.btn--ghost:hover { border-color: var(--green); filter: none; }
.btn--small { min-height: 42px; padding: 0 16px; border-radius: 12px; font-size: 15px; }

/* Карточки */
.card { background: var(--card); border: 2px solid var(--line); border-radius: var(--r-m); }
.icon { width: 46px; height: 46px; flex: none; border-radius: var(--r-s); background: var(--green-soft); color: var(--green-dark); display: grid; place-items: center; }
.icon svg { width: 24px; height: 24px; }
.badge-demo { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 13px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-2); background: var(--green-soft); border-radius: 999px; padding: 7px 14px; }
.badge-demo::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--warn); }

/* Кнопка записи внизу экрана — только телефон; прячется, пока видно то, что перечислено в data-sticky (theme.js) */
.sticky-cta { display: none; }

/* Подвал */
.site-footer { margin-top: 56px; padding-top: 24px; border-top: 2px solid var(--line); display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center;
  font-family: var(--font-mono); font-size: 14px; letter-spacing: .04em; color: var(--ink-3); }
.site-footer a { color: var(--green-dark); text-decoration: none; }

@media (max-width: 900px) {
  .frame { padding: 8px; }
  .sheet { padding: 0 18px 28px; border-radius: 24px; }
  .site-header { padding-top: 16px; gap: 14px; }
  .logo { height: 32px; }
  .nav { display: none; }
  .theme-toggle { margin-left: auto; }
  .kicker { font-size: 13px; }
  .title { font-size: 34px; }
  .h2 { font-size: 28px; }
  .lead { font-size: 17px; }
  .frame { padding-bottom: 92px; }
  .sticky-cta { display: flex; position: fixed; z-index: 40; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom));
    align-items: center; justify-content: space-between; gap: 12px; padding: 10px 10px 10px 18px; border-radius: 18px;
    background: var(--dark); color: var(--on-dark); box-shadow: var(--shadow); transform: translateY(140%); visibility: hidden;
    transition: transform .3s cubic-bezier(.16, 1, .3, 1), visibility 0s .3s; }
  .sticky-cta.show { transform: none; visibility: visible; transition: transform .3s cubic-bezier(.16, 1, .3, 1); }
  .sticky-cta b { display: block; font-family: var(--font-head); font-weight: 900; font-size: 19px; line-height: 1.1; }
  .sticky-cta span { font-size: 14px; opacity: .8; }
  .sticky-cta .btn { flex: none; min-height: 46px; }
}
