/**
 * STM Blog — storefront styles.
 * Plain CSS without a build step and without JavaScript. Fonts and colours come from the theme: sizes are in em,
 * rules and secondary text are mixed from the current text colour, so the blog follows light and dark themes.
 */

.stm-blog,
.stm-blog-side {
    --stm-blog-rule: rgba(0, 0, 0, .14);
    --stm-blog-muted: #5c5c5c;
    font-size: max(1em, 16px);
    line-height: 1.6;
}

@supports (color: color-mix(in srgb, red 50%, blue)) {
    .stm-blog,
    .stm-blog-side {
        --stm-blog-rule: color-mix(in srgb, currentColor 15%, transparent);
        --stm-blog-muted: color-mix(in srgb, currentColor 72%, transparent);
    }
}

.stm-blog :focus-visible,
.stm-blog-side :focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.stm-blog-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.stm-blog-preview {
    max-width: 44em;
    margin: 0 auto 2em;
    padding: .7em 0 .7em 1em;
    border-left: 2px solid currentColor;
    font-size: max(.9em, 14px);
    line-height: 1.5;
}

.stm-blog-preview strong {
    margin-right: .5em;
    font-size: .84em;
    letter-spacing: .09em;
    text-transform: uppercase;
}

/* ---------- Headings and small type ---------- */

.stm-blog-head,
.stm-blog-post-head {
    margin: 0 0 2em;
}

.stm-blog-title {
    margin: 0 0 .4em;
    font-family: var(--stm-blog-head-font, inherit);
    font-size: clamp(1.9em, 1.25em + 2.2vw, 2.8em);
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: -.012em;
    text-wrap: balance;
}

.stm-blog-kicker,
.stm-blog-label {
    margin: 0 0 .9em;
    color: var(--stm-blog-accent, var(--stm-blog-muted));
    font-size: .76em;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.stm-blog-label a {
    color: inherit;
    text-decoration: none;
}

.stm-blog-label a:hover {
    text-decoration: underline;
    text-underline-offset: .2em;
}

.stm-blog-kicker a,
.stm-blog-meta a,
.stm-blog-byline a {
    color: inherit;
    text-decoration: none;
}

.stm-blog-kicker a:hover,
.stm-blog-meta a:hover,
.stm-blog-byline a:hover {
    text-decoration: underline;
    text-underline-offset: .18em;
}

.stm-blog-kicker a + a::before,
.stm-blog-meta > * + *::before {
    content: "·";
    display: inline-block;
    margin: 0 .55em;
}

.stm-blog-meta,
.stm-blog-byline,
.stm-blog-count {
    margin: 0;
    color: var(--stm-blog-muted);
    font-size: .84em;
    line-height: 1.5;
}

.stm-blog-intro,
.stm-blog-outro {
    max-width: var(--stm-blog-measure, 44em);
}

.stm-blog-outro {
    margin-top: 2.5em;
    padding-top: 1.75em;
    border-top: 1px solid var(--stm-blog-rule);
}

.stm-blog-empty {
    margin: 0;
    padding: 1.75em 0;
    border-top: 1px solid var(--stm-blog-rule);
    color: var(--stm-blog-muted);
}

/* ---------- Lists ---------- */

.stm-blog-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.stm-blog-item {
    margin: 0;
    padding: var(--stm-blog-gap, 1.75em) 0;
    border-top: 1px solid var(--stm-blog-rule);
}

.stm-blog-item article {
    display: flex;
    gap: 1.75em;
    align-items: flex-start;
}

.stm-blog-item-media {
    flex: 0 0 38%;
    display: block;
    aspect-ratio: var(--stm-blog-ratio, 3 / 2);
    overflow: hidden;
    border-radius: 2px;
    background: var(--stm-blog-rule);
}

.stm-blog-item-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.stm-blog-item-body {
    flex: 1 1 0;
    min-width: 0;
}

.stm-blog-item-title {
    margin: .3em 0 .4em;
    font-family: var(--stm-blog-head-font, inherit);
    font-size: 1.4em;
    font-weight: 600;
    line-height: 1.22;
    letter-spacing: -.006em;
    text-wrap: balance;
}

.stm-blog-item-title a {
    color: inherit;
    text-decoration: none;
}

.stm-blog-item-title a:hover {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: .16em;
}

.stm-blog-item-excerpt {
    margin: 0 0 .6em;
}

/* Magazine: the newest post opens the page, the others follow in two columns. */

.stm-blog--magazine .stm-blog-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 2.5em;
}

.stm-blog--magazine .stm-blog-item article {
    flex-direction: column;
    gap: 1.1em;
}

.stm-blog--magazine .stm-blog-item-media {
    flex: none;
    width: 100%;
}

.stm-blog--magazine .stm-blog-item-body {
    flex: none;
    width: 100%;
}

.stm-blog-item--lead {
    grid-column: 1 / -1;
}

.stm-blog-item--lead .stm-blog-item-media {
    aspect-ratio: 16 / 9;
}

.stm-blog-item--lead .stm-blog-item-title {
    font-size: clamp(1.6em, 1.1em + 1.6vw, 2.1em);
    line-height: 1.15;
}

.stm-blog-item--lead .stm-blog-item-excerpt {
    max-width: 40em;
    font-size: 1.06em;
}

/* Pictures come as <picture> with WebP/AVIF sources: the wrapper must not take part in the layout. */
.stm-blog-item-media picture,
.stm-blog-post-media picture,
.stm-blog-related-media picture {
    display: contents;
}

