/* lidol.se – stil, version PA2
   Design enligt "Lidol.se Förslag.dc.html" (Claude Design, juli 2026).
   Tokens från Ansökshjälpens designsystem: LIDOL-blå #004876, Inter.
   Tillgänglighetsgrund bevarad: hoppa-länk, :focus-visible i signalgult,
   prefers-reduced-motion, prefers-contrast, WCAG AA-kontraster.
   Mobile-first. Ljust och mörkt läge (prefers-color-scheme). */

/* ——— Typsnitt: självhostad Inter (GDPR: ingen extern CDN) ——— */
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 400;
  font-display: swap; src: url("/fonts/Inter-Regular.woff2") format("woff2");
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 500;
  font-display: swap; src: url("/fonts/Inter-Medium.woff2") format("woff2");
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 600;
  font-display: swap; src: url("/fonts/Inter-SemiBold.woff2") format("woff2");
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 700;
  font-display: swap; src: url("/fonts/Inter-Bold.woff2") format("woff2");
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 800;
  font-display: swap; src: url("/fonts/Inter-ExtraBold.woff2") format("woff2");
}
@font-face {
  font-family: "Inter Display"; font-style: normal; font-weight: 700;
  font-display: swap; src: url("/fonts/InterDisplay-Bold.woff2") format("woff2");
}
@font-face {
  font-family: "Inter Display"; font-style: normal; font-weight: 800;
  font-display: swap; src: url("/fonts/InterDisplay-ExtraBold.woff2") format("woff2");
}

/* ——— Designtokens ——— */
:root {
  /* Varumärke */
  --brand-primary: #004876;            /* LIDOL-blå – CTA + länkar (vit text: 9.60 AAA) */
  --brand-primary-hover: #003a5f;
  --brand-primary-on-surface: #004876; /* länkfärg på ljus yta */
  --brand-secondary: #a8cee6;          /* ljus LIDOL-ton – ikonplattor, accenter */

  /* Ytor */
  --bg: #f9f9f9;
  --bg-card: #ffffff;
  --bg-muted: #f7f7f7;
  --bg-footer: #0f172a;

  /* Text */
  --fg: #111111;
  --fg-muted: rgb(50, 50, 57);
  --fg-muted-2: rgb(75, 75, 89);
  --fg-on-primary: #fefefe;

  /* Semantik */
  --success: #0dbd24;
  --warning: #f59e0b;

  /* Linjer */
  --border: #e5e5e5;
  --input: #e5e5e5;

  /* Fokus – signalgul, en blinkning från varseblivningens värld.
     Syns på vitt, LIDOL-blått och mörkt läge. */
  --signal: #F5A623;

  /* Radier */
  --radius-sm: 0.375rem;
  --radius: 0.625rem;
  --radius-lg: 0.75rem;
  --radius-full: 9999px;

  /* Skuggor */
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-sm: 0 1px 3px rgba(16, 24, 40, 0.06), 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-md: 0 4px 12px rgba(16, 24, 40, 0.08);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, 0.10);

  /* Typografi */
  --font-sans: "Inter", Arial, sans-serif;
  --font-display: "Inter Display", "Inter", Arial, sans-serif;

  /* Klickyta (WCAG 2.5.8) */
  --min-target: 44px;

  --radmax: 68ch;
}

/* Mörkt läge – två LIDOL-toner: mellanblå fyllnad så att vit text på
   knappar klarar AA, ljusare ton för länktext på mörk botten (AAA). */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121212;
    --bg-card: #1a1a1a;
    --bg-muted: #262626;
    --bg-footer: #0a0a0a;

    --fg: #f2f2f2;
    --fg-muted: rgb(190, 190, 195);
    --fg-muted-2: rgb(150, 150, 160);

    --brand-primary: #1a6a9e;
    --brand-primary-hover: #2680b8;
    --brand-primary-on-surface: #5cb3e6;
    --brand-secondary: #1e3a5f;

    --border: rgba(255, 255, 255, 0.10);
    --input: rgba(255, 255, 255, 0.14);

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.35);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
  }
}

