/* ==========================================================================
   Wimco – linjenätet
   Kall perrongvit + skyltmarin. Linjefärger som roller:
   O/Analys = signalorange, H = blå, W = grön, A = gul.
   ========================================================================== */

@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo-var.woff2") format("woff2");
  font-weight: 400 850;
  font-stretch: 100% 125%;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/fonts/jetbrains-mono-var.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
/* Metrikjusterad reservfont minskar layoutskift medan Archivo laddas */
@font-face {
  font-family: "Archivo Fallback";
  src: local("Arial");
  size-adjust: 104%;
  ascent-override: 88%;
  descent-override: 21%;
}

:root {
  --paper: #F3F5F4;
  --paper-2: #E7ECEA;
  --white: #FFFFFF;
  --ink: #0B1B33;
  --ink-2: #33425A;
  --ink-3: #56647A;
  --rule: rgba(11, 27, 51, 0.14);
  --rule-strong: rgba(11, 27, 51, 0.28);
  --navy: #0B1B33;
  --navy-2: #142A4B;
  --on-navy: #F3F5F4;
  --on-navy-2: #AAB8CC;
  --signal: #FF5A1F;
  --signal-hover: #FF7440;
  --signal-ink: #B83A0B;
  --line-h: #1F5FD1;
  --line-w: #0A7A55;
  --line-a: #F5B700;
  --line-o: var(--signal);
  --pass: #0E8F62;
  --pass-ink: #0A7550;
  --warn: #F0A202;
  --warn-ink: #875700;
  --fail: #E0342A;
  --fail-ink: #B42318;

  --f-sans: "Archivo", "Archivo Fallback", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --wrap: 1320px;
  --gutter: clamp(16px, 4.2vw, 56px);
  --section: clamp(72px, 10vw, 150px);
  --r-s: 6px;
  --r-m: 12px;
  --r-l: 18px;
  --track: 8px;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);

  --shadow: 0 1px 2px rgba(11, 27, 51, 0.06), 0 12px 32px -12px rgba(11, 27, 51, 0.22);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  font-stretch: 102%;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  scrollbar-color: var(--ink-3) var(--paper-2);
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1.5px; text-underline-offset: 0.2em; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a, button, input, select, textarea, label, summary { touch-action: manipulation; -webkit-tap-highlight-color: rgba(255, 90, 31, 0.18); }
h1, h2, h3, h4 { margin: 0; font-weight: 750; line-height: 1.08; letter-spacing: -0.02em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; }
::selection { background: rgba(255, 90, 31, 0.28); color: var(--ink); }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 12px; top: -80px; z-index: 50;
  background: var(--navy); color: var(--on-navy); padding: 12px 16px; border-radius: var(--r-s);
  transition: transform 200ms var(--ease-out);
}
.skip:focus { transform: translateY(92px); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

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

/* ---------- Typografi ---------- */
.display {
  font-size: clamp(2.6rem, 7.1vw, 6rem);
  font-weight: 820;
  font-stretch: 116%;
  line-height: 0.95;
  letter-spacing: -0.035em;
  max-width: 13.5ch;
}
.h-xl { font-size: clamp(2rem, 4.6vw, 3.9rem); font-weight: 800; font-stretch: 114%; letter-spacing: -0.03em; line-height: 1.02; }
.h-lg { font-size: clamp(1.85rem, 3.6vw, 3rem); font-weight: 790; font-stretch: 112%; letter-spacing: -0.028em; }
.h-md { font-size: clamp(1.3rem, 2vw, 1.65rem); font-weight: 740; font-stretch: 108%; letter-spacing: -0.015em; }
.lead { font-size: clamp(1.12rem, 1.55vw, 1.35rem); line-height: 1.5; color: var(--ink-2); max-width: 54ch; }
.mono, .num { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }

/* ---------- Linjebadges ---------- */
.badge {
  display: inline-grid; place-items: center; flex: none;
  width: 1.7em; height: 1.7em; border-radius: var(--r-s);
  font-family: var(--f-sans); font-size: 0.82em; font-weight: 820; font-stretch: 100%;
  letter-spacing: 0; line-height: 1; color: var(--white); vertical-align: 0.1em;
}
.badge-h { background: var(--line-h); }
.badge-w { background: var(--line-w); }
.badge-a { background: var(--line-a); color: var(--navy); }
.badge-o { background: var(--line-o); color: var(--navy); }

.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px;
  background: var(--navy); color: var(--on-navy);
  font-size: 0.8rem; font-weight: 650; font-stretch: 104%;
}
.tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--signal); }

/* ---------- Knappar och länkar ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 22px; border-radius: var(--r-m);
  border: 2px solid transparent;
  font-weight: 700; font-stretch: 108%; font-size: 1rem; line-height: 1.1; text-decoration: none;
  cursor: pointer; white-space: nowrap;
  transition: transform 160ms var(--ease-out), background-color 200ms ease, color 200ms ease, border-color 200ms ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }
.btn.is-busy[disabled] { opacity: 1; cursor: progress; }
.btn-signal { background: var(--signal); color: var(--navy); }
.btn-ink { background: var(--navy); color: var(--on-navy); }
.btn-line { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn-ghost-light { border-color: rgba(243, 245, 244, 0.5); color: var(--on-navy); background: transparent; }
.btn-sm { min-height: 44px; padding: 0 16px; font-size: 0.94rem; }
.btn-block { width: 100%; }
@media (hover: hover) and (pointer: fine) {
  .btn-signal:hover { background: var(--signal-hover); }
  .btn-ink:hover { background: var(--navy-2); }
  .btn-line:hover { background: var(--navy); color: var(--on-navy); }
  .btn-ghost-light:hover { border-color: var(--on-navy); }
  .link-arrow:hover::after { transform: translateX(4px); }
}
.btn.is-busy .btn-label { opacity: 0.7; }
.btn .spinner { width: 16px; height: 16px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: spin 700ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  font-weight: 700; font-stretch: 106%; color: var(--ink); text-decoration: underline; text-decoration-color: var(--signal);
}
.link-arrow::after {
  content: ""; width: 14px; height: 10px; flex: none;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 10'%3E%3Cpath d='M9 1l4 4-4 4M13 5H1' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 10'%3E%3Cpath d='M9 1l4 4-4 4M13 5H1' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform 200ms var(--ease-out);
}
.linklike { background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 0.2em; min-height: 44px; }

/* ---------- Header ---------- */
.site-header { position: relative; z-index: 20; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 84px; }
.logo {
  font-size: 1.6rem; font-weight: 830; font-stretch: 118%; letter-spacing: -0.03em;
  text-decoration: none; color: var(--ink); line-height: 1; display: inline-flex; align-items: baseline; min-height: 44px; align-items: center;
}
.logo-dot { color: var(--signal); }
.logo-light { color: var(--on-navy); }
.nav-list { display: flex; align-items: center; gap: clamp(12px, 2vw, 30px); list-style: none; }
.nav-list a:not(.btn) {
  display: inline-flex; align-items: center; min-height: 44px;
  font-weight: 620; font-stretch: 106%; text-decoration: none; color: var(--ink-2);
  background: linear-gradient(var(--signal), var(--signal)) 0 calc(100% - 8px) / 0 2px no-repeat;
  transition: background-size 240ms var(--ease-out), color 200ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .nav-list a:not(.btn):hover { background-size: 100% 2px; color: var(--ink); }
}
.nav-list a[aria-current="page"] { color: var(--ink); background-size: 100% 2px; }
.nav-toggle { display: none; }

