/* Marvent — лендінг. Mobile-first, OKLCH-токени, одна родина Geologica. */

@font-face {
  font-family: "Geologica";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url(/assets/fonts/geologica-cyrillic-ext.woff2) format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: "Geologica";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url(/assets/fonts/geologica-cyrillic.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Geologica";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url(/assets/fonts/geologica-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Geologica";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url(/assets/fonts/geologica-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Поверхні: глибокий teal із шапки */
  --bg: oklch(0.165 0.022 210);
  --bg-deep: oklch(0.135 0.02 215);
  --surface: oklch(0.215 0.028 208);
  --surface-2: oklch(0.255 0.03 206);
  --line: oklch(0.36 0.03 200 / 0.55);
  /* Текст */
  --ink: oklch(0.965 0.008 190);
  --ink-2: oklch(0.82 0.02 195);
  --ink-3: oklch(0.70 0.025 195);
  /* Бренд: teal → green, червоний лише для «вниз» */
  --teal: oklch(0.79 0.135 178);
  --green: oklch(0.76 0.19 150);
  --accent: var(--teal);
  --accent-ink: oklch(0.17 0.03 190);
  --down: oklch(0.66 0.19 25);
  /* Telegram-бульбашка (темна тема TG) */
  --tg-bubble: oklch(0.255 0.032 240);
  --tg-code: oklch(0.80 0.11 235);
  --tg-name: oklch(0.80 0.13 165);

  --font: "Geologica", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Menlo, Consolas, monospace;

  --gutter: clamp(16px, 4.5vw, 44px);
  --maxw: 1180px;
  --radius: 14px;
  --radius-sm: 10px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  /* Шкала (≥1.25) */
  --fs-0: 0.875rem;
  --fs-1: 1rem;
  --fs-2: 1.125rem;
  --fs-3: clamp(1.3rem, 1.1rem + 0.9vw, 1.6rem);
  --fs-4: clamp(1.75rem, 1.3rem + 2.2vw, 2.75rem);
  --fs-5: clamp(2.2rem, 1.4rem + 4.2vw, 4.4rem);

  --z-sticky: 10;
  --z-dock: 20;
  --z-dropdown: 30;
  --z-modal: 50;

  color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-1);
  font-weight: 350;
  line-height: 1.6;
  font-feature-settings: "tnum" 1;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.12; letter-spacing: -0.02em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 6px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wrap { width: 100%; max-width: calc(var(--maxw) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }

.skip { position: absolute; left: 12px; top: -60px; z-index: var(--z-modal); padding: 10px 14px; background: var(--teal); color: var(--accent-ink); border-radius: 8px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

/* ---------------------------------------------------------------- кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55em;
  min-height: 48px; padding: 0.7em 1.3em;
  border: 0; border-radius: 999px;
  background: var(--teal); color: var(--accent-ink);
  font: inherit; font-weight: 600; font-size: var(--fs-1); line-height: 1.2;
  text-decoration: none; cursor: pointer;
  transition: background-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.btn:hover { background: oklch(0.85 0.13 172); }
.btn:active { transform: translateY(1px) scale(0.99); }
.btn .ico { width: 1.25em; height: 1.25em; flex: none; }
.btn-lg { min-height: 56px; padding: 0.85em 1.6em; font-size: var(--fs-2); }
.btn-sm { min-height: 40px; padding: 0.5em 1em; font-size: var(--fs-0); white-space: nowrap; }
/* Найвужчі телефони: лишаємо лише знак логотипа, щоб кнопка не переносилась */
@media (max-width: 22.5em) { .top .brand-word { display: none; } }
.btn-quiet { background: var(--surface-2); color: var(--ink); }
.btn-quiet:hover { background: oklch(0.3 0.032 205); }
.btn-ghost {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0.5em 0.2em;
  color: var(--ink-2); font-weight: 500; text-decoration: underline; text-decoration-color: var(--line);
  text-underline-offset: 0.3em; transition: color 0.2s, text-decoration-color 0.2s;
}
.btn-ghost:hover { color: var(--ink); text-decoration-color: var(--teal); }

/* ---------------------------------------------------------------- шапка */
.top {
  position: sticky; top: 0; z-index: var(--z-sticky);
  background: oklch(0.165 0.022 210 / 0.82);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid oklch(0.36 0.03 200 / 0.3);
}
.top-in { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.brand-mark { width: 32px; height: 32px; }
.brand-word { font-weight: 650; font-size: 1.15rem; letter-spacing: -0.01em; }
.top-nav { display: none; }
.top-nav ul { display: flex; gap: 4px; }
.top-nav a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-size: var(--fs-0); font-weight: 450; }
.top-nav a:hover { color: var(--ink); background: oklch(0.3 0.03 205 / 0.5); }
.top-actions { display: flex; align-items: center; gap: 8px; }

.lang { position: relative; }
.lang summary {
  list-style: none; display: grid; place-items: center; min-width: 44px; min-height: 40px; padding: 0 10px;
  border-radius: 999px; border: 1px solid var(--line); cursor: pointer;
  font-size: var(--fs-0); font-weight: 600; text-transform: uppercase; color: var(--ink-2);
}
.lang summary::-webkit-details-marker { display: none; }
.lang summary:hover { color: var(--ink); }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: var(--z-dropdown);
  min-width: 180px; padding: 6px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 6px 8px oklch(0.1 0.02 210 / 0.5);
}
.lang-menu a, .root-langs a { display: block; padding: 10px 12px; border-radius: 8px; text-decoration: none; color: var(--ink-2); }
.lang-menu a:hover, .root-langs a:hover { background: var(--surface-2); color: var(--ink); }
.lang-menu a[aria-current="page"] { color: var(--teal); font-weight: 600; }

/* ---------------------------------------------------------------- hero */
.hero { position: relative; isolation: isolate; overflow: hidden; padding-block: clamp(28px, 6vw, 72px) clamp(56px, 9vw, 120px); }
.hero-bg { position: absolute; inset: 0; z-index: -1; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 70% 40%; }
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, oklch(0.165 0.022 210 / 0.25) 0%, oklch(0.165 0.022 210 / 0.6) 45%, var(--bg) 100%);
}
.hero-in { display: grid; gap: clamp(32px, 5vw, 56px); align-items: center; }
.hero h1 { font-size: clamp(2.1rem, 1.3rem + 3.6vw, 4rem); font-weight: 650; max-width: 17ch; }
.hero-lead { margin-top: 20px; max-width: 54ch; font-size: var(--fs-2); color: var(--ink-2); line-height: 1.65; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin-top: 30px; }
.hero-note { margin-top: 16px; font-size: var(--fs-0); color: var(--ink-3); }
.hero-msg { margin: 0; justify-self: center; width: min(100%, 470px); }

/* ---------------------------------------------------------------- Telegram-повідомлення */
.msg {
  position: relative;
  padding: 12px 16px 26px;
  background: var(--tg-bubble);
  border-radius: 18px 18px 18px 6px;
  font-size: 0.95rem; line-height: 1.5; color: oklch(0.95 0.008 230);
  box-shadow: 0 8px 8px -6px oklch(0.08 0.02 220 / 0.6);
  overflow-wrap: anywhere;
}
.msg-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.msg-ava { width: 26px; height: 26px; border-radius: 50%; }
.msg-name { font-weight: 600; color: var(--tg-name); font-size: 0.92rem; }
.msg-handle { color: oklch(0.68 0.03 230); font-size: 0.8rem; }
.msg-body code { font-family: var(--mono); font-size: 0.88em; color: var(--tg-code); }
.msg-line + .msg-line { margin-top: 6px; }
.msg-time { position: absolute; right: 12px; bottom: 6px; font-size: 0.72rem; color: oklch(0.68 0.03 230); }
.msg-compact { padding-bottom: 14px; font-size: 0.9rem; }
.hero-msg .msg { box-shadow: 0 0 0 1px oklch(0.79 0.135 178 / 0.25), 0 24px 40px -24px oklch(0.6 0.13 175 / 0.45); }

/* ---------------------------------------------------------------- секції */
.section { padding-block: clamp(64px, 10vw, 128px); overflow-x: clip; }
/* Анімації «з боків» не мають створювати горизонтальний скрол. Саме clip (не hidden) і саме на html:
   hidden на body робить його скрол-контейнером і ламає sticky-шапку. */
html, .final { overflow-x: clip; }
.section h2 { font-size: var(--fs-4); max-width: 22ch; }
.lead { margin-top: 16px; max-width: 62ch; color: var(--ink-2); font-size: var(--fs-2); }

/* Порівняння «типовий алерт vs Marvent» */
.compare { background: var(--bg-deep); }
.cmp-head { display: none; }
.cmp { margin-top: 36px; border-top: 1px solid var(--line); }
.cmp-row { display: grid; gap: 6px; padding-block: 18px; border-bottom: 1px solid var(--line); }
.cmp-tag { display: block; font-size: 0.75rem; font-weight: 500; color: var(--ink-3); margin-bottom: 2px; }
.cmp-old { color: var(--ink-3); }
.cmp-new { color: var(--ink); font-weight: 450; font-size: var(--fs-2); }
.cmp-new .cmp-tag { color: var(--teal); }

/* Анатомія алерту */
.ana-grid { display: grid; gap: 32px; margin-top: 40px; align-items: start; }
.ana-msg { margin: 0; max-width: 520px; }
.ana-msg .msg { font-size: 1rem; }
.mark {
  display: inline-grid; place-items: center; flex: none;
  width: 1.6em; height: 1.6em; margin-right: 0.5em; border-radius: 50%;
  background: oklch(0.79 0.135 178 / 0.16); color: var(--teal);
  font-size: 0.72rem; font-weight: 700; font-family: var(--font); vertical-align: 0.1em;
}
.ana-msg .msg-line { padding: 4px 6px; margin-inline: -6px; border-radius: 8px; transition: background-color 0.4s var(--ease); }
.ana-msg .msg-line.is-on { background: oklch(0.79 0.135 178 / 0.12); }
.ana-notes { display: grid; gap: 4px; counter-reset: none; }
.ana-notes li { display: flex; align-items: flex-start; gap: 4px; padding: 14px 12px; border-radius: var(--radius-sm); color: var(--ink-2); transition: background-color 0.4s var(--ease), color 0.4s var(--ease); }
.ana-notes li .mark { margin-top: 0.1em; }
.ana-notes li.is-on { background: var(--surface); color: var(--ink); }

/* Як це працює */
.how { background: var(--bg-deep); }
.steps { display: grid; gap: 28px; margin-top: 40px; counter-reset: none; }
.step { position: relative; padding-top: 18px; border-top: 1px solid var(--line); }
.step-n { display: block; font-size: var(--fs-4); font-weight: 300; color: var(--teal); line-height: 1; margin-bottom: 14px; }
.step h3 { font-size: var(--fs-3); }
.step p { margin-top: 10px; color: var(--ink-2); max-width: 40ch; }

/* Що ловить: вкладки + приклад повідомлення */
.explorer { margin-top: 36px; display: grid; gap: 20px; }
.tabs { display: none; }
.js .tabs {
  display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter);
  scroll-snap-type: x proximity; scrollbar-width: none;
}
.js .tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 14px;
  border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink-2);
  font: inherit; font-size: var(--fs-0); font-weight: 500; cursor: pointer; scroll-snap-align: start;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.tab-name { text-align: left; }
