/* ==========================================================================
   Buildway: grundstil
   Alla färger och mått som är lätta att justera ligger i :root.
   ========================================================================== */

/* Typsnitt: Bricolage Grotesque (variabel, SIL Open Font License, se assets/fonts/OFL-LICENSE.txt).
   Self-hostat, inga externa anrop. Byt här om typsnittet ska bytas. */
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/bricolage-grotesque-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Färger (palett Skog): djup grön och korall. En enda accent. */
  --paper: #F5F2E7;        /* ljus bakgrund */
  --ink: #0D2B26;          /* text */
  --dark: #0C4037;         /* mörka sektioner */
  --accent: #FF7B5C;       /* för fyllnader och för text på mörk bakgrund */
  --accent-strong: #B33616;/* samma accent, mörkare, för text på ljus bakgrund */
  --muted: rgba(13, 43, 38, 0.7);

  /* Typografi */
  --font: "Bricolage Grotesque", system-ui, "Segoe UI Variable Display", "Segoe UI", -apple-system, "Helvetica Neue", Arial, sans-serif;

  /* Mått */
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --max: 70rem;
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, p, ul { margin: 0; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Synlig fokus */
:focus-visible {
  outline: 3px solid var(--accent-strong);
  outline-offset: 4px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: var(--paper);
  border-radius: 999px;
}
.skip:focus { top: 1rem; }

/* ---------- Header ---------- */
.site-header {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 20;
  padding-block: 1.25rem;
  transition: background-color 0.3s var(--ease), box-shadow 0.3s var(--ease), padding 0.3s var(--ease);
}
/* Med JavaScript ligger menyn kvar i toppen och får bakgrund när man scrollat förbi toppen */
.js .site-header { position: fixed; }
.site-header.is-scrolled {
  padding-block: 0.7rem;
  background: rgba(244, 241, 234, 0.9);
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(21, 20, 15, 0.1);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }

.nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: clamp(1rem, 3.5vw, 2.5rem); }
.nav a {
  position: relative;
  display: inline-block;
  padding-block: 0.4rem;
  color: var(--ink);
  font-weight: 560;
  font-size: clamp(0.9rem, 2.4vw, 1.05rem);
  white-space: nowrap;
  text-decoration: none;
  transition: transform 0.25s var(--ease);
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 1px;
  background: var(--accent-strong);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.nav a:hover { transform: translateY(-1px); }
.nav a:hover::after, .nav a:focus-visible::after { transform: scaleX(1); }

/* Ankarlänkar ska inte hamna bakom menyn */
html { scroll-padding-top: 5.5rem; }
.logo {
  display: inline-block;
  line-height: 0;
  text-decoration: none;
}
.logo img {
  display: block;
  height: clamp(2rem, 5vw, 3.25rem);
  width: auto;
}

/* ---------- Knapp ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 1.05rem 2rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 650;
  font-size: 1.05rem;
  text-decoration: none;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.35s var(--ease), color 0.35s var(--ease);
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--accent);
  transform: translateY(101%);
  transition: transform 0.4s var(--ease);
}
.btn:hover { transform: translateY(-1px); color: var(--ink); }
.btn:hover::before { transform: translateY(0); }

/* ---------- 1. Hero ---------- */
/* Heron ska rymmas på en skärm: storlekarna följer både bredd och höjd. */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding-block: clamp(5rem, 10vh, 7rem) clamp(1.25rem, 4.5vh, 4rem);
}

.hero__title {
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.95;
}
.hero__word {
  display: block;
  font-size: clamp(3rem, min(13.5vw, 14vh), 10.5rem);
}
.hero__word--3 { color: var(--accent-strong); }

.hero__tail {
  display: block;
  margin-top: clamp(0.5rem, 1.6vh, 1.25rem);
  font-size: clamp(1.5rem, min(4.6vw, 4.6vh), 3.25rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--muted);
}

