/* Self-hostede variabel-fonts (GDPR + hastighed – ingen Google CDN) */
@font-face {
  font-family: "Hanken Grotesk";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/hanken-grotesk.woff2") format("woff2");
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/jetbrains-mono.woff2") format("woff2");
}

:root {
  /* Brandguide-palet (v1) */
  --prl-navy: #16294a;      /* navy – tekst, footer, mørke flader */
  --prl-navy-2: #1f3360;
  --prl-blue: #2671cc;      /* Pro-blå – primær (knapper, links, ikoner) – AA: hvid tekst 4.87:1 */
  --prl-blue-2: #1f5fc0;    /* dyb blå – hover & gradient-bund */
  --prl-cyan: #1f5fc0;      /* (remappet til dyb blå, så blå-gradienter holder sig på brand) */
  --prl-lime: #9ad94f;      /* lime – accent, taster, highlights */
  --prl-green: #5f9e2c;     /* grøn – sundhed & positiv tekst */
  --prl-warning: #b07d1e;   /* amber – økonomi/advarsel */
  --prl-bg: #eef4fc;        /* sidebaggrund */
  --prl-soft: #ffffff;      /* kort */
  --prl-ice: #f3f7fd;       /* blød blå flade */
  --prl-line: #d8e4f4;      /* kant */
  --prl-text: #16294a;      /* brødtekst (navy) */
  --prl-muted: #5a6b86;     /* blød tekst */
  --prl-faint: #7787a0;     /* svag tekst */
  --prl-danger: #b42318;
  --prl-shadow: 0 24px 70px rgba(22, 41, 74, 0.12);
  --prl-shadow-sm: 0 12px 32px rgba(22, 41, 74, 0.08);
  --prl-radius: 24px;
  --prl-container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--prl-text);
  background: linear-gradient(180deg, #fff 0%, var(--prl-bg) 58%, var(--prl-ice) 100%);
  font-family: "Hanken Grotesk", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: clip;
}

img,
svg,
video {
  max-width: 100%;
  height: auto;
}

picture {
  display: contents;
}

a {
  color: var(--prl-blue);
}

a:hover,
a:focus {
  color: var(--prl-navy);
}

button,
input,
select,
textarea {
  font: inherit;
}

.container {
  width: min(var(--prl-container), calc(100% - 42px));
  margin-inline: auto;
}

.narrow {
  max-width: 760px;
}

.skip-link,
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  top: 12px;
  left: 12px;
  z-index: 1000;
  width: auto;
  height: auto;
  padding: 12px 16px;
  clip: auto;
  color: #fff;
  background: var(--prl-navy);
  border-radius: 12px;
}

:focus-visible {
  outline: 3px solid var(--prl-blue);
  outline-offset: 3px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(216, 232, 255, 0.9);
  backdrop-filter: blur(18px);
  transition: box-shadow 0.22s ease, background-color 0.22s ease;
}

.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 34px rgba(22, 41, 74, 0.08);
}

