/* Theme style */

/* ==========================================================================
Base styles
========================================================================== */

/* Focus
========================================================================== */

/* Navy outline with a white inner ring shows on both light and navy bands (WCAG 2.4.7). */
:is(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline: 3px solid var(--wp--preset--color--primary);
    outline-offset: 2px;
    box-shadow: 0 0 0 2px var(--wp--preset--color--light);
}

/* Navy bands: gold outline (8:1) with a navy inner ring. */
:is(.has-dark-background-color, .has-primary-background-color, .has-background-dark-1-background-color, .has-background-dark-2-background-color, .is-style-hero, .is-style-subhero)
    :is(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline-color: var(--wp--preset--color--accent);
    box-shadow: 0 0 0 2px var(--wp--preset--color--background-dark-1);
}

:is(.has-dark-background-color, .has-primary-background-color, .has-background-dark-1-background-color, .has-background-dark-2-background-color, .is-style-hero, .is-style-subhero)
    :is(.has-light-background-color, .has-background-light-1-background-color, .has-background-light-2-background-color, .has-secondary-background-color, .has-neutral-light-background-color)
    :is(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline-color: var(--wp--preset--color--primary);
    box-shadow: 0 0 0 2px var(--wp--preset--color--light);
}

/* Headings
========================================================================== */

h1, h2, h3, h4 {
    text-wrap: balance;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* Paragraphs
========================================================================== */

.is-style-eyebrow {
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: var(--wp--preset--font-size--xxs);
}

/* Typography spacing
========================================================================== */

/* Links
========================================================================== */

/* No hover fade (user, 2026-11-12); the parent sets opacity 0.55-0.6. */
:is(a, .wp-block-button__link, [type="submit"], [data-readmore-button]):hover {
    opacity: 1;
}

/* Long URLs used as link text break instead of widening the page at 320px. */
main a {
    overflow-wrap: anywhere;
}

/* Pagination
========================================================================== */

/* Page numbers wrap on narrow phones (7 squares of 40px don't fit 320px). */
.pagination .pagination-numbers {
    flex-wrap: wrap;
    justify-content: center;
}

@media (max-width: 500px) {
    .pagination .pagination-numbers {
        gap: var(--wp--preset--spacing--xxs);
    }
}

/* Lists
========================================================================== */

/* List style: Columns (sponsor lists and other long link lists) */
.wp-block-list.is-style-list-columns {
    columns: 3 220px;
    column-gap: var(--wp--preset--spacing--l);
    padding-left: 1.2em;
}

.wp-block-list.is-style-list-columns li {
    break-inside: avoid;
    margin-bottom: var(--wp--preset--spacing--xxs);
}

.wp-block-list:is(.is-style-list-arrow, .is-style-list-check) {
    list-style: none;
    padding-left: 0;
}

.wp-block-list:is(.is-style-list-arrow, .is-style-list-check) li {
    position: relative;
    padding-left: calc(16px + var(--wp--preset--spacing--xxs));
    margin-bottom: 6px;
}

.wp-block-list:is(.is-style-list-arrow, .is-style-list-check) li::before {
    content: "";
    position: absolute;
    left: 0;
    /* Center the marker on the first line (1lh = one line height). */
    top: calc((1lh - 4px) / 2);
    width: 4px;
    height: 4px;
    background-color: currentColor;
}

.wp-block-list:is(.is-style-list-arrow, .is-style-list-check) ul {
    list-style: none;
    margin-top: 6px;
    padding-left: 0;
}

/* Arrow and check icons are masks, so they take the text color. */
.wp-block-list:is(.is-style-list-arrow, .is-style-list-check) li::before {
    top: calc((1lh - 16px) / 2);
    width: 16px;
    height: 16px;
    -webkit-mask: var(--qt-kit-icon) center / contain no-repeat;
    mask: var(--qt-kit-icon) center / contain no-repeat;
}

.wp-block-list.is-style-list-arrow li::before {
    --qt-kit-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M16.2 13H4v-2h12.2l-5.6-5.6L12 4l8 8-8 8-1.4-1.4z'/%3E%3C/svg%3E");
}

.wp-block-list.is-style-list-check li::before {
    --qt-kit-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9.5 18 3.8 12.3l1.4-1.4 4.3 4.3 9.3-9.3 1.4 1.4z'/%3E%3C/svg%3E");
}

/* Buttons
========================================================================== */

/* Paragraph style "arrow-link-back": a back link with ← before the text. */
.is-style-arrow-link-back a {
    display: inline-flex;
    align-items: center;
    gap: var(--wp--preset--spacing--xs);
    text-decoration: none;
    color: currentColor;
}

.is-style-arrow-link-back a::before {
    content: "";
    flex: none;
    width: 16px;
    height: 16px;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.49 8.77H15.93V7.23H3.49l5.84-5.84L8.23.31.54 8l7.69 7.69 1.1-1.08z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.49 8.77H15.93V7.23H3.49l5.84-5.84L8.23.31.54 8l7.69 7.69 1.1-1.08z'/%3E%3C/svg%3E") center / contain no-repeat;
    transition: transform 100ms linear;
}

.is-style-arrow-link-back a:hover::before,
.is-style-arrow-link-back a:focus-visible::before {
    transform: translateX(-4px);
}

/* Primary button (core) */

/* Secondary button */
.is-style-button-secondary .wp-block-button__link {
    background-color: transparent;
    color: var(--wp--preset--color--primary);
    box-shadow: inset 0 0 0 2px var(--wp--preset--color--primary);
}

.is-style-button-secondary .wp-block-button__link:hover,
.is-style-button-secondary .wp-block-button__link:focus-visible {
    background-color: var(--wp--preset--color--primary);
    color: var(--wp--preset--color--light);
}

/* Inverted button: parent uses white/black, which this palette doesn't have. */
.is-style-button-inverted .wp-block-button__link {
    background-color: var(--wp--preset--color--light);
    color: var(--wp--preset--color--primary);
}

/* Outline button (core) */

/* Inputs
========================================================================== */

/* Label */

/* Input fields */

/* Select */

/* Checkbox & radio button */

/* Focus and active statements */

/* Acceptance */

/* Submit */

/* Contact form 7
========================================================================== */

.wpcf7-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-gap: var(--wp--preset--spacing--s);
}

