/* =========================================================
   Alma Planner — концепт главной страницы
   Палитра из интерфейса Alma: молочный фон, графитовый текст,
   приглушённый сливовый, коралловый акцент логотипа.
   Шрифты: Literata (заголовки) + Golos Text (интерфейс) —
   обе гарнитуры с полной кириллицей.
   ========================================================= */

:root {
  color-scheme: light;

  --cream:      #f6f3ee;
  --cream-2:    #fbf9f5;
  --paper:      #fffdfa;
  --ink:        #191b20;
  --ink-2:      #33363e;

  /* приглушённые тона затемнены под кремовый фон,
     чтобы мелкий текст проходил по контрасту AA */
  --muted:      #575c6b;
  --muted-2:    #6c7180;

  --line:       #e4dfd7;
  --line-soft:  #eeeae3;

  --plum:       #635c6c;
  --plum-deep:  #4c4655;
  --plum-soft:  #e7d9dd;
  --plum-wash:  #f3edef;

  --coral:      #c8634a;   /* фирменный акцент, логотип */
  --coral-btn:  #b0503a;   /* затемнён для белого текста на кнопке */
  --coral-hov:  #9c452f;
  --coral-wash: #f6e4dd;

  --ok:         #3f6b51;
  --ok-wash:    #e5efe8;

  /* тёмный якорь страницы */
  --night:      #21232a;
  --night-2:    #2a2d36;
  --night-line: #3a3d47;
  --on-night:   #f4f1ea;
  --on-night-2: #b3b7c2;

  --r-xl: 30px;
  --r-lg: 22px;
  --r-md: 16px;
  --r-sm: 11px;

  --shadow-xl: 0 40px 90px -32px rgba(31, 27, 24, .30), 0 8px 24px -10px rgba(31, 27, 24, .10);
  --shadow-lg: 0 26px 60px -26px rgba(31, 27, 24, .26);
  --shadow-md: 0 14px 34px -16px rgba(31, 27, 24, .20);
  --shadow-sm: 0 4px 14px -6px rgba(31, 27, 24, .14);

  --font-ui: "Golos Text", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-dis: Literata, "PT Serif", Georgia, "Times New Roman", serif;

  --shell: 1200px;
  --gut: clamp(18px, 4vw, 44px);
  --ease: cubic-bezier(.22, .68, .32, 1);
}

/* ---------- база ---------- */
*, *::before, *::after { box-sizing: border-box; }

/* Атрибут hidden должен побеждать любые display из этой таблицы стилей
   (иначе .modal-root с display:grid и .mobile-menu с display:block
   остаются видимыми, несмотря на hidden). */
[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { max-width: 100%; }
button { font: inherit; color: inherit; }
a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-dis);
  font-weight: 500;
  letter-spacing: -.015em;
  line-height: 1.16;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(33px, 4.2vw, 54px); line-height: 1.1; }
h2 { font-size: clamp(27px, 3.2vw, 40px); }
h3 { font-size: clamp(19px, 1.6vw, 22px); line-height: 1.26; }
h4 { font-size: 13px; font-family: var(--font-ui); font-weight: 600; letter-spacing: .07em; text-transform: uppercase; }

p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
em { font-style: normal; }

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gut);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--ink);
  color: var(--cream);
  padding: 12px 18px;
  border-radius: 0 0 var(--r-sm) 0;
  text-decoration: none;
}
.skip-link:focus { left: 0; }

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

/* ---------- фон ----------
   Четыре слоя: тёплый градиент, тонкая точечная сетка,
   两 больших дуги-эха логотипа и еле заметное бумажное зерно. */
.bg-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  background:
    linear-gradient(178deg, #fbf8f3 0%, var(--cream) 32%, #f3efe8 100%);
}

.bg-dots {
  position: absolute;
  inset: -5%;
  background-image: radial-gradient(circle, rgba(25, 27, 32, .085) .9px, transparent 1px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse 78% 58% at 50% 16%, #000 0%, transparent 76%);
  mask-image: radial-gradient(ellipse 78% 58% at 50% 16%, #000 0%, transparent 76%);
}

/* большой знак Alma в фоне */
.bg-mark {
  position: absolute;
  top: -20vw;
  right: -18vw;
  width: 76vw;
  height: 76vw;
  overflow: visible;
}
.bg-mark circle { fill: none; }
.bg-ring       { stroke: rgba(99, 92, 108, .20); stroke-width: 1.15; }
.bg-ring-inner { stroke: rgba(99, 92, 108, .13); stroke-width: .6; }
/* .bg-mark .bg-dot, а не просто .bg-dot: иначе правило `.bg-mark circle { fill: none }`
   перебивает заливку по специфичности и точка пропадает */
.bg-mark .bg-dot { fill: rgba(200, 99, 74, .34); stroke: none; }

/* дуга знака — её угол задаёт скрипт при прокрутке */
.bg-arc {
  stroke: rgba(200, 99, 74, .3);
  stroke-width: 1.15;
  stroke-linecap: butt;
  /* длина сегмента повторяет пропорцию логотипа: ~26 % окружности */
  stroke-dasharray: 72 205;
  transform: rotate(var(--arc-turn, 0deg));
  transform-origin: 50px 50px;
  transform-box: view-box;
  will-change: transform;
}

.bg-bloom {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
}
.bloom-a {
  width: 44vw; height: 44vw;
  top: -14vw; right: -8vw;
  background: radial-gradient(circle, rgba(231, 217, 221, .78), transparent 68%);
}
.bloom-b {
  width: 40vw; height: 40vw;
  top: 34vw; left: -16vw;
  background: radial-gradient(circle, rgba(246, 228, 221, .55), transparent 68%);
}

/* бумажное зерно */
.bg-grain {
  position: absolute;
  inset: 0;
  opacity: .05;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- логотип ---------- */
.alma-logo { display: block; width: 100%; height: 100%; overflow: visible; }
.logo-ring { fill: none; stroke: var(--ink); stroke-width: 7.4; }
.logo-arc {
  fill: none;
  stroke: var(--coral);
  stroke-width: 7.4;
  stroke-linecap: butt;
  stroke-dasharray: 53 148;
  transform-origin: 50px 50px;
  transform-box: view-box;
  animation: logo-spin 9s linear infinite;
}
.logo-dot { fill: var(--coral); }
@keyframes logo-spin { to { transform: rotate(360deg); } }

/* ---------- кнопки ---------- */
.btn {
  --btn-pad: 11px 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: var(--btn-pad);
  border-radius: 100px;
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -.003em;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .22s var(--ease), background-color .22s var(--ease),
              box-shadow .22s var(--ease), border-color .22s var(--ease), color .22s var(--ease);
}
.btn:active { transform: translateY(1px) scale(.995); }

/* коралловый — единственный цвет действия */
.btn-solid {
  background: var(--coral-btn);
  color: #fff;
  box-shadow: 0 12px 26px -12px rgba(176, 80, 58, .6);
}
.btn-solid:hover { background: var(--coral-hov); box-shadow: 0 18px 36px -14px rgba(176, 80, 58, .66); transform: translateY(-1px); }

.btn-line {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.btn-line:hover { border-color: var(--plum); background: var(--plum-wash); }

.btn-ghost {
  background: transparent;
  color: var(--ink-2);
  padding: 10px 14px;
}
.btn-ghost:hover { color: var(--ink); background: rgba(99, 92, 108, .1); }

.btn-quiet {
  background: rgba(255, 253, 250, .72);
  border-color: var(--line);
  color: var(--ink);
  backdrop-filter: blur(6px);
}
.btn-quiet:hover { background: var(--paper); border-color: var(--plum-soft); transform: translateY(-1px); }
.btn-quiet .ico { transition: transform .24s var(--ease); }
.btn-quiet:hover .ico { transform: translateX(3px); }

.btn-lg { --btn-pad: 15px 26px; font-size: 16px; }
.btn-wide { width: 100%; }

.ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ico-xs { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.5; }

/* ---------- шапка ---------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 90;
  transition: background-color .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-head.is-stuck {
  background: rgba(246, 243, 238, .84);
  backdrop-filter: blur(16px) saturate(120%);
  border-bottom-color: var(--line-soft);
  box-shadow: 0 10px 30px -24px rgba(31, 27, 24, .5);
}

.head-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  flex: 0 0 auto;
}
.brand-mark { width: 30px; height: 30px; flex: 0 0 auto; }
.brand-word {
  font-family: var(--font-dis);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -.025em;
}
.brand-word em { color: var(--plum); font-weight: 400; }

.head-nav {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-inline: auto;
}
.head-nav a {
  padding: 8px 11px;
  border-radius: 100px;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color .2s var(--ease), background-color .2s var(--ease);
}
.head-nav a:hover { color: var(--ink); background: rgba(99, 92, 108, .09); }
.head-nav a.is-current { color: var(--ink); background: rgba(99, 92, 108, .11); }

.head-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }

.burger {
  display: none;
  width: 42px; height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  cursor: pointer;
  padding: 0;
  place-items: center;
}
.burger span {
  display: block;
  width: 17px; height: 1.6px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .25s var(--ease), opacity .2s var(--ease);
}
.burger span + span { margin-top: 5px; }
.burger[aria-expanded="true"] span:first-child { transform: translateY(3.3px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: translateY(-3.3px) rotate(-45deg); }

.mobile-menu {
  display: none;
  padding: 8px var(--gut) 22px;
  background: rgba(251, 249, 245, .97);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.mobile-menu nav { display: grid; gap: 2px; padding-bottom: 14px; }
.mobile-menu nav a {
  padding: 11px 4px;
  font-size: 16px;
  text-decoration: none;
  color: var(--ink-2);
  border-bottom: 1px solid var(--line-soft);
}
.mobile-menu-cta { display: grid; gap: 9px; }

/* ---------- секции ---------- */
.section { padding-block: clamp(62px, 7.6vw, 116px); }

.sec-head { max-width: 620px; margin-bottom: clamp(34px, 4vw, 54px); }
.sec-head-wide { max-width: 700px; }

.sec-kicker {
  display: inline-flex;
  align-items: center;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--plum);
  margin-bottom: 14px;
}
.sec-lede { margin-top: 16px; color: var(--muted); font-size: clamp(16px, 1.3vw, 18px); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 15px 7px 11px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: rgba(255, 253, 250, .74);
  font-size: 13px;
  color: var(--ink-2);
  margin-bottom: 22px;
}
.eyebrow-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 4px var(--coral-wash);
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }

/* зеркаление: на широком экране визуал уходит влево,
   на узком порядок остаётся естественным — сначала текст */
@media (min-width: 1081px) {
  .mirror > :first-child { order: 2; }
}

/* ==================== ПЕРВЫЙ ЭКРАН ==================== */
.hero { padding-top: clamp(32px, 4.6vw, 62px); padding-bottom: clamp(52px, 6.6vw, 92px); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  gap: clamp(30px, 5vw, 62px);
  align-items: center;
}

/* min-width: 0 — иначе min-content макета растягивает общую колонку */
.hero-copy, .hero-stage { min-width: 0; }
.hero-copy h1 em { font-style: italic; color: var(--plum-deep); }
.lede {
  margin-top: 20px;
  font-size: clamp(16.5px, 1.35vw, 18.5px);
  color: var(--muted);
  max-width: 46ch;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 30px; }

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 26px;
  font-size: 13.5px;
  color: var(--muted);
}
.hero-facts li { display: flex; align-items: center; gap: 8px; }
.hero-facts li::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--plum-soft);
  box-shadow: inset 0 0 0 1px var(--plum);
}

