/* HopeCore — сайт. Кольори й шрифти узгоджені із застосунком (світла й темна теми). */

@font-face {
  font-family: 'Onest';
  src: url('/fonts/Onest-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'Outfit';
  src: url('/fonts/Outfit-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
/* Запасні шрифти з підігнаними метриками: поки вантажиться справжній, текст не стрибає */
@font-face {
  font-family: 'Onest Fallback';
  src: local('Arial');
  size-adjust: 104%;
  ascent-override: 93.3%;
  descent-override: 29.3%;
  line-gap-override: 0%;
}
@font-face {
  font-family: 'Outfit Fallback';
  src: local('Arial');
  size-adjust: 99%;
  ascent-override: 101%;
  descent-override: 26.3%;
  line-gap-override: 0%;
}

:root {
  color-scheme: light dark;
  --bg: #f9f8f6;
  --bg-1: #fbf1f1;
  --bg-2: #f3efff;
  --bg-3: #eaf5f2;
  --surface: #ffffff;
  --surface-muted: #f4f3f0;
  --ink: #111214;
  --body: #3b4045;
  --muted: #5b6066;
  --faint: #6b7178;
  --accent: #31694e;
  --accent-fill: #31694e;
  --accent-soft: #e8f5e9;
  --on-accent: #ffffff;
  --lime: #bbc863;
  --forest: #658c58;
  --line: rgba(0, 0, 0, 0.09);
  --shadow: 0 1px 2px rgba(17, 18, 20, 0.04), 0 8px 28px rgba(17, 18, 20, 0.06);
  --shadow-lg: 0 2px 4px rgba(17, 18, 20, 0.05), 0 24px 60px rgba(49, 105, 78, 0.16);
  --wordmark: linear-gradient(135deg, #3a7b5c 0%, #31694e 55%, #658c58 100%);
  --header-bg: rgba(249, 248, 246, 0.97);
  --radius: 20px;
  --radius-sm: 12px;
  --font: 'Onest', 'Onest Fallback', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-brand: 'Outfit', 'Outfit Fallback', 'Onest', system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121614;
    --bg-1: #17151b;
    --bg-2: #121619;
    --bg-3: #0e1a16;
    --surface: #1a201d;
    --surface-muted: #252e2a;
    --ink: #eef2ef;
    --body: #cdd4d0;
    --muted: #a6b0aa;
    --faint: #87918c;
    --accent: #74c69d;
    --accent-fill: #3a7f5d;
    --accent-soft: #1c3328;
    --line: rgba(255, 255, 255, 0.1);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 28px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.35), 0 24px 60px rgba(0, 0, 0, 0.5);
    --wordmark: linear-gradient(135deg, #9be0bb 0%, #74c69d 50%, #bbc863 100%);
    --header-bg: rgba(18, 22, 20, 0.97);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--bg); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation: none !important; transition: none !important; } }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--body);
  background: var(--bg);
  background-image: linear-gradient(160deg, var(--bg-1) 0%, var(--bg-2) 45%, var(--bg-3) 100%);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
/* Дотик пальцем не малює ні синього квадрата, ні рамки фокусу: рамка лише для клавіатури (клас ставить site.js) */
html { -webkit-tap-highlight-color: transparent; }
a, button, summary, label, input, .btn { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.pointer :focus-visible { outline: none; }
.btn, summary, button { -webkit-user-select: none; user-select: none; }
img, svg { max-width: 100%; display: block; }
h1, h2, h3 { color: var(--ink); line-height: 1.2; letter-spacing: -0.015em; margin: 0; }
p { margin: 0 0 1em; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--accent-fill); color: var(--on-accent); padding: 10px 16px; border-radius: 10px; z-index: 100; }
.skip:focus { left: 16px; }

/* ── Шапка ─────────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
}
.bar {
  max-width: 1120px; margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.wordmark {
  font-family: var(--font-brand); font-weight: 650; font-size: 26px; letter-spacing: -0.02em; line-height: 1;
  background: var(--wordmark); -webkit-background-clip: text; background-clip: text; color: transparent;
  text-decoration: none; padding: 4px 0;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand .mark { width: 32px; height: 32px; border-radius: 9px; display: block; box-shadow: 0 2px 8px rgba(33, 73, 58, 0.25); }
.nav { display: flex; align-items: center; gap: 6px; }
.nav a {
  color: var(--body); text-decoration: none; font-size: 15px; font-weight: 500;
  padding: 8px 12px; border-radius: 999px;
}
.nav a:hover { background: var(--accent-soft); color: var(--accent); }
.nav .lang {
  border: 1px solid var(--line); font-weight: 600; font-size: 13px; letter-spacing: 0.04em; color: var(--ink);
  margin-left: 4px;
}
@media (max-width: 760px) { .nav .hide-sm { display: none; } }
@media (max-width: 520px) { .nav .hide-xs { display: none; } }

/* ── Макет ─────────────────────────────────────────────────────────── */
main { flex: 1 0 auto; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.prose-wrap { max-width: 780px; margin: 0 auto; padding: 56px 20px 72px; }

/* ── Документи (політика, умови…) ──────────────────────────────────── */
.doc h1 { font-size: clamp(30px, 5vw, 42px); margin-bottom: 10px; }
/* Хлібні крихти над заголовком сторінки */
.crumbs { margin: 0 0 14px; font-size: 14px; color: var(--faint); }
.doc .crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 8px; }
.doc .crumbs li { margin: 0; }
.crumbs li + li::before { content: '›'; margin-right: 8px; color: var(--faint); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); text-decoration: underline; }
.crumbs [aria-current] { color: var(--body); }
.doc .meta { color: var(--faint); font-size: 15px; margin-bottom: 28px; }
.doc .lead { font-size: 19px; color: var(--ink); margin-bottom: 28px; }
.doc h2 { font-size: 24px; margin: 44px 0 14px; scroll-margin-top: 80px; }
.doc.numbered { counter-reset: sec; }
.doc.numbered h2 { counter-increment: sec; }
.doc.numbered h2::before { content: counter(sec) '. '; color: var(--accent); }
.doc h3 { font-size: 18px; margin: 26px 0 8px; }
.doc ul, .doc ol { padding-left: 1.3em; margin: 0 0 1em; }
.doc li { margin-bottom: 0.45em; }
.doc li::marker { color: var(--accent); }
.doc strong { color: var(--ink); font-weight: 600; }
.doc table { width: 100%; border-collapse: collapse; margin: 0 0 1.4em; font-size: 15.5px; background: var(--surface); border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow); }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.doc th { background: var(--surface-muted); color: var(--ink); font-weight: 600; font-size: 14px; }
.doc tr:last-child td { border-bottom: 0; }
.table-scroll { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
.toc {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 24px; margin: 0 0 12px; box-shadow: var(--shadow);
}
.toc strong { display: block; margin-bottom: 8px; font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); font-weight: 600; }
.toc ol { margin: 0; padding-left: 1.4em; columns: 2; column-gap: 32px; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }
.toc li { break-inside: avoid; margin-bottom: 0.3em; font-size: 15.5px; }
@media (max-width: 640px) { .toc ol { columns: 1; } }
.callout {
  background: var(--accent-soft); border: 1px solid var(--line); border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm); padding: 16px 20px; margin: 0 0 1.4em; color: var(--ink);
}
.callout p:last-child { margin-bottom: 0; }
.callout.warn { border-left-color: #e67e22; background: color-mix(in srgb, #e67e22 11%, var(--surface)); }

/* ── Кнопки ────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px; border-radius: 999px;
  font: 600 16px/1 var(--font); text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn-primary { background: var(--accent-fill); color: var(--on-accent); box-shadow: 0 6px 20px color-mix(in srgb, var(--accent-fill) 38%, transparent); }
.btn-primary:hover { transform: translateY(-1px); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); box-shadow: var(--shadow); }
.btn-ghost:hover { transform: translateY(-1px); }
.btn[aria-disabled='true'] { cursor: default; opacity: 0.72; }
.btn[aria-disabled='true']:hover { transform: none; }
/* На сенсорному екрані «наведення» не залипає, а натискання дає м'який відгук */
@media (hover: none) { .btn-primary:hover, .btn-ghost:hover { transform: none; } }
.btn:active, .btn[aria-disabled='true']:active { transform: scale(0.97); transition-duration: .08s; }
.nav a:active, .langpanel a:active, .langpick summary:active { background: var(--accent-soft); }
.btn svg { width: 22px; height: 22px; flex: none; }
.btn small { display: block; font-size: 11px; font-weight: 500; opacity: 0.8; letter-spacing: 0.03em; text-transform: uppercase; margin-bottom: 3px; }
.btn .t { text-align: left; line-height: 1.1; }
.store-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ── Головна ───────────────────────────────────────────────────────── */
.hero { padding: 72px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
.eyebrow {
  display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft); padding: 7px 14px; border-radius: 999px; margin-bottom: 22px;
}
.hero h1 { font-size: clamp(40px, 6.4vw, 68px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.04; margin-bottom: 22px; }
.hero h1 em { display: inline-block; font-style: normal; background: var(--wordmark); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.sub { font-size: clamp(18px, 2.2vw, 21px); color: var(--body); max-width: 34em; margin-bottom: 32px; }
.hero .note { margin-top: 14px; font-size: 14px; color: var(--faint); }
.hero-art { display: flex; justify-content: center; position: relative; }
.hero-art::before {
  content: ''; position: absolute; inset: 6% 4%; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--lime) 40%, transparent), transparent 72%);
  filter: blur(20px); z-index: 0;
}
@media (max-width: 860px) {
  .hero { padding: 40px 0 20px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { margin-top: 12px; }
  .hero-art .phone { width: min(236px, 62vw); transform: rotate(2deg); }
}

.section { padding: 56px 0; }
.section-head { max-width: 640px; margin-bottom: 34px; }
.section-head h2 { font-size: clamp(28px, 4vw, 40px); margin-bottom: 12px; }
.section-head p { font-size: 18px; color: var(--muted); margin: 0; }

.why { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 960px) { .why { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .why { grid-template-columns: 1fr; } }
.why-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 26px 28px; box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.why-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.why-card .ico {
  width: 48px; height: 48px; border-radius: 15px; margin-bottom: 18px;
  background: linear-gradient(135deg, var(--accent-soft), color-mix(in srgb, var(--lime) 28%, var(--accent-soft)));
  color: var(--accent); display: grid; place-items: center;
}
.why-card .ico svg { width: 25px; height: 25px; }
.why-card h3 { font-size: 19px; margin-bottom: 8px; }
.why-card p { margin: 0; font-size: 15.5px; color: var(--muted); }

.manifesto { padding: 36px 0 16px; text-align: center; }
.manifesto p {
  max-width: 22em; margin: 0 auto 12px; font-family: var(--font-brand); font-weight: 600;
  font-size: clamp(30px, 5.2vw, 52px); line-height: 1.12; letter-spacing: -0.025em; color: var(--ink);
}
.manifesto span { display: block; color: var(--muted); font-size: 18px; max-width: 32em; margin: 0 auto; }

/* Вікно вибору мови */
.langpick { position: relative; margin-left: 4px; }
.langpick summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 7px;
  height: 40px; padding: 0 12px 0 11px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 13px; font-weight: 700; letter-spacing: 0.04em; color: var(--ink); background: var(--surface);
}
.langpick summary::-webkit-details-marker { display: none; }
.langpick summary svg { width: 17px; height: 17px; }
.langpick summary svg:last-child { width: 14px; height: 14px; opacity: 0.6; transition: transform .15s ease; }
.langpick[open] summary svg:last-child { transform: rotate(180deg); }
.langpick summary:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.langpanel {
  position: absolute; right: 0; top: calc(100% + 10px); width: 300px; max-height: min(70vh, 520px);
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden; z-index: 30;
}
.langpanel input {
  margin: 12px 12px 8px; height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface-muted); color: var(--ink); font: 500 16px var(--font);
}
.langpanel input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.langpanel ul { list-style: none; margin: 0; padding: 4px 6px 8px; overflow-y: auto; }
.langpanel li[hidden] { display: none; }
.langpanel a {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 11px 12px;
  border-radius: 10px; color: var(--body); text-decoration: none; font-size: 16px;
}
.langpanel a b { font-weight: 600; color: var(--ink); }
.langpanel a small { color: var(--faint); font-size: 13px; }
.langpanel a:hover { background: var(--accent-soft); }
.langpanel a[aria-current] { background: var(--accent-soft); }
.langpanel a[aria-current] b { color: var(--accent); }
.langpanel .none { margin: 0; padding: 18px; text-align: center; color: var(--muted); font-size: 15px; }
@media (max-width: 520px) {
  .langpick { position: static; }
  .langpanel { position: fixed; left: 12px; right: 12px; top: 64px; width: auto; max-height: calc(100vh - 84px); }
}

