#mda-guide {
  display: block;
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
  font-family: var(--mda-font-sans);
  /* Ens afstand mellem progress, spørgsmål og rapport på alle trin. */
  --mda-guide-blocks-gap: 20px;
  /* Ydre slot som .mda-raad-page / .mda-v2-page — topkort centreres indeni. */
  padding: 0 0 24px;
}

#mda-guide * {
  box-sizing: border-box;
}

.mda-card {
  width: 100%;
  max-width: 100%;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--mda-guide-blocks-gap, 20px);
}

/* Samme indholdsspor som .mda-v2-container / .mda-help-container */
#mda-guide .mda-guide-hero,
#mda-guide .mda-card > #mda-usage-info,
#mda-guide .mda-card > #mda-save-status,
#mda-guide .mda-card > #mda-message,
#mda-guide .mda-card > .mda-form,
#mda-guide .mda-card > .mda-report-wrap {
  width: var(--mda-universal-card-width, min(var(--mda-content-max, 1200px), calc(100% - (var(--mda-gutter-desktop, 20px) * 2))));
  max-width: var(--mda-universal-card-width, min(var(--mda-content-max, 1200px), calc(100% - (var(--mda-gutter-desktop, 20px) * 2))));
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

/* Samme hero-slot som .mda-raad-hero / .mda-help-hero */
#mda-guide .mda-guide-hero {
  margin: var(--mda-universal-menu-gap, 16px) 0 0;
  padding: 0;
  background: transparent;
  overflow: visible;
}

.mda-guide-hero-frame {
  width: 100%;
  max-width: 100%;
  margin-top: 0;
  /* Kun indholdshøjde — undgår tom plads mellem progress og spørgsmål. */
  min-height: auto;
  background: var(--mda-universal-card-bg, var(--mda-premium-card-bg, #fff));
  border: 1px solid var(--mda-universal-card-border, var(--mda-premium-card-border, #e9eef7));
  border-radius: var(--mda-universal-card-radius, var(--mda-content-surface-radius, 28px));
  padding: var(--mda-universal-card-padding-desktop, 32px);
  box-shadow: var(--mda-universal-card-shadow, var(--mda-premium-card-shadow, var(--mda-content-surface-shadow, 0 16px 40px rgba(20, 35, 73, 0.08))));
  box-sizing: border-box;
}

#mda-guide .mda-card > #mda-usage-info,
#mda-guide .mda-card > #mda-save-status,
#mda-guide .mda-card > #mda-message,
#mda-guide .mda-card > .mda-form,
#mda-guide .mda-card > .mda-report-wrap {
  margin-top: 0;
}

.mda-header {
  margin-bottom: 26px;
  scroll-margin-top: 6rem;
}

#mda-guide #mda-title {
  scroll-margin-top: 6rem;
}

.mda-header-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  margin-bottom: 14px;
}

.mda-header-bar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px 12px;
}

.mda-guide-reset-btn {
  appearance: none;
  margin: 0;
  padding: 0.48rem 0.7rem;
  border: 0;
  background: transparent;
  color: #6a7b94;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  border-radius: 8px;
  transition: color 0.15s ease, background 0.15s ease;
}

.mda-guide-reset-btn:hover {
  color: #8f433c;
  background: rgba(163, 62, 54, 0.07);
}

.mda-guide-reset-btn:focus-visible {
  outline: 2px solid var(--mda-premium-focus, #6c88b8);
  outline-offset: 2px;
}

.mda-guide-reset-btn[disabled],
.mda-guide-reset-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
  text-decoration: none;
}

.mda-guide-onboarding-trigger {
  appearance: none;
  margin: 0;
  border: 1px solid #d0d9e8;
  background: #f7f9fc;
  color: #28446d;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.mda-guide-onboarding-trigger:hover,
.mda-guide-onboarding-trigger:focus-visible {
  background: #eef3fb;
  border-color: #b8c8de;
  box-shadow: 0 4px 14px rgba(39, 63, 112, 0.12);
  outline: none;
}

/* Onboarding / hjælp (første besøg + genåbning) */
.mda-guide-modal {
  position: fixed;
  inset: 0;
  z-index: 1000000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  box-sizing: border-box;
}

.mda-guide-modal--open {
  display: flex;
}

.mda-guide-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.48);
  cursor: pointer;
}

.mda-guide-modal__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 520px);
  max-height: min(88vh, 680px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
  border: 1px solid #e3ebf7;
}

.mda-guide-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 22px 0;
}

.mda-guide-modal__title {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 800;
  color: #17325c;
  letter-spacing: -0.02em;
}