/* Grid: picture above the text, in columns. */

.stm-blog--grid .stm-blog-list {
    display: grid;
    grid-template-columns: repeat(var(--stm-blog-columns, 3), minmax(0, 1fr));
    column-gap: 1.75em;
}

.stm-blog--grid .stm-blog-item article {
    flex-direction: column;
    gap: 1em;
}

.stm-blog--grid .stm-blog-item-media,
.stm-blog--grid .stm-blog-item-body {
    flex: none;
    width: 100%;
}

.stm-blog--grid .stm-blog-item-title {
    font-size: 1.2em;
}

/* Editorial: text only, large titles. */

.stm-blog--editorial .stm-blog-item-title {
    margin-top: .25em;
    font-size: clamp(1.45em, 1.1em + 1vw, 1.9em);
    line-height: 1.16;
}

.stm-blog--editorial .stm-blog-item-excerpt {
    max-width: 40em;
    font-size: 1.06em;
}

/* Minimal and timeline: one line per post. */

.stm-blog--minimal .stm-blog-item,
.stm-blog--timeline .stm-blog-item {
    padding: calc(var(--stm-blog-gap, 1.75em) * .45) 0;
}

.stm-blog--minimal .stm-blog-item article,
.stm-blog--timeline .stm-blog-item article {
    display: grid;
    grid-template-columns: 9.5em minmax(0, 1fr) auto;
    gap: 0 1.25em;
    align-items: baseline;
}

.stm-blog--timeline .stm-blog-item article {
    grid-template-columns: 2.5em minmax(0, 1fr) auto;
}

.stm-blog--minimal .stm-blog-item-title,
.stm-blog--timeline .stm-blog-item-title {
    margin: 0;
    font-size: 1.06em;
    line-height: 1.4;
}

.stm-blog-item-date,
.stm-blog-item-category {
    color: var(--stm-blog-muted);
    font-size: .86em;
    font-variant-numeric: tabular-nums;
}

.stm-blog-item-category {
    color: var(--stm-blog-accent, var(--stm-blog-muted));
    text-decoration: none;
}

.stm-blog-item-day {
    color: var(--stm-blog-muted);
    font-size: 1.15em;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.stm-blog-month {
    margin: 2em 0 .25em;
    color: var(--stm-blog-accent, var(--stm-blog-muted));
    font-size: .8em;
    font-weight: 600;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.stm-blog-month:first-of-type {
    margin-top: 0;
}

/* Compact spacing. */

.stm-blog--dense .stm-blog-item-excerpt {
    margin-bottom: .3em;
}

.stm-blog--dense .stm-blog-head {
    margin-bottom: 1.25em;
}

/* ---------- Pager ---------- */

.stm-blog-pager {
    display: flex;
    flex-wrap: wrap;
    gap: .75em 1.5em;
    align-items: baseline;
    justify-content: space-between;
    padding-top: 1.5em;
    border-top: 1px solid var(--stm-blog-rule);
    font-size: .92em;
}

.stm-blog-pager a {
    color: inherit;
    text-decoration: none;
}

.stm-blog-pager a:hover {
    text-decoration: underline;
    text-underline-offset: .18em;
}

.stm-blog-pager-pages {
    display: flex;
    gap: 1.1em;
    margin: 0 auto;
    padding: 0;
    list-style: none;
    font-variant-numeric: tabular-nums;
}

.stm-blog-pager-pages li {
    margin: 0;
}

.stm-blog-pager-pages [aria-current] {
    font-weight: 700;
    box-shadow: 0 2px 0 currentColor;
}

.stm-blog-pager-step {
    font-weight: 600;
}

/* ---------- Post ---------- */

.stm-blog-post {
    max-width: var(--stm-blog-measure, 44em);
    margin-inline: auto;
}

.stm-blog-standfirst {
    margin: 0 0 1em;
    font-size: 1.22em;
    line-height: 1.5;
}

.stm-blog-post-media {
    margin: 0 0 2.25em;
}

.stm-blog-post-media img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 2px;
    background: var(--stm-blog-rule);
}

.stm-blog-content {
    font-size: 1.06em;
    line-height: 1.72;
    overflow-wrap: break-word;
}

.stm-blog-content > * + * {
    margin-top: 1.15em;
}

.stm-blog-content p,
.stm-blog-content ul,
.stm-blog-content ol,
.stm-blog-content blockquote,
.stm-blog-content figure,
.stm-blog-content table,
.stm-blog-content pre {
    margin-bottom: 0;
}

.stm-blog-content p + p,
.stm-blog-content p + ul,
.stm-blog-content p + ol,
.stm-blog-content ul + p,
.stm-blog-content ol + p {
    margin-top: 1.15em;
}

.stm-blog-content h2,
.stm-blog-content h3,
.stm-blog-content h4 {
    margin-bottom: 0;
    font-weight: 600;
    line-height: 1.25;
    text-wrap: balance;
}

.stm-blog-content h2 {
    margin-top: 1.9em;
    font-size: 1.5em;
}

.stm-blog-content h3 {
    margin-top: 1.6em;
    font-size: 1.22em;
}

.stm-blog-content h4 {
    margin-top: 1.4em;
    font-size: 1.05em;
}

.stm-blog-content a {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: .18em;
}

.stm-blog-content img {
    max-width: 100%;
    height: auto;
    border-radius: 2px;
}

.stm-blog-content li {
    margin-bottom: .35em;
}

.stm-blog-content blockquote {
    margin-left: 0;
    margin-right: 0;
    padding: .1em 0 .1em 1.2em;
    border-left: 2px solid currentColor;
    font-size: 1.08em;
    font-style: normal;
}

.stm-blog-content figcaption {
    margin-top: .6em;
    color: var(--stm-blog-muted);
    font-size: .84em;
    line-height: 1.5;
}

.stm-blog-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: .94em;
}

