/* Körkort 2026 – korkortsplugg.se
   Sidan ska se ut som appen: systemgrå bakgrund, vita kort, hårfina linjer och appens blå accent.
   Platt och lugnt: inga gradienter, inga skuggor, inga webbtypsnitt, ingen JavaScript.
   Det enda djupet på sidan är telefonramen runt skärmbilderna. */

:root {
  --accent: #1E3A8A;          /* 9,3:1 mot bakgrunden */
  --accent-ton: rgba(30, 58, 138, 0.10);
  --bakgrund: #F2F2F7;
  --yta: #FFFFFF;
  --text: #1C1C1E;
  --text-2: #55555C;          /* 6,6:1 mot bakgrunden */
  --text-3: rgba(60, 60, 67, 0.36);
  --linje: rgba(60, 60, 67, 0.18);
  --ok: #1F7A3A;
  --ram: #1D1D1F;
  --ram-kant: #1D1D1F;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #8FA7F3;
    --accent-ton: rgba(143, 167, 243, 0.16);
    --bakgrund: #000000;
    --yta: #1C1C1E;
    --text: #F2F2F7;
    --text-2: #A8A8B0;
    --text-3: rgba(235, 235, 245, 0.30);
    --linje: rgba(235, 235, 245, 0.16);
    --ok: #30D158;
    --ram: #1D1D1F;
    --ram-kant: #3A3A3C;      /* så att ramen syns mot svart */
  }
}

/* ---------- grund ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bakgrund);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem;       /* 17 px, som iOS Body */
  line-height: 1.5;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  margin: 0;
  font-weight: 700;
  text-wrap: balance;
}
h1 {
  font-size: clamp(2.5rem, 1.6rem + 3.6vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}
h2 {
  font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
}
h3 {
  font-size: 1.25rem;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.01em;
}
p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
img { max-width: 100%; }

a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.hoppa {
  position: absolute;
  left: 16px;
  top: -200px;
  z-index: 10;
  background: var(--yta);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 10px;
}
.hoppa:focus { top: 8px; }

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

/* Behållare: 72rem för startsidans block, 40–44rem för löptext. Sidmarginal 16 px, 24 px från 600 px. */
.behallare { width: min(100% - 32px, 72rem); margin-inline: auto; }
.artikel { width: min(100% - 32px, 44rem); margin-inline: auto; }
/* Undersidor (support, integritetspolicy, 404): sidhuvud och sidfot följer artikelns bredd,
   så att logotyp, rubrik och sidfot står i samma vänsterkant. */
.smal .huvud .behallare, .smal .fot .behallare { width: min(100% - 32px, 44rem); }
@media (min-width: 600px) {
  .behallare { width: min(100% - 48px, 72rem); }
  .artikel { width: min(100% - 48px, 44rem); }
  .smal .huvud .behallare, .smal .fot .behallare { width: min(100% - 48px, 44rem); }
}

/* ---------- sidhuvud ---------- */
.huvud .behallare {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
}
.marke {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
}
.marke img { width: 28px; height: 28px; display: block; }
.huvud nav { display: flex; gap: 20px; }
.huvud nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.9375rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.huvud nav a:hover { color: var(--accent); }
.huvud nav a[aria-current="page"] { color: var(--accent); }

/* ---------- telefonram (ren CSS; skärmbilden har redan Dynamic Island och statusrad) ---------- */
.telefon {
  --w: 280px;
  width: var(--w);
  padding: calc(var(--w) * 0.026);
  border-radius: calc(var(--w) * 0.163);
  background: var(--ram);
  border: 1px solid var(--ram-kant);
  margin: 0;
}
.telefon picture, .telefon img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: calc(var(--w) * 0.137);
}

