/* ── Montserrat self-hosted ─────────────────────────────────────────────── */
@font-face {
  font-family: 'Montserrat';
  src: url('../fonts/Montserrat-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: block;
}
@font-face {
  font-family: 'Montserrat';
  src: url('../fonts/Montserrat-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: block;
}
@font-face {
  font-family: 'Montserrat';
  src: url('../fonts/Montserrat-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: block;
}

/* ── Custom properties (spejlet fra MinEO.dk) ───────────────────────────── */
:root {
  --color-primary:            #1976d2;
  --color-text-primary:       rgba(0, 0, 0, 0.87);
  --color-text-secondary:     rgba(0, 0, 0, 0.6);
  --color-background-white:   #ffffff;
  --color-hover:              rgba(0, 0, 0, 0.04);
  --color-border:             rgba(0, 0, 0, 0.08);
  --color-surface:            #f8f9fa;
  --color-surface-raised:     #eef2f6;
  --color-surface-raised-hover:#e4eaf2;
  --color-input-bg:           #ffffff;
  --color-input-border:       rgba(0, 0, 0, 0.12);
  --color-input-border-focus: #1976d2;
  --color-input-border-error: #d32f2f;
  --color-table-border:       #e5e7eb;
  --color-table-header-bg:    #f8fafc;
  --color-status-success:     #10b981;
  --color-status-warning:     #f59e0b;
  --color-status-error:       #ef4444;
  --color-shadow:             rgba(0, 0, 0, 0.08);
  --color-icon-muted:         #9ca3af;
  --color-title-hover:        #4f6f8f;

  --font-family-base:         'Montserrat', sans-serif;
  --font-size-page-title:     34px;
  --font-size-section-title:  24px;
  --font-size-subsection:     18px;
  --font-size-subheading:     15px;
  --font-size-text:           14px;
  --font-size-table:          13px;
  --font-weight-regular:      400;
  --font-weight-medium:       500;
  --font-weight-bold:         600;
  --line-height-base:         1.4;

  --spacing-gap:              16px;
  --border-radius-small:      10px;
  --border-radius-large:      20px;
  --content-box-max-width:    1200px;
}

/* ── Reset og base ──────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scrollbar-gutter: stable;
}

[hidden] {
  display: none !important;
}

body {
  font-family: var(--font-family-base);
  font-size: var(--font-size-text);
  font-weight: var(--font-weight-regular);
  color: var(--color-text-primary);
  background-color: var(--color-surface);
  line-height: var(--line-height-base);
  min-height: 100vh;
}

/* ── Auth-gate ─────────────────────────────────────────────────────────── */
.auth-login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-surface);
  font-family: var(--font-family-base);
  padding: 24px;
}

.auth-gate-authenticated .auth-login-page {
  display: none;
}

.auth-gate-pending .site-wrapper,
.auth-gate-pending .scroll-top-knap,
.auth-gate-pending .overlay-backdrop {
  display: none;
}

.auth-login-shell {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.auth-login-branding {
  text-align: center;
}

.auth-login-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background-color: var(--color-primary);
  margin-bottom: 20px;
}

.auth-login-title {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.2px;
  color: var(--color-text-secondary);
  font-family: var(--font-family-base);
}

.auth-login-subtitle {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-primary);
  letter-spacing: 0;
  text-transform: none;
  font-family: var(--font-family-base);
}

.auth-login-access {
  margin: 0;
  text-align: center;
  font-size: 13px;
  color: var(--color-text-secondary);
  font-family: var(--font-family-base);
  line-height: 1.6;
}

.auth-login-access a {
  color: var(--color-text-primary);
  text-decoration-style: dotted;
  text-decoration-color: var(--color-text-secondary);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.auth-login-panel {
  background-color: var(--color-background-white);
  border-radius: 20px;
  border: 1px solid var(--color-border);
  box-shadow: 0 2px 6px var(--color-shadow);
  padding: 32px;
}

.auth-login-form-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-login-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-secondary);
  letter-spacing: 0.3px;
  text-transform: uppercase;
  font-family: var(--font-family-base);
}

