:root {
  --header-height: 74px;
  --top-message-height: 48px;
  /* Height of the mobile nav strip that hangs under the header bar (<= 680px). */
  --mobile-nav-height: 40px;
  --menu-top-offset: var(--header-height);

  /* Editorial palette — reuses the site's own tokens where possible. */
  --menu-bg: #ffffff;
  --menu-ink: #111111;
  --menu-muted: #8a8a8a;
  --menu-line: rgba(17, 17, 17, 0.1);
  --menu-backdrop-tint: rgba(17, 17, 17, 0.35);
  --menu-accent: var(--color-text-accent, #b9cdcc);
  --menu-font-display: var(--font-header, "IBM Plex Sans"), sans-serif;
  --menu-font-label: var(--font-menu, "IBM Plex Sans"), sans-serif;

  /* --content-standard: 1400px; */
  --content-small: 1210px;

  --section-large: 40px;
  --section-large-tablet: 30px;
  --section-large-phone: 24px;
  --section-standard: 24px;
  --section-standard-tablet: 24px;
  --section-standard-phone: 18px;

  --content-padding-phone: 8px;

  --color-ledarskap: #1fa3b8;
  --color-motivation: #e8765a;
  --color-karriär: #5b63c7;
  --color-hälsa: #4e9e6b;
  --color-coacha: #d6a537;
  --color-beige: #f5f1eb;

  --font-cursive: "neulis-cursive";
}

body {
  background-color: #ffffff !important;
}

/* .cms-controller {
    position: fixed;
    bottom: 0;
    width: 100%;
  } */

main .content-standard {
  /* max-width: calc(var(--content-small) + var(--content-padding) * 2) !important; */
}

.avatar {
  /* background-image: url();
    background-size: cover; */
}

@property --menu-top-offset {
  syntax: "<length>";
  inherits: true;
  initial-value: 74px;
}

:root:has(header.cm-header > user-container .top-message) {
  --menu-top-offset: calc(var(--header-height) + var(--top-message-height));
}

@supports (animation-timeline: scroll()) {
  :root:has(header.cm-header > user-container .top-message) {
    animation: cm-menu-offset linear both;
    animation-timeline: scroll(root block);
    animation-range: 0 var(--top-message-height);
  }
}

@keyframes cm-menu-offset {
  from {
    --menu-top-offset: calc(var(--header-height) + var(--top-message-height));
  }
  to {
    --menu-top-offset: var(--header-height);
  }
}

header.cm-header {
  & .cm-top-message {
    background-color: var(--menu-accent);
    color: var(--btn-primary-text);
    font-weight: 600;
  }

  & > .content-standard {
    position: relative;
  }

  & > div.content-standard {
    padding-top: 25px;
    padding-bottom: 25px;
  }

  /* Centre the logo in the bar. It is taken out of the flow so the nav and
      the buttons keep their positions and the logo sits at the exact midpoint
      regardless of how wide the left and right groups are. */
  /* & > .content-standard .logo {
      position: absolute;
      left: 50%;
      top: 50%;
      transform: translate(-50%, -50%);
      margin: 0;
      z-index: 1;
    } */

  & .m-r-4 {
    margin-right: var(--spacing-2);
  }

  & .btn {
    box-shadow: unset !important;
  }

  /* & .btn-secondary {
      background-color: var(--header-bg) !important;
      border: unset;
      color: unset !important;
    } */

  /* & user-container > button {
      border: 1px solid var(--btn-outline-border) !important;
    } */

  & ul.mainmenu {
    padding-top: 2px;
    & li {
      margin-right: var(--spacing-4) !important;
    }
  }

  /* hide search button */
  button[aria-label="Öppna sök"] {
    background: unset !important;
    color: #ffffff;
    border: unset !important;
  }

  @media (max-width: 680px) {
    /* Fixed bar height so --header-height is exact and the hamburger panel
        opens flush under the nav strip. Content centres inside the bar. */

    & header > div.content-standard {
      padding-bottom: 0 !important;
    }

    & > .content-standard {
      box-sizing: border-box;
      height: var(--header-bar-height);
      align-items: center;
    }

    /* Bigger logo. The SVG is only 77x46 intrinsically, so max-* cannot
        enlarge it; set an explicit height and let the width follow. The bar
        height is derived from this (see --header-bar-height below). */
    & > .content-standard .logo img {
      height: var(--mobile-logo-height);
      width: auto;
    }

    & nav.main.cm-header-menu {
      display: block !important;
      position: absolute;
      top: 100%;
      left: 0;
      right: 0;
      width: 100%;
      height: var(--mobile-nav-height);
      box-sizing: border-box;
      padding: 0 var(--content-padding-phone);
      background: var(--header-bg, #ffffff);

      & ul.mainmenu {
        display: flex;
        width: 100%;
        height: 100%;
        align-items: center;
        justify-content: space-between;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;

        &::-webkit-scrollbar {
          display: none;
        }

        & li:first-child,
        & li:nth-child(6),
        & li:nth-child(7) {
          display: none;
        }

        & li {
          margin-right: 0 !important;
          font-size: 14px;
          white-space: nowrap;
        }
      }
    }
  }
}

@media (max-width: 680px) {
  :root {
    /* Logo height on phones (the SVG renders 46px tall on desktop). */
    --mobile-logo-height: 44px;
    /* Logo/buttons row: tallest item (logo) + 15px bar padding top and bottom. */
    --header-bar-height: calc(var(--mobile-logo-height) + 30px);
    /* Bar + nav strip, so the sticky offset and hamburger menu line up. */
    --header-height: calc(var(--header-bar-height) + var(--mobile-nav-height));
  }

  /* The strip is out of flow; reserve its height so it does not cover the page. */
  main#page {
    padding-top: var(--mobile-nav-height);
  }
}

/* ---------------------------------------------------------------------------
    Ads styling
  --------------------------------------------------------------------------- */
section.cm-ad.m-standard {
  margin: 24px 0;
  @media (max-width: 680px) {
    margin: 24px 0 12px 0;
  }
}

section.m-standard {
  margin: 40px 0;

  @media (max-width: 680px) {
    margin: 24px 0;
  }
}

.widescreen::before,
.panorama::before,
.mobile::before {
  content: "annons";
}

.bgcolor-ad {
  background: unset !important;
  background-color: unset !important;
}

.cm-hero-news-ad {
  margin-bottom: var(--spacing-3);
}

/* ---------------------------------------------------------------------------
    General styling
  --------------------------------------------------------------------------- */

.btn {
  /* font-weight: 400; */
}

/* Hover-fade only on plain text links. Links that wrap media or block content
    (ads, article cards, teasers, image links) are left untouched. */
a:not(
  :has(
    h1,
    h2,
    h3,
    h4,
    h5,
    h6,
    img,
    picture,
    video,
    svg,
    iframe,
    figure,
    div,
    article,
    section,
    p,
    ul,
    ol
  )
) {
  transition: opacity 0.4s ease;
}

a:hover:not(
    :has(
      h1,
      h2,
      h3,
      h4,
      h5,
      h6,
      img,
      picture,
      video,
      svg,
      iframe,
      figure,
      div,
      article,
      section,
      p,
      ul,
      ol
    )
  ) {
  opacity: 0.6;
  text-decoration: none !important;
}

/* ---------------------------------------------------------------------------
    Footer Styles
  --------------------------------------------------------------------------- */

footer.cm-footer {
  background: var(--header-bg);
  @media (max-width: 680px) {
    padding: 18px 10px;
    & > div {
      gap: 20px;

      & .text-block {
        text-align: start !important;
      }
    }
  }

  & div.content-standard {
    padding: 24px var(--content-padding);

    @media (max-width: 680px) {
      padding: 24px var(--content-padding-phone);
    }
  }

  & div.content-standard > div:first-child {
    @media (max-width: 680px) {
      & .footer-logo-m {
        display: none;
      }
    }
  }

  & ul.link-list {
    text-align: start;
    font-size: 18px;
  }

  /* Wordmark strip at the very bottom of the footer (LEDARSKAP · KULTUR · PRESTATION) */
  &::after {
    max-width: calc(var(--content-standard) + var(--content-padding) * 2);

    content: "";
    display: block;
    box-sizing: content-box;
    width: calc(100% - 2 * var(--content-padding));
    margin: 0 auto 24px;
    aspect-ratio: 1280 / 53;
    background-image: url('data:image/svg+xml,<svg width="1280" height="53" viewBox="0 0 1280 53" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0 51.7218V0.88413H9.22686V43.4699H32.8755V51.7218H0Z" fill="%23F5F1EB"/><path d="M40.2511 51.7218V0.88413H75.0651V9.13606H49.478V22.0297H72.5064V30.2816H49.478V43.4699H75.4528V51.7218H40.2511Z" fill="%23F5F1EB"/><path d="M83.8339 51.7218V0.88413H104.614C120.199 0.88413 131.829 11.7884 131.829 26.303C131.829 40.8175 120.199 51.7218 104.614 51.7218H83.8339ZM104.459 9.13606H93.0607V43.4699H104.459C114.693 43.4699 122.37 36.1021 122.37 26.303C122.37 16.5038 114.693 9.13606 104.459 9.13606Z" fill="%23F5F1EB"/><path d="M132.135 51.7218L153.225 0.88413H164.158L185.248 51.7218H175.091L170.749 40.8911H146.402L142.06 51.7218H132.135ZM149.659 32.7866H167.492L158.575 10.4622L149.659 32.7866Z" fill="%23F5F1EB"/><path d="M190.989 51.7218V0.88413H214.405C224.33 0.88413 231.929 7.80984 231.929 17.0196C231.929 24.9031 226.269 30.9446 218.282 32.4182L223.4 39.4176C225.416 42.1437 228.052 43.4699 231.231 43.4699H233.247V51.7218H230.3C223.245 51.7218 218.127 49.0694 214.793 43.5435L207.505 32.7866H200.216V51.7218H190.989ZM214.173 9.13606H200.216V25.1241H214.173C218.903 25.1241 222.469 21.6612 222.469 17.0932C222.469 12.5252 218.903 9.13606 214.173 9.13606Z" fill="%23F5F1EB"/><path d="M256.848 52.6059C245.605 52.6059 237.153 45.8276 237.153 36.9862H246.613C246.613 41.4069 251.11 44.7224 256.925 44.7224C262.353 44.7224 266.695 41.9226 266.695 37.8704C266.695 27.7765 238.084 32.3445 238.084 15.0303C238.084 5.89422 246.303 0 256.615 0C267.237 0 275.301 6.40997 275.301 14.9566H265.842C265.842 10.9043 261.81 7.88352 256.46 7.88352C251.653 7.88352 247.543 10.3886 247.543 14.3672C247.543 24.461 276.232 19.2299 276.232 36.9125C276.232 46.417 267.625 52.6059 256.848 52.6059Z" fill="%23F5F1EB"/><path d="M284.44 51.7218V0.88413H293.666V24.9031L315.842 0.88413H327.24L305.685 24.5347L317.47 38.9755C319.796 41.9226 322.51 43.4699 325.689 43.4699H327.705V51.7218H324.681C318.013 51.7218 313.051 49.2167 309.561 44.2066L299.404 31.4604L293.666 37.7967V51.7218H284.44Z" fill="%23F5F1EB"/><path d="M329.334 51.7218L350.424 0.88413H361.356L382.446 51.7218H372.289L367.947 40.8911H343.601L339.258 51.7218H329.334ZM346.857 32.7866H364.69L355.774 10.4622L346.857 32.7866Z" fill="%23F5F1EB"/><path d="M388.188 51.7218V0.88413H411.991C422.226 0.88413 429.902 7.95718 429.902 17.4616C429.902 26.8924 422.226 33.9654 411.991 33.9654H397.414V51.7218H388.188ZM411.836 9.13606H397.414V25.7135H411.836C416.721 25.7135 420.443 22.177 420.443 17.4616C420.443 12.6726 416.721 9.13606 411.836 9.13606Z" fill="%23F5F1EB"/><path d="M498.46 51.7218V0.88413H507.687V24.9031L529.863 0.88413H541.26L519.705 24.5347L531.491 38.9755C533.817 41.9226 536.531 43.4699 539.71 43.4699H541.726V51.7218H538.702C532.034 51.7218 527.071 49.2167 523.582 44.2066L513.425 31.4604L507.687 37.7967V51.7218H498.46Z" fill="%23F5F1EB"/><path d="M568.049 52.6059C555.566 52.6059 546.106 43.8382 546.106 32.1235V0.88413H555.256V31.9761C555.256 38.9018 560.761 44.133 568.049 44.133C575.415 44.133 580.843 38.9018 580.843 31.9761V0.88413H590.07V32.1235C590.07 43.8382 580.61 52.6059 568.049 52.6059Z" fill="%23F5F1EB"/><path d="M600.164 51.7218V0.88413H609.391V43.4699H633.039V51.7218H600.164Z" fill="%23F5F1EB"/><path d="M644.245 51.7218V9.13606H628.97V0.88413H668.669V9.13606H653.471V51.7218H644.245Z" fill="%23F5F1EB"/><path d="M696.98 52.6059C684.497 52.6059 675.037 43.8382 675.037 32.1235V0.88413H684.187V31.9761C684.187 38.9018 689.692 44.133 696.98 44.133C704.346 44.133 709.774 38.9018 709.774 31.9761V0.88413H719.001V32.1235C719.001 43.8382 709.541 52.6059 696.98 52.6059Z" fill="%23F5F1EB"/><path d="M729.095 51.7218V0.88413H752.511C762.436 0.88413 770.034 7.80984 770.034 17.0196C770.034 24.9031 764.374 30.9446 756.388 32.4182L761.505 39.4176C763.521 42.1437 766.157 43.4699 769.336 43.4699H771.352V51.7218H768.406C761.35 51.7218 756.233 49.0694 752.899 43.5435L745.61 32.7866H738.322V51.7218H729.095ZM752.278 9.13606H738.322V25.1241H752.278C757.008 25.1241 760.575 21.6612 760.575 17.0932C760.575 12.5252 757.008 9.13606 752.278 9.13606Z" fill="%23F5F1EB"/><path d="M839.746 51.7218V0.88413H863.55C873.785 0.88413 881.461 7.95718 881.461 17.4616C881.461 26.8924 873.785 33.9654 863.55 33.9654H848.973V51.7218H839.746ZM863.395 9.13606H848.973V25.7135H863.395C868.279 25.7135 872.001 22.177 872.001 17.4616C872.001 12.6726 868.279 9.13606 863.395 9.13606Z" fill="%23F5F1EB"/><path d="M888.705 51.7218V0.88413H912.121C922.046 0.88413 929.644 7.80984 929.644 17.0196C929.644 24.9031 923.984 30.9446 915.998 32.4182L921.115 39.4176C923.131 42.1437 925.767 43.4699 928.946 43.4699H930.962V51.7218H928.016C920.96 51.7218 915.843 49.0694 912.509 43.5435L905.22 32.7866H897.932V51.7218H888.705ZM911.888 9.13606H897.932V25.1241H911.888C916.618 25.1241 920.185 21.6612 920.185 17.0932C920.185 12.5252 916.618 9.13606 911.888 9.13606Z" fill="%23F5F1EB"/><path d="M938.042 51.7218V0.88413H972.856V9.13606H947.269V22.0297H970.297V30.2816H947.269V43.4699H973.244V51.7218H938.042Z" fill="%23F5F1EB"/><path d="M998.297 52.6059C987.055 52.6059 978.603 45.8276 978.603 36.9862H988.062C988.062 41.4069 992.56 44.7224 998.375 44.7224C1003.8 44.7224 1008.14 41.9226 1008.14 37.8704C1008.14 27.7765 979.533 32.3445 979.533 15.0303C979.533 5.89422 987.752 0 998.065 0C1008.69 0 1016.75 6.40997 1016.75 14.9566H1007.29C1007.29 10.9043 1003.26 7.88352 997.91 7.88352C993.102 7.88352 988.993 10.3886 988.993 14.3672C988.993 24.461 1017.68 19.2299 1017.68 36.9125C1017.68 46.417 1009.07 52.6059 998.297 52.6059Z" fill="%23F5F1EB"/><path d="M1035.78 51.7218V9.13606H1020.5V0.88413H1060.2V9.13606H1045V51.7218H1035.78Z" fill="%23F5F1EB"/><path d="M1056.25 51.7218L1077.34 0.88413H1088.27L1109.36 51.7218H1099.2L1094.86 40.8911H1070.51L1066.17 51.7218H1056.25ZM1073.77 32.7866H1091.6L1082.69 10.4622L1073.77 32.7866Z" fill="%23F5F1EB"/><path d="M1120.67 51.7218V9.13606H1105.4V0.88413H1145.09V9.13606H1129.9V51.7218H1120.67Z" fill="%23F5F1EB"/><path d="M1152.55 51.7218V0.88413H1161.78V51.7218H1152.55Z" fill="%23F5F1EB"/><path d="M1198.16 52.6059C1182.19 52.6059 1170.02 41.2595 1170.02 26.303C1170.02 11.3464 1182.19 0 1198.16 0C1214.21 0 1226.31 11.3464 1226.31 26.303C1226.31 41.2595 1214.21 52.6059 1198.16 52.6059ZM1198.16 44.133C1208.79 44.133 1216.85 36.4705 1216.85 26.303C1216.85 16.1354 1208.79 8.47294 1198.16 8.47294C1187.62 8.47294 1179.56 16.1354 1179.56 26.303C1179.56 36.4705 1187.62 44.133 1198.16 44.133Z" fill="%23F5F1EB"/><path d="M1234.64 51.7218V0.88413H1244.02L1270.77 36.8389V0.88413H1280V51.7218H1270.62L1243.87 15.767V51.7218H1234.64Z" fill="%23F5F1EB"/><path d="M462.196 39.4913C457.466 39.4913 453.822 36.1021 453.822 31.5341C453.822 26.966 457.466 23.5769 462.196 23.5769C467.003 23.5769 470.647 26.966 470.647 31.5341C470.647 36.1021 467.003 39.4913 462.196 39.4913Z" fill="%231FA3B8"/><path d="M803.481 39.4913C798.752 39.4913 795.107 36.1021 795.107 31.5341C795.107 26.966 798.752 23.5769 803.481 23.5769C808.289 23.5769 811.933 26.966 811.933 31.5341C811.933 36.1021 808.289 39.4913 803.481 39.4913Z" fill="%231FA3B8"/></svg>');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;

    border-top: 1px solid #3c5258;
    padding-top: 60px;

    @media (max-width: 680px) {
      width: calc(100% - 2 * var(--content-padding-phone));
      aspect-ratio: 354 / 171;
      background-image: url('data:image/svg+xml,<svg width="354" height="171" viewBox="0 0 354 171" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4.16175 41.5885V0.710912H11.5809V34.9533H30.5963V41.5885H4.16175Z" fill="%23F5F1EB"/><path d="M36.5269 41.5885V0.710912H64.5202V7.34614H43.9461V17.7136H62.4627V24.3488H43.9461V34.9533H64.8319V41.5885H36.5269Z" fill="%23F5F1EB"/><path d="M71.571 41.5885V0.710912H88.2797C100.811 0.710912 110.163 9.47887 110.163 21.1497C110.163 32.8206 100.811 41.5885 88.2797 41.5885H71.571ZM88.155 7.34614H78.9901V34.9533H88.155C96.3846 34.9533 102.557 29.029 102.557 21.1497C102.557 13.2704 96.3846 7.34614 88.155 7.34614Z" fill="%23F5F1EB"/><path d="M110.409 41.5885L127.367 0.710912H136.158L153.116 41.5885H144.949L141.458 32.8798H121.881L118.39 41.5885H110.409ZM124.5 26.3631H138.839L131.669 8.41249L124.5 26.3631Z" fill="%23F5F1EB"/><path d="M157.733 41.5885V0.710912H176.561C184.541 0.710912 190.651 6.27975 190.651 13.6851C190.651 20.0241 186.1 24.882 179.678 26.0669L183.793 31.6949C185.414 33.8869 187.534 34.9533 190.09 34.9533H191.711V41.5885H189.342C183.669 41.5885 179.554 39.4558 176.873 35.0125L171.012 26.3631H165.152V41.5885H157.733ZM176.374 7.34614H165.152V20.2018H176.374C180.177 20.2018 183.045 17.4174 183.045 13.7443C183.045 10.0713 180.177 7.34614 176.374 7.34614Z" fill="%23F5F1EB"/><path d="M210.688 42.2994C201.648 42.2994 194.852 36.8491 194.852 29.7399H202.458C202.458 33.2945 206.074 35.9604 210.75 35.9604C215.115 35.9604 218.606 33.7092 218.606 30.4509C218.606 22.3346 195.6 26.0076 195.6 12.0855C195.6 4.73943 202.209 0 210.501 0C219.042 0 225.526 5.15414 225.526 12.0263H217.92C217.92 8.76795 214.678 6.33899 210.376 6.33899C206.511 6.33899 203.207 8.35325 203.207 11.5524C203.207 19.6686 226.274 15.4624 226.274 29.6807C226.274 37.323 219.354 42.2994 210.688 42.2994Z" fill="%23F5F1EB"/><path d="M232.874 41.5885V0.710912H240.293V20.0241L258.124 0.710912H267.289L249.957 19.7279L259.434 31.3395C261.304 33.7092 263.486 34.9533 266.042 34.9533H267.663V41.5885H265.232C259.87 41.5885 255.88 39.5742 253.074 35.5457L244.907 25.2967L240.293 30.3916V41.5885H232.874Z" fill="%23F5F1EB"/><path d="M268.973 41.5885L285.931 0.710912H294.722L311.68 41.5885H303.512L300.021 32.8798H280.444L276.953 41.5885H268.973ZM283.063 26.3631H297.403L290.233 8.41249L283.063 26.3631Z" fill="%23F5F1EB"/><path d="M316.296 41.5885V0.710912H335.436C343.666 0.710912 349.838 6.39822 349.838 14.0406C349.838 21.6236 343.666 27.311 335.436 27.311H323.715V41.5885H316.296ZM335.312 7.34614H323.715V20.6758H335.312C339.239 20.6758 342.232 17.8321 342.232 14.0406C342.232 10.1898 339.239 7.34614 335.312 7.34614Z" fill="%23F5F1EB"/><path d="M68.9178 105.177V64.2994H76.337V83.6126L94.1678 64.2994H103.333L86.0005 83.3164L95.4771 94.928C97.3474 97.2977 99.5295 98.5418 102.086 98.5418H103.707V105.177H101.275C95.9134 105.177 91.9233 103.163 89.1178 99.1343L80.9505 88.8852L76.337 93.9801V105.177H68.9178Z" fill="%23F5F1EB"/><path d="M124.873 105.888C114.835 105.888 107.229 98.838 107.229 89.4184V64.2994H114.586V89.2999C114.586 94.8688 119.012 99.075 124.873 99.075C130.796 99.075 135.16 94.8688 135.16 89.2999V64.2994H142.579V89.4184C142.579 98.838 134.973 105.888 124.873 105.888Z" fill="%23F5F1EB"/><path d="M150.696 105.177V64.2994H158.115V98.5418H177.13V105.177H150.696Z" fill="%23F5F1EB"/><path d="M186.14 105.177V70.9347H173.858V64.2994H205.779V70.9347H193.559V105.177H186.14Z" fill="%23F5F1EB"/><path d="M228.544 105.888C218.506 105.888 210.9 98.838 210.9 89.4184V64.2994H218.257V89.2999C218.257 94.8688 222.683 99.075 228.544 99.075C234.467 99.075 238.831 94.8688 238.831 89.2999V64.2994H246.25V89.4184C246.25 98.838 238.644 105.888 228.544 105.888Z" fill="%23F5F1EB"/><path d="M254.367 105.177V64.2994H273.195C281.175 64.2994 287.285 69.8683 287.285 77.2736C287.285 83.6126 282.734 88.4705 276.312 89.6554L280.427 95.2835C282.048 97.4755 284.168 98.5418 286.724 98.5418H288.345V105.177H285.976C280.303 105.177 276.188 103.044 273.507 98.6011L267.646 89.9516H261.786V105.177H254.367ZM273.008 70.9347H261.786V83.7903H273.008C276.811 83.7903 279.679 81.0059 279.679 77.3329C279.679 73.6598 276.811 70.9347 273.008 70.9347Z" fill="%23F5F1EB"/><path d="M39.7581 95.3427C35.955 95.3427 33.0247 92.6175 33.0247 88.9445C33.0247 85.2714 35.955 82.5462 39.7581 82.5462C43.6235 82.5462 46.5538 85.2714 46.5538 88.9445C46.5538 92.6175 43.6235 95.3427 39.7581 95.3427Z" fill="%231FA3B8"/><path d="M314.18 95.3427C310.376 95.3427 307.446 92.6175 307.446 88.9445C307.446 85.2714 310.376 82.5462 314.18 82.5462C318.045 82.5462 320.975 85.2714 320.975 88.9445C320.975 92.6175 318.045 95.3427 314.18 95.3427Z" fill="%231FA3B8"/><path d="M0 169.476V128.599H19.1402C27.3698 128.599 33.542 134.286 33.542 141.929C33.542 149.512 27.3698 155.199 19.1402 155.199H7.41915V169.476H0ZM19.0155 135.234H7.41915V148.564H19.0155C22.9432 148.564 25.9358 145.72 25.9358 141.929C25.9358 138.078 22.9432 135.234 19.0155 135.234Z" fill="%23F5F1EB"/><path d="M39.3669 169.476V128.599H58.1953C66.1756 128.599 72.2855 134.168 72.2855 141.573C72.2855 147.912 67.7343 152.77 61.3127 153.955L65.4274 159.583C67.0484 161.775 69.1682 162.841 71.7244 162.841H73.3453V169.476H70.9762C65.3027 169.476 61.1879 167.344 58.5071 162.9L52.6465 154.251H46.7861V169.476H39.3669ZM58.0083 135.234H46.7861V148.09H58.0083C61.8114 148.09 64.6793 145.305 64.6793 141.632C64.6793 137.959 61.8114 135.234 58.0083 135.234Z" fill="%23F5F1EB"/><path d="M79.0382 169.476V128.599H107.031V135.234H86.4574V145.602H104.974V152.237H86.4574V162.841H107.343V169.476H79.0382Z" fill="%23F5F1EB"/><path d="M127.488 170.187C118.448 170.187 111.652 164.737 111.652 157.628H119.258C119.258 161.182 122.875 163.848 127.55 163.848C131.915 163.848 135.406 161.597 135.406 158.339C135.406 150.223 112.4 153.896 112.4 139.974C112.4 132.627 119.009 127.888 127.301 127.888C135.842 127.888 142.326 133.042 142.326 139.914H134.72C134.72 136.656 131.478 134.227 127.176 134.227C123.311 134.227 120.007 136.241 120.007 139.44C120.007 147.557 143.075 143.35 143.075 157.569C143.075 165.211 136.154 170.187 127.488 170.187Z" fill="%23F5F1EB"/><path d="M157.624 169.476V135.234H145.342V128.599H177.263V135.234H165.043V169.476H157.624Z" fill="%23F5F1EB"/><path d="M174.083 169.476L191.041 128.599H199.832L216.79 169.476H208.623L205.131 160.768H185.555L182.063 169.476H174.083ZM188.173 154.251H202.513L195.343 136.3L188.173 154.251Z" fill="%23F5F1EB"/><path d="M225.886 169.476V135.234H213.604V128.599H245.525V135.234H233.305V169.476H225.886Z" fill="%23F5F1EB"/><path d="M251.519 169.476V128.599H258.938V169.476H251.519Z" fill="%23F5F1EB"/><path d="M288.197 170.187C275.354 170.187 265.566 161.064 265.566 149.038C265.566 137.011 275.354 127.888 288.197 127.888C301.103 127.888 310.829 137.011 310.829 149.038C310.829 161.064 301.103 170.187 288.197 170.187ZM288.197 163.374C296.739 163.374 303.223 157.213 303.223 149.038C303.223 140.862 296.739 134.701 288.197 134.701C279.718 134.701 273.234 140.862 273.234 149.038C273.234 157.213 279.718 163.374 288.197 163.374Z" fill="%23F5F1EB"/><path d="M317.528 169.476V128.599H325.072L346.581 157.509V128.599H354V169.476H346.456L324.947 140.566V169.476H317.528Z" fill="%23F5F1EB"/></svg>');
    }
  }
}

/* MENY CSS - Behavior changes */

.hamburger-menu-wrapper.ews-modal-wrapper[ews-modal-type="slidein"] {
  overflow: visible;
}
.hamburger-menu-wrapper .ews-modal-backdrop {
  top: var(--menu-top-offset);
  background-color: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  transition: background-color 0.4s ease;
}
.hamburger-menu-wrapper.ews-modal-wrapper[ews-modal-type="slidein"].active
  .ews-modal-backdrop {
  background-color: var(--menu-backdrop-tint);
}

.hamburger-menu-wrapper.ews-modal-wrapper[ews-modal-type="slidein"]
  .ews-modal-el {
  top: var(--menu-top-offset);
  right: 0;
  left: 0;
  bottom: auto;

  width: 100%;
  max-width: none;
  height: auto;
  max-height: calc(100vh - var(--menu-top-offset));
  max-height: calc(100dvh - var(--menu-top-offset));

  padding: clamp(28px, 5vw, 64px) clamp(20px, 6vw, 80px) clamp(36px, 5vw, 56px);
  background: var(--menu-bg);
  color: var(--menu-ink);

  /* Subtle drop shadow. It rides on the panel's opacity, which is 0 when the
      menu is closed, so the shadow is only visible while the menu is open. */
  box-shadow: 0 24px 40px -28px rgba(0, 0, 0, 0.25);

  transform: translateY(-14px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.35s ease,
    transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0s linear 0.4s;

  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* Open state */
.hamburger-menu-wrapper.ews-modal-wrapper[ews-modal-type="slidein"].active
  .ews-modal-el {
  /* transform: translateY(0); */
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition:
    opacity 0.4s ease,
    transform 0.55s cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0s linear 0s;
}

/* Flush-left content (Atlantic-style), using the full width of the sheet.
    No auto-centering — everything hangs off the left edge. */
.hamburger-menu-wrapper #hamburger-menu-content {
  max-width: calc(var(--content-standard) + var(--content-padding) * 2);
  width: 100%;
  height: auto;
  margin: 0 auto;

  flex-direction: row;
  align-items: start;

  & nav {
    order: 2;
  }
}

/* ---------------------------------------------------------------------------
    3. TOP BAR (profile shortcut + close button)
  --------------------------------------------------------------------------- */
.hamburger-menu-wrapper .top {
  justify-content: flex-end;
  gap: var(--spacing-3, 12px);
  margin-bottom: clamp(20px, 3vw, 36px);
}

.hamburger-menu-wrapper #hamburger-menu-close {
  transition: color 0.2s ease;
}
.hamburger-menu-wrapper #hamburger-menu-close:hover {
  color: var(--menu-accent);
}

