/* ═══════════════════════════════════════════════════════════
   Variant C: "Vad ni kan förvänta er"
   Sidan som en upphandlande hyresvärd skickar vidare internt.
   Första skärmen visar hela processen: sex steg, varje steg en bild,
   och en växlare mellan hyresvärdens och hyresgästens resa.
   Bygger på ../../assets/process/tokens.css (lagret "rooma"); allt här
   ligger utanför lagret och vinner därför utan !important.
   ═══════════════════════════════════════════════════════════ */

:root {
  --wrap-max: 1480px;
  --hero-max: 1480px;
  --who-ni: var(--ink);
  --who-vi: var(--sky);
  --who-hg: var(--clay);
  --thumb-r: 10px;
}

/* ─────────── Bas ─────────── */
.wrap { width: 100%; max-width: calc(var(--wrap-max) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }

.skip {
  position: absolute; left: var(--space-4); top: -100px; z-index: 100;
  padding: 10px 16px; border-radius: var(--radius-sm);
  background: var(--navy); color: var(--on-dark); text-decoration: none; font-weight: 500;
}
.skip:focus { top: var(--space-3); }

code { font-family: var(--font-mono); font-size: 0.86em; padding: 1px 5px; border-radius: 5px; background: var(--surface-2); color: var(--ink); word-break: break-word; }

/* ─────────── Menyn ─────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper);
  box-shadow: 0 1px 0 transparent;
  transition: box-shadow var(--dur-2) var(--ease-out);
}
.nav.is-scrolled { box-shadow: 0 1px 0 var(--line); }
.nav__in {
  max-width: calc(var(--hero-max) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter);
  height: var(--nav-h); display: flex; align-items: center; gap: var(--space-6);
}
.nav__links { display: flex; align-items: center; gap: var(--space-1); margin-left: auto; }
.nav__links a {
  padding: 8px 12px; border-radius: var(--radius-pill);
  font-size: var(--step--1); font-weight: 500; color: var(--ink-2); text-decoration: none;
  transition: color var(--dur-1) var(--ease-out), background-color var(--dur-1) var(--ease-out);
}
.nav__links a:hover { color: var(--ink); background: var(--surface-2); }
.nav__lang { margin-left: var(--space-2); }
.nav__cta { min-height: 40px; padding: 0 18px; font-size: var(--step--1); }

/* ═══════════ Första skärmen ═══════════ */
.hero { --dwell: 6s; }
.hero__grid {
  --gap: clamp(32px, 4vw, 72px);
  --title-min: 340px;
  --stage-w: min(
    calc(100vw - 2 * var(--gutter) - var(--title-min) - var(--gap)),
    calc((100svh - var(--nav-h) - 236px) * 16 / 10),
    1060px
  );
  max-width: calc(var(--hero-max) + 2 * var(--gutter)); margin-inline: auto;
  padding: clamp(20px, 3.4svh, 40px) var(--gutter) clamp(8px, 2svh, 24px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--stage-w);
  grid-template-areas: "title stage" "cap stage" "tl tl";
  column-gap: var(--gap);
}
.hero__title { grid-area: title; align-self: start; padding-top: var(--space-2); }
.hero h1 {
  font-size: var(--step-4); line-height: var(--leading-tight); letter-spacing: var(--tracking-display);
  max-width: 9.5ch;
}
.hero__sub { margin-top: var(--space-4); font-size: var(--step-1); line-height: 1.4; color: var(--ink-2); max-width: 24ch; text-wrap: pretty; }
.hero__cta { display: none; }
.journey { margin-top: var(--space-6); }
.journey > button { min-width: 7.5em; }

/* Filmen: en tyst knapp under växlaren */
.filmbtn {
  display: flex; align-items: center; gap: 12px; margin-top: var(--space-5);
  padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: var(--step--1); font-weight: 500; color: var(--ink);
}
.filmbtn__icon {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none;
  box-shadow: inset 0 0 0 1px var(--line-strong);
  transition: background-color var(--dur-1) var(--ease-out), box-shadow var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out);
}
.filmbtn__icon svg { width: 12px; height: 12px; fill: currentColor; margin-left: 2px; }
.filmbtn:hover .filmbtn__icon, .is-film .filmbtn__icon { background: var(--ink); color: var(--paper); box-shadow: none; }
.filmbtn__t { font-family: var(--font-mono); font-weight: 400; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* Den stora ytan: 16:10, samma format som renderingarna och appens skärmbilder */
.stage {
  grid-area: stage;
  position: relative; overflow: hidden; isolation: isolate;
  aspect-ratio: 16 / 10; width: 100%;
  border-radius: var(--radius-lg); background: var(--media-bg);
}
.stage::after {
  content: ""; position: absolute; inset: 0; z-index: 5; border-radius: inherit;
  box-shadow: var(--edge); pointer-events: none;
}
/* Stegbyte: nästa bild avtäcks över den förra (ingen dubbelexponering) */
.panel {
  position: absolute; inset: 0;
  visibility: hidden;
  transition: visibility 0s linear 0.62s; z-index: 0;
}
.panel.is-on { visibility: visible; transition: visibility 0s; z-index: 1; }
@keyframes c-wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@media (prefers-reduced-motion: no-preference) {
  .js .panel.is-on { animation: c-wipe 0.6s cubic-bezier(0.65, 0, 0.25, 1) both; }
  .js .hero:not(.is-ready) .panel.is-on { animation: none; }
}
@media (prefers-reduced-motion: reduce) { .panel { transition: none; } }
.panel > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
[data-panel="startbild"] > img { transform: scale(1.012); transform-origin: 50% 0; }

/* 01–02: byggscenen. Renderingarnas eget format (2400 × 1500) i mitten av ytan;
   main.js flyttar, lutar och avtäcker lagren. Bakgrunden är renderingarnas studio. */
.panel--bygg { --k0: 0.86; --k1: 1; background: #f2f1ef; container-type: size; overflow: hidden; }
.bygg__board {
  position: absolute; left: 50%; top: 50%; width: min(100cqw, 160cqh); aspect-ratio: 16 / 10;
  transform: translate(-50%, -50%) scale(var(--k0)); transform-origin: 50% 50%;
}
.bygg__l, .bygg__top { position: absolute; inset: 0; width: 100%; height: 100%; }
.bygg__top { transform-origin: 0 0; }
.bygg__tom, .bygg__mobl { opacity: 0; }
/* Utan skript: ritningen syns direkt; renderingen avtäcks när main.js tar över */
.js .bygg__plan3d { -webkit-mask-image: linear-gradient(110deg, #000 -32%, transparent -4%); mask-image: linear-gradient(110deg, #000 -32%, transparent -4%); }
.bygg__lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; color: #1e2528; }
.bygg__lines .pl-floor { fill: none; }
.bygg__lines .pl-wall { fill: currentColor; stroke: currentColor; stroke-width: 1.5; }
.bygg__lines .pl-win { fill: none; stroke: currentColor; stroke-width: 2.4; }
.bygg__lines .pl-door { fill: none; stroke: currentColor; stroke-width: 2.4; }
.bygg__lines .pl-dim { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-opacity: .6; }
.bygg__lines .pl-t { font-family: var(--font-body); font-size: 40px; font-weight: 500; fill: currentColor; fill-opacity: .8; font-variant-numeric: tabular-nums; }
.bygg__lines .pl-t--s { font-size: 36px; fill-opacity: .7; }
.bygg__eye { position: absolute; inset: 0; opacity: 0; transform-origin: 51.6% 76%; }
.bygg__eye > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 55%; opacity: 0; }
.bygg__eye > img:first-child { opacity: 1; }

/* Koncepten som färgprickar, som i appen */
.cdots {
  position: absolute; left: 3.2%; bottom: 4.5%; z-index: 3;
  display: inline-flex; align-items: center; gap: 12px; padding: 8px 14px 8px 10px;
  border-radius: var(--radius-pill); color: #fff; font-size: 13px; font-weight: 500;
  opacity: 0;
}
.cdots__dots { display: inline-flex; gap: 5px; }
.cdots__dots > i {
  width: 14px; height: 14px; border-radius: 50%; background: var(--c);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
  transition: transform var(--dur-1) var(--ease-out), box-shadow var(--dur-1) var(--ease-out);
}
.cdots__dots > i.is-on { transform: scale(1.18); box-shadow: 0 0 0 2px rgba(14, 25, 48, 0.55), 0 0 0 3.5px #fff; }
.cdots__name { min-width: 8.5em; }
@media (prefers-reduced-motion: reduce) {
  .panel--bygg[data-phase="2"] .cdots { opacity: 1; }
}

/* Filmen */
.panel--film { background: #000; }
.panel--film video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }

/* Annonsen och inkorgen: ett skärmfönster som går ut genom underkanten */
.panel--doc { background: var(--surface-2); padding: 5.5% 7% 0; }
.panel--doc > .mk-browser, .panel--doc > .mk-mail { box-shadow: var(--shadow-3); }
.panel--mail { padding: 3.2% 3.6% 0; }
.panel--mail > .mk-mail { height: 108%; }
.panel__code {
  position: absolute; left: 3.5%; bottom: 7%; z-index: 2; width: min(70%, 560px);
  filter: drop-shadow(0 18px 30px rgba(var(--shadow-rgb), 0.28));
}
[data-journey="hg"] [data-only="hv"] { display: none; }

/* Förslaget som PDF: två sidor på bordet */
.panel--pdf { background: var(--surface-2); }
.sheets { position: absolute; inset: 0; margin: 0; }
.sheet {
  position: absolute; top: 9%; width: 37%; height: auto;
  border-radius: 4px; background: #fff;
  box-shadow: 0 0 0 1px rgba(14, 25, 48, 0.06), var(--shadow-3);
}
.sheet--1 { left: 13%; }
.sheet--2 { left: 50%; top: 14%; }

/* Bildtexten till aktuellt steg */
.hero__cap {
  grid-area: cap; align-self: end;
  padding-top: var(--space-5); border-top: 1px solid var(--line);
  margin-top: var(--space-6);
}
.cap__top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); }
.cap__count { font-family: var(--font-mono); font-size: var(--step--1); color: var(--accent); font-variant-numeric: tabular-nums; }
.cap__of { color: var(--ink-3); }
.cap__pause {
  width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  background: transparent; color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line-strong);
  transition: box-shadow var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out);
}
.cap__pause:hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.cap__pause[hidden] { display: none; }
.cap__pause svg { width: 14px; height: 14px; fill: currentColor; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cap__pause .i-play { display: none; }
.cap__pause[aria-pressed="true"] .i-pause { display: none; }
.cap__pause[aria-pressed="true"] .i-play { display: block; }
.cap__pause .i-replay { display: none; fill: none; }
.cap__pause.is-replay .i-pause, .cap__pause.is-replay .i-play { display: none; }
.cap__pause.is-replay .i-replay { display: block; }
.cap__label {
  margin-top: var(--space-3);
  font-family: var(--font-display); font-weight: 500; font-size: var(--step-3);
  letter-spacing: var(--tracking-heading); line-height: var(--leading-snug);
}
.cap__line { margin-top: var(--space-2); font-size: var(--step-1); color: var(--ink-2); line-height: 1.4; max-width: 22ch; min-height: 2.8em; }
.cap__who, .who {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: var(--step--1); font-weight: 500; color: var(--ink-2);
}
.cap__who {
  margin-top: var(--space-4); padding: 5px 12px 5px 10px; border-radius: var(--radius-pill);
  box-shadow: inset 0 0 0 1px var(--line);
}
.cap__who[data-who=""] { visibility: hidden; }
.cap__who i, .who i { width: 8px; height: 8px; border-radius: 50%; background: var(--who-ni); flex: none; }
[data-who="vi"] > i { background: var(--who-vi); }
[data-who="hg"] > i { background: var(--who-hg); }

/* ─────────── Tidslinjen ─────────── */
.tl {
  grid-area: tl;
  margin-top: clamp(24px, 3.6svh, 40px);
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(12px, 1.4vw, 20px);
}
.tl__step {
  display: flex; flex-direction: column; gap: 0; padding: 0; border: 0; background: none;
  text-align: left; cursor: pointer; color: var(--ink-3);
  border-radius: var(--radius-sm);
}
.tl__step:focus-visible { outline-offset: 6px; }
.tl__rail { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.tl__rail .r-num { color: var(--ink-3); transition: color var(--dur-2) var(--ease-out); }
.tl__bar { position: relative; flex: 1; height: 1px; background: var(--line-strong); overflow: hidden; transform-origin: left; }
.tl__bar > i { position: absolute; inset: -1px 0; background: var(--ink); transform: scaleX(0); transform-origin: left; }
.tl__step.is-past .tl__bar > i { transform: scaleX(1); opacity: 0.3; }
.tl__step[aria-selected="true"] .tl__bar > i { transform: scaleX(var(--p, 1)); opacity: 1; }
.tl__step[aria-selected="true"] .r-num { color: var(--accent); }

.tl__thumb {
  position: relative; display: block; aspect-ratio: 16 / 8; overflow: hidden;
  border-radius: var(--thumb-r); background: var(--media-bg);
  transition: box-shadow var(--dur-2) var(--ease-out);
  box-shadow: 0 0 0 1px var(--line);
}
.tl__thumb img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: opacity var(--dur-3) var(--ease-in-out), filter var(--dur-2) var(--ease-out), transform var(--dur-3) var(--ease-out);
  filter: saturate(0.8);
  opacity: 0.86;
}
.tl__step:hover .tl__thumb img { filter: none; opacity: 1; }
.tl__step[aria-selected="true"] .tl__thumb { box-shadow: 0 0 0 2px var(--paper), 0 0 0 3.5px var(--ink); }
.tl__step[aria-selected="true"] .tl__thumb img { filter: none; opacity: 1; }
[data-journey="hv"] .tl__thumb img[data-j="hg"],
[data-journey="hg"] .tl__thumb img[data-j="hv"] { opacity: 0; visibility: hidden; }

.tl__label { margin-top: 12px; font-size: var(--step--1); font-weight: 500; line-height: 1.3; transition: color var(--dur-2) var(--ease-out); }
.tl__step:hover .tl__label, .tl__step[aria-selected="true"] .tl__label { color: var(--ink); }
[data-journey="hv"] .tl__label [data-j="hg"],
[data-journey="hg"] .tl__label [data-j="hv"] { display: none; }

.tl__label > span { display: inline-flex; align-items: center; gap: 8px; }
.tl__label > span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; flex: none; background: transparent; }
.tl__step[data-hv-who="ni"] .tl__label [data-j="hv"]::before { background: var(--who-ni); }
.tl__step[data-hv-who="vi"] .tl__label [data-j="hv"]::before { background: var(--who-vi); }
.tl__step[data-hv-who="hg"] .tl__label [data-j="hv"]::before,
.tl__label [data-j="hg"]::before { background: var(--who-hg); }
.tl__step[data-hv-who=""] .tl__label [data-j="hv"]::before { box-shadow: inset 0 0 0 1px var(--ink-3); }