.auth-login-input {
  width: 100%;
  border: 1.5px solid var(--color-input-border);
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 15px;
  font-family: var(--font-family-base);
  outline: none;
  box-sizing: border-box;
  background-color: var(--color-input-bg);
  color: var(--color-text-primary);
  transition: border-color 0.15s ease;
}

.auth-login-input:focus {
  border-color: var(--color-input-border-focus);
}

.auth-login-input[aria-invalid="true"] {
  border-color: var(--color-input-border-error);
}

.auth-login-error {
  margin: 0;
  font-size: 13px;
  color: var(--color-input-border-error);
  font-family: var(--font-family-base);
}

.auth-login-button {
  margin-top: 4px;
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-family-base);
  letter-spacing: 0.2px;
  color: #ffffff;
  background-color: var(--color-primary);
  cursor: pointer;
  opacity: 1;
  transition: opacity 0.15s ease;
}

.auth-login-button:disabled {
  cursor: default;
  opacity: 0.65;
}

.auth-login-button:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* ── Layout ─────────────────────────────────────────────────────────────── */
.site-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-main {
  flex: 1;
  padding: 40px 32px;
  max-width: var(--content-box-max-width);
  width: 100%;
  margin: 0 auto;
}


/* ── Sidetitel ──────────────────────────────────────────────────────────── */
.page-title {
  font-size: var(--font-size-page-title);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
  margin-bottom: 32px;
  line-height: 1.2;
}

.page-title-link {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.page-title-main,
.page-title-prefix {
  transition: color 520ms ease;
}

.page-title-link:hover .page-title-main,
.page-title-link:active .page-title-main,
.page-title-link:focus-visible .page-title-main {
  color: var(--color-title-hover);
}

.page-title-prefix {
  color: rgba(0, 0, 0, 0.42);
}

.page-title-link:hover .page-title-prefix,
.page-title-link:active .page-title-prefix,
.page-title-link:focus-visible .page-title-prefix {
  color: var(--color-surface);
}

.scroll-top-knap {
  position: fixed;
  right: 32px;
  bottom: 32px;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  padding: 0;
  color: var(--color-text-primary);
  background-color: var(--color-surface-raised);
  border: 1px solid var(--color-border);
  border-radius: 50%;
  box-shadow:
    0 2px 4px -1px rgba(0, 0, 0, 0.2),
    0 4px 5px 0 rgba(0, 0, 0, 0.14),
    0 1px 10px 0 rgba(0, 0, 0, 0.12);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.75);
  transition: all 0.25s ease;
  -webkit-tap-highlight-color: transparent;
}

.scroll-top-knap.synlig {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.scroll-top-knap:hover {
  background-color: var(--color-surface-raised-hover);
  box-shadow:
    0 5px 5px -3px rgba(0, 0, 0, 0.2),
    0 8px 10px 1px rgba(0, 0, 0, 0.14),
    0 3px 14px 2px rgba(0, 0, 0, 0.12);
  transform: scale(1.08);
}

.scroll-top-knap:active {
  transform: scale(0.95);
}

.scroll-top-knap:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

.scroll-top-knap svg {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── ContentBox ─────────────────────────────────────────────────────────── */
.content-box {
  background-color: var(--color-background-white);
  border-radius: var(--border-radius-large);
  box-shadow: 0 2px 6px var(--color-shadow);
  border: 1px solid var(--color-border);
  padding: 40px 32px;
  margin-bottom: 32px;
}

.content-box__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}

.content-box__title {
  font-size: var(--font-size-section-title);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
  line-height: 1.2;
}

/* ── Site-footer (kompakt bjælke) ──────────────────────────────────────── */
.site-footer-box {
  margin-top: 40px;
  margin-bottom: 0;
  padding: 17px 56px 17px 32px;
}

.site-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.site-footer__mail {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 39px;
  color: var(--color-text-primary);
  text-decoration: none;
  max-width: 100%;
  overflow-wrap: anywhere;
  flex: 0 0 auto;
}

.site-footer__mail-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  min-width: 0;
}