/* Спливаюче вікно */
.modal {
  border: 0; padding: 0; border-radius: 24px; background: var(--surface); color: var(--body);
  width: min(420px, calc(100vw - 32px)); box-shadow: var(--shadow-lg);
}
.modal::backdrop { background: rgba(10, 14, 12, 0.55); }
.modal[open] { animation: pop-in .28s cubic-bezier(.2, .8, .2, 1); }
.modal[open]::backdrop { animation: fade-in .28s ease; }
.modal.closing { animation: pop-out .18s ease forwards; }
.modal.closing::backdrop { animation: fade-out .18s ease forwards; }
@keyframes pop-in { from { opacity: 0; transform: translateY(18px) scale(0.95); } to { opacity: 1; transform: none; } }
@keyframes pop-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(10px) scale(0.97); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-out { from { opacity: 1; } to { opacity: 0; } }
/* Список мов і відповіді в запитаннях з'являються плавно */
.langpick[open] .langpanel { animation: drop-in .2s cubic-bezier(.2, .8, .2, 1); transform-origin: top right; }
.doc details[open] > div { animation: fade-in .22s ease; }
@keyframes drop-in { from { opacity: 0; transform: translateY(-8px) scale(0.98); } to { opacity: 1; transform: none; } }
.modal form { padding: 30px 28px 26px; text-align: center; }
.modal h2 { font-size: 24px; margin-bottom: 10px; }
.modal p { color: var(--muted); font-size: 16.5px; margin: 0 0 22px; }
.modal .btn { width: 100%; }
.modal .store-row { justify-content: center; margin-bottom: 14px; }

