


























@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/fonts/inter-v4-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/fonts/inter-v4-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/fonts/archivo-v2-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/fonts/archivo-v2-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }




@font-face { font-family: "Inter Fallback"; font-weight: 100 549; src: local("Arial"), local("ArialMT"); size-adjust: 107.03%; ascent-override: 90.51%; descent-override: 22.54%; line-gap-override: 0%; }
@font-face { font-family: "Inter Fallback"; font-weight: 550 900; src: local("Arial Bold"), local("Arial-BoldMT"); size-adjust: 102%; ascent-override: 94.9%; descent-override: 23.6%; line-gap-override: 0%; }
@font-face { font-family: "Archivo Fallback"; font-weight: 600 900; src: local("Arial Bold"), local("Arial-BoldMT"); size-adjust: 103.94%; ascent-override: 84.47%; descent-override: 20.2%; line-gap-override: 0%; }




:root,
.stage[data-step="3"] {
  color-scheme: light;

  --navy: #14295e;
  --navy-hover: #1c3878;
  --navy-deep: #0d1b40;

  --ink: #101728;
  --text: #101728;
  --text-soft: #5b6478;
  --text-muted: #646c7e;
  --text-faint: #8a93a5;

  --bg: #f4f5f7;
  --bg-sunk: #eef0f4;
  --surface: #ffffff;
  --surface-2: #fafbfc;
  --surface-raised: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.92);
  --topbar-bg: rgba(244, 245, 247, 0.94);

  --line: #e4e7ed;
  --line-strong: #cfd4de;
  --border: var(--line);
  --border-strong: var(--line-strong);

  --mint: #ffb59c;
  --mint-soft: #e8ecf7;
  --mint-line: #6f8be8;
  --mint-text: #1F3FB0;

  --amber-bg: #fdf4e6;
  --amber-border: #f0d9ae;
  --amber-text: #91641c;
  --danger-bg: #fdecec;
  --danger-border: #e8a5a5;
  --danger-text: #8a2020;
  --ins-bg: #dbe0f0;
  --ins-text: #142147;
  --del-bg: #fbe0e0;
  --del-text: #8a2020;


  --lasa: #3f485c;

  --fg-brand: var(--navy);
  --fill-brand: var(--navy);
  --fill-brand-hover: var(--navy-hover);
  --on-fill-brand: #ffffff;
  --focus: var(--navy);
  --disabled-bg: #e8eaef;
  --disabled-text: #6f778a;
  --callout-bg: #f3f6ff;
  --code-bg: #e2e8ff;
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6478' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");

  --r-xs: 8px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 18px;
  --r-xl: 22px;
  --r-pill: 999px;
  --radius: var(--r-md);
  --radius-sm: var(--r-sm);
  --radius-lg: var(--r-xl);
  --ui-r-xs: 4px;
  --ui-r-sm: 8px;
  --ui-r-md: 12px;
  --ui-r-lg: 16px;
  --ui-r-xl: 20px;
  --ui-r-2xl: 24px;
  --ui-r-pill: 999px;

  --sh-sm: 0 1px 2px rgba(16, 23, 40, 0.05);
  --sh-md: 0 2px 4px rgba(16, 23, 40, 0.04), 0 8px 24px rgba(16, 23, 40, 0.06);
  --sh-lg: 0 12px 40px rgba(16, 23, 40, 0.10);
  --ring: 0 0 0 3px rgba(20, 41, 94, 0.18);

  --font-head: "Archivo", "Archivo Fallback", "Helvetica Neue", -apple-system, system-ui, sans-serif;
  --font-body: "Inter", "Inter Fallback", "Helvetica Neue", -apple-system, system-ui, sans-serif;

  --text-meta: 0.75rem;
  --text-meta--line-height: 1rem;
  --text-small: 0.875rem;
  --text-small--line-height: 1.25rem;
  --text-body: 1rem;
  --text-body--line-height: 1.55;
  --text-lead: 1.125rem;
  --text-lead--line-height: 1.6;
  --text-title-sm: 1.25rem;
  --text-title-sm--line-height: 1.4;
  --text-title: 1.5rem;
  --text-title--line-height: 1.25;
  --text-title-lg: 1.875rem;
  --text-title-lg--line-height: 1.2;




  --scen-yta: #fafbfc;
  --scen-kant: rgba(20, 41, 94, 0.08);
  --scen-ljus: inset 0 1px 0 rgba(255, 255, 255, 0.95);
  --sh-scen: 0 1px 2px rgba(13, 27, 64, 0.04), 0 18px 40px -18px rgba(13, 27, 64, 0.12), 0 60px 120px -60px rgba(13, 27, 64, 0.26);
  --ark-yta: #ffffff;
  --sh-ark: 0 0 0 1px rgba(20, 41, 94, 0.07), 0 1px 2px rgba(13, 27, 64, 0.05), 0 10px 28px -14px rgba(13, 27, 64, 0.18);
  --sh-ark-fokus: 0 0 0 1px rgba(20, 41, 94, 0.55), 0 0 0 4px rgba(20, 41, 94, 0.10), 0 14px 36px -16px rgba(13, 27, 64, 0.26);
  --sh-meny: 0 0 0 1px rgba(20, 41, 94, 0.08), 0 4px 10px -4px rgba(13, 27, 64, 0.10), 0 24px 48px -16px rgba(13, 27, 64, 0.26);
  --sh-knapp: 0 1px 2px rgba(13, 27, 64, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  --rad-yta: #ffffff;
  --rad-kant: rgba(20, 41, 94, 0.10);
  --rad-hover: #f7f8fb;
  --token-yta: var(--mint-soft);
  --token-kant: rgba(31, 63, 176, 0.18);
  --token-text: var(--mint-text);
  --ljus: radial-gradient(1100px 520px at 50% -140px, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0) 72%);
  --bock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231F3FB0' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4L18 8'/%3E%3C/svg%3E");

  color: var(--text);
}


:root {
  --sans: var(--font-body);
  --head: var(--font-head);


  --t-hero: clamp(2rem, 1.4rem + 2vw, 3rem);
  --t-display: clamp(1.75rem, 1.3rem + 1.5vw, 2.5rem);
  --t-statement: clamp(1.375rem, 1.05rem + 1.1vw, 2rem);
  --t-title: 1.5rem;
  --t-lead: 1.0625rem;
  --w-rubrik: 650;
  --t-small: 0.875rem;
  --t-etikett: 0.75rem;

  --max: 1200px;
  --sida: clamp(16px, 4vw, 48px);
  --topbar-h: 64px;
  --announce-h: 0px;

  --r-scen: 28px;
  --r-ark: 20px;
  --r-panel: 16px;
  --r-kontroll: 12px;
  --r-token: 6px;

  --ease-ut: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-byt: cubic-bezier(0.4, 0, 0.2, 1);
  --tid-snabb: 120ms;
  --tid-kort: 160ms;
  --tid: 280ms;
  --tid-lang: 720ms;
}





@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ink: #e8ecf4;
    --text: #e8ecf4;
    --text-soft: #b6bfd0;
    --lasa: #c3cbdb;
    --text-muted: #9aa4b8;
    --text-faint: #6c7790;
    --bg: #0f1522;
    --bg-sunk: #0b101b;
    --surface: #161d2d;
    --surface-2: #1b2334;
    --surface-raised: #1e2739;
    --surface-glass: rgba(22, 29, 45, 0.92);
    --topbar-bg: rgba(15, 21, 34, 0.94);
    --line: #28324a;
    --line-strong: #3d4966;
    --mint-soft: #121a33;
    --mint-line: #2f3f6f;
    --mint-text: #ffb59c;
    --amber-bg: #2e2412;
    --amber-border: #6a5226;
    --amber-text: #f0c479;
    --danger-bg: #3a1a1d;
    --danger-border: #7a3238;
    --danger-text: #f3b0b0;
    --ins-bg: #141d3a;
    --ins-text: #e7aa97;
    --del-bg: #3f1b1f;
    --del-text: #f3b0b0;
    --fg-brand: #cdd8f5;
    --fill-brand: #dfe6f6;
    --fill-brand-hover: #ffffff;
    --on-fill-brand: #0d1b40;
    --focus: #a8bdf0;
    --disabled-bg: #1f2738;
    --disabled-text: #8590a6;
    --callout-bg: #19233d;
    --code-bg: #25325a;
    --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b6bfd0' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    --sh-sm: none;
    --sh-md: none;
    --sh-lg: 0 0 0 1px var(--line-strong), 0 16px 40px rgba(0, 0, 0, 0.45);
    --ring: 0 0 0 3px rgba(168, 189, 240, 0.28);
    --scen-yta: #141b2a;
    --scen-kant: rgba(205, 216, 245, 0.08);
    --scen-ljus: inset 0 1px 0 rgba(205, 216, 245, 0.06);
    --sh-scen: 0 0 0 1px rgba(205, 216, 245, 0.06), 0 40px 90px -40px rgba(0, 0, 0, 0.7);
    --ark-yta: #1a2233;
    --sh-ark: 0 0 0 1px #2c3752, 0 18px 40px -20px rgba(0, 0, 0, 0.6);
    --sh-ark-fokus: 0 0 0 1px #a8bdf0, 0 0 0 4px rgba(168, 189, 240, 0.16), 0 18px 40px -20px rgba(0, 0, 0, 0.6);
    --sh-meny: 0 0 0 1px #34405e, 0 24px 48px -16px rgba(0, 0, 0, 0.65);
    --sh-knapp: inset 0 1px 0 rgba(255, 255, 255, 0.5);
    --rad-yta: #1a2233;
    --rad-kant: #2c3752;
    --rad-hover: #202a3e;
    --token-yta: #121a33;
    --token-kant: rgba(255, 181, 156, 0.22);
    --token-text: #ffb59c;
    --ljus: radial-gradient(1100px 520px at 50% -140px, rgba(64, 96, 180, 0.20), rgba(64, 96, 180, 0) 72%);
    --bock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e09882' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4L18 8'/%3E%3C/svg%3E");
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e8ecf4;
  --text: #e8ecf4;
  --text-soft: #b6bfd0;
  --lasa: #c3cbdb;
  --text-muted: #9aa4b8;
  --text-faint: #6c7790;
  --bg: #0f1522;
  --bg-sunk: #0b101b;
  --surface: #161d2d;
  --surface-2: #1b2334;
  --surface-raised: #1e2739;
  --surface-glass: rgba(22, 29, 45, 0.92);
  --topbar-bg: rgba(15, 21, 34, 0.94);
  --line: #28324a;
  --line-strong: #3d4966;
  --mint-soft: #121a33;
  --mint-line: #2f3f6f;
  --mint-text: #ffb59c;
  --amber-bg: #2e2412;
  --amber-border: #6a5226;
  --amber-text: #f0c479;
  --danger-bg: #3a1a1d;
  --danger-border: #7a3238;
  --danger-text: #f3b0b0;
  --ins-bg: #141d3a;
  --ins-text: #e7aa97;
  --del-bg: #3f1b1f;
  --del-text: #f3b0b0;
  --fg-brand: #cdd8f5;
  --fill-brand: #dfe6f6;
  --fill-brand-hover: #ffffff;
  --on-fill-brand: #0d1b40;
  --focus: #a8bdf0;
  --disabled-bg: #1f2738;
  --disabled-text: #8590a6;
  --callout-bg: #19233d;
  --code-bg: #25325a;
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b6bfd0' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  --sh-sm: none;
  --sh-md: none;
  --sh-lg: 0 0 0 1px var(--line-strong), 0 16px 40px rgba(0, 0, 0, 0.45);
  --ring: 0 0 0 3px rgba(168, 189, 240, 0.28);
  --scen-yta: #141b2a;
  --scen-kant: rgba(205, 216, 245, 0.08);
  --scen-ljus: inset 0 1px 0 rgba(205, 216, 245, 0.06);
  --sh-scen: 0 0 0 1px rgba(205, 216, 245, 0.06), 0 40px 90px -40px rgba(0, 0, 0, 0.7);
  --ark-yta: #1a2233;
  --sh-ark: 0 0 0 1px #2c3752, 0 18px 40px -20px rgba(0, 0, 0, 0.6);
  --sh-ark-fokus: 0 0 0 1px #a8bdf0, 0 0 0 4px rgba(168, 189, 240, 0.16), 0 18px 40px -20px rgba(0, 0, 0, 0.6);
  --sh-meny: 0 0 0 1px #34405e, 0 24px 48px -16px rgba(0, 0, 0, 0.65);
  --sh-knapp: inset 0 1px 0 rgba(255, 255, 255, 0.5);
  --rad-yta: #1a2233;
  --rad-kant: #2c3752;
  --rad-hover: #202a3e;
  --token-yta: #121a33;
  --token-kant: rgba(255, 181, 156, 0.22);
  --token-text: #ffb59c;
  --ljus: radial-gradient(1100px 520px at 50% -140px, rgba(64, 96, 180, 0.20), rgba(64, 96, 180, 0) 72%);
  --bock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e09882' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4L18 8'/%3E%3C/svg%3E");
}



* { margin: 0; padding: 0; box-sizing: border-box; }

[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar-h) + 16px);
}



html, body { overflow-x: clip; }

body {
  font-family: var(--sans);
  background: var(--ljus) no-repeat, var(--bg);
  color: var(--text);
  font-size: 1rem;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--mint); color: var(--navy-deep); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.shell:focus { outline: none; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

a { color: inherit; }


.hoppa {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 1000;
  padding: 10px 16px;
  border-radius: var(--r-kontroll);
  background: var(--fill-brand);
  color: var(--on-fill-brand);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform var(--tid-kort) var(--ease-ut);
}

.hoppa:focus-visible { transform: none; }


.token {
  display: inline-block;
  font-family: var(--sans);
  font-variant-numeric: tabular-nums;
  font-size: 0.8125em;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.01em;
  color: var(--token-text);
  background: var(--token-yta);
  box-shadow: inset 0 0 0 1px var(--token-kant);
  border-radius: var(--r-token);
  padding: 0 0.45em;
  white-space: nowrap;
}

.token-saknas {
  color: var(--amber-text);
  background: var(--amber-bg);
  box-shadow: inset 0 0 0 1px var(--amber-border);
}

.ogonbryn {
  font-family: var(--sans);
  font-variant-numeric: tabular-nums;
  font-size: var(--t-etikett);
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}



.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--topbar-bg);
  backdrop-filter: saturate(1.5) blur(16px);
  -webkit-backdrop-filter: saturate(1.5) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--tid) var(--ease-byt);
}


