/* Служебные страницы расширения: Welcome Page и политика приватности.
   Макет владельца — Figma, секция 245:687: кадры 245:621 (значок закреплён) и 245:652 (не закрепился).
   Цвета и шрифт — как у расширения в тёмной теме: ext/src/index.css, шрифт Geist. */

@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/geist-latin-wght-normal.woff2') format('woff2-variations');
}

/* Фон — как у расширения в тёмной теме, ext/src/index.css .dark; у Welcome Page поверх него картинка Nebula. */
:root {
  /* Пары токенов нового макета Hero; существующие страницы не меняют оформление. */
  --site-display-size: 64px;
  --site-display-line-height: 72px;
  --site-display-letter-spacing: -1.5px;
  --site-background-transparent: rgb(10 10 10 / 0);
  --brand-gradient-from: #3f3ff3;
  --brand-gradient-to: #5959f7;
  --spacing-3xl: 40px;
  --spacing-9xl: 128px;
  --background: #0a0a0a;
  --foreground: #ffffff;
  --muted-foreground: #a3a3a3;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; }

html, body { min-height: 100%; }

body {
  background: var(--background);
  color: var(--foreground);
  font-family: 'Geist', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

/* Кадр 1440×900: шапка и содержимое сверху, ссылка на политику внизу. Высота окна делится на масштаб — fit.js. */
.page {
  min-height: calc(100vh / var(--fit, 1));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  padding: 32px 40px;
}

/* Фон — Nebula в фирменных цветах, кроп владельца; выгружен из кадра 2x, WebP качества 0,9 — 63 КБ.
   Под ним — копия 48×30 прямо в стилях и средний цвет фона: с первого кадра страница того же цвета, а не чёрная,
   пока грузится картинка (владелец 13.10). Картинку страница запрашивает заранее — preload в welcome/index.html. */
.page--welcome {
  background:
    url('bg-nebula.webp') center / cover no-repeat,
    url('data:image/webp;base64,UklGRpwCAABXRUJQVlA4WAoAAAAgAAAALwAAHQAASUNDUMgBAAAAAAHIAAAAAAQwAABtbnRyUkdCIFhZWiAH4AABAAEAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAAAADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlkZXNjAAAA8AAAACRyWFlaAAABFAAAABRnWFlaAAABKAAAABRiWFlaAAABPAAAABR3dHB0AAABUAAAABRyVFJDAAABZAAAAChnVFJDAAABZAAAAChiVFJDAAABZAAAAChjcHJ0AAABjAAAADxtbHVjAAAAAAAAAAEAAAAMZW5VUwAAAAgAAAAcAHMAUgBHAEJYWVogAAAAAAAAb6IAADj1AAADkFhZWiAAAAAAAABimQAAt4UAABjaWFlaIAAAAAAAACSgAAAPhAAAts9YWVogAAAAAAAA9tYAAQAAAADTLXBhcmEAAAAAAAQAAAACZmYAAPKnAAANWQAAE9AAAApbAAAAAAAAAABtbHVjAAAAAAAAAAEAAAAMZW5VUwAAACAAAAAcAEcAbwBvAGcAbABlACAASQBuAGMALgAgADIAMAAxADZWUDggrgAAAPAGAJ0BKjAAHgA+ZSKQRaQiIZqt/gBABkS0AE6ZoowAjPlMJh9wfRiMfcL3Pwc60F9NcMvD6SwwpVT6YOFHeAAA/vt2V14rpjnKwbl1m1f/JT/3m/udD/nVaD49RgoUpZa3Hz+nCmnWMaWZGchGhidpLxIT8/Iq1/4KmWc2A2bBAiMj7Qsggl/fDGvHinlfUw0SnqW8xZLcXxaRlVIPA4NLdT7uSFnkeOWiig1AAA==') center / cover no-repeat,
    #181870;
}

.top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 64px;
  width: 100%;
}

/* Шапка: значок и название — paragraph/medium. Значок звука из макета не переносим: на странице нечего озвучивать. */
.header {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
  text-decoration: none;
}

.header img { width: 32px; height: 32px; }

.content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

.title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

/* heading 1: Geist Medium 40/40, трекинг −1,5. */
.title h1 {
  font-size: 40px;
  line-height: 40px;
  font-weight: 500;
  letter-spacing: -1.5px;
}

/* paragraph large/normal: Geist Regular 18/27. */
.title p,
.step p {
  font-size: 18px;
  line-height: 27px;
  font-weight: 400;
}

.title p { color: var(--muted-foreground); }

.steps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 48px;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

/* Скругление 16 — как у кадров снимков в макете. Figma выгружает их без обрезки по углам, поэтому режем здесь. */
.step img { display: block; max-width: 100%; height: auto; border-radius: 16px; }
/* Пока снимок грузится, на его месте — плашка белого 6 %, как в каркасе, а не пустота. */
.step img { background: rgba(255, 255, 255, 0.06); }

/* Какое состояние показать, решает адрес. Без параметра — основной сценарий, значок уже в панели: новый Chrome
   закрепляет расширение сам (владелец 13.10). ?pinned=0 — значка нет: сначала закрепить через пазл. */
.steps--unpin { display: none; }
.unpinned .steps--unpin { display: flex; }
.unpinned .steps--pinned { display: none; }

/* paragraph small/normal: Geist Regular 14/20. */
.footer {
  font-size: 14px;
  line-height: 20px;
  color: var(--muted-foreground);
}

.footer a { text-decoration: none; }
.footer a:hover { color: var(--foreground); }

/* Политика приватности — длинный текст: узкая колонка, обычный порядок заголовков. */
.policy {
  width: 100%;
  max-width: 720px;
  font-size: 16px;
  line-height: 26px;
}

.policy h1 { font-size: 40px; line-height: 44px; font-weight: 500; letter-spacing: -1.5px; margin-bottom: 8px; }
.policy h2 { font-size: 22px; line-height: 30px; font-weight: 500; margin: 40px 0 12px; }
.policy h3 { font-size: 18px; line-height: 27px; font-weight: 500; margin: 28px 0 8px; }
.policy p, .policy ul { margin-bottom: 14px; color: #e5e5e5; }
.policy ul { padding-left: 24px; }
.policy .updated { color: var(--muted-foreground); margin-bottom: 32px; }

/* ===== Главная сайта, корень. Макет — Figma, кадр 314:847 «Screen/Site Home»; карта —
   design/ds/screens/site-home-composition.md. Цвета — локальные переменные тёмной темы макета. ===== */
.home {
  --muted: #171717;
  --border: #404040;
  --primary: #e5e5e5;
  --primary-foreground: #0a0a0a;
  --brand-blue: #2727f1;
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --gutter: var(--spacing-9xl);
}

.home-page { position: relative; overflow: hidden; }

/* Фоны — рендеры мастеров Site / Mesh horizon (верх, 1440 × 900) и Site / Mesh footer (низ, привязан к низу кадра). */
.home-bg {
  position: absolute;
  left: 0;
  right: 0;
  height: 900px;
  pointer-events: none;
  background: no-repeat center / 100% 100%;
}
.home-bg--top { top: 0; background-image: url('home/hero-bg.webp'); }
/* Нижний — <img loading="lazy">: тянется на ширину, как фон 100% 100%. */
.home-bg--bottom { bottom: 0; width: 100%; object-fit: fill; }
.site-header, .home main, .site-footer { position: relative; }

/* Шапка — 64, поля 128; бренд, якоря и кнопка распределены по ширине. */
.site-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 64px;
  padding: 0 var(--gutter);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
  text-decoration: none;
}
.brand img { width: 32px; height: 32px; }
.site-nav { display: flex; gap: 24px; }
.site-nav a,
.site-footer__links a { font-size: 14px; line-height: 20px; color: var(--muted-foreground); text-decoration: none; }
.site-nav a:hover,
.site-footer__links a:hover { color: var(--foreground); }
.site-header__action { justify-self: end; }

/* Кнопки — Button - Nova: Primary Large в шапке; в первом экране — версия владельца 56 × r16. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s;
}
.btn--primary { background: var(--primary); color: var(--primary-foreground); }
.btn--primary:hover { background: var(--foreground); }
.btn--outline { border: 1px solid var(--foreground); color: var(--foreground); }
.btn--outline:hover { background: rgb(255 255 255 / 0.06); }
.btn--lg { height: 56px; gap: 10px; padding: 16px 32px; border-radius: 16px; font-size: 16px; line-height: 24px; }
.btn--primary.btn--lg { padding-left: 24px; }
.btn--lg img { width: 28px; height: 28px; }
.btn:focus-visible, .site-nav a:focus-visible, .site-footer a:focus-visible, .faq summary:focus-visible {
  outline: 2px solid var(--foreground);
  outline-offset: 2px;
}

/* Метка: бейдж первого экрана и номер шага — 12/16 SemiBold, заглавными, фон muted. */
.pill {
  display: inline-flex;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--muted);
  color: var(--muted-foreground);
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  text-transform: uppercase;
}

