/* ==========================================================================
   Alfagram — main stylesheet
   Design language follows telegram.org: native system font, #2481cc accent,
   flat surfaces, #17212b night palette.
   1. Tokens         6. Header & nav       11. Spotlights & mocks   16. FAQ
   2. Base           7. Footer             12. Release & CTA        17. Changelog
   3. Layout         8. Hero               13. Page head & docs     18. 404
   4. Type           9. Phone chat demo    14. Features page        19. Motion
   5. Controls      10. Feature grid       15. Download page        20. Responsive
   ========================================================================== */

/* 1. Tokens ================================================================ */
:root {
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "SF Mono", Consolas, "Liberation Mono", Menlo, monospace;

  --accent: #2481cc;
  --accent-rgb: 36, 129, 204;
  --ok-rgb: 63, 171, 78;
  --danger-rgb: 224, 69, 58;
  --text-2-rgb: 112, 117, 121;
  --accent-hover: #1a8ad5;
  --accent-title: #0088cc;
  --accent-soft: #e8f2fb;
  --accent-contrast: #ffffff;
  --link: #2481cc;

  --bg: #ffffff;
  --bg-soft: #f4f7fa;
  --surface: #ffffff;
  --surface-2: #f1f4f7;
  --border: #e4e8ec;
  --text: #000000;
  --text-2: #707579;
  --header-bg: rgba(255, 255, 255, .84);

  --ok: #3fab4e;
  --danger: #e0453a;
  --danger-soft: #fdeceb;
  --warn-soft: #fff6e5;

  --shadow-sm: 0 1px 2px rgba(16, 35, 47, .06), 0 1px 1px rgba(16, 35, 47, .03);
  --shadow-md: 0 8px 24px -8px rgba(16, 35, 47, .16);
  --shadow-lg: 0 30px 70px -20px rgba(16, 35, 47, .35);

  /* chat (phone demo) */
  --wp-1: #dbddbb; --wp-2: #6ba587; --wp-3: #d5d88d; --wp-4: #88b884;
  --chat-in: #ffffff;
  --chat-out: #effedd;
  --chat-text: #000000;
  --chat-meta: #a1aab3;
  --chat-meta-out: #4fae4e;
  --chat-bar: rgba(255, 255, 255, .92);
  --chat-deleted: #fff0ef;
  --avatar: linear-gradient(135deg, #ff885e, #ff516a);

  --radius: 14px;
  --radius-lg: 20px;
  --header-h: 60px;
  --container: 1120px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

[data-theme="dark"] {
  --accent: #3390ec;
  --accent-rgb: 51, 144, 236;
  --danger-rgb: 255, 107, 97;
  --text-2-rgb: 138, 150, 163;
  --accent-hover: #4a9ff0;
  --accent-title: #5eb0f3;
  --accent-soft: rgba(51, 144, 236, .15);
  --link: #5eb0f3;

  --bg: #17212b;
  --bg-soft: #1b2733;
  --surface: #232e3c;
  --surface-2: #1f2a36;
  --border: rgba(255, 255, 255, .08);
  --text: #e9edf1;
  --text-2: #8a96a3;
  --header-bg: rgba(23, 33, 43, .86);

  --danger: #ff6b61;
  --danger-soft: rgba(255, 107, 97, .12);
  --warn-soft: rgba(245, 166, 35, .1);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-md: 0 10px 30px -10px rgba(0, 0, 0, .5);
  --shadow-lg: 0 30px 70px -20px rgba(0, 0, 0, .7);

  --wp-1: #1d3246; --wp-2: #0f1a26; --wp-3: #2a4661; --wp-4: #142435;
  --chat-in: #182533;
  --chat-out: #2b5278;
  --chat-text: #f5f7f9;
  --chat-meta: #6d7f8f;
  --chat-meta-out: #7db7ec;
  --chat-bar: rgba(23, 33, 43, .94);
  --chat-deleted: #3a2630;

  color-scheme: dark;
}

/* 2. Base ================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html {
  touch-action: manipulation;           /* no double-tap zoom, pinch zoom still works */
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 20px);
}

body {
  margin: 0;
  font: 400 16px/1.6 var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color .3s ease, color .3s ease;
  overflow-x: hidden;
}

img, svg, canvas { display: block; max-width: 100%; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
::selection { background: rgba(var(--accent-rgb), 0.24); }

.icon { width: 1em; height: 1em; flex: none; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: 10px 16px; border-radius: 10px;
  background: var(--accent); color: #fff; font-weight: 500;
}
.skip-link:focus { top: 12px; text-decoration: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* 3. Layout ================================================================ */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 max(24px, env(safe-area-inset-right)) 0 max(24px, env(safe-area-inset-left));
}
.container--narrow { max-width: 800px; }

.site-main { min-height: 60vh; }

.section { padding: 104px 0; position: relative; }
.section--soft { background: var(--bg-soft); }
.section--tight { padding: 72px 0; }

.section-head { max-width: 660px; margin: 0 auto 60px; text-align: center; }

/* 4. Type ================================================================== */
.section-title {
  font-size: clamp(28px, 3.3vw, 40px);
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -.022em;
}
.section-lead {
  margin-top: 16px;
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-2);
}

.link-arrow {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 0; margin: -9px 0;       /* 44px touch target, same layout */
  font-weight: 500; color: var(--link);
}
.link-arrow .icon { width: 18px; height: 18px; transition: transform .25s var(--ease); }
.link-arrow:hover { text-decoration: none; }
@media (hover: hover) { .link-arrow:hover .icon { transform: translateX(4px); } }

.muted { color: var(--text-2); }