/* Hög kontrast */
@media (prefers-contrast: more) {
  :root { --border: rgba(0, 0, 0, 0.3); --fg-muted: #2a2a2a; }
}
@media (prefers-contrast: more) and (prefers-color-scheme: dark) {
  :root { --border: rgba(255, 255, 255, 0.4); --fg-muted: rgb(220, 220, 225); }
}

/* ——— Grund ——— */
* { box-sizing: border-box; }

html { font-size: 100%; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--fg);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 800; }
h2 { font-size: clamp(1.35rem, 3vw, 1.75rem); font-weight: 700; }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.3rem); font-weight: 700; }
h4 { font-size: 1.05rem; font-weight: 600; }

a { color: var(--brand-primary-on-surface); }
a:hover { color: var(--brand-primary-hover); }

img { max-width: 100%; height: auto; }

hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }

table { border-collapse: collapse; width: 100%; margin: 1rem 0; font-size: 0.95rem; }
th, td { border: 1px solid var(--border); padding: 0.6em 0.8em; text-align: left; vertical-align: top; }
th { background: var(--bg-muted); font-weight: 600; }

/* Fokus – tydlig signal för tangentbordsanvändare (WCAG 2.4.7) */
:focus-visible {
  outline: 3px solid var(--signal);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Hoppa till innehållet */
.hoppa {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--brand-primary);
  color: var(--fg-on-primary);
  padding: 0.6em 1em;
  z-index: 10;
}
.hoppa:focus { left: 0; }

/* ——— Knappar ——— */
.knapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--min-target);
  padding: 0.75em 1.4em;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.knapp--primar {
  background: var(--brand-primary);
  color: var(--fg-on-primary);
  box-shadow: var(--shadow-xs);
}
.knapp--primar:hover { background: var(--brand-primary-hover); color: var(--fg-on-primary); }
.knapp--sekundar {
  background: var(--bg-card);
  color: var(--fg);
  border: 1px solid var(--border);
}
.knapp--sekundar:hover { background: var(--bg-muted); color: var(--fg); }
.knapp--vit {
  background: #fff;
  color: #004876;
  font-weight: 700;
  box-shadow: var(--shadow-md);
}
.knapp--vit:hover { background: #eef4f9; color: #003a5f; }

/* ——— Sidhuvud ——— */
.sidhuvud {
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  position: relative;
  z-index: 2;
}
.sidhuvud-inre {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0.5rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  min-height: 64px;
}
.logotyp {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--fg);
}
.logotyp-ikon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--brand-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.logotyp-namn {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--brand-primary-on-surface);
}
.meny-knapp {
  background: transparent;
  color: var(--fg);
  border: 0;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 600;
  min-height: var(--min-target);
  min-width: var(--min-target);
  padding: 0.35em 0.7em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
}
.meny-knapp:hover { background: var(--bg-muted); }

.huvudmeny { display: none; flex-basis: 100%; }
.huvudmeny.oppen { display: block; padding-bottom: 0.75rem; }
.huvudmeny ul {
  list-style: none;
  margin: 0.25rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.huvudmeny a {
  display: flex;
  align-items: center;
  min-height: var(--min-target);
  color: var(--fg-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.5em 0.9em;
  border-radius: var(--radius-sm);
}
.huvudmeny a:hover { background: var(--bg-muted); color: var(--fg); }
.huvudmeny a[aria-current] {
  box-shadow: inset 4px 0 0 var(--signal);
  font-weight: 700;
  color: var(--fg);
}
.huvudmeny .meny-kontakt a {
  background: var(--brand-primary);
  color: var(--fg-on-primary);
  font-weight: 600;
  justify-content: center;
  margin-top: 0.4rem;
  border-radius: var(--radius);
}
.huvudmeny .meny-kontakt a:hover { background: var(--brand-primary-hover); }
.huvudmeny .meny-kontakt a[aria-current] { box-shadow: none; }

@media (min-width: 64rem) {
  .meny-knapp { display: none; }
  .huvudmeny { display: block; flex-basis: auto; }
  .huvudmeny.oppen { padding-bottom: 0; }
  .huvudmeny ul { flex-direction: row; align-items: center; gap: 6px; margin: 0; }
  .huvudmeny a[aria-current] {
    box-shadow: inset 0 -3px 0 var(--signal);
  }
  .huvudmeny .meny-kontakt a { margin: 0 0 0 10px; padding: 0.5em 1.2em; }
}

/* ——— Innehållsytor ——— */
main { display: block; }

/* Vanlig innehållssida: läsbar radlängd (undersidorna får sin
   fulla design i steg 2) */
.sida-inre {
  max-width: 72rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 3.5rem;
}
.sida-inre > * { max-width: var(--radmax); }

/* Sektion på full designbredd */
.sektion {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
}
.sektion--forsta { padding-top: 2.5rem; }
.sektion-huvud {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 1.35rem;
}
.sektion-huvud h2 { margin: 0; }
.sektion-lank {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--brand-primary-on-surface);
  text-decoration: none;
}
.sektion-lank:hover { text-decoration: underline; }

/* ——— Hero (startsidan) ——— */
.hero {
  max-width: 80rem;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 3rem;
  display: grid;
  gap: 2rem;
  align-items: center;
}
.hero-text { display: flex; flex-direction: column; gap: 1.15rem; }
.hero-text h1 { margin: 0; line-height: 1.05; letter-spacing: -0.025em; }
.hero-ingress {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--fg-muted);
  margin: 0;
  max-width: 33em;
}
.hero-knappar { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.25rem; }
.hero-notis { font-size: 0.85rem; color: var(--fg-muted-2); }

