/* myhealthflow.app — направление 1b «Спокойная картина» из claude.ai/design (HealthFlow Site).
   Токены — дизайн-система приложения v2 (colors_and_type.css): серый фон, белые карточки,
   одна мягкая тень, радиусы из закрытого набора, пары base/ink для статусов. Шрифт — Onest. */
:root {
  --hf-bg: #EBEBEA;
  --hf-bg-elev: #FFFFFF;
  --hf-bg-secondary: #F4F5F6;
  --hf-divider: rgba(0, 0, 0, .06);
  --hf-divider-strong: rgba(0, 0, 0, .10);
  --hf-fg: #191919;
  --hf-fg-secondary: #333333;
  --hf-fg-tertiary: #666666;
  --hf-fg-quaternary: #8E8E8E;
  --hf-link: #0B67CC;
  --hf-brand: #636AE8;
  --hf-brand-strong: #4F56D6;
  --hf-on-brand: #FFFFFF;
  --hf-brand-tint: rgba(99, 106, 232, .12);
  --hf-brand-ink: #4F56D6;
  --hf-outline: rgba(102, 102, 102, .25);
  --hf-optimal-ink: #217F39;  --hf-optimal-bg: rgba(52, 199, 89, .12);
  --hf-low-ink: #9A6407;      --hf-low-bg: rgba(245, 158, 11, .12);
  --hf-high-ink: #A15D25;     --hf-high-bg: rgba(237, 137, 54, .12);
  /* #717174 из ДС даёт 4.42:1 на своей подложке (Lighthouse), а не 4.58 — на сайте чуть темнее. */
  --hf-nodata-ink: #6C6C70;   --hf-nodata-bg: rgba(199, 199, 204, .20);
  --hf-soon: #F59E0B;
  --area-metabolic: #3182CE;  --area-metabolic-bg: rgba(49, 130, 206, .12);
  --area-nutrients: #319B96;  --area-nutrients-bg: rgba(56, 178, 172, .12);
  --area-heart: #E53E3E;      --area-heart-bg: rgba(229, 62, 62, .12);
  --area-thyroid: #B48527;    --area-thyroid-bg: rgba(214, 158, 46, .12);
  --hf-shadow-card: 0 2px 6px rgba(0, 0, 0, .04);
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --hf-bg: #000000;
    --hf-bg-elev: #1C1C1E;
    --hf-bg-secondary: #2C2C2E;
    --hf-divider: rgba(255, 255, 255, .10);
    --hf-divider-strong: rgba(255, 255, 255, .16);
    --hf-fg: #FFFFFF;
    --hf-fg-secondary: #98989F;
    --hf-fg-tertiary: #8E8E93;
    --hf-fg-quaternary: #6B6B70;
    --hf-link: #6FB1FF;
    --hf-brand: #8B90F0;
    --hf-brand-strong: #A9AEFF;
    --hf-on-brand: #1C1C1E;
    --hf-brand-tint: rgba(139, 144, 240, .20);
    --hf-brand-ink: #A9AEFF;
    --hf-optimal-ink: #34C759;  --hf-optimal-bg: rgba(52, 199, 89, .20);
    --hf-low-ink: #F59E0B;      --hf-low-bg: rgba(245, 158, 11, .20);
    --hf-high-ink: #ED8936;     --hf-high-bg: rgba(237, 137, 54, .20);
    --hf-nodata-ink: #8E8E93;
    --area-metabolic-bg: rgba(49, 130, 206, .20);
    --area-nutrients: #38B2AC;  --area-nutrients-bg: rgba(56, 178, 172, .20);
    --area-heart-bg: rgba(229, 62, 62, .20);
    --area-thyroid: #D69E2E;    --area-thyroid-bg: rgba(214, 158, 46, .20);
    --hf-shadow-card: none;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  font-family: Onest, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  color: var(--hf-fg);
  background: var(--hf-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--hf-link); text-underline-offset: 3px; }