.nav {
  position: relative;
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.logo {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  max-width: min(250px, 42vw);
  color: var(--prl-navy);
  font-size: 1.55rem;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.logo img,
.custom-logo,
.site-logo-img {
  display: block;
  width: 100%;
  max-width: 250px;
  max-height: 48px;
  height: auto;
  object-fit: contain;
}

.site-logo-img {
  aspect-ratio: 569 / 92;
}

.nav-links {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.nav-links .menu {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.nav-links .menu li {
  position: relative;
  list-style: none;
}

.nav-links .menu > li > a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 13px;
  border-radius: 11px;
  white-space: nowrap;
}

.nav-links a {
  color: var(--prl-muted);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.18s ease, background-color 0.18s ease;
}

/* Top-niveau må ikke ombryde; undermenuen MÅ gerne (lange SEO-titler). */
.nav-links .menu > li > a {
  white-space: nowrap;
}

.nav-links .menu-item-has-children > a::after {
  content: "";
  width: 6px;
  height: 6px;
  margin-left: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

.nav-links a:hover,
.nav-links a:focus {
  color: var(--prl-navy);
}

.nav-links .menu > li > a:hover,
.nav-links .menu > li > a:focus,
.nav-links .current-menu-item > a,
.nav-links .current-menu-ancestor > a {
  color: var(--prl-navy);
  background: #e4ecfb;
  box-shadow: none;
}

/* Desktop hover/flyout dropdown — scoped so it never leaks into the mobile drill-down. */
@media (min-width: 901px) {
  .nav-links .sub-menu {
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    z-index: 80;
    display: grid;
    min-width: 280px;
    max-width: 340px;
    max-height: min(62vh, 520px);
    gap: 2px;
    padding: 12px;
    margin: 0;
    overflow-x: hidden;
    overflow-y: auto;
    visibility: hidden;
    list-style: none;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid var(--prl-line);
    border-radius: 20px;
    box-shadow: var(--prl-shadow);
    opacity: 0;
    transform: translate(-50%, 8px);
    transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
  }

  .nav-links .sub-menu::before {
    content: "";
    position: absolute;
    top: -13px;
    left: 0;
    right: 0;
    height: 13px;
  }

  .nav-links .menu > li:hover > .sub-menu,
  .nav-links .menu > li:focus-within > .sub-menu {
    visibility: visible;
    opacity: 1;
    transform: translate(-50%, 0);
  }

  .nav-links .sub-menu a {
    display: block;
    padding: 10px 12px;
    color: var(--prl-muted);
    font-size: 0.88rem;
    line-height: 1.35;
    white-space: normal;
    overflow-wrap: anywhere;
    border-radius: 12px;
  }

  .nav-links .sub-menu a:hover,
  .nav-links .sub-menu a:focus {
    color: var(--prl-blue);
    background: var(--prl-ice);
  }
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Drill-down affordances are injected by JS and only used in the mobile menu. */
.submenu-head,
.submenu-all {
  display: none;
}

.mobile-toggle {
  display: none;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border: 1px solid var(--prl-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--prl-shadow-sm);
}

.mobile-toggle__bars,
.mobile-toggle__bars::before,
.mobile-toggle__bars::after {
  display: block;
  width: 20px;
  height: 2px;
  margin: auto;
  background: var(--prl-navy);
  border-radius: 99px;
  transition: transform 0.18s ease, top 0.18s ease, background-color 0.18s ease;
}

.mobile-toggle__bars {
  position: relative;
}

.mobile-toggle__bars::before,
.mobile-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.mobile-toggle__bars::before {
  top: -7px;
}

.mobile-toggle__bars::after {
  top: 7px;
}

.nav.is-open .mobile-toggle__bars {
  background: transparent;
}

.nav.is-open .mobile-toggle__bars::before {
  top: 0;
  transform: rotate(45deg);
}

.nav.is-open .mobile-toggle__bars::after {
  top: 0;
  transform: rotate(-45deg);
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.icon-btn,
.search-form button,
.hero-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.primary-btn,
.search-form button,
.hero-search button {
  color: #fff;
  background: var(--prl-blue);
  box-shadow: 0 6px 16px rgba(47, 126, 230, 0.3);
}

.primary-btn:hover,
.primary-btn:focus,
.search-form button:hover,
.search-form button:focus,
.hero-search button:hover,
.hero-search button:focus {
  background: var(--prl-blue-2);
  box-shadow: 0 8px 20px rgba(47, 126, 230, 0.36);
  transform: translateY(-1px);
}

.secondary-btn:hover,
.secondary-btn:focus {
  transform: translateY(-1px);
}

.primary-btn,
.secondary-btn {
  min-height: 48px;
  padding: 0 22px;
}

.primary-btn .wp-block-button__link,
.secondary-btn .wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  color: inherit;
  line-height: 1.15;
  text-align: center;
  background: transparent !important;
  border-radius: 12px;
  box-shadow: none !important;
}

.primary-btn .wp-block-button__link:hover,
.primary-btn .wp-block-button__link:focus,
.secondary-btn .wp-block-button__link:hover,
.secondary-btn .wp-block-button__link:focus {
  color: inherit;
}

.secondary-btn {
  color: var(--prl-navy);
  background: #fff;
  border-color: var(--prl-line);
  box-shadow: var(--prl-shadow-sm);
}

.ghost-btn {
  color: var(--prl-blue);
  background: transparent;
  white-space: nowrap;
}

.icon-btn {
  width: 48px;
  color: var(--prl-navy);
  background: #fff;
  border-color: var(--prl-line);
  box-shadow: var(--prl-shadow-sm);
}

.hero {
  position: relative;
  padding: 64px 0 62px;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.98fr) minmax(360px, 1.02fr);
  gap: 46px;
  align-items: center;
}

.hero-copy {
  max-width: 650px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  padding: 8px 13px;
  color: var(--prl-blue);
  background: rgba(47, 126, 230, 0.09);
  border: 1px solid rgba(47, 126, 230, 0.16);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

/* Klikbart kategori-badge over beregner-titlen. */
a.eyebrow--link {
  gap: 5px;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

a.eyebrow--link::after {
  content: "\203A"; /* › – antyder at man kan klikke */
  font-size: 1.05em;
  line-height: 1;
}

/* Kategori-farver fra brandguiden */
.eyebrow--cat-medicinberegner       { color: #1f5fc0; background: #dbe9fb; border-color: #c7dbf5; }
.eyebrow--cat-sundhedsberegner      { color: #3b6d11; background: #eaf6db; border-color: #d6ecbf; }
.eyebrow--cat-okonomi               { color: #854f0b; background: #fdeecd; border-color: #f3dca6; }
.eyebrow--cat-almindelige-beregnere { color: #4a5a7a; background: #e6ebf5; border-color: #d4ddec; }

a.eyebrow--cat-medicinberegner:hover,
a.eyebrow--cat-medicinberegner:focus-visible       { color: #fff; background: #1f5fc0; border-color: #1f5fc0; }
a.eyebrow--cat-sundhedsberegner:hover,
a.eyebrow--cat-sundhedsberegner:focus-visible      { color: #fff; background: #3b6d11; border-color: #3b6d11; }
a.eyebrow--cat-okonomi:hover,
a.eyebrow--cat-okonomi:focus-visible               { color: #fff; background: #854f0b; border-color: #854f0b; }
a.eyebrow--cat-almindelige-beregnere:hover,
a.eyebrow--cat-almindelige-beregnere:focus-visible { color: #fff; background: #4a5a7a; border-color: #4a5a7a; }

.pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--prl-cyan);
  box-shadow: 0 0 0 8px rgba(49, 199, 239, 0.14);
  animation: prl-pulse 2.2s ease-in-out infinite;
}

.hero h1,
.page-hero h1,
.archive-header h1 {
  max-width: 680px;
  margin: 18px 0;
  color: var(--prl-navy);
  font-size: clamp(3.35rem, 5.1vw, 4.4rem);
  line-height: 0.98;
  letter-spacing: 0;
  text-wrap: balance;
}

.archive-header h1,
.page-hero h1 {
  font-size: 3.2rem;
}

.blue-text {
  color: var(--prl-blue);
}

.lead {
  max-width: 600px;
  margin: 0;
  color: #35466e;
  font-size: 1.14rem;
  line-height: 1.65;
}

.hero-search,
.search-form {
  display: flex;
  gap: 8px;
  width: min(100%, 590px);
  margin-top: 24px;
  padding: 7px;
  background: #fff;
  border: 1px solid var(--prl-line);
  border-radius: 18px;
  box-shadow: 0 16px 42px rgba(22, 41, 74, 0.08);
}

.hero-search input,
.search-form input {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  padding: 0 16px;
  color: var(--prl-navy);
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 0.98rem;
}

.hero-search button,
.search-form button {
  min-width: 76px;
  padding: 0 18px;
  border-radius: 14px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.hero-actions .wp-block-button {
  flex: 0 1 212px;
}

.hero-actions .wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 48px;
  padding: 0 22px;
  line-height: 1.15;
  text-align: center;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: fit-content;
  max-width: 100%;
  margin-top: 30px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(216, 232, 255, 0.85);
  border-radius: 18px;
  box-shadow: 0 14px 36px rgba(22, 41, 74, 0.06);
}

.trust {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 7px 10px 7px 7px;
  color: #4c6185;
  background: #fff;
  border: 1px solid rgba(216, 232, 255, 0.72);
  border-radius: 14px;
  font-size: 0.88rem;
  font-weight: 750;
}

.trust span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex: 0 0 28px;
  color: var(--prl-blue);
  background: var(--prl-ice);
  border-radius: 10px;
  box-shadow: none;
  font-size: 0.82rem;
  font-weight: 900;
}

.hero-visual {
  position: relative;
  --hero-shift-x: 0px;
  --hero-shift-y: 0px;
  min-height: 525px;
  display: grid;
  place-items: center;
}

.glow {
  position: absolute;
  inset: 14%;
  z-index: 0;
  display: block;
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 45%, rgba(49, 199, 239, 0.24), transparent 56%),
    radial-gradient(circle at 55% 60%, rgba(47, 126, 230, 0.16), transparent 62%);
  filter: blur(2px);
  animation: prl-glow 6.5s ease-in-out infinite;
}

.orbit {
  position: absolute;
  z-index: 1;
  display: block;
  width: min(460px, 88%);
  aspect-ratio: 1;
  border: 1px solid rgba(47, 126, 230, 0.22);
  border-radius: 999px;
  box-shadow: inset 0 0 0 18px rgba(255, 255, 255, 0.22);
  animation: prl-spin 18s linear infinite;
}

.orbit::before,
.orbit::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--prl-blue), var(--prl-cyan));
  box-shadow: 0 12px 25px rgba(47, 126, 230, 0.24);
}

.orbit::before {
  top: 24%;
  left: 7%;
}

.orbit::after {
  right: 10%;
  bottom: 20%;
}

.mascot-wrap {
  position: relative;
  z-index: 2;
  animation: prl-float 4.8s ease-in-out infinite;
}

.mascot-wrap.wp-block-image {
  margin: 0;
}

.mascot-wrap img {
  width: min(360px, 78vw);
  height: auto;
  filter: drop-shadow(0 34px 34px rgba(22, 41, 74, 0.2));
  transform: translate(var(--hero-shift-x), var(--hero-shift-y));
  transition: transform 0.18s ease-out;
}

.stat-card {
  position: absolute;
  z-index: 3;
  min-width: 166px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(216, 232, 255, 0.95);
  border-radius: 22px;
  box-shadow: var(--prl-shadow);
  animation: prl-float 5.5s ease-in-out infinite;
  transform: translate(calc(var(--hero-shift-x) * -0.4), calc(var(--hero-shift-y) * -0.4));
  transition: transform 0.18s ease-out;
}

.stat-card small {
  color: var(--prl-muted);
  font-weight: 750;
}

.stat-card strong {
  display: block;
  margin-top: 4px;
  color: var(--prl-navy);
  font-size: 1.35rem;
}

.stat-1 {
  left: 4%;
  top: 18%;
}

.stat-2 {
  right: 0;
  top: 34%;
  animation-delay: 0.6s;
}

.stat-3 {
  left: 10%;
  bottom: 14%;
  animation-delay: 1.1s;
}

.section {
  padding: 68px 0;
}

.front-page-content > .wp-block-group {
  margin-block-start: 0;
}

.front-page-content > .wp-block-group + .wp-block-group {
  margin-top: 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 26px;
}

.section-head .ghost-btn,
.section-head .ghost-btn a {
  flex: 0 0 auto;
  white-space: nowrap;
}

.section-head h2,
.feature-box h2,
.related-card h2,
.footer-brand h2 {
  margin: 12px 0 0;
  color: var(--prl-navy);
  font-size: 2rem;
  line-height: 1.15;
  letter-spacing: 0;
}

.cards,
.listing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 18px;
  align-items: stretch;
}

.cards {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Shortcode-grid: tilpasser sig automatisk efter tilgængelig bredde
   (3 → 2 → 1 kolonne), uanset hvor på siden det placeres. */
.cards.prl-card-grid {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* Blog-grid med valgbart antal kolonner ([prl_post_grid columns="x"]). */
.cards.prl-post-grid {
  grid-template-columns: repeat(var(--prl-cols, 3), minmax(0, 1fr));
}

@media (max-width: 900px) {
  .cards.prl-post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .cards.prl-post-grid {
    grid-template-columns: 1fr;
  }
}

/* PWA install-knap (vises kun når browseren tilbyder installation). */
.prl-install {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 18px;
  color: #fff;
  font-weight: 700;
  background: var(--prl-blue);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(38, 113, 204, 0.4);
  cursor: pointer;
}

.prl-install[hidden] {
  display: none;
}

/* På mobil ligger en sticky bund-bar nederst – løft install-knappen over den. */
@media (max-width: 900px) {
  .prl-install {
    bottom: calc(70px + env(safe-area-inset-bottom));
  }
}

/* PWA indgangs-animation (splash) – kun i den installerede app. */
.prl-splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.prl-splash[hidden] {
  display: none;
}

.prl-splash.is-out {
  opacity: 0;
  visibility: hidden;
}

.prl-splash__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.prl-splash__inner img {
  width: auto;
  height: 42vh;
  max-height: 300px;
  animation: prl-splash-pop 0.7s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}

.prl-splash__name {
  color: var(--prl-navy);
  font-size: 1.3rem;
  font-weight: 800;
  animation: prl-splash-fade 0.6s ease 0.25s both;
}

@keyframes prl-splash-pop {
  from { opacity: 0; transform: scale(0.5); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes prl-splash-fade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.wp-block-query.cards {
  display: block;
}

.wp-block-query.cards .wp-block-post-template {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 18px;
  align-items: stretch;
  padding: 0;
  margin: 0;
  list-style: none;
}

.wp-block-query.cards .wp-block-post {
  display: flex;
  margin: 0;
}

.tool-card {
  display: flex;
  width: 100%;
  min-width: 0;
}

.tool-card__link {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 220px;
  padding: 22px;
  color: var(--prl-text);
  text-decoration: none;
  background: #fff;
  border: 1px solid var(--prl-line);
  border-radius: 20px;
  box-shadow: 0 2px 12px rgba(22, 41, 74, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.tool-card__link:hover,
.tool-card__link:focus {
  color: var(--prl-text);
  border-color: #c2d8f4;
  box-shadow: 0 14px 30px rgba(22, 41, 74, 0.12);
  transform: translateY(-4px);
}

.tool-card__link:hover .tool-card__arrow,
.tool-card__link:focus .tool-card__arrow {
  transform: translateX(4px);
}

.tool-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.tool-card__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: none;
  color: #4a5a7a;
  background: #e6ebf5;
  border-radius: 13px;
}

.tool-card__icon svg {
  width: 24px;
  height: 24px;
}

.tool-card__icon img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.tool-card__icon--medicinberegner       { color: #1f5fc0; background: #dbe9fb; }
.tool-card__icon--sundhedsberegner      { color: #5f9e2c; background: #eaf6db; }
.tool-card__icon--okonomi               { color: #b07d1e; background: #fdeecd; }
.tool-card__icon--almindelige-beregnere { color: #4a5a7a; background: #e6ebf5; }

.tool-card__category {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #4a5a7a;
  background: #e6ebf5;
}

.tool-card__category--medicinberegner       { color: #1f5fc0; background: #dbe9fb; }
.tool-card__category--sundhedsberegner      { color: #3b6d11; background: #eaf6db; }
.tool-card__category--okonomi               { color: #854f0b; background: #fdeecd; }
.tool-card__category--almindelige-beregnere { color: #4a5a7a; background: #e6ebf5; }

.tool-card h2 {
  margin: 0 0 8px;
  color: var(--prl-navy);
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.3;
}

.tool-card h2 a {
  color: inherit;
  text-decoration: none;
}

.tool-card .wp-block-post-terms a {
  color: var(--prl-blue);
  text-decoration: none;
}

.tool-card p {
  margin: 0;
  color: var(--prl-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.tool-card .wp-block-post-excerpt {
  flex: 1 1 auto;
}

.tool-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: auto;
  padding-top: 18px;
  color: var(--prl-blue);
  font-weight: 700;
  font-size: 0.95rem;
}

.tool-card__arrow {
  transition: transform 0.2s ease;
}

.post-card {
  display: flex;
  width: 100%;
  min-width: 0;
}

.post-card__link {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 260px;
  padding: 22px;
  color: var(--prl-text);
  text-decoration: none;
  background: #fff;
  border: 1px solid var(--prl-line);
  border-radius: 18px;
  box-shadow: var(--prl-shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.post-card__link:hover,
.post-card__link:focus {
  color: var(--prl-text);
  border-color: #9dccff;
  box-shadow: var(--prl-shadow);
  transform: translateY(-3px);
}

.post-card__media {
  display: block;
  aspect-ratio: 16 / 9;
  margin: -8px -8px 16px;
  overflow: hidden;
  border-radius: 14px;
  background: #eef7ff;
}

.post-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-card__meta,
.post-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--prl-muted);
  font-size: 0.88rem;
  font-weight: 750;
}

.post-meta-line {
  margin-top: 16px;
}

.post-meta-line a {
  color: var(--prl-muted);
  text-decoration: none;
}

.post-meta-line a:hover,
.post-meta-line a:focus {
  color: var(--prl-blue);
}

.post-card h2 {
  margin: 10px 0;
  color: var(--prl-navy);
  font-size: 1.2rem;
  line-height: 1.25;
  min-height: 3em;
}

.post-card p {
  margin: 0;
  color: var(--prl-muted);
  font-size: 0.95rem;
}

.post-card__arrow,
.text-link {
  margin-top: auto;
  padding-top: 18px;
  color: var(--prl-blue);
  font-weight: 850;
}

.text-link {
  display: inline-block;
  text-decoration: none;
}

.empty-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 16px;
  margin-top: 18px;
}

.empty-actions a {
  font-weight: 850;
  text-decoration: none;
}

.category-intro {
  max-width: 820px;
}

.faq-panel h3 {
  margin-top: 1.45rem;
  color: var(--prl-navy);
  font-size: 1.18rem;
  line-height: 1.25;
}

.faq-panel h3 + p {
  margin-top: 0.4rem;
}

.feature-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.feature-box,
.content-card,
.related-card,
.calculator-shell,
.empty-state {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--prl-line);
  border-radius: 28px;
  box-shadow: var(--prl-shadow-sm);
}

.feature-box,
.content-card,
.related-card,
.empty-state {
  padding: 28px;
}

.feature-box,
.content-card,
.related-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.feature-box p,
.empty-state p {
  color: var(--prl-muted);
}

.wide-cta {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(0, 1.2fr);
  gap: 30px;
  align-items: center;
  margin-top: 10px;
  margin-bottom: 16px;
  padding: 40px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, #16294a 0%, #2671cc 100%);
  border-radius: 30px;
  box-shadow: 0 28px 70px rgba(22, 41, 74, 0.28);
}

.wide-cta .wp-block-image {
  margin: 0;
  justify-self: center;
}

.wide-cta img {
  width: min(250px, 100%);
  height: auto;
  filter: drop-shadow(0 28px 24px rgba(0, 0, 0, 0.22));
}

.wide-cta .eyebrow {
  color: #a6e7ff;
}

.wide-cta h2 {
  margin: 10px 0 12px;
  color: #fff;
  font-size: clamp(2rem, 3vw, 3.1rem);
  line-height: 1.05;
}

.wide-cta p:not(.eyebrow) {
  max-width: 620px;
  color: rgba(255, 255, 255, 0.82);
}

.wide-cta .wp-block-buttons {
  margin-top: 20px;
}

.wide-cta .wp-block-button__link {
  color: var(--prl-navy);
  background: #fff;
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.16);
}

.seo-section {
  padding-top: 36px;
}

.seo-panel {
  display: grid;
  gap: 30px;
  padding: 34px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--prl-line);
  border-radius: 30px;
  box-shadow: var(--prl-shadow-sm);
}

.seo-intro {
  max-width: 860px;
}

.seo-intro h2 {
  margin: 14px 0;
  color: var(--prl-navy);
  font-size: 2.35rem;
  line-height: 1.15;
}

.seo-intro p,
.seo-content-grid p {
  color: #33466f;
}

.seo-content-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.seo-content-grid article {
  padding-top: 20px;
  border-top: 1px solid var(--prl-line);
}

.seo-content-grid h3 {
  margin: 0 0 10px;
  color: var(--prl-navy);
  font-size: 1.22rem;
  line-height: 1.3;
}

.seo-content-grid a {
  display: inline-flex;
  margin-top: 4px;
  font-weight: 850;
  text-decoration: none;
}

.reveal {
  opacity: 1;
  transform: none;
}

.js-enabled .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  will-change: opacity, transform;
}

.js-enabled .reveal.show {
  opacity: 1;
  transform: none;
}

@keyframes prl-float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-16px);
  }
}

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

@keyframes prl-glow {
  0%,
  100% {
    opacity: 0.74;
    transform: scale(0.98);
  }

  50% {
    opacity: 1;
    transform: scale(1.05);
  }
}

@keyframes prl-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 8px rgba(49, 199, 239, 0.12);
  }

  50% {
    box-shadow: 0 0 0 16px rgba(49, 199, 239, 0.03);
  }
}

.page-hero {
  padding: 42px 0 18px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-bottom: 18px;
  color: var(--prl-muted);
  font-size: 0.92rem;
  font-weight: 750;
}

.breadcrumbs a {
  color: var(--prl-muted);
  text-decoration: none;
}

.breadcrumbs a:hover,
.breadcrumbs a:focus {
  color: var(--prl-blue);
}

.single-section {
  padding-top: 28px;
}

.page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.75fr);
  gap: 26px;
  align-items: start;
}

.page-grid--single {
  grid-template-columns: minmax(0, 880px);
}

.entry-content > :first-child {
  margin-top: 0;
}

.entry-content h2,
.entry-content h3 {
  color: var(--prl-navy);
  line-height: 1.2;
  letter-spacing: 0;
}

.entry-content h2 {
  margin-top: 2rem;
  font-size: 1.75rem;
}

.entry-content h3 {
  margin-top: 1.6rem;
  font-size: 1.35rem;
}

.entry-content p,
.entry-content li {
  color: #33466f;
}

.entry-content a {
  font-weight: 750;
}

.featured-media {
  margin: 0 0 24px;
  overflow: hidden;
  border-radius: 22px;
}

.featured-media img {
  display: block;
  width: 100%;
}

.sidebar-stack {
  display: grid;
  gap: 20px;
}

.related-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.related-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  color: var(--prl-navy);
  font-weight: 800;
  text-decoration: none;
  background: #fff;
  border: 1px solid var(--prl-line);
  border-radius: 16px;
}

.related-list a:hover,
.related-list a:focus {
  border-color: #9dccff;
  box-shadow: var(--prl-shadow-sm);
}

.calc-help .steps {
  margin-top: 16px;
}

.steps {
  counter-reset: step;
  display: grid;
  gap: 14px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.step {
  counter-increment: step;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  align-items: start;
}

.step b {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #fff;
  font-size: 0.92rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--prl-blue), var(--prl-blue-2));
  border-radius: 12px;
  box-shadow: 0 8px 18px rgba(47, 126, 230, 0.28);
}

.step b::before {
  content: counter(step);
}

.step__body {
  display: grid;
  gap: 2px;
}

.step strong {
  color: var(--prl-navy);
  font-weight: 850;
}

.step__desc {
  color: var(--prl-muted);
  font-size: 0.92rem;
  line-height: 1.4;
}

.calc-result {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 18px;
  padding: 22px 24px;
  color: #fff;
  background: linear-gradient(155deg, var(--prl-blue-2), #163a82);
  border: 0;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(47, 126, 230, 0.26);
}

.calculator-main:has(.prcb-result:not(:empty)) .calc-result {
  display: none;
}

.calc-ad {
  margin: 0 0 24px;
  text-align: center;
}

/* Annoncen på artikler: adskilt fra brødteksten med en fin linje + luft. */
.calc-ad--article {
  margin-top: 30px;
  padding-top: 26px;
  border-top: 1px solid var(--prl-line);
}

.calc-ad__label {
  display: block;
  margin-bottom: 5px;
  font-size: 0.68rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--prl-muted);
}

.calc-result__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  font-size: 1.3rem;
  font-weight: 900;
}

.calc-result__body {
  display: grid;
  gap: 2px;
}

.calc-result__body strong {
  color: #fff;
  font-size: 1.08rem;
}

.calc-result__hint {
  color: #cfe2fb;
}

.warning-card {
  margin: 0;
  padding: 18px 20px;
  color: #734800;
  background: #fff8e8;
  border: 1px solid #ffe0a1;
  border-radius: 24px;
}

.warning-card p {
  margin: 0;
  color: #734800;
  font-weight: 800;
  line-height: 1.5;
}

.mini-mascot {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: linear-gradient(135deg, #eef7ff, #fff);
  border: 1px solid var(--prl-line);
  border-radius: 24px;
}

.mini-mascot img {
  flex: 0 0 72px;
}

.mini-mascot p {
  margin: 0;
  color: var(--prl-muted);
  font-weight: 750;
}

.calculator-shell {
  margin-bottom: 24px;
  padding: 0;
  overflow: hidden;
}

.calculator-shell .prcb-calculator,
.entry-content .prcb-calculator {
  margin: 0;
}

.calculator-shell .prcb-card,
.entry-content .prcb-card {
  border: 0;
  border-radius: 28px;
  box-shadow: none;
}

.prcb-card {
  border-color: var(--prl-line) !important;
  border-radius: 28px !important;
  box-shadow: var(--prl-shadow-sm) !important;
}

.prcb-title {
  color: var(--prl-navy);
}

.prcb-field label {
  color: var(--prl-navy);
}

.prcb-field input,
.prcb-field select {
  min-height: 56px;
  border-color: #cfe0f7 !important;
  border-radius: 16px !important;
}

.prcb-button {
  width: 100%;
  min-height: 56px;
  background: var(--prl-blue) !important;
  border-radius: 12px !important;
  font-weight: 700 !important;
  box-shadow: 0 6px 16px rgba(47, 126, 230, 0.3);
  transition: background-color 0.18s ease, box-shadow 0.18s ease;
}

.prcb-button:hover,
.prcb-button:focus {
  background: var(--prl-blue-2) !important;
  box-shadow: 0 8px 20px rgba(47, 126, 230, 0.36);
}

.prcb-result {
  color: #fff !important;
  background: linear-gradient(155deg, var(--prl-blue-2), #163a82) !important;
  border: 0 !important;
  border-radius: 20px !important;
  box-shadow: 0 10px 30px rgba(47, 126, 230, 0.26);
}

.prcb-result-value {
  color: #fff !important;
  font-family: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;
}

.prcb-result .prcb-result-label,
.prcb-result-label {
  color: #cfe2fb !important;
}

.prcb-result-interpretation,
.prcb-result-interpretation-message {
  color: #eaf2fd !important;
}

.prcb-result-interpretation-label {
  color: #fff !important;
}

.prcb-error {
  color: var(--prl-danger) !important;
}

.archive-header {
  margin-bottom: 28px;
}

.archive-description {
  max-width: 760px;
  color: var(--prl-muted);
}

.empty-state {
  display: grid;
  justify-items: center;
  gap: 14px;
  text-align: center;
}

.empty-state h1,
.empty-state h2 {
  margin: 0;
  color: var(--prl-navy);
}

.pagination {
  margin: 36px 0 8px;
}

/* Nulstil menuens .nav-links-styling, som the_posts_pagination()'s indre
   <div class="nav-links"> ellers arver (også mobil-reglen display:none). */
.pagination .nav-links {
  position: static;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto;
  height: auto;
  inset: auto;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}

.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 48px;
  padding: 0 14px;
  color: var(--prl-navy);
  font-size: 0.95rem;
  font-weight: 750;
  text-decoration: none;
  background: #fff;
  border: 1px solid var(--prl-line);
  border-radius: 13px;
  transition: color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.pagination .page-numbers:hover,
.pagination .page-numbers:focus {
  color: var(--prl-blue);
  border-color: var(--prl-blue);
  box-shadow: 0 10px 22px rgba(47, 126, 230, 0.12);
}

.pagination .page-numbers.current {
  color: #fff;
  background: var(--prl-blue);
  border-color: var(--prl-blue);
  box-shadow: 0 10px 22px rgba(47, 126, 230, 0.22);
}

.pagination .page-numbers.dots {
  min-width: 0;
  padding: 0 4px;
  background: none;
  border-color: transparent;
  box-shadow: none;
}

.site-footer {
  position: relative;
  margin-top: 44px;
  padding: 44px 0 96px;
  color: #eaf4ff;
  background: var(--prl-navy);
  overflow: hidden;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 26px;
}

.footer-mascot {
  align-self: end;
  justify-self: end;
  line-height: 0;
  margin: 0 -26px -12px 0;
}

.footer-mascot img {
  width: clamp(170px, 18vw, 250px);
  height: auto;
  display: block;
}

.footer-brand img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.footer-brand p {
  color: #c6d6f2;
}

.site-footer h2,
.footer-widget__title {
  margin: 0 0 12px;
  color: #fff;
  font-size: 1.15rem;
}

.site-footer a {
  display: block;
  margin: 8px 0;
  color: #bfd8ff;
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus {
  color: #fff;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 28px;
  padding-top: 18px;
  color: #bfd8ff;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.footer-bottom p {
  margin: 0;
  font-size: 0.88rem;
}

.sticky-bottom {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 70;
  display: none;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--prl-line);
  border-radius: 999px;
  box-shadow: var(--prl-shadow);
  backdrop-filter: blur(14px);
  transform: translateX(-50%);
}

.sticky-bottom a {
  padding: 10px 14px;
  color: var(--prl-navy);
  font-size: 0.9rem;
  font-weight: 850;
  text-decoration: none;
  border-radius: 999px;
}

.sticky-bottom a:hover,
.sticky-bottom a:focus {
  color: #fff;
  background: var(--prl-blue);
}

@media (max-width: 1060px) {
  .nav-actions {
    display: none;
  }

  .nav-links .menu {
    gap: 2px;
  }

  .nav-links .menu > li > a {
    padding: 0 10px;
    font-size: 0.88rem;
  }

  .cards,
  .wp-block-query.cards .wp-block-post-template,
  .listing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .nav {
    min-height: 68px;
  }

  .mobile-toggle {
    display: inline-grid;
    place-items: center;
  }

  .nav-links {
    position: absolute;
    top: calc(100% + 8px);
    left: 14px;
    right: 14px;
    display: none;
    height: min(74vh, calc(100vh - 104px));
    padding: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--prl-line);
    border-radius: 20px;
    box-shadow: var(--prl-shadow);
  }

  .nav.is-open .nav-links {
    display: block;
  }

  /* Root level and every submenu is a full-size panel inside the clipped menu. */
  .nav-links .menu,
  .nav-links .sub-menu {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    min-width: 0;
    max-width: none;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #fff;
    border: 0;
    border-radius: inherit;
    box-shadow: none;
    list-style: none;
  }

  .nav-links .menu li {
    position: static;
  }

  .nav-links a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 52px;
    margin: 3px 8px;
    padding: 13px 15px;
    color: #1c2c52;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    border-radius: 14px;
  }

  /* Top-level items are bigger and bolder — the Proberegner brand voice. */
  .nav-links .menu > li > a {
    min-height: 56px;
    color: var(--prl-navy);
    font-size: 1.12rem;
    font-weight: 850;
  }

  .nav-links .menu > li:first-child > a {
    margin-top: 8px;
  }

  .nav-links .menu > li:last-child > a,
  .nav-links .sub-menu > li:last-child > a {
    margin-bottom: 8px;
  }

  .nav-links a:hover,
  .nav-links a:focus {
    color: var(--prl-blue);
    background: var(--prl-ice);
  }

  /* Parent rows drill one level deeper (right chevron instead of the down caret). */
  .nav-links .menu-item-has-children > a::after {
    content: "›";
    width: auto;
    height: auto;
    margin: 0 0 0 auto;
    border: 0;
    transform: none;
    color: var(--prl-blue);
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
  }

  /* Submenus slide in from the right; only the active level is visible. */
  .nav-links .sub-menu {
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.28s ease, visibility 0s linear 0.28s;
    z-index: 2;
  }

  .nav-links .sub-menu.is-open {
    transform: translateX(0);
    visibility: visible;
    transition: transform 0.28s ease, visibility 0s linear 0s;
  }

  .nav-links .sub-menu::before {
    display: none;
  }

  /* Injected back bar — pinned to the top of each submenu. */
  .submenu-head {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 4px;
    padding: 12px;
    background: #fff;
    border-bottom: 1px solid var(--prl-line);
  }

  .submenu-back {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    color: var(--prl-navy);
    background: var(--prl-ice);
    border: 1px solid var(--prl-line);
    border-radius: 11px;
    font-size: 1.45rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.18s ease, border-color 0.18s ease;
  }

  .submenu-back:hover,
  .submenu-back:focus {
    color: var(--prl-blue);
    border-color: #9dccff;
  }

  .submenu-title {
    font-size: 1.05rem;
    font-weight: 850;
    color: var(--prl-navy);
  }

  .submenu-all {
    display: block;
  }

  .submenu-all a {
    color: var(--prl-blue);
    font-weight: 850;
  }

  .hero-grid,
  .page-grid,
  .feature-panel,
  .wide-cta,
  .seo-content-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  /* Peeking-maskotten har ingen "side" at kigge ind fra på mobil. */
  .footer-mascot {
    display: none;
  }

  .hero-copy {
    max-width: none;
  }

  .hero {
    padding-top: 46px;
  }

  .section {
    padding: 52px 0;
  }

  .section-head {
    margin-bottom: 22px;
  }

  .hero-visual {
    min-height: 410px;
  }

  .wide-cta {
    padding: 30px;
  }

  .wide-cta img {
    width: min(210px, 70vw);
  }

  .trust-row {
    width: 100%;
  }

  .page-grid {
    gap: 20px;
  }

  /* Mobil: flad to-kolonne-gridet ud, så "Sådan bruger du beregneren"
     placeres lige under selve beregneren i stedet for nederst på siden. */
  .page-grid > .calculator-main,
  .page-grid > .sidebar-stack {
    display: contents;
  }

  .calculator-shell {
    order: 1;
    margin-bottom: 0;
  }

  .calc-result {
    order: 2;
    margin-bottom: 0;
  }

  /* Annoncen følger resultatet (samme order → falder lige efter det i kilde-rækkefølge). */
  .calc-ad {
    order: 2;
  }

  .calc-help {
    order: 3;
  }

  .content-card {
    order: 4;
  }

  .sidebar-stack .related-card:not(.calc-help) {
    order: 5;
  }

  .warning-card {
    order: 6;
  }
}

@media (max-width: 620px) {
  body {
    padding-bottom: 108px;
  }

  .container {
    width: min(100% - 28px, var(--prl-container));
  }

  .nav {
    min-height: 66px;
    gap: 12px;
  }

  .logo {
    max-width: min(220px, 58vw);
  }

  .logo img,
  .custom-logo,
  .site-logo-img {
    max-height: 42px;
  }

  .hero {
    padding: 28px 0 24px;
  }

  .hero-grid {
    gap: 22px;
  }

  .eyebrow {
    padding: 7px 11px;
    font-size: 0.72rem;
  }

  .hero h1 {
    margin: 16px 0 14px;
    font-size: clamp(2.25rem, 10vw, 2.85rem);
    line-height: 1.04;
  }

  .archive-header h1,
  .page-hero h1 {
    font-size: 2.25rem;
  }

  .lead {
    font-size: 1rem;
    line-height: 1.55;
  }

  .section {
    padding: 34px 0;
  }

  .hero + .section {
    padding-top: 28px;
  }

  .section + .section {
    padding-top: 28px;
  }

  .page-hero {
    padding: 30px 0 12px;
  }

  .single-section {
    padding-top: 18px;
  }

  .page-grid,
  .sidebar-stack {
    gap: 16px;
  }

  .hero-actions,
  .footer-bottom {
    flex-direction: column;
  }

  .search-form {
    flex-direction: column;
  }

  .hero-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px;
    margin-top: 22px;
    padding: 6px;
    border-radius: 17px;
  }

  .hero-search input {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 0 10px;
    text-align: left;
    background: transparent;
    border: 0;
    border-radius: 13px;
  }

  .search-form button {
    width: 100%;
  }

  .hero-actions .primary-btn,
  .hero-actions .secondary-btn {
    width: 100%;
  }

  .hero-search button {
    width: auto;
    min-width: 76px;
    min-height: 48px;
    padding: 0 16px;
  }

  .hero-actions .wp-block-button {
    flex-basis: 100%;
  }

  .hero-actions .wp-block-button__link {
    min-height: 52px;
  }

  .hero-actions {
    gap: 10px;
    margin-top: 18px;
  }

  .section-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 12px;
    margin-bottom: 18px;
  }

  .section-head .ghost-btn,
  .section-head .ghost-btn a {
    justify-self: end;
    white-space: nowrap;
  }

  .trust-row {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    margin-top: 18px;
    padding: 6px;
  }

  .trust {
    width: 100%;
    min-height: 48px;
    padding: 7px 9px;
  }

  .cards,
  .wp-block-query.cards .wp-block-post-template,
  .listing-grid {
    grid-template-columns: 1fr;
  }

  .stat-card,
  .orbit {
    display: none;
  }

  .glow {
    inset: 12%;
  }

  .hero-visual {
    min-height: 0;
    margin-top: 2px;
  }

  .mascot-wrap img {
    width: min(230px, 60vw);
    filter: drop-shadow(0 20px 22px rgba(22, 41, 74, 0.16));
  }

  .feature-panel,
  .seo-content-grid,
  .cards,
  .wp-block-query.cards .wp-block-post-template,
  .listing-grid {
    gap: 16px;
  }

  .wide-cta {
    gap: 18px;
    margin-top: 0;
    margin-bottom: 0;
    padding: 22px;
    border-radius: 24px;
  }

  .wide-cta img {
    width: min(150px, 48vw);
  }

  .wide-cta h2 {
    font-size: 2rem;
  }

  .wide-cta .wp-block-buttons {
    margin-top: 14px;
  }

  .tool-card__link,
  .post-card__link {
    min-height: 0;
    padding: 18px;
  }

  .feature-box,
  .seo-panel,
  .content-card,
  .related-card,
  .empty-state {
    padding: 22px;
  }

  .seo-section {
    padding-top: 28px;
  }

  .seo-panel {
    gap: 20px;
  }

  .seo-intro h2 {
    margin: 10px 0;
    font-size: 1.85rem;
  }

  .seo-content-grid article {
    padding-top: 16px;
  }

  .site-footer {
    margin-top: 28px;
    padding: 34px 0 92px;
  }

  .sticky-bottom {
    display: flex;
    left: 14px;
    right: 14px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    justify-content: space-between;
    padding: 7px;
    transform: none;
  }

  .sticky-bottom a {
    flex: 1;
    min-width: 0;
    padding: 9px 5px;
    font-size: 0.8rem;
    text-align: center;
  }
}

@media (max-width: 390px) {
  .container {
    width: min(100% - 22px, var(--prl-container));
  }

  .hero h1 {
    font-size: 2.08rem;
  }

  .archive-header h1,
  .page-hero h1 {
    font-size: 2rem;
  }

  .sticky-bottom a {
    font-size: 0.72rem;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
