/* Unity UF – grafisk profil enligt affärsplanen:
   Djupblå #174A78 (text, ytor och knappar), Gul #F5C842 (kontrast och markeringar), Himmelsblå #7FB0DE, Ljusblå #EAF3FB (bakgrund).
   Logotypen har egna färger (#0559A5, #FDB304) och används oförändrad.
   Archivo Black (logotyp), Playfair Display (rubriker), Figtree (brödtext). */

@font-face { font-family: "Figtree"; font-style: normal; font-weight: 300 900; font-display: swap; src: url("/fonts/figtree-latin-wght.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; }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 300 900; font-display: swap; src: url("/fonts/figtree-latin-ext-wght.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: "Playfair Display"; font-style: normal; font-weight: 400 900; font-display: swap; src: url("/fonts/playfair-latin-wght.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; }
@font-face { font-family: "Playfair Display"; font-style: normal; font-weight: 400 900; font-display: swap; src: url("/fonts/playfair-latin-ext-wght.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: "Archivo Black"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/archivo-black-latin-400.woff2") format("woff2"); }

:root {
  --bg: #eaf3fb;
  --surface: #ffffff;
  --surface-2: #eef4fa;
  --surface-blue: #dcebf8;
  --text: #174a78;
  --heading: #174a78;
  --muted: #45607d;
  --border: #d3e2f0;
  --border-strong: #bcd0e4;
  --primary: #174a78;
  --primary-hover: #1f5d94;
  --primary-soft: #eaf3fb;
  --on-primary: #ffffff;
  --accent: #f5c842;
  --accent-hover: #e8b820;
  --on-accent: #174a78;
  --accent-soft: #fdf3d0;
  --line: #7fb0de;
  --dark: #174a78;
  --on-dark: #ffffff;
  --on-dark-muted: #c9dcef;
  --ok: #1d6a44;
  --ok-strong: #1f7a4d;
  --ok-soft: #e7f4ec;
  --bad: #a3271d;
  --bad-soft: #fbeae7;
  --warn: #6b4e00;
  --warn-soft: #fdf3d0;
  --focus: #174a78;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 1px 2px rgba(23, 74, 120, .05), 0 2px 8px rgba(23, 74, 120, .05);
  --shadow-lg: 0 18px 48px rgba(23, 74, 120, .18);
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
  --font-head: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-logo: "Archivo Black", "Arial Black", system-ui, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #071b30;
    --surface: #0e2741;
    --surface-2: #12304f;
    --surface-blue: #15385a;
    --text: #e9f1f9;
    --heading: #ffffff;
    --muted: #a8c1da;
    --border: #213f5e;
    --border-strong: #2e5379;
    --primary: #9cc6ee;
    --primary-hover: #c4ddf5;
    --primary-soft: #15385a;
    --on-primary: #071b30;
    --accent-soft: #3a3212;
    --dark: #04142a;
    --ok: #86d9a9;
    --ok-strong: #3fae73;
    --ok-soft: #12352a;
    --bad: #ff9f95;
    --bad-soft: #3d1d1c;
    --warn: #f5d272;
    --warn-soft: #3a3212;
    --focus: #f5c842;
    --shadow: none;
    --shadow-lg: 0 18px 48px rgba(0, 0, 0, .45);
    color-scheme: dark;
  }
}

/* ---------- Grund ---------- */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { font-size: 100%; -webkit-text-size-adjust: 100%; }
html.ts-stor { font-size: 112.5%; }
html.ts-storst { font-size: 125%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-wrap: break-word;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }
main, main.wrap { flex: 1; padding-top: 40px; padding-bottom: 72px; outline: none; }
h1, h2, h3, legend { line-height: 1.2; margin: 0 0 .5em; overflow-wrap: break-word; color: var(--heading); }
h1, h2 { font-family: var(--font-head); font-weight: 700; letter-spacing: -.005em; }
h1 { font-size: clamp(1.9rem, 1.35rem + 1.9vw, 2.75rem); line-height: 1.12; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; font-weight: 700; }
h1.h2 { font-size: 1.5rem; margin: 0; }
p { margin: 0 0 1em; }
strong { font-weight: 700; }
a { color: var(--primary); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--primary-hover); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
h1[tabindex="-1"]:focus, legend[tabindex="-1"]:focus, main:focus { outline: none; }
.on-dark :focus-visible, .hero-band :focus-visible, .next-card :focus-visible, .site-footer :focus-visible { outline-color: var(--accent); }
::selection { background: var(--accent); color: var(--on-accent); }
/* I läsläget är markeringen en mjuk ljusblå i stället för stark gul. */
.reader ::selection { background: rgba(127, 176, 222, .42); color: inherit; }
.muted { color: var(--muted); }
.small { font-size: .925rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -80px; background: var(--accent); color: var(--on-accent); font-weight: 700; padding: 10px 16px; border-radius: 10px; z-index: 100; }
.skip-link:focus { top: 12px; }
.icon { width: 1.25em; height: 1.25em; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Sidhuvud och meny ---------- */
.site-header { background: color-mix(in srgb, var(--surface) 92%, transparent); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; backdrop-filter: saturate(1.4) blur(10px); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); min-height: 44px; }
.brand:hover { color: var(--text); }
.brand img { width: 62px; height: auto; }
.brand span { display: flex; flex-direction: column; line-height: 1.15; }
.brand strong { font-family: var(--font-logo); font-weight: 400; font-size: 1.35rem; letter-spacing: .01em; color: var(--heading); }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px; border-radius: 999px; text-decoration: none; color: var(--heading); font-weight: 600; font-size: .975rem; }
.nav a .icon { width: 1.15em; height: 1.15em; }
.nav a:hover { background: var(--surface-blue); }
.nav a[aria-current="page"] { background: var(--dark); color: var(--on-dark); }
.nav a[aria-current="page"] .icon { color: var(--accent); }
@media (prefers-color-scheme: dark) { .nav a[aria-current="page"], .nav a[aria-current="page"] .icon { background: var(--accent); color: var(--on-accent); } }
@media (max-width: 760px) {
  .wrap { padding: 0 16px; }
  /* backdrop-filter skulle göra sidhuvudet till referens för den fasta bottenmenyn. */
  .site-header { position: static; backdrop-filter: none; background: var(--surface); }
  .header-inner { min-height: 60px; }
  .nav { position: fixed; bottom: 0; left: 0; right: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0; background: var(--surface); border-top: 1px solid var(--border); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); z-index: 30; box-shadow: 0 -4px 20px rgba(23, 74, 120, .08); }
  .nav[hidden] { display: none; }
  .nav a { flex-direction: column; gap: 2px; padding: 4px 2px; min-height: 54px; justify-content: center; font-size: .75rem; border-radius: 12px; color: var(--muted); }
  .nav a .icon { width: 1.45rem; height: 1.45rem; padding: 2px 10px; box-sizing: content-box; border-radius: 999px; transition: background-color .2s var(--ease); }
  .nav a:hover { background: transparent; }
  .nav a[aria-current="page"], .nav a[aria-current="page"]:hover { background: transparent; color: var(--heading); font-weight: 700; }
  .nav a[aria-current="page"] .icon { background: var(--accent); color: var(--on-accent); }
  body.has-nav { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
  .nav a span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  main, main.wrap { padding-top: 28px; padding-bottom: 48px; }
}
/* Sju knappar i bottenmenyn: lite mindre text på smala telefoner så att "Lektioner" får plats. */
@media (max-width: 420px) {
  .nav { padding-left: 0; padding-right: 0; }
  .nav a { font-size: .68rem; padding: 4px 0; letter-spacing: -.01em; }
  .nav a .icon { padding: 2px 8px; }
}
.site-footer { background: var(--dark); color: var(--on-dark-muted); padding: 40px 0 32px; font-size: .95rem; }
.footer-inner { display: flex; gap: 12px 28px; flex-wrap: wrap; align-items: center; }
.footer-brand { display: flex; flex-direction: column; gap: 4px; margin-right: auto; }
.footer-brand strong { font-family: var(--font-logo); font-weight: 400; letter-spacing: .01em; color: var(--on-dark); font-size: 1.2rem; }
.footer-brand span { font-family: var(--font-head); font-style: italic; color: var(--on-dark-muted); }
.site-footer a { color: var(--on-dark-muted); min-height: 44px; display: inline-flex; align-items: center; }
.site-footer a:hover { color: var(--on-dark); }
.footer-copy { width: 100%; border-top: 1px solid rgba(127, 176, 222, .25); padding-top: 16px; margin-top: 8px; font-size: .875rem; }

/* ---------- Sidrubriker ---------- */
.page-head { margin-bottom: 32px; max-width: 46rem; }
.page-head h1 { margin-bottom: .3em; }
.page-head .lead { margin: 0; }
.eyebrow { display: inline-block; margin: 0 0 .6em; font-size: .8rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--primary); }
.lead { font-size: 1.15rem; color: var(--muted); line-height: 1.6; }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; min-height: 44px; margin-bottom: 8px; }
.back-link:hover { text-decoration: underline; }
.section-title { font-size: 1.5rem; margin: 40px 0 16px; }