.tab:hover { color: var(--ink); border-color: oklch(0.5 0.04 195); }
.tab[aria-selected="true"] { background: var(--surface-2); color: var(--ink); border-color: oklch(0.79 0.135 178 / 0.55); }
.tier { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 0.7rem; font-weight: 600; vertical-align: 0.2em; }
.tier-basic { background: oklch(0.76 0.19 150 / 0.16); color: var(--green); }
.tier-pro { background: oklch(0.79 0.135 178 / 0.14); color: var(--teal); }
.panels { display: grid; gap: 28px; }
.panel { display: grid; gap: 20px; align-items: start; }
.js .panel { min-height: 0; }
.panel h3 { font-size: var(--fs-3); }
.panel-text p { margin-top: 10px; color: var(--ink-2); max-width: 46ch; }
.panel-msg { margin: 0; max-width: 520px; }
.panel-msg figcaption { font-size: 0.75rem; color: var(--ink-3); margin-bottom: 8px; }
.extras { margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line); }
.extras h3 { font-size: var(--fs-2); color: var(--ink-2); font-weight: 500; }
.extras ul { display: grid; gap: 10px 32px; margin-top: 16px; }
.extras li { position: relative; padding-left: 22px; }
.extras li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 8px; height: 8px; border-radius: 2px; background: var(--teal); }

