/* @forms/tokens — the only source of design tokens of Лёрнио Формы. Values are the current Learnio system as
   Лёрнио Встречи ship it (meet-prefs apps/web/src/styles/tokens.css): change them here and every screen, the
   respondent page and the marketing pages follow. Everything else references these variables only. */
:root {
  color-scheme: light dark;
  --bg: #f5f6fa;
  --bg-soft: #f5f6fa;
  --surface: #ffffff;
  /* Oblako surface-2: hover fill, chips, notices, wells. Cool neutral of the same family as the ground (#f5f6fa)
     and the lines (#e0e2ea), as Медиатека has it since 26.10 (it was a warm #efefec that read beige next to them). */
  --surface-2: #eef0f5;
  /* one step deeper: pressed fills, tracks, the tile under a person without camera */
  --surface-3: #e4e6ed;
  --tile: #eef0f5;
  --tile-hover: #e4e6ed;
  --border: #e0e2ea;
  --border-strong: #c9ccd6;
  /* edge of an empty field: 3:1 against the surface (WCAG 1.4.11), as in Медиатека */
  --field-border: #8e919d;
  --text: #090909;
  --muted: #5f6270;
  --ink: #090909;
  --brand: #0b0be4;
  --brand-hover: #0909c0;
  --brand-on: #ffffff;
  --brand-soft: color-mix(in srgb, #0b0be4 10%, #ffffff);
  /* blue used as text (links, selected labels): readable on both grounds */
  --brand-text: #0b0be4;
  --danger: #cf0000;
  --danger-soft: #fdecec;
  /* solid red under white text («Выйти», stop): the brand red in both themes */
  --danger-solid: #cf0000;
  --danger-solid-hover: #b00000;
  /* 5.8:1 on its soft fill (it was 4.4:1) */
  --ok: #116b33;
  --ok-soft: #e6f4ea;
  --warning: #a15c07;
  --warning-soft: #fdf3e1;
  --preview-bg: #161618;
  --preview-text: #f2f2f4;
  /* labels over video (names, share label, pager): a flat dark veil, no backdrop blur — blur over a playing
     video is recomputed every frame for every tile. 6:1 for white text even over a white frame. */
  --over-video: rgba(9, 9, 11, 0.64);
  --over-video-strong: rgba(9, 9, 11, 0.78);
  /* raised hand: the one warm signal of the call */
  --hand: #ffb020;
  --hand-ink: #090909;

  /* One spacing scale (Oblako 4 / 8 / 12 / 16 / 24 / 32): every gap between blocks comes from here. */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --gutter: var(--s-4);
  --block-gap: var(--s-5);

  /* Type (Oblako): 12 / 13 / 15 / 18 / 22, line height 1.45 */
  --text-xs: 12px;
  --text-sm: 13px;
  --text-md: 15px;
  --text-lg: 18px;
  --text-xl: 22px;
  --leading: 1.45;

  --radius-s: 12px;
  --radius-m: 20px;
  --radius-l: 26px;
  --radius-pill: 999px;
  /* cards are uniform 20 as in Oblako; panels and dialogs 26 */
  --radius-card: var(--radius-m);
  --radius-card-m: var(--radius-s);
  --control-h: 40px;
  --control-h-lg: 44px;
  /* Page grid of learnio.ru (theme learnio-blocks style.css: --content-width, --gutter, --section-gap): one
     1166 px content column for the top bar and every page screen, 20 px side gutters (16 on phones, as the home
     page has them), 32 px between sections. The call screen keeps its own --gutter. */
  --content-width: 1166px;
  --page-gutter: 20px;
  --section-gap: 32px;
  --topbar-h: 56px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-head: 'Artegra Sans Extended', 'Inter', system-ui, sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  /* Motion: four durations and four curves for every animation of the site; transform and opacity only.
     ease-out for things that arrive, ease-in for things that leave, spring for small marks and presses. */
  --dur-1: 0.1s;
  --dur-2: 0.15s;
  --dur-3: 0.32s;
  --dur-4: 0.22s;
  --spring: cubic-bezier(0.34, 1.4, 0.64, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in: cubic-bezier(0.55, 0, 1, 0.45);

  /* Depth: Oblako's three neutral shadows; no tinted glass, no glows. */
  --shadow-1: 0 1px 2px rgba(15, 20, 28, 0.06);
  --shadow-2: 0 4px 16px rgba(15, 20, 28, 0.1);
  --shadow-3: 0 12px 40px rgba(15, 20, 28, 0.18);
  --shadow: var(--shadow-2);
  --glass: color-mix(in srgb, var(--bg) 88%, transparent);
  --glass-strong: var(--surface);
  --glass-border: var(--border);
  --glass-blur: blur(8px);
  --glow-1: transparent;
  --glow-2: transparent;
  --ring: var(--brand);
  --focus: #0b0be4;
  --scrim: rgba(9, 9, 9, 0.45);
}

@media (min-width: 769px) {
  :root {
    --gutter: var(--s-5);
    --block-gap: var(--s-6);
  }
}

@media (max-width: 640px) {
  :root {
    --page-gutter: 16px;
  }
}

@media (pointer: coarse) {
  :root {
    --control-h: 44px;
  }
}

/* Themes (contract D24): public/theme-init.js (blocking, in the head) always sets html[data-theme] from the cookie
   learnio_theme, resolving «Как в системе» through the OS. The media block only covers a page without that
   script (dev galleries, JavaScript off). */
:root[data-theme='light'] {
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #0d0d0f;
    --bg-soft: #0d0d0f;
    --surface: #161618;
    --surface-2: #1f1f22;
    --surface-3: #2a2a2e;
    --tile: #1f1f22;
    --tile-hover: #2a2a2e;
    --border: #2a2a2e;
    --border-strong: #3a3a40;
    --field-border: #6e6f78;
    --text: #f2f2f4;
    --muted: #a2a3ad;
    --ink: #f5f6fa;
    --brand: #3d3df0;
    --brand-hover: #5252f5;
    --brand-soft: color-mix(in srgb, #3d3df0 22%, #161618);
    --brand-text: #9ea3ff;
    --danger: #f87171;
    --danger-soft: #331718;
    --ok: #4ade80;
    --ok-soft: #13291b;
    --warning: #f2b450;
    --warning-soft: #2e2311;
    --preview-bg: #0a0a0c;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-2: 0 4px 16px rgba(0, 0, 0, 0.45);
    --shadow-3: 0 12px 40px rgba(0, 0, 0, 0.55);
    --ring: #9ea3ff;
    --focus: #9ea3ff;
    --scrim: rgba(0, 0, 0, 0.6);
  }
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #0d0d0f;
  --bg-soft: #0d0d0f;
  --surface: #161618;
  --surface-2: #1f1f22;
  --surface-3: #2a2a2e;
  --tile: #1f1f22;
  --tile-hover: #2a2a2e;
  --border: #2a2a2e;
  --border-strong: #3a3a40;
  --field-border: #6e6f78;
  --text: #f2f2f4;
  --muted: #a2a3ad;
  --ink: #f5f6fa;
  --brand: #3d3df0;
  --brand-hover: #5252f5;
  --brand-soft: color-mix(in srgb, #3d3df0 22%, #161618);
  --brand-text: #9ea3ff;
  --danger: #f87171;
  --danger-soft: #331718;
  --ok: #4ade80;
  --ok-soft: #13291b;
  --warning: #f2b450;
  --warning-soft: #2e2311;
  --preview-bg: #0a0a0c;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-2: 0 4px 16px rgba(0, 0, 0, 0.45);
  --shadow-3: 0 12px 40px rgba(0, 0, 0, 0.55);
  --ring: #9ea3ff;
  --focus: #9ea3ff;
  --scrim: rgba(0, 0, 0, 0.6);
}

/*
 * Learnio / Udav brand kit v0.2 (Timur's guide, 2026-10-19/brand-kit): fonts and the «mark + capsule» lockup.
 */
/* Artegra Sans Extended (brand kit v0.2, udav.team/brand): Bold 700 for page H1, Medium 500 for product
   names typed in capsules. Subset: Latin, Latin-1, Cyrillic, UI punctuation, ₽ and arrows. The files report
   weight 400, so the weight is declared here. */
@font-face {
  font-family: 'Artegra Sans Extended';
  src: url('/assets/marketing/fonts/artegra-extended-700.woff2') format('woff2'), url('/assets/marketing/fonts/artegra-extended-700.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+0160-0161, U+0178, U+017D-017E, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0301, U+0304, U+0308, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2000-206F, U+20A0-20CF, U+2100-214F, U+2190-21FF, U+2212, U+2215, U+2219, U+221E, U+2248, U+2260, U+2264-2265, U+2713, U+FB01-FB02, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Artegra Sans Extended';
  src: url('/assets/marketing/fonts/artegra-extended-500.woff2') format('woff2'), url('/assets/marketing/fonts/artegra-extended-500.woff') format('woff');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+0160-0161, U+0178, U+017D-017E, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0301, U+0304, U+0308, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2000-206F, U+20A0-20CF, U+2100-214F, U+2190-21FF, U+2212, U+2215, U+2219, U+221E, U+2248, U+2260, U+2264-2265, U+2713, U+FB01-FB02, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  src: url('/assets/marketing/fonts/Inter-100_900.woff2') format('woff2-variations'), url('/assets/marketing/fonts/Inter-100_900.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html,
body,
#root {
  min-height: 100%;
}
body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--text-md);
  line-height: var(--leading);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1,
h2,
h3,
p {
  margin: 0;
}
/* Oblako type: Artegra Sans Extended Bold only for display headings (page h1); section, card and panel
   titles are Inter. */
h1 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}
h2,
h3 {
  font-family: var(--font);
  font-weight: 700;
  font-size: 17px;
  line-height: 1.3;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}
@media (max-width: 480px) {
  h1 {
    font-size: 20px;
  }
}
a {
  color: var(--brand-text);
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}
@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}
@keyframes pop-in {
  from {
    opacity: 0;
    transform: scale(0.6);
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0s !important;
  }
}

/* Mark «Л»: a mask, so it takes the text color and works on light and dark backgrounds. */
.b-mark {
  display: inline-block;
  flex: none;
  width: calc(var(--b-mark-h, 32px) * 123 / 90);
  height: var(--b-mark-h, 32px);
  background: currentColor;
  -webkit-mask: url('/assets/marketing/brand/mark-l.svg') no-repeat center / contain;
  mask: url('/assets/marketing/brand/mark-l.svg') no-repeat center / contain;
}

/* Лёрнио Формы — marketing pages (server HTML). Served after tokens.css, fonts.css, base.css and brand.css of
   @forms/tokens in one bundle (/assets/marketing/site.css); every colour, gap, radius, shadow and duration is a
   token. The display type scale of the landing (h1/h2/lead) lives here: the app's scale stops at 22 px.
   Composition: the hero sits on the page ground, the content «sheet» (surface) rises over the lower half of the
   hero demo, and the brand panel of the final CTA straddles the end of the sheet and the footer — no bare strips
   of background between blocks. */

:root {
  --m-h1: clamp(34px, 5.2vw, 62px);
  --m-h2: clamp(26px, 3.1vw, 40px);
  --m-h3: 18px;
  --m-lead: clamp(16px, 1.45vw, 19px);
  --m-body: 16px;
  --m-sec: var(--s-8);
  --m-overlap: 120px;
  --m-final-overlap: 96px;
}
@media (max-width: 768px) {
  :root {
    --m-sec: var(--s-7);
    --m-overlap: 72px;
    --m-final-overlap: 72px;
  }
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar-h) + var(--s-4));
  overscroll-behavior-y: none;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
body {
  font-size: var(--m-body);
  overscroll-behavior-y: none;
}
img,
svg {
  display: block;
}
.i {
  width: 20px;
  height: 20px;
  flex: none;
}
a {
  text-underline-offset: 3px;
}
.wrap {
  width: 100%;
  max-width: calc(var(--content-width) + 2 * var(--page-gutter));
  margin-inline: auto;
  padding-inline: var(--page-gutter);
}
.muted {
  color: var(--muted);
}
.center {
  display: flex;
  justify-content: center;
  margin-top: var(--s-6);
}
.skip {
  position: absolute;
  left: var(--s-4);
  top: -100px;
  z-index: 100;
  padding: var(--s-2) var(--s-4);
  border-radius: var(--radius-pill);
  background: var(--brand);
  color: var(--brand-on);
  font-weight: 600;
}
.skip:focus {
  top: var(--s-2);
}

/* ---------------------------------------------------------------- type */
.display {
  font-size: var(--m-h1);
  line-height: 1.04;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.h2 {
  font-size: var(--m-h2);
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.h3 {
  font-size: var(--m-h3);
  line-height: 1.3;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  margin-bottom: var(--s-3);
  color: var(--brand-text);
  font-size: var(--text-sm);
  font-weight: 600;
}
.eyebrow::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--brand);
}
.eyebrow--hero {
  font-size: var(--text-md);
}
.lead {
  margin-top: var(--s-4);
  max-width: 640px;
  color: var(--muted);
  font-size: var(--m-lead);
  line-height: 1.5;
  text-wrap: pretty;
}
.head {
  max-width: 760px;
  margin-bottom: var(--s-6);
}
.head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-5);
  margin-bottom: var(--s-6);
}
.head-row .head {
  margin-bottom: 0;
}
.head-row__link {
  flex: none;
  margin-bottom: var(--s-1);
}
@media (max-width: 640px) {
  .head-row {
    flex-direction: column;
    align-items: flex-start;
  }
}
.subhead {
  margin: var(--s-6) 0 var(--s-4);
  color: var(--muted);
  font-size: var(--text-md);
  font-weight: 600;
}
.subhead:first-child {
  margin-top: 0;
}
.req {
  color: var(--danger);
}