/* Первый экран: сверху 48; бейдж → Display 24 → вводная 32 → кнопки 40 → строка доверия 20 → кадры 64. */
.hero { display: flex; flex-direction: column; align-items: center; padding: 48px var(--gutter) 0; }
.hero__intro { display: flex; flex-direction: column; align-items: center; gap: 32px; width: 100%; max-width: 1184px; }
.hero__message { display: flex; flex-direction: column; align-items: center; gap: 24px; max-width: 1040px; }
/* Display: Geist Medium 64/72, трекинг −1,5; «dark mode,» — радиальный градиент brand/gradient from → to. */
.display { font-size: var(--site-display-size); line-height: var(--site-display-line-height); letter-spacing: var(--site-display-letter-spacing); font-weight: 500; text-align: center; }
.display__accent {
  background: radial-gradient(ellipse at center, var(--brand-gradient-from), var(--brand-gradient-to));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__lead { max-width: 788px; font-size: 18px; line-height: 27px; color: var(--muted-foreground); text-align: center; }
.hero__actions { display: flex; flex-direction: column; align-items: center; gap: 20px; padding-top: 40px; }
.hero__buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; padding: 0; list-style: none; font-size: 14px; line-height: 20px; color: var(--muted-foreground); }
.trust li { display: flex; align-items: center; gap: 8px; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; width: 100%; max-width: 1184px; padding-top: 64px; }

