/* Einstein site: one dark style for every page, the same colours as the page of the maps (движок/einstein/page.html). */
:root {
  --page:      #0d0d0d;
  --surface:   #1c1c1b;
  --surface-2: #232322;
  --ink:       #ececea;
  --ink-2:     #c3c2b7;
  --muted:     #898781;
  --hairline:  rgba(255,255,255,.09);
  --accent:    #3987e5;
  --accent-2:  #9085e9;
  --ok:        #0ca30c;
  --warn:      #fab219;
  --crit:      #d03b3b;
  --radius:    14px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }   /* кнопки оболочки карт прячутся атрибутом hidden; display у button его не отменяет */
html { background: var(--page); -webkit-text-size-adjust: 100%; }
/* свечение главной (.hero::before) шире экрана: без обрезки страница расширялась (320 → 504 px в Chrome).
   clip, а не hidden: hidden делает body прокручиваемым блоком, и липкая шапка перестаёт липнуть */
html, body { overflow-x: clip; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--page); color: var(--ink);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.01em; margin: 0 0 .6em; font-weight: 650; }
h1 { font-size: 2rem; }
h2 { font-size: 1.35rem; margin-top: 2.2rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
ul { padding-left: 1.2em; }
b { font-weight: 650; }
code { font: .92em ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--surface-2); padding: .1em .4em; border-radius: 6px; }

/* ── header and footer ────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 10px 24px; background: rgba(13,13,13,.86); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hairline);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; font-size: 1.1rem; letter-spacing: .01em; }
.brand:hover { text-decoration: none; }
.brand img { width: 34px; height: 34px; display: block; filter: drop-shadow(0 0 10px rgba(57,135,229,.35)); }
.site-header nav { display: flex; align-items: center; gap: 4px 18px; flex-wrap: wrap; margin-left: auto; font-size: .95rem; }
.site-header nav a { color: var(--ink-2); }
.site-header nav a:hover { color: var(--ink); text-decoration: none; }
.site-header nav .nav-account { color: var(--ink); max-width: 16rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-footer {
  margin-top: auto; padding: 28px 24px; border-top: 1px solid var(--hairline);
  color: var(--muted); font-size: .9rem; display: flex; gap: 8px 24px; flex-wrap: wrap; align-items: center;
}
.site-footer a { color: var(--ink-2); }

/* ── page body ────────────────────────────────────── */
main { width: 100%; max-width: 44rem; margin: 0 auto; padding: 28px 24px 64px; }
main.wide { max-width: 72rem; }
.demo {
  display: inline-block; margin: 0 0 22px; padding: 5px 12px; border-radius: 999px;
  background: rgba(250,178,25,.12); color: #f0c35a; border: 1px solid rgba(250,178,25,.35); font-size: .82rem;
}
.box, .card {
  background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius);
  padding: 20px 22px; margin: 16px 0;
}
.box p:last-child, .card p:last-child { margin-bottom: 0; }
.box > h2:first-child, .card > h2:first-child { margin-top: 0; }   /* отступ заголовка раздела — не внутри карточки */
.muted { color: var(--muted); font-size: .92rem; }
.warn { color: var(--warn); }
.error { color: #ff7b7b; background: rgba(208,59,59,.1); border: 1px solid rgba(208,59,59,.35); border-radius: 10px; padding: 10px 14px; }

/* buttons: the first one is filled, the second is a quiet outline */
button, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; font-size: .98rem; line-height: 1.2;
  padding: 11px 20px; border-radius: 10px; cursor: pointer; text-decoration: none;
  border: 1px solid var(--accent); background: var(--accent); color: #fff;
  transition: filter .12s, background .12s, border-color .12s;
}
button:hover, .btn:hover { filter: brightness(1.12); text-decoration: none; }
button.second, .btn.second { background: transparent; color: var(--ink); border-color: rgba(255,255,255,.22); }
button.second:hover, .btn.second:hover { border-color: rgba(255,255,255,.45); filter: none; }
button[disabled] { opacity: .45; cursor: not-allowed; filter: none; }
.btn.small { padding: 7px 14px; font-size: .9rem; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 18px 0; }

/* forms */
form p { margin: 0 0 14px; }
label { display: block; color: var(--ink-2); font-size: .92rem; }
input[type=text], input[type=password], input[type=email], input:not([type]) {
  display: block; width: 100%; margin-top: 6px; padding: 11px 13px;
  font: inherit; color: var(--ink); background: var(--surface-2);
  border: 1px solid rgba(255,255,255,.14); border-radius: 10px; outline: none;
}
input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(57,135,229,.25); }
input[name=user_code] { letter-spacing: .12em; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; text-transform: uppercase; }
.form-card { max-width: 26rem; }
.form-card h1 { font-size: 1.6rem; }
.form-foot { color: var(--muted); font-size: .92rem; margin-top: 18px; }