html.skrollad .topbar { border-bottom-color: var(--line); }

.topbar-inner {
  max-width: calc(var(--max) + 2 * var(--sida));
  margin: 0 auto;
  padding: 0 var(--sida);
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--fg-brand);
  min-width: 0;
}

.brand-mark {
  width: 30px;
  height: 30px;

  border-radius: 22.66%;
  overflow: hidden;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}

.brand-mark img { width: 100%; height: 100%; display: block; }



.brand-mark .mork { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand-mark .ljus { display: none; }
  :root:not([data-theme="light"]) .brand-mark .mork { display: block; }
}
:root[data-theme="dark"] .brand-mark .ljus { display: none; }
:root[data-theme="dark"] .brand-mark .mork { display: block; }

.brand-name {
  font-family: var(--head);
  font-size: 1.3125rem;
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1;
}



.brand-klinik {
  padding-left: 10px;
  border-left: 1px solid var(--line-strong, var(--line));
  color: var(--text-soft);
  font-size: var(--t-small);
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}


.topbar-right {
  display: flex;
  align-items: center;
  gap: 20px;
}


.badge-nostore {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--t-small);
  font-weight: 500;
  color: var(--text-soft);
  white-space: nowrap;
}

.brand-pilot {
  position: relative;
  font-size: var(--t-small);
  font-weight: 500;
  color: var(--text-soft);
  white-space: nowrap;
  cursor: help;
  text-decoration: underline dotted var(--line-strong);
  text-underline-offset: 6px;
}

.pilot-pop {
  position: absolute;
  right: 0;
  top: calc(100% + 14px);
  width: 320px;
  background: var(--surface-raised);
  border-radius: var(--r-panel);
  padding: 16px 18px;
  box-shadow: var(--sh-meny);
  font-size: var(--t-small);
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-soft);
  text-align: left;
  white-space: normal;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity var(--tid-kort) var(--ease-byt), transform var(--tid) var(--ease-ut), visibility var(--tid-kort);
  pointer-events: none;
  z-index: 5;
}

.pilot-pop b {
  display: block;
  font-size: 0.9375rem;
  font-weight: 650;
  color: var(--text);
  margin-bottom: 6px;
}

.brand-pilot:hover .pilot-pop,
.brand-pilot:focus-within .pilot-pop,
.brand-pilot:focus .pilot-pop {
  opacity: 1;
  visibility: visible;
  transform: none;
}


.badge-ext {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px 0 14px;
  font-size: var(--t-small);
  font-weight: 600;
  color: var(--fg-brand);
  background: var(--rad-yta);
  border-radius: var(--ui-r-pill);
  box-shadow: 0 0 0 1px var(--rad-kant), 0 1px 2px rgba(13, 27, 64, 0.06);
  text-decoration: none;
  white-space: nowrap;
  transition: box-shadow var(--tid-kort) var(--ease-byt), background var(--tid-kort) var(--ease-byt);
}

.badge-ext:hover { box-shadow: 0 0 0 1px var(--fg-brand), 0 2px 6px rgba(13, 27, 64, 0.10); }

.badge-ext svg { width: 16px; height: 16px; }

.theme-toggle {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: var(--ui-r-pill);
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  transition: background var(--tid-kort) var(--ease-byt), color var(--tid-kort) var(--ease-byt);
}

.theme-toggle:hover { background: var(--rad-hover); color: var(--fg-brand); }


.theme-toggle { position: relative; }
.theme-toggle::after { content: ""; position: absolute; inset: -3px; }

.theme-toggle svg { width: 18px; height: 18px; }

.theme-toggle .icon-sun { display: none; }
.theme-toggle[aria-pressed="true"] .icon-sun { display: block; }
.theme-toggle[aria-pressed="true"] .icon-moon { display: none; }




.shell {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--sida));
  margin: 0 auto;
  padding: 18px var(--sida) 24px;
  display: flex;
  flex-direction: column;
}




.hero {
  display: grid;
  grid-template-rows: 1fr;
  opacity: 1;
  transition:
    grid-template-rows 420ms var(--ease-ut),
    opacity 240ms var(--ease-byt) 60ms,
    visibility 0s;
}



.hero-inre {
  min-height: 0;
  overflow: hidden;
}

.hero-rad {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 48px;
  padding: 14px 0 26px;
}

.hero-text { min-width: 0; }

.hero-knapp { flex-shrink: 0; }

html.arbetar .hero,
html.hero-ihop .hero {
  grid-template-rows: 0fr;
  opacity: 0;
  visibility: hidden;
  transition:
    grid-template-rows 420ms var(--ease-ut),
    opacity 160ms var(--ease-byt),
    visibility 0s 420ms;
}


html:not(.scen-redo) .hero { transition: none; }




html.hero-ihop .hero {
  transition:
    grid-template-rows 900ms cubic-bezier(0.45, 0, 0.2, 1),
    opacity 500ms var(--ease-byt),
    visibility 0s 900ms;
}

.hero-visa {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 30px;
  padding: 0 10px 0 12px;
  border: 0;
  border-radius: var(--ui-r-pill);
  background: transparent;
  color: var(--text-soft);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--tid-kort) var(--ease-byt), color var(--tid-kort) var(--ease-byt);
}

.hero-visa:hover { background: var(--surface-2, rgba(20, 41, 94, 0.06)); color: var(--text); }
.hero-visa:focus-visible { outline: 2px solid var(--mint-text); outline-offset: 2px; }
.hero-visa svg { width: 14px; height: 14px; transition: transform var(--tid) var(--ease-ut); }
.hero-visa[aria-expanded="true"] svg { transform: rotate(180deg); }


.stage:not([data-step="1"]) .hero-visa { display: none; }

.hero-titel {
  font-family: var(--head);
  font-size: var(--t-hero);
  font-weight: var(--w-rubrik);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--fg-brand);
  text-wrap: balance;
}




.hero-accent { color: var(--mint-text); white-space: nowrap; }

.hero-ingress {
  margin-top: 10px;
  font-size: var(--t-lead);
  line-height: 1.5;
  color: var(--lasa);
  text-wrap: pretty;
}

.hero-ingress strong { font-weight: 600; color: var(--text); }


.stage {
  position: relative;
  min-width: 0;
  background: var(--scen-yta);
  border-radius: var(--r-scen);
  box-shadow: var(--sh-scen), 0 0 0 1px var(--scen-kant), var(--scen-ljus);
  color: var(--text);
  padding: 0 20px 20px;
}


.stage[data-step="3"] {
  background: #fbfbfc;
  box-shadow: 0 1px 2px rgba(13, 27, 64, 0.04), 0 18px 40px -18px rgba(13, 27, 64, 0.12), 0 60px 120px -60px rgba(13, 27, 64, 0.26), 0 0 0 1px rgba(20, 41, 94, 0.08), inset 0 1px 0 #fff;
}


.scen-rad {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 56px;
  padding: 8px 4px;
}

.progress {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.progress-dot {
  display: flex;
  align-items: center;
  gap: 8px;
}


.progress-dot + .progress-dot::before {
  content: "";
  width: 22px;
  height: 1px;
  margin-right: 2px;
  background: var(--line-strong);
  transition: background var(--tid) var(--ease-byt);
}


.progress .progress-dot.done + .progress-dot::before { background: var(--fill-brand); }

.progress-dot .dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-family: var(--sans);
  font-variant-numeric: tabular-nums;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text-muted);
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--line-strong);
  transition: background var(--tid) var(--ease-byt), color var(--tid) var(--ease-byt), box-shadow var(--tid) var(--ease-byt);
}

.progress-dot:nth-child(1) .dot::before { content: "1"; }
.progress-dot:nth-child(2) .dot::before { content: "2"; }
.progress-dot:nth-child(3) .dot::before { content: "3"; }

.progress-dot.active .dot {
  background: var(--fill-brand);
  color: var(--on-fill-brand);
  box-shadow: 0 1px 2px rgba(13, 27, 64, 0.28);
}

.progress-dot.done .dot {
  background: var(--mint-soft);
  color: var(--mint-text);
  box-shadow: inset 0 0 0 1px var(--mint-line);
}

.progress-dot.done .dot::before { content: "\2713"; font-family: var(--sans); font-weight: 700; }

.dot-label {
  font-size: var(--t-small);
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--text-muted);
  white-space: nowrap;
  transition: color var(--tid) var(--ease-byt);
}

.progress-dot.active .dot-label { color: var(--text); font-weight: 600; letter-spacing: -0.01em; }
.progress-dot.done .dot-label { color: var(--text-soft); }


.announce {
  margin-left: auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 34px;
  padding: 0 4px 0 6px;
  border-radius: var(--ui-r-pill);
  font-size: 0.8125rem;
  line-height: 1.3;
  color: var(--text-soft);
}

:root[data-announce="off"] .announce { display: none; }

.announce-tag {

  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--head);
  font-size: 0.8125rem;
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1;
  color: var(--ink);
}
.announce-tag::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #E5472B;
  box-shadow: 0 0 0 3px rgba(229, 71, 43, 0.22);
}

.announce-text {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.announce-short { display: none; }





@media (min-width: 1024px) {
  .announce { flex: 0 1 536px; }
  .announce-text { flex: 1 1 0; }
}


.announce-lank {
  flex-shrink: 0;
  color: var(--fg-brand);
  font-weight: 600;
  white-space: nowrap;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 4px;
}

.announce-lank:hover { text-decoration-color: currentColor; }

.announce-close {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--tid-kort) var(--ease-byt), color var(--tid-kort) var(--ease-byt);
}

.announce-close:hover { background: var(--rad-hover); color: var(--text); }


.announce-close { position: relative; }
.announce-close::after { content: ""; position: absolute; inset: -8px; }

.announce-close svg { width: 14px; height: 14px; }


.stage[data-step="3"] .announce { display: none; }



.btn-primary,
.btn-ghost {
  font-family: var(--sans);
  font-size: var(--t-small);
  font-weight: 600;
  letter-spacing: -0.005em;
  height: 44px;
  padding: 0 20px;
  border-radius: var(--r-kontroll);
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  text-decoration: none;
  transition:
    background var(--tid-kort) var(--ease-byt),
    box-shadow var(--tid-kort) var(--ease-byt),
    color var(--tid-kort) var(--ease-byt),
    transform var(--tid-kort) var(--ease-ut);
}

.btn-primary {
  background: var(--fill-brand);
  color: var(--on-fill-brand);
  box-shadow: var(--sh-knapp);
}

.btn-primary:hover:not(:disabled) {
  background: var(--fill-brand-hover);
  box-shadow: var(--sh-knapp), 0 6px 16px -6px rgba(13, 27, 64, 0.45);
}

.btn-primary:disabled {
  background: var(--disabled-bg);
  color: var(--disabled-text);
  cursor: not-allowed;
  box-shadow: none;
}

.btn-primary.copied {
  background: var(--mint-text);
  color: var(--on-fill-brand);
}



.btn-ghost.copied,
.btn-small.copied:not(.btn-primary) {
  background: var(--mint-soft);
  color: var(--mint-text);
  box-shadow: 0 0 0 1px var(--mint-line);
}

.btn-ghost {
  background: var(--rad-yta);
  color: var(--fg-brand);
  box-shadow: 0 0 0 1px var(--rad-kant), 0 1px 2px rgba(13, 27, 64, 0.05);
}

.btn-ghost:hover { box-shadow: 0 0 0 1px var(--fg-brand), 0 1px 2px rgba(13, 27, 64, 0.05); }

.btn-ghost svg { width: 16px; height: 16px; flex-shrink: 0; }

.btn-small {
  height: 34px;
  padding: 0 14px;
  font-size: var(--t-small);
  border-radius: 10px;
}

.btn-stor {
  height: 52px;
  padding: 0 26px;
  font-size: 1rem;
  border-radius: 14px;
}



select, input[type="text"], input[type="password"], input[type="search"], textarea {
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--text);
  background: var(--rad-yta);
  border: 0;
  box-shadow: 0 0 0 1px var(--rad-kant);
  border-radius: var(--r-kontroll);
  padding: 11px 13px;
  width: 100%;
  transition: box-shadow var(--tid-kort) var(--ease-byt);
}

::placeholder { color: var(--text-muted); opacity: 1; }

select {
  appearance: none;
  -webkit-appearance: none;
  background-image: var(--select-arrow);
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 38px;
  cursor: pointer;
}

select:hover, input[type="text"]:hover, input[type="search"]:hover { box-shadow: 0 0 0 1px var(--line-strong); }

select:focus, input[type="text"]:focus, input[type="password"]:focus, input[type="search"]:focus, textarea:focus {
  outline: none;
  box-shadow: 0 0 0 1.5px var(--focus), var(--ring);
}

.label-soft {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.8125rem;
}






.work-side { display: contents; }

.work-note { min-width: 0; }

.note-wrap { position: relative; }



.note-field {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--ark-yta);
  border-radius: var(--r-ark);
  box-shadow: var(--sh-ark);
  overflow: hidden;
  transition: box-shadow var(--tid) var(--ease-byt);
}

.note-field:focus-within { box-shadow: var(--sh-ark-fokus); }

textarea#note-input {
  flex: 1 1 auto;
  display: block;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  padding: 26px 30px 18px;
  min-height: 200px;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  resize: none;
}

textarea#note-input::placeholder { color: var(--text-muted); }

textarea#note-input:focus { outline: none; box-shadow: none; }