/* ---------------------------------------------------------------------------
    4. "Meny" heading -> editorial eyebrow label
  --------------------------------------------------------------------------- */
.hamburger-menu-wrapper .inner-content h3 {
  display: none;
}

/* ---------------------------------------------------------------------------
    5. NAV COLUMNS  ->  each top-level item is a COLUMN, ruled at the top.
    The parent link is the column header; its dropdown children stack as ROWS
    beneath it (Atlantic-style). No numbers.
  --------------------------------------------------------------------------- */
.hamburger-menu-wrapper .cm-header-hamburger-menu > ul.menu {
  /* Grid (from hållbartbyggande) so every column gets the same width and
      wraps by itself; the 50px column gap is kept from the old flex layout. */
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  column-gap: 50px;
  row-gap: clamp(28px, 3vw, 44px);
  align-items: start;
  padding: 0 var(--content-padding);

  @media (max-width: 680px) {
    padding: 0;
  }
}

/* Kill the theme's pill / card / active fills. */
.hamburger-menu-wrapper .inner-content .menu > li,
.hamburger-menu-wrapper .inner-content .menu > li.active,
.hamburger-menu-wrapper .inner-content .menu > li:has(.submenu > li.active) {
  box-shadow: none !important;
  background: transparent !important;
  border-radius: 0;
}