.platform-note {
  display: flex; gap: 10px; align-items: flex-start;
  max-width: 470px; margin-top: 20px; padding: 12px 14px;
  border-radius: 14px;
  background: var(--warn-soft);
  font-size: 14.5px; line-height: 1.5; text-align: left;
}
.platform-note[hidden] { display: none; }
.platform-note .icon { width: 18px; height: 18px; margin-top: 2px; color: #e0930f; }
.hero .platform-note { margin-left: auto; margin-right: auto; }
@media (min-width: 1025px) { .hero .platform-note { margin-left: 0; } }

/* 5. Controls ============================================================== */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 48px; padding: 0 26px;
  border: 0; border-radius: 24px;
  font-size: 16px; font-weight: 500; line-height: 1; white-space: nowrap;
  cursor: pointer; text-decoration: none;
  transition: background-color .2s ease, color .2s ease, transform .2s var(--ease), box-shadow .2s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(.97); }
.btn .icon { width: 20px; height: 20px; }

.btn--primary { background: var(--accent); color: var(--accent-contrast); }
.btn--primary:hover { background: var(--accent-hover); box-shadow: 0 8px 22px -8px rgba(var(--accent-rgb), 0.7); }

.btn--soft { background: var(--accent-soft); color: var(--link); }
.btn--soft:hover { background: rgba(var(--accent-rgb), 0.2); }

.btn--sm { height: 36px; padding: 0 16px; font-size: 14px; border-radius: 18px; }
.btn--lg { height: 56px; padding: 0 32px; font-size: 17px; border-radius: 28px; }
.btn--lg .icon { width: 22px; height: 22px; }

/* moving highlight, as on t.me buttons */
.btn--shine { overflow: hidden; isolation: isolate; }
.btn--shine::after {
  content: "";
  position: absolute; top: 0; bottom: 0; left: -60%;
  width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .35), transparent);
  transform: skewX(-18deg);
  animation: shine 4.5s ease-in-out 1.2s infinite;
  z-index: -1;
}
@keyframes shine {
  0%, 60% { left: -60%; }
  85%, 100% { left: 130%; }
}

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 38px; height: 38px; padding: 0 9px;
  border: 0; border-radius: 19px; background: transparent;
  color: var(--text-2); cursor: pointer;
  font-size: 13px; font-weight: 600; letter-spacing: .02em;
  transition: background-color .2s ease, color .2s ease;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn .icon { width: 20px; height: 20px; }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  height: 24px; padding: 0 10px; border-radius: 12px;
  font-size: 12.5px; font-weight: 600; line-height: 1;
  background: var(--surface-2); color: var(--text-2);
}
.badge--accent { background: var(--accent-soft); color: var(--link); }
.badge--ok { background: rgba(var(--ok-rgb), 0.14); color: var(--ok); }
.badge .icon { width: 14px; height: 14px; }

.dot-list { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; color: var(--text-2); font-size: 14px; }
.dot-list > li { display: inline-flex; align-items: center; gap: 6px; }
.dot-list > li + li::before {
  content: ""; width: 3px; height: 3px; border-radius: 50%;
  background: currentColor; opacity: .6; margin-right: 8px;
}
.dot-list .icon { width: 16px; height: 16px; }

/* 6. Header & nav ========================================================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background-color .3s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--border); }

.site-header__inner {
  display: flex; align-items: center; gap: 24px;
  height: 100%;
}

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text); font-size: 19px; font-weight: 600; letter-spacing: -.01em;
}
.brand:hover { text-decoration: none; }
.brand__logo { width: 32px; height: 32px; }

.site-nav { margin-left: auto; }
.site-nav__list { display: flex; align-items: center; gap: 4px; }
.site-nav__link {
  position: relative; display: block;
  padding: 8px 12px;
  color: var(--text-2); font-size: 15px; font-weight: 500;
  transition: color .2s ease;
}
.site-nav__link:hover { color: var(--text); text-decoration: none; }
.site-nav__link::after {
  content: "";
  position: absolute; left: 12px; right: 12px; bottom: -11px;
  height: 2px; border-radius: 2px 2px 0 0;
  background: var(--accent);
  transform: scaleX(0); transition: transform .3s var(--ease);
}
.site-nav__link.is-active { color: var(--text); }
.site-nav__link.is-active::after { transform: scaleX(1); }
.site-nav__item--mobile { display: none; }

.site-header__actions { display: flex; align-items: center; gap: 4px; }
.site-header__cta { margin-left: 8px; }

.theme-toggle .theme-toggle__moon { display: none; }
[data-theme="dark"] .theme-toggle .theme-toggle__sun { display: none; }
[data-theme="dark"] .theme-toggle .theme-toggle__moon { display: block; }

.dropdown { position: relative; }
.dropdown__menu {
  position: absolute; right: 0; top: calc(100% + 8px);
  min-width: 190px; padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  opacity: 0; visibility: hidden;
  transform: translateY(-6px) scale(.98); transform-origin: top right;
  transition: opacity .18s ease, transform .18s var(--ease), visibility 0s linear .18s;
}
.dropdown.is-open .dropdown__menu {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity .18s ease, transform .18s var(--ease), visibility 0s;
}
.dropdown__item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 12px; border-radius: 9px;
  color: var(--text); font-size: 15px;
}
.dropdown__item:hover { background: var(--surface-2); text-decoration: none; }
.dropdown__item .icon { width: 18px; height: 18px; color: var(--accent); }

.nav-toggle { display: none; }
.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block; width: 18px; height: 2px; border-radius: 2px;
  background: currentColor;
  transition: transform .3s var(--ease), background-color .2s ease;
}
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before,
.nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { transform: translateY(-6px); }
.nav-toggle__bars::after { transform: translateY(6px); }
.nav-open .nav-toggle__bars { background: transparent; }
.nav-open .nav-toggle__bars::before { transform: rotate(45deg); }
.nav-open .nav-toggle__bars::after { transform: rotate(-45deg); }

/* 7. Footer ================================================================ */
.site-footer {
  padding: 64px 0 calc(40px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  font-size: 14.5px;
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 40px;
}
.site-footer__tagline { margin-top: 14px; max-width: 300px; color: var(--text-2); line-height: 1.55; }
.site-footer__title { font-size: 14.5px; font-weight: 600; margin-bottom: 14px; }
.site-footer__links li + li { margin-top: 9px; }
.site-footer__links a { color: var(--text-2); display: inline-flex; align-items: center; gap: 6px; }
.site-footer__links a:hover { color: var(--link); text-decoration: none; }
.site-footer__links .icon { width: 13px; height: 13px; opacity: .7; }
.site-footer__social { display: flex; gap: 8px; margin-top: 20px; }
.site-footer__social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--surface-2); color: var(--text-2);
  transition: background-color .2s ease, color .2s ease;
}
.site-footer__social a:hover { background: var(--accent); color: #fff; }
.site-footer__social .icon { width: 18px; height: 18px; }

.site-footer__bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px;
  margin-top: 48px; padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--text-2); font-size: 13px; line-height: 1.55;
}
.site-footer__disclaimer { max-width: 620px; }
.site-footer__langs { display: flex; gap: 14px; }
.site-footer__langs a { color: var(--text-2); }
.site-footer__langs a[aria-current] { color: var(--text); font-weight: 600; }