.mda-guide-modal__close {
  flex-shrink: 0;
  appearance: none;
  margin: 0;
  border: 0;
  background: rgba(15, 23, 42, 0.06);
  color: #17325c;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.mda-guide-modal__close:hover,
.mda-guide-modal__close:focus-visible {
  background: rgba(15, 23, 42, 0.12);
  outline: none;
}

.mda-guide-modal__body {
  padding: 14px 22px 8px;
}

.mda-guide-modal__intro {
  margin: 0 0 14px;
  font-size: 16px;
  line-height: 1.65;
  color: #49607f;
}

.mda-guide-modal__list {
  margin: 0;
  padding-left: 1.15rem;
  color: #28446d;
  font-size: 15px;
  line-height: 1.6;
}

.mda-guide-modal__list li {
  margin-bottom: 10px;
}

.mda-guide-modal__list li:last-child {
  margin-bottom: 0;
}

.mda-guide-modal__actions {
  padding: 8px 22px 22px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.mda-guide-modal__actions .mda-btn {
  min-width: min(100%, 280px);
}

html.mda-guide-modal-open,
body.mda-guide-modal-open {
  overflow: hidden;
}

/* .mda-badge: mda-shared-frame.css (#mda-guide .mda-badge) */

.mda-header h2 {
  margin: 0 0 10px;
  font-size: 36px;
  line-height: 1.15;
  color: var(--mda-premium-title-color, #17325c);
  font-weight: 700;
  text-wrap: balance;
}

.mda-header p {
  margin: 0;
  font-size: 17px;
  line-height: 1.65;
  color: var(--mda-premium-text-color, #5e6b84);
  max-width: 760px;
}

.mda-score-card {
  padding: 20px;
  background: var(--mda-premium-card-bg, linear-gradient(135deg, #f7f9ff, #fbf7ff));
  border: 1px solid var(--mda-premium-card-border, #e3ebf7);
  border-radius: 20px;
  margin-bottom: 0;
  box-shadow: var(--mda-shadow-soft, 0 10px 22px rgba(18, 34, 68, 0.06));
}

.mda-score-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.mda-score-top h3 {
  margin: 0 0 4px;
  font-size: 18px;
  color: #17325c;
  font-weight: 700;
}

.mda-score-help {
  font-size: 14px;
  color: #61728f;
}

/* Trin-tal i status (navigation) — matcher trin-prikkerne; ikke samme udtryk som spørgsmåls-numre */
.mda-score-help .mda-progress-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  padding: 0 7px;
  margin: 0 1px;
  border-radius: 999px;
  box-sizing: border-box;
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  vertical-align: middle;
  border: 2px solid #c5d0e4;
  background: #fff;
  color: #5a6b82;
}

.mda-score-help .mda-progress-step-num--current {
  border-color: #1a56db;
  background: #f5f8ff;
  color: #1a56db;
}

#score-text {
  font-size: 15px;
  font-weight: 700;
  color: #355b94;
}

.score-bar {
  height: 14px;
  background: #e6ecf7;
  border-radius: 20px;
  overflow: hidden;
}

#score-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #355d98, #4c5b94);
  transition: width .4s ease;
  border-radius: 20px;
}

.mda-step-dots-wrap {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #e9eef7;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}

.mda-step-dots-legend {
  font-size: 12px;
  font-weight: 600;
  color: #5a6b82;
  letter-spacing: 0.02em;
}

.mda-step-dots-help {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.mda-step-dots-help-btn {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid #bfd0e6;
  background: #f2f7ff;
  color: #2e4a78;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  padding: 0;
  cursor: pointer;
}

.mda-step-dots-help-btn:hover,
.mda-step-dots-help-btn:focus-visible {
  border-color: #8ca7cc;
  background: #e8f0ff;
  outline: none;
}

.mda-step-dots-help-pop {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 20;
  min-width: 280px;
  max-width: min(86vw, 520px);
  padding: 9px 12px;
  border: 1px solid #d7e2f3;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 6px 16px rgba(30, 58, 98, 0.12);
  color: #334762;
  font-size: 12px;
  line-height: 1.45;
}

.mda-step-dots-help-pop[hidden] {
  display: none !important;
}

.mda-step-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.mda-step-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid #d5dbe8;
  background: #fafbfc;
  font-size: 12px;
  font-weight: 600;
  color: #5c6578;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}

.mda-step-dot:hover {
  border-color: #b8c2d4;
  background-color: #f4f6fa;
}

/* Ikke åbnet — afdæmpet kølig tone */
.mda-step-dot--unvisited {
  background: #eef3fb;
  border-color: #b6c5e0;
  color: #3d4f72;
  box-shadow: none;
}

.mda-step-dot--unvisited:hover {
  background: #e4ebf7;
  border-color: #9eb0d4;
  color: #2f3f5c;
}

/* Alt udfyldt — diskret succes */
.mda-step-dot--complete {
  background: #edf7f2;
  border-color: #9cccb5;
  color: #1e5c45;
  box-shadow: none;
}

.mda-step-dot--complete:hover {
  background: #e5f3ec;
  border-color: #8abf9f;
}

/* Aktivt trin med mangler — matterød */
.mda-step-dot--incomplete:not(.mda-step-dot--passed-incomplete) {
  background: #fcf2f2;
  border-color: #e8b4b4;
  color: #8f2f2f;
  box-shadow: none;
}

.mda-step-dot--incomplete:not(.mda-step-dot--passed-incomplete):hover {
  border-color: #d9a0a0;
  background: #faeded;
}

/*
 * Forladt trin med huller (anden side end aktivt): tydelig rød glød — “lyses op”.
 */
.mda-step-dot--passed-incomplete {
  background: #fff5f5;
  border-color: #e85d5d;
  color: #b42318;
  box-shadow:
    0 0 0 1px rgba(220, 80, 72, 0.35),
    0 0 14px rgba(220, 80, 72, 0.32),
    0 1px 2px rgba(90, 20, 20, 0.06);
}

.mda-step-dot--passed-incomplete:hover {
  border-color: #dc4a4a;
  box-shadow:
    0 0 0 1px rgba(220, 80, 72, 0.45),
    0 0 18px rgba(220, 80, 72, 0.38),
    0 1px 2px rgba(90, 20, 20, 0.08);
}

/* Aktivt trin — fin lys ring */
.mda-step-dot--current {
  border-width: 2px;
  border-color: #374151;
  box-shadow:
    0 0 0 2px #fff,
    0 0 0 5px rgba(55, 65, 85, 0.55),
    0 0 14px rgba(55, 65, 85, 0.22);
}

.mda-step-dot--current.mda-step-dot--complete {
  border-width: 2px;
  border-color: #1e5c45;
  box-shadow:
    0 0 0 2px #fff,
    0 0 0 5px rgba(30, 92, 69, 0.55),
    0 0 14px rgba(30, 92, 69, 0.24);
}

.mda-step-dot--current.mda-step-dot--incomplete:not(.mda-step-dot--passed-incomplete) {
  border-width: 2px;
  border-color: #8f2f2f;
  box-shadow:
    0 0 0 2px #fff,
    0 0 0 5px rgba(143, 47, 47, 0.58),
    0 0 14px rgba(143, 47, 47, 0.24);
}

.mda-step-dot--current.mda-step-dot--unvisited {
  border-width: 2px;
  border-color: #3d4f72;
  box-shadow:
    0 0 0 2px #fff,
    0 0 0 5px rgba(61, 79, 114, 0.55),
    0 0 14px rgba(61, 79, 114, 0.22);
}

/*
 * Navigation under gem/AI: temaer overskriver ofte button[disabled] — brug root-klasse + !important.
 */
#mda-guide.mda-guide--nav-locked #mda-prev-btn,
#mda-guide.mda-guide--nav-locked #mda-next-btn {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  transform: none !important;
  box-shadow: none !important;
  filter: grayscale(0.35);
}

#mda-guide.mda-guide--nav-locked #mda-prev-btn {
  background: #dde4ee !important;
  color: #6a7587 !important;
  filter: none;
}

#mda-guide.mda-guide--nav-locked .mda-step-dot:disabled,
#mda-guide.mda-guide--nav-locked .mda-step-dot[disabled] {
  opacity: 0.42 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  transform: none !important;
}

.mda-field-label-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

/* Stronger than #mda-guide * { box-sizing: border-box } */
#mda-guide .mda-field-label-row {
  box-sizing: content-box;
}

/* Spørgsmåls-numre: afrundet firkant / mærkat — tydeligt adskilt fra cirkulære trin-navigation */
.mda-field-num {
  flex-shrink: 0;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border-radius: 6px;
  border: 1px solid #d5dce8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  color: #6d7a8c;
  background: #f4f6fa;
  line-height: 1;
  box-shadow: none;
}

.mda-field-num--changed {
  border-color: #6b8cc4;
  background: #eef3fb;
  color: #214a8f;
  box-shadow: inset 0 0 0 1px rgba(26, 86, 219, 0.12);
}

.mda-usage-info {
  margin-bottom: 0;
  padding: 14px 16px;
  border-radius: 14px;
  background: #f6f8fc;
  border: 1px solid #dfe7f3;
  color: #28446d;
  font-size: 15px;
  line-height: 1.5;
}

.mda-usage-info strong {
  color: #17325c;
}

.mda-save-status {
  margin-bottom: 0;
  padding: 10px 14px;
  border-radius: 12px;
  background: #f7f9fc;
  border: 1px solid #dfe7f3;
  color: #4c5f7f;
  font-size: 14px;
  line-height: 1.4;
}

.mda-save-status.is-saving {
  background: #eef4ff;
  border-color: #cfe0ff;
  color: #2855a3;
}

.mda-save-status.is-saved {
  background: #edf9f1;
  border-color: #cfead8;
  color: #246b3d;
}

.mda-save-status.is-error {
  background: #fff3f2;
  border-color: #f3d1cf;
  color: #a33e36;
}

.mda-form {
  display: grid;
  gap: 18px;
}

#mda-guide #mda-domain-flow-wrap {
  display: flex;
  flex-direction: column;
  gap: var(--mda-guide-blocks-gap, 18px);
}

.mda-field label {
  display: block;
  margin-bottom: 8px;
  font-size: 15px;
  font-weight: 700;
  color: #21395f;
}

/* Samme 22px linje som .mda-field-num → lodret midte af tal og bogstaver på én vandret linje */
#mda-guide .mda-field .mda-field-label-row label {
  margin-bottom: 0;
  flex: 1;
  min-width: 0;
  line-height: 22px;
  min-height: 22px;
  text-align: left;
  box-sizing: border-box;
  padding-left: 0;
  padding-right: 0;
}