/* макет кабинета */
.hero-stage { position: relative; }

.app-window {
  position: relative;
  border-radius: var(--r-xl);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  transform: perspective(1600px) rotateY(-3.2deg) rotateX(1.4deg);
  transition: transform .8s var(--ease);
}
.app-window:hover { transform: perspective(1600px) rotateY(-1deg) rotateX(.4deg); }

.app-chrome {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--cream-2);
}
.dots { display: inline-flex; gap: 6px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.dots i:first-child { background: var(--coral-wash); }
.url-pill b { font-weight: 600; color: var(--ink-2); }
.url-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 13px;
  border-radius: 100px;
  background: var(--paper);
  border: 1px solid var(--line-soft);
  font-size: 11.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-body { display: grid; grid-template-columns: 150px minmax(0, 1fr); }

.app-rail {
  display: grid;
  align-content: start;
  gap: 2px;
  min-width: 0;
  padding: 16px 12px;
  background: var(--cream-2);
  border-right: 1px solid var(--line-soft);
}
.rail-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 9px;
  border-radius: 9px;
  font-size: 12px;
  color: var(--muted);
}
.rail-item.is-active { background: var(--paper); color: var(--ink); box-shadow: var(--shadow-sm); font-weight: 500; }
.rail-ico {
  width: 15px; height: 15px;
  border-radius: 4px;
  border: 1.4px solid currentColor;
  opacity: .55;
  flex: 0 0 auto;
}
.rail-item.is-active .rail-ico { opacity: 1; border-color: var(--coral); }
.ri-list { border-radius: 3px; border-width: 1.4px 1.4px 1.4px 3px; }
.ri-tag { border-radius: 50% 4px 4px 4px; }
.ri-user { border-radius: 50%; }
.ri-chart { border-radius: 3px 3px 0 0; border-bottom-width: 3px; }
.ri-paint { border-radius: 50% 50% 4px 50%; }
.ri-card  { border-radius: 3px; border-width: 1.4px 1.4px 3px 1.4px; }
.ri-plug  { border-radius: 4px 4px 50% 50%; }
.ri-chat  { border-radius: 5px 5px 5px 1px; }
.ri-help  { border-radius: 50%; border-style: dashed; }

.rail-plan {
  display: grid;
  gap: 1px;
  margin-top: 10px;
  padding: 9px 10px;
  border-radius: 11px;
  background: var(--paper);
  border: 1px solid var(--line-soft);
}
.rail-plan em { font-size: 9px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.rail-plan b { font-family: var(--font-dis); font-size: 15px; font-weight: 500; }
.rail-plan i { font-size: 10px; font-style: normal; color: var(--muted); }

.app-main { padding: 18px 20px 22px; min-width: 0; }
.app-main-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.app-kicker { display: block; font-size: 11px; letter-spacing: .09em; text-transform: uppercase; color: var(--muted-2); }
.app-main-head strong { font-family: var(--font-dis); font-size: 19px; font-weight: 500; }

.chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  border-radius: 100px;
  font-size: 11.5px;
  white-space: nowrap;
}
.chip-soft { background: var(--plum-wash); color: var(--plum-deep); border: 1px solid var(--plum-soft); }

.week-strip {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  margin: 15px 0 14px;
}
.week-strip span {
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 7px 2px;
  border-radius: 11px;
  border: 1px solid var(--line-soft);
  font-size: 10px;
  color: var(--muted);
  background: var(--cream-2);
}
.week-strip b { font-size: 14px; color: var(--ink-2); font-weight: 500; }
.week-strip .is-today { background: var(--ink); border-color: var(--ink); color: rgba(255,255,255,.72); }
.week-strip .is-today b { color: #fff; }
.week-strip .is-off { opacity: .5; }

.app-appts { display: grid; gap: 7px; }
.appt {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  border-radius: 14px;
  border: 1px solid var(--line-soft);
  background: var(--cream-2);
}
.appt-time { font-size: 12.5px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.appt-body { display: grid; min-width: 0; }
.appt-body b { font-size: 13.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appt-body em { font-size: 11.5px; color: var(--muted); }
.appt-free { border-style: dashed; border-color: var(--line); background: transparent; }

.tag {
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 10.5px;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--muted);
  white-space: nowrap;
}
.tag-ok { background: var(--ok-wash); border-color: transparent; color: var(--ok); }
.tag-plum { background: var(--plum-wash); border-color: var(--plum-soft); color: var(--plum-deep); }
.tag-line { background: transparent; }

.float-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0;
  padding: 11px 16px 11px 12px;
  border-radius: 100px;
  background: rgba(255, 253, 250, .93);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(10px);
  animation: float-in .9s var(--ease) both;
}
.float-card figcaption { display: grid; }
.float-card b { font-size: 12.5px; font-weight: 600; }
.float-card span { font-size: 11px; color: var(--muted); white-space: nowrap; }

.float-tg { left: -12px; bottom: 44px; animation-delay: .5s; }
.float-note { right: -6px; top: -18px; animation-delay: .8s; }

.tg-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(150deg, #7db4dc, #4b8fc0);
  flex: 0 0 auto;
}
.ico-tg { width: 16px; height: 16px; fill: #fff; }

.note-arc { width: 28px; height: 28px; flex: 0 0 auto; }
.note-arc svg { width: 100%; height: 100%; }
.na-bg { fill: none; stroke: var(--plum-soft); stroke-width: 4; }
.na-fg {
  fill: none; stroke: var(--coral); stroke-width: 4; stroke-linecap: round;
  stroke-dasharray: 88; stroke-dashoffset: 26;
  transform: rotate(-90deg); transform-origin: 18px 18px; transform-box: view-box;
}

@keyframes float-in {
  from { opacity: 0; transform: translateY(14px) scale(.96); }
  to { opacity: 1; transform: none; }
}

/* ==================== КОМУ ПОДХОДИТ ==================== */
.section-who { padding-block: clamp(28px, 3.4vw, 44px); }
.who-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 26px;
  padding: clamp(18px, 2.2vw, 26px) clamp(20px, 2.6vw, 32px);
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: rgba(255, 253, 250, .6);
}
.who-label {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--plum);
  flex: 0 0 auto;
}
.who-list { display: flex; flex-wrap: wrap; gap: 7px; }
.who-list li {
  padding: 6px 14px;
  border-radius: 100px;
  border: 1px solid var(--line-soft);
  background: var(--cream-2);
  font-size: 13.5px;
  color: var(--ink-2);
}
.who-more { font-size: 13px; color: var(--muted); margin-left: auto; }

/* ==================== КАК РАБОТАЕТ ==================== */
.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.step {
  background: var(--cream-2);
  padding: clamp(22px, 2.4vw, 32px) clamp(18px, 2vw, 26px);
  transition: background-color .3s var(--ease);
}
.step:hover { background: var(--paper); }
.step-num {
  display: inline-block;
  font-family: var(--font-dis);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .09em;
  color: var(--coral);
  margin-bottom: 16px;
}
.step h3 { margin-bottom: 9px; }
.step p { font-size: 14.5px; color: var(--muted); }

/* ==================== ОНЛАЙН-ЗАПИСЬ ==================== */
.booking-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr);
  gap: clamp(30px, 5vw, 68px);
  align-items: center;
}

.check-list { display: grid; gap: 11px; margin-top: 26px; }
.check-list li {
  position: relative;
  padding-left: 30px;
  font-size: 15.5px;
  color: var(--ink-2);
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 8px;
  width: 15px; height: 15px;
  border-radius: 50%;
  border: 1.5px solid var(--plum-soft);
  background: radial-gradient(circle at 50% 50%, var(--coral) 0 2.4px, transparent 2.8px);
}
.check-list-tight li { font-size: 14.5px; }

.demo-hint {
  margin-top: 26px;
  font-size: 13.5px;
  color: var(--plum);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.demo-hint::before { content: ""; width: 22px; height: 1px; background: var(--plum-soft); }

/* мини-сайт — одна страница, как в настоящем Alma */
.mini-site {
  border-radius: var(--r-xl);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}
.ms-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--cream-2);
}
.ms-logo { width: 28px; height: 28px; flex: 0 0 auto; }
.ms-title { display: grid; margin-right: auto; }
.ms-title b { font-family: var(--font-dis); font-size: 16px; font-weight: 600; }
.ms-title span { font-size: 11.5px; color: var(--muted); }
.ms-reset {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 100px;
  padding: 6px 14px;
  font-size: 12.5px;
  font-family: inherit;
  color: var(--muted);
  cursor: pointer;
  transition: color .2s, border-color .2s;
}
.ms-reset:hover { color: var(--ink); border-color: var(--plum); }

/* обложка кабинета — своя у каждого */
.ms-cover {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 152px;
  padding: 16px 18px;
  overflow: hidden;
  background:
    radial-gradient(85% 120% at 84% -14%, rgba(255, 255, 255, .85), transparent 58%),
    radial-gradient(70% 110% at 12% 108%, color-mix(in srgb, var(--coral-wash) 82%, transparent), transparent 62%),
    linear-gradient(116deg, var(--plum-wash) 4%, #fbf7f2 52%, var(--coral-wash) 100%);
  border-bottom: 1px solid var(--line-soft);
}
.ms-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(196deg, rgba(255, 255, 255, .5), transparent 42%);
  pointer-events: none;
}