/* Medan filmen visas är inget steg valt */
.is-film .tl__step[aria-selected="true"] .tl__thumb { box-shadow: 0 0 0 1px var(--line); }
.is-film .tl__step[aria-selected="true"] .tl__label { color: var(--ink-3); }
.is-film .tl__step[aria-selected="true"] .r-num { color: var(--ink-3); }
.is-film .tl__step[aria-selected="true"] .tl__bar > i { opacity: 0; }
.is-film .cap__who, .is-film .cap__count { visibility: hidden; }

/* Linjen ritas fram en gång när sidan laddat */
@media (prefers-reduced-motion: no-preference) {
  .js .tl__bar { transform: scaleX(0); }
  .js .tl.is-in .tl__bar { transform: scaleX(1); transition: transform var(--dur-5) var(--ease-out); }
  .js .tl.is-in .tl__step:nth-child(2) .tl__bar { transition-delay: 80ms; }
  .js .tl.is-in .tl__step:nth-child(3) .tl__bar { transition-delay: 160ms; }
  .js .tl.is-in .tl__step:nth-child(4) .tl__bar { transition-delay: 240ms; }
  .js .tl.is-in .tl__step:nth-child(5) .tl__bar { transition-delay: 320ms; }
  .js .tl.is-in .tl__step:nth-child(6) .tl__bar { transition-delay: 400ms; }
}

