/* ==========================================================================
   Magical Dental Group – style.css
   Designsystem härlett från referensvideon (Dr. Rocco, Vision Trust).
   Se _design/SPEC.md (spec) och _design/KOMPONENTER.md (komponentbibliotek).

   Innehåll
   1.  Typsnitt (självhostade, OFL)
   2.  Tokens
   3.  Bas / reset
   4.  Layout (container, sektioner, paneler)
   5.  Typografi (överrad, rubriker, prosa)
   6.  Knappar och länkar
   7.  Ikoner, bocklista, stjärnor, recensionsblock, akut-piller
   8.  Header, dropdown, mobilmeny
   9.  Startsidans hero (exakt kopia av referensen)
   10. Page-hero (undersidor)
   11. Komponenter: erbjudanderad, kort, citat, USP, bildkollage, CTA-band,
       kontakt, formulär, karta, bokning (booking v4, data-component="booking")
   12. Footer
   13. Animation (starttillstånd bara under html.js) och reduced motion
   14. Responsivt
   ========================================================================== */

/* 1. Typsnitt ------------------------------------------------------------- */
/* Urbanist (OFL) för allt – kunden valde Urbanist även för rubriker 2026-09-28. Noto Serif Display laddas inte längre. */
@font-face {
  font-family: 'Urbanist'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('/assets/fonts/urbanist-latin-ext-wght-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Urbanist'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('/assets/fonts/urbanist-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* 2. Tokens --------------------------------------------------------------- */
:root {
  /* Färger (uppmätta i referensen, se SPEC §1) */
  --c-hero: #DDEEFA;          /* hero-panel, ljusblå paneler */
  --c-hero-light: #E3F2FC;    /* svag gradientton åt vänster */
  --c-soft: #EEF7FD;          /* ljusare panel */
  --c-white: #FFFFFF;
  --c-ink: #00080F;           /* rubriker och brödtext */
  --c-muted: #4E5D68;         /* sekundär text */
  --c-accent: #12DDDA;        /* turkos CTA (uppmätt #10DEDB; spec-estimat #01D9D9) */
  --c-accent-hover: #00C7C9;
  --c-accent-deep: #007D7B;   /* turkos för text/ikoner på vitt där kontrast krävs */
  --c-emergency: #D5361A;     /* akut: telefoncirkel och etikett (uppmätt; spec-estimat #CD3F27) */
  --c-emergency-soft: #FBE7E2;
  --c-star: #E5BA00;
  --c-star-empty: #C6D5DE;
  --c-photo: #C9DCE3;         /* fotots studiobakgrund */
  --c-brand: #0776B7;         /* loggans blå */
  --c-dot: #788995;           /* inaktiva slider-prickar: 3,0:1 mot #DDEEFA (WCAG 1.4.11; referensens #A2B2BD gav 1,8:1) */
  --c-on-accent: var(--c-ink); /* text på turkos: vit gav 1,7:1 (underkänt AA), ink ger 11,9:1 – se KOMPONENTER "Ändringar" */
  --c-line: rgba(0, 8, 15, .1);
  --c-line-strong: rgba(0, 8, 15, .18);
  --c-line-control: #7E8B94;   /* kant på formulärfält och kryssrutor: minst 3:1 mot vitt (WCAG 1.4.11) */

  --shadow-pill: 0 10px 30px rgba(20, 60, 90, .07);
  --shadow-card: 0 18px 50px rgba(20, 60, 90, .08);
  --shadow-float: 0 14px 40px rgba(20, 60, 90, .12);

  --font-display: 'Urbanist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif; /* rubriker, överrader, siffror (lätt vikt) */
  --font-sans: 'Urbanist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;    /* meny, knappar, etiketter, brödtext */
  --font-serif: var(--font-display); /* alias kvar för bakåtkompatibilitet */

  /* Designpixel för heron: 1 px i referensen vid 1400×790.
     Skalar med bredden, men begränsas av höjden så att kompositionen alltid ryms. */
  --u: min(100vw / 1400, max(100vh, 640px) / 790, 1.7px);

  /* Typskala (clamp, ≈ värden vid 1440) */
  --fs-h1: clamp(2.75rem, 1.35rem + 3.9vw, 4.75rem);   /* page-hero H1 ≈ 76px */
  --fs-h2: clamp(2.25rem, 1.3rem + 2.6vw, 3.5rem);     /* ≈ 56px */
  --fs-h3: clamp(1.5rem, 1.1rem + 1.1vw, 2.125rem);    /* ≈ 34px */
  --fs-h4: clamp(1.25rem, 1.05rem + .5vw, 1.5rem);
  --fs-eyebrow: clamp(1.125rem, .95rem + .55vw, 1.45rem); /* ≈ 23px */
  --fs-lead: clamp(1.0625rem, 1rem + .25vw, 1.1875rem);
  --fs-body: 1rem;            /* 16px / 1.65 */
  --fs-small: .875rem;
  --fs-label: .6875rem;       /* 11px VERSAL */

  /* Layout */
  --gutter: max(16px, 8.43vw);               /* heron: textkolumn vid 8,43 % (118 px vid 1400) */
  --content-max: 1320px;
  --pad-inline: max(var(--gutter), (100% - var(--content-max)) / 2);
  --section-y: clamp(80px, 5rem + 4.5vw, 150px);
  --radius-card: 28px;
  --radius-panel: clamp(56px, 11vw, 200px);  /* "ett stort rundat hörn" på paneler */
  --header-h: 84px;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-inout: cubic-bezier(.83, 0, .24, .96); /* uppmätt från bildavslöjandet */
}

/* 3. Bas ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}
body {
  margin: 0;
  background: var(--c-white);
  color: var(--c-ink);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  font-weight: 500;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg, video, iframe { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .18em; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote { margin: 0; }
address { font-style: normal; } /* kontaktuppgifter i <address> utan webbläsarens kursiv */
/* brödtext: undvik ensamma ord på sista raden (rubriker har balance, se §5) */
p, li, dd, figcaption, blockquote { text-wrap: pretty; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
:focus-visible { outline: 2px solid var(--c-ink); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--c-accent); color: var(--c-ink); }

.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;
}
.nowrap { white-space: nowrap; }
.skip-link {
  position: fixed; left: 16px; top: -100px; z-index: 1000;
  padding: 12px 20px; border-radius: 999px; background: var(--c-ink); color: #fff;
  font-weight: 700; font-size: .8125rem; letter-spacing: .06em; text-transform: uppercase; text-decoration: none;
  transition: top .2s var(--ease-out);
}
.skip-link:focus { top: 16px; }

/* 4. Layout ---------------------------------------------------------------- */
.container { padding-inline: var(--pad-inline); }
/* smal prosa-container: --pad-inline räknas på :root, så bredden måste sättas direkt här (tidigare bugg: ingen effekt) */
.container--narrow { padding-inline: max(var(--gutter), (100% - 880px) / 2); }
.section { padding-block: var(--section-y); position: relative; }
.section--tight { padding-block: calc(var(--section-y) * .6); }
.section--flush-top { padding-top: 0; }
.section--flush-bottom { padding-bottom: 0; }

/* Paneler: ljusblå yta med ett stort rundat hörn (samma logik som heron) */
.panel { background: var(--c-hero); position: relative; }
.panel--soft { background: var(--c-soft); }
.panel--corner-br { border-bottom-right-radius: var(--radius-panel); }
.panel--corner-bl { border-bottom-left-radius: var(--radius-panel); }
.panel--corner-tr { border-top-right-radius: var(--radius-panel); }
.panel--corner-tl { border-top-left-radius: var(--radius-panel); }
.panel--inset { margin-inline: clamp(0px, 2vw, 32px); border-radius: var(--radius-card); }

.grid { display: grid; gap: clamp(20px, 2.4vw, 36px); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 110px); align-items: center; }
.split--reverse > :first-child { order: 2; }
.split--top { align-items: start; }
.split--lead { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); } /* bredare första kolumn för lång rubrik */
/* Kort rubrik bredvid lång text: rubriken följer med när man scrollar (≥ 1100 px), ingen tom panel under den */
@media (min-width: 1100px) { .split--sticky > :first-child { position: sticky; top: 120px; align-self: start; } }
/* Ensam ingress utan rubrik/bild: centrerad kolumn med större text (t.ex. /delprotes/ #om-delprotes) */
.prose--statement { max-width: 44em; margin-inline: auto; }
.prose--statement .lead { font-size: clamp(1.125rem, 1rem + .45vw, 1.375rem); line-height: 1.6; }
@media (min-width: 768px) { .prose--statement { text-align: center; } }
.stack > * + * { margin-top: var(--stack-gap, 1.25rem); }

/* 5. Typografi ------------------------------------------------------------- */
.eyebrow {
  display: block;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: var(--fs-eyebrow);
  line-height: 1.25;
  letter-spacing: .005em;
  color: var(--c-ink);
  margin-bottom: .55em;
}
.h1, .h2, .h3, .h4 { font-family: var(--font-display); color: var(--c-ink); font-weight: 300; }
.h1 { font-size: var(--fs-h1); line-height: 1.08; letter-spacing: -.012em; }
.h2 { font-size: var(--fs-h2); line-height: 1.1; letter-spacing: -.012em; }
/* Smala mobiler: långa svenska sammansättningar (t.ex. "tandvårdsmottagning") ska rymmas på en rad */
@media (max-width: 430px) { :root { --fs-h2: clamp(1.75rem, 8.4vw, 2.25rem); } }
/* .h2--compound: rubrik med ett mycket långt sammansatt ord (t.ex. "Din tandvårdsmottagning i Norra Stockholm").
   Något mindre så att ordet ryms på samma rad som föregående kort ord – annars blir "Din" ensamt på första raden
   (text-wrap: balance kan inte hjälpa när ordet är nästan lika brett som kolumnen). */
.h2.h2--compound, .prose .h2.h2--compound { font-size: min(var(--fs-h2), (100vw - 2 * var(--gutter)) / 11.4); }
@media (min-width: 1100px) { .h2.h2--compound, .prose .h2.h2--compound { font-size: min(var(--fs-h2), 3.8vw); } }
.h3 { font-size: var(--fs-h3); line-height: 1.18; letter-spacing: -.006em; font-weight: 400; }
.h4 { font-size: var(--fs-h4); line-height: 1.25; letter-spacing: -.005em; font-weight: 400; }
/* jämna radbrytningar i rubriker (undviker ensamma ord på sista raden) */
.h1, .h2, .h3, .h4, .prose h2, .prose h3, .card__title, .usp__title, .page-hero .h1 { text-wrap: balance; }
.prose .eyebrow { text-wrap: balance; } /* längre överrader/slogans i prosa: inget ensamt "i Järfälla!" */
.lead { font-size: var(--fs-lead); line-height: 1.6; font-weight: 550; }
.muted { color: var(--c-muted); }
.label {
  font-family: var(--font-sans); font-weight: 700; font-size: var(--fs-label);
  letter-spacing: .09em; text-transform: uppercase;
}
.section-heading { max-width: 760px; margin-bottom: clamp(36px, 4vw, 64px); }
.section-heading--center { margin-inline: auto; text-align: center; }
.section-heading__intro { margin-top: 1.1rem; max-width: 560px; }
.section-heading--center .section-heading__intro { margin-inline: auto; }
.section-heading--row { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; max-width: none; }

/* Prosa: lång ordagrann text (H2/H3/H4, p, ul, länkar) */
.prose { max-width: 68ch; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-family: var(--font-display); font-weight: 300; font-size: clamp(1.9rem, 1.2rem + 1.9vw, 2.75rem); line-height: 1.12; letter-spacing: -.01em; margin-top: 1.6em; }
.prose h3 { font-family: var(--font-display); font-weight: 400; font-size: var(--fs-h3); line-height: 1.2; letter-spacing: -.01em; margin-top: 1.5em; } /* samma H3-storlek som .h3 (tidigare två storlekar i samma sektion) */
.prose h4 { font-family: var(--font-sans); font-weight: 700; font-size: 1.0625rem; line-height: 1.4; margin-top: 1.4em; }
.prose h2 + *, .prose h3 + *, .prose h4 + * { margin-top: .6em; }
.prose > :first-child { margin-top: 0; }
.prose p, .prose li { color: var(--c-ink); }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li + li { margin-top: .45em; }
.prose ul li::marker { color: var(--c-accent-deep); }
.prose a:not(.btn):not(.link-arrow) { color: var(--c-ink); text-decoration: underline; text-decoration-color: var(--c-accent); text-decoration-thickness: 2px; }
.prose a:not(.btn):not(.link-arrow):hover { text-decoration-color: var(--c-ink); }
.prose .h2 { font-size: var(--fs-h2); line-height: 1.1; letter-spacing: -.012em; }
.prose h2.h3 { font-weight: 400; font-size: var(--fs-h3); line-height: 1.2; } /* textsidor (integritetspolicy): många korta avsnitt – H2 i H3-storlek */
.prose .eyebrow { margin-bottom: 0; }
.prose .eyebrow + h2, .prose .eyebrow + h3 { margin-top: .35em; }
.prose .h2 + * { margin-top: clamp(16px, 1.5vw, 24px); }
.prose .btn-row { margin-top: 2rem; }
.prose strong { font-weight: 700; }
.prose .check-list { padding-left: 0; }
.prose .check-list li + li { margin-top: 0; }