.wpcf7-form-control-wrap {
    margin-top: var(--wp--preset--spacing--xxs);
}

/* Labels and the fields inside them use the body size (parent: xs). */
.wpcf7-form label {
    font-size: var(--wp--preset--font-size--body);
}

.wpcf7-form p:has(.wpcf7-textarea),
.wpcf7-form p:has(.wpcf7-url),
.wpcf7-form p:has(.wpcf7-acceptance),
.wpcf7-form p:has([type='submit']) {
    grid-column: 1 / -1;
}

/* Acceptance (GDPR): the box sits at the start of the first text line. */
.wpcf7-form .wpcf7-acceptance label {
    align-items: flex-start;
    font-size: var(--wp--preset--font-size--xs);
    line-height: 1.5;
    cursor: pointer;
}

.wpcf7-form .wpcf7-acceptance input[type='checkbox'] {
    appearance: none;
    flex: none;
    width: 22px;
    height: 22px;
    /* Centre the box on the first line (font-size xs at line-height 1.5). */
    margin: calc((1.5em - 22px) / 2) 0 0;
    border: 2px solid var(--wp--preset--color--primary);
    border-radius: 4px;
    background: var(--wp--preset--color--light) center / 16px no-repeat;
    cursor: pointer;
}

.wpcf7-form .wpcf7-acceptance input[type='checkbox']:checked {
    background-color: var(--wp--preset--color--primary);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9.5 18 3.8 12.3l1.4-1.4 4.3 4.3 9.3-9.3 1.4 1.4z'/%3E%3C/svg%3E");
}

.wpcf7-form .wpcf7-acceptance input[type='checkbox']:focus-visible {
    outline: 3px solid var(--wp--preset--color--primary);
    outline-offset: 2px;
}

.wpcf7-form .wpcf7-acceptance input[type='checkbox'].wpcf7-not-valid,
.wpcf7-form .wpcf7-acceptance:has(.wpcf7-not-valid) input[type='checkbox'] {
    border-color: var(--wp--custom--color--error);
}

/* Submit matches the header button; the parent uses --black/--white, which this palette lacks. */
.wpcf7-form [type='submit'] {
    padding: var(--wp--preset--spacing--xxs) var(--wp--preset--spacing--xs);
    border: 1px solid transparent;
    border-radius: 0;
    background-color: var(--wp--preset--color--primary);
    color: var(--wp--preset--color--light);
    font-family: var(--wp--preset--font-family--button);
    font-size: var(--wp--preset--font-size--xs);
    font-style: normal;
    font-weight: 500;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    transition: all 150ms linear;
    cursor: pointer;
}