/* ---------------------------------------------------------------- controls */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  height: var(--control-h);
  max-width: 100%;
  padding: 0 var(--s-4);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--text);
  font-size: var(--text-md);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    background-color var(--dur-2) ease,
    border-color var(--dur-2) ease,
    color var(--dur-2) ease,
    transform var(--dur-1) ease;
}
.btn:active {
  transform: scale(0.98);
}
.btn--lg {
  height: 48px;
  padding: 0 var(--s-5);
}
.btn--sm {
  height: 32px;
  padding: 0 var(--s-3);
  font-size: var(--text-sm);
}
.btn--primary {
  border-color: var(--brand);
  background: var(--brand);
  color: var(--brand-on);
}
.btn--secondary {
  background: var(--surface);
}
.btn--ghost {
  border-color: transparent;
  background: transparent;
}
.btn--on-brand {
  border-color: var(--brand-on);
  background: var(--brand-on);
  color: var(--brand);
}
.btn--on-brand-ghost {
  border-color: color-mix(in srgb, var(--brand-on) 55%, transparent);
  background: transparent;
  color: var(--brand-on);
}
@media (hover: hover) {
  .btn--primary:hover {
    border-color: var(--brand-hover);
    background: var(--brand-hover);
  }
  .btn--secondary:hover {
    border-color: var(--field-border);
    background: var(--surface-2);
  }
  .btn--ghost:hover {
    background: var(--surface-2);
  }
  .btn--on-brand:hover {
    background: color-mix(in srgb, var(--brand-on) 88%, var(--brand));
  }
  .btn--on-brand-ghost:hover {
    border-color: var(--brand-on);
  }
}
.btn__arrow {
  width: 18px;
  height: 18px;
  transition: transform var(--dur-4) var(--spring);
}
@media (hover: hover) {
  :is(.btn, .link-arrow):hover .btn__arrow {
    transform: translateX(3px);
  }
}
.btn .i:not(.btn__arrow) {
  width: 18px;
  height: 18px;
}
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  min-height: 44px;
  color: var(--brand-text);
  font-weight: 600;
  text-decoration: none;
}
.link-arrow:hover {
  text-decoration: underline;
}
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-pill);
  color: var(--text);
  cursor: pointer;
}
@media (hover: hover) {
  .icon-btn:hover {
    background: var(--surface-2);
  }
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  height: 26px;
  max-width: 100%;
  padding: 0 var(--s-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--text);
  font-size: var(--text-xs);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chip .i {
  width: 14px;
  height: 14px;
}
.chip--muted {
  border-color: transparent;
  background: var(--surface-2);
  color: var(--muted);
}
.chip--brand {
  border-color: transparent;
  background: var(--brand);
  color: var(--brand-on);
}
.chip--field {
  border-color: transparent;
  background: var(--brand-soft);
  color: var(--brand-text);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
}
.badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 var(--s-2);
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 600;
  white-space: nowrap;
}
.badge--brand {
  background: var(--brand-soft);
  color: var(--brand-text);
}
.badge--ok {
  background: var(--ok-soft);
  color: var(--ok);
}
.badge--warn {
  background: var(--warning-soft);
  color: var(--warning);
}
.badge--plain {
  border: 1px dashed var(--border-strong);
  background: transparent;
}
.input {
  width: 100%;
  height: var(--control-h-lg);
  padding: 0 var(--s-4);
  border: 1px solid var(--field-border);
  border-radius: var(--radius-s);
  background: var(--surface);
  color: var(--text);
  font-size: var(--m-body);
}
.input::placeholder {
  color: var(--muted);
}
.input:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 0;
  border-color: var(--focus);
}