/* 6. Knappar och länkar ------------------------------------------------------ */
.btn {
  --btn-h: 48px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: var(--btn-h); padding: 0 30px; border-radius: 999px;
  font-family: var(--font-sans); font-weight: 700; font-size: .6875rem; line-height: 1;
  letter-spacing: .08em; text-transform: uppercase; text-decoration: none; white-space: nowrap;
  transition: background-color .25s ease, color .25s ease, box-shadow .25s ease, transform .25s var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.btn svg { width: 14px; height: 14px; flex: none; }
.btn--primary { background: var(--c-accent); color: var(--c-on-accent); }
.btn--primary:hover { background: var(--c-accent-hover); }
.btn--secondary { background: #fff; color: var(--c-ink); box-shadow: var(--shadow-pill); }
.btn--secondary:hover { box-shadow: var(--shadow-float); transform: translateY(-1px); }
.btn--dark { background: var(--c-ink); color: #fff; }
.btn--dark:hover { background: #1a2a36; }
.btn--outline { background: transparent; color: var(--c-ink); box-shadow: inset 0 0 0 1.5px var(--c-line-strong); }
.btn--outline:hover { box-shadow: inset 0 0 0 1.5px var(--c-ink); }
.btn--sm { --btn-h: 40px; padding: 0 22px; }
.btn--lg { --btn-h: 56px; padding: 0 38px; font-size: .75rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px 14px; align-items: center; }
.btn-row--spaced { margin-top: clamp(28px, 3vw, 44px); } /* knapprad under en fristående rubrik (ersätter inline margin-top) */

/* "→ LÄS MER": svart cirkel med pil + VERSAL-etikett */
.link-arrow {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px;
  font-weight: 700; font-size: .6875rem; letter-spacing: .085em; text-transform: uppercase;
  color: var(--c-ink); text-decoration: none; white-space: nowrap;
}
.link-arrow__icon {
  width: 24px; height: 24px; border-radius: 50%; flex: none;
  display: grid; place-items: center; background: var(--c-ink); color: #fff;
  transition: background-color .25s ease, transform .3s var(--ease-out);
}
.link-arrow__icon svg { width: 11px; height: 11px; }
.link-arrow:hover .link-arrow__icon, .card:hover .link-arrow__icon { background: var(--c-accent); transform: translateX(3px); }

/* 7. Ikoner, listor, stjärnor, recensioner, akut --------------------------- */
.icon { width: 1em; height: 1em; fill: currentColor; flex: none; }

.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.check-list li { display: grid; grid-template-columns: 24px 1fr; gap: 14px; align-items: start; }
.check-list__icon {
  width: 24px; height: 24px; border-radius: 50%; background: var(--c-accent); color: #fff;
  display: grid; place-items: center; margin-top: .05em;
}
.check-list__icon svg { width: 12px; height: 12px; }
.check-list a { text-decoration: underline; text-decoration-color: var(--c-accent); text-decoration-thickness: 2px; text-underline-offset: 2px; }
.check-list a:hover { text-decoration-color: var(--c-ink); }
.check-list--lg li { font-size: var(--fs-lead); }
.price { font-weight: 800; white-space: nowrap; }
.price--mark { background: linear-gradient(transparent 62%, rgba(18, 221, 218, .35) 62%); padding: 0 .1em; }

/* Stjärnor: --fill 0–1 per stjärna (4,3 = 1,1,1,1,.3) */
.stars { display: inline-flex; gap: var(--star-gap, 9px); line-height: 0; }
.star { position: relative; width: var(--star-size, 12px); height: var(--star-size, 12px); }
.star svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.star__base { fill: var(--c-star-empty); }
.star__fill { fill: var(--c-star); clip-path: inset(0 calc(100% - var(--fill, 1) * 100%) 0 0); }

/* Recensionsblock (heron och komponent) */
.review-block { display: grid; justify-items: start; color: var(--c-ink); }
.review-block__count {
  font-family: var(--font-display); font-weight: 300; font-size: clamp(2.2rem, 1.7rem + 1.3vw, 2.75rem);
  line-height: 1; letter-spacing: -.005em; font-variant-numeric: lining-nums;
}
.review-block .stars { margin-top: 16px; }
.review-block__text { margin-top: 14px; font-size: .9375rem; line-height: 1.55; font-weight: 500; max-width: 16em; }
.review-block .link-arrow { margin-top: 6px; }

/* Akut-piller */
.emergency-pill {
  display: inline-flex; align-items: center; gap: 16px;
  padding: 10px 26px 10px 12px; border-radius: 999px; background: #fff; box-shadow: var(--shadow-pill);
  color: var(--c-ink); text-decoration: none; transition: box-shadow .25s ease, transform .25s var(--ease-out);
}
.emergency-pill:hover { box-shadow: var(--shadow-float); transform: translateY(-1px); }
.emergency-pill__icon {
  width: 30px; height: 30px; border-radius: 50%; background: var(--c-emergency); color: #fff;
  display: grid; place-items: center; flex: none; box-shadow: 0 0 0 6px var(--c-emergency-soft);
}
.emergency-pill__icon svg { width: 13px; height: 13px; }
.emergency-pill__text { display: grid; line-height: 1.2; }
.emergency-pill__label { color: var(--c-emergency); font-weight: 700; font-size: .625rem; letter-spacing: .06em; text-transform: uppercase; }
.emergency-pill__number { font-weight: 700; font-size: 1.0625rem; letter-spacing: .005em; white-space: nowrap; }

/* 8. Header ------------------------------------------------------------------ */
.site-header {
  position: absolute; top: 0; left: 0; right: 0; z-index: 60;
  height: calc(123 * var(--u)); min-height: 76px;
  pointer-events: none;
}
.site-header__bar {
  position: absolute; pointer-events: auto;
  top: 50%; transform: translateY(-50%);
  left: calc(45 * var(--u) - 18px);
  width: auto; /* logga + meny + "Boka tid" i en grupp (kundönskemål: knappen hör till menyraden) */
  height: calc(34 * var(--u) + 12px); min-height: 46px;
  display: flex; align-items: center;
  padding: 0 6px 0 18px;
  border-radius: 999px;
  transition: background-color .35s ease, box-shadow .35s ease;
}
.site-header__logo { display: block; flex: none; line-height: 0; }
.site-header__logo img { height: calc(44 * var(--u)); min-height: 34px; width: auto; }
.site-nav { margin-left: calc(36 * var(--u)); }
.site-nav__list { display: flex; align-items: center; gap: calc(22 * var(--u)); list-style: none; margin: 0; padding: 0; }
.site-nav__item { position: relative; display: flex; align-items: center; }
.site-nav__link {
  display: inline-flex; align-items: center; min-height: 34px;
  font-weight: 800; font-size: max(9px, calc(9.4 * var(--u))); letter-spacing: .045em; text-transform: uppercase;
  color: var(--c-ink); text-decoration: none; white-space: nowrap;
  background: linear-gradient(currentColor, currentColor) 0 calc(100% - 6px) / 0 1px no-repeat;
  transition: background-size .3s var(--ease-out);
}
.site-nav__link:hover, .site-nav__link[aria-current="page"], .site-nav__item.is-active-parent > .site-nav__link { background-size: 100% 1px; }
.site-nav__toggle {
  width: 18px; height: 34px; margin-left: 2px; display: grid; place-items: center; color: var(--c-ink);
}
.site-nav__toggle { position: relative; }
.site-nav__toggle::after { content: ""; position: absolute; inset: -5px -4px; } /* träffyta 26×44 */
.site-nav__toggle svg { width: 8px; height: 8px; transition: transform .3s var(--ease-out); }
.site-nav__item--has-sub:hover .site-nav__toggle svg, .site-nav__toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.site-nav__sub {
  position: absolute; top: calc(100% + 10px); left: -22px; min-width: 250px;
  list-style: none; margin: 0; padding: 10px; border-radius: 24px; background: #fff; box-shadow: var(--shadow-float);
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .25s ease, transform .3s var(--ease-out), visibility 0s linear .3s;
}
.site-nav__sub::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
.site-nav__item--has-sub:hover > .site-nav__sub,
.site-nav__item--has-sub.is-open > .site-nav__sub { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.site-nav__item--has-sub.is-closed > .site-nav__sub { opacity: 0; visibility: hidden; transform: translateY(6px); }
.site-nav__sub a {
  display: block; padding: 9px 16px; border-radius: 14px; text-decoration: none;
  font-size: .9375rem; font-weight: 550; line-height: 1.35; color: var(--c-ink); white-space: nowrap;
}
.site-nav__sub a:hover, .site-nav__sub a:focus-visible { background: var(--c-soft); }
.site-nav__sub a[aria-current="page"] { background: var(--c-hero); }

.site-header__cta {
  --btn-h: calc(34 * var(--u));
  min-height: max(34px, var(--btn-h)); margin-left: calc(32 * var(--u));
  min-width: 0; padding: 0 calc(24 * var(--u));
  background: #fff; color: var(--c-ink); font-size: max(9px, calc(9.1 * var(--u))); letter-spacing: .065em;
  box-shadow: 0 6px 20px rgba(20, 60, 90, .05);
}
.site-header__cta:hover { background: var(--c-ink); color: #fff; }
.site-header__burger {
  display: none; width: 46px; height: 46px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-pill);
  place-items: center; margin-left: 10px; flex: none;
}
.site-header__burger svg { width: 18px; height: 18px; }

/* Fast header efter heron: flytande vit kapsel */
.site-header.is-fixed { position: fixed; height: 84px; animation: header-in .45s var(--ease-out) both; }
.site-header.is-fixed .site-header__bar { background: rgba(255, 255, 255, .92); box-shadow: var(--shadow-float); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.site-header.is-fixed .site-header__logo img { height: 36px; min-height: 0; }
.site-header.is-fixed .site-header__cta { background: var(--c-accent); color: var(--c-on-accent); box-shadow: none; }
.site-header.is-fixed .site-header__cta:hover { background: var(--c-accent-hover); }
@keyframes header-in { from { transform: translateY(-110%); } to { transform: none; } }

/* Mobilmeny */
.mobile-menu {
  position: fixed; inset: 0; z-index: 90; background: var(--c-hero); overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; padding: 18px 16px calc(28px + env(safe-area-inset-bottom));
}
.mobile-menu[hidden] { display: none; }
.mobile-menu__top { display: flex; align-items: center; justify-content: space-between; min-height: 52px; }
.mobile-menu__top img { height: 38px; width: auto; }
.mobile-menu__close { width: 46px; height: 46px; border-radius: 50%; background: #fff; display: grid; place-items: center; box-shadow: var(--shadow-pill); }
.mobile-menu__close svg { width: 16px; height: 16px; }
.mobile-menu__nav { margin-top: 28px; }
.mobile-menu__list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--c-line); }
.mobile-menu__list > li { border-bottom: 1px solid var(--c-line); }
.mobile-menu__row { display: flex; align-items: center; justify-content: space-between; }
.mobile-menu__link {
  display: block; flex: 1; padding: 14px 0; text-decoration: none;
  font-family: var(--font-display); font-weight: 300; font-size: clamp(1.75rem, 6.5vw, 2.25rem); line-height: 1.15; letter-spacing: -.015em;
}
.mobile-menu__link[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--c-accent); text-decoration-thickness: 2px; }
.mobile-menu__toggle { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.7); }
.mobile-menu__toggle svg { width: 12px; height: 12px; transition: transform .3s var(--ease-out); }
.mobile-menu__toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.mobile-menu__sub { list-style: none; margin: 0 0 14px; padding: 0 0 0 2px; display: grid; gap: 2px; }
.mobile-menu__sub[hidden] { display: none; }
.mobile-menu__sub a { display: block; padding: 8px 0; font-size: 1.0625rem; font-weight: 550; text-decoration: none; }
.mobile-menu__sub a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--c-accent); text-decoration-thickness: 2px; }
.mobile-menu__foot { margin-top: auto; padding-top: 28px; display: grid; gap: 14px; justify-items: start; }
.mobile-menu__foot .btn { width: 100%; }
.mobile-menu__meta { font-size: .9375rem; color: var(--c-muted); }
html.menu-open, html.menu-open body { overflow: hidden; }

/* 9. Startsidans hero -------------------------------------------------------- */
.hero {
  position: relative;
  height: max(100vh, 640px);
  height: max(100svh, 640px);
  container-type: inline-size;
  overflow: clip;
  background: var(--c-white);
  isolation: isolate;
}
.hero__panel {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(100deg, var(--c-hero-light) 0%, var(--c-hero) 38%, var(--c-hero) 100%);
  /* nedre högra hörnet = halva bildkolumnens bredd (41,68 % / 2) */
  border-bottom-right-radius: 20.84cqw;
}
.hero__media { position: absolute; top: 0; bottom: 0; left: 58.32%; right: 0; }
.hero__frame {
  position: absolute; inset: 0; overflow: hidden;
  border-radius: 0 0 9999px 9999px;   /* perfekt halvcirkel: radien skalar till halva bredden */
  background: var(--c-photo);
  transform: translateZ(0);
}
.hero__img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: var(--focus, 50% 30%);
  opacity: 0; transform-origin: 50% 50%;
}
.hero__img.is-active { opacity: 1; }
.hero__scroll {
  position: absolute; left: 50%; bottom: calc(45.5 * var(--u));
  width: calc(33 * var(--u)); height: calc(67 * var(--u)); min-width: 28px; min-height: 56px;
  margin-left: calc(-16.5 * var(--u));
  border-radius: 999px; background: #fff; color: var(--c-ink);
  box-shadow: 0 calc(6 * var(--u)) calc(18 * var(--u)) rgba(20, 40, 60, .18);
  display: flex; align-items: flex-end; justify-content: center; padding-bottom: calc(12 * var(--u));
}
.hero__scroll svg { width: calc(8.5 * var(--u)); height: calc(10.2 * var(--u)); min-width: 8px; }

.hero__content {
  position: absolute;
  left: calc(116 * var(--u));
  top: calc(50% - 188 * var(--u));
  width: calc(660 * var(--u));
}
.hero__slides { display: grid; }
.hero__slide { grid-area: 1 / 1; }
/* Inaktiva steg döljs med opacity (inte visibility) så att steg 1:s H1 alltid finns kvar för skärmläsare.
   Steg 2–3 har aria-hidden i HTML. Dold text går inte att markera eller klicka. */
.hero__slide:not(.is-active) { opacity: 0; pointer-events: none; -webkit-user-select: none; user-select: none; }
.hero__eyebrow, .hero__title { display: flex; flex-direction: column; align-items: flex-start; } /* flex: masker-marginaler kollapsar inte */
/* Text som delas upp i tecken/ord (SplitText) får samma mått delad och odelad: ingen kerning/ligatur som "hoppar" vid revert */
.hero__eyebrow, .hero__title, [data-reveal="heading"] { font-kerning: none; font-variant-ligatures: none; font-feature-settings: "kern" 0, "liga" 0, "clig" 0; }
.hero__eyebrow {
  font-family: var(--font-display); font-weight: 300;
  font-size: calc(23.5 * var(--u)); line-height: 1.2; letter-spacing: .005em;
}
.hero__title {
  margin-top: calc(5 * var(--u));
  font-family: var(--font-display); font-weight: 300;
  font-size: calc(78.6 * var(--u)); line-height: 1.1133; letter-spacing: -.01em;
}
/* varje rad är en mask för tecken-för-tecken-avslöjandet (utökad så att descenders/accenter inte klipps) */
.hero__line {
  display: block; overflow: clip;
  padding: .16em .08em .26em; margin: -.16em -.08em -.26em;
}
.hero__sub {
  margin-top: calc(26 * var(--u));
  font-size: max(13px, calc(13.8 * var(--u))); line-height: 1.45; font-weight: 610; /* golv < 1400 px: läsbart även 1100–1400 */
}
.hero__cta {
  margin-top: calc(39 * var(--u));
  --btn-h: calc(44 * var(--u));
  min-height: var(--btn-h); min-width: calc(184 * var(--u)); padding: 0 calc(34 * var(--u));
  font-size: max(9.5px, calc(9.6 * var(--u))); letter-spacing: .05em;
}
.hero .review-block {
  position: absolute; left: calc(465.5 * var(--u)); top: calc(50% + 159 * var(--u));
}
.hero .review-block__count { font-size: calc(40 * var(--u)); font-weight: 380; }
.hero .review-block .stars { --star-size: calc(12.5 * var(--u)); --star-gap: calc(5 * var(--u)); margin-top: calc(15 * var(--u)); }
.hero .review-block__text { margin-top: calc(11 * var(--u)); font-size: max(11.5px, calc(12 * var(--u))); line-height: 1.55; max-width: calc(170 * var(--u)); color: #34434E; } /* mörkare än --c-muted, som referensen */
.hero .review-block .link-arrow { position: relative; margin-top: calc(12 * var(--u)); min-height: 0; gap: calc(10 * var(--u)); font-size: max(9px, calc(9.4 * var(--u))); }
.hero .review-block .link-arrow::after { content: ""; position: absolute; inset: -12px -8px; } /* träffyta ≥ 40 px utan att flytta layouten */
.hero .review-block .link-arrow__icon { width: calc(17 * var(--u)); height: calc(17 * var(--u)); }
.hero .review-block .link-arrow__icon svg { width: calc(8 * var(--u)); height: calc(8 * var(--u)); }

.hero__dots {
  position: absolute; left: calc(46.5 * var(--u)); top: calc(50% - 101.5 * var(--u));
  width: calc(23 * var(--u));
  display: flex; flex-direction: column; align-items: center; gap: calc(18 * var(--u));
}
.hero__dot {
  position: relative; display: grid; place-items: center;
  width: calc(4 * var(--u)); height: calc(4 * var(--u)); border-radius: 50%;
  background: var(--c-dot);
  font-weight: 700; font-size: calc(8 * var(--u)); line-height: 1; color: transparent;
  transition: width .45s var(--ease-out), height .45s var(--ease-out), margin .45s var(--ease-out), background-color .45s ease, color .3s ease;
}
.hero__dot::after { content: ""; position: absolute; inset: -12px; } /* större träffyta */
/* referensen: 22 px mellan små prickar, 32,75 px mellan cirkelns och prickens mitt -> gap 18 + 1 px marginal runt cirkeln */
.hero__dot[aria-current="true"] { width: calc(23.5 * var(--u)); height: calc(23.5 * var(--u)); margin-block: calc(1 * var(--u)); background: #fff; color: var(--c-ink); }
/* Paus/start för bildspelet (WCAG 2.2.2): dold tills den får tangentbordsfokus, påverkar inte prickarnas layout */
.hero__pause {
  position: absolute; top: 100%; left: 0; margin-top: 18px; z-index: 5;
  min-height: 44px; padding: 0 18px; border-radius: 999px; background: #fff; box-shadow: var(--shadow-pill);
  font-weight: 700; font-size: .6875rem; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; color: var(--c-ink);
}
.hero__pause:not(:focus) { width: 1px; height: 1px; min-height: 0; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); box-shadow: none; }
.hero__pause[hidden] { display: none; }

.hero__emergency {
  position: absolute; left: calc(46 * var(--u)); bottom: calc(48 * var(--u));
  height: calc(50 * var(--u)); min-width: calc(216 * var(--u));
  padding: 0 calc(24 * var(--u)) 0 calc(13 * var(--u)); gap: calc(28 * var(--u));
}
.hero__emergency .emergency-pill__icon { width: calc(24.5 * var(--u)); height: calc(24.5 * var(--u)); box-shadow: 0 0 0 calc(5 * var(--u)) var(--c-emergency-soft); }
.hero__emergency .emergency-pill__icon svg { width: calc(14.5 * var(--u)); height: calc(14.5 * var(--u)); } /* glyfen ≈ 75 % av rutan -> ≈ 11 px */
.hero__emergency .emergency-pill__label { font-size: max(9px, calc(9.4 * var(--u))); letter-spacing: .04em; }
.hero__emergency .emergency-pill__number { font-size: max(13px, calc(13.7 * var(--u))); font-weight: 650; margin-top: calc(3 * var(--u)); }

/* 10. Page-hero (undersidor) --------------------------------------------------- */
.page-hero {
  position: relative; container-type: inline-size; isolation: isolate;
  min-height: min(max(100svh, 640px), 1100px); /* fyller första vyn (även korta heros) – inget vitt band under panelen */
  padding: calc(var(--header-h) + clamp(16px, 2.6vw, 44px)) 0 clamp(48px, 6vw, 96px); /* kundönskemål: innehållet högre upp så att hela listan och knapparna syns */
  display: flex; align-items: center;
}
.page-hero__panel {
  position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, var(--c-hero-light) 0%, var(--c-hero) 38%);
  border-bottom-right-radius: 20.84cqw;
}
.page-hero__media { position: absolute; top: 0; left: 58.32%; right: 0; height: min(100%, max(100svh, 640px)); } /* kundönskemål: bågen ska alltid synas i första vyn – långa heros får inte sträcka bilden under skärmkanten */
.page-hero__frame { position: absolute; inset: 0; overflow: hidden; border-radius: 0 0 9999px 9999px; background: var(--c-photo); }
.page-hero__frame img { width: 100%; height: 100%; object-fit: cover; object-position: var(--focus, 50% 30%); }
/* Tvingad radbrytning bara på breda skärmar (≥ 1680 px) – smalare kolumner balanseras av text-wrap */
.br-wide { display: none; }
@media (min-width: 1680px) { .br-wide { display: inline; } }
.page-hero__frame picture { display: contents; } /* valfri mobilbeskärning: <picture><source media="(max-width: 899px), (max-width: 1099px) and (max-aspect-ratio: 1/1)"> */
.page-hero__inner { width: 100%; padding-left: var(--gutter); padding-right: calc(41.68% + 48px); }
.page-hero__inner .h1 { max-width: 12.5em; font-size: clamp(2.6rem, min(5.3vw, 8.4svh), 4.75rem); } /* skalar även med skärmhöjden */
.page-hero__ingress { margin-top: 1.1rem; max-width: 34em; }
.page-hero .check-list { margin-top: 1.4rem; }
.page-hero .btn-row { margin-top: 1.7rem; }
.page-hero__meta { margin-top: clamp(32px, 4vw, 52px); display: flex; flex-wrap: wrap; align-items: flex-end; gap: 28px 56px; }
.page-hero .review-block__count { font-size: clamp(2rem, 1.5rem + 1.2vw, 2.4rem); }
/* Låga datorskärmar (t.ex. 1440×900, 1366×768): tätare hero så att recensionsblocket och akut-pillret ryms i första vyn */
@media (min-width: 1100px) and (max-height: 950px) {
  .page-hero__inner .h1 { font-size: clamp(2.4rem, min(5.3vw, 7.4svh), 4.75rem); }
  .page-hero .check-list { gap: 10px; }
  .page-hero .btn-row { margin-top: 1.4rem; }
  .page-hero__meta { margin-top: 28px; }
  .page-hero .review-block__text { max-width: 24em; }
}
@media (min-width: 1100px) and (max-height: 800px) {
  .page-hero__inner .h1 { font-size: clamp(2.3rem, min(5.3vw, 6.6svh), 4.75rem); }
  .page-hero__meta { margin-top: 20px; }
  /* recensionsblocket som rad (siffra vänster, stjärnor + text höger) – samma som .review-block--row */
  .page-hero .review-block { grid-template-columns: auto auto; column-gap: 18px; align-items: center; }
  .page-hero .review-block__count { grid-row: span 2; }
  .page-hero .review-block .stars { margin-top: 0; align-self: end; }
  .page-hero .review-block__text { margin-top: 4px; align-self: start; }
  .page-hero .review-block .link-arrow { grid-column: 1 / -1; margin-top: 6px; }
}
/* Scrollknapp i bågens nederkant (samma vita piller som startsidans .hero__scroll), bara ≥ 1100 px.
   Tonar in efter bildavslöjandet och gungar lugnt; står still vid reducerad rörelse. */
.page-hero__scroll {
  position: absolute; left: 50%; bottom: clamp(26px, 4.2vh, 46px); z-index: 2;
  width: 34px; height: 64px; margin-left: -17px;
  border-radius: 999px; background: #fff; color: var(--c-ink);
  box-shadow: 0 6px 18px rgba(20, 40, 60, .18);
  display: flex; align-items: flex-end; justify-content: center; padding-bottom: 13px;
  animation: page-hero-scroll-in .6s var(--ease-out) 1.4s both, page-hero-scroll-bob 4s ease-in-out 2s infinite;
}
.page-hero__scroll svg { width: 10px; height: 12px; }
.page-hero__scroll:hover { box-shadow: 0 10px 26px rgba(20, 40, 60, .24); }
@keyframes page-hero-scroll-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes page-hero-scroll-bob { 0%, 100% { transform: none; } 40% { transform: translateY(-14%); } 80% { transform: translateY(10%); } }