/* Скріни застосунку: рамка телефона; на мобільних — горизонтальна стрічка зі snap */
.screens { background: var(--bg-deep); }
.screen-rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(74%, 290px); gap: 18px;
  margin: 36px calc(-1 * var(--gutter)) 0; padding: 4px var(--gutter) 14px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
}
.screen-rail::-webkit-scrollbar { display: none; }
.screen { margin: 0; scroll-snap-align: center; display: grid; gap: 14px; align-content: start; }
.phone {
  padding: 8px; border-radius: 26px; background: oklch(0.12 0.015 215);
  border: 1px solid oklch(0.36 0.03 200 / 0.6);
  box-shadow: 0 24px 40px -28px oklch(0.6 0.13 175 / 0.5);
}
.phone img { width: 100%; height: auto; aspect-ratio: 392 / 728; object-fit: cover; object-position: top; border-radius: 18px; }
.screen figcaption { color: var(--ink-2); font-size: var(--fs-0); max-width: 34ch; }
.screens-note { margin-top: 18px; font-size: 0.75rem; color: var(--ink-3); }

/* Кейси: скрін графіка TradingView + опис + результат + повідомлення бота (розгортається) */
/* Карусель кейсів: горизонтальна стрічка зі snap + кнопки ‹ › і лічильник (без JS — просто гортається) */
.carousel { margin-top: 36px; }
.case-list {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(88%, 520px); gap: 20px; align-items: start;
  margin-inline: calc(-1 * var(--gutter)); padding: 4px var(--gutter) 16px; scroll-padding-inline: var(--gutter);
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; overscroll-behavior-x: contain; scrollbar-width: none;
}
.case-list::-webkit-scrollbar { display: none; }
.case-list > .case { scroll-snap-align: start; }
.carousel-nav { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 8px; }
.car-btn {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  transition: background-color 0.25s var(--ease), opacity 0.25s var(--ease);
}
.car-btn svg { width: 22px; height: 22px; }
.car-btn:hover { background: var(--surface-2); }
.car-btn:disabled { opacity: 0.35; cursor: default; }
.car-count { min-width: 4ch; text-align: center; color: var(--ink-3); font-size: var(--fs-0); font-weight: 600; }
.case { display: grid; align-content: start; overflow: hidden; border-radius: var(--radius); background: var(--surface); border: 1px solid oklch(0.36 0.03 200 / 0.4); }
.case-chart { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 832; background: oklch(0.18 0.02 240); }
.case-body { display: grid; gap: 12px; padding: clamp(18px, 2.5vw, 26px); }
.case header { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; color: var(--ink-3); font-size: var(--fs-0); }
.case-sym { font-weight: 650; color: var(--ink); }
.case-kind { padding: 1px 8px; border-radius: 999px; background: oklch(0.79 0.135 178 / 0.14); color: var(--teal); font-size: 0.75rem; font-weight: 600; }
.case time { margin-left: auto; }
.case h3 { font-size: var(--fs-2); line-height: 1.25; }
.case p { color: var(--ink-2); }
.case-result { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.case-result strong { font-size: var(--fs-3); font-weight: 650; }
.case-result.up strong { color: var(--green); }
.case-result.down strong { color: var(--down); }
.case-msg summary {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; list-style: none;
  color: var(--teal); font-size: var(--fs-0); font-weight: 600;
}
.case-msg summary::-webkit-details-marker { display: none; }
.case-msg summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform 0.3s var(--ease); }
.case-msg[open] summary::after { transform: rotate(225deg) translateY(-2px); }
.case-msg .msg { margin-top: 6px; }
.panel-msg .msg + .msg { margin-top: 10px; }
.cases-note { margin: 20px auto 0; max-width: 70ch; text-align: center; font-size: var(--fs-0); color: var(--ink-3); }