.ms-cover-brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; }
.ms-cover-logo {
  width: 46px; height: 46px;
  flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 14px;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-dis);
  font-size: 22px;
  font-weight: 500;
  box-shadow: var(--shadow-md);
}
.ms-cover-name { display: grid; gap: 1px; min-width: 0; }
.ms-cover-name b { font-family: var(--font-dis); font-size: 19px; font-weight: 600; letter-spacing: -.02em; }
.ms-cover-name em { font-size: 12px; color: var(--muted); font-style: normal; }

.ms-cover-badge {
  position: absolute;
  z-index: 1;
  top: 12px; right: 12px;
  padding: 4px 11px;
  border-radius: 100px;
  background: rgba(255, 253, 250, .82);
  border: 1px dashed var(--line);
  font-size: 10.5px;
  color: var(--muted);
  backdrop-filter: blur(4px);
}

.ms-caption {
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
}

.ms-stage { padding: 18px 20px 22px; }
.ms-page { display: grid; gap: 16px; animation: step-in .3s var(--ease) both; }

/* карточка направления */
.ms-intro { display: grid; gap: 8px; }
.ms-intro-text { font-size: 13.5px; color: var(--muted); }
.ms-place { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); }
.ms-place-ico {
  width: 13px; height: 13px;
  border-radius: 50% 50% 50% 2px;
  border: 1.5px solid var(--ms-accent, var(--coral));
  transform: rotate(-45deg);
  flex: 0 0 auto;
}
.ms-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.ms-act {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 100px;
  border: 1px solid var(--line);
  background: var(--cream-2);
  color: inherit;
  font-size: 13px;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: all .2s var(--ease);
}
.ms-act:hover { border-color: var(--plum); background: var(--plum-wash); }

.ms-contact-menu, .ms-file-view {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--line-soft);
  background: var(--cream-2);
  animation: step-in .25s var(--ease) both;
}
.ms-contact-row { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; }
.ms-contact-row b { font-weight: 500; }
.ms-contact-row span { color: var(--muted); }
.ms-file-view b { font-size: 13px; }
.ms-file-view p { font-size: 12.5px; color: var(--muted); }

/* поле с подписью */
.ms-field { display: grid; gap: 7px; }
.ms-label { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }

/* услуги */
.ms-services { display: grid; gap: 7px; }
.ms-svc {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  border: 1px solid color-mix(in srgb, var(--ms-accent, var(--plum)) 26%, transparent);
  background: var(--ms-soft, var(--plum-wash));
}
.ms-svc-main { display: grid; margin-right: auto; min-width: 0; }
.ms-svc-main b { font-size: 14px; font-weight: 500; }
.ms-svc-main em { font-size: 11.5px; color: var(--muted); }
.ms-svc-price { font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.ms-svc-x {
  width: 24px; height: 24px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--muted);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition: all .2s var(--ease);
}
.ms-svc-x:hover { color: var(--coral-btn); border-color: var(--coral); }

.ms-add {
  padding: 11px 14px;
  border-radius: var(--r-md);
  border: 1px dashed var(--line);
  background: transparent;
  font-size: 13.5px;
  font-family: inherit;
  color: var(--plum-deep);
  cursor: pointer;
  text-align: left;
  transition: all .2s var(--ease);
}
.ms-add:hover { border-color: var(--plum); background: var(--cream-2); }

.ms-svc-pick { display: grid; gap: 6px; animation: step-in .25s var(--ease) both; }
.ms-svc-opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--line-soft);
  background: var(--cream-2);
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  transition: all .2s var(--ease);
}
.ms-svc-opt:hover { border-color: var(--plum); background: var(--paper); }
.ms-svc-opt span { display: grid; min-width: 0; }
.ms-svc-opt b { font-size: 13.5px; font-weight: 500; }
.ms-svc-opt em { font-size: 11.5px; color: var(--muted); font-style: normal; }
.ms-svc-opt i { font-size: 13px; font-weight: 600; font-style: normal; white-space: nowrap; }
.ms-svc-sum { font-size: 12.5px; color: var(--muted); padding-top: 2px; }

/* выпадающие списки */
.ms-select { position: relative; display: grid; gap: 6px; }
.ms-select-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  transition: border-color .2s var(--ease);
}
.ms-select-btn:hover { border-color: var(--plum); }
.ms-caret {
  width: 8px; height: 8px;
  flex: 0 0 auto;
  border-right: 1.6px solid var(--muted);
  border-bottom: 1.6px solid var(--muted);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform .22s var(--ease);
}
.ms-select-btn[aria-expanded="true"] .ms-caret { transform: rotate(225deg) translate(-2px, -2px); }
.ms-options {
  display: grid;
  gap: 3px;
  padding: 5px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow-md);
  animation: step-in .22s var(--ease) both;
}
.ms-option {
  padding: 9px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  font-size: 13.5px;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color .18s var(--ease);
}
.ms-option:hover { background: var(--cream-2); }
.ms-option.is-on { background: var(--ms-soft, var(--plum-wash)); font-weight: 500; }

/* календарь месяца */
.ms-cal {
  padding: 12px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--cream-2);
}
.ms-cal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.ms-cal-title { font-size: 13.5px; font-weight: 500; }
.ms-cal-nav {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition: all .2s var(--ease);
}
.ms-cal-nav:hover:not(:disabled) { border-color: var(--plum); background: var(--plum-wash); }
.ms-cal-nav:disabled { opacity: .35; cursor: not-allowed; }

.ms-cal-wd, .ms-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  /* иначе на широкой колонке квадратные ячейки вырастают до нелепых размеров */
  max-width: 340px;
  margin-inline: auto;
}
.ms-cal-wd { margin-bottom: 4px; }
.ms-cal-wd span { text-align: center; font-size: 10px; color: var(--muted); }
.ms-cal-pad { display: block; }
.ms-cal-day {
  position: relative;
  aspect-ratio: 1;
  border-radius: 9px;
  border: 1px solid transparent;
  background: var(--paper);
  font-size: 12.5px;
  font-family: inherit;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
  cursor: pointer;
  transition: all .18s var(--ease);
}
.ms-cal-day:hover:not(:disabled) { border-color: var(--plum); }
.ms-cal-day.is-none { background: transparent; color: var(--muted-2); opacity: .5; cursor: not-allowed; }
.ms-cal-day.is-today { border-color: var(--line); font-weight: 600; }
.ms-cal-day.is-sel { background: var(--ms-accent, var(--ink)); border-color: var(--ms-accent, var(--ink)); color: #fff; font-weight: 600; }
.ms-cal-mark {
  background: var(--ms-accent, var(--coral));
  position: absolute;
  left: 50%; bottom: 3px;
  width: 3.5px; height: 3.5px;
  margin-left: -1.75px;
  border-radius: 50%;
  background: var(--coral);
}
.ms-cal-day.is-sel .ms-cal-mark { background: var(--coral-wash); }

/* свободное время */
.ms-times { display: grid; }
.ms-slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 6px; }
.ms-slot {
  padding: 10px 6px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 13.5px;
  font-family: inherit;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: all .18s var(--ease);
}
.ms-slot:hover { border-color: var(--ink); }
.ms-slot.is-on { background: var(--ms-accent, var(--ink)); border-color: var(--ms-accent, var(--ink)); color: #fff; font-weight: 500; }
.ms-hint-inline {
  font-size: 13px;
  color: var(--muted);
  padding: 14px;
  border-radius: var(--r-md);
  border: 1px dashed var(--line);
  text-align: center;
}

/* контакты клиента и согласие */
.ms-fields { display: grid; gap: 8px; }
.ms-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 14.5px;
  font-family: inherit;
  color: var(--ink);
}
.ms-input::placeholder { color: var(--muted-2); }
.ms-input:focus { outline: none; border-color: var(--plum); box-shadow: 0 0 0 3px var(--plum-wash); }

.ms-agree { display: flex; align-items: flex-start; gap: 10px; font-size: 12.5px; color: var(--muted); cursor: pointer; }
.ms-agree input {
  width: 17px; height: 17px;
  flex: 0 0 auto;
  margin-top: 1px;
  accent-color: var(--coral-btn);
  cursor: pointer;
}

.mini-site .btn-solid { background: var(--ms-accent, var(--coral-btn)); box-shadow: none; }
.mini-site .btn-solid:hover { filter: brightness(.92); background: var(--ms-accent, var(--coral-btn)); }

.ms-recalc {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
  padding-left: 11px;
  border-left: 2px solid var(--ms-accent, var(--plum-soft));
}
.ms-hint { font-size: 12.5px; color: var(--muted); text-align: center; }
.btn.is-off { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn.is-off:hover { background: var(--coral-btn); transform: none; }

/* готовая запись */
.ms-booked-head { display: grid; gap: 4px; }
.ms-booked-tag {
  justify-self: start;
  padding: 4px 11px;
  border-radius: 100px;
  background: var(--ok-wash);
  color: var(--ok);
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.ms-booked-head b { font-family: var(--font-dis); font-size: 20px; font-weight: 500; }
.ms-booked-acts { display: flex; gap: 8px; }
.ms-booked-acts .btn { flex: 1 1 auto; }

.ms-summary {
  display: grid;
  gap: 9px;
  padding: 15px;
  border-radius: var(--r-md);
  background: var(--cream-2);
  border: 1px solid var(--line-soft);
}
.ms-summary div { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; }
.ms-summary span:first-child { color: var(--muted); }
.ms-summary span:last-child { font-weight: 500; text-align: right; }

.ms-tg-card {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: var(--cream-2);
  border: 1px solid var(--line-soft);
  text-align: left;
}
.ms-tg-head { display: flex; align-items: center; gap: 9px; font-size: 12px; color: var(--muted); }
.ms-tg-head .tg-avatar { width: 22px; height: 22px; }
.ms-tg-head .ico-tg { width: 12px; height: 12px; }
.ms-tg-msg { font-size: 13.5px; }
.ms-tg-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.ms-tg-btns span {
  padding: 6px 12px;
  border-radius: 9px;
  background: var(--paper);
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-2);
}
/* ==================== КАЛЕНДАРЬ ==================== */
.cal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.24fr) minmax(0, .76fr);
  gap: clamp(20px, 2.6vw, 34px);
  align-items: start;
}