/* 10b. Textsida utan bild (integritetspolicy, 404): ljusblå panel under menyn + rubrik, sedan prosa (KOMPONENTER §6.18) */
.page-intro {
  position: relative; background: linear-gradient(100deg, var(--c-hero-light) 0%, var(--c-hero) 38%);
  border-bottom-right-radius: var(--radius-panel);
  padding: calc(var(--header-h) + clamp(40px, 6vw, 96px)) 0 clamp(48px, 6vw, 96px);
}
.page-intro__lead { margin-top: 1.1rem; max-width: 36em; }
.page-intro__meta { margin-top: 1rem; font-size: .875rem; }
.page-intro--full { min-height: min(max(100svh, 560px), 1000px); display: flex; align-items: center; }
.page-intro--full > .container { width: 100%; }
.page-intro__links { list-style: none; margin: 1.6rem 0 0; padding: 0; display: grid; gap: 4px; }
.page-intro__links .link-arrow { min-height: 44px; }

/* 11. Komponenter ----------------------------------------------------------------- */

/* Erbjudanderad (direkt under heron) */
.offer-strip { padding-block: clamp(40px, 5vw, 72px); }
.offer-strip__inner {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 20px 32px;
  padding: clamp(22px, 2.6vw, 34px) clamp(22px, 3vw, 44px);
  border-radius: 999px; background: #fff; box-shadow: var(--shadow-card);
}
.offer-strip__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 14px clamp(20px, 2.6vw, 40px); }
.offer-strip__list li { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: clamp(.9375rem, .85rem + .25vw, 1.0625rem); line-height: 1.35; }
.offer-strip__list .price { font-size: 1.1875rem; }
.offer-strip .btn-row { flex: none; }
.offer-strip .btn--secondary { background: var(--c-soft); box-shadow: none; } /* vitt piller syntes knappt på det vita kortet */
.offer-strip .btn--secondary:hover { background: var(--c-ink); color: #fff; }

/* Behandlingskort med välvd bild */
.card-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(18px, 2vw, 32px); }
.card { position: relative; display: flex; flex-direction: column; text-decoration: none; color: var(--c-ink); }
/* Välvda hörn: halvcirkeln skrivs som elliptisk radie i procent (vertikal % = (B/2)/H = 0,5 × 3/4 = 37,5 %).
   9999px blandat med 28 px fick webbläsaren att skala ned ALLA radier (28 px → ≈ 0,4 px, fyrkantiga hörn). */
.card__media { position: relative; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 50% 50% var(--radius-card) var(--radius-card) / 37.5% 37.5% var(--radius-card) var(--radius-card); background: var(--c-photo); }
.card__media--arch-bottom { border-radius: var(--radius-card) var(--radius-card) 50% 50% / var(--radius-card) var(--radius-card) 37.5% 37.5%; }
.card__media img { width: 100%; height: 100%; object-fit: cover; object-position: var(--focus, 50% 40%); transition: transform 1.1s var(--ease-out); }
.card:hover .card__media img { transform: scale(1.045); }
.card__body { padding: 22px 4px 0; display: grid; gap: 10px; justify-items: start; }
.card__title { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.4rem, 1.1rem + .7vw, 1.75rem); line-height: 1.15; letter-spacing: -.01em; }
.card__title a { text-decoration: none; }
.card__title a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius-card); } /* hela kortet klickbart */
.card__text { color: var(--c-muted); font-size: .9375rem; }
.card--panel { background: #fff; border-radius: var(--radius-card); padding: 14px 14px 22px; box-shadow: var(--shadow-card); }
.card--panel .card__body { padding-inline: 10px; }

/* Omdömen (initialavatarer) */
.testimonials { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 2vw, 28px); align-items: start; }
.testimonial {
  background: #fff; border-radius: var(--radius-card); box-shadow: var(--shadow-card);
  padding: clamp(26px, 2.6vw, 38px); display: flex; flex-direction: column; gap: 22px; height: 100%;
}
.testimonial__quote { font-size: 1rem; line-height: 1.65; font-weight: 500; flex: 1; }
.testimonial__quote p + p { margin-top: .8em; }
.testimonial__person { display: flex; align-items: center; gap: 14px; }
.avatar {
  width: 48px; height: 48px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--c-accent); color: var(--c-on-accent); font-family: var(--font-display); font-weight: 400; font-size: 1.35rem; line-height: 1;
}
.avatar--soft { background: var(--c-hero); color: var(--c-ink); }
.avatar--ink { background: var(--c-ink); color: #fff; }
.testimonial__name { font-weight: 700; font-size: .9375rem; }
.testimonial__mark { font-family: var(--font-display); font-size: 4rem; line-height: .6; height: .45em; color: var(--c-accent); }
/* Rubrikrad för omdömen: rubrik till vänster, recensionsblock till höger */
.testimonials-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 32px 48px; margin-bottom: clamp(36px, 4vw, 64px); }
.testimonials-head .h2 { max-width: 12em; }
.review-block--row { grid-template-columns: auto auto; column-gap: 28px; align-items: center; justify-items: start; }
.review-block--row .review-block__count { grid-row: span 2; font-size: clamp(3rem, 2rem + 2.6vw, 4.25rem); }
.review-block--row .stars { margin-top: 0; align-self: end; }
.review-block--row .review-block__text { margin-top: 6px; align-self: start; }
.review-block--row .link-arrow { grid-column: 1 / -1; margin-top: 10px; }

/* Omdömeskarusell (partials/omdomen.html) – samma kort som .testimonial, 3/2/1 synliga */
.carousel { --per-view: 3; --gap: clamp(18px, 2vw, 28px); position: relative; }
.carousel__track {
  list-style: none; margin: 0 -8px -20px; padding: 8px 8px 44px; display: flex; gap: var(--gap); scroll-padding-inline: 8px;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__track:focus-visible { outline: 2px solid var(--c-ink); outline-offset: 4px; border-radius: var(--radius-card); }
.carousel__slide { flex: 0 0 calc((100% - (var(--per-view) - 1) * var(--gap)) / var(--per-view)); scroll-snap-align: start; display: flex; }
@media (max-width: 679px) { .carousel__slide { align-self: flex-start; } } /* mobil: ett kort i taget – korta omdömen sträcks inte ut till det längstas höjd */
.carousel__slide .testimonial { width: 100%; box-shadow: 0 12px 30px rgba(20, 60, 90, .07); }
.carousel__controls { display: flex; align-items: center; gap: 16px; margin-top: 6px; }
.carousel__btn {
  width: 52px; height: 52px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-pill); color: var(--c-ink);
  display: grid; place-items: center; flex: none; transition: background-color .25s ease, color .25s ease, opacity .25s ease;
}
.carousel__btn:hover { background: var(--c-ink); color: #fff; }
.carousel__btn:disabled { opacity: .4; cursor: default; }
.carousel__btn svg { width: 16px; height: 16px; }
.carousel__btn[data-carousel-prev] svg { transform: rotate(180deg); }
.carousel__progress { flex: 1; height: 2px; background: var(--c-line); border-radius: 2px; overflow: hidden; max-width: 420px; }
.carousel__bar { display: block; height: 100%; width: 0; background: var(--c-ink); transition: width .5s var(--ease-out); }
.carousel__count { font-weight: 700; font-size: var(--fs-label); letter-spacing: .09em; min-width: 7.5em; white-space: nowrap; text-align: center; font-variant-numeric: tabular-nums; }
.carousel__note { margin-top: 18px; font-size: .8125rem; }
html:not(.js) .carousel__controls { display: none; }
.testimonial__meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.testimonial__meta .stars { --star-size: 13px; --star-gap: 4px; }
.testimonial__source { display: inline-flex; align-items: center; gap: 8px; font-size: .75rem; font-weight: 600; color: var(--c-muted); white-space: nowrap; }
.testimonial__source img { height: 13px; width: auto; }
.testimonial__quote.is-clamped { max-height: calc(1.65em * var(--clamp-lines, 8)); overflow: hidden; -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent); mask-image: linear-gradient(to bottom, #000 72%, transparent); }
.testimonial__more { align-self: flex-start; margin-top: -10px; font-weight: 700; font-size: var(--fs-label); letter-spacing: .09em; text-transform: uppercase; text-decoration: underline; text-decoration-color: var(--c-accent); text-decoration-thickness: 2px; text-underline-offset: .3em; min-height: 44px; margin-block: -16px -6px; }
@media (max-width: 1023px) { .carousel { --per-view: 2; } }
@media (max-width: 679px) { .carousel { --per-view: 1.12; } .carousel__slide { scroll-snap-align: center; } }
@media (prefers-reduced-motion: reduce) { .carousel__track { scroll-behavior: auto; } }

/* USP-boxar */
.usp-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px); }
.usp {
  position: relative; padding: clamp(26px, 2.4vw, 36px); border-radius: var(--radius-card);
  background: var(--c-soft); display: grid; align-content: start; gap: 14px;
}
.usp__icon { width: 56px; height: 56px; border-radius: 50%; background: #fff; color: var(--c-ink); display: grid; place-items: center; margin-bottom: 10px; box-shadow: var(--shadow-pill); }
.usp__icon svg { width: 24px; height: 24px; }
.usp__title { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.3rem, 1.1rem + .5vw, 1.55rem); line-height: 1.2; letter-spacing: -.01em; }
.usp__text { font-size: .9375rem; line-height: 1.6; color: var(--c-ink); }
/* 4 kolumner (≥ 1280): rubrikerna får högst två rader och samma höjd, så att brödtexten börjar på samma nivå i alla kort */
@media (min-width: 1280px) {
  .usp__icon + .usp__title { font-size: min(clamp(1.3rem, 1.1rem + .5vw, 1.55rem), 1.4rem); min-height: 2.4em; }
}
/* Numrerat kort: siffran i samma vita cirkel som ikonen, inuti rubriken (rubriktexten blir "1. Naturligt utseende") */
.usp__badge {
  width: 56px; height: 56px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-pill);
  display: grid; place-items: center; margin-bottom: 22px;
  font-family: var(--font-display); font-weight: 400; font-size: 1.35rem; line-height: 1; letter-spacing: 0; color: var(--c-ink);
}
.usp__num { position: absolute; top: clamp(26px, 2.4vw, 36px); right: clamp(26px, 2.4vw, 36px); font-family: var(--font-display); font-size: .95rem; color: var(--c-muted); }

/* Bildpar / kollage med välvda ramar */
.collage { position: relative; display: grid; grid-template-columns: 1.08fr .92fr; gap: clamp(14px, 1.8vw, 24px); align-items: start; }
.collage__img { position: relative; overflow: hidden; background: var(--c-photo); }
.collage__img img { width: 100%; height: 100%; object-fit: cover; object-position: var(--focus, 50% 50%); }
/* halvcirkel som elliptisk radie: vertikal % = (B/2)/H → 3/(2×4,1) = 36,59 % resp. 3/(2×3,9) = 38,46 % (se .card__media) */
.collage__img--arch-bottom { aspect-ratio: 3 / 4.1; border-radius: var(--radius-card) var(--radius-card) 50% 50% / var(--radius-card) var(--radius-card) 36.59% 36.59%; }
.collage__img--arch-top { aspect-ratio: 3 / 3.9; border-radius: 50% 50% var(--radius-card) var(--radius-card) / 38.46% 38.46% var(--radius-card) var(--radius-card); margin-top: clamp(48px, 7vw, 120px); }
.collage__img--landscape { aspect-ratio: 4 / 3; border-radius: var(--radius-card); }
/* Överlappande variant: stående välvd bild + liggande foto (t.ex. riktigt klinikfoto) nere till höger */
.collage--overlap { display: block; padding-bottom: 16%; }
.collage--overlap .collage__img--arch-top { width: 64%; margin-top: 0; }
.collage--overlap .collage__img--landscape { position: absolute; right: 0; bottom: 0; width: 60%; border: 8px solid #fff; box-shadow: var(--shadow-card); }
.collage__img--circle { position: absolute; width: 30%; aspect-ratio: 1; border-radius: 50%; left: 44%; bottom: -6%; border: 6px solid #fff; box-shadow: var(--shadow-card); }

/* Arch-bild (enskild) */
.arch { position: relative; overflow: hidden; background: var(--c-photo); border-radius: 0 0 9999px 9999px; aspect-ratio: 3 / 4; }
.arch--top { border-radius: 9999px 9999px 0 0; }
.arch--card { border-radius: var(--radius-card); }
.arch--wide { aspect-ratio: 4 / 3; }            /* liggande ram, t.ex. riktiga klinikfoton (960 px) */
.arch--square { aspect-ratio: 1; }
.arch img { width: 100%; height: 100%; object-fit: cover; object-position: var(--focus, 50% 40%); }

/* CTA-band */
.cta-band { border-radius: var(--radius-card); padding: clamp(40px, 6vw, 88px) clamp(24px, 6vw, 96px); background: var(--c-hero); display: grid; grid-template-columns: minmax(0, 1.4fr) auto; gap: 28px 48px; align-items: center; border-bottom-right-radius: clamp(80px, 12vw, 180px); }
.cta-band--ink { background: var(--c-ink); color: #fff; }
.cta-band--ink .h2, .cta-band--ink .eyebrow { color: #fff; }

/* Kontaktblock */
.contact { display: grid; grid-template-columns: minmax(0, 4.5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.contact__details { display: grid; gap: 30px; }
.contact__group-title { font-family: var(--font-sans); font-weight: 700; font-size: var(--fs-label); letter-spacing: .09em; text-transform: uppercase; margin-bottom: 12px; color: var(--c-muted); }
.contact__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.contact__list a { text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; } /* träffyta ≥ 44 px */
.contact__list a:hover { text-decoration: underline; }
.contact__item { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: center; font-weight: 600; }
.contact__icon { width: 40px; height: 40px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-pill); display: grid; place-items: center; }
.contact__icon svg { width: 16px; height: 16px; }
.hours { display: grid; grid-template-columns: auto 1fr; gap: 6px 22px; margin: 0; }
.hours dt { font-weight: 700; }
.hours dd { margin: 0; }
.hours__note { margin: 14px 0 0; font-size: .875rem; color: var(--c-muted); }

/* Formulär */
.form { background: #fff; border-radius: var(--radius-card); box-shadow: var(--shadow-card); padding: clamp(24px, 3.2vw, 48px); display: grid; gap: 18px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 8px; }
.field label { font-weight: 700; font-size: var(--fs-label); letter-spacing: .09em; text-transform: uppercase; }
.field .req { color: var(--c-emergency); margin-left: 2px; }
.field input, .field textarea {
  width: 100%; font: inherit; font-weight: 500; color: var(--c-ink);
  padding: 14px 18px; min-height: 52px; border-radius: 16px; border: 1px solid var(--c-line-control); background: var(--c-white);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--c-ink); box-shadow: 0 0 0 4px rgba(18, 221, 218, .25); }
.field input:user-invalid, .field textarea:user-invalid { border-color: var(--c-emergency); }
.form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; }
.form__status { font-weight: 600; font-size: .9375rem; }
.form__status[data-state="ok"] { color: var(--c-accent-deep); }
.form__status[data-state="error"] { color: var(--c-emergency); }

/* Karta */
/* ingen min-height: tillsammans med aspect-ratio gav den en överförd min-bredd (416 px) som flödade över smala kolumner */
.map { position: relative; border-radius: var(--radius-card); overflow: hidden; background: var(--c-soft); aspect-ratio: 16 / 10; min-height: 0; }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; filter: grayscale(1) contrast(1.05) brightness(1.02); }
.map--wide { aspect-ratio: 4 / 3; }  /* samma höjd som ett 4:3-klinikfoto bredvid */
.map--arch { border-radius: 50% 50% var(--radius-card) var(--radius-card) / 40% 40% var(--radius-card) var(--radius-card); aspect-ratio: 4 / 5; } /* (B/2)/H = 0,5 × 4/5 */
/* Kartan laddas först när besökaren klickar (Google får inga uppgifter innan dess) */
.map--fill { position: absolute; inset: 0; aspect-ratio: auto; min-height: 0; border-radius: inherit; }
.map__consent { position: absolute; inset: 0; display: grid; align-content: center; justify-items: center; gap: 10px; padding: 36px 20px 18px; text-align: center;
  background: radial-gradient(circle at 50% 40%, rgba(255, 255, 255, .7), transparent 70%), repeating-linear-gradient(45deg, var(--c-soft) 0 14px, var(--c-hero) 14px 28px); }
.map__consent-text { max-width: 30em; font-size: .8125rem; font-weight: 600; line-height: 1.45; color: var(--c-ink); }
.map__consent .btn { gap: 8px; }
.map__consent-link { display: inline-flex; align-items: center; min-height: 44px; font-size: .8125rem; font-weight: 700; text-decoration-color: var(--c-accent); text-decoration-thickness: 2px; text-underline-offset: .25em; }
.site-footer .map__consent { padding: 48px 16px 8px; gap: 4px; }
.site-footer .map__consent-text { font-size: .75rem; }
/* ≤ 1099 px är kartan bred och lågt välvd: texten hålls innanför bågen (sidomarginal som följer bredden) och
   blocket står längre ned, där bågen är bred nog – annars klipps "Kartan" och "skickas" av kurvan */
@media (max-width: 1099px) {
  .site-footer .map__consent { padding: 40px max(16px, 12cqw) 6px; align-content: end; }
}
/* Pekskärm/smal skärm: "Visa karta" ≥ 44 px (SPEC §5) */
@media (max-width: 1099px), (pointer: coarse) {
  .map__consent .btn--sm { --btn-h: 44px; min-height: 44px; }
}

/* Bokning v4 – data-component="booking" (KOMPONENTER §6.16, assets/js/bokning.js)
   Tidsläget (demo/api): behandling + tandläkare → snabbkort med riktiga tider (Idag / I morgon / Denna vecka),
   "Nästa lediga tid", "Alla tider" → veckokalender med dagens tider (förmiddag/eftermiddag/kväll), tomlägen.
   Förfrågan (request, booking v3): tidsfönster ur öppettiderna. Bygger på den rekommenderade prototypen
   (_design/bokning-forslag/rekommenderad/). Prefix bk-. Rött används bara för akut. Fel visas i svart med text. */
:root {
  --bk-radius-sm: 18px;
  --bk-ring: 0 0 0 2px var(--c-accent);
}
/* hidden gäller alltid i bokningen (många element har egen display) */
.booking [hidden], .bk-dialog [hidden] { display: none !important; }

/* Sektionen följer rytmen automatiskt: efter en panel blir den vit, annars ljusblå panel med
   stort hörn uppe till höger (integratörens regel, nu i CSS – snippeten är identisk på alla sidor). */
.booking { position: relative; background: var(--c-hero); border-top-right-radius: var(--radius-panel); }
/* Kundönskemål: "Boka tid" ska landa på rubriken (inte sektionens luft ovanför) så att hela bokningen syns. scroll-padding-top (96px) + negativ marginal = rubriken strax under menyn. */
#boka { scroll-margin-top: calc(-8px - var(--section-y)); } /* rubrikens överkant ≈ 88 px = ca 20 px under menykapseln (65–68 px) */
/* Lägre skärmar (t.ex. 1366×768 laptop): tätare bokning så att allt från rubriken och nedåt ryms efter klick på "Boka tid" */
@media (min-width: 1100px) and (max-height: 860px) {
  #boka .booking__head { margin-bottom: 16px; }
  #boka .booking__head .h2 { font-size: clamp(2.25rem, 1.6rem + 1.4vw, 2.75rem); }
  #boka .booking__lead { margin-top: .35rem; }
  .panel + .booking#boka .bk-stage, #boka .bk-stage { row-gap: 12px; }
  .panel + .booking#boka .bk-stage { padding: 20px 26px; }
  #boka .bk-builder__head { margin-bottom: 8px; }
  #boka .bk-price { margin-bottom: 8px; }
  #boka .bk-cards--slots .bk-card { padding: 14px 16px 12px; }
  #boka .bk-cards--slots .bk-card__time { margin-top: 4px; }
  #boka .bk-pills { margin-top: 10px; padding-top: 10px; }
  #boka .bk-nextfree { margin-top: 10px; }
  #boka .bk-akut { padding: 20px 24px; }
  #boka .bk-akut__title { font-size: clamp(1.6rem, 1.2rem + .9vw, 2rem); }
}
/* Ännu lägre (t.ex. 1280×609 = 13" med webbläsarlist): ingressen döljs, trygghetsraden på en rad, kortare akutkort */
@media (min-width: 1100px) and (max-height: 680px) {
  #boka .booking__head { margin-bottom: 10px; }
  #boka .booking__head .h2 { font-size: clamp(2rem, 1.5rem + 1vw, 2.35rem); }
  #boka .booking__lead { display: none; }
  #boka .bk-cards--slots .bk-card { padding: 12px 14px 10px; }
  #boka .bk-cards--slots .bk-card__time { font-size: clamp(1.9rem, 1.2rem + 1vw, 2.35rem); }
  #boka .bk-pills { margin-top: 8px; padding-top: 8px; }
  #boka .bk-trust { gap: 6px 18px; }
  #boka .bk-trust li { font-size: .8125rem; white-space: nowrap; }
  #boka .bk-trust li:nth-child(3) { display: none; } /* öppettiderna står redan i statusraden */
  #boka .bk-akut { padding: 16px 20px; }
  #boka .bk-akut__sub, #boka .bk-akut__after { display: none; }
  #boka .bk-akut__title { margin-top: 8px; font-size: clamp(1.45rem, 1.1rem + .7vw, 1.75rem); }
}
.panel + .booking { background: var(--c-white); border-top-right-radius: 0; padding-bottom: calc(var(--section-y) * .7); }

.booking__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px 40px; margin-bottom: clamp(26px, 3vw, 44px); }
.booking__intro { max-width: 720px; }
.booking__title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; }
.booking__lead { margin-top: 1rem; max-width: 32em; text-wrap: pretty; }
.booking__meta { display: grid; gap: 6px; justify-items: end; text-align: right; }
.booking__call { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 700; font-size: 1rem; text-decoration: none; color: var(--c-ink); }
.booking__call:hover { text-decoration: underline; text-decoration-color: var(--c-accent); text-decoration-thickness: 2px; }
.booking__call-icon { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--c-ink); box-shadow: var(--shadow-pill); flex: none; }
.booking__call-icon svg { width: 13px; height: 13px; }
.panel + .booking .booking__call-icon { background: var(--c-soft); box-shadow: none; }