/* Пример документа — Site / Document example: полоса с подписью вплотную над страницей, рамка 2 слева, справа и снизу,
   радиус 8; описание — подписью под карточкой, 12. */
.doc { display: flex; flex-direction: column; margin: 0; }
.doc__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px 8px 0 0;
  background: var(--border);
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
}
.doc__bar img { width: 24px; height: 24px; }
.doc__page {
  display: block;
  width: 100%;
  height: auto;
  border: 2px solid var(--border);
  border-top: 0;
  border-radius: 0 0 8px 8px;
  background: var(--muted);
  box-shadow: var(--shadow-sm);
}
.doc--after .doc__bar { background: var(--brand-blue); }
.doc--after .doc__page { border-color: var(--brand-blue); }
.doc__caption { margin-top: 12px; font-size: 14px; line-height: 20px; color: var(--muted-foreground); }

/* Блоки: сверху 128; заголовок heading 1 40/40 и вводная 18/27, между ними 20, до содержимого 48. */
.section { padding: 128px var(--gutter) 0; }
.section__head { display: flex; flex-direction: column; align-items: center; gap: 20px; max-width: 1184px; margin: 0 auto 48px; text-align: center; }
.section__head h2 { font-size: 40px; line-height: 40px; letter-spacing: -1.5px; font-weight: 500; }
.section__head p { max-width: 720px; font-size: 18px; line-height: 27px; color: var(--muted-foreground); }