.cal-board {
  /* min-width: 0 — иначе элемент грид-раскладки растягивается
     под min-content внутренней прокручиваемой сетки */
  min-width: 0;
  border-radius: var(--r-xl);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  padding: clamp(18px, 2.2vw, 26px);
}
.cal-step-note { font-size: 12.5px; color: var(--muted); margin-bottom: 16px; }

.cal-setup {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 0;
  border-top: 1px solid var(--line-soft);
}
.cal-setup:first-of-type { border-top: 0; padding-top: 0; }
.cal-step-num {
  width: 24px; height: 24px;
  flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--coral-wash);
  border: 1px solid rgba(200, 99, 74, .3);
  color: var(--coral-btn);
  font-family: var(--font-dis);
  font-size: 13px;
  font-weight: 600;
}
.cal-sub { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 9px; }

.cal-hours { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; font-size: 13.5px; color: var(--muted); }
.cal-time {
  padding: 7px 13px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--cream-2);
  font-size: 13.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.cal-weekdays, .cal-month-wrap { flex: 1 1 auto; min-width: 0; }
.wd-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.wd-pill {
  min-width: 44px;
  padding: 8px 12px;
  border-radius: 100px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-family: inherit;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  transition: all .18s var(--ease);
}
.wd-pill:hover { border-color: var(--plum); }
.wd-pill.is-on { background: var(--ink); border-color: var(--ink); color: var(--cream-2); font-weight: 500; }

.cal-month-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.cal-month-head strong { font-family: var(--font-dis); font-size: 16px; font-weight: 500; margin-right: auto; }

.cal-legend { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); margin-bottom: 10px; flex-wrap: wrap; }
.lg { width: 10px; height: 10px; border-radius: 4px; display: inline-block; margin-left: 8px; }
.lg:first-child { margin-left: 0; }
.lg-work { background: var(--paper); border: 1px solid var(--line); }
.lg-off { background: repeating-linear-gradient(-45deg, var(--line-soft) 0 3px, transparent 3px 6px); border: 1px solid var(--line-soft); }
.lg-has { background: var(--coral); }

.cal-wd-names, .cal-month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  max-width: 400px;
}
.cal-wd-names { margin-bottom: 5px; }
.cal-wd-names span { text-align: center; font-size: 10.5px; color: var(--muted); }
.cal-md-pad { display: block; }
.cal-md-day {
  position: relative;
  aspect-ratio: 1;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-family: inherit;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
  cursor: pointer;
  transition: all .18s var(--ease);
}
.cal-md-day:hover { border-color: var(--plum); }
.cal-md-day.is-off {
  background: repeating-linear-gradient(-45deg, var(--line-soft) 0 4px, transparent 4px 8px);
  border-color: var(--line-soft);
  color: var(--muted-2);
}
.cal-md-mark {
  position: absolute;
  left: 50%; bottom: 4px;
  width: 4px; height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: var(--coral);
}

.cal-result {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
}
.cal-res-cell {
  display: grid;
  gap: 1px;
  padding: 13px 14px;
  border-radius: var(--r-md);
  background: var(--cream-2);
  border: 1px solid var(--line-soft);
}
.cal-res-cell b { font-family: var(--font-dis); font-size: 24px; font-weight: 500; font-variant-numeric: tabular-nums; }
.cal-res-cell span { font-size: 12.5px; }
.cal-res-cell em { font-size: 11.5px; color: var(--muted); font-style: normal; }

.cal-status {
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted);
  min-height: 21px;
}
.cal-status.is-warn { color: var(--coral-btn); }
.cal-status.is-good { color: var(--ok); }

.shake { animation: shake .4s var(--ease); border-color: var(--coral) !important; }
@keyframes shake {
  0%,100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  50% { transform: translateX(4px); }
  75% { transform: translateX(-2px); }
}

.cal-features { display: grid; gap: 10px; }
.feat {
  padding: 20px 22px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--cream-2);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.feat:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.feat h3 { font-size: 17px; margin-bottom: 6px; }
.feat p { font-size: 14px; color: var(--muted); }
.feat-lead { background: var(--plum-wash); border-color: var(--plum-soft); }
.feat-guard { border-color: var(--coral-wash); background: linear-gradient(160deg, var(--coral-wash), var(--cream-2) 70%); }

/* ==================== TELEGRAM — ТЁМНЫЙ ЯКОРЬ ==================== */
.section-telegram {
  background: var(--night);
  color: var(--on-night);
  position: relative;
  overflow: hidden;
}
.section-telegram::before {
  content: "";
  position: absolute;
  top: -34%; left: -12%;
  width: 62vw; height: 62vw;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 92, 108, .34), transparent 66%);
  pointer-events: none;
}
.section-telegram > .shell { position: relative; }
.section-telegram h2 { color: var(--on-night); }
.section-telegram .sec-kicker { color: #c9a89c; }
.section-telegram .sec-lede { color: var(--on-night-2); }
.section-telegram .check-list li { color: #e2e0da; }
.section-telegram .check-list li::before {
  border-color: rgba(231, 217, 221, .34);
  background: radial-gradient(circle at 50% 50%, var(--coral) 0 2.4px, transparent 2.8px);
}
.section-telegram .tg-switch { background: var(--night-2); border-color: var(--night-line); }
.section-telegram .tg-tab { color: var(--on-night-2); }
.section-telegram .tg-tab.is-active { background: var(--on-night); color: var(--night); box-shadow: none; }
.section-telegram .tg-note { color: var(--on-night-2); }

.tg-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .82fr);
  gap: clamp(30px, 5vw, 70px);
  align-items: center;
}

.tg-switch {
  display: inline-flex;
  gap: 3px;
  padding: 4px;
  border-radius: 100px;
  background: var(--cream-2);
  border: 1px solid var(--line);
  margin-top: 26px;
}
.tg-tab, .team-tab, .an-period {
  border: 0;
  background: transparent;
  padding: 8px 18px;
  border-radius: 100px;
  font-size: 14px;
  font-family: inherit;
  color: var(--muted);
  cursor: pointer;
  transition: background-color .25s var(--ease), color .25s var(--ease), box-shadow .25s var(--ease);
}
.tg-tab.is-active, .team-tab.is-active, .an-period.is-active {
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  font-weight: 500;
}

.tg-phone-wrap { display: grid; gap: 14px; justify-items: center; }
.tg-phone {
  width: 100%;
  max-width: 340px;
  border-radius: 32px;
  border: 1px solid rgba(255,255,255,.14);
  background: linear-gradient(180deg, #eef2f5, #e5ebef);
  box-shadow: 0 50px 100px -30px rgba(0,0,0,.6);
  overflow: hidden;
  padding: 8px;
}
.tg-phone-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 26px 26px 12px 12px;
  background: var(--paper);
  margin-bottom: 6px;
}
.tg-ava {
  width: 34px; height: 34px;
  padding: 5px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--cream-2);
  border: 1px solid var(--line-soft);
  flex: 0 0 auto;
}
.tg-ava .alma-logo { width: 100%; height: 100%; }
.tg-name { display: grid; }
.tg-name b { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.tg-name em { font-size: 11px; color: var(--muted); }

.tg-thread {
  display: grid;
  gap: 8px;
  padding: 12px 10px 16px;
  min-height: 330px;
  align-content: start;
}
.tg-msg {
  max-width: 88%;
  padding: 10px 13px;
  border-radius: 16px 16px 16px 5px;
  background: var(--paper);
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.5;
  box-shadow: var(--shadow-sm);
  animation: msg-in .4s var(--ease) both;
}
.tg-msg.is-out { margin-left: auto; border-radius: 16px 16px 5px 16px; background: #dbeeda; }
.tg-msg b { display: block; font-weight: 600; margin-bottom: 2px; }
.tg-msg small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 3px; }
.tg-actions { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.tg-actions span {
  padding: 6px 11px;
  border-radius: 9px;
  background: var(--cream-2);
  border: 1px solid var(--line-soft);
  font-size: 11.5px;
  color: var(--ink-2);
}
@keyframes msg-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.tg-note { font-size: 12.5px; text-align: center; max-width: 300px; }

/* ==================== ПОМОЩНИК ==================== */
.assist-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
  padding: clamp(28px, 4vw, 52px);
  border-radius: var(--r-xl);
  border: 1px solid var(--line);
  background:
    radial-gradient(120% 120% at 0% 0%, var(--plum-wash), transparent 55%),
    var(--cream-2);
  box-shadow: var(--shadow-lg);
}
.assist-disclaimer {
  margin-top: 20px;
  padding-left: 14px;
  border-left: 2px solid var(--plum-soft);
  font-size: 13.5px;
  color: var(--muted);
}

.assist-demo { display: grid; gap: 10px; min-width: 0; }
.assist-screen {
  min-height: 190px;
  padding: 18px;
  border-radius: var(--r-lg);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  display: grid;
  gap: 10px;
  align-content: start;
}
.assist-empty { font-size: 13.5px; color: var(--muted-2); }
.assist-q {
  justify-self: end;
  max-width: 82%;
  padding: 9px 14px;
  border-radius: 14px 14px 4px 14px;
  background: var(--ink);
  color: var(--cream-2);
  font-size: 13.5px;
  animation: msg-in .3s var(--ease) both;
}
.assist-a {
  max-width: 92%;
  padding: 11px 14px;
  border-radius: 14px 14px 14px 4px;
  background: var(--plum-wash);
  border: 1px solid var(--plum-soft);
  font-size: 13.5px;
  line-height: 1.55;
  animation: msg-in .3s var(--ease) both;
}
.assist-a .cursor {
  display: inline-block;
  width: 7px; height: 14px;
  background: var(--coral);
  vertical-align: -2px;
  animation: blink .9s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.assist-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip-btn {
  padding: 8px 14px;
  border-radius: 100px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  color: var(--ink-2);
  transition: all .2s var(--ease);
}
.chip-btn:hover { border-color: var(--plum); background: var(--plum-wash); }

.assist-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 7px 7px 18px;
  border-radius: 100px;
  background: var(--paper);
  border: 1px solid var(--line);
}
.assist-input { font-size: 14px; color: var(--muted); margin-right: auto; }
.assist-mic {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 0;
  background: var(--ink);
  color: var(--cream);
  display: grid;
  place-items: center;
  cursor: pointer;
  flex: 0 0 auto;
  transition: background-color .2s;
}
.assist-mic:hover { background: var(--plum-deep); }
.assist-mic.is-on { background: var(--coral-btn); animation: pulse 1.4s var(--ease) infinite; }
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(176, 80, 58, .35); }
  50% { box-shadow: 0 0 0 9px rgba(176, 80, 58, 0); }
}
.assist-voicenote { font-size: 12.5px; color: var(--coral-btn); }

