/* Fetmakollen – design system
   Layout language and palette inspired by Spiris: warm sand surfaces, near-black ink,
   coral + purple accents, 12px cards, pill buttons.
   Colour coding: coral = DistansDoktorn (utan abonnemang), purple = DrVikt (vårdteam). */

@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-var-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #1d1d1e;
  --muted: #56565a;
  --sand: #f5f3f0;
  --sand-2: #e8e6e3;
  --line: #d4d3cd;
  --white: #ffffff;
  --coral: #ff5e57;
  --coral-soft: #ffe9e7;
  --coral-ink: #992a25;
  --purple: #441774;
  --purple-soft: #f2e7ff;
  --lilac: #d5b3ff;
  --focus: #441774;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --radius: 12px;
  --radius-lg: 20px;
  --pill: 100px;
  --wrap: 1200px;
  --prose: 72ch;
  --gutter: 16px;
  --shadow: 0 1px 2px rgba(29, 29, 30, .06), 0 8px 24px rgba(29, 29, 30, .06);
}

@media (min-width: 768px) { :root { --gutter: 24px; } }
@media (min-width: 1200px) { :root { --gutter: 32px; } }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-feature-settings: "cv11", "ss01";
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--purple); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--lilac); }

h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .5em; font-weight: 700; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 1.3rem + 3.2vw, 3.6rem); font-weight: 800; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 1.1rem + .4vw, 1.4rem); letter-spacing: -0.01em; }
h4 { font-size: 1.05rem; letter-spacing: 0; }
p, ul, ol, dl, table, figure { margin: 0 0 1.1em; }
ul, ol { padding-left: 1.25em; }
li + li { margin-top: .35em; }
strong { font-weight: 650; }
small, .small { font-size: .875rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.prose { max-width: var(--prose); }
.prose > :last-child { margin-bottom: 0; }
.lead { font-size: clamp(1.125rem, 1.05rem + .35vw, 1.3rem); line-height: 1.55; color: var(--ink); }
.muted { color: var(--muted); }
.center { text-align: center; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--white); padding: 10px 16px; border-radius: var(--pill);
}
.skip-link:focus { top: 12px; }

/* ---------- Promo bar (partner offers, scrolling) ---------- */
.promo {
  background: var(--ink); color: var(--white);
  display: flex; align-items: stretch; min-height: 42px; overflow: hidden;
  font-size: .875rem; line-height: 1.3;
}
.promo-label {
  flex: none; display: flex; align-items: center; padding: 0 12px 0 var(--gutter);
  font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #a9a8a3;
  border-right: 1px solid #3a3a3d;
}
.promo-viewport {
  flex: 1 1 auto; min-width: 0; display: flex; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 20px, #000 calc(100% - 20px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 20px, #000 calc(100% - 20px), transparent);
}
.promo-track {
  list-style: none; margin: 0; padding: 0; display: flex; flex: none; width: max-content;
  animation: promo-scroll 42s linear infinite;
}
.promo-track li { margin: 0; padding: 0 22px; display: flex; align-items: center; white-space: nowrap; }
.promo-item { color: var(--white); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; padding: 10px 0; }
.promo-item::before { content: ""; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.promo-dd::before { background: var(--coral); }
.promo-dv::before { background: var(--lilac); }
.promo-item b { font-weight: 700; }
.promo-sub { color: #c9c8c3; }
.promo-item:hover, .promo-item:focus-visible { text-decoration: underline; }
.promo-item:focus-visible { outline-color: var(--white); }
.promo:hover .promo-track, .promo:focus-within .promo-track { animation-play-state: paused; }
@keyframes promo-scroll { to { transform: translateX(-100%); } }
@media (max-width: 575px) { .promo-sub { display: none; } }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--sand-2);
}
.site-header .wrap { display: flex; align-items: center; gap: 16px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.25rem; letter-spacing: -0.03em; white-space: nowrap; }
.brand svg { width: 36px; height: 36px; flex: none; filter: drop-shadow(0 1px 1px rgba(29, 29, 30, .12)); }
.brand span span { color: var(--purple); }
.nav { margin-left: auto; display: none; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.nav li + li { margin: 0; }
.nav a {
  display: block; padding: 8px 14px; border-radius: var(--pill);
  color: var(--ink); text-decoration: none; font-weight: 500; font-size: .95rem;
}
.nav a:hover { background: var(--sand); }
.nav a[aria-current="page"] { background: var(--sand-2); }
.site-header .header-cta { display: none; }

.nav-mobile { margin-left: auto; position: relative; }
.nav-mobile summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: var(--pill); background: var(--sand); font-weight: 600; font-size: .95rem;
}
.nav-mobile summary::-webkit-details-marker { display: none; }
.nav-mobile summary svg { width: 18px; height: 18px; }
.nav-mobile[open] summary { background: var(--ink); color: var(--white); }
.nav-mobile .panel {
  position: absolute; right: 0; top: calc(100% + 10px); width: min(320px, calc(100vw - 2 * var(--gutter)));
  background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow); border: 1px solid var(--sand-2);
  padding: 10px;
}
.nav-mobile ul { list-style: none; margin: 0; padding: 0; }
.nav-mobile li + li { margin: 0; }
.nav-mobile nav a { display: block; padding: 12px 14px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 500; }
.nav-mobile nav a:hover, .nav-mobile nav a[aria-current="page"] { background: var(--sand); }
.nav-mobile .panel .btn { margin-top: 8px; width: 100%; }