.tag { font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; padding: 2px 6px; border-radius: 6px; background: var(--surface-muted); color: var(--faint); vertical-align: 2px; }
.report-box { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; margin: 0 0 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow); }
.report-box[hidden] { display: none; }
.report-box code { font: 600 14px ui-monospace, Menlo, Consolas, monospace; color: var(--ink); word-break: break-all; }

/* Мініатюри тем */
.themes {
  display: flex; gap: 22px; overflow-x: auto; padding: 8px 20px 28px; margin: 0 -20px;
  -webkit-overflow-scrolling: touch;
}
.themes::-webkit-scrollbar { height: 8px; }
.themes::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; }
.theme-item { flex: none; width: 168px; text-align: center; }
.theme-item .name { margin-top: 14px; font-weight: 600; color: var(--ink); font-size: 15.5px; }
.theme-item .phone { width: 168px; height: 296px; margin: 0 auto; }

/* Телефон-мініатюра (повторює мініатюру теми в застосунку) */
.phone {
  --pad: 1;
  position: relative; width: 250px; aspect-ratio: 9 / 16.2; border-radius: 28px; padding: 5px;
  background: linear-gradient(160deg, var(--p1), var(--p2) 50%, var(--p3));
  border: 1px solid rgba(128, 128, 128, 0.28);
  box-shadow: var(--shadow-lg);
  overflow: hidden; color: var(--pl);
}
.phone .screen { height: 100%; display: flex; flex-direction: column; gap: 10px; padding: 14px 11px 10px; }
.phone .head { display: flex; align-items: center; gap: 8px; }
.phone .ava { width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(135deg, var(--pf1), var(--pf2)); flex: none; }
.phone .ln { height: 6px; border-radius: 6px; background: var(--pl); opacity: 0.8; }
.phone .ln.a { background: var(--pa); opacity: 0.9; height: 5px; }
.phone .post {
  flex: 1; border-radius: 14px; position: relative; overflow: hidden;
  background: radial-gradient(circle at 28% 24%, rgba(255, 226, 181, 0.5), rgba(255, 226, 181, 0) 56%), linear-gradient(150deg, #5b6670, #222a31);
}
.phone .post .side { position: absolute; right: 9px; top: 12px; display: grid; gap: 8px; }
.phone .post .side svg { width: 16px; height: 16px; display: block; }
.phone .post .bar2 { position: absolute; left: 10px; right: 10px; bottom: 9px; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, 0.3); }
.phone .post .bar2 b { display: block; height: 100%; width: 62%; border-radius: 3px; background: var(--pa); }
.phone .msg { padding: 9px 11px; border-radius: 14px 14px 14px 4px; background: var(--ps); width: 62%; display: grid; gap: 6px; border: 1px solid rgba(128, 128, 128, 0.12); }
.phone .msg .ln { height: 5px; opacity: 0.55; }
.phone .msg.me { margin-left: auto; width: 46%; border: 0; border-radius: 14px 14px 4px 14px; background: linear-gradient(180deg, var(--pf1), var(--pf2)); padding: 9px 11px; }
.phone .msg.me .ln { background: var(--on); opacity: 0.8; }
.phone .nav2 { height: 30px; border-radius: 15px; background: var(--ps); border: 1px solid rgba(128, 128, 128, 0.12); display: flex; align-items: center; justify-content: space-around; padding: 0 8px; }
.phone .nav2 i { width: 12px; height: 12px; border-radius: 4px; background: var(--pl); opacity: 0.35; }
.phone .nav2 i:first-child { background: var(--pa); opacity: 1; border-radius: 5px; }
.hero-art .phone { width: min(280px, 72vw); z-index: 1; transform: rotate(3deg); }
.only-dark { display: none; }
@media (prefers-color-scheme: dark) { .only-light { display: none; } .only-dark { display: block; } }