.hero__lede {
  max-width: 44rem;
  margin-top: clamp(0.8rem, 2.4vh, 2rem);
  margin-bottom: clamp(0.5rem, 1.4vh, 1rem);
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  text-wrap: pretty;
}
.hero__lede strong { font-weight: 800; letter-spacing: -0.02em; }
/* Vem det är för: egen rad med tyngd, inte en fotnot */
.hero__for {
  max-width: 44rem;
  margin: 0 0 clamp(1rem, 3vh, 2rem);
  padding-left: 1rem;
  border-left: 3px solid var(--accent-strong);
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  font-weight: 650;
  letter-spacing: -0.015em;
  line-height: 1.3;
  color: var(--ink);
  text-wrap: pretty;
}
/* Knappen med en kort löfte-rad bredvid */
.hero__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.5rem; }
.hero__micro { margin: 0; font-size: clamp(0.95rem, 1.5vw, 1.05rem); font-weight: 600; color: var(--muted); }

/* Ord för ord vid inladdning */
@keyframes rise {
  from { opacity: 0; transform: translateY(0.4em); }
  to   { opacity: 1; transform: none; }
}
.hero__word, .hero__tail, .hero__lede, .hero__for, .hero .btn, .hero__micro {
  animation: rise 0.9s var(--ease) both;
}
.hero__word--1 { animation-delay: 0.05s; }
.hero__word--2 { animation-delay: 0.2s; }
.hero__word--3 { animation-delay: 0.35s; }
.hero__tail    { animation-delay: 0.6s; }
.hero__lede    { animation-delay: 0.8s; }
.hero__for     { animation-delay: 0.9s; }
.hero .btn     { animation-delay: 1.05s; }
.hero__micro   { animation-delay: 1.15s; }

/* ---------- 2. Vändpunkten ---------- */
.turn {
  position: relative;
  overflow: hidden;
  background: var(--dark);
  color: var(--paper);
  padding-top: clamp(5rem, 12vw, 10rem);
  padding-bottom: 0; /* vägen i sista scenen ska nå sektionens kant */
}
/* Ett svagt sken: ljuset tänds inför frågan */
.turn::before {
  content: "";
  position: absolute;
  left: -10%;
  bottom: -20%;
  width: 70%;
  aspect-ratio: 1;
  background: radial-gradient(closest-side, rgba(240, 100, 58, 0.16), transparent);
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 18%, transparent), transparent);
  pointer-events: none;
}
.turn .wrap { position: relative; }

/* Igenkänningen ligger på ljus bakgrund. Det är först vid vändningen det blir mörkt. */
.recog {
  background: var(--paper-2);
  color: var(--ink);
  padding-block: clamp(5rem, 12vw, 9rem);
}

/* Scener: en idé per skärm */
.scene { margin-top: clamp(3.5rem, 8vw, 6.5rem); }
.scene:first-child { margin-top: 0; }