/* ---------------------------------------------------------------- header */
.top {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  background: var(--bg);
  transition: border-color var(--dur-3) ease;
}
.top[data-scrolled] {
  border-bottom-color: var(--border);
}
.top__in {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  height: var(--topbar-h);
}
.logo {
  --b-mark-h: 26px;
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  height: 44px;
  margin-left: calc(-1 * var(--s-2));
  padding: 0 var(--s-2);
  border-radius: var(--radius-s);
  color: var(--brand);
  text-decoration: none;
  flex: none;
}
:root[data-theme='dark'] .logo {
  color: var(--ink);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .logo {
    color: var(--ink);
  }
}
.logo__word {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 20px;
  line-height: 1;
  letter-spacing: -0.01em;
  transition: transform var(--dur-4) var(--spring);
}
.logo__mark {
  transition: transform var(--dur-4) var(--spring);
}
@media (hover: hover) {
  .logo:hover .logo__mark {
    transform: rotate(-6deg) scale(1.06);
  }
  .logo:hover .logo__word {
    transform: translateX(2px);
  }
}
.top__nav {
  display: flex;
  align-items: center;
  gap: var(--s-1);
  margin-left: var(--s-4);
}
.top__link {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 var(--s-3);
  border-radius: var(--radius-pill);
  color: var(--text);
  font-size: var(--text-md);
  font-weight: 500;
  text-decoration: none;
}
.top__link[aria-current='page'] {
  color: var(--brand-text);
}
@media (hover: hover) {
  .top__link:hover {
    background: var(--surface-2);
  }
}
.top__end {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  margin-left: auto;
}
.top__products {
  display: inline-flex;
  align-items: center;
  min-width: 44px;
  min-height: 44px;
}
.top__fallback {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 var(--s-3);
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
}
/* «Войти» and the avatar share one slot: swapping them never moves the CTA */
.top__account {
  display: inline-flex;
  justify-content: flex-end;
  min-width: 84px;
}
.top__avatar {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: var(--brand-soft);
  color: var(--brand-text);
  font-weight: 700;
  text-decoration: none;
}
.top__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.top__cta-short {
  display: none;
}
.menu {
  display: none;
  position: relative;
}
.menu__toggle {
  list-style: none;
}
.menu__toggle::-webkit-details-marker {
  display: none;
}
.menu__close {
  display: none;
}
.menu[open] .menu__open {
  display: none;
}
.menu[open] .menu__close {
  display: block;
}
.menu__panel {
  position: absolute;
  right: 0;
  top: calc(100% + var(--s-2));
  display: grid;
  gap: var(--s-1);
  width: min(300px, calc(100vw - 2 * var(--page-gutter)));
  padding: var(--s-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  background: var(--surface);
  box-shadow: var(--shadow-3);
  animation: rise-in var(--dur-4) var(--ease-out);
}
.menu__panel nav {
  display: grid;
}
.menu__link {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--s-3);
  border-radius: var(--radius-s);
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
}
.menu__link:hover {
  background: var(--surface-2);
}
.menu__signin {
  justify-content: flex-start;
  height: 44px;
  margin-top: var(--s-1);
  border-top: 1px solid var(--border);
  border-radius: 0 0 var(--radius-s) var(--radius-s);
  padding-top: var(--s-1);
}
@media (max-width: 1040px) {
  .top__nav {
    display: none;
  }
  .menu {
    display: block;
  }
}
@media (max-width: 640px) {
  .top__account {
    display: none;
  }
  .top__fallback {
    display: none;
  }
}
@media (max-width: 360px) {
  /* «Все продукты Лёрнио» stays in the menu */
  .top__products {
    display: none;
  }
  .top__end {
    gap: var(--s-1);
  }
}
@media (max-width: 400px) {
  .top__cta {
    padding: 0 var(--s-3);
  }
  .top__cta-long {
    display: none;
  }
  .top__cta-short {
    display: inline;
  }
}

/* ---------------------------------------------------------------- hero */
.hero {
  padding-top: var(--s-7);
}
.hero__text {
  max-width: 1000px;
}
.hero__lead {
  margin-top: var(--s-5);
  max-width: 700px;
  color: var(--muted);
  font-size: var(--m-lead);
  line-height: 1.5;
  text-wrap: pretty;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin-top: var(--s-6);
}
.hero__note {
  margin-top: var(--s-3);
  color: var(--muted);
  font-size: var(--text-sm);
}
.hero--inner {
  padding-bottom: var(--s-7);
}
/* inner pages have no demo crossing into the sheet: it starts right under the hero */
.hero--inner + .sheet {
  padding-top: var(--s-2);
}
.hero--inner .display {
  font-size: clamp(30px, 4.4vw, 52px);
}
.facts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  margin: var(--s-5) 0 0;
  padding: 0;
  list-style: none;
}
.facts .chip {
  height: 30px;
  padding: 0 var(--s-3);
  font-size: var(--text-sm);
}
@media (max-width: 480px) {
  .hero {
    padding-top: var(--s-6);
  }
  .hero__actions .btn {
    flex: 1 1 100%;
  }
}