@media (min-width: 992px) {
  .nav { display: block; }
  .site-header .header-cta { display: inline-flex; }
  .nav-mobile { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 12px 24px; border-radius: var(--pill);
  font: inherit; font-weight: 650; font-size: 1rem; line-height: 1.25; text-align: center;
  text-decoration: none; border: 2px solid transparent; cursor: pointer;
  transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-coral { background: var(--coral); color: var(--ink); }
.btn-coral:hover { background: #ff4a42; box-shadow: 0 6px 18px rgba(255, 94, 87, .35); }
.btn-purple { background: var(--purple); color: var(--white); }
.btn-purple:hover { background: #361060; box-shadow: 0 6px 18px rgba(68, 23, 116, .3); }
.btn-ink { background: var(--ink); color: var(--white); }
.btn-ink:hover { background: #000; }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--white); }
.btn-sm { min-height: 42px; padding: 8px 18px; font-size: .925rem; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.5rem 0 0; }
@media (max-width: 575px) { .btn-row .btn { width: 100%; } }

/* ---------- Sections ---------- */
.section { padding: clamp(48px, 6vw, 96px) 0; }
.section-sand { background: var(--sand); }
.section-tight { padding: clamp(32px, 4vw, 56px) 0; }
.section-head { max-width: 760px; margin-bottom: clamp(24px, 3vw, 40px); }
.section-head.center { margin-left: auto; margin-right: auto; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .8125rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase;
  color: var(--purple); margin-bottom: 12px;
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--coral); }

.grid { display: grid; gap: clamp(16px, 2vw, 24px); }
@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 992px) {
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 56px; align-items: start; }
  .split-even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Breadcrumbs ---------- */
.crumb-bar { background: var(--sand); }
.breadcrumbs { font-size: .875rem; color: var(--muted); padding-top: 16px; }
.breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumbs li + li { margin: 0; }
.breadcrumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line); }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs [aria-current] { color: var(--ink); }

/* ---------- Hero ---------- */
.hero { background: var(--sand); padding: clamp(32px, 5vw, 72px) 0 clamp(48px, 6vw, 88px); position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; width: 520px; height: 520px; right: -160px; top: -180px;
  border-radius: 50%; background: var(--coral-soft); z-index: 0;
}
.hero::after {
  content: ""; position: absolute; width: 360px; height: 360px; right: 18%; bottom: -220px;
  border-radius: 50%; background: var(--purple-soft); z-index: 0;
}
.hero .wrap { position: relative; z-index: 1; }
.hero h1 { margin-bottom: .35em; }
.hero .lead { max-width: 640px; }
.hero-grid { display: grid; gap: 32px; align-items: center; }
@media (min-width: 992px) { .hero-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 56px; } }
.hero-sub { padding: clamp(24px, 4vw, 48px) 0 clamp(32px, 5vw, 64px); }
.hero-sub::before { width: 380px; height: 380px; right: -140px; top: -160px; }
.hero-sub::after { display: none; }

.byline {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px;
  margin-top: 20px; font-size: .875rem; color: var(--muted);
}
.byline .badge-check { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); font-weight: 600; }
.byline svg { width: 18px; height: 18px; color: var(--purple); }