.note-tom {
  position: absolute;
  inset: 0 0 64px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  pointer-events: none;
  transition: opacity var(--tid) var(--ease-byt);
}
.note-tom-knapp { pointer-events: auto; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 8px 14px; border: 0; background: none; cursor: pointer; font-family: var(--sans); color: var(--fg-brand); border-radius: 20px; }
.note-tom-ikon { display: grid; place-items: center; width: 72px; height: 72px; color: var(--text-faint); transition: color var(--tid) var(--ease-byt), transform var(--tid) var(--ease-byt); }
.note-tom-ikon svg { width: 64px; height: 64px; stroke-width: 1.3; }
.note-tom-etikett { font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.01em; color: var(--text-soft); transition: color var(--tid) var(--ease-byt); }
.note-tom-knapp:hover .note-tom-ikon { color: var(--fg-brand); transform: translateY(-2px); }
.note-tom-knapp:hover .note-tom-etikett { color: var(--fg-brand); }
.note-tom-knapp:active .note-tom-ikon { transform: translateY(0); }
.note-tom-knapp.vantar .note-tom-ikon, .note-tom-knapp.vantar .note-tom-etikett { color: var(--fg-brand); }
.note-tom-knapp:focus-visible { outline: 2px solid var(--fg-brand); outline-offset: 4px; }
.note-tom-hint { margin: 0; font-size: var(--t-small); color: var(--text-muted); }
.note-tom-hint kbd { font-family: inherit; font-weight: 600; color: var(--text-soft); padding: 2px 7px; border-radius: 6px; box-shadow: 0 0 0 1px var(--line); background: var(--surface); }
#note-input:not(:placeholder-shown) ~ .note-tom,
.note-field.lyssnar .note-tom { opacity: 0; visibility: hidden; transition: opacity var(--tid) var(--ease-byt), visibility 0s linear var(--tid); }
.note-field:has(.note-tom) #note-input:placeholder-shown::placeholder { color: transparent; }


.note-field.spelar-in:has(.note-tom) #note-input:placeholder-shown::placeholder { color: var(--text-muted); opacity: 1; }
@media (max-height: 640px) { .note-tom-hint { display: none; } }

@media (max-width: 1023px) {
  .note-tom { inset: 18px 0 auto 0; justify-content: flex-start; }
  .note-tom-hint { display: none; }
}


.note-head {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  background: transparent;
}

.note-head .mic-wrap { position: relative; }

.note-hint {
  margin-left: auto;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-right: 6px;
  font-size: 0.8125rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.note-hint::before {
  content: "";
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint-text);
}



.note-head .note-hint { flex: 1 1 0%; justify-content: flex-end; }
.note-hint .hor-tx { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; direction: rtl; }
.note-hint .hor-tx > bdi { direction: ltr; unicode-bidi: isolate; }

.ljud-varning {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  height: 28px;
  margin-left: auto;
  padding: 0 10px;
  border-radius: var(--ui-r-pill);
  background: var(--amber-bg);
  box-shadow: inset 0 0 0 1px var(--amber-border);
  color: var(--amber-text);
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ljud-varning[hidden] { display: none; }

.note-head:has(.ljud-varning:not([hidden])) .note-hint { display: none; }


.videoljud-rad {
  margin-left: auto;
  min-width: 0;
  padding-right: 6px;
  font-size: 0.8125rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.videoljud-rad[hidden] { display: none; }

.note-head:has(.videoljud-rad:not([hidden])) .note-hint { margin-left: 12px; }
.note-head:has(.ljud-varning:not([hidden])) .videoljud-rad { margin-left: 12px; }


.btn-paste,
.btn-mic {
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--fg-brand);
  background: transparent;
  border: 0;
  box-shadow: inset 0 0 0 1px var(--rad-kant);
  border-radius: 10px;
  height: 34px;
  padding: 0 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  transition: background var(--tid-kort) var(--ease-byt), box-shadow var(--tid-kort) var(--ease-byt), color var(--tid-kort) var(--ease-byt);
}

.btn-paste svg,
.btn-mic svg { width: 15px; height: 15px; flex-shrink: 0; }

#rec-label { font-variant-numeric: tabular-nums; }

.btn-paste:hover,
.btn-mic:hover { background: var(--rad-hover); box-shadow: inset 0 0 0 1px var(--line-strong); }

.btn-mic.recording {
  background: var(--danger-bg);
  box-shadow: inset 0 0 0 1px var(--danger-border);
  color: var(--danger-text);
}


.btn-mic.recording svg { animation: pulse 1.4s var(--ease-byt) infinite; }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.btn-mic.thinking {
  background: var(--mint-soft);
  box-shadow: inset 0 0 0 1px var(--mint-line);
  color: var(--mint-text);
}

.mic-wrap { position: relative; }
.mic-wrap[hidden] { display: none; }

.mic-menu {
  position: absolute;
  left: 0;
  bottom: calc(100% + 10px);
  z-index: 30;
  width: 296px;
  background: var(--surface-raised);
  border-radius: 14px;
  box-shadow: var(--sh-meny);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mic-menu button {
  font-family: var(--sans);
  text-align: left;
  background: none;
  border: 0;
  border-radius: 9px;
  padding: 9px 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mic-menu button:hover { background: var(--mint-soft); }

.mic-menu button:focus-visible { outline-offset: -2px; }

.mic-menu-divider { height: 1px; background: var(--line); margin: 4px 8px; }

.mic-menu strong {
  font-size: var(--t-small);
  font-weight: 600;
  color: var(--text);
}

.mic-menu span {
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--text-soft);
}


#tal-btn { padding: 0 8px; }
#tal-btn .tal-text { display: none; }
#tal-btn.med-text .tal-text { display: inline; }
#tal-btn.lokal { color: var(--mint-text); box-shadow: inset 0 0 0 1px var(--mint-line); }
.note-head:has(#tal-btn.med-text) { flex-wrap: wrap; }

.btn-mic#ruta-btn.aktiv,
.btn-mic#sax-btn.aktiv { background: var(--mint-soft); box-shadow: inset 0 0 0 1px var(--mint-line); color: var(--mint-text); }


.type-block { margin-top: 20px; }

.field-label {
  display: block;
  font-family: var(--sans);
  font-variant-numeric: tabular-nums;
  font-size: var(--t-etikett);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.doc-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;



  --besok-rad: 40px;
  --besok-luft: 6px;
  --besok-plats: calc(var(--besok-rad) + var(--besok-luft));

  --antal-typer: 5;
}

html[data-yrke="ssk"] .doc-grid,
html[data-yrke="dsk"] .doc-grid { --antal-typer: 3; }

html[data-yrke="psykolog"] .doc-grid { --antal-typer: 2; }

html[data-yrke="dsk"] .doc-grid,
html[data-yrke="ssk"]:not([data-klinik="hedda"]) .doc-grid { --besok-plats: calc(2 * 34px + 2px + 9px + var(--besok-luft)); }


.type-pill {
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 550;
  letter-spacing: -0.005em;
  color: var(--text);
  background: var(--rad-yta);
  border: 0;
  box-shadow: 0 0 0 1px var(--rad-kant), 0 1px 1px rgba(13, 27, 64, 0.03);
  border-radius: var(--r-kontroll);
  height: 42px;
  padding: 0 14px 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--tid-kort) var(--ease-byt), box-shadow var(--tid-kort) var(--ease-byt), color var(--tid-kort) var(--ease-byt);
}

.type-pill svg {
  width: 17px;
  height: 17px;
  stroke: var(--fg-brand);
  fill: none;
  opacity: 0.75;
  flex-shrink: 0;
  transition: stroke var(--tid-kort) var(--ease-byt), opacity var(--tid-kort) var(--ease-byt);
}

.type-pill:hover { background: var(--rad-hover); box-shadow: 0 0 0 1px var(--line-strong), 0 1px 1px rgba(13, 27, 64, 0.03); }

.type-pill.active {
  background: var(--fill-brand);
  color: var(--on-fill-brand);
  box-shadow: var(--sh-knapp), 0 6px 16px -10px rgba(13, 27, 64, 0.6);
}

.type-pill.active svg { stroke: var(--on-fill-brand); opacity: 1; }





.pill-slot {
  --besok-spar: #edf1fa;
  --besok-kant: #4f6cb0;
  --besok-skiljelinje: #a9b8da;
  --besok-text: #14295e;
  --besok-hover: #ffffff;
  --besok-hover-skugga: 0 1px 2px rgba(20, 41, 94, 0.16);
  --besok-vald: #14295e;
  --besok-pa-vald: #ffffff;
  --besok-prick: #ffb59c;
  --besok-fokus: #2358d6;
  --besok-glod: rgba(35, 88, 214, 0.18);

  position: relative;
  display: flex;
  flex-direction: column;
  max-width: 100%;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .pill-slot {
    --besok-spar: #101a33;
    --besok-kant: #7d9be0;
    --besok-skiljelinje: #3b4f82;
    --besok-text: #dbe5fb;
    --besok-hover: #1f3260;
    --besok-hover-skugga: none;
    --besok-vald: #dfe6f6;
    --besok-pa-vald: #0d1b40;
    --besok-prick: #1F3FB0;
    --besok-fokus: #9db8ff;
    --besok-glod: rgba(157, 184, 255, 0.22);
  }
}

:root[data-theme="dark"] .pill-slot {
  --besok-spar: #101a33;
  --besok-kant: #7d9be0;
  --besok-skiljelinje: #3b4f82;
  --besok-text: #dbe5fb;
  --besok-hover: #1f3260;
  --besok-hover-skugga: none;
  --besok-vald: #dfe6f6;
  --besok-pa-vald: #0d1b40;
  --besok-prick: #1F3FB0;
  --besok-fokus: #9db8ff;
  --besok-glod: rgba(157, 184, 255, 0.22);
}

.visit-split {
  position: relative;
  display: none;
  align-items: stretch;
  gap: 0;
  min-height: var(--besok-rad, 40px);
  margin-top: var(--besok-luft, 6px);
  padding: 4.5px;
  box-sizing: border-box;
  border-radius: var(--r-kontroll);
}

.pill-slot[data-synlig="ja"] > .visit-split {
  display: flex;
  animation: besok-in var(--tid-kort) var(--ease-ut) backwards;
}

@keyframes besok-in {
  from { opacity: 0; transform: translateY(-3px); }
}

.visit-split::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1.5px solid var(--besok-kant);
  border-radius: var(--r-kontroll);
  background: var(--besok-spar);
  pointer-events: none;
}


.visit-split::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--r-kontroll);
  pointer-events: none;
}

.pill-slot[data-synlig="ja"][data-vald="nej"] > .visit-split::after {
  animation: besok-andas 2.8s var(--ease-byt) 0.5s infinite;
}

@keyframes besok-andas {
  0%, 100% { box-shadow: 0 0 0 0 transparent; }
  50% { box-shadow: 0 0 0 4px var(--besok-glod); }
}

.visit-btn {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  padding: 0 4px;
  font-family: var(--sans);
  font-size: var(--t-small);
  font-weight: 600;
  color: var(--besok-text);
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform var(--tid-snabb) var(--ease-ut), background-color var(--tid-kort) var(--ease-byt), color var(--tid-kort) var(--ease-byt), box-shadow var(--tid-kort) var(--ease-byt);
}

.visit-btn + .visit-btn::before {
  content: "";
  position: absolute;
  left: 0;
  top: 25%;
  bottom: 25%;
  width: 1px;
  background: var(--besok-skiljelinje);
  transition: opacity var(--tid-kort) var(--ease-byt);
}

.visit-btn:hover::before,
.visit-btn:hover + .visit-btn::before,
.visit-btn[aria-pressed="true"]::before,
.visit-btn[aria-pressed="true"] + .visit-btn::before { opacity: 0; }

@media (hover: hover) and (pointer: fine) {
  .visit-btn:hover { background: var(--besok-hover); box-shadow: var(--besok-hover-skugga); }
}

.visit-btn[aria-pressed="true"],
.visit-btn[aria-pressed="true"]:hover {
  background: var(--besok-vald);
  color: var(--besok-pa-vald);
  box-shadow: none;
}

.visit-btn[aria-pressed="true"]::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 3px;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: var(--besok-prick);
}

.visit-btn:focus-visible { outline: 2px solid var(--besok-fokus); outline-offset: 1px; }



@media (max-width: 1023px) {

  .doc-grid { align-items: flex-start; align-content: flex-start; }
  .pill-slot[data-synlig="ja"] {
    width: min(100%, 420px);
    margin-right: max(0px, calc(100% - 420px));
  }
}




@media (min-width: 521px) and (max-width: 1023px) {
  .doc-grid { min-height: calc(3 * 40px + 2 * 6px + var(--besok-plats)); }
  html[data-yrke="ssk"] .doc-grid,
  html[data-yrke="dsk"] .doc-grid,
  html[data-yrke="psykolog"] .doc-grid { min-height: calc(2 * 40px + 6px + var(--besok-plats)); }
}

.type-hint {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--text-soft);
  margin-top: 12px;
}

.option-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
  max-width: 560px;
}

.option-row label,
.name-row label,
.sub-block > .field-label + select ~ label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
}

.sub-block { margin-bottom: 18px; max-width: 560px; }

.sub-block > .field-label { margin-bottom: 8px; }

.sub-block .option-row { margin-bottom: 0; }

.sub-hint {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--text-soft);
  margin-top: 8px;
}

#occupation-label { margin-top: 14px; }

#recipient-row,
#fk-row,
#type-hint {
  scroll-margin-top: calc(var(--topbar-h) + 16px);
  scroll-margin-bottom: 120px;
}


.fold {
  border-top: 1px solid var(--line);
  margin-top: 16px;
  padding-top: 12px;
}

.fold + .fold { margin-top: 0; }

.fold > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  font-size: var(--t-small);
  font-weight: 600;
  color: var(--text);
  border-radius: 8px;
}

.fold > summary::-webkit-details-marker { display: none; }