/* hero demo: one frame of real interface pieces (builder, respondent phone, results) */
.hd-wrap {
  position: relative;
  z-index: 2;
  margin-top: var(--s-7);
  margin-bottom: calc(-1 * var(--m-overlap));
}
.hd {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) 180px minmax(0, 1fr);
  align-items: center;
  gap: 0;
  font-size: var(--text-sm);
}
.hd-builder,
.hd-results {
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  background: var(--surface);
  box-shadow: var(--shadow-2);
}
.hd-builder {
  min-height: 340px;
  padding: var(--s-4) calc(var(--s-6) + var(--s-4)) var(--s-4) var(--s-4);
}
.hd-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding-bottom: var(--s-3);
  border-bottom: 1px solid var(--border);
}
.hd-tabs {
  display: flex;
  gap: var(--s-1);
  min-width: 0;
  overflow: hidden;
}
.hd-tabs span {
  padding: var(--s-1) var(--s-3);
  border-radius: var(--radius-pill);
  color: var(--muted);
  font-weight: 500;
  white-space: nowrap;
}
.hd-tabs .is-on {
  background: var(--brand-soft);
  color: var(--brand-text);
}
.hd-saved {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  flex: none;
  color: var(--muted);
  font-size: var(--text-xs);
}
.hd-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--ok);
}
.hd-doc {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s-2);
  padding: var(--s-4) var(--s-1) 0;
}
.hd-title {
  margin-bottom: var(--s-1);
  font-weight: 700;
  font-size: var(--text-lg);
}
.hd-q {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  min-height: 52px;
  padding: var(--s-2) var(--s-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  background: var(--surface);
  transition:
    opacity var(--dur-3) var(--ease-out),
    transform var(--dur-3) var(--ease-out),
    border-color var(--dur-3) ease;
}
.hd-q1 {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.hd-q__n {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: none;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 700;
}
.hd-q__t {
  flex: 1;
  min-width: 0;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hd-add {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  min-height: 40px;
  color: var(--brand-text);
  font-weight: 600;
}
.hd-add .i {
  width: 16px;
  height: 16px;
}
.hd-phone {
  position: relative;
  z-index: 2;
  max-width: 248px;
  justify-self: center;
  margin-inline: calc(-1 * var(--s-6));
  width: calc(100% + 2 * var(--s-6));
  aspect-ratio: 230 / 440;
  padding: 10px;
  border-radius: 38px;
  background: var(--ink);
  box-shadow: var(--shadow-3);
}
.hd-screen {
  position: relative;
  display: grid;
  height: 100%;
  overflow: hidden;
  border-radius: 29px;
  background: var(--surface);
}
.hd-form,
.hd-thanks {
  grid-area: 1 / 1;
  transition:
    opacity var(--dur-3) var(--ease-out),
    transform var(--dur-3) var(--ease-out);
}
.hd-form {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  padding: var(--s-6) var(--s-4) var(--s-4);
  font-size: var(--text-xs);
}
.hd-ftitle {
  margin-bottom: var(--s-2);
  font-weight: 700;
  font-size: var(--text-md);
  line-height: 1.25;
}
.hd-fq {
  font-weight: 600;
}
.hd-scale {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--s-1);
  margin-bottom: var(--s-2);
}
.hd-scale span {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border: 1px solid var(--field-border);
  border-radius: var(--radius-pill);
  font-weight: 600;
  transition:
    background-color var(--dur-3) ease,
    color var(--dur-3) ease,
    border-color var(--dur-3) ease,
    transform var(--dur-3) var(--spring);
}
.hd-scale .hd-pick {
  border-color: var(--brand);
  background: var(--brand);
  color: var(--brand-on);
}
.hd-field {
  min-height: 52px;
  padding: var(--s-2);
  border: 1px solid var(--field-border);
  border-radius: var(--radius-s);
  color: var(--text);
}
.hd-typed {
  transition: opacity var(--dur-3) ease;
}
.hd-send {
  display: grid;
  place-items: center;
  height: 36px;
  margin-top: auto;
  border-radius: var(--radius-pill);
  background: var(--brand);
  color: var(--brand-on);
  font-weight: 600;
  transition: transform var(--dur-2) var(--spring);
}
.hd-thanks {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s-3);
  padding: var(--s-4);
  text-align: center;
  font-weight: 600;
  opacity: 0;
  transform: scale(0.96);
}
.hd-thanks__icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-pill);
  background: var(--ok-soft);
  color: var(--ok);
}
.hd-results {
  min-height: 300px;
  padding: var(--s-4) var(--s-4) var(--s-4) calc(var(--s-5) + var(--s-4));
}
.hd-rhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
}
.hd-kpi {
  display: flex;
  align-items: baseline;
  gap: var(--s-2);
  margin: var(--s-3) 0 var(--s-4);
}
.hd-num {
  display: inline-grid;
  /* the old count rolls out of a window instead of showing through the new one */
  overflow: hidden;
  font-weight: 700;
  font-size: 34px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.hd-num > span {
  grid-area: 1 / 1;
  transition:
    opacity var(--dur-3) var(--ease-out),
    transform var(--dur-3) var(--ease-out);
}
.hd-num__a {
  opacity: 0;
  transform: translateY(-8px);
}
.hd-kpi__l {
  color: var(--muted);
}
.hd-bars {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: end;
  gap: var(--s-2);
  height: 132px;
}
.hd-col {
  display: grid;
  grid-template-rows: 1fr auto;
  height: 100%;
  gap: var(--s-1);
}
.hd-colbar {
  align-self: end;
  height: var(--h);
  border-radius: 8px 8px 4px 4px;
  background: color-mix(in srgb, var(--brand) 24%, var(--surface));
  transform-origin: bottom;
  transition:
    transform var(--dur-3) var(--ease-out),
    background-color var(--dur-3) ease;
}
.hd-coln {
  color: var(--muted);
  text-align: center;
  font-size: var(--text-xs);
}
.hd-col--1 {
  --h: 10%;
}
.hd-col--2 {
  --h: 22%;
}
.hd-col--3 {
  --h: 44%;
}
.hd-col--4 {
  --h: 100%;
}
.hd-col--5 {
  --h: 78%;
}
.hd-col--grow .hd-colbar {
  background: var(--brand);
}
.hd-cap {
  margin-top: var(--s-3);
  color: var(--muted);
  font-size: var(--text-xs);
}

/* live states (hero-demo.js sets .is-live and adds step classes; without it the frame above is what shows) */
.hd.is-live .hd-q {
  opacity: 0;
  transform: translateY(8px);
}
.hd.is-live.s-q1 .hd-q1,
.hd.is-live.s-q2 .hd-q2,
.hd.is-live.s-q3 .hd-q3 {
  opacity: 1;
  transform: none;
}
.hd.is-live .hd-q1 {
  border-color: var(--border);
  box-shadow: none;
}
.hd.is-live.s-q1:not(.s-q2) .hd-q1,
.hd.is-live.s-q2:not(.s-q3) .hd-q2,
.hd.is-live.s-q3:not(.s-pick) .hd-q3 {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.hd.is-live .hd-scale .hd-pick {
  border-color: var(--field-border);
  background: transparent;
  color: var(--text);
}
.hd.is-live.s-pick .hd-scale .hd-pick {
  border-color: var(--brand);
  background: var(--brand);
  color: var(--brand-on);
  transform: scale(1.08);
}
.hd.is-live .hd-typed {
  opacity: 0;
}
.hd.is-live.s-type .hd-typed {
  opacity: 1;
}
.hd.is-live.s-send .hd-send {
  transform: scale(0.94);
}
.hd.is-live.s-thanks .hd-form {
  opacity: 0;
  transform: translateY(-8px);
}
.hd.is-live.s-thanks .hd-thanks {
  opacity: 1;
  transform: none;
}
.hd.is-live .hd-num__a {
  opacity: 1;
  transform: none;
}
.hd.is-live .hd-num__b {
  opacity: 0;
  transform: translateY(8px);
}
.hd.is-live.s-grow .hd-num__a {
  opacity: 0;
  transform: translateY(-8px);
}
.hd.is-live.s-grow .hd-num__b {
  opacity: 1;
  transform: none;
}
.hd.is-live .hd-col--grow .hd-colbar {
  transform: scaleY(0.88);
  background: color-mix(in srgb, var(--brand) 24%, var(--surface));
}
.hd.is-live.s-grow .hd-col--grow .hd-colbar {
  transform: none;
  background: var(--brand);
}

@media (max-width: 960px) {
  .hd {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: start;
  }
  .hd-builder {
    grid-column: 1 / -1;
    min-height: 0;
    padding-right: var(--s-4);
    /* the phone rises into this space, not over the questions */
    padding-bottom: calc(var(--s-7) + var(--s-3));
  }
  .hd-phone {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
    max-width: 220px;
    margin: calc(-1 * var(--s-7)) 0 0;
    justify-self: end;
  }
  .hd-results {
    grid-column: 2;
    grid-row: 2;
    align-self: center;
    min-height: 0;
    margin-top: var(--s-5);
    margin-left: calc(-1 * var(--s-5));
    padding-left: calc(var(--s-5) + var(--s-3));
  }
}
@media (max-width: 560px) {
  .hd-tab-x {
    display: none;
  }
  /* on a phone the tabs keep the row: «Сохранено» shrinks to its green dot */
  .hd-saved__t {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .hd-builder {
    /* keep the room the phone rises into: it must never cover «Добавить вопрос» */
    padding: var(--s-3) var(--s-3) calc(var(--s-7) + var(--s-3));
  }
  .hd-q {
    min-height: 46px;
  }
  .hd-q .chip {
    display: none;
  }
  .hd-phone {
    max-width: 168px;
    padding: 7px;
    border-radius: 30px;
  }
  .hd-screen {
    border-radius: 23px;
  }
  .hd-form {
    gap: 6px;
    padding: var(--s-5) var(--s-3) var(--s-3);
    font-size: 10px;
  }
  .hd-ftitle {
    font-size: var(--text-sm);
  }
  .hd-field {
    min-height: 36px;
    padding: 6px;
  }
  .hd-send {
    height: 28px;
  }
  .hd-results {
    margin-left: calc(-1 * var(--s-6));
    padding: var(--s-3) var(--s-3) var(--s-3) calc(var(--s-6) + var(--s-2));
  }
  .hd-num {
    font-size: 26px;
  }
  .hd-kpi {
    flex-direction: column;
    gap: var(--s-1);
    margin: var(--s-2) 0 var(--s-3);
  }
  .hd-kpi__l {
    font-size: var(--text-xs);
  }
  .hd-bars {
    height: 92px;
    gap: var(--s-1);
  }
}

/* ---------------------------------------------------------------- sheet and sections */
.sheet {
  position: relative;
  z-index: 1;
  padding-top: var(--m-overlap);
  padding-bottom: calc(var(--m-final-overlap) + var(--m-sec));
  border-radius: var(--radius-l) var(--radius-l) 0 0;
  background: var(--surface);
}
.hero + .sheet {
  margin-top: 0;
}
.sheet--end {
  padding-bottom: var(--m-sec);
}
.sec {
  padding-top: var(--m-sec);
}
.sec--first {
  padding-top: var(--s-7);
}
.hero--inner + .sheet .sec--first {
  padding-top: var(--s-6);
}
.sec--tight {
  padding-top: var(--s-6);
}
.band {
  padding: var(--s-7) var(--s-6);
  border-radius: var(--radius-l);
  background: var(--bg);
}
@media (max-width: 640px) {
  /* the band keeps the page's 16 px gutter like every other card of the page */
  .band {
    padding: var(--s-6) var(--s-4);
  }
}
.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: var(--s-7);
}
.split--reverse .split__text {
  order: 2;
}
.split--top {
  align-items: start;
}
.split .head {
  margin-bottom: var(--s-5);
}
@media (max-width: 900px) {
  .split {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-6);
  }
  .split--reverse .split__text {
    order: 0;
  }
}
.problem {
  font-size: var(--m-lead);
  line-height: 1.55;
  text-wrap: pretty;
}

/* points with check marks */
.points {
  display: grid;
  gap: var(--s-4);
  margin: 0;
  padding: 0;
  list-style: none;
}
.points li {
  display: flex;
  gap: var(--s-3);
  line-height: 1.5;
}
.points strong {
  font-weight: 600;
}
.points__mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: var(--radius-pill);
  background: var(--brand-soft);
  color: var(--brand-text);
}
.points__mark .i {
  width: 16px;
  height: 16px;
}

