/* =====================================================
   Clean Clinic — дополнения для внутренних страниц.
   База — стили главной (assets/home.css = <style> из index.html) и typography.css.
   Здесь только то, чего на главной нет. Правила — DESIGN-SYSTEM.md:
   шрифты var(--font-display) / var(--font-text), цвета и тени — переменные главной,
   кнопки — .btn .btn-primary / .btn-outline / .btn-ghost / .btn-wa, отступ секций — .block.
   Все классы с префиксом pg-, чтобы не пересекаться с главной.
   ===================================================== */

/* ---------- первый экран внутренней страницы (как .hero главной) ---------- */
.pg-hero h1{max-width:22ch}
.pg-hero .sub{max-width:60ch}
.pg-accent{color:var(--accent)}
.pg-crumbs{display:flex; flex-wrap:wrap; align-items:center; gap:8px; font-size:13.5px; font-weight:600; color:var(--muted); margin-bottom:18px}
.pg-crumbs a{color:var(--ink-2)}
.pg-crumbs a:hover{color:var(--accent)}
.pg-crumbs span[aria-hidden]{color:var(--line)}
.pg-hero--center{text-align:center}
.pg-hero--center h1,.pg-hero--center .sub{margin-inline:auto}
.pg-hero--center .hero-cta{justify-content:center}
.pg-hero .hero-cta{align-items:center}
.pg-first{margin-top:clamp(40px,6vw,72px)}
.pg-tight{margin-top:clamp(28px,4vw,48px)}
.pg-warn{margin-top:clamp(40px,6vw,72px); margin-bottom:var(--gap)}
.pg-src{margin-top:18px; font-size:13.5px; color:var(--muted); max-width:80ch}
.pg-src a{color:var(--accent)}

/* ---------- каталог капельниц: сетка из карточек главной (.dcard) ---------- */
.pg-cat{display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:20px; align-items:stretch}
.pg-cat .dcard{width:auto}
.pg-cat .dcard[hidden]{display:none}
.pg-cat .dcard h3 a:hover{color:var(--accent)}
.pg-cat .dcard .course{line-height:1.4; min-height:2.8em; white-space:nowrap}
.pg-cat .dcard-foot{flex-direction:column; align-items:flex-start; gap:10px}
.pg-cat .dcard-ph{display:block}
.pg-cat .dcard-ph--soon{display:grid}
@media (max-width:1080px){ .pg-cat{grid-template-columns:repeat(3,minmax(0,1fr))} }
@media (max-width:900px){ .pg-cat{grid-template-columns:repeat(2,minmax(0,1fr))} }
@media (max-width:560px){ .pg-cat{grid-template-columns:minmax(0,1fr)} }

/* ---------- выезд на дом: карточка в стиле .contact-card главной ---------- */
.pg-visit .cc-h{max-width:20ch}
.pg-visit-lead{font-size:clamp(1.02rem,1.5vw,1.15rem); line-height:1.55; color:var(--ink-2); max-width:62ch; margin:0 0 10px}
.pg-visit-grid{display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:0 28px}
.pg-visit-grid .cline{border-bottom:0}
.pg-visit .cc-btns{margin-top:10px}
.pg-visit .cc-btns .btn{flex:0 1 auto}
@media (max-width:900px){ .pg-visit-grid{grid-template-columns:minmax(0,1fr)} .pg-visit-grid .cline{border-bottom:1px solid color-mix(in srgb,var(--accent) 14%,transparent)} }