/* ---------- hjälte ---------- */
.hjalte { padding-block: 32px 64px; }
.hjalte-rutnat { display: grid; gap: 48px; }
.appikon { width: 72px; height: 72px; display: block; margin-bottom: 28px; }
.hjalte h1 { max-width: 12em; }
.ingress {
  font-size: 1.25rem;
  line-height: 1.45;
  color: var(--text-2);
  max-width: 30em;
  margin-top: 20px;
}
.hel { white-space: nowrap; }
.fakta {
  margin: 32px 0 0;
  font-weight: 500;
}
.fakta > span { white-space: nowrap; }
.prick { color: var(--text-2); font-weight: 400; }
.butiker { margin: 20px 0 0; }
.hamta { margin: 8px 0 0; font-size: 0.9375rem; color: var(--text-2); }
.hjalte .telefon { --w: min(72vw, 280px); margin-inline: auto; }

@media (max-width: 29.99rem) {
  .fakta .mellan { display: none; }
  .fakta > span { display: block; }
}
@media (min-width: 900px) {
  .hjalte { padding-block: 48px 112px; }
  .hjalte-rutnat {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    align-items: center;
    gap: 48px;
  }
  .hjalte .telefon { --w: 300px; }
  .ingress { font-size: 1.375rem; }
}

