/* Wilgot Fork – portfolio
   A faithful copy of the Figma Sites design: paper background, navy ink, Inter (Lato ExtraBold for case titles),
   grey tiles with soft corners. Measurements follow the 1280 px desktop frame; content is centred with
   whitespace on both sides and scales down for tablet and phone. */
:root {
  --bg: #F3F4F0;
  --ink: #000329;
  --black: #000000;
  --grey: #8F8F8F;
  --tile: #E2E2E2;
  --track: #D9D9D9;
  --btn: #2C2C2C;
  --card-btn: #3B3B3B;
  --frame: #414141;
  --line: #DADAD6;
  --col: 926px;
  --g: clamp(16px, 4vw, 40px);           /* side gutter */
  --header: 66px;
  --ease: cubic-bezier(.25, .7, .25, 1);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header) + 12px); }
body {
  margin: 0; background: var(--bg); color: var(--ink); overflow-x: clip;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 18px; line-height: 28px;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
p { margin: 0; text-wrap: pretty; }
h1, h2, h3, h4 { margin: 0; color: var(--ink); }
h1, h2, h3 { text-wrap: balance; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 60; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 16px; }
.small { font-size: 14px; line-height: 20px; color: var(--grey); }
.big { font-size: 48px; line-height: 1.2; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; white-space: nowrap; }
.divider { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* buttons (as in Figma: dark pill, light text) */
.btn-dark {
  display: inline-flex; align-items: center; justify-content: center; align-self: flex-start;
  background: var(--btn); color: var(--bg); text-decoration: none; font-size: 18px; line-height: 28px;
  padding: 15px 25px; border-radius: 60px; transition: background .25s, transform .25s var(--ease);
}
.btn-dark:hover { background: var(--ink); }
.btn-dark:active { transform: scale(.98); }

/* ------------------------------------------------ header */
.site-header {
  position: sticky; top: 0; z-index: 40; height: var(--header);
  background: rgba(243, 244, 240, .82); backdrop-filter: saturate(1.5) blur(14px); -webkit-backdrop-filter: saturate(1.5) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .25s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.bar { height: 100%; display: flex; align-items: center; padding: 0 max(20px, env(safe-area-inset-right, 0px)) 0 max(20px, env(safe-area-inset-left, 0px)); }
.brand { font-size: 18px; text-decoration: none; color: var(--ink); margin-right: auto; transition: opacity .2s; }
.brand:hover { opacity: .7; }
.nav { display: flex; align-items: center; gap: 40px; }
.nav-links { display: flex; gap: 32px; }
.nav-links a { font-size: 18px; line-height: 28px; text-decoration: none; color: var(--grey); transition: color .25s var(--ease); }
.nav-links a:hover { color: var(--ink); }
.nav-links a[aria-current] { color: var(--black); }
.lang { display: inline-flex; background: #ECECE8; border-radius: 999px; padding: 3px; font-size: 12px; font-weight: 600; line-height: 1; }
.lang a { text-decoration: none; padding: 7px 12px; border-radius: 999px; color: #6E7080; transition: color .2s, background .2s; }
.lang a:hover { color: var(--ink); }
.lang a[aria-current] { background: var(--ink); color: #fff; }
.nav-links .nav-mobile { display: none; }
.menu-btn { display: none; }
.progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; }
.progress span { display: block; height: 100%; background: var(--ink); transform: scaleX(var(--p, 0)); transform-origin: left; }

@media (max-width: 760px) {
  .menu-btn {
    display: grid; place-items: center; width: 44px; height: 44px; margin-right: -10px;
    border: 0; background: transparent; cursor: pointer; color: var(--ink);
  }
  .bars { position: relative; width: 22px; height: 12px; }
  .bars i { position: absolute; left: 0; right: 0; height: 2px; border-radius: 2px; background: currentColor; transition: transform .35s var(--ease), top .35s var(--ease); }
  .bars i:first-child { top: 0; }
  .bars i:last-child { top: 10px; }
  .menu-open .bars i:first-child { top: 5px; transform: rotate(45deg); }
  .menu-open .bars i:last-child { top: 5px; transform: rotate(-45deg); }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px 20px 24px; background: var(--bg); min-height: calc(100vh - var(--header)); min-height: calc(100dvh - var(--header));
    border-bottom: 1px solid var(--line);
    visibility: hidden; opacity: 0; transform: translateY(-8px); transition: opacity .3s var(--ease), transform .3s var(--ease), visibility 0s .3s;
  }
  .menu-open .nav { visibility: visible; opacity: 1; transform: none; transition: opacity .3s var(--ease), transform .3s var(--ease); }
  .menu-open.site-header { border-bottom-color: var(--line); background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .nav-links { flex-direction: column; gap: 0; }
  /* same type as the desktop header links */
  .nav-links a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav-links .nav-mobile { display: block; }
  .lang { align-self: flex-start; margin-top: 22px; font-size: 13px; }
  .lang a { padding: 8px 16px; }
}

/* ------------------------------------------------ home */
.home-hero {
  max-width: 954px; margin: 0 auto; padding: 114px var(--g) 0; box-sizing: content-box;
  display: grid; grid-template-columns: minmax(0, 593px) 273px; justify-content: space-between; align-items: start; gap: 40px;
}
.home-text h1 { font-size: 64px; line-height: 77px; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 59px; }
.home-lines p { color: var(--grey); }
.portrait img { width: 273px; }
.projects { padding: 91px var(--g) 65px; }
.projects > h2 { font-size: 26px; line-height: 31px; font-weight: 700; color: var(--black); text-align: center; margin-bottom: 40px; }
@media (max-width: 900px) {
  .home-hero { grid-template-columns: 1fr 200px; }
  .portrait img { width: 200px; }
  .home-text h1 { font-size: 52px; line-height: 1.15; }
}
@media (max-width: 640px) {
  .home-hero { grid-template-columns: 1fr; padding-top: 48px; gap: 20px; }
  .portrait { display: none; }
  .home-text h1 { font-size: 40px; line-height: 1.15; margin-bottom: 24px; }
  .projects { padding-top: 64px; padding-bottom: 96px; }
}

/* project cards (as in Figma) */
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 440px)); justify-content: center; gap: 40px; }
.card {
  position: relative; display: flex; flex-direction: column; text-decoration: none; color: inherit;
  background: var(--tile); border-radius: 20px; padding: 0 34px 41px; min-height: 580px;
}
/* hover: the whole card grows a little, no shadow. Uses `scale` so it does not clash with the fade-in transform. */
.card, .js .card.rv { transition: opacity .8s var(--ease), transform .8s var(--ease), scale .4s var(--ease); }
.card:hover { scale: 1.03; }
.card-logo { position: absolute; left: 21px; top: 17px; }
.card-modus .card-logo { left: 0; top: 0; }
.card-edgemontel .card-logo { left: 14px; top: 17px; }
.card-logo img { width: auto; height: 50px; }
.card-modus .card-logo img { height: 72px; }
.card-edgemontel .card-logo img { height: 45px; }
.card-img { display: flex; align-items: center; justify-content: center; height: 283px; margin-top: 77px; }
.card-img img { max-height: 100%; max-width: 100%; height: auto; }
.card-img .frame-dark { height: 275px; }
.card-img .frame-dark img { height: 100%; }
.card-title { margin-top: 0; font-size: 36px; line-height: 44px; font-weight: 700; color: var(--ink); }
.card-text { margin-top: 15px; color: var(--grey); min-height: 56px; }
.card-btn {
  margin-top: auto; display: grid; place-items: center; height: 53px; border-radius: 108px;
  background: var(--card-btn); color: var(--tile); font-size: 20px; transition: background .25s;
}
.card:hover .card-btn { background: var(--ink); }
.more { padding: 64px var(--g) 34px; }
.more > h2 { max-width: var(--col); margin: 0 auto 30px; font-size: 26px; line-height: 31px; font-weight: 700; }
@media (max-width: 1000px) { .card { padding: 0 24px 32px; } }
@media (max-width: 760px) {
  .cards { grid-template-columns: minmax(0, 440px); gap: 24px; }
  .card { min-height: 0; }
  .card-img { height: 240px; margin-top: 70px; margin-bottom: 16px; }
  .card-img .frame-dark { height: 232px; }
  .card-title { font-size: 32px; line-height: 1.2; }
  .card-btn { margin-top: 20px; }
}

/* dark device frame around phone/tablet screenshots */
.frame-dark { border: 6px solid var(--frame); border-radius: 12px; overflow: hidden; background: var(--frame); }
.frame-dark img { border-radius: 6px; }

/* ------------------------------------------------ case hero */
.case-hero { padding: 0 var(--g); }
.hero-in {
  max-width: 1123px; margin: 0 auto; min-height: 646px; padding: 56px 0 50px;
  display: grid; grid-template-columns: minmax(0, 503px) minmax(0, 627px); justify-content: space-between; align-items: center; column-gap: 40px;
}
.hero-text { display: flex; flex-direction: column; padding-bottom: 20px; }
.hero-text h1 { font-family: "Lato", "Inter", sans-serif; font-weight: 800; font-size: 48px; line-height: 60px; }
.hero-sub { color: var(--grey); margin-top: 19px; max-width: 502px; }
.facts { display: grid; grid-template-columns: 175px 176px 151px; gap: 16px 0; margin: 65px 0 55px; }
.facts dt { color: var(--grey); }
.facts dd { margin: 6px 0 0; padding-right: 16px; }
.hero-img img { width: 100%; max-height: 520px; object-fit: contain; }
@media (max-width: 1000px) {
  .hero-in { grid-template-columns: 1fr 1fr; min-height: 0; }
  .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 40px 0 36px; }
}
@media (max-width: 760px) {
  .hero-in { grid-template-columns: 1fr; padding: 40px 0 48px; row-gap: 32px; }
  .hero-text h1 { font-size: 44px; line-height: 1.2; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 28px 0 28px; font-size: 16px; line-height: 24px; }
  /* the text box dissolves so the button can sit below the mockup */
  .hero-in { row-gap: 0; }
  .hero-text { display: contents; }
  .hero-img { order: 2; }
  .hero-text .btn-dark { order: 3; justify-self: center; margin-top: 32px; }
}

/* ------------------------------------------------ sections */
.sec { padding: 0 var(--g); }
.sec .col { max-width: var(--col); margin: 0 auto; padding-top: 60px; display: flex; flex-direction: column; }
.sec:first-of-type .col, .divider + .sec .col { padding-top: 62px; }
.sec-intro { padding: 40px var(--g) 70px; }
.sec h2 { font-size: 26px; line-height: 31px; font-weight: 700; margin-bottom: 20px; }
.sec h2 .num { color: var(--grey); font-weight: 600; margin-right: 6px; font-variant-numeric: tabular-nums; }
.sec .txt { max-width: var(--col); }
.sec .txt a { text-underline-offset: 3px; }
.sec .txt + .txt { margin-top: 28px; }
.h3 { font-size: 20px; line-height: 28px; font-weight: 600; margin-top: 28px; }
.h3 + .txt { margin-top: 0; }
.h3l { font-size: 26px; line-height: 31px; font-weight: 700; margin: 50px 0 20px; }
.sec .col > .txt + :is(.bleed, .bigstats, .canvas, .fig, .process, .mres) { margin-top: 28px; }
.sec .col > h2 + :is(.bleed, .canvas) { margin-top: 0; }
.sec .col > :is(.bleed, .canvas) + :is(.bleed, .canvas) { margin-top: 10px; }
.sec .col > :is(.bleed, .canvas, .bigstats, .screens) + :is(.txt, .h3) { margin-top: 30px; }
.sec .col > :is(.bleed, .canvas) + .h3l { margin-top: 30px; }
.sec .col > .source { margin-top: 10px; }
.sec .col > .source + .canvas { margin-top: 16px; }
@media (max-width: 760px) {
  .sec .col { padding-top: 64px; }
  .sec h2 { font-size: 22px; line-height: 1.25; }
  .h3 { font-size: 18px; line-height: 26px; }
  .h3l { font-size: 22px; line-height: 1.25; margin-top: 48px; }
  .big { font-size: 36px; }
}

/* elements wider than the text column are centred on the page */
.bleed {
  width: min(var(--bw), 100vw - 2 * var(--g));
  margin-left: calc((100% - min(var(--bw), 100vw - 2 * var(--g))) / 2);
}

/* ------------------------------------------------ canvas: positioned compositions from Figma */
.canvas { position: relative; container-type: inline-size; }
.canvas .cv { position: absolute; margin: 0; }
.canvas .cv img { width: 100%; height: 100%; object-fit: fill; }
.cv-screen { border: calc(6 * 100cqw / var(--W)) solid var(--frame); border-radius: calc(12 * 100cqw / var(--W)); background: var(--frame); overflow: hidden; }
.cv-screen img { border-radius: calc(6 * 100cqw / var(--W)); object-fit: cover !important; }
.cv-cap, .cv-cap-c { color: var(--grey); font-size: calc(18 * 100cqw / var(--W)); line-height: 1.55; }
.cv-cap-c { color: var(--ink); text-align: center; transform: translateX(0); }
.cv-cap-i { color: var(--grey); font-style: oblique 10deg; font-weight: 300; font-size: calc(18 * 100cqw / var(--W)); line-height: 1.55; }
.cv-label { color: var(--ink); font-size: calc(10 * 100cqw / var(--W)); line-height: 1.4; }
.cv-label strong { font-weight: 700; }
.cv-photo img { object-fit: cover !important; }
@media (max-width: 760px) {
  /* captions inside scaled compositions keep a readable minimum size */
  .cv-cap { font-size: max(11px, calc(18 * 100cqw / var(--W))); line-height: 1.3; }
  .cv-cap-c { font-size: max(9.5px, calc(18 * 100cqw / var(--W))); line-height: 1.25; }
  .cv-cap-i { font-size: max(12px, calc(18 * 100cqw / var(--W))); line-height: 1.35; }
  /* illustrations with labels in them (5.2): edge to edge, labels keep a readable size on one line each */
  .c-labels { width: 100vw; margin-left: calc(50% - 50vw); }
  .c-labels .cv-label {
    width: auto !important; white-space: nowrap; font-size: max(9px, calc(10 * 100cqw / var(--W))); line-height: 1.3;
    background: rgba(243, 244, 240, .88); padding: 1px 3px; border-radius: 3px; z-index: 2;
  }
  .c-labels .cv-label-end { left: auto !important; right: 4px; }
  /* photo groups: a simple two-column grid on phones */
  /* photo groups (07): same side margins as the text, every group the same height (45 % of the width) */
  .c-band { --w: calc(100vw - 2 * var(--g)); aspect-ratio: auto !important; display: grid; gap: 4px; }
  .c-band .cv { position: static !important; width: auto !important; height: auto !important; min-width: 0; }
  .c-band .cv img { object-fit: cover !important; }
  .c-band-demo { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: calc(var(--w) * .45) auto; }
  .c-band-media { grid-template-columns: 20.7fr 24.3fr 55fr; grid-template-rows: calc(var(--w) * .225 - 2px) calc(var(--w) * .225 - 2px) auto; }
  .c-band-media div.cv:nth-of-type(1) { grid-area: 1 / 1 / 3 / 2; }
  .c-band-media div.cv:nth-of-type(2) { grid-area: 1 / 2 / 3 / 3; }
  .c-band-media div.cv:nth-of-type(3) { grid-area: 1 / 3; }
  .c-band-media div.cv:nth-of-type(4) { grid-area: 2 / 3; }
  .c-band .cv-cap-i { grid-column: 1 / -1; padding-top: 6px; font-size: 13px; line-height: 18px; }
}

/* ------------------------------------------------ annotated mockups (technical figure)
   build.py writes the picture, the target points and the notes as a list. site.js puts the notes in
   side columns and draws straight 1 px lines (desktop/tablet), or shows one note at a time (phone).
   Without JavaScript the notes stay a plain list under the picture. */
.annot { --c: 220px; --gap: 28px; --an: #A2A4AA; position: relative; }   /* --an: line and dot colour */
.an-has-l { --pl: calc(var(--c) + var(--gap)); }
.an-has-r { --pr: calc(var(--c) + var(--gap)); }
.an-stage { position: relative; }
.an-pt { position: absolute; z-index: 4; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; background: var(--an); display: none; }
.an-notes { list-style: none; margin: 16px 0 0; padding: 0; }
.an-note { font-size: 14px; line-height: 20px; color: var(--grey); padding: 8px 0; border-bottom: 1px solid var(--line); }
.an-note strong { display: block; color: var(--ink); font-weight: 600; }
.an-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 3; display: none; }
.an-lines path { fill: none; vector-effect: non-scaling-stroke; }
.an-lines .ln { stroke: var(--an); stroke-width: 1.5; stroke-dasharray: 1; stroke-dashoffset: 0; transition: stroke-dashoffset 1.2s var(--ease) .2s; }
.an-nav { display: none; }

/* desktop and tablet: notes in columns beside the picture */
.an-cols .an-stage { padding: 0 var(--pr, 0px) 0 var(--pl, 0px); }
.an-cols .an-head { padding: 0 var(--pr, 0px) 0 var(--pl, 0px); }   /* heading centred over the picture */
.an-cols .an-pt, .an-cols .an-lines { display: block; }
.an-cols .an-notes { position: absolute; inset: 0; margin: 0; pointer-events: none; }
.an-cols .an-note { position: absolute; width: var(--c); padding: 0; border: 0; }
.an-cols .an-l { left: 0; text-align: right; }
.an-cols .an-r { right: 0; }
.js .annot:not(.in) .an-lines .ln { stroke-dashoffset: 1; }
.an-cols .an-pt { transition: opacity .5s var(--ease) 1s; }
.js .annot:not(.in) .an-pt { opacity: 0; }
@media (max-width: 1000px) { .annot { --c: 170px; --gap: 20px; } }

/* phone: the picture in full width, one note at a time under it */
/* the picture never gets taller than about half the screen, so the arrows stay in view */
.an-car .an-pic { max-width: min(100%, 52vh * var(--ar)); max-width: min(100%, 52svh * var(--ar)); margin-inline: auto; }
.an-car .an-pt { display: block; opacity: 0; scale: .4; transition: opacity .25s var(--ease), scale .25s var(--ease); }
.an-car .an-pt.on { opacity: 1; scale: 1; width: 12px; height: 12px; margin: -6px 0 0 -6px; }
.an-car .an-pt.pop { animation: an-pop .55s var(--ease); }
@keyframes an-pop { 0% { scale: .3; } 55% { scale: 1.7; } 100% { scale: 1; } }
.an-car .an-notes { display: grid; margin-top: 14px; touch-action: pan-y; }
.an-car .an-note { grid-area: 1 / 1; visibility: hidden; padding: 0; border: 0; font-size: 15px; line-height: 22px; }
.an-car .an-note.on { visibility: visible; }
.an-car .an-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.an-nav button, .scr-nav button { border: 0; background: none; color: var(--ink); cursor: pointer; padding: 0; font: inherit; }
.an-arrow { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line) !important; transition: background .2s; }
.an-arrow:hover { background: var(--tile); }
.an-arrow svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.an-dots { display: flex; flex-wrap: wrap; justify-content: center; }
.an-dots button { width: 22px; height: 28px; display: grid; place-items: center; }
.an-dots button::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #c4c5c9; transition: background .2s, transform .2s; }
.an-dots button[aria-current="true"]::before { background: var(--ink); transform: scale(1.2); }