@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px;
    border: 2px solid var(--navy); border-radius: var(--r-m); background: transparent; font-weight: 700;
  }
  .nav-toggle-bars { position: relative; width: 18px; height: 2px; background: currentColor; transition: background-color 150ms ease; }
  .nav-toggle-bars::before, .nav-toggle-bars::after {
    content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: currentColor;
    transition: transform 220ms var(--ease-out);
  }
  .nav-toggle-bars::before { transform: translateY(-6px); }
  .nav-toggle-bars::after { transform: translateY(6px); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: rotate(-45deg); }
  .nav-list {
    position: absolute; left: var(--gutter); right: var(--gutter); top: 76px;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--navy); color: var(--on-navy); border-radius: var(--r-l); padding: 10px 18px 18px;
    box-shadow: var(--shadow);
    transform-origin: top right;
    transition: opacity 180ms var(--ease-out), transform 220ms var(--ease-out), visibility 0s linear 220ms;
    opacity: 0; transform: translateY(-6px) scale(0.98); visibility: hidden;
  }
  .nav-list.is-open { opacity: 1; transform: none; visibility: visible; transition: opacity 180ms var(--ease-out), transform 220ms var(--ease-out); }
  .nav-list li { border-bottom: 1px solid rgba(243, 245, 244, 0.12); }
  .nav-list li:last-child { border-bottom: 0; padding-top: 14px; }
  .nav-list a:not(.btn) { color: var(--on-navy); width: 100%; min-height: 52px; font-size: 1.1rem; background: none; }
  .nav-list .btn-line { width: 100%; border-color: var(--signal); background: var(--signal); color: var(--navy); }
}

/* ---------- Sektioner ---------- */
.section { padding-block: var(--section); }
.section-head { display: grid; gap: 18px; max-width: 760px; margin-bottom: clamp(36px, 5vw, 64px); }
.section-lead { color: var(--ink-2); font-size: clamp(1.05rem, 1.3vw, 1.2rem); max-width: 60ch; }

/* ==========================================================================
   Hero + scanner
   ========================================================================== */
.hero { padding-top: clamp(20px, 3.6vw, 56px); padding-bottom: clamp(56px, 8vw, 110px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); }
.hero-title { font-size: clamp(2.5rem, 4.9vw, 4.8rem); max-width: 24ch; }
.hero-side {
  display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); gap: 16px clamp(28px, 4vw, 64px);
  align-items: end; margin-top: clamp(20px, 2.6vw, 34px);
}
.hero-side .lead { grid-column: 2; grid-row: 1; font-size: clamp(1.05rem, 1.3vw, 1.2rem); padding-bottom: 40px; }
.hero-side .scan-form { grid-column: 1; grid-row: 1; }
@media (max-width: 960px) {
  .hero-side { grid-template-columns: 1fr; }
  .hero-side .lead, .hero-side .scan-form { grid-column: 1; grid-row: auto; padding-bottom: 0; }
  .hero-side .lead { order: -1; }
}

.scan-form { position: relative; max-width: 980px; }
.scan-label {
  display: block; margin-bottom: 10px;
  font-weight: 700; font-stretch: 106%; font-size: 0.95rem; color: var(--ink-2);
}
.scan-field {
  display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px;
  padding: 8px; border-radius: var(--r-l);
  background: var(--navy);
  box-shadow: var(--shadow);
  transition: box-shadow 200ms ease;
}
.scan-field:focus-within { box-shadow: 0 0 0 4px rgba(255, 90, 31, 0.35), var(--shadow); }
.scan-field input {
  flex: 1 1 240px; min-width: 0; min-height: 60px; padding: 0 16px;
  border: 0; outline: 0; background: transparent; color: var(--on-navy);
  font-size: clamp(1.2rem, 2.1vw, 1.65rem); font-weight: 600; font-stretch: 104%;
  caret-color: var(--signal);
}
.scan-field input::placeholder { color: #B7C3D4; }
.scan-field input:focus-visible { outline: none; }
.scan-submit { flex: 1 1 auto; min-height: 60px; padding: 0 24px; font-size: 1.05rem; border-radius: calc(var(--r-l) - 6px); }
.scan-field[aria-invalid="true"], .scan-form.has-error .scan-field { box-shadow: 0 0 0 3px var(--fail), var(--shadow); }
.field-error { margin-top: 10px; color: var(--fail-ink); font-weight: 650; }
.scan-micro { margin-top: 12px; color: var(--ink-2); font-size: 0.97rem; }
.scan-micro a { font-weight: 700; }
.scan-or { color: var(--ink-3); margin-left: 6px; }

@media (max-width: 640px) {
  .scan-field { flex-direction: column; padding: 6px; }
  .scan-field input { flex: none; min-height: 58px; }
  .scan-submit { flex: none; width: 100%; }
  .scan-or { display: block; margin: 4px 0 0; }
}

/* ---------- Linjekartan ---------- */
.linemap { margin: clamp(36px, 4.4vw, 60px) 0 0; }
.linemap-caption { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; font-weight: 650; font-stretch: 104%; color: var(--ink-2); }
.linemap[data-mode="live"] .tag { background: var(--signal); color: var(--navy); }
.linemap[data-mode="live"] .tag::before { background: var(--navy); animation: blink 1s steps(2, jump-none) infinite; }
.linemap[data-mode="done"] .tag { background: var(--pass); color: var(--white); }
.linemap[data-mode="done"] .tag::before { background: var(--white); animation: none; }
@keyframes blink { 50% { opacity: 0.2; } }

.linemap-track {
  --dot: 26px;
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1fr) 290px;
  align-items: start;
}
.stations {
  position: relative; list-style: none;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
}
/* stammen: grå under, orange fyllnad visar hur långt analysen kommit */
.stations::before, .stations::after {
  content: ""; position: absolute; left: calc(var(--dot) / 2); right: 0;
  top: calc(var(--dot) / 2 - var(--track) / 2); height: var(--track); border-radius: var(--track);
}
.stations::before { background: var(--signal); }
.linemap[data-mode="live"] .stations::before, .linemap[data-mode="error"] .stations::before { background: var(--rule-strong); }
.stations::after {
  background: var(--signal); transform-origin: left center; transform: scaleX(var(--progress, 0));
  transition: transform 700ms var(--ease-in-out); opacity: 0;
}
.linemap[data-mode="live"] .stations::after, .linemap[data-mode="error"] .stations::after { opacity: 1; }