.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--pill);
  background: var(--white); font-size: .8125rem; font-weight: 600; color: var(--ink); border: 1px solid var(--line);
}
.pill-coral { background: var(--coral-soft); border-color: transparent; color: var(--coral-ink); }
.pill-purple { background: var(--purple-soft); border-color: transparent; color: var(--purple); }

/* ---------- Answer box (featured-snippet friendly) ---------- */
.answer {
  background: var(--white); border-radius: var(--radius-lg); padding: clamp(20px, 3vw, 32px);
  box-shadow: var(--shadow); border-top: 4px solid var(--purple);
}
.answer h2, .answer .answer-title { font-size: 1rem; text-transform: uppercase; letter-spacing: .06em; color: var(--purple); margin-bottom: .75em; font-weight: 700; }
.answer p:last-child, .answer ul:last-child { margin-bottom: 0; }
.answer ul { padding-left: 0; list-style: none; }
.answer li { padding-left: 28px; position: relative; }
.answer li::before {
  content: ""; position: absolute; left: 0; top: .45em; width: 16px; height: 16px; border-radius: 50%;
  background: var(--coral-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.3 2.3 4.7-4.9' fill='none' stroke='%23992a25' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat;
}
.inline-answer {
  font-size: 1.125rem; line-height: 1.6; background: var(--sand); border-left: 4px solid var(--coral);
  padding: 16px 20px; border-radius: 0 var(--radius) var(--radius) 0; max-width: var(--prose);
}
.section-sand .inline-answer { background: var(--white); }

/* ---------- Table of contents ---------- */
.toc { background: var(--white); border: 1px solid var(--sand-2); border-radius: var(--radius); padding: 20px 24px; }
.toc h2 { font-size: 1rem; margin-bottom: .6em; }
.toc ol { margin: 0; padding-left: 1.2em; columns: 1; font-size: .95rem; }
@media (min-width: 768px) { .toc ol { columns: 2; column-gap: 40px; } }
.toc li { break-inside: avoid; }

/* ---------- Cards ---------- */
.card {
  background: var(--white); border-radius: var(--radius); padding: clamp(20px, 2.5vw, 28px);
  border: 1px solid var(--sand-2); height: 100%; display: flex; flex-direction: column;
}
.section-sand .card { border-color: transparent; }
.card > :last-child { margin-bottom: 0; }
.split > .card { height: auto; }
.card h3 { margin-bottom: .4em; }
.card-link { text-decoration: none; color: inherit; transition: transform .15s ease, box-shadow .15s ease; }
.card-link:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.card-link .more { margin-top: auto; padding-top: 12px; font-weight: 650; color: var(--purple); display: inline-flex; gap: 6px; align-items: center; }
.card-link:hover .more { text-decoration: underline; }
.card .meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.icon-circle {
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 16px;
  background: var(--coral-soft); color: var(--coral-ink);
}
.icon-circle svg { width: 24px; height: 24px; }
.icon-circle.purple { background: var(--purple-soft); color: var(--purple); }

/* ---------- Track (partner) cards ---------- */
.tracks { display: grid; gap: 20px; }
@media (min-width: 768px) { .tracks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.track {
  border-radius: var(--radius-lg); padding: clamp(24px, 3vw, 36px); display: flex; flex-direction: column;
  position: relative; background: var(--white); border: 2px solid var(--sand-2);
}
.track-dd { border-color: var(--coral); }
.track-dv { border-color: var(--purple); }
.track .track-tag {
  align-self: flex-start; font-size: .8125rem; font-weight: 700; padding: 6px 12px; border-radius: var(--pill); margin-bottom: 14px;
}
.track-dd .track-tag { background: var(--coral-soft); color: var(--coral-ink); }
.track-dv .track-tag { background: var(--purple-soft); color: var(--purple); }
.track h3 { font-size: 1.5rem; margin-bottom: .2em; }
.track .price { font-size: clamp(2rem, 1.6rem + 1.4vw, 2.6rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; margin: 10px 0 2px; }
.track .price small { font-size: 1rem; font-weight: 600; letter-spacing: 0; color: var(--muted); }
.track .price-note { color: var(--muted); font-size: .9rem; margin-bottom: 18px; }
.track ul { list-style: none; padding: 0; margin: 0 0 24px; }
.track li { padding-left: 30px; position: relative; }
.track li::before {
  content: ""; position: absolute; left: 0; top: .3em; width: 20px; height: 20px; border-radius: 50%;
  background-position: center; background-repeat: no-repeat; background-size: 20px;
}
.track-dd li::before { background-color: var(--coral-soft); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 10.3l2.7 2.7L14.2 7.4' fill='none' stroke='%23992a25' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.track-dv li::before { background-color: var(--purple-soft); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 10.3l2.7 2.7L14.2 7.4' fill='none' stroke='%23441774' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.track .btn { margin-top: auto; }
.track .fine { font-size: .8125rem; color: var(--muted); margin: 12px 0 0; text-align: center; }
.sponsor-label {
  font-size: .75rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 12px; display: block;
}

/* Inline CTA band */
.cta-band {
  border-radius: var(--radius-lg); padding: clamp(24px, 3.5vw, 40px); background: var(--ink); color: var(--white);
  display: grid; gap: 20px; align-items: center; margin: 2.5rem 0;
}
.cta-band h2, .cta-band h3 { color: var(--white); margin-bottom: .3em; }
.cta-band p { margin: 0; color: #d4d3cd; }
.cta-band .btn-row { margin: 0; }
.cta-band a:not(.btn) { color: var(--lilac); }
@media (min-width: 992px) { .cta-band { grid-template-columns: minmax(0, 1fr) auto; } }

/* ---------- Tables ---------- */
.table-wrap {
  overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); border: 1px solid var(--sand-2); margin-bottom: 1.25rem;
  /* scroll shadows that only show when there is more table to the left/right */
  background:
    linear-gradient(90deg, var(--white) 30%, rgba(255, 255, 255, 0)) 0 0 / 40px 100%,
    linear-gradient(90deg, rgba(255, 255, 255, 0), var(--white) 70%) 100% 0 / 40px 100%,
    radial-gradient(farthest-side at 0 50%, rgba(29, 29, 30, .16), rgba(29, 29, 30, 0)) 0 0 / 16px 100%,
    radial-gradient(farthest-side at 100% 50%, rgba(29, 29, 30, .16), rgba(29, 29, 30, 0)) 100% 0 / 16px 100%,
    var(--white);
  background-repeat: no-repeat;
  background-attachment: local, local, scroll, scroll, scroll;
}
table { width: 100%; border-collapse: collapse; font-size: .95rem; line-height: 1.5; margin: 0; }
caption { text-align: left; padding: 16px 18px 4px; font-weight: 700; font-size: 1rem; caption-side: top; }
/* keep the caption readable when the table itself is wider than the screen */
.table-wrap caption { position: sticky; left: 0; max-width: calc(100vw - 2 * var(--gutter) - 2px); }
caption span { display: block; font-weight: 400; color: var(--muted); font-size: .85rem; }
th, td { text-align: left; vertical-align: top; padding: 12px 18px; border-bottom: 1px solid var(--sand-2); }
thead th { background: var(--sand); font-weight: 700; font-size: .875rem; white-space: nowrap; }
tbody th { font-weight: 650; min-width: 140px; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
.table-compare { min-width: 640px; }
.table-compare thead th.col-dd, .table-compare thead th.col-b { background: var(--coral-soft); color: var(--coral-ink); }
.table-compare thead th.col-dv, .table-compare thead th.col-a { background: var(--purple-soft); color: var(--purple); }
.table-drugs { min-width: 800px; }
.table-drugs thead th { white-space: normal; }
/* first column stays visible while scrolling wide tables sideways */
.table-compare tbody th, .table-drugs tbody th { position: sticky; left: 0; background: var(--white); box-shadow: 1px 0 0 var(--sand-2); z-index: 1; }
.table-compare thead th:first-child, .table-drugs thead th:first-child { position: sticky; left: 0; z-index: 2; }
/* tables inside a split column must shrink with the column */
.split .table-compare { min-width: 0; }
.split .table-compare tbody th { min-width: 0; }
.table-note { font-size: .85rem; color: var(--muted); max-width: var(--prose); }

/* ---------- Callouts ---------- */
.note {
  border-radius: var(--radius); padding: 18px 20px; background: var(--purple-soft); margin: 0 0 1.25rem;
  display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 14px; max-width: var(--prose);
}
.note svg { width: 24px; height: 24px; color: var(--purple); margin-top: 2px; }
.note p:last-child, .note ul:last-child { margin-bottom: 0; }
.note-warn { background: var(--coral-soft); }
.note-warn svg { color: var(--coral-ink); }

.checklist { list-style: none; padding: 0; }
.checklist li { padding-left: 30px; position: relative; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .3em; width: 20px; height: 20px; border-radius: 50%;
  background: var(--purple-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 10.3l2.7 2.7L14.2 7.4' fill='none' stroke='%23441774' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/20px no-repeat;
}

/* Stats */
.stats { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 1.5rem 0; }
@media (min-width: 992px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat { background: var(--white); border-radius: var(--radius); padding: 18px; border: 1px solid var(--sand-2); }
.section-sand .stat { border-color: transparent; }
.stat b { display: block; font-size: clamp(1.6rem, 1.3rem + 1vw, 2.1rem); letter-spacing: -0.03em; line-height: 1.1; }
.stat span { font-size: .875rem; color: var(--muted); display: block; margin-top: 4px; line-height: 1.4; }

/* Steps */
.steps { list-style: none; padding: 0; counter-reset: step; display: grid; gap: 16px; }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.steps li { counter-increment: step; background: var(--white); border-radius: var(--radius); padding: 24px; margin: 0; border: 1px solid var(--sand-2); }
.section-sand .steps li { border-color: transparent; }
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--ink); color: var(--white); font-weight: 700; margin-bottom: 14px;
}
.steps h3 { font-size: 1.15rem; }
.steps p { margin: 0; }

/* ---------- BMI calculator ---------- */
.bmi { background: var(--white); border-radius: var(--radius-lg); padding: clamp(20px, 3vw, 32px); box-shadow: var(--shadow); }
.bmi h3 { margin-bottom: .3em; }
.bmi .fields { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 18px 0 14px; }
.bmi label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.bmi input[type="number"] {
  width: 100%; min-height: 50px; padding: 10px 14px; font: inherit; font-size: 1.05rem;
  border: 1.5px solid var(--line); border-radius: 10px; background: var(--white); color: var(--ink);
}
.bmi input[type="number"]:focus { border-color: var(--purple); outline: 3px solid var(--purple-soft); outline-offset: 0; }
.bmi .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; font-size: .95rem; margin-bottom: 18px; cursor: pointer; }
.bmi .check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--purple); flex: none; }
.bmi-result { margin-top: 20px; border-top: 1px solid var(--sand-2); padding-top: 20px; }
.bmi-result[hidden] { display: none; }
.bmi-value { font-size: 2.6rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.bmi-class { display: inline-block; margin: 8px 0 12px; }
.bmi-ctas { display: grid; gap: 10px; margin-top: 16px; }
.bmi-ctas[hidden] { display: none; }
.bmi-error { color: var(--coral-ink); font-weight: 600; margin: 0 0 12px; }
.checklist-form { margin-bottom: 24px; }
.checklist-form li + li { margin-top: 4px; }
.checklist-form .check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; padding: 8px 0; border-bottom: 1px solid var(--sand-2); }
.checklist-form input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--purple); flex: none; }