/* ═══════════ Avsnitten under vecket ═══════════ */
.sec { padding-top: var(--section); }
.sec__head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-3) var(--space-6);
  padding-top: var(--space-5); border-top: 1px solid var(--line);
  margin-bottom: clamp(28px, 4vw, 48px);
}
.sec__head h2 { font-size: var(--step-3); max-width: 28ch; }
.sec__lede { font-size: var(--step-0); color: var(--ink-2); max-width: var(--measure); }
.sec__aside { min-height: 40px; font-size: var(--step--1); }

/* Vad ni får: en stor fotobild, två mindre bilder och koden som ett band */
.gets {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-areas:
    "foto foto foto foto foto foto foto foto koncept koncept koncept koncept"
    "foto foto foto foto foto foto foto foto mail mail mail mail"
    "kod kod kod kod kod kod kod kod kod kod kod kod";
  gap: clamp(20px, 2.4vw, 32px) clamp(16px, 2vw, 28px);
}
.get { margin: 0; display: flex; flex-direction: column; min-width: 0; }
.get--foto { grid-area: foto; }
.get--koncept { grid-area: koncept; }
.get--mail { grid-area: mail; }
.get--kod { grid-area: kod; }
.get__media { flex: 1; min-height: 0; aspect-ratio: 16 / 10; }
.get--foto .get__media { aspect-ratio: auto; min-height: 420px; }
.get__media > img { width: 100%; height: 100%; object-fit: cover; }
.get__label { margin-top: var(--space-3); font-weight: 500; font-size: var(--step-0); color: var(--ink); }
.get--foto .get__label { font-family: var(--font-display); font-size: var(--step-2); letter-spacing: var(--tracking-heading); }