.station { position: relative; display: grid; gap: 6px; padding-right: 14px; z-index: 1; }
.st-dot {
  width: var(--dot); height: var(--dot); border-radius: 50%;
  background: var(--paper); border: 6px solid var(--navy);
  transition: background-color 240ms ease, border-color 240ms ease, transform 240ms var(--ease-out);
  position: relative;
}
.st-dot::after {
  content: ""; position: absolute; inset: -10px; border-radius: 50%;
  border: 2px solid var(--signal); opacity: 0; transform: scale(0.7);
}
.st-name { margin-top: 10px; font-weight: 740; font-stretch: 106%; font-size: 1.02rem; line-height: 1.2; }
.st-note { font-family: var(--f-mono); font-size: 0.78rem; line-height: 1.45; color: var(--ink-3); min-height: 2.9em; }
.station.is-active .st-dot { border-color: var(--signal); transform: scale(1.08); }
.station.is-active .st-dot::after { animation: ping 1.2s var(--ease-out) infinite; }
.station.is-done .st-dot { background: var(--signal); border-color: var(--navy); }
.station.is-limited .st-dot { background: var(--paper); border-color: var(--warn); }
.station.is-error .st-dot { background: var(--paper); border-color: var(--fail); }
.station.v-pass .st-dot { background: var(--pass); }
.station.v-warn .st-dot { background: conic-gradient(var(--warn) 0 50%, var(--paper) 0); }
.station.v-fail .st-dot { background: var(--fail); }
.station.v-fail .st-dot::before { content: ""; position: absolute; left: 1px; right: 1px; top: 50%; height: 3px; margin-top: -1.5px; background: var(--white); border-radius: 1px; }
.st-verdict { font-family: var(--f-mono); font-size: 0.78rem; font-weight: 700; }
.st-note.is-desc { font-family: var(--f-sans); font-size: 0.86rem; }
.station.is-done .st-note, .station.is-limited .st-note { color: var(--ink); }
.station.is-limited .st-note { color: var(--warn-ink); }
@keyframes ping { 0% { opacity: 0.9; transform: scale(0.7); } 100% { opacity: 0; transform: scale(1.35); } }

.train {
  position: absolute; left: 0; top: calc(var(--dot) / 2 - 9px); z-index: 2;
  width: 42px; height: 18px; border-radius: 9px;
  background: var(--navy);
  box-shadow: inset 7px 0 0 -3px var(--paper), inset -7px 0 0 -3px var(--paper);
  transform: translateX(var(--train-x, -60px)); opacity: 0;
  transition: transform 900ms var(--ease-in-out), opacity 200ms ease;
  pointer-events: none;
}
.train::before, .train::after { content: ""; position: absolute; top: 5px; width: 8px; height: 8px; border-radius: 2px; background: var(--signal); }
.train::before { left: 10px; }
.train::after { right: 10px; }
.linemap.has-train .train { opacity: 1; }

/* Bytespunkt: stammen slutar i en bytesring där tjänstelinjerna grenar av i 45° */
.branches { position: relative; min-height: 132px; }
.branch-lines { position: absolute; left: 0; top: -44px; width: 112px; height: 176px; overflow: visible; }
.bl { fill: none; stroke-width: var(--track); stroke-linecap: round; stroke-linejoin: round; transition: opacity 240ms ease; }
.bl-h { stroke: var(--line-h); }
.bl-o { stroke: var(--line-o); }
.bl-w { stroke: var(--line-w); }
.bl-a { stroke: var(--line-a); }
.bl-ring { fill: var(--paper); stroke: var(--navy); stroke-width: 6; }
.bl-ring-inner { fill: var(--navy); }
.branch {
  position: absolute; left: 120px; display: flex; align-items: center; gap: 10px; white-space: nowrap;
  min-height: 44px; transform: translateY(-50%);
  font-weight: 700; font-stretch: 106%; text-decoration: none; color: var(--ink);
  transition: opacity 240ms ease;
}
.branch-o { top: -31px; }
.branch-h { top: 13px; }
.branch-w { top: 57px; }
.branch-a { top: 101px; }
.branch .badge { font-size: 0.92rem; }
.branch .branch-hint { font-weight: 600; font-size: 0.82rem; color: var(--signal-ink); }
@media (hover: hover) and (pointer: fine) {
  .branch:hover { text-decoration: underline; text-decoration-color: var(--signal); }
}
.branches.has-focus .bl, .branches.has-focus .branch .badge { opacity: 0.3; }
.branches.has-focus .branch { color: var(--ink-3); font-weight: 600; }
.branches.has-focus .bl.is-hot, .branches.has-focus .branch.is-hot .badge { opacity: 1; }
.branches.has-focus .branch.is-hot { color: var(--ink); font-weight: 750; }

@media (max-width: 860px) {
  .linemap-track { grid-template-columns: 1fr; }
  .stations { grid-template-columns: 1fr; gap: 18px; }
  .stations::before, .stations::after {
    left: calc(var(--dot) / 2 - var(--track) / 2); right: auto; width: var(--track);
    top: calc(var(--dot) / 2); bottom: -65px; height: auto;
  }
  .stations::after { transform-origin: center top; transform: scaleY(var(--progress, 0)); }
  .station { grid-template-columns: var(--dot) 1fr; column-gap: 16px; row-gap: 2px; padding-right: 0; }
  .st-dot { grid-row: 1 / span 2; }
  .st-name { margin-top: 1px; }
  .st-note { min-height: 0; }
  .train { display: none; }
  .branches { margin-top: 52px; }
}

/* ---------- Status och resultat i heron ---------- */
.scan-notice {
  margin-top: 28px; max-width: 760px;
  display: grid; gap: 12px; padding: 20px 22px;
  border-radius: var(--r-m); background: var(--white); border: 2px solid var(--rule);
}
.scan-notice h2 { font-size: 1.2rem; font-weight: 760; }
.scan-notice p { color: var(--ink-2); }
.scan-notice.is-error { border-color: var(--fail); }
.scan-notice.is-warn { border-color: var(--warn); }
.scan-notice .notice-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }

.scan-result {
  margin-top: clamp(28px, 4vw, 44px);
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(22px, 4vw, 56px); align-items: start;
  padding: clamp(22px, 3.4vw, 40px); border-radius: var(--r-l);
  background: var(--white); border: 2px solid var(--navy);
}
.sr-score { display: grid; justify-items: start; gap: 6px; }
.sr-num { font-size: clamp(4.5rem, 10vw, 8rem); font-weight: 840; font-stretch: 112%; line-height: 0.85; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.sr-of { font-family: var(--f-mono); color: var(--ink-3); font-size: 1rem; }
.sr-grade { display: inline-flex; margin-top: 6px; }
.sr-body { display: grid; gap: 16px; min-width: 0; }
.sr-body h2 { font-size: clamp(1.4rem, 2.4vw, 2rem); overflow-wrap: anywhere; }
.sr-top { list-style: none; display: grid; gap: 10px; }
.sr-top li { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; }
.sr-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.sr-dev { color: var(--warn-ink); font-weight: 650; }
@media (max-width: 640px) { .scan-result { grid-template-columns: 1fr; } }

/* Statusmarkörer (färg + form + text) */
.mark { display: inline-block; width: 18px; height: 18px; border-radius: 50%; flex: none; margin-top: 3px; position: relative; }
.mark-fail { background: var(--fail); }
.mark-fail::after { content: ""; position: absolute; left: 4px; top: 7.5px; width: 10px; height: 3px; border-radius: 1px; background: var(--white); }
.mark-warn { background: conic-gradient(var(--warn) 0 50%, transparent 0); border: 3px solid var(--warn); }
.mark-pass { border: 3px solid var(--pass); }
.mark-pass::after { content: ""; position: absolute; left: 3px; top: 1px; width: 5px; height: 9px; border: solid var(--pass); border-width: 0 2.5px 2.5px 0; transform: rotate(40deg); }
.mark-info { border: 3px solid var(--ink-3); }

/* ==========================================================================
   Fakta-band
   ========================================================================== */
.facts { background: var(--navy); color: var(--on-navy); }
.facts-list { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.facts-list li { display: grid; gap: 4px; padding: 28px 24px 30px 0; margin-right: 24px; border-right: 1px solid rgba(243, 245, 244, 0.14); }
.facts-list li:last-child { border-right: 0; margin-right: 0; }
.facts-list strong { font-weight: 740; font-stretch: 108%; font-size: 1.08rem; }
.facts-list span { color: var(--on-navy-2); font-size: 0.97rem; }
@media (max-width: 960px) {
  .facts-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts-list li:nth-child(2) { border-right: 0; margin-right: 0; }
  .facts-list li:nth-child(-n+2) { border-bottom: 1px solid rgba(243, 245, 244, 0.14); }
}
@media (max-width: 560px) {
  .facts-list { column-gap: 16px; }
  .facts-list li { padding: 18px 0; margin-right: 0; border-right: 0; }
  .facts-list strong { font-size: 0.98rem; }
  .facts-list span { font-size: 0.88rem; }
}

/* ==========================================================================
   Vad Wimco bygger
   ========================================================================== */
.builds-statement { display: grid; gap: clamp(10px, 1.5vw, 18px); }
.bs-line { display: flex; gap: 0.45em; align-items: baseline; }
.bs-line .badge { font-size: 0.5em; transform: translateY(-0.28em); }
.builds-foot { margin-top: clamp(28px, 4vw, 48px); max-width: 62ch; color: var(--ink-2); font-size: clamp(1.05rem, 1.3vw, 1.2rem); }

/* ==========================================================================
   Wimco Score – förhandsvisning
   ========================================================================== */
.score-preview { background: var(--white); }
.sp { border-top: 2px solid var(--navy); padding-top: 28px; }
.sp-line { position: relative; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.sp-stop::before {
  content: ""; position: absolute; left: 14px; width: 100%; top: 10px; height: var(--track);
  background: var(--navy);
}
.sp-stop:last-child::before { display: none; }
.sp-dot, .sp-name, .sp-w { position: relative; }
.sp-stop {
  position: relative; display: grid; justify-items: start; gap: 6px; text-align: left;
  padding: 0 8px 14px 0; min-height: 44px; background: none; border: 0; border-radius: var(--r-s);
}
.sp-dot { width: 28px; height: 28px; border-radius: 50%; background: var(--white); border: 6px solid var(--navy); transition: background-color 200ms ease, transform 200ms var(--ease-out); }
.sp-name { margin-top: 6px; font-weight: 700; font-stretch: 106%; line-height: 1.2; }
.sp-w { font-family: var(--f-mono); font-size: 0.8rem; color: var(--ink-3); }
.sp-stop[aria-selected="true"] .sp-dot { background: var(--signal); transform: scale(1.12); }
.sp-stop[aria-selected="true"] .sp-name { text-decoration: underline; text-decoration-color: var(--signal); text-decoration-thickness: 3px; text-underline-offset: 6px; }
@media (hover: hover) and (pointer: fine) { .sp-stop:hover .sp-dot { background: var(--paper-2); } .sp-stop[aria-selected="true"]:hover .sp-dot { background: var(--signal); } }
.sp-panel {
  margin-top: 26px; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px);
  padding: clamp(22px, 3vw, 36px); border-radius: var(--r-l); background: var(--paper);
}
.sp-panel .sp-title { font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 780; font-stretch: 110%; margin-bottom: 12px; }
.sp-panel p { color: var(--ink-2); max-width: 58ch; }
.sp-checks { list-style: none; display: grid; gap: 10px; }
.sp-checks li { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: baseline; }
.src {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  padding: 2px 9px; border-radius: 999px; font-size: 0.76rem; font-weight: 700; font-stretch: 104%; white-space: nowrap;
  border: 1.5px solid currentColor;
}
.src-measured { color: var(--line-h); }
.src-rules { color: var(--ink-2); }
.src-heuristic { color: var(--warn-ink); }
.src-ai { color: var(--pass-ink); }
.src-mixed { color: var(--ink-2); }
.sp-panel.is-swapping { animation: swapIn 220ms var(--ease-out); }
@keyframes swapIn { from { opacity: 0.2; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.sp-cta { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; }
@media (max-width: 860px) {
  .sp-line { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 20px; }
  .sp-stop:nth-child(3)::before { display: none; }
  .sp-panel { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .sp-line { grid-template-columns: 1fr; row-gap: 0; }
  .sp-stop { grid-template-columns: 28px 1fr auto; align-items: center; column-gap: 14px; padding: 6px 0; min-height: 48px; }
  .sp-stop::before { left: 10px; top: 34px; width: var(--track); height: calc(100% - 20px); }
  .sp-stop:nth-child(3)::before { display: block; }
  .sp-stop:last-child::before { display: none; }
  .sp-name { margin-top: 0; }
}

/* ==========================================================================
   Tjänster – växeln
   ========================================================================== */
.sw-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 26px; }
.sw-tab {
  display: inline-flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 20px 0 12px;
  border-radius: var(--r-m); border: 2px solid var(--rule-strong); background: transparent;
  font-weight: 720; font-stretch: 108%; font-size: 1.05rem;
  transition: border-color 200ms ease, background-color 200ms ease, transform 160ms var(--ease-out);
}
.sw-tab .badge { font-size: 1rem; }
.sw-tab:active { transform: scale(0.97); }
.sw-tab[aria-selected="true"] { border-color: var(--navy); background: var(--navy); color: var(--on-navy); }
@media (hover: hover) and (pointer: fine) { .sw-tab:hover { border-color: var(--navy); } }

.sw-panel {
  --line: var(--line-h);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 80px);
  padding: clamp(20px, 3vw, 36px) 0 0; border-top: 2px solid var(--navy);
}
.sw-panel[data-line="w"] { --line: var(--line-w); }
.sw-panel[data-line="a"] { --line: var(--line-a); }
.sw-panel[data-line="o"] { --line: var(--line-o); }
.sw-panel.is-entering { animation: swapIn 240ms var(--ease-out); }
.sw-copy { display: grid; gap: 18px; align-content: start; justify-items: start; }
.sw-copy p { color: var(--ink-2); max-width: 52ch; }
.sw-route { list-style: none; position: relative; display: grid; gap: 16px; padding-left: 44px; }
.sw-route::before {
  content: ""; position: absolute; left: 11px; top: 10px; bottom: 10px; width: var(--track); border-radius: var(--track); background: var(--line);
}
.sw-route li { position: relative; font-weight: 680; font-stretch: 105%; font-size: 1.08rem; line-height: 1.35; min-height: 30px; display: flex; align-items: center; }
.sw-route li::before {
  content: ""; position: absolute; left: -44px; top: 50%; width: 30px; height: 30px; margin-top: -15px;
  border-radius: 50%; background: var(--paper); border: 6px solid var(--navy); box-sizing: border-box;
}
@media (max-width: 800px) { .sw-panel { grid-template-columns: 1fr; } .sw-tab { flex: 1 1 calc(50% - 10px); } }
@media (max-width: 380px) { .sw-tab { flex-basis: 100%; } }

/* ==========================================================================
   Byggt i studion
   ========================================================================== */
.work-grid { display: grid; gap: clamp(48px, 7vw, 96px); }
.work-item { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 72px); align-items: center; }
.work-item:nth-child(even) .work-visual { order: 2; }
.work-copy { display: grid; gap: 16px; justify-items: start; }
.work-copy p { color: var(--ink-2); max-width: 56ch; }
.work-tags { display: inline-flex; align-items: center; gap: 10px; font-weight: 650; color: var(--ink-3) !important; font-size: 0.95rem; }
.work-visual { border-radius: var(--r-l); overflow: hidden; aspect-ratio: 16 / 10; display: block; }
.work-score .work-visual { background: var(--navy); position: relative; display: grid; place-items: center; }
.work-shot img { width: 100%; height: 100%; object-fit: cover; }
.work-shot { background: var(--paper-2); box-shadow: var(--shadow); }
.mini-map { position: absolute; left: 10%; right: 10%; top: 58%; height: 10px; border-radius: 5px; background: var(--signal); display: flex; justify-content: space-between; align-items: center; }
.mini-map span { width: 30px; height: 30px; border-radius: 50%; background: var(--signal); border: 7px solid var(--paper); }
.mini-map span:nth-child(-n+3) { background: var(--navy); }
.mini-score { position: absolute; left: 10%; top: 18%; font-weight: 840; font-stretch: 118%; font-size: clamp(2.6rem, 6vw, 5rem); color: var(--on-navy); letter-spacing: -0.04em; line-height: 1; }
@media (max-width: 800px) { .work-item { grid-template-columns: 1fr; } .work-item:nth-child(even) .work-visual { order: 0; } }

/* ==========================================================================
   Arbetssätt
   ========================================================================== */
.process { background: var(--white); }
.process-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(36px, 6vw, 96px); align-items: start; }
.process-line { list-style: none; counter-reset: stop; position: relative; display: grid; gap: 30px; margin-top: 36px; padding-left: 58px; }
.process-line::before { content: ""; position: absolute; left: 15px; top: 16px; bottom: 16px; width: var(--track); border-radius: var(--track); background: var(--signal); }
.process-line li { position: relative; counter-increment: stop; display: grid; gap: 6px; }
.process-line li::before {
  content: counter(stop); position: absolute; left: -58px; top: -2px; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; background: var(--white); border: 6px solid var(--navy);
  font-family: var(--f-mono); font-size: 0.85rem; font-weight: 700;
}
.process-line h3 { font-size: 1.25rem; font-weight: 740; font-stretch: 108%; }
.process-line p { color: var(--ink-2); max-width: 54ch; }
.founder { display: grid; gap: 14px; padding: clamp(24px, 3vw, 36px); border-radius: var(--r-l); background: var(--paper); position: sticky; top: 24px; }
.founder p { color: var(--ink-2); }
.founder-contact { display: flex; flex-wrap: wrap; gap: 6px 18px; font-weight: 700; }
.founder-contact a { min-height: 44px; display: inline-flex; align-items: center; }
@media (max-width: 860px) { .process-grid { grid-template-columns: 1fr; } .founder { position: static; } }

/* ==========================================================================
   Automation – flöde
   ========================================================================== */
.automation { background: var(--navy); color: var(--on-navy); }
.automation .section-lead { color: var(--on-navy-2); }
.flow { margin: 0; }
.flow-line { list-style: none; position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; padding-top: 52px; }
.flow-line::before { content: ""; position: absolute; left: 14px; right: 14px; top: 11px; height: var(--track); border-radius: var(--track); background: var(--line-a); }
.flow-line::after {
  content: ""; position: absolute; top: 5px; left: 0; width: 20px; height: 20px; border-radius: 50%;
  background: var(--signal); box-shadow: 0 0 0 5px var(--navy);
  opacity: 0; transform: translateX(0);
}
.flow.is-running .flow-line::after { opacity: 1; animation: packet 4.8s var(--ease-in-out) 1 both; }
@keyframes packet {
  0% { transform: translateX(4px); opacity: 0; }
  6% { opacity: 1; }
  30% { transform: translateX(calc(var(--flow-w, 900px) * 0.333)); }
  36% { transform: translateX(calc(var(--flow-w, 900px) * 0.333)); }
  60% { transform: translateX(calc(var(--flow-w, 900px) * 0.666)); }
  66% { transform: translateX(calc(var(--flow-w, 900px) * 0.666)); }
  90% { transform: translateX(calc(var(--flow-w, 900px) - 24px)); opacity: 1; }
  100% { transform: translateX(calc(var(--flow-w, 900px) - 24px)); opacity: 0; }
}
.flow-line li { position: relative; display: grid; gap: 8px; align-content: start; }
.flow-line li::before {
  content: ""; position: absolute; top: -52px; left: 0; width: 30px; height: 30px; border-radius: 50%;
  background: var(--navy); border: 6px solid var(--on-navy); box-sizing: border-box;
}
.flow-t { font-family: var(--f-mono); font-size: 0.82rem; color: var(--line-a); }
.flow-line h3 { font-size: 1.18rem; font-weight: 740; font-stretch: 108%; }
.flow-line p { color: var(--on-navy-2); }
.automation-more { margin-top: clamp(40px, 5vw, 64px); display: flex; flex-wrap: wrap; gap: 24px 48px; align-items: center; justify-content: space-between; }
.automation-more p { max-width: 64ch; color: var(--on-navy-2); }
.automation .btn-ink { background: var(--line-a); color: var(--navy); }
@media (hover: hover) and (pointer: fine) { .automation .btn-ink:hover { background: #FFC933; } }
@media (max-width: 860px) {
  .flow-line { grid-template-columns: 1fr; padding-top: 0; padding-left: 52px; gap: 28px; }
  .flow-line::before { left: 11px; right: auto; top: 14px; bottom: 14px; width: var(--track); height: auto; }
  .flow-line::after { display: none; }
  .flow-line li::before { top: 0; left: -52px; }
}

/* ==========================================================================
   Affärsvärde, FAQ
   ========================================================================== */
.value-title { max-width: 20ch; margin-bottom: clamp(36px, 5vw, 64px); }
.value-line { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.value-line li { position: relative; display: grid; gap: 10px; align-content: start; padding-top: 52px; }
.value-line li::before { content: ""; position: absolute; top: 11px; left: 14px; right: -28px; height: var(--track); background: var(--line-h); }
.value-line li:nth-child(2)::before { background: var(--signal); }
.value-line li:nth-child(3)::before { background: var(--line-a); }
.value-line li:last-child::before { right: 14px; background: var(--line-w); border-radius: 0 var(--track) var(--track) 0; }
.value-line li::after { content: ""; position: absolute; top: 0; left: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--paper); border: 6px solid var(--navy); box-sizing: border-box; }
.value-line h3 { font-size: 1.2rem; font-weight: 740; font-stretch: 108%; }
.value-line p { color: var(--ink-2); }
@media (max-width: 900px) {
  .value-line { grid-template-columns: 1fr; gap: 28px; }
  .value-line li { padding: 0 0 0 52px; }
  .value-line li::before { top: 14px; bottom: -42px; left: 11px; right: auto; width: var(--track); height: auto; }
  .value-line li:last-child::before { display: none; }
}

.faq { background: var(--white); }
.faq-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.5fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.faq-list { border-top: 2px solid var(--navy); }
.faq-list details { border-bottom: 1px solid var(--rule-strong); }
.faq-list summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 20px; align-items: center;
  min-height: 64px; padding: 16px 0; font-weight: 700; font-stretch: 106%; font-size: 1.1rem;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: ""; flex: none; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--navy);
  background:
    linear-gradient(var(--navy), var(--navy)) center / 12px 2px no-repeat,
    linear-gradient(var(--navy), var(--navy)) center / 2px 12px no-repeat;
  transition: transform 220ms var(--ease-out), background-color 200ms ease;
}
.faq-list details[open] summary::after { transform: rotate(45deg); background-color: var(--signal); }
.faq-list details p { padding: 0 0 22px; color: var(--ink-2); max-width: 64ch; }
@media (max-width: 900px) { .faq-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   Avslutande val + formulär
   ========================================================================== */
.finale-title { margin-bottom: clamp(32px, 4vw, 56px); }
.finale-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 20px; align-items: start; }
.finale-path { display: grid; gap: 16px; align-content: start; padding: clamp(24px, 3.4vw, 44px); border-radius: var(--r-l); }
.finale-path h3 { display: flex; align-items: center; gap: 12px; }
.finale-analyze { background: var(--navy); color: var(--on-navy); }
.finale-analyze p { color: var(--on-navy-2); }
.finale-analyze label { color: var(--on-navy-2); font-weight: 650; }
.finale-project { background: var(--white); border: 2px solid var(--navy); }
.finale-project > p { color: var(--ink-2); }
.mini-scan { display: grid; gap: 10px; margin-top: 8px; }
.mini-field { display: flex; gap: 8px; flex-wrap: wrap; }
.mini-field input {
  flex: 1 1 220px; min-height: 54px; padding: 0 16px; border-radius: var(--r-m);
  border: 2px solid rgba(243, 245, 244, 0.35); background: var(--navy-2); color: var(--on-navy); font-size: 1.1rem;
}
.mini-field input::placeholder { color: #B7C3D4; }
.mini-field input:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; border-color: transparent; }
@media (max-width: 900px) { .finale-grid { grid-template-columns: 1fr; } }

.lead-form { display: grid; gap: 18px; margin-top: 6px; }
.field { display: grid; gap: 8px; min-width: 0; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.field label, .chips legend { font-weight: 700; font-stretch: 104%; font-size: 0.95rem; }
.opt { font-weight: 500; color: var(--ink-3); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 50px; padding: 12px 14px; border-radius: var(--r-m);
  border: 1.5px solid var(--rule-strong); background: var(--white); color: var(--ink); font-size: 1rem;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.field textarea { resize: vertical; min-height: 120px; line-height: 1.5; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: none; border-color: var(--navy); box-shadow: 0 0 0 4px rgba(255, 90, 31, 0.3);
}
.field [aria-invalid="true"] { border-color: var(--fail); }
.field .field-error { margin-top: 0; font-size: 0.92rem; }
.chips { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips legend { margin-bottom: 10px; padding: 0; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip > span {
  display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 14px 0 8px;
  border-radius: var(--r-m); border: 2px solid var(--rule-strong); font-weight: 680; font-stretch: 104%;
  transition: border-color 160ms ease, background-color 160ms ease;
}
.chip input:checked + span { border-color: var(--navy); background: var(--paper); box-shadow: inset 0 0 0 1px var(--navy); }
.chip input:focus-visible + span { outline: 3px solid var(--signal); outline-offset: 2px; }
.check { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; font-size: 0.97rem; }
.check input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--navy); }
.form-note { font-size: 0.92rem; color: var(--ink-3); }
.form-status { font-weight: 650; min-height: 1.5em; }
.form-status.is-ok { color: var(--pass-ink); }
.form-status.is-error { color: var(--fail-ink); }
.form-done { display: grid; gap: 10px; padding: 20px; border-radius: var(--r-m); background: var(--paper); border-left: 0; }
.form-done h4 { font-size: 1.2rem; }

/* ==========================================================================
   Footer + samtycke
   ========================================================================== */
.site-footer { background: var(--navy); color: var(--on-navy); padding-top: clamp(56px, 7vw, 96px); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 36px; }
.footer-brand { display: grid; gap: 14px; align-content: start; }
.footer-brand p { color: var(--on-navy-2); max-width: 36ch; }
.footer-h { font-size: 0.95rem; font-weight: 700; color: var(--on-navy-2); margin-bottom: 8px; letter-spacing: 0; }
.footer-col ul { list-style: none; display: grid; }
.footer-col a, .footer-col .linklike { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; font-weight: 600; color: var(--on-navy); }
@media (hover: hover) and (pointer: fine) { .footer-col a:hover, .footer-col .linklike:hover { text-decoration: underline; text-decoration-color: var(--signal); } }
.footer-bottom { margin-top: 48px; padding-block: 22px 30px; border-top: 1px solid rgba(243, 245, 244, 0.14); color: var(--on-navy-2); font-size: 0.92rem; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 420px) { .footer-grid { grid-template-columns: 1fr; } }

.consent {
  position: fixed; z-index: 40; left: 16px; bottom: 16px; max-width: 440px; width: calc(100% - 32px);
  display: grid; gap: 14px; padding: 18px 20px; border-radius: var(--r-l);
  background: var(--white); border: 2px solid var(--navy); box-shadow: var(--shadow);
  transition: opacity 200ms var(--ease-out), transform 240ms var(--ease-out);
}
@starting-style { .consent { opacity: 0; transform: translateY(12px); } }
.consent p { font-size: 0.95rem; color: var(--ink-2); }
.consent-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

/* ==========================================================================
   Rapportsidan
   ========================================================================== */
.report-wrap { padding-bottom: var(--section); }
.report-loading { padding-block: 80px; display: grid; gap: 14px; }
.report-head { padding-top: clamp(20px, 4vw, 56px); display: grid; gap: 16px; }
.report-host { font-size: clamp(1.9rem, 6vw, 5rem); overflow-wrap: break-word; font-weight: 830; font-stretch: 114%; letter-spacing: -0.035em; line-height: 0.98; overflow-wrap: anywhere; }
.report-meta { display: flex; flex-wrap: wrap; gap: 6px 22px; color: var(--ink-2); font-size: 0.97rem; }
.report-meta a { overflow-wrap: anywhere; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; font-size: 0.92rem; color: var(--ink-2); }
.dev-banner {
  display: grid; gap: 6px; padding: 16px 20px; border-radius: var(--r-m); font-weight: 600;
  background: repeating-linear-gradient(-45deg, #FFF4D6 0 14px, #FFEAB0 14px 28px); border: 2px solid var(--warn); color: var(--ink);
}
.dev-banner strong { font-size: 1.1rem; }

.scoreboard {
  margin-top: clamp(28px, 4vw, 48px);
  display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 300px); gap: clamp(24px, 4vw, 56px); align-items: start;
  padding: clamp(24px, 3.5vw, 44px); border-radius: var(--r-l); background: var(--navy); color: var(--on-navy);
}
.sb-num { font-size: clamp(5rem, 13vw, 10rem); font-weight: 850; font-stretch: 112%; line-height: 0.82; letter-spacing: -0.045em; font-variant-numeric: tabular-nums; }
.sb-of { font-family: var(--f-mono); color: var(--on-navy-2); margin-top: 10px; }
.sb-body { display: grid; gap: 14px; align-content: start; }
.sb-body .grade { font-size: clamp(1.4rem, 2.4vw, 2rem); font-weight: 780; font-stretch: 110%; color: var(--signal); }
.sb-body p { color: var(--on-navy-2); max-width: 56ch; }
.sb-compare { font-weight: 650; color: var(--on-navy) !important; }
.sb-shot { justify-self: end; width: 100%; max-width: 260px; }
.sb-shot figure { margin: 0; border-radius: 22px; padding: 8px; background: var(--navy-2); border: 2px solid rgba(243, 245, 244, 0.2); }
.sb-shot img { border-radius: 14px; width: 100%; }
.sb-shot figcaption { font-size: 0.8rem; color: var(--on-navy-2); margin-top: 8px; text-align: center; }
.how { margin-top: 6px; }
.how summary { cursor: pointer; font-weight: 700; color: var(--on-navy); min-height: 44px; display: inline-flex; align-items: center; text-decoration: underline; text-decoration-color: var(--signal); text-underline-offset: 0.25em; }
.how table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 0.92rem; }
.how th, .how td { text-align: left; padding: 7px 8px 7px 0; border-bottom: 1px solid rgba(243, 245, 244, 0.14); vertical-align: top; }
.how th { color: var(--on-navy-2); font-weight: 650; }
.how td.num { text-align: right; }
@media (max-width: 1000px) { .scoreboard { grid-template-columns: auto minmax(0, 1fr); } .sb-shot { grid-column: 1 / -1; justify-self: start; max-width: 220px; } }
@media (max-width: 560px) { .scoreboard { grid-template-columns: 1fr; } }

.catline { margin-top: clamp(32px, 4vw, 48px); position: relative; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); list-style: none; }
.catline li { position: relative; }
.catline li::before { content: ""; position: absolute; left: 15px; width: 100%; top: 11px; height: var(--track); background: var(--signal); }
.catline li:last-child::before { display: none; }
.catline a > * { position: relative; }
.catline a { position: relative; display: grid; justify-items: start; gap: 4px; text-decoration: none; padding: 0 8px 8px 0; min-height: 44px; }
.catline .cl-dot { width: 30px; height: 30px; border-radius: 50%; border: 6px solid var(--navy); background: var(--paper); }
.catline .cl-dot.b-pass { background: var(--pass); }
.catline .cl-dot.b-warn { background: var(--warn); }
.catline .cl-dot.b-fail { background: var(--fail); }
.catline .cl-name { margin-top: 6px; font-weight: 700; font-stretch: 105%; line-height: 1.2; font-size: 0.97rem; }
.catline .cl-score { font-family: var(--f-mono); font-size: 1.3rem; font-weight: 700; }
.catline .cl-score small { font-size: 0.75rem; color: var(--ink-3); font-weight: 500; }
@media (hover: hover) and (pointer: fine) { .catline a:hover .cl-name { text-decoration: underline; text-decoration-color: var(--signal); } }
@media (max-width: 860px) {
  .catline { grid-template-columns: 1fr; }
  .catline li::before { left: 11px; top: 30px; width: var(--track); height: 100%; }
  .catline a { grid-template-columns: 30px 1fr auto; align-items: center; column-gap: 14px; padding: 8px 0; }
  .catline .cl-name { margin-top: 0; }
}

.r-section { margin-top: clamp(56px, 8vw, 104px); }
.r-section > h2 { margin-bottom: 22px; }
.prio-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); margin-top: clamp(28px, 4vw, 44px); }
@media (max-width: 900px) { .prio-grid { grid-template-columns: 1fr; } }
.board { display: grid; gap: 0; border-top: 3px solid var(--navy); }
.board-title { display: flex; align-items: center; gap: 12px; font-size: 1.3rem; font-weight: 760; font-stretch: 108%; padding: 14px 0; }
.board-title .count { font-family: var(--f-mono); font-size: 0.9rem; color: var(--ink-3); font-weight: 500; }
.board-first { border-top-color: var(--fail); }
.finding { border-bottom: 1px solid var(--rule-strong); }
.finding summary {
  list-style: none; cursor: pointer; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 14px; align-items: start;
  padding: 16px 0; min-height: 56px;
}
.finding summary::-webkit-details-marker { display: none; }
.f-title { font-weight: 700; font-stretch: 104%; line-height: 1.3; }
.f-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; font-size: 0.86rem; color: var(--ink-3); }
.f-value { font-family: var(--f-mono); font-size: 0.86rem; color: var(--ink-2); white-space: nowrap; padding-top: 2px; }
.f-chev { width: 12px; height: 12px; border-right: 2.5px solid var(--ink-2); border-bottom: 2.5px solid var(--ink-2); transform: rotate(45deg); margin: 6px 6px 0 0; transition: transform 200ms var(--ease-out); }
.finding[open] .f-chev { transform: rotate(225deg); margin-top: 10px; }
.f-body { display: grid; gap: 12px; padding: 0 0 22px 32px; }
.f-body p { color: var(--ink-2); max-width: 64ch; }
.f-body dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.f-body dt { font-weight: 700; color: var(--ink); }
.f-body dd { margin: 0; color: var(--ink-2); }
.f-actions { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; }
.f-actions .btn { min-height: 44px; }
@media (max-width: 560px) { .f-body { padding-left: 0; } .f-body dl { grid-template-columns: 1fr; } .f-body dd { margin-bottom: 6px; } }
.board-good .finding summary { grid-template-columns: auto minmax(0, 1fr) auto; }

