.faq {
  width: auto;
  align-self: stretch;
  margin-inline: 64px;
  padding-top: 0;
}

.faq-title {
  width: 100%;
  text-align: center;
  font-size: clamp(42px, 6.5vw, 80px);
  line-height: 1.05;
}

.faq-box {
  width: min(600px, 100%);
  margin: 80px auto 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: transparent;
  border-radius: 0;
}

.faq-list,
.faq-support {
  background: #f5f5e9;
  border-radius: 40px;
}

.faq-list {
  padding: 10px;
}

.faq-tabs {
  display: flex;
  justify-content: center;
  gap: 4px;
  padding: 4px 0;
  margin-bottom: 10px;
}

.faq-tabs button {
  padding: 6px 14px;
  border-radius: var(--r-pill);
  font-size: 13px;
  color: var(--ink);
  transition: background-color 300ms var(--ease-out), color 300ms var(--ease-out), transform 300ms var(--ease-out);
}

.faq-tabs button.is-active {
  background: var(--accent);
  color: var(--ink);
}

.faq-tabs button:focus-visible {
  outline-offset: 1px;
}

[data-faq-panel] {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

[data-faq-panel][hidden] {
  display: none;
}

.faq-item {
  padding: 0;
  overflow: clip;
  contain: paint;
  transform-origin: 50% 50%;
}

.faq-item[open]:not(.is-closing) {
  min-height: 236px;
}

.faq-item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px;
  list-style: none;
  cursor: pointer;
  font-size: 17px;
  line-height: 1.5;
  letter-spacing: -0.03em;
  min-height: 76px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item .plus {
  flex: none;
  background: var(--card);
  transition: transform 320ms cubic-bezier(.16, 1, .3, 1);
}

.faq-item[open] .plus {
  transform: rotate(180deg);
}

.faq-item[open] .plus::after {
  transform: rotate(0);
}

.faq-item .body {
  padding: 0 20px 20px;
  font-size: 14px;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 220ms ease-out, transform 320ms cubic-bezier(.16, 1, .3, 1);
}

.faq-item[open] .body {
  opacity: 1;
  transform: none;
}

.faq-item.is-closing .body {
  opacity: 0;
  transform: translateY(-4px);
}

.faq-support {
  min-height: 124px;
  padding: 25px;
  display: flex;
  align-items: center;
  gap: 36px;
}

.faq-support-avatars {
  display: flex;
  flex: none;
  padding-left: 4px;
}

.faq-support-avatars img {
  width: 50px;
  height: 50px;
  margin-left: -14px;
  border: 2px solid #f5f5e9;
}

.faq-support-avatars img:first-child {
  margin-left: 0;
}

.faq-support-copy {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.faq-more {
  color: var(--muted);
}

.faq-mail {
  position: relative;
  align-self: flex-start;
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: -0.04em;
}

.faq-mail-icon {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--white);
  font: 700 12px/1 var(--font-body);
  vertical-align: 2px;
}

.faq-mail .eksempel {
  top: auto;
  right: 0;
  bottom: -21px;
}

@media (hover:hover) and (pointer:fine) {
  .faq-tabs button:not(.is-active):hover {
    background: rgba(36, 36, 36, 0.07);
    transform: translateY(-1px);
  }

  .faq-item summary:hover .plus {
    background: var(--accent);
  }

  .faq-mail:hover {
    color: var(--accent-deep);
  }
}

@media (max-width: 850px) {
  .faq {
    margin-inline: 0;
    padding-block: 0;
  }

  .faq-title {
    font-size: clamp(40px, 11vw, 50px);
    line-height: 1;
    letter-spacing: -0.04em;
  }

  .faq-box {
    margin-top: 30px;
  }

  .faq-tabs {
    flex-wrap: nowrap;
    gap: 2px;
  }

  .faq-tabs button {
    padding: 5px 10px;
    font-size: 12px;
  }

  .faq-item summary {
    min-height: 76px;
    padding: 20px;
    font-size: 15px;
  }

  .faq-item[open]:not(.is-closing) {
    min-height: 0;
  }

  .faq-item .body {
    padding: 0 20px 20px;
  }

  .faq-support {
    min-height: 210px;
    padding: 30px;
    flex-direction: column-reverse;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 28px;
  }

  .faq-support-copy {
    gap: 8px;
  }

  .faq-mail {
    font-size: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .faq-tabs button,
  .faq-item .plus,
  .faq-item .body {
    transition: none;
  }
}