/* tables */
table { border-collapse: collapse; width: 100%; margin: 8px 0 20px; }
td, th { border-bottom: 1px solid var(--hairline); padding: 9px 8px; text-align: left; font-size: .93rem; vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; }
td form { margin: 0; }

/* ── home page ────────────────────────────────────── */
.hero {
  position: relative; padding: 56px 0 40px; display: grid; grid-template-columns: 1.3fr .8fr; gap: 32px; align-items: center;
}
.hero::before {
  content: ""; position: absolute; inset: -120px -200px auto -200px; height: 520px; z-index: -1; pointer-events: none;
  background: radial-gradient(60% 55% at 65% 30%, rgba(57,135,229,.22), transparent 70%),
              radial-gradient(40% 40% at 20% 70%, rgba(144,133,233,.14), transparent 70%);
}
.kicker { color: var(--accent); font-weight: 650; font-size: .85rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 14px; }
.hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); letter-spacing: -.02em; margin-bottom: 18px; max-width: 14em; }
.hero .lead { font-size: 1.15rem; color: var(--ink-2); max-width: 36rem; }
.hero-art { display: flex; justify-content: center; }
.hero-art img { width: min(100%, 300px); filter: drop-shadow(0 0 40px rgba(57,135,229,.35)); }
.facts { display: flex; gap: 10px 22px; flex-wrap: wrap; color: var(--muted); font-size: .9rem; margin-top: 10px; }
.facts span::before { content: "✓"; color: var(--ok); margin-right: 6px; font-weight: 700; }
.section { margin-top: 72px; }
.section h2 { font-size: 1.9rem; margin: 0 0 10px; letter-spacing: -.02em; }
.section .lead { color: var(--ink-2); font-size: 1.08rem; max-width: 42rem; margin-bottom: 0; }
/* карточки главной: граница чуть заметнее базовой, чтобы сетки читались как сетки, а не как россыпь текста */
.section .card, .stat, .checks li { border-color: rgba(255,255,255,.13); }
.section .card { padding: 22px 24px; }
.section .card h3 { font-size: 1.08rem; margin-bottom: 8px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 14px; margin-top: 24px; }
.grid .card { margin: 0; }
.after-grid { margin-top: 16px; }
.grid.five { grid-template-columns: repeat(auto-fit, minmax(12.5rem, 1fr)); }   /* пять карточек в ряд, без сироты */
.card h3 { margin-bottom: 6px; }
.card p { color: var(--ink-2); font-size: .95rem; }
.tag { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; margin-bottom: 12px; }
.tag.free { color: #7fd47f; background: rgba(12,163,12,.14); border: 1px solid rgba(12,163,12,.35); }
.tag.pro { color: #9fc4f5; background: rgba(57,135,229,.16); border: 1px solid rgba(57,135,229,.4); }
.pain { border-left: 3px solid var(--crit); padding-left: 14px; }
.pain p { color: var(--ink-2); }
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 14px; margin-top: 30px; }
.steps .card { margin: 0; position: relative; padding-top: 26px; }
.steps .card::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: -14px; left: 18px; width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent); color: #fff; font-weight: 700; font-size: .9rem; display: flex; align-items: center; justify-content: center;
}
.prices { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 14px; margin-top: 24px; }
.prices .card { margin: 0; }
.prices .amount { font-size: 2.4rem; font-weight: 700; letter-spacing: -.02em; margin: 6px 0 4px; }
.prices .card p { margin-bottom: 16px; }
.prices .card.pro { border-color: rgba(57,135,229,.5); box-shadow: 0 0 0 1px rgba(57,135,229,.2), 0 20px 60px -30px rgba(57,135,229,.5); }
.faq details { border-top: 1px solid var(--hairline); padding: 14px 0; }
.faq details:last-child { border-bottom: 1px solid var(--hairline); }
.faq summary { font-size: 1.02rem; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--muted); }
.faq details[open] summary::after { content: "−"; }
.faq p { color: var(--ink-2); margin: 10px 0 0; }
.downloads .card { display: flex; justify-content: space-between; align-items: center; gap: 16px; }