.cat-block { padding-top: clamp(28px, 4vw, 44px); margin-top: clamp(28px, 4vw, 44px); border-top: 3px solid var(--navy); scroll-margin-top: 24px; }
.cat-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 32px; align-items: end; }
.cat-head h3 { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 790; font-stretch: 112%; }
.cat-score { font-size: clamp(2.6rem, 5vw, 4rem); font-weight: 840; font-stretch: 112%; line-height: 0.9; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.cat-score small { font-family: var(--f-mono); font-size: 0.9rem; font-weight: 500; color: var(--ink-3); letter-spacing: 0; }
.cat-expl { margin-top: 10px; color: var(--ink-2); max-width: 62ch; }
.cat-parts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.cat-facts { margin: 26px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 40px; }
.cat-facts div { display: grid; gap: 4px; padding-top: 12px; border-top: 1px solid var(--rule-strong); }
.cat-facts dt { font-size: 0.88rem; font-weight: 700; color: var(--ink-3); }
.cat-facts dd { margin: 0; font-weight: 600; }
.cat-facts .span { grid-column: 1 / -1; }
.cat-ai { margin-top: 18px; padding: 16px 18px; border-radius: var(--r-m); background: var(--white); border: 1.5px dashed var(--pass); display: grid; gap: 6px; }
.cat-cta { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; }
.cat-checks { margin-top: 20px; }
.cat-checks > summary { cursor: pointer; font-weight: 700; min-height: 44px; display: inline-flex; align-items: center; text-decoration: underline; text-decoration-color: var(--signal); text-underline-offset: 0.25em; }
.cat-checks ul { list-style: none; margin-top: 10px; display: grid; gap: 0; }
.cat-checks li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--rule); align-items: start; }
.cat-checks li .src { justify-self: end; }
@media (max-width: 700px) { .cat-facts { grid-template-columns: 1fr; } .cat-head { grid-template-columns: 1fr; } .cat-checks li { grid-template-columns: auto minmax(0, 1fr); } .cat-checks li .src { grid-column: 2; justify-self: start; } }