/* ---------- siffror ---------- */
.siffror ul {
  list-style: none;
  margin: 0;
  padding: 32px 0;
  border-block: 1px solid var(--linje);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 16px;
}
.siffror li { display: flex; flex-direction: column; gap: 4px; }
.siffror .tal {
  font-size: 2.75rem;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.siffror .etikett { font-size: 0.9375rem; line-height: 1.35; color: var(--text-2); max-width: 14em; }
@media (min-width: 720px) {
  .siffror ul { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; padding: 40px 0; }
}

/* ---------- sektioner ---------- */
.sektion { padding-block: 64px 0; }
.sista { padding-bottom: 64px; }
.sektion-huvud { max-width: 40rem; margin-bottom: 40px; }
.sektion-huvud p, .delad-text p { color: var(--text-2); font-size: 1.125rem; margin-top: 14px; }
@media (min-width: 900px) {
  .sektion { padding-top: 112px; }
  .sista { padding-bottom: 112px; }
  .sektion-huvud { margin-bottom: 56px; }
}

/* Delad layout: rubrik till vänster, innehåll till höger från 900 px. */
.delad { display: grid; gap: 28px; }
@media (min-width: 900px) {
  .delad {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 64px;
    align-items: start;
  }
}

/* ---------- din väg till provet ---------- */
.steg {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px 16px;
}
.steg li { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.steg-bild { container-type: inline-size; }
.steg .telefon { --w: 160px; }
@supports (width: 1cqi) {
  .steg .telefon { --w: min(100cqi, 264px); }
}
.steg-rubrik { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 6px; }
.steg-nr {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent-ton);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-size: 0.9375rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.steg h3 { font-size: 1.0625rem; padding-top: 3px; }
.steg p { font-size: 0.9375rem; line-height: 1.45; color: var(--text-2); }
@media (min-width: 600px) {
  .steg { gap: 56px 24px; }
  .steg-nr { width: 32px; height: 32px; font-size: 1rem; }
  .steg h3 { font-size: 1.25rem; }
  .steg p { font-size: 1rem; }
}
/* Två kolumner (600–899 px): telefonen är smalare än kolumnen, så den centreras i stället för att lämna en ojämn remsa. */
@media (min-width: 600px) and (max-width: 899px) {
  .steg .telefon { margin-inline: auto; }
  .steg li > div:last-child { width: min(100%, 264px); margin-inline: auto; }
}
@media (min-width: 900px) {
  .steg { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
}

/* ---------- grupperad lista (som appens inset grouped) ---------- */
.lista {
  list-style: none;
  margin: 0;
  padding: 0 0 0 16px;
  background: var(--yta);
  border-radius: 18px;
}
.lista li { display: flex; align-items: center; gap: 14px; }
.lista-ikon {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--accent-ton);
  color: var(--accent);
  display: grid;
  place-items: center;
}
.lista-ikon svg { width: 19px; height: 19px; display: block; }
.lista-text {
  flex: 1;
  min-width: 0;
  min-height: 64px;
  padding: 12px 16px 12px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
}
.lista li + li .lista-text { border-top: 1px solid var(--linje); }
.lista-text strong { font-weight: 400; }
.lista-text span { font-size: 0.9375rem; line-height: 1.4; color: var(--text-2); }

/* ---------- kort ---------- */
.kort {
  background: var(--yta);
  border-radius: 18px;
  padding: 20px;
}
@media (min-width: 600px) { .kort { padding: 24px 28px; } }
.kort > :last-child { margin-bottom: 0; }

.bockar { list-style: none; margin: 0; padding: 0; }
.bockar li { display: flex; gap: 12px; align-items: flex-start; }
.bockar li + li { margin-top: 12px; }
.bockar svg { flex: none; width: 22px; height: 22px; margin-top: 1px; color: var(--ok); }
.kort-lank { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--linje); }
.kort-not { color: var(--text-2); font-size: 0.9375rem; }

.epost { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 8px; }
.liten { font-size: 0.9375rem; color: var(--text-2); }
.efter { margin-top: 24px; }

/* ---------- undersidor ---------- */
.undersida { padding-block: 40px 72px; }
.undersida h1 { font-size: clamp(2.25rem, 1.7rem + 2.2vw, 3rem); line-height: 1.08; }
.undersida .ingress { margin-top: 16px; }
.undersida .datum { margin-top: 12px; font-size: 0.9375rem; color: var(--text-2); }
.undersida h2 { font-size: 1.375rem; line-height: 1.25; letter-spacing: -0.01em; margin: 44px 0 10px; }
.undersida .kort { margin-top: 32px; }
.undersida .kort h2 { margin-top: 0; }
.undersida ul:not([class]) { margin: 0 0 1em; padding-left: 1.25em; }
.undersida ul:not([class]) li { margin: 4px 0; }
@media (min-width: 900px) { .undersida { padding-block: 64px 112px; } }

/* Vanliga frågor: inbyggda <details>, ingen JavaScript. */
.fragor {
  background: var(--yta);
  border-radius: 18px;
  padding-left: 16px;
}
@media (min-width: 600px) { .fragor { padding-left: 20px; } }
.fragor details + details { border-top: 1px solid var(--linje); }
.fragor summary {
  list-style: none;
  cursor: pointer;
  min-height: 52px;
  padding: 14px 16px 14px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.fragor summary::-webkit-details-marker { display: none; }
.fragor summary::after {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  margin-right: 4px;
  border-right: 2px solid var(--text-2);
  border-bottom: 2px solid var(--text-2);
  transform: translateY(-3px) rotate(45deg);
}
.fragor details[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.fragor summary:focus-visible { outline-offset: -3px; }
.fragor details p { padding-right: 16px; color: var(--text-2); }
.fragor details > :last-child { padding-bottom: 18px; }

/* Knapp (bara länkar, inga formulär) */
.knapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 12px;
  background: var(--accent);
  color: var(--bakgrund);
  font-weight: 600;
  text-decoration: none;
}
.knapp:hover { text-decoration: none; opacity: 0.88; }

/* ---------- sidfot ---------- */
.fot { padding-bottom: 48px; }
.fot .behallare, .fot .artikel {
  border-top: 1px solid var(--linje);
  padding-top: 24px;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-2);
}
.fot nav { display: flex; flex-wrap: wrap; gap: 4px 24px; margin-bottom: 12px; }
.fot nav a { color: var(--text); text-decoration: none; min-height: 32px; display: inline-flex; align-items: center; }
.fot nav a:hover { color: var(--accent); }
.fot p { margin: 0 0 6px; max-width: 44em; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

@media print {
  .huvud nav, .hoppa { display: none; }
  body { background: #fff; }
}
