@import url("toc-aktiv.css");
/* Artiklar: statiska SEO-sidor (artikel-*.html) och artikelnavet (artiklar.html).
   Laddas bara på de sidorna, efter tokens/layout/footer/pages/accordion.css.
   Återanvänder .page-hero.text-only, .price-row, .faq, .booking-section och
   .text-link. Här ligger bara det som är nytt. Ingen text i CSS. */

.article-main .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ── Brödsmulor under sidhuvudet, på heronas yta ─────────────────── */
.breadcrumbs { background: var(--blush-50); }
.breadcrumbs ol {
  display: flex; flex-wrap: wrap; align-items: center; gap: 2px 0;
  margin: 0; padding: clamp(16px, 2.6vh, 24px) 0 0; list-style: none;
  font-size: var(--fs-small); line-height: 1.5; color: var(--fg-muted);
}
.breadcrumbs li { display: inline-flex; align-items: center; min-width: 0; }
/* Avskiljaren ritas med kanter, så att ingen text ligger i CSS */
.breadcrumbs li + li::before {
  content: ""; flex: none; width: 6px; height: 6px; margin: 0 12px 0 8px;
  border-top: 1.5px solid var(--ink-300); border-right: 1.5px solid var(--ink-300); transform: rotate(45deg);
}
.breadcrumbs a {
  display: inline-flex; align-items: center; min-height: 32px;
  color: var(--blush-700); text-decoration: underline; text-underline-offset: 3px;
  text-decoration-thickness: 1px; text-decoration-color: var(--blush-300);
}
.breadcrumbs a:hover { text-decoration-color: currentColor; }
.breadcrumbs [aria-current="page"] { color: var(--fg); }

/* ── Sidhero utan bild: frågan som H1, kort svar, knappar ────────── */
.article-main .breadcrumbs + .page-hero.text-only .inner { padding-top: clamp(12px, 2.4vh, 28px); }
.article-main .page-hero.text-only .text { max-width: 820px; }
.article-main .page-hero.text-only .ingress { max-width: 40em; }
.article-main .page-hero .ingress strong { font-weight: 600; color: var(--fg-strong); }
.article-main .page-hero.text-only .btn-row { margin-top: var(--space-6); }
@media (max-width: 900px) {
  .article-main .page-hero.text-only .text { margin-top: 0; padding: 12px var(--gutter) 32px; }
  .article-main .page-hero.text-only .btn-row { margin-top: 24px; }
}

/* ── Prisraden på vit yta (heron ovanför är ljusblå) ─────────────── */
.article-main .price-row { background: var(--surface); border-top: 1px solid var(--border); }
/* Siffran och tabellen lika breda, så att hårlinjerna slutar i samma kant */
.article-main .price-row .figure { max-width: 46em; }
@media (max-width: 900px) { .article-main .page-hero + .price-row { padding-top: 40px; } }

/* Pristabell: namn och åtgärdskod till vänster, pris till höger */
.price-breakdown { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.price-breakdown caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.price-breakdown th, .price-breakdown td {
  padding: 12px 0; border-bottom: 1px solid var(--border);
  text-align: left; vertical-align: baseline; font-weight: 400; color: var(--fg);
}
.price-breakdown thead th { padding-top: 0; font-size: var(--fs-small); font-weight: 600; color: var(--fg-strong); }
.price-breakdown tbody th { padding-right: 16px; }
.price-breakdown .code { margin-left: 8px; font-size: var(--fs-small); color: var(--fg-muted); white-space: nowrap; }
.price-breakdown .num { text-align: right; white-space: nowrap; }
.price-breakdown tfoot th, .price-breakdown tfoot td { border-bottom: 0; font-weight: 600; color: var(--fg-strong); }
.price-row .price-breakdown + p { margin-top: 20px; }

/* ── Artikeltexten: innehållsförteckning till vänster, text till höger ── */
.article-body { background: var(--surface); padding: clamp(48px, 8vh, 88px) 0; border-top: 1px solid var(--border); }
.article-body .inner { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 32px 64px; align-items: start; }
.article-toc { position: sticky; top: 141px; }
.article-toc .toc-title { font-size: var(--fs-small); font-weight: 600; color: var(--fg-strong); margin-bottom: 8px; }
.article-toc ol { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--border); }
.article-toc li { border-bottom: 1px solid var(--border); }
.article-toc a {
  display: flex; align-items: center; min-height: 44px; padding: 8px 0;
  font-size: 15px; line-height: 1.4; color: var(--fg); transition: color .2s ease;
}
.article-toc a:hover { color: var(--blush-700); }