.wpcf7-form [type='submit']:hover {
    opacity: 1;
}

.wpcf7-form [type='submit']:focus-visible {
    outline: 3px solid var(--wp--preset--color--primary);
    outline-offset: 2px;
}

.wpcf7-form [type='submit']:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

main .wpcf7-form p {
    max-width: none;
}

.wpcf7-form :is(input[type='text'], input[type='email'], input[type='url'], textarea) {
    width: 100%;
    border: 1px solid var(--wp--preset--color--neutral-medium);
    border-radius: var(--wp--custom--border-radius--s);
    background-color: var(--wp--preset--color--light);
    padding: var(--wp--preset--spacing--xs);
    font: inherit;
}

@media (max-width: 500px) {
    .wpcf7-form {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Media
========================================================================== */

/* Images */
/* Live images are 250-450px wide: never upscale them, and keep space below. */
main .wp-block-image img {
    width: auto;
    max-width: 100%;
    height: auto;
}

main .wp-block-image {
    margin-bottom: var(--wp--preset--spacing--s);
}

main .wp-block-image figcaption {
    font-size: var(--wp--preset--font-size--xxs);
    color: var(--wp--preset--color--neutral-dark);
}

/* Video */

/* Iframe & embedded */

/* ==========================================================================
Layout
========================================================================== */

/* Paddings and margins
========================================================================== */

main {
    margin-top: calc(var(--wp--custom--header-height--total) + 0px);
}

/* Section padding xxl for the whole site; Section: Subhero and editor.css match. */
.qt-section,
.wp-block-qase-blocks-section {
    --qt-section-spacing: var(--wp--preset--spacing--xxl);
}

/* Top-level, non-full-width sections only; first-section selectors beat the parent's 0. */
main > .qt-section:not(.container-fullwidth),
.entry-content > .qt-section:not(.container-fullwidth),
main > .qt-section:first-of-type:not(.is-style-breadcrumbs, .container-fullwidth),
.entry-content > .qt-section:first-of-type:not(.container-fullwidth) {
    padding-top: var(--qt-section-spacing);
    padding-bottom: var(--qt-section-spacing);
}

main .qt-section .qt-section,
main .qt-section.container-fullwidth {
    padding-top: 0;
    padding-bottom: 0;
}

/* Max widths
========================================================================== */

/* Grids
========================================================================== */

/* Same specificity as the parent's .grid, so block styles with their own gap still win. */
:where(.qt-section__inner).grid {
    column-gap: var(--wp--custom--content-size-gutter--default);
}

/* ==========================================================================
Announcement bar
========================================================================== */

/* ==========================================================================
Top bar
========================================================================== */

/* ==========================================================================
Header
========================================================================== */

header .is-style-header-top {
    background-color: var(--wp--preset--color--light);
    border-bottom: 4px solid var(--wp--preset--color--accent);
}

header .is-style-header-top .wp-block-site-logo img {
    display: block;
    width: 72px;
    height: auto;
}

@media (max-width: 1024px) {
    header .is-style-header-top .wp-block-site-logo img {
        width: 52px;
    }
}

/* The parent allows 100px, too tall for the square emblem. */
.mega-menu-mobile .mega-menu-header-m img {
    width: 52px;
}

/* Header height is the theme token (100px in theme.json). */
@media (max-width: 670px) {
    :root {
        --wp--custom--header-height--top: 72px;
    }
}

/* Desktop menu
========================================================================== */

/* Center the menu between the logo and the "Bli medlem" button. */
header .is-style-header-top .qt-container:has(.mega-menu:not(.mega-menu-mobile)) {
    justify-content: center;
}

/* The user toolbar is empty (search is off), so no gap before the button. */
header .is-style-header-top .user-toolbar:not(:has(*)) + .wp-block-buttons {
    margin-left: 0;
}

/* Menu items and the header button stay on one line; body size and xs gap so all nine fit the header width. */
.mega-menu:not(.mega-menu-mobile) > .menu > .menu-item > :is(a, button),
header .is-style-header-top .wp-block-button__link {
    white-space: nowrap;
}

@media (min-width: 1280px) {
    .mega-menu:not(.mega-menu-mobile) > .menu {
        gap: var(--wp--preset--spacing--xs);
    }

    .mega-menu:not(.mega-menu-mobile) > .menu > .menu-item > :is(a, button) {
        font-size: var(--wp--preset--font-size--body);
    }
}

/* Site logo */

/* Header button */

/* Hamburger up to 1279px (parent: 1100px); one-line menu items need 1280px. */
@media (min-width: 1101px) and (max-width: 1279px) {
    .mega-menu {
        display: none;
    }

    #toggle-hamburger {
        display: flex;
    }

    .mega-menu-mobile {
        display: block;
    }

    .mega-menu-overlay-mobile {
        top: 0 !important;
        opacity: 1 !important;
    }

    /* From q-theme modules/mega-menu/css/mega-menu.css (max-width: 1100px). */
    .mega-menu-mobile .mega-menu-close {
        display: block;
    }

    .mega-menu-image {
        display: none !important;
    }

    .qt-container:has(.hamburger) .wp-block-buttons {
        margin-right: var(--wp--preset--spacing--s);
    }
}

/* Hamburger icon
========================================================================== */

/* User toolbar
========================================================================== */

/* Search bar
========================================================================== */

/* ==========================================================================
Footer
========================================================================== */

footer .qt-section,
footer .qt-section a {
    color: var(--wp--preset--color--light);
}

footer .qt-section p {
    margin-top: 0;
    margin-bottom: var(--wp--preset--spacing--xxs);
    font-size: var(--wp--preset--font-size--xs);
}

footer .wp-block-site-logo {
    margin-bottom: var(--wp--preset--spacing--s);
}

footer .is-style-footer-top .footer-heading,
footer .is-style-footer-top .is-style-footer-heading {
    color: var(--wp--preset--color--accent);
    font-family: var(--wp--preset--font-family--heading);
    font-weight: 700;
    font-size: var(--wp--preset--font-size--s);
    margin-bottom: var(--wp--preset--spacing--xs);
}

footer [id^='menu-footer-menu-'] {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--wp--preset--spacing--xxs);
    margin: 0;
    padding: 0;
    list-style: none;
}