/* Visningstider: liten, ärlig etikett vid rubriken (bara i demoläget) */
.bk-demo, .bk-badge {
  display: inline-flex; align-items: center; gap: 8px; min-height: 30px; padding: 4px 14px 4px 11px;
  border-radius: 999px; border: 1.5px dashed rgba(0, 8, 15, .28); background: rgba(255, 255, 255, .6);
  font-weight: 700; font-size: .6875rem; line-height: 1.2; letter-spacing: .08em; text-transform: uppercase; color: var(--c-ink); white-space: nowrap;
}
/* "i" i en tunn ring – inte samma turkosa prick som "Öppet nu" (ska inte läsas som en live-status) */
.bk-demo::before, .bk-badge::before { content: "i"; width: 15px; height: 15px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px currentColor; display: grid; place-items: center; font-family: Georgia, "Times New Roman", serif; font-style: italic; font-weight: 700; font-size: 10px; line-height: 1; letter-spacing: 0; text-transform: none; flex: none; }
.panel + .booking .bk-demo { background: var(--c-soft); }
.bk-badge { margin-bottom: 12px; background: var(--c-soft); }

.bk-label { font-family: var(--font-sans); font-weight: 700; font-size: var(--fs-label); letter-spacing: .09em; text-transform: uppercase; color: var(--c-muted); }
.bk-status { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: .875rem; line-height: 1.35; color: var(--c-ink); }
.bk-status::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--c-dot); flex: none; }
.bk-status.is-open::before { background: var(--c-accent); box-shadow: 0 0 0 4px rgba(18, 221, 218, .22); }
.bk-status:empty { display: none; }
.bk-muted { font-size: .875rem; font-weight: 600; color: var(--c-muted); }
.bk-nowrap { white-space: nowrap; }

/* Scen: byggaren till vänster, akutkortet till höger. På vit sektion blir scenen en ljusblå panel. */
.bk-stage {
  display: grid; align-items: start;
  grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
  grid-template-rows: auto 1fr;          /* är akutkortet högre än byggaren hamnar luften under trygghetsraderna */
  grid-template-areas: "app akut" "trust akut";
  column-gap: clamp(24px, 3vw, 48px); row-gap: 20px;
}
.panel + .booking .bk-stage {
  padding: clamp(20px, 3.2vw, 48px);
  background: linear-gradient(100deg, var(--c-hero-light) 0%, var(--c-hero) 42%);
  border-radius: var(--radius-card); border-bottom-right-radius: clamp(80px, 10vw, 180px);
}
.bk-app { grid-area: app; min-width: 0; min-height: 360px; }
.is-bk-ready .bk-app, html:not(.js) .bk-app { min-height: 0; }
.bk-akut { grid-area: akut; }
.bk-trust { grid-area: trust; }
.bk-nojs { padding: 24px; border-radius: var(--radius-card); background: #fff; font-weight: 600; }
html:not(.js) .callback { display: none; } /* utan JS kan återuppringningen inte fällas ut – .bk-nojs visar telefon och e-post */
.bk-nojs a { font-weight: 800; }

/* Byggarens rubrikrad: "Välj tid för [behandling ▾] [tandläkare ▾]" + "Alla tider" (förfrågan: "Önska tid för" + "Välj annan dag") */
.bk-builder__head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-bottom: 16px; }
.bk-builder__title { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.25rem, 1.05rem + .5vw, 1.5rem); line-height: 1.2; letter-spacing: -.005em; margin-right: 2px; }
.bk-select { position: relative; display: inline-flex; max-width: 100%; }
.bk-select select {
  appearance: none; -webkit-appearance: none; max-width: 100%;
  min-height: 46px; padding: 0 46px 0 20px; border-radius: 999px; border: 0;
  background: #fff; box-shadow: var(--shadow-pill); color: var(--c-ink);
  font: inherit; font-weight: 700; font-size: .9375rem; cursor: pointer; text-overflow: ellipsis;
  transition: box-shadow .25s ease;
}
.bk-select select:hover { box-shadow: var(--shadow-float); }
.bk-select select:focus-visible { outline: 2px solid var(--c-ink); outline-offset: 3px; }
.bk-select .icon { position: absolute; right: 19px; top: 50%; width: 10px; height: 10px; margin-top: -5px; pointer-events: none; }
.bk-select--dentist select { font-weight: 600; }
.panel + .booking .bk-select select { box-shadow: var(--shadow-pill), inset 0 0 0 1px rgba(0, 8, 15, .05); }
.bk-alldays {
  margin-left: auto; display: inline-flex; align-items: center; gap: 10px; min-height: 44px;
  font-weight: 700; font-size: var(--fs-label); letter-spacing: .085em; text-transform: uppercase; color: var(--c-ink); white-space: nowrap;
}
.bk-alldays__icon { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--c-ink); color: #fff; transition: background-color .25s ease, color .25s ease, transform .3s var(--ease-out); flex: none; }
.bk-alldays__icon svg { width: 13px; height: 13px; }
.bk-alldays:hover .bk-alldays__icon, .bk-alldays[aria-expanded="true"] .bk-alldays__icon { background: var(--c-accent); color: var(--c-ink); }

.bk-price { margin: -4px 0 16px; font-size: .9375rem; color: var(--c-muted); }
.bk-price .price { color: var(--c-ink); }
.bk-akutnote, .bk-sent, .bk-info { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 16px; padding: 12px 16px; border-radius: 16px; font-size: .9375rem; font-weight: 550; line-height: 1.5; }
.bk-akutnote { background: var(--c-emergency-soft); }
.bk-akutnote__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c-emergency); flex: none; margin-top: .5em; }
.bk-akutnote a { font-weight: 800; white-space: nowrap; }
.bk-sent, .bk-info { background: #fff; box-shadow: var(--shadow-pill); }
.bk-sent::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--c-accent); box-shadow: 0 0 0 4px rgba(18, 221, 218, .22); flex: none; margin-top: .5em; }
.bk-sent:focus { outline: none; }
.bk-info .icon { width: 16px; height: 16px; flex: none; margin-top: 3px; color: var(--c-accent-deep); }
.bk-info a { font-weight: 800; white-space: nowrap; }

/* Snabbkort: Idag / I morgon / Denna vecka */
.bk-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 1.2vw, 18px); }
.bk-cards > li { display: flex; min-width: 0; }
.bk-card {
  position: relative; width: 100%; display: flex; flex-direction: column;
  padding: 18px 18px 16px; border-radius: var(--radius-card); background: #fff; box-shadow: var(--shadow-card);
  transition: box-shadow .35s ease, transform .45s var(--ease-out);
  animation: bk-rise .7s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 80ms);
}
@keyframes bk-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.bk-card:not(.bk-card--empty):not(.bk-card--skeleton):hover { box-shadow: 0 24px 60px rgba(20, 60, 90, .13); }
.bk-card__main {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "top top" "day go" "hint hint";
  align-items: center; column-gap: 10px; width: 100%; text-align: left;
  margin: -4px; padding: 4px; box-sizing: content-box; border-radius: 20px;
}
.bk-card__top { grid-area: top; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.bk-card__when { font-weight: 800; font-size: var(--fs-label); letter-spacing: .1em; text-transform: uppercase; color: var(--c-ink); }
.bk-card__date { font-size: .8125rem; font-weight: 600; color: var(--c-muted); }
.bk-card__day {
  grid-area: day; margin-top: 8px;
  font-family: var(--font-display); font-weight: 300; font-size: clamp(1.75rem, 1.15rem + 1vw, 2.35rem);
  line-height: 1.05; letter-spacing: -.02em; white-space: nowrap;
}
.bk-card__hint { grid-area: hint; margin-top: 4px; font-size: .8125rem; font-weight: 600; color: var(--c-muted); }
.bk-card__go {
  grid-area: go; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: var(--c-accent); color: var(--c-ink); transition: transform .35s var(--ease-out), background-color .25s ease;
}
.bk-card__go svg { width: 15px; height: 15px; }
.bk-card__main:hover .bk-card__go { transform: translateX(4px); background: var(--c-accent-hover); }
/* Tidsläget: första lediga tid stort, tandläkaren under, fler tider som piller + "+N" */
.bk-card__time {
  grid-area: day; margin-top: 8px;
  font-family: var(--font-display); font-weight: 300; font-size: clamp(2.2rem, 1.35rem + 1.3vw, 2.9rem);
  line-height: 1; letter-spacing: -.02em; font-variant-numeric: lining-nums tabular-nums; white-space: nowrap;
}
.bk-card__who { grid-area: hint; margin-top: 6px; font-size: .8125rem; font-weight: 600; color: var(--c-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--c-line); }
.bk-pill {
  display: inline-grid; place-items: center; align-content: center; min-height: 44px; min-width: 58px; padding: 4px 12px;
  border-radius: 999px; background: var(--c-soft); color: var(--c-ink); line-height: 1.05;
  font-weight: 700; font-size: .9375rem; font-variant-numeric: tabular-nums;
  transition: background-color .2s ease, color .2s ease, transform .3s var(--ease-out), box-shadow .2s ease;
}
.bk-pill small { display: block; margin-top: 1px; font-weight: 600; font-size: .625rem; color: var(--c-muted); }
.bk-pill:hover { background: var(--c-ink); color: #fff; transform: translateY(-1px); }
.bk-pill:hover small { color: rgba(255, 255, 255, .75); }
.bk-pill--more { min-width: 48px; background: transparent; box-shadow: inset 0 0 0 1.5px var(--c-line-strong); font-size: .8125rem; letter-spacing: .02em; }
.bk-pill--more:hover { box-shadow: none; }
/* Tomt snabbkort: "Inga lediga tider" / "Stängt" + klickbar "Nästa lediga: …" */
.bk-card--empty { background: rgba(255, 255, 255, .66); box-shadow: inset 0 0 0 1.5px rgba(0, 8, 15, .06); }
.panel + .booking .bk-card--empty { background: rgba(255, 255, 255, .72); }
.bk-card__empty { margin-top: 10px; font-family: var(--font-display); font-weight: 300; font-size: clamp(1.4rem, 1.05rem + .65vw, 1.75rem); line-height: 1.1; letter-spacing: -.012em; color: var(--c-ink); }
.bk-card__why { margin-top: 4px; font-size: .8125rem; font-weight: 600; line-height: 1.4; color: var(--c-muted); }
.bk-card__next {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; margin-top: auto; min-height: 52px;
  padding: 7px 7px 7px 14px; border-radius: 18px; background: #fff; box-shadow: var(--shadow-pill); text-align: left;
  font-size: .8125rem; font-weight: 600; line-height: 1.3; color: var(--c-ink); transition: box-shadow .25s ease, transform .3s var(--ease-out);
}
.bk-card__why + .bk-card__next, .bk-card__empty + .bk-card__next { margin-top: 14px; }
.bk-card--empty .bk-card__why:last-child { margin-top: auto; padding-top: 12px; }
.bk-card__next strong { display: block; font-size: .9375rem; font-weight: 800; }
.bk-card--empty .bk-card__why--next:last-child { margin-top: auto; padding-top: 14px; color: var(--c-ink); }
/* Idag + i morgon utan tider: ett lugnt kort (de första dagarna med tider står bredvid) */
.bk-card--merged { justify-content: flex-start; }
.bk-card--merged .bk-card__empty { margin-top: 12px; }
/* Hela veckan utan tider: ett brett kort med närmaste dagar, kö för återbud och telefon */
.bk-cards--week > li { grid-column: 1 / -1; }
.bk-card--week { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 28px; padding: clamp(18px, 2vw, 26px); border-bottom-right-radius: clamp(56px, 7vw, 110px); }
.bk-card--week > * { grid-column: 1; }
.bk-card--week > .bk-card__top { grid-area: auto; grid-column: 1; }
.bk-card--week .bk-card__empty { margin-top: 8px; }
.bk-card--week .bk-card__empty { font-size: clamp(1.6rem, 1.15rem + 1vw, 2.2rem); }
.bk-card--week .bk-chips { margin-top: 12px; }
.bk-card--week .bk-card__acts { grid-column: 2; grid-row: 1 / span 4; display: grid; justify-items: start; gap: 6px; }
.bk-card__acts .btn { --btn-h: 48px; }
@media (min-width: 768px) { .bk-nextfree.bk-nextfree--mobile, .bk-card__next--mobile { display: none; } }
/* Tom dag vars nästa tid bara står på kort 3: texten på dator, knappen på mobil (kort 3 är dolt ≤ 767 px) */
@media (max-width: 767px) { .bk-card__why--desktop { display: none; } }
/* Akut: i morgon + resten av veckan tomma → ett brett kort bredvid ringkortet */
@media (min-width: 768px) {
  .bk-cards > li.bk-cards__rest { grid-column: span 2; }
  .bk-cards__rest .bk-card--week { grid-template-columns: minmax(0, 1fr); align-content: start; }
  .bk-cards__rest .bk-card--week .bk-card__empty { font-size: clamp(1.4rem, 1.05rem + .65vw, 1.75rem); }
  .bk-cards__rest .bk-card--week .bk-card__acts { grid-column: 1; grid-row: auto; margin-top: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; }
  .bk-card--empty .bk-card__why--desktop { margin-top: auto; padding-top: 14px; color: var(--c-ink); }
}
.bk-card__next svg { width: 34px; height: 34px; padding: 10px; border-radius: 50%; background: var(--c-accent); color: var(--c-ink); flex: none; transition: transform .3s var(--ease-out); }
.bk-card__next:hover { box-shadow: var(--shadow-float); }
.bk-card__next:hover svg { transform: translateX(3px); }
/* Laddar: skelett i kortens form */
.bk-card--skeleton { min-height: 190px; gap: 10px; background: rgba(255, 255, 255, .7); box-shadow: none; animation: none; }
.bk-skel { display: block; border-radius: 999px; background: linear-gradient(90deg, rgba(0, 8, 15, .06) 25%, rgba(0, 8, 15, .12) 37%, rgba(0, 8, 15, .06) 63%); background-size: 400% 100%; animation: bk-shimmer 1.4s ease infinite; }
.bk-skel--label { width: 48%; height: 11px; }
.bk-skel--time { width: 58%; height: 40px; margin-top: 4px; border-radius: 12px; }
.bk-skel--who { width: 42%; height: 11px; }
.bk-skel-row { display: flex; gap: 6px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--c-line); }
.bk-skel--pill { width: 58px; height: 40px; }
@keyframes bk-shimmer { from { background-position: 100% 50%; } to { background-position: 0 50%; } }
.bk-cards[hidden] { display: none; }
/* Akut idag: ringkort i stället för tider (inga fler akuttider idag, eller stängt: 1177) */
.bk-card--call { box-shadow: var(--shadow-card), inset 0 0 0 2px var(--c-emergency-soft); }
.bk-card--call .bk-card__main { text-decoration: none; color: var(--c-ink); }
.bk-card--call .bk-card__when { color: var(--c-emergency); }
.bk-card--call .bk-card__go { background: var(--c-emergency); color: #fff; }
.bk-card--call .bk-card__main:hover .bk-card__go { transform: none; background: var(--c-emergency); box-shadow: 0 0 0 6px var(--c-emergency-soft); }
.bk-card--call .bk-card__hint { color: var(--c-ink); text-wrap: pretty; }
.bk-card__sub { margin-top: auto; padding-top: 12px; font-size: .8125rem; font-weight: 600; line-height: 1.45; color: var(--c-muted); }
.bk-card__sub a { color: var(--c-ink); font-weight: 800; white-space: nowrap; text-decoration-color: var(--c-accent); text-decoration-thickness: 2px; }
.bk-daynote { display: flex; gap: 10px; align-items: center; margin: 0 0 12px; font-size: .875rem; font-weight: 650; line-height: 1.45; }
.bk-daynote::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--c-dot); flex: none; }