.stm-blog-content th,
.stm-blog-content td {
    padding: .6em .75em .6em 0;
    border-bottom: 1px solid var(--stm-blog-rule);
    text-align: left;
    vertical-align: top;
}

.stm-blog-content pre {
    padding: 1em 1.1em;
    overflow-x: auto;
    border: 1px solid var(--stm-blog-rule);
    border-radius: 2px;
    font-size: .88em;
    line-height: 1.55;
}

.stm-blog-post-foot,
.stm-blog-authors,
.stm-blog-back {
    margin: 2.5em 0 0;
    padding-top: 1.5em;
    border-top: 1px solid var(--stm-blog-rule);
}

.stm-blog-back {
    font-size: .92em;
}

.stm-blog-back a {
    color: inherit;
    font-weight: 600;
}

/* ---------- Reading aids ---------- */

.stm-blog-progress {
    position: fixed;
    top: var(--stm-blog-progress-top, 0);
    bottom: var(--stm-blog-progress-bottom, auto);
    left: 0;
    right: 0;
    z-index: 900;
    height: var(--stm-blog-progress-height, 3px);
    opacity: var(--stm-blog-progress-opacity, 1);
    pointer-events: none;
}

.stm-blog-progress span {
    display: block;
    height: 100%;
    background: var(--stm-blog-progress-color, var(--stm-blog-accent, currentColor));
    transform: scaleX(0);
    transform-origin: 0 50%;
}

.stm-blog-views[hidden],
.stm-blog-comment-list > li[hidden] {
    display: none;
}

.stm-blog-side-list > li[hidden] {
    display: none;
}

.stm-blog-side-fold {
    flex: none;
    width: 1.6em;
    height: 1.6em;
    margin: 0 auto 0 -.7em;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    line-height: 1;
    cursor: pointer;
    vertical-align: baseline;
}

.stm-blog-side-fold::before {
    content: "";
    display: inline-block;
    width: .45em;
    height: .45em;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(-45deg);
    transition: transform .15s ease;
}

/* themes style every button on hover and focus (Luma: grey box with border); these buttons keep their own look */
.stm-blog-side .stm-blog-side-fold:hover,
.stm-blog-side .stm-blog-side-fold:focus,
.stm-blog-side .stm-blog-side-fold:active {
    border: 0;
    background: none;
    box-shadow: none;
    color: inherit;
}

.stm-blog-side-fold:focus-visible,
.stm-blog-carousel-button:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.stm-blog-side-fold[aria-expanded="true"]::before {
    transform: rotate(45deg);
}

.stm-blog-products--side .stm-blog-products-list {
    grid-template-columns: 1fr;
}

@media (min-width: 1024px) {
    /* the column itself moves along: in Luma it is a float only as tall as its content, where the sidebar alone
       would have no room to stick; in a stretched grid or flex column the sidebar sticks on its own */
    .sidebar:has(> .stm-blog-side--sticky),
    .stm-blog-side--sticky {
        position: sticky;
        top: 1.5rem;
    }

    .stm-blog-side--sticky {
        max-height: calc(100vh - 3rem);
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-width: thin;
        scrollbar-color: rgba(0, 0, 0, .25) transparent;
    }
}

@media (prefers-reduced-motion: reduce) {
    .stm-blog-side-fold::before {
        transition: none;
    }
}

/* ---------- Carousel (related posts, posts widget) ---------- */

.stm-blog-carousel .stm-blog-carousel-track {
    display: grid;
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(200px, calc((100% - 2 * var(--stm-blog-gap, 1.75em)) / 3));
    gap: var(--stm-blog-gap, 1.75em);
    margin: 0;
    padding: 0 0 .6em;
    list-style: none;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
}

/* with the buttons in place the track needs no scrollbar of its own (touch and trackpad still scroll) */
.stm-blog-carousel:has(.stm-blog-carousel-nav:not([hidden])) .stm-blog-carousel-track {
    scrollbar-width: none;
}

.stm-blog-carousel:has(.stm-blog-carousel-nav:not([hidden])) .stm-blog-carousel-track::-webkit-scrollbar {
    display: none;
}

.stm-blog-carousel .stm-blog-carousel-track > li {
    scroll-snap-align: start;
    margin: 0;
}

.stm-blog-carousel-nav {
    display: flex;
    justify-content: flex-end;
    gap: .5em;
    margin-top: .4em;
}

.stm-blog-carousel-nav[hidden] {
    display: none;
}