/* Тарифи (по центру) + акція для перших клієнтів */
.pricing-in { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; }
.pricing-in h2 { margin-inline: auto; }
.pricing-in .plans { width: 100%; margin-inline: auto; text-align: left; }
.pricing-in .pay-note { margin-inline: auto; }
.founder {
  display: grid; justify-items: center; gap: 6px; width: 100%; max-width: 860px; margin-top: 32px;
  padding: 20px clamp(18px, 3vw, 28px); border-radius: var(--radius);
  background: radial-gradient(120% 140% at 50% 0%, oklch(0.76 0.19 150 / 0.22), oklch(0.76 0.19 150 / 0.06) 70%);
  border: 1px solid oklch(0.76 0.19 150 / 0.45);
}
.founder-badge { font-size: var(--fs-0); font-weight: 600; color: oklch(0.88 0.12 150); }
.founder-title { font-size: var(--fs-4); font-weight: 650; line-height: 1.1; letter-spacing: -0.02em; color: var(--green); }
.founder p { max-width: 56ch; color: var(--ink-2); }
.founder-short { margin-top: -6px; font-size: var(--fs-0); font-weight: 600; color: var(--green); }
.plans { display: grid; gap: 20px; margin-top: 28px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); max-width: 860px; }
.plan { display: flex; flex-direction: column; gap: 14px; padding: clamp(22px, 3vw, 32px); border-radius: var(--radius); background: var(--surface); border: 1px solid transparent; }
.plan-pro { border-color: oklch(0.79 0.135 178 / 0.6); background: linear-gradient(180deg, oklch(0.24 0.035 190), var(--surface)); }
.plan h3 { font-size: var(--fs-3); }
.price strong { font-size: var(--fs-4); font-weight: 650; letter-spacing: -0.02em; }
.price span { color: var(--ink-3); }
.price-alt { margin-top: -8px; color: var(--ink-3); font-size: var(--fs-0); }
.plan-list { display: grid; gap: 10px; margin-block: 6px 8px; flex: 1; align-content: start; }
.plan-list li { position: relative; padding-left: 26px; color: var(--ink-2); }
.plan-list li::before {
  content: ""; position: absolute; left: 2px; top: 0.45em; width: 12px; height: 7px;
  border-left: 2px solid var(--teal); border-bottom: 2px solid var(--teal); transform: rotate(-45deg);
}
.trial { padding: 12px 14px; border-radius: var(--radius-sm); background: oklch(0.76 0.19 150 / 0.12); color: oklch(0.9 0.08 150); font-size: var(--fs-0); }
.plan .btn { align-self: stretch; }
.pay-note { margin-top: 20px; color: var(--ink-3); font-size: var(--fs-0); max-width: 62ch; }