a:hover { color: var(--hf-brand-ink); }
:focus-visible { outline: 3px solid var(--hf-brand); outline-offset: 2px; border-radius: 8px; }
h1, h2, h3, p { margin: 0; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }
.card { background: var(--hf-bg-elev); border-radius: 20px; box-shadow: var(--hf-shadow-card); }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--hf-fg-tertiary); }
.eyebrow-brand { color: var(--hf-brand-ink); }
.h-section { font-size: clamp(28px, 4vw, 40px); line-height: 1.1; font-weight: 700; letter-spacing: -.02em; text-wrap: balance; overflow-wrap: break-word; hyphens: auto; }
.h-page { font-size: clamp(32px, 5vw, 44px); line-height: 1.1; font-weight: 700; letter-spacing: -.02em; overflow-wrap: break-word; hyphens: auto; }
.muted { color: var(--hf-fg-secondary); }
.link-arrow { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; color: var(--hf-brand-ink); }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 10; background: var(--hf-bg-elev); color: var(--hf-fg); padding: 12px 16px; border-radius: 12px; font-weight: 600; }
.skip:focus { left: 16px; }

/* ---------- шапка ---------- */
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 8px; min-height: 44px; color: var(--hf-fg); text-decoration: none; font-weight: 700; font-size: 18px; letter-spacing: -.01em; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px; background: var(--hf-bg-elev); border-radius: 24px; padding: 4px; box-shadow: var(--hf-shadow-card); }
.site-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; font-size: 15px; font-weight: 500; text-decoration: none; color: var(--hf-fg); }
.site-nav a:hover { background: var(--hf-bg-secondary); color: var(--hf-fg); }
.site-nav a[aria-current="page"] { background: var(--hf-brand-tint); color: var(--hf-brand-ink); font-weight: 600; }
@media (max-width: 560px) { .site-nav { width: 100%; } .site-nav a { padding: 0 12px; font-size: 14px; } .phone { width: min(240px, 62vw); border-radius: 36px; } }