footer .footer-menu a {
    color: var(--wp--preset--color--light);
    text-decoration: none;
    font-size: var(--wp--preset--font-size--xs);
}

footer .footer-menu a:hover {
    text-decoration: underline;
}

footer .is-style-footer-bottom {
    border-top: 1px solid rgb(255 255 255 / 20%);
}

/* Navigation
========================================================================== */

/* ==========================================================================
Utility classes
========================================================================== */

/* ==========================================================================
Components and modules
========================================================================== */

/* Breadcrumbs
========================================================================== */

/* Pagination
========================================================================== */

/* Current, hover */

/* Prev, next */

/* Accordion
========================================================================== */

/* qase-blocks' fills and neutral-2 border don't fit this palette. */
.qt-accordion > .qt-section__inner {
    gap: 0;
}

/* Under a paragraph; a heading's own bottom margin is enough. */
.qt-container > :not(.wp-block-heading) + .qt-accordion {
    margin-top: var(--wp--preset--spacing--xs);
}

.accordion-item {
    background-color: transparent;
    border: 0;
    border-bottom: 1px solid var(--wp--preset--color--neutral-light);
}

.accordion-item:first-child {
    border-top: 1px solid var(--wp--preset--color--neutral-light);
}

/* Accordion heading */
/* Buttons default to the system font. */
.accordion-item__heading.wp-block-heading {
    font-size: var(--wp--preset--font-size--s);
}

button[data-accordion='accordion-trigger'] {
    gap: var(--wp--preset--spacing--xs);
    padding: var(--wp--preset--spacing--xs) 0;
    background-color: transparent;
    color: var(--wp--preset--color--primary);
    font-family: var(--wp--preset--font-family--paragraph);
    font-size: var(--wp--preset--font-size--s);
    font-weight: 600;
    line-height: 1.4;
    text-align: left;
    cursor: pointer;
}