/* Each top-level item = a column, ruled at the top. */
.hamburger-menu-wrapper .cm-header-hamburger-menu > ul.menu > li {
  display: block;
}

/* Column header = the parent link. */
.hamburger-menu-wrapper .cm-header-hamburger-menu > ul.menu > li > a {
  display: block;
  padding: 0 !important;
  font-family: var(--font-menu);
  color: var(--color-text-surface-primary);
  text-transform: uppercase;
  font-weight: 500;
  font-size: 12px;
  line-height: 1.15;
  text-decoration: none;
}

.hamburger-menu-wrapper .inner-content button.dropdown-toggle,
.hamburger-menu-wrapper .cm-header-hamburger-menu .dropdown-toggle,
.hamburger-menu-wrapper .dropdown-toggle {
  display: none !important;
}

.hamburger-menu-wrapper .cm-header-hamburger-menu .submenu,
.hamburger-menu-wrapper .cm-header-hamburger-menu .submenu.open {
  display: flex;
  flex-direction: column;
  gap: 2px;
  list-style: none;
  margin: clamp(10px, 1.2vw, 10px) 0 0;
  padding: 0;
  width: 100%;
}
.hamburger-menu-wrapper .cm-header-hamburger-menu .submenu > li > a {
  display: block;
  padding: 0 !important;
  font-size: 14px;
  color: var(--color-text-surface-primary);
  text-decoration: none;
}

.hamburger-menu-wrapper nav.m-t-auto {
  margin-top: clamp(28px, 4vw, 48px);
}
.hamburger-menu-wrapper nav.m-t-auto > ul.menu {
  flex-direction: row;
  flex-wrap: wrap;
  gap: var(--spacing-3, 12px);
}
.hamburger-menu-wrapper nav.m-t-auto > ul.menu > li {
  flex: 1 1 200px;
  border: 0;
}
.hamburger-menu-wrapper nav.m-t-auto .btn {
  width: 100%;
}

@media (prefers-reduced-motion: reduce) {
  .hamburger-menu-wrapper .ews-modal-el {
    transition-duration: 0.001s !important;
    transform: none !important;
  }
}

header.cm-header {
  position: sticky;
  top: 0;
  z-index: 101;
}

/* Hide-on-scroll, driven by js/header-scroll.js. While the user scrolls the
    script writes an inline translateY so the bar follows the scroll 1:1. When
    scrolling stops mid-slide it adds .is-settling and the bar eases to fully
    shown or fully hidden. */
header.cm-header.is-settling {
  transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-reduced-motion: reduce) {
  header.cm-header.is-settling {
    transition: none;
  }
}

:root:has(header.cm-header > user-container .top-message) header.cm-header {
  top: calc(-1 * var(--top-message-height));
}

/* 
  _____________________________________________________________________
      Artikelpage - styles related to articles
  _____________________________________________________________________
  */

body.type-articles {
  & .article-layout {
    max-width: 1020px;
    grid-template-columns: 1fr 300px;
    margin: 0 auto;

    & > div {
      max-width: 665px !important;
      margin: 0 auto;
    }

    @media (max-width: 870px) {
      grid-template-columns: 1fr;
      justify-items: center;
    }

    & > * {
      min-width: 0;
    }

    & aside.article-navigation {
      display: none;
      & nav {
        position: unset;
      }
    }

    & article.article-content {
      overflow-wrap: anywhere;

      & .text-block {
        margin: 0 auto;
        max-width: 665px;
      }
      & div {
        .article-category-row span {
          font-family: var(--font-header);
          text-transform: capitalize;
        }

        &
          span.size-sm.color-accent.font-header.text-uppercase.display-block.m-b-4.m-tablet-b-3.m-lgphone-b-2 {
          font-family: var(--font-main);
          font-size: 14px;
          font-style: normal;
          font-weight: 500;
          line-height: 120%;
          text-transform: uppercase;
        }

        & .avatar {
          /* margin-right: 12px; */
        }

        & h1 {
          font-size: 40px;
          font-style: normal;
          font-weight: 700;
          line-height: 44px;

          @media (max-width: 680px) {
            font-size: 24px;
            font-style: normal;
            font-weight: 700;
            line-height: 120%; /* 28.8px */
          }
        }

        & p.font-ingress {
          font-size: 22px;
          font-style: normal;
          font-weight: 400;
          line-height: normal;

          @media (max-width: 680px) {
            font-size: 18px;
          }
        }

        & div.cm-article-content,
        div.article-teaser-content {
          margin: 0 auto;
          max-width: 665px;

          & h2,
          h3,
          h4,
          h5,
          h6 {
            font-size: 24px;
            font-style: normal;
            font-weight: 700;
            line-height: 120%;
          }

          & p,
          li {
            font-size: 18px;
            font-style: normal;
            font-weight: 400;
            line-height: 160%;
            letter-spacing: -0.054px;

            @media (max-width: 680px) {
              font-size: 1rem;
              line-height: 1.7;
            }
          }
        }
      }

      & ul {
        & li {
        }
      }

      & p.card {
      }

      & blockquote {
        & p {
          /* font-weight: 500 !important;
            font-size: 34px !important;
            line-height: 1.12 !important;
            letter-spacing: -0.03em !important;
            text-wrap: pretty;

            @media (max-width: 680px) {
              font-size: 24px !important;
            } */
        }

        & cite {
          /* position: relative;
            padding-left: 18px;
            font-weight: 500 !important;
            font-size: 17px !important;

            &::before {
              content: "";
              position: absolute;
              left: 0;
              top: 0.5em;
              width: 10px;
              height: 10px;
              background-image: url('data:image/svg+xml,<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0 0H8.99996C14.1702 0 17.9999 2.29786 17.9999 8.99996V17.9999H7.7872C3.44679 17.9999 0 15.0638 0 9.57443V0Z" fill="%230D3047"/></svg>');
              background-repeat: no-repeat;
              background-size: contain; */
        }
      }

      &::before {
        /* content: unset; */
      }
    }

    & aside.article-aside {
      & async-fetch-template {
        & user-container {
          & .cm-articles-aside {
            & h2.size-md.m-v-z {
              font-family: var(--font-header);
              font-size: 18px;
              font-weight: 600;
            }

            & h3.size-xs.font-text.weight-normal.m-v-z {
              font-family: var(--font-main);
              font-style: normal;
              font-weight: 700;
              line-height: 120%;
              letter-spacing: -0.4px;
            }

            & .articles-aside-list {
              padding: 0;
            }

            & .articles-aside-item {
              align-items: start;

              & .media-block {
                height: 45px;
              }
            }
          }

          & .cm-block-aside {
            & .card {
              & .btn {
                border: none;
              }
            }

            & .bgcolor-surface-primary {
              /* background: var(--color-skiffer);
                color: var(--color-varsel); */

              & .btn {
                /* background: var(--color-varsel);
                  color: var(--color-skiffer); */
              }
            }
            & .bgcolor-surface-secondary {
              /* background: var(--color-varsel);
                color: var(--color-skiffer); */

              & .btn {
                /* background: var(--color-skiffer);
                  color: var(--color-varsel); */
              }
            }
            & .bgcolor-accent {
              /* background: var(--color-mineral);
                color: var(--color-dis); */

              & .btn {
                /* background: var(--color-dis);
                  color: var(--color-flöde); */
              }
            }
          }
        }

        /* TOP 5 */
      }
    }

    & .tag-list .tag {
      background: var(--btn-primary-bg);
      color: var(--btn-primary-text);
      border-radius: 4px;
      padding: inherit 8px;
    }

    & div[role="region"] {
      & .text-block {
        display: none;
      }

      & .btn-secondary {
        border: none;
        background-color: transparent;
        color: #000000;
      }

      & .box-shadow-primary {
        box-shadow: none;
      }
    }
  }

  a.btn-icon {
    /* background: #ffffff !important;
        border: unset !important;

        &:first-child {
          display: none;
        } */
  }
}