.fold > summary::before {
  content: "";
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  background: var(--text-muted);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'/%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 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform var(--tid) var(--ease-ut);
}

.fold[open] > summary::before { transform: rotate(90deg); }

.fold-note {
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 2px;
}

.name-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 12px;
}

.name-row > div { display: flex; flex-direction: column; gap: 8px; }


.stil-panel { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }

.stil-hint { font-size: 0.8125rem; line-height: 1.5; color: var(--text-soft); }

#stil-grupper { display: flex; flex-direction: column; gap: 14px; }

.stil-grupp { border: 0; margin: 0; padding: 0; min-width: 0; }

.stil-rubrik {
  padding: 0;
  margin-bottom: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
}

.stil-val { display: flex; flex-wrap: wrap; gap: 6px; }

.stil-alt {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--fg-brand);
  background: var(--rad-yta);
  box-shadow: 0 0 0 1px var(--rad-kant);
  border-radius: var(--ui-r-pill);
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--tid-kort) var(--ease-byt), box-shadow var(--tid-kort) var(--ease-byt), color var(--tid-kort) var(--ease-byt);
}

.stil-alt input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }

.stil-alt:hover { box-shadow: 0 0 0 1px var(--fg-brand); }

.stil-alt:has(input:checked) { background: var(--fill-brand); color: var(--on-fill-brand); box-shadow: none; }

.stil-alt:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }

.stil-lank { display: flex; flex-direction: column; gap: 8px; }
.stil-lank[hidden] { display: none; }
.stil-lank .stil-rubrik { display: block; margin-bottom: 0; }
.stil-lank-rad { display: flex; gap: 8px; min-width: 0; }
.stil-lank-rad input { flex: 1 1 auto; min-width: 0; height: 40px; padding: 0 12px; font-size: 0.8125rem; color: var(--text-soft); background: var(--bg-sunk); }
.stil-kopiera { flex: 0 0 auto; height: 40px; padding: 0 16px; }
#stil-fold.stil-andrad .fold-note { color: var(--mint-text); font-weight: 600; }

@media (pointer: coarse) {
  .stil-alt { height: 40px; padding: 0 14px; }
}


.diff-panel {
  margin-top: 14px;
  border-radius: var(--r-panel);
  padding: 14px 16px;
  background: var(--ark-yta);
  box-shadow: var(--sh-ark);
}

.diff-title {
  font-family: var(--sans);
  font-variant-numeric: tabular-nums;
  font-size: var(--t-etikett);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.diff-view {
  font-size: var(--t-small);
  line-height: 1.6;
  white-space: pre-wrap;
  max-height: 260px;
  overflow: auto;
  background: var(--bg-sunk);
  border-radius: 10px;
  padding: 12px 14px;
}

.diff-view ins { background: var(--ins-bg); color: var(--ins-text); text-decoration: none; border-radius: 4px; padding: 0 2px; }
.diff-view del { background: var(--del-bg); color: var(--del-text); border-radius: 4px; padding: 0 2px; }

.diff-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }


.note-wrap.drar-bild .note-field { box-shadow: var(--sh-ark-fokus); outline: 2px dashed var(--mint-text); outline-offset: 3px; }
.bifogat { margin-top: 14px; }
.bifogat[hidden] { display: none; }
.bifogat-rubrik { margin: 0 0 8px; font-size: 0.8125rem; font-weight: 650; color: var(--text); }
.bifogat-rubrik span { font-weight: 400; color: var(--text-muted); margin-left: 6px; }
.bifogat-lista { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.bifogat-post { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; padding: 12px; border-radius: var(--r-panel); background: var(--ark-yta); box-shadow: var(--sh-ark); }
.bifogat-post[data-lage="fel"], .bifogat-post[data-lage="tom"] { opacity: 0.75; }
.bifogat-bild { padding: 0; border: 0; box-shadow: 0 0 0 1px var(--line); border-radius: 8px; background: #fff; cursor: zoom-in; overflow: hidden; height: 72px; align-self: start; }
.bifogat-bild img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: left top; }
.bifogat-post.stor { grid-template-columns: minmax(0, 1fr); }
.bifogat-post.stor .bifogat-bild { height: auto; cursor: zoom-out; }
.bifogat-post.stor .bifogat-bild img { height: auto; object-fit: contain; }
.bifogat-innehall { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.bifogat-rad { display: flex; align-items: center; gap: 8px; }
.bifogat-typ { flex: 1 1 auto; min-width: 0; max-width: 260px; }
.bifogat-kopiera { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; flex: 0 0 auto; padding: 0; color: var(--text-soft); background: none; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.bifogat-kopiera svg { width: 16px; height: 16px; }
.bifogat-kopiera:hover { color: var(--text); background: var(--surface-2); }
.bifogat-kopiera.kopierat { color: var(--mint-text); background: var(--mint-soft); border-color: var(--mint-line); }
.bifogat-kopiera[hidden] { display: none; }
.bifogat-bort { white-space: nowrap; margin-left: auto; font: inherit; font-size: 0.8125rem; color: var(--text-soft); background: none; border: none; cursor: pointer; padding: 4px 6px; text-decoration: underline; text-underline-offset: 3px; }
.bifogat-status { margin: 0; font-size: 0.8125rem; color: var(--text-muted); }
.bifogat-post[data-lage="fel"] .bifogat-status { color: var(--amber-text); }
.bifogat-text, .bifogat-inklistring-text { width: 100%; min-height: 84px; font: inherit; font-size: var(--t-small); line-height: 1.5; padding: 8px 10px; border-radius: 8px; background: var(--bg-sunk); color: inherit; resize: vertical; }
.bifogat-text[hidden], .bifogat-osakra[hidden] { display: none; }
.bifogat-post.bifogat-post-text { grid-template-columns: minmax(0, 1fr); }
.bifogat-inklistring { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; padding: 12px; border-radius: var(--r-panel); background: var(--ark-yta); box-shadow: var(--sh-ark); }
.bifogat-inklistring[hidden] { display: none; }
.bifogat-inklistring-knappar { display: flex; gap: 8px; }
.bifogat-osakra { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 8px 10px; border-radius: 8px; background: var(--amber-bg); color: var(--amber-text); font-size: 0.8125rem; }
.bifogat-ok-rad { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; cursor: pointer; }



.step-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.step-actions-sticky {
  position: sticky;
  bottom: 0;
  z-index: 20;
}

.gate {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  min-width: 0;
}

.gate-hint {
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--text-muted);
  text-wrap: balance;
}

#step-1 .step-actions {
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px 10px;
  margin: 18px -20px -20px;
  padding: 14px 20px calc(16px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  background: var(--scen-yta);
  box-shadow: 0 -12px 24px -18px rgba(13, 27, 64, 0.22);
  border-radius: 0 0 var(--r-scen) var(--r-scen);
}

#step-1 .gate { display: contents; }

#step-1 .gate-hint {
  order: -1;
  flex: 1 0 100%;
}

#step-1 #to-step-2 { flex: 1 1 auto; height: 48px; font-size: 0.9375rem; }

#step-1 #paste-btn { height: 48px; padding: 0 16px; }



@media (min-width: 1024px) {
  .shell { min-height: calc(100vh - var(--topbar-h)); min-height: calc(100dvh - var(--topbar-h)); }

  .stage[data-step="1"] {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    max-height: 920px;
  }

  .stage[data-step="1"] #step-1 { flex: 1 1 auto; display: flex; min-height: 0; }

  .work {
    flex: 1 1 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    column-gap: 28px;
    align-items: stretch;
    min-height: 0;
  }

  .work-note,
  .note-wrap { display: flex; flex-direction: column; min-height: 0; }

  .note-wrap { flex: 1 1 auto; }

  .note-field { flex: 1 1 auto; min-height: 300px; }

  textarea#note-input { min-height: 0; }



  .note-head { flex-wrap: wrap; }

  .note-head .mic-wrap { flex-shrink: 0; }




  .work-side {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 4px 0 0;
  }

  .work-options { flex: 1 0 auto; }

  .work-side .type-block { margin: 0 0 16px; }


  .work-side .doc-grid { flex-direction: column; flex-wrap: nowrap; gap: 6px; min-height: calc(5 * 42px + 4 * 6px); }

  .work-side .type-pill { width: 100%; justify-content: flex-start; }

  .work-side .pill-slot { display: flex; width: 100%; }

  .work-side .type-hint { margin-top: 10px; }

  .work-options:has(#fk-row:not([hidden])) .type-hint { display: none; }

  .work-side .sub-block,
  .work-side .option-row { max-width: none; margin-bottom: 14px; }

  .work-side .sub-block .option-row { margin-bottom: 0; }

  .work-side select { padding-left: 12px; padding-right: 30px; background-position: right 8px center; font-size: 0.9375rem; }

  .work-side .name-row { grid-template-columns: 1fr; gap: 12px; }

  #recipient-row, #fk-row, #type-hint { scroll-margin-bottom: 110px; }


  #step-1 .step-actions {
    margin: 16px 0 0;
    padding: 14px 0 0;
    box-shadow: none;
    border-radius: 0;
  }


  #step-1 .step-actions-sticky {
    bottom: 0;
    padding-bottom: 4px;
    background: var(--scen-yta);
  }
}




@media (min-width: 1024px) and (max-height: 820px) {
  .work-side .doc-grid { min-height: calc(5 * 36px + 4 * 4px); }
  .hero-rad { padding: 8px 0 20px; }
  .scen-rad { min-height: 48px; padding: 4px 4px; }
  .work-side .doc-grid { gap: 4px; }
  .work-side .type-pill { height: 36px; }
  .work-side .type-hint,
  .work-side .sub-hint:not(#occupation-hint) { display: none; }
  .work-side .type-block { margin-bottom: 12px; }
  .work-side .sub-block,
  .work-side .option-row { margin-bottom: 12px; }
  .work-side #occupation-label { margin-top: 10px; }
  .fold { margin-top: 12px; padding-top: 8px; }
  #step-1 .step-actions { padding-top: 10px; margin-top: 12px; }
  .field-label { margin-bottom: 10px; }
}



#step-2 { padding: 8px 12px 0; }

.step-title {
  font-family: var(--head);
  font-size: clamp(1.625rem, 1.3rem + 0.9vw, 1.875rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.2;
  color: var(--fg-brand);
  margin-bottom: 12px;
}

.step-title .accent { color: var(--mint-text); white-space: nowrap; }

.step-lede {
  font-size: 1rem;
  color: var(--text-soft);
  margin: 0 0 24px;
  max-width: 62ch;
}

.pnr-warning {
  background: var(--danger-bg);
  box-shadow: inset 0 0 0 1px var(--danger-border);
  border-radius: var(--r-kontroll);
  padding: 12px 16px;
  font-size: var(--t-small);
  font-weight: 600;
  color: var(--danger-text);
  margin-bottom: 20px;
}

.pnr-warning.pnr-borttaget {
  background: var(--amber-bg);
  box-shadow: inset 0 0 0 1px var(--amber-border);
  color: var(--amber-text);
}

.candidates-wrap { margin-bottom: 20px; }

.cand-title { font-size: var(--t-small); font-weight: 600; color: var(--text-soft); margin-bottom: 8px; }

.candidates { display: flex; flex-wrap: wrap; gap: 8px; }

.cand-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--t-small);
  font-weight: 600;
  color: var(--text-soft);
  background: var(--rad-yta);
  box-shadow: 0 0 0 1px var(--rad-kant);
  border-radius: var(--ui-r-pill);
  padding: 6px 14px 6px 10px;
  cursor: pointer;
  transition: background var(--tid-kort) var(--ease-byt), box-shadow var(--tid-kort) var(--ease-byt), color var(--tid-kort) var(--ease-byt);
}

.cand-chip:has(input:checked) { background: var(--mint-soft); box-shadow: 0 0 0 1px var(--mint-line); color: var(--mint-text); }
.cand-chip:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.cand-chip input { accent-color: var(--mint-text); margin: 0; }
.cand-chip input:focus-visible { outline: none; }

.preview-label {
  font-family: var(--sans);
  font-variant-numeric: tabular-nums;
  font-size: var(--t-etikett);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}


.scrub-preview {
  background: var(--ark-yta);
  box-shadow: var(--sh-ark);
  border-radius: var(--r-panel);
  padding: 18px 22px;
  font-size: 1rem;
  line-height: 1.7;
  white-space: pre-wrap;
  max-height: 420px;
  overflow: auto;
  color: var(--text);
}

.scrub-preview mark {
  font-family: var(--sans);
  font-variant-numeric: tabular-nums;
  font-size: 0.8125em;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--token-text);
  background: var(--token-yta);
  box-shadow: inset 0 0 0 1px var(--token-kant);
  border-radius: var(--r-token);
  padding: 1px 6px;
}

.access-row { display: flex; flex-direction: column; gap: 8px; margin-top: 20px; max-width: 280px; }
.access-row label { font-size: var(--t-small); font-weight: 600; color: var(--text); }

#step-2 .step-actions-sticky {
  margin: 24px -32px -20px;
  padding: 14px 32px;
  background: var(--scen-yta);
  box-shadow: 0 -12px 24px -18px rgba(13, 27, 64, 0.22);
  border-top: 1px solid var(--line);
  border-radius: 0 0 var(--r-scen) var(--r-scen);
}





#step-3 { font-size: 0.9375rem; line-height: 1.6; padding: 4px 12px 0; }

#step-3 .result-doc,
#step-3 .strom-doc { font-family: var(--font-body); }

#step-3 .result-doc :is(textarea, input, select, button) { font-family: var(--font-body); }







#strom-vy { gap: 0; }


.strom-rad { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; margin: 0 0 14px; }
.strom-status { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 12px; margin: 0; }
.strom-lage { color: var(--text); font-weight: 650; }
.strom-info { color: var(--text-muted); font-weight: 500; }

