:root {
  color-scheme: light dark;
  --bg: #f6f7fb;
  --card: #ffffff;
  --ink: #1e2547;
  --muted: #5a6080;
  --line: #e4e6ee;
  --dot: #d3d7e6;
  --wash: #eaf2fe;
  --coral: #ff8a76;
  --coral-text: #c24a36;
  --blue: #5b9af5;
  --navy: #1e2547;
  --primary: #1e2547;
  --on-primary: #ffffff;
  --hard: #1e2547;
  --focus: #1e2547;
  --font: 'Avenir Next', 'Poppins', system-ui, -apple-system, sans-serif;
  --max: 1040px;
  --text: 680px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151a36;
    --card: #1e2547;
    --ink: #ffffff;
    --muted: #a3a9c9;
    --line: #2e3866;
    --dot: #3a4473;
    --wash: #24305e;
    --coral-text: #ff9c8a;
    --primary: #5b9af5;
    --on-primary: #151a36;
    --hard: #3a4473;
    --focus: #5b9af5;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--blue); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.dot { color: var(--blue); }

.skip {
  position: absolute; left: 16px; top: -80px; z-index: 20;
  background: var(--primary); color: var(--on-primary);
  padding: 10px 16px; border-radius: 10px; font-weight: 600; text-decoration: none;
}
.skip:focus { top: 16px; }

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

/* Rubriker */
h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -0.03em; line-height: 1.08; text-wrap: balance; }
h1 { font-size: clamp(38px, 6.4vw, 72px); }
h2 { font-size: clamp(24px, 3vw, 30px); letter-spacing: -0.02em; line-height: 1.2; }
h3 { font-size: 19px; letter-spacing: -0.01em; line-height: 1.3; }
.label { margin: 0 0 16px; font-size: 14px; font-weight: 600; color: var(--coral-text); }
.lede { margin: 24px 0 0; font-size: clamp(18px, 1.8vw, 20px); color: var(--muted); max-width: 40ch; }