/* ---------- Drug quick facts ---------- */
.facts { display: grid; gap: 0; background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; margin: 0; }
.facts div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--sand-2); }
.facts div:last-child { border-bottom: 0; }
.facts dt { font-weight: 600; color: var(--muted); font-size: .9rem; }
.facts dd { margin: 0; font-weight: 600; font-size: .95rem; }
.facts-title { background: var(--ink); color: var(--white); padding: 14px 20px; font-weight: 700; font-size: .875rem; letter-spacing: .06em; text-transform: uppercase; }

/* ---------- Content blocks ---------- */
.content-section + .content-section { margin-top: clamp(40px, 5vw, 64px); }
.content-section h2 { scroll-margin-top: 96px; }
.content-section h3 { margin-top: 1.6em; }
.two-col-list { display: grid; gap: 16px; }
@media (min-width: 768px) { .two-col-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.box { background: var(--sand); border-radius: var(--radius); padding: 20px 22px; }
.section-sand .box { background: var(--white); }
.box h3, .box h4 { margin-top: 0; }
.box > :last-child { margin-bottom: 0; }
.box-dd { background: var(--coral-soft); }
.box-dv { background: var(--purple-soft); }
.section-sand .box-dd { background: var(--coral-soft); }
.section-sand .box-dv { background: var(--purple-soft); }

/* ---------- FAQ ---------- */
.faq { max-width: 880px; }
.faq details { background: var(--white); border-radius: var(--radius); border: 1px solid var(--sand-2); margin-bottom: 10px; }
.section-sand .faq details { border-color: transparent; }
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 56px 18px 22px; position: relative;
  font-weight: 650; font-size: 1.05rem; line-height: 1.4;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 18px; top: 50%; width: 28px; height: 28px; margin-top: -14px; border-radius: 50%;
  background: var(--sand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%231d1d1e' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat;
  transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(180deg); background-color: var(--coral-soft); }
.faq summary h3 { display: inline; font-size: inherit; letter-spacing: 0; margin: 0; font-weight: inherit; }
.faq .faq-a { padding: 0 22px 20px; max-width: var(--prose); }
.faq .faq-a > :last-child { margin-bottom: 0; }

/* ---------- Reviewer + references ---------- */
.reviewer {
  display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 18px; align-items: start;
  background: var(--white); border-radius: var(--radius-lg); padding: 24px; border: 1px solid var(--sand-2); max-width: 880px;
}
.section-sand .reviewer { border-color: transparent; }
.avatar {
  width: 64px; height: 64px; border-radius: 50%; background: var(--purple); color: var(--white);
  display: grid; place-items: center; font-weight: 800; font-size: 1.3rem;
}
.reviewer h2, .reviewer h3 { font-size: 1.1rem; margin-bottom: .2em; letter-spacing: 0; }
.reviewer p { margin: 0 0 .5em; font-size: .95rem; }
.reviewer .muted { font-size: .875rem; }
.refs { font-size: .9rem; line-height: 1.55; max-width: 880px; padding-left: 1.6em; }
.refs li { padding-left: 4px; }
.refs li:target { background: var(--purple-soft); border-radius: 6px; }
.refs a { word-break: break-word; }
sup.cite { font-size: .7em; line-height: 0; font-weight: 600; }
sup.cite a { text-decoration: none; padding: 0 1px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #d4d3cd; padding: clamp(48px, 6vw, 80px) 0 calc(32px + var(--sticky-h, 0px)); font-size: .95rem; }
.site-footer a { color: var(--white); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-grid { display: grid; gap: 32px; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.site-footer h2 { color: var(--white); font-size: 1rem; letter-spacing: 0; margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li + li { margin-top: 8px; }
.site-footer .brand { color: var(--white); margin-bottom: 14px; }
.site-footer .brand span span { color: var(--lilac); }
.footer-bottom { border-top: 1px solid #3a3a3d; margin-top: 40px; padding-top: 24px; font-size: .85rem; display: grid; gap: 10px; }
.footer-bottom p { margin: 0; }
.emergency { background: #2a2a2c; border-radius: var(--radius); padding: 14px 18px; margin-top: 18px; font-size: .9rem; }
.emergency strong { color: var(--white); }

/* ---------- Sticky mobile CTA ---------- */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  background: rgba(255, 255, 255, .97); backdrop-filter: blur(8px);
  border-top: 1px solid var(--sand-2); padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.sticky-cta .btn { min-height: 46px; padding: 6px 10px; font-size: .85rem; flex-direction: column; gap: 0; line-height: 1.2; }
.sticky-cta .btn small { font-weight: 500; font-size: .72rem; opacity: .85; }
.sticky-cta-label { grid-column: 1 / -1; font-size: .7rem; color: var(--muted); text-align: center; margin: -2px 0 0; letter-spacing: .04em; text-transform: uppercase; }
body.has-sticky { --sticky-h: 96px; }
@media (min-width: 992px) {
  .sticky-cta { display: none; }
  body.has-sticky { --sticky-h: 0px; }
}

/* ---------- 404 ---------- */
.notfound { min-height: 50vh; display: grid; align-content: center; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  /* promo bar keeps moving, slower; hover and focus still pause it */
  .promo-track { animation: promo-scroll 70s linear infinite !important; }
}

@media print {
  .site-header, .sticky-cta, .promo, .nav-mobile, .btn, .cta-band, .tracks { display: none !important; }
  body { font-size: 11pt; }
  a { color: inherit; }
}