/* 8. Hero ================================================================== */
.hero {
  position: relative;
  padding: 56px 0 88px;
  overflow: hidden;
}
.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 48px;
}
.hero__logo {
  width: 96px; height: 96px;
  margin-bottom: 28px;
  filter: drop-shadow(0 14px 24px rgba(20, 90, 255, .35));
}
.hero__title {
  font-size: clamp(42px, 5.6vw, 64px);
  line-height: 1.04;
  font-weight: 700;
  letter-spacing: -.035em;
}
.hero__lead {
  margin-top: 20px;
  max-width: 470px;
  font-size: 20px;
  line-height: 1.55;
  color: var(--text-2);
}
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: 36px; }
.hero__meta { margin-top: 20px; }
.hero__perks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 40px; }

/* 9. Phone chat demo ======================================================= */
.demo {
  position: relative;
  display: flex; justify-content: center;
  padding: 10px 0;
}
.demo__glow {
  position: absolute; left: 50%; top: 50%;
  width: 520px; height: 520px;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(var(--accent-rgb), 0.22), transparent);
  filter: blur(10px);
  pointer-events: none;
}

.phone {
  position: relative; z-index: 1;
  width: 300px; height: 612px;
  padding: 10px;
  border-radius: 50px;
  background: #0c0e11;
  box-shadow:
    inset 0 0 0 1.5px #2c3036,
    0 0 0 1px rgba(0, 0, 0, .06),
    var(--shadow-lg);
  flex: none;
}
.phone::before {                     /* side button */
  content: ""; position: absolute; right: -3px; top: 150px;
  width: 3px; height: 70px; border-radius: 0 2px 2px 0; background: #1b1e22;
}
.phone__screen {
  position: relative;
  width: 100%; height: 100%;
  border-radius: 40px;
  overflow: hidden;
  background: var(--wp-2);
  isolation: isolate;
  font-size: 13.5px;
  color: var(--chat-text);
  text-align: left;
}
.phone__island {
  position: absolute; left: 50%; top: 9px; z-index: 5;
  width: 88px; height: 25px; border-radius: 13px;
  background: #000; transform: translateX(-50%);
}

.chat-bg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }

.chat-status {
  position: absolute; top: 0; left: 0; right: 0; z-index: 4;
  display: flex; justify-content: space-between; align-items: center;
  height: 42px; padding: 4px 26px 0 30px;
  font-size: 13px; font-weight: 600;
  background: var(--chat-bar);
}
.chat-status__icons { display: flex; gap: 4px; }
.chat-status__icons .icon { width: 14px; height: 14px; }

.chat-head {
  position: absolute; top: 42px; left: 0; right: 0; z-index: 4;
  display: flex; align-items: center; gap: 10px;
  height: 50px; padding: 0 12px 0 6px;
  background: var(--chat-bar);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .06);
}
.chat-head__back { color: var(--accent); display: flex; }
.chat-head__back .icon { width: 24px; height: 24px; }
.chat-head__avatar {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--avatar); color: #fff;
  font-size: 15px; font-weight: 600;
}
.chat-head__info { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.chat-head__name { font-size: 14.5px; font-weight: 600; }
.chat-head__status { font-size: 12px; color: var(--accent); }
.chat-head__status .typing-dots { display: none; }
.chat-head__status.is-typing .typing-dots { display: inline-flex; }
.typing-dots { gap: 2px; margin-left: 3px; vertical-align: middle; }
.typing-dots i {
  width: 3.5px; height: 3.5px; border-radius: 50%; background: currentColor;
  animation: typing 1.2s infinite ease-in-out;
}
.typing-dots i:nth-child(2) { animation-delay: .15s; }
.typing-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes typing {
  0%, 60%, 100% { opacity: .3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-2px); }
}

.chat-head__ghost {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
}
.chat-head__ghost .icon { width: 19px; height: 19px; }
.chat-head__ghost::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.45);
}
.demo.is-ghost .chat-head__ghost::after { animation: pulse 1.6s ease-out 2; }
@keyframes pulse {
  from { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.45); }
  to { box-shadow: 0 0 0 12px transparent; }
}

.chat-body {
  position: absolute; top: 92px; bottom: 58px; left: 0; right: 0;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 8px 10px 4px;
  transition: opacity .5s ease;
}
.chat-body.is-fading { opacity: 0; }

.chat-date {
  align-self: center;
  margin-bottom: 8px;
  padding: 3px 10px; border-radius: 12px;
  background: rgba(0, 0, 0, .22); color: #fff;
  font-size: 12px; font-weight: 500;
}

.msg-row {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .42s var(--ease);
}
.msg-row > .msg-row__inner { min-height: 0; overflow: hidden; display: flex; padding: 0 2px; }
.msg-row.is-shown { grid-template-rows: 1fr; }
.msg-row.is-shown > .msg-row__inner { overflow: visible; }