/* Scen 1: igenkänning */
.statements { display: grid; gap: clamp(1rem, 2.5vw, 1.75rem); max-width: 52rem; }
.statements p {
  font-size: clamp(1.9rem, 5.4vw, 3.75rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.08;
  text-wrap: balance;
}
.statements p:nth-child(n+2) { color: rgba(21, 20, 15, 0.62); color: color-mix(in srgb, var(--ink) 62%, transparent); }

/* Scen 2: det som tar tid */
.time {
  max-width: 46rem;
  font-size: clamp(1.5rem, 3.8vw, 2.5rem);
  font-weight: 560;
  letter-spacing: -0.025em;
  line-height: 1.25;
  text-wrap: pretty;
}
.hl { color: var(--accent-strong); font-weight: 700; }

/* Scen 3: nuläget, otydligt */
.fog { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 52rem) { .fog { grid-template-columns: 1.1fr 0.9fr; gap: clamp(2rem, 5vw, 4rem); } }
.fog__words { list-style: none; margin: 0 0 1.5rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.6rem 0.7rem; }
.fog__words li {
  padding: 0.35rem 0.95rem;
  border: 1.5px dashed rgba(13, 43, 38, 0.4);
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  color: rgba(13, 43, 38, 0.7);
}
.fog__words li:nth-child(odd) { transform: rotate(-2deg); }
.fog__words li:nth-child(even) { transform: translateY(4px) rotate(1.5deg); }
.stairs-ghost { display: block; width: 100%; max-width: 26rem; height: auto; }
.gh-step { fill: none; stroke: rgba(13, 43, 38, 0.4); stroke-width: 1.5; stroke-dasharray: 5 4; }
.gh-text { font-size: 12px; fill: rgba(13, 43, 38, 0.65); text-anchor: middle; }
.fog__questions { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.7rem; justify-items: start; }
.fog__questions li {
  background: var(--accent-soft);
  color: var(--ink);
  padding: 0.7rem 1.1rem;
  border-radius: 1.4rem;
  font-weight: 650;
  font-size: clamp(1rem, 2.2vw, 1.15rem);
  letter-spacing: -0.01em;
  text-wrap: pretty;
}
.fog__questions li:nth-child(2) { margin-left: 1.2rem; }
.fog__questions li:nth-child(3) { margin-left: 0.4rem; }
.fog__questions li:nth-child(4) { margin-left: 1.6rem; }
.fog__questions li:nth-child(5) { margin-left: 0.8rem; }
.fog__caption { margin-top: 2rem; max-width: 36rem; font-size: clamp(1.15rem, 2.4vw, 1.5rem); font-weight: 600; letter-spacing: -0.02em; line-height: 1.3; }
.fog__wish { margin-top: 1.25rem; max-width: 38rem; font-size: clamp(1.3rem, 2.8vw, 1.9rem); font-weight: 750; letter-spacing: -0.03em; line-height: 1.2; text-wrap: balance; }

/* Scen 4: vändningen, en skärm för sig */
.pivot { min-height: min(56vh, 30rem); display: grid; align-content: center; gap: clamp(2rem, 5vw, 3.5rem); }
.pivot__title {
  max-width: 17ch;
  font-size: clamp(2.5rem, 8.2vw, 6.5rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.98;
  text-wrap: balance;
}
.pivot__title .dim { color: rgba(244, 241, 234, 0.5); }
.pivot__title .accent { color: var(--accent); }

/* Scen 5: tydligt. Trappan och kollegan. */
.clear__intro { max-width: 38rem; font-size: clamp(1.3rem, 2.8vw, 1.8rem); font-weight: 560; letter-spacing: -0.02em; line-height: 1.3; text-wrap: pretty; }
.clear__grid { display: grid; gap: 2.5rem; margin-top: clamp(2rem, 5vw, 3rem); align-items: center; }
@media (min-width: 60rem) { .clear__grid { grid-template-columns: 1fr 1fr; gap: clamp(2.5rem, 6vw, 5rem); } }
.clear__figure { max-width: 30rem; }
.stairs { display: block; width: 100%; height: auto; overflow: visible; }
.st-step { stroke: rgba(244, 241, 234, 0.45); stroke-width: 1.5; transform-box: fill-box; transform-origin: 50% 100%; transition: transform 0.8s var(--ease); }
.st-step--1, .st-step--2 { fill: rgba(244, 241, 234, 0.1); }
.st-step--3 { fill: var(--accent); stroke: var(--accent); }
.st-title { font-size: 15px; font-weight: 700; fill: var(--paper); text-anchor: middle; }
.st-sub { font-size: 12px; fill: rgba(244, 241, 234, 0.78); text-anchor: middle; }
.st-title--on { fill: var(--dark); }
.st-sub--on { fill: var(--dark); }
.st-here { fill: none; stroke: var(--accent); stroke-width: 1.5; }
.st-here-text { font-size: 12px; font-weight: 700; fill: var(--accent); text-anchor: middle; }
.st-here-arrow { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.st-arrow { fill: none; stroke: rgba(244, 241, 234, 0.6); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.st-note { font-size: 12px; fill: rgba(244, 241, 234, 0.85); }
.st-tl { fill: var(--paper); }
.st-lamp { fill: rgba(13, 43, 38, 0.28); }
.st-lamp--on { fill: var(--lamp-amber); }
/* Trappan byggs upp steg för steg */
.js .clear__figure:not(.is-in) .st-step { transform: scaleY(0); }
.st-step--2 { transition-delay: 0.15s; }
.st-step--3 { transition-delay: 0.3s; }
.clear__build { margin-top: clamp(3.5rem, 8vw, 6rem); }

.chips { display: none; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.js .chips { display: flex; }
.chip {
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.5rem 1.05rem;
  border-radius: 999px;
  border: 1.5px solid rgba(244, 241, 234, 0.4);
  background: transparent;
  color: var(--paper);
  cursor: pointer;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.chip:hover { transform: translateY(-1px); border-color: var(--paper); }
.chip[aria-pressed="true"] { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.turn :focus-visible { outline-color: var(--accent); }

.colleague {
  background: var(--paper);
  color: var(--ink);
  border-radius: 2rem;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.7);
}
.colleague__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid rgba(21, 20, 15, 0.15);
}
.colleague__who { display: flex; align-items: center; gap: 0.75rem; font-weight: 700; letter-spacing: -0.01em; }
.colleague__avatar {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, var(--paper) 0 28%, var(--accent) 30%);
}
.colleague__tag { font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.colleague__set { margin: 0; display: grid; }
.colleague__set[hidden] { display: none; }
.colleague__row { display: grid; gap: 0.25rem; padding-block: 1rem; border-bottom: 1px solid rgba(21, 20, 15, 0.1); }
.colleague__row:last-child { border-bottom: 0; padding-bottom: 0; }
.colleague__row dt { font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.colleague__row dd { margin: 0; font-size: clamp(1.1rem, 2.2vw, 1.25rem); font-weight: 650; letter-spacing: -0.015em; }
/* Raderna fylls i en i taget */
.colleague__set:not([hidden]) .colleague__row { animation: rise 0.6s var(--ease) both; }
.colleague__set:not([hidden]) .colleague__row:nth-child(2) { animation-delay: 0.12s; }
.colleague__set:not([hidden]) .colleague__row:nth-child(3) { animation-delay: 0.24s; }
.colleague__set:not([hidden]) .colleague__row:nth-child(4) { animation-delay: 0.36s; }

/* Vad vi bygger */
.build__title {
  max-width: 20ch;
  font-size: clamp(2rem, 5.2vw, 3.75rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.04;
  text-wrap: balance;
}
.build__lead { max-width: 40rem; margin-top: 1.5rem; font-size: clamp(1.15rem, 2.3vw, 1.45rem); color: rgba(244, 241, 234, 0.9); text-wrap: pretty; }
.build__close { max-width: 40rem; margin-top: 1.25rem; font-size: clamp(1.15rem, 2.3vw, 1.45rem); color: rgba(244, 241, 234, 0.92); text-wrap: pretty; }

/* Scen 7: klimax och väg in i nästa sektion */
.turn__question {
  max-width: 16ch;
  font-size: clamp(2.4rem, 7.5vw, 5.75rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  text-wrap: balance;
}
.finale__bridge { margin-top: 1.5rem; font-size: clamp(1.25rem, 2.7vw, 1.8rem); font-weight: 560; color: var(--accent); }
.finale__road {
  position: relative;
  margin-top: clamp(2rem, 5vw, 3rem);
  width: 3px;
  height: clamp(4.5rem, 11vw, 8rem);
  background: repeating-linear-gradient(to bottom, var(--accent) 0 14px, transparent 14px 24px);
  border-radius: 2px;
}

/* ---------- Reveal vid scroll (kräver JS, annars syns allt) ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Respektera minskad rörelse ---------- */
@media (prefers-reduced-motion: reduce) {

  html { scroll-behavior: auto; }
  .hero__word, .hero__tail, .hero__lede, .hero__for, .hero .btn, .hero__micro { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .btn::before { transition: none; }
  .site-header, .nav a, .nav a::after, .chip { transition: none; }
  .colleague__set:not([hidden]) .colleague__row { animation: none; }
  .thread::before { transition: none; }
  .js .thread:not(.is-in)::before { transform: none; }
}

/* ==========================================================================
   Sektion 3-7 och sidfot
   ========================================================================== */

:root {
  --paper-2: #ECE9DA;      /* sektion 4: lite mörkare papper, hör till Bygga */
  --card: #FBFAF3;
  --accent-soft: #FFD9CC;  /* sektion 5: mjuk ton av accenten */
  --lamp-green: #2E9E62;
  --lamp-amber: #E8AD12;
  --lamp-red: #D12F2A;
}

.section-title {
  font-size: clamp(2.4rem, 6.5vw, 4.75rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1;
  text-wrap: balance;
}
h3 { margin: 0; }

/* ---------- 3. Så ser vägen ut ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.levels { background: var(--paper-2); padding-block: clamp(5rem, 11vw, 9rem); }
.levels__intro { max-width: 44rem; margin-top: 1.25rem; font-size: clamp(1.15rem, 2.2vw, 1.4rem); text-wrap: pretty; }
.levels__road { margin-top: clamp(2.5rem, 6vw, 4rem); }

.levels__table { display: block; width: 100%; border-collapse: collapse; }
.levels__table thead, .levels__table tbody { display: block; }
.levels__table tr { display: grid; gap: 0.75rem 1.5rem; }
.levels__table thead th {
  text-align: left;
  padding: 0 0 0.9rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.levels__owner-h::after { content: " \2193"; letter-spacing: 0; }

.levels__table tbody { position: relative; }
.levels__table tbody::before {
  content: "";
  position: absolute;
  left: 1.2rem;
  top: 2.2rem;
  bottom: 2.2rem;
  width: 3px;
  background: repeating-linear-gradient(to bottom, var(--dark) 0 12px, transparent 12px 22px);
  opacity: 0.35;
}
.level { position: relative; padding-block: 1.1rem; border-top: 1px solid rgba(13, 43, 38, 0.18); align-items: start; }
.level th, .level td { margin: 0; padding: 0; text-align: left; font-weight: 400; }
.level td { font-size: 1.02rem; line-height: 1.45; text-wrap: pretty; }
.level__lead { font-weight: 700; }
.level td:last-child { background: var(--accent-soft); border-radius: 0.8rem; padding: 0.6rem 0.85rem; font-weight: 600; }

.level__head { display: flex; align-items: center; gap: 1rem; }
.level__n {
  position: relative;
  z-index: 1;
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--lv);
  color: var(--lvt, var(--paper));
  font-weight: 800;
}
.level__name { font-size: clamp(1.2rem, 1.9vw, 1.5rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.level:nth-child(1) { --lv: #9DAAA2; --lvt: var(--dark); }
.level:nth-child(2) { --lv: #7FA08F; --lvt: var(--dark); }
.level:nth-child(3) { --lv: #4E7767; }
.level:nth-child(4) { --lv: #2A5648; }
.level:nth-child(5) { --lv: var(--dark); }

@media (min-width: 56rem) {
  .levels__table tr { grid-template-columns: 15rem 1.5fr 0.9fr 1.3fr; }
  .levels__table thead th:first-child { padding-left: 3.5rem; }
}

/* Grunden som bär alla nivåer */
.levels__base {
  margin-top: 0.75rem;
  background: var(--dark);
  color: var(--paper);
  border-radius: 1.1rem;
  padding: 1.1rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 2rem;
}
.levels__base-label { margin: 0; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.levels__base ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.35rem 1.5rem; font-weight: 600; }

.levels__close { margin-top: clamp(2rem, 5vw, 3rem); max-width: 40rem; font-size: clamp(1.3rem, 2.8vw, 1.9rem); font-weight: 750; letter-spacing: -0.03em; line-height: 1.2; text-wrap: balance; }

/* Mobil: varje nivå blir ett kort på en lodrät väg */
@media (max-width: 55.99rem) {
  .levels__table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .level { padding-left: 3.5rem; }
  .level__n { position: absolute; left: 0; top: 1.1rem; }
  .level__head { min-height: 2.5rem; }
  .level td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 0.15rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
  }
  .level td:last-child::before { color: var(--accent-strong); }
}

.level:nth-child(2) { transition-delay: 0.08s; }
.level:nth-child(3) { transition-delay: 0.16s; }
.level:nth-child(4) { transition-delay: 0.24s; }
.level:nth-child(5) { transition-delay: 0.32s; }

/* ---------- 4. Så hjälper vi er ---------- */
:root {
  --step-1: #9DAAA2;        /* Hitta: dämpad salvia */
  --step-2: var(--accent);  /* Bygga: korall */
  --step-3: var(--dark);    /* Driva: djup grön */
}
.steps { padding-block: clamp(5rem, 11vw, 9rem); }
.steps__head { display: grid; gap: 1rem; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.steps__sub { font-size: clamp(1.25rem, 2.6vw, 1.75rem); color: var(--muted); font-weight: 500; letter-spacing: -0.02em; }

.dot { display: inline-block; flex: none; width: 0.9rem; height: 0.9rem; border-radius: 50%; }
.dot--1 { background: var(--step-1); }
.dot--2 { background: var(--step-2); }
.dot--3 { background: var(--step-3); }

/* Leden */
.pathfig { margin-bottom: clamp(2.5rem, 6vw, 4.5rem); max-width: 58rem; }
.legend { display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; list-style: none; margin: 0 0 1rem; padding: 0; font-size: 0.95rem; font-weight: 650; }
.legend li { display: flex; align-items: center; gap: 0.5rem; }
.pathfig svg { display: block; width: 100%; height: auto; overflow: visible; }
.pathfig .svg-v { display: none; max-width: 21rem; }
@media (max-width: 51.99rem) {
  .pathfig .svg-h { display: none; }
  .pathfig .svg-v { display: block; }
}

.path-main, .path-branch {
  fill: none;
  stroke: var(--dark);
  stroke-linecap: round;
  stroke-dasharray: 10 9;
}
.path-main { stroke-width: 3.5; }
.path-branch { stroke-width: 2.5; opacity: 0.45; }

.fig-dot { stroke: var(--paper); stroke-width: 3; transform-box: fill-box; transform-origin: center; transition: opacity 0.5s var(--ease) var(--d, 0s), transform 0.5s var(--ease) var(--d, 0s); }
.fig-dot--1 { fill: var(--step-1); }
.fig-dot--2 { fill: var(--step-2); }
.fig-dot--3 { fill: var(--step-3); }
.fig-dot--branch { opacity: 0.75; }

.fig-label { font-size: 13px; font-weight: 700; fill: var(--ink); }
.fig-note { font-size: 12px; fill: var(--muted); }

.tl { transition: opacity 0.6s var(--ease) var(--d, 0s); }
.tl-pole { stroke: var(--dark); stroke-width: 3; stroke-linecap: round; }
.tl-head { fill: var(--dark); }
.lamp--off { fill: rgba(255, 255, 255, 0.22); }
.lamp--green { fill: var(--lamp-green); }
.lamp--amber { fill: var(--lamp-amber); }
.lamp--red { fill: var(--lamp-red); }
.lamp-lit { transition: opacity 0.6s var(--ease) var(--d, 0s); }

/* Leden ritas upp när den kommer i bild */
.clip-rect { transform-box: fill-box; transform-origin: 0 50%; transition: transform 2.6s var(--ease) 0.2s; }
.clip-rect--v { transform-origin: 50% 0; }
.clip-rect--b1 { transition-duration: 1.8s; transition-delay: 1.1s; }
.clip-rect--b2 { transition-duration: 1.8s; transition-delay: 1.7s; }
.js .pathfig:not(.is-in) .clip-rect { transform: scaleX(0); }
.js .pathfig:not(.is-in) .clip-rect--v { transform: scaleY(0); }
.js .pathfig:not(.is-in) .fig-dot { opacity: 0; transform: scale(0.3); }
.js .pathfig:not(.is-in) .tl { opacity: 0; }
.js .pathfig:not(.is-in) .lamp-lit { opacity: 0; }

/* De tre stegen */
.steps__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2.25rem; }
@media (min-width: 52rem) { .steps__list { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; } }
.step { display: grid; gap: 0.9rem; align-content: start; padding-top: 1.25rem; border-top: 4px solid var(--step-1); }
.step--2 { border-top-color: var(--step-2); }
.step--3 { border-top-color: var(--step-3); }
.step__name {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: clamp(2.5rem, 5.4vw, 3.75rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1;
}
.step__name .dot { width: 1rem; height: 1rem; }
.step p { max-width: 26rem; font-size: 1.15rem; text-wrap: pretty; }

/* Människorna: bandet under leden */
.peopleband {
  margin: clamp(1rem, 2vw, 1.5rem) 0 0;
  padding: 1rem 1.5rem;
  background: var(--accent-soft);
  border-radius: 1.5rem;
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  font-weight: 650;
  letter-spacing: -0.015em;
  line-height: 1.3;
  text-wrap: pretty;
}
.js .pathfig:not(.is-in) .peopleband { opacity: 0; transform: translateY(10px); }
.peopleband { transition: opacity 0.8s var(--ease) 2.2s, transform 0.8s var(--ease) 2.2s; }

/* Två rader per steg: arbetet och människorna */
.step__row { display: grid; gap: 0.4rem; }
.step__tag { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.step__row--people { background: var(--accent-soft); border-radius: 1.25rem; padding: 1rem 1.15rem; }
.step__row--people .step__tag { color: var(--accent-strong); }
.step p { font-size: 1.1rem; }

/* Ansvaret: trafikljuset */
.resp { margin-top: clamp(3.5rem, 8vw, 6rem); display: grid; gap: 2rem; }
@media (min-width: 56rem) { .resp { grid-template-columns: 1.1fr 0.9fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; } }
.resp h3 {
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 1rem;
  text-wrap: balance;
}
.resp p { max-width: 30rem; text-wrap: pretty; }

.signal { display: grid; grid-template-columns: auto 1fr; max-width: 34rem; }
.signal__lamps { display: grid; grid-template-rows: repeat(3, 1fr); background: var(--dark); border-radius: 1.25rem; width: 4.25rem; }
.signal__lamp { place-self: center; width: 1.9rem; height: 1.9rem; border-radius: 50%; }
.signal__lamp--green { background: var(--lamp-green); box-shadow: 0 0 14px rgba(46, 158, 98, 0.55); }
.signal__lamp--amber { background: var(--lamp-amber); box-shadow: 0 0 14px rgba(232, 173, 18, 0.55); }
.signal__lamp--red { background: var(--lamp-red); box-shadow: 0 0 14px rgba(209, 47, 42, 0.5); }
.signal__rows { list-style: none; margin: 0; padding: 0 0 0 1.5rem; display: grid; grid-template-rows: repeat(3, 1fr); }
.signal__rows li { display: flex; align-items: center; padding-block: 0.9rem; font-size: 1.15rem; }
.signal__rows li + li { border-top: 1px solid rgba(13, 43, 38, 0.16); }
.signal__rows strong { margin-right: 0.35em; }

/* Teknikvalen: fällbart */
.tech-details { margin-top: clamp(3rem, 7vw, 5rem); border-top: 1px solid rgba(13, 43, 38, 0.22); border-bottom: 1px solid rgba(13, 43, 38, 0.22); }
.tech-details summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.25rem 0; cursor: pointer; }
.tech-details summary::-webkit-details-marker { display: none; }
.tech-details__lead { font-size: clamp(1.2rem, 2.6vw, 1.6rem); font-weight: 700; letter-spacing: -0.02em; text-wrap: balance; }
.tech-details__more { display: inline-flex; align-items: center; gap: 0.6rem; font-weight: 600; white-space: nowrap; }
.tech-details__more::after { content: "+"; display: inline-grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 50%; border: 1.5px solid currentColor; font-size: 1.2rem; line-height: 1; }
.tech-details[open] .tech-details__more::after { content: "\2212"; }
.tech-details__body { padding-bottom: 1.5rem; max-width: 44rem; display: grid; gap: 1rem; }
.choices { list-style: none; margin: 0; padding: 0; }
.choices li { padding: 1rem 0; border-top: 1px solid rgba(13, 43, 38, 0.18); text-wrap: pretty; }
.choices li:last-child { border-bottom: 1px solid rgba(13, 43, 38, 0.18); }
.choices__close { font-weight: 600; }

/* Avslutning på avsnittet */
.closing {
  margin-top: clamp(3rem, 7vw, 5rem);
  max-width: 38rem;
  font-size: clamp(1.6rem, 3.6vw, 2.5rem);
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.15;
  text-wrap: balance;
}

/* ---------- 6. Ni styr vägen ---------- */
.control { background: var(--dark); color: var(--paper); padding-block: clamp(5rem, 11vw, 9rem); }
.control__grid { display: grid; gap: 2.5rem; }
.control__body { display: grid; gap: 1.5rem; max-width: 40rem; font-size: clamp(1.1rem, 2vw, 1.3rem); color: rgba(244, 241, 234, 0.86); text-wrap: pretty; }
.control__body p:last-child { color: var(--paper); font-weight: 600; }
@media (min-width: 56rem) { .control__grid { grid-template-columns: 5fr 7fr; gap: clamp(2rem, 6vw, 5rem); } }

/* ---------- 7. Slutet ---------- */
.end { padding-block: clamp(5rem, 11vw, 9rem); }
.end__lead {
  max-width: 48rem;
  font-size: clamp(1.6rem, 3.8vw, 2.75rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.18;
  text-wrap: balance;
}
.end__ask {
  margin-top: clamp(3.5rem, 8vw, 6rem);
  padding-top: clamp(2rem, 5vw, 3rem);
  border-top: 1px solid rgba(21, 20, 15, 0.22);
  max-width: 42rem;
  display: grid;
  gap: 1.25rem;
  justify-items: start;
}
.end__ask h2 { font-size: clamp(1.8rem, 4vw, 2.75rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1.05; }
.end__ask p { font-size: clamp(1.1rem, 2vw, 1.25rem); text-wrap: pretty; }
.end__ask .btn { margin-top: 0.75rem; }

/* ---------- Sidfot ---------- */
.site-footer {
  background: var(--dark);
  color: var(--paper);
  border-radius: clamp(2rem, 5vw, 3.5rem) clamp(2rem, 5vw, 3.5rem) 0 0;
  padding-block: clamp(3rem, 7vw, 5rem);
}
.site-footer__inner { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 2rem; }
.logo--light img { filter: invert(1) brightness(0.96); } /* svart logga blir ljus på mörk bakgrund */
.site-footer__contact { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; color: rgba(244, 241, 234, 0.75); font-size: 1rem; }
.site-footer__contact a { display: inline-block; padding-block: 0.6rem; color: var(--paper); font-weight: 600; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 0.25em; text-decoration-thickness: 2px; }
.site-footer__contact a:hover { text-decoration-color: var(--paper); }

/* Små fördröjningar så att stegen kommer ett i taget */
.step:nth-child(2), .thread-steps li:nth-child(2), .check:nth-child(2) { transition-delay: 0.12s; }
.step:nth-child(3), .thread-steps li:nth-child(3), .check:nth-child(3) { transition-delay: 0.24s; }
.thread-steps li:nth-child(4) { transition-delay: 0.36s; }

/* Minskad rörelse för leden i sektion 3 (ligger sist så att den åsidosätter ovanstående) */
@media (prefers-reduced-motion: reduce) {
  .clip-rect, .fig-dot, .tl, .lamp-lit { transition: none; }
  .js .pathfig:not(.is-in) .clip-rect, .js .pathfig:not(.is-in) .clip-rect--v { transform: none; }
  .js .pathfig:not(.is-in) .fig-dot { opacity: 1; transform: none; }
  .js .pathfig:not(.is-in) .tl, .js .pathfig:not(.is-in) .lamp-lit { opacity: 1; }
  .peopleband, .js .pathfig:not(.is-in) .peopleband { transition: none; opacity: 1; transform: none; }
  .st-step { transition: none; }
  .js .clear__figure:not(.is-in) .st-step { transform: none; }
}