/* ==================== КОМАНДА ==================== */
.team-switch {
  display: inline-flex;
  gap: 3px;
  padding: 4px;
  border-radius: 100px;
  background: var(--cream-2);
  border: 1px solid var(--line);
  margin-bottom: 26px;
}

.team-panel {
  display: grid;
  grid-template-columns: minmax(0, .84fr) minmax(0, 1.16fr);
  gap: clamp(26px, 4vw, 52px);
  align-items: center;
  padding: clamp(24px, 3.4vw, 44px);
  border-radius: var(--r-xl);
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow-lg);
}
.team-text h3 { font-size: clamp(21px, 2vw, 26px); margin-bottom: 10px; }
.team-text > p { color: var(--muted); font-size: 15.5px; }

.team-visual { min-width: 0; }

.crew-board {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 14px;
  border-radius: var(--r-lg);
  background: var(--cream-2);
  border: 1px solid var(--line-soft);
  overflow-x: auto;
}
.crew-cols {
  display: grid;
  grid-template-columns: repeat(var(--cols, 1), minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}
.crew-col {
  display: grid;
  gap: 6px;
  align-content: start;
  padding: 12px;
  border-radius: var(--r-md);
  background: var(--paper);
  border: 1px solid var(--line-soft);
  animation: step-in .4s var(--ease) both;
  min-width: 0;
}
.crew-head { display: flex; align-items: center; gap: 9px; margin-bottom: 6px; }
.crew-ava {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--plum-wash);
  border: 1px solid var(--plum-soft);
  color: var(--plum-deep);
  font-size: 13px;
  font-weight: 600;
  flex: 0 0 auto;
}
.crew-head div { display: grid; min-width: 0; }
.crew-head b { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crew-head em { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.crew-slot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 12px;
  background: var(--cream-2);
  border: 1px solid var(--line-soft);
}
.crew-slot i { font-size: 11px; font-style: normal; color: var(--muted); font-variant-numeric: tabular-nums; }
.crew-slot span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crew-slot.is-free { background: transparent; border-style: dashed; color: var(--muted); }
.crew-note { margin-top: 12px; font-size: 12.5px; color: var(--muted); }

/* ==================== АНАЛИТИКА ==================== */
.an-grid {
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  gap: clamp(30px, 5vw, 62px);
  align-items: center;
}
.an-disclaimer { margin-top: 22px; font-size: 13px; color: var(--muted-2); }

.an-board {
  min-width: 0;
  padding: clamp(20px, 2.6vw, 30px);
  border-radius: var(--r-xl);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
}
.an-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
.an-label { font-size: 11px; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.an-periods {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: 100px;
  background: var(--cream-2);
  border: 1px solid var(--line-soft);
}
.an-period { padding: 6px 14px; font-size: 12.5px; }

.an-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 9px;
  margin-bottom: 24px;
}
.an-stat {
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: var(--cream-2);
  border: 1px solid var(--line-soft);
}
.an-stat span { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 5px; }
.an-stat b {
  display: block;
  font-family: var(--font-dis);
  font-size: clamp(21px, 2.1vw, 26px);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.an-delta { font-size: 11.5px; margin-top: 3px; display: inline-flex; align-items: center; gap: 4px; }
.an-delta.up { color: var(--ok); }
.an-delta.down { color: var(--coral-btn); }

.an-chart { display: grid; gap: 8px; }
.an-bars {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: clamp(4px, .8vw, 10px);
  align-items: end;
  height: 150px;
  padding-top: 8px;
  border-bottom: 1px solid var(--line);
}
.an-bar-wrap { display: grid; align-items: end; height: 100%; }
.an-bar {
  border-radius: 7px 7px 2px 2px;
  background: linear-gradient(180deg, var(--plum-soft), #f0e6e9);
  border: 1px solid var(--plum-soft);
  border-bottom: 0;
  transition: height .55s var(--ease);
}
.an-bar.is-peak { background: linear-gradient(180deg, var(--coral), #d87257); border-color: var(--coral); }
.an-axis {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: clamp(4px, .8vw, 10px);
  font-size: 10.5px;
  color: var(--muted);
  text-align: center;
}

/* ==================== ВИТРИНА ==================== */
.front-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}
.front-card {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: clamp(22px, 2.6vw, 30px);
  border-radius: var(--r-xl);
  border: 1px solid var(--line);
  background: var(--cream-2);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.front-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.front-card > p { font-size: 14.5px; color: var(--muted); }
.front-foot { font-size: 12.5px; color: var(--muted); }
.front-contacts { background: linear-gradient(165deg, var(--plum-wash), var(--cream-2) 62%); }

/* оформление мини-сайта */
.front-look { --look: #6d6474; --look-soft: #f0e9ee; --look-field: #f8f4f7; }
.look-preview {
  display: grid;
  border-radius: var(--r-md);
  border: 1px solid var(--line-soft);
  background: var(--paper);
  overflow: hidden;
}
.look-cover {
  display: block;
  height: 56px;
  background: linear-gradient(96deg, var(--look), var(--look-soft) 78%, var(--look-field));
  transition: background .3s var(--ease);
}
.look-body { display: grid; gap: 3px; padding: 12px 14px 14px; }
.look-body b { font-family: var(--font-dis); font-size: 14.5px; font-weight: 600; }
.look-body em { font-size: 11.5px; color: var(--muted); font-style: normal; }
.look-body i {
  justify-self: start;
  margin-top: 8px;
  padding: 7px 16px;
  border-radius: 100px;
  background: var(--look);
  color: #fff;
  font-size: 12px;
  font-style: normal;
  transition: background .3s var(--ease);
}

.look-cap {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
.look-themes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.look-theme {
  height: 26px;
  padding: 0;
  border-radius: 100px;
  border: 2px solid transparent;
  box-shadow: 0 0 0 1px var(--line);
  cursor: pointer;
  /* градиент должен покрывать и прозрачную рамку, иначе картинка
     повторяется и с краю проступает тёмная полоска */
  background-origin: border-box;
  background-repeat: no-repeat;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}
.look-theme:hover { transform: translateY(-1px); }
.look-theme.is-on { border-color: var(--paper); box-shadow: 0 0 0 2px var(--ink); }

.look-own {
  position: relative;
  display: grid;
  gap: 9px;
  padding: 12px 13px;
  border-radius: var(--r-md);
  border: 1px solid var(--line-soft);
  background: var(--paper);
}
.look-own-title { font-size: 12.5px; font-weight: 500; }
.look-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.look-field {
  display: grid;
  gap: 4px;
  padding: 0;
  border: 0;
  background: none;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}
.look-field span { font-size: 10px; color: var(--muted); }
.look-field i {
  display: block;
  height: 24px;
  border-radius: 7px;
  border: 1px solid var(--line);
  transition: box-shadow .18s var(--ease), transform .18s var(--ease);
}
.look-field:hover i { transform: translateY(-1px); }
.look-field.is-open i { box-shadow: 0 0 0 2px var(--ink); }

/* выбор оттенка */
.cp {
  position: absolute;
  top: calc(100% - 6px);
  left: 10px; right: 10px;
  z-index: 6;
  display: grid;
  gap: 9px;
  padding: 11px;
  border-radius: var(--r-md);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xl);
  animation: step-in .2s var(--ease) both;
}
.cp-sv {
  position: relative;
  height: 116px;
  border-radius: 10px;
  cursor: crosshair;
  touch-action: none;
  background:
    linear-gradient(to top, #000, rgba(0, 0, 0, 0)),
    linear-gradient(to right, #fff, var(--cp-hue, #f00));
}
.cp-hue {
  position: relative;
  height: 16px;
  border-radius: 100px;
  cursor: pointer;
  touch-action: none;
  background: linear-gradient(to right,
    #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
}
.cp-dot {
  position: absolute;
  width: 14px; height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .35);
  pointer-events: none;
}
#cpHueDot { top: 50%; }
.cp-foot { display: flex; align-items: center; gap: 8px; }
.cp-out {
  flex: 1 1 auto;
  height: 32px;
  border-radius: 9px;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .04em;
}
.cp-drop {
  flex: 0 0 auto;
  padding: 8px 14px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--cream-2);
  font-family: inherit;
  font-size: 12.5px;
  cursor: pointer;
  transition: all .18s var(--ease);
}
.cp-drop:hover { border-color: var(--plum); background: var(--plum-wash); }
.cp-drop:disabled { opacity: .5; cursor: not-allowed; }

.contact-toggles { display: grid; gap: 6px; }
.contact-toggles li {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border-radius: 12px;
  background: var(--paper);
  border: 1px solid var(--line-soft);
  font-size: 13.5px;
  transition: opacity .2s;
}
.contact-toggles li.is-off { opacity: .5; }
.ct-name { margin-right: auto; }
.ct-hint { font-size: 11.5px; color: var(--muted); }
.ct-switch {
  width: 36px; height: 21px;
  border-radius: 100px;
  border: 1px solid var(--line);
  background: var(--cream-2);
  padding: 0;
  cursor: pointer;
  position: relative;
  transition: background-color .22s var(--ease), border-color .22s var(--ease);
  flex: 0 0 auto;
}
.ct-switch::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 15px; height: 15px;
  border-radius: 50%;
  background: var(--muted-2);
  transition: transform .22s var(--ease), background-color .22s var(--ease);
}
.ct-switch[aria-checked="true"] { background: var(--coral-btn); border-color: var(--coral-btn); }
.ct-switch[aria-checked="true"]::after { transform: translateX(15px); background: #fff; }

.file-tile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  border-radius: var(--r-md);
  background: var(--paper);
  border: 1px dashed var(--line);
}
.file-ico {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: var(--coral-wash);
  color: var(--coral-btn);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  flex: 0 0 auto;
}
.file-meta { display: grid; min-width: 0; }
.file-meta b { font-size: 13.5px; font-weight: 500; }
.file-meta em { font-size: 11.5px; color: var(--muted); }

.mini-list { display: grid; gap: 6px; }
.mini-list li { position: relative; padding-left: 16px; font-size: 13px; color: var(--muted); }
.mini-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 9px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--plum-soft);
}

.fb-demo {
  padding: 16px;
  border-radius: var(--r-md);
  background: var(--paper);
  border: 1px solid var(--line-soft);
  display: grid;
  gap: 11px;
  min-height: 118px;
  align-content: center;
}
.fb-question { font-size: 13.5px; font-weight: 500; }
.fb-buttons { display: flex; gap: 7px; flex-wrap: wrap; }
.fb-btn {
  padding: 8px 14px;
  border-radius: 100px;
  border: 1px solid var(--line);
  background: var(--cream-2);
  font-size: 12.5px;
  font-family: inherit;
  cursor: pointer;
  transition: all .2s var(--ease);
}
.fb-btn:hover { border-color: var(--plum); background: var(--plum-wash); }
.fb-result { display: grid; gap: 9px; animation: step-in .35s var(--ease) both; }
.fb-bubble {
  padding: 11px 13px;
  border-radius: 13px 13px 13px 4px;
  background: var(--plum-wash);
  border: 1px solid var(--plum-soft);
  font-size: 13px;
}
.fb-anon { font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.fb-anon::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }

/* ==================== ТАРИФЫ ==================== */
.plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}
.plan {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: clamp(24px, 2.8vw, 34px);
  border-radius: var(--r-xl);
  border: 1px solid var(--line);
  background: var(--cream-2);
  position: relative;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.plan:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.plan header h3 { font-size: 23px; }
.plan-for { font-size: 13px; color: var(--muted); margin-top: 4px; }
.plan-price { display: flex; align-items: baseline; gap: 8px; }
.plan-price b {
  font-family: var(--font-dis);
  font-size: clamp(29px, 2.9vw, 37px);
  font-weight: 500;
  letter-spacing: -.025em;
}
.plan-price span { font-size: 13px; color: var(--muted); }
.plan-list { display: grid; gap: 9px; }
.plan-list li { position: relative; padding-left: 22px; font-size: 14.5px; color: var(--ink-2); }
.plan-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 9px;
  width: 8px; height: 8px;
  border-radius: 50%;
  border: 1.5px solid var(--plum);
}
.plan > .btn { margin-top: auto; align-self: end; }

.plan-hero {
  background: linear-gradient(170deg, #ffffff, var(--plum-wash) 120%);
  border-color: var(--plum-soft);
  box-shadow: var(--shadow-lg);
}
.plan-hero .plan-list li::before { border-color: var(--coral); background: var(--coral-wash); }
.plan-flag {
  position: absolute;
  top: -11px; left: clamp(24px, 2.8vw, 34px);
  padding: 5px 13px;
  border-radius: 100px;
  background: var(--ink);
  color: var(--cream-2);
  font-size: 11px;
}

/* ==================== БЕСПЛАТНАЯ НАСТРОЙКА ==================== */
.setup-card {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, .94fr);
  gap: clamp(28px, 4vw, 58px);
  align-items: center;
  padding: clamp(28px, 3.8vw, 52px);
  border-radius: var(--r-xl);
  border: 1px solid var(--coral-wash);
  background:
    radial-gradient(110% 120% at 100% 0%, var(--coral-wash), transparent 58%),
    var(--paper);
  box-shadow: var(--shadow-lg);
}
.setup-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.setup-note { margin-top: 14px; font-size: 12.5px; color: var(--muted); }

.tg-link { justify-self: start; }
.tg-link .ico-tg { width: 17px; height: 17px; fill: currentColor; flex: 0 0 auto; }

.setup-steps { display: grid; gap: 10px; min-width: 0; }
.setup-steps li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--r-md);
  border: 1px solid var(--line-soft);
  background: var(--cream-2);
}
.setup-steps div { display: grid; gap: 2px; min-width: 0; }
.setup-steps b { font-size: 14.5px; font-weight: 600; }
.setup-steps em { font-size: 13px; color: var(--muted); }
.setup-num {
  width: 28px; height: 28px;
  flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--coral-wash);
  border: 1px solid rgba(200, 99, 74, .3);
  color: var(--coral-btn);
  font-family: var(--font-dis);
  font-size: 14px;
  font-weight: 600;
}

