/* ==========================================================================
   X-Vajer utbildningsportal
   Formspråket följer temat på vajersystem.se (färger, typsnitt, knappar,
   sidhuvud, hero och sidfot är hämtade därifrån).
   ========================================================================== */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../fonts/inter-var.30a274cd01b6.woff2") format("woff2"); }
@font-face { font-family: "Quicksand"; font-style: normal; font-weight: 300 700; font-display: swap; src: url("../fonts/quicksand-var.314d6364bbee.woff2") format("woff2"); }

:root {
	--c-base: #fff;
	--c-surface: #eeece7;
	--c-cool: #f3f6f8;
	--c-line: #dcdfe0;
	--c-muted: #5b6a70;
	--c-text: #1f2a2f;
	--c-graphite: #3d4e55;
	--c-deep: #263237;
	--c-night: #10171a;
	--c-primary: #36aae0;
	--c-primary-dark: #176e99;
	--c-primary-soft: #e3f3fb;
	--c-ok: #1f7a4d;
	--c-ok-soft: #e4f3ea;
	--c-warn: #8a5a00;
	--c-warn-soft: #fbf0d9;
	--c-bad: #8a1c13;
	--c-bad-soft: #fdecea;
	--f-body: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--f-head: Quicksand, "Trebuchet MS", ui-rounded, sans-serif;
	--radius: 14px;
	--radius-sm: 10px;
	--radius-lg: 22px;
	--topbar-h: 38px;
	--bar-h: 76px;
	--gutter: clamp(1rem, 4vw, 2.5rem);
	--wide: 1240px;
	--ease: cubic-bezier(.2, .7, .2, 1);
	--shadow: 0 1px 2px rgba(22, 26, 30, .06), 0 10px 30px rgba(22, 26, 30, .08);
	--shadow-lg: 0 2px 4px rgba(22, 26, 30, .06), 0 24px 48px rgba(22, 26, 30, .14);
	--sp-40: clamp(1.75rem, 4vw, 2.75rem);
	--sp-50: clamp(2.5rem, 6vw, 4.5rem);
	--sp-60: clamp(3.5rem, 9vw, 7rem);
	--fs-large: clamp(1.125rem, 1.05rem + .4vw, 1.3125rem);
	--fs-xl: clamp(1.375rem, 1.2rem + .8vw, 1.75rem);
	--fs-xxl: clamp(1.875rem, 1.4rem + 2vw, 2.75rem);
	--fs-huge: clamp(2.375rem, 1.6rem + 3.6vw, 4rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition: none !important; animation: none !important; }
}
body {
	margin: 0; background: var(--c-base); color: var(--c-text);
	font-family: var(--f-body); font-size: 1.0625rem; line-height: 1.65;
	-webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; font-feature-settings: "cv11", "ss01";
	min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column;
}
main { flex: 1 0 auto; }
img, video, svg { max-width: 100%; height: auto; }
h1, h2, h3, h4 { font-family: var(--f-head); font-weight: 700; line-height: 1.15; letter-spacing: -.01em; margin: 0; text-wrap: balance; }
h1 { font-size: var(--fs-huge); letter-spacing: -.02em; }
h2 { font-size: var(--fs-xxl); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-large); }
p { margin: 0; text-wrap: pretty; }
a { color: var(--c-primary-dark); text-underline-offset: 3px; }
a:hover { color: var(--c-text); }
:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 3px; }
::selection { background: var(--c-primary); color: var(--c-deep); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.xv-wrap { width: 100%; max-width: calc(var(--wide) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.xv-wrap--narrow { max-width: calc(760px + 2 * var(--gutter)); }
.stack > * + * { margin-top: 1.1rem; }
.stack-lg > * + * { margin-top: 2rem; }
.muted { color: var(--c-muted); }
.small { font-size: .9375rem; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }

/* --------------------------------------------------------------------------
   Sidhuvud
   -------------------------------------------------------------------------- */
.xv-header { position: sticky; top: calc(var(--topbar-h) * -1); z-index: 100; }
.xv-topbar { background: var(--c-primary); color: var(--c-deep); font-size: .8125rem; font-weight: 600; }
.xv-topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: var(--topbar-h); }
.xv-topbar__contact { display: flex; align-items: center; gap: 1.25rem; }
.xv-topbar a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap; }
.xv-topbar a:hover { text-decoration: underline; }
.xv-topbar svg { width: 14px; height: 14px; fill: currentColor; }
@media (max-width: 720px) { .xv-topbar__tag { display: none; } .xv-topbar__inner { justify-content: center; } .xv-topbar__contact { gap: .9rem; } }
@media (max-width: 520px) { .xv-topbar a[href^="mailto"] { display: none; } }

.xv-lang { position: relative; }
.xv-lang summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .1rem; text-transform: uppercase; letter-spacing: .04em; }
.xv-lang summary::-webkit-details-marker { display: none; }
.xv-lang summary::after { content: ""; width: .4rem; height: .4rem; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.xv-lang__list { position: absolute; right: 0; top: calc(100% + 6px); background: var(--c-deep); border: 1px solid rgba(255, 255, 255, .15); border-radius: 8px; padding: .3rem; min-width: 9rem; z-index: 5; box-shadow: var(--shadow-lg); }
.xv-lang__list button { display: block; width: 100%; text-align: left; background: none; border: 0; color: #fff; font: inherit; font-weight: 500; padding: .45rem .7rem; border-radius: 6px; cursor: pointer; }
.xv-lang__list button:hover, .xv-lang__list button[aria-current="true"] { background: rgba(255, 255, 255, .12); }

.xv-bar { background: #fff; border-bottom: 1px solid var(--c-line); transition: background-color .35s, box-shadow .35s, border-color .35s; }
.xv-header.is-scrolled .xv-bar { box-shadow: 0 8px 28px rgba(22, 26, 30, .08); }
.xv-bar__inner { display: flex; align-items: center; justify-content: space-between; min-height: var(--bar-h); gap: 1.5rem; }
.xv-logo { position: relative; display: flex; align-items: center; gap: .9rem; flex: 0 0 auto; line-height: 0; text-decoration: none; }
.xv-logo img { height: 34px; width: auto; display: block; transition: opacity .3s; }
.xv-logo__light { position: absolute; left: 0; top: 0; opacity: 0; }
.xv-logo__tag { font: 700 .75rem/1 var(--f-head); letter-spacing: .14em; text-transform: uppercase; color: var(--c-primary-dark); padding-left: .9rem; border-left: 1px solid var(--c-line); transition: color .3s, border-color .3s; }
@media (max-width: 600px) { .xv-logo img { height: 28px; } .xv-bar__inner { min-height: 64px; } .xv-logo__tag { display: none; } }

.xv-nav { display: flex; align-items: center; gap: .25rem; margin-left: auto; }
.xv-nav a { font: 700 .975rem/1.2 var(--f-head); padding: .55rem .8rem; border-radius: 8px; color: var(--c-text); text-decoration: none; transition: background .2s, color .2s; white-space: nowrap; }
.xv-nav a:hover { background: var(--c-surface); }
.xv-nav a[aria-current="page"] { color: var(--c-primary-dark); box-shadow: inset 0 -2px 0 var(--c-primary); }
.xv-bar__cta { display: flex; align-items: center; gap: .6rem; flex: 0 0 auto; }
.xv-burger { display: none; width: 42px; height: 42px; border: 0; border-radius: 8px; background: var(--c-surface); color: var(--c-text); cursor: pointer; padding: 0; place-items: center; }
.xv-burger svg { width: 22px; height: 22px; }

/* Användarmeny */
.xv-user { position: relative; }
.xv-user summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .6rem; padding: .3rem .3rem .3rem .9rem; border-radius: 999px; border: 1px solid var(--c-line); background: #fff; font: 700 .9375rem/1 var(--f-head); color: var(--c-text); transition: border-color .2s, box-shadow .2s; }
.xv-user summary::-webkit-details-marker { display: none; }
.xv-user summary:hover { border-color: var(--c-primary); }
.xv-user__avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--c-deep); color: #fff; display: grid; place-items: center; font: 700 .8125rem/1 var(--f-head); letter-spacing: .02em; }
.xv-user__menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 250px; background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); padding: .5rem; z-index: 20; }
.xv-user__who { padding: .6rem .8rem .7rem; border-bottom: 1px solid var(--c-line); margin-bottom: .4rem; font-size: .875rem; line-height: 1.4; }
.xv-user__who strong { display: block; font-family: var(--f-head); font-size: 1rem; }
.xv-user__menu a, .xv-user__menu button { display: block; width: 100%; text-align: left; font: 500 .975rem/1.2 var(--f-body); color: var(--c-text); padding: .6rem .8rem; border-radius: 8px; text-decoration: none; background: none; border: 0; cursor: pointer; }
.xv-user__menu a:hover, .xv-user__menu button:hover { background: var(--c-primary-soft); color: var(--c-primary-dark); }
@media (max-width: 600px) { .xv-user__name { display: none; } .xv-user summary { padding: .2rem; } }