.get__media--strips { display: flex; gap: 2px; background: var(--paper); }
.get__media--strips > span { position: relative; flex: 1; overflow: hidden; background: var(--media-bg); }
.get__media--strips img {
  position: absolute; top: 0; height: 100%; width: auto; max-width: none;
  left: calc(-100% * (var(--i) + 2.28));
}
.get__media--shot > img { object-position: 50% 0; transform: scale(1.22); transform-origin: 50% 0; }

/* Koden: en rad, som den klistras in. Raden tonar ut i stället för att klippas. */
.get__code {
  position: relative; overflow: hidden; border-radius: var(--radius-lg);
  padding: clamp(22px, 2.6vw, 34px) clamp(22px, 3vw, 40px);
  background: var(--navy-deep); box-shadow: var(--edge);
}
.get__code code {
  display: block; padding: 0; background: none; white-space: nowrap; overflow: hidden;
  font-size: clamp(0.82rem, 0.6rem + 0.7vw, 1.15rem); line-height: 1.5; color: #c9d6ea; word-break: normal;
  -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent); mask-image: linear-gradient(90deg, #000 82%, transparent);
}
.get__code .p { color: #7f8da8; }
.get__code .t { color: #f0a77e; }
.get__code .a { color: #9ec9e0; }
.get__code .v { color: #e7d9a8; }

/* Arbetsfördelningen: en saklig tabell */
.split { width: 100%; border-collapse: collapse; font-size: var(--step-0); }
.split thead th { text-align: left; padding: 0 var(--space-5) var(--space-4) 0; font-weight: 500; vertical-align: bottom; }
.split thead th:first-child { width: 22%; }
.split thead th { font-size: var(--step--1); color: var(--ink-2); }
.split tbody th, .split tbody td { padding: var(--space-5) var(--space-5) var(--space-5) 0; border-top: 1px solid var(--line); vertical-align: top; text-align: left; }
.split tbody tr:last-child > * { border-bottom: 1px solid var(--line); }
.split tbody th { font-weight: 500; color: var(--ink); white-space: nowrap; }
.split td { color: var(--ink-2); line-height: 1.5; }
.split td.none { color: var(--ink-3); }
.split .who { color: var(--ink); }

.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-5); margin-top: clamp(28px, 3.4vw, 44px); }
.cta-row .r-btn { min-height: 48px; padding: 0 24px; }
.cta-row > span { color: var(--ink-2); font-size: var(--step--1); }

/* Frågor: kompakt rutnät */
.faq { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(32px, 4vw, 48px) clamp(24px, 3vw, 48px); }
.faq__item { padding-top: var(--space-4); border-top: 1px solid var(--line); }
.faq__item h3 { font-family: var(--font-body); font-weight: 500; font-size: var(--step-0); letter-spacing: 0; color: var(--ink); }
.faq__item p { margin-top: var(--space-2); color: var(--ink-2); max-width: 36ch; }
.faq__item .faq__note { margin-top: var(--space-3); font-size: var(--step--1); color: var(--ink-3); line-height: 1.5; }
.faq__note a { color: var(--accent); text-underline-offset: 3px; }

/* Före och efter */
.ba { margin: 0; }
.ba__frame { aspect-ratio: 2.2 / 1; --pos: 50%; }
.ba__frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ba__before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); z-index: 1; }
.ba__handle {
  position: absolute; top: 0; bottom: 0; left: var(--pos); z-index: 2; width: 2px; margin-left: -1px;
  background: rgba(255, 255, 255, 0.9); pointer-events: none;
}
.ba__handle > span {
  position: absolute; top: 50%; left: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px;
  border-radius: 50%; background: #fff; box-shadow: 0 6px 20px -6px rgba(0, 0, 0, 0.45);
}
.ba__handle > span::before, .ba__handle > span::after {
  content: ""; position: absolute; top: 50%; width: 7px; height: 7px; margin-top: -3.5px;
  border: solid var(--navy); border-width: 0 0 1.6px 1.6px;
}
.ba__handle > span::before { left: 13px; transform: rotate(45deg); }
.ba__handle > span::after { right: 13px; transform: rotate(-135deg); }
.ba__tag {
  position: absolute; top: var(--space-4); z-index: 3; padding: 5px 12px; border-radius: var(--radius-pill);
  background: var(--scrim); color: #fff; font-size: var(--step--1); font-weight: 500; pointer-events: none;
}
.ba__tag--l { left: var(--space-4); }
.ba__tag--r { right: var(--space-4); }
.ba__range {
  position: absolute; inset: 0; z-index: 4; width: 100%; height: 100%; margin: 0;
  opacity: 0; cursor: ew-resize; -webkit-appearance: none; appearance: none; touch-action: pan-y;
}
.ba__frame:has(.ba__range:focus-visible) { outline: 3px solid var(--accent); outline-offset: 3px; }
.ba figcaption { margin-top: var(--space-3); }