button[data-accordion='accordion-trigger']:hover {
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

button[data-accordion='accordion-trigger']:focus-visible {
    outline: 3px solid var(--wp--preset--color--primary);
    outline-offset: 2px;
}

/* Accordion content */
/* qase-blocks sets content to size s; accordion text follows the body size. */
.accordion-item__content :not(h1, h2, h3, h4, h5, h6) {
    font-size: inherit;
}

.accordion-item__content {
    font-size: var(--wp--preset--font-size--body);
}

.accordion-content__inner {
    padding: 0 0 var(--wp--preset--spacing--s);
    background-color: transparent;
}

.accordion-content__inner > :last-child {
    margin-bottom: 0;
}

/* Accordion icon */
/* The chevron takes the text colour (a mask instead of the black SVG background). */
.accordion-item__icon {
    display: flex;
    flex-shrink: 0;
}

.is-style-chevron span.accordion-icon__inner {
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M12.355 3L7 8.563 1.645 3 0 4.713 7 12l7-7.287L12.355 3z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M12.355 3L7 8.563 1.645 3 0 4.713 7 12l7-7.287L12.355 3z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.accordion-icon__inner::before,
.accordion-icon__inner::after {
    background-color: currentColor;
}

/* Tabs
========================================================================== */

/* Splide slider
========================================================================== */

/* Slider header */

/* ==========================================================================
Styles for pages, sections, blocks and others.
========================================================================== */

/* Page: Search results
========================================================================== */

/* Section: Hero
========================================================================== */

/* Hero and subhero share these; their blocks carry no colours or sizes. */
/* .wp-block-qase-blocks-section is the same block in the editor (no qt-section class there). */
:is(.is-style-hero, .is-style-subhero):is(.qt-section, .wp-block-qase-blocks-section) {
    background-color: var(--wp--preset--color--background-dark-1);
    border-bottom: 6px solid var(--wp--preset--color--accent);
}

:is(.is-style-hero, .is-style-subhero) :is(.wp-block-heading, .wp-block-query-title, p) {
    color: var(--wp--preset--color--light);
}

:is(.is-style-hero, .is-style-subhero) .is-style-eyebrow {
    color: var(--wp--preset--color--accent);
}

/* More room than other sections (beats the first-section rule in Paddings and margins). */
main .qt-section.is-style-hero,
.entry-content > .qt-section.is-style-hero:first-of-type {
    padding-top: var(--wp--preset--spacing--xxxl);
    padding-bottom: var(--wp--preset--spacing--xxxl);
}

.is-style-hero .wp-block-heading {
    font-size: var(--wp--preset--font-size--display);
}

.is-style-hero p:not(.is-style-eyebrow) {
    font-size: var(--wp--preset--font-size--l);
}

.is-style-hero .wp-block-image img {
    width: 170px;
    filter: drop-shadow(0 8px 24px rgb(0 0 0 / 30%));
}

@media (max-width: 768px) {
    .is-style-hero .wp-block-image img {
        width: 110px;
    }
}


/* Section: Subhero
========================================================================== */

/* Background, border and text colors: see Section: Hero. */

.is-style-subhero :is(.wp-block-heading, .wp-block-query-title) {
    margin-bottom: var(--wp--preset--spacing--xs);
}

.is-style-subhero p:not(.is-style-eyebrow) {
    font-size: var(--wp--preset--font-size--m);
}


/* Section: Stacked boxes
========================================================================== */

/* Slider - Logos
========================================================================== */

/* Archive: Category
========================================================================== */

/* Page: Articles
========================================================================== */

.articles.grid,
.latest-articles.grid {
    grid-gap: var(--wp--style--block-gap);
}

/* Filter buttons */
.articles__filter-buttons {
    margin-bottom: calc(2 * var(--wp--style--block-gap));
    margin-top: 0;
    align-items: center;
}

.articles__filter-buttons::before {
    content: 'Filtrera:';
    font-weight: 500;
    font-size: var(--wp--preset--font-size--m);
}

/* Selected filter: white with an inset navy frame, so every button keeps its height. */
.articles__filter-buttons .wp-block-button__link:hover {
    background-color: var(--wp--preset--color--background-dark-1);
    color: var(--wp--preset--color--light);
}

.articles__filter-buttons .wp-block-button__link[aria-current="page"] {
    background-color: var(--wp--preset--color--light);
    color: var(--wp--preset--color--primary);
    box-shadow: inset 0 0 0 2px var(--wp--preset--color--primary);
}

/* Card */

/* Single: Article
========================================================================== */

/* Section: Employees
========================================================================== */

/* Section: Testimonial slider
========================================================================== */

/* Testimonial card */

/* Section: Image gallery with lightbox
========================================================================== */

/* Section: FAQ
========================================================================== */

/* Container: Image column (no bottom margin, so a centered image stays centered) */
.qt-container.is-style-image-column > .wp-block-image:last-child {
    margin-bottom: 0;
}

/* Container: Cards
========================================================================== */

.qt-container:is(.is-style-card-solid, .is-style-card-border) {
    display: flex;
    flex-direction: column;
    gap: var(--wp--preset--spacing--xs);
    overflow: hidden;
    border-radius: var(--wp--custom--border-radius--container);
}

.qt-container:is(.is-style-card-solid, .is-style-card-border) > * {
    margin: 0;
}

.qt-container:is(.is-style-card-solid, .is-style-card-border) > .wp-block-image img {
    width: 100%;
    aspect-ratio: var(--wp--custom--aspect-ratio--landscape);
    object-fit: cover;
    border-radius: var(--wp--custom--border-radius--image);
}

/* Image style "natural": no crop in cards (QR codes, logos). */
.qt-container:is(.is-style-card-solid, .is-style-card-border) > .wp-block-image.is-style-natural img {
    max-width: 100%;
    height: auto;
    aspect-ratio: auto;
    object-fit: contain;
    border-radius: 0;
}

/* Push the button row to the bottom so cards in a row line up. */
.qt-container:is(.is-style-card-solid, .is-style-card-border) > .wp-block-buttons {
    margin-top: auto;
}

.qt-container.is-style-card-solid {
    padding: var(--wp--preset--spacing--s);
    background-color: var(--wp--preset--color--background-light-1);
}

.qt-container.is-style-card-border {
    padding: var(--wp--preset--spacing--s);
    border: 1px solid var(--wp--preset--color--neutral-light);
    border-radius: var(--wp--custom--border-radius--m);
}

/* Linked card: the container link wraps the content in <a>. */
.qt-container:is(.is-style-card-solid, .is-style-card-border) > a {
    display: flex;
    flex-direction: column;
    gap: var(--wp--preset--spacing--xs);
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.qt-container:is(.is-style-card-solid, .is-style-card-border) > a > * {
    margin: 0;
}

.qt-container.is-style-card-border {
    background-color: var(--wp--preset--color--light);
    transition: box-shadow 150ms linear, border-color 150ms linear;
}

.qt-container.is-style-card-border:has(> a):hover {
    border-color: var(--wp--preset--color--primary);
    box-shadow: 0 6px 20px rgb(0 32 91 / 12%);
}

/* Section: Intro and grid
========================================================================== */

/* Figma: 64px from intro to grid, 24px between items. */
.qt-section.is-style-intro-grid > .qt-section__inner {
    row-gap: var(--wp--preset--spacing--xl);
}

/* Policies: one container per H2 part, 48px apart (32px on phones). */
.qt-section.is-style-text-parts > .qt-section__inner {
    row-gap: var(--wp--preset--spacing--l);
}

@media (max-width: 768px) {
    .qt-section.is-style-text-parts > .qt-section__inner {
        row-gap: var(--wp--preset--spacing--m);
    }
}

.is-style-intro-grid > .qt-section__inner > .qt-container > .qt-section > .qt-section__inner {
    gap: var(--wp--preset--spacing--s);
}

/* Intro left, button right on the same row (Hem: Senaste nytt); stacked on phones. */
.qt-section.is-style-intro-grid > .qt-section__inner.grid-col-2 {
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: var(--wp--preset--spacing--s);
}

/* Lets the bottom-aligned button line up with the heading's bottom. */
.qt-section.is-style-intro-grid > .qt-section__inner.grid-col-2 > .qt-container:first-child > :last-child {
    margin-bottom: 0;
}

/* Keeps the button from dropping below a heading without an eyebrow. */
.qt-section.is-style-intro-grid > .qt-section__inner.grid-col-2 > .qt-container:nth-child(2) .wp-block-buttons {
    margin-top: 0;
}

@media (max-width: 670px) {
    .qt-section.is-style-intro-grid > .qt-section__inner.grid-col-2 {
        grid-template-columns: minmax(0, 1fr);
    }

    .qt-section.is-style-intro-grid > .qt-section__inner.grid-col-2 > .qt-container:nth-child(2) {
        margin-top: calc(var(--wp--preset--spacing--s) - var(--wp--preset--spacing--xl));
    }

    .qt-section.is-style-intro-grid > .qt-section__inner.grid-col-2 > .qt-container:nth-child(2) .wp-block-buttons {
        justify-content: flex-start;
    }
}

/* Section: Article
========================================================================== */

/* Single post: meta, title, featured image and the post body (its own nested sections). */
.is-style-article .post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--wp--preset--spacing--xxs);
    font-size: var(--wp--preset--font-size--xxs);
    color: var(--wp--preset--color--neutral-dark);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: var(--wp--preset--spacing--s);
}

.is-style-article .post-meta__categories {
    display: flex;
    gap: var(--wp--preset--spacing--xxs);
    list-style: none;
    margin: 0;
    padding: 0;
}

.is-style-article .post-meta__categories::before {
    content: '·';
}

.is-style-article .wp-block-post-featured-image {
    margin-bottom: var(--wp--preset--spacing--m);
}

.is-style-article .wp-block-post-featured-image img {
    width: auto;
    max-width: 100%;
    height: auto;
    aspect-ratio: auto;
    border-radius: var(--wp--custom--border-radius--m);
}

.is-style-article .wp-block-post-content .qt-section {
    padding-top: 0 !important;
    padding-left: 0;
    padding-right: 0;
}

.is-style-article .wp-block-post-content .qt-section__inner {
    padding-left: 0;
    padding-right: 0;
}

/* Previous / next: one row, previous left and next right; stacks on phones. */
.is-style-article .wp-block-separator {
    margin-top: var(--wp--preset--spacing--xl);
    margin-bottom: var(--wp--preset--spacing--s);
}

.is-style-article .wp-block-post-navigation-link {
    margin-top: var(--wp--preset--spacing--xs);
    flex: 0 1 48%;
}

.is-style-article .wp-block-post-navigation-link:empty {
    display: none;
}

@media (max-width: 670px) {
    .is-style-article .wp-block-group:has(> .wp-block-post-navigation-link) {
        flex-direction: column;
    }

    .is-style-article .wp-block-post-navigation-link.has-text-align-right {
        text-align: left;
    }
}

.is-style-article .post-navigation-link__label {
    display: block;
    font-size: var(--wp--preset--font-size--xxs);
    font-weight: 700;
    text-transform: uppercase;
    color: var(--wp--preset--color--neutral-dark);
}

/* Query: Post cards
========================================================================== */

.wp-block-query.is-style-post-cards .wp-block-post-template {
    gap: var(--wp--preset--spacing--s);
}

.wp-block-query.is-style-post-cards .wp-block-post {
    display: flex;
    flex-direction: column;
    gap: var(--wp--preset--spacing--xxs);
    padding-bottom: var(--wp--preset--spacing--s);
    background-color: var(--wp--preset--color--light);
    border: 1px solid var(--wp--preset--color--neutral-medium);
    border-top: 4px solid var(--wp--preset--color--accent);
    border-radius: var(--wp--custom--border-radius--m);
    overflow: hidden;
}

.wp-block-query.is-style-post-cards .wp-block-post > * {
    margin: 0;
    padding-left: var(--wp--preset--spacing--s);
    padding-right: var(--wp--preset--spacing--s);
}

.wp-block-query.is-style-post-cards .wp-block-post > .wp-block-post-featured-image {
    padding: 0;
    margin-bottom: var(--wp--preset--spacing--xxs);
    background-color: var(--wp--preset--color--background-light-1);
}

.wp-block-query.is-style-post-cards .wp-block-post-featured-image img {
    object-fit: cover;
}

.wp-block-query.is-style-post-cards .wp-block-post > .wp-block-post-date {
    padding-top: var(--wp--preset--spacing--xs);
    font-size: var(--wp--preset--font-size--xxs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--wp--preset--color--neutral-dark);
}

.wp-block-query.is-style-post-cards .wp-block-post-featured-image + .wp-block-post-date {
    padding-top: 0;
}

.wp-block-query.is-style-post-cards .wp-block-post-title {
    font-size: var(--wp--preset--font-size--m);
    line-height: 1.25;
}

.wp-block-query.is-style-post-cards .wp-block-post-title a {
    color: var(--wp--preset--color--primary);
    text-decoration: none;
}

.wp-block-query.is-style-post-cards .wp-block-post-title a:hover {
    text-decoration: underline;
}

.wp-block-query.is-style-post-cards .wp-block-post-excerpt {
    font-size: var(--wp--preset--font-size--xs);
}

.wp-block-query.is-style-post-cards .wp-block-post-excerpt__excerpt {
    margin: 0;
}

.wp-block-query.is-style-post-cards .wp-block-query-pagination {
    margin-top: var(--wp--preset--spacing--l);
}

@media (max-width: 1024px) {
    .wp-block-query.is-style-post-cards .wp-block-post-template.is-layout-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .wp-block-query.is-style-post-cards .wp-block-post-template.is-layout-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Query: Post list
========================================================================== */

.wp-block-query.is-style-post-list .wp-block-post-template {
    list-style: none;
    margin: 0 0 var(--wp--preset--spacing--m);
    padding: 0;
}

.wp-block-query.is-style-post-list .wp-block-post {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--wp--preset--spacing--xs);
    padding: var(--wp--preset--spacing--xs) 0;
    border-bottom: 1px solid var(--wp--preset--color--neutral-medium);
}

.wp-block-query.is-style-post-list .wp-block-post-title {
    margin: 0;
    font-size: var(--wp--preset--font-size--s);
}

.wp-block-query.is-style-post-list .wp-block-post-date {
    font-size: var(--wp--preset--font-size--xxs);
    color: var(--wp--preset--color--neutral-dark);
}

/* Table */
.wp-block-table.is-style-stripes thead,
.wp-block-table.is-style-figures thead {
    background-color: var(--wp--preset--color--primary);
    color: var(--wp--preset--color--light);
}

/* Table: Stripes with figures (block style "figures"); right-aligned amounts never wrap. */
.wp-block-table.is-style-figures table {
    border-collapse: collapse;
}

.wp-block-table.is-style-figures thead {
    border-bottom: 0;
}

.wp-block-table.is-style-figures :is(th, td) {
    padding: var(--wp--preset--spacing--xxs) var(--wp--preset--spacing--xs);
    border: 0;
    text-align: left;
    vertical-align: top;
}

/* A tint of primary, so the stripes show on white and on light bands. */
.wp-block-table.is-style-figures tbody tr:nth-child(odd) {
    background-color: color-mix(in srgb, var(--wp--preset--color--primary) 6%, transparent);
}

.wp-block-table.is-style-figures :is(th, td).has-text-align-center {
    text-align: center;
}

.wp-block-table.is-style-figures :is(th, td).has-text-align-right {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* Table: Label and value (block style "key-value") */
.wp-block-table.is-style-key-value {
    margin: 0;
}

.wp-block-table.is-style-key-value table {
    width: 100%;
    border-collapse: collapse;
}

.wp-block-table.is-style-key-value :is(th, td) {
    padding: var(--wp--preset--spacing--xxs) 0;
    border: 0;
    border-bottom: 1px solid var(--wp--preset--color--neutral-medium);
    text-align: left;
    vertical-align: baseline;
}

.wp-block-table.is-style-key-value tr:first-child :is(th, td) {
    border-top: 1px solid var(--wp--preset--color--neutral-medium);
}

/* The label column is as wide as its longest label, so values sit close. */
.wp-block-table.is-style-key-value :is(th, td):first-child {
    width: 1%;
    white-space: nowrap;
    padding-right: var(--wp--preset--spacing--s);
    font-size: var(--wp--preset--font-size--xs);
    color: var(--wp--preset--color--neutral-dark);
}

.wp-block-table.is-style-key-value :is(th, td):last-child {
    font-weight: 600;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    user-select: all;
}

/* Phones: the label sits above its value. */
@media (max-width: 670px) {
    .wp-block-table.is-style-key-value :is(tr, th, td) {
        display: block;
        width: auto;
    }

    .wp-block-table.is-style-key-value tr {
        padding: var(--wp--preset--spacing--xxs) 0;
        border-bottom: 1px solid var(--wp--preset--color--neutral-medium);
    }

    .wp-block-table.is-style-key-value tr:first-child {
        border-top: 1px solid var(--wp--preset--color--neutral-medium);
    }

    .wp-block-table.is-style-key-value :is(th, td),
    .wp-block-table.is-style-key-value tr:first-child :is(th, td) {
        padding: 0;
        border: 0;
    }
}

/* Phones: hyphenate long words so the table fits without scrolling. */
@media (max-width: 670px) {
    .wp-block-table.is-style-figures table {
        font-size: var(--wp--preset--font-size--xs);
    }

    .wp-block-table.is-style-figures :is(th, td) {
        padding: var(--wp--preset--spacing--xxs);
        hyphens: auto;
    }
}

/* Article cards: the parent's --black title colour isn't in this palette. */
.card--article,
.card--article:visited {
    color: var(--wp--preset--color--dark);
}

.card--article .card__title {
    color: var(--wp--preset--color--primary);
}

.card--article .card__postmeta-date {
    color: var(--wp--preset--color--neutral-dark);
}

.card--article:is(:hover, :focus-visible) {
    opacity: 1;
    color: var(--wp--preset--color--dark);
}

.card--article:is(:hover, :focus-visible) .card__title {
    text-decoration: underline;
    text-underline-offset: 0.15em;
}