.msg {
  position: relative;
  max-width: 84%;
  margin: 3px 0;
  padding: 6px 9px 6px 10px;
  border-radius: 15px;
  background: var(--chat-in);
  box-shadow: 0 1px 1.5px rgba(0, 0, 0, .1);
  line-height: 1.38;
  opacity: 0; transform: translateY(10px) scale(.94);
  transition: opacity .35s ease, transform .45s var(--ease), background-color .4s ease;
}
.msg-row.is-shown .msg { opacity: 1; transform: none; }
.msg--in { margin-right: auto; border-bottom-left-radius: 5px; transform-origin: 0 100%; }
.msg--out { margin-left: auto; border-bottom-right-radius: 5px; background: var(--chat-out); transform-origin: 100% 100%; }

.msg__meta {
  float: right;
  display: inline-flex; align-items: center; gap: 3px;
  margin: 5px 0 -3px 10px;
  font-size: 11px; line-height: 1; color: var(--chat-meta);
  white-space: nowrap;
}
.msg--out .msg__meta { color: var(--chat-meta-out); }
.msg__meta .icon { width: 14px; height: 14px; }

.msg__text { display: grid; }
.msg__history { display: grid; }
.msg__v { grid-area: 1 / 1; transition: opacity .35s ease, transform .35s var(--ease); }
.msg__v--new { opacity: 0; transform: translateY(4px); }
.msg.is-edited .msg__v--old { opacity: 0; transform: translateY(-4px); }
.msg.is-edited .msg__v--new { opacity: 1; transform: none; }

.msg__edited, .msg__deleted { display: none; }
.msg.is-edited .msg__edited { display: inline; font-style: italic; }
.msg.is-deleted .msg__deleted { display: inline-flex; align-items: center; gap: 2px; color: var(--danger); font-weight: 500; }
.msg__deleted .icon { width: 11px !important; height: 11px !important; }

.msg__history {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows .45s var(--ease) .25s;
}
.msg__history > span { display: block; min-height: 0; overflow: hidden; }
.msg.is-edited .msg__history { grid-template-rows: 1fr; }
.msg__history-box {
  display: block;
  margin-top: 6px; padding: 4px 8px;
  border-left: 2px solid var(--accent);
  border-radius: 4px 8px 8px 4px;
  background: var(--accent-soft);
  font-size: 12px; line-height: 1.35;
}
.msg__history-box small { display: block; color: var(--accent); font-weight: 600; font-size: 11.5px; }
.msg__history-box s { opacity: .75; }

.msg.is-deleted { background: var(--chat-deleted); animation: shake .5s ease; }
@keyframes shake {
  0%, 100% { translate: 0; }
  20% { translate: -4px; }
  40% { translate: 4px; }
  60% { translate: -2px; }
  80% { translate: 2px; }
}

.chat-compose {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 4;
  display: flex; align-items: center; gap: 6px;
  padding: 8px 8px 12px;
}
.chat-compose__field {
  flex: 1; min-width: 0;
  display: flex; align-items: center; gap: 6px;
  height: 38px; padding: 0 12px;
  border-radius: 19px;
  background: var(--chat-in);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .12);
  color: var(--chat-meta);
  overflow: hidden; white-space: nowrap;
}
.chat-compose__field .icon { width: 19px; height: 19px; flex: none; }
.chat-compose__text { color: var(--chat-text); overflow: hidden; text-overflow: clip; }
.chat-compose__text:empty + .chat-compose__placeholder { display: inline; }
.chat-compose__placeholder { display: none; }
.chat-compose__caret {
  width: 1.5px; height: 17px; margin-left: -5px;
  background: var(--accent);
  animation: caret 1s steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }
.chat-compose__send {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  background: var(--accent); color: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .15);
}
.chat-compose__send .icon {
  position: absolute; width: 19px; height: 19px;
  transition: opacity .2s ease, transform .25s var(--ease);
}
.chat-compose__send .icon:last-child { opacity: 0; transform: scale(.5) rotate(-30deg); }
.demo.is-composing .chat-compose__send .icon:first-child { opacity: 0; transform: scale(.5); }
.demo.is-composing .chat-compose__send .icon:last-child { opacity: 1; transform: none; }

/* callouts */
.demo__callouts {
  position: absolute; inset: 0; z-index: 2;
  pointer-events: none;
}
.callout {
  position: absolute;
  display: flex; align-items: flex-start; gap: 12px;
  width: 244px; padding: 12px 14px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  font-size: 13px; line-height: 1.45; color: var(--text-2);
  opacity: 0; transform: translateY(10px) scale(.96);
  transition: opacity .45s ease, transform .5s var(--ease), border-color .3s ease;
}
.callout b { display: block; color: var(--text); font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.callout__icon {
  display: flex; align-items: center; justify-content: center; flex: none;
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--accent-soft); color: var(--accent);
}
.callout__icon .icon { width: 19px; height: 19px; }
.callout--delete .callout__icon { background: var(--danger-soft); color: var(--danger); }
.callout.is-shown { opacity: 1; transform: none; }
.callout.is-active { border-color: rgba(var(--accent-rgb), 0.45); }

.callout--ghost { top: 11%; left: calc(50% - 150px - 226px); }
.callout--edit { top: 44%; left: calc(50% + 150px - 60px); }
.callout--delete { top: 72%; left: calc(50% - 150px - 190px); }

/* 10. Feature grid ("Why Alfagram?") ======================================= */
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 56px 48px;
}
.why-card { text-align: center; padding: 0 8px; }
.why-card__icon {
  display: flex; align-items: center; justify-content: center;
  width: 76px; height: 76px; margin: 0 auto 20px;
  border-radius: 24px;
  background: var(--accent-soft); color: var(--accent);
  transition: transform .4s var(--ease);
}
@media (hover: hover) { .why-card:hover .why-card__icon { transform: translateY(-4px) rotate(-4deg); } }
.why-card__icon .icon { width: 34px; height: 34px; stroke-width: 1.7; }
.why-card__title {
  font-size: 22px; font-weight: 500; letter-spacing: -.01em;
  color: var(--accent-title);
}
.why-card__text { margin-top: 8px; font-size: 15.5px; line-height: 1.6; color: var(--text-2); }