.mda-field-hint {
  margin: -4px 0 10px 0;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
  color: #5a6b82;
}

.mda-step-note {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #e3eaf5;
}

.mda-step-note > label {
  font-weight: 700;
  color: #17325c;
}

.mda-step-note-hint {
  margin-top: 6px;
  margin-bottom: 10px;
}

.mda-field input,
.mda-field textarea {
  width: 100%;
  min-height: 54px;
  border-radius: 14px;
  border: 1px solid #d9e3f1;
  background: #fbfdff;
  padding: 14px 16px;
  font-size: 16px;
  color: #21395f;
  outline: none;
  box-shadow: none;
}

/* Flatpickr (fødselsdato): synligt felt matcher øvrige inputs */
.mda-field input.mda-guide-datepicker__display {
  width: 100%;
  min-height: 54px;
  border-radius: 14px;
  border: 1px solid #d9e3f1;
  background: #fbfdff;
  padding: 14px 16px;
  font-size: 16px;
  color: #21395f;
  outline: none;
  box-shadow: none;
  cursor: pointer;
}

.mda-field input.mda-guide-datepicker__display {
  padding-right: 48px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none'%3E%3Crect x='3' y='5' width='18' height='16' rx='3' stroke='%235A6B82' stroke-width='1.8'/%3E%3Cpath d='M8 3v4M16 3v4M3 9h18' stroke='%235A6B82' stroke-width='1.8' stroke-linecap='round'/%3E%3Ccircle cx='8.5' cy='13.5' r='1.1' fill='%235A6B82'/%3E%3Ccircle cx='12' cy='13.5' r='1.1' fill='%235A6B82'/%3E%3Ccircle cx='15.5' cy='13.5' r='1.1' fill='%235A6B82'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px 18px;
}