.prose { max-width: 70ch; }
.prose > h2 { font-size: clamp(26px, 2.4vw, 34px); line-height: 1.15; letter-spacing: -0.02em; margin: 56px 0 16px; scroll-margin-top: 141px; }
.prose > h2:first-child { margin-top: 0; }
.prose > h3 { font-size: var(--fs-h3); line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; margin: 32px 0 8px; }
.prose p, .prose li, .prose dd { font-size: 17px; line-height: 1.7; color: var(--fg); }
.prose > p + p, .prose > p + table, .prose > table + p { margin-top: 16px; }
.prose strong { font-weight: 600; color: var(--fg-strong); }
.prose a:not([class]) {
  color: var(--blush-700); text-decoration: underline; text-decoration-color: var(--logo);
  text-underline-offset: 3px; text-decoration-thickness: 1.5px;
}
.prose a:not([class]):hover { text-decoration-color: currentColor; }
.prose .price-breakdown { margin-top: 16px; }

/* Faktorer som påverkar: lugn lista med hårlinjer (som implantatets delar) */
.prose .factors { margin: 16px 0 0; border-top: 1px solid var(--border); }
.prose .factors > div { padding: 16px 0; border-bottom: 1px solid var(--border); }
.prose .factors dt { font-weight: 600; color: var(--fg-strong); }
.prose .factors dd { margin: 4px 0 0; }

.article-figure { margin: 32px 0; }
.article-figure img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; object-position: 36% 50%; border-radius: var(--radius-md); }
.article-figure figcaption { margin-top: 10px; font-size: var(--fs-small); line-height: 1.5; color: var(--fg-muted); }

/* ── Ruta mitt i artikeln: boka undersökning eller ring ──────────── */
.article-cta { margin: 48px 0; padding: clamp(24px, 3vw, 40px); background: var(--blush-50); border-radius: var(--radius-lg); }
.article-cta .cta-title { font-size: clamp(22px, 2vw, 26px); line-height: 1.25; letter-spacing: -0.015em; font-weight: 500; color: var(--fg-strong); text-wrap: balance; }
.article-cta .cta-title + p { margin-top: 8px; }
.article-cta .btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* ── Läs mer: kort till behandlingssidorna ───────────────────────── */
.article-more { background: var(--surface); padding: clamp(48px, 8vh, 88px) 0; border-top: 1px solid var(--border); }
.article-more h2 { font-size: var(--section-h2); line-height: 1.1; letter-spacing: -0.025em; font-weight: 450; margin-bottom: clamp(24px, 4vh, 40px); }
.art-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.art-card {
  display: flex; flex-direction: column; height: 100%; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  transition: border-color .2s ease;
}
.art-card img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.art-card .body { display: flex; flex-direction: column; gap: 6px; padding: 20px 24px 24px; }
.art-card .name { display: flex; align-items: center; gap: 8px; font-size: var(--fs-h3); line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; transition: color .2s ease; }
.art-card .name .icon { font-size: 18px; color: var(--blush-600); transition: transform .2s ease; }
.art-card .summary { font-size: 15px; line-height: 1.55; color: var(--fg); }
.art-card:hover { border-color: var(--blush-600); }
.art-card:hover .name { color: var(--blush-700); }
.art-card:hover .name .icon { transform: translateX(4px); }
.art-card:focus-visible { outline-offset: 3px; border-radius: var(--radius-lg); }