.actions-panel { margin-top: clamp(56px, 8vw, 104px); padding: clamp(24px, 4vw, 52px); border-radius: var(--r-l); background: var(--navy); color: var(--on-navy); display: grid; gap: 24px; }
.actions-panel > p { color: var(--on-navy-2); max-width: 62ch; }
.action-tabs { display: flex; flex-wrap: wrap; gap: 10px; }
.action-tabs button {
  min-height: 48px; padding: 0 16px; border-radius: var(--r-m); border: 2px solid rgba(243, 245, 244, 0.35); background: transparent;
  color: var(--on-navy); font-weight: 700; font-stretch: 104%;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms var(--ease-out);
}
.action-tabs button:active { transform: scale(0.97); }
.action-tabs button[aria-pressed="true"] { background: var(--signal); border-color: var(--signal); color: var(--navy); }
@media (hover: hover) and (pointer: fine) { .action-tabs button:hover { border-color: var(--on-navy); } }
.action-body { background: var(--white); color: var(--ink); border-radius: var(--r-m); padding: clamp(20px, 3vw, 32px); }
.action-body h3 { font-size: 1.3rem; margin-bottom: 6px; }
.action-body > p { color: var(--ink-2); margin-bottom: 16px; }
.share-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.share-row input { flex: 1 1 260px; min-height: 50px; padding: 0 14px; border-radius: var(--r-m); border: 1.5px solid var(--rule-strong); font-family: var(--f-mono); font-size: 0.9rem; background: var(--paper); }
.visibility { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--rule); display: grid; gap: 10px; }