/* FAQ */
.faq-in { display: grid; gap: 32px; }
.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  min-height: 60px; padding-block: 16px; cursor: pointer; list-style: none;
  font-size: var(--fs-2); font-weight: 500;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ""; flex: none; width: 10px; height: 10px; margin-right: 4px;
  border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3);
  transform: rotate(45deg) translateY(-3px); transition: transform 0.3s var(--ease);
}
.faq-item[open] summary::after { transform: rotate(225deg) translateY(-3px); }
.faq-item p { padding-bottom: 20px; color: var(--ink-2); max-width: 66ch; }

/* Фінальний заклик */
.final { padding-block: clamp(72px, 11vw, 140px); background: radial-gradient(60% 80% at 50% 100%, oklch(0.3 0.06 180 / 0.55), transparent 70%), var(--bg-deep); }
.final-in { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; gap: 24px; }
.final h2 { font-size: var(--fs-4); max-width: 18ch; }
.final .hero-note { margin-top: 0; }

/* Назва: Mar·ket + e·vent */
.name { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 0 0.35em; margin: 0; font-size: clamp(2.4rem, 1.6rem + 4vw, 4.6rem); font-weight: 650; letter-spacing: -0.02em; line-height: 1.05; }
.name-word { display: inline-flex; white-space: nowrap; }
.nk { color: var(--ink); }
.nx { display: inline-block; color: var(--teal); overflow: hidden; vertical-align: bottom; }
.name-plus { color: var(--ink-3); font-weight: 300; }
.name-caption { color: var(--ink-3); font-size: var(--fs-0); margin-top: -12px; }