/* Förfrågan: tidsfönster (förmiddag, eftermiddag, kväll) */
.bk-wins { display: grid; gap: 6px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--c-line); }
.bk-win {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; min-width: 0;
  padding: 6px 14px 6px 16px; border-radius: 999px; background: var(--c-soft); color: var(--c-ink); text-align: left; line-height: 1.2;
  font-weight: 700; font-size: .875rem;
  transition: background-color .2s ease, color .2s ease, transform .3s var(--ease-out), box-shadow .2s ease;
}
.bk-win__range { font-weight: 600; font-size: .75rem; color: var(--c-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bk-win:hover { background: var(--c-ink); color: #fff; transform: translateY(-1px); }
.bk-win:hover .bk-win__range { color: rgba(255, 255, 255, .78); }
.bk-win--any { background: #fff; box-shadow: inset 0 0 0 1.5px var(--c-line-strong); }

/* "Nästa lediga tid" (tidsläget) och "Så snart som möjligt" (förfrågan) */
.bk-asap {
  display: flex; align-items: center; gap: 14px; width: 100%; margin-top: 14px; padding: 8px 8px 8px 10px;
  border-radius: 999px; background: #fff; box-shadow: var(--shadow-pill); color: var(--c-ink); text-align: left;
  transition: box-shadow .3s ease, transform .35s var(--ease-out);
}
.bk-asap:hover { box-shadow: var(--shadow-float); }
.bk-asap__icon { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--c-accent); color: var(--c-ink); flex: none; }
.bk-asap__icon svg { width: 18px; height: 18px; }
.bk-asap__text { flex: 1; display: grid; gap: 1px; min-width: 0; }
.bk-asap__main { font-weight: 700; font-size: 1rem; line-height: 1.3; }
.bk-asap__go { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--c-ink); color: #fff; flex: none; transition: transform .35s var(--ease-out); }
.bk-asap__go svg { width: 14px; height: 14px; }
.bk-asap:hover .bk-asap__go { transform: translateX(3px); }

/* Kalender: "Alla tider" / "Välj annan dag" (8 veckor framåt) */
.bk-cal {
  margin-bottom: 14px; padding: clamp(18px, 2.2vw, 30px);
  background: #fff; border-radius: var(--radius-card); border-bottom-right-radius: clamp(56px, 7vw, 110px); box-shadow: var(--shadow-card);
  scroll-margin-top: 100px; animation: bk-rise .5s var(--ease-out) both;
}
.bk-cal__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 18px; }
.bk-week { display: flex; align-items: center; gap: 10px; }
.bk-week__label { min-width: 12.5em; font-weight: 700; font-size: .9375rem; text-align: center; }
.bk-week__label span { color: var(--c-muted); font-weight: 600; }
.bk-week__nav { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--c-soft); flex: none; transition: background-color .25s ease, color .25s ease, opacity .25s ease; }
.bk-week__nav svg { width: 14px; height: 14px; transform: rotate(180deg); }
.bk-week__nav--next svg { transform: none; }
.bk-week__nav:hover:not(:disabled):not([aria-disabled="true"]) { background: var(--c-ink); color: #fff; }
.bk-week__nav:disabled, .bk-week__nav[aria-disabled="true"] { opacity: .35; cursor: default; }
.bk-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.bk-day {
  position: relative; display: grid; justify-items: center; align-content: center; gap: 2px; min-height: 84px; padding: 10px 4px;
  border-radius: var(--bk-radius-sm); background: var(--c-soft); color: var(--c-ink);
  transition: background-color .25s ease, color .25s ease, transform .35s var(--ease-out), box-shadow .25s ease;
}
.bk-day:hover:not(:disabled):not([aria-checked="true"]) { background: #fff; box-shadow: var(--shadow-pill), inset 0 0 0 1.5px var(--c-line); transform: translateY(-2px); }
.bk-day__wd { font-weight: 800; font-size: .6875rem; letter-spacing: .08em; text-transform: uppercase; }
.bk-day__num { font-family: var(--font-display); font-weight: 300; font-size: 1.65rem; line-height: 1.05; font-variant-numeric: lining-nums; }
.bk-day__n { font-size: .6875rem; font-weight: 600; color: var(--c-muted); white-space: nowrap; }
.bk-day__dot { display: none; }
.bk-day[aria-checked="true"] { background: var(--c-ink); color: #fff; box-shadow: 0 14px 30px rgba(0, 8, 15, .18); }
.bk-day[aria-checked="true"] .bk-day__n { color: rgba(255, 255, 255, .8); }
.bk-day:disabled { background: transparent; box-shadow: inset 0 0 0 1px var(--c-line); color: var(--c-muted); cursor: default; }
.bk-day:disabled .bk-day__n { color: var(--c-muted); font-weight: 600; }
.bk-day--today::after { content: ""; position: absolute; top: 9px; right: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--c-accent); }
/* Tidsläget: lediga / få kvar / fullbokat / stängt (fullbokade och stängda dagar går att välja – de visar alternativ) */
.bk-day--available .bk-day__n { color: var(--c-accent-deep); font-weight: 700; }
.bk-day--few .bk-day__n { color: var(--c-ink); font-weight: 800; }
.bk-day--few:not([aria-checked="true"]) { box-shadow: inset 0 0 0 1.5px rgba(0, 125, 123, .35); }
.bk-day--full:not([aria-checked="true"]) { background: repeating-linear-gradient(135deg, var(--c-soft) 0 7px, #F6FAFD 7px 14px); color: var(--c-muted); }
.bk-day--full .bk-day__num, .bk-day--closed .bk-day__num, .bk-day--afterclose .bk-day__num { opacity: .75; }
.bk-day--closed:not([aria-checked="true"]), .bk-day--afterclose:not([aria-checked="true"]) { background: transparent; box-shadow: inset 0 0 0 1px var(--c-line); color: var(--c-muted); }
.bk-day[aria-checked="true"].bk-day--available .bk-day__n { color: var(--c-accent); }
.bk-day--pending:not([aria-checked="true"]) { background: transparent; box-shadow: inset 0 0 0 1px var(--c-line); }
/* Teckenförklaring för markeringarna (bara mobil, där dagarna visar prickar i stället för ord) */
.bk-cal__legend { display: none; }
/* Förfrågan: dagens tidsfönster */
.bk-daywins { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--c-line); }
.bk-daywins__title { font-family: var(--font-display); font-weight: 400; font-size: 1.25rem; line-height: 1.2; }
.bk-daywins__title span { color: var(--c-muted); }
.bk-daywins__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin-top: 12px; }
.bk-daywins__empty { display: grid; justify-items: start; gap: 12px; padding: 20px; border-radius: var(--bk-radius-sm); background: var(--c-soft); font-weight: 600; }
/* Tidsläget: vald dags tider grupperade förmiddag / eftermiddag / kväll */
.bk-daytimes { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--c-line); min-height: 120px; }
.bk-daytimes__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.bk-daytimes__title { font-family: var(--font-display); font-weight: 400; font-size: 1.25rem; line-height: 1.2; }
.bk-daytimes__title span { color: var(--c-muted); }
.bk-daytimes__count { font-size: .8125rem; font-weight: 700; color: var(--c-accent-deep); }
.bk-daytimes__count.is-few { color: var(--c-ink); }
.bk-group { margin-top: 16px; }
.bk-group__label { display: block; margin-bottom: 8px; }
.bk-times { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.bk-time {
  display: grid; place-items: center; align-content: center; gap: 1px; min-height: 52px; padding: 4px 8px;
  border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--c-line-strong); color: var(--c-ink); line-height: 1.1;
  font-weight: 700; font-size: 1rem; font-variant-numeric: tabular-nums;
  animation: bk-rise .45s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 18ms);
  transition: background-color .2s ease, box-shadow .2s ease, color .2s ease, transform .3s var(--ease-out);
}
.bk-time small { font-weight: 600; font-size: .6875rem; color: var(--c-muted); }
.bk-time:hover { background: var(--c-accent); box-shadow: none; transform: translateY(-2px); }
.bk-time:hover small { color: var(--c-ink); }
/* Fullbokad eller stängd dag: vänligt besked, närmaste dagar med tider, återbud/återuppringning och telefon */
.bk-dayempty { position: relative; display: grid; justify-items: start; gap: 10px; margin-top: 14px; padding: clamp(18px, 2vw, 26px); border-radius: var(--bk-radius-sm); background: var(--c-soft); }
.bk-dayempty__title { font-family: var(--font-display); font-weight: 300; font-size: clamp(1.5rem, 1.2rem + .7vw, 1.95rem); line-height: 1.1; letter-spacing: -.012em; }
.bk-dayempty--full .bk-dayempty__title::before { content: ""; display: inline-block; width: .5em; height: .5em; margin-right: .35em; border-radius: 50%; background: repeating-linear-gradient(135deg, var(--c-muted) 0 2px, transparent 2px 4px); box-shadow: 0 0 0 1.5px var(--c-muted); vertical-align: .1em; }
.bk-dayempty__text { font-size: .9375rem; font-weight: 550; line-height: 1.55; max-width: 44em; }
.bk-dayempty__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 6px; }
.bk-dayempty .btn { --btn-h: 44px; padding: 0 22px; }
.bk-dayempty__tel { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 800; font-size: .9375rem; color: var(--c-ink); text-decoration: none; }
.bk-dayempty__tel:hover { text-decoration: underline; text-decoration-color: var(--c-accent); text-decoration-thickness: 2px; }
.bk-dayempty__tel svg { width: 32px; height: 32px; padding: 9px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-pill); }
.bk-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.bk-chip {
  display: grid; gap: 2px; min-height: 52px; min-width: 116px; padding: 8px 18px; border-radius: 18px; background: #fff; box-shadow: var(--shadow-pill);
  text-align: left; line-height: 1.2; color: var(--c-ink); transition: box-shadow .25s ease, transform .3s var(--ease-out);
}
.bk-chip strong { font-weight: 800; font-size: .9375rem; }
.bk-chip span { font-size: .75rem; font-weight: 700; color: var(--c-accent-deep); }
.bk-chip:hover { box-shadow: var(--shadow-float); transform: translateY(-1px); }
.bk-chips--taken { margin-top: 18px; }
.bk-chips--taken .bk-chip { background: var(--c-soft); box-shadow: none; }
.bk-chips--taken .bk-chip:hover { background: var(--c-accent); }

/* Inga tider alls (8 veckor) och felläge (kalendern kunde inte laddas) */
.bk-empty {
  position: relative; display: grid; justify-items: start; gap: 12px; padding: clamp(24px, 3vw, 40px);
  background: #fff; border-radius: var(--radius-card); border-bottom-right-radius: clamp(56px, 7vw, 110px); box-shadow: var(--shadow-card);
  animation: bk-rise .5s var(--ease-out) both;
}
.bk-empty__icon { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--c-hero); color: var(--c-ink); font-weight: 800; font-size: 1.5rem; }
.bk-empty__icon svg { width: 22px; height: 22px; }
.bk-empty--error .bk-empty__icon { background: var(--c-ink); color: #fff; }
.bk-empty__title { font-family: var(--font-display); font-weight: 300; font-size: clamp(1.75rem, 1.3rem + 1.1vw, 2.4rem); line-height: 1.08; letter-spacing: -.012em; text-wrap: balance; }
.bk-empty__title:focus { outline: none; }
.bk-empty__text { font-size: var(--fs-lead); font-weight: 550; line-height: 1.55; max-width: 34em; text-wrap: pretty; }
.bk-empty__actions { display: flex; flex-wrap: wrap; gap: 10px 12px; margin-top: 6px; }
.bk-empty__actions .btn svg { width: 14px; height: 14px; }
.bk-empty__hint { font-size: .9375rem; font-weight: 600; line-height: 1.6; color: var(--c-muted); }
.bk-textbtn { display: inline; min-height: 0; padding: 0; font: inherit; font-weight: 800; color: var(--c-ink); text-decoration: underline; text-decoration-color: var(--c-accent); text-decoration-thickness: 2px; text-underline-offset: .25em; cursor: pointer; }
.bk-textbtn { padding-block: 12px; margin-block: -12px; } /* träffyta ≥ 44 px utan att flytta raden */
.bk-empty__links { font-size: .9375rem; font-weight: 600; color: var(--c-muted); }
.bk-textlink { display: inline-block; padding-block: 12px; margin-block: -12px; font-weight: 800; color: var(--c-ink); text-decoration: underline; text-decoration-color: var(--c-accent); text-decoration-thickness: 2px; text-underline-offset: .25em; }
.bk-empty--request .bk-empty__icon { background: var(--c-hero); }

/* Akutkortet – det enda stället där rött används */
.bk-akut {
  position: relative; padding: clamp(22px, 2.2vw, 32px);
  background: #fff; border-radius: var(--radius-card); box-shadow: var(--shadow-float);
}
.bk-akut__badge { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: var(--fs-label); letter-spacing: .1em; text-transform: uppercase; color: var(--c-emergency); }
.bk-akut__pulse { position: relative; width: 9px; height: 9px; border-radius: 50%; background: var(--c-emergency); }
.bk-akut__pulse::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; background: var(--c-emergency); opacity: 0; animation: bk-pulse 1.8s var(--ease-out) 3; }
.is-bk-closed .bk-akut__pulse::after { animation: none; }
/* Två lägen: öppet (ring oss / tider idag) och stängt (1177 först). Utan JS visas öppet-läget. */
.bk-akut__closed { display: none; }
.is-bk-closed .bk-akut__open { display: none; }
.is-bk-closed .bk-akut__closed { display: block; }
@keyframes bk-pulse { 0% { transform: scale(.4); opacity: .45; } 80%, 100% { transform: scale(1.6); opacity: 0; } }
.bk-akut__title { margin-top: 12px; font-family: var(--font-display); font-weight: 300; font-size: clamp(1.75rem, 1.3rem + 1vw, 2.3rem); line-height: 1.08; letter-spacing: -.012em; text-wrap: balance; }
.bk-akut__title:has(br) { text-wrap: pretty; } /* med <br> balanseras inte andra raden – pretty undviker ett ensamt "nu" */
.bk-akut__sub { margin-top: 10px; font-size: .9375rem; line-height: 1.55; color: var(--c-muted); }
.bk-akut__status { margin-top: 14px; font-weight: 700; font-size: .875rem; }
.bk-akut__status:empty { display: none; }
.bk-akut__call { display: flex; width: 100%; min-height: 66px; margin-top: 14px; padding: 10px 24px 10px 14px; box-shadow: inset 0 0 0 1.5px var(--c-line); }
.bk-akut__call:hover { box-shadow: var(--shadow-float); }
.bk-akut__call .emergency-pill__icon { width: 36px; height: 36px; }
.bk-akut__call .emergency-pill__icon svg { width: 15px; height: 15px; }
.bk-akut__call .emergency-pill__label { font-size: .6875rem; }
.bk-akut__call .emergency-pill__number { font-size: 1.25rem; }
.bk-akut__after { margin-top: 14px; padding: 12px 14px; border-radius: 16px; background: var(--c-soft); font-size: .875rem; font-weight: 550; line-height: 1.5; }
.bk-akut__after a { display: inline-block; padding: 12px 2px; margin: -12px 0; font-weight: 800; text-decoration-color: var(--c-accent); text-decoration-thickness: 2px; text-underline-offset: .2em; white-space: nowrap; }
.bk-akut__closed .bk-akut__sub { margin-top: 12px; }
/* Tidsläget: lediga akuttider idag (och de första akuttiderna när det är stängt) */
.bk-akut__times { margin-top: 14px; }
.bk-akut__times-label { margin-bottom: 8px; font-size: .8125rem; font-weight: 700; }
.bk-akut__row { display: flex; flex-wrap: wrap; gap: 8px; }
.bk-akut__time {
  display: inline-grid; place-items: center; align-content: center; min-width: 64px; min-height: 48px; padding: 4px 12px;
  border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--c-line-strong); color: var(--c-ink); line-height: 1.05;
  font-weight: 700; font-size: 1rem; font-variant-numeric: tabular-nums; transition: background-color .2s ease, box-shadow .2s ease;
}
.bk-akut__time small { display: block; font-size: .625rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--c-muted); }
.bk-akut__time:hover { background: var(--c-emergency-soft); box-shadow: inset 0 0 0 1.5px var(--c-emergency); }

.bk-akut__switch { display: none; }
.bk-trust { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 26px; }
.bk-trust li { display: flex; align-items: center; gap: 10px; font-size: .875rem; font-weight: 600; line-height: 1.35; }
.bk-trust .check-list__icon { width: 22px; height: 22px; flex: none; margin: 0; color: var(--c-ink); }
.bk-trust .check-list__icon svg { width: 11px; height: 11px; }