.method { margin-top: clamp(56px, 8vw, 96px); display: grid; gap: 12px; max-width: 76ch; color: var(--ink-2); font-size: 0.97rem; }
.method h2 { font-size: 1.3rem; color: var(--ink); }

/* ==========================================================================
   Guider och textsidor
   ========================================================================== */
.page-head { padding-block: clamp(28px, 5vw, 72px) clamp(24px, 3vw, 40px); display: grid; gap: 18px; }
.page-head .display { font-size: clamp(2.3rem, 5.6vw, 4.6rem); max-width: 18ch; }
.crumbs { display: flex; gap: 8px; flex-wrap: wrap; font-size: 0.92rem; color: var(--ink-3); }
.crumbs a { color: var(--ink-2); }
.prose { max-width: 70ch; font-size: 1.1rem; line-height: 1.7; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-top: 2.2em; font-weight: 780; font-stretch: 110%; }
.prose h3 { font-size: 1.25rem; margin-top: 1.8em; font-weight: 740; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 0.45em; }
.prose li::marker { color: var(--signal-ink); font-weight: 700; }
.prose a { font-weight: 650; text-decoration-color: var(--signal); }
.prose strong { font-weight: 720; }
.prose table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.prose th, .prose td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--rule-strong); vertical-align: top; }
.prose th { font-weight: 700; }
.prose code { font-family: var(--f-mono); font-size: 0.88em; background: var(--paper-2); padding: 2px 6px; border-radius: 4px; }
.callout { padding: 22px 24px; border-radius: var(--r-m); background: var(--navy); color: var(--on-navy); display: grid; gap: 12px; justify-items: start; }
.callout p { color: var(--on-navy-2); }
.guide-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: clamp(32px, 6vw, 96px); align-items: start; padding-bottom: var(--section); }
.guide-aside { position: sticky; top: 24px; display: grid; gap: 14px; padding: 22px; border-radius: var(--r-l); background: var(--white); }
.guide-aside p { color: var(--ink-2); font-size: 0.97rem; }
@media (max-width: 900px) { .guide-layout { grid-template-columns: 1fr; } .guide-aside { position: static; } }
.guide-list { list-style: none; display: grid; border-top: 2px solid var(--navy); margin-bottom: var(--section); }
.guide-list li { border-bottom: 1px solid var(--rule-strong); }
.guide-list a { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 18px; padding: 22px 0; text-decoration: none; }
.guide-list .badge { grid-row: 1 / span 2; font-size: 1.05rem; margin-top: 2px; }
.guide-list h2 { font-size: clamp(1.25rem, 2.2vw, 1.7rem); font-weight: 760; font-stretch: 108%; }
.guide-list p { color: var(--ink-2); }
@media (hover: hover) and (pointer: fine) { .guide-list a:hover h2 { text-decoration: underline; text-decoration-color: var(--signal); text-decoration-thickness: 3px; } }