@media (min-width: 64rem) {
  .hero { grid-template-columns: 1.05fr 0.95fr; gap: 3.5rem; padding-top: 4rem; padding-bottom: 4rem; }
}

/* Märke (badge) – CE/MDR-raden */
.badge {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 8px;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 7px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--fg-muted);
}
.badge svg { flex-shrink: 0; }

/* Bildplatshållare tills riktiga bilder finns (steg 5) */
.bildplats {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 220px;
  height: 100%;
  padding: 1rem;
  background: var(--bg-muted);
  border: 1px dashed var(--border);
  border-radius: 16px;
  color: var(--fg-muted-2);
  font-size: 0.9rem;
}
.bildplats--rak { border-radius: 0; border: 0; min-height: 170px; }

/* Riktiga sidbilder */
.hero-foto {
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
}
.nyhetskort-bild img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ——— Kort ——— */
.kortrad { display: grid; gap: 1.25rem; }
@media (min-width: 48rem) { .kortrad { grid-template-columns: repeat(3, 1fr); } }
.kortrad--2 { display: grid; gap: 1.25rem; }
@media (min-width: 48rem) { .kortrad--2 { grid-template-columns: 1fr 1fr; } }

.kort {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.kort h2, .kort h3 { margin: 0; font-size: 1.2rem; letter-spacing: -0.015em; }
.kort p { font-size: 0.9rem; line-height: 1.6; color: var(--fg-muted); margin: 0; }
.kort-ikon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--brand-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fg);
}
.kort-lank {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--brand-primary-on-surface);
  text-decoration: none;
  margin-top: auto;
  padding-top: 0.25rem;
}
.kort-lank:hover { text-decoration: underline; }

/* Chips – små ämnesetiketter */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 0.25rem; }
.chip {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--fg-muted);
  background: var(--bg-muted);
  border-radius: var(--radius-full);
  padding: 7px 13px;
}