/* 11. Spotlights & mocks =================================================== */
.spotlight__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 72px;
}
.spotlight--reverse .spotlight__copy { order: 2; }
.spotlight__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 16px;
  margin-bottom: 24px;
  background: var(--accent); color: #fff;
  box-shadow: 0 10px 24px -10px rgba(var(--accent-rgb), 0.8);
}
.spotlight__icon .icon { width: 26px; height: 26px; }
.spotlight__copy .section-lead { max-width: 480px; }
.spotlight__points { margin: 24px 0 28px; display: grid; gap: 10px; }
.spotlight__points li { display: flex; gap: 10px; align-items: flex-start; font-size: 15.5px; }
.spotlight__points .icon { width: 20px; height: 20px; margin-top: 2px; color: var(--accent); }

.mock {
  position: relative;
  max-width: 440px; margin: 0 auto;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.mock__bar {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}
.mock__bar .icon { width: 20px; height: 20px; color: var(--accent); }
.mock__bar small { margin-left: auto; font-weight: 400; color: var(--text-2); font-size: 13px; }

/* ghost settings */
.toggle-list { padding: 6px 0; }
.toggle-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 20px;
  font-size: 15px;
}
.toggle-row + .toggle-row { border-top: 1px solid var(--border); }
.toggle-row .icon { width: 20px; height: 20px; color: var(--text-2); }
.toggle-row span { flex: 1; }
.switch {
  position: relative; flex: none;
  width: 38px; height: 22px; border-radius: 11px;
  background: rgba(var(--text-2-rgb), 0.35);
  transition: background-color .3s ease;
  transition-delay: calc(var(--i, 0) * 220ms + 500ms);
}
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
  transition: transform .3s var(--ease);
  transition-delay: inherit;
}
.is-visible .switch { background: var(--accent); }
.is-visible .switch::after { transform: translateX(16px); }

/* edit history */
.history-list { padding: 8px 0; }
.history-item {
  position: relative;
  padding: 12px 20px 12px 46px;
}
.history-item::before {
  content: ""; position: absolute; left: 24px; top: 20px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--border); box-shadow: 0 0 0 3px var(--surface);
}
.history-item::after {
  content: ""; position: absolute; left: 28px; top: 32px; bottom: -12px;
  width: 1px; background: var(--border);
}
.history-item:last-child::after { display: none; }
.history-item.is-current::before { background: var(--accent); }
.history-item p { font-size: 15px; }
.history-item mark { background: rgba(var(--accent-rgb), 0.18); color: inherit; border-radius: 4px; padding: 0 2px; }
.history-item time { display: block; margin-top: 2px; font-size: 12.5px; color: var(--text-2); }
.history-item .badge { position: absolute; right: 20px; top: 12px; }
.history-item:not(.is-current) p { color: var(--text-2); }

.deleted-note {
  display: flex; gap: 12px; align-items: flex-start;
  margin: 4px 16px 16px; padding: 12px 14px;
  border-radius: 12px;
  background: var(--danger-soft);
  font-size: 14.5px;
}
.deleted-note .icon { width: 18px; height: 18px; color: var(--danger); margin-top: 2px; }
.deleted-note small { display: block; color: var(--danger); font-size: 12.5px; margin-top: 2px; }

/* feed / filters */
.feed { padding: 4px 14px 14px; background: var(--bg-soft); }
.feed-post {
  margin-top: 10px;
  padding: 14px; border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.feed-post__head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-weight: 600; font-size: 14px; }