/* ---------- страница капельницы ---------- */
.pg-prices{flex:1 1 100%; display:flex; flex-wrap:wrap; gap:10px; margin-bottom:6px}
.pg-prices > div{background:var(--surface); border-radius:var(--r-m); padding:12px 18px; box-shadow:var(--shadow); min-width:130px}
.pg-prices small{display:block; font-size:12.5px; font-weight:700; letter-spacing:.05em; text-transform:uppercase; color:var(--muted); margin-bottom:6px}
.pg-prices b{font-family:var(--font-display); font-weight:600; font-size:1.5rem; line-height:1; color:var(--ink)}
.pg-prices .pg-prices-tx{font-size:1.15rem}
.pg-note{flex:1 1 100%; font-size:14px; color:var(--ink-2)}
.pg-cta{display:flex; flex-wrap:wrap; gap:12px}
.pg-hero-ph{aspect-ratio:1/1; border-radius:var(--r-xl); box-shadow:var(--shadow-lift)}
.pg-hero .hero-img{aspect-ratio:1/1; object-fit:cover; background:#fff}
.pg-two{display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:20px}
.pg-two + .pg-two{margin-top:20px}
.pg-card{background:var(--surface); border-radius:var(--r-xl); padding:clamp(22px,3vw,32px); box-shadow:var(--shadow)}
.pg-card h3{margin:0 0 14px; font-size:1.25rem}
.pg-card .dlist{border-top:0; padding-top:0; margin:0}
.pg-card .dlist li{font-size:15px}
.pg-card .pg-con svg{color:var(--muted)}
.pg-p{font-size:15.5px; line-height:1.6; color:var(--ink-2)}
.pg-p + .dlist{margin-top:14px}
@media (max-width:900px){ .pg-two{grid-template-columns:minmax(0,1fr)} }
.pg-about .about-ph img{object-position:50% 50%}
.pg-about h2{font-size:clamp(1.7rem,3.2vw,2.6rem)}
.pg-cap{margin:-12px 0 22px; font-size:14px; font-weight:600; color:var(--muted)}
.pg-council .doc .db{gap:12px}
.pg-council .doc h3{font-size:1.15rem}
.pg-council .dexp{margin-top:0}
.pg-council .spec{font-size:14px}
.pg-council .dph img{object-position:center top}
.pg-council .dph img.cph-pliev{object-position:50% 70%}
.pg-council .dph img.cph-yakovlev{object-position:50% 35%}
.pg-more{margin-top:16px}
.pg-more > summary{list-style:none; display:inline-flex; cursor:pointer}
.pg-more > summary::-webkit-details-marker{display:none}
.pg-more[open] > summary{display:none}
@media (min-width:901px){ .pg-council{grid-template-columns:repeat(3,1fr)} }
/* компьютер: 6 экспертов, остальные — по кнопке details.pg-more сразу после сетки */
@media (min-width:641px){ .pg-council:has(+ .pg-more:not([open])) > .doc:nth-child(n+7){display:none} }
/* телефон: все 11 одной лентой с прокруткой, как .pg-others; кнопка не нужна */
@media (max-width:640px){
  .pg-council{display:flex; overflow-x:auto; scroll-snap-type:x mandatory; gap:12px; margin-inline:calc(var(--pad-x) * -1); padding:4px var(--pad-x) 14px; scroll-padding-inline:var(--pad-x); scrollbar-width:none}
  .pg-council::-webkit-scrollbar{display:none}
  .pg-council > .doc{flex:0 0 72vw; max-width:280px; scroll-snap-align:start}
  .pg-council > .doc:hover{transform:none}
  .pg-council + .pg-more{display:none}
}
.pg-back{display:flex; justify-content:center}

/* ---------- плашка .pg-need (сейчас на страницах не выводится) ---------- */
.pg-needs{display:grid; gap:16px}
.pg-need{background:var(--surface); border:1px dashed var(--ph-line); border-radius:var(--r-l); padding:clamp(20px,3vw,28px); box-shadow:var(--shadow)}
.pg-need .ph{display:inline-block; font-size:12.5px; padding:3px 10px}
.pg-need h3{margin:12px 0 6px; font-size:1.2rem}
.pg-need p{font-size:15px; color:var(--ink-2); max-width:75ch}
.pg-need p + p{margin-top:8px}
.lic-grid .pg-need{align-self:start}
.pg-lic h2{margin-bottom:18px}
.paths + .pg-needs,.progs + .pg-needs,.ratings + .pg-needs{margin-top:28px}

/* ---------- контакты ---------- */
.pg-contact .contact-card .cc-btns .btn{flex:0 1 220px}

/* ---------- цены: таблицы (DESIGN-SYSTEM.md, раздел 9.3) ---------- */
.pg-anchors{margin-bottom:12px}
.pg-price{--th-top:var(--hdr-h,72px); background:var(--surface); border-radius:var(--r-xl); box-shadow:var(--shadow); overflow:clip}
.pg-price + .pg-price{margin-top:24px}
.pg-price-h{padding:clamp(22px,3vw,32px) clamp(20px,3vw,32px) 18px; background:linear-gradient(160deg,var(--accent-soft),var(--surface) 70%)}
.pg-price-h h2{font-size:clamp(1.6rem,3vw,2.2rem); margin:0}
/* шапка столбцов закреплена под шапкой сайта */
.pg-th,.pg-dr-h{position:sticky; top:var(--th-top); z-index:2; font-size:13px; font-weight:700; letter-spacing:.05em; text-transform:uppercase; color:var(--muted); background:var(--surface-2); box-shadow:0 1px 0 var(--line-2)}
/* строки и подсветка при наведении / фокусе */
.pg-tr,.pg-dr{transition:background .18s ease, box-shadow .18s ease}
.pg-tr:not(.pg-th):hover,.pg-tr:not(.pg-th):focus-within,.pg-dr:not(.pg-dr-h):hover,.pg-dr:not(.pg-dr-h):focus-within,.pg-dr:focus-visible{
  background:color-mix(in srgb,var(--accent-soft) 70%,var(--surface)); box-shadow:inset 3px 0 0 var(--accent); outline:none}
.pg-tr a:focus-visible,.pg-dr a:focus-visible{outline:2px solid var(--accent); outline-offset:2px; border-radius:4px}
.pg-tr a:hover,.pg-dr a:hover{color:var(--accent)}
/* обычная таблица */
.pg-table{display:flex; flex-direction:column}
.pg-tr{display:grid; grid-template-columns:minmax(0,2fr) repeat(3,minmax(0,1fr)); gap:16px; align-items:center; padding:14px clamp(20px,3vw,32px); border-bottom:1px solid var(--line-2)}
.pg-tr:last-child{border-bottom:0}
.pg-table:has(.pg-th span:nth-child(3):last-child) .pg-tr{grid-template-columns:minmax(0,2fr) repeat(2,minmax(0,1fr))}
.pg-table:has(.pg-th span:nth-child(2):last-child) .pg-tr{grid-template-columns:minmax(0,2fr) minmax(0,1.2fr)}
.pg-tr > span:first-child{font-weight:600; font-size:17px}
.pg-tr > span:first-child{display:flex; flex-direction:column; gap:3px; min-width:0}
.pg-tr > span:first-child small{font-weight:500; font-size:14.5px; color:var(--muted); line-height:1.35; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
@media (max-width:640px){ .pg-tr > span:first-child small{white-space:normal; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical} }
.pg-tr:not(.pg-th) > span:not(:first-child){font-family:var(--font-display); font-weight:600; font-size:1.45rem; line-height:1.2; text-align:right}
.pg-th > span:not(:first-child){text-align:right}
/* капельницы: две колонки, как в прайсе сети */
.pg-drgrid{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 28px; padding:0 clamp(12px,2vw,20px) clamp(12px,2vw,18px)}
.pg-drcol{display:flex; flex-direction:column; min-width:0}
.pg-dr{display:grid; grid-template-columns:minmax(0,1fr) auto; gap:16px; align-items:center; padding:14px 16px; border-bottom:1px solid var(--line-2); border-radius:var(--r-s)}
.pg-dr-h{border-radius:0; padding-block:10px}
.pg-dr > span:not(:first-child){text-align:right; white-space:nowrap}
.pg-dr:not(.pg-dr-h) > span:not(:first-child){font-family:var(--font-display); font-weight:600; font-size:1.45rem; line-height:1.15}
.pg-dr-n{display:flex; flex-direction:column; gap:3px; min-width:0}
.pg-dr-n a,.pg-dr-n{font-weight:700; font-size:17px; line-height:1.25}
.pg-dr-n small{font-weight:500; font-size:14.5px; color:var(--muted); line-height:1.35; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.pg-ask,.pg-free{font-family:var(--font-text); font-size:15px; font-weight:600; line-height:1.4; white-space:normal}
.pg-ask{color:var(--muted)}
.pg-free{color:var(--accent-ink)}
@media (max-width:900px){ .pg-drgrid{grid-template-columns:minmax(0,1fr)} .pg-drcol + .pg-drcol .pg-dr-h{display:none} }
@media (max-width:640px){
  .pg-dr{gap:12px; padding:14px 12px}
  .pg-dr-n small{white-space:normal; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical}
  .pg-th{display:none}
  .pg-tr,.pg-table:has(.pg-th span:nth-child(3):last-child) .pg-tr,.pg-table:has(.pg-th span:nth-child(2):last-child) .pg-tr{grid-template-columns:minmax(0,1fr); gap:6px; padding:16px 20px}
  .pg-tr:not(.pg-th) > span:not(:first-child){display:flex; justify-content:space-between; align-items:baseline; gap:12px; text-align:right}
  .pg-tr:not(.pg-th) > span:not(:first-child)::before{content:attr(data-label); font-family:var(--font-text); font-size:13px; font-weight:600; color:var(--muted); text-align:left}
}

/* ---------- якоря под липкой шапкой ---------- */
[id]{scroll-margin-top:96px}

/* ---------- тёмный первый экран внутренних страниц (DESIGN-SYSTEM.md, раздел 9.1) ---------- */
.pg-dark{position:relative; overflow:hidden; isolation:isolate; background:#1A141B; color:rgba(255,255,255,.75)}
.pg-dark::before{content:""; position:absolute; inset:0; z-index:-1; pointer-events:none;
  background:radial-gradient(60% 80% at 100% 0%, rgba(214,30,147,.30) 0%, rgba(214,30,147,0) 60%), radial-gradient(45% 60% at 0% 100%, rgba(214,30,147,.14) 0%, rgba(214,30,147,0) 70%)}
.pg-dark::after{content:""; position:absolute; z-index:-1; right:-40px; bottom:-60px; width:min(420px,60vw); aspect-ratio:1; background:#F368B8; opacity:.05; -webkit-mask:url(../bird.svg) center/contain no-repeat; mask:url(../bird.svg) center/contain no-repeat; pointer-events:none}
.pg-dark .pg-hero{padding-top:clamp(36px,5vw,64px); padding-bottom:clamp(44px,6vw,80px)}
.pg-dark h1{color:#fff}
.pg-dark h1 .accent,.pg-dark .pg-accent{color:#F368B8}
.pg-dark .sub{color:rgba(255,255,255,.72)}
.pg-dark .pg-crumbs{color:rgba(255,255,255,.45)}
.pg-dark .pg-crumbs a{color:rgba(255,255,255,.72)}
.pg-dark .pg-crumbs a:hover{color:#F368B8}
.pg-dark .pg-crumbs span[aria-hidden]{color:rgba(255,255,255,.3)}
.pg-dark .eyebrow{background:none; padding:0; color:#F368B8; letter-spacing:.14em; gap:10px}
.pg-dark .eyebrow::before{content:""; width:28px; height:1px; background:currentColor}
.pg-dark .pg-hero--center .eyebrow::after{content:""; width:28px; height:1px; background:currentColor}
.pg-dark .btn-outline{background:transparent; color:#fff; box-shadow:inset 0 0 0 1.5px rgba(255,255,255,.35)}
.pg-dark .btn-outline:hover{box-shadow:inset 0 0 0 1.5px #F368B8; color:#fff}
.pg-dark .pg-prices > div{background:rgba(255,255,255,.06); box-shadow:inset 0 0 0 1px rgba(255,255,255,.12)}
.pg-dark .pg-prices small{color:rgba(255,255,255,.55)}
.pg-dark .pg-prices b{color:#fff}
.pg-dark .pg-note{color:rgba(255,255,255,.7)}
.pg-dark .hero-media .hero-img{box-shadow:0 30px 60px -30px rgba(0,0,0,.7)}
@media (prefers-color-scheme: dark){ :root:not([data-theme="light"]) .pg-dark{border-bottom:1px solid rgba(255,255,255,.08)} }
:root[data-theme="dark"] .pg-dark{border-bottom:1px solid rgba(255,255,255,.08)}
@media (min-width:901px){ .pg-dark .hero-grid{grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr)} }
/* ---------- контакты: фото входа ---------- */
.pg-photos{display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.4fr); gap:16px}
.pg-photos figure{margin:0; position:relative; border-radius:var(--r-l); overflow:hidden; background:var(--surface-2); box-shadow:var(--shadow); aspect-ratio:4/3}
.pg-photos img{width:100%; height:100%; object-fit:cover; display:block}
.pg-photos figcaption{position:absolute; left:16px; bottom:16px; background:var(--surface); color:var(--ink); font-size:13.5px; font-weight:700; padding:7px 13px; border-radius:var(--r-pill); box-shadow:var(--shadow)}
@media (max-width:640px){ .pg-photos{grid-template-columns:minmax(0,1fr)} }

/* ---------- низ страницы: отступ до подвала; карта на «Контактах» — вплотную к подвалу ---------- */
main{padding-bottom:var(--gap)}
main:has(> .map-sec:last-child){padding-bottom:0}
/* ---------- контакты: фото входа и фасада — одной высоты (по фасаду) ---------- */
.pg-photos{grid-auto-rows:clamp(240px,34vw,460px)}
.pg-photos figure{aspect-ratio:auto; height:100%}
@media (max-width:640px){ .pg-photos{grid-auto-rows:auto} .pg-photos figure{aspect-ratio:4/3} }

/* ---------- «Другие капельницы» на странице капельницы ---------- */
.pg-others{display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:16px}
.pg-others .dcard{width:auto}
.pg-others .dcard-b{padding:16px}
.pg-others .dcard h3{font-size:1.05rem; flex:1}
.pg-others .dcard h3 a:hover{color:var(--accent)}
.pg-others .dcard-foot{margin-bottom:12px; padding-top:12px}
.pg-others .acts{flex-direction:column}
@media (max-width:1180px){ .pg-others{grid-template-columns:repeat(3,minmax(0,1fr))} }
@media (max-width:640px){
  .pg-others{display:flex; overflow-x:auto; scroll-snap-type:x mandatory; gap:12px; margin-inline:calc(var(--pad-x) * -1); padding:4px var(--pad-x) 14px; scrollbar-width:none}
  .pg-others::-webkit-scrollbar{display:none}
  .pg-others .dcard{flex:0 0 66vw; max-width:260px; scroll-snap-align:start}
}

/* ---------- юридические документы (политика, согласие) ---------- */
.pg-doc{max-width:860px; background:var(--surface); border-radius:var(--r-xl); box-shadow:var(--shadow); padding:clamp(24px,4vw,48px)}
.pg-doc h2{font-size:clamp(1.3rem,2.2vw,1.7rem); margin:32px 0 12px}
.pg-doc h2:first-of-type{margin-top:8px}
.pg-doc p{font-size:15.5px; line-height:1.65; color:var(--ink-2); margin:0 0 10px}
.pg-field{background:var(--ph-bg); color:var(--ph-ink); border:1px dashed var(--ph-line); border-radius:6px; padding:0 6px; font-weight:600}

/* ---------- кнопка записи в строке прайса (появляется при наведении) ---------- */
.pg-tr > span:first-child,.pg-dr-n{position:relative}
.pg-book{position:absolute; right:0; top:50%; transform:translateY(-50%); display:inline-flex; align-items:center; padding:8px 16px; min-height:38px; border-radius:var(--r-pill); background:var(--accent); color:#fff; font:600 13.5px/1 var(--font-text); white-space:nowrap; box-shadow:0 0 0 6px color-mix(in srgb,var(--accent-soft) 70%,var(--surface)), var(--shadow); opacity:0; pointer-events:none; transition:opacity .18s ease}
.pg-book:hover{background:var(--accent-strong)}
.pg-tr:hover .pg-book,.pg-tr:focus-within .pg-book,.pg-dr:hover .pg-book,.pg-dr:focus-within .pg-book{opacity:1; pointer-events:auto}
@media (hover:none),(max-width:640px){ .pg-book{position:static; transform:none; opacity:1; pointer-events:auto; align-self:flex-start; margin-top:8px; box-shadow:none} }

/* ---------- кнопка записи на карточке врача ---------- */
.pg-doc-book{position:absolute; left:50%; bottom:18px; transform:translate(-50%,8px); z-index:2; opacity:0; pointer-events:none; transition:opacity .2s, transform .2s; box-shadow:var(--shadow-lift)}
.doc:hover .pg-doc-book,.doc:focus-within .pg-doc-book{opacity:1; transform:translate(-50%,0); pointer-events:auto}
@media (hover:none){ .pg-doc-book{opacity:1; transform:translate(-50%,0); pointer-events:auto} }

/* ---------- цены: прайс и корзина сбоку ---------- */
@media (min-width:1081px) and (max-width:1320px){ .pg-ceny .pg-drgrid{grid-template-columns:minmax(0,1fr)} .pg-ceny .pg-drcol + .pg-drcol .pg-dr-h{display:none} }

/* ---------- документы: плавающее оглавление (.pg-toc) ---------- */
.pg-docwrap.has-toc{display:grid; grid-template-columns:minmax(0,860px) minmax(240px,300px); gap:28px; align-items:start}
.pg-toc{position:sticky; top:calc(var(--hdr-h,72px) + 16px); max-height:calc(100vh - var(--hdr-h,72px) - 126px); overflow:auto; background:var(--surface); border-radius:var(--r-xl); box-shadow:var(--shadow); padding:18px 14px 14px}
.pg-toc summary{list-style:none; display:flex; align-items:center; gap:8px; padding:0 8px 10px; font:600 1.1rem/1.2 var(--font-display); text-transform:uppercase; letter-spacing:.02em; cursor:default}
.pg-toc summary::-webkit-details-marker{display:none}
.pg-toc summary .chev,.pg-toc-cur{display:none}
.pg-toc ol{list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:2px}
.pg-toc a{display:flex; gap:10px; padding:8px 10px; border-radius:var(--r-s); font-size:14px; line-height:1.35; color:var(--ink-2); transition:background .15s, color .15s}
.pg-toc a span{flex:none; min-width:20px; font:600 14px/1.35 var(--font-display); color:var(--muted)}
.pg-toc a:hover{background:var(--surface-2); color:var(--ink)}
.pg-toc a.on{background:var(--accent-soft); color:var(--accent-ink); font-weight:600}
.pg-toc a.on span{color:var(--accent)}
.pg-toc a:focus-visible{outline:2px solid var(--accent); outline-offset:1px}
.pg-doc h2[id]{scroll-margin-top:calc(var(--hdr-h,72px) + 20px)}
@media (max-width:1080px){
  .pg-docwrap.has-toc{grid-template-columns:minmax(0,1fr); gap:16px}
  .pg-toc{order:-1; z-index:5; top:calc(var(--hdr-h,64px) + 8px); max-height:calc(100vh - var(--hdr-h,64px) - 24px); padding:0; box-shadow:var(--shadow-lift)}
  .pg-toc summary{padding:14px 18px; cursor:pointer; font-size:1rem}
  .pg-toc summary .chev{display:block; margin-left:auto; color:var(--accent); transition:transform .2s}
  .pg-toc details[open] summary .chev{transform:rotate(180deg)}
  .pg-toc-cur{display:block; flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-family:var(--font-text); text-transform:none; letter-spacing:0; font-size:14px; color:var(--muted)}
  .pg-toc ol{padding:0 10px 12px}
  .pg-doc h2[id]{scroll-margin-top:calc(var(--hdr-h,64px) + 80px)}
}

/* ---------- блок «Все анализы»: поиск по прайсу (assets/analyses.js) ---------- */
.pg-allan{margin-top:24px; overflow:visible}  /* список рубрик не обрезается при коротком результате */
.pg-allan .pg-price-h{display:block}
.pg-allan-lead{margin:10px 0 16px; font-size:15.5px; line-height:1.55; color:var(--ink-2); max-width:720px}
.pg-allan-lead b{color:var(--ink)}
.pg-allan-tools{display:grid; grid-template-columns:minmax(0,1fr) minmax(180px,300px); gap:10px}
.pg-allan-q{width:100%; min-height:50px; padding:0 16px; border-radius:var(--r-pill); border:1px solid var(--line); background:var(--surface); color:var(--ink); font:500 16px/1.2 var(--font-text)}
.pg-allan-q{padding-left:46px; background:var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23D61E93' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='16.5' y1='16.5' x2='21' y2='21'/%3E%3C/svg%3E") no-repeat 16px 50%}
.pg-allan-q:focus{outline:2px solid var(--accent); outline-offset:1px; border-color:var(--accent)}
/* выпадающий список рубрик (.pg-dd) — в стиле тегов каталога (.chip): пилюля, тонкая обводка, выбранное — тёмным */
.pg-dd{position:relative; min-width:0}
.pg-dd-btn{width:100%; min-height:50px; display:flex; align-items:center; gap:10px; padding:0 18px; border-radius:var(--r-pill); background:var(--surface); color:var(--ink-2); box-shadow:inset 0 0 0 1px var(--line); font:600 15px/1.2 var(--font-text); text-align:left; cursor:pointer; transition:box-shadow .12s, color .12s, background .12s}
.pg-dd-btn span{flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.pg-dd-btn:hover{box-shadow:inset 0 0 0 1px var(--accent); color:var(--accent)}
.pg-dd-btn:focus-visible{outline:2px solid var(--accent); outline-offset:2px}
.pg-dd-chev{flex:none; color:var(--accent); transition:transform .2s}
.pg-dd.open .pg-dd-chev{transform:rotate(180deg)}
.pg-dd.open .pg-dd-btn{box-shadow:inset 0 0 0 1.5px var(--accent); color:var(--ink)}
.pg-dd.on .pg-dd-btn{background:var(--ink); color:var(--surface); box-shadow:none}
.pg-dd.on .pg-dd-chev{color:var(--surface)}
.pg-dd-list{position:absolute; z-index:30; top:calc(100% + 8px); right:0; width:max(100%,360px); max-height:min(420px,60vh); overflow:auto; overscroll-behavior:contain; margin:0; padding:6px; list-style:none; background:var(--surface); border-radius:var(--r-l); box-shadow:var(--shadow-lift), inset 0 0 0 1px var(--line-2); outline:none}
.pg-dd-list li{display:flex; align-items:baseline; gap:12px; padding:10px 12px; border-radius:var(--r-s); font-size:14.5px; line-height:1.35; color:var(--ink-2); cursor:pointer}
.pg-dd-list li span{flex:1; min-width:0}
.pg-dd-list li b{flex:none; font:600 13px/1.35 var(--font-text); color:var(--muted); font-variant-numeric:tabular-nums}
.pg-dd-list li.act{background:var(--surface-2); color:var(--ink)}
.pg-dd-list li[aria-selected="true"]{background:var(--accent-soft); color:var(--accent-ink); font-weight:600}
.pg-dd-list li[aria-selected="true"] b{color:var(--accent)}
.pg-dd-list li[aria-selected="true"].act{box-shadow:inset 0 0 0 1.5px var(--accent)}
@media (max-width:640px){ .pg-dd-list{left:0; right:0; width:auto; max-height:55vh} }
.pg-allan-n{margin:12px 0 0; font-size:14px; font-weight:600; color:var(--muted)}
.pg-allan-empty{margin:0; padding:22px clamp(20px,3vw,32px); color:var(--ink-2); font-size:15px}
.pg-allan-more{display:flex; margin:16px auto 20px}
@media (max-width:640px){ .pg-allan-tools{grid-template-columns:minmax(0,1fr)} }
.pg-allan-more[hidden]{display:none}

/* ---------- программа «Капельницы для похудения» (programmy/kapelnicy-dlya-pohudeniya) ---------- */
.pg-sl-facts{list-style:none; margin:0; padding:0; flex:1 1 100%; display:flex; flex-direction:column; gap:8px; color:rgba(255,255,255,.85); font-size:15px; font-weight:600}
.pg-sl-facts li{display:flex; align-items:center; gap:8px}
.pg-sl-facts svg{color:#F368B8; flex:none}
.pg-hero .warn{flex:1 1 100%; justify-content:flex-start; width:fit-content; max-width:100%; margin-top:6px; font-size:14px; font-weight:600}
.pg-hero .hero-cta{flex-direction:row}
.pg-sl-who{list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px}
.pg-sl-who li{display:flex; gap:12px; align-items:flex-start; background:var(--surface); border-radius:var(--r-l); padding:20px 22px; box-shadow:var(--shadow); font-size:15.5px; line-height:1.5; color:var(--ink)}
.pg-sl-who svg{flex:none; color:var(--accent); margin-top:4px}
.pg-sl-grid{display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px}
.pg-sl-grid .pg-card h3{font-size:1.15rem}
.pg-sl-bridge{margin:24px 0 0; font-size:clamp(1.02rem,1.5vw,1.15rem); font-weight:600; line-height:1.5; color:var(--ink); max-width:70ch}
.pg-sl-bridge a{color:var(--accent); white-space:nowrap}
.pg-sl-cta{display:flex; flex-wrap:wrap; align-items:center; gap:12px; margin-top:22px}
.pg-sl-mt{margin-top:16px}
.steps.pg-sl-steps{grid-template-columns:repeat(var(--n),minmax(0,1fr))}
.pg-sl-bring{margin-top:28px}
.pg-sl-bring .dlist li{font-size:15px}
.checkups.pg-sl-prices{grid-template-columns:repeat(3,minmax(0,1fr))}
.form .warn{margin-top:14px; align-self:flex-start; font-weight:600}
.cform button[disabled]{opacity:.5; cursor:not-allowed; transform:none}
@media (max-width:1080px){ .pg-sl-grid{grid-template-columns:repeat(2,minmax(0,1fr))} .steps.pg-sl-steps{grid-template-columns:repeat(2,minmax(0,1fr)); row-gap:46px} .steps.pg-sl-steps .stp::after{display:none} }
@media (max-width:900px){ .pg-sl-who,.checkups.pg-sl-prices{grid-template-columns:minmax(0,1fr)} }
@media (max-width:560px){ .pg-sl-grid,.steps.pg-sl-steps{grid-template-columns:minmax(0,1fr)} }
.pg-sl-con{border-top:1px solid var(--line-2)}
.pg-sl-con:first-of-type{border-top:0}
.pg-sl-con summary{list-style:none; cursor:pointer; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 0; font-weight:700; font-size:16px}
.pg-sl-con summary::-webkit-details-marker{display:none}
.pg-sl-con .chev{color:var(--accent); transition:transform .2s; flex:none}
.pg-sl-con[open] .chev{transform:rotate(180deg)}
.pg-sl-con .dlist{margin-bottom:12px}
.pg-sl-drips{grid-template-columns:repeat(auto-fill,minmax(240px,1fr))}
a.prog{text-decoration:none}
@media (max-width:640px){
  .pg-table.pg-sl-ptable .pg-tr.pg-pick-row{grid-template-columns:minmax(0,1fr)!important; gap:6px}
  .pg-table.pg-sl-ptable .pg-tr.pg-pick-row > span:not(:first-child){display:flex; justify-content:space-between; align-items:baseline; gap:12px; font-size:1.15rem}
  .pg-table.pg-sl-ptable .pg-tr.pg-pick-row > span:not(:first-child)::before{content:attr(data-label); font-family:var(--font-text); font-size:13px; font-weight:600; color:var(--muted)}
  .pg-table.pg-sl-ptable .pg-tr > span:empty{display:none}
}

/* Акции на капельницы (14.10.2026): плашка «Скидка 20% при заказе через сайт» в первом экране капельниц и каталога;
   «5-я капельница в подарок» — старая цена за 5 процедур зачёркнута (.pg-old), рядом цена за 4 */
.pg-sale{flex:1 1 100%; display:flex; align-items:center; gap:12px; width:fit-content; max-width:100%; margin:0 0 4px; padding:10px 18px 10px 10px; border-radius:var(--r-pill); background:var(--accent); color:#fff; font-size:15px; font-weight:600; line-height:1.3; box-shadow:0 10px 24px -12px color-mix(in srgb,var(--accent) 80%,transparent)}
.pg-sale b{font-weight:800}
.pg-sale-ic{flex:none; width:32px; height:32px; border-radius:50%; background:#fff; color:var(--accent); display:grid; place-items:center; font-family:var(--font-display); font-weight:700; font-size:17px}
.hero-cta > .pg-sale{flex-basis:auto}
.hero-cta:has(> .pg-sale) > .pg-sale + *{margin-top:0}
.pg-old{font-size:.72em; font-weight:500; color:var(--muted); text-decoration:line-through; text-decoration-thickness:1.5px; margin-right:4px; white-space:nowrap}
.pg-dark .pg-old{color:rgba(255,255,255,.55)}
.pg-prices .pg-p5 b{color:var(--accent)}
.pg-dark .pg-prices .pg-p5 b{color:#fff}
.pg-dark .pg-prices .pg-p5{box-shadow:inset 0 0 0 1.5px var(--accent); background:color-mix(in srgb,var(--accent) 18%,transparent)}
.pg-cat .dcard .course .pg-old{font-size:inherit; margin-right:2px}
/* анализы: подпись с артикулом и сроком переносится, срок — целиком (не обрезается многоточием) */
.pg-tr > span:first-child small.pg-an-m{white-space:normal; overflow:visible; text-overflow:clip; display:block; -webkit-line-clamp:unset}
.pg-an-m .pg-term{white-space:nowrap; color:var(--ink-2)}
/* программы (15.10.2026): зачёркнутая цена за 5 процедур в карточке курса и в таблице цен программы */
.pg-sl-prices .ck-price .p{white-space:nowrap}
.pg-sl-prices .ck-price .pg-old{display:block; width:fit-content; font-size:.6em; margin:0 0 6px}
@media (max-width:640px){ .pg-sl-bridge a{white-space:normal} }  /* ссылка «Капельница «…» →» не вылезает за экран */
.pg-sl-ptable .pg-old{font-size:.7em; margin-right:4px}