/* ---------- Byggstenar ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow); margin-bottom: 20px; }
.card > :last-child { margin-bottom: 0; }
.card > h2:first-child { margin-top: 0; }
.card.tint { background: var(--surface-blue); border-color: transparent; box-shadow: none; }
.grid { display: grid; gap: 20px; }
.grid > .card { margin-bottom: 0; }
/* Rutnät som följer på varandra (t.ex. nyckeltal och kapitellista i översikten) behöver luft emellan. */
.grid { margin-bottom: 20px; }
.grid:last-child { margin-bottom: 0; }
@media (min-width: 760px) {
  .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)); }
  .grid-main { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; }
}
@media (max-width: 759px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.spread { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.stack > * + * { margin-top: 14px; }
.stack-lg > * + * { margin-top: 20px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 22px; border-radius: 14px; border: 2px solid var(--primary); background: var(--primary); color: var(--on-primary); font: inherit; font-weight: 700; line-height: 1.2; cursor: pointer; text-decoration: none; text-align: center; }
.btn:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: var(--on-primary); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.accent { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.accent:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }
.btn.secondary { background: transparent; color: var(--primary); }
.btn.secondary:hover { background: var(--primary-soft); color: var(--primary); }
.btn.on-dark-outline { background: transparent; border-color: var(--line); color: var(--on-dark); }
.btn.on-dark-outline:hover { background: rgba(127, 176, 222, .16); color: var(--on-dark); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--primary); padding: 8px 12px; min-height: 44px; }
.btn.ghost:hover { background: var(--primary-soft); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
@media (prefers-color-scheme: dark) { .btn.danger { color: #2a0d0b; } }
.btn.small { min-height: 44px; padding: 6px 16px; font-size: .925rem; border-radius: 12px; }
.btn.lg { min-height: 56px; padding: 12px 28px; font-size: 1.1rem; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }
.btn .icon { width: 1.15em; height: 1.15em; }

label { font-weight: 600; display: block; margin-bottom: 6px; }
.field { margin-bottom: 20px; }
.hint { color: var(--muted); font-size: .925rem; margin-top: 6px; font-weight: 400; }
input[type="text"], input[type="email"], input[type="tel"], input[type="password"], input[type="date"], input[type="number"], select, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--surface); border: 2px solid var(--border-strong); border-radius: 12px; padding: 11px 14px; min-height: 50px;
}
select { appearance: none; padding-right: 44px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237fb0de' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 20px; cursor: pointer; }
input:hover, select:hover, textarea:hover { border-color: var(--line); }
input:focus, select:focus, textarea:focus { border-color: var(--primary); }
textarea { resize: vertical; min-height: 96px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 500; cursor: pointer; }
.check input { width: 22px; height: 22px; margin-top: 3px; flex: none; accent-color: var(--primary); cursor: pointer; }
.error-msg { color: var(--bad); background: var(--bad-soft); border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; font-weight: 500; }
.ok-msg { color: var(--ok); background: var(--ok-soft); border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; font-weight: 500; }
.pay-choice { display: grid; gap: 10px; }
.pay-option { border: 2px solid var(--border); border-radius: 14px; padding: 14px 16px; }
.pay-option:has(input:checked) { border-color: var(--primary); background: var(--surface-blue); }
.pay-option:has(input:disabled) { opacity: .6; cursor: not-allowed; }
.pay-option > span { display: grid; gap: 2px; }
.tfa-steps { padding-left: 1.25em; }
.tfa-steps li { margin-bottom: .6em; }
.tfa-key { display: block; margin: .4em 0; padding: 10px 14px; border-radius: 10px; background: var(--surface-blue); font-size: 1.1rem; letter-spacing: .08em; word-break: break-all; }
.verify-card { border-left: 4px solid var(--accent); }
.note { background: var(--warn-soft); color: var(--text); border-radius: 12px; padding: 12px 16px; margin: 0 0 1em; }
.note::before { content: "Obs! "; font-weight: 700; color: var(--warn); }
.info { background: var(--surface-blue); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 20px; }
.info > :last-child { margin-bottom: 0; }

.badge { display: inline-flex; align-items: center; font-size: .8rem; font-weight: 700; padding: 3px 11px; border-radius: 999px; background: var(--surface-2); color: var(--muted); white-space: nowrap; line-height: 1.5; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.primary { background: var(--primary-soft); color: var(--primary); }

.icon-tile { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--surface-blue); color: var(--primary); margin-bottom: 16px; }
.icon-tile .icon { width: 26px; height: 26px; }
.icon-tile.yellow { background: var(--accent-soft); color: var(--warn); }

.stat { text-align: left; }
.stat strong { display: block; font-family: var(--font-head); font-size: 2.4rem; color: var(--heading); line-height: 1.05; font-variant-numeric: lining-nums tabular-nums; }
.stat span { display: block; margin-top: 6px; color: var(--muted); font-size: .95rem; line-height: 1.4; }
.card.stat { padding: 22px 24px; }
.bar { height: 10px; background: var(--surface-blue); border-radius: 999px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--primary); border-radius: 999px; }
@media (prefers-reduced-motion: no-preference) { .bar > span { animation: grow .9s var(--ease) both; transform-origin: left; } }
@keyframes grow { from { transform: scaleX(0); } }

/* ---------- Startsida ---------- */
.bleed { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }
.hero-band { background: var(--dark); color: var(--on-dark); margin-top: -40px; padding: 72px 0 80px; position: relative; overflow: hidden; }
.hero-grid { display: grid; gap: 48px; align-items: center; position: relative; z-index: 1; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; } }

/* Startsidan: en vajande svensk flagga i nedre vänstra hörnet, rubriken mot himlen och en övningsfråga till höger. */
.hero-flag { background: #0b5aa8; padding: 88px 0 200px; isolation: isolate; }
/* Bilden är högre än heron (går 40 % nedanför) så att det finns mer flagga att visa när man skrollar. */
.hero-flag::before { content: ""; position: absolute; inset: 0 0 -40% 0; z-index: -2; background: url("/img/flagga.webp") left 68% / cover no-repeat; transform-origin: left bottom; }
/* Parallax: bilden glider uppåt lite snabbare än sidan (--scroll sätts från skriptet), så flaggan reser sig in i bild när man skrollar. */
@media (prefers-reduced-motion: no-preference) { .hero-flag::before { translate: 0 calc(var(--scroll, 0) * -.35px); } }
/* Mörkblå slöja bakom texten så att den går att läsa, medan flaggan i hörnet behåller sina färger. */
.hero-flag::after { content: ""; position: absolute; inset: 0; z-index: -1; background:
  radial-gradient(ellipse 70% 62% at 24% 34%, rgba(10, 37, 66, .72), rgba(10, 37, 66, .35) 55%, rgba(10, 37, 66, 0) 80%),
  linear-gradient(180deg, rgba(10, 37, 66, .3) 0%, rgba(10, 37, 66, 0) 35%); }
@media (min-width: 900px) { .hero-flag .hero-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); } }
.hero-flag .hero-copy { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.hero-flag .hero-copy > * { margin: 0; }
.flag-kicker { display: inline-flex; align-self: flex-start; align-items: center; gap: 10px; font-size: .85rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.flag-kicker::before { content: ""; width: 22px; height: 14px; border-radius: 2px; background: linear-gradient(90deg, transparent 0 32%, var(--accent) 32% 46%, transparent 46%), linear-gradient(180deg, #2a6cb0 0 42%, var(--accent) 42% 58%, #2a6cb0 58%); box-shadow: 0 0 0 1px rgba(255, 255, 255, .35); }
.hero-flag h1 { color: #fff; font-size: clamp(2.3rem, 1.6rem + 2.6vw, 3.6rem); line-height: 1.08; letter-spacing: -.01em; text-wrap: balance; text-shadow: 0 2px 24px rgba(4, 20, 42, .35); }
.hero-flag .lead { color: #e3eef8; font-size: 1.2rem; max-width: 34em; text-shadow: 0 1px 12px rgba(4, 20, 42, .4); }
.hero-flag .row { gap: 12px; padding-top: 8px; }
.hero-flag .btn.ghost { background: rgba(10, 37, 66, .3); border-color: #7fb0de; color: #fff; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.hero-flag .btn.ghost:hover { border-color: #fff; color: #fff; }
.hero-flag .fine { font-size: .95rem; color: #c3daf0; }

.quiz-card { background: #fff; color: #174a78; border-radius: 24px; padding: 28px; box-shadow: 0 30px 70px rgba(3, 20, 38, .45), 0 0 0 1px rgba(255, 255, 255, .5); display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.quiz-card > * { margin: 0; }
.quiz-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .85rem; font-weight: 600; color: #44607e; }
.quiz-pill { font-size: .78rem; font-weight: 700; padding: 4px 12px; border-radius: 999px; background: #dcebf8; color: #174a78; }
.quiz-bar { display: flex; gap: 4px; }
.quiz-bar span { flex: 1; height: 6px; border-radius: 99px; background: #dcebf8; }
.quiz-bar .done { background: #174a78; }
.quiz-bar .now { background: var(--accent); }
.quiz-q { font-family: var(--font-head); font-size: 1.35rem; font-weight: 600; line-height: 1.3; }
.quiz-opt { display: flex; gap: 12px; align-items: center; border: 2px solid #d9e3ee; border-radius: 14px; padding: 12px 14px; }
.quiz-opt b { width: 30px; height: 30px; border-radius: 9px; background: #dcebf8; display: grid; place-items: center; flex: none; }
.quiz-opt.right { border-color: #1f7a4d; background: #e7f4ec; font-weight: 600; }
.quiz-opt.right b { background: #1f7a4d; color: #fff; }
.quiz-feedback { font-size: .95rem; color: #1f5e3e; background: #e7f4ec; border-radius: 12px; padding: 10px 14px; }

@media (max-width: 899px) {
  .hero-flag { padding: 56px 0 180px; }
  .hero-flag::before { background-position: left 75%; background-size: auto 100%; }
  .hero-flag::after { background: linear-gradient(180deg, rgba(10, 37, 66, .7) 0%, rgba(10, 37, 66, .45) 55%, rgba(10, 37, 66, 0) 85%); }
}
@media (max-width: 760px) { .hero-band.hero-flag { padding: 44px 0 160px; } .quiz-card { padding: 22px; } }

@media (prefers-reduced-motion: no-preference) {
  .hero-flag .hero-copy > * { animation: flag-rise .8s var(--ease) both; }
  .hero-flag .hero-copy > :nth-child(2) { animation-delay: .08s; }
  .hero-flag .hero-copy > :nth-child(3) { animation-delay: .16s; }
  .hero-flag .hero-copy > :nth-child(4) { animation-delay: .24s; }
  .hero-flag .hero-copy > :nth-child(5) { animation-delay: .32s; }
  .quiz-card { animation: flag-rise .8s .2s var(--ease) both; }
  /* Frågan spelas upp en gång: stapeln fylls, B väljs och blir grön, och svaret glider fram. */
  .quiz-bar .now { transform-origin: left; animation: quiz-fill .6s 1s var(--ease) both; }
  .quiz-opt.right { animation: quiz-pick .45s 1.7s ease-out both; }
  .quiz-opt.right b { animation: quiz-pick-b .45s 1.7s ease-out both, quiz-pop .4s 1.7s var(--ease); }
  .quiz-feedback { animation: quiz-show .5s 2.15s var(--ease) both; }
  .hero-flag::before { animation: flag-drift 24s ease-in-out infinite alternate; }
}
@keyframes flag-rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes quiz-fill { from { transform: scaleX(0); } }
@keyframes quiz-pick { from { border-color: #d9e3ee; background: #fff; } }
@keyframes quiz-pick-b { from { background: #dcebf8; color: #174a78; } }
@keyframes quiz-pop { 50% { transform: scale(1.18); } }
@keyframes quiz-show { from { opacity: 0; transform: translateY(-6px); } }
@keyframes flag-drift { from { transform: scale(1.02); } to { transform: scale(1.07); } }

/* Filmer */
.film { margin: 0 0 40px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 14px; box-shadow: var(--shadow); }
.film-frame { aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: #174a78; }
.film-frame video { display: block; width: 100%; height: 100%; object-fit: contain; background: #000; }
.film-close { display: none; }
.film-frame.is-full { position: fixed; inset: 0; z-index: 100; aspect-ratio: auto; border-radius: 0; background: #000; }
.film-frame.is-full .film-close { display: grid; place-items: center; position: absolute; top: max(12px, env(safe-area-inset-top)); right: 12px; width: 48px; height: 48px; border: 0; border-radius: 50%; background: var(--accent); color: #174a78; cursor: pointer; z-index: 1; }
.film-frame.is-full .film-close .icon { width: 24px; height: 24px; }
body.film-open { overflow: hidden; }
.film-placeholder { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 16px; text-align: center; color: #ffffff; font-weight: 700; background: radial-gradient(circle at 30% 20%, rgba(127, 176, 222, .35), transparent 60%), #174a78; }
.film-play { width: 68px; height: 68px; border-radius: 50%; background: var(--accent); color: #174a78; display: grid; place-items: center; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); }
.film-play .icon { width: 30px; height: 30px; margin-left: 4px; }
.film-play .icon, .film-chip .icon { fill: currentColor; }
.film-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; padding: 14px 8px 0; }
.film-speed { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.film-speed-label { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--heading); }
.film-speed-label .icon { width: 1.2em; height: 1.2em; }
.film-tools .segmented button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); box-shadow: none; }
.film-tools .btn .icon { width: 1.1em; height: 1.1em; }
.film-hint { margin: 10px 8px 0; color: var(--muted); }
@media (max-width: 520px) {
  .film-speed, .film-speed .segmented { width: 100%; }
  .film-speed .segmented button { flex: 1 1 0; padding: 8px 4px; }
}
.film-caption { display: flex; flex-direction: column; gap: 2px; padding: 14px 8px 4px; }
.film-caption strong { font-family: var(--font-head); font-size: 1.3rem; line-height: 1.3; color: var(--heading); }
.film-caption span { color: var(--muted); font-size: .95rem; }
.film-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.film-card { display: flex; flex-direction: column; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 20px; }
.film-card h2 { font-size: 1.2rem; margin: 0; line-height: 1.3; }
.film-card .eyebrow { margin: 0; }
.film-card .soon { margin: 0; color: var(--muted); font-size: .95rem; }
.film-card .row { margin-top: auto; padding-top: 4px; gap: 8px; }
.film-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 14px; border-radius: 999px; border: 2px solid var(--border); background: var(--surface); color: var(--heading); font: inherit; font-size: .95rem; font-weight: 700; cursor: pointer; text-align: left; }
.film-chip .icon { width: 1em; height: 1em; flex: none; }
.film-chip small { font-weight: 600; color: var(--muted); }
.film-chip:hover { border-color: var(--primary); }
.film-chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.film-chip[aria-pressed="true"] small { color: var(--on-accent); }

.section { padding: 64px 0 8px; }
.section-head { max-width: 40rem; margin-bottom: 28px; }
.section-head h2 { font-size: clamp(1.75rem, 1.3rem + 1.4vw, 2.4rem); line-height: 1.15; }
.step-card h3 { font-family: var(--font-head); font-size: 1.6rem; margin-bottom: .35em; }
.step-card .step-num { display: block; font-size: .85rem; font-weight: 700; color: var(--muted); margin-bottom: 2px; }
.step-card p:last-child { color: var(--muted); }
.quote-band { background: var(--surface); border-top: 1px solid var(--border); margin-top: 64px; margin-bottom: -72px; padding: 48px 0; }
.quote-band .wrap { display: flex; flex-wrap: wrap; gap: 20px 48px; align-items: center; justify-content: space-between; }
.quote-band blockquote { margin: 0; font-family: var(--font-head); font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); line-height: 1.3; color: var(--heading); max-width: 24em; }
.quote-band p { margin: 0; color: var(--muted); max-width: 28em; }
@media (max-width: 760px) { .hero-band { margin-top: -28px; padding: 48px 0 56px; } .quote-band { margin-bottom: -48px; } }

/* ---------- Inloggning ---------- */
.auth-layout { display: grid; gap: 28px; align-items: start; }
@media (min-width: 900px) { .auth-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 40px; } }
.auth-aside { background: var(--dark); color: var(--on-dark-muted); border-radius: var(--radius-lg); padding: 36px; }
.auth-aside h2 { color: var(--on-dark); font-size: 1.75rem; }
.auth-aside .feature-list li::before { color: var(--accent); }
.auth-aside .feature-list li { color: var(--on-dark); }
.auth-form-wrap .card { padding: 32px; }
.auth-switch { margin-top: 4px; }
@media (max-width: 899px) { .auth-aside { order: 2; } }

/* ---------- Översikt ---------- */
.dash-head { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: flex-end; margin-bottom: 28px; }
.dash-head h1 { margin: 0; }
.chip { display: inline-flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 6px 18px 6px 6px; font-weight: 600; }
.chip .dot { width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; }
.chip .dot .icon { width: 17px; height: 17px; }
.next-card { background: var(--dark); color: var(--on-dark); border-radius: var(--radius-lg); padding: 32px 36px; margin-bottom: 20px; display: flex; flex-wrap: wrap; gap: 20px 32px; align-items: center; justify-content: space-between; position: relative; overflow: hidden; }
.next-card::after { content: ""; position: absolute; right: -60px; top: -90px; width: 240px; height: 240px; border-radius: 50%; border: 36px solid rgba(245, 200, 66, .1); pointer-events: none; }
.next-card > * { position: relative; z-index: 1; }
.next-card h2 { color: var(--on-dark); font-size: clamp(1.4rem, 1.15rem + .9vw, 1.85rem); margin: 0 0 .25em; }
.next-card .eyebrow { color: var(--accent); }
.next-card p { margin: 0; color: var(--on-dark-muted); max-width: 40em; }
.next-card .btn { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.next-card .btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.streak { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--muted); margin: -4px 0 20px; }

/* ---------- Kapitellista ---------- */
.chapter-list { list-style: none; padding: 0; margin: 0; }
.chapter-list li { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 14px 0; border-bottom: 1px solid var(--border); }
.chapter-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.chapter-list li:first-child { padding-top: 4px; }
.chapter-num { display: inline-grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 12px; background: var(--primary-soft); color: var(--primary); font-weight: 800; flex: none; font-variant-numeric: tabular-nums; }
.chapter-num.done { background: var(--primary); color: var(--on-primary); }
.chapter-title { display: flex; align-items: center; gap: 14px; min-width: 0; flex: 1 1 260px; }
.chapter-title .name { font-weight: 600; }
.chapter-title .row { margin-top: 4px; gap: 6px; }

.chapter-grid { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 14px; }
@media (min-width: 640px) { .chapter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 980px) { .chapter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.chapter-tile { display: flex; gap: 16px; align-items: flex-start; height: 100%; padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; color: var(--text); box-shadow: var(--shadow); }
.chapter-tile:hover { color: var(--text); border-color: var(--line); transform: translateY(-2px); box-shadow: 0 10px 28px rgba(23, 74, 120, .1); }
.chapter-tile .name { display: block; font-weight: 700; line-height: 1.35; color: var(--heading); margin-bottom: 6px; }
/* Läs och Lektioner: ett kapitel per rad */
.chapter-grid.chapter-rows { grid-template-columns: minmax(0, 1fr); gap: 10px; }
.chapter-rows .chapter-tile { align-items: center; padding: 16px 20px; }
.chapter-rows .chapter-tile:hover { transform: translateX(3px); }
.chapter-rows .chapter-tile:not(.lesson-tile) > span:last-child { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; }
.chapter-rows .chapter-tile .name { margin-bottom: 0; }
@media (min-width: 760px) {
  .chapter-rows .lesson-tile-body { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 24px; row-gap: 6px; align-items: center; }
  .chapter-rows .lesson-tile-meta { grid-column: 2; grid-row: 1 / span 3; justify-content: flex-end; }
}

/* ---------- Läsläge ---------- */
.reader-tools { position: sticky; top: 72px; z-index: 10; }
@media (max-width: 760px) { .reader-tools { position: static; } }
.reader { font-size: 1.125rem; line-height: 1.75; max-width: 68ch; margin: 8px 0 32px; }
.reader h3 { font-family: var(--font-head); font-size: 1.5rem; margin-top: 1.6em; }
.reader > :first-child h3, .reader > h3:first-child { margin-top: .4em; }
.reader ul, .reader ol { padding-left: 1.4em; margin: 0 0 1em; }
.reader li { margin-bottom: .35em; }
.reader li::marker { color: var(--line); }
.block { position: relative; }
.reader-options { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; }
.reader-fig { margin: 1.4em 0; max-width: 28rem; }
.reader-fig img { display: block; max-width: 100%; height: auto; border-radius: var(--radius); background: var(--surface-2); }
.reader-fig figcaption { margin-top: 8px; font-size: .9rem; line-height: 1.5; color: var(--muted); }
.reader-fig .fig-credit { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.reader.no-images .reader-fig { display: none; }
.switch { display: inline-flex; align-items: center; gap: 10px; font: inherit; font-weight: 700; color: var(--heading); background: transparent; border: 0; padding: 8px 4px; min-height: 44px; cursor: pointer; }
.switch-track { position: relative; width: 46px; height: 26px; flex: none; border-radius: 999px; background: var(--border-strong); transition: background .2s var(--ease); }
.switch-thumb { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 3px rgba(23, 74, 120, .35); transition: transform .2s var(--ease); }
.switch[aria-checked="true"] .switch-track { background: var(--ok-strong); }
.switch[aria-checked="true"] .switch-thumb { transform: translateX(20px); }
@media (prefers-reduced-motion: reduce) { .switch-track, .switch-thumb { transition: none; } }
.explain-btn { margin: -.5em 0 .9em -12px; font-size: .9rem; }
.explain-btn::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.explanation { background: var(--surface-blue); border-radius: var(--radius); padding: 16px 20px; margin: 0 0 1.2em; font-size: 1.05rem; }
.explanation p:last-child { margin-bottom: 0; }
@media (prefers-reduced-motion: no-preference) { .explanation, .feedback, .msg { animation: rise .35s var(--ease) both; } }
.segmented { display: inline-flex; padding: 4px; gap: 4px; background: var(--surface-2); border-radius: 14px; }
.segmented button { font: inherit; font-weight: 700; border: 0; background: transparent; color: var(--muted); padding: 8px 18px; min-height: 44px; border-radius: 10px; cursor: pointer; }
.segmented button:hover { color: var(--heading); }
.segmented button[aria-pressed="true"] { background: var(--surface); color: var(--heading); box-shadow: 0 1px 4px rgba(23, 74, 120, .15); }
.selection-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 24px; z-index: 40; box-shadow: var(--shadow-lg); background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.selection-bar:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }
@media (max-width: 760px) { .selection-bar { bottom: calc(84px + env(safe-area-inset-bottom)); } }

/* ---------- Quiz ---------- */
.quiz-shell { max-width: 760px; margin: 0 auto; }
.quiz-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.progress-dots { display: flex; gap: 4px; margin-bottom: 20px; }
.progress-dots span { flex: 1 1 0; min-width: 4px; height: 7px; border-radius: 999px; background: var(--border); transition: background-color .3s var(--ease); }
.progress-dots span.done { background: var(--primary); }
.progress-dots span.current { background: var(--accent); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-family: var(--font-head); font-size: clamp(1.35rem, 1.15rem + .8vw, 1.75rem); font-weight: 700; margin-bottom: 20px; padding: 0; line-height: 1.3; }
legend.small { font-family: var(--font-body); font-size: .925rem; font-weight: 700; color: var(--muted); margin-bottom: 10px; }
.option { display: flex; gap: 14px; align-items: center; border: 2px solid var(--border-strong); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px; cursor: pointer; background: var(--surface); font-weight: 500; min-height: 60px; position: relative; }
.option:hover { border-color: var(--primary); background: color-mix(in srgb, var(--surface-blue) 50%, var(--surface)); }
.option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.option .key { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--surface-blue); color: var(--primary); font-weight: 800; flex: none; transition: background-color .15s, color .15s; }
.option:has(input:checked) { border-color: var(--primary); background: var(--surface-blue); }
.option:has(input:checked) .key { background: var(--primary); color: var(--on-primary); }
.option:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 3px; }
.option > span:last-child { flex: 1; min-width: 0; }
.option.correct, .option.correct:hover, .option.correct:has(input:checked) { border-color: var(--ok-strong); background: var(--ok-soft); font-weight: 600; }
.option.correct .key, .option.correct:has(input:checked) .key { background: var(--ok-strong); color: #fff; }
.option.wrong, .option.wrong:hover, .option.wrong:has(input:checked) { border-color: var(--bad); background: var(--bad-soft); }
.option.wrong .key, .option.wrong:has(input:checked) .key { background: var(--bad); color: #fff; }
.option.locked { cursor: default; }
.option.correct::after, .option.wrong::after { flex: none; font-size: .8rem; font-weight: 700; padding-left: 4px; white-space: nowrap; }
@media (max-width: 520px) {
  .option.correct, .option.wrong { flex-wrap: wrap; row-gap: 2px; }
  .option.correct::after, .option.wrong::after { flex-basis: 100%; padding-left: 48px; }
}
.option.correct::after { content: "Rätt svar"; color: var(--ok); }
.option.wrong::after { content: "Ditt svar"; color: var(--bad); }
.feedback { border-radius: var(--radius); padding: 18px 20px; margin: 16px 0 0; }
.feedback.ok { background: var(--ok-soft); }
.feedback.bad { background: var(--bad-soft); }
.feedback h3 { margin-bottom: .3em; font-size: 1.25rem; }
.feedback.ok h3 { color: var(--ok); }
.feedback.bad h3 { color: var(--bad); }
.feedback > :last-child { margin-bottom: 0; }
.feedback .ask-ai { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 18px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--surface-blue); border-radius: var(--radius); }
.ask-ai-icon { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--warn); }
.ask-ai-text { flex: 1 1 220px; }
.ask-ai-text p { margin: 0; }
.ask-ai-title { font-weight: 700; color: var(--primary); }
.hint-wrap { margin: 4px 0 14px; }
.hint-toggle { gap: 6px; }
.hint-box { margin-top: 8px; background: var(--accent-soft); border-left: 5px solid var(--accent); border-radius: var(--radius); padding: 12px 16px; }
.hint-box p { margin: 0; }
.hint-box .hint-box-title { display: flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--warn); margin-bottom: 4px; }
@media (prefers-reduced-motion: no-preference) { .hint-box:not([hidden]) { animation: soft-in .25s var(--ease) both; } }
.timer { font-variant-numeric: tabular-nums; font-weight: 700; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 4px 14px; }
.timer.low { color: var(--bad); border-color: var(--bad); }
.qgrid { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.qgrid button { width: 44px; height: 44px; border-radius: 12px; border: 2px solid var(--border-strong); background: var(--surface); color: var(--text); font: inherit; font-weight: 700; cursor: pointer; font-variant-numeric: tabular-nums; }
.qgrid button:hover { border-color: var(--primary); }
.qgrid button.answered { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }
.qgrid button[aria-current="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.review-item { border-left: 4px solid var(--border); padding: 4px 0 4px 16px; margin-bottom: 20px; }
.review-item.bad { border-color: var(--bad); }
.review-item.ok { border-color: var(--ok); }
.result-score { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 0; }
.result-score strong { font-family: var(--font-head); font-size: clamp(2.6rem, 2rem + 2.5vw, 3.75rem); line-height: 1; color: var(--heading); }
.result-score span { color: var(--muted); font-weight: 600; font-size: 1.1rem; }

/* ---------- Chatt ---------- */
.chat-shell { max-width: 820px; margin: 0 auto; }
.chat { display: flex; flex-direction: column; gap: 16px; }
.chat-log { display: flex; flex-direction: column; gap: 14px; }
.msg { max-width: 85%; padding: 14px 18px; border-radius: 20px; overflow-wrap: anywhere; }
.msg.user { align-self: flex-end; background: var(--primary); color: var(--on-primary); border-bottom-right-radius: 6px; white-space: pre-wrap; }
.msg.assistant { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 6px; box-shadow: var(--shadow); }
.msg.assistant h3 { font-size: 1.05rem; margin-top: .6em; }
.msg.assistant ul, .msg.assistant ol { padding-left: 1.3em; margin: 0 0 .8em; }
.msg.assistant p:last-child { margin-bottom: 0; }
.msg.notice { align-self: center; background: var(--warn-soft); font-size: .925rem; border-radius: 12px; }
.chat-form { position: sticky; bottom: 0; background: var(--bg); padding: 12px 0 8px; border-top: 1px solid transparent; }
.chat-form textarea { border-radius: 16px; }
@media (max-width: 760px) { .chat-form { bottom: calc(70px + env(safe-area-inset-bottom)); } .msg { max-width: 92%; } }
.suggestions { display: flex; flex-wrap: wrap; gap: 10px; }
.suggestions .btn { border-color: var(--border-strong); background: var(--surface); color: var(--heading); font-weight: 600; border-radius: 999px; text-align: left; }
.suggestions .btn:hover { border-color: var(--primary); background: var(--surface-blue); }
.typing { color: var(--muted); font-style: italic; }
@media (prefers-reduced-motion: no-preference) { .typing { animation: pulse 1.4s ease-in-out infinite; } }
@keyframes pulse { 50% { opacity: .45; } }

.ai-meta { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: center; font-size: .95rem; color: var(--muted); margin-bottom: 14px; }
.lang-bar { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px 18px; background: var(--surface); border: 2px solid var(--primary); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 12px; box-shadow: var(--shadow); }
.lang-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); flex: none; }
.lang-icon .icon { width: 24px; height: 24px; }
.lang-field { flex: 1 1 240px; min-width: 0; }
.lang-field label { font-size: 1.05rem; }
.lang-hint { margin: 8px 0 0; color: var(--muted); }
.info-dismissable { position: relative; padding-right: 60px; }
.info-close { position: absolute; top: 6px; right: 6px; width: 44px; height: 44px; border: 0; border-radius: 12px; background: transparent; color: var(--heading); display: grid; place-items: center; cursor: pointer; }
.info-close:hover { background: color-mix(in srgb, var(--surface) 65%, transparent); }

/* ---------- Översikt: klickbara nyckeltal, diagram och att jobba på ---------- */
.stat-link { font: inherit; color: inherit; text-align: left; width: 100%; cursor: pointer; display: flex; flex-direction: column; align-items: flex-start; }
.stat-link:hover { border-color: var(--line); transform: translateY(-2px); box-shadow: 0 10px 28px rgba(23, 74, 120, .1); }
.stat .stat-action { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 12px; font-size: .85rem; font-weight: 700; color: var(--primary); }
.stat-action .icon { width: 1em; height: 1em; transition: transform .2s var(--ease); }
.stat-link:hover .stat-action .icon { transform: translateY(3px); }
.chapter-list li, #utveckling, #att-jobba { scroll-margin-top: 96px; }
.flash { animation: flash 2.4s var(--ease); }
.chapter-list li.flash { border-radius: 12px; }
@keyframes flash { 0%, 55% { background-color: var(--accent-soft); box-shadow: 0 0 0 3px var(--accent); } }
.chart { display: block; width: 100%; height: auto; margin: 8px 0 4px; overflow: visible; }
.chart-grid { stroke: var(--border); stroke-width: 1; }
.chart-goal { stroke: var(--line); stroke-width: 2; stroke-dasharray: 6 5; }
.chart-axis { fill: var(--muted); font-size: 12px; font-family: var(--font-body); }
.chart-value { fill: var(--heading); font-size: 14px; font-weight: 700; font-family: var(--font-body); }
.chart-wrap { position: relative; }
.chart-line { touch-action: pan-y; cursor: crosshair; }
.chart-fill-top { stop-color: var(--primary); stop-opacity: .2; }
.chart-fill-bottom { stop-color: var(--primary); stop-opacity: 0; }
.chart-path { fill: none; stroke: var(--primary); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart-guide { stroke: var(--border-strong); stroke-width: 1; stroke-dasharray: 3 4; }
.chart-goal-label { font-weight: 600; }
.chart-dot { fill: var(--primary); stroke: var(--surface); stroke-width: 2; transform-box: fill-box; transform-origin: center; transition: r .15s var(--ease); }
.chart-dot.active { r: 7px; }
.chart-dot.latest { fill: var(--accent); stroke: var(--surface); stroke-width: 3; }
.chart-dot.latest.active { r: 9px; }
.chart-tip { position: absolute; transform: translate(-50%, calc(-100% - 14px)); display: flex; flex-direction: column; gap: 1px; padding: 8px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); font-size: .85rem; color: var(--muted); white-space: nowrap; pointer-events: none; z-index: 2; }
.chart-tip strong { color: var(--heading); font-size: 1rem; }
.chart-tip.flip-left { transform: translate(calc(-100% + 18px), calc(-100% - 14px)); }
.chart-tip.flip-right { transform: translate(-18px, calc(-100% - 14px)); }
.chart-tip.below { transform: translate(-50%, 16px); }
.chart-tip.below.flip-left { transform: translate(calc(-100% + 18px), 16px); }
.chart-tip.below.flip-right { transform: translate(-18px, 16px); }
@media (prefers-reduced-motion: no-preference) {
  .chart-path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: chart-draw 1s var(--ease) .1s forwards; }
  .chart-area { animation: soft-in .6s var(--ease) .5s both; }
  .chart-dot { animation: soft-in .3s var(--ease) both; animation-delay: .7s; }
  .chart-dot.latest { animation: pop .5s var(--ease) 1s both; }
}
@keyframes chart-draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .chart-dot { transition: none; } }
.chart-note { margin: 4px 0 0; }
.chart-empty { border: 2px dashed var(--border-strong); border-radius: var(--radius); padding: 24px; text-align: center; color: var(--muted); margin: 8px 0 0; }
.focus-mistakes { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; background: var(--accent-soft); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 8px; }
.focus-mistakes p { margin: 0; }

/* ---------- Läsläge: tips, knappar bredvid texten och kapitelbläddring ---------- */
.tip { margin-top: 14px; background: var(--dark); color: var(--on-dark); border-radius: var(--radius); padding: 14px 18px; border-left: 6px solid var(--accent); }
.tip p { margin: 0; font-weight: 500; }
.tip .tip-title { color: var(--accent); font-size: .8rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 4px; }
.btn.lift:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.btn.lift .icon { transition: transform .25s var(--ease); }
.btn.lift:hover .icon { transform: translateX(5px); }
.read-toggle[aria-pressed="true"] { background: var(--ok-soft); border-color: var(--ok-strong); color: var(--ok); }
.read-toggle[aria-pressed="true"]:hover { background: var(--ok-soft); color: var(--ok); }
@media (min-width: 900px) {
  .reader { max-width: calc(68ch + 12rem); }
  .reader .block { display: grid; grid-template-columns: minmax(0, 1fr) 10.5rem; column-gap: 24px; align-items: start; }
  .reader .block > :first-child { grid-column: 1; }
  .reader .block .explain-btn { grid-column: 2; grid-row: 1; margin: .2em 0 0; justify-self: start; white-space: nowrap; border: 1px solid var(--border-strong); background: var(--surface); border-radius: 999px; }
  .reader .block .explain-btn:hover { border-color: var(--primary); background: var(--surface-blue); }
  .reader .block .explanation { grid-column: 1 / -1; }
}
.chapter-pager { display: grid; gap: 12px; margin-top: 8px; }
@media (min-width: 640px) { .chapter-pager { grid-template-columns: 1fr 1fr; } .chapter-pager a.next { grid-column: 2; } }
.chapter-pager a { display: flex; flex-direction: column; gap: 4px; padding: 18px 22px; border-radius: var(--radius); border: 1px solid transparent; background: var(--dark); color: var(--on-dark); text-decoration: none; font-weight: 700; min-height: 44px; box-shadow: var(--shadow); }
.chapter-pager a:hover { color: var(--on-dark); transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.chapter-pager a small { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; font-weight: 700; color: var(--accent); }
.chapter-pager a.next { text-align: right; align-items: flex-end; }
.chapter-pager .icon { width: 1.1em; height: 1.1em; transition: transform .25s var(--ease); }
.chapter-pager a.next:hover .icon { transform: translateX(5px); }
.chapter-pager a.prev:hover .icon { transform: translateX(-5px); }
@media (prefers-color-scheme: dark) { .chapter-pager a { border-color: var(--border-strong); } }

/* ---------- Öva: fyra val, inställningar efter valet ---------- */
.mode-choices { display: grid; gap: 16px; margin-bottom: 24px; }
@media (min-width: 640px) { .mode-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) {
  .mode-choices { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
  .mode-choices .mode-choice { padding: 20px; }
  .mode-choices .mode-choice-title { font-size: 1.25rem; }
}
.mode-choice { font: inherit; text-align: left; color: var(--text); background: var(--surface); border: 2px solid var(--border); border-radius: var(--radius-lg); padding: 24px; cursor: pointer; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; box-shadow: var(--shadow); }
.mode-choice .icon-tile { margin-bottom: 10px; }
.mode-choice-title { font-family: var(--font-head); font-size: 1.45rem; font-weight: 700; color: var(--heading); line-height: 1.2; }
.mode-choice-text { color: var(--muted); font-size: .95rem; line-height: 1.45; }
.mode-choice-go { margin-top: auto; padding-top: 14px; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--primary); }
.mode-choice-go .icon { transition: transform .2s var(--ease); }
.mode-choice:hover { border-color: var(--line); transform: translateY(-3px); box-shadow: 0 12px 30px rgba(23, 74, 120, .12); }
.mode-choice:hover .mode-choice-go .icon { transform: translateX(4px); }
.mode-choice[aria-expanded="true"] { background: var(--dark); border-color: var(--dark); color: var(--on-dark); }
.mode-choice[aria-expanded="true"] .mode-choice-title { color: var(--on-dark); }
.mode-choice[aria-expanded="true"] .mode-choice-text { color: var(--on-dark-muted); }
.mode-choice[aria-expanded="true"] .mode-choice-go { color: var(--accent); }
.mode-choice[aria-expanded="true"] .icon-tile { background: var(--accent); color: var(--on-accent); }
.mode-choice[aria-expanded="true"] :focus-visible, .mode-choice[aria-expanded="true"]:focus-visible { outline-color: var(--accent); }
@media (prefers-color-scheme: dark) { .mode-choice[aria-expanded="true"] { border-color: var(--accent); } }
.mode-panel { scroll-margin-top: 96px; }
.mode-panel:empty { display: none; }
.setup-card h2 { font-size: clamp(1.5rem, 1.3rem + .8vw, 1.9rem); }
.setup-card .checks { gap: 10px 16px; margin-bottom: 0; }
.setup-card .field .row { gap: 10px 28px; }
.exam-card { border: 2px solid var(--primary); }
@media (prefers-reduced-motion: no-preference) { .setup-card { animation: rise .35s var(--ease) both; } }
@media (max-width: 760px) { .chapter-list li, #utveckling, #att-jobba, .mode-panel { scroll-margin-top: 16px; } }

/* ---------- Konto ---------- */
.settings-shell { max-width: 760px; }
.danger-zone { border-color: color-mix(in srgb, var(--bad) 35%, var(--border)); }
.danger-zone h2 { color: var(--bad); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--dark); color: var(--on-dark); padding: 12px 20px; border-radius: 14px; z-index: 60; max-width: calc(100% - 32px); box-shadow: var(--shadow-lg); font-weight: 500; }
@media (prefers-color-scheme: dark) { .toast { background: var(--surface-2); border: 1px solid var(--border-strong); } }
@media (prefers-reduced-motion: no-preference) { .toast:not([hidden]) { animation: rise .3s var(--ease) both; } }
@media (max-width: 760px) { .toast { bottom: calc(84px + env(safe-area-inset-bottom)); } }

.hero { padding: 24px 0 8px; }
.feature-list { list-style: none; padding: 0; margin: 0; }
.feature-list li { padding-left: 1.9em; position: relative; margin-bottom: .7em; }
.feature-list li::before { content: ""; position: absolute; left: 0; top: .32em; width: 1.15em; height: 1.15em; border-radius: 50%; background: var(--ok-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f7a4d' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E") center / 70% no-repeat; }
.feature-group h3 { font-family: var(--font-head); font-size: 1.6rem; margin-bottom: .25em; }
.feature-group > .muted { margin-bottom: 20px; }
.feature-items { margin: 0; display: grid; gap: 14px; }
.feature-items > div { padding-left: 1.9em; position: relative; }
.feature-items > div::before { content: ""; position: absolute; left: 0; top: .3em; width: 1.15em; height: 1.15em; border-radius: 50%; background: var(--ok-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f7a4d' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E") center / 70% no-repeat; }
.feature-items dt { font-weight: 700; }
.feature-items dd { margin: 2px 0 0; color: var(--muted); }
.feature-note { margin: 24px 0 0; color: var(--muted); max-width: 46rem; }
.about-test { max-width: 52rem; }
@media (min-width: 640px) { .feature-list.cols { columns: 2; column-gap: 32px; } .feature-list.cols li { break-inside: avoid; } }
.policy { max-width: 820px; }
.policy h2 { margin-top: 1.6em; font-size: 1.4rem; }
.policy table { border-collapse: collapse; width: 100%; font-size: .95rem; }
.policy th, .policy td { text-align: left; border-bottom: 1px solid var(--border); padding: 10px 8px; vertical-align: top; }
.policy th { font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.policy li { margin-bottom: .4em; }
.table-scroll { overflow-x: auto; }

@media (max-width: 480px) {
  .card { padding: 20px; border-radius: 20px; }
  .next-card { padding: 24px; }
  .btn { width: auto; }
  .stat strong { font-size: 2rem; }
}

/* Flashkort */
.flashcard { display: block; width: 100%; min-height: 320px; perspective: 1400px; cursor: pointer; border-radius: var(--radius-lg); margin-bottom: 16px; }
.flashcard.flipped { cursor: default; }
.flash-inner { position: relative; display: grid; min-height: inherit; transform-style: preserve-3d; }
.flash-face { grid-area: 1 / 1; display: flex; flex-direction: column; justify-content: center; gap: 12px; padding: 32px; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow); backface-visibility: hidden; -webkit-backface-visibility: hidden; text-align: left; }
.flash-face p { margin: 0; }
.flash-front { border-bottom: 6px solid var(--accent); }
.flash-back { background: var(--dark); color: var(--on-dark); border-color: var(--dark); transform: rotateY(180deg); }
.flash-back .eyebrow { color: var(--accent); }
.flash-back a { color: var(--accent); }
.flash-question { font-family: var(--font-head); font-size: clamp(1.4rem, 1.2rem + 1vw, 2rem); font-weight: 700; line-height: 1.3; color: var(--heading); }
.flash-answer { font-family: var(--font-head); font-size: clamp(1.35rem, 1.15rem + .9vw, 1.85rem); font-weight: 700; line-height: 1.3; color: var(--on-dark); }
.flash-hint { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; color: var(--primary); font-weight: 700; }
.flash-hint .icon { width: 1em; height: 1em; }
.flashcard:hover .flash-front { border-color: var(--line); border-bottom-color: var(--accent); }
.flashcard.flipped .flash-inner { transform: rotateY(180deg); }
.flash-verdict { margin-bottom: 8px; }
@media (prefers-reduced-motion: no-preference) {
  .flash-inner { transition: transform .55s cubic-bezier(.3, .7, .3, 1); }
  .flashcard:not(.flipped):hover .flash-inner { transform: rotateY(-4deg); }
  .flash-verdict:not([hidden]) { animation: soft-in .4s .25s var(--ease) both; }
  .flash-verdict:not([hidden]) .btn:nth-child(2) { animation: soft-in .4s .32s var(--ease) both; }
}
/* Utan rörelse byts sidorna direkt i stället för att vändas. */
@media (prefers-reduced-motion: reduce) {
  .flash-inner { transform: none !important; }
  .flash-back { transform: none; visibility: hidden; }
  .flashcard.flipped .flash-front { visibility: hidden; }
  .flashcard.flipped .flash-back { visibility: visible; }
}
@media (max-width: 520px) { .flash-face { padding: 22px; } .flashcard { min-height: 280px; } }

/* ---------- Rörelse och tydlighet (anteckningar i designen) ---------- */
/* Översikt: utvecklingen över hela bredden, resten under. */
.progress-card { margin-bottom: 20px; }
.progress-card .chart { width: 100%; height: auto; max-height: 320px; }
.stack-cards > .card:last-child { margin-bottom: 0; }
.countdown { position: relative; }
.confetti { position: absolute; left: 22px; top: 50%; width: 0; height: 0; pointer-events: none; }
.confetti i { position: absolute; width: 5px; height: 7px; border-radius: 2px; opacity: 0; }
.btn.lift .icon { transition: transform .25s var(--ease); }
.btn.shine { position: relative; overflow: hidden; }
.btn.shine::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 70%); transform: translateX(-120%); pointer-events: none; }
/* Läs: lästa kapitel syns direkt. */
.read-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; margin: -8px 0 24px; max-width: 34rem; }
.read-summary p { margin: 0; white-space: nowrap; }
.read-summary .bar { flex: 1; min-width: 160px; }
.chapter-tile.is-read { border-color: var(--ok-strong); background: linear-gradient(0deg, var(--ok-soft), var(--ok-soft)) top / 100% 5px no-repeat, var(--surface); }
.chapter-tile.is-read .chapter-num { background: var(--ok-strong); color: #fff; }
.chapter-tile .chapter-num .icon { width: 1.3rem; height: 1.3rem; stroke-width: 3; }
.badge .icon { width: 1em; height: 1em; margin-right: 4px; stroke-width: 3; }
/* Filmer */
.film-card .film-read { align-self: flex-start; margin-top: auto; }
.film-card .row + .film-read { margin-top: 4px; }
@media (prefers-reduced-motion: no-preference) {
  main.page-enter { animation: page-in .35s var(--ease) both; }
  /* Översikt: korta, lugna intoningar och små lyft. */
  .stats > * { animation: soft-in .5s var(--ease) both; }
  .stats > :nth-child(2) { animation-delay: .05s; }
  .stats > :nth-child(3) { animation-delay: .1s; }
  .stats > :nth-child(4) { animation-delay: .15s; }
  .stat-link:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(23, 74, 120, .1); }
  .stat-link:hover strong { color: var(--primary); }
  .stat-link strong { transition: color .2s var(--ease); }
  .next-go .icon { animation: nudge 1.6s .8s var(--ease) 3; }
  .next-go:hover .icon { animation: none; }
  .focus-card .focus-mistakes, .focus-list li, .chapter-rows li, .result-list li { animation: soft-in .5s var(--ease) both; }
  .focus-list li:nth-child(2), .result-list li:nth-child(2) { animation-delay: .05s; }
  .focus-list li:nth-child(3), .result-list li:nth-child(3) { animation-delay: .1s; }
  .result-list li:nth-child(n+4) { animation-delay: .15s; }
  .chapter-rows li:nth-child(n+2) { animation-delay: .03s; }
  .chapter-rows li:nth-child(n+4) { animation-delay: .06s; }
  .chapter-rows li:nth-child(n+7) { animation-delay: .09s; }
  .chapter-rows li:nth-child(n+10) { animation-delay: .12s; }
  .chapter-rows .btn:hover, .focus-list .btn:hover, .flash-verdict .btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(23, 74, 120, .12); }
  .chapter-rows li { transition: background-color .2s var(--ease); }
  .countdown.celebrate { animation: pop .6s .2s var(--ease) both; }
  .countdown.celebrate .dot { animation: wiggle .7s .3s var(--ease) both; }
  .confetti i { animation: burst 1s .25s cubic-bezier(.2, .7, .3, 1) both; }
  .btn.shine:hover::after { transform: translateX(120%); transition: transform .7s var(--ease); }
  .step-card { transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
  .step-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
  .step-card:hover .icon-tile { transform: rotate(-6deg) scale(1.06); }
  .step-card .icon-tile { transition: transform .25s var(--ease); }
  .chapter-tile.is-read .chapter-num .icon { animation: pop .4s var(--ease) both; }
  .film-card { transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
  .film-card:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(23, 74, 120, .1); }
}
/* Quiz och prov: alternativen tonar in, valt svar markeras med ett litet hopp, rätt svar lyser upp. */
@media (prefers-reduced-motion: no-preference) {
  .option:not(.locked) { animation: soft-in .4s var(--ease) both; }
  .option:not(.locked):nth-of-type(2) { animation-delay: .04s; }
  .option:not(.locked):nth-of-type(3) { animation-delay: .08s; }
  .option:not(.locked):nth-of-type(4) { animation-delay: .12s; }
  .option:not(.locked):hover { transform: translateX(2px); }
  .option:has(input:checked) .key { animation: key-pop .3s var(--ease); }
  .option.correct { animation: answer-ok .7s var(--ease); }
  .option.correct .key { animation: key-pop .4s .1s var(--ease) both; }
  .option.wrong { animation: answer-no .4s var(--ease); }
  .feedback.ok h3::before { content: "✓"; display: inline-block; margin-right: 8px; animation: key-pop .4s .15s var(--ease) both; }
  .result-score { animation: soft-in .5s var(--ease) both; }
}
@media (prefers-reduced-motion: reduce) { .confetti { display: none; } }
@keyframes page-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes nudge { 0%, 100% { transform: none; } 30% { transform: translateX(3px); } 60% { transform: translateX(0); } }
@keyframes soft-in { from { opacity: 0; transform: translateY(4px); } }
@keyframes answer-ok { 0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(31, 122, 77, .35); } 40% { transform: scale(1.015); } 100% { transform: none; box-shadow: 0 0 0 10px rgba(31, 122, 77, 0); } }
@keyframes answer-no { 0%, 100% { transform: none; } 25% { transform: translateX(-4px); } 50% { transform: translateX(3px); } 75% { transform: translateX(-2px); } }
@keyframes key-pop { 0% { transform: scale(.85); } 60% { transform: scale(1.08); } 100% { transform: none; } }
@keyframes pop { 0% { transform: scale(.96); } 55% { transform: scale(1.02); } 100% { transform: none; } }
@keyframes wiggle { 0%, 100% { transform: none; } 35% { transform: rotate(-5deg); } 70% { transform: rotate(3deg); } }
@keyframes burst { 0% { opacity: 1; transform: translate(0, 0) rotate(0); } 70% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--x), var(--y)) rotate(var(--r)); } }

@media (prefers-reduced-motion: no-preference) {
  .btn, .option, .nav a, .chapter-tile, .chapter-pager a, .stat-link, .mode-choice, input, select, textarea, .qgrid button { transition: background-color .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease), transform .18s var(--ease), box-shadow .18s var(--ease); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .flash { outline: 3px solid var(--accent); outline-offset: 2px; }
}
@media (forced-colors: active) {
  .option input { position: static; opacity: 1; width: 22px; height: 22px; }
  .nav a[aria-current="page"] { outline: 2px solid CanvasText; }
}

/* Studiepass */
.plan { display: flex; flex-direction: column; gap: .5rem; }
.plan h3 { margin: 0; }
.plan .btn { margin-top: auto; align-self: flex-start; }
.plan-price { font-family: var(--font-head); font-size: 2rem; font-weight: 700; color: var(--heading); margin: 0; }

/* Kom igång (guiden efter att studiepasset har aktiverats) */
.onb-shell { max-width: 720px; margin: 0 auto; padding-top: 8px; }
.onb-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.onb-top .eyebrow { margin: 0; }
.onb-skip { color: var(--muted); }
.onb-progress { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.onb-bar { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.onb-bar span { height: 6px; border-radius: 999px; background: var(--border); position: relative; overflow: hidden; }
.onb-bar span::after { content: ""; position: absolute; inset: 0; background: var(--primary); border-radius: inherit; transform: scaleX(0); transform-origin: left; }
.onb-bar span.on::after { transform: none; }
.onb-count { font-size: .875rem; font-weight: 700; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.onb-card { padding: 32px; border-radius: var(--radius-lg); overflow: hidden; }
.onb-title { font-size: clamp(1.6rem, 3.6vw, 2.15rem); margin: 0 0 .35em; outline: none; }
.onb-lead { margin: 0 0 24px; font-size: 1.05rem; }
.onb-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border); }
.onb-actions .btn[type="submit"] { margin-left: auto; }
.onb-actions.end { justify-content: flex-end; flex-wrap: wrap; }
.onb-privacy { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); margin: 16px 4px 0; }
.onb-privacy .icon { flex: none; width: 18px; height: 18px; margin-top: 2px; color: var(--line); }

/* Valkort: en dold radioknapp i en etikett, så att piltangenter och skärmläsare fungerar som vanligt. */
.onb-radio { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.onb-choice { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 14px 16px 14px 46px; background: var(--surface); border: 2px solid var(--border); border-radius: var(--radius); cursor: pointer; transition: border-color .2s var(--ease), background-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease); }
.onb-choice::before { content: ""; position: absolute; left: 16px; top: 16px; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--border-strong); background: var(--surface); transition: border-color .2s var(--ease), box-shadow .2s var(--ease); }
.onb-choice:hover { border-color: var(--line); }
.onb-choice:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 1px var(--primary); }
.onb-choice:has(input:checked)::before { border-color: var(--primary); box-shadow: inset 0 0 0 3px var(--surface), inset 0 0 0 10px var(--primary); }
.onb-choice:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 3px; }

.onb-langs { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.onb-lang-name { font-weight: 700; color: var(--heading); line-height: 1.25; }
.onb-lang-own { align-self: flex-start; font-size: .9rem; color: var(--muted); line-height: 1.3; }
.onb-more { margin-top: 12px; }
.onb-more .icon { width: 1em; height: 1em; }

.onb-versions { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.onb-versions .onb-choice { padding: 18px 18px 18px 48px; gap: 6px; }
.onb-versions .onb-choice::before { top: 21px; }
.onb-version-label { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-weight: 700; font-size: 1.1rem; color: var(--heading); }
.onb-tag { font-size: .75rem; font-weight: 700; letter-spacing: .02em; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--warn); }
.onb-version-text { color: var(--muted); }
.onb-sample { margin-top: 6px; padding: 10px 12px; border-left: 3px solid var(--accent); background: var(--surface-2); border-radius: 0 10px 10px 0; font-family: var(--font-head); font-style: italic; color: var(--text); line-height: 1.45; }

.onb-exam { max-width: 320px; margin-bottom: 12px; }
.onb-days { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 12px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2); color: var(--muted); }
.onb-days .icon { flex: none; width: 20px; height: 20px; color: var(--line); }
.onb-days.is-set { background: var(--accent-soft); color: var(--text); }
.onb-days.is-set .icon { color: var(--warn); }

.onb-sizes { display: flex; width: 100%; max-width: 460px; }
.onb-sizes .onb-choice { flex: 1 1 0; flex-direction: row; align-items: center; justify-content: center; gap: 8px; padding: 10px 8px; min-height: 52px; border: 0; background: transparent; border-radius: 10px; font-weight: 700; color: var(--muted); }
.onb-sizes .onb-choice::before { display: none; }
.onb-sizes .onb-choice:hover { color: var(--heading); }
.onb-sizes .onb-choice:has(input:checked) { background: var(--surface); color: var(--heading); box-shadow: 0 1px 4px rgba(23, 74, 120, .15); }
.onb-aa { font-family: var(--font-head); line-height: 1; }
.onb-aa-0 { font-size: .95rem; }
.onb-aa-1 { font-size: 1.15rem; }
.onb-aa-2 { font-size: 1.35rem; }
.onb-preview { margin-top: 18px; padding: 20px 22px; border: 1px dashed var(--border-strong); border-radius: var(--radius); background: var(--surface-2); font-size: 1rem; }
.onb-preview[data-size="stor"] { font-size: 1.125rem; }
.onb-preview[data-size="storst"] { font-size: 1.25rem; }
.onb-preview p { margin: 0; }
.onb-preview .onb-preview-title { font-family: var(--font-head); font-weight: 700; color: var(--heading); margin-bottom: .4em; font-size: 1.15em; }

.onb-done { text-align: center; }
.onb-done .onb-lead { margin-bottom: 20px; }
.onb-done-mark { display: inline-grid; place-items: center; width: 68px; height: 68px; margin-bottom: 14px; border-radius: 50%; background: var(--ok-soft); color: var(--ok-strong); }
.onb-done-mark .icon { width: 36px; height: 36px; }
.onb-summary { list-style: none; margin: 0 auto; padding: 0; max-width: 460px; text-align: left; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.onb-summary li { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 12px; padding: 12px 16px; }
.onb-summary li + li { border-top: 1px solid var(--border); }
.onb-summary strong { color: var(--heading); text-align: right; }
.onb-sum-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--primary-soft); color: var(--primary); }
.onb-sum-icon .icon { width: 18px; height: 18px; }
.onb-sum-label { color: var(--muted); }
.onb-done .onb-actions { justify-content: center; }

@media (max-width: 640px) {
  .onb-card { padding: 22px 18px; }
  .onb-versions { grid-template-columns: 1fr; }
  .onb-langs { grid-template-columns: 1fr; gap: 8px; }
  .onb-langs .onb-choice { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 10px 14px 10px 44px; }
  .onb-langs .onb-choice::before { left: 14px; top: 50%; margin-top: -9px; }
  .onb-langs .onb-lang-own { align-self: center; text-align: right; }
  .onb-actions .btn { flex: 1 1 0; }
  .onb-done .onb-actions { flex-direction: column-reverse; }
  .onb-summary li { grid-template-columns: 36px 1fr; row-gap: 0; }
  .onb-summary strong { grid-column: 2; text-align: left; }
  .onb-summary .onb-sum-icon { grid-row: span 2; }
}

@media (prefers-reduced-motion: no-preference) {
  .onb-bar span::after { transition: transform .5s var(--ease); }
  .onb-preview { transition: font-size .3s var(--ease); }
  .onb-step { animation: onb-in .42s var(--ease) both; }
  .onb-step.from-left { animation-name: onb-in-back; }
  .onb-step .onb-choice { animation: soft-in .4s var(--ease) both; }
  .onb-step .onb-choice:nth-child(2) { animation-delay: 30ms; }
  .onb-step .onb-choice:nth-child(3) { animation-delay: 60ms; }
  .onb-step .onb-choice:nth-child(4) { animation-delay: 90ms; }
  .onb-step .onb-choice:nth-child(n+5) { animation-delay: 120ms; }
  .onb-choice:active { transform: scale(.985); }
  .onb-days { transition: background-color .25s var(--ease), color .25s var(--ease); }
  .onb-done { animation: float-in .5s var(--ease) both; }
  .onb-done-mark { animation: pop .6s var(--ease) .1s both; }
  .onb-done-mark .icon { animation: soft-in .4s var(--ease) .3s both; }
  .onb-summary li { animation: rise .45s var(--ease) both; }
  .onb-summary li:nth-child(2) { animation-delay: 60ms; }
  .onb-summary li:nth-child(3) { animation-delay: 120ms; }
  .onb-summary li:nth-child(4) { animation-delay: 180ms; }
}
@keyframes onb-in { from { opacity: 0; transform: translateX(16px); } }
@keyframes onb-in-back { from { opacity: 0; transform: translateX(-16px); } }

/* Kapitelfrågor i slutet av varje kapitel */
.chapter-check { gap: 20px; }
.check-intro { display: flex; gap: 16px; align-items: flex-start; }
.check-intro h2 { margin-bottom: .25em; }
.check-intro p { margin: 0; color: var(--muted); }
.check-slot { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; min-height: 120px; }
.check-loading { margin: 0; }
.check-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.check-head .progress-dots { flex: 1; margin: 0; }
.check-run legend { font-size: clamp(1.2rem, 1.05rem + .6vw, 1.45rem); margin-bottom: 16px; }
.check-run .feedback { margin-top: 18px; }
.check-result { display: flex; flex-direction: column; gap: 14px; }
.check-result p { margin: 0; }
.check-score { display: flex; align-items: center; gap: 14px; }
.check-score-mark { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--surface-blue); color: var(--primary); flex: none; }
.check-score-mark .icon { width: 28px; height: 28px; }
.check-result.all .check-score-mark { background: var(--ok-soft); color: var(--ok-strong); }
.check-result .row { margin-top: 4px; }
.check-read { padding-top: 4px; }
.check-result .result-score:focus { outline: none; }
@media (max-width: 640px) {
  .check-slot { padding: 0; background: none; border: 0; min-height: 0; }
  .check-score-mark, .check-result .bar { background: var(--surface); }
  .check-result .row .btn { flex: 1 1 0; }
}
@media (prefers-reduced-motion: no-preference) {
  .check-result { animation: float-in .5s var(--ease) both; }
  .check-score-mark { animation: pop .6s var(--ease) .1s both; }
}

/* Kapitellänkar: text, film och kapitelquiz för ett kapitel */
.chapter-links { display: flex; flex-direction: column; gap: 8px; }
.chapter-links-title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0; font-weight: 700; color: var(--heading); }
.chapter-links-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chapter-links-row .btn { min-height: 40px; padding: 6px 14px; font-size: .9rem; }
.msg-links { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.msg-links-title { margin: 0; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.review-item .chapter-links { margin-top: 10px; }
.chapter-from { font-size: .95rem; color: var(--muted); }
.chapter-from .icon { width: 18px; height: 18px; color: var(--line); vertical-align: -3px; margin-right: 6px; }
.chapter-from strong { color: var(--heading); }

/* Översikt över kapitel efter ett quiz med flera kapitel och efter flashkorten */
.chapter-overview > p { margin-top: -.2em; }
.overview-list { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.overview-list li { padding: 16px 18px; border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: var(--radius); background: var(--surface); display: flex; flex-direction: column; gap: 12px; }
.overview-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.overview-name { display: flex; align-items: center; gap: 12px; font-weight: 700; color: var(--heading); font-size: 1.05rem; }
.overview-num { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 10px; background: var(--primary-soft); color: var(--primary); font-variant-numeric: tabular-nums; }
.overview-ok { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 4px; margin: 16px 0 0; color: var(--muted); }
.overview-ok .icon { width: 16px; height: 16px; color: var(--ok-strong); align-self: center; margin-right: 4px; }
@media (max-width: 640px) {
  .overview-list li { padding: 14px; }
  .chapter-links-row .btn { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: no-preference) {
  .overview-list li { animation: rise .45s var(--ease) both; }
  .overview-list li:nth-child(2) { animation-delay: 60ms; }
  .overview-list li:nth-child(3) { animation-delay: 120ms; }
  .overview-list li:nth-child(n+4) { animation-delay: 180ms; }
  .msg-links { animation: soft-in .4s var(--ease) both; }
}

/* AI-skapad sammanfattning efter kapiteltexten */
.summary-card { border-left: 4px solid var(--accent); display: flex; flex-direction: column; gap: 12px; }
.summary-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.summary-title { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; }
.summary-head h2 { margin: 0; }
.badge.ai { background: var(--accent-soft); color: var(--warn); }
.summary-intro { margin: 0; font-weight: 600; color: var(--heading); }
.summary-points { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.summary-points li { position: relative; padding-left: 22px; }
.summary-points li::before { content: ''; position: absolute; left: 4px; top: .62em; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.summary-note { margin: 0; padding-top: 12px; border-top: 1px solid var(--border); }
@media (prefers-reduced-motion: no-preference) {
  .summary-card:not([hidden]) { animation: soft-in .4s var(--ease) both; }
}

/* Liten översikt med länkar efter kapitelfrågorna, kapitelquizet och repetitionen */
.check-links { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; padding-top: 14px; border-top: 1px solid var(--border); }
.overview-list li.ok { border-left-color: var(--ok-strong); }
@media (prefers-reduced-motion: no-preference) {
  .check-links { animation: soft-in .4s var(--ease) .15s both; }
}
.summary-body { display: flex; flex-direction: column; gap: 12px; }
.summary-body[hidden] { display: none; }
.summary-toggle { flex: none; gap: 4px; min-height: 40px; }
.summary-toggle .icon { width: 18px; height: 18px; transition: transform .2s var(--ease); }
.summary-toggle[aria-expanded="true"] .icon { transform: rotate(180deg); }
.summary-card.collapsed { padding-top: 14px; padding-bottom: 14px; }
.summary-card.collapsed .badge.ai { display: none; }
.summary-card.collapsed .summary-head { align-items: center; }
@media (prefers-reduced-motion: no-preference) {
  .summary-body:not([hidden]) { animation: soft-in .3s var(--ease) both; }
}
@media (prefers-reduced-motion: reduce) {
  .summary-toggle .icon { transition: none; }
}

/* ---------- Den öppna webbplatsen: Unity UF och Plugga ---------- */
.nav.nav-public a { font-weight: 600; }
.nav.nav-public a[aria-current="page"] { background: var(--surface-blue); color: var(--heading); }
.nav.nav-public a.nav-cta { background: var(--primary); color: var(--on-primary); margin-left: 6px; }
.nav.nav-public a.nav-cta:hover { background: var(--primary-hover); }
@media (max-width: 760px) {
  .header-inner:has(.nav-public) { flex-wrap: wrap; padding-top: 6px; padding-bottom: 8px; gap: 4px 16px; }
  .nav.nav-public { position: static; display: flex; flex-wrap: nowrap; overflow-x: auto; width: calc(100% + 32px); margin: 0 -16px; padding: 2px 16px 4px; gap: 4px; background: none; border: 0; box-shadow: none; scrollbar-width: none; }
  .nav.nav-public a { flex: none; flex-direction: row; min-height: 40px; padding: 6px 14px; font-size: .925rem; color: var(--text); border-radius: 999px; }
  .nav.nav-public a[aria-current="page"], .nav.nav-public a[aria-current="page"]:hover { background: var(--surface-blue); color: var(--heading); }
  .nav.nav-public a.nav-cta, .nav.nav-public a.nav-cta:hover { margin-left: auto; background: var(--primary); color: var(--on-primary); }
}

.optional { font-weight: 400; color: var(--muted); }
.form-grid { display: grid; gap: 0 20px; }
@media (min-width: 640px) { .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.inquiry-form { position: relative; padding: 32px; }
.inquiry-done { text-align: center; display: flex; flex-direction: column; align-items: center; outline: none; }
.inquiry-done h3 { font-family: var(--font-head); font-size: 1.6rem; }
@media (max-width: 520px) { .inquiry-form { padding: 22px; } .inquiry-form .btn.lg { width: 100%; } }

/* Plugga */
.hero-link { color: #fff; font-weight: 700; }
.hero-link:hover { color: var(--accent); }
.stat-strip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: -120px 0 0; position: relative; z-index: 2; }
@media (min-width: 760px) { .stat-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat-strip p { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow-lg); }
.stat-strip strong { display: block; font-family: var(--font-head); font-size: 1.9rem; line-height: 1.1; color: var(--heading); }
.stat-strip span { color: var(--muted); font-size: .95rem; }
@media (max-width: 760px) { .stat-strip { margin-top: -110px; } .stat-strip p { padding: 14px 16px; } .stat-strip strong { font-size: 1.5rem; } }

.price-grid { display: grid; gap: 20px; align-items: stretch; }
@media (min-width: 900px) { .price-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .price-grid .price-card.org { grid-column: 1 / -1; } }
@media (min-width: 640px) and (max-width: 899px) { .price-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.price-card { position: relative; display: flex; flex-direction: column; }
.price-card.featured { border: 2px solid var(--accent); }
.price-card .badge { position: absolute; top: -12px; left: 24px; background: var(--accent); color: var(--on-accent); }
.price-card.org { background: var(--surface-blue); border-color: transparent; }
.price-card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.price { font-family: var(--font-head); font-size: 2.6rem; font-weight: 700; line-height: 1; color: var(--heading); margin: 0 0 6px; }
.price-card.org .price { font-size: 2rem; }
.price-sub { color: var(--muted); font-size: .95rem; }
.price-card .feature-list { margin: 8px 0 24px; flex: 1; }
.price-card .btn { align-self: stretch; }
.price-foot { margin-top: 20px; max-width: 52rem; }

.org-grid { display: grid; gap: 24px; margin-top: 36px; align-items: start; }
@media (min-width: 960px) { .org-grid { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); } }
.org-facts h3 { font-family: var(--font-head); font-size: 1.5rem; }
.org-offer { border: 2px solid var(--primary); border-radius: var(--radius-lg, 20px); background: var(--surface); overflow: hidden; }
.org-offer > summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 24px; cursor: pointer; list-style: none; background: var(--primary); color: #fff; }
.org-offer > summary::-webkit-details-marker { display: none; }
.org-offer > summary:hover { filter: brightness(1.08); }
.org-offer > summary:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.org-offer-t { display: flex; flex-direction: column; gap: 4px; }
.org-offer-t strong { font-family: var(--font-head); font-size: 1.45rem; line-height: 1.2; }
.org-offer-t span { opacity: .88; }
.org-offer-tg { flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--primary); transition: transform .3s var(--ease); }
.org-offer[open] .org-offer-tg { transform: rotate(45deg); }
.org-offer .inquiry-form { border: 0; border-radius: 0; box-shadow: none; }
@media (prefers-reduced-motion: reduce) { .org-offer-tg { transition: none; } }

.faq { display: grid; gap: 10px; max-width: 52rem; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.faq-item summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 20px; min-height: 56px; cursor: pointer; font-weight: 700; color: var(--heading); list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .icon { transition: transform .25s var(--ease); }
.faq-item[open] summary .icon { transform: rotate(180deg); }
.faq-item p { margin: 0; padding: 0 20px 18px; color: var(--muted); }

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .offer-card, .how-steps li, .partner-card, .price-card, .faq-item { animation: site-rise linear both; animation-timeline: view(); animation-range: entry 0% cover 25%; }
  }
}

/* Frivilliga frågor */
.survey-shell { max-width: 820px; margin: 0 auto; }
.survey-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.survey-count { font-size: .9rem; font-weight: 700; color: var(--muted); background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px; }
.survey-promise { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 10px; }
.survey-promise li { display: flex; gap: 12px; align-items: flex-start; }
.survey-promise .icon { color: var(--ok-strong); margin-top: 2px; }
.survey-list { display: grid; gap: 14px; margin-bottom: 20px; }
.survey-q { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; min-width: 0; }
.survey-q-head { display: flex; gap: 12px; align-items: center; font-weight: 700; color: var(--heading); padding: 0; margin-bottom: 14px; font-size: 1.05rem; }
.survey-q-head label { margin: 0; }
.survey-num { flex: none; display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 10px; background: var(--surface-blue); color: var(--primary); font-size: .9rem; }
.survey-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.survey-opt { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 8px 14px; min-height: 44px; border: 2px solid var(--border); border-radius: 999px; font-weight: 600; cursor: pointer; background: var(--surface); }
.survey-opt:hover { border-color: var(--line); }
.survey-opt input { width: 18px; height: 18px; margin: 0; accent-color: var(--primary); }
.survey-opt:has(input:checked) { border-color: var(--primary); background: var(--surface-blue); }
.survey-opt:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.survey-clear { margin-top: 10px; }
.survey-consent p { display: flex; gap: 12px; align-items: flex-start; margin: 0; }
.survey-consent .icon { flex: none; margin-top: 3px; color: var(--primary); }
.survey-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; margin-top: 20px; }
.survey-remove { margin-top: 24px; }
@media (max-width: 520px) { .survey-actions .btn { flex: 1 1 100%; } }

/* Adminsidan: statistik och förfrågningar */
.stat-filter { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; margin-bottom: 20px; }
.stat-filter .field { margin: 0; min-width: 200px; flex: 1 1 200px; }
.stat-q { margin-bottom: 18px; }
.stat-q h3 { font-size: 1rem; margin-bottom: 8px; }
.stat-row { display: grid; grid-template-columns: minmax(0, 14rem) minmax(0, 1fr) 7rem; gap: 12px; align-items: center; font-size: .95rem; padding: 4px 0; }
.stat-row .num { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 600px) { .stat-row { grid-template-columns: 1fr 6rem; } .stat-row .bar { grid-column: 1 / -1; order: 3; } }
.inquiry-list { list-style: none; padding: 0; margin: 0; }
.inquiry-list li { border-top: 1px solid var(--border); padding: 14px 0; }
.inquiry-list li:first-child { border-top: 0; padding-top: 0; }
.inquiry-list p { margin: 4px 0 0; }

/* Föreslå ett språk (Konto och Kom igång) */
.lang-suggest { margin-top: 12px; }
.lang-suggest > summary { display: inline-flex; align-items: center; min-height: 44px; cursor: pointer; color: var(--primary); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.lang-suggest > summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.lang-suggest-body { margin-top: 8px; }
.lang-suggest-body label { display: block; font-weight: 600; margin-bottom: 6px; }
.lang-suggest-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.lang-suggest-row input { flex: 1 1 14rem; width: auto; min-width: 0; }
.lang-suggest-body .ok-msg, .lang-suggest-body .error-msg { margin: 10px 0 0; }

/* Organisationslicensens fyra steg på Plugga */
.how-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
@media (min-width: 760px) { .how-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } .how-steps.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .how-steps.four { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.how-steps li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.how-steps h3 { font-size: 1.1rem; margin: 12px 0 6px; }
.how-steps p { margin: 0; color: var(--muted); }
.how-num { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-family: var(--font-head); font-weight: 800; }
.free-note { display: flex; gap: 18px; align-items: flex-start; margin-top: 20px; }
.free-note h3 { font-family: var(--font-head); font-size: 1.3rem; margin: 0 0 4px; }
.free-note p { margin: 0; }

/* ---------- Unity UF:s webbplats, enligt designen "Unity UF landsida" ----------
   Sidorna har eget sidhuvud och egen sidfot (body.site-mode döljer appens) och är alltid ljusa, som i designen. */
body.site-mode .site-header, body.site-mode .site-footer { display: none; }
body.site-mode main#main { max-width: none; padding: 0; }
body.site-mode { background: #EAF3FB; }

.u {
  --bg: #eaf3fb; --surface: #ffffff; --surface-2: #eef4fa; --surface-blue: #dcebf8; --text: #174a78; --heading: #174a78; --muted: #45607d;
  --border: #d3e2f0; --border-strong: #bcd0e4; --primary: #174a78; --primary-hover: #1f5d94; --primary-soft: #eaf3fb; --on-primary: #fff;
  --accent: #f5c842; --accent-hover: #e8b820; --on-accent: #174a78; --accent-soft: #fdf3d0; --line: #7fb0de; --dark: #174a78; --on-dark: #fff;
  --on-dark-muted: #c9dcef; --ok: #1d6a44; --ok-strong: #1f7a4d; --ok-soft: #e7f4ec; --bad: #a3271d; --bad-soft: #fbeae7; --warn: #6b4e00; --warn-soft: #fdf3d0; --focus: #174a78;
  color-scheme: light; background: #EAF3FB; color: #2E4A66; font-family: 'Figtree', system-ui, sans-serif; font-size: 17px; line-height: 1.6;
}
:where(.u-hdr, .u-hero, .u-phero, .u-sec, .u-quote, .u-foot) :is(h1, h2, h3) { font-family: 'Playfair Display', Georgia, serif; margin: 0; font-weight: 700; color: #174A78; line-height: 1.15; }
:where(.u-hdr, .u-hero, .u-phero, .u-sec, .u-quote, .u-foot) p { margin: 0; }
.u-wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 40px); }
.u-eyebrow { font-size: 14px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #174A78; }
.u-dark .u-eyebrow, .u-phero .u-eyebrow { color: #F5C842; }
.u-h2 { font-size: clamp(32px, 4vw, 46px); letter-spacing: -.005em; }
.u .u-dark h2, .u .u-dark h3 { color: #fff; }
.u-lede { font-size: clamp(18px, 1.5vw, 20px); line-height: 1.6; color: #2E4A66; }
.u-lede strong { color: #174A78; }
.u-dark .u-lede { color: #D6E6F5; }
.u-muted { color: #44607E; }
.u-rule { width: 64px; height: 4px; border-radius: 4px; background: linear-gradient(90deg, #174A78, #F5C842); }
.u-head { max-width: 760px; }
.u-head .u-h2 { margin-top: 14px; }
.u-head .u-rule, .u-head .u-lede { margin-top: 22px; }
.u-head-flat { max-width: none; }
.u-mt { margin-top: 26px; }
.u-mt-l { margin-top: 40px; }
.u-note { margin-top: 24px; color: #44607E; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.u-a { color: #174A78; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

.u-sec { padding: clamp(64px, 8vw, 96px) 0; position: relative; overflow: hidden; }
.u-sec-tight { padding: clamp(48px, 6vw, 72px) 0; }
.u-w { background: #fff; }
.u-l { background: #EAF3FB; }
.u-dark { background: #0B2E4F; color: #D6E6F5; }

.u-btn { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 26px; border-radius: 14px; font-weight: 700; font-size: 18px; line-height: 1; text-decoration: none; transition: transform .2s, box-shadow .2s, background-color .2s, color .2s; }
.u-btn svg { transition: transform .25s; }
.u-btn:hover svg { transform: translateX(5px); }
.u-btn-y { background: #F5C842; color: #174A78; }
.u-btn-y:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(3, 20, 38, .3); color: #174A78; }
.u-btn-o { border: 2px solid #7FB0DE; color: #fff; }
.u-btn-o:hover { background: rgba(255, 255, 255, .12); transform: translateY(-2px); color: #fff; }
.u-btn-b { background: #174A78; color: #fff; }
.u-btn-b:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(23, 74, 120, .3); color: #fff; }
button.u-btn { border: 0; cursor: pointer; font-family: inherit; }
button.u-btn:disabled { opacity: .6; cursor: wait; }
.u-btns { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.u-btns-hero { margin-top: 44px; }
.u-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: #174A78; text-decoration: none; }
.u-link svg { transition: transform .25s; }
.u-link:hover svg { transform: translateX(5px); }
.u :focus-visible { outline: 3px solid #7FB0DE; outline-offset: 3px; }

/* Sidhuvud */
.u-hdr { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid #D9E3EE; }
.u-hdr-in { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; min-height: 72px; padding-top: 8px; padding-bottom: 8px; }
.u-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.u-brand-t { font-family: 'Archivo Black', sans-serif; font-size: 22px; letter-spacing: .01em; color: #174A78; }
.u-nav { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.u-nl { padding: 10px 14px; border-radius: 999px; font-weight: 600; color: #174A78; text-decoration: none; transition: background-color .2s; }
.u-nl:hover, .u-nl.on { background: #DCEBF8; color: #174A78; }
.u-nl-app { color: #44607E; }
.u-nav-c { margin-left: 8px; display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 12px; border: 2px solid #174A78; font-weight: 600; color: #174A78; text-decoration: none; transition: background-color .2s, color .2s; }
.u-nav-c:hover, .u-nav-c.on { background: #174A78; color: #fff; }
.u-prog { position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: linear-gradient(90deg, #174A78, #F5C842); transform-origin: left; transform: scaleX(0); }
@media (max-width: 900px) {
  .u-hdr { position: static; }
  .u-hdr-in { gap: 6px; }
  .u-nav { flex-wrap: nowrap; overflow-x: auto; width: calc(100% + 2 * clamp(20px, 4vw, 40px)); margin: 0 calc(-1 * clamp(20px, 4vw, 40px)); padding: 2px clamp(20px, 4vw, 40px) 6px; scrollbar-width: none; }
  .u-nl, .u-nav-c { flex: none; }
}

/* Startsidans hero med flaggan */
.u-hero { position: relative; overflow: hidden; color: #fff; min-height: 780px; display: flex; align-items: center; padding: 96px 0 168px; background: #174A78; }
.u-hero h1 { font-family: 'Archivo Black', sans-serif; font-weight: 400; color: #fff; font-size: clamp(64px, 10.5vw, 135px); line-height: .98; letter-spacing: -.01em; margin-top: 22px; text-shadow: 0 6px 40px rgba(3, 20, 38, .45); }
.u-hero-sub { font-size: clamp(20px, 2.2vw, 28px); line-height: 1.4; color: #D6E6F5; max-width: 560px; font-weight: 500; margin-top: 22px; }
.u-hero-img { position: absolute; inset: 0; overflow: hidden; }
.u-hero-img img { position: absolute; left: 0; top: -10%; width: 100%; height: 120%; object-fit: cover; object-position: center 88%; }
.u-hero-ov { position: absolute; inset: 0; background: linear-gradient(100deg, rgba(11, 46, 79, .95) 0%, rgba(23, 74, 120, .82) 40%, rgba(23, 74, 120, .34) 100%), linear-gradient(180deg, rgba(11, 46, 79, 0) 55%, rgba(11, 46, 79, .7) 100%); }
.u-hero-in { position: relative; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 48px 64px; }
.u-hero-copy { flex: 1 1 520px; min-width: 0; }
.u-hero-side { flex: 0 1 400px; min-width: min(100%, 300px); }
.u-hchip { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px 8px 12px; border-radius: 999px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .3); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); font-size: 14px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #fff; align-self: flex-start; }
.u-hchip i { width: 10px; height: 10px; border-radius: 50%; background: #F5C842; box-shadow: 0 0 0 4px rgba(245, 200, 66, .28); }
.u-hrule { width: 88px; height: 5px; border-radius: 5px; margin-top: 26px; background: linear-gradient(90deg, #F5C842, #7FB0DE); }
.u-glass { position: relative; overflow: hidden; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .34); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-radius: 24px; padding: 30px 26px 22px; box-shadow: 0 30px 60px rgba(3, 20, 38, .4); }
.u-glass::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: linear-gradient(90deg, #F5C842, #7FB0DE); }
.u-gh { font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #F5C842; margin: 0 0 10px 14px !important; }
.u-grow { display: flex; align-items: center; gap: 14px; padding: 13px 14px; border-radius: 16px; color: #fff; font-weight: 600; text-decoration: none; transition: background-color .25s, transform .25s; }
.u-grow + .u-grow { border-top: 1px solid rgba(255, 255, 255, .14); border-radius: 0 0 16px 16px; }
.u-grow:hover { background: rgba(255, 255, 255, .16); transform: translateX(4px); border-radius: 16px; color: #fff; }
.u-gico { display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 12px; background: #F5C842; color: #174A78; }
.u-gl { flex: 1; font-size: 18px; }
.u-gch { flex: none; opacity: .6; transition: transform .25s, opacity .25s; }
.u-grow:hover .u-gch { transform: translateX(4px); opacity: 1; color: #F5C842; }
.u-hstrip { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; background: linear-gradient(180deg, rgba(11, 46, 79, 0), rgba(11, 46, 79, .72)); border-top: 1px solid rgba(255, 255, 255, .18); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.u-hstrip-in { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px 32px; padding-top: 22px; padding-bottom: 22px; }
.u-hstrip span { display: flex; flex-direction: column; gap: 2px; font-size: 14px; line-height: 1.4; color: #C9DCEF; padding-left: 16px; border-left: 3px solid #F5C842; }
.u-hstrip b { font-size: 19px; font-weight: 700; color: #fff; }
@media (max-width: 900px) {
  .u-hero { min-height: 0; padding: 64px 0 0; flex-direction: column; align-items: stretch; }
  .u-hero-ov { background: linear-gradient(180deg, rgba(23, 74, 120, .92), rgba(23, 74, 120, .8)); }
  .u-hstrip { position: relative; margin-top: 48px; }
  .u-hstrip-in { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Undersidornas hero */
.u-phero { position: relative; overflow: hidden; color: #fff; min-height: 480px; display: flex; align-items: center; padding: clamp(64px, 8vw, 104px) 0; background: #174A78; }
.u-phero .u-hero-img img { object-position: center 82%; }
.u-phero-in { position: relative; z-index: 1; }
.u-phero h1 { color: #fff; font-size: clamp(40px, 6vw, 76px); line-height: 1.06; letter-spacing: -.015em; max-width: 900px; margin-top: 16px; }
.u-phero h1 em { color: #F5C842; font-style: italic; }
@media (max-width: 900px) { .u-phero { min-height: 0; } }

/* Kort, ikoner och listor */
.u-card { background: #fff; border: 1px solid #D3E2F0; border-radius: 20px; padding: 28px; transition: transform .25s, box-shadow .25s; }
.u-card:hover { transform: translateY(-4px); box-shadow: 0 18px 48px rgba(23, 74, 120, .18); }
.u-card.u-flat:hover { transform: none; box-shadow: none; }
.u-col { display: flex; flex-direction: column; gap: 12px; }
.u-col h3 { font-size: 26px; margin-top: 8px; }
.u-card-foot { margin-top: auto; padding-top: 10px; }
.u-rowcard { display: flex; gap: 16px; align-items: flex-start; padding: 22px; }
.u-rowcard h3 { font-size: 22px; }
.u-rowcard p { margin-top: 6px; font-size: 16px; }
.u-card.u-flat > h3 { font-size: 26px; margin-bottom: 10px; }
.u-ico { display: grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: 14px; background: #DCEBF8; color: #174A78; transition: transform .35s; }
.u-ico.y { background: #FDF3D0; color: #7A5A00; }
.u-card:hover .u-ico { transform: rotate(-6deg) scale(1.08); }
.u-tag { display: inline-flex; align-items: center; align-self: flex-start; padding: 4px 12px; border-radius: 999px; background: #DCEBF8; color: #174A78; font-size: 13px; font-weight: 700; }
.u-tag.y { background: #FDF3D0; color: #7A5A00; }
.u-chips { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 12px; }
.u-chip { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; background: #fff; border: 1px solid #D3E2F0; font-weight: 600; color: #174A78; transition: transform .2s, border-color .2s; }
.u-chip:hover { transform: translateY(-3px); border-color: #F5C842; }
.u-list { list-style: none; padding: 0; margin: 0; }
.u-list li { display: flex; align-items: flex-start; gap: 12px; padding: 7px 0; color: #2E4A66; }
.u-list svg { flex: none; margin-top: 4px; color: #1F7A4D; }
.u-grid3, .u-grid2 { margin-top: 48px; display: grid; gap: 20px; }
.u-grid3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.u-grid2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.u-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 48px 64px; align-items: start; }
.u-two.u-center { align-items: center; }
.u-stack { margin-top: 26px; display: grid; gap: 14px; }
.u-split { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 32px; }
.u-split-text { max-width: 640px; }
.u-split .u-h2 { margin-top: 14px; }
.u-price-card.featured { border: 2px solid #F5C842; }
.u-price { font-family: 'Playfair Display', Georgia, serif; font-weight: 800; font-size: 40px; line-height: 1; color: #174A78; }
.u-price span { font-family: 'Figtree', system-ui, sans-serif; font-size: 16px; font-weight: 600; color: #44607E; }

/* Deltagarens väg */
.u-path-in { position: relative; margin-top: 56px; }
.u-steps { list-style: none; padding: 0; margin: 0; position: relative; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 40px 32px; }
.u-steps-static { margin-top: 48px; }
.u-step { position: relative; padding-top: 8px; }
.u-step h3 { margin-top: 22px; font-size: 28px; color: #F5C842 !important; }
.u-step p { margin-top: 8px; font-size: 17px; color: #D6E6F5; }
.u-snum { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: #F5C842; color: #0B2E4F; font-family: 'Playfair Display', Georgia, serif; font-weight: 800; font-size: 28px; position: relative; z-index: 1; transition: transform .4s cubic-bezier(.2, .7, .2, 1); }
.u-snum::after { content: ''; position: absolute; inset: 0; border-radius: 50%; animation: u-ring 2.8s ease-out infinite; }
.u-step:hover .u-snum { transform: scale(1.12) rotate(-6deg); }
.u-track { position: absolute; top: 40px; left: 32px; width: calc(75% + 24px); height: 2px; background: rgba(255, 255, 255, .22); }
.u-track-fill { position: absolute; inset: 0; background: #F5C842; transform-origin: left; }
.u-puck { position: absolute; top: 50%; left: 100%; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%; background: #F5C842; box-shadow: 0 0 0 6px rgba(245, 200, 66, .3), 0 0 18px rgba(245, 200, 66, .8); }
@media (max-width: 900px) { .u-track { display: none; } }

/* Exempelfrågan */
.u-quiz { padding: 28px; box-shadow: 0 24px 60px rgba(23, 74, 120, .2); display: flex; flex-direction: column; gap: 14px; }
.u-quiz-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.u-quiz-bar { display: flex; gap: 4px; }
.u-quiz-bar span { flex: 1; height: 6px; border-radius: 99px; background: #DCEBF8; }
.u-quiz-bar .done { background: #174A78; }
.u-quiz-bar .now { background: #F5C842; }
.u-quiz-q { margin: 4px 0 2px !important; font-family: 'Playfair Display', Georgia, serif; font-size: 22px; font-weight: 600; line-height: 1.3; color: #174A78; }
.u-qopt { display: flex; gap: 12px; align-items: center; border: 2px solid #D3E2F0; border-radius: 14px; padding: 12px 14px; }
.u-qopt b { width: 30px; height: 30px; border-radius: 9px; background: #DCEBF8; color: #174A78; display: grid; place-items: center; flex: none; }
.u-qopt.right { border-color: #1F7A4D; background: #E7F4EC; }
.u-qopt.right b { background: #1F7A4D; color: #fff; }
.u-qopt.right span { font-weight: 600; color: #174A78; }
.u-quiz-fb { font-size: 15px; color: #1F5E3E; background: #E7F4EC; border-radius: 12px; padding: 10px 14px; }

/* Jämförelsetabellen */
.u-cmp-wrap { margin-top: 40px; overflow-x: auto; border-radius: 20px; border: 1px solid #D3E2F0; }
.u-cmp { width: 100%; border-collapse: collapse; min-width: 620px; }
.u-cmp th { background: #174A78; color: #fff; text-align: left; padding: 16px 22px; font-weight: 600; font-size: 15px; }
.u-cmp td { padding: 16px 22px; border-bottom: 1px solid #D9E3EE; font-size: 16px; color: #2E4A66; background: #fff; }
.u-cmp tr:last-child td { border-bottom: 0; }
.u-cmp td:first-child { font-weight: 700; color: #174A78; }
.u-cmp td:last-child { font-weight: 700; color: #174A78; background: #F2F7FC; }

/* Avslutande band, citat och sidfot */
.u-cta { border-radius: 24px; background: #174A78; color: #D6E6F5; padding: clamp(32px, 4vw, 56px); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px; }
.u-cta > div:first-child { max-width: 620px; }
.u .u-cta h3 { font-size: clamp(28px, 3.2vw, 40px); color: #fff; }
.u-cta p { margin-top: 12px; font-size: 18px; color: #D6E6F5; }
.u-cta .u-btns { margin-top: 0; }
.u-quote { border-top: 1px solid #D3E2F0; padding: 56px 0; }
.u-quote-in { display: flex; flex-wrap: wrap; gap: 24px 48px; align-items: center; justify-content: space-between; }
.u-quote-q { font-family: 'Playfair Display', Georgia, serif; font-size: clamp(24px, 2.6vw, 30px); line-height: 1.3; max-width: 22em; color: #174A78; }
.u-quote-t { font-size: 15px; color: #44607E; max-width: 28em; }
.u-foot { background: #174A78; color: #C9DCEF; padding: 28px 0; font-size: 15px; }
.u-foot-in { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; }
.u-foot-brand { font-family: 'Archivo Black', sans-serif; color: #fff; font-size: 19px; letter-spacing: .01em; }
.u-ct { display: flex; align-items: center; gap: 12px; padding: 7px 0; color: #D6E6F5; text-decoration: none; }
.u-ct svg { flex: none; color: #F5C842; }
.u-foot a { transition: color .2s; }
.u-foot a:hover { color: #F5C842; }
.u-socs { display: flex; gap: 10px; margin-left: auto; }
.u-soc { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(127, 176, 222, .4); color: #fff; transition: transform .25s, background-color .25s, color .25s; }
.u-foot .u-soc:hover { transform: translateY(-4px); background: #F5C842; color: #0B2E4F; }
.u-foot-links { display: flex; flex-wrap: wrap; gap: 8px 24px; flex-basis: 100%; padding-top: 12px; border-top: 1px solid rgba(127, 176, 222, .3); }
.u-foot-links a { color: #C9DCEF; text-decoration: none; }
.u-copy { flex-basis: 100%; font-size: 14px; color: #A9C8E6; }
@media (max-width: 700px) { .u-socs { margin-left: 0; } }

/* Kontakt och formulär */
.u-contact { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 18px; }
.u-contact li { display: flex; gap: 16px; align-items: center; }
.u-contact li > div { display: flex; flex-direction: column; }
.u-contact a, .u-contact li > div > span:last-child { font-weight: 700; color: #174A78; font-size: 18px; }
.u-socs-l { display: flex; gap: 12px; margin-top: 12px; }
.u-soc-l { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: #fff; border: 1px solid #D3E2F0; color: #174A78; transition: transform .25s, background-color .25s, border-color .25s; }
.u-soc-l:hover { transform: translateY(-5px); background: #F5C842; border-color: #F5C842; }
.u-legend { font-weight: 700; color: #174A78; font-size: 16px; }
.u-field { display: flex; flex-direction: column; gap: 8px; }
.u-field label { font-weight: 700; color: #174A78; font-size: 16px; }
.u-opt-t { font-weight: 400; color: #44607E; }
.u-inp { width: 100%; min-height: 52px; padding: 0 16px; border: 2px solid #D3E2F0; border-radius: 14px; font: inherit; color: #174A78; background: #fff; }
.u-inp:focus { outline: 3px solid #7FB0DE; border-color: #174A78; }
textarea.u-inp { padding: 14px 16px; min-height: 130px; resize: vertical; }
.u-opt { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: 2px solid #D3E2F0; border-radius: 14px; background: #fff; cursor: pointer; min-height: 52px; color: #174A78; font-weight: 600; transition: border-color .2s; }
.u-opt:hover { border-color: #7FB0DE; }
.u-opt:has(input:checked) { border-color: #174A78; background: #F2F7FC; }
.u-opt input { width: 22px; height: 22px; accent-color: #174A78; flex: none; margin: 0; }
.u-accept { font-weight: 500; align-items: flex-start; }
.u-accept input { margin-top: 2px; }
.u-fset { border: 0; padding: 0; margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.u-fset .u-legend { padding: 0; margin-bottom: 6px; }
.u-fgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.u-fset .u-fgrid { gap: 10px; }
.u-fgroup { border-top: 2px solid #EAF3FB; padding-top: 26px; }
.u-signup { display: flex; flex-direction: column; gap: 24px; padding: clamp(22px, 3vw, 36px); }
.u-done { align-items: center; text-align: center; outline: none; }
.u-done h3 { font-size: 28px; }
.u-form .inquiry-form { border-radius: 20px; }

/* Plugga inne i webbplatsens ram */
.u-plugga { padding-bottom: 24px; color: var(--text); font-size: 1rem; }
.u-plugga .hero-band { margin-top: 0; }
.u-plugga .hero-flag .u-hchip { margin-bottom: -8px; }

/* Rörelse, som i designen. Allt stängs av med reducerad rörelse. */
@keyframes u-par { from { transform: translateY(0) scale(1.04); } to { transform: translateY(14%) scale(1.04); } }
@keyframes u-step-on { from { opacity: .25; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes u-snum-on { from { background: #2F5578; color: #8FA9C2; transform: scale(.7); } to { background: #F5C842; color: #0B2E4F; transform: scale(1); } }
@keyframes u-move { from { left: 0; } to { left: 100%; } }
@keyframes u-rise { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
@keyframes u-hero-in { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes u-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes u-ring { 0% { box-shadow: 0 0 0 0 rgba(245, 200, 66, .55); } 70%, 100% { box-shadow: 0 0 0 22px rgba(245, 200, 66, 0); } }
@keyframes u-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@media (prefers-reduced-motion: no-preference) {
  .u-hi { animation: u-hero-in 1s cubic-bezier(.2, .7, .2, 1) both; }
  .u-hi1 { animation-delay: .05s; } .u-hi2 { animation-delay: .22s; } .u-hi3 { animation-delay: .4s; }
  .u-float { animation: u-float 8s ease-in-out infinite; }
  @supports (animation-timeline: view()) {
    .u-par { animation: u-par linear both; animation-timeline: scroll(root); animation-range: 0 900px; }
    .u-path { view-timeline: --u-path block; }
    .u-st { animation: u-step-on linear both; animation-timeline: --u-path; }
    .u-st .u-snum { animation: u-snum-on linear both; animation-timeline: --u-path; }
    .u-st1, .u-st1 .u-snum { animation-range: cover 10% cover 18%; }
    .u-st2, .u-st2 .u-snum { animation-range: cover 21% cover 29%; }
    .u-st3, .u-st3 .u-snum { animation-range: cover 32% cover 40%; }
    .u-st4, .u-st4 .u-snum { animation-range: cover 43% cover 50%; }
    .u-track-fill { animation: u-grow linear both; animation-timeline: --u-path; animation-range: cover 14% cover 45%; }
    .u-puck { animation: u-move linear both; animation-timeline: --u-path; animation-range: cover 14% cover 45%; }
    .u-rv { animation: u-rise linear both; animation-timeline: view(); animation-range: entry 4% entry 38%; }
    .u-rv2 { animation-range: entry 10% entry 44%; }
    .u-rv3 { animation-range: entry 16% entry 50%; }
    .u-rv4 { animation-range: entry 22% entry 56%; }
    .u-prog { animation: u-grow linear both; animation-timeline: scroll(root); }
  }
}
@media (prefers-reduced-motion: reduce) {
  .u *, .u *::after { animation: none !important; transition: none !important; }
}

/* Teamet på Om oss */
.u-team-sec { padding-top: 0; }
.u-team { list-style: none; padding: 0; margin: 48px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 24px; }
.u-team li { border-radius: 20px; overflow: hidden; border: 1px solid #D3E2F0; background: #174A78; box-shadow: 0 18px 48px rgba(23, 74, 120, .14); }
.u-team img { display: block; width: 100%; height: auto; aspect-ratio: 640 / 891; object-fit: cover; transition: transform .4s; }
.u-team li:hover img { transform: scale(1.03); }
.u-team li { display: flex; flex-direction: column; }
.u-team-t { background: #fff; padding: 20px 22px 24px; flex: 1; }
.u-team-t h3, .u-advisor h3 { font-size: 1.45rem; }
.u-team-role { margin-top: 4px !important; font-weight: 700; color: #8a6a00; font-size: .95rem; }
.u-team-t p:last-child, .u-advisor p:last-child { margin-top: 8px !important; color: #45607d; font-size: .98rem; }
.u-advisors { margin-top: 24px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 24px; }
.u-advisor { display: flex; gap: 18px; align-items: flex-start; }
.u-av { flex: none; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: #F5C842; color: #174A78; font-weight: 800; font-size: 1.05rem; }
.u-partners { margin-top: 36px; }
.u-partners h3 { font-size: 1.35rem; }
.u-partners .u-chips { margin-top: 14px; }

/* ---------- Lektioner ---------- */
.next-alt { margin-top: 10px !important; font-size: .95rem; }
.next-alt a { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-weight: 700; }
.next-alt a .icon { width: 1em; height: 1em; }

.lesson-grid { counter-reset: none; }
.lesson-tile-body { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex: 1; }
.lesson-tile-body .name { margin-bottom: 0; }
.lesson-tile-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.lesson-tile-meta .badge .icon { width: 1em; height: 1em; margin-right: 4px; }
.lesson-tile.is-current { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow); }
.lesson-pips { display: flex; gap: 4px; }
.lesson-pips span { flex: 1; max-width: 38px; height: 6px; border-radius: 999px; background: var(--surface-blue); }
.lesson-pips span.done { background: var(--ok-strong); }
.lesson-final { background: var(--dark); border-color: var(--dark); color: var(--on-dark-muted); }
.lesson-final:hover { color: var(--on-dark-muted); }
.lesson-final .name { color: var(--on-dark); }
.chapter-num.final { background: var(--accent); color: var(--on-accent); }
.lesson-final.locked .chapter-num.final { background: rgba(255, 255, 255, .12); color: var(--on-dark); }
.lesson-final .badge { background: rgba(255, 255, 255, .14); color: var(--on-dark); }
@media (min-width: 640px) { .lesson-final-li { grid-column: 1 / -1; } }

.lesson-how { margin-bottom: 24px; }
.lesson-how h2 { margin-top: 0; }
.lesson-flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 10px; }
.lesson-flow li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface); border-radius: var(--radius); }
.lesson-flow li > span:last-child { display: flex; flex-direction: column; line-height: 1.3; }
.lesson-flow-icon { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); }
.lesson-flow-icon .icon { width: 20px; height: 20px; }
.lesson-flow li.final .lesson-flow-icon { background: var(--accent); color: var(--on-accent); }

/* Stegen överst i en lektion */
.lesson-progress { margin: -8px 0 24px; display: flex; flex-direction: column; gap: 10px; }
.lesson-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; counter-reset: none; }
.lesson-steps li { position: relative; }
.lesson-steps a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; min-height: 44px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); text-decoration: none; color: var(--muted); font-weight: 600; font-size: .95rem; text-align: center; }
.lesson-steps a:hover { border-color: var(--line); color: var(--heading); }
.lesson-step-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--surface-blue); color: var(--primary); font-weight: 800; font-variant-numeric: tabular-nums; }
.lesson-step-mark .icon { width: 18px; height: 18px; }
.lesson-steps li.done .lesson-step-mark { background: var(--ok-strong); color: #fff; }
.lesson-steps li.done a { color: var(--heading); }
.lesson-steps a[aria-current="step"] { background: var(--dark); border-color: var(--dark); color: var(--on-dark); }
.lesson-steps a[aria-current="step"] .lesson-step-mark { background: var(--accent); color: var(--on-accent); }
.lesson-step-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
@media (max-width: 520px) {
  .lesson-panel-head { flex-direction: column; gap: 12px; }
  .lesson-panel-head .icon-tile { width: 44px; height: 44px; border-radius: 14px; }
  .lesson-test-facts { gap: 8px; }
  .lesson-fact { padding: 12px; }
  .lesson-steps { gap: 4px; }
  .lesson-steps a { padding: 10px 2px; font-size: .8rem; }
  .lesson-step-mark { width: 30px; height: 30px; }
}

.lesson-panel { margin-bottom: 28px; }
.lesson-panel-head { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 20px; }
.lesson-panel-head .icon-tile { flex: none; margin: 0; }
.lesson-panel-head h2 { margin: 0 0 .2em; }
.lesson-panel-head .eyebrow { margin-bottom: .3em; }
.lesson-panel-head p.muted { margin: 0; max-width: 42em; }
.lesson-slot > .card:last-child, .lesson-slot .quiz-shell { margin-bottom: 0; }
.lesson-slot h2.h2 { margin: 0; }
.lesson-done h3 { margin-top: 0; }
.lesson-film { margin-bottom: 20px; }
.lesson-film .film-caption { display: flex; flex-direction: column; padding: 10px 6px 2px; }
.lesson-pager { margin-top: 12px; }
.lesson-test-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.lesson-fact { margin: 0; padding: 14px 16px; border-radius: var(--radius); background: var(--surface-blue); display: flex; flex-direction: column; line-height: 1.25; }
.lesson-fact strong { font-family: var(--font-head); font-size: 1.7rem; color: var(--heading); font-variant-numeric: tabular-nums; }
.lesson-fact span { font-size: .9rem; color: var(--muted); }
p.badge { margin: 0; justify-self: start; width: fit-content; }
p.badge .icon { width: 1em; height: 1em; margin-right: 4px; }
.lesson-locked .overview-name { text-decoration: none; }
.lesson-locked .overview-name:hover { text-decoration: underline; }
