/* Health topic template (24.11.2026) — brand v1 tokens; grid lines from layout.css (#page = container 1120 + gutters; long text 720). */
.amt { color: var(--text); font-family: var(--font-body); padding-bottom: 72px; }
.amt ul, .amt ol { list-style: none; margin: 0; padding: 0; }
.amt li { margin: 0; }
.amt a { text-decoration: none; }
.amt-crumbs { margin: 18px 0 0; font-size: 13px; color: var(--hint); }
.amt-crumbs p { margin: 0; }
.amt-crumbs a { color: var(--hint); }
@media (hover: hover) { .amt-crumbs a:hover { color: var(--am-gold-hover); } }
.amt-kick { margin: 0; font: 700 11px/1.3 var(--font-body); letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
.amt-h1 { margin: 0; font: 600 var(--fs-h1)/1.1 var(--font-display); color: var(--text); }
.amt-h2 { margin: 0; font: 600 clamp(28px, 1.2vw + 20px, 36px)/1.2 var(--font-display); color: var(--text); }
.amt-sub { margin: 10px 0 0; max-width: var(--measure, 720px); font-size: 16px; line-height: 1.6; color: var(--hint); }
.amt-lead { margin: 0; max-width: 560px; font-size: 18px; line-height: 1.6; color: var(--hint); }
.amt-sec { margin-top: 80px; }
.amt-sec > .amt-h2 + .amt-sub + * , .amt-sec > .amt-h2 + ul, .amt-sec > .amt-h2 + ol { margin-top: 24px; }
.amt-card { padding: 22px 24px; border-radius: 22px; background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--text); }
.amt-card__t { font-weight: 800; color: var(--text); }
.amt-card__x { font-size: 15px; line-height: 1.6; color: var(--hint); }

/* buttons */
.amt-btns { margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 12px; }
.amt .amt-btn { min-height: 52px; padding: 0 24px; box-sizing: border-box; border-radius: 16px; display: inline-flex; align-items: center; gap: 8px; font: 800 15px/1.1 var(--font-body); border: 1.5px solid transparent;
  transition: background-color var(--am-hover-dur, 300ms) ease, color var(--am-hover-dur, 300ms) ease, border-color var(--am-hover-dur, 300ms) ease; }