/* Футер */
.foot { padding-block: 40px calc(40px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: var(--ink-3); font-size: var(--fs-0); }
.foot-in { display: grid; gap: 18px; justify-items: center; text-align: center; }
.disclaimer { max-width: 70ch; }
.foot-langs, .socials ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 6px; }
.foot-langs a, .socials a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 8px; color: var(--ink-2); text-decoration: none; }
.foot-langs a:hover, .socials a:hover { color: var(--ink); }
.soc-ico { width: 18px; height: 18px; flex: none; }
.foot-langs a[aria-current="page"] { color: var(--teal); }
.copy a { color: var(--ink-2); }

/* Нижня панель (мобільні) */
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-dock);
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  background: oklch(0.165 0.022 210 / 0.9);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-top: 1px solid oklch(0.36 0.03 200 / 0.4);
  transform: translateY(110%); transition: transform 0.45s var(--ease);
}
.dock.on { transform: none; }
.dock-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.dock .btn { min-height: 52px; padding-inline: 1.1em; }
.dock-nav {
  display: inline-flex; align-items: center; gap: 8px; min-width: 0; min-height: 52px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink);
  font: inherit; font-size: var(--fs-0); font-weight: 600; cursor: pointer;
}
.dock-nav .ico { width: 18px; height: 18px; flex: none; color: var(--teal); }
.dock-nav .chev { color: var(--ink-3); margin-left: auto; transition: transform 0.3s var(--ease); }
.dock-nav[aria-expanded="true"] .chev { transform: rotate(180deg); }
.dock-cur { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.dock-cta-short { display: none; }
@media (max-width: 25em) {
  .dock-cta-long { display: none; }
  .dock-cta-short { display: inline; }
  .dock-nav { padding: 0 12px; gap: 6px; }
  .dock-nav .ico:first-child { display: none; }
  .dock-cur {
    white-space: normal; line-height: 1.15; font-size: 0.8rem;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  }
}
.dock-menu {
  display: grid; gap: 2px; margin-bottom: 10px; padding: 6px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
}
.dock-menu[hidden] { display: none; }
.dock-menu a { display: block; padding: 12px 14px; border-radius: 10px; color: var(--ink-2); text-decoration: none; font-weight: 500; }
.dock-menu a:hover { background: var(--surface-2); color: var(--ink); }
.dock-menu a[aria-current="true"] { color: var(--teal); background: oklch(0.79 0.135 178 / 0.1); }
.dock-menu a[aria-current="true"]::before { content: "▸ "; }
/* Поточний розділ у меню шапки (десктоп) */
.top-nav a[aria-current="true"] { color: var(--ink); background: oklch(0.3 0.03 205 / 0.6); }

/* Діалог «Відкрийте в браузері» */
.tg-dialog {
  width: min(92vw, 420px); padding: 28px 24px 24px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); color: var(--ink);
}
.tg-dialog::backdrop { background: oklch(0.1 0.02 210 / 0.75); }
.tg-dialog h2 { font-size: var(--fs-3); padding-right: 28px; }
.tg-dialog p { margin-top: 12px; color: var(--ink-2); }
.tg-steps { display: grid; gap: 10px; margin-top: 16px; counter-reset: tgs; }
.tg-steps li { counter-increment: tgs; display: flex; align-items: center; gap: 12px; color: var(--ink); font-weight: 500; }
.tg-steps li::before {
  content: counter(tgs); flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: oklch(0.79 0.135 178 / 0.16); color: var(--teal); font-size: 0.85rem; font-weight: 700;
}
.tg-or { display: grid; gap: 10px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.tg-or p { margin: 0 0 4px; font-size: var(--fs-0); }
/* Підказка у вбудованих браузерах соцмереж: toast поверх сторінки знизу (fixed — не зсуває розкладку, CLS 0);
   ховається, коли з'являється нижня панель з кнопкою Telegram */
.inapp-bar {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: var(--z-dock);
  margin: 0; padding: 12px 16px; border-radius: var(--radius-sm); text-align: center;
  font-size: var(--fs-0); font-weight: 500; line-height: 1.4;
  background: oklch(0.24 0.04 185 / 0.96); color: oklch(0.94 0.05 178);
  border: 1px solid oklch(0.79 0.135 178 / 0.45); box-shadow: 0 8px 8px -6px oklch(0.08 0.02 220 / 0.6);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.dock-on .inapp-bar { opacity: 0; transform: translateY(12px); pointer-events: none; }
.tg-close { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: var(--ink-2); font-size: 1.6rem; line-height: 1; cursor: pointer; }
.tg-close:hover { background: var(--surface-2); color: var(--ink); }
.tg-arrow { position: fixed; top: 8px; right: 14px; width: 56px; height: 56px; color: var(--teal); }
.tg-dialog:not([open]) .tg-arrow { display: none; }

/* Службова сторінка тесту переходу (/t/) */
.t-page { padding-block: 32px 64px; display: grid; gap: 16px; }
.t-page h1 { font-size: var(--fs-3); }
.t-page h2 { font-size: var(--fs-2); margin-top: 16px; }
.t-list { display: grid; gap: 14px; list-style: decimal; padding-left: 1.4em; }
.t-list li { display: grid; gap: 4px; }
.t-list .btn { justify-content: flex-start; text-align: left; }
.t-list code, .t-ua { font-family: var(--mono); font-size: 0.72rem; color: var(--ink-3); overflow-wrap: anywhere; }

/* Юридичні сторінки (політика, умови): читабельна колонка тексту */
.legal { max-width: 760px; padding-block: 40px 80px; }
.legal h1 { font-size: var(--fs-4); margin-top: 8px; }
.legal-back a, .legal-other a { color: var(--teal); text-decoration: none; font-weight: 500; }
.legal-meta { margin-top: 10px; color: var(--ink-3); font-size: var(--fs-0); }
.legal-note { margin-top: 14px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface); color: var(--ink-2); font-size: var(--fs-0); }
.legal-note a { color: var(--teal); }
.legal-intro { margin-top: 20px; color: var(--ink-2); font-size: var(--fs-2); }
.legal-toc { margin-top: 28px; padding: 18px 22px; border-radius: var(--radius); background: var(--surface); }
.legal-toc h2 { font-size: var(--fs-1); color: var(--ink-3); }
.legal-toc ol { margin-top: 10px; padding-left: 1.3em; list-style: decimal; display: grid; gap: 6px; }
.legal-toc a { color: var(--ink-2); text-decoration: none; }
.legal-toc a:hover { color: var(--teal); }
.legal-sec { margin-top: 36px; scroll-margin-top: 84px; }
.legal-sec h2 { font-size: var(--fs-3); }
.legal-sec p { margin-top: 12px; color: var(--ink-2); max-width: 70ch; }
.legal-other { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); }