.stm-blog-carousel-button {
    width: 2.4em;
    height: 2.4em;
    padding: 0;
    border: 1px solid currentColor;
    border-radius: 2px;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.stm-blog-carousel-button::before {
    content: "";
    display: inline-block;
    width: .5em;
    height: .5em;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(-45deg);
}

.stm-blog-carousel-button--back::before {
    transform: rotate(135deg);
}

.stm-blog-carousel .stm-blog-carousel-button:hover,
.stm-blog-carousel .stm-blog-carousel-button:focus,
.stm-blog-carousel .stm-blog-carousel-button:active {
    border: 1px solid currentColor;
    background: transparent;
    box-shadow: none;
    color: inherit;
}

.stm-blog-carousel-button:disabled {
    opacity: .35;
    cursor: default;
}

@media (max-width: 767px) {
    .stm-blog-carousel .stm-blog-carousel-track {
        grid-auto-columns: 75%;
    }
}

.stm-blog-comment-helpful,
.stm-blog-comment-helpful:hover,
.stm-blog-comment-helpful:focus,
.stm-blog-comment-helpful:active {
    margin: .5em 1em 0 0;
    padding: .2em 0;
    border: 0;
    border-bottom: 1px solid var(--stm-blog-rule);
    background: none;
    box-shadow: none;
    color: var(--stm-blog-muted);
    font: inherit;
    font-size: .86em;
    cursor: pointer;
}

.stm-blog-comment-helpful[aria-pressed="true"],
.stm-blog-comment-helpful[aria-pressed="true"]:disabled {
    opacity: 1;
    color: inherit;
    border-bottom-color: currentColor;
    cursor: default;
}

.stm-blog-comment-helpful:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.stm-blog-comment-helpful-count {
    font-variant-numeric: tabular-nums;
}

/* ---------- Post behind a password ---------- */

.stm-blog-unlock {
    max-width: 32em;
    margin: 2em 0;
    padding-top: 1.4em;
    border-top: 1px solid var(--stm-blog-rule);
}

.stm-blog-unlock label {
    display: block;
    margin-bottom: .35em;
    font-weight: 600;
}

.stm-blog-unlock-row {
    display: flex;
    flex-wrap: wrap;
    gap: .6em;
}

.stm-blog-unlock-row input {
    flex: 1 1 14em;
    min-height: 2.6em;
}

/* ---------- Content for customer groups (widget) ---------- */

.stm-blog-note {
    margin: 1.6em 0;
    padding: .2em 0 .2em 1.1em;
    border-left: 3px solid var(--stm-blog-accent, currentColor);
}

.stm-blog-note > :first-child {
    margin-top: 0;
}

.stm-blog-note > :last-child {
    margin-bottom: 0;
}

/* ---------- Video and gallery ---------- */

.stm-blog-video {
    margin: 0;
}

.stm-blog-video-frame {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #1f1f1f;
    color: #fff;
    overflow: hidden;
}

.stm-blog-video-frame iframe,
.stm-blog-video-poster {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    object-fit: cover;
}

.stm-blog-video-poster {
    opacity: .45;
}

.stm-blog-video-consent {
    position: absolute;
    inset: auto 0 0 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .6em 1.2em;
    padding: 1.1em 1.25em;
    background: rgba(0, 0, 0, .72);
    font-size: .92em;
    line-height: 1.45;
}

.stm-blog-video-note {
    flex: 1 1 18em;
    margin: 0;
}

.stm-blog-video-note a,
.stm-blog-video-watch {
    color: #fff;
}

.stm-blog-video-play {
    padding: .6em 1.2em;
    border: 1px solid #fff;
    border-radius: 2px;
    background: #fff;
    color: #111;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.stm-blog-video-play:not([hidden]) ~ .stm-blog-video-watch {
    display: none;
}

.stm-blog-video figcaption {
    margin-top: .5em;
    font-size: .9em;
    opacity: .8;
}

.stm-blog-gallery {
    margin: 2.5em 0;
}

.stm-blog-gallery-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(10em, 1fr));
    gap: .8em;
    margin: 0;
    padding: 0;
    list-style: none;
}

.stm-blog-gallery-list li {
    margin: 0;
}

.stm-blog-gallery-list a {
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.stm-blog-gallery-list img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.stm-blog-lightbox {
    max-width: min(92vw, 1400px);
    max-height: 92vh;
    padding: 2.6em 3.4em 1em;
    border: 0;
    background: #111;
    color: #fff;
}

.stm-blog-lightbox::backdrop {
    background: rgba(0, 0, 0, .8);
}

.stm-blog-lightbox img {
    display: block;
    max-width: 100%;
    max-height: calc(92vh - 5em);
    margin: 0 auto;
}

.stm-blog-lightbox-count {
    margin: .6em 0 0;
    text-align: center;
    font-size: .85em;
}

.stm-blog-lightbox-button {
    position: absolute;
    width: 2.4em;
    height: 2.4em;
    padding: 0;
    border: 1px solid #fff;
    border-radius: 2px;
    background: transparent;
    color: #fff;
    cursor: pointer;
}

.stm-blog-lightbox .stm-blog-lightbox-button:hover,
.stm-blog-lightbox .stm-blog-lightbox-button:focus,
.stm-blog-lightbox .stm-blog-lightbox-button:active {
    border: 1px solid #fff;
    background: transparent;
    box-shadow: none;
    color: #fff;
}

.stm-blog-lightbox .stm-blog-lightbox-button:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.stm-blog-lightbox-close {
    top: .4em;
    right: .4em;
}

.stm-blog-lightbox-close::before,
.stm-blog-lightbox-close::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 25%;
    width: 50%;
    border-top: 1.5px solid currentColor;
    transform: rotate(45deg);
}

.stm-blog-lightbox-close::after {
    transform: rotate(-45deg);
}

.stm-blog-lightbox-back,
.stm-blog-lightbox-next {
    top: 50%;
    margin-top: -1.2em;
}

.stm-blog-lightbox-back {
    left: .4em;
}

.stm-blog-lightbox-next {
    right: .4em;
}

.stm-blog-lightbox-back::before,
.stm-blog-lightbox-next::before {
    content: "";
    display: inline-block;
    width: .55em;
    height: .55em;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(-45deg);
}