.amt .amt-btn--primary { background: var(--primary); color: var(--on-primary); }
.amt .amt-btn--line { border-color: var(--primary); color: var(--primary); }
html[data-theme="dark"] .amt .amt-btn--line { border-color: #D4B06A; color: #D4B06A; }
@media (hover: hover) {
  .amt .amt-btn--primary:hover { background: var(--am-gold-hover); color: #fff; }
  html[data-theme="dark"] .amt .amt-btn--primary:hover { color: #0E2A2E; }
  .amt .amt-btn--line:hover { border-color: var(--am-gold-hover); color: var(--am-gold-hover); }
}
.amt :focus-visible { outline: 2px solid #D4B06A; outline-offset: 3px; }

/* 1 hero */
.amt-hero { margin-top: 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.amt-hero__txt { display: flex; flex-direction: column; gap: 18px; }
.amt-hero__media { position: relative; aspect-ratio: 4 / 3; border-radius: 26px; overflow: hidden; box-shadow: var(--shadow); background: var(--fill); }
.amt-hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--amt-pos, center); }

/* 2 systems */
.amt-sys { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.amt-sys .amt-card { display: flex; flex-direction: column; gap: 8px; }
.amt-sys .amt-card__t { font-family: var(--font-display); font-weight: 600; font-size: 19px; }

/* 3 habits */
.amt-habits { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; counter-reset: none; }
.amt-habit { display: flex; flex-direction: column; gap: 10px; font-size: 15px; line-height: 1.6; color: var(--hint); }
.amt-habit__n { font: 600 44px/1 var(--font-display); color: var(--gold-line); }

/* 4 myths */
.amt-myths { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.amt-myth { padding: 20px 22px; border-radius: 22px; border: 1px solid var(--line); background: var(--glass-solid); }
.amt-myth p { margin: 0; font-size: 15.5px; line-height: 1.6; }
.amt-myth__m { color: var(--hint); }
.amt-myth__m .amt-myth__l { color: #A63A2C; }
html[data-theme="dark"] .amt-myth__m .amt-myth__l { color: #E8A090; }
.amt-myth__r { margin-top: 10px !important; padding-top: 10px; border-top: 1px dashed var(--line); color: var(--text); }
.amt-myth__r .amt-myth__l { color: var(--primary); }
.amt-myth__l { font-weight: 800; }

/* 5 start */
.amt-start { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.amt-start > li { display: flex; }
.amt .amt-start__c { flex: 1; display: flex; flex-direction: column; padding: 0; overflow: hidden; transition: transform var(--am-hover-dur, 300ms) var(--am-hover-ease, ease), border-color var(--am-hover-dur, 300ms) ease; }
.amt-start__media { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--fill); }
.amt-start__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.amt-start__b { display: flex; flex-direction: column; gap: 10px; flex: 1; padding: 22px 26px 26px; }
.amt-start__t { font: 600 22px/1.25 var(--font-display); color: var(--text); }
.amt-start__go { margin-top: auto; padding-top: 6px; font-weight: 800; color: var(--primary); }
@media (hover: hover) { .amt .amt-start__c:hover { transform: translateY(-4px); border-color: rgba(212,176,106,.6); } .amt .amt-start__c:hover .amt-start__go { color: var(--am-gold-hover); } }

/* 6 products */
.amt ul.products.amt-prods__grid { display: grid !important; grid-template-columns: repeat(4, 1fr); gap: 18px; margin: 24px 0 0 !important; padding: 0 !important; }
.amt ul.products.amt-prods__grid::before, .amt ul.products.amt-prods__grid::after { display: none !important; }
.amt ul.products.amt-prods__grid > li.product { width: auto !important; float: none !important; margin: 0 !important; }
.amt-prods__line { margin: 20px 0 0; max-width: var(--measure, 720px); font-size: 15px; line-height: 1.6; color: var(--hint); }
.amt-prods__line a { font-weight: 800; color: var(--primary); white-space: nowrap; }

/* 7 FAQ */
.amt-faq { max-width: 760px; }
.amt-faq__item { border-bottom: 1px solid var(--line); }
.amt-faq__item summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 18px 0; font-size: 17px; font-weight: 700; color: var(--text); }
.amt-faq__item summary::-webkit-details-marker { display: none; }
.amt-faq__item summary::after { content: "+"; flex: 0 0 auto; font-size: 22px; font-weight: 400; color: var(--gold); }
.amt-faq__item[open] summary::after { content: "−"; }
.amt-faq__item p { margin: 0 0 18px; font-size: 15.5px; line-height: 1.65; color: var(--hint); }
.amt-faq .amt-h2 { margin-bottom: 8px; }

/* 8 disclaimer */
.amt-disc { margin: 56px 0 0; max-width: var(--measure, 720px); font-size: 13px; line-height: 1.6; color: var(--hint); }

@media (max-width: 1023px) {
  .amt-hero { grid-template-columns: 1fr; gap: 28px; }
  .amt-hero__media { order: -1; }
  .amt-sys, .amt-habits { grid-template-columns: repeat(2, 1fr); }
  .amt ul.products.amt-prods__grid { grid-template-columns: repeat(2, 1fr); }
  .amt-sec { margin-top: 64px; }
}
@media (max-width: 639px) {
  .amt-sys, .amt-habits, .amt-myths, .amt-start { grid-template-columns: 1fr; }
  .amt-habit { flex-direction: row; align-items: baseline; gap: 14px; }
  .amt-habit__n { font-size: 34px; flex: 0 0 28px; }
  .amt ul.products.amt-prods__grid { gap: 12px; }
  .amt-sec { margin-top: 56px; }
  .amt-btns .amt-btn { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .amt .amt-start__c { transition: none; } .amt .amt-start__c:hover { transform: none; } }
.amt-sys .amt-card__x::first-letter { text-transform: uppercase; } /* text verbatim («Печінка — головна …»); in a card the first letter is shown as a capital */

/* Floating buttons on topic pages (owner 24.11): < 1440px hidden while the topic hero is on screen, shown after it (same as home v3).
   html.amt-past-hero is set by an IntersectionObserver on .amt-hero (nsp-topic.php). Fixed elements → no layout shift. ≥ 1440px: unchanged. */
@media (max-width: 1439px) {
  body.am-topic .nsp-qa-mobile, body.am-topic .nsp-qa-desktop {
    transition: opacity 200ms cubic-bezier(.23, 1, .32, 1), transform 200ms cubic-bezier(.23, 1, .32, 1), visibility 0s linear 0s;
  }
  html:not(.amt-past-hero) body.am-topic .nsp-qa-mobile,
  html:not(.amt-past-hero) body.am-topic .nsp-qa-desktop {
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity 200ms ease, transform 200ms ease, visibility 0s linear 200ms;
  }
  html:not(.amt-past-hero) body.am-topic .nsp-qa-mobile { transform: translateY(16px); }
  html:not(.amt-past-hero) body.am-topic .nsp-qa-desktop { transform: translate(12px, -50%); }
}
@media (max-width: 1439px) and (prefers-reduced-motion: reduce) {
  body.am-topic .nsp-qa-mobile, body.am-topic .nsp-qa-desktop,
  html:not(.amt-past-hero) body.am-topic .nsp-qa-mobile, html:not(.amt-past-hero) body.am-topic .nsp-qa-desktop { transition: none; }
  html:not(.amt-past-hero) body.am-topic .nsp-qa-mobile { transform: none; }
  html:not(.amt-past-hero) body.am-topic .nsp-qa-desktop { transform: translateY(-50%); }
}

/* Hero buttons: on the narrow two-column hero (1024–1279) the two buttons are always stacked, so the row never re-wraps
   when the web font replaces the fallback (re-wrap = layout shift; 24.11.2026). */
@media (min-width: 1024px) and (max-width: 1279px) {
  .amt-btns { flex-direction: column; align-items: flex-start; }
}