/* Сторінка вибору мови (корінь, без JS) */
.root-pick { display: grid; min-height: 100vh; place-items: center; }
.root-in { display: grid; gap: 16px; justify-items: center; }
.root-langs { display: grid; gap: 4px; min-width: 220px; }

/* Низькі/вузькі телефони (iPhone SE): кнопка Telegram має бути видно без прокрутки */
@media (max-width: 24em), (max-height: 600px) and (max-width: 47.99em) {
  .hero { padding-top: 20px; }
  .hero h1 { font-size: 1.8rem; }
  .hero-lead { margin-top: 12px; font-size: var(--fs-1); line-height: 1.55; }
  .hero-cta { margin-top: 18px; }
}

/* Мобільний hero: темніше підкладка під текстом (свічки великі й контрастні) */
@media (max-width: 47.99em) {
  .hero-bg::after { background: linear-gradient(180deg, oklch(0.165 0.022 210 / 0.55) 0%, oklch(0.165 0.022 210 / 0.82) 40%, var(--bg) 100%); }
}

/* ---------------------------------------------------------------- планшет+ */
@media (min-width: 48em) {
  .top-nav { display: block; }
  .cmp-head { display: grid; grid-template-columns: 1fr 1.4fr; gap: 32px; margin-top: 36px; font-size: var(--fs-0); font-weight: 600; color: var(--ink-3); }
  .cmp-head span:last-child { color: var(--teal); }
  .cmp { margin-top: 12px; }
  .cmp-row { grid-template-columns: 1fr 1.4fr; gap: 32px; padding-block: 22px; }
  .cmp-tag { display: none; }
  .cmp-old { text-decoration: line-through; text-decoration-color: oklch(0.66 0.19 25 / 0.5); text-decoration-thickness: 1px; }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 32px; }
  .extras ul { grid-template-columns: 1fr 1fr; }
  .faq-in { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
  .dock { display: none; }
}