.mda-field input.mda-guide-datepicker__display:hover {
  border-color: #c5d4e8;
}

.mda-field input.mda-guide-datepicker__display:focus {
  border-color: #5d7cff;
  box-shadow: 0 0 0 4px rgba(93, 124, 255, .12);
  background: #fff;
}

#mda-guide .flatpickr-calendar {
  z-index: 1000020;
  border-radius: 16px;
  border: 1px solid #d9e3f1;
  box-shadow: 0 16px 48px rgba(33, 57, 95, 0.14);
  font-family: inherit;
}

#mda-guide .flatpickr-months .flatpickr-month {
  background: #f4f7fc;
  border-radius: 12px 12px 0 0;
  color: #21395f;
  fill: #21395f;
}

#mda-guide .flatpickr-current-month .flatpickr-monthDropdown-months,
#mda-guide .flatpickr-current-month .numInputWrapper input {
  font-weight: 700;
  color: #21395f;
}

#mda-guide .flatpickr-weekdays {
  background: #fbfdff;
}

#mda-guide span.flatpickr-weekday {
  color: #5a6b82;
  font-weight: 600;
}

#mda-guide .flatpickr-day.selected,
#mda-guide .flatpickr-day.startRange,
#mda-guide .flatpickr-day.endRange {
  background: #5d7cff;
  border-color: #5d7cff;
  color: #fff;
}

#mda-guide .flatpickr-day:hover {
  border-color: #5d7cff;
  background: #eef2ff;
}

#mda-guide .flatpickr-day.today {
  border-color: #5d7cff;
}

.mda-field textarea {
  min-height: 110px;
  resize: vertical;
}

.mda-field input::placeholder,
.mda-field textarea::placeholder {
  color: #96a3b8;
}

.mda-field input:focus,
.mda-field textarea:focus {
  border-color: #5d7cff;
  box-shadow: 0 0 0 4px rgba(93, 124, 255, .12);
  background: #fff;
}

.mda-choice-group,
.mda-choice-row {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.mda-choice {
  position: relative;
  display: inline-block;
  margin: 0;
  cursor: pointer;
}

.mda-choice input[type="radio"] {
  position: absolute;
  opacity: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}

.mda-choice-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  min-height: 46px;
  padding: 10px 20px;
  border: 1px solid #d8e2f2;
  border-radius: 999px;
  background: #f5f8fe;
  color: #21395f;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, color .2s ease, box-shadow .2s ease, transform .15s ease;
}

.mda-choice:hover .mda-choice-text {
  border-color: #bfd0ea;
  background: #edf3ff;
}

.mda-choice input[type="radio"]:checked + .mda-choice-text {
  border-color: #5d7cff;
  background: linear-gradient(135deg, #eaf0ff, #ede9ff);
  color: #1f3e74;
  box-shadow: 0 0 0 3px rgba(93, 124, 255, .14);
}

.mda-choice input[type="radio"]:focus-visible + .mda-choice-text {
  outline: 2px solid var(--mda-premium-focus, #6c88b8);
  outline-offset: 2px;
}

.mda-domain-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 0;
}

.mda-domain-row {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 0;
}

.mda-domain-row.is-saved {
  background: transparent;
  border: 0;
}

.mda-domain-row + .mda-domain-row {
  padding-top: 18px;
  border-top: 1px solid #e6ecf7;
}

.mda-domain-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
}

.mda-domain-row-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.mda-domain-state {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #e7eefb;
  color: #2d4f7b;
  font-size: 12px;
  font-weight: 700;
}

.mda-domain-row.is-editor .mda-domain-state {
  background: #eaf0ff;
  color: #214577;
}