/* Native-specifika styles för artikelinnehållet läggs här */
body.type-articles
  .article-layout
  article.article-content:has(.bgcolor-ad-card) {
  /* Annonsmarkeringen */
  background: var(--color-neutral-100);
  padding-bottom: 24px;

  & .bgcolor-ad-card {
    margin-bottom: 24px;
    justify-content: center;

    & .label {
      display: none;
    }

    & p {
      font-weight: 500;

      &::before {
        content: "Sponsrat ";
      }
    }
  }
}

.bgcolor-ad-card {
  background: var(--color-neutral-100) !important;
}

/* Premium-märkning på artikeln.
    Förutsätter att .article-type-box bara renderas för Premium. */
body.type-articles .article-layout article.article-content {
  /* Flytta märkningen överst i artikeln */
  &:has(> .m-v-4 > .article-type-box) {
    display: flex;
    flex-direction: column;
  }

  & > .m-v-4:has(> .article-type-box) {
    order: -1;
    margin: 0 0 24px;
  }

  & .article-type-box {
    display: block;
    padding: 12px 16px;
    border: 0;
    border-radius: 6px;
    background: var(--color-surface-accent);
    color: var(--color-white);

    & .article-type-box__icon {
      display: none;
    }

    & .article-type-box__text {
      margin: 0;
      color: var(--color-white);

      /* Beskrivningen under etiketten */
      & > span:not(.article-type-box__label) {
        display: block;
        font-family: var(--font-header), sans-serif;
        font-size: 13px;
        line-height: 1.4;
        color: var(--color-white);
        opacity: 0.6;
      }
    }

    /* "Premium"-etiketten */
    & .article-type-box__label {
      display: block;
      margin: 0 0 2px;
      font-family: var(--font-cursive), cursive;
      font-size: 20px;
      font-weight: 400;
      line-height: 1.2;
      color: var(--color-text-accent);
    }
  }
}

/* Författarkort på artikeln.
    Bild, namn och roll till vänster; beskrivning överst till höger med
    e-post (vänster) och länk (höger) i botten. */
.article-author-card {
  display: flex;
  min-height: 214px;
  overflow: hidden;
  border-radius: var(--border-radius-sm);
  background-color: var(--color-surface-accent);
  color: var(--color-text-surface-accent);

  @media (max-width: 550px) {
    min-height: 196px;
  }

  /* Mediakolumn (bild, namn, roll) */
  & .article-author-card__media {
    position: relative;
    display: flex;
    flex: 0 0 157px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 4px;
    padding: 6px;
    overflow: hidden;
    background-color: var(--color-neutral-200);

    @media (max-width: 550px) {
      flex-basis: 120px;
      padding: 4px 8px 8px 4px;
    }

    & img {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
      object-position: center;
    }

    /* Mörk toning i botten så namnet går att läsa mot bilden */
    &::after {
      content: "";
      position: absolute;
      inset: 0;
      background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.55) 0,
        rgba(0, 0, 0, 0) 45%
      );
      pointer-events: none;
    }
  }

  & .article-author-card__name,
  & .article-author-card__role {
    position: relative;
    z-index: 1;
  }

  & .article-author-card__name {
    padding-left: 3px;
    font-family: var(--font-header), sans-serif;
    font-size: 18px;
    line-height: 1.2;
    color: var(--color-white);
    overflow-wrap: anywhere;

    @media (max-width: 550px) {
      padding: 0 4px;
      font-size: 16px;
    }
  }

  /* Roll + e-post: samma pill, olika färger */
  & .article-author-card__role,
  & .article-author-card__pill {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border: 1px solid transparent;
    border-radius: 44px;
    font-size: 12px;
    line-height: 1.2;
    text-decoration: none;
    overflow-wrap: anywhere;

    @media (max-width: 550px) {
      padding: 2px 8px;
      font-size: 11px;
    }
  }

  & .article-author-card__role {
    background-color: var(--color-surface-secondary);
    color: var(--color-text-surface-secondary);
  }

  & .article-author-card__pill {
    background-color: var(--color-white);
    color: var(--color-black);
  }

  & .article-author-card__body {
    display: flex;
    flex: 1 1 0;
    flex-flow: row wrap;
    align-content: space-between;
    align-items: center;
    justify-content: flex-start;
    gap: var(--spacing-3) 16px;
    min-width: 0;
    padding: 16px 20px;

    @media (max-width: 550px) {
      gap: var(--spacing-2) 12px;
      padding: 10px 12px;
    }
  }

  & .article-author-card__description {
    order: 1;
    flex: 0 0 100%;
    margin-top: 0;
    font-size: 15px;
    line-height: 1.55;
    overflow-wrap: anywhere;

    @media (max-width: 550px) {
      font-size: 13px;
      line-height: 1.5;
    }

    & p {
      margin: 0;
      font-size: inherit;
      line-height: inherit;
    }

    & p + p {
      margin-top: 0.6em;
    }
  }

  & .article-author-card__contact,
  & .article-author-card__socials {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  & .article-author-card__contact {
    order: 2;
  }

  & .article-author-card__socials {
    order: 3;
    gap: 16px;
    margin-left: auto;
  }

  /* "Om Per"-länken */
  & .article-author-card__social {
    display: inline-flex;
    align-items: center;
    gap: 0.25em;
    font-family: var(--font-header), sans-serif;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    text-decoration: none;
    overflow-wrap: anywhere;
    color: inherit;

    @media (max-width: 550px) {
      font-size: 16px;
    }

    &:focus-visible {
      outline: 2px solid currentColor;
      outline-offset: 3px;
    }

    /* Pil efter länken; snett uppåt för länkar som öppnas i ny flik */
    &::after {
      --ac-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 6h8M6.5 2.5 10 6l-3.5 3.5'/%3E%3C/svg%3E");
      content: "";
      flex: 0 0 auto;
      width: 0.72em;
      height: 0.72em;
      margin-top: 0.04em;
      background-color: currentColor;
      -webkit-mask: var(--ac-arrow) center / contain no-repeat;
      mask: var(--ac-arrow) center / contain no-repeat;
      transition: transform 0.15s;
    }

    &[target="_blank"]::after {
      --ac-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9 9 3M4 3h5v5'/%3E%3C/svg%3E");
    }

    &:hover::after {
      transform: translate(2px, -2px);
    }
  }
}
/* 
  _____________________________________________________________________
      Loginpage - styles related to login and register pages
  _____________________________________________________________________
  */

body.view-signin {
  & .cm-sign-in {
    display: flex;
  }

  & .cm-signin-form {
    border-radius: 12px;
  }
}

/* 
  _____________________________________________________________________
      Kalenderpage
  _____________________________________________________________________
  */
body.type-calendar {
  & div.hero-archive {
    & h1 {
    }

    & .hero-archive__illustration {
      display: none;
    }

    & custom-select button {
    }
  }

  & .events-list-item {
  }
}
/* 
  _____________________________________________________________________
      Branschregister
  _____________________________________________________________________
  */
body.type-businessdirectory {
  & div.businesses-list {
    @media (max-width: 870px) {
    }

    & .color-white {
    }

    & .businesses-list-item {
      & div.bg-media {
      }

      & .businesses-list-item__content {
        & div {
        }

        & div.overflow-hidden.display-flex.m-b-2 {
          width: 120px;
        }

        & img {
          width: 100%;
          object-fit: contain;
        }

        & h3 {
        }
      }
    }
  }

  & div.content-standard > div.card {
    & > div {
      & div {
      }

      & h3 {
      }
    }
  }

  & div.text-block {
    & .card {
      /* Kontaktuppgifter: texter i full bredd, alla länkar som knappar sida vid sida */
      & > div {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: var(--spacing-2);

        & > span {
          flex: 0 0 100%;
        }

        & > span.weight-bold:first-child {
        }
      }

      & a {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        margin-top: var(--spacing-2);
        padding: 10px 18px;
        border: 1px solid var(--color-white);
        border-radius: 4px;
        background: transparent;
        color: var(--color-white) !important;
        font-weight: 500;
        line-height: 1;
        text-decoration: none !important;
        opacity: 1 !important;
        transition:
          background-color 0.15s ease,
          color 0.15s ease;

        /* Hover/fokus: invertera färgerna. !important så temats länkfärger inte slår igenom */
        &:hover,
        &:focus-visible {
        }

        &:focus-visible {
        }

        /* Mobil: knapparna delar raden */
        @media (max-width: 680px) {
        }
      }
    }
  }
}

/* 
  _____________________________________________________________________
    
    Prenumerationssidor - styles related to subscription pages
  _____________________________________________________________________
  */