/* ── Surfplatta och mobil ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .article-body { padding: 40px 0; }
  .article-body .inner { grid-template-columns: minmax(0, 1fr); }
  .article-toc { display: none; }
  .prose > h2 { margin-top: 44px; }
  .article-more { padding: 40px 0; }
  .art-cards { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .art-card { flex-direction: row; align-items: stretch; }
  .art-card img { flex: 0 0 112px; width: 112px; aspect-ratio: auto; height: auto; min-height: 104px; }
  .art-card .body { justify-content: center; padding: 14px 16px; }
}
@media (max-width: 600px) {
  .prose p, .prose li, .prose dd { font-size: 16px; }
  .article-cta { margin: 40px 0; }
  .article-cta .btn-row { flex-direction: column; align-items: stretch; }
  .price-breakdown .code { display: block; margin: 2px 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  .art-card, .art-card .name, .art-card .name .icon, .article-toc a { transition: none; }
}

/* ── Relaterade artiklar: lugn lista med hårlinjer under korten ──── */
.article-more .related-title { margin-top: clamp(40px, 7vh, 72px); }
.art-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; border-top: 1px solid var(--border); }
.art-list li { border-bottom: 1px solid var(--border); }
.art-list a {
  display: grid; grid-template-columns: minmax(0, 1fr) 24px; grid-template-areas: "name arrow" "summary arrow";
  align-items: center; column-gap: 16px; min-height: 44px; padding: 18px 0;
}
.art-list .name { grid-area: name; font-size: var(--fs-h4); line-height: 1.4; font-weight: 600; color: var(--fg-strong); transition: color .2s ease; }
.art-list .summary { grid-area: summary; margin-top: 2px; font-size: 15px; line-height: 1.5; color: var(--fg); }
.art-list .icon { grid-area: arrow; font-size: 20px; color: var(--blush-600); transition: transform .2s ease; }
.art-list a:hover .name { color: var(--blush-700); }
.art-list a:hover .icon { transform: translateX(4px); }
@media (max-width: 900px) { .art-list { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { .art-list .name, .art-list .icon { transition: none; } }

/* ── Tabeller i löptexten: förklaring under raden och jämförelse i tre kolumner ── */
.price-breakdown .note { display: block; margin-top: 2px; font-size: var(--fs-small); line-height: 1.45; color: var(--fg-muted); }
.price-breakdown.compare th, .price-breakdown.compare td { padding-right: 16px; }
.price-breakdown.compare tbody th { font-weight: 600; color: var(--fg-strong); }
@media (max-width: 600px) {
  .price-breakdown.compare th, .price-breakdown.compare td { padding-right: 10px; font-size: 15px; line-height: 1.45; }
}

/* ── Triagetabell (hur bråttom är det?): staplas i mobilen ─────────── */
.price-breakdown.triage tbody th { width: 55%; padding-right: 24px; }
.price-breakdown.triage td { color: var(--fg-strong); }
.price-breakdown.triage td strong { font-weight: 600; }
@media (max-width: 600px) {
  .price-breakdown.triage thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .price-breakdown.triage tr { display: block; padding: 14px 0; border-bottom: 1px solid var(--border); }
  .price-breakdown.triage tbody tr:first-child { border-top: 1px solid var(--border); }
  .price-breakdown.triage tbody th, .price-breakdown.triage td { display: block; width: auto; padding: 0; border: 0; }
  .price-breakdown.triage td { margin-top: 6px; }
}

/* ── Numrerade steg i löptexten ───────────────────────────────────── */
.prose ol { margin: 16px 0; padding-left: 1.5em; }
.prose ol li { padding-left: 4px; }
.prose ol li + li, .prose ul li + li { margin-top: 8px; }
.prose ol li::marker { font-weight: 600; color: var(--blush-700); }