/* pictures side by side with their result right under each (6.1); stacked on smaller screens */
.compare.cmp-group { align-items: start; }
.cmp-group .legend { margin-top: 10px; }
.compare { display: grid; grid-template-columns: var(--tpl); column-gap: var(--gap, 48px); row-gap: 22px; align-items: center; }
.cmp-cell { grid-column: var(--col); grid-row: var(--row); min-width: 0; order: var(--ord); }
.cmp-cell > .bleed { width: 100%; margin-left: 0; }
@media (max-width: 760px) { .cmp-cell > .canvas[style*="--mw"] { max-width: var(--mw); margin-inline: auto; } }
.cmp-cell:has(.stat) { align-self: start; }
.compare .pic img { width: 100%; }
.stat { display: flex; flex-direction: column; align-items: center; text-align: center; }
.stat.is-old .big { color: var(--grey); }
.stat .bs-l { color: var(--grey); margin-top: 4px; }
@media (max-width: 1180px) {
  .compare:not(.cmp-phone) { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .compare:not(.cmp-phone) > .cmp-cell:has(.stat) { align-self: stretch; }
  .compare:not(.cmp-phone) > .cmp-cell + .cmp-cell { margin-top: 18px; }
  .compare:not(.cmp-phone) > .cmp-cell:has(.stat) + .cmp-cell { margin-top: 48px; }
  .compare .pic { max-width: 633px; margin-inline: auto; }
}
@media (max-width: 760px) {
  .stat .bs-l { font-size: 14px; line-height: 20px; }
  .cmp-phone { display: flex; flex-direction: column; align-items: stretch; gap: 20px; }
}

/* pictures in a row with equal gaps and centred captions (01) */
.gallery { display: grid; grid-template-columns: var(--tpl); column-gap: 28px; align-items: center; }
.g-img, .g-cap { grid-column: var(--c); grid-row: var(--r); }
.g-img img { width: 100%; }
.g-cap { color: var(--grey); text-align: center; margin-top: 18px; align-self: start; }
@media (max-width: 760px) {
  .gallery { grid-template-columns: 1fr 1fr; column-gap: 12px; }
  .g-img, .g-cap { grid-column: var(--mc); grid-row: var(--mr); }
  .g-cap { font-size: 14px; line-height: 20px; margin: 10px 0 24px; }
  .g-cap:last-child { margin-bottom: 0; }
}

/* ------------------------------------------------ Fältjournalen components */
.statbox { background: var(--tile); border-radius: 10px; padding: 15px 10px 15px 34px; display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 0 20px; }
.sb-item { display: flex; flex-direction: column; padding-bottom: 6px; }
.sb-item .small { max-width: 257px; margin-top: 1px; }
.sb-item.is-old .big { color: var(--grey); }
.source { font-size: 12px; line-height: 17px; }
.source, .source a { color: var(--grey); }
.sb-src { grid-column: 1 / -1; margin: 8px 0 2px; }   /* the box's footnote: source or how it was measured */
@media (max-width: 760px) {
  .statbox { grid-template-columns: 1fr; gap: 0; padding: 4px 16px; }
  .sb-item { flex-direction: row; align-items: center; gap: 14px; padding: 12px 0; }
  .sb-item + .sb-item { border-top: 1px solid rgba(0, 3, 41, .1); }
  .sb-src { margin: 0; padding: 10px 0 12px; border-top: 1px solid rgba(0, 3, 41, .1); }
  .sb-col .sb-item { flex-direction: column; align-items: flex-start; gap: 2px; }
  .sb-col .sb-item .big { width: auto; }
  .sb-item .big { flex: none; width: 96px; }
  .sb-item .small { max-width: none; margin: 0; }
}
@media (max-width: 340px) {
  .sb-item { flex-direction: column; align-items: flex-start; gap: 2px; }
}

/* Discovery (02): same box as the fact box (.statbox): grey, radius, padding, small grey text */
.arrows { background: var(--tile); border-radius: 10px; padding: 15px 10px 15px 34px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 20px; }
.ar-item { padding: 6px 0 8px; }
.ar-item h4 { font-size: 20px; line-height: 24px; font-weight: 600; margin-bottom: 6px; }
.ar-item .small { max-width: 257px; }
@media (max-width: 760px) {
  .arrows { grid-template-columns: 1fr; gap: 0; padding: 4px 16px; }
  .ar-item { padding: 12px 0; }
  .ar-item + .ar-item { border-top: 1px solid rgba(0, 3, 41, .1); }
  .ar-item h4 { font-size: 18px; margin-bottom: 4px; }
  .ar-item .small { max-width: none; }
}

.tests { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; align-items: stretch; }
.test { display: flex; flex-direction: column; border-radius: 10px; overflow: hidden; background: var(--tile); transition: transform .4s var(--ease), box-shadow .4s var(--ease); }
.test:hover { transform: translateY(-3px); box-shadow: 0 18px 36px -26px rgba(0, 3, 41, .45); }
.test-img { position: relative; aspect-ratio: 306 / 311; overflow: hidden; }
.test-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.test:hover .test-img img { transform: scale(1.04); }
.test-body { flex: 1; padding: 15px 20px 22px; display: flex; flex-direction: column; }
.test-body h4 { font-size: 20px; line-height: 24px; font-weight: 600; margin-bottom: 11px; }
.mini { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: 126px 1fr; gap: 9px 0; }
.mini li { display: flex; flex-direction: column; font-size: 14px; line-height: 20px; color: var(--grey); }
.mini strong { color: var(--ink); font-weight: 700; }
@media (max-width: 760px) {
  .tests { grid-template-columns: 1fr; gap: 12px; }
  .test { flex-direction: row; }
  .test-img { width: 42%; aspect-ratio: auto; flex: none; }
  .test-body { padding: 14px 14px 16px; }
  .test-body h4 { font-size: 18px; }
  .mini { grid-template-columns: 1fr 1fr; }
}

.mvp { background: var(--tile); border-radius: 10px; overflow: hidden; }
.mvp-bars { padding: 13px 24px 22px; }
.bar-row { display: grid; grid-template-columns: 140px minmax(0, 647px) 80px; align-items: center; gap: 0 19px; height: 47px; }
.bar-l { font-size: 18px; }
.bar-track { height: 20px; border-radius: 8px; background: var(--track); overflow: hidden; }
.bar-track span { display: block; height: 100%; width: var(--w); background: var(--ink); border-radius: 8px; transform-origin: left; transition: transform 1.3s var(--ease); }
.is-old .bar-track span { background: var(--grey); }
.js .mvp:not(.in) .bar-track span { transform: scaleX(0); }
.bar-v { font-size: 26px; line-height: 31px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.is-old .bar-v { color: var(--grey); }
.mvp-note { margin-top: 12px; max-width: 655px; }
.mvp-stats { border-top: 1px solid #bfbfbf; display: grid; grid-template-columns: 300px 1fr; padding: 18px 24px 26px; }
.mvp-stat .small { max-width: 259px; display: block; }
.big-row { display: flex; align-items: center; gap: 14px; }
.tlx { width: 49px; }
@media (max-width: 760px) {
  .mvp-bars { padding: 14px 16px 18px; }
  .bar-row { grid-template-columns: 1fr auto; grid-template-rows: auto auto; height: auto; gap: 4px 12px; margin-bottom: 12px; }
  .bar-l { font-size: 16px; }
  .bar-track { grid-column: 1 / -1; grid-row: 2; height: 14px; }
  .bar-v { grid-column: 2; grid-row: 1; font-size: 22px; }
  .mvp-stats { grid-template-columns: 1fr; gap: 18px; padding: 16px; }
}

.bigstats { display: grid; grid-template-columns: 1fr 1fr; padding: 40px 0 20px 86px; }
.bs-item { display: flex; flex-direction: column; }
.bs-item.is-old { padding-left: 46px; }
.bs-item.is-old .big { color: var(--grey); }
.bs-l { color: var(--grey); margin-top: 4px; }
@media (max-width: 760px) { .bigstats { padding: 24px 0 0; gap: 16px; } .bs-item.is-old { padding-left: 0; } .bs-l { font-size: 14px; line-height: 20px; } }

.screens { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 294px)); justify-content: space-between; gap: 40px 28px; }
.scr .frame-dark img { width: 100%; aspect-ratio: 282 / 473; object-fit: cover; }
.scr > img { width: 100%; aspect-ratio: 294 / 485; }
.scr figcaption { margin-top: 13px; max-width: 290px; }
.scr-nav { display: none; }
@media (max-width: 1000px) {
  .screens {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 16px; width: auto; margin-inline: calc(-1 * var(--g));
    padding: 0 var(--g) 4px; scroll-padding-inline: var(--g); scrollbar-width: none; overscroll-behavior-x: contain;
  }
  .screens::-webkit-scrollbar { display: none; }
  .scr { flex: 0 0 min(40%, 46svh * 294 / 485); scroll-snap-align: start; }
  .scr figcaption { max-width: none; }
  .scr-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
}
@media (max-width: 640px) {
  .scr { flex-basis: min(74%, 46svh * 294 / 485); }
}

/* ------------------------------------------------ MODUS components */
.process { list-style: none; margin: 30px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.step { display: grid; grid-template-columns: minmax(0, 492fr) minmax(0, 432fr); gap: 14px; }
.step.flip { grid-template-columns: minmax(0, 432fr) minmax(0, 492fr); }
.step.flip .step-card { order: 2; }
.step-card {
  background: var(--bg); border-radius: 15px; padding: 14px 15px 22px; min-height: 182px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .14);
}
.step-card h4 { display: flex; align-items: center; gap: 10px; font-size: 20px; line-height: 24px; font-weight: 700; margin-bottom: 14px; transition: color .8s var(--ease); }
.step-n {
  flex: none; width: 41px; height: 41px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ink); color: var(--bg); font-size: 26px; font-weight: 700; line-height: 1; transition: background .8s var(--ease);
}
.step-card p { font-size: 16px; line-height: 28px; color: var(--grey); transition: color .8s var(--ease); }
.step-img { border-radius: 15px; overflow: hidden; background: #000; }
.step-img img { width: 100%; height: 100%; object-fit: cover; transition: filter 1s var(--ease), opacity 1s var(--ease), transform 1.2s var(--ease); }
/* dim and colourless until the step is reached while scrolling, then it lights up */
.js .step:not(.lit) .step-img img { filter: grayscale(1) contrast(.85) brightness(.9); opacity: .55; transform: scale(1.015); }
.js .step:not(.lit) .step-n { background: #b9b9b9; }
.js .step:not(.lit) .step-card h4 { color: #8a8a8a; }
.js .step:not(.lit) .step-card p { color: #b0b0b0; }
.js .step:not(.lit) .step-card { box-shadow: 0 2px 8px rgba(0, 0, 0, .06); }
.step-card { transition: box-shadow .8s var(--ease); }
@media (max-width: 760px) {
  .step, .step.flip { grid-template-columns: 1fr; gap: 0; }
  .step.flip .step-card { order: 0; }
  .step-card { border-radius: 15px 15px 0 0; min-height: 0; }
  .step-img { border-radius: 0 0 15px 15px; aspect-ratio: 432 / 190; }
  .process { gap: 14px; }
}

.tiles { display: flex; gap: 21px; }
.tile {
  background: var(--tile); border-radius: 10px; min-height: 169px; padding: 20px 16px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
}
.tile-l { color: var(--grey); }
@media (max-width: 760px) {
  .tiles { flex-direction: column; gap: 12px; max-width: 360px; margin-inline: auto; width: 100%; }
  .tiles .tile { flex: none !important; min-height: 130px; }
}
.mres { display: grid; grid-template-columns: 271px 293px; justify-content: center; column-gap: 131px; align-items: start; margin-top: 70px; }
.mres-tiles { display: flex; flex-direction: column; gap: 33px; padding-top: 9px; }
.tile.sq { min-height: 259px; }
.tile.sq img { width: 110px; margin-bottom: 18px; }
.tile.sq .tile-l { max-width: 251px; }
.mres-phone img { width: 293px; }
@media (max-width: 760px) {
  .mres { grid-template-columns: minmax(0, 1fr); row-gap: 16px; justify-items: center; margin-top: 32px; }
  .mres-tiles { width: 100%; max-width: 271px; gap: 16px; }
  .tile.sq { min-height: 200px; }
  .mres-phone img { width: 240px; }
}

/* ------------------------------------------------ Edgemontel components */
.ba { margin-top: 0; }
.ba-labels { display: grid; grid-template-columns: 1fr 1fr; text-align: center; color: var(--grey); margin-bottom: 12px; }
.ba-stage { position: relative; --x: 50%; user-select: none; touch-action: pan-y; }
.ba-stage img { width: 100%; }
.ba-after { position: absolute; inset: 0; clip-path: inset(0 0 0 var(--x)); }
.ba-after img { height: 100%; object-fit: fill; }
.ba-handle { position: absolute; top: 0; bottom: 22%; left: var(--x); width: 2px; margin-left: -1px; background: var(--ink); pointer-events: none; }
.ba-handle span {
  position: absolute; top: 50%; left: 50%; translate: -50% -50%; width: 44px; height: 44px; border-radius: 50%;
  background: var(--bg); box-shadow: 0 0 0 2px var(--ink), 0 6px 18px rgba(0, 3, 41, .25); transition: scale .25s var(--ease);
}
.ba-handle span::before, .ba-handle span::after { content: ""; position: absolute; top: 50%; width: 7px; height: 7px; border: solid var(--ink); border-width: 0 0 2px 2px; }
.ba-handle span::before { left: 12px; transform: translateY(-50%) rotate(45deg); }
.ba-handle span::after { right: 12px; transform: translateY(-50%) rotate(-135deg); }
.ba-stage:hover .ba-handle span { scale: 1.08; }
.ba-range { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: ew-resize; }
/* touch: the native range only moves when its thumb is hit, so site.js drags the stage itself */
.ba-stage img { -webkit-user-drag: none; -webkit-touch-callout: none; }
@media (pointer: coarse) { .js .ba-stage .ba-range { pointer-events: none; } }
.ba-stage:has(.ba-range:focus-visible) .ba-handle span { outline: 2px solid var(--ink); outline-offset: 3px; }
.ba-hint { text-align: center; color: var(--grey); font-size: 14px; margin-top: 10px; }

.chev-wrap { margin-top: 34px; --stg: 160ms; }
.chevrons { list-style: none; margin: 0; padding: 0; display: flex; }
/* Padding is symmetric so the text sits in the middle of the visible arrow: the notch on the left and the
   tip on the right take the same room. The first step has no notch, so its text moves left by half a tip. */
.chevrons li {
  /* a scale of greys from the dark button grey to the track grey */
  --c: color-mix(in srgb, var(--btn) calc(100% - var(--i) * 20%), var(--track));
  /* each step overlaps the tip of the one before by 1 px more than the tip is long, so no seam shows */
  position: relative; flex: 1 1 0; height: 118px; margin-left: -31px; padding: 0 26px;
  display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center;
  background: var(--c); color: #fff;
  clip-path: polygon(0 0, calc(100% - 30px) 0, 100% 50%, calc(100% - 30px) 100%, 0 100%, 30px 50%);
}
.chevrons li:first-child { margin-left: 0; padding: 0 33px 0 18px; clip-path: polygon(0 0, calc(100% - 30px) 0, 100% 50%, calc(100% - 30px) 100%, 0 100%); border-radius: 12px 0 0 12px; }
.chevrons li:nth-child(n+4) { color: var(--ink); }
.ch-n { font-size: 14px; line-height: 20px; opacity: .7; font-variant-numeric: tabular-nums; }
.ch-t { font-size: 18px; line-height: 24px; font-weight: 600; margin-top: 4px; }
/* steps slide in, then light up one at a time when they reach 70 % of the screen height (site.js adds .lit) */
.chevrons li, .ch-loopstep {
  transition: transform .6s var(--ease) calc(var(--i) * 90ms), opacity .6s var(--ease) calc(var(--i) * 90ms),
              background-color .7s var(--ease) calc(var(--i) * var(--stg)), color .7s var(--ease) calc(var(--i) * var(--stg));
}
.js .chev-wrap:not(.in) .chevrons li { transform: translateX(-12px); opacity: 0; }
.js .chevrons li:not(.lit), .js .ch-loopstep:not(.lit) { background-color: #E6E6E3; color: #B3B3B3; }
.loop { display: flex; align-items: center; gap: 14px; margin-top: 18px; color: var(--grey); }
.loop-line { flex: 1; height: 1px; background: var(--grey); position: relative; }
.loop-line:first-child::before, .loop-line:last-child::after { content: ""; position: absolute; top: -4px; width: 8px; height: 8px; border: solid var(--grey); border-width: 0 0 1px 1px; }
.loop-line:first-child::before { left: 0; transform: rotate(45deg); }
.loop-line:last-child::after { right: 0; transform: rotate(-135deg); }
.loop-t { white-space: nowrap; }
.ch-loopstep { display: none; }
@media (max-width: 760px) {
  .chev-wrap { --stg: 0ms; }
  .chevrons { flex-direction: column; }
  /* the notch on top and the tip below take the same room, so equal padding centres the text */
  .chevrons li {
    flex: none; height: auto; min-height: 64px; margin: -15px 0 0; padding: 20px 16px; flex-direction: row; gap: 10px; justify-content: center;
    clip-path: polygon(0 0, 50% 14px, 100% 0, 100% calc(100% - 14px), 50% 100%, 0 calc(100% - 14px));
  }
  .chevrons li:first-child { margin-top: 0; padding: 14px 16px 21px; border-radius: 12px 12px 0 0; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 14px), 50% 100%, 0 calc(100% - 14px)); }
  .ch-t { margin-top: 0; }
  /* the loop becomes the last step, with an arrow back up */
  .loop { display: none; }
  .ch-loopstep {
    display: flex; align-items: center; justify-content: center; gap: 8px; margin: -15px 0 0; padding: 24px 16px 14px;
    background: var(--tile); color: var(--ink); border-radius: 0 0 12px 12px;
    clip-path: polygon(0 0, 50% 14px, 100% 0, 100% 100%, 0 100%);
  }
  .ch-loopstep .ch-t { font-size: 15px; line-height: 22px; text-align: center; }
  .ch-back { flex: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
}

.gtile { background: var(--tile); border-radius: 20px; padding: 18px 37px 30px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.tile-label { color: var(--grey); }
.gtile .tile-label + .tile-img { margin-top: 2px; }
.gtile .tile-img + .tile-label { margin-top: 14px; }
.tile-img { width: 100%; }
.tile-img img { width: 100%; }
@media (max-width: 760px) { .gtile { padding: 14px 16px 18px; border-radius: 16px; } }

.sliders { display: grid; grid-template-columns: 179fr 602fr 157fr; gap: 25px; align-items: stretch; }
.st { background: var(--tile); border-radius: 20px; padding: 10px 14px 24px; display: flex; flex-direction: column; align-items: center; }
.st .tile-label { text-align: center; margin-bottom: 18px; }
.st-b img { width: 111px; }
.st-a img { width: 97px; }
.st-c .canvas { width: 100%; max-width: 583px; margin-top: 10px; }
@media (max-width: 760px) {
  .sliders { grid-template-columns: 1fr 1fr; gap: 12px; }
  .st-c { grid-column: 1 / -1; grid-row: 2; }
  .st { border-radius: 16px; }
  .st .tile-label { font-size: 14px; line-height: 20px; }
}

.pair { display: grid; grid-template-columns: 480fr 477fr; gap: 25px; align-items: start; }
.pair-l { text-align: center; color: var(--grey); margin-bottom: 8px; }
.fig img { width: 100%; }
@media (max-width: 640px) { .pair { grid-template-columns: 1fr; gap: 24px; } }

/* ------------------------------------------------ shared case components (v5) */
/* Summary under the hero: a quiet grey box, bold label on the left, one sentence on the right. */
.summary { margin: 0; background: var(--tile); border-radius: 10px; padding: 6px 28px; }
.sum-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 24px; padding: 14px 0; }
.sum-row + .sum-row { border-top: 1px solid rgba(0, 3, 41, .1); }
.summary dt { font-weight: 700; }
.summary dd { margin: 0; }
.sec-sum + .sec .col { padding-top: 70px; }
@media (max-width: 760px) {
  .summary { padding: 4px 16px; }
  .sum-row { grid-template-columns: 1fr; gap: 2px; padding: 12px 0; }
  .summary dt { font-size: 16px; line-height: 24px; }
  .summary dd { font-size: 16px; line-height: 24px; }
}

/* Read more: about three lines show and the rest fades out, until the button opens it (site.js). */
.rm { --lh: 28px; }
.rm-on .rm-body { overflow: hidden; max-height: calc(var(--lh) * 3.6); transition: max-height .5s var(--ease); }
.rm-on:not(.open) .rm-body { -webkit-mask-image: linear-gradient(#000 calc(var(--lh) * 2.2), transparent); mask-image: linear-gradient(#000 calc(var(--lh) * 2.2), transparent); }
.rm-on.open .rm-body { max-height: var(--full, 200em); }
.rm-btn {
  display: inline-block; margin-top: 4px; padding: 6px 0; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: 14px; line-height: 20px; color: var(--grey); text-decoration: underline; text-underline-offset: 3px;
  transition: color .25s;
}
.rm-btn:hover { color: var(--ink); }

/* Decision cards (v3): equal cards in a row. Topic (h3) with a thin line under it (the summary's divider),
   then "Problem:", "Beslut:" and "Effekt:". The cards share their row lines (subgrid), so the rows are level in
   all of them. A background picture fills the card in greyscale under a light paper overlay (--ov).
   The cards pop up one at a time when they reach 70 % of the screen height (site.js adds .lit). */
.decisions {
  --stg: 160ms; --ov: .86; list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); column-gap: 16px; row-gap: 0;
}
.sec .col > .txt + .decisions, .sec .col > .decisions + :is(.txt, .h3, .bleed) { margin-top: 28px; }
.dec-card {
  position: relative; overflow: hidden; isolation: isolate; border-radius: 10px; background: var(--tile);
  display: grid; grid-row: span 4; grid-template-rows: subgrid; row-gap: 0; padding: 20px 22px 24px;
}
.dec-card > :not(.dec-bg) { position: relative; z-index: 2; }
.dec-card .h3 { margin: 0 0 14px; padding-bottom: 12px; border-bottom: 1px solid rgba(0, 3, 41, .1); }
.dec-card .dec-d, .dec-card .dec-eff { margin-top: 12px; }
/* problem and decision in the small size (as .small), so the topic and the effect stand out */
.dec-card > p:not(.dec-eff) { font-size: 14px; line-height: 20px; }
.dec-card .h3:has(.dec-ic) { display: flex; align-items: center; gap: 10px; }
.dec-ic { flex: none; width: 24px; height: 24px; fill: none; stroke: var(--ink); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
/* background picture: greyscale, light overlay in the paper tone */
.has-bg { background: var(--bg); }
/* the time-slider picture is brighter, so a little more overlay keeps the text clear */
.dec-card:has(.dec-bg[src*="edge-beslut-timeslider"]) { --ov: .8; }
.dec-bg { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; filter: grayscale(var(--gs, 1)); }
.dec-blur { filter: grayscale(var(--gs, 1)) blur(2px); transform: scale(1.05); }
.has-bg::after { content: ""; position: absolute; inset: 0; z-index: 1; background: rgba(243, 244, 240, var(--ov)); }
/* pop up: a short fade and a small scale from .97 to 1 */
.dec-card { transition: opacity .5s var(--ease) calc(var(--i, 0) * var(--stg)), transform .5s var(--ease) calc(var(--i, 0) * var(--stg)); }
.js .dec-card:not(.lit) { opacity: 0; transform: scale(.97); }
@media (max-width: 760px) {
  .decisions { --stg: 0ms; grid-template-columns: 1fr; row-gap: 12px; }
  .dec-card { padding: 16px 16px 20px; }
}

/* Dot chart: one dot per person. Filled dots are dark on the strong row and grey on the weak one, empty
   dots are only an outline. The dots pop up one at a time the first time the chart is seen. */
.dotchart { background: var(--tile); border-radius: 10px; overflow: hidden; }
.dc-main { padding: 18px 24px 22px; }
.dc-note { padding: 0 24px 16px; }   /* footnote: how it was tested */
.dc-h { font-size: 20px; line-height: 28px; font-weight: 600; margin-bottom: 10px; }
.dc-row { display: grid; grid-template-columns: 140px auto 1fr; align-items: center; gap: 0 24px; min-height: 52px; }
.dc-l { font-size: 18px; }
.dc-dots { display: flex; gap: 12px; }
.dc-dots .d { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid #ABABAB; }
.dc-dots .d.on { background: var(--ink); border-color: var(--ink); }
.is-old .dc-dots .d.on { background: var(--grey); border-color: var(--grey); }
.dc-v { font-size: 26px; line-height: 31px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; justify-self: end; }
.is-old .dc-v { color: var(--grey); }
.dc-dots .d { transition: scale .45s cubic-bezier(.3, 1.6, .5, 1) calc(var(--k) * 55ms), opacity .2s linear calc(var(--k) * 55ms); }
.js .dotchart:not(.in) .d { scale: 0; opacity: 0; }
@media (max-width: 760px) {
  .dc-main { padding: 14px 16px 18px; }
  .dc-note { padding: 0 16px 14px; }
  .dc-h { font-size: 18px; line-height: 26px; }
  .dc-row { grid-template-columns: 1fr auto; gap: 6px 12px; margin-bottom: 12px; min-height: 0; }
  .dc-l { font-size: 16px; }
  .dc-v { grid-column: 2; grid-row: 1; font-size: 22px; }
  .dc-dots { grid-column: 1 / -1; grid-row: 2; gap: 0; justify-content: space-between; }
  .dc-dots .d { width: auto; flex: 0 1 20px; aspect-ratio: 1; height: auto; max-width: 20px; }
  .dc-dots .d + .d { margin-left: 4px; }
}

/* Timeline: done steps solid navy, "now" with a calm pulse, the future dashed and grey.
   Steps light up one at a time while scrolling (.lit). Vertical on phones. */
.timeline { --stg: 160ms; --node: 14px; --gap: 24px; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: var(--gap); }
.sec .col > .txt + .timeline { margin-top: 32px; }
.sec .col > .timeline + :is(.txt, .h3) { margin-top: 32px; }
.tl-step { position: relative; --c: var(--ink); }
.tl-node { position: relative; display: block; width: var(--node); height: var(--node); border-radius: 50%; background: var(--c); border: 2px solid var(--c); }
/* the line from this step to the next */
.tl-step:is(.seg-solid, .seg-dash)::after {
  content: ""; position: absolute; top: calc(var(--node) / 2 - 1px); left: calc(var(--node) + 8px); right: calc(8px - var(--gap));
  border-top: 2px solid var(--ink);
}
.tl-step.seg-dash::after { border-top: 2px dashed #ABABAB; }
.tl-step h4 { font-size: 18px; line-height: 28px; font-weight: 600; margin-top: 16px; }
.tl-step p { font-size: 14px; line-height: 20px; color: var(--grey); margin-top: 4px; }
.tl-future { --c: #ABABAB; }
.tl-future .tl-node { background: var(--bg); }
.tl-future h4 { color: var(--grey); }
/* "now": a ring that slowly grows and fades */
.tl-now .tl-node::after {
  content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid var(--ink); opacity: 0;
}
.tl-now.lit .tl-node::after, html:not(.js) .tl-now .tl-node::after { animation: tl-pulse 2.6s var(--ease) infinite; }
@keyframes tl-pulse { 0% { transform: scale(1); opacity: .55; } 80%, 100% { transform: scale(2.4); opacity: 0; } }
.tl-node, .tl-step::after, .tl-step h4, .tl-step p {
  transition: background-color .7s var(--ease) calc(var(--i) * var(--stg)), border-color .7s var(--ease) calc(var(--i) * var(--stg)),
              color .7s var(--ease) calc(var(--i) * var(--stg));
}
.js .tl-step:not(.lit) .tl-node { background-color: #D6D6D2; border-color: #D6D6D2; }
.js .tl-step:not(.lit)::after { border-top-color: #D6D6D2; }
.js .tl-step:not(.lit) :is(h4, p) { color: #B3B3B3; }
@media (max-width: 760px) {
  .timeline { --stg: 0ms; grid-template-columns: 1fr; gap: 0; }
  .tl-step { padding: 0 0 26px 32px; }
  .tl-step:last-child { padding-bottom: 0; }
  .tl-node { position: absolute; left: 0; top: 5px; }
  .tl-step:is(.seg-solid, .seg-dash)::after {
    top: calc(5px + var(--node) + 6px); bottom: 6px; left: calc(var(--node) / 2 - 1px); right: auto;
    border-top: 0; border-left: 2px solid var(--ink);
  }
  .tl-step.seg-dash::after { border-top: 0; border-left: 2px dashed #ABABAB; }
  .js .tl-step:not(.lit)::after { border-left-color: #D6D6D2; }
  .tl-step h4 { margin-top: 0; }
}

/* Data's journey (FJ 4.1): the patient's route drawn over a wide picture. build.py writes the
   geometry and the delays (--d); the route and the arc are revealed through masks once (.in). */
.journey { --data: #6FA3D6; }   /* light blue: the documentation that flows, not the patient */
.j-pic { position: relative; container-type: inline-size; }
.j-pic img { width: 100%; }
.j-layer { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.j-layer path { fill: none; vector-effect: non-scaling-stroke; }
.j-route { stroke: var(--data); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.j-next { stroke: var(--data); stroke-width: 3; stroke-dasharray: 7 6; opacity: .5; }
.j-arc { stroke: var(--data); stroke-width: 2.5; stroke-dasharray: 7 6; }
.j-hub path { stroke: var(--data); stroke-width: 2.5; stroke-linecap: round; }
.j-draw { fill: none; stroke: #fff; stroke-width: 80; vector-effect: none !important; stroke-dasharray: 1; stroke-dashoffset: 0;
  transition: stroke-dashoffset var(--t) cubic-bezier(.45, .1, .4, 1) var(--d); }
.j-dot { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--bg);
  background: var(--ink); color: #fff; font-size: 11px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.j-pic .j-dot, .j-end, .j-lab, .j-arclab { position: absolute; }
.j-pic .j-dot { width: 24px; height: 24px; margin: -12px 0 0 -12px; z-index: 2; }
.j-end { width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--data); border: 2px solid var(--bg); }
.j-fut { opacity: .45; }
.j-lab, .j-arclab { margin: 0; font-size: max(11px, 13 * 100cqw / 960); line-height: 1.35; color: var(--grey); text-wrap: pretty;
  padding: .3em .5em; border-radius: 4px; background: var(--bg); }
.j-lab strong { display: block; color: var(--ink); font-weight: 600; }
.j-arclab { translate: -50% -100%; }   /* anchored at its centre bottom, above the arc */
.j-list { display: none; list-style: none; margin: 16px 0 0; padding: 0; }
.j-list li { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; font-size: 15px; line-height: 22px; color: var(--grey); }
.j-list li p { margin: 0; text-wrap: pretty; }
.j-list strong { color: var(--ink); font-weight: 600; }
.j-list .j-dot { flex: none; margin-top: 1px; }
.j-dash { flex: none; width: 22px; height: 0; margin-top: 11px; border-top: 2px dashed var(--data); }
@media (max-width: 760px) {
  .j-lab, .j-arclab { display: none; }
  .j-list { display: block; }
  .j-pic .j-dot { width: 18px; height: 18px; margin: -9px 0 0 -9px; font-size: 10px; border-width: 1.5px; }
  .j-end { width: 8px; height: 8px; margin: -4px 0 0 -4px; border-width: 1.5px; }
  .j-route, .j-next { stroke-width: 2.5; }
  .j-hub path { stroke-width: 1.75; }
  .j-arc { stroke-width: 1.75; stroke-dasharray: 4 4; }
}
/* motion: hidden until the figure is first seen, then in order along the route */
.j-pic .j-dot, .j-end, .j-lab, .j-arclab, .j-next, .j-hub { transition: opacity .5s var(--ease) var(--d), scale .5s var(--ease) var(--d); }
.js .journey:not(.in) .j-draw { stroke-dashoffset: 1; }
.js .journey:not(.in) :is(.j-pic .j-dot, .j-end, .j-lab, .j-arclab, .j-next, .j-hub) { opacity: 0; }
.js .journey:not(.in) .j-pic .j-dot { scale: .5; }

/* Short explanations in equal columns under an illustration (FJ 4.2) */
.legend { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 0; text-align: center; }
.legend li { display: flex; flex-direction: column; font-size: 14px; line-height: 20px; color: var(--grey); position: relative; left: var(--dx, 0); padding: 0 10px; }
.legend strong { color: var(--ink); font-weight: 700; }
@media (max-width: 760px) { .legend { grid-template-columns: 1fr; gap: 10px; text-align: left; } .legend li { left: 0; padding: 0; } }

/* Flow of screens (MODUS 05): one grey plate, equal screens, a thin arrow between, the caption under each */
.flow { background: var(--tile); border-radius: 10px; padding: 24px; }
.fl-row { display: grid; grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr) 28px minmax(0, 1fr); column-gap: 12px; row-gap: 12px; }
.fl-pic, .fl-cap, .fl-arrow { grid-column: var(--c); }
.fl-pic, .fl-arrow { grid-row: 1; }
.fl-cap { grid-row: 2; }
.fl-pic img { width: 100%; border-radius: 6px; }
.fl-arrow { align-self: center; color: var(--ink); }
.fl-arrow svg { display: block; width: 28px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 760px) {
  .flow { padding: 16px 0; }
  .fl-row { grid-template-columns: 230px 20px 230px 20px 230px; column-gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory;
            padding-inline: 16px; scroll-padding-inline: 16px; scrollbar-width: none; overscroll-behavior-x: contain; }
  .fl-row::-webkit-scrollbar { display: none; }
  .fl-pic { scroll-snap-align: start; }
  .fl-arrow svg { width: 20px; }
}

/* Photo rows (FJ 06): as wide as the text column, every photo the same height; a sideways row on phones */
.photos { margin: 0; }
.ph-row { display: flex; gap: 8px; }
.ph { flex: var(--ar) 1 0; min-width: 0; aspect-ratio: var(--ar); }
.ph img { width: 100%; height: 100%; object-fit: cover; }
.photos figcaption { margin-top: 10px; }
.sec .col > .photos + .photos { margin-top: 36px; }
.sec .col > .txt + .photos { margin-top: 28px; }
@media (max-width: 760px) {
  .ph-row { overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: calc(-1 * var(--g)); padding-inline: var(--g); scroll-padding-inline: var(--g); scrollbar-width: none; overscroll-behavior-x: contain; }
  .ph-row::-webkit-scrollbar { display: none; }
  .ph { flex: none; height: 220px; width: calc(220px * var(--ar)); scroll-snap-align: start; }
}

/* ------------------------------------------------ 404 */
.nf { max-width: var(--col); margin: 0 auto; padding: 120px var(--g) 40px; box-sizing: content-box; display: flex; flex-direction: column; align-items: flex-start; }
.nf-code { font-family: "Lato", "Inter", sans-serif; font-weight: 800; font-size: 96px; line-height: 1; color: var(--tile); }
.nf h1 { font-size: 48px; line-height: 60px; font-weight: 700; margin-top: 12px; }
.nf-text { color: var(--grey); margin: 16px 0 36px; }
.nf-en { margin-top: 40px; font-size: 14px; line-height: 20px; color: var(--grey); }
.nf-en a { color: var(--ink); text-underline-offset: 3px; }
@media (max-width: 760px) {
  .nf { padding-top: 64px; }
  .nf-code { font-size: 72px; }
  .nf h1 { font-size: 36px; line-height: 1.2; }
}

/* ------------------------------------------------ about */
.about {
  max-width: 888px; margin: 0 auto; padding: 74px var(--g) 0; box-sizing: content-box;
  display: grid; grid-template-columns: minmax(0, 432px) minmax(0, 436px); justify-content: space-between; gap: 20px;
}
.about-text h1 { font-size: 26px; line-height: 28px; font-weight: 700; color: var(--black); margin-bottom: 28px; }
.about-text p { color: var(--black); }
.about-text p + p { margin-top: 28px; }
.about-text h2 { font-size: 20px; line-height: 28px; font-weight: 600; color: var(--black); margin: 36px 0 8px; }
.about-text .btn-dark { margin-top: 28px; }
.about-photo { padding-top: 23px; }
.about-photo img { width: 100%; aspect-ratio: 436 / 582; object-fit: cover; border-radius: 20px; }
/* "I media": flat grey cards like the project cards, the whole card is the link */
.media-sec { max-width: 888px; margin: 0 auto; padding: 96px var(--g) 0; box-sizing: content-box; }
.media-sec > h2, .tools-sec > h2 { font-size: 26px; line-height: 28px; font-weight: 700; color: var(--black); margin-bottom: 20px; }
.media { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.media li { display: flex; }
.m-card {
  flex: 1; display: flex; flex-direction: column; text-decoration: none; color: inherit;
  background: var(--tile); border-radius: 20px; padding: 24px 28px 28px; transition: background .25s var(--ease), transform .25s var(--ease);
}
.m-card:hover, .m-card:focus-visible { background: #D9D9D9; transform: translateY(-2px); }
.m-card:focus-visible { border-radius: 20px; }
.m-logo img { display: block; width: auto; height: 34px; }
.m-title {
  margin-top: 24px; font-size: 24px; line-height: 30px; font-weight: 700; color: var(--ink);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; text-wrap: pretty;
}
.m-meta { margin: 8px 0 24px; }
.m-btn {
  margin-top: auto; align-self: flex-end; display: grid; place-items: center; height: 40px; padding: 0 20px; border-radius: 108px;
  background: var(--card-btn); color: var(--tile); font-size: 16px; transition: background .25s;
}
.m-card:hover .m-btn, .m-card:focus-visible .m-btn { background: var(--ink); }
.tools-sec { padding: 96px var(--g) 140px; }
.tools-sec > h2 { max-width: 888px; margin: 0 auto 32px; }
.tools { list-style: none; margin: 0 auto; padding: 0; max-width: 888px; display: flex; flex-wrap: wrap; justify-content: center; gap: 28px 44px; }
.tools li { display: flex; flex-direction: column; align-items: center; gap: 12px; width: 96px; font-size: 14px; line-height: 20px; color: var(--grey); text-align: center; transition: transform .35s var(--ease); }
.tools li:hover { transform: translateY(-3px); }
.tools li img { width: 72px; height: 72px; object-fit: contain; }
.t-chip { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 16px; background: var(--tile); color: var(--ink); font-size: 13px; font-weight: 600; line-height: 1.2; padding: 6px; }
.t-text > span:last-child { display: none; }
@media (max-width: 760px) {
  .about { grid-template-columns: 1fr; padding-top: 40px; gap: 32px; }
  .about-photo { padding-top: 0; order: 2; }
  .tools { gap: 22px 18px; }
  .tools li { width: 76px; }
  .tools li img, .t-chip { width: 56px; height: 56px; }
  .media-sec, .tools-sec { padding-top: 64px; }
  .media { grid-template-columns: 1fr; gap: 16px; }
  .m-card { padding: 20px 20px 24px; }
  .m-title { font-size: 20px; line-height: 26px; }
}

/* ------------------------------------------------ footer (as in Figma) */
.site-footer { padding: 158px var(--g) 64px; }
.divider + .site-footer { padding-top: 190px; }
.f-grid { max-width: 946px; margin: 0 auto; display: grid; grid-template-columns: 444fr 297fr 205fr; gap: 24px; }
.f-name { font-size: 20px; line-height: 32px; font-weight: 600; margin-bottom: 15px; }
.f-head { font-size: 20px; line-height: 28px; font-weight: 600; margin-bottom: 16px; }
.f-text { color: var(--grey); max-width: 316px; }
.f-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.f-links a { color: var(--grey); text-decoration: none; transition: color .25s; white-space: nowrap; }
.f-links a:hover { color: var(--ink); }
.f-arrows a span:first-child { display: inline-block; margin-right: 4px; transition: transform .25s var(--ease); }
.f-arrows a:hover span:first-child { transform: translateX(3px); }
.f-links .ul span:last-child { text-decoration: underline; text-underline-offset: 3px; }
.f-copy { max-width: 946px; margin: 83px auto 0; font-size: 14px; line-height: 20px; color: var(--grey); }
@media (max-width: 760px) {
  .site-footer { padding-top: 72px; }
  .f-grid { grid-template-columns: 1fr; gap: 28px; }
  .f-copy { margin-top: 48px; }
}

.totop { text-align: center; padding: 91px 0 34px; }

/* ------------------------------------------------ reveal on first view */
.js .rv { opacity: 0; transform: translateY(16px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .rv.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js .rv { opacity: 1; transform: none; }
  .card:hover { scale: none; }
}