/* ==================== ЖУРНАЛ — УЗКАЯ ПОЛОСА ==================== */
.section-blog { padding-block: clamp(34px, 4vw, 56px); }
.blog-band {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(20px, 3vw, 44px);
  align-items: center;
  padding: clamp(24px, 3vw, 36px) clamp(24px, 3.2vw, 40px);
  border-radius: var(--r-xl);
  border: 1px solid var(--line);
  background: var(--cream-2);
}
.blog-band h2 { font-size: clamp(22px, 2.2vw, 28px); }
.blog-band p { margin-top: 10px; font-size: 14.5px; color: var(--muted); }
.blog-right { display: grid; gap: 12px; min-width: 0; }

.blog-latest {
  display: grid;
  gap: 5px;
  padding: 16px 18px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--paper);
  text-decoration: none;
  color: inherit;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.blog-latest:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--plum-soft); }
.blog-latest-date {
  font-size: 11.5px;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--plum);
}
.blog-latest-title { font-family: var(--font-dis); font-size: 18px; font-weight: 500; }
.blog-latest-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  font-size: 13px;
  color: var(--coral-btn);
}
.blog-latest-more .ico { width: 15px; height: 15px; transition: transform .22s var(--ease); }
.blog-latest:hover .blog-latest-more .ico { transform: translateX(3px); }

.blog-band-cta { display: flex; flex-wrap: wrap; gap: 9px; }
.blog-right .tg-link { justify-self: unset; }

/* ==================== ВОПРОСЫ ==================== */
.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr);
  gap: clamp(28px, 4vw, 60px);
  align-items: start;
}
.faq-side { position: sticky; top: 110px; }

.faq-list { display: grid; gap: 8px; }
.faq-item {
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--cream-2);
  overflow: hidden;
  transition: background-color .25s var(--ease), border-color .25s var(--ease);
}
.faq-item[open] { background: var(--paper); border-color: var(--plum-soft); box-shadow: var(--shadow-md); }
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 20px;
  cursor: pointer;
  font-size: 15.5px;
  font-weight: 500;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-mark { position: relative; width: 15px; height: 15px; flex: 0 0 auto; }
.faq-mark::before, .faq-mark::after {
  content: "";
  position: absolute;
  background: var(--coral-btn);
  border-radius: 2px;
  transition: transform .28s var(--ease), opacity .28s var(--ease);
}
.faq-mark::before { top: 7px; left: 0; width: 15px; height: 1.6px; }
.faq-mark::after { left: 6.7px; top: 0; width: 1.6px; height: 15px; }
.faq-item[open] .faq-mark::after { transform: scaleY(0); opacity: 0; }
.faq-body { padding: 0 20px 19px; }
.faq-body p { font-size: 14.5px; color: var(--muted); max-width: 62ch; }

/* ==================== ФИНАЛ ==================== */
.final-card {
  position: relative;
  text-align: center;
  padding: clamp(38px, 5.5vw, 74px) clamp(24px, 4vw, 60px);
  border-radius: var(--r-xl);
  border: 1px solid var(--line);
  background:
    radial-gradient(90% 130% at 50% -20%, var(--plum-wash), transparent 62%),
    var(--paper);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}
.final-arc { display: block; width: 54px; height: 54px; margin: 0 auto 22px; }
.alma-logo-xl .logo-ring, .alma-logo-lg .logo-ring,
.alma-logo-xl .logo-arc, .alma-logo-lg .logo-arc { stroke-width: 6; }
.final-card h2 { max-width: 18ch; margin-inline: auto; }
.final-card > p { margin-top: 16px; color: var(--muted); max-width: 50ch; margin-inline: auto; }
.final-cta { display: flex; flex-wrap: wrap; gap: 11px; justify-content: center; margin-top: 30px; }

/* ==================== ПОДВАЛ ==================== */
.site-foot {
  border-top: 1px solid var(--line);
  background: var(--cream-2);
  padding-top: clamp(40px, 5vw, 64px);
  margin-top: clamp(30px, 4vw, 50px);
}
.foot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(0, .85fr)) minmax(0, 1fr);
  gap: clamp(22px, 3vw, 44px);
  padding-bottom: clamp(32px, 4vw, 50px);
}
.foot-brand p { margin-top: 14px; font-size: 13.5px; color: var(--muted); max-width: 34ch; }
.foot-col { display: grid; align-content: start; gap: 9px; }
.foot-col h4 { color: var(--muted); margin-bottom: 3px; }
.foot-col a {
  font-size: 14px;
  color: var(--ink-2);
  text-decoration: none;
  transition: color .2s;
  width: fit-content;
}
.foot-col a:hover { color: var(--coral-btn); }
.foot-cta { gap: 9px; }
.foot-ext {
  font-size: 13.5px;
  color: var(--plum-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
  margin-top: 2px;
}
.foot-ext:hover { color: var(--coral-btn); }

.foot-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  padding-block: 20px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--muted);
}

/* ==================== ЛИПКАЯ КНОПКА НА МОБИЛЬНОМ ==================== */
.sticky-cta {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 80;
  display: none;
  gap: 9px;
  padding: 11px 14px calc(11px + env(safe-area-inset-bottom));
  background: rgba(251, 249, 245, .94);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  transform: translateY(110%);
  transition: transform .34s var(--ease);
}
.sticky-cta.is-on { transform: none; }
.sticky-cta .btn { flex: 1 1 auto; }
.sticky-cta .btn-line { flex: 0 0 auto; background: var(--paper); }

/* ==================== МОДАЛЬНЫЕ ОКНА ==================== */
.modal-root {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 20px;
  overflow-y: auto;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(33, 35, 42, .5);
  backdrop-filter: blur(6px);
  animation: fade-in .28s var(--ease) both;
}
.modal {
  position: relative;
  width: 100%;
  max-width: 452px;
  padding: clamp(26px, 3.4vw, 40px);
  border-radius: var(--r-xl);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xl);
  animation: modal-in .34s var(--ease) both;
  margin: auto;
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-in {
  from { opacity: 0; transform: translateY(16px) scale(.97); }
  to { opacity: 1; transform: none; }
}
.modal-x {
  position: absolute;
  top: 16px; right: 16px;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-soft);
  background: var(--cream-2);
  color: var(--muted);
  cursor: pointer;
  transition: color .2s, border-color .2s;
}
.modal-x:hover { color: var(--ink); border-color: var(--line); }

.modal-kicker { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--plum); margin-bottom: 10px; }
.modal h2 { font-size: clamp(24px, 2.6vw, 30px); }
.modal-lede { margin-top: 10px; font-size: 14.5px; color: var(--muted); }