/* Nyhetskort */
.nyhetskort {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.nyhetskort-bild { height: 170px; overflow: hidden; }
.nyhetskort-inre { padding: 1.25rem; display: flex; flex-direction: column; gap: 0.4rem; }
.nyhetskort-datum { font-size: 0.78rem; color: var(--fg-muted-2); }
.nyhetskort h3 { font-family: var(--font-sans); font-size: 1rem; font-weight: 700; line-height: 1.3; letter-spacing: 0; margin: 0; }
.nyhetskort h3 a { color: var(--fg); text-decoration: none; }
.nyhetskort h3 a:hover { color: var(--brand-primary-on-surface); text-decoration: underline; }
.nyhetskort p { font-size: 0.85rem; line-height: 1.55; color: var(--fg-muted); margin: 0; }

/* ——— Produktsidor ——— */
.brodsmula {
  max-width: 80rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 0;
  font-size: 0.85rem;
  color: var(--fg-muted-2);
}
.brodsmula a { color: var(--fg-muted-2); text-decoration: none; }
.brodsmula a:hover { color: var(--fg); text-decoration: underline; }
.brodsmula [aria-current] { color: var(--fg); font-weight: 600; }

.badge--produkt {
  background: var(--brand-secondary);
  border: 0;
  color: var(--fg);
  font-weight: 700;
}

/* Bockrad – korta checkpunkter under hero-knapparna */
.bock-rad {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.1rem;
  font-size: 0.85rem;
  color: var(--fg-muted-2);
}
.bock { display: inline-flex; align-items: center; gap: 6px; }

/* Numrerade steg */
.steg { display: flex; gap: 14px; align-items: flex-start; margin: 0 0 1.15rem; }
.steg-nr {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand-primary);
  color: var(--fg-on-primary);
  font-size: 0.9rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.steg h3 { font-family: var(--font-sans); font-size: 0.98rem; font-weight: 600; letter-spacing: 0; margin: 0.3rem 0 0.2rem; }
.steg p { font-size: 0.88rem; line-height: 1.55; color: var(--fg-muted); margin: 0; }

/* Faktaruta */
.fakta {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.6rem;
}
.fakta-rubrik {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--fg-muted-2);
  margin: 0 0 0.75rem;
}
.fakta dl { margin: 0; }
.fakta-rad {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  padding: 0.6rem 0;
  font-size: 0.86rem;
}
.fakta-rad:last-child { border-bottom: 0; padding-bottom: 0; }
.fakta-rad dt { color: var(--fg-muted); }
.fakta-rad dd { margin: 0; font-weight: 600; text-align: right; }

/* Två kolumner: innehåll + faktaruta */
.tvakolumn { display: grid; gap: 2rem; align-items: start; }
@media (min-width: 64rem) { .tvakolumn { grid-template-columns: 1.4fr 1fr; gap: 2.5rem; } }

/* Regulatorisk information (MDR) */
.regulatoriskt {
  border-top: 1px solid var(--border);
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--fg-muted);
  max-width: 60em;
}
.regulatoriskt strong { color: var(--fg); }

/* ——— Band – Ansökshjälpen (full bredd, LIDOL-blått) ——— */
.band { background: var(--brand-primary); padding: 2.75rem 1.25rem; margin-bottom: 3rem; }
.band-inre {
  max-width: 74rem;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 2.5rem;
}
.band-text { display: flex; flex-direction: column; gap: 0.5rem; max-width: 40em; }
.band-etikett {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #a8cee6;
}
.band-rubrik {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.5vw, 1.6rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: #fff;
  margin: 0;
}
.band-brod { font-size: 0.9rem; line-height: 1.55; color: #cfe3f2; }

/* ——— Sidfot ——— */
.sidfot { background: var(--bg-footer); margin-top: 2rem; }
.sidfot-inre {
  max-width: 74rem;
  margin: 0 auto;
  padding: 3rem 1.25rem 2rem;
  display: grid;
  gap: 2rem;
}
@media (min-width: 48rem) {
  .sidfot-inre { grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2.5rem; }
}
.sidfot-brand { display: flex; flex-direction: column; gap: 0.85rem; }
.sidfot-logotyp { display: inline-flex; align-items: center; gap: 9px; }
.sidfot-logotyp .logotyp-ikon { width: 28px; height: 28px; border-radius: 7px; background: #1a6a9e; }
.sidfot-logotyp .logotyp-namn { color: #fff; font-size: 1rem; }
.sidfot-beskrivning { font-size: 0.85rem; line-height: 1.6; color: #94a3b8; max-width: 20em; }
.sidfot-org { font-size: 0.8rem; color: #8494ab; }
.sidfot-kolumn { display: flex; flex-direction: column; gap: 0.15rem; }
.sidfot-rubrik {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 0.5rem;
}
.sidfot-kolumn a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  font-size: 0.86rem;
  color: #cbd5e1;
  text-decoration: none;
}
.sidfot-kolumn a:hover { color: #fff; text-decoration: underline; }
.sidfot-botten {
  max-width: 74rem;
  margin: 0 auto;
  padding: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  font-size: 0.82rem;
  color: #94a3b8;
}
.sidfot-botten a { color: #cbd5e1; }
.sidfot-botten a:hover { color: #fff; }

/* ——— Rörelse: respektera användarens inställning ——— */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