.mda-domain-add {
  margin: 0;
  align-self: flex-start;
}

.mda-domain-summary {
  margin: 0;
  padding: 0;
}

.mda-domain-summary p {
  margin: 0 0 8px;
  color: #26446d;
  font-size: 15px;
  line-height: 1.45;
}

.mda-domain-summary p:last-child {
  margin-bottom: 0;
}

/* Gentagne flow-felter: samme flade layout som øvrige .mda-field (ingen grå boks). */
.mda-adresse-list,
.mda-email-list,
.mda-photo-list,
.mda-social-list,
.mda-document-list,
.mda-payment-list,
.mda-device-list,
.mda-subscription-list,
.mda-domain-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 0;
}

.mda-adresse-row,
.mda-email-row,
.mda-photo-row,
.mda-social-row,
.mda-document-row,
.mda-payment-row,
.mda-device-row,
.mda-subscription-row {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 0;
}

.mda-adresse-row + .mda-adresse-row,
.mda-email-row + .mda-email-row,
.mda-photo-row + .mda-photo-row,
.mda-social-row + .mda-social-row,
.mda-document-row + .mda-document-row,
.mda-payment-row + .mda-payment-row,
.mda-device-row + .mda-device-row,
.mda-subscription-row + .mda-subscription-row {
  padding-top: 18px;
  border-top: 1px solid #e6ecf7;
}

.mda-adresse-row-head,
.mda-email-row-head,
.mda-photo-row-head,
.mda-social-row-head,
.mda-document-row-head,
.mda-payment-row-head,
.mda-device-row-head,
.mda-subscription-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
}

.mda-adresse-list > .mda-adresse-row:only-child > .mda-adresse-row-head,
.mda-email-list > .mda-email-row:only-child > .mda-email-row-head,
.mda-photo-list > .mda-photo-row:only-child > .mda-photo-row-head,
.mda-social-list > .mda-social-row:only-child > .mda-social-row-head,
.mda-document-list > .mda-document-row:only-child > .mda-document-row-head,
.mda-payment-list > .mda-payment-row:only-child > .mda-payment-row-head,
.mda-device-list > .mda-device-row:only-child > .mda-device-row-head,
.mda-subscription-list > .mda-subscription-row:only-child > .mda-subscription-row-head {
  display: none;
}

.mda-adresse-row-head strong,
.mda-email-row-head strong,
.mda-photo-row-head strong,
.mda-social-row-head strong,
.mda-document-row-head strong,
.mda-payment-row-head strong,
.mda-device-row-head strong,
.mda-subscription-row-head strong {
  font-size: 15px;
  font-weight: 700;
  color: #61728f;
}

.mda-adresse-add,
.mda-email-add,
.mda-photo-add,
.mda-social-add,
.mda-document-add,
.mda-payment-add,
.mda-device-add,
.mda-subscription-add {
  margin: 0;
  align-self: flex-start;
}

.mda-adresse-postnr {
  font-variant-numeric: tabular-nums;
}

.mda-adresse-postnr-hint {
  margin-top: 6px;
  margin-bottom: 0;
  font-size: 13px;
  color: #475569;
}

.mda-adresse-postnr-hint.is-error {
  color: #b91c1c;
  font-weight: 600;
}

