/* Dansk Byg – «Akut beredskab»: fast knap og lynskema. Selvstændig (ak-), kan bruges på alle sider. */
.ak-fab, .ak-dialog, .ak-dialog * { box-sizing: border-box; }
.ak-fab {
  position: fixed;
  right: 1rem;
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  z-index: 50;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 56px;
  padding: 0.75rem 1.25rem;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 750;
  letter-spacing: -0.01em;
  color: #fff;
  background: var(--accent, #c8102e);
  border: 2px solid #fff;
  border-radius: 999px;
  box-shadow: 0 6px 20px rgba(17, 17, 17, 0.35);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.ak-fab:hover { background: var(--accent-hover, #a50d26); }
.ak-fab:focus-visible { outline: 3px solid #111; outline-offset: 3px; }
.ak-fab::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  pointer-events: none;
}
.ak-fab-ikon { font-size: 1.25rem; line-height: 1; }
/* Opmærksomhed: blød glød-ring (ca. 2 s), lille vrik hvert ~7. sekund og en ekstra hilsen kort efter indlæsning.
   Kun mens .ak-liv er sat (fjernes ved første klik/åbning og huskes i sessionStorage). Ingen hurtig on/off-blink. */
.ak-fab.ak-liv::after { animation: ak-puls 2s ease-out infinite; }
.ak-fab.ak-liv { animation: ak-vrik 7s ease-in-out 4.5s infinite; }
.ak-fab.ak-liv.ak-intro { animation: ak-intro 1.2s ease-in-out 1; }
.ak-fab.ak-liv.ak-intro::after { animation: ak-puls-stor 1.2s ease-out 1; }
@keyframes ak-puls {
  0% { box-shadow: 0 0 0 0 rgba(200, 16, 46, 0.6); }
  70% { box-shadow: 0 0 0 16px rgba(200, 16, 46, 0); }
  100% { box-shadow: 0 0 0 16px rgba(200, 16, 46, 0); }
}
@keyframes ak-puls-stor {
  0% { box-shadow: 0 0 0 0 rgba(200, 16, 46, 0.7), 0 0 0 0 rgba(200, 16, 46, 0.4); }
  100% { box-shadow: 0 0 0 22px rgba(200, 16, 46, 0), 0 0 0 38px rgba(200, 16, 46, 0); }
}
@keyframes ak-vrik {
  0%, 88%, 100% { transform: none; }
  90% { transform: rotate(-3deg) translateX(-2px); }
  93% { transform: rotate(3deg) translateX(2px); }
  96% { transform: rotate(-2deg) translateX(-1px); }
  98% { transform: rotate(1deg); }
}
@keyframes ak-intro {
  0%, 100% { transform: none; }
  25% { transform: scale(1.12) rotate(-2deg); }
  50% { transform: scale(1.1) rotate(2deg); }
  75% { transform: scale(1.05); }
}
.ak-spacer { height: calc(5rem + env(safe-area-inset-bottom, 0px)); background: var(--footer, #111); }
body.flow-open .ak-fab, body.fag-videre-on .ak-fab,
body.flow-open .ak-spacer, body.fag-videre-on .ak-spacer { display: none; }
body.ak-lock { overflow: hidden; }

.ak-dialog {
  width: calc(100% - 1.5rem);
  max-width: 32rem;
  max-height: 92vh;
  max-height: 92dvh;
  padding: 0;
  border: 0;
  border-top: 4px solid var(--accent, #c8102e);
  border-radius: 6px;
  background: #fff;
  color: var(--ink, #111);
  overflow: hidden;
}
.ak-dialog[open] { display: flex; flex-direction: column; }
.ak-dialog::backdrop { background: rgba(17, 17, 17, 0.55); }
.ak-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1rem 0.5rem 1.15rem;
}
.ak-head h2 { margin: 0; font-size: 1.35rem; line-height: 1.2; letter-spacing: -0.02em; }
.ak-luk {
  appearance: none;
  width: 48px;
  height: 48px;
  flex: none;
  font: inherit;
  font-size: 1.8rem;
  line-height: 1;
  color: var(--ink, #111);
  background: #f4f4f4;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}
.ak-krop { overflow-y: auto; padding: 0.25rem 1.15rem 1.25rem; -webkit-overflow-scrolling: touch; }
.ak-lead { margin: 0 0 0.85rem; font-size: 1rem; line-height: 1.4; color: #444; }
.ak-112 { margin: 0.9rem 0 0; font-size: 0.95rem; line-height: 1.4; color: #111; font-weight: 650; }
.ak-valg { display: grid; gap: 0.75rem; }
.ak-valgknap {
  appearance: none;
  display: block;
  width: 100%;
  min-height: 84px;
  padding: 1rem 1.1rem;
  font: inherit;
  text-align: left;
  color: var(--ink, #111);
  background: #fff;
  border: 2px solid var(--ink, #111);
  border-radius: 6px;
  cursor: pointer;
}
.ak-valgknap strong { display: block; font-size: 1.2rem; line-height: 1.25; margin-bottom: 0.2rem; }
.ak-valgknap span { display: block; font-size: 0.98rem; line-height: 1.35; color: #444; }
.ak-valgknap.ak-akut { border-color: var(--accent, #c8102e); background: #fdf1f3; }
.ak-valgknap.ak-akut strong { color: var(--accent, #c8102e); }
.ak-valgknap:hover { background: #f4f4f4; }
.ak-valgknap.ak-akut:hover { background: #fbe5e9; }
.ak-valgknap:focus-visible, .ak-tilbage:focus-visible, .ak-luk:focus-visible { outline: 3px solid #111; outline-offset: 2px; }
.ak-tilbage {
  appearance: none;
  font: inherit;
  font-weight: 600;
  min-height: 44px;
  margin: 0 0 0.35rem;
  padding: 0.3rem 0.1rem;
  color: var(--ink, #111);
  background: none;
  border: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.ak-form fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.ak-form fieldset[hidden] { display: none; }
.ak-gruppe { margin: 0 0 1.05rem; }
.ak-gruppe > legend, .ak-gruppe > label.ak-lab, .ak-felt > label {
  display: block;
  margin: 0 0 0.4rem;
  padding: 0;
  font-weight: 700;
  font-size: 1rem;
}
.ak-valgfri { font-weight: 400; color: #444; }
.ak-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.ak-chip { position: relative; }
.ak-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ak-chip label {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0.55rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  background: #fff;
  color: var(--ink, #111);
  border: 2px solid #8c8c8c;
  border-radius: 999px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}
.ak-chip input:checked + label { background: var(--accent, #c8102e); border-color: var(--accent, #c8102e); color: #fff; }
.ak-chip input:focus-visible + label { outline: 3px solid #111; outline-offset: 2px; }
.ak-bad .ak-chips { outline: 2px solid var(--err, #8a0b1e); outline-offset: 4px; border-radius: 8px; }
.ak-felt { margin: 0 0 0.9rem; }
.ak-felt input, .ak-felt textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 0.6rem 0.75rem;
  font: inherit;
  font-size: 1rem;
  color: var(--ink, #111);
  background: #fff;
  border: 2px solid #8c8c8c;
  border-radius: 4px;
}
.ak-felt textarea { min-height: 5.5rem; resize: vertical; }
.ak-felt input:focus-visible, .ak-felt textarea:focus-visible { outline: 3px solid #111; outline-offset: 1px; border-color: #111; }
.ak-felt input[aria-invalid="true"] { border-color: var(--err, #8a0b1e); background: #f8eef0; }
.ak-par { display: grid; grid-template-columns: 8.5rem 1fr; gap: 0.75rem; }
.ak-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ak-samtykke { display: grid; grid-template-columns: 28px 1fr; gap: 0.7rem; align-items: start; margin: 0.35rem 0 0.85rem; font-size: 0.95rem; line-height: 1.4; }
.ak-samtykke input { width: 28px; height: 28px; margin: 0; accent-color: var(--accent, #c8102e); }
.ak-samtykke.ak-bad label { color: var(--err, #8a0b1e); font-weight: 650; }
.ak-samtykke a { color: inherit; }
.ak-fejl { margin: 0 0 0.75rem; color: var(--err, #8a0b1e); font-weight: 650; min-height: 0; }
.ak-fejl:empty { display: none; }
.ak-send {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 56px;
  padding: 0.75rem 1rem;
  font: inherit;
  font-size: 1.1rem;
  font-weight: 750;
  color: #fff;
  background: var(--accent, #c8102e);
  border: 0;
  border-radius: 4px;
  cursor: pointer;
}
.ak-send:hover:not(:disabled) { background: var(--accent-hover, #a50d26); }
.ak-send:disabled { opacity: 0.6; cursor: progress; }
.ak-send:focus-visible { outline: 3px solid #111; outline-offset: 2px; }
.ak-tak { text-align: center; padding: 1.25rem 0.25rem 0.5rem; }
.ak-tak-ikon { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; margin-bottom: 0.75rem; font-size: 2rem; color: #fff; background: #111; border-radius: 50%; }
.ak-tak h3 { margin: 0 0 0.4rem; font-size: 1.35rem; }
.ak-tak p { margin: 0 0 1.1rem; line-height: 1.45; }

@media (max-width: 639px) {
  .ak-dialog {
    width: 100%;
    max-width: none;
    margin: auto 0 0;
    max-height: 94vh;
    max-height: 94dvh;
    border-radius: 16px 16px 0 0;
    animation: ak-op 0.22s ease-out;
  }
  .ak-fab { right: 0.75rem; }
  .ak-par { grid-template-columns: 1fr; gap: 0; }
}
@keyframes ak-op { from { transform: translateY(40px); opacity: 0.4; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .ak-fab, .ak-fab::after, .ak-dialog { animation: none !important; }
}
@media print { .ak-fab, .ak-spacer, .ak-dialog { display: none !important; } }

/* Undersiden /mandskab/ */
.ms-side { max-width: 44rem; }
.ms-krumme { margin: 0 0 0.75rem; font-size: 0.95rem; color: #444; }
.ms-krumme a { color: inherit; }
.ms-side h1 { margin: 0 0 0.75rem; font-size: clamp(1.8rem, 5vw, 2.4rem); line-height: 1.15; letter-spacing: -0.025em; }
.ms-side h2 { margin: 2rem 0 0.6rem; font-size: 1.4rem; line-height: 1.2; letter-spacing: -0.015em; }
.ms-side p { line-height: 1.5; }
.ms-knapper { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1rem 0 0; }
.ms-stor { min-height: 56px; font-size: 1.05rem; padding: 0.75rem 1.4rem; }
.ms-liste, .ms-trin { margin: 0; padding-left: 1.3rem; line-height: 1.6; font-size: 1.05rem; }
.ms-liste li, .ms-trin li { margin: 0.3rem 0; }
.ms-faq { border: 1px solid #c8c8c8; border-radius: 4px; margin: 0 0 0.6rem; background: #fff; }
.ms-faq summary { cursor: pointer; padding: 0.85rem 1rem; min-height: 48px; font-weight: 650; font-size: 1.05rem; }
.ms-faq p { margin: 0; padding: 0 1rem 1rem; }
.ms-112 { margin-top: 0.75rem; }
.ms-mere { margin: 2rem 0 0; }