/* Sidhuvud */
.header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 76px; }
.wordmark {
  font-size: 26px; font-weight: 800; letter-spacing: -0.04em; line-height: 1;
  text-decoration: none; white-space: nowrap;
}
.nav { display: flex; align-items: center; gap: 22px; }
.nav > a { font-size: 15px; font-weight: 500; color: var(--muted); text-decoration: none; white-space: nowrap; }
.nav > a:hover, .nav > a[aria-current="page"] { color: var(--ink); }
.nav > a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--blue); }
.lang { display: flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.lang a {
  padding: 2px 10px; border-radius: 999px;
  font-size: 13px; font-weight: 600; line-height: 1.6; color: var(--muted); text-decoration: none;
}
.lang a:hover { color: var(--ink); }
.lang a[aria-current="true"] { background: var(--primary); color: var(--on-primary); }

/* Prickat papper, som bakgrunden i appen. Tonar ut nedåt. */
.paper { position: relative; isolation: isolate; }
.paper::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(circle, var(--dot) 1.1px, transparent 1.7px);
  background-size: 14px 14px;
  -webkit-mask-image: linear-gradient(to bottom, #000 40%, transparent);
  mask-image: linear-gradient(to bottom, #000 40%, transparent);
}

/* Startsidan */
.hero { padding: 72px 0 104px; }
.hero .wrap { display: grid; grid-template-columns: 1.15fr 1fr; gap: 64px; align-items: center; }
.hero h1 { max-width: 12ch; }

.soon {
  display: inline-flex; align-items: center; gap: 12px;
  margin: 36px 0 0; padding: 10px 20px 10px 14px;
  border: 1.5px solid var(--ink); border-radius: 14px;
  line-height: 1.2;
}
.soon svg { width: 26px; height: 26px; flex: none; }
.soon small { display: block; font-size: 12px; font-weight: 500; color: var(--muted); }
.soon strong { display: block; font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }

/* Sökarhörn runt ett element */
.viewfinder { position: relative; padding: 22px; }
.viewfinder > i {
  position: absolute; width: 26px; height: 26px; pointer-events: none;
  border: 0 solid var(--coral); border-radius: 0;
}
.viewfinder > i:nth-of-type(1) { top: 0; left: 0; border-top-width: 3px; border-left-width: 3px; border-top-left-radius: 9px; }
.viewfinder > i:nth-of-type(2) { top: 0; right: 0; border-top-width: 3px; border-right-width: 3px; border-top-right-radius: 9px; }
.viewfinder > i:nth-of-type(3) { bottom: 0; right: 0; border-bottom-width: 3px; border-right-width: 3px; border-bottom-right-radius: 9px; }
.viewfinder > i:nth-of-type(4) { bottom: 0; left: 0; border-bottom-width: 3px; border-left-width: 3px; border-bottom-left-radius: 9px; }

/* Kort med hård, förskjuten skugga – som ett fysiskt kort */
.hard {
  background: var(--card);
  border: 1.5px solid var(--hard);
  border-radius: 18px;
  box-shadow: 4px 4px 0 var(--hard);
}

/* Exempelfrågan på startsidan */
.example { margin: 0; justify-self: center; width: 100%; max-width: 400px; }
.example .hard { padding: 26px 24px 24px; }
.example .q-label { margin: 0 0 10px; font-size: 14px; font-weight: 600; color: var(--coral-text); }
.example .q { margin: 0 0 22px; font-size: 21px; font-weight: 700; letter-spacing: -0.015em; line-height: 1.45; }
.gap {
  display: inline-block; width: 4.2em; height: 0.95em; vertical-align: -0.1em;
  border-radius: 999px; background: var(--coral);
}
.nowrap { white-space: nowrap; }
.options { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.options li {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px;
  font-size: 16px; font-weight: 500;
}
.options b {
  display: grid; place-items: center; flex: none;
  width: 26px; height: 26px; border-radius: 8px;
  background: var(--wash); font-size: 13px; font-weight: 700;
}
.example figcaption { margin-top: 14px; text-align: center; font-size: 13px; color: var(--muted); }

/* Tre punkter med stora siffror */
.section { padding: 88px 0; }
.section.tight { padding-top: 0; }
.section-title { margin-bottom: 44px; }
.points { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.num {
  display: block; margin-bottom: 14px;
  font-size: 56px; font-weight: 800; letter-spacing: -0.05em; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.points p { margin: 10px 0 0; color: var(--muted); }

/* Länkkort till support och integritet */
.links { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.link-card {
  display: block; padding: 28px; text-decoration: none;
  background: var(--card); border: 1px solid var(--line); border-radius: 20px;
  transition: border-color .15s;
}
.link-card:hover { border-color: var(--ink); }
.link-card p { margin: 8px 0 0; color: var(--muted); }
.link-card .arrow { display: inline-block; margin-left: 6px; color: var(--blue); transition: transform .15s; }
.link-card:hover .arrow { transform: translateX(3px); }

/* Textsidor: integritet och support */
.page-head { padding: 56px 0 48px; }
.page-head .wrap, .doc { max-width: calc(var(--text) + 48px); }
.page-head h1 { font-size: clamp(34px, 5.4vw, 56px); }
.page-head .lede { max-width: 46ch; }
.meta { margin: 20px 0 0; font-size: 15px; color: var(--muted); }

.cloze { display: grid; gap: 8px; margin-top: 28px; }
.cloze span { display: flex; align-items: center; gap: 5px; }
.cloze i { display: block; height: 5px; border-radius: 999px; background: var(--line); }
.cloze i.c, .cloze i.b { height: 9px; }
.cloze i.c { background: var(--coral); }
.cloze i.b { background: var(--blue); }

.doc { padding-bottom: 96px; }
.doc h2 { margin: 56px 0 14px; scroll-margin-top: 24px; }
.doc h3 { margin: 32px 0 8px; }
.doc p, .doc ul, .doc ol { margin: 0 0 14px; }
.doc ul, .doc ol { padding-left: 1.3em; }
.doc li { margin: 6px 0; }
.doc li::marker { color: var(--muted); }
.doc strong { font-weight: 600; }

.summary { padding: 26px 28px; }
.summary h2 { margin: 0 0 12px; font-size: 20px; }
.summary ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.summary li { display: flex; gap: 12px; margin: 0; }
.summary li::before {
  content: ''; flex: none; width: 10px; height: 10px; margin-top: 0.55em;
  border-radius: 50%; background: var(--coral);
}

.doc .toc { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.doc .toc li { margin: 0; }
.toc a {
  display: inline-block; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--card); font-size: 15px; font-weight: 500; text-decoration: none;
}
.toc a:hover { border-color: var(--ink); }

.contact { padding: 26px 28px; margin-top: 56px; }
.contact h2 { margin: 0 0 8px; font-size: 22px; }
.contact p { color: var(--muted); }
.contact p:last-child { margin-bottom: 0; }
.mail { font-size: clamp(20px, 3vw, 24px); font-weight: 700; letter-spacing: -0.015em; color: var(--ink); }

/* Sidfot */
.footer { border-top: 1px solid var(--line); padding: 32px 0 40px; font-size: 15px; color: var(--muted); }
.footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px 24px; flex-wrap: wrap; }
.footer p { margin: 0; display: flex; align-items: center; gap: 12px; }
.footer img { width: 28px; height: 28px; border-radius: 7px; }
.footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer a { color: var(--ink); }
.footer nav a { color: var(--muted); text-decoration: none; }
.footer nav a:hover { color: var(--ink); text-decoration: underline; }

/* 404 */
.notfound { padding: 96px 0 120px; }
.notfound .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 999px;
  font-weight: 600; font-size: 16px; text-decoration: none;
}
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-ghost { border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--ink); }

@media (max-width: 860px) {
  .hero { padding: 48px 0 80px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 56px; }
  .points { grid-template-columns: 1fr; gap: 36px; }
  .links { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .header .wrap { height: 64px; }
  .wordmark { font-size: 23px; }
  .nav { gap: 14px; }
  .section { padding: 64px 0; }
  .page-head { padding: 36px 0 36px; }
  .page-head .wrap, .doc { max-width: calc(var(--text) + 32px); }
  .doc h2 { margin-top: 44px; }
  .example .hard, .summary, .contact, .link-card { padding: 22px 20px; }
  .viewfinder { padding: 16px; }
}
@media (max-width: 420px) {
  .nav > a { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .link-card, .link-card .arrow { transition: none; }
}