.mda-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.mda-btn,
.mda-actions a.mda-btn {
  appearance: none;
  border: none;
  border-radius: 14px;
  padding: 14px 22px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, opacity .2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mda-btn:hover,
.mda-actions a.mda-btn:hover {
  transform: translateY(-1px);
}

.mda-btn-primary {
  background: var(--mda-premium-cta-bg, linear-gradient(135deg, #2e6cff, #7a5cff));
  color: #fff !important;
  box-shadow: var(--mda-premium-cta-shadow, 0 10px 24px rgba(72, 95, 201, .24));
}

.mda-btn-secondary {
  background: #eef3fb;
  color: #28446d !important;
}

.mda-btn-test-temp {
  background: #fff7ed;
  color: #9a3412 !important;
  border: 2px dashed #fb923c;
  box-shadow: 0 4px 14px rgba(249, 115, 22, .18);
}

.mda-btn-test-temp:hover {
  background: #ffedd5;
}

.mda-btn:focus-visible,
.mda-guide-onboarding-trigger:focus-visible,
.mda-guide-modal__close:focus-visible {
  outline: 2px solid var(--mda-premium-focus, #6c88b8);
  outline-offset: 2px;
}

.mda-btn[disabled] {
  opacity: .7;
  cursor: not-allowed;
  transform: none;
  pointer-events: none;
}

.mda-btn-secondary[disabled] {
  opacity: 0.55;
  background: #e4eaf5;
  color: #8b98ae !important;
  box-shadow: none;
}

.mda-btn-primary[disabled] {
  opacity: 0.6;
  filter: grayscale(0.35);
  box-shadow: none;
  cursor: not-allowed;
}

.mda-btn-test-temp[disabled] {
  opacity: 0.5;
  box-shadow: none;
  background: #fff7ed;
}

.mda-field-hint-test {
  color: #9a3412;
  font-weight: 600;
}

.mda-message {
  margin-top: 0;
  padding: 14px 16px;
  border-radius: 14px;
  font-size: 15px;
  line-height: 1.5;
}

.mda-message.success {
  background: #edf9f1;
  border: 1px solid #cfead8;
  color: #246b3d;
}

.mda-message.error {
  background: #fff3f2;
  border: 1px solid #f3d1cf;
  color: #a33e36;
}

.mda-message__lead {
  margin: 0 0 10px;
}

.mda-message__lead:last-child {
  margin-bottom: 0;
}

.mda-message__detail {
  margin: 0;
  font-size: 0.96em;
  line-height: 1.55;
  opacity: 0.96;
}

.mda-message a {
  color: inherit;
  text-decoration: underline;
  font-weight: 700;
}

.mda-report-wrap {
  margin-top: 0;
  background: #fff;
  border-radius: 18px;
  border: 1px solid #e3ebf7;
  overflow: hidden;
}

.mda-report-head {
  padding: 18px 20px;
  background: linear-gradient(135deg, #f4f8ff, #f8f2ff);
  border-bottom: 1px solid #e3ebf7;
}

.mda-report-head h3 {
  margin: 0;
  font-size: 18px;
  color: #17325c;
  font-weight: 700;
}

.mda-report {
  padding: 24px;
  color: #1f3250;
  font-size: 16px;
  line-height: 1.75;
}

.mda-report h1,
.mda-report h2,
.mda-report h3 {
  color: #17325c;
  margin: 1.2em 0 .5em;
  line-height: 1.25;
}

.mda-report h1 {
  font-size: 30px;
}

.mda-report h2 {
  font-size: 24px;
}

.mda-report h3 {
  font-size: 20px;
}

.mda-report p {
  margin: 0 0 1em;
}

.mda-report-delivery-note {
  background: #f8fafc;
  border: 1px solid #dbe3ec;
  border-radius: 12px;
  padding: 14px 16px;
  color: #1f2d3d;
}

.mda-report-delivery-note--pending {
  background: #f9fafb;
  border-style: dashed;
  color: #6b7280;
}

.mda-report-delivery-note--error {
  background: #fff1f2;
  border: 1px solid #fda4af;
  color: #9f1239;
}

.mda-report-delivery-note p:last-child {
  margin-bottom: 0;
}

.mda-report-pdf-panel {
  margin: 0;
}

.mda-report-pdf-lead {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.55;
  color: #475569;
}

.mda-report-pdf-open-tab {
  display: inline-block;
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 600;
  color: #1d4ed8;
  text-decoration: underline;
}

.mda-report-pdf-open-tab:hover {
  color: #1e3a8a;
}

.mda-report-pdf-viewer-wrap {
  border: 1px solid #dbe3ec;
  border-radius: 12px;
  overflow: hidden;
  background: #f1f5f9;
  min-height: 420px;
}

.mda-report-pdf-viewer-wrap--loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
}

.mda-report-pdf-viewer-status {
  font-size: 14px;
  color: #64748b;
}

.mda-report-pdf-viewer {
  display: block;
  width: 100%;
  height: min(72vh, 820px);
  min-height: 420px;
  border: 0;
  background: #fff;
}

@media (max-width: 768px) {
  .mda-report-pdf-viewer {
    height: min(58vh, 640px);
    min-height: 320px;
  }
}

.mda-btn-link-danger {
  background: #fff1f2;
  border: 1px solid #fda4af;
  color: #9f1239;
}

.mda-btn-link-danger:hover {
  background: #ffe4e6;
  border-color: #fb7185;
  color: #881337;
}

.mda-btn-link-danger[disabled] {
  opacity: .55;
  cursor: not-allowed;
}

.mda-guide-report-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  /* Afstand fra kant, så tekst ikke klippes af .mda-report-wrap overflow + border-radius */
  padding: 4px 20px 22px;
  box-sizing: border-box;
}

.mda-guide-delete-data-hint {
  margin-top: 0;
  width: 100%;
  max-width: 36rem;
  font-size: 12px;
  line-height: 1.5;
  color: #6b7280;
  text-align: center;
}

.mda-report ul,
.mda-report ol {
  margin: 0 0 1.2em 1.2em;
}

.mda-report li {
  margin-bottom: .5em;
}

.mda-loading {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.mda-loading-machinery {
  position: relative;
  width: 74px;
  height: 58px;
  flex: 0 0 74px;
  margin-top: 2px;
  filter: drop-shadow(0 4px 9px rgba(39, 87, 171, 0.18));
}

.mda-loading-glow {
  position: absolute;
  left: 3px;
  top: 10px;
  width: 66px;
  height: 44px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(115, 157, 255, 0.58) 0%, rgba(115, 157, 255, 0) 75%);
  animation: mda-loading-glow-pulse 1.4s ease-in-out infinite;
}

.mda-loading-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.mda-particle {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: linear-gradient(180deg, #a9c7ff 0%, #5f93ff 100%);
  opacity: 0;
  animation: mda-particle-rise 1.2s ease-out infinite;
}

.mda-particle-1 { left: 10px; top: 44px; animation-delay: 0s; }
.mda-particle-2 { left: 24px; top: 50px; animation-delay: .35s; }
.mda-particle-3 { left: 44px; top: 46px; animation-delay: .7s; }
.mda-particle-4 { left: 60px; top: 40px; animation-delay: 1.05s; }

@keyframes mda-particle-rise {
  0%   { transform: translateY(2px) scale(.7); opacity: 0; }
  35%  { opacity: .9; }
  100% { transform: translateY(-14px) scale(1.15); opacity: 0; }
}

@keyframes mda-loading-glow-pulse {
  0%, 100% { opacity: .42; transform: scale(0.95); }
  50%      { opacity: .8; transform: scale(1.08); }
}

.mda-gear {
  position: absolute;
  border-radius: 50%;
  border: 2px solid #355b94;
  background: radial-gradient(circle at 35% 35%, #eef4ff 0%, #d9e7ff 65%, #c7d9ff 100%);
  box-shadow: 0 2px 6px rgba(32, 69, 142, 0.2), 0 0 0 1px rgba(103, 145, 231, 0.22) inset;
}

.mda-gear span {
  position: absolute;
  inset: 24%;
  border-radius: 50%;
  border: 2px solid #8aa8de;
  background: #f5f9ff;
}

.mda-gear-lg {
  width: 34px;
  height: 34px;
  left: 0;
  top: 18px;
  animation: mda-gear-spin-cw 1.2s linear infinite;
}

.mda-gear-md {
  width: 26px;
  height: 26px;
  left: 30px;
  top: 7px;
  animation: mda-gear-spin-ccw 1s linear infinite;
}

.mda-gear-sm {
  width: 20px;
  height: 20px;
  left: 49px;
  top: 30px;
  animation: mda-gear-spin-cw .85s linear infinite;
}

@keyframes mda-gear-spin-cw {
  to { transform: rotate(360deg); }
}

@keyframes mda-gear-spin-ccw {
  to { transform: rotate(-360deg); }
}

.mda-loading-content h4 {
  margin: 0 0 6px;
  font-size: 18px;
  color: #17325c;
}

.mda-loading-content p {
  margin: 0 0 10px;
  color: #5e6b84;
  font-size: 15px;
}

.mda-loading-substatus {
  margin: -2px 0 10px;
  color: #1f5aa4;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .1px;
}

.mda-loading-dots::after {
  content: "";
  display: inline-block;
  width: 1.4em;
  text-align: left;
  animation: mda-dots 1.3s steps(4, end) infinite;
}

@keyframes mda-dots {
  0%   { content: ""; }
  25%  { content: "."; }
  50%  { content: ".."; }
  75%  { content: "..."; }
  100% { content: ""; }
}

.mda-loading-steps {
  margin: 0;
  padding-left: 18px;
  color: #355b94;
  font-size: 14px;
}

.mda-loading-steps li {
  margin-bottom: 4px;
}

.mda-loading-bar {
  margin-top: 12px;
  width: 100%;
  height: 10px;
  background: #e8eef8;
  border-radius: 999px;
  overflow: hidden;
}

.mda-loading-bar-fill {
  width: 35%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #2e6cff, #7a5cff);
  animation: mda-loading-slide 1.4s ease-in-out infinite;
}

@keyframes mda-loading-slide {
  0% {
    transform: translateX(-90%);
  }
  100% {
    transform: translateX(260%);
  }
}

.mda-guide-login-required {
  padding: 24px;
  background: #fff;
  border: 1px solid #e3ebf7;
  border-radius: 16px;
}

/* Mobil/tablet: samme ydre slot som forsiden / header (980px — som øvrige MDA-sider) */
@media (max-width: 980px) {
  #mda-guide {
    width: var(--mda-content-outer-mobile) !important;
    max-width: var(--mda-content-outer-mobile) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    position: static !important;
    left: auto !important;
    right: auto !important;
    padding: 0 0 24px !important;
  }

  .mda-card {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 0 !important;
    box-shadow: none !important;
  }

  #mda-guide .mda-guide-hero {
    margin-top: var(--mda-universal-menu-gap, 16px) !important;
  }

  #mda-guide .mda-guide-hero,
  #mda-guide .mda-card > #mda-usage-info,
  #mda-guide .mda-card > #mda-save-status,
  #mda-guide .mda-card > #mda-message,
  #mda-guide .mda-card > .mda-form,
  #mda-guide .mda-card > .mda-report-wrap {
    max-width: var(--mda-universal-card-width, var(--mda-content-outer-mobile)) !important;
  }

  .mda-guide-hero-frame {
    width: 100% !important;
    max-width: 100% !important;
    min-height: auto;
    padding: var(--mda-universal-card-padding-mobile, clamp(18px, 5vw, 24px)) !important;
    box-shadow: var(--mda-universal-card-shadow, 0 20px 46px rgba(18, 34, 72, 0.10), 0 2px 8px rgba(18, 34, 72, 0.05)) !important;
  }

  .mda-field input,
  .mda-field textarea {
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .mda-header h2 {
    font-size: 20px !important;
    margin-bottom: 10px !important;
  }

  .mda-actions {
    flex-direction: column !important;
    gap: 10px !important;
  }

  .mda-btn {
    width: 100% !important;
    margin: 0 !important;
  }

  .mda-domain-row-head .mda-btn {
    width: auto !important;
  }
}

/* Matcher landing @767px — .mda-v2-hero .mda-v2-container */
@media (max-width: 767px) {
  #mda-guide .mda-guide-hero-frame {
    padding: var(--mda-universal-card-padding-mobile, clamp(18px, 5vw, 24px)) !important;
  }
}

/* Fælles dødzone under header: assets/css/mda-layout-tt5.css */

/* Ekstra stramning af selve guide-wrapperen */
#mda-guide{
  padding-top: 0 !important;
  padding-bottom: 22px !important;
  margin-top: 0 !important;
  box-sizing: border-box !important;
}

/* Lodret afstand til menu: #mda-guide .mda-guide-hero (som rådgivning/hjælp). */

/* Direkte shortcode-rendering: #mda-guide er ydre spor, .mda-card er selve kortet. */
html body:has(#mda-guide) #mda-guide,
html body.mda-guide-active #mda-guide {
  padding-left: 0 !important;
  padding-right: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* Desktop vandret luft på #mda-guide: @media (min-width: 981px) nederst — samme shortcode-slot som forsiden */

@media (max-width: 980px) {
  #mda-guide {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* Undgå vertikal “svæv”; på mobil må kortet stadig starte i venstre slot (mda-content-outer-mobile). */
  html body:has(#mda-guide) #mda-guide {
    align-self: flex-start !important;
  }
}

/* =========================================================
   KRITISK (TT5 / block themes): main får ofte flex-grow + højde
   og justify/align center → indhold “svæver” med kæmpe hvid klump.
   Vi tvinger start-justér og ingen vertikal udvidelse af main.
   ========================================================= */
html body:has(#mda-guide) main,
html body:has(#mda-guide) main.wp-block-group,
html body:has(#mda-guide) main#wp--skip-link--target,
html body:has(#mda-guide) main.is-layout-flex,
html body:has(#mda-guide) main.is-vertical{
  flex-grow: 0 !important;
  flex-shrink: 0 !important;
  flex-basis: auto !important;
  min-height: 0 !important;
  height: auto !important;
  justify-content: flex-start !important;
  align-items: stretch !important;
  align-content: flex-start !important;
}

html body:has(#mda-guide) main .wp-block-group,
html body:has(#mda-guide) main .wp-block-post-content{
  justify-content: flex-start !important;
  align-content: flex-start !important;
  min-height: 0 !important;
}

/* align-self på #mda-guide: kun mobil — se @media (max-width: 980px) ovenfor.
 * Desktop-centrering: blok nedenfor (samme som forsiden / rådgivning). */

/* =============================================================================
 * Desktop (≥981px): samme kolonne-slot som [mda_landing_v2] / rådgivning v2
 * (mda-landing-v2.css) — centrer shortcode + #mda-guide i viewport.
 * ============================================================================= */
@media (min-width: 981px) {
  html body:has(#mda-guide) .wp-site-blocks,
  html body.mda-guide-active .wp-site-blocks {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  html body:has(#mda-guide) main,
  html body:has(#mda-guide) main#wp--skip-link--target,
  html body.mda-guide-active main,
  html body.mda-guide-active main#wp--skip-link--target {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    align-self: stretch !important;
  }

  html body:has(#mda-guide) .entry-content,
  html body:has(#mda-guide) .wp-block-post-content,
  html body.mda-guide-active .entry-content,
  html body.mda-guide-active .wp-block-post-content {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  html body:has(#mda-guide) .entry-content .wp-block-shortcode,
  html body:has(#mda-guide) .wp-block-shortcode,
  html body.mda-guide-active .entry-content .wp-block-shortcode,
  html body.mda-guide-active .wp-block-shortcode,
  html body:has(#mda-guide) #mda-guide,
  html body.mda-guide-active #mda-guide {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    float: none !important;
    box-sizing: border-box !important;
  }
}

/* Sidste skanse: samme topkort-spor som hjælp/forside (vinder over tema + ældre guide-regler). */
body.mda-guide-active #mda-guide .mda-guide-hero,
body:has(#mda-guide) #mda-guide .mda-guide-hero,
body.mda-guide-active #mda-guide .mda-card > #mda-usage-info,
body:has(#mda-guide) #mda-guide .mda-card > #mda-usage-info,
body.mda-guide-active #mda-guide .mda-card > #mda-save-status,
body:has(#mda-guide) #mda-guide .mda-card > #mda-save-status,
body.mda-guide-active #mda-guide .mda-card > #mda-message,
body:has(#mda-guide) #mda-guide .mda-card > #mda-message,
body.mda-guide-active #mda-guide .mda-card > .mda-form,
body:has(#mda-guide) #mda-guide .mda-card > .mda-form,
body.mda-guide-active #mda-guide .mda-card > .mda-report-wrap,
body:has(#mda-guide) #mda-guide .mda-card > .mda-report-wrap {
  width: var(--mda-universal-card-width) !important;
  max-width: var(--mda-universal-card-width) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box !important;
}

body.mda-guide-active #mda-guide .mda-guide-hero-frame,
body:has(#mda-guide) #mda-guide .mda-guide-hero-frame {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}