.stm-blog-lightbox-back::before {
    transform: rotate(135deg);
}

.stm-blog-lightbox-button[hidden] {
    display: none;
}

.stm-blog-comment-more {
    margin: 1.2em 0 0;
    padding: .55em 1.1em;
    border: 1px solid currentColor;
    border-radius: 2px;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.stm-blog-toc {
    margin: 0 0 2.25em;
    padding: 1.1em 0 1.2em;
    border-top: 1px solid var(--stm-blog-rule);
    border-bottom: 1px solid var(--stm-blog-rule);
}

.stm-blog-toc ol {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: stm-blog-toc;
}

.stm-blog-toc li {
    margin: 0;
    padding: .28em 0;
    line-height: 1.4;
}

.stm-blog-toc .stm-blog-toc-level-2 {
    counter-increment: stm-blog-toc;
}

.stm-blog-toc .stm-blog-toc-level-2::before {
    content: counter(stm-blog-toc) ".";
    display: inline-block;
    min-width: 1.8em;
    color: var(--stm-blog-muted);
    font-variant-numeric: tabular-nums;
}

/* headings that carry their own numbers ("1. Too many pages") get no second one */
.stm-blog-toc .stm-blog-toc-own .stm-blog-toc-level-2::before {
    content: none;
}

.stm-blog-toc .stm-blog-toc-own .stm-blog-toc-level-3 {
    padding-left: 1.2em;
}

.stm-blog-toc .stm-blog-toc-level-3 {
    padding-left: 1.8em;
    font-size: .94em;
}

.stm-blog-toc a {
    color: inherit;
    text-decoration: none;
}

.stm-blog-toc a:hover {
    text-decoration: underline;
    text-underline-offset: .18em;
}

.stm-blog-content :is(h2, h3)[id] {
    scroll-margin-top: 1.5em;
}

.stm-blog-neighbours {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5em;
    margin: 2.5em 0 0;
    padding-top: 1.5em;
    border-top: 1px solid var(--stm-blog-rule);
}

.stm-blog-neighbour {
    display: block;
    color: inherit;
    text-decoration: none;
}

.stm-blog-neighbour--newer {
    text-align: right;
}

.stm-blog-neighbour .stm-blog-label {
    display: block;
    margin-bottom: .35em;
}

.stm-blog-neighbour-title {
    font-weight: 600;
    line-height: 1.35;
}

.stm-blog-neighbour:hover .stm-blog-neighbour-title {
    text-decoration: underline;
    text-underline-offset: .18em;
}

.stm-blog-neighbours + .stm-blog-back {
    margin-top: 1.5em;
}

/* ---------- Extra fields of the post ---------- */

.stm-blog-details {
    margin: 2.5em 0 0;
    padding-top: 1.5em;
    border-top: 1px solid var(--stm-blog-rule);
}

.stm-blog-details dl {
    margin: 1em 0 0;
}

.stm-blog-detail {
    display: grid;
    grid-template-columns: minmax(8em, 14em) 1fr;
    gap: .25em 1.5em;
    padding: .6em 0;
    border-bottom: 1px solid var(--stm-blog-rule);
}

.stm-blog-detail dt {
    margin: 0;
    font-weight: 600;
}

.stm-blog-detail dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.stm-blog-detail img {
    display: block;
    max-width: min(100%, 24em);
    height: auto;
    border-radius: 2px;
}

@media (max-width: 639px) {
    .stm-blog-detail {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ---------- Series and topics ---------- */

.stm-blog-series-line {
    margin: 0 0 .6em;
    font-size: .875em;
    color: var(--stm-blog-muted);
}

.stm-blog-series-line a {
    color: inherit;
    text-underline-offset: .2em;
}

.stm-blog-series {
    margin: 2.5em 0 0;
    padding-top: 1.5em;
    border-top: 1px solid var(--stm-blog-rule);
}

.stm-blog-series .stm-blog-label a {
    color: inherit;
}

.stm-blog-series-list {
    margin: 1em 0 0;
    padding: 0;
    list-style: none;
}

.stm-blog-series-list li {
    display: flex;
    gap: .75em;
    align-items: baseline;
    margin: 0;
    padding: .55em 0;
    border-bottom: 1px solid var(--stm-blog-rule);
}

.stm-blog-series-number {
    flex: 0 0 1.6em;
    font-variant-numeric: tabular-nums;
    color: var(--stm-blog-muted);
}

.stm-blog-series-list .is-current {
    font-weight: 600;
}

.stm-blog-series-lead {
    font-size: .8em;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--stm-blog-muted);
}

.stm-blog-series-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5em;
    margin-top: 1.25em;
}

.stm-blog-series-nav a {
    display: block;
    color: inherit;
    text-decoration: none;
}

.stm-blog-series-next {
    grid-column: 2;
    text-align: right;
}

.stm-blog-series-nav .stm-blog-label {
    display: block;
    margin-bottom: .35em;
}

.stm-blog-series-nav .stm-blog-neighbour-title {
    font-weight: 600;
    line-height: 1.35;
}

.stm-blog-series-nav a:hover .stm-blog-neighbour-title {
    text-decoration: underline;
}

.stm-blog-item-part {
    font-variant-numeric: tabular-nums;
}

/* ---------- Related posts, products, widget ---------- */

.stm-blog-related,
.stm-blog-products,
.stm-blog-product-posts,
.stm-blog-widget {
    --stm-blog-rule: rgba(0, 0, 0, .14);
    --stm-blog-muted: #5c5c5c;
    margin: 2.5em 0 0;
    padding-top: 1.5em;
    border-top: 1px solid var(--stm-blog-rule);
    line-height: 1.5;
}

@supports (color: color-mix(in srgb, red 50%, blue)) {
    .stm-blog-product-posts,
    .stm-blog-widget {
        --stm-blog-rule: color-mix(in srgb, currentColor 15%, transparent);
        --stm-blog-muted: color-mix(in srgb, currentColor 72%, transparent);
    }
}

.stm-blog-product-posts .stm-blog-label,
.stm-blog-widget .stm-blog-label {
    margin: 0 0 .9em;
    color: var(--stm-blog-muted);
    font-size: .76em;
    font-weight: 600;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.stm-blog-related-list,
.stm-blog-products-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(12em, 1fr));
    gap: 1.5em;
    margin: 0;
    padding: 0;
    list-style: none;
}

