@font-face {
  font-family: "Google Sans";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/fonts/googlesans-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Google Sans";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/fonts/googlesans-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: "Google Sans";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/fonts/googlesans-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: "Google Sans";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/fonts/googlesans-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #030304;
  --panel: #0f1113;
  --panel-2: #16181c;
  --line: #24262a;
  --line-strong: #34363b;
  --ink: #ffffff;
  --muted: #a6a6a6;
  --dim: #74777c;
  --accent: #d1fe17;
  --accent-ink: #0a0c05;

  --sans: "Google Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --text-xs: 14px;
  --text-sm: 16px;
  --text-base: 18px;
  /* выше базового кегля шкала сдвинута на те же два шага: иначе абзацы
     статьи (они на --text-lg) оказались бы мельче основного текста */
  --text-lg: 20px;
  --text-xl: 26px;
  --text-2xl: 32px;
  --text-3xl: 40px;
  --text-4xl: 52px;

  --max: 1120px;
  --radius: 16px;
  --radius-sm: 11px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  /* тот же корневой кегль, что в приложении: общие rem-компоненты
     (переключатели, кнопки) считаются по одной шкале */
  font-size: 120%;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--text-base);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--ink);
  text-decoration: none;
  transition: color 0.2s ease;
}

/* Линия выезжает из центра — тот же приём, что у ссылки автора в подвале
   генератора. Подчёркивания нет, пока не навели. У карточек гайдов линии
   нет намеренно: там наведение показывает рамка и фон блока. */
.crumbs a,
.footer a,
.brand b {
  position: relative;
  display: inline-block;
}

.crumbs a::after,
.footer a::after,
.brand b::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: left 0.35s ease, width 0.35s ease;
  pointer-events: none;
}

.crumbs a:hover::after,
.footer a:hover::after,
.brand b:hover::after {
  left: 0;
  width: 100%;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

h1,
h2,
h3 {
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.015em;
  text-wrap: balance;
  margin: 0;
}

h1 {
  font-size: clamp(30px, 4.6vw, var(--text-4xl));
  letter-spacing: -0.02em;
  line-height: 1;
}

h2 {
  font-size: clamp(24px, 3vw, var(--text-3xl));
  line-height: 1.2;
}

h3 {
  font-size: var(--text-xl);
  line-height: 1.3;
}

p {
  margin: 0;
}

code {
  font-family: var(--mono);
  font-size: 0.92em;
  font-feature-settings: "ss11";
}

/* --- каркас --- */

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  z-index: 10;
}

.skip:focus {
  left: 16px;
  top: 16px;
}

.bar {
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 5;
}

.bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: var(--text-lg);
  letter-spacing: -0.01em;
}

.brand img {
  width: 26px;
  height: 26px;
}

.brand b {
  font-weight: 600;
}

.brand span {
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0;
  display: none;
}

@media (min-width: 720px) {
  .brand span {
    display: inline;
  }
}

/* Переключатель языка берётся из ds.css: .lang, .lang__item. */


/* --- шапка страницы --- */

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: var(--text-xs);
  color: var(--dim);
  padding: 22px 0 0;
}

.crumbs a {
  color: var(--muted);
  text-decoration: none;
}

/* цвет не меняем: как у ссылки автора в подвале сервиса, работает только линия */
.crumbs a:hover {
  color: var(--ink);
}

/* На узком экране прячем только хвост крошек — точку перед текущей
   страницей и длинный заголовок. Разделители между ссылками остаются. */
.crumbs__sep--tail,
.crumbs__current {
  display: none;
}

@media (min-width: 720px) {
  .crumbs__sep--tail,
  .crumbs__current {
    display: inline;
  }
}

/* Раскладка страницы: вводный блок и текст слева, код и кнопки справа.
   Правая колонка липкая, поэтому код и действия остаются на экране,
   пока читаешь статью. */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  grid-template-areas:
    "intro aside"
    "body  aside";
  column-gap: 56px;
  row-gap: 48px;
  align-items: start;
  padding: 28px 0 0;
}