/* Demot: den enda mörka ytan */
.try {
  margin-top: var(--section); padding-block: var(--section) clamp(40px, 5vw, 72px);
  background: var(--navy-deep); color: var(--on-dark);
}
.sec__head--dark { border-top-color: rgba(255, 255, 255, 0.14); }
.sec__head--dark .sec__lede { color: var(--on-dark-2); }
.demo__stage { aspect-ratio: 2 / 1; background: #f2f1ef; }
.demo__stage::after { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
.demo__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 52%; }
.demo__start { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; }
.demo__btn { background: #fff; color: var(--navy); min-height: 52px; padding: 0 26px; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5); }
.demo__btn:hover { background: #dfeef3; }
.demo__btn svg { width: 14px; height: 14px; fill: currentColor; }
.demo.is-loading .demo__note a { opacity: 0.8; pointer-events: none; }
.demo.is-live .demo__start, .demo.is-live .demo__poster { display: none; }
.demo__frame { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; border: 0; }
.demo__note { margin-top: var(--space-4); font-size: var(--step--1); color: var(--on-dark-2); }
.demo__note a { color: var(--on-dark); text-underline-offset: 3px; }

/* Kontakt */
.reach { padding-bottom: var(--section); }
.contact { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); padding-top: var(--space-5); border-top: 1px solid var(--line); }
.contact__text h2 { font-size: var(--step-3); }
.contact__text p { margin-top: var(--space-4); color: var(--ink-2); max-width: 32ch; }
.contact__text .contact__alt { font-size: var(--step--1); }
.contact__alt a { color: var(--accent); text-underline-offset: 3px; }
.contact__trap { position: absolute; left: -9999px; }
.contact__fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4) var(--space-4); }
.contact__fields label { display: grid; gap: 6px; font-size: var(--step--1); font-weight: 500; color: var(--ink-2); }
.contact__wide { grid-column: 1 / -1; }
.contact__fields input, .contact__fields select, .contact__fields textarea {
  font: inherit; font-size: var(--step-0); font-weight: 400; color: var(--ink);
  width: 100%; min-height: 48px; padding: 0 14px; border: 0; border-radius: var(--radius-sm);
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-strong);
  transition: box-shadow var(--dur-1) var(--ease-out);
}
.contact__fields textarea { padding: 12px 14px; resize: vertical; min-height: 96px; }
.contact__fields select { appearance: none; -webkit-appearance: none; padding-right: 40px;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.contact__fields input:hover, .contact__fields select:hover, .contact__fields textarea:hover { box-shadow: inset 0 0 0 1px var(--ink-3); }
.contact__fields :is(input, select, textarea):focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--accent); }
.contact__status { margin-top: var(--space-4); font-size: var(--step--1); color: var(--ink-2); min-height: 1.4em; }
.contact__row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4) var(--space-5); margin-top: var(--space-2); }
.contact__next { font-size: var(--step--1); color: var(--ink-2); }
.contact__legal { margin-top: var(--space-4); font-size: var(--step--1); color: var(--ink-3); }
.contact__legal a { color: inherit; text-underline-offset: 3px; }
.contact.is-sent .contact__fields, .contact.is-sent .contact__row, .contact.is-sent .contact__legal { display: none; }
.contact.is-sent .contact__status { font-size: var(--step-1); color: var(--ink); }