/* Как пользоваться: линия над шагами, 24; три колонки, между ними линии посередине просвета 48. */
.how { display: flex; flex-direction: column; gap: 24px; max-width: 1184px; margin: 0 auto; }
.how__line { height: 1px; background: var(--border); }
.how__steps { display: grid; grid-template-columns: 1fr 1px 1fr 1px 1fr; column-gap: 24px; }
.how__divider { background: var(--border); }
.how-step { display: flex; flex-direction: column; gap: 24px; }
/* Картинка шага — Site / Step: 362 × 284, радиус radius-3xl 22, рамка 1; кадрирование — как в макете, в процентах. */
.how-step__pic { position: relative; aspect-ratio: 362 / 284; overflow: hidden; border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow-sm); }
.how-step__pic--muted { background: var(--muted); }
.how-step__img { position: absolute; max-width: none; }
.how-step__img--1 { left: -55.51%; top: 0; width: 163.42%; height: 100%; }
.how-step__img--2a { left: 4.51%; top: 5.36%; width: 90.98%; height: 91.16%; }
.how-step__img--2b { left: 4.4%; top: 5.35%; width: 93.66%; height: 91.17%; }
.how-step__img--3 { left: -12.33%; top: 10.41%; width: 124.68%; height: 81.57%; }
.how-step__text { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.how-step__copy { display: flex; flex-direction: column; gap: 8px; }
/* heading 3: Geist Medium 22/26,4, трекинг −0,5; описание — paragraph/normal 16/24. */
.how-step h3 { font-size: 22px; line-height: 26.4px; letter-spacing: -0.5px; font-weight: 500; }
.how-step p { font-size: 16px; line-height: 24px; color: var(--muted-foreground); }

/* Темы — четыре колонки, 24; режимы картинок — три, 32. */
.cards { display: grid; align-items: start; max-width: 1184px; margin: 0 auto; }
.cards--themes { grid-template-columns: repeat(4, 1fr); gap: 24px; }
.cards--modes { grid-template-columns: repeat(3, 1fr); gap: 32px; }

/* FAQ — Card - Nova 896, фон muted, рамка, радиус radius-3xl 22, отступ 20/40; Line Accordion: строка 20,
   у раскрытого вопроса 12 до ответа, ответ 20 до линии; у последнего вопроса линии нет. Без скриптов — details. */
.faq { max-width: 896px; margin: 0 auto; padding: 20px 40px; border: 1px solid var(--border); border-radius: 22px; background: var(--muted); }
.faq details { border-bottom: 1px solid var(--border); }
.faq details:last-child { border-bottom: 0; }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
  list-style: none;
  cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; flex: none; width: 16px; height: 16px; background: url('home/chevron-down.svg') center / 16px 16px no-repeat; }
.faq details[open] summary { padding-bottom: 12px; }
.faq details[open] summary::after { background-image: url('home/chevron-up.svg'); }
.faq details p { padding-bottom: 20px; font-size: 16px; line-height: 24px; color: var(--muted-foreground); }

/* Подвал: сверху 128, снизу 48; бренд → описание 8 → ссылки 32 → линия 40 → копирайт 24. Линия — белый 30 %,
   правка владельца под синий фон. */
.site-footer { display: flex; flex-direction: column; align-items: center; gap: 40px; padding: 128px var(--gutter) 48px; }
.site-footer__top { display: flex; flex-direction: column; align-items: center; gap: 32px; }
.site-footer__brand { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.site-footer__brand p,
.site-footer__bottom p { font-size: 14px; line-height: 20px; color: var(--muted-foreground); }
.site-footer__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; }
.site-footer__bottom { width: 100%; max-width: 1184px; padding-top: 24px; border-top: 1px solid rgb(255 255 255 / 0.3); text-align: center; }

/* Узкие окна: мобильную версию отдельно не рисовали — решение владельца 20.10; колонки встают друг под друга. */
@media (max-width: 1280px) {
  .home { --gutter: 64px; }
}
@media (max-width: 1024px) {
  .compare { grid-template-columns: 1fr; max-width: 580px; }
  .how__steps { grid-template-columns: 1fr; row-gap: 48px; max-width: 560px; margin: 0 auto; }
  .how__divider { display: none; }
  .cards--themes { grid-template-columns: repeat(2, 1fr); }
  .cards--modes { grid-template-columns: 1fr; max-width: 560px; }
}
@media (max-width: 768px) {
  .home { --gutter: 20px; }
  .site-header { grid-template-columns: 1fr auto; }
  .site-nav { display: none; }
  .display { font-size: 40px; line-height: 46px; letter-spacing: -1px; }
  .display__break { display: none; }
  .hero__buttons { flex-direction: column; align-self: stretch; }
  .section { padding-top: 96px; }
  .section__head h2 { font-size: 32px; line-height: 36px; }
  .cards--themes { grid-template-columns: 1fr; max-width: 420px; }
  .faq { padding: 4px 20px; border-radius: 16px; }
  .site-footer { padding-top: 96px; }
}