.layout__intro {
  grid-area: intro;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.layout__aside {
  grid-area: aside;
  position: sticky;
  top: 84px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* статья занимает нижнюю строку первой колонки: липкая колонка тянется
   ровно до конца текста и отпускает на «Коротко о главном» */
.layout > .prose {
  grid-area: body;
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "intro"
      "aside"
      "body";
    row-gap: 20px;
    padding-top: 20px;
  }

  /* на телефоне липкость только мешает: карточка уходит вверх вместе с текстом */
  .layout__aside {
    position: static;
  }
}

/* --- карточка с кодом --- */

.card {
  margin: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.card__qr {
  background: #fff;
  border-radius: var(--radius-sm);
  padding: 14px;
}

.card__qr svg {
  width: 100%;
  height: auto;
}

.card__meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.card__label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--dim);
}

.card__value {
  display: block;
  font-family: var(--mono);
  font-size: var(--text-xs);
  line-height: 1.5;
  color: var(--ink);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  overflow-wrap: anywhere;
}

.card figcaption {
  font-size: var(--text-sm);
  color: var(--muted);
}

/* --- текст --- */

/* --- FAQ --- */

.faq {
  padding: 56px 0 0;
  border-top: 1px solid var(--line);
  margin-top: 56px;
}

.faq__grid {
  display: grid;
  gap: 28px;
  margin-top: 28px;
}

@media (min-width: 820px) {
  .faq__grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px 48px;
  }
}

.faq__item h3 {
  font-size: var(--text-lg);
  margin-bottom: 8px;
}

.faq__item p {
  color: var(--muted);
  font-size: var(--text-base);
}

/* --- другие гайды --- */

.hub {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  padding: 40px 0 8px;
}

.hub + .guides__list {
  margin-top: 32px;
}

/* В статье ровно три карточки — в две колонки третья висела бы одна,
   поэтому на широком экране они идут в ряд. В списке гайдов их четыре,
   там остаются две колонки. */
@media (min-width: 1000px) {
  .guides .guides__list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* li тянется на высоту строки, ссылка заполняет li — так карточки
   в одном ряду получают одинаковую высоту */
/* Рамка держит пропорцию и обрезает: при наведении картинка растёт
   внутри неё, а не вылезает за края карточки. */
/* --- подвал --- */

.footer {
  margin-top: 72px;
  border-top: 1px solid var(--line);
  padding: 28px 0 48px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
  align-items: baseline;
  color: var(--dim);
  font-size: var(--text-sm);
}

.footer p {
  max-width: 60ch;
}

/* --- финальный призыв --- */

/* Кнопки берутся из ds.css: .btn и .btn--primary, .btn--ghost. */

.cta-end {
  margin-top: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
}

/* в узкой колонке кнопки тянем на всю ширину, иначе они выглядят обрубками */
.layout__aside .btn {
  justify-content: center;
  width: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition-duration: 0.01ms !important;
  }

  .btn:hover {
    transform: none;
  }

  .guides__list a:hover .guides__frame img {
    transform: none;
  }
}

/* ---------- группы в списке гайдов ---------- */

/* карточка демо-штрихкода: полосы тянем по ширине */
.card__qr--barcode {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 12px 8px;
  background: #ffffff;
}

.card__qr--barcode svg {
  display: block;
  width: 100%;
  height: auto;
}

/* живой код на странице-гайде: canvas занимает место статического SVG */
.card__qr--live {
  padding: 0;
  background: transparent;
  border-radius: 0;
  /* код наклоняется к курсору и выходит за границы — не обрезаем */
  overflow: visible;
}

.card__qr--live .qr-canvas {
  position: relative;
  display: block;
  width: 100%;
  perspective: 900px;
}

.card__qr--live .qr-canvas__surface {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 12px;
  transform-origin: 50% 50%;
  background: #ffffff;
  cursor: crosshair;
  touch-action: manipulation;
  box-shadow: 0 18px 40px -28px rgba(0, 0, 0, 0.9);
}

/* заголовок и тег в одну строку: тег прижат вправо */
/* тег статьи вместо деления на разделы */
/* ---------- фильтр статей ---------- */

/* компонент берётся из ds.css целиком: .segmented, .segmented__item,
   .segmented__thumb. Здесь только отступ от шапки списка. */
.hub-filter {
  margin-top: 28px;
}

/* карточки при фильтрации не исчезают рывком */
@media (prefers-reduced-motion: reduce) {
  .guides__list > li {
    transition: none;
  }
}