/* главная, блоки продажи (29.10.2026): крупные цифры экономии, «без и с Einstein», плюсы Free галочками */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 14px; margin-top: 24px; }
.stat { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 22px; }
.stat .v {
  font-size: clamp(2.4rem, 5vw, 3.2rem); font-weight: 750; letter-spacing: -.03em; line-height: 1.05; margin: 0 0 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat .t { font-weight: 650; color: var(--ink); margin: 0 0 6px; }
.stat.main { border-color: rgba(57,135,229,.6); box-shadow: 0 20px 60px -30px rgba(57,135,229,.6); }
.stat.main .v { font-size: clamp(2.8rem, 6vw, 3.8rem); }
.stat .d { color: var(--muted); font-size: .92rem; margin: 0; }
.vs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 24px; }
@media (max-width: 760px) { .vs { grid-template-columns: 1fr; } }
.vs h3 { font-size: 1.08rem; margin-bottom: 10px; }
.vs .card { margin: 0; }
.vs ul { list-style: none; padding: 0; margin: 0; }
.vs li { position: relative; padding: 10px 0 10px 30px; border-top: 1px solid var(--hairline); color: var(--ink-2); }
.vs li:first-child { border-top: 0; }
.vs li::before { position: absolute; left: 2px; top: 10px; font-weight: 700; }
.vs-without li::before { content: "✕"; color: var(--crit); }
.vs-with { border-color: rgba(57,135,229,.5); box-shadow: 0 20px 60px -30px rgba(57,135,229,.5); }
.vs-with li { color: var(--ink); }
.vs-with li::before { content: "✓"; color: var(--ok); }
.example { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 24px; }
.example .card { margin: 0; display: flex; flex-direction: column; }
.example .msg { position: relative; margin: 0 0 10px; padding: 10px 14px; border-radius: 12px; font-size: .95rem; line-height: 1.45; }
.example .msg b { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 3px; }
.example .you { background: rgba(255,255,255,.06); color: var(--ink); margin-left: 12%; }
.example .ai { background: rgba(57,135,229,.10); color: var(--ink); margin-right: 12%; }
.example-without .ai { background: rgba(208,59,59,.10); color: var(--ink-2); }
.example .cost { margin: auto 0 0; padding: 12px 0 0 26px; position: relative; border-top: 1px solid var(--hairline); font-size: .9rem; color: var(--muted); }
.example .cost::before { position: absolute; left: 2px; font-weight: 700; content: "✕"; color: var(--crit); }
.example-with .cost::before { content: "✓"; color: var(--ok); }
.example-with { border-color: rgba(57,135,229,.5); box-shadow: 0 20px 60px -30px rgba(57,135,229,.5); }
.example-with .cost { color: #7fd47f; }
@media (max-width: 760px) { .example { grid-template-columns: 1fr; } }
.checks { list-style: none; padding: 0; margin: 18px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 14px; }
@media (max-width: 1000px) { .checks { grid-template-columns: repeat(2, 1fr); } }   /* восемь плюсов: 4×2, 2×4, столбик */
@media (max-width: 560px) { .checks { grid-template-columns: 1fr; } }
.checks li {
  position: relative; padding: 13px 14px 13px 46px; background: var(--surface); border: 1px solid var(--hairline);
  border-radius: 12px; font-weight: 600;
}
.checks li::before {
  content: "✓"; position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; border-radius: 50%;
  background: rgba(12,163,12,.18); color: #7fd47f; font-size: .8rem; display: flex; align-items: center; justify-content: center;
}

@media (max-width: 720px) {
  .site-header { padding: 10px 16px; }
  .site-header nav { margin-left: 0; width: 100%; }
  main { padding: 20px 16px 48px; }
  .hero { grid-template-columns: 1fr; padding-top: 28px; }
  .hero-art { order: -1; }
  .hero-art img { width: 150px; }
  .downloads .card { flex-direction: column; align-items: flex-start; }
  .vs { grid-template-columns: 1fr; }
}

/* учебный почтовый ящик (/lab/mail): текст письма как есть, со ссылками */
.letter-body { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink-2); font-size: .95rem; }

/* ── главная, полировка 30.10.2026 (Владимир: «солидно, грамотно распределено, не на коленке»).
   Откат вида — удалить этот блок целиком: тексты и разметка от него не зависят. ── */
.hero h1, .section h2 { text-wrap: balance; }                      /* заголовки без одинокого слова в последней строке */
.section .lead, .card p, .stat .d, .vs li, .checks li, .faq p { text-wrap: pretty; }

/* «Без / С Einstein»: каждая пара на одной высоте, разделители двух карточек совпадают (subgrid) */
@media (min-width: 761px) {
  .vs { row-gap: 0; }
  .vs .card { display: grid; grid-row: span 6; grid-template-rows: subgrid; row-gap: 0; }   /* 5 пар + заголовок (web.py, pairs) */
  .vs ul { display: contents; }
}

/* Pro: два главных плюса крупно, три ниже — вместо пяти узких столбиков */
@media (min-width: 1001px) {
  .grid.five { grid-template-columns: repeat(6, 1fr); }
  .grid.five > .card { grid-column: span 2; }
  .grid.five > .card:nth-child(-n + 2) { grid-column: span 3; }
}
@media (min-width: 641px) and (max-width: 1000px) {
  .grid.five { grid-template-columns: repeat(2, 1fr); }
  .grid.five > .card:last-child { grid-column: 1 / -1; }
}