/* Sidfoten */
.footer { border-top: 1px solid var(--line); }
.footer__in { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4) var(--space-6); padding-block: var(--space-7) var(--space-8); font-size: var(--step--1); color: var(--ink-3); }
.footer__links { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); }
.footer__links a { color: var(--ink-2); text-decoration: none; }
.footer__links a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.footer__note { margin-left: auto; }

/* ═══════════ Smal dator: smalare rubrikspalt ═══════════ */
@media (max-width: 1099px) {
  .hero__grid { --title-min: 270px; --gap: 36px; }
  .hero h1 { font-size: clamp(2.25rem, 1.2rem + 2.2vw, 3rem); }
  .cap__label { font-size: var(--step-2); }
  .faq { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gets { grid-template-areas:
      "foto foto foto foto foto foto foto koncept koncept koncept koncept koncept"
      "foto foto foto foto foto foto foto mail mail mail mail mail"
      "kod kod kod kod kod kod kod kod kod kod kod kod"; }
  .get--foto .get__media { min-height: 340px; }
  .contact { grid-template-columns: minmax(0, 1fr); }
  .nav__links a:not(.nav__lang) { display: none; }
}

/* ═══════════ Låg skärm (liten laptop, 1280 × 720): allt i första skärmen ═══════════ */
@media (min-width: 900px) and (max-height: 820px) {
  .hero__grid { --stage-w: min(calc(100vw - 2 * var(--gutter) - var(--title-min) - var(--gap)), calc((100svh - var(--nav-h) - 196px) * 16 / 10), 1120px); padding-top: 16px; }
  .hero__sub { font-size: var(--step-0); margin-top: var(--space-3); }
  .hero h1 { font-size: clamp(2.25rem, 1rem + 2.6vw, 3rem); }
  .journey { margin-top: var(--space-4); }
  .filmbtn { margin-top: var(--space-4); }
  .hero__cap { margin-top: var(--space-4); padding-top: var(--space-4); }
  .cap__label { font-size: var(--step-2); margin-top: var(--space-2); }
  .cap__line { font-size: var(--step-0); min-height: 2.8em; }
  .cap__who { margin-top: var(--space-3); }
  .tl { margin-top: 18px; }
  .tl__rail { margin-bottom: 8px; }
  .tl__thumb { aspect-ratio: 16 / 7; }
  .tl__label { margin-top: 8px; }
}

/* ═══════════ Mellanbredd: rubrik över ytan ═══════════ */
@media (max-width: 899px) {
  .stage { justify-self: center; width: min(100%, calc((100svh - var(--nav-h) - 380px) * 16 / 10)); min-width: min(100%, 420px); }
  .filmbtn { margin-top: 0; }
  .hero__grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "title" "stage" "cap" "tl"; }
  .hero__title { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-4); padding-top: 0; margin-bottom: var(--space-5); }
  .hero h1 { max-width: 14ch; }
  .journey { margin-top: 0; }
  .hero__cap {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: baseline; column-gap: var(--space-5);
    margin-top: var(--space-4); padding-top: 0; border-top: 0;
  }
  .cap__top { gap: var(--space-3); }
  .cap__label { margin-top: 0; font-size: var(--step-2); }
  .cap__line { grid-column: 2; margin-top: 2px; max-width: none; min-height: 0; font-size: var(--step-0); }
  .cap__who { grid-column: 3; grid-row: 1; margin-top: 0; }
}