.form { display: grid; gap: 12px; margin-top: 24px; }
.field { display: grid; gap: 6px; }
.field span { font-size: 12.5px; color: var(--muted); }
.field input {
  width: 100%;
  padding: 12px 15px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--cream-2);
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
}
.field input::placeholder { color: var(--muted-2); }
.field input:focus { outline: none; border-color: var(--plum); background: var(--paper); box-shadow: 0 0 0 3px var(--plum-wash); }
.field.is-bad input { border-color: var(--coral); }

.signup-consent {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  align-items: start;
  padding: 4px 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.signup-consent input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--plum);
}
.signup-consent a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.signup-consent.is-bad { color: var(--coral-btn); }

.form-note { font-size: 12px; color: var(--muted); text-align: center; }
.modal-switch { margin-top: 18px; font-size: 13.5px; color: var(--muted); text-align: center; }
.modal-switch button {
  border: 0; background: none; padding: 0;
  color: var(--coral-btn); cursor: pointer;
  font-family: inherit;
  text-decoration: underline; text-underline-offset: 3px;
}

.modal-done { text-align: center; }
.done-arc { display: block; width: 56px; height: 56px; margin: 4px auto 20px; }
.modal-done .btn { margin-top: 24px; }

/* тост */
.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 14px);
  z-index: 140;
  padding: 12px 20px;
  border-radius: 100px;
  background: var(--ink);
  color: var(--cream-2);
  font-size: 13.5px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transition: opacity .28s var(--ease), transform .28s var(--ease);
  max-width: calc(100vw - 32px);
  text-align: center;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

body.is-locked { overflow: hidden; }

/* ==================== АДАПТИВ ==================== */
/* ниже этой ширины навигация уже не помещается в строку — уводим её в бургер */
@media (max-width: 1180px) {
  .head-nav { display: none; }
  .burger { display: grid; }
  .mobile-menu { display: block; }
}

@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { max-width: 620px; }
  .app-window { transform: none; }
  .app-window:hover { transform: none; }
  .float-tg { left: 0; }
  .float-note { right: 0; }
  .booking-grid, .tg-grid, .an-grid, .assist-card, .team-panel,
  .faq-grid, .blog-band, .setup-card { grid-template-columns: 1fr; }
  .cal-layout { grid-template-columns: 1fr; }
  /* мини-сайт остаётся узким, как настоящая страница записи */
  .booking-demo { max-width: 470px; margin-inline: auto; width: 100%; }
  .cal-features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .faq-side { position: static; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .front-grid { grid-template-columns: 1fr; }
  .front-contacts { grid-row: auto; }
  .who-more { margin-left: 0; }
}

@media (max-width: 860px) {
  .plans, .posts { grid-template-columns: 1fr; }
  .plan-hero { order: -1; }
  .app-body { grid-template-columns: 1fr; }
  .app-rail {
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
    padding: 10px;
  }
  .rail-item { white-space: nowrap; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  html { scroll-padding-top: 80px; }
  .head-inner { height: 64px; gap: 12px; }
  .head-actions .btn-ghost, .head-actions .btn-solid { display: none; }
  .burger { display: grid; }
  .mobile-menu { display: block; }
  .sticky-cta { display: flex; }
  .hero-cta .btn, .final-cta .btn { flex: 1 1 auto; }
  /* длинные подписи на узком экране переносим, иначе кнопка распирает страницу */
  .btn { white-space: normal; text-wrap: balance; }
  .steps { grid-template-columns: 1fr; }
  .cal-features { grid-template-columns: 1fr; }
  .float-tg { bottom: -18px; left: 8px; }
  .float-note { top: -14px; right: 4px; padding: 9px 13px 9px 10px; }
  .float-note b { font-size: 11.5px; }
  .float-note span { font-size: 10px; }
  .ms-stage { min-height: 320px; }
  .an-bars { height: 120px; }
  .assist-card { padding: 24px 20px; }
  .foot-grid { grid-template-columns: 1fr; }
  .modal-root { padding: 14px; align-items: start; padding-top: 48px; }
  .toast { bottom: 84px; }
  /* три колонки сотрудников не сжимаем — доске разрешаем прокрутку */
  .crew-cols { grid-template-columns: repeat(var(--cols, 1), minmax(148px, 1fr)); }
  /* место под липкую кнопку */
  .site-foot { padding-bottom: 62px; }
}

@media (max-width: 420px) {
  .ms-progress li { font-size: 9.5px; }
  .an-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-facts { gap: 6px 14px; font-size: 12.5px; }
  .who-band { gap: 10px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .sticky-cta.is-on { transform: none; }
}

/* =========================================================
   НОЧНОЙ РЕЖИМ
   Палитра целиком живёт в токенах, поэтому тёмная тема —
   это переопределение тех же переменных. Демонстрации продукта
   (кабинет, мини-сайт, телефон) остаются светлыми: это
   «скриншоты», и на графите они читаются лучше.
   ========================================================= */

.theme-btn {
  width: 38px; height: 38px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink-2);
  cursor: pointer;
  padding: 0;
  transition: background-color .22s var(--ease), border-color .22s var(--ease),
              color .22s var(--ease), transform .22s var(--ease);
}
.theme-btn:hover { border-color: var(--plum); color: var(--ink); transform: rotate(-14deg); }
.theme-btn svg {
  width: 18px; height: 18px;
  grid-area: 1 / 1;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: opacity .22s var(--ease), transform .28s var(--ease);
}
.theme-btn .ico-sun { opacity: 0; transform: rotate(-70deg) scale(.6); }
[data-theme="dark"] .theme-btn .ico-moon { opacity: 0; transform: rotate(70deg) scale(.6); }
[data-theme="dark"] .theme-btn .ico-sun { opacity: 1; transform: none; }

/* плавное переключение */
body, .site-head, .section-telegram, .site-foot, .feat, .plan, .front-card,
.step, .faq-item, .final-card, .who-band, .setup-card, .blog-band, .assist-card,
.team-panel, .cal-board, .an-board {
  transition: background-color .35s var(--ease), color .35s var(--ease),
              border-color .35s var(--ease);
}

[data-theme="dark"] {
  color-scheme: dark;

  --cream:      #16181c;
  --cream-2:    #1d2027;
  --paper:      #23272e;
  --ink:        #f1eee8;
  --ink-2:      #d8d4cd;

  --muted:      #a6abb6;
  --muted-2:    #9096a2;

  --line:       #343941;
  --line-soft:  #2a2e35;

  --plum:       #b9a9c3;
  --plum-deep:  #d0c1d8;
  --plum-soft:  #4b4353;
  --plum-wash:  #2c2833;

  --coral:      #e07a5f;
  --coral-btn:  #c25f42;
  --coral-hov:  #d46c4e;
  --coral-wash: #3b2b25;

  --ok:         #83bb98;
  --ok-wash:    #23312b;

  --night:      #0e1014;
  --night-2:    #171a20;
  --night-line: #2b2f37;

  --shadow-xl: 0 40px 90px -32px rgba(0, 0, 0, .72), 0 8px 24px -10px rgba(0, 0, 0, .5);
  --shadow-lg: 0 26px 60px -26px rgba(0, 0, 0, .66);
  --shadow-md: 0 14px 34px -16px rgba(0, 0, 0, .56);
  --shadow-sm: 0 4px 14px -6px rgba(0, 0, 0, .5);
}

/* места, где цвет был задан напрямую */
[data-theme="dark"] .bg-canvas {
  background: linear-gradient(178deg, #191c21 0%, var(--cream) 34%, #121418 100%);
}
[data-theme="dark"] .bg-dots {
  background-image: radial-gradient(circle, rgba(232, 228, 220, .085) .9px, transparent 1px);
}
[data-theme="dark"] .bg-grain { opacity: .07; mix-blend-mode: overlay; }
[data-theme="dark"] .bloom-a { background: radial-gradient(circle, rgba(120, 104, 132, .34), transparent 68%); }
[data-theme="dark"] .bloom-b { background: radial-gradient(circle, rgba(150, 88, 66, .24), transparent 68%); }
[data-theme="dark"] .bg-ring { stroke: rgba(200, 192, 210, .13); }
[data-theme="dark"] .bg-ring-inner { stroke: rgba(200, 192, 210, .08); }
[data-theme="dark"] .bg-arc { stroke: rgba(224, 122, 95, .38); }
[data-theme="dark"] .bg-mark .bg-dot { fill: rgba(224, 122, 95, .3); }

[data-theme="dark"] .site-head.is-stuck { background: rgba(22, 24, 28, .84); }
[data-theme="dark"] .mobile-menu { background: rgba(22, 24, 28, .97); }
[data-theme="dark"] .sticky-cta { background: rgba(22, 24, 28, .94); }
[data-theme="dark"] .btn-quiet { background: rgba(35, 39, 46, .72); }
[data-theme="dark"] .eyebrow { background: rgba(35, 39, 46, .7); }
[data-theme="dark"] .who-band { background: rgba(35, 39, 46, .55); }
[data-theme="dark"] .float-card { background: rgba(29, 32, 39, .93); }
[data-theme="dark"] .plan-hero { background: linear-gradient(170deg, #2a2e36, var(--plum-wash) 120%); }
[data-theme="dark"] .modal-backdrop { background: rgba(8, 9, 12, .66); }

/* тёмная секция Telegram — ещё глубже, чтобы полоса читалась */
[data-theme="dark"] .section-telegram::before {
  background: radial-gradient(circle, rgba(120, 104, 132, .26), transparent 66%);
}
[data-theme="dark"] .section-telegram .sec-kicker { color: #d1a898; }

/* логотип: кольцо должно быть видно на графите */
[data-theme="dark"] .logo-ring { stroke: var(--ink); }

/* ——— демонстрации продукта остаются светлыми ——— */
[data-theme="dark"] .app-window,
[data-theme="dark"] .mini-site,
[data-theme="dark"] .tg-phone {
  color-scheme: light;
  --cream:      #f6f3ee;
  --cream-2:    #fbf9f5;
  --paper:      #fffdfa;
  --ink:        #191b20;
  --ink-2:      #33363e;
  --muted:      #575c6b;
  --muted-2:    #6c7180;
  --line:       #e4dfd7;
  --line-soft:  #eeeae3;
  --plum:       #635c6c;
  --plum-deep:  #4c4655;
  --plum-soft:  #e7d9dd;
  --plum-wash:  #f3edef;
  --coral:      #c8634a;
  --coral-btn:  #b0503a;
  --coral-hov:  #9c452f;
  --coral-wash: #f6e4dd;
  --ok:         #3f6b51;
  --ok-wash:    #e5efe8;
  --shadow-sm: 0 4px 14px -6px rgba(31, 27, 24, .14);
  --shadow-md: 0 14px 34px -16px rgba(31, 27, 24, .20);
  color: var(--ink);
}
[data-theme="dark"] .app-window .logo-ring,
[data-theme="dark"] .mini-site .logo-ring,
[data-theme="dark"] .tg-phone .logo-ring { stroke: #191b20; }

/* =========================================================
   ЖУРНАЛ ALMA — список статей и страница статьи
   Собственные страницы с постоянными адресами (не модалки),
   чтобы материалы могли индексироваться поисковыми системами.
   ========================================================= */

.blog-head {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(246, 243, 238, .86);
  backdrop-filter: blur(16px) saturate(120%);
  border-bottom: 1px solid var(--line-soft);
}
[data-theme="dark"] .blog-head { background: rgba(22, 24, 28, .86); }

.blog-head-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 68px;
}
.blog-back {
  margin-right: auto;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  transition: color .2s var(--ease);
}
.blog-back:hover { color: var(--ink); }

.blog-main { padding-block: clamp(38px, 5vw, 64px) clamp(60px, 7vw, 100px); }
.blog-shell { max-width: 980px; }

/* колонка слева со всеми темами — видна и на списке, и на каждой статье,
   поэтому всегда понятно, что ещё почитать и что нажать */
.blog-layout {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: clamp(28px, 4vw, 52px);
  align-items: start;
}

.blog-side { position: sticky; top: 96px; }
.blog-side-kicker {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--plum);
  margin-bottom: 12px;
}
.blog-side-list { display: grid; gap: 6px; counter-reset: blogtopic; }
.blog-side-item,
a.blog-side-item {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 11px 12px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  text-decoration: none;
  color: inherit;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
a.blog-side-item:hover { background: var(--cream-2); border-color: var(--line-soft); transform: translateX(2px); }
.blog-side-item.is-current {
  background: var(--paper);
  border-color: var(--plum-soft);
  box-shadow: var(--shadow-sm);
}
.blog-side-num {
  flex: 0 0 auto;
  font-family: var(--font-dis);
  font-size: 13px;
  font-weight: 600;
  color: var(--coral);
  padding-top: 1px;
}
.blog-side-info { display: grid; gap: 2px; min-width: 0; }
.blog-side-info b { font-size: 13.5px; font-weight: 500; line-height: 1.35; }
.blog-side-info em { font-size: 11.5px; color: var(--muted); font-style: normal; }
.blog-side-item.is-current .blog-side-info b { color: var(--coral-btn); }
.blog-side-item.is-current .blog-side-num { color: var(--muted-2); }

.blog-content { min-width: 0; }

.blog-hero { max-width: 560px; margin-bottom: clamp(28px, 3.6vw, 40px); }
.blog-hero h1 { margin-top: 12px; font-size: clamp(28px, 3vw, 38px); }
.blog-hero p { margin-top: 16px; color: var(--muted); font-size: 16px; }

/* ——— список статей ——— */
.blog-list { display: grid; gap: 14px; }
.blog-card {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  padding: 16px;
  border-radius: var(--r-xl);
  border: 1px solid var(--line);
  background: var(--cream-2);
  text-decoration: none;
  color: inherit;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.blog-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--plum-soft); }

.blog-card-cover {
  width: 148px; height: 110px;
  border-radius: var(--r-md);
  overflow: hidden;
  flex: 0 0 auto;
  background: linear-gradient(120deg, var(--plum-wash), var(--coral-wash) 130%);
}
.blog-card-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.blog-card-cover.is-plain { display: grid; place-items: center; }
.blog-card-cover.is-plain svg { width: 40px; height: 40px; opacity: .8; }

.blog-card-body { min-width: 0; display: grid; gap: 6px; }
.blog-card-date {
  font-size: 11.5px;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--plum);
}
.blog-card-body h3 { font-size: 19px; }
.blog-card-body p { font-size: 14px; color: var(--muted); }
.blog-card-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  font-size: 13px;
  font-weight: 500;
  color: var(--coral-btn);
}
.blog-card-more .ico { width: 15px; height: 15px; transition: transform .22s var(--ease); }
.blog-card:hover .blog-card-more .ico { transform: translateX(3px); }

/* ——— страница статьи ——— */
.article-head { max-width: 680px; margin-bottom: clamp(26px, 3.4vw, 40px); }
.article-kicker { font-size: 12.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--plum); }
.article-head h1 { margin-top: 12px; }
.article-lede { margin-top: 14px; font-size: 18px; color: var(--muted); }
.article-meta {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 18px;
  font-size: 13px;
  color: var(--muted);
}
.article-meta i {
  width: 30px; height: 30px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  display: grid;
  place-items: center;
  font-style: normal;
  overflow: hidden;
}
/* тот же масштаб, что у знака в шапке (.brand-mark) — на 17px тонкое кольцо
   с дугой превращалось в смазанное пятно, а не узнаваемый знак */
.article-meta i .alma-logo { width: 21px; height: 21px; }
.article-meta i .logo-arc { animation-duration: 6s; }

.article-cover {
  margin: 4px 0 clamp(28px, 3.6vw, 44px);
  border-radius: var(--r-xl);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
}
.article-cover img { display: block; width: 100%; height: auto; }

.article-body { max-width: 680px; display: grid; gap: 18px; }
.article-body h2 {
  margin-top: 14px;
  font-size: clamp(21px, 2.2vw, 25px);
}
.article-body h3 { font-size: 18px; font-weight: 600; font-family: var(--font-ui); }
.article-body p { font-size: 16.5px; line-height: 1.72; color: var(--ink-2); }
.article-body ul { display: grid; gap: 8px; margin: 2px 0; }
.article-body ul li {
  position: relative;
  padding-left: 22px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-2);
}
.article-body ul li::before {
  content: "";
  position: absolute;
  left: 0; top: 9px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--coral);
  opacity: .8;
}
.article-body strong { font-weight: 600; color: var(--ink); }