.feed-post__avatar { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, #72d5fd, #2a9ef1); }
.feed-post__avatar--b { background: linear-gradient(135deg, #a0de7e, #54cb68); }
.feed-post__avatar--c { background: linear-gradient(135deg, #e0a2f3, #d669ed); }
.skeleton { height: 9px; border-radius: 5px; background: var(--surface-2); }
.skeleton + .skeleton { margin-top: 8px; }
.skeleton--80 { width: 80%; }
.skeleton--60 { width: 60%; }
.skeleton--img { height: 84px; border-radius: 10px; margin-bottom: 10px; background: linear-gradient(135deg, rgba(var(--accent-rgb), .2), transparent), var(--surface-2); }

.collapsible { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .6s var(--ease), opacity .4s ease; }
.collapsible > div { min-height: 0; overflow: hidden; }
.is-visible .collapsible { grid-template-rows: 0fr; opacity: 0; }
.is-visible .collapsible--1 { transition-delay: 1.1s; }
.is-visible .collapsible--2 { transition-delay: 1.9s; }

.feed-ad { border: 1px dashed rgba(var(--danger-rgb), 0.45); }
.feed-ad__label { margin-left: auto; font-size: 11.5px; font-weight: 600; color: var(--danger); }

.hidden-pill {
  display: grid; grid-template-rows: 0fr; opacity: 0;
  transition: grid-template-rows .5s var(--ease), opacity .4s ease;
}
.hidden-pill > div { min-height: 0; overflow: hidden; }
.hidden-pill span {
  margin-top: 10px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 8px 12px; border-radius: 12px;
  background: var(--surface-2); color: var(--text-2);
  font-size: 13px;
}
.hidden-pill .icon { width: 15px; height: 15px; }
.is-visible .hidden-pill { grid-template-rows: 1fr; opacity: 1; }
.is-visible .hidden-pill--1 { transition-delay: 1.5s; }
.is-visible .hidden-pill--2 { transition-delay: 2.3s; }

/* 12. Release & CTA ======================================================== */
.release-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px 48px; align-items: center;
  padding: 40px 44px;
  border-radius: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.release-card__top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.release-card__title { font-size: 28px; font-weight: 600; letter-spacing: -.02em; }
.release-card__list { margin-top: 18px; display: grid; gap: 8px; }
.release-card__list li { display: flex; gap: 10px; color: var(--text-2); }
.release-card__list .icon { width: 18px; height: 18px; margin-top: 3px; color: var(--ok); }
.release-card__side { display: grid; gap: 12px; justify-items: stretch; min-width: 230px; }
.release-card__side .muted { text-align: center; font-size: 13px; }

.cta {
  text-align: center;
  padding: 88px 24px;
}
.cta__logo { width: 80px; height: 80px; margin: 0 auto 24px; filter: drop-shadow(0 12px 20px rgba(20, 90, 255, .3)); }
.cta .section-lead { max-width: 520px; margin-left: auto; margin-right: auto; }
.cta__actions { margin-top: 32px; display: flex; flex-direction: column; align-items: center; gap: 16px; }

/* 13. Page head & docs ===================================================== */
.page-head {
  padding: 64px 0 48px;
  text-align: center;
}
.page-head__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 64px; height: 64px; margin-bottom: 22px;
  border-radius: 20px;
  background: var(--accent-soft); color: var(--accent);
}
.page-head__icon .icon { width: 30px; height: 30px; }
.page-head__title {
  font-size: clamp(32px, 4.4vw, 48px);
  line-height: 1.1; font-weight: 700; letter-spacing: -.03em;
}
.page-head__lead {
  max-width: 620px; margin: 16px auto 0;
  font-size: 18.5px; color: var(--text-2);
}

.docs {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 64px;
  padding-bottom: 104px;
}
.docs--single { grid-template-columns: minmax(0, 760px); justify-content: center; }

.side-nav { position: sticky; top: calc(var(--header-h) + 28px); align-self: start; }
.side-nav__title { font-size: 12.5px; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 10px; padding-left: 14px; }
.side-nav__link {
  position: relative; display: flex; align-items: center; gap: 10px;
  padding: 8px 14px; border-radius: 10px;
  color: var(--text-2); font-size: 14.5px; font-weight: 500;
  transition: color .2s ease, background-color .2s ease;
}
.side-nav__link .icon { width: 18px; height: 18px; }
.side-nav__link:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.side-nav__link.is-active { color: var(--link); background: var(--accent-soft); }

.prose { font-size: 16.5px; line-height: 1.7; }
.prose > * + * { margin-top: 16px; }
.prose h2 { margin-top: 48px; font-size: 24px; line-height: 1.3; font-weight: 600; letter-spacing: -.015em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 32px; font-size: 18.5px; font-weight: 600; }
.prose ul { display: grid; gap: 8px; }
.prose ul li { position: relative; padding-left: 22px; }
.prose ul li::before {
  content: ""; position: absolute; left: 4px; top: .7em;
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}
.prose code { font-family: var(--mono); font-size: .88em; padding: 2px 6px; border-radius: 6px; background: var(--surface-2); }
.prose .muted { font-size: 14.5px; }

.notice {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 18px 20px;
  border-radius: 16px;
  background: var(--accent-soft);
  font-size: 15px; line-height: 1.6;
}
.notice > .icon { width: 22px; height: 22px; color: var(--accent); margin-top: 1px; }
.notice b { display: block; margin-bottom: 2px; }
.notice--warn { background: var(--warn-soft); }
.notice--warn > .icon { color: #e0930f; }

/* 14. Features page ======================================================== */
.feature-group + .feature-group { margin-top: 80px; }
.feature-group__head { display: flex; align-items: center; gap: 16px; margin-bottom: 10px; }
.feature-group__icon {
  display: flex; align-items: center; justify-content: center; flex: none;
  width: 48px; height: 48px; border-radius: 15px;
  background: var(--accent); color: #fff;
}
.feature-group__icon .icon { width: 24px; height: 24px; }
.feature-group__title { font-size: 28px; font-weight: 600; letter-spacing: -.02em; }
.feature-group__lead { color: var(--text-2); font-size: 17px; max-width: 620px; margin-bottom: 28px; }

.feature-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.feature-item {
  display: flex; gap: 16px;
  padding: 20px 22px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: border-color .25s ease, transform .3s var(--ease), box-shadow .3s ease;
}
@media (hover: hover) { .feature-item:hover { border-color: rgba(var(--accent-rgb), 0.4); transform: translateY(-2px); box-shadow: var(--shadow-md); } }
.feature-item__icon {
  display: flex; align-items: center; justify-content: center; flex: none;
  width: 42px; height: 42px; border-radius: 13px;
  background: var(--accent-soft); color: var(--accent);
}
.feature-item__icon .icon { width: 21px; height: 21px; }
.feature-item h3 { font-size: 16.5px; font-weight: 600; line-height: 1.35; }
.feature-item p { margin-top: 4px; font-size: 14.5px; line-height: 1.55; color: var(--text-2); }

.compare { margin-top: 96px; }
.compare__head { margin-bottom: 28px; }
.table-wrap { overflow-x: auto; border-radius: 18px; border: 1px solid var(--border); background: var(--surface); }
.compare-table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 520px; }
.compare-table th,
.compare-table td { padding: 15px 20px; text-align: left; }
.compare-table thead th { font-size: 13.5px; font-weight: 600; color: var(--text-2); background: var(--surface-2); }
.compare-table tbody th { font-weight: 400; }
.compare-table tbody tr + tr > * { border-top: 1px solid var(--border); }
.compare-table td:not(:first-child),
.compare-table th:not(:first-child) { text-align: center; width: 150px; }
.compare-table .is-alfa { background: rgba(var(--accent-rgb), 0.06); }
.compare-table thead .is-alfa { color: var(--link); background: var(--accent-soft); }
.compare-table .icon { width: 20px; height: 20px; margin: 0 auto; }
.compare-table .yes { color: var(--accent); }
.compare-table .no { color: var(--text-2); opacity: .55; }

/* 15. Download page ======================================================== */
.dl-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 48px; align-items: center;
  padding: 56px 0 64px;
}
.dl-hero__app { display: flex; align-items: center; gap: 20px; margin-bottom: 24px; }
.dl-hero__logo { width: 92px; height: 92px; filter: drop-shadow(0 12px 20px rgba(20, 90, 255, .3)); }
.dl-hero__title { font-size: clamp(32px, 4.2vw, 46px); font-weight: 700; letter-spacing: -.03em; line-height: 1.1; }
.dl-hero__lead { max-width: 560px; font-size: 18.5px; color: var(--text-2); }
.dl-hero__actions { margin-top: 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }

.qr-card {
  width: 230px; padding: 18px;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  text-align: center;
}
.qr-card__code {
  display: flex; align-items: center; justify-content: center;
  width: 194px; height: 194px; padding: 10px;
  border-radius: 14px; background: #fff;
}
.qr-card__code { position: relative; }
.qr-card__code svg { width: 100%; height: 100%; }
.qr-card__logo {
  position: absolute; left: 50%; top: 50%;
  width: 46px; height: 46px; padding: 3px;
  transform: translate(-50%, -50%);
  background: #fff; border-radius: 12px;
}
.qr-card p { margin-top: 12px; font-size: 13.5px; color: var(--text-2); line-height: 1.45; }

.spec-list {
  max-width: 760px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
}
.spec {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 15px 22px;
}
.spec + .spec { border-top: 1px solid var(--border); }
.spec dt { color: var(--text-2); font-size: 15px; }
.spec dd { font-size: 15.5px; font-weight: 600; text-align: right; }
.spec--hash { flex-wrap: wrap; }
.spec--hash dd { display: flex; align-items: center; gap: 12px; min-width: 0; font-weight: 400; }
.spec--hash code { font-family: var(--mono); font-size: 13px; word-break: break-all; text-align: left; }

.copy-btn {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  height: 32px; padding: 0 12px; border-radius: 16px; border: 0;
  background: var(--accent-soft); color: var(--link);
  font-size: 13px; font-weight: 600; cursor: pointer;
}
.copy-btn .icon { width: 15px; height: 15px; }
.copy-btn.is-copied { background: rgba(var(--ok-rgb), 0.16); color: var(--ok); }

.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; counter-reset: step; }
.step {
  position: relative;
  padding: 24px 22px 26px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.step__num {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent); color: #fff;
  font-weight: 700; font-size: 15px;
  margin-bottom: 18px;
}
.step__icon { position: absolute; right: 20px; top: 24px; color: var(--text-2); opacity: .5; }
.step__icon .icon { width: 26px; height: 26px; }
.step h3 { font-size: 17px; font-weight: 600; }
.step p { margin-top: 6px; font-size: 14.5px; line-height: 1.55; color: var(--text-2); }
.step code { font-family: var(--font); font-weight: 600; color: var(--text); }

.dl-section + .dl-section { margin-top: 72px; }
.dl-notes { display: grid; gap: 14px; max-width: 760px; padding-bottom: 104px; }
.notice .link-arrow { display: flex; width: fit-content; margin-top: 6px; }
.page-body { padding-bottom: 104px; }
.dl-section__title { font-size: 26px; font-weight: 600; letter-spacing: -.02em; margin-bottom: 24px; }

/* 16. FAQ ================================================================== */
.search {
  position: relative;
  max-width: 560px; margin: 28px auto 0;
}
.search .icon { position: absolute; left: 18px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); color: var(--text-2); pointer-events: none; }
.search input {
  width: 100%; height: 52px;
  padding: 0 20px 0 50px;
  border-radius: 26px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text); font: inherit; font-size: 16px;
  transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease;
}
.search input::placeholder { color: var(--text-2); }
.search input:focus { outline: none; border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 4px var(--accent-soft); }