/* ═══════════ Telefon: scenen tar skärmen, stegen blir en rad miniatyrer ═══════════ */
@media (max-width: 759px) {
  .nav__in { gap: var(--space-4); }
  .nav__links { display: none; }
  .nav__cta { margin-left: auto; min-height: 38px; padding: 0 14px; }
  .r-brand__mark { width: 30px; height: 30px; }

  .hero__grid { padding-top: var(--space-3); padding-bottom: var(--space-6); grid-template-areas: "title" "stage" "cap" "tl" "cta"; }
  .hero__title { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--space-3) var(--space-3); margin-bottom: var(--space-4); }
  .hero h1 { grid-column: 1 / -1; font-size: 2.125rem; max-width: 14ch; }
  .hero__sub { grid-column: 1 / -1; margin-top: 0; font-size: var(--step-0); max-width: 34ch; }
  .journey { margin-top: var(--space-1); display: flex; }
  .journey > button { min-width: 0; padding-inline: 14px; }
  .filmbtn { margin-top: var(--space-1); justify-self: end; }
  .stage { border-radius: var(--radius); aspect-ratio: 1 / 1.06; width: 100%; min-width: 0; }
  .is-film .stage { aspect-ratio: 4 / 5; }
  .panel--bygg { --k0: 1.04; --k1: 1.2; }
  .cdots { left: 50%; transform: translateX(-50%); bottom: 4%; gap: 10px; padding: 7px 12px 7px 9px; font-size: 12px; white-space: nowrap; }
  .cdots__dots > i { width: 12px; height: 12px; }
  .cdots__name { min-width: 7.6em; }
  .panel__code { display: none; }

  .hero__cap { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-4); margin-top: var(--space-3); min-height: 2.9em; }
  .panel--doc { padding: 7% 5% 0; }
  .panel--doc > .mk { width: calc(100% / 0.56); transform: scale(0.56); transform-origin: 0 0; }
  .panel--mail { padding: 5% 4% 0; }
  .panel--mail > .mk-mail { height: calc(104% / 0.56); }
  .cap__top { display: none; }
  .cap__label { display: none; }
  .cap__line { font-size: var(--step-0); min-height: 0; margin-top: 0; max-width: none; }
  .cap__who { margin-top: 0; flex: none; }
  .cap__who[data-who=""] { display: none; }

  /* Sex miniatyrer i en rad; den valda har ring och förloppslinje */
  .tl { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; margin-top: var(--space-3); }
  .tl__step { position: relative; }
  .tl__step::after { content: ""; position: absolute; inset: -6px -3px; }
  .tl__rail { margin-bottom: 6px; }
  .tl__rail .r-num { display: none; }
  .tl__bar { height: 2px; }
  .tl__thumb { aspect-ratio: 16 / 11; border-radius: 6px; }
  .tl__label { display: none; }
  .hero__cta { grid-area: cta; display: flex; justify-content: center; min-height: 52px; margin-top: var(--space-5); font-size: var(--step-0); }

  .gets { grid-template-columns: minmax(0, 1fr); grid-template-areas: "foto" "koncept" "mail" "kod"; }
  .get--foto .get__media { min-height: 0; aspect-ratio: 4 / 3; }
  .get__media--strips { aspect-ratio: 16 / 9; }
  .faq { grid-template-columns: minmax(0, 1fr); }
  .sec__head h2 { font-size: 1.75rem; }
  .cta-row .r-btn { flex: 1 1 100%; justify-content: center; }

  .split thead { display: none; }
  .split, .split tbody, .split tr { display: block; }
  .split tr { padding: var(--space-4) 0; border-top: 1px solid var(--line); }
  .split tbody tr:last-child { border-bottom: 1px solid var(--line); }
  .split tbody tr:last-child > * { border-bottom: 0; }
  .split tbody th, .split tbody td { display: block; border-top: 0; padding: 0; }
  .split tbody th { margin-bottom: var(--space-2); }
  .split tbody td { display: grid; grid-template-columns: 6.75rem minmax(0, 1fr); gap: var(--space-3); padding: 4px 0; }
  .split td::before { content: attr(data-who); color: var(--ink); font-weight: 500; font-size: var(--step--1); padding-top: 2px; }
  .split tbody td.none { display: none; }

  .ba__frame { aspect-ratio: 4 / 3; }
  .demo__stage { aspect-ratio: 4 / 3; }
  .ba__frame img { object-position: 42% 50%; }
  .contact__fields { grid-template-columns: minmax(0, 1fr); }
  .footer__note { margin-left: 0; }
}