body.view-subscriptions {
  & .cm-plans__grid {
    & > .cm-plans__card:nth-child(2) {
      --popular: var(--color-surface-secondary, #1fa3b8);
      background: var(--color-surface-accent, #0e2a33);
      border-color: rgba(255, 255, 255, 0.12);
      color: #fff;

      &::before {
        content: "Populärt val";
        display: block;
        padding: 8px 16px;
        background: var(--popular);
        color: #fff;
        font-size: 13px;
        font-weight: 500;
        text-align: center;
      }

      &
        :is(
          .cm-plans__name,
          .cm-plans__amount,
          .cm-plans__period,
          .cm-plans__vat,
          .cm-plans__note,
          .cm-plans__point,
          strong
        ) {
        color: inherit;
      }

      & :is(.cm-plans__vat, .cm-plans__period, .cm-plans__note) {
        opacity: 0.75;
      }

      & svg {
        color: var(--popular);
        stroke: currentColor;
      }

      & .cm-plans__cta {
        background: var(--popular);
      }
    }
  }
}
/* 
  _____________________________________________________________________
    
    BLOCKS - Styles related to Co-member site blocks
  _____________________________________________________________________
  */

/* ETTAN Styles */

div.news-hero.cm-news-hero {
  & .top-bar {
    & div.label.bgcolor-white {
      display: none;
    }

    & div.label.bgcolor-accent {
    }

    & .label {
      padding: 5px 12px;
    }
  }

  & .article-list-large.cm-newslist-large {
    & .article-horizontal {
      & .image {
        width: 25%;
      }
    }

    & .card:not(:last-child) {
      padding-bottom: var(--spacing-4);
    }

    & .card {
      padding: 0;

      & h2.size-lg {
        margin-top: 4px;
        margin-bottom: 12px;
      }

      /* ellepsis över 2 rader */
      & p.m-t-z.m-b-6.size-sm {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        overflow: hidden;
        text-overflow: ellipsis;
      }

      & p.m-z {
        font-family: var(--font-main);
        font-size: 14px;
        font-weight: 600;
        line-height: 120%;
        text-transform: capitalize;

        & .color-accent {
          color: inherit !important;
        }

        & span.size-xs,
        span {
          color: var(--color-neutral-200);
        }
      }

      & span.m-z.weight-medium.color-accent.size-xs,
      .text span.m-z.weight-medium.color-accent.size-xs {
        color: var(--color-black) !important;
        text-transform: capitalize !important;
        font-style: normal;
        font-weight: 400;
      }
    }

    & .cm-native-card {
      & p,
      h2 {
      }
    }
  }

  /* TAGG / KATEGORI (card, topplista, mini) */
  & p .weight-bold,
  & p .color-accent {
    line-height: 120%;
    text-transform: capitalize;
    font-family: var(--font-header);
    font-size: 14px;

    & a::after {
      content: ".";
      font-size: 16px !important;
      color: var(--color-black) !important;
    }
  }

  /* headings */
  & h2.size-lg,
  & h2.size-md {
    @media (max-width: 870px) {
    }
  }

  /* Columns */
  & .grid-layout {
    & > .col:first-child {
      & h2 {
        margin: 0 !important;
      }
    }

    /* Newsletter signup: se det delade blocket under ettan (gäller även artikelns sidokolumn) */

    /* Tagg/kategori-raden under rubriken (topplista + mini) */
    & .article .text p {
      order: 2;
    }

    & .col {
      /* TOP 5 */
      .cm-news-toplist {
        position: sticky;
        top: calc(var(--menu-top-offset) + var(--spacing-4));
        padding: var(--spacing-6) var(--spacing-4);
        border-radius: var(--border-radius-md);
        background: var(--color-beige);

        @media (max-width: 870px) {
          padding: var(--spacing-4);
        }

        & .toggles {
          & button {
            border: unset;
            border-right: 1px solid var(--color-neutral-200);
          }

          & button:nth-child(1) {
            border-radius: 8px 0 0 8px;
          }

          & button:nth-child(3) {
            border-radius: 0 8px 8px 0;
            border: unset;
          }

          & button.active {
            color: #f2f2f2;
            background: var(--color-neutral-300);
          }
        }

        & h2.size-sm.m-z {
          /* font-family: var(--font-main);
            font-weight: 600;
            font-size: 12px;
            letter-spacing: -0.3px;
            text-transform: uppercase; */
        }

        & .article-list .article {
          /* border: none;
            padding-bottom: 0;
            margin-bottom: var(--spacing-3); */
          border: none;

          & .number {
            background: var(--color-white);
            align-items: center;
            border-radius: 50%;
            width: 40px;
            height: 40px;

            & span {
              font-size: 22px;
              color: var(--color-black);
              font-family: var(--font-cursive);
            }
          }

          & .text {
            padding-top: 4px;

            & h3 {
              order: 1;
              font-size: 16px;
              font-style: normal;
              font-weight: 600;
              line-height: 120%; /* 19.2px */
              letter-spacing: -0.4px;
            }

            & p span {
              text-transform: capitalize;
            }
          }
        }
      }

      /* CM-newslist mini */
      .cm-newslist-mini {
        padding: 0;

        & ul {
          padding: 0 var(--spacing-4);

          & .article {
            padding: 0;
            margin-bottom: var(--spacing-4);
            background: unset;

            & .img {
              width: 35%;
            }
          }
        }

        /* Kategorisidan */
        & .article-list {
          padding: 0 !important;
          margin: 0 !important;
        }

        & .article {
          padding: var(--spacing-3);
          background-color: #f8f8f8;

          & .img {
            width: 45%;

            @media (max-width: 980px) {
              width: 35%;
            }
          }
        }
      }

      /* article headings */
      & h3.size-xs.m-z {
        font-family: var(--font-main);
        font-size: 16px;
        font-style: normal;
        font-weight: 400;
        line-height: 120%;
      }

      /* Blockheadings */
      h2.size-sm.m-t-z {
      }
    }
  }
}

/* Newsletter signup: softer bottom-weighted scrim.
    Delas av ettan (1:a kolumnen) och artikelns sidokolumn. */
div.news-hero.cm-news-hero .grid-layout,
body.type-articles .article-layout aside.article-aside {
  & .newsletter-blurb {
    background: var(--color-surface-accent);

    & .content {
      @media (max-width: 870px) {
        padding: var(--spacing-1) var(--spacing-3);

        & .btn {
          height: unset;
          padding: 0 12px;
          width: 100%;
          font-size: 14px;
          font-style: normal;
          font-weight: 500;
          line-height: 120%;
          letter-spacing: -0.4px;
        }

        & h2 {
          font-size: 18px;
          line-height: 130%;
        }

        & .ew-html {
          margin-bottom: 0;
        }
      }
    }
  }

  & .newsletter-blurb::after {
    background: linear-gradient(
      180deg,
      rgba(0, 0, 0, 0) 21.86%,
      rgba(0, 0, 0, 0.15) 99.95%
    ) !important;
  }
}

/* Startsida - Ettan */
body.type-startpage,
body.view-anpassadsida {
  /* Ettan 1, 2, 3 ... var för sig.
      Varje ettan ligger ensam i sin egen section (section > .content-standard > .news-hero),
      så :nth-child på själva .news-hero ger alltid 1. Räkna sektionerna i stället. */

  & main section.m-standard:nth-child(3) {
    margin: 0;
  }
  & main section.m-standard:nth-child(4) {
    margin: var(--spacing-4) 0;
  }

  &
    main
    > section:nth-child(
      1 of section:has(> .content-standard > .news-hero.cm-news-hero)
    ) {
    & div.news-hero.cm-news-hero {
      & .grid-layout {
        grid-template-columns: repeat(4, 1fr) !important;
      }

      & .col:nth-child(2) {
        order: -1;
        grid-column: span 2;

        @media (max-width: 870px) {
          grid-column: span 4;
        }
      }

      /* hide side cols on mobile  */
      @media (max-width: 870px) {
        & .col:nth-child(1),
        .col:nth-child(3) {
          display: none;
        }
      }
    }
  }

  &
    main
    > section:nth-child(
      2 of section:has(> .content-standard > .news-hero.cm-news-hero)
    ) {
    & div.news-hero.cm-news-hero {
      margin-top: var(--spacing-4);

      & .grid-layout {
        grid-template-columns: repeat(4, 1fr) !important;
        @media (max-width: 870px) {
          /* mobil: mittenkolumnen 60%, högerkolumnen 40% */
          grid-template-columns: minmax(0, 60fr) minmax(0, 40fr) !important;
          gap: var(--spacing-3);
        }
      }

      & .col:nth-child(1) {
        display: none;
      }
      & .col:nth-child(2) {
        grid-column: span 3;

        @media (max-width: 870px) {
          grid-column: span 1;
        }
      }
      & .col:nth-child(3) {
        @media (max-width: 870px) {
          grid-column: span 1;
          gap: var(--spacing-3);

          & :last-child {
            position: sticky;
            top: calc(var(--menu-top-offset) + var(--spacing-1));
          }
        }
      }

      /* Grid Articles in main flow */
      & .cm-newslist-large {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: var(--spacing-4);

        @media (max-width: 870px) {
          grid-template-columns: 1fr;
          gap: 0;
        }

        & .card:nth-child(1) {
          display: none;
        }

        & .card.article-horizontal {
          flex-direction: column;
          & .image {
            width: 100%;
          }

          @media (max-width: 870px) {
            gap: var(--spacing-2);
            padding-bottom: var(--spacing-2);
          }
        }
      }
    }
  }
}

/* Kategorisida - Ettan
    Stor artikel till vänster, tre liggande artiklar (bild + text) till höger.
    Markup: .col(1) tom, .col(2) cm-newslist-large (1 kort), .col(3) cm-newslist-mini (3 st). */
body.type-categories {
  & div.news-hero.cm-news-hero {
    & .grid-layout {
      grid-template-columns: 1fr 1fr !important;
      gap: var(--spacing-4);
      align-items: start;

      @media (max-width: 870px) {
        grid-template-columns: 1fr !important;
      }

      /* tom första kolumn */
      & > .col:first-child {
        display: none;
      }

      /* " • "-avgränsaren efter kategorin (punkten kommer från a::after) */
      & p .weight-bold.color-accent > span {
        display: none;
      }

      & p .weight-bold.color-accent {
        margin-right: 4px;
      }

      /* Stora artikeln */
      & .col .cm-newslist-large .card {
        & > div:first-child {
          margin-bottom: var(--spacing-2);
        }

        & figure img {
          display: block;
          width: 100%;
        }
      }

      /* Tre artiklar till höger */
      & .col .cm-newslist-mini ul {
        display: flex;
        flex-direction: column;
        gap: var(--spacing-4);

        & .article {
          margin-bottom: 0;
          gap: var(--spacing-3);
          align-items: flex-start;

          & .img {
            width: 42%;

            @media (max-width: 870px) {
              width: 35%;
            }

            & figure {
              margin: 0;
            }

            & figure img {
              display: block;
              width: 100%;
              aspect-ratio: 3 / 2;
              object-fit: cover;
              border-radius: var(--border-radius-md);
            }
          }

          & .text {
            display: flex;
            flex-direction: column;
            gap: 6px;
            padding-top: 2px;

            /* kategori + datum över rubriken */
            & p {
              order: 0;
              margin: 0;
              line-height: 120%;
            }

            & p > span:last-child {
              font-size: 14px;
              line-height: 120%;
              color: var(--color-neutral-200);

              /* dölj lästid ("• 8 min") */
              & > span:last-child {
                display: none;
              }
            }

            & h3.size-xs.m-z {
              order: 1;
              font-family: var(--font-header);
              font-size: clamp(18px, 1.6vw, 26px);
              font-weight: 600;
              line-height: 120%;
              letter-spacing: -0.4px;
            }
          }
        }
      }
    }
  }
}

/* Article Grid styles */

section.bgcolor-surface-secondary {
  background: var(--color-beige);
  & articles-masonry.cm-article-list-masonry,
  div.cm-article-list-masonry {
    & .articles-masonry-item {
      border-color: color-mix(
        in srgb,
        var(--color-text-surface-secondary) 40%,
        transparent
      );
      .card {
        background: none;
        color: var(--color-text-surface-secondary) !important;
      }
    }
  }
}

section.bgcolor-accent {
  background-color: var(--color-beige);
  & articles-masonry.cm-article-list-masonry,
  div.cm-article-list-masonry {
    & .articles-masonry-item {
      .card {
        background: none;
        /* color: var(--color-text-surface-secondary) !important; */
      }
    }
  }
}

articles-masonry.cm-article-list-masonry,
div.cm-article-list-masonry {
  gap: var(--spacing-4) 0 !important;

  /* Mobil: 2 kolumner (bas-css går ner till 1 kolumn under 550px), utan kantlinjer.
      Gäller inte listorna i kolumnblocket (cm-column-list), de är alltid 1 kolumn. */
  @media (max-width: 680px) {
    &:not(.cm-column-list *) {
      grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
      gap: var(--spacing-4) var(--spacing-3) !important;
    }
  }

  & .articles-masonry-item {
    border-right: 1px solid var(--color-mineral);

    & .card {
      padding: var(--spacing-3);
      @media (max-width: 680px) {
        padding: 0 !important;
      }
    }
  }

  /* No border on the last column of each row: 4 cols desktop, 3 cols 871-1200px. No borders at all from 870px and down (2 cols) */
  @media (min-width: 1201px) {
    & > div:nth-child(4n) .articles-masonry-item,
    & > .articles-masonry-item:nth-child(4n) {
      border-right: 0;
    }
  }

  @media (min-width: 871px) and (max-width: 1200px) {
    & > div:nth-child(3n) .articles-masonry-item,
    & > .articles-masonry-item:nth-child(3n) {
      border-right: 0;
    }
  }

  @media (max-width: 870px) {
    &:not(.cm-column-list *) .articles-masonry-item {
      border: 0;
    }
  }

  &
    > div:has(.articles-masonry-item):not(:has(~ div .articles-masonry-item))
    .articles-masonry-item:last-child {
    border-right: 0;
  }
}

articles-swiper.cm-article-list-swiper {
  & .articles-swiper-item {
    border-right: 1px solid var(--color-text-surface-secondary);
  }

  & .swiper-wrapper > .articles-swiper-item:last-child {
    border-right: 0;
  }
}

div.cm-article-card {
  & .text-block {
    & > a {
      font-family: var(--font-header);
      font-weight: 700;
      line-height: 120%;
    }

    & .color-accent {
    }

    & h3 {
      font-size: 22px;
      font-weight: 600;
      letter-spacing: -0.4px;
      line-height: 1.2;

      @media (max-width: 680px) {
        font-size: 18px;
      }
    }
  }
}

/* Section Heading styles */
div.content-standard
  > div.text-block.display-flex.justify-between.align-items-end.direction-tablet-column.align-tablet-items-start.m-b-7.m-xlphone-b-5 {
  & h2.size-lg.m-z {
  }
}

/* TEXT & Media Styles */

section.cm-text-media {
  & div.content-standard {
    max-width: calc(
      var(--content-standard) + var(--content-padding) * 2
    ) !important;
  }

  & .card {
    background: var(--color-surface-accent);
    color: var(--color-white);
    padding: 0;
    border-radius: var(--border-radius-lg);
    overflow: hidden;

    & > div {
      padding: 0;
      & > div:first-child {
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: var(--spacing-10);
      }
    }

    & figure {
      aspect-ratio: 1.2 / 1;
      border-radius: 0;
    }

    & h2 {
      font-size: 70px;
      font-style: normal;
      font-weight: 600;
      line-height: 120%;
      letter-spacing: -2.7px;
      margin-bottom: var(--spacing-2) !important;

      @media (max-width: 680px) {
        font-size: 40px;
        font-style: normal;
        font-weight: 600;
        line-height: 44px; /* 110% */
        letter-spacing: -2px;
      }
    }

    .ew-html {
      & p {
        font-size: 16px;
        font-style: normal;
        font-weight: 400;
        line-height: 180%;
        letter-spacing: -0.32px;
      }
    }

    & .btn {
      background: var(--btn-primary-bg);
      border-color: var(--btn-primary-bg);
    }

    @media (max-width: 680px) {
      & > div {
        padding: 0;
        & > div:first-child {
          padding: var(--spacing-4);
        }
      }
    }
  }
}

section.cm-text-media.image-left {
  /* background: var(--color-mineral);
    margin: 0;
    padding-bottom: var(--section-standard); */

  & .card {
    & div.col-12 {
      padding-left: 0;

      @media (max-width: 870px) {
        padding-left: var(--spacing-4);
      }
    }

    & div.col-11 {
      order: -1;
    }
  }
}

/* Kategorier block */

section.cm-article-categories {
  & div.content-standard {
    max-width: calc(
      var(--content-standard) + var(--content-padding) * 2
    ) !important;
  }

  div.text-block.m-b-7.m-xlphone-b-5 {
    margin-bottom: 0;
    /* color: var(--color-skiffer); */
  }

  & .card {
    /* background: var(--color-skiffer);
      color: var(--color-varsel); */

    & .icon {
      background: none;

      & img {
        width: 100%;
        object-fit: contain;
      }
    }
  }
}

/* Custom Columns block styles */
div.cm-column-list-wrapper {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding-top: var(--spacing-4);
  border-top: 0.5px solid var(--color-mineral);

  @media (max-width: 680px) {
    grid-template-columns: 1fr;
    gap: var(--spacing-4);
  }

  & div.cm-column-list:last-child {
    border-right: 0;
  }

  & div.cm-column-list {
    padding: 0 12px;
    border-right: 0.5px solid var(--color-mineral);

    & > div.text-block {
      margin-bottom: var(--spacing-5);

      & h2 {
        color: var(--color-skiffer);
        font-size: 22px;
        font-style: normal;
        font-weight: 700;
        line-height: 120%;
      }
    }

    & .cm-article-list-masonry {
      grid-template-columns: 1fr;

      & .articles-masonry-item {
        border: none;

        & .card {
          border-bottom: 0.5px solid var(--color-mineral);
          padding: 0;
          padding-bottom: var(--spacing-4);
        }

        & .bgcolor-ad-card {
          padding: 12px;
        }
      }

      & .articles-masonry-item:not(:first-child) {
        & .card {
          & a.display-block.m-b-5.m-tablet-b-4 {
            display: none;
          }
        }
      }

      /* Show at most 4 articles per column */
      & .articles-masonry-item:nth-child(n + 4) {
        display: none;
      }
    }
  }
}

/* CTA Block */
section.cm-cta {
  margin: 0 !important;
  margin-top: var(--section-standard) !important;

  & .content-standard {
    max-width: unset;
    padding: unset;
    margin: unset;

    & .border-radius-lg {
      border-radius: 0;
    }
  }

  & h2 {
    font-size: 70px;
    font-style: normal;
    font-weight: 600;
    line-height: 120%; /* 84px */
    letter-spacing: -2.7px;

    @media (max-width: 680px) {
      font-size: 40px;
      font-style: normal;
      font-weight: 600;
      line-height: 44px; /* 110% */
      letter-spacing: -2px;
    }

    &::after {
      content: ".";
      color: var(--color-surface-accent) !important;
    }
  }

  & p.m-v-8 {
    margin-top: var(--spacing-4);

    @media (max-width: 870px) {
      margin-bottom: var(--spacing-4);
    }
  }

  & .btn-primary {
    background: var(--color-surface-accent);
  }

  & .btn-secondary {
    background: transparent;
    color: var(--btn-outline-text);
    border: 1px solid var(--btn-outline-border);
  }
}

/* Puffar block - Blurbs */
section.cm-blurbs {
  & .bgcolor-surface-secondary {
    background: unset;
    color: unset;

    padding: 0 !important;

    /* Flytta knappen under puffarna: rubrik -> puffar -> knapp */
    display: flex;
    flex-direction: column;
    align-items: center;

    & > .text-block {
      display: contents;

      & > h2 {
        max-width: 720px; /* justera om text-block-md har annan bredd */
        text-align: center;
        margin-bottom: 0;
        font-size: 40px;
        font-style: normal;
        font-weight: 600;
        line-height: 44px;
        letter-spacing: -2px;
        color: var(--color-text-accent);
      }

      & > .btn {
        order: 2;
        margin-top: var(--spacing-8);
      }
    }

    & > .blurbs {
      order: 1;
      width: 100%;
      margin-top: var(--spacing-6);
    }
  }

  & .card.blurb {
    background: var(--color-beige);
  }

  .btn-secondary {
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    border: 1px solid var(--btn-primary-border);
  }
}

/* Text-on-bg */
section.cm-text-on-bg {
  margin-top: 0;

  & .content-standard {
    max-width: none;
    padding-inline: 0;

    & .card.text-on-bg {
      min-height: clamp(420px, 38vw, 760px);
      border-radius: 0;

      @media (max-width: 550px) {
        min-height: 420px;
        height: auto;
        max-height: none;
      }

      & .text-block-md {
        max-width: calc(
          var(--content-small) + var(--content-padding) * 2
        ) !important;
        width: 100%;
        margin: 0 auto;

        & .ew-html {
          max-width: 750px;
        }
      }
    }
  }
}

/* CM - Text + Bild block */

section.cm-hero-article-archive {
  margin-top: 0;
  padding-top: 40px;
  padding-bottom: 40px;
  background: var(--color-beige);

  & h1 {
    color: var(--color-ledarskap);
  }
}

/* CM - Search block */
section.cm-category-search {
  & .field-secondary > input[type="search"] {
    border: 2px solid var(--color-beige);
  }
}
/* beige på startsidan */
body.type-startpage .cm-category-search {
  background: var(--color-beige);
  margin: 0 !important;
  padding-top: var(--section-large) !important;

  a.btn.btn-secondary {
    background: var(--color-white);
  }
}

/* ---------------------------------------------------------------------------
    Entrance block ("Börja där du är")
    Markup + content: blocs/entrance/entrance.html
    Each .entrance-item sets --entrance-accent from "color" in the block's JSON.
  --------------------------------------------------------------------------- */
section.cm-entrance {
  background: var(--color-beige);
  margin: 0 !important;
  margin-top: 0 !important;
  padding: var(--section-large) 0;

  @media (max-width: 870px) {
    padding: var(--section-large-tablet) 0;
  }

  @media (max-width: 680px) {
    padding: var(--section-large-phone) 0;
  }

  & .entrance-header {
    margin-bottom: var(--spacing-8, 32px);

    @media (max-width: 680px) {
      margin-bottom: var(--spacing-5, 20px);
    }

    & h2 {
      font-family: var(--font-header);
      font-size: 38px;
      font-weight: 700;
      line-height: 115%;
      margin: 0 0 var(--spacing-2, 8px);

      @media (max-width: 680px) {
        font-size: 28px;
      }
    }

    & p {
      font-family: var(--font-main);
      font-size: 18px;
      line-height: 150%;
      margin: 0;

      @media (max-width: 680px) {
        font-size: 16px;
      }
    }
  }

  & .entrance-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-6, 24px);

    @media (max-width: 870px) {
      grid-template-columns: 1fr;
      gap: var(--spacing-4, 16px);
    }
  }

  & .entrance-item {
    /* Darker shade for text and a pale tint for the band, derived from the accent. */
    --entrance-accent: var(--color-ledarskap);
    --entrance-accent-ink: color-mix(in srgb, var(--entrance-accent) 78%, #000);
    --entrance-accent-tint: color-mix(
      in srgb,
      var(--entrance-accent) 16%,
      #fff
    );

    display: flex;
    flex-direction: column;
    background: var(--color-white, #ffffff);
    border-radius: var(--border-radius-lg);
    overflow: hidden;

    /* Pale band in the item's accent colour; the icon badge sits on its edge. */
    & .entrance-item__band {
      aspect-ratio: 16 / 5;
      background: var(--entrance-accent-tint);
    }

    & .entrance-item__content {
      display: flex;
      flex: 1;
      flex-direction: column;
      padding: 0 var(--spacing-6, 24px) var(--spacing-7, 28px);

      @media (max-width: 680px) {
        padding: 0 var(--spacing-5, 20px) var(--spacing-6, 24px);
      }

      /* Round badge that straddles the image's bottom edge. */
      & .entrance-icon {
        display: grid;
        place-items: center;
        width: 58px;
        height: 58px;
        margin-top: -29px;
        margin-bottom: var(--spacing-4, 16px);
        border: 3px solid var(--color-white, #ffffff);
        border-radius: 50%;
        background: var(--entrance-accent);
        color: var(--color-white, #ffffff);

        & svg {
          width: 22px;
          height: 22px;
        }
      }

      & h3 {
        font-family: var(--font-header);
        font-size: 32px;
        font-weight: 700;
        line-height: 115%;
        letter-spacing: -0.4px;
        margin: 0 0 var(--spacing-3, 12px);

        @media (max-width: 1100px) {
          font-size: 26px;
        }
      }

      & > p {
        font-family: var(--font-main);
        font-size: 16px;
        font-weight: 400;
        line-height: 155%;
        margin: 0 0 var(--spacing-8, 32px);
      }

      /* Pinned to the bottom so the links line up across items. */
      & a.entrance-link {
        display: inline-flex;
        align-items: center;
        align-self: flex-start;
        gap: var(--spacing-2, 8px);
        margin-top: auto;
        font-family: var(--font-header);
        font-size: 17px;
        font-weight: 700;
        color: var(--entrance-accent-ink);
        text-decoration: none;

        & svg {
          flex: none;
          width: 18px;
          height: 18px;
          transition: transform 0.4s ease;
        }

        &:hover svg {
          transform: translateX(4px);
        }
      }
    }
  }
}

/* ==========================================================================
    Legacy article styles (content imported from the old motivation.se)
    Scope: the article body and the paywall teaser body.
    ========================================================================== */
:is(div.cm-article-content, div.article-teaser-content) {
  /* --- Subheading that opens the article: <p class="deck"><strong>…</strong></p> */
  & p.deck {
    margin: 0 0 var(--spacing-6, 24px);
    font-size: 22px;
    line-height: 140%;
    letter-spacing: -0.01em;

    & strong {
      font-weight: 600;
    }

    @media (max-width: 680px) {
      font-size: 19px;
    }
  }

  /* --- Fact box: <div class="faktaruta"> with headings, paragraphs, lists, images */
  & div.faktaruta {
    clear: both;
    margin: var(--spacing-7, 32px) 0;
    padding: var(--spacing-6, 24px);
    background: var(--color-beige, #f5f1eb);
    border-left: 4px solid var(--color-ledarskap, #1fa3b8);
    border-radius: var(--border-radius-md, 8px);

    & :is(h2, h3, h4, h5) {
      margin: 0 0 var(--spacing-3, 12px);
      font-size: 20px;
      line-height: 125%;
    }

    & :is(p, li) {
      font-size: 16px;
      line-height: 155%;
    }

    & > :first-child {
      margin-top: 0;
    }

    & > :last-child {
      margin-bottom: 0;
    }

    & img.image-full {
      margin: var(--spacing-3, 12px) 0;
    }

    @media (max-width: 680px) {
      padding: var(--spacing-4, 16px);
    }
  }

  /* --- Pull quote: <blockquote class="pullquote"><p>…</p><cite>…</cite></blockquote> */
  & blockquote.pullquote {
    clear: both;
    margin: var(--spacing-8, 40px) 0;
    padding: 0 0 0 var(--spacing-6, 24px);
    border-left: 4px solid var(--color-ledarskap, #1fa3b8);

    & p {
      margin: 0;
      font-family: var(--font-header, inherit);
      font-size: 28px;
      font-weight: 500;
      line-height: 125%;
      letter-spacing: -0.02em;
      text-wrap: pretty;

      @media (max-width: 680px) {
        font-size: 22px;
      }
    }

    & cite {
      display: block;
      margin-top: var(--spacing-3, 12px);
      font-size: 16px;
      font-style: normal;
      font-weight: 500;
    }
  }

  /* --- Images: <figure class="image-*"><img><figcaption>…</figcaption></figure>
          and bare <img class="image-*"> inside paragraphs */
  &
    figure:is(
      .image-full,
      .image-wide,
      .image-half,
      .image-left,
      .image-right
    ) {
    margin: var(--spacing-7, 32px) 0;

    & img {
      display: block;
      width: 100%;
      height: auto;
      border-radius: var(--border-radius-md, 8px);
    }

    & figcaption {
      margin-top: var(--spacing-2, 8px);
      font-size: 14px;
      line-height: 145%;
      opacity: 0.7;
    }
  }

  & img:is(.image-full, .image-left, .image-right) {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius-md, 8px);
  }

  & img.image-full {
    display: block;
    width: 100%;
    margin: var(--spacing-6, 24px) 0;
  }

  /* Wider than the 665px text column, centred on it */
  & figure.image-wide {
    width: min(960px, 100vw - 2 * var(--spacing-4, 16px));
    margin-left: 50%;
    transform: translateX(-50%);
  }

  & figure.image-half {
    width: 50%;
    margin-left: auto;
    margin-right: auto;
  }

  & :is(figure, img).image-left {
    float: left;
    width: 45%;
    margin: var(--spacing-2, 8px) var(--spacing-6, 24px) var(--spacing-4, 16px)
      0;
  }

  & :is(figure, img).image-right {
    float: right;
    width: 45%;
    margin: var(--spacing-2, 8px) 0 var(--spacing-4, 16px)
      var(--spacing-6, 24px);
  }

  /* Floats and half-width images go full width on phones */
  @media (max-width: 680px) {
    & :is(figure, img):is(.image-left, .image-right),
    & figure.image-half {
      float: none;
      width: 100%;
      margin: var(--spacing-6, 24px) 0;
    }

    & figure.image-wide {
      width: 100%;
      margin-left: 0;
      transform: none;
    }
  }

  /* Headings and boxes start below any floated image */
  & :is(h2, h3, h4) {
    clear: both;
  }

  /* --- Video: <div class="video-embed"><iframe width="560" height="315"> */
  & div.video-embed {
    clear: both;
    margin: var(--spacing-7, 32px) 0;
    aspect-ratio: 16 / 9;
    border-radius: var(--border-radius-md, 8px);
    overflow: hidden;

    & iframe {
      display: block;
      width: 100%;
      height: 100%;
      border: 0;
    }
  }

  /* --- Video, old wrapper: <div class="responsive-object" style="padding-bottom: 56.25%"> */
  & div.responsive-object {
    position: relative;
    clear: both;
    margin: var(--spacing-7, 32px) 0;
    height: 0;
    border-radius: var(--border-radius-md, 8px);
    overflow: hidden;

    & iframe {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      border: 0;
    }
  }

  /* --- Read-aloud player: <div class="audio-widget"><p>Lyssna på artikeln: <audio> */
  & div.audio-widget {
    margin: var(--spacing-6, 24px) 0;
    padding: var(--spacing-4, 16px);
    background: var(--color-beige, #f5f1eb);
    border-radius: var(--border-radius-md, 8px);

    & p {
      margin: 0;
      font-size: 15px;
      font-weight: 600;
    }

    & audio {
      display: block;
      width: 100%;
      margin-top: var(--spacing-2, 8px);
    }
  }
}

/* ==========================================================================
    Header nav + mega panels
    Markup is built by js/header-nav.js from the hamburger menu's links.
    All classes are prefixed hdr-.
    ========================================================================== */
:root {
  --hdr-ink: var(--color-surface-accent, #0e2a33);
  --hdr-muted: color-mix(in srgb, var(--hdr-ink) 68%, #ffffff);
  --hdr-line: color-mix(in srgb, var(--hdr-ink) 14%, transparent);
  --hdr-panel-bg: color-mix(in srgb, var(--color-beige) 45%, #ffffff);
  --hdr-card-bg: var(--color-white, #ffffff);

  /* Column tracks; js/header-nav.js only decides their order. */
  --hdr-link-col: minmax(0, 1fr);
  --hdr-card-col: minmax(0, 360px);
}

/* --- Raw "Label**Extra" text stays out of sight until the script has cleaned
        it. If the script never runs, the links appear by themselves. */
.cm-header-hamburger-menu:not(.hdr-parsed) a {
  animation: hdr-reveal 0.01s linear 0.8s both;
}

@keyframes hdr-reveal {
  from {
    visibility: hidden;
  }
  to {
    visibility: visible;
  }
}

/* --- Subheadings inside the hamburger menu (links without a target) */
.hamburger-menu-wrapper .cm-header-hamburger-menu a:not([href]) {
  cursor: default;
}

.hamburger-menu-wrapper
  .cm-header-hamburger-menu
  .submenu
  > li.hdr-menu-heading {
  &:not(:first-child) {
    margin-top: var(--spacing-4, 16px);
  }

  & > a {
    font-family: var(--font-menu);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--menu-muted);
  }
}

/* --- Top bar ------------------------------------------------------------- */
/* The panels are positioned against the sticky header itself, so they can
    span the full width. */
header.cm-header > .content-standard {
  position: static;
}

header.cm-header > .content-standard > div:first-child,
header.cm-header .menu-wrap {
  min-width: 0;
}

header.cm-header .menu-wrap {
  justify-content: center;
  align-items: center;
}

/* --- Row under the bar: used when the items do not fit in the bar, and always
        on phones (the script sets .hdr-strip on <html>). */
@media (min-width: 681px) {
  /* Phones already reserve this height further up in this file. */
  :root.hdr-strip {
    --header-height: calc(74px + var(--mobile-nav-height));
  }

  :root.hdr-strip main#page {
    padding-top: var(--mobile-nav-height);
  }
}

:root.hdr-strip {
  & .hdr-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: var(--mobile-nav-height);
    background: var(--header-bg);
  }

  /* The list scrolls sideways; the panels are positioned against the nav, so
      they are not clipped by it. */
  & .hdr-nav__list {
    box-sizing: border-box;
    height: 100%;
    padding: 0 var(--spacing-2, 8px);
    justify-content: safe center;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;

    &::-webkit-scrollbar {
      display: none;
    }
  }

  & .hdr-nav__item {
    flex: none;
    height: 100%;
  }

  /* More items out of view: the row fades out on that side, with an arrow.
      The script sets has-more-start / has-more-end as the row scrolls. */
  & .hdr-nav::before,
  & .hdr-nav::after {
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    width: 56px;
    box-sizing: border-box;
    padding: 0 var(--spacing-2, 8px) 2px;
    color: var(--header-text);
    font-family: var(--font-menu), sans-serif;
    font-size: 22px;
    line-height: 1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
  }

  & .hdr-nav::before {
    content: "‹";
    left: 0;
    justify-content: flex-start;
    background: linear-gradient(to right, var(--header-bg) 45%, transparent);
  }

  & .hdr-nav::after {
    content: "›";
    right: 0;
    justify-content: flex-end;
    background: linear-gradient(to left, var(--header-bg) 45%, transparent);
  }

  & .hdr-nav.has-more-start::before,
  & .hdr-nav.has-more-end::after {
    opacity: 1;
  }

  & :is(.hdr-nav__trigger, .hdr-nav__link) {
    padding-top: 0;
    padding-bottom: 0;
    border-radius: 0;
  }
}

.hdr-nav__list {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hdr-nav__item {
  display: flex;

  /* Accent per dropdown, by its position among the dropdowns (set by the
      script). The fourth and later ones keep the neutral default. */
  --hdr-accent: var(--color-neutral-300, #636363);
  /* Accent as text on light backgrounds, and as a pale tint. */
  --hdr-accent-ink: color-mix(in srgb, var(--hdr-accent) 75%, #000000);
  --hdr-accent-soft: color-mix(in srgb, var(--hdr-accent) 14%, #ffffff);

  &[data-hdr-dropdown="1"] {
    --hdr-accent: var(--color-motivation);
  }

  &[data-hdr-dropdown="2"] {
    --hdr-accent: var(--color-ledarskap);
  }

  &[data-hdr-dropdown="3"] {
    --hdr-accent: var(--color-karriär);
  }
}

.hdr-nav__trigger,
.hdr-nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: var(--spacing-3, 12px) 10px;
  border: 0;
  border-radius: var(--border-radius-sm, 6px);
  background: none;
  color: var(--header-text);
  font-family: var(--font-menu), sans-serif;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  /* Same hover fade as the site's plain text links. */
  transition:
    opacity 0.4s ease,
    background-color 0.2s ease;

  &:hover {
    opacity: 0.6;
  }

  /* The open dropdown: a lighter patch on the dark bar. */
  &[aria-expanded="true"] {
    background: color-mix(in srgb, var(--header-text) 14%, transparent);
    opacity: 1;
  }

  @media (max-width: 1600px) {
    font-size: 16px;
  }

  @media (max-width: 1440px) {
    padding: var(--spacing-3, 12px) 7px;
    font-size: 15px;
  }

  &:focus-visible {
    outline: 2px solid var(--focus-ring-color);
    outline-offset: 2px;
  }

  & svg {
    flex: none;
    width: 14px;
    height: 14px;
    transition: transform 0.25s ease;
  }

  &[aria-expanded="true"] svg {
    transform: rotate(180deg);
  }
}

/* --- Mega panel ---------------------------------------------------------- */
.hdr-panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  /* --hdr-panel-top is where the panel starts on screen (set by the script
      while a panel is open), so it never runs past the bottom of the screen. */
  max-height: calc(100vh - var(--hdr-panel-top, var(--menu-top-offset)));
  max-height: calc(100dvh - var(--hdr-panel-top, var(--menu-top-offset)));
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--hdr-panel-bg);
  color: var(--hdr-ink);
  box-shadow: 0 24px 40px -28px rgba(0, 0, 0, 0.35);
  animation: hdr-panel-in 0.25s ease both;

  &[hidden] {
    display: none;
  }

  /* More content below: it fades out at the bottom edge. At the end of the
      scroll the fade only covers the panel's own bottom padding. */
  &::after {
    content: "";
    position: sticky;
    bottom: 0;
    display: block;
    height: 56px;
    margin-top: -56px;
    background: linear-gradient(to bottom, transparent, var(--hdr-panel-bg));
    pointer-events: none;
  }

  /* Phones: the panel fills the rest of the screen. */
  @media (max-width: 680px) {
    height: calc(100vh - var(--hdr-panel-top, var(--menu-top-offset)));
    height: calc(100dvh - var(--hdr-panel-top, var(--menu-top-offset)));
  }
}

@keyframes hdr-panel-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
}

.hdr-panel__inner {
  box-sizing: border-box;
  width: 100%;
  max-width: calc(var(--content-standard) + var(--content-padding) * 2);
  margin: 0 auto;
  padding: var(--spacing-8, 40px) var(--content-padding) var(--spacing-9, 56px);
}

.hdr-panel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--spacing-1, 4px) var(--spacing-5, 20px);
  /* Room for the close button, which sits in the top right corner. */
  position: relative;
  min-height: 44px;
  padding-right: 64px;
  margin-bottom: var(--spacing-8, 40px);
}

.hdr-panel__title {
  margin: 0;
  font-family: var(--font-header), sans-serif;
  font-size: calc(var(--header-lg-max) * 1px);
  font-weight: 700;
  line-height: 1.2;
}

/* The title links to the item's own page when the menu item has a target. */
.hdr-panel__title-link {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-2, 8px);
  border-radius: var(--border-radius-sm, 6px);
  color: inherit;
  text-decoration: none;
  transition: opacity 0.4s ease;

  &:hover {
    opacity: 0.6;
  }

  &:focus-visible {
    outline: 2px solid var(--focus-ring-color);
    outline-offset: 2px;
  }

  & svg {
    flex: none;
    width: 0.8em;
    height: 0.8em;
    color: var(--hdr-accent-ink);
  }
}

.hdr-panel__tagline {
  margin: 0;
  font-family: var(--font-main), sans-serif;
  font-size: calc(var(--p-md-max) * 1px);
  line-height: 1.4;
  color: var(--hdr-muted);
}

.hdr-panel__close {
  position: absolute;
  top: 0;
  right: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--hdr-line);
  border-radius: 50%;
  background: var(--hdr-card-bg);
  color: var(--hdr-ink);
  cursor: pointer;
  transition: opacity 0.4s ease;

  &:hover {
    opacity: 0.6;
  }

  &:focus-visible {
    outline: 2px solid var(--focus-ring-color);
    outline-offset: 2px;
  }

  & svg {
    width: 18px;
    height: 18px;
  }
}

.hdr-panel__cols {
  display: grid;
  /* --hdr-cols is set per panel by the script */
  grid-template-columns: var(--hdr-cols, minmax(0, 1fr));
  gap: var(--spacing-7, 32px) var(--spacing-8, 40px);
  align-items: start;
}

.hdr-col {
  min-width: 0;
}

.hdr-col__heading {
  margin: 0 0 var(--spacing-5, 20px);
  font-family: var(--font-menu), sans-serif;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--hdr-muted);
}

.hdr-col__list {
  display: grid;
  gap: var(--spacing-2, 8px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.hdr-col--featured .hdr-col__list {
  gap: var(--spacing-5, 20px);
}

/* --- Link item: accent dot | title + badge / description */
.hdr-link {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-4, 16px);
  /* The negative margin lines the dot up with the column heading while the
      hover surface still has some air around it. */
  margin: 0 calc(-1 * var(--spacing-3, 12px));
  padding: var(--spacing-3, 12px);
  border-radius: var(--border-radius-lg, 12px);
  color: inherit;
  text-decoration: none;
  transition: background-color 0.2s ease;

  /* Hover: a pale tint of the accent and a bigger dot, in place of the site's
      link fade. */
  &:hover {
    background: var(--hdr-accent-soft);
    opacity: 1;
  }

  &:focus-visible {
    outline: 2px solid var(--focus-ring-color);
    outline-offset: 2px;
  }
}

/* Small accent dot, centred on the title's first line; it grows on hover. */
.hdr-link__dot {
  flex: none;
  width: 10px;
  height: 10px;
  /* (title line height 18px * 1.3 - dot height) / 2 */
  margin: 7px 3px 0;
  border-radius: 50%;
  background: var(--hdr-accent);
  transition: transform 0.25s ease;
}

.hdr-link:hover .hdr-link__dot,
.hdr-link:focus-visible .hdr-link__dot {
  transform: scale(1.6);
}

.hdr-link__text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.hdr-link__title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--spacing-1, 4px) var(--spacing-3, 12px);
  font-family: var(--font-header), sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
}

.hdr-link[aria-current="page"] .hdr-link__title > span:first-child {
  text-decoration: underline;
  text-decoration-color: var(--hdr-accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.hdr-badge {
  padding: 3px var(--spacing-2, 8px);
  border-radius: var(--border-radius-sm, 6px);
  background: var(--hdr-accent-soft);
  color: var(--hdr-accent-ink);
  font-family: var(--font-menu), sans-serif;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.hdr-link__desc {
  font-family: var(--font-main), sans-serif;
  font-size: 15px;
  line-height: 1.4;
  color: var(--hdr-muted);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* --- Featured card */
.hdr-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--hdr-line);
  border-radius: var(--border-radius-lg, 12px);
  background: var(--hdr-card-bg);
  box-shadow: 0 6px 18px -12px rgba(0, 0, 0, 0.25);
  color: inherit;
  text-decoration: none;
  transition: opacity 0.4s ease;

  &:hover {
    opacity: 0.6;
  }

  &:focus-visible {
    outline: 2px solid var(--focus-ring-color);
    outline-offset: 2px;
  }
}

.hdr-card__media {
  display: block;
  aspect-ratio: 16 / 9;
  background: var(--hdr-accent-soft);

  & img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

.hdr-card__body {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-2, 8px);
  padding: var(--spacing-5, 20px);
}

.hdr-card__label {
  font-family: var(--font-menu), sans-serif;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--hdr-accent-ink);
}

.hdr-card__title {
  font-family: var(--font-header), sans-serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
}

.hdr-card__excerpt {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
  font-family: var(--font-main), sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--hdr-muted);
}

.hdr-card__cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-3, 12px);
  margin-top: var(--spacing-2, 8px);
  font-family: var(--font-header), sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--hdr-accent-ink);

  & svg {
    flex: none;
    width: 18px;
    height: 18px;
  }
}