/* Цены: кнопки обеих карточек на одной линии */
.prices .card { display: flex; flex-direction: column; align-items: flex-start; }
.prices .card .btn { margin-top: auto; }

/* мелочи на всех ширинах (правка 30.10, №8) */
.card h3, .stat .t { text-wrap: balance; }                         /* «Никакого стороннего / ИИ» → без одинокого слова */
.checks li { display: flex; align-items: center; }                 /* короткий текст плитки вровень с галочкой */
.prices .card { container-type: inline-size; }
.prices .amount { font-size: clamp(1.6rem, 9cqi, 2.4rem); line-height: 1.15; }   /* «19.00 USD в месяц» в одну строку */
@media (min-width: 641px) and (max-width: 1000px) {                /* планшет: «в 1000 раз» на всю ширину, две цифры под ней */
  .stats { grid-template-columns: 1fr 1fr; }
  .stat.main { grid-column: 1 / -1; }
}

/* главная, блок Pro (правка №17, 31.10.2026): кадр живой карты → /demo и карточка с тремя цифрами; пять кубов под ними сжаты */
.showcase { display: grid; grid-template-columns: 1.55fr 1fr; gap: 18px; margin-top: 24px; align-items: stretch; }
.shot { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid rgba(255,255,255,.13); background: #0b0b0b; box-shadow: 0 18px 50px rgba(0,0,0,.45); }
/* снимок больше окна: двигается прокруткой (трекпад, колесо), без увеличения и без скрипта (правка №18) */
.peek { height: 100%; min-height: 460px; max-height: 560px; overflow: auto; overscroll-behavior: contain; cursor: grab; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.25) transparent; }
.peek img { display: block; width: 2600px; max-width: none; height: auto; user-select: none; -webkit-user-drag: none; }
.shot-cta { position: absolute; right: 14px; bottom: 14px; pointer-events: none; background: rgba(13,13,13,.78); border: 1px solid rgba(255,255,255,.14); color: var(--ink); padding: 8px 12px; border-radius: 999px; font-size: .88rem; font-weight: 600; backdrop-filter: blur(6px); }
.showcase-side { background: var(--surface); border: 1px solid rgba(255,255,255,.13); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; }
.showcase-side .tag { align-self: flex-start; }
.showcase-side h3 { margin: 0 0 8px; font-size: 1.25rem; }
.showcase-side > p { color: var(--ink-2); font-size: .95rem; margin: 0 0 14px; }
.nums { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 10px; }
.nums li { display: grid; grid-template-columns: 6.4rem 1fr; gap: 10px; align-items: baseline; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--hairline); }
.nums b { white-space: nowrap; font-size: 1.4rem; font-weight: 800; color: #9fc4f5; letter-spacing: -.02em; }
.nums span { color: var(--ink-2); font-size: .9rem; line-height: 1.35; }
.showcase-side .btn { margin-top: auto; align-self: flex-start; }
.grid.five.compact { grid-template-columns: repeat(5, 1fr); gap: 12px; margin-top: 16px; }
/* сжатые кубы: раскладка 2+3 полировки 30.10 (.grid.five > .card span) к ним не относится — пять в ряд */
.grid.five.compact > .card, .grid.five.compact > .card:nth-child(-n + 2) { grid-column: auto; }
.section .grid.five.compact .card { padding: 14px 14px 12px; }
.grid.five.compact .tag { margin-bottom: 8px; font-size: .66rem; padding: 2px 8px; }
.section .grid.five.compact .card h3 { font-size: .98rem; margin: 0 0 4px; line-height: 1.25; }
.grid.five.compact p { font-size: .84rem; line-height: 1.4; margin: 0; }
@media (max-width: 900px) { .showcase { grid-template-columns: 1fr; } .peek { min-height: 320px; max-height: 360px; } .grid.five.compact { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .grid.five.compact { grid-template-columns: 1fr; } }

/* ── install command: a Mac / Windows switch without a script (P165, F2) ── */
.install pre { white-space: pre-wrap; word-break: break-all; margin: 0 0 12px; }   /* a long command wraps inside the box */
.os { position: relative; }
.os > input { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
.os > label {
  display: inline-block; margin: 0 6px 12px 0; padding: 7px 14px; border-radius: 10px; cursor: pointer;
  border: 1px solid rgba(255,255,255,.22); color: var(--ink-2); font-weight: 600; font-size: .9rem;
}
.os > input:checked + label { border-color: var(--accent); color: var(--ink); background: rgba(57,135,229,.14); }
.os > input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.os > .os-windows, .os > #os-windows:checked ~ .os-mac { display: none; }
.os > #os-windows:checked ~ .os-windows { display: block; }