.site-footer__mail-label {
  color: var(--color-text-secondary);
  font-size: 11px;
  font-weight: var(--font-weight-medium);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.site-footer__mail-value {
  font-size: 14px;
  font-weight: var(--font-weight-medium);
  transition: color 150ms ease;
}

.site-footer__mail:hover .site-footer__mail-value {
  color: var(--color-primary);
}

.site-footer__mail:focus-visible,
.site-footer__link:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

.site-footer__mail-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.site-footer__mail-icon svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.site-footer__mail-icon {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.07);
  color: var(--color-text-secondary);
}

.site-footer__mail-icon svg {
  width: 18px;
  height: 15px;
}

.site-footer__sep {
  width: 1px;
  height: 32px;
  margin: 0 10px;
  background-color: var(--color-border);
  flex: 0 0 auto;
}

.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-left: auto;
}

.site-footer__nav--mobile {
  display: none;
}

.site-footer__link {
  display: inline-flex;
  align-items: center;
  position: relative;
  min-width: 0;
  min-height: 39px;
  padding: 4px 0;
  color: var(--color-text-primary);
  font-size: 12.5px;
  font-weight: var(--font-weight-medium);
  line-height: 1.2;
  text-decoration: none;
  transition: color 150ms ease;
}

.site-footer__link + .site-footer__link {
  margin-left: 56px;
}

.site-footer__link + .site-footer__link::before {
  content: "";
  position: absolute;
  left: -31px;
  top: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.28);
  transform: translateY(-50%);
}

.site-footer__link:hover {
  color: var(--color-primary);
}

.site-footer__link--active:hover {
  color: var(--color-primary);
}

.site-footer__link--active {
  color: var(--color-primary);
  cursor: default;
}

.site-footer__link span:last-child {
  min-width: 0;
  padding-bottom: 1px;
  border-bottom: 1px solid transparent;
  overflow-wrap: anywhere;
  transition: border-color 150ms ease;
}

.site-footer__link:hover span:last-child {
  border-bottom-color: rgba(25, 118, 210, 0.24);
}

.site-footer__link--active:hover span:last-child,
.site-footer__link--active span:last-child {
  border-bottom-color: var(--color-primary);
}


/* ── Tabel ──────────────────────────────────────────────────────────────── */
.paradigme-tabel-wrapper,
.processkrift-tabel-wrapper,
.dokument-tabel-wrapper,
.vejledning-tabel-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.paradigme-tabel,
.processkrift-tabel,
.dokument-tabel,
.vejledning-tabel {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-table);
  font-family: var(--font-family-base);
  table-layout: fixed;
}

.paradigme-tabel tbody tr,
.processkrift-tabel tbody tr,
.dokument-tabel tbody tr,
.vejledning-tabel tbody tr {
  transition: background 150ms ease;
}

.paradigme-tabel tbody tr:not(.gruppe-row):hover,
.processkrift-tabel tbody tr:not(.gruppe-row):hover,
.dokument-tabel tbody tr:hover,
.vejledning-tabel tbody tr:hover {
  background-color: #f8f8f8;
}

.paradigme-tabel tbody td,
.processkrift-tabel tbody td,
.dokument-tabel tbody td,
.vejledning-tabel tbody td {
  padding: 4px 16px;
  color: #1f2937;
  vertical-align: middle;
  height: 32px;
}

/* Kolonne-bredder: paradigmer */
.paradigme-tabel colgroup .col-navn      { width: auto; }
.paradigme-tabel colgroup .col-dato      { width: 130px; }
.paradigme-tabel colgroup .col-handlinger { width: 96px; }

/* Kolonne-bredder: processkrifter */
.processkrift-tabel colgroup .col-navn      { width: auto; }
.processkrift-tabel colgroup .col-dato      { width: 130px; }
.processkrift-tabel colgroup .col-handlinger { width: 96px; }

/* Kolonne-bredder: dokumenter */
.dokument-tabel colgroup .col-navn      { width: auto; }
.dokument-tabel colgroup .col-dato      { width: 130px; }
.dokument-tabel colgroup .col-handlinger { width: 96px; }