/* Dialog: dina uppgifter → bekräfta → klart (eller ärlig reserv) */
.bk-dialog {
  padding: 0; border: 0; color: var(--c-ink);
  width: min(980px, calc(100% - 48px)); max-width: none; max-height: calc(100dvh - 48px);
  border-radius: 36px; background: #fff; box-shadow: 0 40px 120px rgba(0, 20, 40, .28);
  overflow: auto; overscroll-behavior: contain;
}
.bk-dialog[open] { animation: bk-dlg-in .55s var(--ease-out) both; }
.bk-dialog::backdrop { background: rgba(0, 8, 15, .38); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
@keyframes bk-dlg-in { from { opacity: 0; transform: translateY(26px) scale(.97); } to { opacity: 1; transform: none; } }
html.bk-locked, html.bk-locked body { overflow: hidden; }
.bk-dialog__inner { padding: clamp(16px, 2vw, 22px); }
.bk-dialog__top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 4px 4px 16px 10px; }
.bk-dialog__close { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--c-soft); flex: none; transition: background-color .25s ease, color .25s ease; }
.bk-dialog__close:hover { background: var(--c-ink); color: #fff; }
.bk-dialog__close svg { width: 15px; height: 15px; }
.bk-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.bk-steps li { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: var(--fs-label); letter-spacing: .09em; text-transform: uppercase; color: var(--c-muted); }
.bk-steps li + li::before { content: ""; width: 22px; height: 1px; background: var(--c-line-strong); margin-right: 2px; }
.bk-steps > li > span:first-child { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 1.5px var(--c-line-strong); font-size: .75rem; transition: background-color .3s ease, color .3s ease; }
.bk-steps li.is-done > span:first-child { background: var(--c-accent); color: var(--c-ink); box-shadow: none; }
.bk-steps li.is-current { color: var(--c-ink); }
.bk-steps li.is-current > span:first-child { background: var(--c-ink); color: #fff; box-shadow: none; }
.bk-steps__txt { font-style: normal; }
.bk-dialog__body { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(18px, 2.4vw, 36px); align-items: stretch; }

.bk-summary {
  position: relative; display: flex; flex-direction: column; align-items: flex-start;
  padding: clamp(22px, 2.6vw, 36px); border-radius: 26px; border-bottom-right-radius: clamp(70px, 9vw, 130px);
  background: linear-gradient(140deg, var(--c-hero-light), var(--c-hero) 60%);
}
.bk-summary__day { margin-top: 14px; font-weight: 700; font-size: 1.0625rem; }
.bk-summary__time { margin-top: 4px; font-family: var(--font-display); font-weight: 300; font-size: clamp(3rem, 2.3rem + 2.4vw, 4.6rem); line-height: 1; letter-spacing: -.025em; font-variant-numeric: lining-nums; }
.bk-summary__time.is-text { font-size: clamp(2.4rem, 1.9rem + 1.8vw, 3.5rem); line-height: 1.05; }
.bk-summary__range { margin-top: 8px; font-weight: 700; font-size: .9375rem; color: var(--c-ink); }
.bk-summary__list { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 10px; font-size: .9375rem; font-weight: 600; }
.bk-summary__list li { display: grid; grid-template-columns: 30px 1fr; align-items: center; gap: 10px; }
.bk-summary__list svg { width: 30px; height: 30px; padding: 8px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-pill); }
.bk-summary__note { display: flex; gap: 10px; align-items: flex-start; margin-top: 20px; font-size: .8125rem; font-weight: 600; line-height: 1.5; }
.bk-summary__note .icon { width: 16px; height: 16px; margin-top: 2px; color: var(--c-accent-deep); }
.bk-summary__change {
  margin-top: auto; padding-top: 18px; min-height: 44px;
  font-weight: 700; font-size: var(--fs-label); letter-spacing: .09em; text-transform: uppercase;
  text-decoration: underline; text-decoration-color: var(--c-accent); text-decoration-thickness: 2px; text-underline-offset: .35em;
}

.bk-step { padding: clamp(6px, 1.4vw, 20px) clamp(4px, 1.6vw, 24px) clamp(8px, 1.6vw, 20px); animation: bk-step-in .5s var(--ease-out) both; }
@keyframes bk-step-in { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
.bk-step__title { font-family: var(--font-display); font-weight: 300; font-size: clamp(1.9rem, 1.5rem + 1.3vw, 2.6rem); line-height: 1.08; letter-spacing: -.012em; text-wrap: balance; }
.bk-step__title:focus { outline: none; }
.bk-step__lead { margin-top: 10px; font-size: var(--fs-lead); font-weight: 550; text-wrap: pretty; }

.bk-form { margin-top: 20px; display: grid; gap: 14px; }
.bk-form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.bk-form .field, .callback__form .field { align-content: start; } /* felmeddelande under ett fält sträcker inte grannfälten i raden */
.bk-form .field input { font-size: 1.0625rem; min-height: 54px; }
.bk-form .field textarea { min-height: 96px; }
/* Sajtens :user-invalid ger röd kant – här visas fel i svart med text (rött = bara akut) */
.bk-form .field input:user-invalid, .bk-form .field textarea:user-invalid,
.callback__form .field input:user-invalid, .callback__form .field textarea:user-invalid { border-color: var(--c-line-control); }
.bk-form .field input[aria-invalid="true"], .bk-form .field textarea[aria-invalid="true"], .bk-select--field select[aria-invalid="true"],
.callback__form .field input[aria-invalid="true"], .callback__form .field textarea[aria-invalid="true"] { border-color: var(--c-ink); border-width: 2px; }
.bk-select--field { display: flex; width: 100%; }
.bk-select--field select { width: 100%; min-height: 54px; border-radius: 16px; border: 1px solid var(--c-line-control); box-shadow: none; font-weight: 600; font-size: 1rem; padding-left: 18px; }
.bk-select--field select:hover { box-shadow: none; border-color: var(--c-ink); }
.bk-select--field select:focus-visible { outline: none; border-color: var(--c-ink); box-shadow: 0 0 0 4px rgba(18, 221, 218, .25); }
.bk-opt { font-weight: 600; color: var(--c-muted); }
.bk-hint { font-size: .8125rem; color: var(--c-muted); line-height: 1.45; }
.bk-err { display: none; align-items: center; gap: 8px; font-size: .875rem; font-weight: 700; line-height: 1.4; }
.bk-err:not(:empty) { display: flex; }
.bk-err:not(:empty)::before { content: "!"; width: 20px; height: 20px; border-radius: 50%; background: var(--c-ink); color: #fff; display: grid; place-items: center; font-size: .75rem; flex: none; }
.bk-check { position: relative; display: flex; align-items: flex-start; gap: 12px; min-height: 44px; padding-top: 10px; font-weight: 600; font-size: .9375rem; line-height: 1.4; cursor: pointer; }
.bk-check input { position: absolute; left: 0; top: 10px; opacity: 0; width: 24px; height: 24px; margin: 0; }
.bk-check__box { width: 24px; height: 24px; border-radius: 8px; flex: none; display: grid; place-items: center; box-shadow: inset 0 0 0 2px var(--c-line-control); color: transparent; background: #fff; transition: background-color .2s ease, box-shadow .2s ease, color .2s ease; }
.bk-check__box svg { width: 11px; height: 11px; }
.bk-check input:checked + .bk-check__box { background: var(--c-accent); box-shadow: none; color: var(--c-ink); }
.bk-check input:focus-visible + .bk-check__box { outline: 2px solid var(--c-ink); outline-offset: 3px; }
.bk-check input[aria-invalid="true"] + .bk-check__box { box-shadow: inset 0 0 0 2px var(--c-ink); }
.bk-consent { display: grid; gap: 2px; }
.bk-consent__link { justify-self: start; margin-left: 36px; display: inline-flex; align-items: center; min-height: 44px; font-size: .8125rem; font-weight: 700; text-decoration-color: var(--c-accent); text-decoration-thickness: 2px; text-underline-offset: .25em; }
.bk-more { border-radius: 18px; background: var(--c-soft); }
.bk-more summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 0 18px; cursor: pointer; font-weight: 700; font-size: .9375rem; }
.bk-more summary::-webkit-details-marker { display: none; }
.bk-more summary em { font-style: normal; font-weight: 600; color: var(--c-muted); }
.bk-more summary .icon { width: 10px; height: 10px; transition: transform .3s var(--ease-out); flex: none; }
.bk-more[open] summary .icon { transform: rotate(180deg); }
.bk-more summary:focus-visible { outline: 2px solid var(--c-ink); outline-offset: 2px; border-radius: 18px; }
.bk-more__body { display: grid; gap: 12px; padding: 0 18px 18px; }
.bk-more .bk-select--field select, .bk-more .field textarea { background: #fff; }
.bk-hp { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.bk-form__submit { width: 100%; margin-top: 4px; gap: 12px; font-size: .8125rem; }
.bk-spinner { display: none; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(0, 8, 15, .3); border-top-color: var(--c-ink); animation: bk-spin .7s linear infinite; }
.bk-form__submit.is-loading .bk-spinner { display: block; }
.bk-form__submit:disabled, .bk-form__submit[aria-disabled="true"], .callback__form [aria-disabled="true"] { cursor: progress; }
.bk-offline { display: flex; gap: 12px; align-items: flex-start; margin-top: 14px; padding: 12px 16px; border-radius: 16px; background: var(--c-soft); font-size: .9375rem; font-weight: 600; line-height: 1.5; }
.bk-offline .icon { width: 16px; height: 16px; flex: none; margin-top: 3px; }
.bk-offline a { font-weight: 800; white-space: nowrap; }
.bk-check--nervos { padding-top: 0; }
.bk-check--nervos input { top: 0; }
.bk-copy { display: inline; min-height: 0; padding: 0; font: inherit; font-weight: 800; color: var(--c-ink); text-decoration: underline; text-decoration-color: var(--c-accent); text-decoration-thickness: 2px; text-underline-offset: .25em; cursor: pointer; }
.bk-copied { margin-top: 8px; font-size: .875rem; font-weight: 700; }
.bk-copied:empty { display: none; }
@keyframes bk-spin { to { transform: rotate(360deg); } }
.bk-formerr { display: grid; justify-items: start; gap: 6px; padding: 12px 16px; border-radius: 14px; background: var(--c-soft); font-size: .9375rem; font-weight: 700; line-height: 1.45; }
.bk-formerr .bk-summary__change { margin: 0; padding: 0; }
.bk-formerr:focus { outline: none; }
.bk-privacy { display: flex; gap: 10px; align-items: flex-start; font-size: .8125rem; color: var(--c-muted); line-height: 1.5; }
.bk-privacy .icon { width: 15px; height: 15px; flex: none; margin-top: 2px; color: var(--c-accent-deep); }
.bk-alt { font-size: .875rem; font-weight: 600; line-height: 1.9; margin-top: -4px; }
.bk-alt--sum { margin-top: 18px; }
.bk-alt--form { display: none; }
[data-bk-step="fallback"] .bk-done__actions .btn { width: 100%; }
.bk-alt a, .bk-next a, .bk-note a, .bk-demo-note a { font-weight: 800; text-decoration-color: var(--c-accent); text-decoration-thickness: 2px; text-underline-offset: .25em; }
/* Textlänkar i löptext: träffyta ≥ 44 px utan att raden flyttas */
.bk-alt a, .bk-next a, .bk-demo-note a, .bk-card__sub a, .bk-offline a, .bk-info a, .bk-akutnote a { display: inline-block; padding-block: 12px; margin-block: -12px; }
.bk-alt a[href^="tel:"], .bk-next a[href^="tel:"], .bk-akutnote a[href^="tel:"], .bk-demo-note a[href^="tel:"] { white-space: nowrap; }
.bk-ref { margin-top: 12px; font-size: .9375rem; color: var(--c-muted); }
.bk-ref strong { color: var(--c-ink); font-weight: 800; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.bk-done { width: 64px; height: 64px; margin-bottom: 18px; }
.bk-done circle { fill: var(--c-accent); transform-origin: center; animation: bk-pop .6s var(--ease-out) both; }
.bk-done path { fill: none; stroke: var(--c-ink); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 44; stroke-dashoffset: 44; animation: bk-draw .55s .3s var(--ease-out) forwards; }
@keyframes bk-pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes bk-draw { to { stroke-dashoffset: 0; } }
.bk-fallback__icon { width: 64px; height: 64px; margin-bottom: 18px; border-radius: 50%; display: grid; place-items: center; background: var(--c-ink); color: #fff; font-weight: 800; font-size: 1.75rem; }
.bk-done__actions { margin-top: 24px; }
.bk-done__cal { margin-top: 22px; }
.bk-next { list-style: none; margin: 24px 0 8px; padding: 18px 0 0; border-top: 1px solid var(--c-line); display: grid; gap: 10px; font-size: .9375rem; font-weight: 550; }
.bk-next:empty { display: none; }
.bk-next li { display: flex; align-items: center; gap: 12px; }
.bk-next__n { width: 26px; height: 26px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--c-soft); font-weight: 800; font-size: .75rem; }
.bk-note { margin-top: 16px; font-size: .8125rem; color: var(--c-muted); line-height: 1.55; }
.bk-back { margin-top: 12px; padding-top: 0; }
/* Bekräfta: sammanställning av tid och uppgifter */
.bk-review { margin: 18px 0 0; border-top: 1px solid var(--c-line); }
.bk-review > div { display: grid; grid-template-columns: minmax(7.5em, 9em) minmax(0, 1fr); gap: 4px 14px; padding: 10px 0; border-bottom: 1px solid var(--c-line); }
.bk-review dt { padding-top: .2em; font-weight: 700; font-size: var(--fs-label); letter-spacing: .09em; text-transform: uppercase; color: var(--c-muted); }
.bk-review dd { margin: 0; font-weight: 650; font-size: .9375rem; line-height: 1.45; overflow-wrap: anywhere; }
.bk-edit { margin-top: 4px; padding-top: 0; }
.bk-review-actions { display: flex; flex-wrap: wrap; gap: 0 24px; }
.bk-only-mobile { display: none; }
.bk-demo-note { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0 0; padding: 12px 16px; border-radius: 16px; border: 1.5px dashed rgba(0, 8, 15, .25); background: var(--c-soft); font-size: .875rem; font-weight: 650; line-height: 1.5; }
.bk-demo-note .icon { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--c-accent-deep); }
.bk-demo-note--done { margin-top: 18px; }
.bk-hold { margin-top: 12px; font-size: .875rem; font-weight: 700; color: var(--c-accent-deep); }
[data-bk-step="confirm"] .bk-form__submit { margin-top: 18px; }
[data-bk-step="confirm"] .bk-formerr { margin-top: 12px; }
[data-bk-step="confirm"] .bk-privacy { margin-top: 14px; }

/* Återuppringning (#contact-us) – sekundärt alternativ, samma endpoint (type: 'callback') */
.callback { margin-top: 16px; }
.callback__toggle {
  width: 100%; min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 28px; border-radius: 999px; background: rgba(255, 255, 255, .7); color: var(--c-ink);
  font-weight: 700; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; text-align: left;
  box-shadow: inset 0 0 0 1.5px rgba(0, 8, 15, .08); transition: background-color .25s ease, box-shadow .25s ease;
}
.callback__toggle:hover { background: #fff; box-shadow: var(--shadow-pill); }
.callback__toggle svg { width: 12px; height: 12px; flex: none; transition: transform .35s var(--ease-out); }
.callback__toggle[aria-expanded="true"] { background: #fff; }
.callback__toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.panel + .booking .callback__toggle { background: var(--c-white); }
.panel + .booking .callback__toggle:hover, .panel + .booking .callback__toggle[aria-expanded="true"] { background: var(--c-soft); box-shadow: none; }
.callback__panel { overflow: hidden; }
.callback__ctx { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: 16px; background: var(--c-soft); font-size: .9375rem; font-weight: 650; line-height: 1.5; }
.callback__ctx .icon { width: 16px; height: 16px; flex: none; margin-top: 3px; color: var(--c-accent-deep); }
.callback__form[data-ctx="demo"] .callback__ctx { border: 1.5px dashed rgba(0, 8, 15, .25); }
.callback__form {
  margin-top: 12px; background: #fff; border-radius: var(--radius-card); box-shadow: var(--shadow-card);
  padding: clamp(22px, 3vw, 40px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 20px;
}
.callback__form .field--full { grid-column: 1 / -1; }
.callback__form textarea { min-height: 96px; }
.callback__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; }
.callback__notes { font-size: .875rem; color: var(--c-muted); line-height: 1.5; }
.callback__form .form__status a { font-weight: 800; text-decoration-color: var(--c-accent); text-decoration-thickness: 2px; }
.callback__form .form__status[data-state="error"] { color: var(--c-ink); }
.callback__form .form__status[data-state="error"]:not(:empty)::before { content: "!"; display: inline-grid; place-items: center; width: 20px; height: 20px; margin-right: 8px; border-radius: 50%; background: var(--c-ink); color: #fff; font-size: .75rem; vertical-align: 1px; }

/* 1280–1439: smalare kort – pilen flyttar upp i etikettraden så att dagen/tiden får hela bredden */
@media (min-width: 1280px) and (max-width: 1439px) {
  .bk-card { padding: 16px 14px 14px; }
  .bk-card__main { grid-template-areas: "top go" "day day" "hint hint"; }
  .bk-card__top { flex-direction: column; gap: 0; } /* datumet under etiketten i alla tre kort (lika höjd) */
  .bk-card__go { width: 40px; height: 40px; }
  .bk-card__day, .bk-card__time { margin-top: 4px; }
  .bk-win { padding-inline: 12px 10px; }
  .bk-pill { min-width: 54px; padding-inline: 10px; }
  /* "Välj tid för" ryms inte bredvid två listor här – etiketten finns kvar för skärmläsare */
  .bk-builder--slots .bk-builder__title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (max-width: 1099px) {
  .booking__meta { justify-items: start; text-align: left; }
}
/* ≤ 1279 (surfplatta, smal dator): byggaren först (samma ordning som i DOM), akutkortet som band under */
@media (max-width: 1279px) {
  .bk-stage { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-template-areas: "app" "akut" "trust"; row-gap: 22px; }
  .bk-akut { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); column-gap: 28px; align-items: center; }
  .bk-akut__badge { grid-column: 1; }
  .bk-akut__open, .is-bk-closed .bk-akut__closed { display: contents; }
  .is-bk-closed .bk-akut__open { display: none; }
  .bk-akut__open > *, .bk-akut__closed > * { grid-column: 1; }
  .bk-akut .bk-akut__call, .bk-akut .bk-akut__after { grid-column: 2; }
  .bk-akut .bk-akut__call { grid-row: 1 / span 3; align-self: center; margin-top: 0; }
  .bk-akut .bk-akut__after { grid-row: 4 / span 2; align-self: start; }
  .bk-daywins__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 768px) and (max-width: 1099px) {
  .bk-card { padding: 16px 14px 14px; }
  .bk-card__go { width: 40px; height: 40px; }
  .bk-win { padding-inline: 12px 10px; font-size: .8125rem; }
  .bk-pill { min-width: 54px; padding-inline: 10px; }
  /* två listor + "Alla tider" på en rad; etiketten "Välj tid för" finns kvar för skärmläsare */
  .bk-builder--slots .bk-builder__title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
/* Mobil: kompakta kort (dag/tid + pil i en rad), dialogen blir ett ark nedifrån */
@media (max-width: 767px) {
  .booking__head { margin-bottom: 16px; gap: 10px; }
  .booking__title-row { gap: 8px 14px; }
  /* Mobil: kortare huvud så att snabbkorten syns direkt efter "Boka tid" (ingressen står även i trygghetsraden) */
  .booking__lead { display: none; }
  .booking__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0 14px; }
  .booking__call { font-size: .875rem; }
  .bk-builder--slots .bk-builder__title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .bk-builder__head { margin-bottom: 12px; }
  /* Andra sidor än Akuttandvård: genväg till akuttider idag i den kompakta akutraden */
  .booking:not([data-behandling="akuttandvard"]).has-bk-akut-today .bk-akut__switch {
    display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 44px; margin-top: 8px; padding: 4px 4px 4px 14px;
    border-radius: 999px; background: var(--c-emergency-soft); color: var(--c-ink); font-weight: 800; font-size: .75rem; letter-spacing: .07em; text-transform: uppercase; text-align: left;
  }
  .bk-akut__switch svg { width: 36px; height: 36px; padding: 11px; border-radius: 50%; background: #fff; flex: none; }
  /* Scenen går nästan kant i kant på mobil (mer plats för tiderna) */
  .panel + .booking .bk-stage { margin-inline: calc(12px - var(--pad-inline)); padding: 14px 12px 18px; border-radius: 28px; border-bottom-right-radius: 72px; }
  .bk-stage { row-gap: 18px; }
  .bk-akut { display: block; padding: 18px 18px 16px; }
  .bk-akut__open { display: block; }
  .is-bk-closed .bk-akut__closed { display: block; }
  .bk-akut__title { font-size: 1.5rem; margin-top: 8px; }
  .bk-akut__sub { margin-top: 6px; font-size: .875rem; }
  .bk-akut__status { margin-top: 6px; font-size: .8125rem; }
  .bk-akut .bk-akut__call { margin-top: 12px; min-height: 60px; }
  .bk-akut__after { margin-top: 10px; padding: 10px 12px; font-size: .8125rem; }
  /* Kompakt akutrad under byggaren (fullt kort bara på /akuttandvard/) */
  .booking:not([data-behandling="akuttandvard"]) .bk-akut { padding: 14px 14px 12px; border-radius: 24px; box-shadow: var(--shadow-card); }
  .booking:not([data-behandling="akuttandvard"]) .bk-akut__title,
  .booking:not([data-behandling="akuttandvard"]) .bk-akut__sub,
  .booking:not([data-behandling="akuttandvard"]) .bk-akut__times,
  .booking:not([data-behandling="akuttandvard"]) .bk-akut__open .bk-akut__after { display: none; }
  .booking:not([data-behandling="akuttandvard"]) .bk-akut__badge { font-size: .6875rem; }
  .booking:not([data-behandling="akuttandvard"]) .bk-akut .bk-akut__call { margin-top: 8px; min-height: 56px; }
  .booking:not([data-behandling="akuttandvard"]) .bk-akut__after { margin-top: 8px; }
  /* Två kort räcker på mobil – fler dagar finns under "Alla tider" */
  .bk-cards > li:nth-child(n+3) { display: none; }
  .bk-builder__head { gap: 10px; }
  .bk-builder__title { width: 100%; }
  .bk-select { flex: 1 1 200px; }
  .bk-select select { width: 100%; }
  .bk-alldays { margin-left: 0; }
  .bk-cards { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .bk-card { padding: 12px 12px 12px 16px; border-radius: 24px; }
  .bk-card__main { grid-template-areas: "top go" "day go"; }
  .bk-card__day { margin-top: 0; font-size: 1.55rem; }
  .bk-card--call .bk-card__main { grid-template-areas: "top go" "day go" "hint hint"; }
  .bk-card:not(.bk-card--call):not(.bk-card--single) .bk-card__hint { display: none; }
  .bk-card__go { width: 44px; height: 44px; }
  /* Tidsläget: etikett och tandläkare till vänster, stor tid + pil till höger */
  .bk-cards--slots .bk-card { padding: 14px 12px 12px 16px; }
  .bk-cards--slots .bk-card__main { grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "top time go" "who time go"; column-gap: 12px; }
  .bk-cards--slots .bk-card__main .bk-card__top { flex-direction: column; gap: 0; align-self: end; }
  .bk-cards--slots .bk-card__time { grid-area: time; margin-top: 0; font-size: 2.35rem; }
  .bk-cards--slots .bk-card__who { grid-area: who; margin-top: 2px; align-self: start; }
  .bk-cards--slots .bk-card__go { grid-area: go; }
  /* Ringkortet (akut idag utan tider / stängt → 1177): egen mall – rubrik, datum och förklaring får egna rader */
  .bk-cards--slots .bk-card--call .bk-card__main { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "top go" "day go" "hint hint"; column-gap: 12px; }
  .bk-cards--slots .bk-card--call .bk-card__main .bk-card__top { flex-direction: row; gap: 2px 10px; align-self: end; }
  .bk-cards--slots .bk-card--call .bk-card__day { margin-top: 2px; }
  .bk-cards--slots .bk-card--call .bk-card__hint { margin-top: 8px; font-size: .8125rem; line-height: 1.45; }
  /* Hela veckan tom: allt i en kolumn */
  .bk-card--week { grid-template-columns: minmax(0, 1fr); padding: 16px 16px 18px; border-bottom-right-radius: 64px; }
  .bk-card--week .bk-card__acts { grid-column: 1; grid-row: auto; margin-top: 14px; }
  .bk-card--week .bk-card__acts .btn { width: 100%; }
  .bk-card--week .bk-card__empty { font-size: 1.55rem; }
  .bk-card--merged { padding-block: 14px; }
  .bk-card--merged .bk-card__top { flex-direction: row; }
  .bk-card--merged .bk-card__empty { margin-top: 4px; font-size: 1.3rem; }
  .bk-pills { margin-top: 10px; padding-top: 10px; }
  .bk-pill { flex: 1 1 0; min-width: 0; max-width: calc(33.333% - 4px); }
  .bk-pill--more { flex: 0 0 auto; min-width: 52px; }
  .bk-card--empty .bk-card__empty { margin-top: 6px; font-size: 1.4rem; }
  .bk-card__next { margin-top: 12px; }
  .bk-wins { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 10px; padding-top: 10px; }
  .bk-wins .bk-win { flex-direction: column; justify-content: center; gap: 1px; min-height: 50px; padding: 5px 4px; border-radius: 16px; text-align: center; font-size: .8125rem; }
  .bk-wins .bk-win:only-child { grid-column: 1 / -1; }
  .bk-asap { gap: 10px; }
  .bk-asap__main { font-size: .9375rem; }
  .bk-cal { padding: 16px 6px 30px; border-bottom-right-radius: 44px; } /* inre paneler (Fullbokat, Stängt) möter inte den stora kurvan */
  .bk-cal__head { padding-inline: 8px; }
  .bk-week { width: 100%; justify-content: space-between; }
  .bk-week__label { min-width: 0; text-wrap: balance; }
  .bk-days { gap: 3px; }
  .bk-day { min-height: 66px; padding: 8px 2px; border-radius: 14px; }
  /* Teckenförklaring under veckoremsan */
  .bk-builder--slots .bk-cal__legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 10px 8px 0; font-size: .75rem; font-weight: 600; color: var(--c-muted); }
  .bk-lg { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-left: 6px; vertical-align: middle; }
  .bk-lg:first-child { margin-left: 0; }
  .bk-lg--available { background: var(--c-accent-deep); }
  .bk-lg--few { box-shadow: inset 0 0 0 2px var(--c-accent-deep); }
  .bk-lg--full { width: 12px; height: 2px; border-radius: 2px; background: var(--c-muted); }
  .bk-lg--closed { width: 12px; height: 10px; border-radius: 4px; box-shadow: inset 0 0 0 1px var(--c-line-strong); }
  .bk-day__num { font-size: 1.3rem; }
  .bk-day__n { font-size: .625rem; }
  .bk-day:not(:disabled) .bk-day__n { display: none; }
  .bk-day__word { display: none; }
  .bk-day--today::after { top: 6px; right: 6px; width: 5px; height: 5px; }
  /* Tidsläget på mobil: en liten markering i stället för text (skärmläsare får hela beskedet i aria-label) */
  .bk-builder--slots .bk-day__dot { display: block; width: 7px; height: 7px; margin-top: 3px; border-radius: 50%; }
  .bk-day--available .bk-day__dot { background: var(--c-accent-deep); }
  .bk-day--few .bk-day__dot { box-shadow: inset 0 0 0 2px var(--c-accent-deep); }
  .bk-day--full .bk-day__dot { width: 12px; height: 2px; border-radius: 2px; background: var(--c-muted); margin-top: 5px; }
  .bk-day--closed .bk-day__dot, .bk-day--afterclose .bk-day__dot { background: transparent; }
  .bk-day[aria-checked="true"].bk-day--available .bk-day__dot { background: var(--c-accent); }
  .bk-day[aria-checked="true"].bk-day--few .bk-day__dot { box-shadow: inset 0 0 0 2px var(--c-accent); }
  .bk-day[aria-checked="true"].bk-day--full .bk-day__dot { background: rgba(255, 255, 255, .7); }
  .bk-day--full:not([aria-checked="true"]) { background: repeating-linear-gradient(135deg, #D5E6F3 0 5px, #F3F8FC 5px 10px); }
  .bk-daywins__grid { grid-template-columns: minmax(0, 1fr); }
  .bk-times { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .bk-time { min-height: 50px; }
  .bk-dayempty { padding: 16px; }
  .bk-chip { flex: 1 1 calc(50% - 4px); min-width: 0; max-width: calc(50% - 4px); }
  .bk-sm-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .bk-empty { padding: 22px 18px 26px; border-bottom-right-radius: 64px; }
  .bk-empty__actions { display: grid; width: 100%; }
  .bk-empty__actions .btn { width: 100%; }
  .bk-dayempty .btn { flex: 1 1 100%; }
  .bk-trust { flex-direction: column; gap: 10px; }

  .bk-dialog { width: 100%; max-height: calc(100dvh - 12px); margin: auto 0 0; border-radius: 28px 28px 0 0; }
  .bk-dialog[open] { animation: bk-sheet-in .5s var(--ease-out) both; }
  @keyframes bk-sheet-in { from { transform: translateY(40%); opacity: 0; } to { transform: none; opacity: 1; } }
  .bk-dialog__inner { padding: 14px 14px calc(20px + env(safe-area-inset-bottom)); }
  .bk-dialog__top { padding: 2px 2px 12px 6px; }
  .bk-steps li:not(.is-current) .bk-steps__txt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .bk-steps li + li::before { width: 12px; }
  .bk-dialog__body { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .bk-summary { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "kind kind" "time time" "day day" "range range" "list list" "note note" "chg chg"; column-gap: 16px; padding: 18px 20px; border-bottom-right-radius: 64px; }
  .bk-summary > .bk-label { grid-area: kind; }
  .bk-summary__time { grid-area: time; font-size: 2.5rem; margin-top: 4px; }
  .bk-summary__time.is-text { font-size: 2.1rem; }
  .bk-summary__day { grid-area: day; margin-top: 6px; font-size: .9375rem; line-height: 1.35; }
  .bk-summary__range { grid-area: range; margin-top: 2px; }
  .bk-summary__list { grid-area: list; margin-top: 12px; gap: 6px; font-size: .875rem; }
  .bk-summary__list li:nth-child(3) { display: none; } /* adressen: bara på större skärm (finns i klart-steget) */
  .bk-dialog:not([data-flow="slot"]) .bk-summary__list li:nth-child(2) { display: none; } /* förfrågan: tandläkarönskemål bara på större skärm */
  .bk-summary__list li { grid-template-columns: 26px 1fr; }
  .bk-summary__list svg { width: 26px; height: 26px; padding: 7px; }
  .bk-summary__note { grid-area: note; margin-top: 12px; }
  .bk-summary__change { grid-area: chg; justify-self: start; padding-top: 6px; }
  .bk-dialog[data-step="done"] .bk-summary, .bk-dialog[data-step="confirm"] .bk-summary { display: none; } /* bekräfta/klart: allt står i steget */
  /* Uppgifter (vald tid): sammanfattningen blir en rad – Namn och Telefon syns direkt */
  .bk-dialog[data-flow="slot"][data-step="form"] .bk-summary { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "kind kind kind" "time day chg"; align-items: center; column-gap: 12px; padding: 12px 14px 12px 18px; border-radius: 22px; border-bottom-right-radius: 22px; }
  .bk-dialog[data-flow="slot"][data-step="form"] .bk-summary__time { font-size: 1.85rem; margin-top: 2px; }
  .bk-dialog[data-flow="slot"][data-step="form"] .bk-summary__day { margin-top: 2px; font-size: .8125rem; }
  .bk-dialog[data-flow="slot"][data-step="form"] .bk-summary__range,
  .bk-dialog[data-flow="slot"][data-step="form"] .bk-summary__list,
  .bk-dialog[data-flow="slot"][data-step="form"] .bk-summary__note { display: none; }
  .bk-dialog[data-flow="slot"][data-step="form"] .bk-summary__change { padding-top: 0; margin: 0; }
  .bk-dialog[data-flow="slot"][data-step="form"] .bk-dialog__body { gap: 12px; }
  .bk-alt--sum { display: none; }
  .bk-alt--form { display: grid; gap: 8px; margin-top: 0; line-height: 1.4; }
  .bk-alt--form > span { display: grid; gap: 4px; }
  .bk-alt--form a { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 16px; border-radius: 999px; background: var(--c-soft); text-decoration: none; }
  .bk-step { padding: 4px 6px; }
  .bk-form { margin-top: 18px; gap: 14px; }
  .bk-form__row { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .bk-done__actions .btn, .bk-done__cal .btn { width: 100%; }
  .bk-review > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .bk-only-mobile { display: inline-flex; align-items: center; }
  .callback__form { grid-template-columns: minmax(0, 1fr); }
  .callback__toggle { border-radius: 24px; padding: 14px 20px; }
}
/* Smal mobil: en stängd dag utan särskild orsak döljs i veckoremsan så att varje dag blir ≥ 44 px bred */
@media (max-width: 400px) {
  .bk-builder--slots .bk-days { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 3px; }
  .bk-builder--slots .bk-day--sunoff { display: none; }
}
/* Öppet alla sju dagar (söndag 10–15 sedan 2026-10-08): remsan tar de inre marginalerna i anspråk (12 + 6 px finns) så att
   sju dagar blir ≥ 44 px breda vid 360 px – utan att resten av bokningen trängs */
@media (max-width: 389px) {
  .bk-builder--slots .bk-days { margin-inline: -14px; gap: 2px; }
}
@media (max-width: 340px) {
  .panel + .booking .bk-stage { padding-inline: 6px; }
  .bk-cal { padding-inline: 2px; }
  .bk-builder--slots .bk-days { margin-inline: -6px; gap: 2px; }
}
/* Mobil på tvären (t.ex. 844×390): dialogen i en kolumn med kompakt sammanfattning, så att formuläret syns direkt */
@media (min-width: 768px) and (max-height: 560px) {
  .bk-dialog { max-height: calc(100dvh - 16px); border-radius: 24px; }
  .bk-dialog__inner { padding: 10px 16px 16px; }
  .bk-dialog__top { padding-bottom: 8px; }
  .bk-dialog__body { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .bk-summary { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "kind kind kind" "time day chg"; align-items: center; column-gap: 14px; padding: 12px 18px; border-radius: 20px; }
  .bk-summary > .bk-label { grid-area: kind; }
  .bk-summary__time { grid-area: time; font-size: 1.9rem; margin-top: 2px; }
  .bk-summary__time.is-text { font-size: 1.5rem; }
  .bk-summary__day { grid-area: day; margin-top: 0; font-size: .875rem; }
  .bk-summary__change { grid-area: chg; margin: 0; padding-top: 0; }
  .bk-summary__range, .bk-summary__list, .bk-summary__note, .bk-alt--sum { display: none; }
  .bk-dialog[data-step="done"] .bk-summary, .bk-dialog[data-step="confirm"] .bk-summary { display: none; }
  .bk-step { padding: 4px 6px; }
  .bk-step__title { font-size: 1.6rem; }
  .bk-form { margin-top: 12px; gap: 10px; }
  .bk-only-mobile { display: inline-flex; align-items: center; }
}
@media (max-width: 379px) {
  .bk-wins .bk-win { font-size: .75rem; }
  .bk-win__range { font-size: .6875rem; }
  .bk-pill { font-size: .875rem; padding-inline: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .bk-card, .bk-cal, .bk-step, .bk-dialog[open], .bk-done circle, .bk-time, .bk-empty { animation: none !important; }
  .bk-skel { animation: none; }
  .bk-done path { animation: none !important; stroke-dashoffset: 0; }
  .bk-akut__pulse::after { animation: none; opacity: 0; }
}

/* Frågor och svar (SEO-sidorna 2026-10-08): <details>, fungerar utan JS. "+" blir "–" när svaret är öppet.
   Mjukt blå på vita sektioner, vita kort på paneler; öppen fråga lyfts med skugga. */
.faq { display: grid; gap: 12px; }
.faq__item { background: var(--c-soft); border-radius: 22px; transition: background-color .25s ease, box-shadow .25s ease; }
.panel .faq__item { background: var(--c-white); }
.faq__item[open] { background: var(--c-white); box-shadow: var(--shadow-card); }
.faq__q {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 64px; padding: 18px 20px 18px 24px;
  cursor: pointer; list-style: none; border-radius: 22px;
  font-family: var(--font-display); font-weight: 600; font-size: clamp(1.0625rem, 1rem + .3vw, 1.25rem); line-height: 1.35;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q:focus-visible { outline: 2px solid var(--c-ink); outline-offset: 2px; }
.faq__icon { position: relative; width: 32px; height: 32px; flex: none; border-radius: 50%; background: var(--c-ink); transition: background-color .25s ease; }
.faq__icon::before, .faq__icon::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; margin: -1px 0 0 -6px; border-radius: 1px; background: #fff; transition: transform .3s var(--ease-out), background-color .25s ease; }
.faq__icon::after { transform: rotate(90deg); }
.faq__q:hover .faq__icon, .faq__item[open] .faq__icon { background: var(--c-accent); }
.faq__q:hover .faq__icon::before, .faq__q:hover .faq__icon::after,
.faq__item[open] .faq__icon::before, .faq__item[open] .faq__icon::after { background: var(--c-ink); }
.faq__item[open] .faq__icon::after { transform: rotate(0deg); }
.faq__a { padding: 0 24px 22px; max-width: 68ch; font-size: 1rem; line-height: 1.65; }
.faq__a > * + * { margin-top: .8em; }
.faq__a a { color: var(--c-ink); text-decoration: underline; text-decoration-color: var(--c-accent); text-decoration-thickness: 2px; }
.faq__a a:hover { text-decoration-color: var(--c-ink); }
.faq-group + .faq-group { margin-top: clamp(36px, 4vw, 56px); }
.faq-group__title { font-family: var(--font-sans); font-weight: 700; font-size: var(--fs-label); letter-spacing: .09em; text-transform: uppercase; color: var(--c-muted); margin-bottom: 16px; }

/* Länkkort: textkort till relaterade sidor (behandlingar, närområden) */
.link-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: clamp(12px, 1.4vw, 20px); }
.link-card {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto 1fr; gap: 6px 16px; align-items: start; height: 100%;
  padding: 22px 20px 24px 24px; border-radius: 22px; background: var(--c-soft); color: var(--c-ink); text-decoration: none;
  transition: background-color .25s ease, box-shadow .25s ease, transform .3s var(--ease-out);
}
.panel .link-card { background: var(--c-white); }
.link-card:hover { background: var(--c-white); box-shadow: var(--shadow-card); transform: translateY(-2px); }
.link-card:focus-visible { outline: 2px solid var(--c-ink); outline-offset: 3px; }
.link-card__title { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.125rem, 1.05rem + .3vw, 1.3rem); line-height: 1.25; }
.link-card__text { grid-column: 1; font-size: .9375rem; line-height: 1.55; color: var(--c-muted); }
.link-card .link-arrow__icon { grid-column: 2; grid-row: 1 / span 2; align-self: center; width: 32px; height: 32px; }
.link-card:hover .link-arrow__icon { background: var(--c-accent); color: var(--c-ink); transform: translateX(3px); }

/* Viktig upplysning (t.ex. "ring 112") */
.notice { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 14px; align-items: start; padding: 18px 22px; border-radius: 20px; background: var(--c-emergency-soft); font-size: .9375rem; line-height: 1.6; }
.notice__icon { width: 28px; height: 28px; border-radius: 50%; background: var(--c-emergency); color: #fff; display: grid; place-items: center; }
.notice__icon svg { width: 13px; height: 13px; }

/* 12. Footer --------------------------------------------------------------------- */
.site-footer { background: var(--c-white); padding-top: clamp(72px, 8vw, 120px); }
.site-footer__grid {
  display: grid; gap: 40px clamp(24px, 3vw, 48px);
  grid-template-columns: minmax(0, 3.1fr) minmax(0, 2.3fr) minmax(0, 1.9fr) minmax(0, 2.2fr) minmax(0, 2.6fr);
}
.site-footer__brand img { height: 56px; width: auto; }
.site-footer__about { margin-top: 20px; font-size: .9375rem; line-height: 1.65; max-width: 30em; }
.site-footer__social { display: flex; gap: 10px; margin: 22px 0 0; list-style: none; padding: 0; }
.site-footer__social a { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--c-soft); color: var(--c-ink); transition: background-color .25s ease, color .25s ease; }
.site-footer__social a:hover { background: var(--c-ink); color: #fff; }
.site-footer__social svg { width: 17px; height: 17px; }
.site-footer__title { font-family: var(--font-sans); font-weight: 700; font-size: var(--fs-label); letter-spacing: .09em; text-transform: uppercase; color: var(--c-muted); margin-bottom: 18px; }
.site-footer__menu { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: .9375rem; font-weight: 600; }
.site-footer__menu a { text-decoration: none; }
.site-footer__menu a:hover, .site-footer__menu a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--c-accent); text-decoration-thickness: 2px; }
.site-footer__submenu { list-style: none; margin: 8px 0 4px; padding: 0 0 0 14px; border-left: 1px solid var(--c-line); display: grid; gap: 6px; font-weight: 500; font-size: .875rem; }
.site-footer__text { font-size: .9375rem; line-height: 1.8; }
.site-footer__more { margin-top: 14px; font-size: .875rem; font-weight: 600; line-height: 1.7; }
.site-footer__more a { text-decoration: underline; text-decoration-color: var(--c-accent); text-decoration-thickness: 2px; text-underline-offset: 2px; }
.site-footer__more a:hover { text-decoration-color: var(--c-ink); }
.site-footer__contact { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; font-size: .9375rem; font-weight: 600; }
.site-footer__contact li { display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: start; }
.site-footer__contact svg { width: 16px; height: 16px; margin-top: 4px; color: var(--c-accent-deep); }
.site-footer__contact a { text-decoration: none; }
.site-footer__contact a:hover { text-decoration: underline; }
.site-footer__map { container-type: inline-size; }
/* välvd överkant: horisontell radie 50 %, vertikal = halva bredden men högst höjden minus hörnradien (ingen nedskalning av hörnen) */
.site-footer .map { --map-h: 245px; --map-arch: min(50cqw, var(--map-h) - var(--radius-card)); aspect-ratio: auto; height: var(--map-h); min-height: 0; border-radius: 50% 50% var(--radius-card) var(--radius-card) / var(--map-arch) var(--map-arch) var(--radius-card) var(--radius-card); }
.site-footer__bottom {
  margin-top: clamp(56px, 6vw, 88px); border-top: 1px solid var(--c-line);
  padding-block: 22px calc(22px + env(safe-area-inset-bottom));
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; font-size: .875rem; color: var(--c-muted);
}

/* Bottenraden: copyright (vänster) · krediteringen (mitten) · adress (höger). Från 900 px ligger krediteringen exakt i mitten
   (1fr auto 1fr) oavsett hur långa texterna på sidorna är; smalare skärmar radbryter i samma ordning. */
@media (min-width: 900px) {
  .site-footer__bottom { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: baseline; }
  .site-footer__bottom > :last-child { justify-self: end; text-align: right; }
}
.site-footer__credit { font-size: .75rem; letter-spacing: .02em; color: #697883; } /* kundönskemål: extra diskret, mitt i copyright-raden – ljusaste grå som klarar WCAG AA (4.55:1 på vitt) */

/* 13. Animation: starttillstånd bara under html.js --------------------------------- */
/* Heron: intro (klassen "intro" sätts av inline-skriptet i <head> på startsidan) */
.intro [data-intro] { opacity: 0; }
.intro .hero__slide.is-active .hero__line { visibility: hidden; }
.intro .hero__frame { clip-path: inset(0 0 100% 0); }
/* Scroll-reveals */
.js [data-reveal]:not(.is-revealed) { opacity: 0; }
.js [data-reveal="image"]:not(.is-revealed) { opacity: 1; clip-path: inset(0 0 100% 0); }
.js [data-reveal="heading"]:not(.is-revealed) { opacity: 1; }
.js [data-reveal="heading"]:not(.is-split):not(.is-revealed) { visibility: hidden; }
/* Reserv om JS/GSAP inte startar */
.js-fallback [data-intro], .js-fallback [data-reveal] { opacity: 1 !important; clip-path: none !important; visibility: visible !important; }
.js-fallback .hero__line, .js-fallback .hero__frame { visibility: visible !important; clip-path: none !important; }

/* Radmasker för rubrik-reveal: GSAP 3.13 döper masken till .split-mask-line-mask – båda namnen täcks så att å/ä/ö och g/j/y inte klipps */
.split-line-mask, .split-mask-line-mask { padding: .16em .06em .26em; margin: -.16em -.06em -.26em; }
/* Radmaskernas negativa marginaler får inte kollapsa mellan raderna – annars är rubriken högre under animationen och hoppar när den återställs. Flexkolumn = inga marginalkollapser. */
[data-reveal="heading"].is-split:not(.is-revealed) { display: flex; flex-direction: column; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .intro [data-intro], .js [data-reveal] { opacity: 1 !important; clip-path: none !important; visibility: visible !important; }
  .intro .hero__line, .intro .hero__frame { visibility: visible !important; clip-path: none !important; }
  .page-hero__scroll { animation: none; }
}

/* 14. Responsivt ------------------------------------------------------------------------ */
@media (max-width: 1279px) {
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .usp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Footer ≤ 1365: fem kolumner blev för smala (öppettider bröts, kartan blev en smal remsa).
   Tre kolumner: varumärke överst, snabblänkar över två rader, kartan under öppettider + kontakt. */
@media (max-width: 1365px) {
  .site-footer__grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr); }
  .site-footer__brand { grid-column: 1 / -1; }
  .site-footer__grid > nav.site-footer__col { grid-row: span 2; }
  .site-footer__map { grid-column: 2 / -1; }
}
@media (min-width: 768px) { .site-footer__text { white-space: nowrap; } }

/* 1280–1365: tätare meny så att gruppen logga+meny+knapp alltid slutar före bildkolumnen.
   Från 1366 räcker standardavstånden (≈ 29 px luft till bilden, samma som vid 1440). */
@media (min-width: 1280px) and (max-width: 1365px) {
  .site-nav { margin-left: calc(28 * var(--u)); }
  .site-nav__list { gap: calc(16 * var(--u)); }
  .site-header__cta { margin-left: calc(26 * var(--u)); }
}
/* Smal desktop: menyn får inte plats före bildkolumnen -> hamburgermeny, heron behåller desktoplayout */
@media (min-width: 1100px) and (max-width: 1279px) {
  .site-nav { display: none; }
  .site-header__burger { display: grid; }
  .site-header__cta { margin-left: calc(28 * var(--u)); }
}

/* Surfplatta och mobil: hamburgermeny, staplad hero */
@media (max-width: 1099px) {
  :root { --header-h: 76px; }
  .site-header { height: 84px; }
  .site-header__bar { left: 12px; right: 12px; width: auto; height: 60px; padding: 0 7px 0 16px; background: rgba(255, 255, 255, .92); box-shadow: var(--shadow-pill); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
  /* "Boka tid" + menyknappen till höger i kapseln (kundönskemål: knappen direkt före menyn behålls) */
  .site-header__cta { box-shadow: none; background: var(--c-accent); color: var(--c-on-accent); margin-left: auto; }
  .site-header__burger { box-shadow: none; background: var(--c-soft); }
  .site-header__logo img { height: 38px; min-height: 0; }
  .site-nav { display: none; }
  .site-header__cta { --btn-h: 44px; min-width: 0; padding: 0 20px; font-size: .6875rem; letter-spacing: .07em; }
  .site-header__burger { display: grid; }
  .site-header.is-fixed { height: 76px; }
  .site-header.is-fixed .site-header__logo img { height: 34px; }

  .hero { --media-h: max(380px, min(108vw, 64svh, 760px)); height: auto; min-height: 0; padding-bottom: 36px; }
  .hero__panel { border-bottom-right-radius: 34cqw; }
  /* bredden begränsas av höjden så att bågen aldrig blir ett brett, lågt utsnitt (liggande surfplatta/mobil) */
  .hero__media { position: relative; left: auto; right: auto; top: auto; bottom: auto; margin-left: auto; width: min(84%, var(--media-h) * .95); height: var(--media-h); }
  .hero__scroll { display: none; }
  .hero__dots { top: calc(var(--media-h) / 2 - 44px); left: 16px; width: 24px; gap: 20px; }
  .hero__dot { width: 5px; height: 5px; font-size: 10px; }
  .hero__dot::after { inset: -10px; } /* träffyta ≥ 24 px (WCAG 2.5.8) utan överlapp */
  .hero__dot[aria-current="true"] { width: 26px; height: 26px; margin-block: 0; }
  .hero__content { position: relative; left: auto; top: auto; width: auto; padding: 36px var(--gutter) 0; }
  .hero__eyebrow { font-size: clamp(1.125rem, .9rem + 1vw, 1.5rem); }
  .hero__title { margin-top: .35em; font-size: clamp(2.25rem, 10.4vw, 4.4rem); } /* "Group Stockholm" ryms på en rad ned till 360 px */
  .hero__sub { margin-top: 1.2rem; font-size: 1.0625rem; font-weight: 550; }
  .hero__cta { margin-top: 1.5rem; --btn-h: 52px; min-width: 200px; padding: 0 32px; font-size: .75rem; letter-spacing: .07em; }
  .hero .review-block { position: relative; left: auto; top: auto; margin: 36px var(--gutter) 0; }
  .hero .review-block__count { font-size: 2.5rem; }
  .hero .review-block .stars { --star-size: 14px; --star-gap: 7px; margin-top: 14px; }
  .hero .review-block__text { font-size: .9375rem; max-width: 24em; margin-top: 12px; }
  .hero .review-block .link-arrow { min-height: 44px; font-size: .6875rem; gap: 10px; margin-top: 4px; }
  .hero .review-block .link-arrow__icon { width: 24px; height: 24px; }
  .hero .review-block .link-arrow__icon svg { width: 11px; height: 11px; }
  .hero__emergency { position: relative; left: auto; bottom: auto; margin: 28px var(--gutter) 0; height: 62px; min-width: 0; padding: 0 26px 0 14px; gap: 16px; }
  .hero__emergency .emergency-pill__icon { width: 34px; height: 34px; box-shadow: 0 0 0 6px var(--c-emergency-soft); }
  .hero__emergency .emergency-pill__icon svg { width: 14px; height: 14px; }
  .hero__emergency .emergency-pill__label { font-size: .6875rem; }
  .hero__emergency .emergency-pill__number { font-size: 1.125rem; margin-top: 2px; }

  .page-hero { padding-top: 0; min-height: 0; flex-direction: column; align-items: stretch; }
  .page-hero__panel { border-bottom-right-radius: 34cqw; }
  /* kundönskemål (2026-09-29): texten högre upp så att sista punkten i bocklistan inte klipps i första vyn –
     lägre båge i staplad layout (surfplatta stående/mobil) */
  .page-hero { --ph-h: max(300px, min(70vw, 48svh, 620px)); }
  .page-hero__media { position: relative; left: auto; right: auto; margin-left: auto; width: min(84%, var(--ph-h) * 1.05); height: var(--ph-h); min-height: 0; }
  .page-hero__inner { padding: 24px var(--gutter) 0; }
  .page-hero__scroll { display: none; }
  /* bilden står efter texten i DOM (fokusordning: rubrikens knappar före scrollknappen) men först i staplad layout */
  .page-hero__media { order: -1; }
  /* Staplad båge: menykapseln täcker bildens övre ≈ 72 px – egen fokuspunkt (--focus-m) flyttar motivet under kapseln */
  .page-hero__frame img { object-position: var(--focus-m, var(--focus, 50% 30%)); }
  .br-desktop { display: none; } /* tvingad radbrytning i rubrik bara på dator (staplad layout bryter naturligt) */

  .split, .contact { grid-template-columns: minmax(0, 1fr); }
  .split--reverse > :first-child { order: 0; }
  /* staplad split: bilden får inte fylla hela containern (851×1135 px vid 1024) – tak, vänsterställd i linje med texten */
  .split > .arch, .split > .collage { width: 100%; justify-self: start; }
  .split > .arch { max-width: 480px; }
  .split > .arch--wide, .split > .collage { max-width: 560px; }
  .testimonials { grid-template-columns: minmax(0, 1fr); max-width: 640px; }
  .cta-band { grid-template-columns: minmax(0, 1fr); }
}

/* Liggande surfplatta (900–1099 px, bredare än hög): text till vänster, välvd bild i egen kolumn till höger,
   samma logik som desktop men med läsbara storlekar (desktopheron skalar ned texten för mycket här). */
@media (min-width: 900px) and (max-width: 1099px) and (min-aspect-ratio: 1/1) {
  .hero {
    display: grid; grid-template-columns: minmax(0, 1fr) 42%; grid-template-rows: auto auto 1fr;
    min-height: max(100svh, 640px); padding-bottom: 40px;
  }
  .hero__panel { border-bottom-right-radius: 21cqw; }
  .hero__media { grid-column: 2; grid-row: 1 / -1; width: auto; height: auto; margin: 0; }
  .hero__content { grid-column: 1; grid-row: 1; padding: calc(var(--header-h) + clamp(32px, 7svh, 72px)) 40px 0 var(--gutter); }
  .hero__title { font-size: clamp(2.75rem, 5.2vw, 3.6rem); }
  .hero .review-block { grid-column: 1; grid-row: 2; margin-top: 32px; }
  .hero__emergency { grid-column: 1; grid-row: 3; align-self: start; justify-self: start; }
  .hero__dots { top: calc(50% - 44px); }
  /* undersidornas hero: samma sida-vid-sida-layout som desktop (texten i första vyn, bågen i egen kolumn) */
  .page-hero { flex-direction: row; align-items: center; min-height: max(100svh, 600px); padding: calc(var(--header-h) + 20px) 0 40px; }
  .page-hero__panel { border-bottom-right-radius: 21cqw; }
  .page-hero__media { position: absolute; top: 0; left: 58.32%; right: 0; width: auto; height: min(100%, max(100svh, 600px)); margin: 0; }
  .page-hero__frame img { object-position: var(--focus, 50% 30%); }
  .page-hero__inner { padding: 0 calc(41.68% + 36px) 0 var(--gutter); }
  .page-hero__inner .h1 { font-size: clamp(2.4rem, min(4.9vw, 7.6svh), 3.4rem); }
  .page-hero .check-list { margin-top: 1.1rem; gap: 10px; }
  .page-hero .btn-row { margin-top: 1.35rem; }
}

/* Pekskärm/smal skärm: länkar i sidfoten och loggan får träffytor på minst 44 px */
@media (max-width: 1099px), (pointer: coarse) {
  .site-footer__menu, .site-footer__submenu { gap: 0; }
  .site-footer__menu a { display: inline-flex; align-items: center; min-height: 44px; }
  .site-footer__submenu { margin-block: 0; }
  .site-footer__contact { gap: 0; }
  .site-footer__contact li { align-items: center; }
  .site-footer__contact svg { margin-top: 0; }
  .site-footer__contact a { display: inline-flex; align-items: center; min-height: 44px; }
  .site-footer__contact li > span { padding-block: 10px; }
  .site-header__logo { padding-block: 3px; }
}

@media (min-width: 768px) and (max-width: 1099px) {
  .testimonials { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: none; }
  /* Galleri (/om-oss/ #kliniken): första bilden stor (högst 560 px – klinikfotona är 960 px breda), två under */
  .grid--gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--gallery > :first-child { grid-column: 1 / -1; width: 100%; max-width: 560px; }
}

@media (max-width: 767px) {
  .page-hero { --ph-h: max(236px, min(80vw, 38svh, 460px)); }
  .page-hero__inner .h1 { font-size: clamp(2.125rem, 9.4vw, 2.6rem); }
  .page-hero__ingress { margin-top: .8rem; font-size: 1rem; line-height: 1.55; }
  .page-hero .check-list { margin-top: 1.05rem; gap: 10px; }
  .page-hero .btn-row { margin-top: 1.35rem; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
  .card__title { font-size: 1.25rem; }
  .card__body { padding-top: 14px; }
  .card__media { border-radius: 50% 50% 18px 18px / 37.5% 37.5% 18px 18px; }
  .usp-grid { grid-template-columns: minmax(0, 1fr); }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: minmax(0, 1fr); }
  .form__row { grid-template-columns: minmax(0, 1fr); }
  .offer-strip__inner { border-radius: 32px; grid-template-columns: minmax(0, 1fr); }
  .offer-strip__list { flex-direction: column; gap: 14px; }
  .offer-strip .btn-row, .offer-strip .btn { width: 100%; }
  .site-footer__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 36px 20px; }
  .site-footer__brand { grid-column: 1 / -1; order: 9; }
  .site-footer__map { grid-column: 1 / -1; }
  .site-footer__grid > nav.site-footer__col { grid-row: auto; }
  .site-footer .map { --map-h: 220px; }
  .section-heading--row { flex-direction: column; align-items: flex-start; }
  .collage__img--circle { width: 36%; left: 36%; }
  .site-header__cta { padding: 0 16px; }
}

/* Låga mobilskärmar (t.ex. 375×667, 360×640): ännu lägre båge så att hela bocklistan ryms i första vyn */
@media (max-width: 767px) and (max-height: 740px) {
  .page-hero { --ph-h: max(196px, min(76vw, 31svh)); }
  .page-hero__inner { padding-top: 18px; }
  .page-hero__inner .h1 { font-size: clamp(1.95rem, 8.6vw, 2.35rem); }
  .page-hero__ingress { margin-top: .65rem; line-height: 1.5; }
  .page-hero .check-list { margin-top: .9rem; gap: 8px; }
}

@media (max-width: 379px) {
  /* iPhone SE/mini (375): "Boka tid" får plats med tätare knapp och lite mindre logga */
  .site-header__bar { padding-left: 14px; }
  .site-header__logo img, .site-header.is-fixed .site-header__logo img { height: 34px; }
  .site-header__cta { padding: 0 13px; letter-spacing: .05em; }
  .site-header__burger { margin-left: 8px; }
  .card-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 339px) {
  .site-header__cta { display: none; }
}

@media print {
  .site-header, .hero__scroll, .hero__dots, .mobile-menu, .bk-app, .bk-trust, .callback, .bk-dialog, .map { display: none !important; }
  .hero { height: auto; }
}