/* --- Panels on narrow screens ---------------------------------------------- */
@media (max-width: 992px) {
  .hdr-panel__inner {
    padding: var(--spacing-6, 24px) var(--content-padding-tablet)
      var(--spacing-8, 40px);
  }

  .hdr-panel__head {
    margin-bottom: var(--spacing-6, 24px);
  }
}

@media (max-width: 870px) {
  /* Columns stack. */
  .hdr-panel__cols {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--spacing-5, 20px);
  }

  .hdr-col__heading {
    margin-bottom: var(--spacing-2, 8px);
  }

  .hdr-col--featured {
    max-width: 420px;
  }
}

@media (max-width: 550px) {
  .hdr-panel__inner {
    padding-left: var(--spacing-4, 16px);
    padding-right: var(--spacing-4, 16px);
    /* Clear of the fade at the bottom edge. */
    padding-bottom: var(--spacing-10, 72px);
  }

  .hdr-panel__title {
    font-size: calc(var(--header-lg-min) * 1px);
  }
}

/* --- Hamburger menu: account options only ----------------------------------
    The header nav has taken over from the theme's link list, so the hamburger
    button opens the account menu instead:
      [user card + icons] -> [account links] -> [log out / log in buttons]

    js/header-nav.js sets the classes this hangs on:
      .hdr-replaced            on the link list, once the header nav is built
      .hdr-menu-account        on the items linking to "/mina-sidor/..." or
                               "/global/signin" (.hdr-menu-signin on that one)
      .hdr-menu-account-group  on the top-level item those sit under
    Without the script nothing here applies and the menu keeps the full link
    list styled under "MENY CSS" further up. */