/* modes */
.modes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-4);
}
.mode {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  padding: var(--s-6);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  background: var(--surface);
}
.mode p {
  color: var(--muted);
}
.mode .link-arrow {
  margin-top: auto;
  padding-top: var(--s-2);
}
.mode__icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: var(--s-2);
  border-radius: var(--radius-s);
  background: var(--brand-soft);
  color: var(--brand-text);
}
.mode__icon .i {
  width: 24px;
  height: 24px;
}
.mode__kicker {
  color: var(--brand-text) !important;
  font-size: var(--text-sm);
  font-weight: 600;
}
.mode__title {
  font-family: var(--font-head);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.1;
}
@media (max-width: 720px) {
  .modes {
    grid-template-columns: minmax(0, 1fr);
  }
  .mode {
    padding: var(--s-5);
  }
}

/* benefits strip */
.benefits {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.benefit {
  padding: var(--s-5) var(--s-5) var(--s-5) 0;
}
.benefit + .benefit {
  padding-left: var(--s-5);
  border-left: 1px solid var(--border);
}
.benefit p {
  margin-top: var(--s-1);
  color: var(--muted);
  font-size: var(--text-md);
}
@media (max-width: 900px) {
  .benefits {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .benefit:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }
  .benefit:nth-child(n + 3) {
    border-top: 1px solid var(--border);
  }
}
@media (max-width: 480px) {
  .benefits {
    grid-template-columns: minmax(0, 1fr);
  }
  .benefit,
  .benefit + .benefit {
    padding: var(--s-4) 0;
    border-left: 0;
  }
  .benefit + .benefit {
    border-top: 1px solid var(--border);
  }
}

/* bento: one grid, two card sizes */
.bento {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-4);
}
.bento__card {
  display: flex;
  flex-direction: column;
  min-height: 264px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  background: var(--bg);
}
.bento__card--wide {
  grid-column: span 2;
}
.bento__visual {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--s-3);
  flex: 1;
  min-height: 120px;
  padding: var(--s-5) var(--s-5) 0;
}
.bento__body {
  padding: var(--s-4) var(--s-5) var(--s-5);
}
.bento__body .h3 {
  display: flex;
  align-items: center;
  gap: var(--s-2);
}
.bento__body p {
  margin-top: var(--s-1);
  color: var(--muted);
}
.bento__icon {
  color: var(--brand-text);
}
@media (max-width: 900px) {
  .bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .bento {
    grid-template-columns: minmax(0, 1fr);
  }
  .bento__card--wide {
    grid-column: auto;
  }
  .bento__card {
    min-height: 0;
  }
}
.bento__card--types .chip:nth-child(n + 15) {
  display: none;
}
.rule {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  background: var(--surface);
}
.rule__w {
  color: var(--muted);
  font-size: var(--text-sm);
}
.rule__arrow .i {
  width: 16px;
  height: 16px;
  color: var(--muted);
}
.swatches,
.radii {
  display: flex;
  gap: var(--s-2);
}
.sw {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  border: 3px solid var(--surface);
  box-shadow: 0 0 0 1px var(--border);
}
.sw--brand {
  background: var(--brand);
  box-shadow: 0 0 0 2px var(--brand);
}
.sw--ink {
  background: var(--ink);
}
.sw--ok {
  background: var(--ok);
}
.sw--warn {
  background: var(--warning);
}
.sw--danger {
  background: var(--danger);
}
.rd {
  width: 52px;
  height: 36px;
  border: 1.5px solid var(--field-border);
  background: var(--surface);
}
.rd--s {
  border-radius: 6px;
}
.rd--m {
  border-radius: var(--radius-s);
}
.rd--l {
  border-radius: var(--radius-m);
}
.seg {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-1);
  padding: var(--s-1);
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  align-self: flex-start;
}
.seg__i {
  padding: var(--s-2) var(--s-3);
  border-radius: var(--radius-pill);
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 500;
}
.seg__i.is-on {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-1);
}
.mini-table {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  background: var(--surface);
  font-size: var(--text-sm);
}
.mt-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1.4fr;
  padding: var(--s-2) var(--s-3);
}
.mt-row + .mt-row {
  border-top: 1px solid var(--border);
}
.mt-head {
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 600;
}
.mt-export {
  display: flex;
  gap: var(--s-2);
  padding: var(--s-2) var(--s-3);
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.notice {
  display: flex;
  gap: var(--s-2);
  padding: var(--s-3);
  border-radius: var(--radius-s);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: var(--text-sm);
  line-height: 1.45;
}
.notice .i {
  color: var(--brand-text);
}
.linkbox {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2);
  padding: var(--s-1) var(--s-1) var(--s-1) var(--s-3);
  border: 1px solid var(--field-border);
  border-radius: var(--radius-pill);
  background: var(--surface);
  font-size: var(--text-sm);
}
.linkbox__url {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.linkbox .chip {
  height: 30px;
  padding: 0 var(--s-3);
}
.vers {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s-3);
}
.vers__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-3);
}
.vers__btn {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 var(--s-4);
  border-radius: var(--radius-pill);
  background: var(--brand);
  color: var(--brand-on);
  font-size: var(--text-sm);
  font-weight: 600;
}
.vers__list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-4);
  color: var(--muted);
  font-size: var(--text-sm);
}
.vers__list span:first-child {
  color: var(--text);
  font-weight: 500;
}