.ai-rad:not([hidden]) { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: var(--text-small); font-weight: 600; color: var(--text-muted); }
.ai-rad[data-lage="klar"] .ai-rad-snurra { display: none; }
.strom-rad .avbryt-generering { width: auto; flex: 0 0 auto; min-height: 44px; margin: 0; padding-inline: 18px; }
#strom-vy, #strom-vy * { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }

#strom-doc .strom-dold { display: none !important; }

.strom-markor { position: relative; display: inline-block; width: 0; height: 1em; vertical-align: text-bottom; }
.strom-markor::after { content: ""; position: absolute; left: 3px; top: 0.12em; width: 2px; height: 1.05em; border-radius: 1px; background: currentColor; opacity: 0.55; animation: strom-markor 1.1s steps(2, jump-none) infinite; }
@keyframes strom-markor { from { opacity: 0.7; } to { opacity: 0.1; } }
@media (prefers-reduced-motion: reduce) {
  .strom-markor::after { animation: none !important; opacity: 0.5; }
}


@media (min-width: 1100px) {
  #strom-vy:not([data-doctyp="remiss"], [data-doctyp="rontgen"], [data-doctyp="provsvar"], [data-doctyp="fk"]) #strom-doc { margin-right: 340px; }
}


#strom-doc.flow .doc-sec { padding-right: 44px; }
#strom-doc.flow .doc-sec:not(:last-child)::after { content: ""; display: block; height: 8px; margin-bottom: 10px; }
@media (hover: none) {
  #strom-doc.flow .doc-sec { padding-right: 78px; }
}


@media (prefers-reduced-motion: no-preference) {
  #result-wrap :is(.result-status, .result-toolbar, .dx-panel) { animation: verktyg-ton var(--tid-kort) var(--ease-byt) backwards; }
}
@keyframes verktyg-ton { from { opacity: 0; } to { opacity: 1; } }

.create-more-label {
  font-family: var(--sans);
  font-variant-numeric: tabular-nums;
  font-size: var(--t-etikett);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

#step-3 .btn-primary,
#step-3 .btn-ghost { font-size: var(--t-small); border-radius: var(--r-kontroll); }

#step-3 .btn-mic { border-radius: 10px; }

.result-toolbar {
  background: var(--ark-yta);
  border: 0;
  box-shadow: var(--sh-ark);
  border-radius: var(--r-panel);
  padding: 8px;
}

.result-doc {
  border: 0;
  box-shadow: var(--sh-ark);
  border-radius: var(--r-ark);
}

.dx-panel {
  border: 0;
  box-shadow: var(--sh-ark);
  border-radius: var(--r-panel);
}

.result-loading { padding: 88px 0; }

.laddsteg li { font-family: var(--sans); font-weight: 500; }

#step-3 > .step-actions,
#result-wrap > .step-actions { margin-top: 28px; }

.kopiera-ai { margin: 0 0 0 auto; font-size: var(--text-small); font-weight: 600; color: var(--text-muted); }

.webcert-hint { font-size: 0.8125rem; color: var(--text-soft); margin: 0 0 14px; }
.webcert-hint a { color: var(--mint-text); font-weight: 650; }

.sent-details { margin-top: 20px; }
.sent-details > summary { width: fit-content; cursor: pointer; font-size: var(--t-small); font-weight: 600; color: var(--text-soft); }
.sent-details > summary:focus-visible { outline: 2px solid var(--mint-text); outline-offset: 3px; border-radius: 4px; }
.sent-details[open] > summary { margin-bottom: 12px; }

.ext-capture { font-size: 0.8125rem; margin: 12px 0 0; padding: 9px 13px; border-radius: 10px; line-height: 1.45; }
.ext-capture-ok { background: #eaedf6; color: #1e2846; }
.ext-capture-warn { background: #fdf3e2; color: #6b4708; }
.ext-capture a { color: inherit; font-weight: 700; }












:root {
  --scen-topp: #fdfdfe;
  --ark-fot: #f8f9fb;
  --lista-yta: #ffffff;
  --lista-kant: rgba(20, 41, 94, 0.09);
  --lista-linje: rgba(20, 41, 94, 0.07);
  --sh-ark-fokus: 0 0 0 1px #6f8be8, 0 0 0 5px rgba(255, 181, 156, 0.42), 0 18px 40px -18px rgba(13, 27, 64, 0.24);
  --arbete-linje: #3f5bae;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --scen-topp: #182133;
    --ark-fot: #172030;
    --lista-yta: #182030;
    --lista-kant: #2c3752;
    --lista-linje: rgba(205, 216, 245, 0.07);
    --sh-ark-fokus: 0 0 0 1px #ff6a4d, 0 0 0 5px rgba(255, 181, 156, 0.14), 0 18px 40px -20px rgba(0, 0, 0, 0.6);
    --arbete-linje: #ffb59c;
  }
}

:root[data-theme="dark"] {
  --scen-topp: #182133;
  --ark-fot: #172030;
  --lista-yta: #182030;
  --lista-kant: #2c3752;
  --lista-linje: rgba(205, 216, 245, 0.07);
  --sh-ark-fokus: 0 0 0 1px #ff6a4d, 0 0 0 5px rgba(255, 181, 156, 0.14), 0 18px 40px -20px rgba(0, 0, 0, 0.6);
  --arbete-linje: #ffb59c;
}


.stage { background: linear-gradient(180deg, var(--scen-topp) 0, var(--scen-yta) 240px); }
.stage[data-step="3"] { background: linear-gradient(180deg, #ffffff 0, #fbfbfc 240px); }


.note-head { background: var(--ark-fot); border-top-color: var(--lista-linje); }


.btn-primary:not(:disabled) {
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0) 60%);
}


@media (min-width: 1024px) {
  .work-side .doc-grid {
    gap: 2px;
    padding: 4px;
    border-radius: 14px;
    background: var(--lista-yta);
    box-shadow: 0 0 0 1px var(--lista-kant), 0 1px 2px rgba(13, 27, 64, 0.04);
    min-height: calc(var(--antal-typer) * 42px + (var(--antal-typer) - 1) * 2px + 8px + var(--besok-plats));
    --besok-luft: 2px;
  }

  .work-side .type-pill {
    background: transparent;
    box-shadow: none;
    border-radius: 10px;
  }

  .work-side .type-pill:hover { background: var(--rad-hover); box-shadow: none; }

  .work-side .type-pill.active {
    background: var(--fill-brand);
    box-shadow: var(--sh-knapp), 0 6px 14px -10px rgba(13, 27, 64, 0.55);
  }

  .work-side .type-pill:focus-visible { outline-offset: -2px; }
}

@media (min-width: 1024px) and (max-height: 820px) {
  .work-side .doc-grid { min-height: calc(var(--antal-typer) * 36px + (var(--antal-typer) - 1) * 2px + 8px + var(--besok-plats)); gap: 2px; --besok-rad: 36px; }
}



@media (prefers-reduced-motion: no-preference) {
  .stage.steg-byte .step:not([hidden]) { animation: steg-ton var(--tid) var(--ease-byt) both; }
  .stage.steg-byte:is([data-step="2"], [data-step="3"]) .step:not([hidden]) { animation: steg-upp var(--tid) var(--ease-ut) both; }
}

@keyframes steg-ton { from { opacity: 0; } to { opacity: 1; } }
@keyframes steg-upp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }



.scrub-preview { position: relative; }

.scrub-preview::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(90deg, rgba(255, 181, 156, 0) 0, rgba(255, 181, 156, 0) calc(100% - 64px), rgba(255, 181, 156, 0.32) calc(100% - 3px), #1F3FB0 calc(100% - 2px), #1F3FB0 100%);
}

@media (prefers-reduced-motion: no-preference) {
  .stage.steg-byte[data-step="2"] .scrub-preview::after { animation: preview-svep 1100ms var(--ease-byt) 260ms both; }
  .stage.steg-byte[data-step="2"] .scrub-preview mark { animation: mark-in 500ms var(--ease-byt) 700ms both; }
}

@keyframes preview-svep {
  0% { opacity: 0; transform: translateX(-100%); }
  12% { opacity: 1; }
  88% { opacity: 1; }
  100% { opacity: 0; transform: translateX(0); }
}

@keyframes mark-in { from { opacity: 0.25; } to { opacity: 1; } }


#step-3 .strom-doc .doc-sec { animation: none; }

@keyframes kapitel-ut {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}



.stage::after {
  content: "";
  position: absolute;
  left: 28px;
  right: 28px;
  top: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--arbete-linje);
  transform: scaleX(0);
  transform-origin: left center;
  opacity: 0;
  pointer-events: none;
}