/* Mörkt läge: små justeringar */
@media (prefers-color-scheme: dark) {
  .ba__tag { background: rgba(5, 9, 18, 0.6); }
  .journey > [aria-pressed="true"] { background: #2a3a58; color: var(--ink); }
  .try { background: #060b16; border-block: 1px solid var(--line); }
  /* Renderingarna har ljus studiobakgrund: i mörkt läge dämpas de lite */
  .panel--bygg, .demo__stage { filter: brightness(0.9); }
}

/* ═══════════════ QA (agent 16): touch targets of at least 44 px ═══════════════
   Invisible hit areas (::after) so nothing changes in the picture; the footer
   links get their height from min-height instead of the row gap. */
.nav .r-brand, .nav__links a, .nav__cta, .filmbtn, .cap__pause, .journey > button, .sec__aside { position: relative; }
.nav .r-brand::after { content: ""; position: absolute; inset: -7px -4px; }
.nav__links a::after { content: ""; position: absolute; inset: -3px -2px; }
.nav__cta::after, .sec__aside::after { content: ""; position: absolute; inset: -3px; border-radius: inherit; }
.journey > button::after { content: ""; position: absolute; inset: -2px 0; }
.filmbtn::after { content: ""; position: absolute; inset: -4px -4px; }
.cap__pause::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; }
.footer__links { row-gap: 0; }
.footer__links a { display: inline-flex; align-items: center; min-height: 44px; }

/* Inkorgen: adressen i listans rubrik får inte krocka med ordet Inkorg */
.mk-mail__list-head { gap: 10px; }
.mk-mail__list-head span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.faq__note a { position: relative; }
.faq__note a::after { content: ""; position: absolute; inset: -13px -4px; }
@media (max-width: 759px) {
  .get__code code { white-space: normal; overflow-wrap: anywhere; -webkit-mask-image: none; mask-image: none; }
}

/* The English headline and subline are longer than the Swedish (en/index.html):
   a slightly smaller headline keeps it on two lines and the steps above the fold. */
@media (min-width: 900px) {
  html:lang(en) .hero h1 { font-size: calc(var(--step-4) * 0.8); max-width: 13ch; }
  html:lang(en) .hero__sub { max-width: 30ch; font-size: calc(var(--step-1) * 0.94); }
}