.safety { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
@media (max-width: 800px) { .safety { grid-template-columns: 1fr; gap: 24px; } }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.checks li { position: relative; padding-left: 36px; font-size: 17px; color: var(--ink); }
.checks li small { display: block; font-size: 15px; color: var(--muted); }
.checks li::before {
  content: ''; position: absolute; left: 0; top: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2331694e' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 14px no-repeat;
}
@media (prefers-color-scheme: dark) {
  .checks li::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2374c69d' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E"); }
}
.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow);
}
.panel h3 { font-size: 20px; margin-bottom: 10px; }
.panel p { color: var(--muted); font-size: 16px; }
.panel p:last-child { margin-bottom: 0; }

.cta {
  text-align: center; border-radius: 32px; padding: 56px 24px; margin: 24px 0 72px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent-fill) 14%, var(--surface)), color-mix(in srgb, var(--lime) 18%, var(--surface)));
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.cta h2 { font-size: clamp(28px, 4vw, 40px); margin-bottom: 12px; }
.cta p { color: var(--muted); font-size: 18px; margin: 0 auto 28px; max-width: 30em; }
.cta .store-row { justify-content: center; }

/* ── Підтримка: картки ─────────────────────────────────────────────── */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin: 0 0 32px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.doc .card h2 { margin: 0 0 6px; font-size: 17px; }
.card p { margin: 0; font-size: 15px; color: var(--muted); }
.card a { font-weight: 600; word-break: break-word; }
.doc details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0 18px; margin: 0 0 10px; box-shadow: var(--shadow); }
.doc details summary { cursor: pointer; padding: 15px 0; font-weight: 600; color: var(--ink); list-style: none; display: flex; justify-content: space-between; gap: 14px; }
.doc details summary::-webkit-details-marker { display: none; }
.doc details summary::after { content: '+'; color: var(--accent); font-size: 22px; line-height: 1; }
.doc details[open] summary::after { content: '–'; }
.doc details > div { padding: 0 0 16px; color: var(--body); }
.doc details > div p:last-child { margin-bottom: 0; }