.stm-blog-related-list li,
.stm-blog-products-list li {
    margin: 0;
}

.stm-blog-related-media,
.stm-blog-product-media {
    display: block;
    margin-bottom: .7em;
    overflow: hidden;
    border-radius: 2px;
}

.stm-blog-related-media img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: var(--stm-blog-ratio, 3 / 2);
    object-fit: cover;
    background: var(--stm-blog-rule);
}

.stm-blog-product-media .product-image-container {
    display: block;
    width: 100% !important;
}

.stm-blog-related-title,
.stm-blog-product-name {
    color: inherit;
    font-weight: 600;
    line-height: 1.35;
    text-decoration: none;
}

.stm-blog-related-title:hover,
.stm-blog-product-name:hover {
    text-decoration: underline;
    text-underline-offset: .18em;
}

.stm-blog-product-price {
    margin-top: .35em;
    font-size: .94em;
}

.stm-blog-product-price .price-box {
    margin: 0;
}

/* The list widget: titles only, one per line. */
.stm-blog-widget--list .stm-blog-related-list {
    display: block;
}

.stm-blog-widget--list .stm-blog-related-list li {
    padding: .45em 0;
    border-bottom: 1px solid var(--stm-blog-rule);
}

.stm-blog-widget-more {
    margin: 1em 0 0;
    font-size: .92em;
}

.stm-blog-widget-more a {
    color: inherit;
    font-weight: 600;
}

/* ---------- Comments ---------- */

.stm-blog-comments {
    --stm-blog-rule: rgba(0, 0, 0, .14);
    --stm-blog-muted: #5c5c5c;
    max-width: var(--stm-blog-measure, 44em);
    margin: 3em auto 0;
    padding-top: 2em;
    border-top: 1px solid var(--stm-blog-rule);
    font-size: max(1em, 16px);
    line-height: 1.6;
}

@supports (color: color-mix(in srgb, red 50%, blue)) {
    .stm-blog-comments {
        --stm-blog-rule: color-mix(in srgb, currentColor 15%, transparent);
        --stm-blog-muted: color-mix(in srgb, currentColor 72%, transparent);
    }
}

.stm-blog-comments-title {
    margin: 0 0 1.25em;
    font-size: 1.35em;
    font-weight: 600;
    line-height: 1.25;
}

.stm-blog-comment-list,
.stm-blog-comment-list ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

.stm-blog-comment {
    margin: 0;
    padding: 1.1em 0;
    border-top: 1px solid var(--stm-blog-rule);
}

.stm-blog-comment-answers {
    margin: 0;
    padding: 0 0 0 1.5em;
    border-left: 2px solid var(--stm-blog-rule);
}

.stm-blog-comment-answers .stm-blog-comment:first-child {
    border-top: 0;
}

.stm-blog-comment-head {
    display: flex;
    flex-wrap: wrap;
    gap: .25em .75em;
    align-items: baseline;
    margin-bottom: .35em;
}

.stm-blog-comment-author {
    font-weight: 600;
}

.stm-blog-comment-badge {
    font-size: .72em;
    font-weight: 600;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.stm-blog-comment-head time {
    color: var(--stm-blog-muted);
    font-size: .84em;
}

.stm-blog-comment-text p {
    margin: 0 0 .6em;
}

.stm-blog-comment-reply,
.stm-blog-comment-cancel {
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
    color: inherit;
    font: inherit;
    font-size: .88em;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: .18em;
    cursor: pointer;
}

.stm-blog-comment-reply:hover,
.stm-blog-comment-cancel:hover {
    background: none;
    border: 0;
    color: inherit;
}

.stm-blog-comment-form {
    margin: 1.5em 0 0;
    padding-top: 1.5em;
    border-top: 1px solid var(--stm-blog-rule);
}

.stm-blog-comment .stm-blog-comment-form {
    margin-top: 1em;
}

.stm-blog-comment-replying {
    margin: 0 0 1em;
    font-size: .92em;
}

.stm-blog-comment-replying span {
    margin-right: .75em;
}

.stm-blog-comment-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14em, 1fr));
    gap: 0 1.25em;
}

.stm-blog-field {
    margin: 0 0 1em;
}

.stm-blog-field label {
    display: block;
    margin-bottom: .3em;
    font-size: .9em;
    font-weight: 600;
}

.stm-blog-field input,
.stm-blog-field textarea {
    box-sizing: border-box;
    width: 100%;
    height: auto;
    padding: .55em .7em;
    border: 1px solid var(--stm-blog-muted);
    border-radius: 2px;
    background: transparent;
    color: inherit;
    font: inherit;
    line-height: 1.45;
}