.hamburger-menu-wrapper.ews-modal-wrapper:has(
    .cm-header-hamburger-menu.hdr-replaced
  ) {
  --am-radius: 14px;
  --am-border: rgba(10, 26, 31, 0.08);
  --am-hover: var(--color-surface-light, #f7f7fc);
  --am-text: var(--color-text-surface-default, #0a1a1f);
  --am-muted: var(--color-neutral-300, #636363);
  --am-danger: var(--color-danger, #d9534f);

  /* Layout: user card and icons on one row, everything else below. */
  & #hamburger-menu-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "user icons"
      "body body";
    align-items: center;
    gap: 0;
  }

  /* User card: avatar + name side by side. The theme fills it in when
      someone is logged in; only the avatar is a link there, so the link is
      stretched over the whole card. */
  & [hamburger-content-picture] {
    grid-area: user;
    position: relative;
    flex-direction: row !important;
    align-items: center !important;
    gap: 12px;
    min-width: 0;

    & a::after {
      content: "";
      position: absolute;
      inset: 0;
    }

    & .avatar {
      width: 48px;
      height: 48px;
      min-width: 48px;
      font-size: 18px;
    }

    & .as-header {
      min-width: 0;
      margin: 0 !important;
      font-size: 16px;
      line-height: 1.3;
      font-weight: 600;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;

      &::after {
        content: "Visa medlemssida";
        display: block;
        font-size: 13px;
        font-weight: 400;
        color: var(--am-muted);
      }
    }
  }

  /* Settings + close icons */
  & #hamburger-menu-content > nav.top {
    grid-area: icons;
    margin: 0 !important;
    gap: 8px;

    & .btn-icon {
      width: 36px;
      height: 36px;
      box-shadow: none;
      border: 1px solid var(--am-border);
      background: transparent;

      &:hover {
        background: var(--am-hover);
      }
    }
  }

  /* Body: account links, then the log out / log in buttons */
  & #hamburger-menu-content > .inner-content {
    grid-area: body;
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--am-border);

    & > .m-b-7 {
      margin: 0 !important;
    }
  }

  /* Link list: only the account links are left. "Logga in" is left out too,
      the theme's own log in button below does that job. */
  & .cm-header-hamburger-menu {
    & > ul.menu {
      display: block;
      margin: 0;
      padding: 0;
    }

    & > ul.menu > li:not(.hdr-menu-account, .hdr-menu-account-group),
    & > ul.menu > li.hdr-menu-account-group > a,
    & .submenu > li:not(.hdr-menu-account),
    & li.hdr-menu-signin {
      display: none;
    }

    & .submenu {
      margin: 0;
    }

    & li.hdr-menu-account > a {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 10px 12px !important;
      border-radius: 10px;
      font-family: inherit;
      font-size: 14px;
      font-weight: 500;
      line-height: 1.3;
      text-transform: none;
      color: var(--am-text);

      &:hover {
        background: var(--am-hover);
      }

      &::after {
        content: "›";
        margin-left: auto;
        color: var(--am-muted);
        font-size: 18px;
        line-height: 1;
      }
    }
  }

  /* Buttons under the links. Items whose button the theme has hidden or
      removed for this visitor would still take up a row, so they go. */
  & .inner-content > nav.m-t-auto {
    margin-top: 12px !important;
    padding-top: 12px;
    border-top: 1px solid var(--am-border);

    & > ul.menu {
      margin: 0;
      padding: 0;
    }

    & > ul.menu > li:not(:has(> user-container)),
    & > ul.menu > li:has(> user-container[style*="none"]) {
      display: none;
    }

    & [logout-btn] {
      width: 100%;
      justify-content: center;
      gap: 8px;
      padding: 10px 12px;
      border-radius: 10px;
      background: transparent;
      box-shadow: none;
      border: 1px solid var(--am-border);
      color: var(--am-danger);
      font-weight: 600;

      &:hover {
        background: color-mix(in srgb, var(--am-danger) 8%, transparent);
        border-color: color-mix(in srgb, var(--am-danger) 30%, transparent);
      }
    }
  }

  /* Logged out (the theme hides, then removes, the log out button): no user
      card and no account links, only "Logga in" and "Prenumerera". */
  &:not(
      :has(user-container[authenticated-show]:not([style*="none"]) [logout-btn])
    ) {
    & [hamburger-content-picture],
    & li.hdr-menu-account {
      display: none !important;
    }

    & #hamburger-menu-content > .inner-content {
      margin-top: 8px;
      padding-top: 0;
      border-top: 0;
    }

    & .inner-content > nav.m-t-auto {
      margin-top: 0 !important;
      padding-top: 0;
      border-top: 0;
    }
  }
}