/* ==========================================================================
   Reducerad rörelse
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; }
  .train { transition: opacity 200ms ease; }
  .stations::after { transition: none; }
  .station.is-active .st-dot::after { animation: none; opacity: 0.7; transform: scale(1); }
  .flow.is-running .flow-line::after { display: none; }
  .btn:active, .sw-tab:active, .action-tabs button:active { transform: none; }
  .nav-list, .consent { transition: opacity 150ms ease, visibility 0s; transform: none !important; }
}

.prose-page, .page-head-end { padding-bottom: var(--section); }
.sp-mix { margin-top: 14px; font-weight: 650; color: var(--ink) !important; }

.finale-gets { list-style: none; position: relative; display: grid; gap: 14px; padding-left: 40px; margin-top: 12px; }
.finale-gets::before { content: ""; position: absolute; left: 10px; top: 8px; bottom: 8px; width: var(--track); border-radius: var(--track); background: var(--signal); }
.finale-gets li { position: relative; font-weight: 650; color: var(--on-navy); }
.finale-gets li::before { content: ""; position: absolute; left: -40px; top: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--navy); border: 6px solid var(--on-navy); box-sizing: border-box; }
.finale-sub { margin-top: 14px; font-weight: 700; color: var(--on-navy) !important; }
.finale-analyze .mini-field input { min-height: 60px; font-size: 1.2rem; }
.finale-analyze .mini-field .btn { min-height: 60px; flex: 1 1 auto; }
.aside-line { display: flex; align-items: center; gap: 10px; font-weight: 720; font-stretch: 106%; color: var(--ink) !important; }

.report-meta a { display: inline-flex; align-items: center; min-height: 44px; }
.cat-cta .btn { background: transparent; color: var(--navy); border-color: var(--navy); }
@media (hover: hover) and (pointer: fine) { .cat-cta .btn:hover { background: var(--navy); color: var(--on-navy); } }
.show-more { margin-top: 12px; }
.scan-cancel { margin-left: 8px; background: none; border: 0; padding: 0 4px; min-height: 44px; font-weight: 700; text-decoration: underline; text-decoration-color: var(--signal); text-underline-offset: 0.2em; color: var(--ink-2); }
.demo-toggle { margin-left: 4px; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border-radius: var(--r-m); border: 1.5px solid var(--rule-strong); background: transparent; font-weight: 650; font-size: 0.9rem; color: var(--ink-2); transition: border-color 160ms ease; }
.demo-toggle::before { content: ""; width: 10px; height: 12px; border-left: 3px solid currentColor; border-right: 3px solid currentColor; box-sizing: border-box; }
.demo-toggle[aria-pressed="true"]::before { border: 0; width: 0; height: 0; border-left: 10px solid currentColor; border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
@media (hover: hover) and (pointer: fine) { .demo-toggle:hover { border-color: var(--navy); } }
.linemap:not([data-mode="demo"]) .demo-toggle { display: none; }
.sr-line { display: flex; width: fit-content; align-items: center; gap: 8px; min-height: 44px; margin-top: 2px; font-weight: 700; text-decoration: underline; text-decoration-color: var(--signal); text-underline-offset: 0.2em; }
.sr-top li > span:last-child { line-height: 1.5; }