@media (min-width: 64em) {
  .case-list { grid-auto-columns: calc((100% - 2 * var(--gutter) - 24px) / 2); gap: 24px; }
  .screen-rail { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 330px)); justify-content: center; grid-auto-columns: auto; gap: 40px; margin-inline: 0; padding-inline: 0; overflow: visible; }
  .screen:nth-child(2) { transform: translateY(32px); }
  .hero { padding-block: 72px 140px; min-height: min(92vh, 860px); display: grid; align-items: center; }
  .hero-in { grid-template-columns: 1.1fr 0.9fr; }
  .hero-msg { justify-self: end; transform: translateY(24px); }
  .ana-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; }
  .ana-msg { position: sticky; top: 96px; }
  .explorer { grid-template-columns: minmax(240px, 300px) minmax(0, 1fr); gap: 40px; align-items: start; }
  .js .tabs { flex-direction: column; overflow: visible; margin: 0; padding: 0; }
  .js .tab { justify-content: space-between; border-radius: var(--radius-sm); min-height: 52px; padding: 10px 16px; font-size: var(--fs-1); }
  .panel { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 32px; }
}

/* Без JS вкладки не показуємо, а панелі йдуть списком (вище). Із JS — лише обрана. */
.js .panel[hidden] { display: none; }
.js .panel h3 .tier { display: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