/* Kolonne-bredder: vejledninger */
.vejledning-tabel colgroup .col-navn     { width: auto; }
.vejledning-tabel colgroup .col-dato     { width: 130px; }
.vejledning-tabel colgroup .col-handlinger { width: 96px; }

.td-navn {
  white-space: normal;
  overflow-wrap: anywhere;
  min-width: 160px;
}

.paradigme-tabel tbody td.td-dato,
.processkrift-tabel tbody td.td-dato,
.dokument-tabel tbody td.td-dato,
.vejledning-tabel tbody td.td-dato {
  color: #9ca3af;
  font-size: 12px;
  white-space: nowrap;
}

.ny-indikator {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #6b9f7a;
  opacity: 0.75;
  margin-right: 6px;
  vertical-align: middle;
  flex-shrink: 0;
}

.td-dato-inner {
  display: flex;
  align-items: center;
}

.td-handlinger {
  white-space: nowrap;
}

/* Gruppeoverskrift */
.paradigme-tabel .gruppe-row td,
.processkrift-tabel .gruppe-row td {
  background-color: transparent;
  padding: 24px 16px 6px;
  font-size: 11px;
  font-weight: var(--font-weight-bold);
  color: #374151;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  height: auto;
  vertical-align: bottom;
}

.paradigme-tabel .gruppe-row:first-child td,
.processkrift-tabel .gruppe-row:first-child td {
  padding-top: 6px;
  border-top: none;
}

.paradigme-tabel .gruppe-row .gruppe-row__dato-label,
.processkrift-tabel .gruppe-row .gruppe-row__dato-label {
  font-weight: var(--font-weight-regular);
  letter-spacing: 0.05em;
  color: #c4c9d1;
  white-space: nowrap;
}

/* ── Handlingsikoner ────────────────────────────────────────────────────── */
.ikon-knap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: var(--border-radius-small);
  color: var(--color-icon-muted);
  transition: color 150ms ease, background-color 150ms ease;
  text-decoration: none;
}

.ikon-knap:hover {
  color: var(--color-primary);
  background-color: var(--color-hover);
}

.ikon-knap:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.ikon-knap svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.ikon-knap svg.ikon-fyldt {
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 10;
  stroke-linejoin: round;
}

/* ── Overlay ────────────────────────────────────────────────────────────── */
.overlay-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.45);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.overlay-backdrop.aktiv {
  display: flex;
}

.overlay-panel {
  background-color: var(--color-background-white);
  border-radius: var(--border-radius-large);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);
  width: 100%;
  max-width: 840px;
  height: 90vh;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

.overlay-topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 12px 16px 0;
  flex-shrink: 0;
}