/* «interface» panels of the builder, analytics and test sections */
.ui {
  position: relative;
  padding: var(--s-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  background: var(--surface);
  box-shadow: var(--shadow-2);
  font-size: var(--text-sm);
}
.ui__bar {
  margin: calc(-1 * var(--s-4)) calc(-1 * var(--s-4)) var(--s-4);
  padding: var(--s-3) var(--s-4);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.ui__tabs {
  display: flex;
  gap: var(--s-1);
}
.ui__tabs span {
  padding: var(--s-1) var(--s-3);
  border-radius: var(--radius-pill);
  color: var(--muted);
  white-space: nowrap;
}
.ui__tabs .is-on {
  background: var(--brand-soft);
  color: var(--brand-text);
  font-weight: 600;
}
.ui__body {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: var(--s-4);
}
.ui__palette {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: var(--s-1);
}
.ui__cat {
  margin-top: var(--s-2);
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 600;
}
.ui__cat:first-child {
  margin-top: 0;
}
.ui__block {
  padding: 6px var(--s-2);
  border-radius: 8px;
  background: var(--surface-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ui__canvas {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: var(--s-2);
  padding: var(--s-3);
  border-radius: var(--radius-m);
  background: var(--bg);
}
.ui__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  margin-bottom: var(--s-2);
}
.ui__formtitle {
  min-width: 0;
  font-weight: 700;
  font-size: var(--text-md);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ui__q {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2) var(--s-3);
  padding: var(--s-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  background: var(--surface);
}
.ui__q.is-sel {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.ui__q.is-drag {
  box-shadow: var(--shadow-2);
  transform: rotate(-1deg) translateX(6px);
}
.ui__grip {
  width: 10px;
  height: 16px;
  flex: none;
  background: radial-gradient(circle, var(--field-border) 1.4px, transparent 1.6px) 0 0 / 5px 5px;
}
.ui__qt {
  flex: 1;
  min-width: 0;
  font-weight: 500;
}
.ui__opts,
.ui__req {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-4);
  width: 100%;
  padding-left: calc(10px + var(--s-3));
  color: var(--muted);
}
.ui__opt {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
}
.ui__radio {
  width: 14px;
  height: 14px;
  border: 1.5px solid var(--field-border);
  border-radius: var(--radius-pill);
}
.ui__req {
  align-items: center;
  gap: var(--s-2);
  padding-top: var(--s-2);
  border-top: 1px solid var(--border);
}
.ui__switch {
  position: relative;
  width: 30px;
  height: 18px;
  border-radius: var(--radius-pill);
  background: var(--brand);
}
.ui__switch::after {
  content: '';
  position: absolute;
  right: 2px;
  top: 2px;
  width: 14px;
  height: 14px;
  border-radius: var(--radius-pill);
  background: var(--brand-on);
}
.ui__hint {
  display: flex;
  align-items: center;
  gap: var(--s-1);
  margin-top: var(--s-1);
  color: var(--muted);
  font-size: var(--text-xs);
}
.kbd {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 22px;
  padding: 0 6px;
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
}
@media (max-width: 560px) {
  .ui__body {
    grid-template-columns: minmax(0, 1fr);
  }
  .ui__palette {
    display: none;
  }
}
.kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s-2);
}
.kpi {
  display: grid;
  gap: 2px;
  padding: var(--s-3);
  border-radius: var(--radius-s);
  background: var(--bg);
}
.kpi__v {
  font-weight: 700;
  font-size: 22px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.kpi__l {
  color: var(--muted);
  font-size: var(--text-xs);
}
@media (max-width: 480px) {
  .kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.funnel {
  display: grid;
  gap: 6px;
  margin: var(--s-4) 0;
}
.funnel__bar {
  height: 10px;
  border-radius: var(--radius-pill);
  background: var(--brand);
}
.funnel__bar--1 {
  width: 100%;
  background: color-mix(in srgb, var(--brand) 22%, var(--surface));
}
.funnel__bar--2 {
  width: 61%;
  background: color-mix(in srgb, var(--brand) 55%, var(--surface));
}
.funnel__bar--3 {
  width: 53%;
}
.qstat {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s-2);
  padding: var(--s-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
}
.qstat__t {
  font-weight: 600;
}
.qrow {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) 40px;
  align-items: center;
  gap: var(--s-2);
}
.qrow__l {
  color: var(--muted);
}
.qrow__track {
  height: 12px;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
}
.qrow__fill {
  display: block;
  height: 100%;
  border-radius: var(--radius-pill);
  background: var(--brand);
}
.qrow__fill--46 {
  width: 46%;
}
.qrow__fill--32 {
  width: 32%;
}
.qrow__fill--14 {
  width: 14%;
}
.qrow__fill--8 {
  width: 8%;
}
.qrow__p {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.qstat__chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  margin-top: var(--s-1);
}
.score {
  display: grid;
  gap: var(--s-1);
  margin: var(--s-2) 0 var(--s-4);
}
.score__v {
  font-weight: 700;
  font-size: 40px;
  line-height: 1;
}
.score__of {
  color: var(--muted);
  font-size: 20px;
  font-weight: 600;
}
.score__l {
  color: var(--ok);
  font-weight: 600;
}
.score__track {
  position: relative;
  height: 10px;
  margin-top: var(--s-2);
  border-radius: var(--radius-pill);
  background: var(--surface-2);
}
.score__fill {
  position: absolute;
  inset: 0 14% 0 0;
  border-radius: var(--radius-pill);
  background: var(--ok);
}
.score__pass {
  position: absolute;
  top: -4px;
  bottom: -4px;
  left: 60%;
  width: 2px;
  background: var(--text);
}
.score__cap {
  color: var(--muted);
  font-size: var(--text-xs);
}
.journal {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
}
.jr {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.8fr;
  gap: var(--s-2);
  padding: var(--s-2) var(--s-3);
}
.jr + .jr {
  border-top: 1px solid var(--border);
}
.jr--head {
  background: var(--bg);
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 600;
}
.ui__demo {
  position: absolute;
  right: var(--s-4);
  bottom: calc(-1 * var(--s-3));
  border: 1px solid var(--border);
}
.ui--test .ui__meta .chip {
  color: var(--warning);
}

.grid3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-4);
  margin: var(--s-6) 0 0;
  padding: 0;
  list-style: none;
}
.tile {
  padding: var(--s-5);
  border-radius: var(--radius-m);
  background: var(--surface);
}
.tile p {
  margin-top: var(--s-1);
  color: var(--muted);
}
@media (max-width: 900px) {
  .grid3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 560px) {
  .grid3 {
    grid-template-columns: minmax(0, 1fr);
  }
}
.honest {
  display: flex;
  gap: var(--s-3);
  margin-top: var(--s-5);
  padding: var(--s-4) var(--s-5);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  background: var(--surface);
  line-height: 1.5;
}
.honest .i {
  margin-top: 2px;
  color: var(--brand-text);
}

/* integrations */
.integs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s-4);
  margin: 0;
  padding: 0;
  list-style: none;
}
.integs--later {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.integ {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s-2);
  padding: var(--s-5);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  background: var(--surface);
}
.integ p {
  color: var(--muted);
}
.integ .h3 a {
  color: inherit;
  text-decoration: none;
}
.integ .h3 a:hover {
  color: var(--brand-text);
  text-decoration: underline;
}
.integ--stage2,
.integ--stage3 {
  border-style: dashed;
  background: var(--bg);
}
@media (max-width: 1040px) {
  .integs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .integs--later {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 560px) {
  .integs,
  .integs--later {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* template cards */
.tcards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-4);
  margin: 0;
  padding: 0;
  list-style: none;
}
.tcard[hidden] {
  display: none;
}
.tcard__link {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  height: 100%;
  padding: var(--s-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition:
    border-color var(--dur-2) ease,
    box-shadow var(--dur-3) var(--ease-out),
    transform var(--dur-3) var(--ease-out);
}
@media (hover: hover) {
  .tcard__link:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-2);
    transform: translateY(-2px);
  }
  .tcard__link:hover .tcard__title {
    color: var(--brand-text);
  }
}
.tcard__preview {
  display: grid;
  gap: 6px;
  min-height: 118px;
  margin-bottom: var(--s-2);
  padding: var(--s-3);
  border-radius: var(--radius-s);
  background: var(--bg);
  font-size: var(--text-sm);
}
.tcard__q {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  min-width: 0;
  padding: 6px var(--s-2);
  border-radius: 8px;
  background: var(--surface);
}
/* the ellipsis needs a text box of its own: a flex row never shows one for a bare text node */
.tcard__qt {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tcard__qn {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  flex: none;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.tcard__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-1) var(--s-3);
  color: var(--muted);
  font-size: var(--text-sm);
}
.tcard__title {
  font-family: var(--font);
  font-size: var(--m-h3);
  font-weight: 700;
  line-height: 1.3;
  transition: color var(--dur-2) ease;
}
.tcard__text {
  color: var(--muted);
  font-size: var(--text-md);
}
@media (max-width: 960px) {
  .tcards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .tcards {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* audiences */
.auds {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--s-4);
  margin: 0;
  padding: 0;
  list-style: none;
}
.aud {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  padding: var(--s-5);
  border-radius: var(--radius-m);
  background: var(--bg);
}
.aud__p {
  color: var(--muted);
}
.aud__r {
  display: flex;
  gap: var(--s-2);
  font-weight: 500;
}
.aud__r .i {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  color: var(--ok);
}
.aud .link-arrow {
  margin-top: auto;
}
@media (max-width: 1100px) {
  .auds {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 720px) {
  .auds {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 480px) {
  .auds {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* steps */
.steps {
  display: grid;
  grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr));
  gap: var(--s-4);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}
.steps:has(> :nth-child(4)) {
  --cols: 4;
}
.step {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  padding: var(--s-5);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
}
.step p {
  color: var(--muted);
}
.step__n {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: var(--s-2);
  border-radius: var(--radius-pill);
  background: var(--brand);
  color: var(--brand-on);
  font-family: var(--font-head);
  font-weight: 700;
}
@media (max-width: 960px) {
  .steps:has(> :nth-child(4)) {
    --cols: 2;
  }
}
@media (max-width: 720px) {
  .steps {
    --cols: 1;
  }
  .steps:has(> :nth-child(4)) {
    --cols: 1;
  }
}

/* demo questionnaire: form and result share one cell, the cell keeps the size of the form */
.band--demo .split {
  align-items: start;
}
.demo {
  padding: var(--s-5);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  background: var(--surface);
  box-shadow: var(--shadow-2);
}
.demo__stage {
  display: grid;
}
.demo__form,
.demo__done {
  grid-area: 1 / 1;
  transition:
    opacity var(--dur-3) var(--ease-out),
    transform var(--dur-3) var(--ease-out),
    visibility var(--dur-3);
}
.demo__form {
  display: grid;
  gap: var(--s-4);
}
.demo__done {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s-3);
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
}
.demo[data-state='done'] .demo__form {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
}
.demo[data-state='done'] .demo__done {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.dq {
  display: grid;
  gap: var(--s-2);
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.dq__t {
  padding: 0;
  font-weight: 600;
}
.dq__err {
  min-height: 1.45em;
  color: var(--danger);
  font-size: var(--text-sm);
}
.rating {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--s-2);
}
.rating__i,
.opt {
  position: relative;
  cursor: pointer;
}
.rating__i input,
.opt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.rating__i span {
  display: grid;
  place-items: center;
  height: 48px;
  border: 1px solid var(--field-border);
  border-radius: var(--radius-s);
  font-weight: 600;
  transition:
    background-color var(--dur-2) ease,
    border-color var(--dur-2) ease,
    color var(--dur-2) ease,
    transform var(--dur-2) var(--spring);
}
.rating__i input:checked + span {
  border-color: var(--brand);
  background: var(--brand);
  color: var(--brand-on);
  transform: scale(1.04);
}
.rating__legend {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: var(--text-xs);
}
.opts {
  display: grid;
  gap: var(--s-2);
}
.opts--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 400px) {
  .opts--2 {
    grid-template-columns: minmax(0, 1fr);
  }
}
.opt span {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  min-height: 44px;
  padding: var(--s-2) var(--s-3);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-s);
  transition:
    border-color var(--dur-2) ease,
    background-color var(--dur-2) ease;
}
.opt span::before {
  content: '';
  width: 18px;
  height: 18px;
  flex: none;
  border: 1.5px solid var(--field-border);
  border-radius: var(--radius-pill);
  background: var(--surface);
  transition:
    border-width var(--dur-2) var(--spring),
    border-color var(--dur-2) ease;
}
.opt input[type='checkbox'] + span::before {
  border-radius: 5px;
}
.opt input:checked + span {
  border-color: var(--brand);
  background: var(--brand-soft);
}
.opt input:checked + span::before {
  border: 5px solid var(--brand);
}
.opt input[type='checkbox']:checked + span::before {
  border: 1.5px solid var(--brand);
  background: var(--brand)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E")
    center / 14px no-repeat;
}
:is(.rating__i, .opt) input:focus-visible + span {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
@media (hover: hover) {
  .rating__i:hover span,
  .opt:hover span {
    border-color: var(--brand);
  }
}
.demo__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-3);
}
.demo__nojs {
  color: var(--muted);
  font-size: var(--text-sm);
}
.demo__check {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-pill);
  background: var(--ok-soft);
  color: var(--ok);
}
.demo__check .i {
  width: 28px;
  height: 28px;
}
.demo__title {
  font-family: var(--font-head);
  font-size: 28px;
  outline: none;
}
.demo__note {
  font-weight: 600;
}
.demo__summary {
  min-height: 1.45em;
  color: var(--muted);
}
.demo__promo {
  display: grid;
  justify-items: center;
  gap: var(--s-3);
  width: 100%;
  margin: var(--s-2) 0;
  padding: var(--s-5) var(--s-4);
  border-radius: var(--radius-m);
  background: var(--brand-soft);
}
.demo__promo p {
  font-weight: 600;
}
@media (max-width: 480px) {
  .demo {
    padding: var(--s-4);
  }
  .demo__promo .btn {
    white-space: normal;
    height: auto;
    min-height: 48px;
    text-align: center;
  }
}