/* ---------- кнопки магазинов ---------- */
.stores { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.store-soon { display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 8px 24px; border-radius: 999px; background: var(--hf-bg-elev); border: 1.5px solid var(--hf-outline); font-size: 17px; font-weight: 600; color: var(--hf-fg-secondary); }
.store-soon::before { content: ""; width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--hf-soon); }
.store-live { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 20px; border-radius: 12px; background: #000; color: #fff; border: 1.5px solid rgba(255, 255, 255, .3); text-decoration: none; font-size: 16px; font-weight: 600; }
.store-live:hover { color: #fff; }
.store-live svg { width: 22px; height: 22px; fill: currentColor; flex: none; }
.platforms { font-size: 15px; color: var(--hf-fg-tertiary); }

.note { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-radius: 12px; border: 1.5px solid rgba(99, 106, 232, .3); background: var(--hf-bg-elev); font-size: 15px; line-height: 1.45; max-width: 36em; }
.note-icon { width: 24px; height: 24px; flex: none; border-radius: 50%; background: var(--hf-brand-tint); color: var(--hf-brand-ink); display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.note strong { font-weight: 600; }

/* ---------- главная ---------- */
.home { display: flex; flex-direction: column; gap: clamp(56px, 9vw, 96px); }
.hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: clamp(32px, 5vw, 56px); align-items: center; padding-top: clamp(24px, 5vw, 56px); }
.hero-text { display: flex; flex-direction: column; gap: 20px; }
.hero h1 { font-size: clamp(36px, 6.2vw, 60px); line-height: 1.05; font-weight: 700; letter-spacing: -.03em; text-wrap: balance; overflow-wrap: break-word; hyphens: auto; }
.lead { font-size: clamp(17px, 2vw, 20px); color: var(--hf-fg-secondary); text-wrap: pretty; max-width: 34em; }

.phone { width: min(300px, 78vw); aspect-ratio: 9 / 19.5; border-radius: 44px; border: 2px solid var(--hf-divider-strong); background: var(--hf-bg-secondary); display: grid; place-items: center; position: relative; overflow: hidden; margin: 0 auto; }
.phone-sm { width: min(260px, 70vw); border-radius: 40px; }
.phone::before { content: ""; position: absolute; top: 14px; left: 50%; transform: translateX(-50%); width: 84px; height: 24px; border-radius: 999px; background: var(--hf-divider-strong); z-index: 1; }
.phone img { width: 100%; height: 100%; object-fit: cover; }
.phone-label { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--hf-fg-tertiary); }

.block { display: flex; flex-direction: column; gap: 24px; }
.grid-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.steps { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.steps li { padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.steps h3 { font-size: 20px; font-weight: 600; line-height: 1.25; }
.steps p, .features p { color: var(--hf-fg-secondary); }
.tile { width: 40px; height: 40px; border-radius: 10px; background: var(--hf-brand-tint); color: var(--hf-brand-ink); display: grid; place-items: center; font-weight: 700; font-variant-numeric: tabular-nums; flex: none; }
.tile svg { width: 20px; height: 20px; }
.tile-optimal { background: var(--hf-optimal-bg); color: var(--hf-optimal-ink); }
.tile-metabolic { background: var(--area-metabolic-bg); color: var(--area-metabolic); }
.tile-nutrients { background: var(--area-nutrients-bg); color: var(--area-nutrients); }
.tile-heart { background: var(--area-heart-bg); color: var(--area-heart); }
.tile-thyroid { background: var(--area-thyroid-bg); color: var(--area-thyroid); }
.features { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.features li { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.features h3 { font-size: 18px; font-weight: 600; line-height: 1.3; }
.features p { font-size: 15px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.chip-optimal { color: var(--hf-optimal-ink); background: var(--hf-optimal-bg); }
.chip-low { color: var(--hf-low-ink); background: var(--hf-low-bg); }
.chip-high { color: var(--hf-high-ink); background: var(--hf-high-bg); }
.chip-nodata { color: var(--hf-nodata-ink); background: var(--hf-nodata-bg); }

.flow { border-radius: 28px; padding: clamp(24px, 5vw, 48px); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: clamp(24px, 5vw, 48px); align-items: center; }
.flow-text { display: flex; flex-direction: column; gap: 20px; }
.flow-text > p { font-size: 17px; }
.bubbles { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.bubbles li { max-width: 100%; padding: 12px 16px; border-radius: 20px 20px 20px 4px; background: var(--hf-brand-tint); line-height: 1.4; }
.small-note { font-size: 14px; color: var(--hf-fg-tertiary); }

.privacy { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: clamp(24px, 5vw, 48px); }
.privacy-text { display: flex; flex-direction: column; gap: 16px; }
.privacy-text > p { font-size: 17px; }
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.checks li { display: flex; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--hf-divider); }
.checks li:last-child { border-bottom: 0; }
.checks li::before { content: "✓"; color: var(--hf-optimal-ink); font-weight: 700; }
.checks strong { font-weight: 600; }

.ranges { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; padding: clamp(24px, 4vw, 32px); border-radius: 20px; background: var(--hf-bg-secondary); }
.ranges > div { display: flex; flex-direction: column; gap: 8px; flex: 1 1 420px; min-width: 0; }
.ranges h2 { font-size: 24px; line-height: 1.25; font-weight: 600; letter-spacing: -.02em; }
.ranges p { color: var(--hf-fg-secondary); line-height: 1.5; text-wrap: pretty; }
.btn-secondary { display: inline-flex; align-items: center; min-height: 48px; padding: 0 20px; border-radius: 999px; background: var(--hf-bg-elev); border: 1.5px solid var(--hf-outline); font-weight: 600; color: var(--hf-fg); text-decoration: none; }
.btn-secondary:hover { color: var(--hf-fg); background: var(--hf-bg-secondary); }
.btn-primary { display: inline-flex; align-items: center; min-height: 48px; padding: 0 20px; border-radius: 999px; background: var(--hf-brand-strong); color: var(--hf-on-brand); font-weight: 600; text-decoration: none; }
.btn-primary:hover { color: var(--hf-on-brand); filter: brightness(1.06); }

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.plans > div { padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.plans h3 { font-size: 20px; font-weight: 600; }
.plans p { color: var(--hf-fg-secondary); }
.plan-plus { outline: 2px solid var(--hf-brand); outline-offset: -2px; }

.faq-block { max-width: 800px; }
.accordion { display: flex; flex-direction: column; }
.accordion details { border-bottom: 1px solid var(--hf-divider); }
.accordion details:last-child { border-bottom: 0; }
.accordion summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 56px; padding: 12px 20px; cursor: pointer; font-size: 17px; font-weight: 600; line-height: 1.35; list-style: none; }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: "+"; color: var(--hf-fg-quaternary); font-size: 20px; flex: none; }
.accordion details[open] summary::after { content: "−"; }
.accordion .answer { padding: 0 20px 20px; color: var(--hf-fg-secondary); line-height: 1.5; display: flex; flex-direction: column; gap: 8px; }

.final { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 20px; padding: clamp(40px, 7vw, 72px) clamp(16px, 4vw, 32px); border-radius: 28px; }
.final img { width: 64px; height: 64px; border-radius: 14px; }
.final h2 { max-width: 16em; font-size: clamp(28px, 4.4vw, 44px); }
.final .stores { justify-content: center; }

/* ---------- документы ---------- */
.doc-layout { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; padding-top: clamp(16px, 4vw, 40px); }
.toc { flex: 1 1 220px; max-width: 100%; position: sticky; top: 16px; display: flex; flex-direction: column; gap: 4px; padding: 16px; max-height: calc(100vh - 32px); overflow-y: auto; }
.toc summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; min-height: 44px; padding: 0 8px; }
.toc summary::-webkit-details-marker { display: none; }
.toc summary::after { content: "+"; color: var(--hf-fg-quaternary); font-size: 20px; }
.toc[open] summary::after { content: "−"; }
.toc-links { display: flex; flex-direction: column; gap: 4px; }
.toc a { display: flex; align-items: center; min-height: 44px; padding: 4px 8px; border-radius: 12px; font-size: 15px; line-height: 1.3; color: var(--hf-fg); text-decoration: none; }
.toc a:hover { background: var(--hf-bg-secondary); color: var(--hf-fg); }
@media (max-width: 860px) { .toc { position: static; max-height: none; } }
.doc { flex: 999 1 560px; min-width: 0; max-width: 760px; padding: clamp(20px, 5vw, 48px); }
.doc-body { font-size: 17px; line-height: 1.6; }
.doc-body > * { max-width: 68ch; }
.doc-body h1 { font-size: clamp(32px, 5vw, 44px); line-height: 1.1; font-weight: 700; letter-spacing: -.02em; margin-bottom: 16px; overflow-wrap: break-word; hyphens: auto; }
.doc-body h2 { font-size: 22px; line-height: 1.25; font-weight: 600; letter-spacing: -.01em; margin: 40px 0 12px; }
.doc-body h3 { font-size: 18px; line-height: 1.3; font-weight: 600; margin: 24px 0 8px; }
.doc-body p { margin: 0 0 12px; }
.doc-body ul { padding-left: 22px; margin: 0 0 12px; }
.doc-body li { margin: 6px 0; }
.doc-body code { font-size: .9em; background: var(--hf-bg-secondary); padding: 1px 6px; border-radius: 6px; }
.callout { margin: 16px 0; padding: 16px 20px; border-radius: 12px; background: var(--hf-brand-tint); line-height: 1.55; }
.lang-note { padding: 12px 16px; border-radius: 12px; background: var(--hf-bg-secondary); font-size: 15px; line-height: 1.45; margin-bottom: 16px; }

/* ---------- поддержка ---------- */
.narrow { max-width: 800px; margin: 0 auto; padding: clamp(16px, 4vw, 40px) var(--gutter) 0; display: flex; flex-direction: column; gap: 20px; }
.contact { padding: 24px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.contact > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.contact .mail { font-size: 20px; font-weight: 600; color: var(--hf-brand-ink); overflow-wrap: anywhere; }
.support-intro { font-size: 17px; line-height: 1.55; display: flex; flex-direction: column; gap: 12px; }
.support-intro .callout { margin: 0; }
.faq-group { font-size: 24px; font-weight: 600; letter-spacing: -.02em; margin-top: 16px; }

/* ---------- источники ---------- */
.sources-page { max-width: 960px; }
.sources-intro { display: flex; flex-direction: column; gap: 12px; font-size: 17px; line-height: 1.55; max-width: 68ch; }
.sources-intro p:not(:first-child) { color: var(--hf-fg-secondary); }
.stats { font-size: 15px; color: var(--hf-fg-tertiary); }
.cat-index { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-index a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; background: var(--hf-bg-elev); box-shadow: var(--hf-shadow-card); color: var(--hf-fg); text-decoration: none; font-size: 15px; font-weight: 500; }
.cat-index a:hover { background: var(--hf-bg-secondary); }
.count { font-size: 13px; color: var(--hf-fg-tertiary); font-variant-numeric: tabular-nums; font-weight: 400; }
.filter { display: flex; flex-direction: column; gap: 8px; font-size: 14px; font-weight: 600; color: var(--hf-fg-secondary); }
.filter input { min-height: 48px; padding: 0 16px; border-radius: 16px; border: 1.5px solid var(--hf-outline); background: var(--hf-bg-elev); color: var(--hf-fg); font: inherit; font-size: 16px; font-weight: 400; }
.src-cat { display: flex; flex-direction: column; gap: 12px; padding-top: 12px; }
.src-cat h2 { font-size: 22px; font-weight: 600; letter-spacing: -.01em; display: flex; align-items: baseline; gap: 8px; }
.src-list { margin: 0; border-radius: 16px; }
.src-row { display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 12px 16px; border-bottom: 1px solid var(--hf-divider); content-visibility: auto; contain-intrinsic-size: auto 52px; }
.src-row:last-child { border-bottom: 0; }
.src-row dt { flex: 1 1 200px; font-weight: 600; line-height: 1.4; min-width: 0; }
.src-row dd { margin: 0; flex: 2 1 280px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; font-size: 15px; line-height: 1.4; color: var(--hf-fg-secondary); }
.src-row dd a, .src-row dd span { display: inline-flex; align-items: center; min-height: 32px; overflow-wrap: anywhere; }
.no-results { color: var(--hf-fg-tertiary); }

/* ---------- 404 ---------- */
.notfound { max-width: 720px; margin: 0 auto; padding: clamp(40px, 8vw, 96px) var(--gutter) 0; display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.lang-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 8px; width: 100%; }
.lang-grid a { display: flex; align-items: center; min-height: 48px; padding: 0 16px; border-radius: 16px; background: var(--hf-bg-elev); box-shadow: var(--hf-shadow-card); color: var(--hf-fg); text-decoration: none; font-weight: 500; }

/* ---------- подвал ---------- */
.site-footer { padding: clamp(56px, 9vw, 96px) 0 32px; }
.footer-grid { border-top: 1px solid var(--hf-divider-strong); padding-top: 32px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 32px; }
.footer-about { display: flex; flex-direction: column; gap: 12px; font-size: 15px; }
.footer-about .brand { font-size: 17px; min-height: 0; }
.footer-about .brand img { width: 24px; height: 24px; border-radius: 6px; }
.footer-links { display: flex; flex-direction: column; }
.footer-links a { display: flex; align-items: center; min-height: 44px; font-size: 15px; color: var(--hf-fg); text-decoration: none; }
.footer-links a:hover { color: var(--hf-brand-ink); }
.footer-links a.mail { color: var(--hf-link); overflow-wrap: anywhere; }
.footer-langs ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.footer-langs a { display: flex; align-items: center; min-height: 44px; font-size: 15px; color: var(--hf-fg); text-decoration: none; }
.footer-langs a[aria-current="true"] { font-weight: 600; color: var(--hf-brand-ink); }
.fine { margin-top: 24px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--hf-fg-tertiary); }

@media print {
  .site-header, .site-footer, .toc, .skip { display: none; }
  body { background: #fff; color: #000; }
  .card { box-shadow: none; }
  .doc { padding: 0; }
}