/* Genomskinligt sidhuvud över hero (startsidan) */
.xv-has-hero .xv-header { position: fixed; top: 0; left: 0; right: 0; transition: transform .45s var(--ease); }
.xv-has-hero .xv-header.is-scrolled { transform: translateY(calc(var(--topbar-h) * -1)); }
.xv-has-hero .xv-header:not(.is-scrolled) .xv-bar { background: transparent; border-bottom-color: rgba(255, 255, 255, .16); }
.xv-has-hero .xv-header:not(.is-scrolled) .xv-logo__dark { opacity: 0; }
.xv-has-hero .xv-header:not(.is-scrolled) .xv-logo__light { opacity: 1; }
.xv-has-hero .xv-header:not(.is-scrolled) .xv-logo__tag { color: #fff; border-color: rgba(255, 255, 255, .3); }
.xv-has-hero .xv-header:not(.is-scrolled) .xv-nav a { color: #fff; }
.xv-has-hero .xv-header:not(.is-scrolled) .xv-nav a:hover { background: rgba(255, 255, 255, .12); }
.xv-has-hero .xv-header:not(.is-scrolled) .xv-burger { background: rgba(255, 255, 255, .14); color: #fff; }
.xv-has-hero .xv-header:not(.is-scrolled) .xv-user summary { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .3); color: #fff; }

/* Mobilmeny */
@media (max-width: 860px) {
	.xv-burger { display: grid; }
	.xv-nav { position: fixed; inset: 0; z-index: 200; background: var(--c-deep); flex-direction: column; align-items: stretch; gap: 0; padding: 5.5rem var(--gutter) 2rem; margin: 0; overflow-y: auto; transform: translateY(-102%); visibility: hidden; transition: transform .4s var(--ease), visibility 0s linear .4s; }
	.xv-nav.is-open { transform: none; visibility: visible; transition: transform .4s var(--ease); }
	.xv-nav a, .xv-has-hero .xv-header:not(.is-scrolled) .xv-nav a { color: #fff; font-size: 1.375rem; padding: .9rem 0; border-radius: 0; border-bottom: 1px solid rgba(255, 255, 255, .12); background: none; box-shadow: none; }
	.xv-nav a[aria-current="page"] { color: var(--c-primary); }
	.xv-nav__close { position: absolute; top: 1.25rem; right: var(--gutter); width: 42px; height: 42px; border: 0; background: rgba(255, 255, 255, .12); color: #fff; border-radius: 8px; font-size: 1.5rem; line-height: 1; cursor: pointer; }
	.xv-bar__inner { gap: .75rem; }
	.xv-bar__cta { margin-left: auto; }
}
@media (min-width: 861px) { .xv-nav__close { display: none; } }

/* --------------------------------------------------------------------------
   Typografi och hjälpklasser
   -------------------------------------------------------------------------- */
.xv-eyebrow { display: inline-flex; align-items: center; gap: .6rem; font-size: .8125rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--c-primary-dark); margin: 0; }
.xv-eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--c-primary); border-radius: 2px; flex: 0 0 auto; }
.is-dark .xv-eyebrow, .xv-hero .xv-eyebrow, .stage .xv-eyebrow { color: var(--c-primary); }
.xv-lead { font-size: var(--fs-large); color: var(--c-muted); line-height: 1.55; }
.xv-head .xv-lead { border-left: 2px solid var(--c-primary); padding-left: 1.1rem; }
.is-dark .xv-lead { color: rgba(255, 255, 255, .78); }
.xv-badge { display: inline-block; padding: .3rem .8rem; border-radius: 999px; background: var(--c-primary); color: var(--c-deep); font-weight: 800; font-size: .8125rem; letter-spacing: .08em; text-transform: uppercase; }
.xv-num { font: 700 .9375rem/1.2 var(--f-head); letter-spacing: .14em; color: var(--c-primary-dark); display: flex; align-items: center; gap: .75rem; margin: 0; }
.xv-num::after { content: ""; height: 1px; width: 56px; background: var(--c-primary); }
.xv-checks { list-style: none; padding: 0; margin: 0; }
.xv-checks li { position: relative; padding-left: 1.75rem; margin-bottom: .55rem; }
.xv-checks li::before { content: ""; position: absolute; left: 0; top: .5em; width: 1rem; height: .6rem; border-left: 2.5px solid var(--c-primary); border-bottom: 2.5px solid var(--c-primary); transform: rotate(-45deg) translate(2px, -2px); }

/* --------------------------------------------------------------------------
   Knappar
   -------------------------------------------------------------------------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
	background: var(--c-primary); color: var(--c-deep); border: 0; border-radius: 999px;
	padding: .8rem 1.5rem; font: 600 1rem/1.2 var(--f-body); text-decoration: none; cursor: pointer; white-space: nowrap;
	transition: background-color .2s, color .2s, transform .2s var(--ease), box-shadow .2s;
}
.btn:hover { background: var(--c-deep); color: #fff; transform: translateY(-1px); }
.btn--arrow::after { content: "\2192"; display: inline-block; transition: transform .25s var(--ease); }
.btn--arrow:hover::after { transform: translateX(4px); }
.btn--ext::after { content: "\2197"; font-weight: 400; }
.btn--ghost { background: transparent; color: var(--c-text); box-shadow: inset 0 0 0 2px currentColor; }
.btn--ghost:hover { background: var(--c-deep); color: #fff; box-shadow: inset 0 0 0 2px var(--c-deep); }
.btn--light { background: rgba(255, 255, 255, .08); color: #fff; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .7); backdrop-filter: blur(6px); }
.btn--light:hover { background: #fff; color: var(--c-deep); }
.is-dark .btn:not(.btn--ghost):not(.btn--light):hover, .xv-hero .btn:not(.btn--light):hover, .stage .btn:not(.btn--light):hover { background: #fff; color: var(--c-deep); }
.btn--sm { padding: .55rem 1.1rem; font-size: .9375rem; }
.btn--lg { padding: 1rem 1.9rem; font-size: 1.0625rem; }
.btn--block { width: 100%; }
.btn--quiet { background: var(--c-cool); color: var(--c-text); }
.btn--quiet:hover { background: var(--c-deep); color: #fff; }
.btn--danger { background: var(--c-bad-soft); color: var(--c-bad); }
.btn--danger:hover { background: var(--c-bad); color: #fff; }
.btn[disabled], .btn.is-disabled { opacity: .45; pointer-events: none; }
.btns { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.link-arrow { font-weight: 600; text-decoration: none; display: inline-flex; gap: .4rem; align-items: center; }
.link-arrow::after { content: "\2192"; transition: transform .25s var(--ease); }
.link-arrow:hover::after { transform: translateX(4px); }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.xv-hero { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: flex-end; color: #fff; background: var(--c-deep); min-height: clamp(440px, 62vh, 680px); padding-block: clamp(3rem, 8vw, 6rem) clamp(2.5rem, 6vw, 5rem); }
.xv-has-hero .xv-hero { padding-top: calc(var(--topbar-h) + var(--bar-h) + clamp(2rem, 6vw, 4rem)); }
.xv-hero--home { min-height: max(600px, 100vh); min-height: max(600px, 100svh); }
.xv-hero--short { min-height: clamp(300px, 40vh, 420px); }
.xv-hero__media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; animation: xv-zoom 18s ease-out both; }
.xv-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, rgba(22, 26, 30, .9) 0%, rgba(22, 26, 30, .7) 42%, rgba(22, 26, 30, .25) 100%); }
.xv-hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 40%; z-index: -1; background: linear-gradient(0deg, rgba(22, 26, 30, .55), transparent); }
@keyframes xv-zoom { from { transform: scale(1.06); } to { transform: scale(1); } }
.xv-hero__content > * { animation: xv-rise .9s var(--ease) both; }
.xv-hero__content > *:nth-child(2) { animation-delay: .08s; }
.xv-hero__content > *:nth-child(3) { animation-delay: .16s; }
.xv-hero__content > *:nth-child(4) { animation-delay: .24s; }
@keyframes xv-rise { from { opacity: .08; transform: translateY(22px); } to { opacity: 1; transform: none; } }
.xv-hero h1 { color: #fff; margin-top: .75rem; font-size: clamp(2.5rem, 6.2vw, 5.25rem); line-height: 1.02; letter-spacing: -.025em; max-width: 14ch; }
.xv-hero:not(.xv-hero--home) h1 { font-size: clamp(2.25rem, 5vw, 4.25rem); max-width: 18ch; }
.xv-hero .xv-lead { color: rgba(255, 255, 255, .9); max-width: 620px; border-left: 2px solid var(--c-primary); padding-left: 1.1rem; margin-top: 1.25rem; }
.xv-hero__sub { font-size: .875rem; font-style: italic; color: rgba(255, 255, 255, .6); margin-top: .5rem; }
.xv-hero__stats { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: clamp(2.5rem, 6vw, 4.5rem); border: 1px solid rgba(255, 255, 255, .16); border-radius: 18px; overflow: hidden; background: rgba(22, 30, 34, .35); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3); animation: xv-rise 1s .45s var(--ease) both; }
.xv-hero__stat { padding: 1.15rem 1.4rem; border-left: 1px solid rgba(255, 255, 255, .12); }
.xv-hero__stat:first-child { border-left: 0; }
.xv-stat__big { font: 700 clamp(1.25rem, 2.2vw, 1.75rem)/1.15 var(--f-head); color: #fff; }
.xv-stat__small { margin-top: .2rem; font-size: .8125rem; color: rgba(255, 255, 255, .72); line-height: 1.35; }
@media (max-width: 900px) {
	.xv-hero__stats { grid-template-columns: 1fr 1fr; }
	.xv-hero__stat:nth-child(3) { border-left: 0; }
	.xv-hero__stat:nth-child(n+3) { border-top: 1px solid rgba(255, 255, 255, .12); }
}

/* --------------------------------------------------------------------------
   Sektioner
   -------------------------------------------------------------------------- */
.xv-section { padding-block: var(--sp-60); position: relative; }
.xv-section--tight { padding-block: var(--sp-50); }
.xv-section.is-surface { background: var(--c-surface); }
.xv-section.is-cool { background: var(--c-cool); }
.xv-section.is-dark { background: radial-gradient(1200px 600px at 80% 20%, #4a5f67 0%, var(--c-graphite) 55%, var(--c-deep) 100%); color: rgba(255, 255, 255, .86); }
.xv-section.is-dark :where(h1, h2, h3, h4) { color: #fff; }
.xv-section.is-dark a:not(.btn) { color: var(--c-primary); }
.xv-head { max-width: 760px; margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.xv-head > * + * { margin-top: 1rem; }
.xv-head--center { text-align: center; margin-inline: auto; }
.xv-head--center .xv-eyebrow { justify-content: center; }
.xv-head--center .xv-lead { border-left: 0; padding-left: 0; }

.xv-split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5.5rem); align-items: center; }
.xv-split.is-reversed .xv-split__media { order: -1; }
.xv-split__text > * + * { margin-top: 1.1rem; }
.xv-split__text p { max-width: 64ch; }
@media (max-width: 860px) { .xv-split { grid-template-columns: 1fr; } .xv-split.is-reversed .xv-split__media { order: 0; } }
.xv-shot { margin: 0; border-radius: var(--radius-lg); overflow: hidden; box-shadow: 0 30px 60px -20px rgba(22, 30, 34, .35), 0 12px 24px -12px rgba(22, 30, 34, .25); background: var(--c-deep); }
.xv-shot img, .xv-shot video { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform 1.2s var(--ease); }
.xv-shot:hover img { transform: scale(1.045); }

.xv-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(13.5rem, 1fr)); gap: 1.25rem; counter-reset: xvf; }
.xv-feature { background: #fff; border-radius: var(--radius); padding: 1.75rem 1.6rem 1.6rem; position: relative; box-shadow: 0 1px 2px rgba(22, 30, 34, .05), 0 12px 32px -12px rgba(22, 30, 34, .14); transition: transform .3s var(--ease), box-shadow .3s; counter-increment: xvf; }
.xv-feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.xv-feature::before { content: counter(xvf, decimal-leading-zero); display: block; font: 800 2rem/1 var(--f-head); color: var(--c-primary); letter-spacing: -.03em; margin-bottom: 1.1rem; }
.xv-feature h3 { font-size: 1.25rem; margin: 0 0 .5rem; }
.xv-feature p { color: var(--c-muted); font-size: .975rem; line-height: 1.6; }
.is-dark .xv-feature { background: rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
.is-dark .xv-feature p { color: rgba(255, 255, 255, .7); }

.xv-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1.25rem; }
.xv-stat { border-left: 3px solid var(--c-primary); padding: .25rem 0 .25rem 1.25rem; }
.xv-stat strong { display: block; font: 700 clamp(2rem, 4vw, 3rem)/1.1 var(--f-head); letter-spacing: -.03em; color: #fff; }
.xv-stat span { display: block; margin-top: .25rem; color: rgba(255, 255, 255, .7); }

.xv-cta { background: linear-gradient(135deg, #2b9fd6 0%, var(--c-primary-dark) 100%); color: #fff; padding-block: var(--sp-50); position: relative; overflow: hidden; }
.xv-cta::before { content: ""; position: absolute; width: 640px; height: 640px; border-radius: 50%; right: -220px; top: -260px; background: radial-gradient(circle, rgba(255, 255, 255, .16), transparent 65%); pointer-events: none; }
.xv-cta__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem 3rem; position: relative; }
.xv-cta h2 { color: #fff; max-width: 22ch; }
.xv-cta .btn { background: #fff; color: var(--c-deep); }
.xv-cta .btn:hover { background: var(--c-deep); color: #fff; }

/* --------------------------------------------------------------------------
   Sidfot
   -------------------------------------------------------------------------- */
.xv-footer { background: var(--c-graphite); color: rgba(255, 255, 255, .75); font-size: .9375rem; padding-top: var(--sp-50); flex: 0 0 auto; }
.xv-footer__grid { display: grid; grid-template-columns: 1.4fr 1.3fr 1fr; gap: 2.5rem; padding-bottom: 3rem; }
@media (max-width: 960px) { .xv-footer__grid { grid-template-columns: 1fr 1fr; } .xv-footer__brand { grid-column: 1 / -1; } }
@media (max-width: 560px) { .xv-footer__grid { grid-template-columns: 1fr; } }
.xv-footer h3 { color: #fff; font-size: 1.25rem; margin: 0 0 1rem; letter-spacing: 0; }
.xv-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.xv-footer a { color: rgba(255, 255, 255, .88); text-decoration: none; }
.xv-footer a:hover { color: var(--c-primary); }
.xv-footer address { font-style: normal; margin-bottom: .75rem; }
.xv-footer p { margin: 0 0 .75rem; }
.xv-footer__brand img { height: 34px; width: auto; margin-bottom: 1.25rem; }
.xv-footer__brand p { max-width: 34ch; }
.xv-footer__areas { margin-top: 1.5rem; }
.xv-footer__areas ul { gap: .9rem; }
.xv-footer__areas a { font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: .875rem; color: #fff; }
.xv-footer__bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem 1.5rem; padding-block: 1.25rem; font-size: .8125rem; position: relative; }
.xv-footer__bottom::before { content: ""; position: absolute; top: 0; left: var(--gutter); right: var(--gutter); height: 1px; background: rgba(255, 255, 255, .14); }
.xv-footer__bottom p { margin: 0; }

/* Diskret inglidning (aktiveras av app.js) */
.js-reveal .xv-reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.js-reveal .xv-reveal.is-visible { opacity: 1; transform: none; }

/* --------------------------------------------------------------------------
   Formulär
   -------------------------------------------------------------------------- */
.xv-form { display: grid; gap: 1rem; }
.xv-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 560px) { .xv-form__row { grid-template-columns: 1fr; } }
.field label, .field > .label { display: block; font-size: .875rem; font-weight: 600; margin-bottom: .4rem; }
.field .req { color: var(--c-primary-dark); }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field input[type="password"], .field input[type="date"], .field input[type="number"], .field input[type="search"], .field input[type="url"], .field select, .field textarea {
	width: 100%; font: inherit; font-size: 1rem; color: var(--c-text); background: #fff;
	border: 1.5px solid var(--c-line); border-radius: 10px; padding: .8rem .95rem; transition: border-color .2s, box-shadow .2s; appearance: none;
}
.field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6a70' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .8rem center; background-size: 1.1rem; padding-right: 2.6rem; }
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: var(--c-primary); box-shadow: 0 0 0 4px rgba(54, 169, 224, .2); }
.field .help { display: block; color: var(--c-muted); font-size: .8125rem; margin-top: .35rem; line-height: 1.45; }
.field .errorlist, .xv-form .errorlist { list-style: none; margin: .35rem 0 0; padding: 0; color: var(--c-bad); font-size: .875rem; font-weight: 500; }
.field.has-error input, .field.has-error select { border-color: var(--c-bad); }
.field--check { display: flex; gap: .7rem; align-items: flex-start; }
.field--check input { width: 1.2rem; height: 1.2rem; margin: .25rem 0 0; accent-color: var(--c-primary-dark); flex: 0 0 auto; }
.field--check label { font-weight: 400; font-size: .9375rem; margin: 0; line-height: 1.5; }
.notice { border-radius: 10px; padding: .85rem 1.1rem; font-size: .9375rem; background: var(--c-primary-soft); color: #12506f; }
.notice--bad { background: var(--c-bad-soft); color: var(--c-bad); }
.notice--ok { background: var(--c-ok-soft); color: var(--c-ok); }
.notice--warn { background: var(--c-warn-soft); color: var(--c-warn); }

.toasts { position: fixed; z-index: 300; right: 1rem; bottom: 1rem; display: grid; gap: .6rem; max-width: min(420px, calc(100vw - 2rem)); }
.toast { background: var(--c-deep); color: #fff; border-radius: 12px; padding: .9rem 1.15rem; box-shadow: var(--shadow-lg); font-size: .9375rem; border-left: 4px solid var(--c-primary); animation: xv-rise .5s var(--ease) both; }
.toast--error { border-left-color: #ff8f85; }

/* --------------------------------------------------------------------------
   Inloggning och registrering: delad sida med bild
   -------------------------------------------------------------------------- */
.auth { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: calc(100vh - var(--topbar-h) - var(--bar-h)); min-height: calc(100svh - var(--topbar-h) - var(--bar-h)); }
.auth__media { position: relative; isolation: isolate; color: #fff; display: flex; align-items: flex-end; padding: clamp(2rem, 5vw, 4rem); background: var(--c-deep); overflow: hidden; }
.auth__media img, .auth__media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.auth__media::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(22, 26, 30, .25) 0%, rgba(22, 26, 30, .85) 100%); }
.auth__media h2 { color: #fff; max-width: 16ch; margin-top: .9rem; }
.auth__media p { color: rgba(255, 255, 255, .82); max-width: 44ch; margin-top: .9rem; }
.auth__panel { display: flex; align-items: center; justify-content: center; padding: clamp(2rem, 5vw, 4rem) var(--gutter); }
.auth__box { width: 100%; max-width: 440px; }
.auth__box h1 { font-size: var(--fs-xxl); margin: .8rem 0 .6rem; }
.auth__box .xv-form { margin-top: 1.75rem; }
.auth__alt { margin-top: 1.5rem; font-size: .9375rem; color: var(--c-muted); }
@media (max-width: 900px) { .auth { grid-template-columns: 1fr; } .auth__media { min-height: 220px; padding-block: 2rem; } .auth__media p { display: none; } }

/* --------------------------------------------------------------------------
   Appsidor (min sida, portal)
   -------------------------------------------------------------------------- */
.app { background: var(--c-cool); padding-block: clamp(1.75rem, 4vw, 3rem) var(--sp-50); }
.pagehead { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem 2rem; margin-bottom: clamp(1.5rem, 3vw, 2.25rem); }
.pagehead h1 { font-size: var(--fs-xxl); margin-top: .6rem; }
.pagehead p.muted { margin-top: .5rem; max-width: 60ch; }
.pagehead__actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.crumbs { font-size: .875rem; color: var(--c-muted); margin-bottom: .2rem; }
.crumbs a { color: inherit; text-decoration: none; }
.crumbs a:hover { color: var(--c-primary-dark); }

.card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(1.25rem, 2.5vw, 1.9rem); }
.card--flush { padding: 0; overflow: hidden; }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.1rem; }
.card__head h2, .card__head h3 { font-size: 1.25rem; }
.card--flush .card__head { padding: 1.25rem 1.5rem 0; }
.grid { display: grid; gap: 1.25rem; }
.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--side { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 1000px) { .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid--3, .grid--side { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .grid--2, .grid--4 { grid-template-columns: 1fr; } }

.kpi { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.35rem 1.5rem; border-left: 3px solid var(--c-primary); text-decoration: none; color: inherit; display: block; transition: transform .3s var(--ease), box-shadow .3s; }
a.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); color: inherit; }
.kpi strong { display: block; font: 700 2.25rem/1.05 var(--f-head); letter-spacing: -.03em; }
.kpi span { display: block; margin-top: .35rem; color: var(--c-muted); font-size: .9375rem; }
.kpi--warn { border-left-color: #d99a1c; }
.kpi--bad { border-left-color: #c8483d; }

.pill { display: inline-flex; align-items: center; gap: .4rem; border-radius: 999px; padding: .22rem .7rem; font-size: .8125rem; font-weight: 600; white-space: nowrap; background: var(--c-cool); color: var(--c-muted); }
.pill::before { content: ""; width: .45rem; height: .45rem; border-radius: 50%; background: currentColor; }
.pill--valid { background: var(--c-ok-soft); color: var(--c-ok); }
.pill--expiring, .pill--update { background: var(--c-warn-soft); color: var(--c-warn); }
.pill--expired, .pill--revoked { background: var(--c-bad-soft); color: var(--c-bad); }
.pill--info { background: var(--c-primary-soft); color: var(--c-primary-dark); }
.pill--plain::before { display: none; }

.subnav { background: #fff; border-bottom: 1px solid var(--c-line); }
.subnav__inner { display: flex; gap: .25rem; overflow-x: auto; scrollbar-width: none; }
.subnav__inner::-webkit-scrollbar { display: none; }
.subnav a { font: 700 .9375rem/1 var(--f-head); color: var(--c-muted); text-decoration: none; padding: 1.05rem .9rem; white-space: nowrap; border-bottom: 2px solid transparent; transition: color .2s, border-color .2s; }
.subnav a:hover { color: var(--c-text); }
.subnav a[aria-current="page"] { color: var(--c-primary-dark); border-bottom-color: var(--c-primary); }
.subnav__ext { margin-left: auto; }

.toolbar { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-bottom: 1rem; }
.toolbar .field { margin: 0; }
.toolbar input[type="search"], .toolbar select { padding: .6rem .9rem; font-size: .9375rem; min-width: 12rem; }
.toolbar select { padding-right: 2.4rem; }
.toolbar__grow { flex: 1 1 14rem; }
.toolbar__grow input { width: 100%; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.table th { text-align: left; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--c-muted); padding: .85rem 1.5rem; border-bottom: 1px solid var(--c-line); white-space: nowrap; }
.table td { padding: .9rem 1.5rem; border-bottom: 1px solid #eef0f1; vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: #f8fafb; }
.table a.row-link { color: var(--c-text); font-weight: 600; text-decoration: none; }
.table a.row-link:hover { color: var(--c-primary-dark); }
.table .sub { display: block; color: var(--c-muted); font-size: .8125rem; font-weight: 400; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.empty { padding: 3rem 1.5rem; text-align: center; color: var(--c-muted); }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.5rem; border-top: 1px solid var(--c-line); font-size: .9375rem; color: var(--c-muted); }

.dl { display: grid; grid-template-columns: minmax(8rem, auto) 1fr; gap: .55rem 1.5rem; margin: 0; font-size: .9375rem; }
.dl dt { color: var(--c-muted); }
.dl dd { margin: 0; font-weight: 500; }

/* --------------------------------------------------------------------------
   Min utbildning
   -------------------------------------------------------------------------- */
.learn-hero { position: relative; isolation: isolate; overflow: hidden; border-radius: var(--radius-lg); background: var(--c-deep); color: #fff; padding: clamp(1.75rem, 4vw, 3rem); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem; align-items: end; min-height: 320px; box-shadow: var(--shadow-lg); }
.learn-hero__media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.learn-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, rgba(22, 26, 30, .92) 0%, rgba(22, 26, 30, .72) 50%, rgba(22, 26, 30, .3) 100%); }
.learn-hero h1 { font-size: var(--fs-xxl); color: #fff; margin: .8rem 0 .6rem; max-width: 20ch; }
.learn-hero p { color: rgba(255, 255, 255, .85); max-width: 52ch; }
.learn-hero .btns { margin-top: 1.5rem; }
@media (max-width: 760px) { .learn-hero { grid-template-columns: 1fr; } }

.ring { --p: 0; --size: 132px; width: var(--size); height: var(--size); border-radius: 50%; display: grid; place-items: center; position: relative; background: conic-gradient(var(--c-primary) calc(var(--p) * 1%), rgba(255, 255, 255, .16) 0); flex: 0 0 auto; }
.ring::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: var(--c-deep); }
.ring > * { position: relative; text-align: center; line-height: 1.1; }
.ring strong { font: 700 1.9rem/1 var(--f-head); display: block; }
.ring span { font-size: .75rem; color: rgba(255, 255, 255, .7); letter-spacing: .08em; text-transform: uppercase; }
.ring--light { background: conic-gradient(var(--c-primary) calc(var(--p) * 1%), var(--c-line) 0); }
.ring--light::before { background: #fff; }
.ring--light span { color: var(--c-muted); }

.path { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(12.5rem, 1fr)); counter-reset: step; }
.step-card { position: relative; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; text-decoration: none; color: inherit; transition: transform .3s var(--ease), box-shadow .3s; counter-increment: step; }
a.step-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); color: inherit; }
.step-card__media { position: relative; aspect-ratio: 16 / 10; background: var(--c-deep); overflow: hidden; }
.step-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .8s var(--ease); }
a.step-card:hover .step-card__media img { transform: scale(1.05); }
.step-card__media::after { content: counter(step, decimal-leading-zero); position: absolute; left: 1rem; bottom: .7rem; font: 800 2.25rem/1 var(--f-head); color: #fff; letter-spacing: -.03em; text-shadow: 0 2px 18px rgba(0, 0, 0, .45); }
.step-card__media::before { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(22, 26, 30, .6), transparent 55%); z-index: 1; }
.step-card__media::after { z-index: 2; }
.step-card__body { padding: 1.15rem 1.25rem 1.3rem; display: flex; flex-direction: column; gap: .45rem; flex: 1; }
.step-card__body h3 { font-size: 1.2rem; }
.step-card__body p { color: var(--c-muted); font-size: .9375rem; line-height: 1.5; }
.step-card__meta { margin-top: auto; padding-top: .8rem; display: flex; align-items: center; justify-content: space-between; gap: .75rem; font-size: .8125rem; color: var(--c-muted); }
.step-card__bar { height: 4px; background: var(--c-line); }
.step-card__bar i { display: block; height: 100%; background: var(--c-primary); width: calc(var(--p, 0) * 1%); transition: width .6s var(--ease); }
.step-card.is-locked { opacity: .62; }
.step-card.is-done .step-card__media::after { content: ""; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--c-primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23263237' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/1.3rem no-repeat; bottom: .9rem; }

.lesson-list { list-style: none; margin: 0; padding: 0; }
.lesson-list li + li { border-top: 1px solid #eef0f1; }
.lesson-row { display: grid; grid-template-columns: auto 1fr auto; gap: 1.1rem; align-items: center; padding: 1rem 1.5rem; text-decoration: none; color: inherit; transition: background .15s; }
a.lesson-row:hover { background: #f8fafb; color: inherit; }
.lesson-row__thumb { width: 92px; aspect-ratio: 16 / 10; border-radius: 8px; object-fit: cover; background: var(--c-deep); display: block; }
.lesson-row strong { font-family: var(--f-head); font-size: 1.0625rem; display: block; }
.lesson-row span.sub { color: var(--c-muted); font-size: .875rem; }
.tick { width: 1.7rem; height: 1.7rem; border-radius: 50%; border: 2px solid var(--c-line); display: grid; place-items: center; flex: 0 0 auto; }
.tick.is-done { border-color: var(--c-primary); background: var(--c-primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23263237' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/1rem no-repeat; }
@media (max-width: 560px) { .lesson-row__thumb { width: 64px; } .lesson-row { padding-inline: 1.1rem; gap: .8rem; } }

/* Kompetensbevis, kort */
.cert-card { position: relative; overflow: hidden; border-radius: var(--radius); background: linear-gradient(135deg, var(--c-deep), var(--c-graphite)); color: #fff; padding: 1.6rem 1.7rem; box-shadow: var(--shadow-lg); display: block; text-decoration: none; }
.cert-card:hover { color: #fff; }
.cert-card::after { content: ""; position: absolute; width: 380px; height: 380px; border-radius: 50%; right: -140px; top: -170px; background: radial-gradient(circle, rgba(54, 170, 224, .35), transparent 65%); pointer-events: none; }
.cert-card h3 { font-size: 1.35rem; margin: .7rem 0 .2rem; color: #fff; }
.cert-card__meta { display: flex; flex-wrap: wrap; gap: .4rem 1.75rem; margin-top: 1.1rem; font-size: .875rem; color: rgba(255, 255, 255, .7); }
.cert-card__meta b { display: block; color: #fff; font-family: var(--f-head); font-size: 1.0625rem; font-weight: 700; }

/* Kompetensbevis, dokument: bildpanel till vänster, beviset till höger (samma uppställning som PDF:en) */
.cert-doc { position: relative; display: grid; grid-template-columns: 35% 1fr; background: #fff; border-radius: 10px; box-shadow: var(--shadow-lg); aspect-ratio: 297 / 210; width: 100%; max-width: 1040px; margin-inline: auto; overflow: hidden; container-type: inline-size; color: var(--c-text); }
.cert-doc__side { position: relative; isolation: isolate; background: var(--c-deep); border-right: .4cqw solid var(--c-primary); }
.cert-doc.is-invalid .cert-doc__side { border-right-color: #c8483d; }
.cert-doc__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.cert-doc__side::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(16, 23, 26, .62) 0%, rgba(16, 23, 26, .2) 30%, rgba(16, 23, 26, .2) 50%, rgba(16, 23, 26, .92) 100%); }
.cert-doc__logo { position: absolute; left: 4.7cqw; top: 5.4cqw; height: 3.2cqw; width: auto; }
.cert-doc__verify { position: absolute; left: 4.7cqw; right: 3cqw; bottom: 4.7cqw; display: flex; align-items: center; gap: 2cqw; color: rgba(255, 255, 255, .72); }
.cert-doc__qr { background: #fff; border-radius: 1cqw; padding: 1cqw; line-height: 0; flex: 0 0 auto; }
.cert-doc__qr svg { width: 9.4cqw; height: 9.4cqw; display: block; }
.cert-doc__verify span { display: block; font: 700 .78cqw/1 var(--f-body); letter-spacing: .14em; text-transform: uppercase; }
.cert-doc__verify b { display: block; font: 700 1.75cqw/1.3 var(--f-head); color: #fff; margin: .5cqw 0 .6cqw; }
.cert-doc__verify small { display: block; font-size: .85cqw; line-height: 1.5; }
.cert-doc__main { position: relative; padding: 9cqw 6.7cqw 4.4cqw 7.4cqw; display: flex; flex-direction: column; min-width: 0; }
.cert-doc__eyebrow { display: flex; align-items: center; gap: 1cqw; font: 700 1.02cqw/1 var(--f-body); letter-spacing: .24em; text-transform: uppercase; color: var(--c-primary-dark); }
.cert-doc__eyebrow::before { content: ""; width: 3cqw; height: .16cqw; background: var(--c-primary); }
.cert-doc__course { font: 700 2.4cqw/1.15 var(--f-head); margin-top: 1.6cqw; }
.cert-doc__label { font: 700 .85cqw/1 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--c-muted); margin-top: 8cqw; }
.cert-doc__name { font: 700 4.3cqw/1.08 var(--f-head); letter-spacing: -.02em; margin-top: 1.5cqw; overflow-wrap: anywhere; }
.cert-doc__company { font-size: 1.5cqw; color: var(--c-muted); margin-top: .9cqw; }
.cert-doc__text { position: relative; font-size: 1.2cqw; line-height: 1.6; color: var(--c-muted); max-width: 49cqw; margin-top: 3.4cqw; padding-top: 3.2cqw; }
.cert-doc__text::before { content: ""; position: absolute; left: 0; top: 0; width: 5.4cqw; height: .2cqw; background: var(--c-primary); }
.cert-doc__facts { margin-top: auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1cqw; border-top: 1px solid var(--c-line); padding-top: 2.2cqw; }
.cert-doc__facts span { display: block; font: 700 .85cqw/1 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--c-muted); }
.cert-doc__facts b { display: block; font: 700 1.6cqw/1.3 var(--f-head); margin-top: .8cqw; }
.cert-doc__issuer { font-size: .92cqw; color: var(--c-muted); margin-top: 3cqw; }
.cert-doc__stamp { position: absolute; right: 6.7cqw; top: 8.6cqw; font: 700 1.3cqw/1 var(--f-head); letter-spacing: .1em; text-transform: uppercase; color: #c8483d; }

/* Verifiering */
.verify { max-width: 640px; margin-inline: auto; }
.verify__result { border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow-lg); padding: clamp(1.5rem, 4vw, 2.5rem); border-top: 6px solid var(--c-ok); }
.verify__result.is-bad { border-top-color: #c8483d; }
.verify__result.is-warn { border-top-color: #d99a1c; }
.verify__icon { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--c-ok-soft); color: var(--c-ok); margin-bottom: 1.1rem; }
.is-bad .verify__icon { background: var(--c-bad-soft); color: var(--c-bad); }
.is-warn .verify__icon { background: var(--c-warn-soft); color: var(--c-warn); }
.verify__icon svg { width: 32px; height: 32px; }

/* QR-sida för utbildning på plats */
.qr-sheet { background: var(--c-deep); color: #fff; border-radius: var(--radius-lg); padding: clamp(1.5rem, 4vw, 3rem); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(1.5rem, 5vw, 4rem); align-items: center; box-shadow: var(--shadow-lg); background-image: radial-gradient(900px 500px at 85% 10%, #4a5f67 0%, transparent 60%); }
.qr-sheet h2 { color: #fff; margin: .9rem 0 1rem; }
.qr-sheet ol { margin: 0; padding-left: 1.2rem; color: rgba(255, 255, 255, .85); display: grid; gap: .45rem; }
.qr-sheet__code { background: #fff; border-radius: 18px; padding: 1.1rem; line-height: 0; box-shadow: 0 30px 60px rgba(0, 0, 0, .35); }
.qr-sheet__code svg { width: clamp(180px, 26vw, 320px); height: auto; display: block; }
.qr-sheet__url { margin-top: 1.5rem; font: 700 clamp(1.1rem, 2.2vw, 1.6rem)/1.2 var(--f-head); color: var(--c-primary); word-break: break-all; }
@media (max-width: 760px) { .qr-sheet { grid-template-columns: 1fr; justify-items: start; } }

/* Fullskärmsvisning (QR på storbild) */
body.is-plain { background: var(--c-night); color: #fff; display: grid; place-items: center; padding: var(--gutter); }
body.is-plain .qr-sheet { width: min(1200px, 100%); }

@media print {
	.xv-header, .xv-footer, .subnav, .toasts, .no-print { display: none !important; }
	.app { background: #fff; padding: 0; }
	.card, .cert-doc { box-shadow: none; }
}

/* --------------------------------------------------------------------------
   Prov
   -------------------------------------------------------------------------- */
.focusbar { background: #fff; border-bottom: 1px solid var(--c-line); position: sticky; top: 0; z-index: 50; }
.focusbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }
.focusbar .xv-logo img { height: 28px; }
.focusbar__right { font: 700 .875rem/1.3 var(--f-head); color: var(--c-muted); text-align: right; }
.exam { min-height: calc(100vh - 64px); min-height: calc(100svh - 64px); }
.exam__form { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: clamp(1.25rem, 4vw, 2.75rem); }
.exam__top { display: flex; align-items: center; justify-content: space-between; }
.exam__count { font: 700 .9375rem/1 var(--f-head); color: var(--c-muted); font-variant-numeric: tabular-nums; }
.exam__count b { color: var(--c-text); font-size: 1.25rem; }
.exam__bar { height: 4px; border-radius: 4px; background: var(--c-line); margin: 1rem 0 1.75rem; overflow: hidden; }
.exam__bar i { display: block; height: 100%; background: var(--c-primary); border-radius: 4px; transition: width .5s var(--ease); }
.q { border: 0; margin: 0; padding: 0; min-width: 0; display: none; }
.q.is-active { display: block; animation: xv-rise .5s var(--ease) both; }
.q__text { font: 700 clamp(1.3rem, 2.6vw, 1.75rem)/1.25 var(--f-head); letter-spacing: -.01em; padding: 0; margin-bottom: 1.5rem; text-wrap: balance; }
.q__img { margin: 0 0 1.5rem; border-radius: var(--radius); overflow: hidden; background: linear-gradient(160deg, #f4f6f7, #dfe5e8); }
.q__img img { display: block; width: 100%; max-height: 320px; object-fit: contain; }
.q__options { display: grid; gap: .7rem; }
.radio-card { display: flex; align-items: center; gap: .9rem; border: 1.5px solid var(--c-line); border-radius: var(--radius); padding: 1rem 1.15rem; cursor: pointer; font-size: 1.0625rem; line-height: 1.4; transition: border-color .2s, background .2s, transform .2s var(--ease); }
.radio-card:hover { border-color: var(--c-primary); transform: translateY(-1px); }
.radio-card input { position: absolute; opacity: 0; pointer-events: none; }
.radio-card__dot { flex: 0 0 auto; width: 1.4rem; height: 1.4rem; border-radius: 50%; border: 2px solid #b8c0c4; transition: all .2s; }
.radio-card:has(input:checked) { border-color: var(--c-primary); background: var(--c-primary-soft); }
.radio-card:has(input:checked) .radio-card__dot { border-color: var(--c-primary-dark); background: radial-gradient(circle, var(--c-primary-dark) 42%, #fff 46%); }
.radio-card:has(input:focus-visible) { outline: 2px solid var(--c-primary); outline-offset: 3px; }
.exam__nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2rem; }

.result { position: relative; isolation: isolate; overflow: hidden; border-radius: var(--radius-lg); background: linear-gradient(135deg, var(--c-deep), var(--c-graphite)); color: rgba(255, 255, 255, .86); padding: clamp(1.5rem, 4vw, 2.75rem); display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(1.25rem, 4vw, 2.75rem); align-items: center; box-shadow: var(--shadow-lg); }
.result::after { content: ""; position: absolute; z-index: -1; width: 520px; height: 520px; border-radius: 50%; right: -200px; top: -240px; background: radial-gradient(circle, rgba(54, 170, 224, .3), transparent 65%); }
.result h1 { color: #fff; font-size: var(--fs-xxl); margin: .8rem 0 .6rem; }
.result .xv-eyebrow { color: var(--c-primary); }
.result:not(.is-pass) .ring { background: conic-gradient(#ff8f85 calc(var(--p) * 1%), rgba(255, 255, 255, .16) 0); }
.result .btns { align-items: center; }
@media (max-width: 640px) { .result { grid-template-columns: 1fr; } }
.review { list-style: none; margin: 0; padding: 0; counter-reset: rv; }
.review__row { display: grid; grid-template-columns: auto 1fr; gap: 1rem; padding: 1.1rem 1.5rem; border-top: 1px solid #eef0f1; }
.review__row strong { display: block; font-weight: 600; line-height: 1.4; margin-bottom: .3rem; }
.review__row p + p { margin-top: .2rem; }
.review__mark { width: 1.7rem; height: 1.7rem; border-radius: 50%; display: grid; place-items: center; font-size: .8125rem; font-weight: 800; background: var(--c-ok-soft); color: var(--c-ok); }
.review__row.is-bad .review__mark { background: var(--c-bad-soft); color: var(--c-bad); }
.auth--join { min-height: calc(100vh - 64px); min-height: calc(100svh - 64px); }

/* ==========================================================================
   PORTALEN, egen, lugn layout: en meny till vänster, innehållet till höger.
   ========================================================================== */
body.portal { background: var(--c-cool); display: block; }
.pl { display: grid; grid-template-columns: 256px minmax(0, 1fr); min-height: 100vh; min-height: 100svh; }
.ico { width: 20px; height: 20px; flex: 0 0 auto; }

.pl-side { background: var(--c-deep); color: rgba(255, 255, 255, .72); display: flex; flex-direction: column; padding: 1.5rem 1rem 1.1rem; position: sticky; top: 0; height: 100vh; height: 100svh; overflow-y: auto; }
.pl-side__logo { display: flex; align-items: center; gap: .7rem; padding: 0 .6rem 1.6rem; text-decoration: none; }
.pl-side__logo img { height: 26px; width: auto; display: block; }
.pl-side__logo span { font: 700 .6875rem/1 var(--f-head); letter-spacing: .16em; text-transform: uppercase; color: var(--c-primary); }
.pl-nav { display: grid; gap: 2px; }
.pl-nav__label { font-size: .6875rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .38); padding: 1.3rem .75rem .45rem; margin: 0; }
.pl-nav a { display: flex; align-items: center; gap: .75rem; padding: .62rem .75rem; border-radius: 10px; color: rgba(255, 255, 255, .78); text-decoration: none; font: 600 .9375rem/1.2 var(--f-body); transition: background .15s, color .15s; }
.pl-nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.pl-nav a[aria-current="page"] { background: rgba(54, 170, 224, .16); color: #fff; }
.pl-nav a[aria-current="page"] .ico { color: var(--c-primary); }
.pl-side__foot { margin-top: auto; padding-top: 1.5rem; display: grid; gap: .25rem; }
.pl-side__foot a, .pl-side__foot button { display: flex; align-items: center; gap: .75rem; width: 100%; padding: .55rem .75rem; border-radius: 10px; background: none; border: 0; color: rgba(255, 255, 255, .6); font: 500 .875rem/1.2 var(--f-body); text-decoration: none; cursor: pointer; text-align: left; }
.pl-side__foot a:hover, .pl-side__foot button:hover { color: #fff; background: rgba(255, 255, 255, .07); }
.pl-me { display: flex; align-items: center; gap: .7rem; padding: .9rem .75rem .3rem; margin-top: .6rem; border-top: 1px solid rgba(255, 255, 255, .1); line-height: 1.25; min-width: 0; }
.pl-me__avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--c-primary); color: var(--c-deep); display: grid; place-items: center; font: 700 .8125rem/1 var(--f-head); flex: 0 0 auto; }
.pl-me strong { display: block; color: #fff; font: 700 .9375rem/1.2 var(--f-head); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-me div span { display: block; font-size: .75rem; color: rgba(255, 255, 255, .5); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.pl-main { min-width: 0; padding: clamp(1.25rem, 3vw, 2.5rem) clamp(1rem, 3.5vw, 3rem) 4rem; }
.pl-main > * { max-width: 1180px; margin-inline: auto; }
.pl-main--narrow > * { max-width: 720px; }
.pl-bar { display: none; }
.pl-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem 2rem; margin-bottom: 1.75rem; }
.pl-head h1 { font-size: clamp(1.6rem, 1.3rem + 1vw, 2.1rem); letter-spacing: -.015em; }
.pl-head p { color: var(--c-muted); margin-top: .35rem; font-size: .9375rem; }
.pl-head__back { display: inline-flex; align-items: center; gap: .35rem; font-size: .875rem; color: var(--c-muted); text-decoration: none; margin-bottom: .5rem; }
.pl-head__back:hover { color: var(--c-primary-dark); }
.pl-head__back .ico { width: 16px; height: 16px; }
.pl-head__actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.pl-stack > * + * { margin-top: 1.5rem; }

.panel { background: #fff; border-radius: var(--radius); box-shadow: 0 1px 2px rgba(22, 26, 30, .05); border: 1px solid #e6eaec; overflow: hidden; }
.panel--pad { padding: clamp(1.1rem, 2.2vw, 1.6rem); }
.panel__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.4rem; border-bottom: 1px solid #eef0f1; }
.panel__head h2 { font-size: 1.0625rem; letter-spacing: 0; }
.panel__head a { font-size: .875rem; font-weight: 600; text-decoration: none; }
.panel .table th { padding: .7rem 1.4rem; background: #fafbfc; }
.panel .table td { padding: .85rem 1.4rem; }
.panel .empty { padding: 2.25rem 1.4rem; font-size: .9375rem; }
.panel .pager { padding: .85rem 1.4rem; }

.numbers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.numbers a { padding: 1.3rem 1.4rem; text-decoration: none; color: inherit; border-left: 1px solid #eef0f1; transition: background .15s; }
.numbers a:first-child { border-left: 0; }
.numbers a:hover { background: #fafbfc; }
.numbers strong { display: block; font: 700 2rem/1.05 var(--f-head); letter-spacing: -.03em; }
.numbers span { display: block; margin-top: .3rem; color: var(--c-muted); font-size: .875rem; }
@media (max-width: 760px) { .numbers { grid-template-columns: 1fr 1fr; } .numbers a:nth-child(3) { border-left: 0; } .numbers a:nth-child(n+3) { border-top: 1px solid #eef0f1; } }

.filters { display: flex; flex-wrap: wrap; gap: .6rem; padding: 1rem 1.4rem; border-bottom: 1px solid #eef0f1; }
.filters input[type="search"], .filters select { font: inherit; font-size: .9375rem; color: var(--c-text); background: #fff; border: 1.5px solid var(--c-line); border-radius: 10px; padding: .55rem .85rem; appearance: none; }
.filters input[type="search"] { flex: 1 1 16rem; min-width: 0; }
.filters select { padding-right: 2.3rem; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6a70' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right .7rem center/1rem no-repeat; }
.filters input:focus, .filters select:focus { outline: 0; border-color: var(--c-primary); box-shadow: 0 0 0 4px rgba(54, 169, 224, .18); }

.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--c-line); margin-bottom: 1.5rem; overflow-x: auto; }
.tabs a { padding: .75rem 1rem; font: 700 .9375rem/1 var(--f-head); color: var(--c-muted); text-decoration: none; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a:hover { color: var(--c-text); }
.tabs a[aria-current="page"] { color: var(--c-primary-dark); border-bottom-color: var(--c-primary); }

.facts-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 1.25rem 2rem; }
.facts-row div span { display: block; font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--c-muted); }
.facts-row div b { display: block; margin-top: .25rem; font: 700 1.0625rem/1.35 var(--f-head); }

/* Kursinnehåll: steg och lektioner */
.lesson-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1rem; padding: 1.2rem 1.4rem 1.4rem; }
.lesson-tile { display: block; border-radius: 12px; overflow: hidden; border: 1px solid #e6eaec; text-decoration: none; color: inherit; background: #fff; transition: transform .25s var(--ease), box-shadow .25s; }
.lesson-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); color: inherit; }
.lesson-tile img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--c-deep); }
.lesson-tile div { padding: .8rem .95rem .9rem; }
.lesson-tile strong { display: block; font: 700 1rem/1.3 var(--f-head); }
.lesson-tile span { display: block; margin-top: .2rem; font-size: .8125rem; color: var(--c-muted); }

/* Granskningsvy: alla scener i en lektion som miniatyrer */
.thumbs { --s: .3; display: grid; grid-template-columns: repeat(auto-fill, calc(1280px * var(--s))); gap: 1.25rem; }
.thumb { text-decoration: none; color: inherit; display: block; }
.thumb__frame { width: calc(1280px * var(--s)); height: calc(760px * var(--s)); border-radius: 10px; overflow: hidden; background: var(--c-night); box-shadow: 0 1px 2px rgba(22, 26, 30, .08), 0 8px 20px -10px rgba(22, 26, 30, .35); }
.thumb__stage { position: relative; width: 1280px; height: 760px; transform: scale(var(--s)); transform-origin: 0 0; color: rgba(255, 255, 255, .86); font-size: 1.0625rem; pointer-events: none; }
.thumb__stage .scene { transition: none; }
.thumb__stage .scene__media { max-height: 600px; }
.thumb__stage .scene__media--wide { max-height: 430px; }
.thumb__stage .tile { max-height: 380px; }
.thumb__stage .compare__img { max-height: 330px; }
.thumb__stage .model { min-height: 470px; }
.thumb__stage * { animation: none !important; }
.thumb > p { margin-top: .5rem; font-size: .8125rem; color: var(--c-muted); display: flex; justify-content: space-between; gap: .75rem; }
.thumb > p b { color: var(--c-text); font-weight: 600; }

.qlist { list-style: none; margin: 0; padding: 0; }
.qlist > li { padding: 1.1rem 1.4rem; border-top: 1px solid #eef0f1; }
.qlist > li:first-child { border-top: 0; }
.qlist strong { display: block; font-weight: 600; line-height: 1.4; }
.qlist ul { list-style: none; margin: .6rem 0 0; padding: 0; display: grid; gap: .25rem; font-size: .9375rem; color: var(--c-muted); }
.qlist ul li { padding-left: 1.5rem; position: relative; }
.qlist ul li::before { content: ""; position: absolute; left: .2rem; top: .55em; width: .5rem; height: .5rem; border-radius: 50%; border: 1.5px solid #c3cacd; }
.qlist ul li.is-right { color: var(--c-ok); font-weight: 600; }
.qlist ul li.is-right::before { background: var(--c-ok); border-color: var(--c-ok); }
.qlist small { display: block; margin-top: .55rem; font-size: .75rem; letter-spacing: .05em; text-transform: uppercase; color: #94a0a5; }

@media (max-width: 900px) {
	.pl { grid-template-columns: 1fr; }
	.pl-bar { display: flex; align-items: center; justify-content: space-between; background: var(--c-deep); padding: .7rem 1rem; position: sticky; top: 0; z-index: 60; }
	.pl-bar img { height: 24px; width: auto; display: block; }
	.pl-bar button { width: 40px; height: 40px; border-radius: 8px; border: 0; background: rgba(255, 255, 255, .12); color: #fff; display: grid; place-items: center; cursor: pointer; }
	.pl-side { position: fixed; inset: 0; z-index: 70; height: auto; transform: translateX(-102%); visibility: hidden; transition: transform .35s var(--ease), visibility 0s linear .35s; }
	.pl-side.is-open { transform: none; visibility: visible; transition: transform .35s var(--ease); }
	.thumbs { --s: .26; }
}
@media print { .pl-side, .pl-bar { display: none !important; } .pl { display: block; } }
.pl > div { min-width: 0; }
@media (max-width: 1240px) { .thumbs { --s: .26; } }

/* Slå ihop företag */
.merge h2 { font-size: 1.125rem; margin: 0 0 1rem; }
.merge__sides { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: .9rem; }
.merge__side { align-items: flex-start; }
.merge__side b { display: block; font: 700 1.0625rem/1.3 var(--f-head); }
.merge__side .sub { display: block; margin-top: .25rem; color: var(--c-muted); font-size: .875rem; }
.merge__side:has(input:disabled) { opacity: .55; pointer-events: none; }
.merge__note { margin: 1.1rem 0 0; max-width: 46rem; color: var(--c-muted); font-size: .9375rem; }
.merge__note strong { color: var(--c-text); }
.merge__actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.4rem; }
.merge__pick { display: flex; flex-wrap: wrap; gap: .6rem; }
.merge__pick select { flex: 1 1 16rem; max-width: 30rem; font: inherit; font-size: .9375rem; color: var(--c-text); background: #fff; border: 1.5px solid var(--c-line); border-radius: 10px; padding: .6rem .8rem; }
.dup a { color: inherit; font-weight: 700; }