/* pricing */
.price {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: var(--s-7);
  padding: var(--s-7) var(--s-6);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
}
.price__main .head {
  margin-bottom: var(--s-5);
}
.price__card {
  padding: var(--s-6);
  border-radius: var(--radius-m);
  background: var(--bg);
}
.price__value {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 40px;
  line-height: 1;
}
.price__sub {
  margin-top: var(--s-2);
  color: var(--muted);
}
.price__list {
  display: grid;
  gap: var(--s-3);
  margin: var(--s-5) 0;
  padding: 0;
  list-style: none;
}
.price__list li {
  display: flex;
  gap: var(--s-3);
}
.price__list .i {
  color: var(--ok);
}
.price__facts {
  padding-top: var(--s-4);
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: var(--text-sm);
}
@media (max-width: 900px) {
  .price {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-6);
    padding: var(--s-6) var(--s-4);
  }
  .price__card {
    padding: var(--s-5);
  }
}

/* related articles */
.articles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-4);
  margin: 0;
  padding: 0;
  list-style: none;
}
.article a {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  height: 100%;
  padding: var(--s-5);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  color: var(--text);
  text-decoration: none;
}
.article p {
  color: var(--muted);
  font-size: var(--text-md);
}
.article__more {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  margin-top: auto;
  padding-top: var(--s-2);
  color: var(--brand-text);
  font-weight: 600;
  font-size: var(--text-md);
}
.article__more .i {
  width: 18px;
  height: 18px;
}
@media (hover: hover) {
  .article a:hover {
    border-color: var(--border-strong);
  }
  .article a:hover .h3 {
    color: var(--brand-text);
  }
}
@media (max-width: 900px) {
  .articles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 560px) {
  .articles {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* FAQ */
.faq {
  max-width: 880px;
  border-top: 1px solid var(--border);
}
.faq__item {
  border-bottom: 1px solid var(--border);
}
.faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  min-height: 64px;
  padding: var(--s-3) 0;
  list-style: none;
  cursor: pointer;
}
.faq__item summary::-webkit-details-marker {
  display: none;
}
.faq__q {
  font-size: var(--m-h3);
  font-weight: 600;
  line-height: 1.35;
}
.faq__icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  transition:
    transform var(--dur-4) var(--spring),
    background-color var(--dur-2) ease;
}
.faq__item[open] .faq__icon {
  transform: rotate(45deg);
  background: var(--brand-soft);
  color: var(--brand-text);
}
@media (hover: hover) {
  .faq__item summary:hover .faq__q {
    color: var(--brand-text);
  }
}
.faq__a {
  max-width: 720px;
  padding: 0 0 var(--s-5);
  color: var(--muted);
  line-height: 1.6;
  animation: fade-in var(--dur-4) var(--ease-out);
}