/* From 992px the account menu is a compact card under the right end of the
    header instead of a full-width sheet. */
@media (min-width: 992px) {
  .hamburger-menu-wrapper.ews-modal-wrapper:has(
      .cm-header-hamburger-menu.hdr-replaced
    ) {
    --menu-backdrop-tint: rgba(10, 26, 31, 0.15);

    & .ews-modal-el {
      /* The desktop bar is 24px taller than --menu-top-offset says, so this
          leaves 12px between the header and the card. */
      top: calc(var(--menu-top-offset) + 36px);
      left: auto;
      /* Lines up with the right edge of the header's content. */
      right: max(
        var(--content-padding, 40px),
        calc((100vw - var(--content-standard, 1380px)) / 2)
      );
      width: 360px;
      max-width: calc(100vw - 32px);
      max-height: calc(100dvh - var(--menu-top-offset) - 52px);
      padding: 20px;
      border-radius: var(--am-radius);
      box-shadow: 0 16px 48px -12px rgba(10, 26, 31, 0.3);
    }
  }
}

/* Logged out, the menu only holds "Logga in" and "Prenumerera", and from
    551px those are already in the bar, so the button has nothing to open.
    (The theme hides the logged-out elements with an inline display: none once
    someone is logged in.) */
@media (min-width: 551px) {
  header.cm-header:has(
      user-container[unauthenticated-show]:not([style*="none"])
    )
    #hamburger-menu-toggle {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hdr-panel {
    animation: none;
  }

  .hdr-nav__trigger,
  .hdr-nav__link,
  .hdr-panel__close,
  .hdr-panel__title-link,
  .hdr-link,
  .hdr-link__dot,
  .hdr-card {
    &,
    & svg {
      transition: none;
    }
  }
}