.stm-blog-field small,
.stm-blog-comment-submit small {
    display: block;
    margin-top: .3em;
    color: var(--stm-blog-muted);
    font-size: .84em;
}

.stm-blog-check {
    display: flex;
    gap: .6em;
    align-items: flex-start;
    margin: 0 0 .8em;
    font-size: .92em;
    line-height: 1.45;
}

.stm-blog-check input {
    flex: none;
    margin-top: .2em;
}

.stm-blog-comment-submit {
    margin: 1.25em 0 0;
}

.stm-blog-comment-trap {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.stm-blog-comments-external p {
    margin: 0 0 1em;
    color: var(--stm-blog-muted);
    font-size: .92em;
}

/* ---------- New posts by e-mail ---------- */

.stm-blog-subscribe {
    --stm-blog-rule: rgba(0, 0, 0, .14);
    --stm-blog-muted: #5c5c5c;
    line-height: 1.5;
}

@supports (color: color-mix(in srgb, red 50%, blue)) {
    .stm-blog-subscribe {
        --stm-blog-rule: color-mix(in srgb, currentColor 15%, transparent);
        --stm-blog-muted: color-mix(in srgb, currentColor 72%, transparent);
    }
}

.stm-blog-subscribe--main {
    max-width: var(--stm-blog-measure, 44em);
    margin: 3em auto 0;
    padding: 1.5em 0;
    border-top: 1px solid var(--stm-blog-rule);
    border-bottom: 1px solid var(--stm-blog-rule);
}

.stm-blog-subscribe--side {
    margin: 0 0 2.2em;
    font-size: max(.95em, 15px);
}

.stm-blog-subscribe .stm-blog-label {
    margin: 0 0 .6em;
    color: var(--stm-blog-muted);
    font-size: .76em;
    font-weight: 600;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.stm-blog-subscribe-text {
    margin: 0 0 .9em;
}

.stm-blog-subscribe-row {
    display: flex;
    flex-wrap: wrap;
    gap: .5em;
    margin: 0 0 .8em;
}

.stm-blog-subscribe-row input[type="email"] {
    flex: 1 1 12em;
    min-width: 0;
    height: auto;
    padding: .5em .7em;
    border: 1px solid var(--stm-blog-muted);
    border-radius: 2px;
    background: transparent;
    color: inherit;
    font: inherit;
    line-height: 1.4;
}

.stm-blog-subscribe-row button,
.stm-blog-button {
    padding: .5em .95em;
    border: 1px solid currentColor;
    border-radius: 2px;
    background: transparent;
    box-shadow: none;
    color: inherit;
    font: inherit;
    font-weight: 600;
    line-height: 1.4;
    cursor: pointer;
}

.stm-blog-subscribe-row button:hover,
.stm-blog-button:hover {
    background: var(--stm-blog-rule);
    border-color: currentColor;
    color: inherit;
}

.stm-blog-subscribe .stm-blog-check {
    display: flex;
    gap: .6em;
    align-items: flex-start;
    margin: 0;
    font-size: .86em;
    line-height: 1.45;
}

.stm-blog-subscribe .stm-blog-check input {
    flex: none;
    margin-top: .2em;
}

.stm-blog-subscribe .stm-blog-comment-trap {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ---------- Share ---------- */

.stm-blog-share {
    margin: 2.5em 0 0;
    padding-top: 1.5em;
    border-top: 1px solid var(--stm-blog-rule);
}

.stm-blog-share ul {
    display: flex;
    flex-wrap: wrap;
    gap: .35em 1.25em;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: .92em;
}

.stm-blog-share li {
    margin: 0;
}

.stm-blog-share a,
.stm-blog-share-copy {
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
    color: inherit;
    font: inherit;
    text-decoration: underline;
    text-decoration-color: var(--stm-blog-rule);
    text-decoration-thickness: 1px;
    text-underline-offset: .22em;
    cursor: pointer;
}

.stm-blog-share a:hover,
.stm-blog-share-copy:hover {
    background: none;
    border: 0;
    color: inherit;
    text-decoration-color: currentColor;
}

/* ---------- Tags ---------- */

.stm-blog-taglist {
    display: flex;
    flex-wrap: wrap;
    gap: .3em 1.1em;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: .92em;
}

.stm-blog-taglist li {
    margin: 0;
}

.stm-blog-taglist a {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: var(--stm-blog-rule);
    text-decoration-thickness: 1px;
    text-underline-offset: .22em;
}

.stm-blog-taglist a:hover,
.stm-blog-taglist a[aria-current] {
    text-decoration-color: currentColor;
}

/* ---------- Author profile ---------- */

.stm-blog-profile {
    display: flex;
    gap: 1.25em;
    align-items: flex-start;
    max-width: 44em;
}

.stm-blog-profile + .stm-blog-profile {
    margin-top: 1.5em;
}

.stm-blog-profile-image {
    flex: none;
    width: 4.5em;
    height: 4.5em;
    object-fit: cover;
    border-radius: 2px;
    background: var(--stm-blog-rule);
}

.stm-blog-head .stm-blog-profile-image {
    width: 6em;
    height: 6em;
}

.stm-blog-profile-name {
    margin: 0;
    font-size: 1.05em;
    font-weight: 600;
    line-height: 1.3;
}

.stm-blog-profile-name a {
    color: inherit;
    text-decoration: none;
}

.stm-blog-profile-name a:hover {
    text-decoration: underline;
    text-underline-offset: .18em;
}

.stm-blog-profile-role {
    margin: .1em 0 0;
    color: var(--stm-blog-muted);
    font-size: .88em;
}

.stm-blog-profile-bio {
    margin: .5em 0 0;
    font-size: .95em;
}

.stm-blog-profile-links {
    display: flex;
    flex-wrap: wrap;
    gap: .2em 1.1em;
    margin: .7em 0 0;
    padding: 0;
    list-style: none;
    font-size: .88em;
}

.stm-blog-profile-links li {
    margin: 0;
}

/* ---------- Search ---------- */

.stm-blog-searchform {
    display: flex;
    flex-wrap: wrap;
    gap: .5em;
    max-width: 30em;
    margin: 0 0 1em;
}

.stm-blog-searchform .stm-blog-label {
    flex: 0 0 100%;
    margin-bottom: .2em;
}

.stm-blog-searchform input[type="search"] {
    flex: 1 1 8em;
    min-width: 0;
    height: auto;
    padding: .5em .7em;
    border: 1px solid var(--stm-blog-muted);
    border-radius: 2px;
    background: transparent;
    color: inherit;
    font: inherit;
    line-height: 1.4;
}

.stm-blog-searchform button {
    padding: .5em .95em;
    border: 1px solid currentColor;
    border-radius: 2px;
    background: transparent;
    box-shadow: none;
    color: inherit;
    font: inherit;
    font-weight: 600;
    line-height: 1.4;
    cursor: pointer;
}

.stm-blog-searchform button:hover {
    background: var(--stm-blog-rule);
    border-color: currentColor;
    color: inherit;
}

/* ---------- Sidebar ---------- */

.stm-blog-side {
    font-size: max(.95em, 15px);
}

.stm-blog-side .stm-blog-searchform,
.stm-blog-side-block {
    margin: 0 0 2.2em;
}

.stm-blog-side-block > .stm-blog-label {
    margin-bottom: .5em;
    padding-bottom: .6em;
    border-bottom: 1px solid var(--stm-blog-rule);
}

.stm-blog-side-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.stm-blog-side-list li {
    display: flex;
    gap: 1em;
    align-items: baseline;
    justify-content: space-between;
    margin: 0;
    padding: .32em 0;
    line-height: 1.4;
}

.stm-blog-side-list a {
    color: inherit;
    text-decoration: none;
}

.stm-blog-side-list a:hover {
    text-decoration: underline;
    text-underline-offset: .18em;
}

.stm-blog-side-list a[aria-current] {
    font-weight: 700;
}

.stm-blog-side-list--posts li {
    padding: .5em 0;
}

/* with the list in front: ".stm-blog-side-list li" sets the padding as well */
.stm-blog-side-list .stm-blog-side-level-1 { padding-left: 1em; }
.stm-blog-side-list .stm-blog-side-level-2 { padding-left: 2em; }
.stm-blog-side-list .stm-blog-side-level-3 { padding-left: 3em; }

.stm-blog-side-count {
    color: var(--stm-blog-muted);
    font-size: .86em;
    font-variant-numeric: tabular-nums;
}

.stm-blog-side-feed {
    margin: 0;
    font-size: .92em;
}

.stm-blog-side-feed a {
    color: inherit;
}

/* ---------- Posts in the shop search ---------- */

.stm-blog-search-more {
    margin: 1.2em 0 0;
}

.stm-blog-search-more a {
    font-weight: 600;
}

/* ---------- Small screens ---------- */

/* Below the two-column width the posts come before the sidebar. Hyvä writes the sidebar first into the page
   and moves it to the side only from 768 px on, so on a phone the reader would scroll past search, categories
   and recent posts before the first post. */
@media (max-width: 767.98px) {
    .stm-blog-page .columns > .column.main {
        order: -1;
    }
}

@media (max-width: 639px) {
    .stm-blog-item article {
        flex-direction: column;
        gap: 1em;
    }

    .stm-blog-item-media {
        flex: none;
        width: 100%;
    }

    .stm-blog-item-body {
        flex: none;
        width: 100%;
    }

    .stm-blog--magazine .stm-blog-list,
    .stm-blog--grid .stm-blog-list {
        grid-template-columns: minmax(0, 1fr);
    }

    .stm-blog--minimal .stm-blog-item article {
        grid-template-columns: minmax(0, 1fr);
    }

    .stm-blog--minimal .stm-blog-item-category {
        display: none;
    }

    .stm-blog--timeline .stm-blog-item article {
        grid-template-columns: 2.2em minmax(0, 1fr);
    }

    .stm-blog--timeline .stm-blog-item-category {
        display: none;
    }

    .stm-blog-item-title {
        font-size: 1.28em;
    }

    .stm-blog-neighbours {
        grid-template-columns: minmax(0, 1fr);
    }

    .stm-blog-related-list,
    .stm-blog-products-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.25em 1em;
    }

    .stm-blog-related-title,
    .stm-blog-product-name {
        font-size: .94em;
    }

    .stm-blog-neighbour--newer {
        text-align: left;
    }

    .stm-blog-side {
        margin-top: 2.5em;
        padding-top: 2em;
        border-top: 1px solid var(--stm-blog-rule);
    }
}

@media (min-width: 640px) and (max-width: 1023px) {
    .stm-blog--grid .stm-blog-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media print {
    .stm-blog-side,
    .stm-blog-pager,
    .stm-blog-searchform,
    .stm-blog-back,
    .stm-blog-progress,
    .stm-blog-neighbours {
        display: none;
    }
}