html.strommar .stage::after,
.stage[data-step="3"]:has(#result-loading:not([hidden]))::after { animation: arbete 1800ms var(--ease-byt) infinite; }

@keyframes arbete {
  0% { transform: scaleX(0); opacity: 1; }
  70% { transform: scaleX(1); opacity: 1; }
  100% { transform: scaleX(1); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html.strommar .stage::after,
  .stage[data-step="3"]:has(#result-loading:not([hidden]))::after { animation: none; transform: scaleX(1); opacity: 0.6; }
}



.qr-card {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 900;
  width: 232px;
  background: var(--surface-raised);
  border-radius: var(--r-ark);
  padding: 16px;
  text-align: center;
  box-shadow: var(--sh-meny);
}

.qr-title { font-size: 0.9375rem; font-weight: 800; color: var(--text); margin-bottom: 10px; font-family: var(--head); letter-spacing: -0.01em; }

.qr-box { background: #fff; border-radius: 12px; padding: 8px; box-shadow: inset 0 0 0 1px var(--line); }
.qr-box svg { display: block; width: 100%; height: auto; }

.qr-text { font-size: 0.8125rem; line-height: 1.45; color: var(--text-soft); margin: 10px 0 8px; }

.qr-close {
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  background: none;
  border: none;
  color: var(--text-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.qr-close:hover { color: var(--fg-brand); }

.relay-raw { text-align: left; margin: 0 0 10px; }
.relay-raw summary { font-size: 0.8125rem; font-weight: 600; color: var(--fg-brand); cursor: pointer; }
.relay-raw-text { font-family: var(--sans);
  font-variant-numeric: tabular-nums; font-size: 0.75rem; line-height: 1.5; color: var(--text); background: var(--bg-sunk); border-radius: 8px; padding: 8px 10px; margin: 8px 0; max-height: 220px; overflow: auto; white-space: pre-wrap; word-break: break-word; }
.relay-actions { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.relay-insert { font-family: inherit; font-size: var(--t-small); font-weight: 600; width: 100%; padding: 11px 14px; border: none; border-radius: 10px; background: var(--fill-brand); color: var(--on-fill-brand); cursor: pointer; box-shadow: var(--sh-knapp); }
.relay-insert:hover { background: var(--fill-brand-hover); }

.qr-fab {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 900;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  background: var(--surface-raised);
  color: var(--fg-brand);
  display: grid;
  place-items: center;
  box-shadow: var(--sh-meny);
  transition: box-shadow var(--tid-kort) var(--ease-byt), transform var(--tid-kort) var(--ease-ut);
}

.qr-fab:hover { transform: translateY(-1px); }
.qr-fab svg { width: 20px; height: 20px; }



.marketing { width: 100%; }

.marketing.is-away { display: none; }

.kapitel { padding: clamp(80px, 9vw, 144px) 0; }

.kapitel + .kapitel:not(.kapitel-morkt) { padding-top: 0; }

.kapitel.kapitel-morkt + .kapitel:not(.kapitel-morkt) { padding-top: clamp(80px, 9vw, 144px); }

.kapitel-inre {
  max-width: calc(var(--max) + 2 * var(--sida));
  margin: 0 auto;
  padding: 0 var(--sida);
}

.kapitel-smal { max-width: calc(820px + 2 * var(--sida)); }

.kapitel-huvud { max-width: 760px; margin-bottom: clamp(40px, 5vw, 72px); }



.kapitel-huvud-film {
  max-width: 760px;
  margin: 0 auto clamp(24px, 3vw, 32px);
  text-align: center;
}

.kapitel-huvud-film .kapitel-ingress { margin-left: auto; margin-right: auto; max-width: 62ch; }

.kapitel-huvud .ogonbryn { margin-bottom: 18px; }

.kapitel-titel {
  font-family: var(--head);
  font-size: var(--t-display);
  font-weight: var(--w-rubrik);
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--fg-brand);
  text-wrap: balance;
}

.kapitel-morkt .kapitel-titel { color: #ffffff; }

.kapitel-ingress {
  margin-top: 14px;
  font-size: var(--t-lead);
  line-height: 1.6;
  color: var(--lasa);
  max-width: 56ch;
  text-wrap: pretty;
}

.kapitel-lank { margin-top: 48px; font-weight: 600; }

.kapitel-lank a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
}


.kapitel-morkt {
  position: relative;
  background: var(--navy-deep);
  color: #e8ecf4;
  --text-soft: #b8c3dc;
  --lasa: #c6d0e6;
  --text-muted: #9fadcc;
  --line: rgba(205, 216, 245, 0.14);
  --line-strong: rgba(205, 216, 245, 0.24);
  --fg-brand: #ffffff;
  --token-yta: rgba(255, 181, 156, 0.12);
  --token-kant: rgba(255, 181, 156, 0.30);
  --token-text: #ffb59c;
  --amber-bg: rgba(240, 196, 121, 0.12);
  --amber-border: rgba(240, 196, 121, 0.35);
  --amber-text: #f0c479;
  --focus: #ffb59c;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .kapitel-morkt { background: #0b1531; box-shadow: inset 0 1px 0 rgba(205, 216, 245, 0.08), inset 0 -1px 0 rgba(205, 216, 245, 0.08); }
}
:root[data-theme="dark"] .kapitel-morkt { background: #0b1531; box-shadow: inset 0 1px 0 rgba(205, 216, 245, 0.08), inset 0 -1px 0 rgba(205, 216, 245, 0.08); }

.kapitel-morkt .ogonbryn { color: #ffb59c; }



@supports (animation-timeline: view()) {
  .journal-bild img,
  .noter-yta::before {
    animation: parallax linear both;
    animation-timeline: view();
    animation-range: cover;
  }
}

@keyframes parallax {
  from { transform: translateY(-5%) scale(1.12); }
  to { transform: translateY(5%) scale(1.12); }
}



.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 24px;
  border: 0;
  border-radius: var(--ui-r-pill);
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--tid-kort) var(--ease-byt), box-shadow var(--tid-kort) var(--ease-byt), color var(--tid-kort) var(--ease-byt), transform var(--tid-kort) var(--ease-ut);
}

.pill:active { transform: translateY(1px); }

.pill-fylld { background: var(--fill-brand); color: var(--on-fill-brand); box-shadow: var(--sh-knapp); }
.pill-fylld:hover { background: var(--fill-brand-hover); }

.pill-kontur { background: transparent; color: var(--fg-brand); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.pill-kontur:hover { box-shadow: inset 0 0 0 1.5px var(--fg-brand); }

.pill-ljus { background: #ffffff; color: #0d1b40; }
.pill-ljus:hover { background: #e8ecf7; }

.pill-kontur-ljus { background: rgba(255, 255, 255, 0.06); color: #ffffff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.55); }
.pill-kontur-ljus:hover { background: rgba(255, 255, 255, 0.14); box-shadow: inset 0 0 0 1.5px #ffffff; }

.pill:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }



.kapitel-fragor .kapitel-inre {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: 32px 72px;
  align-items: start;
}

.kapitel-fragor .kapitel-huvud {
  position: sticky;
  top: calc(var(--topbar-h) + 40px);
  margin-bottom: 0;
}


.kapitel-fragor .kapitel-huvud { padding-top: 15px; }

.kapitel-fragor .kapitel-ingress { font-size: 1rem; }

.kapitel-fragor .kapitel-ingress a {
  color: var(--fg-brand);
  font-weight: 600;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 4px;
}

.fragor { border-top: 1px solid var(--line); }

.fraga { border-bottom: 1px solid var(--line); }

.fraga > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0;
  font-size: 1.0625rem;
  font-weight: var(--w-rubrik);
  letter-spacing: -0.01em;
  color: var(--text);
  border-radius: 6px;
  font-family: var(--head);
}

.fraga > summary::-webkit-details-marker { display: none; }


.fraga > summary::after {
  content: "";
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  background:
    linear-gradient(var(--text-muted), var(--text-muted)) center / 14px 1.5px no-repeat,
    linear-gradient(var(--text-muted), var(--text-muted)) center / 1.5px 14px no-repeat;
  transition: transform var(--tid) var(--ease-ut);
}

.fraga[open] > summary::after { background: linear-gradient(var(--text), var(--text)) center / 14px 1.5px no-repeat; transform: rotate(180deg); }

.fraga > summary:hover { color: var(--fg-brand); }

.fraga p {
  padding: 0 48px 24px 0;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--lasa);
  max-width: 68ch;
}



.kapitel-slut { padding-bottom: clamp(72px, 8vw, 120px); }

.slut {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-ark);
  min-height: clamp(320px, 28vw, 400px);
  display: grid;
  align-items: center;
  background: #1b2232;
  box-shadow: 0 40px 80px -40px rgba(13, 27, 64, 0.45);
}

.slut-bild { position: absolute; inset: 0; }

.slut-bild img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 55% center; }

.slut::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(8, 15, 32, 0.9) 0%, rgba(8, 15, 32, 0.78) 48%, rgba(8, 15, 32, 0.2) 85%);
}

.slut-innehall {
  position: relative;
  z-index: 1;
  max-width: 560px;
  padding: clamp(40px, 6vw, 72px);
  color: #fff;
}

.slut-titel {
  font-size: var(--t-display);
  line-height: 1.1;
  color: #ffffff;
  text-wrap: balance;
  font-family: var(--head);
  font-weight: var(--w-rubrik);
  letter-spacing: -0.02em;
}

.slut-text { margin-top: 14px; font-size: 1.0625rem; line-height: 1.6; color: rgba(255, 255, 255, 0.84); text-wrap: pretty; }

.slut-knappar { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.slut .pill-fylld { background: #ffffff; color: #0d1b40; box-shadow: none; }
.slut .pill-fylld:hover { background: #e8ecf7; }
.slut .pill:focus-visible { outline-color: #ffb59c; }






.funk-rader {
  display: grid;
  gap: clamp(56px, 6vw, 88px);
  margin-top: clamp(64px, 7vw, 104px);
  padding-top: clamp(56px, 6vw, 88px);
  border-top: 1px solid var(--line);
}

.funk-rad {
  display: grid;
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
}

.funk-prata { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
.funk-journal { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); }

.funk-text { min-width: 0; }

.funk-titel {
  font-family: var(--head);
  font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2rem);
  font-weight: var(--w-rubrik);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--fg-brand);
  text-wrap: balance;
}

.funk-prata .funk-titel span { display: block; }
.funk-accent { color: var(--mint-text); }

.funk-under {
  margin-top: 14px;
  font-size: var(--t-lead);
  line-height: 1.5;
  font-weight: 500;
  color: var(--text);
}

.funk-mer {
  margin-top: 8px;
  max-width: 44ch;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--lasa);
}

.funk-lank { margin-top: 20px; font-size: 1rem; font-weight: 600; }

.funk-lank a {
  color: var(--fg-brand);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  transition: text-decoration-color var(--tid-kort) var(--ease-byt);
}

.funk-lank a:hover { text-decoration-color: currentColor; }

.funk-bild {
  position: relative;
  margin: 0;
  aspect-ratio: 818 / 490;
  border-radius: var(--r-ark);
  overflow: hidden;
  background: #ece8e3;
  box-shadow: 0 0 0 1px rgba(20, 41, 94, 0.06), 0 12px 32px -18px rgba(13, 27, 64, 0.22);
}

.funk-bild img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 35% center;
}





.kapitel-film {
  --film-topp: clamp(56px, 6vw, 88px);
  padding-top: var(--film-topp);
  scroll-margin-top: calc(24px - var(--film-topp));
}

.film-ram { margin: 0 auto; max-width: 760px; }

.film-yta {
  position: relative;
  border-radius: var(--r-ark);
  overflow: hidden;
  background: var(--scen-yta);
  aspect-ratio: 16 / 9;
  box-shadow: 0 0 0 1px var(--scen-kant), 0 1px 2px rgba(13, 27, 64, 0.06), 0 14px 32px -20px rgba(13, 27, 64, 0.22);
}

.film-affisch img,
.film-video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.film-affisch img { background: #f4f5f7; }



.film-video { opacity: 0; transition: opacity 300ms var(--ease-byt); }
.film-spelad .film-video { opacity: 1; }

.film-knapp {
  position: absolute;
  left: 16px;
  bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  padding: 0 18px 0 14px;
  border: 0;
  border-radius: var(--ui-r-pill);
  background: rgba(13, 27, 64, 0.82);
  color: #fff;
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px -10px rgba(13, 27, 64, 0.6);
  transition: background var(--tid-kort) var(--ease-byt);
}

.film-knapp:hover { background: rgba(13, 27, 64, 0.94); }
.film-knapp:focus-visible { outline: 2px solid #ffb59c; outline-offset: 3px; }
.film-knapp svg { width: 16px; height: 16px; fill: currentColor; }
.film-knapp .ikon-paus { display: none; }
.film-knapp[aria-pressed="true"] .ikon-paus { display: block; }
.film-knapp[aria-pressed="true"] .ikon-spela { display: none; }

.film-kapitel {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  margin-top: 18px;
}

.film-kapitel button {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 10px;
  width: 100%;
  padding: 16px 16px 4px 0;
  border: 0;
  background: none;
  text-align: left;
  font-family: var(--sans);
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--tid) var(--ease-byt);
}



.film-kapitel button::before {
  content: "";
  position: absolute;
  left: 0;
  right: 16px;
  top: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--line);
}

.film-kapitel button::after {
  content: "";
  position: absolute;
  left: 0;
  right: 16px;
  top: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--mint-text);
  transform: scaleX(var(--andel, 0));
  transform-origin: left center;
}

.film-not {
  margin-top: 14px;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.film-kapitel .nr { font-family: var(--sans);
  font-variant-numeric: tabular-nums; font-size: 0.6875rem; letter-spacing: 0.06em; }

.film-kapitel button:hover,
.film-kapitel button.aktiv { color: var(--text); }

.film-kapitel button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }



.mint-ord { color: var(--mint-text); }
.kapitel-morkt .mint-ord { color: #ffb59c; }



.noter-ark,
.journal-mall {
  --token-yta: #e8ecf7;
  --token-kant: rgba(31, 63, 176, 0.18);
  --token-text: #1F3FB0;
  --amber-bg: #fdf4e6;
  --amber-border: #f0d9ae;
  --amber-text: #91641c;
}



.pastaende {
  max-width: calc(var(--max) + 2 * var(--sida));
  margin: clamp(48px, 6vw, 88px) auto 0;
  padding: 0 var(--sida);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px 40px;
}

.pastaende-text {
  max-width: 30em;
  font-family: var(--head);
  font-size: clamp(1.25rem, 0.95rem + 1vw, 1.75rem);
  font-weight: var(--w-rubrik);
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--fg-brand);
  text-wrap: balance;
}

.pastaende-lankar {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
}

.pastaende-lank {
  font-size: 1rem;
  font-weight: 600;
  color: var(--fg-brand);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  text-decoration-color: var(--line-strong);
}

.pastaende-lank:hover { text-decoration-color: currentColor; }



.noter-titel { max-width: 15ch; margin-bottom: clamp(36px, 4.5vw, 64px); }

.noter {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: stretch;
}

.noter-yta {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin: 0;
  padding: clamp(28px, 4vw, 56px);
  border-radius: var(--r-ark);
  overflow: hidden;
  isolation: isolate;
  background: #e9e4dc;
  box-shadow: 0 0 0 1px var(--scen-kant), 0 12px 32px -18px rgba(13, 27, 64, 0.3);
}

.noter-yta::before {
  content: "";
  position: absolute;
  inset: -6%;
  z-index: -1;
  background: var(--yta) center / cover no-repeat;
}

.noter-ark {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: clamp(20px, 2.4vw, 32px) clamp(20px, 2.6vw, 36px) clamp(22px, 2.6vw, 36px);
  border-radius: 16px;
  background: #ffffff;
  color: #101728;
  font-size: clamp(0.9375rem, 0.85rem + 0.3vw, 1.0625rem);
  line-height: 1.85;
  box-shadow: 0 0 0 1px rgba(20, 41, 94, 0.06), 0 26px 50px -26px rgba(13, 27, 64, 0.5);
}

.noter-typer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 6px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid #eef0f4;
}

.noter-typ {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-sizing: border-box;
  min-height: 30px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  padding: 0 12px;
  border-radius: 999px;
  color: #5b6478;
  box-shadow: inset 0 0 0 1px rgba(20, 41, 94, 0.12);
  transition: transform 200ms var(--ease-ut), box-shadow 200ms var(--ease-byt);
}

.noter-vald { background: #14295e; color: #ffffff; box-shadow: none; }

.noter-typ .nr { margin-left: 0; width: 1rem; height: 1rem; vertical-align: baseline; }
.noter-typ.noter-vald .nr { background: #ffb59c; color: #14295e; }
.noter-vald .nr { background: #ffb59c; color: #14295e; }


.markering {
  border-radius: 4px;
  padding: 1px 1px;
  --mk: #dee3f1;
  background-image: linear-gradient(var(--mk), var(--mk));
  background-repeat: no-repeat;
  background-position: 0 0;
  background-size: 0% 100%;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  transition: background-size 800ms var(--ease-ut) var(--d, 0ms), --mk 200ms var(--ease-byt), box-shadow 200ms var(--ease-byt);
}

.syns .markering { background-size: 100% 100%; }

.noter-text .markering:nth-of-type(2) { --d: 300ms; }
.noter-text .markering:nth-of-type(3) { --d: 600ms; }
.noter-text .markering:nth-of-type(4) { --d: 900ms; }


.nr {
  font-family: var(--head);
  font-style: normal;
  font-weight: 800;
  font-size: 0.625rem;
  line-height: 1;
  color: #1F3FB0;
}

.noter-ark .nr {
  display: inline-grid;
  place-items: center;
  width: 1.125rem;
  height: 1.125rem;
  margin-left: 4px;
  border-radius: 50%;
  background: #14295e;
  color: #ffffff;
  vertical-align: 0.5em;
}

.noter-saknas { margin-top: 10px; line-height: 1.4; }

.noter-lucka {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  border: 1.5px dashed #e3c385;
  background: #fdf4e6;
  color: #7a5414;
  font-size: 0.8125rem;
  font-weight: 600;
  opacity: 0;
  transition: opacity 500ms var(--ease-byt) 1500ms, transform 200ms var(--ease-ut), box-shadow 200ms var(--ease-byt), background-color 200ms var(--ease-byt);
}

.syns .noter-lucka { opacity: 1; }





.noter-lista {
  list-style: none;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 22px;
  padding-block: 4px;
}

.noter-lista::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 100px;
  border-radius: 3px;
  background: var(--mint-text);
  transform: translateY(var(--y, 0px)) scaleY(var(--h, 0.5));
  transform-origin: 0 0;
  opacity: 0;
  transition: transform 450ms var(--ease-ut), opacity 250ms var(--ease-byt);
  pointer-events: none;
}

.noter[data-aktiv] .noter-lista::before { opacity: 1; }

.not {
  position: relative;
  display: grid;
  grid-template-columns: 1.5rem minmax(0, 1fr);
  column-gap: 12px;
  align-items: start;
  padding: 6px 0 6px 20px;
  cursor: default;
}

.not .nr {
  grid-row: 1;
  display: grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  margin: 0;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px var(--line-strong);
  font-size: 0.75rem;
  color: var(--fg-brand);
  transition: background-color 200ms var(--ease-byt), box-shadow 200ms var(--ease-byt);
}

.not h3 {
  font-family: var(--head);
  font-size: 1.125rem;
  font-weight: var(--w-rubrik);
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--fg-brand);
  transition: color 200ms var(--ease-byt);
}

.not h3, .not p { grid-column: 2; }

.not-knapp {
  all: unset;
  cursor: pointer;
  border-radius: 4px;
}

.not-knapp:focus-visible { outline: 2px solid var(--mint-text); outline-offset: 3px; }

.not p {
  margin-top: 4px;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--lasa);
  transition: color 200ms var(--ease-byt);
}


.noter[data-aktiv] .not:not(.aktiv) h3 { color: var(--text-soft); }
.noter[data-aktiv] .not:not(.aktiv) p { color: var(--text-soft); }
.not.aktiv .nr { background: var(--mint-soft); box-shadow: inset 0 0 0 1.5px var(--mint-text); }
.not.aktiv h3 { color: var(--fg-brand); }



@property --mk { syntax: "<color>"; inherits: false; initial-value: #dee3f1; }

.noter-ark [data-m] { cursor: default; }

.noter[data-aktiv] .markering { --mk: #eef1f9; }
.noter[data-aktiv] .markering.aktiv {
  --mk: #e6b5a6;
  box-shadow: 0 0 0 2px #2f478f;
}
.noter[data-aktiv] .noter-vald.aktiv { box-shadow: 0 0 0 3px #2f478f; transform: scale(1.06); }
.noter[data-aktiv] .noter-lucka.aktiv { box-shadow: 0 0 0 2px #2f478f; transform: scale(1.05); background: #fbe7c3; }
.noter-ark .nr { transition: transform 200ms var(--ease-ut); }
.noter-ark .aktiv > .nr { transform: scale(1.25); }



.journal-bild {
  position: relative;
  margin: 0;
  aspect-ratio: 1 / 1;
  border-radius: var(--r-ark);
  overflow: hidden;
  background: #1b2232;
  box-shadow: 0 0 0 1px var(--scen-kant), 0 12px 32px -18px rgba(13, 27, 64, 0.3);
}

.journal-bild img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 30% center; }


.journal-mall {
  position: absolute;
  left: 7%;
  right: 7%;
  bottom: 7%;
  padding: 16px 18px 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  color: #101728;
  font-size: 0.8125rem;
  line-height: 1.4;
  box-shadow: 0 0 0 1px rgba(20, 41, 94, 0.06), 0 24px 48px -20px rgba(13, 27, 64, 0.55);
}

.journal-mall-rubrik {
  margin-bottom: 6px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #646c7e;
}

.journal-falt {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid #eef0f4;
}

.journal-falt b { font-family: var(--head); font-weight: 700; color: #14295e; }

.journal-falt span {
  border-radius: 4px;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 700ms var(--ease-ut) var(--d, 0ms), background-color 600ms var(--ease-byt) calc(var(--d, 0ms) + 700ms);
  background-color: #dee3f1;
}

.journal-falt:nth-of-type(2) span { --d: 200ms; }
.journal-falt:nth-of-type(3) span { --d: 550ms; }
.journal-falt:nth-of-type(4) span { --d: 900ms; }
.journal-falt:nth-of-type(5) span { --d: 1250ms; }

.syns .journal-falt span { clip-path: inset(0 0 0 0); background-color: transparent; }

.journal-mal { margin-top: 24px; border-top: 1px solid var(--line); }

.journal-rad {
  display: grid;
  grid-template-columns: minmax(0, 9rem) minmax(0, 1fr);
  gap: 8px 28px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.journal-rad dt {
  font-family: var(--head);
  font-size: 1.125rem;
  font-weight: var(--w-rubrik);
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--fg-brand);
}

.journal-rad dd {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--lasa);
}

.journal-knappar { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }



@media (max-width: 1023px) {
  .noter { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 520px) {
  .journal-rad { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .markering, .noter-lucka, .noter-typ, .noter-lista::before, .not .nr, .not h3, .not p, .noter-ark .nr,
  .journal-falt span { transition: none !important; }
}



.hero-lager {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2100;
  overflow: hidden;
  background: #0b1426;
  color: #ffffff;
  outline: none;
  touch-action: none;
  overscroll-behavior: contain;
  transition: opacity 400ms var(--ease-byt), transform 400ms var(--ease-byt);
}

html.hero-pa .hero-lager { display: block; }

html.hero-stangs .hero-lager { pointer-events: none; }

.hero-lager.hero-tona { opacity: 0; }
.hero-lager.hero-glid { opacity: 0; transform: translateY(-14%); }


.hero-lager-bild {
  position: absolute;
  inset: 0;
  background-color: #1b2232;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  background-image: url("/media/hero-rum.webp?v=2");
  background-image: image-set(url("/media/hero-rum.avif?v=2") type("image/avif"), url("/media/hero-rum.webp?v=2") type("image/webp"));
  transform-origin: 60% 50%;
  animation: hero-kenburns 9s cubic-bezier(0.25, 0.1, 0.25, 1) both;
}

@keyframes hero-kenburns {
  from { transform: scale(1); }
  to { transform: scale(1.06) translateX(-1.2%); }
}

.hero-lager-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 600ms var(--ease-byt);
}

.hero-film .hero-lager-video { opacity: 1; }



.hero-lager-ton {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 15, 32, 0.80) 0%, rgba(8, 15, 32, 0.55) 38%, rgba(8, 15, 32, 0.10) 72%, rgba(8, 15, 32, 0) 100%),
    linear-gradient(0deg, rgba(8, 15, 32, 0.55) 0%, rgba(8, 15, 32, 0) 32%);
}

.hero-lager-topp {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--topbar-h);
  max-width: calc(var(--max) + 2 * var(--sida));
  margin: 0 auto;
  padding: 0 var(--sida);
}

.hero-lager-logga { position: relative; display: inline-flex; align-items: center; gap: 10px; font-size: 1.3125rem; font-weight: 800; letter-spacing: -0.045em; font-family: var(--head); }
.hero-lager-logga img { width: 30px; height: 30px; border-radius: 22.66%; }





.hero-lager-topp::before {
  content: "";
  position: absolute;
  right: calc(var(--sida) - 262px);
  top: -118px;
  width: 640px;
  height: 300px;
  background: radial-gradient(closest-side, rgba(10, 18, 40, 0.56) 0%, rgba(10, 18, 40, 0.44) 30%, rgba(10, 18, 40, 0.2) 62%, rgba(10, 18, 40, 0) 100%);
  pointer-events: none;
}

.hero-lager-hoppa {
  position: relative;
  height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: var(--ui-r-pill);



  background: rgba(13, 27, 64, 0.12);
  color: #ffffff;
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(8, 15, 32, 0.55);
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(6px) saturate(1.3);
  -webkit-backdrop-filter: blur(6px) saturate(1.3);
  transition: background var(--tid-kort) var(--ease-byt), box-shadow var(--tid-kort) var(--ease-byt);
}

.hero-lager-hoppa:hover,
.hero-lager-hoppa:focus-visible { background: rgba(13, 27, 64, 0.26); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7); }


@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .hero-lager-hoppa { background: rgba(13, 27, 64, 0.32); }
  .hero-lager-hoppa:hover, .hero-lager-hoppa:focus-visible { background: rgba(13, 27, 64, 0.46); }
}


.hero-lager button:focus-visible { outline: 2px solid #ffb59c; outline-offset: 3px; }

.hero-lager-innehall {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-46%);
  max-width: calc(var(--max) + 2 * var(--sida));
  margin: 0 auto;
  padding: 0 var(--sida);
}

.hero-lager-innehall > * { max-width: 620px; }

.hero-lager-halsning {
  margin-bottom: 18px;
  font-family: var(--sans);
  font-variant-numeric: tabular-nums;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #ffb59c;
}

.hero-lager-titel {
  font-family: var(--head);
  font-size: clamp(2.75rem, 1.5rem + 4vw, 4.5rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: #ffffff;
  text-wrap: balance;
}

.hero-lager-titel em { display: block; font-style: normal; color: #ffb59c; }

.hero-lager-innehall > .hero-lager-titel { max-width: 780px; }

.hero-lager-text {
  margin-top: 22px;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.86);
  max-width: 34em;
}

.hero-lager-knappar { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.hero-lager .pill-fylld { background: #ffffff; color: #0d1b40; box-shadow: none; }
.hero-lager .pill-fylld:hover { background: #e8ecf7; }





.hero-lager-innehall > *,
.hero-lager-logga { animation: hero-in 900ms var(--ease-ut) both; }
.hero-lager-innehall > :nth-child(2) { animation-delay: 120ms; }
.hero-lager-innehall > :nth-child(3) { animation-delay: 240ms; }
.hero-lager-innehall > :nth-child(4) { animation-delay: 360ms; }

@keyframes hero-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}


.hero-lager-tid {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.14);
}

.hero-lager-tid span {
  display: block;
  height: 100%;
  background: #ffb59c;
  transform: scaleX(0);
  transform-origin: left center;
}

.hero-tidur .hero-lager-tid span { animation: hero-tid var(--hero-tid, 7500ms) linear forwards; }

@keyframes hero-tid { to { transform: scaleX(1); } }

@media (max-width: 860px) {
  .hero-lager-bild {
    background-image: url("/media/hero-rum-smal.webp?v=2");
    background-image: image-set(url("/media/hero-rum-smal.avif?v=2") type("image/avif"), url("/media/hero-rum-smal.webp?v=2") type("image/webp"));
    background-position: 22% center;
  }
  .hero-lager-video { object-position: 22% center; }
  .hero-lager-ton { background: linear-gradient(0deg, rgba(8, 15, 32, 0.88) 0%, rgba(8, 15, 32, 0.6) 42%, rgba(8, 15, 32, 0.15) 70%, rgba(8, 15, 32, 0.25) 100%); }
  .hero-lager-innehall { top: auto; bottom: 40px; transform: none; }
  .hero-lager-titel { font-size: clamp(2.75rem, 1.5rem + 7vw, 3.75rem); }
  .hero-lager-text { font-size: 1rem; margin-top: 16px; }
  .hero-lager-knappar { margin-top: 24px; }
  .hero-lager-knappar .pill { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-lager-bild { animation: none; }
}



.footer {
  margin-top: auto;
  background: var(--navy-deep);
  color: #dbe3f3;
  padding: 56px var(--sida) 40px;
}

:root[data-theme="dark"] .footer { background: #0a1124; box-shadow: inset 0 1px 0 rgba(205, 216, 245, 0.08); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .footer { background: #0a1124; box-shadow: inset 0 1px 0 rgba(205, 216, 245, 0.08); }
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 28px 48px;
  align-items: flex-start;
  justify-content: space-between;
}

.footer-brand { min-width: 0; }

.footer .brand { display: inline-flex; color: #fff; }
.footer .brand-mark { box-shadow: none; }

.footer-slogan {
  margin-top: 14px;
  font-size: 1.25rem;
  font-weight: var(--w-rubrik);
  letter-spacing: -0.02em;
  color: #fff;
  font-family: var(--head);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  font-size: var(--t-small);
}

.footer a { color: #dbe3f3; font-weight: 500; text-decoration-color: rgba(219, 227, 243, 0.4); text-underline-offset: 4px; }
.footer a:hover { color: #fff; text-decoration-color: #fff; }
.footer a:focus-visible { outline-color: #ffb59c; }
.footer .brand { text-decoration: none; }

.footer-bottom {
  max-width: var(--max);
  margin: 36px auto 0;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
}

.footer-film {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.8125rem;
}

.footer p:not(.footer-slogan) {
  font-size: 0.8125rem;
  line-height: 1.6;
  color: #a5b1cb;
  max-width: 64ch;
}



.prose-sida {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--sida));
  margin: 0 auto;
  padding: clamp(48px, 7vw, 96px) var(--sida) clamp(72px, 8vw, 128px);
  display: grid;
  grid-template-columns: minmax(0, 260px) minmax(0, 720px);
  gap: 32px 72px;
  justify-content: space-between;
}

.prose-sida-huvud { grid-column: 1 / -1; max-width: 860px; }

.prose-sida-huvud .ogonbryn { margin-bottom: 18px; }

.prose-sida-huvud h1 {
  font-size: var(--t-display);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -0.03em;
  color: var(--fg-brand);
  text-wrap: balance;
  font-family: var(--head);
}

.innehall {
  position: sticky;
  top: calc(var(--topbar-h) + 32px);
  align-self: start;
}

.innehall ol { list-style: none; display: flex; flex-direction: column; gap: 2px; border-left: 1px solid var(--line); }

.innehall a {
  display: block;
  padding: 6px 0 6px 16px;
  margin-left: -1px;
  border-left: 1px solid transparent;
  font-size: var(--t-small);
  color: var(--text-soft);
  text-decoration: none;
  transition: color var(--tid-kort) var(--ease-byt), border-color var(--tid-kort) var(--ease-byt);
}

.innehall a:hover { color: var(--fg-brand); border-left-color: var(--fg-brand); }

.prose {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text);
}

.prose h2 {
  font-size: clamp(1.375rem, 1.1rem + 0.8vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--fg-brand);
  margin: 56px 0 14px;
  scroll-margin-top: calc(var(--topbar-h) + 24px);
  font-family: var(--head);
}

.prose h2:first-child { margin-top: 0; }

.prose p, .prose li { margin-bottom: 12px; }

.prose ol, .prose ul { padding-left: 22px; margin-bottom: 12px; }

.prose li::marker { color: var(--text-muted); }

.prose ol li::marker { font-family: var(--sans);
  font-variant-numeric: tabular-nums; font-size: 0.875em; }

.prose strong { font-weight: 650; color: var(--fg-brand); }

.prose a { color: var(--fg-brand); font-weight: 600; text-underline-offset: 4px; text-decoration-thickness: 1px; }

.prose-kort {
  background: var(--ark-yta);
  border-radius: var(--r-ark);
  box-shadow: var(--sh-ark);
  padding: 26px 30px;
  font-size: 1.1875rem;
  line-height: 1.6;
  letter-spacing: -0.005em;
  color: var(--text);
}

.prose .prose-kort { margin-bottom: 8px; }

.prose-tillbaka { margin-top: 48px; }

.prose .prose-tillbaka a { color: var(--on-fill-brand); text-decoration: none; }

@media (max-width: 860px) {
  .prose-kort { padding: 20px 20px; font-size: 1.0625rem; }
  .prose-sida { gap: 24px; }
  .innehall ol { flex-direction: row; flex-wrap: wrap; gap: 6px; border-left: 0; }
  .innehall a { padding: 6px 12px; margin: 0; border: 0; border-radius: var(--ui-r-pill); box-shadow: inset 0 0 0 1px var(--rad-kant); background: var(--rad-yta); font-size: 0.8125rem; }
  .innehall a:hover { box-shadow: inset 0 0 0 1px var(--fg-brand); }
}





.prose-shell {
  flex: 1;
  width: 100%;
  max-width: calc(820px + 2 * var(--sida));
  margin: 0 auto;
  padding: clamp(48px, 7vw, 88px) var(--sida) clamp(72px, 8vw, 120px);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text);
}

.prose-shell h1 {
  font-size: var(--t-display);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -0.03em;
  color: var(--fg-brand);
  margin-bottom: 20px;
  text-wrap: balance;
  font-family: var(--head);
}

.prose-shell > p:first-of-type { font-size: var(--t-lead); color: var(--text-soft); line-height: 1.55; }

.prose-shell h2 {
  font-size: clamp(1.375rem, 1.1rem + 0.8vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--fg-brand);
  margin: 48px 0 12px;
  text-wrap: balance;
  font-family: var(--head);
}

.prose-shell h3 {
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--text);
  margin: 28px 0 10px;
  font-family: var(--head);
}

.prose-shell p, .prose-shell li { margin-bottom: 10px; }
.prose-shell ul, .prose-shell ol { padding-left: 22px; margin-bottom: 12px; }
.prose-shell li::marker { color: var(--text-muted); }
.prose-shell strong { font-weight: 650; }
.prose-shell a { color: var(--fg-brand); font-weight: 600; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.prose-shell code {
  font-family: var(--sans);
  font-variant-numeric: tabular-nums;
  font-size: 0.8125em;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--bg-sunk);
  box-shadow: inset 0 0 0 1px var(--line);
}

.val-kort { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 28px 0 8px; }

.val-kort .val {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 20px;
  border-radius: var(--r-panel);
  background: var(--ark-yta);
  box-shadow: var(--sh-ark);
  color: var(--fg-brand);
  text-decoration: none;
  transition: box-shadow var(--tid-kort) var(--ease-byt);
}

.val-kort .val:hover { box-shadow: 0 0 0 1px var(--fg-brand), 0 10px 28px -14px rgba(13, 27, 64, 0.18); }
.val-kort .val strong { font-size: 1rem; font-weight: 650; }
.val-kort .val span { font-size: var(--t-small); line-height: 1.5; color: var(--text-soft); font-weight: 400; }

.tool {
  margin: 32px -8px;
  padding: 30px 32px 22px;
  border-radius: var(--r-ark);
  background: var(--ark-yta);
  box-shadow: var(--sh-ark);
  scroll-margin-top: calc(var(--topbar-h) + 16px);
}

.tool h2 { margin-top: 0; }
.tool .tool-tag { font-size: var(--t-small); color: var(--text-soft); margin: -4px 0 16px; }

.dl-btn {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin: 8px 0 14px;
  padding: 13px 22px;
  border-radius: var(--r-kontroll);
  background: var(--fill-brand);
  color: var(--on-fill-brand) !important;
  box-shadow: var(--sh-knapp);
  font-weight: 600;
  text-decoration: none;
  transition: background var(--tid-kort) var(--ease-byt);
}

.dl-btn:hover { background: var(--fill-brand-hover); }
.dl-btn small { font-family: var(--sans);
  font-variant-numeric: tabular-nums; font-size: 0.75rem; font-weight: 500; opacity: 0.8; }

.tool ol.guide { counter-reset: g; list-style: none; padding-left: 0; }

.tool ol.guide > li {
  counter-increment: g;
  position: relative;
  padding: 2px 0 8px 42px;
  margin: 0 0 6px;
}

.tool ol.guide > li::before {
  content: counter(g, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 3px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--line-strong);
  font-family: var(--sans);
  font-variant-numeric: tabular-nums;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--text);
}

.callout {
  margin: 16px 0;
  padding: 14px 18px;
  border-radius: var(--r-kontroll);
  background: var(--callout-bg);
  box-shadow: inset 3px 0 0 var(--fg-brand);
  font-size: 1rem;
}

.callout strong { color: var(--fg-brand); }

.guide-mer { border-top: 1px solid var(--line); padding: 14px 0 6px; }
.guide-mer:last-of-type { border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.guide-mer summary { cursor: pointer; font-weight: 650; font-size: 1.0625rem; color: var(--fg-brand); list-style-position: outside; }
.guide-mer[open] summary { margin-bottom: 10px; }

.fine-print { margin-top: 32px; font-size: var(--t-small); color: var(--text-muted); }

@media (max-width: 860px) {
  .tool { margin: 24px -4px; padding: 22px 18px 16px; }
  .dl-btn { flex-direction: column; align-items: flex-start; gap: 2px; }
}






.qr-fab,
#qr-card {
  transition: opacity var(--tid) var(--ease-byt), transform var(--tid) var(--ease-ut), visibility 0s;
}

html.utanfor-scen .qr-fab,
html.utanfor-scen #qr-card {
  opacity: 0;
  transform: translateY(12px);
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--tid-kort) var(--ease-byt), transform var(--tid) var(--ease-ut), visibility 0s var(--tid);
}