.overlay-handlinger {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.overlay-indhold {
  overflow-y: auto;
  padding: 28px 36px 40px;
  flex: 1;
}

/* Paradigmetekst i overlay */
.paradigme-tekst {
  color: var(--color-text-primary);
  max-width: 680px;
  margin: 0 auto;
}

.paradigme-tekst .format-blok p {
  line-height: 1.6;
  margin-bottom: 0;
}

.paradigme-tekst .format-blok p + p {
  margin-top: 12px;
}

.paradigme-tekst .format-blok p:empty::before {
  content: "\00a0";
}

.paradigme-tekst .format-blok--modtager {
  margin-top: 20px;
  margin-bottom: 50px;
}

.paradigme-tekst .format-blok--modtager p {
  line-height: 1.2;
  margin: 0 !important;
}

.paradigme-tekst .format-blok--modtager p + p,
.paradigme-tekst .format-blok--sagsparter p + p {
  margin-top: 0;
}

.paradigme-tekst .format-blok--vh {
  margin-top: 35px;
  margin-bottom: 20px;
}

.paradigme-tekst .format-blok--vh p {
  margin: 0;
}

.paradigme-tekst .format-blok--vh p + p {
  margin-top: 0;
}

.paradigme-tekst .format-blok--vh .vh-hilsen {
  margin-bottom: 24px;
}

.paradigme-tekst .format-blok--vh .vh-tom {
  display: none;
}

.paradigme-tekst .format-blok--meta {
  margin: 6px 0;
  text-align: right;
}

.paradigme-tekst .format-blok--meta p + p {
  margin-top: 6px;
}

.paradigme-tekst .format-blok--afsender {
  margin-top: 26px;
}

.paradigme-tekst .format-blok--ingenlinjeafstand {
  margin-bottom: 12px;
}

.paradigme-tekst .format-blok--ingenlinjeafstand p + p {
  margin-top: 0;
}

.paradigme-tekst .format-blok--sagsparter {
  margin-top: 30px;
  margin-bottom: 40px;
}

.paradigme-tekst .format-blok--sagsparter p {
  margin: 0;
}

.paradigme-tekst .format-blok--paastande {
  display: table;
  border-spacing: 0 14px;
  margin-bottom: 18px;
}

.paradigme-tekst .format-blok--paastande p {
  display: table-row;
  white-space: normal;
}

.paradigme-tekst .format-blok--paastande p + p {
  margin-top: 0;
}

.paradigme-tekst .format-blok--paastande strong {
  display: table-cell;
  width: 104px;
  padding-right: 18px;
  vertical-align: top;
  white-space: nowrap;
}

.paradigme-tekst h1 {
  font-size: 14px;
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
  margin: 32px 0 16px;
  line-height: 1.3;
  page-break-after: avoid;
  text-transform: uppercase;
  letter-spacing: 0.5pt;
}

.paradigme-tekst .format-blok--title p {
  font-size: 20px;
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
  margin: 18px 0 24px;
  line-height: 1.3;
  page-break-after: avoid;
}

.paradigme-tekst h2 {
  font-size: 14px;
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
  margin-top: 20px;
  margin-bottom: 10px;
  line-height: 1.3;
  page-break-after: avoid;
}

.paradigme-tekst h3 {
  font-size: 14px;
  font-weight: var(--font-weight-regular);
  color: var(--color-text-primary);
  margin-top: 18px;
  margin-bottom: 6px;
  line-height: 1.6;
  text-decoration: underline;
  page-break-after: avoid;
}

.paradigme-tekst p {
  font-size: 14px;
  font-weight: var(--font-weight-regular);
  color: var(--color-text-primary);
  line-height: 1.6;
  margin-bottom: 12px;
}

.paradigme-tekst ul,
.paradigme-tekst ol {
  font-size: 14px;
  color: var(--color-text-primary);
  line-height: 1.6;
  margin-bottom: 12px;
  padding-left: 40px;
}

.paradigme-tekst ul li,
.paradigme-tekst ol li {
  padding-left: 6px;
}

.paradigme-tekst li {
  margin-bottom: 4px;
}

.paradigme-tekst strong {
  font-weight: var(--font-weight-bold);
}

.paradigme-tekst em {
  font-style: italic;
}

.paradigme-tekst table {
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  margin: 8px 0 18px;
  font-size: 13px;
  line-height: 1.5;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
}

.paradigme-tekst th,
.paradigme-tekst td {
  vertical-align: top;
  text-align: left;
  padding: 9px 12px;
  border-bottom: 1px solid #edf1f5;
  overflow-wrap: anywhere;
}

.paradigme-tekst th {
  background: #f8fafc;
  color: #64748b;
  font-size: 11px;
  font-weight: var(--font-weight-bold);
  letter-spacing: 0;
  text-transform: uppercase;
}

.paradigme-tekst tbody tr:last-child td {
  border-bottom: none;
}


.paradigme-tekst td:first-child {
  color: #111827;
}

.paradigme-tekst td:nth-child(2) {
  color: #475569;
}

.paradigme-tekst th:first-child,
.paradigme-tekst td:first-child {
  width: 28%;
}

.paradigme-tekst th:nth-child(2):not(:last-child),
.paradigme-tekst td:nth-child(2):not(:last-child) {
  width: 82px;
  white-space: nowrap;
}

.paradigme-tekst table:has(thead th:nth-child(3)) th:nth-child(2) {
  font-size: 0;
}

.paradigme-tekst table:has(thead th:nth-child(3)) th:nth-child(2)::after {
  content: "MODR.?";
  font-size: 11px;
}

.paradigme-tekst td:nth-child(3) {
  color: #334155;
}

.paradigme-tekst th:first-child:nth-last-child(2),
.paradigme-tekst td:first-child:nth-last-child(2) {
  width: 50%;
}

.paradigme-tekst th:nth-child(2):last-child,
.paradigme-tekst td:nth-child(2):last-child {
  width: auto;
  white-space: normal;
}

.paradigme-tekst th:first-child:nth-last-child(3),
.paradigme-tekst td:first-child:nth-last-child(3) {
  width: calc(40% - 82px);
}

.paradigme-tekst th:nth-child(3):last-child,
.paradigme-tekst td:nth-child(3):last-child {
  width: 60%;
}

.paradigme-tekst .format-blok--opgoerelse {
  margin: 8px 28px 24px;
}

.paradigme-tekst .format-blok--opgoerelse table {
  width: 100%;
  table-layout: fixed;
  border: 0;
  border-radius: 0;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}

.paradigme-tekst .format-blok--opgoerelse thead {
  display: none;
}

.paradigme-tekst .format-blok--opgoerelse th,
.paradigme-tekst .format-blok--opgoerelse td {
  padding: 3px 0;
  text-align: left;
  border-bottom: none;
  background: transparent;
  color: var(--color-text-primary);
  font-weight: var(--font-weight-regular);
  letter-spacing: 0;
  text-transform: none;
  width: auto;
}

.paradigme-tekst .format-blok--opgoerelse th:first-child,
.paradigme-tekst .format-blok--opgoerelse td:first-child {
  width: calc(100% - 120px);
}

.paradigme-tekst .format-blok--opgoerelse th:last-child,
.paradigme-tekst .format-blok--opgoerelse td:last-child {
  width: 120px;
  white-space: nowrap;
  text-align: right;
}

.paradigme-tekst .format-blok--opgoerelse tbody tr:last-child {
  border-top: 1px solid var(--color-text-primary);
}

.paradigme-tekst .format-blok--opgoerelse tbody tr:last-child td {
  padding-top: 6px;
}

.feltmarkering {
  color: #4b5563;
}

.tabstop {
  display: inline-block;
  width: 0;
}

.tabstop-end {
  letter-spacing: 0.15em;
  white-space: nowrap;
}

.tabbed-line {
  display: flex;
  align-items: flex-start;
  width: 100%;
}

.tabbed-line__segment {
  flex: 0 0 auto;
  min-width: 0;
}

.tabbed-line__segment:first-child {
  min-width: var(--tabbed-first-segment-width, 0);
}

.tabbed-line__segment:last-child {
  flex: 1 1 auto;
}

.pagebreak {
  display: flex;
  align-items: center;
  margin: 96px 0 22px;
}

.pagebreak::before {
  content: "";
  flex: 1;
  border-top: 1px dashed var(--color-border);
}

.valgblok {
  margin: 14px 0 20px;
  padding: 14px;
  border: 1px solid #d9e1ea;
  border-radius: 8px;
  border-color: #d8dee7;
  background: #f4f6f8;
}

.valgblok p {
  margin-bottom: 10px;
  color: #334155;
}

.valgblok p strong {
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.valgblok ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
  counter-reset: valg;
}

.paradigme-tekst .valgblok li {
  position: relative;
  margin: 0;
  padding: 9px 0 9px 32px;
  border-top: 1px solid #edf1f5;
  color: #1f2937;
  counter-increment: valg;
}

.valgblok li:first-child {
  border-top: none;
}

.valgblok li::before {
  content: counter(valg);
  position: absolute;
  left: 0;
  top: 9px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid #b7c2d0;
  background: #ffffff;
  color: #64748b;
  font-size: 12px;
  font-weight: var(--font-weight-medium);
  line-height: 18px;
  text-align: center;
}

/* Loading og fejl i overlay */
.overlay-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  color: var(--color-text-secondary);
  gap: 12px;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.overlay-fejl {
  padding: 32px;
  color: var(--color-status-error);
  font-size: var(--font-size-text);
}

@media (min-width: 641px) {
  .site-main {
    max-width: calc(var(--content-box-max-width) + 64px);
  }

  .page-title {
    font-size: 28px;
    margin-bottom: 24px;
    line-height: var(--line-height-base);
  }

  .content-box {
    margin: 40px 0;
  }

  .site-footer-box {
    margin-bottom: 0;
  }

  .content-box__title {
    font-size: var(--font-size-subsection);
    line-height: var(--line-height-base);
  }

  .paradigme-tabel tbody td,
  .processkrift-tabel tbody td,
  .dokument-tabel tbody td,
  .vejledning-tabel tbody td {
    font-size: 15px;
  }

  .paradigme-tabel tbody td.td-dato,
  .processkrift-tabel tbody td.td-dato,
  .dokument-tabel tbody td.td-dato,
  .vejledning-tabel tbody td.td-dato {
    font-size: 12px;
    text-align: right;
  }

  .td-dato-inner {
    justify-content: flex-end;
  }

  .paradigme-tabel .gruppe-row td,
  .processkrift-tabel .gruppe-row td {
    font-size: 16px;
    font-weight: var(--font-weight-medium);
    letter-spacing: 0;
    text-transform: none;
  }

  .paradigme-tabel .gruppe-row .gruppe-row__dato-label,
  .processkrift-tabel .gruppe-row .gruppe-row__dato-label {
    font-size: 12px;
    letter-spacing: 0;
    text-align: right;
    text-transform: none;
  }
}

@media (min-width: 900px) {
  .page-title {
    font-size: 32px;
    margin-bottom: 32px;
  }
}

@media (max-width: 899px) {
  .site-footer__nav {
    margin-left: 0;
  }

  .site-footer__sep {
    display: none;
  }
}

/* ── Responsivitet ──────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .site-main {
    padding: 24px 16px;
  }

  .content-box {
    padding: 24px 16px;
    border-radius: var(--border-radius-small);
  }

  .page-title {
    font-size: 20px;
    margin-bottom: 16px;
    line-height: var(--line-height-base);
  }

  .content-box__title {
    font-size: 18px;
  }

  .site-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .site-footer__nav--desktop {
    display: none;
  }

  .site-footer__nav--mobile {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    row-gap: 3px;
  }

  .site-footer__mobile-row {
    display: flex;
    align-items: center;
    gap: 14px;
    max-width: 100%;
  }

  .site-footer__mobile-sep {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.28);
    flex: 0 0 auto;
  }

  .site-footer__link {
    justify-content: flex-start;
    min-height: 28px;
    padding: 2px 0;
  }

  .site-footer__link + .site-footer__link {
    margin-left: 0;
  }

  .site-footer__link + .site-footer__link::before {
    display: none;
  }

  .site-footer__link span:last-child {
    overflow-wrap: normal;
    white-space: nowrap;
  }

  .col-dato {
    display: none;
  }

  .col-handlinger {
    width: 68px;
  }

  .td-handlinger {
    text-align: right;
  }

  .scroll-top-knap {
    right: 16px;
    bottom: 16px;
  }

  .overlay-backdrop {
    padding: 12px;
  }

  .overlay-indhold {
    padding: 20px 15px 32px;
  }

  .overlay-topbar {
    padding: 12px 12px 8px;
  }

  .paradigme-tekst {
    font-size: 13px;
  }

  .paradigme-tekst ul,
  .paradigme-tekst ol {
    padding-left: 16px;
  }

  .paradigme-tekst ul li,
  .paradigme-tekst ol li {
    padding-left: 3px;
  }

  .paradigme-tekst table {
    font-size: 12px;
  }

  .paradigme-tekst th,
  .paradigme-tekst td {
    padding: 8px 7px;
  }

  .paradigme-tekst th:first-child:nth-last-child(2),
  .paradigme-tekst td:first-child:nth-last-child(2) {
    width: 50%;
  }

  .paradigme-tekst th:nth-child(2):not(:last-child),
  .paradigme-tekst td:nth-child(2):not(:last-child) {
    width: 44px;
  }

  .paradigme-tekst th:first-child:nth-last-child(3),
  .paradigme-tekst td:first-child:nth-last-child(3) {
    width: calc(40% - 44px);
  }

  .paradigme-tekst table:has(thead th:nth-child(3)) th:nth-child(2) {
    font-size: 0;
  }

  .paradigme-tekst table:has(thead th:nth-child(3)) th:nth-child(2)::after {
    content: "MODR.";
    font-size: 11px;
  }

  .paradigme-tekst table:has(thead th:nth-child(3)) tbody tr:nth-child(5) td:first-child,
  .paradigme-tekst table:has(thead th:nth-child(3)) tbody tr:nth-child(6) td:first-child,
  .paradigme-tekst table:has(thead th:nth-child(3)) tbody tr:nth-child(8) td:first-child,
  .paradigme-tekst table:has(thead th:nth-child(3)) tbody tr:nth-child(12) td:first-child,
  .paradigme-tekst table:has(thead th:nth-child(3)) tbody tr:nth-child(13) td:first-child,
  .paradigme-tekst table:has(thead th:nth-child(3)) tbody tr:nth-child(14) td:first-child,
  .paradigme-tekst table:has(thead th:nth-child(3)) tbody tr:nth-child(15) td:first-child,
  .paradigme-tekst table:has(thead th:nth-child(3)) tbody tr:nth-child(17) td:first-child,
  .paradigme-tekst table:has(thead th:nth-child(3)) tbody tr:nth-child(19) td:first-child {
    font-size: 0;
  }

  .paradigme-tekst table:has(thead th:nth-child(3)) tbody tr td:first-child::after {
    display: block;
    font-size: 12px;
    line-height: 1.35;
    white-space: pre-line;
  }

  .paradigme-tekst table:has(thead th:nth-child(3)) tbody tr:nth-child(5) td:first-child::after {
    content: "Førtids-\A pension";
  }

  .paradigme-tekst table:has(thead th:nth-child(3)) tbody tr:nth-child(6) td:first-child::after {
    content: "Integrations-\A ydelse";
  }

  .paradigme-tekst table:has(thead th:nth-child(3)) tbody tr:nth-child(8) td:first-child::after {
    content: "Ledigheds-\A ydelse";
  }

  .paradigme-tekst table:has(thead th:nth-child(3)) tbody tr:nth-child(12) td:first-child::after {
    content: "Ressource-\A forløbsydelse";
  }

  .paradigme-tekst table:has(thead th:nth-child(3)) tbody tr:nth-child(13) td:first-child::after {
    content: "Reva-\A ydelse";
  }

  .paradigme-tekst table:has(thead th:nth-child(3)) tbody tr:nth-child(14) td:first-child::after {
    content: "Senior-\A pension";
  }

  .paradigme-tekst table:has(thead th:nth-child(3)) tbody tr:nth-child(15) td:first-child::after {
    content: "Sygedag-\A penge";
  }

  .paradigme-tekst table:has(thead th:nth-child(3)) tbody tr:nth-child(17) td:first-child::after {
    content: "Tabt\A arbejds-\A fortjeneste";
  }

  .paradigme-tekst table:has(thead th:nth-child(3)) tbody tr:nth-child(19) td:first-child::after {
    content: "Uddannelses-\A hjælp";
  }

  .paradigme-tabel tbody td,
  .processkrift-tabel tbody td,
  .dokument-tabel tbody td,
  .vejledning-tabel tbody td {
    padding-left: 0;
    padding-right: 0;
  }

  .paradigme-tabel .gruppe-row td,
  .processkrift-tabel .gruppe-row td {
    padding-left: 0;
    padding-right: 0;
    font-size: 12px;
    text-transform: none;
  }

}

@media (pointer: coarse) {
  .scroll-top-knap {
    display: none;
  }
}