/* final CTA: the brand panel overlaps the end of the sheet and the footer */
.final {
  position: relative;
  z-index: 2;
  margin-top: calc(-1 * var(--m-final-overlap));
  margin-bottom: calc(-1 * var(--m-final-overlap));
}
.final__panel {
  display: grid;
  justify-items: center;
  gap: var(--s-3);
  padding: var(--s-8) var(--s-6);
  border-radius: var(--radius-l);
  background: var(--brand);
  color: var(--brand-on);
  text-align: center;
}
.final__title {
  font-family: var(--font-head);
  font-size: var(--m-h2);
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.final__text {
  max-width: 560px;
  opacity: 0.88;
  font-size: var(--m-lead);
}
.final__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--s-3);
  margin-top: var(--s-3);
}
@media (max-width: 480px) {
  .final__panel {
    padding: var(--s-7) var(--s-4);
  }
  .final__actions .btn {
    flex: 1 1 100%;
  }
}

/* footer */
.foot {
  padding: calc(var(--m-final-overlap) + var(--s-7)) 0 var(--s-6);
  background: var(--bg);
}
.sheet--end + .foot {
  padding-top: var(--s-7);
}
.foot__grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr));
  gap: var(--s-6);
}
.foot__about {
  margin-top: var(--s-3);
  max-width: 300px;
  color: var(--muted);
}
.foot__contacts {
  display: grid;
  gap: var(--s-1);
  margin-top: var(--s-4);
}
.foot__contacts a,
.foot__list a {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  min-height: 36px;
  color: var(--text);
  text-decoration: none;
}
.foot__contacts .i {
  width: 18px;
  height: 18px;
  color: var(--muted);
}
.foot__list a:hover,
.foot__contacts a:hover {
  color: var(--brand-text);
  text-decoration: underline;
}
.foot__h {
  margin-bottom: var(--s-2);
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 600;
}
.foot__list {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--text-md);
}
.foot__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s-3);
  margin-top: var(--s-7);
  padding-top: var(--s-4);
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: var(--text-sm);
}
.foot__bottom a {
  color: var(--muted);
}
@media (max-width: 900px) {
  .foot__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .foot__brand {
    grid-column: 1 / -1;
  }
}
@media (max-width: 480px) {
  .foot__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* breadcrumbs */
.crumbs {
  padding-top: var(--s-4);
}
.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-1) var(--s-2);
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: var(--text-sm);
}
.crumbs li + li::before {
  content: '/';
  margin-right: var(--s-2);
  color: var(--border-strong);
}
.crumbs a {
  color: var(--muted);
}
.crumbs + .hero {
  padding-top: var(--s-6);
}

/* catalog */
.filters {
  display: grid;
  gap: var(--s-4);
  margin-bottom: var(--s-4);
}
.search {
  position: relative;
  display: flex;
  gap: var(--s-2);
  max-width: 640px;
}
.search__icon {
  position: absolute;
  left: var(--s-4);
  top: 50%;
  color: var(--muted);
  transform: translateY(-50%);
  pointer-events: none;
}
.search__input {
  padding-left: calc(var(--s-4) + 20px + var(--s-2));
  border-radius: var(--radius-pill);
}
.search__go {
  height: var(--control-h-lg);
}
.search__input::-webkit-search-cancel-button {
  cursor: pointer;
}
.fchips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
}
.fchip {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 var(--s-4);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
  transition:
    background-color var(--dur-2) ease,
    border-color var(--dur-2) ease,
    color var(--dur-2) ease;
}
.fchip.is-on {
  border-color: var(--brand);
  background: var(--brand);
  color: var(--brand-on);
}
@media (hover: hover) {
  .fchip:not(.is-on):hover {
    border-color: var(--brand);
    color: var(--brand-text);
  }
}
.catalog__count {
  min-height: 1.45em;
  margin-bottom: var(--s-4);
  color: var(--muted);
  font-size: var(--text-sm);
}
.empty {
  display: grid;
  justify-items: center;
  gap: var(--s-2);
  padding: var(--s-8) var(--s-4);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-l);
  text-align: center;
}
.empty[hidden] {
  display: none;
}
.empty__title {
  font-weight: 700;
  font-size: var(--text-xl);
}
.empty__text {
  max-width: 460px;
  color: var(--muted);
}
.empty__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--s-2);
  margin-top: var(--s-3);
}
@media (max-width: 480px) {
  .search__go {
    display: none;
  }
}

/* template page */
.tpl {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  gap: var(--s-7);
}
.tpl__inside .muted {
  margin: var(--s-3) 0 var(--s-5);
}
.tpl__try {
  position: sticky;
  top: calc(var(--topbar-h) + var(--s-4));
}
.tpl__tryhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  min-height: 44px;
  margin-bottom: var(--s-3);
}
.tpl__tryhead .btn[hidden] {
  display: inline-flex;
  visibility: hidden;
}
.tryframe {
  height: min(680px, calc(100vh - var(--topbar-h) - 160px));
  min-height: 480px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  background: var(--bg);
  box-shadow: var(--shadow-2);
}
.tryframe iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
}
.tpl__trynote {
  margin-top: var(--s-3);
  color: var(--muted);
  font-size: var(--text-sm);
}
.outline {
  display: grid;
  gap: var(--s-3);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: q;
}
.outline__q {
  position: relative;
  padding: var(--s-4) var(--s-4) var(--s-4) calc(var(--s-4) + 32px);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  counter-increment: q;
}
.outline__q::before {
  content: counter(q);
  position: absolute;
  left: var(--s-4);
  top: var(--s-4);
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 700;
}
.outline__t {
  font-weight: 600;
}
.outline__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  margin-top: var(--s-2);
}
.outline__opts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-1) var(--s-4);
  margin: var(--s-2) 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: var(--text-md);
}
.outline__opts li::before {
  content: '○ ';
  color: var(--border-strong);
}
@media (max-width: 900px) {
  .tpl {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-6);
  }
  .tpl__try {
    position: static;
    order: -1;
  }
  .tryframe {
    height: 560px;
    min-height: 0;
  }
}

.related {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-1) var(--s-6);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ---------------------------------------------------------------- icon motion: plays on hover, still while idle */
@keyframes m-icon-pop {
  40% {
    transform: scale(1.18);
  }
}
@keyframes m-icon-spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes m-icon-lift {
  40% {
    transform: translateY(-3px);
  }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .mode:hover .mode__icon .i,
  .points li:hover .points__mark .i,
  .price__list li:hover .i {
    animation: m-icon-pop var(--dur-4) var(--spring);
  }
  :is(.btn, button):hover .i--refresh {
    animation: m-icon-spin var(--dur-4) var(--ease-out);
  }
  .foot__contacts a:hover .i,
  .search:hover .search__icon .i {
    animation: m-icon-lift var(--dur-4) var(--spring);
  }
  .rule:hover .rule__arrow .i {
    transform: translateX(3px);
    transition: transform var(--dur-3) var(--spring);
  }
}