@media (max-width: 1023px) {
  .hero-rad { padding: 8px 0 20px; }

  .announce-long { display: none; }
  .announce-short { display: inline; }



  textarea#note-input {
    height: max(160px, min(24vh, calc(100vh - 520px)));
    height: max(160px, min(24dvh, calc(100dvh - 520px)));
    min-height: 160px;
    max-height: 62vh;
    max-height: 62dvh;
    font-size: 1rem;
    padding: 18px 20px 14px;
  }






  .funk-prata, .funk-journal { grid-template-columns: minmax(0, 1fr); }
  .funk-prata .funk-bild { order: -1; }
  .funk-journal .journal-bild { aspect-ratio: 4 / 3; }

  .film-kapitel { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 4px; }

  .kapitel-fragor .kapitel-inre { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .kapitel-fragor .kapitel-huvud { position: static; margin-bottom: 32px; }

  .prose-sida { grid-template-columns: minmax(0, 1fr); }
  .innehall { position: static; }
}



@media (max-width: 860px) {
  :root { --topbar-h: 58px; }

  .topbar-right { gap: 8px; }
  .brand-pilot, .badge-nostore, .badge-ext { display: none; }
  .topbar-right .theme-toggle { display: grid; }

  .stage { padding: 0 14px 14px; border-radius: 24px; }

  .funk-bild img { object-position: center; }

  .film-yta { border-radius: 14px; }
  .film-knapp { left: 12px; bottom: 12px; height: 40px; }
  .slut-innehall { padding: 32px 24px; }
  .slut::after { background: linear-gradient(0deg, rgba(8, 15, 32, 0.92) 0%, rgba(8, 15, 32, 0.78) 62%, rgba(8, 15, 32, 0.4) 100%); }
  .slut { align-items: end; min-height: 440px; }
  .slut-knappar .pill { flex: 1 1 auto; }

  .scen-rad { flex-wrap: wrap; gap: 6px 12px; padding: 10px 2px 8px; min-height: 0; }
  .announce { margin-left: 0; flex: 1 1 100%; height: 30px; padding: 0 0 0 2px; }
  .progress { gap: 6px; }
  .progress-dot + .progress-dot::before { width: 14px; }
  .dot-label { font-size: 0.8125rem; }


  select, input[type="text"], input[type="password"], input[type="search"], textarea { font-size: 16px; }

  .note-head { padding: 8px; gap: 6px; }
  .btn-paste, .btn-mic { padding: 0 10px; }
  .note-hint { display: none; }
  .mic-menu { width: min(290px, calc(100vw - 56px)); }

  .type-block { margin-top: 18px; }
  .doc-grid { gap: 6px; }
  .type-pill { height: 40px; font-size: var(--t-small); padding: 0 13px 0 11px; gap: 9px; }

  .name-row { grid-template-columns: 1fr; }

  #step-1 .step-actions {
    margin: 16px -14px -14px;
    padding: 10px 14px calc(12px + env(safe-area-inset-bottom, 0px));
    border-radius: 0 0 24px 24px;
    column-gap: 8px;
  }

  #step-1 .gate-hint { text-align: center; }
  #step-1 #paste-btn { padding: 0 14px; }
  #step-1 #to-step-2 { padding: 0 16px; }

  #step-2 { padding: 4px 4px 0; }
  #step-2 .step-actions-sticky { margin: 20px -18px -14px; padding: 12px 18px; border-radius: 0 0 24px 24px; }

  #step-3 { padding: 4px 0 0; }



  #step-3 .result-doc { padding: 22px 16px; }

  .qr-card, .qr-fab { display: none; }

  .kapitel { padding: 72px 0; }
  .fraga > summary { font-size: 1.0625rem; padding: 18px 0; }
  .fraga p { padding-right: 0; }

  .footer { padding: 44px var(--sida) 32px; }
}