.article-figure {
  margin: 6px 0;
  display: grid;
  gap: 10px;
}
.article-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}
.article-figure figcaption {
  font-size: 13.5px;
  color: var(--muted);
  text-align: center;
  padding-inline: 10px;
}

.article-cta {
  margin-top: 12px;
  padding: clamp(22px, 3vw, 32px);
  border-radius: var(--r-xl);
  border: 1px solid var(--coral-wash);
  background: radial-gradient(120% 140% at 100% 0%, var(--coral-wash), transparent 58%), var(--cream-2);
  display: grid;
  gap: 14px;
}
.article-cta p { font-size: 15.5px; color: var(--ink-2); margin: 0; }
.article-cta .btns { display: flex; flex-wrap: wrap; gap: 10px; }

.article-nav {
  margin-top: clamp(30px, 4vw, 48px);
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.article-nav a {
  font-size: 14.5px;
  color: var(--muted);
  text-decoration: none;
  transition: color .2s var(--ease);
}
.article-nav a:hover { color: var(--coral-btn); }

.blog-foot {
  border-top: 1px solid var(--line);
  background: var(--cream-2);
  padding-block: 26px;
}
.blog-foot .shell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.blog-foot-links { display: flex; gap: 16px; flex-wrap: wrap; }
.blog-foot-links a { font-size: 13.5px; color: var(--muted); text-decoration: none; }
.blog-foot-links a:hover { color: var(--coral-btn); }
.blog-foot-copy { font-size: 12.5px; color: var(--muted-2); }

@media (max-width: 860px) {
  /* колонка тем на узком экране становится горизонтальной полосой над контентом,
     а не второй колонкой — иначе места на чтение не остаётся.
     min-width: 0 на каждом уровне обязателен: иначе строка с overflow-x: auto
     не скроллится сама, а растягивает всю раскладку под свой min-content. */
  .blog-layout { grid-template-columns: minmax(0, 1fr); }
  .blog-side {
    position: static;
    min-width: 0;
    padding-bottom: 10px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--line);
  }
  .blog-side-list {
    grid-auto-flow: column;
    grid-auto-columns: minmax(190px, 240px);
    overflow-x: auto;
    min-width: 0;
    gap: 8px;
    padding-bottom: 4px;
    margin: 0 calc(-1 * var(--gut));
    padding-inline: var(--gut);
  }
  .blog-side-item, a.blog-side-item { min-width: 0; }
}

@media (max-width: 600px) {
  .blog-card { grid-template-columns: 1fr; }
  .blog-card-cover { width: 100%; height: 150px; }
}

@media (max-width: 560px) {
  /* страницы журнала не несут бургер/мобильное меню — на узком экране
     убираем повторяющуюся кнопку «На главную», логотип уже ведёт домой */
  .blog-head-inner .head-actions .btn-line { display: none; }
  .blog-head-inner { gap: 10px; }
  .blog-back { font-size: 13px; }
}

/* =========================================================
   ЖУРНАЛ — таблица, цитата-вопрос и честный плейсхолдер фото
   ========================================================= */
.article-figure-pending {
  display: grid;
  place-items: center;
  min-height: 150px;
  padding: 22px;
  border-radius: var(--r-lg);
  border: 1px dashed var(--line);
  background: var(--cream-2);
  text-align: center;
}
.article-figure-pending span {
  font-size: 13px;
  color: var(--muted);
  max-width: 30ch;
  line-height: 1.5;
}

.article-table-wrap {
  overflow-x: auto;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}
.article-table { width: 100%; min-width: 420px; border-collapse: collapse; font-size: 15px; }
.article-table th, .article-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink-2);
}
.article-table th {
  background: var(--cream-2);
  font-family: var(--font-dis);
  font-weight: 500;
  color: var(--ink);
}
.article-table tr:last-child td { border-bottom: 0; }

.article-quote {
  padding: 17px 19px;
  border-radius: var(--r-lg);
  background: var(--plum-wash);
  border: 1px solid var(--plum-soft);
  display: grid;
  gap: 10px;
}
.article-quote-q { margin: 0; font-weight: 600; font-family: var(--font-dis); font-size: 17px; }
.article-quote ul { display: grid; gap: 6px; margin: 0; }