.faq-group + .faq-group { margin-top: 56px; }
.faq-group__title { display: flex; align-items: center; gap: 12px; font-size: 22px; font-weight: 600; letter-spacing: -.015em; margin-bottom: 8px; }
.faq-group__title .icon { width: 22px; height: 22px; color: var(--accent); }
.faq-item { padding: 22px 0; border-bottom: 1px solid var(--border); }
.faq-item:last-child { border-bottom: 0; }
.faq-item__q { position: relative; font-size: 18px; font-weight: 600; line-height: 1.4; }
.faq-item__anchor {
  position: absolute; left: -34px; top: -4px;
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px;
  color: var(--text-2); opacity: 0;
  transition: opacity .2s ease;
}
.faq-item__anchor .icon { width: 18px; height: 18px; }
.faq-item:hover .faq-item__anchor, .faq-item__anchor:focus-visible { opacity: 1; }
@media (hover: none) { .faq-item__anchor { display: none; } }
.faq-item__a { margin-top: 10px; color: var(--text-2); font-size: 16px; line-height: 1.7; }
.faq-item__a > * + * { margin-top: 10px; }
.faq-item__a b, .faq-item__a strong { color: var(--text); font-weight: 600; }
.faq-item__a ol { counter-reset: li; display: grid; gap: 6px; }
.faq-item__a ol li { counter-increment: li; position: relative; padding-left: 28px; }
.faq-item__a ol li::before {
  content: counter(li); position: absolute; left: 0; top: 3px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent-soft); color: var(--link);
  font-size: 12px; font-weight: 700; line-height: 20px; text-align: center;
}
.faq-item.is-hidden, .faq-group.is-hidden { display: none; }
.faq-item:target .faq-item__q { color: var(--link); }
.faq-empty { display: none; padding: 48px 0; text-align: center; color: var(--text-2); }
.faq-empty.is-shown { display: block; }
.faq-contact { margin-top: 64px; }