/* ── Підвал ────────────────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 70%, transparent); margin-top: auto; }
.foot { max-width: 1120px; margin: 0 auto; padding: 36px 20px 44px; display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 28px; font-size: 15px; }
@media (max-width: 760px) { .foot { grid-template-columns: 1fr 1fr; } .foot > :first-child { grid-column: 1 / -1; } }
.foot .wordmark { font-size: 24px; }
.foot p { color: var(--muted); margin: 10px 0 0; max-width: 22em; }
.foot .foot-h { margin: 0 0 10px; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); font-weight: 600; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot a { color: var(--body); text-decoration: none; }
.foot a:hover { color: var(--accent); text-decoration: underline; }
.legal-line { max-width: 1120px; margin: 0 auto; padding: 0 20px 28px; font-size: 13.5px; color: var(--faint); }

/* ── 404 ───────────────────────────────────────────────────────────── */
.center { text-align: center; padding: 14vh 20px; }
.center h1 { font-size: clamp(34px, 6vw, 52px); margin-bottom: 12px; }
.center p { color: var(--muted); font-size: 18px; margin-bottom: 28px; }

/* ── Сторінка допису (/p/…) — розмітку віддає функція sharePost ───────── */
.btn-block { width: 100%; }
.post-wrap { max-width: 520px; margin: 0 auto; padding: 28px 16px 56px; }
.post-card { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; box-shadow: var(--shadow-lg); }
.post-media { background: #0d0f10; display: flex; justify-content: center; }
.post-media video, .post-media img { display: block; width: 100%; max-height: 72vh; object-fit: contain; background: #0d0f10; }
.post-body { padding: 20px 22px 24px; }
.post-author { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.post-author .ava { width: 44px; height: 44px; flex: none; border-radius: 50%; object-fit: cover; background: linear-gradient(135deg, var(--forest), var(--accent-fill)); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 18px; }
.post-author b { display: block; color: var(--ink); line-height: 1.25; overflow-wrap: anywhere; }
.post-author span { color: var(--muted); font-size: 14px; }
.post-text { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink); font-size: 17px; margin: 0 0 22px; }
.post-actions { display: grid; gap: 10px; }
.post-note { margin: 16px 0 0; font-size: 14px; color: var(--faint); text-align: center; }
.post-report { display: block; text-align: center; margin-top: 20px; font-size: 13.5px; color: var(--faint); }
.post-report:hover { color: var(--accent); }

/* ── Сторінка профілю (/u/…) — розмітку віддає функція shareProfile ───── */
.profile-card { background: var(--surface); border: 1px solid var(--line); border-radius: 28px; overflow: hidden; box-shadow: var(--shadow-lg); }
.profile-cover {
  height: 132px;
  background:
    radial-gradient(120% 140% at 12% 0%, color-mix(in srgb, var(--lime) 55%, transparent) 0%, transparent 58%),
    radial-gradient(90% 120% at 100% 100%, color-mix(in srgb, var(--forest) 70%, transparent) 0%, transparent 60%),
    linear-gradient(135deg, var(--accent-fill), var(--forest));
}
.profile-body { padding: 0 24px 26px; text-align: center; }
.profile-ava { margin: -56px auto 14px; width: 112px; height: 112px; border-radius: 50%; padding: 5px; background: var(--surface); box-shadow: 0 10px 30px color-mix(in srgb, var(--accent-fill) 32%, transparent); }
.profile-ava .ava { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: grid; place-items: center; background: linear-gradient(135deg, var(--forest), var(--accent-fill)); color: #fff; font: 700 44px/1 var(--font-brand); }
.profile-name { font-size: clamp(24px, 6vw, 30px); line-height: 1.2; margin: 0 0 8px; overflow-wrap: anywhere; }
.profile-handle { margin: 0 0 16px; }
.profile-handle span { display: inline-block; max-width: 100%; padding: 4px 12px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 15px; overflow-wrap: anywhere; }
.profile-bio { white-space: pre-line; overflow-wrap: anywhere; color: var(--body); font-size: 16.5px; margin: 0 0 14px; }
.profile-card .post-actions { margin-top: 22px; }
.foot.single { grid-template-columns: 1fr; }
.doc .actions { margin: 4px 0 1.4em; }