@media (max-width: 1023px) and (max-height: 760px) {
}





@media (max-width: 520px) {
  .film-kapitel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-ingress, .hero-knapp { display: none; }


  .doc-grid { min-height: calc(3 * 40px + 2 * 6px + var(--besok-plats)); }
  .hero-rad { padding: 4px 0 18px; gap: 12px; }
  .announce { display: none; }
  .scen-rad { padding: 10px 2px 6px; }

  textarea#note-input {
    height: max(140px, min(20vh, calc(100vh - 560px)));
    height: max(140px, min(20dvh, calc(100dvh - 560px)));
    min-height: 140px;
  }

  .progress-dot:not(.active) .dot-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

@media (max-width: 420px) {
  .step-actions { flex-direction: column-reverse; align-items: stretch; }
  .kopiera-ai { margin: 0; text-align: center; }
  .step-actions .btn-primary, .step-actions .btn-ghost { width: 100%; }


  #step-1 .step-actions { flex-direction: row; align-items: center; }
  #step-1 .step-actions .btn-ghost, #step-1 .step-actions .btn-primary { width: auto; }

  .gate { flex-direction: column; align-items: stretch; gap: 8px; }
  .slut-knappar .btn-stor { width: 100%; }
}


@media (prefers-reduced-motion: no-preference) {
  .result-error:not([hidden]) { animation: ruta-in var(--tid-kort) var(--ease-ut) both; }
}
@keyframes ruta-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }



@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }


  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }

  .strom-spinner, .spinner, .edit-spinner, .laddsteg li[data-lage="pagar"]::before {
    animation-duration: 2s !important;
    animation-iteration-count: infinite !important;
  }

  .btn-mic.recording svg, .sec-mic.recording svg, .pill-slot[data-synlig="ja"][data-vald="nej"] > .visit-split::after, [aria-busy="true"] .dx-bar { animation: none !important; }
  .hero, html.arbetar .hero, html.hero-ihop .hero { transition: none; }
  .visit-btn { transition: none !important; }
  .pill-slot[data-synlig="ja"] > .visit-split { animation: none !important; }
}




@media (min-width: 861px) and (max-height: 700px) {
  :root { --topbar-h: 48px; }
  .hero-rad { padding-top: 0; padding-bottom: 4px; }
  .stage { padding-bottom: 10px; }
  .note-field { min-height: 180px; }
  .work-side .type-pill { height: 32px; }
  .work-side .doc-grid { min-height: calc(var(--antal-typer) * 32px + (var(--antal-typer) - 1) * 2px + 8px + var(--besok-plats)); --besok-rad: 34px; }
  .work-side .type-block { margin-bottom: 8px; }
  .work-side .sub-block, .work-side .option-row { margin-bottom: 8px; }
  .fold { margin-top: 6px; padding-top: 4px; }
  #step-1 .step-actions { padding-top: 8px; margin-top: 8px; }
  .field-label { margin-bottom: 8px; }
}








.work-bild { display: none; }
@media (min-width: 1024px) {
  .work-options { display: flex; flex-direction: column; }
  .work-bild {
    display: block;
    position: relative;
    flex: 1 1 0;
    min-height: 0;
    width: 100%;
    max-width: 360px;
    margin: 8px auto 0;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
  }
  .work-bild .wb-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    object-position: center bottom;
    mix-blend-mode: multiply;
    pointer-events: none;
  }
  .work-bild.wb-gom .wb-video { display: none; }
}
:root[data-theme="dark"] .work-bild { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .work-bild { display: none; }
}




@media (min-width: 861px) and (max-height: 549px) {
  html .doc-grid,
  html[data-yrke="dsk"] .doc-grid,
  html[data-yrke="ssk"]:not([data-klinik="hedda"]) .doc-grid { --besok-plats: 0px; }
}

#names-fold[hidden] { display: none; }



.type-pill { position: relative; }
.type-pill-markning {
  display: none;
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  padding: 4px 9px; border-radius: var(--r-pill, 999px);
  background: #ffb59c; color: #0d1b40;
  font-family: var(--sans); font-size: 0.6875rem; font-weight: 650; line-height: 1; letter-spacing: 0.01em; white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity var(--tid-snabb) var(--ease-byt);
}

.work-side .type-pill-markning { display: block; }
@media (hover: hover) and (pointer: fine) {
  .type-pill:hover > .type-pill-markning { opacity: 1; }
}
.type-pill:focus-visible > .type-pill-markning { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .type-pill-markning { transition: none; } }