/* 17. Changelog ============================================================ */
.timeline { position: relative; }
.release {
  position: relative;
  padding: 0 0 56px 44px;
}
.release::before {
  content: ""; position: absolute; left: 7px; top: 12px; bottom: 0;
  width: 2px; background: var(--border);
}
.release:last-child::before { bottom: auto; height: 0; }
.release__dot {
  position: absolute; left: 0; top: 6px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--border);
}
.release--latest .release__dot { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }
.release__head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.release__title { font-size: 24px; font-weight: 600; letter-spacing: -.02em; }
.release__date { display: block; margin-top: 4px; color: var(--text-2); font-size: 14px; }
.release__intro { margin-top: 14px; font-size: 16.5px; }
.release__card {
  margin-top: 18px; padding: 22px 24px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.release__block + .release__block { margin-top: 18px; }
.release__label { margin-bottom: 10px; }
.release__list { display: grid; gap: 8px; }
.release__list li { position: relative; padding-left: 20px; font-size: 15.5px; line-height: 1.55; }
.release__list li::before {
  content: ""; position: absolute; left: 3px; top: .62em;
  width: 6px; height: 6px; border-radius: 50%; background: var(--text-2); opacity: .5;
}
.release__actions { margin-top: 18px; }

/* 18. 404 ================================================================== */
.not-found { padding: 110px 0 130px; text-align: center; }
.not-found__ghost {
  display: inline-flex; align-items: center; justify-content: center;
  width: 120px; height: 120px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  animation: float 4s ease-in-out infinite;
}
.not-found__ghost .icon { width: 58px; height: 58px; stroke-width: 1.6; }
.not-found__shadow {
  width: 80px; height: 10px; margin: 18px auto 0; border-radius: 50%;
  background: var(--text); opacity: .08;
  animation: shadow 4s ease-in-out infinite;
}
.not-found__code { margin-top: 28px; font-size: 15px; font-weight: 600; color: var(--text-2); letter-spacing: .1em; }
.not-found__title { margin-top: 8px; font-size: clamp(28px, 4vw, 40px); font-weight: 700; letter-spacing: -.02em; }
.not-found p { max-width: 460px; margin: 14px auto 32px; color: var(--text-2); font-size: 17px; }
@keyframes float { 50% { transform: translateY(-14px); } }
@keyframes shadow { 50% { transform: scaleX(.75); opacity: .05; } }

/* 19. Motion =============================================================== */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .8s ease, transform .9s var(--ease);
  transition-delay: calc(var(--d, 0) * 90ms);
}
.js [data-reveal].is-visible { opacity: 1; transform: none; }

.js .icon--draw { opacity: 0; transition: opacity .3s ease calc(var(--d, 0) * 90ms + 150ms); }
.js .icon--draw > * {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 1.3s cubic-bezier(.6, 0, .2, 1) calc(var(--d, 0) * 90ms + 200ms);
}
.js .is-visible .icon--draw { opacity: 1; }
.js .is-visible .icon--draw > * { stroke-dashoffset: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
  .js .icon--draw, .js .icon--draw > * { opacity: 1; stroke-dashoffset: 0; }
}

/* 20. Responsive =========================================================== */
@media (max-width: 1180px) {
  .callout--ghost { left: 0; }
  .callout--delete { left: 0; }
  .callout--edit { left: auto; right: 0; }
}

@media (max-width: 1024px) {
  .hero__inner { grid-template-columns: 1fr; text-align: center; gap: 56px; }
  .hero__logo { margin-left: auto; margin-right: auto; }
  .hero__lead { margin-left: auto; margin-right: auto; }
  .hero__actions, .hero__perks, .hero__meta { justify-content: center; }

  .demo { flex-direction: column; align-items: center; gap: 20px; }
  .demo__callouts { position: static; display: grid; gap: 10px; width: 100%; max-width: 380px; }
  .callout { position: static; width: auto; text-align: left; }

  .spotlight__inner { grid-template-columns: 1fr; gap: 48px; }
  .spotlight--reverse .spotlight__copy { order: 0; }
  .spotlight__copy { text-align: center; }
  .spotlight__copy .section-lead { margin-left: auto; margin-right: auto; }
  .spotlight__points { justify-content: center; text-align: left; max-width: 440px; margin-left: auto; margin-right: auto; }

  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .docs { grid-template-columns: 1fr; gap: 32px; }
  .side-nav { position: static; display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .side-nav::-webkit-scrollbar { display: none; }
  .side-nav__title { display: none; }
  .side-nav__link { flex: none; border: 1px solid var(--border); border-radius: 20px; padding: 7px 14px; }
}

@media (max-width: 900px) {
  .site-nav {
    position: fixed; left: 0; right: 0; top: var(--header-h);
    margin: 0; padding: 8px 16px 20px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .2s ease, transform .25s var(--ease), visibility 0s linear .25s;
  }
  .nav-open .site-nav { opacity: 1; visibility: visible; transform: none; transition: opacity .2s ease, transform .25s var(--ease), visibility 0s; }
  .site-nav__list { flex-direction: column; align-items: stretch; gap: 2px; }
  .site-nav__link { padding: 13px 12px; border-radius: 12px; font-size: 17px; }
  .site-nav__link::after { display: none; }
  .site-nav__link.is-active { background: var(--surface-2); }
  .site-nav__item--mobile { display: block; }
  .nav-toggle { display: inline-flex; }
  .site-header__actions { margin-left: auto; }

  .site-footer__grid { grid-template-columns: repeat(3, 1fr); }
  .site-footer__brand { grid-column: 1 / -1; }

  .why-grid { grid-template-columns: repeat(2, 1fr); gap: 48px 32px; }
  .feature-list { grid-template-columns: 1fr; }
  .release-card { grid-template-columns: 1fr; padding: 32px 28px; }
  .release-card__side { min-width: 0; }
  .dl-hero { grid-template-columns: 1fr; }
  .qr-card { display: none; }
}

@media (max-width: 600px) {
  body { font-size: 15.5px; }
  .container { padding: 0 max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left)); }
  .section { padding: 72px 0; }
  .section-head { margin-bottom: 44px; }
  .site-header__cta { display: none; }
  .hero { padding: 36px 0 64px; }
  .hero__lead { font-size: 18px; }
  .hero__actions .btn { width: 100%; }
  .phone { transform: scale(.92); margin: -24px 0; }
  .why-grid { grid-template-columns: 1fr; gap: 40px; }
  .steps { grid-template-columns: 1fr; }
  .spec { flex-direction: column; align-items: flex-start; gap: 4px; }
  .spec dd { text-align: left; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; gap: 32px 24px; }
  .page-head { padding: 44px 0 36px; }
  .faq-item__anchor { display: none; }
  .release { padding-left: 32px; }
  .compare { margin-top: 72px; }
  .dl-hero__app { flex-direction: column; align-items: flex-start; gap: 16px; }
}
