/*
 * New Perspectives Blog storefront styles.
 *
 * Sizes are in px: the MRSMART theme (Luma based) sets the root font size to
 * 62.5 %, so 1rem is 10px there. Colours and fonts follow the theme variables
 * and fall back to the MRSMART palette when a variable is missing.
 *
 * Palette (owner's choice 2026-10-27): neutral grey surfaces in the tone of
 * the shop's category icon circles (#f2f2f2) and the icons' slate blue
 * (#396177) for links, tags and accents.
 */
.np-blog {
    --np-accent: #396177;
    --np-accent-strong: #2c4d5f;
    --np-accent-soft: #eef1f3;
    --np-ink: var(--heading__color__base, #111);
    --np-text: #3a3f45;
    --np-muted: #6b7280;
    --np-line: #e6e8eb;
    --np-surface: #f2f2f2;
    --np-radius: 12px;
    --np-radius-small: 8px;
    --np-shadow: 0 1px 2px rgba(17, 24, 39, .04), 0 10px 28px rgba(17, 24, 39, .07);
    --np-font: var(--font-family-name__base, Jost, sans-serif);
    --np-heading-font: var(--heading__font-family__base, var(--np-font));
    color: var(--np-text);
    font-family: var(--np-font);
    font-size: 16px;
    line-height: 1.6;
}

.np-blog *,
.np-blog *::before,
.np-blog *::after {
    box-sizing: border-box;
}

.np-blog a {
    color: inherit;
}

.np-blog img {
    height: auto;
    max-width: 100%;
}

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

.np-section-title {
    color: var(--np-ink);
    font-family: var(--np-heading-font);
    font-size: clamp(22px, 2.4vw, 28px);
    font-weight: 500;
    letter-spacing: -.01em;
    line-height: 1.25;
    margin: 0 0 18px;
}

.np-button {
    align-items: center;
    background: var(--np-accent);
    border: 1px solid var(--np-accent);
    border-radius: var(--button__border-radius, 5px);
    color: #fff !important;
    display: inline-flex;
    font-size: 15px;
    font-weight: 500;
    gap: 8px;
    justify-content: center;
    line-height: 1.2;
    min-height: 44px;
    padding: 10px 22px;
    text-decoration: none !important;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.np-button:hover,
.np-button:focus-visible {
    background: var(--np-accent-strong);
    border-color: var(--np-accent-strong);
}

.np-button--ghost {
    background: #fff;
    border-color: var(--np-ink);
    color: var(--np-ink) !important;
}

.np-button--ghost:hover,
.np-button--ghost:focus-visible {
    background: var(--np-ink);
    color: #fff !important;
}

.np-blog a:focus-visible,
.np-blog button:focus-visible,
.np-blog input:focus-visible,
.np-blog summary:focus-visible {
    outline: 2px solid var(--np-accent);
    outline-offset: 2px;
}

/* Chips and tags ---------------------------------------------------------- */

.np-chips {
    margin: 0 0 24px;
}

.np-chips__list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.np-chip {
    align-items: center;
    background: #fff;
    border: 1px solid var(--np-line);
    border-radius: 999px;
    color: var(--np-ink) !important;
    display: inline-flex;
    font-size: 14px;
    font-weight: 500;
    gap: 7px;
    line-height: 1.2;
    min-height: 38px;
    padding: 7px 14px;
    text-decoration: none !important;
    transition: border-color .2s ease, background-color .2s ease;
    white-space: nowrap;
}

.np-chip:hover {
    border-color: var(--np-ink);
}

.np-chip.is-active {
    background: var(--np-ink);
    border-color: var(--np-ink);
    color: #fff !important;
}

.np-chip__count {
    background: var(--np-surface);
    border-radius: 999px;
    color: var(--np-muted);
    font-size: 12px;
    font-weight: 500;
    min-width: 22px;
    padding: 2px 7px;
    text-align: center;
}

.np-chip.is-active .np-chip__count {
    background: rgba(255, 255, 255, .18);
    color: #fff;
}

.np-tag {
    align-items: center;
    background: var(--np-accent-soft);
    border-radius: 6px;
    color: var(--np-accent-strong) !important;
    display: inline-flex;
    font-size: 13px;
    font-weight: 500;
    gap: 6px;
    line-height: 1.3;
    padding: 4px 10px;
    text-decoration: none !important;
    transition: background-color .2s ease, color .2s ease;
}

.np-tag::before {
    content: '#';
    opacity: .6;
}

.np-tag:hover,
.np-tag.is-active {
    background: var(--np-accent);
    color: #fff !important;
}

.np-tag__count {
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

/* Listing hero and search ------------------------------------------------- */

.np-blog-hero {
    background: var(--np-surface);
    border: 1px solid var(--np-surface);
    border-radius: 18px;
    margin: 0 0 20px;
    padding: clamp(24px, 4vw, 44px) clamp(24px, 4vw, 48px);
}

.np-blog-hero__text {
    max-width: 820px;
}

.np-blog-hero__eyebrow,
.np-post-hero__eyebrow,
.np-product-guides__eyebrow {
    color: var(--np-accent);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .08em;
    margin: 0 0 10px;
    text-transform: uppercase;
}

.np-blog-hero__title {
    color: var(--np-ink);
    font-family: var(--np-heading-font);
    font-size: clamp(30px, 4.2vw, 46px);
    font-weight: 500;
    letter-spacing: -.02em;
    line-height: 1.12;
    margin: 0 0 14px;
}

.np-blog-hero__intro {
    color: var(--np-text);
    font-size: 18px;
    line-height: 1.6;
    max-width: 640px;
}

.np-blog-hero__intro p {
    margin: 0;
}

.np-blog-hero__count {
    color: var(--np-muted);
    font-size: 14px;
    margin: 12px 0 0;
}

/* Toolbar: the search on its own line under the hero, topic chips below it, on every screen. */
.np-blog-toolbar {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 0 0 18px;
}

.np-blog-toolbar .np-chips,
.np-blog-toolbar .np-tag-strip {
    margin: 0;
}

.np-blog-search {
    margin: 0;
}

.np-blog-toolbar .np-blog-search__control {
    padding: 5px 5px 5px 18px;
}

/* 16px also keeps phones from zooming into the field. */
.np-blog-toolbar .np-blog-search input[type="search"] {
    font-size: 16px;
    height: 40px;
}

.np-blog-toolbar .np-blog-search__button {
    min-height: 40px;
    padding: 0 22px;
}

.np-blog-search__control {
    align-items: center;
    background: #fff;
    border: 1px solid var(--np-line);
    border-radius: 999px;
    display: flex;
    gap: 6px;
    padding: 4px 4px 4px 14px;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.np-blog-search__control:hover {
    border-color: #d4d8db;
}

.np-blog-search__control:focus-within {
    border-color: var(--np-accent);
    box-shadow: 0 0 0 3px rgba(57, 97, 119, .18);
}

.np-blog-search__icon {
    color: var(--np-muted);
    flex: 0 0 auto;
}

.np-blog-search input[type="search"] {
    background: transparent;
    border: 0;
    box-shadow: none;
    color: var(--np-ink);
    flex: 1;
    font-family: var(--np-font);
    font-size: 15px;
    height: 34px;
    min-width: 0;
    outline: none;
    padding: 0 4px;
}

.np-blog-search__button {
    background: var(--np-ink);
    border: 0;
    border-radius: 999px;
    color: #fff;
    cursor: pointer;
    font-family: var(--np-font);
    font-size: 14px;
    font-weight: 500;
    min-height: 34px;
    padding: 0 16px;
}

.np-blog-search__button:hover {
    background: var(--np-accent);
}

.np-quick-tags {
    margin: -4px 0 28px;
}

.np-tag-strip {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 28px;
}

.np-tag-strip__label {
    color: var(--np-muted);
    font-size: 14px;
    margin-right: 4px;
}

/* Cards ------------------------------------------------------------------- */

.np-blog-grid {
    display: grid;
    gap: 28px 24px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.np-card {
    background: #fff;
    border: 1px solid var(--np-line);
    border-radius: var(--np-radius);
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    position: relative;
    transition: box-shadow .25s ease, transform .25s ease, border-color .25s ease;
}

.np-card:hover {
    border-color: #d5dade;
    box-shadow: var(--np-shadow);
    transform: translateY(-2px);
}

.np-card__media {
    aspect-ratio: 16 / 9;
    background: var(--np-surface);
    display: block;
    overflow: hidden;
}

.np-card__media img {
    display: block;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
    width: 100%;
}

.np-card:hover .np-card__media img {
    transform: scale(1.03);
}

.np-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 10px;
    padding: 20px 22px 22px;
}

.np-card__eyebrow {
    color: var(--np-accent) !important;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .07em;
    position: relative;
    text-decoration: none !important;
    text-transform: uppercase;
    z-index: 2;
}

.np-card__title {
    color: var(--np-ink);
    font-family: var(--np-heading-font);
    font-size: 20px;
    font-weight: 500;
    letter-spacing: -.01em;
    line-height: 1.3;
    margin: 0;
}

.np-card__title a {
    color: inherit !important;
    text-decoration: none !important;
}

/* The title link covers the whole card; inner links stay clickable above it. */
.np-card__title a::after {
    content: '';
    inset: 0;
    position: absolute;
    z-index: 1;
}

.np-card__excerpt {
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    color: var(--np-text);
    display: -webkit-box;
    font-size: 15px;
    line-height: 1.55;
    margin: 0;
    overflow: hidden;
}

.np-card__meta {
    color: var(--np-muted);
    display: flex;
    flex-wrap: wrap;
    font-size: 13px;
    gap: 4px 14px;
    margin: auto 0 0;
    padding-top: 4px;
}

.np-card__meta > * + *::before {
    background: currentColor;
    border-radius: 50%;
    content: '';
    display: inline-block;
    height: 4px;
    margin: 0 10px 3px -4px;
    opacity: .5;
    width: 4px;
}

.np-row .np-card__tags,
.np-product-guides .np-card__tags {
    display: none;
}

.np-card__tags .np-tag {
    font-size: 12px;
    padding: 3px 8px;
}

.np-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
    z-index: 2;
}

.np-card--lead .np-card__body {
    padding: 26px 28px 28px;
}

.np-card--lead .np-card__title {
    font-size: clamp(22px, 2.6vw, 30px);
    line-height: 1.22;
}

.np-card--lead .np-card__excerpt {
    -webkit-line-clamp: 4;
    font-size: 16px;
}

.np-card--row {
    display: grid;
    grid-template-columns: minmax(150px, 38%) 1fr;
}

.np-card--row .np-card__media {
    aspect-ratio: auto;
    height: 100%;
    min-height: 150px;
}

.np-card--row .np-card__body {
    gap: 8px;
    padding: 18px 20px;
}

.np-card--row .np-card__title {
    font-size: 18px;
}

.np-card--row .np-card__excerpt {
    -webkit-line-clamp: 2;
    font-size: 14px;
}

.np-card--compact .np-card__title {
    font-size: 17px;
}

/* Landing sections -------------------------------------------------------- */

.np-blog-featured,
.np-blog-hubs,
.np-blog-latest,
.np-blog-tags {
    margin: 0 0 56px;
}

.np-blog-featured__grid {
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
}

.np-blog-featured__side {
    display: grid;
    gap: 24px;
    grid-template-rows: 1fr 1fr;
}

/* Up to five featured guides (0.6.1): the lead card is as tall as the side column, so on desktop its picture takes the
   height left over by the text instead of an empty area under it. Never below 16:9; phones and tablets unchanged. */
@media (min-width: 1024px) {
    .np-blog-featured:not(.np-blog-featured--single) .np-card--lead .np-card__media {
        flex: 1 0 auto;
        min-height: 0;
    }

    .np-blog-featured:not(.np-blog-featured--single) .np-card--lead .np-card__body {
        flex: 0 0 auto;
    }
}

.np-blog-hubs__grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    list-style: none;
    margin: 0;
    padding: 0;
}

.np-hub__link {
    background: #fff;
    border: 1px solid var(--np-line);
    border-radius: var(--np-radius);
    display: flex;
    flex-direction: column;
    gap: 6px;
    height: 100%;
    padding: 20px 22px;
    position: relative;
    text-decoration: none !important;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.np-hub__link::after {
    color: var(--np-accent);
    content: '→';
    font-size: 20px;
    position: absolute;
    right: 20px;
    top: 16px;
    transition: transform .2s ease;
}

.np-hub__link:hover {
    border-color: var(--np-accent);
    box-shadow: var(--np-shadow);
}

.np-hub__link:hover::after {
    transform: translateX(3px);
}

.np-hub__title {
    color: var(--np-ink);
    font-size: 18px;
    font-weight: 500;
    padding-right: 28px;
}

.np-hub__text {
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    color: var(--np-text);
    display: -webkit-box;
    font-size: 14px;
    line-height: 1.5;
    overflow: hidden;
}

.np-hub__count {
    color: var(--np-muted);
    font-size: 13px;
    margin-top: auto;
    padding-top: 4px;
}

.np-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.np-tag-cloud .np-tag {
    font-size: 14px;
    padding: 7px 12px;
}

.np-blog-empty {
    background: var(--np-surface);
    border-radius: var(--np-radius);
    padding: 32px;
    text-align: center;
}

.np-blog .pages {
    margin-top: 36px;
}

/* The theme sets the page buttons in one row that never wraps (40 px circles, 10 px apart); a page 2 has eight of them,
   424 px, wider than a phone. Narrower buttons keep eight in one row at 390 px; more of them wrap instead. */
.np-blog .pages .items {
    flex-wrap: wrap;
    max-width: 100%;
    row-gap: 8px;
    white-space: normal;
}

@media (max-width: 767px) {
    .np-blog .pages .items .item {
        margin-right: 6px;
    }

    .np-blog .pages .items .item a,
    .np-blog .pages .items .item strong {
        height: 36px;
        width: 36px;
    }

    .np-blog .pages .action.previous {
        margin-right: 6px;
    }

    .np-blog .pages .action.next {
        margin-left: 6px;
    }
}

/* Article ----------------------------------------------------------------- */

.np-post {
    margin: 0 auto;
    max-width: 1200px;
}

/* One grid holds the title, the picture, the table of contents and the text (view.phtml). On computers the title and
   a picture as wide as the text sit in the reading column and the contents stand beside them from the first screen,
   aligned with the page edge like the breadcrumbs and the product lists below; the contents stay in view while reading.
   On phones and tablets the order is title, picture, folded contents, text. */
.np-post-layout {
    column-gap: 40px;
    display: grid;
    grid-template-areas: "hero" "body";
    grid-template-columns: minmax(0, 760px);
    justify-content: center;
}

.np-post--with-toc .np-post-layout {
    grid-template-areas: "aside hero" "aside body";
    grid-template-columns: 280px minmax(0, 760px);
    grid-template-rows: auto 1fr;
    justify-content: space-between;
}

.np-post-hero {
    grid-area: hero;
    margin: 0 0 40px;
    min-width: 0;
}

.np-post-hero__text {
    margin: 0 0 24px;
    text-align: left;
}

.np-post-hero__eyebrow a {
    text-decoration: none !important;
}

.np-post-hero__title {
    color: var(--np-ink);
    font-family: var(--np-heading-font);
    font-size: clamp(30px, 3.6vw, 44px);
    font-weight: 500;
    letter-spacing: -.02em;
    line-height: 1.14;
    margin: 0 0 16px;
}

.np-post-hero__lead {
    color: var(--np-text);
    font-size: 19px;
    line-height: 1.6;
    margin: 0 0 16px;
}

.np-post-meta {
    color: var(--np-muted);
    display: flex;
    flex-wrap: wrap;
    font-size: 14px;
    gap: 6px 18px;
    justify-content: flex-start;
    margin: 0;
}

.np-post-meta > span + span::before {
    background: currentColor;
    border-radius: 50%;
    content: '';
    display: inline-block;
    height: 4px;
    margin: 0 12px 3px -6px;
    opacity: .45;
    width: 4px;
}

.np-post-hero__media {
    border-radius: 16px;
    margin: 0;
    overflow: hidden;
}

.np-post-hero__media img {
    aspect-ratio: 2 / 1;
    display: block;
    object-fit: cover;
    width: 100%;
}

.np-post-body {
    grid-area: body;
    min-width: 0;
}

.np-post-aside {
    grid-area: aside;
    min-width: 0;
}

/* A long table of contents scrolls on its own instead of running under the bottom of the screen. */
.np-toc {
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    overscroll-behavior: contain;
    position: sticky;
    scrollbar-width: thin;
    top: 96px;
}

.np-toc__details {
    border-left: 2px solid var(--np-line);
    padding-left: 18px;
}

.np-toc__summary {
    color: var(--np-ink);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .06em;
    list-style: none;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.np-toc__summary::-webkit-details-marker {
    display: none;
}

.np-toc__list {
    counter-reset: nptoc;
    list-style: none;
    margin: 0;
    padding: 0;
}

.np-toc__list li {
    margin: 0;
}

.np-toc__list a {
    color: var(--np-text) !important;
    display: block;
    font-size: 14px;
    line-height: 1.45;
    padding: 6px 0;
    position: relative;
    text-decoration: none !important;
    transition: color .15s ease;
}

.np-toc__list a:hover {
    color: var(--np-accent) !important;
}

/* The section being read (js/toc-spy.js): accent colour and a mark on the contents line, no change of weight, so no
   line of the list wraps differently. */
.np-toc__list a[aria-current="true"] {
    color: var(--np-accent) !important;
}

.np-toc__list a[aria-current="true"]::before {
    background: var(--np-accent);
    border-radius: 2px;
    bottom: 5px;
    content: '';
    left: -20px;
    position: absolute;
    top: 5px;
    width: 2px;
}

.np-post-content h2[id] {
    scroll-margin-top: 100px;
}

.np-post-tags {
    align-items: center;
    border-top: 1px solid var(--np-line);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 40px 0 0;
    padding-top: 24px;
}

.np-post-tags__label {
    color: var(--np-ink);
    font-size: 14px;
    font-weight: 600;
}

.np-post-tags__list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.np-post-back {
    margin: 28px 0 0;
}

.np-post-section {
    border-top: 1px solid var(--np-line);
    margin: 56px 0 0;
    padding-top: 40px;
}

.np-post-section__intro {
    color: var(--np-muted);
    margin: -8px 0 24px;
}

/* Article body typography (authored content) ------------------------------ */

.np-post-content {
    color: var(--np-text);
    font-size: 17px;
    line-height: 1.75;
}

.np-post-content > :first-child,
.np-article > :first-child {
    margin-top: 0;
}

.np-article .np-lead {
    color: var(--np-ink);
    font-size: 20px;
    line-height: 1.6;
}

.np-article h2 {
    color: var(--np-ink);
    font-family: var(--np-heading-font);
    font-size: clamp(24px, 2.6vw, 30px);
    font-weight: 500;
    letter-spacing: -.01em;
    line-height: 1.25;
    margin: 2.2em 0 .6em;
}

.np-article h3 {
    color: var(--np-ink);
    font-family: var(--np-heading-font);
    font-size: 21px;
    font-weight: 500;
    line-height: 1.3;
    margin: 1.8em 0 .5em;
}

.np-article p,
.np-article ul,
.np-article ol {
    margin: 0 0 1.2em;
}

.np-article ul,
.np-article ol {
    padding-left: 1.35em;
}

.np-article li + li {
    margin-top: .4em;
}

.np-article a {
    color: var(--np-accent-strong);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.np-article a:hover {
    color: var(--np-accent);
}

.np-article img {
    border-radius: var(--np-radius-small);
}

.np-article figure {
    margin: 2rem 0;
}

.np-article figcaption {
    color: #4b5563;
    font-size: 14px;
    margin-top: 8px;
}

.np-article .np-product-figure {
    background: var(--np-surface);
    border-radius: var(--np-radius);
    padding: 16px;
    text-align: center;
}

.np-article .np-product-figure img {
    max-height: 420px;
    object-fit: contain;
    width: auto;
}

.np-article .np-figure--diagram img {
    height: auto;
    max-height: none;
    max-width: 100%;
}

.np-article .np-figure__zoom {
    border-radius: 8px;
    cursor: zoom-in;
    display: inline-block;
    max-width: 100%;
}

.np-article .np-figure__zoom:focus-visible {
    outline: 3px solid var(--np-accent, #396177);
    outline-offset: 3px;
}

/* In-page image viewer (js/image-lightbox.js) ----------------------------- */

.np-article .np-lightbox-trigger {
    cursor: zoom-in;
}

.np-article img.np-lightbox-trigger:focus-visible {
    outline: 3px solid var(--np-accent, #396177);
    outline-offset: 3px;
}

html.np-lightbox-open,
html.np-lightbox-open body {
    overflow: hidden;
}

.np-lightbox {
    background: #11181c;
    border: 0;
    color: #fff;
    display: none;
    height: 100%;
    inset: 0;
    margin: 0;
    max-height: none;
    max-width: none;
    padding: 0;
    position: fixed;
    width: 100%;
}

.np-lightbox[open] {
    display: flex;
    flex-direction: column;
}

.np-lightbox::backdrop {
    background: rgba(17, 24, 28, .9);
}

.np-lightbox__bar {
    display: flex;
    flex: 0 0 auto;
    gap: 10px;
    justify-content: flex-end;
    padding: max(10px, env(safe-area-inset-top)) 12px 10px;
}

.np-lightbox__bar button {
    align-items: center;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 999px;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    gap: 8px;
    min-height: 44px;
    padding: 8px 16px;
}

.np-lightbox__bar button:hover,
.np-lightbox__bar button:focus-visible {
    background: rgba(255, 255, 255, .22);
}

.np-lightbox__bar button:focus-visible {
    outline: 3px solid #9cc7dc;
    outline-offset: 2px;
}

.np-lightbox__close {
    background: #fff !important;
    color: #11181c !important;
}

.np-lightbox__stage {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
    padding: 8px 12px;
    -webkit-overflow-scrolling: touch;
}

.np-lightbox__image {
    background: #fff;
    border-radius: 6px;
    cursor: zoom-in;
    height: auto;
    margin: auto;
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.np-lightbox.is-zoomed .np-lightbox__image {
    cursor: zoom-out;
    flex: 0 0 auto;
}

.np-lightbox__caption {
    color: #d7dee2;
    flex: 0 0 auto;
    font-size: 14px;
    line-height: 1.45;
    margin: 0;
    max-height: 30vh;
    overflow: auto;
    padding: 8px 16px max(14px, env(safe-area-inset-bottom));
}

@media (max-width: 480px) {
    .np-lightbox__bar button {
        font-size: 14px;
        padding: 8px 13px;
    }

    .np-lightbox__stage {
        padding: 4px;
    }
}

.np-article .np-callout {
    background: var(--np-accent-soft);
    border-left: 4px solid var(--np-accent);
    border-radius: 0 var(--np-radius) var(--np-radius) 0;
    margin: 1.8em 0;
    padding: 18px 22px;
}

/* Level boxes ("Nivå 1/2/3"): a small robot shows the reader's level (owner 2026-10-28). */
.np-article .np-callout--level {
    min-height: 76px;
    padding-left: 84px;
    position: relative;
}

.np-article .np-callout--level::before {
    background: no-repeat center / contain;
    content: "";
    height: 48px;
    left: 22px;
    position: absolute;
    top: 16px;
    width: 48px;
}

.np-article .np-callout--level-1::before {
    background-image: url("../images/levels/robot-niva-1.svg");
}

.np-article .np-callout--level-2::before {
    background-image: url("../images/levels/robot-niva-2.svg");
}

.np-article .np-callout--level-3::before {
    background-image: url("../images/levels/robot-niva-3.svg");
}

@media (max-width: 480px) {
    .np-article .np-callout--level {
        min-height: 64px;
        padding-left: 66px;
    }

    .np-article .np-callout--level::before {
        height: 38px;
        left: 16px;
        top: 14px;
        width: 38px;
    }
}

.np-article .np-callout--warning {
    background: #fff7eb;
    border-left-color: #e8891d;
}

/* Short editorial notes break long guides into useful, scannable checkpoints. */
.np-article .np-guide-note {
    align-items: start;
    background: #f7fafb;
    border: 1px solid #d9e4e8;
    border-radius: var(--np-radius);
    box-shadow: 0 8px 24px rgba(29, 49, 58, .05);
    display: grid;
    gap: 14px;
    grid-template-columns: 44px minmax(0, 1fr);
    margin: 1.8em 0;
    padding: 18px 20px;
}

.np-article .np-guide-note__icon {
    align-items: center;
    background: #dcecf2;
    border-radius: 50%;
    color: #17324d;
    display: flex;
    /* Older article bodies contain ?, i, a tick or an emoji here. Keep those
       aria-hidden fallback characters out of the layout; no icon font needed. */
    font-size: 0;
    height: 44px;
    justify-content: center;
    line-height: 1;
    width: 44px;
}

.np-article .np-guide-note__icon::before {
    background: url("../images/notes/sporsmal-robot-valg.svg") no-repeat center / contain;
    content: "";
    display: block;
    height: 32px;
    width: 32px;
}

/* Only the note title (first strong in the text column) is a block; bold
 * words inside the note's paragraphs stay inline. */
.np-article .np-guide-note > div > strong:first-child {
    color: var(--np-ink);
    display: block;
    font-size: 15px;
    margin: 1px 0 4px;
}

.np-article .np-guide-note p {
    margin: 0;
}

.np-article .np-guide-note--fact {
    background: #f5f2fb;
    border-color: #ddd3ef;
}

.np-article .np-guide-note--fact .np-guide-note__icon {
    background: #e8dff6;
    color: #543878;
}

.np-article .np-guide-note--fact .np-guide-note__icon::before {
    background-image: url("../images/notes/fakta-lyspaere-krets.svg");
}

.np-article .np-guide-note--tip {
    background: #f2f8f3;
    border-color: #cfe2d2;
}

.np-article .np-guide-note--tip .np-guide-note__icon {
    background: #d9ecdc;
    color: #245d32;
}

.np-article .np-guide-note--tip .np-guide-note__icon::before {
    background-image: url("../images/notes/tips-fastnokkel-gnist.svg");
}

.np-article .np-guide-note--check {
    background: #fff8ed;
    border-color: #ecd7b5;
}

.np-article .np-guide-note--check .np-guide-note__icon {
    background: #f6e3c3;
    color: #7b4a0e;
}

.np-article .np-guide-note--check .np-guide-note__icon::before {
    background-image: url("../images/notes/kontroll-sjekkliste-krets.svg");
}

.np-article .np-guide-note--question {
    background: #f1f7fb;
    border-color: #cbdfea;
}

.np-article .np-guide-note--question .np-guide-note__icon {
    background: #d9eaf4;
    color: #24557a;
}

@media (max-width: 480px) {
    .np-article .np-guide-note {
        gap: 11px;
        grid-template-columns: 36px minmax(0, 1fr);
        padding: 15px 16px;
    }

    .np-article .np-guide-note__icon {
        height: 36px;
        width: 36px;
    }

    .np-article .np-guide-note__icon::before {
        height: 28px;
        width: 28px;
    }
}

.np-article .np-quick-answer {
    background: #fff;
    border: 1px solid #e3e3e3;
    border-radius: var(--np-radius);
    box-shadow: 0 6px 20px rgba(0, 0, 0, .04);
    margin: 1.6em 0 2em;
    padding: 20px 24px;
    position: relative;
}

.np-article .np-quick-answer::before {
    background: var(--np-accent);
    border-radius: var(--np-radius) 0 0 var(--np-radius);
    bottom: 0;
    content: '';
    left: 0;
    position: absolute;
    top: 0;
    width: 4px;
}

.np-article .np-quick-answer strong {
    color: var(--np-ink);
    display: block;
    font-size: 13px;
    letter-spacing: .08em;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.np-table-wrap {
    border: 1px solid var(--np-line);
    border-radius: var(--np-radius);
    margin: 1.8em 0;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.np-post-content table {
    border-collapse: collapse;
    font-size: 15px;
    line-height: 1.5;
    margin: 0;
    width: 100%;
}

.np-post-content th,
.np-post-content td {
    border-bottom: 1px solid var(--np-line);
    padding: 12px 14px;
    text-align: left;
    vertical-align: top;
}

.np-post-content th {
    background: var(--np-surface);
    color: var(--np-ink);
    font-weight: 600;
}

.np-post-content tr:last-child td {
    border-bottom: 0;
}

.np-article .np-flow {
    align-items: center;
    background: var(--np-surface);
    border: 1px solid var(--np-line);
    border-radius: var(--np-radius);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin: 1.8em 0;
    padding: 22px;
}

.np-article .np-flow__node {
    background: #fff;
    border: 1px solid #cdd6db;
    border-radius: var(--np-radius-small);
    color: var(--np-ink);
    font-size: 15px;
    font-weight: 600;
    padding: 10px 14px;
    text-align: center;
}

.np-article .np-flow__arrow {
    color: var(--np-accent);
    font-size: 22px;
    font-weight: 700;
}

.np-article .np-code {
    background: #1f2b32;
    border-radius: var(--np-radius-small);
    color: #eef1f3;
    font: 14px/1.65 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    margin: 1.7em 0;
    overflow-x: auto;
    padding: 18px 20px;
    tab-size: 4;
}

.np-article .np-code code {
    background: transparent;
    color: inherit;
    font: inherit;
    padding: 0;
    white-space: pre;
}

/* A long address or path in running text must not widen the page on a phone. */
.np-article :not(pre) > code {
    overflow-wrap: anywhere;
}

/* Copy bar from code-copy.js; without JavaScript the code block is unchanged. */
.np-article .np-code-block {
    background: #1f2b32;
    border-radius: var(--np-radius-small);
    margin: 1.7em 0;
    overflow: hidden;
}

.np-article .np-code-block > .np-code {
    border-radius: 0;
    margin: 0;
}

.np-article .np-code-bar {
    align-items: center;
    background: #172126;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    color: #aab6bd;
    display: flex;
    font: 600 12px/1.2 var(--np-font);
    gap: 12px;
    justify-content: space-between;
    letter-spacing: .05em;
    padding: 6px 8px 6px 16px;
    text-transform: uppercase;
}

.np-article .np-code-copy {
    align-items: center;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 999px;
    box-shadow: none;
    color: #eef1f3;
    cursor: pointer;
    display: inline-flex;
    font: 600 13px/1 var(--np-font);
    gap: 6px;
    letter-spacing: 0;
    min-height: 32px;
    padding: 6px 12px;
    text-transform: none;
}

.np-article .np-code-copy:hover {
    background: rgba(255, 255, 255, .08);
    border-color: rgba(255, 255, 255, .42);
    color: #fff;
}

.np-article .np-code-copy:focus-visible {
    outline: 2px solid #9fc1d2;
    outline-offset: 2px;
}

.np-article .np-code-copy.is-copied {
    border-color: #7fc49b;
    color: #bfe8cd;
}

.np-article .np-code-copy.is-failed {
    border-color: #e3a29a;
    color: #f3c9c3;
}

/*
 * Folded long code (ContentEnhancer::foldLongCode, owner 2026-11-26): the first
 * --np-fold-lines lines show, the rest fades into the block colour behind a
 * "show all" button. The height limit needs the flag class the post template
 * sets before the article paints, so without JavaScript the code stays open.
 */
/* The theme's .page-wrapper has overflow: hidden, which turns it into a scroll box: a sticky element inside then
   sticks to the wrapper, never to the screen (the close button of an open fold), and a script can scroll the
   wrapper itself. clip cuts the same overflow without being a scroll box; the theme does the same on
   filtered listings (.page-with-filter .page-wrapper). The wrapper is a flex column, so nothing else changes. */
.np-blog-page--post .page-wrapper {
    overflow: clip;
}

.np-article .np-code-fold {
    --np-code-fold-bg: #1f2b32;
    overflow: visible;
    overflow: clip; /* rounds the corners without breaking the sticky close button */
}

.np-article .np-code-fold > .np-code-bar {
    min-height: 45px; /* room for the copy button that joins the bar, so nothing moves */
}

.np-article .np-code-bar__lines {
    color: inherit;
    font-weight: 500;
    letter-spacing: 0;
    margin-right: auto;
    opacity: .8;
    text-transform: none;
}

.np-article .np-code-fold__clip {
    font: 14px/1.65 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    position: relative;
}

.np-article .np-code-fold__clip > .np-code {
    border-radius: 0;
    margin: 0;
}

.np-article .np-code-fold__more {
    display: none;
}

.np-code-fold-js .np-article .np-code-fold[data-np-fold="closed"] .np-code-fold__clip {
    max-height: calc(var(--np-fold-lines, 12) * 1.65em + 18px);
    overflow: hidden;
}

.np-code-fold-js .np-article .np-code-fold[data-np-fold="closed"] .np-code-fold__clip::after {
    background: linear-gradient(to bottom, transparent, var(--np-code-fold-bg) 88%);
    bottom: 0;
    content: "";
    height: 112px;
    left: 0;
    pointer-events: none;
    position: absolute;
    right: 0;
}

.np-code-fold-js .np-article .np-code-fold__more {
    display: flex;
    justify-content: center;
    padding: 4px 16px 16px;
    position: relative;
    z-index: 1;
}

.np-code-fold-js .np-article .np-code-fold[data-np-fold="closed"] .np-code-fold__more {
    margin-top: -32px;
}

/* Open: the close button rides along the bottom of the screen until the code ends. */
.np-code-fold-js .np-article .np-code-fold[data-np-fold="open"] .np-code-fold__more {
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    padding-top: 12px;
    position: sticky;
    transition: bottom .22s ease;
}

/* Up to 1023 px the theme has a fixed bottom bar (footer .fixed-bottom, 56 px + safe area) that hides while the
   reader scrolls down (.np-mbar--hidden) and comes back on the way up: the close button then rides above it. */
@media (max-width: 1023px) {
    .np-code-fold-js body:has(footer .fixed-bottom:not(.np-mbar--hidden)) .np-article .np-code-fold[data-np-fold="open"] .np-code-fold__more {
        bottom: calc(68px + env(safe-area-inset-bottom, 0px));
    }
}

@media (prefers-reduced-motion: reduce) {
    .np-code-fold-js .np-article .np-code-fold[data-np-fold="open"] .np-code-fold__more {
        transition: none;
    }
}

.np-article .np-code-fold__toggle {
    align-items: center;
    background: #2b3a42;
    border: 1px solid rgba(255, 255, 255, .32);
    border-radius: 999px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .28);
    color: #eef1f3;
    cursor: pointer;
    display: inline-flex;
    font: 600 14px/1.2 var(--np-font);
    gap: 8px;
    min-height: 44px;
    padding: 10px 18px 10px 14px;
    text-transform: none;
}

.np-article .np-code-fold__toggle:hover {
    border-color: rgba(255, 255, 255, .6);
    color: #fff;
}

.np-article .np-code-fold__toggle:focus-visible {
    outline: 2px solid #9fc1d2;
    outline-offset: 2px;
}

.np-article .np-code-fold__icon {
    flex-shrink: 0;
    transition: transform .2s ease;
}

.np-article .np-code-fold[data-np-fold="open"] .np-code-fold__icon {
    transform: rotate(180deg);
}

.np-article .np-code-fold__count {
    font-weight: 500;
    opacity: .75;
}

.np-article .np-code-fold__count::before {
    content: "\00B7\00A0";
}

@media (prefers-reduced-motion: reduce) {
    .np-article .np-code-fold__icon {
        transition: none;
    }
}

@media print {
    .np-code-fold-js .np-article .np-code-fold .np-code-fold__clip {
        max-height: none;
        overflow: visible;
    }

    .np-code-fold-js .np-article .np-code-fold .np-code-fold__clip::after,
    .np-code-fold-js .np-article .np-code-fold__more {
        display: none;
    }
}

.np-article .np-steps {
    counter-reset: npstep;
    list-style: none;
    padding: 0;
}

.np-article .np-steps > li {
    padding: 0 0 1.1em 48px;
    position: relative;
}

.np-article .np-steps > li::before {
    background: var(--np-accent);
    border-radius: 50%;
    color: #fff;
    content: counter(npstep);
    counter-increment: npstep;
    display: grid;
    font-size: 15px;
    font-weight: 600;
    height: 32px;
    left: 0;
    place-items: center;
    position: absolute;
    top: -1px;
    width: 32px;
}

.np-article .np-product-box {
    background: #fff;
    border: 1px solid var(--np-line);
    border-radius: var(--np-radius);
    margin: 2em 0;
    padding: 22px;
}

.np-article .np-product-box h3 {
    margin-top: 0;
}

/* Resistor colour calculator (one article) */
.np-resistor-calculator { background: var(--np-surface); border: 1px solid var(--np-line); border-radius: 14px; margin: 1.8em 0 2.2em; padding: clamp(18px, 4vw, 30px); }
.np-resistor-calculator h3 { margin-top: 0; }
.np-resistor-calculator__controls { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.np-resistor-calculator__controls label { color: var(--np-ink); display: grid; font-size: 14px; font-weight: 600; gap: 7px; }
.np-resistor-calculator__controls select { background-color: #fff; border: 1px solid #aebfc5; border-radius: 8px; color: var(--np-ink); font: inherit; min-height: 44px; padding: 8px 34px 8px 10px; width: 100%; }
.np-resistor-calculator__preview { align-items: center; display: flex; justify-content: center; margin: 28px auto 22px; }
.np-resistor-calculator__lead { background: #899399; display: block; height: 4px; width: min(16vw, 130px); }
.np-resistor-calculator__body { align-items: stretch; background: #dfc995; border: 1px solid #c6ae79; border-radius: 38px; box-shadow: inset 0 0 16px rgba(102, 74, 25, .15), 0 7px 18px rgba(29, 49, 58, .08); display: flex; gap: 13px; height: 82px; justify-content: center; padding: 0 28px; width: min(52vw, 330px); }
.np-resistor-calculator__body i { border-left: 1px solid rgba(255, 255, 255, .22); border-right: 1px solid rgba(0, 0, 0, .16); display: block; height: 100%; min-width: 13px; width: 13px; }
.np-resistor-calculator__body i[data-np-preview-band="tolerance"] { margin-left: auto; }
.np-resistor-calculator__result { color: var(--np-ink); font-size: 20px; font-weight: 600; margin-bottom: 7px; text-align: center; }
.np-resistor-calculator__range { color: var(--np-muted); margin-bottom: 0; text-align: center; }

.np-actuator-calculator { background: linear-gradient(145deg, #f8fbfc, #eef4f6); border: 1px solid var(--np-line); border-radius: 20px; box-shadow: 0 18px 46px rgba(29, 49, 58, .09); margin: 1.8em 0 2.4em; overflow: hidden; }
.np-actuator-calculator__header { background: #17324d; color: #fff; padding: clamp(22px, 5vw, 38px); }
.np-actuator-calculator__header h3 { color: #fff; margin: 0 0 8px; }
.np-actuator-calculator__header p { color: #dce9ef; margin: 0; max-width: 64ch; }
.np-actuator-calculator__presets { display: grid; gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 18px clamp(18px, 4vw, 30px) 0; }
.np-actuator-calculator button { -webkit-tap-highlight-color: transparent; }
.np-actuator-calculator__preset, .np-actuator-calculator__animate { background: #fff; border: 1px solid #aebfc5; border-radius: 11px; color: #17324d; cursor: pointer; font: inherit; font-weight: 700; min-height: 48px; padding: 10px 14px; }
.np-actuator-calculator__preset:hover, .np-actuator-calculator__preset:focus-visible, .np-actuator-calculator__animate:hover, .np-actuator-calculator__animate:focus-visible { border-color: #e46b2d; box-shadow: 0 0 0 3px rgba(228, 107, 45, .17); outline: 0; }
.np-actuator-calculator__workspace { display: grid; gap: 22px; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr); padding: clamp(18px, 4vw, 30px); }
.np-actuator-calculator__visual, .np-actuator-calculator__controls, .np-actuator-calculator__results { background: #fff; border: 1px solid #d4e0e5; border-radius: 16px; }
.np-actuator-calculator__visual { align-self: start; overflow: hidden; padding: 12px; }
.np-actuator-calculator__visual svg { background: linear-gradient(#fafdfe 0 70%, #edf3f5 70%); border-radius: 12px; display: block; height: auto; max-width: 100%; touch-action: none; width: 100%; }
.np-actuator-calculator__visual [data-drag] { cursor: grab; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .18)); }
.np-actuator-calculator__visual [data-drag]:active { cursor: grabbing; }
.np-actuator-calculator__visual [data-np-actuator-grab-line] { filter: none; pointer-events: stroke; stroke: transparent; }
.np-actuator-calculator__visual [data-np-actuator-grab-line]:active { stroke: rgba(36, 85, 122, .1); }
@media (hover: hover) { .np-actuator-calculator__visual [data-np-actuator-grab-line]:hover { stroke: rgba(36, 85, 122, .07); } }
.np-actuator-calculator__grab-pulse { animation: np-actuator-grab-pulse 5s ease-out infinite; fill: none; stroke: #24557a; stroke-width: 4; transform-box: fill-box; transform-origin: center; }
@keyframes np-actuator-grab-pulse { 0% { opacity: .6; transform: scale(1); } 30%, 100% { opacity: 0; transform: scale(2); } }
@media (prefers-reduced-motion: reduce) { .np-actuator-calculator__grab-pulse { animation: none; opacity: 0; } }
.np-actuator-calculator .np-actuator-calculator__grab-hint { align-items: center; color: #17324d; display: flex; font-size: 14px; font-weight: 600; gap: 8px; margin: 10px 0 0; }
.np-actuator-calculator__visual .np-actuator-calculator__grab-hint svg { background: none; border-radius: 0; flex: 0 0 28px; height: 28px; touch-action: auto; width: 28px; }
.np-actuator-calculator__motion { align-items: center; display: grid; gap: 10px; grid-template-columns: 1fr auto; margin-top: 12px; }
.np-actuator-calculator__motion label { display: grid; font-size: 13px; font-weight: 700; gap: 5px; }
.np-actuator-calculator input[type="range"] { accent-color: #e46b2d; min-height: 28px; width: 100%; }
.np-actuator-calculator__controls { display: grid; gap: 17px; padding: 18px; }
.np-actuator-calculator__controls fieldset { border: 0; display: grid; gap: 13px; margin: 0; padding: 0; }
.np-actuator-calculator__controls fieldset + fieldset { border-top: 1px solid #e1e9ec; padding-top: 15px; }
.np-actuator-calculator__controls legend { color: #17324d; font-size: 16px; font-weight: 800; margin-bottom: 12px; padding: 0; }
.np-actuator-calculator__control { display: grid; gap: 5px; grid-template-columns: minmax(0, 1fr) 92px; }
.np-actuator-calculator__control > span { color: #334f63; font-size: 13px; font-weight: 700; grid-column: 1 / -1; }
.np-actuator-calculator__control input[type="number"] { background: #fff; border: 1px solid #aebfc5; border-radius: 8px; color: #17324d; font: inherit; min-height: 42px; padding: 7px 9px; width: 100%; }
.np-actuator-calculator__results { margin: 0 clamp(18px, 4vw, 30px) clamp(18px, 4vw, 30px); padding: clamp(18px, 4vw, 28px); }
.np-actuator-calculator__status { border-left: 4px solid #3f8a55; color: #17324d; font-weight: 700; margin: 0 0 18px; padding: 5px 0 5px 12px; }
.np-actuator-calculator__results[data-state="invalid"] .np-actuator-calculator__status { border-left-color: #c83c35; color: #8f2925; }
.np-actuator-calculator__result-grid { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.np-actuator-calculator__metric { background: #f5f8fa; border-radius: 12px; margin: 0; min-width: 0; padding: 14px; }
.np-actuator-calculator__metric dt { color: #526d7e; font-size: 12px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.np-actuator-calculator__metric dd { color: #17324d; font-size: clamp(17px, 2vw, 22px); font-weight: 800; margin: 5px 0 0; overflow-wrap: anywhere; }
.np-actuator-calculator__warning { color: #8a4a18; font-size: 14px; font-weight: 650; min-height: 1.5em; }
.np-actuator-calculator__curve { border-top: 1px solid #e1e9ec; display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr) minmax(220px, .65fr); margin-top: 18px; padding-top: 18px; }
.np-actuator-calculator__curve p { margin: 0; }
.np-actuator-calculator__curve svg { height: auto; max-width: 100%; width: 100%; }
.np-actuator-calculator__note { color: var(--np-muted); font-size: 13px; margin: 14px 0 0; }

/* Products in an article -------------------------------------------------- */

.np-product-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    list-style: none;
    margin: 0;
    padding: 0;
}

.np-product-card {
    background: #fff;
    border: 1px solid var(--np-line);
    border-radius: var(--np-radius);
    display: flex;
    flex-direction: column;
    margin: 0;
    overflow: hidden;
    transition: box-shadow .25s ease, border-color .25s ease;
}

.np-product-card:hover {
    border-color: #d5dade;
    box-shadow: var(--np-shadow);
}

.np-product-card__media {
    background: #fff;
    display: block;
    padding: 16px 16px 0;
}

.np-product-card__media .product-image-container {
    display: block;
    margin: 0 auto;
    width: 100% !important;
}

.np-product-card__media img {
    display: block;
    height: auto;
    margin: 0 auto;
    max-height: 220px;
    object-fit: contain;
    width: 100%;
}

.np-product-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 8px;
    padding: 14px 18px 18px;
}

.np-product-card__name {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.35;
    margin: 0;
}

.np-product-card__name a {
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    color: var(--np-ink) !important;
    display: -webkit-box;
    overflow: hidden;
    text-decoration: none !important;
}

.np-product-card__price .price {
    color: var(--np-ink);
    font-size: 18px;
    font-weight: 600;
}

.np-product-card__price .price-box {
    margin: 0;
}

.np-product-card__stock {
    font-size: 13px;
    margin: 0;
}

.np-product-card__stock::before {
    border-radius: 50%;
    content: '';
    display: inline-block;
    height: 8px;
    margin-right: 6px;
    width: 8px;
}

.np-product-card__stock.is-in-stock::before {
    background: #1e9e5a;
}

.np-product-card__stock.is-out-of-stock::before {
    background: #c9a227;
}

.np-product-card__actions {
    margin-top: auto;
    padding-top: 6px;
}

.np-product-card__actions .np-button,
.np-product-card__actions .action.primary {
    width: 100%;
}

/* Guides on a product page ------------------------------------------------ */

.np-product-guides {
    background: #f4f4f4;
    border: 1px solid #f4f4f4;
    border-radius: 18px;
    clear: both;
    margin: 48px 0;
    padding: clamp(22px, 3.5vw, 40px);
}

.np-product-guides__head {
    margin-bottom: 22px;
    max-width: 720px;
}

.np-product-guides__head .np-section-title {
    margin-bottom: 8px;
}

.np-product-guides__intro {
    color: var(--np-text);
    margin: 0;
}

.np-product-guides__list {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.np-product-guides--single .np-product-guides__list {
    grid-template-columns: minmax(0, 860px);
}

.np-product-guides__more {
    margin: 22px 0 0;
}

/* Guide topics on product pages (0.16.0): a short row of topic links under the guides. */
.np-product-guides__topics {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin: 22px 0 0;
}

.np-product-guides__topics-label {
    color: var(--np-muted);
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

.np-product-guides__topic-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.np-product-guides__topic-list > li {
    margin: 0;
}

.np-product-guides__topic {
    background: #fff;
    border: 1px solid var(--np-line);
    font-size: 14px;
    padding: 6px 12px;
}

.np-product-guides__topic--category::before {
    content: none;
}

.np-product-guides__topic .np-tag__count {
    color: var(--np-muted);
    font-weight: 400;
}

.np-product-guides__topic:hover .np-tag__count,
.np-product-guides__topic:focus-visible .np-tag__count {
    color: inherit;
}

.np-product-guides--topics .np-product-guides__topics {
    margin-top: 0;
}

/* Private preview: a quiet note above the article, which otherwise looks published. */
.np-post-preview-note {
    background: var(--np-accent-soft);
    border-left: 3px solid var(--np-accent);
    border-radius: var(--np-radius-small);
    color: var(--np-accent-strong);
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 20px;
    padding: 10px 14px;
}

/* Home page section ------------------------------------------------------- */

.np-home-guides-row {
    margin-bottom: 0;
    margin-top: 0;
}

.np-home-guides {
    background: #f4f4f4;
    border: 1px solid #f4f4f4;
    border-radius: 16px;
    margin: 40px 0 48px;
    padding: 30px 32px 28px;
}

.np-home-guides__head {
    align-items: flex-end;
    display: flex;
    flex-wrap: wrap;
    gap: 12px 32px;
    justify-content: space-between;
    margin: 0 0 16px;
}

.np-home-guides__titles {
    max-width: 720px;
}

.np-home-guides .np-section-title {
    font-size: clamp(22px, 2.2vw, 28px);
    margin: 0 0 6px;
}

.np-home-guides__intro {
    color: var(--np-text);
    font-size: 15px;
    line-height: 1.55;
    margin: 0;
}

.np-home-guides__actions {
    align-items: center;
    display: flex;
    gap: 8px;
}

.np-home-guides__all {
    color: var(--np-accent-strong) !important;
    font-size: 15px;
    font-weight: 600;
    margin-left: 8px;
    text-decoration: none !important;
    white-space: nowrap;
}

.np-home-guides__all::after {
    content: ' \2192';
}

.np-home-guides__all:hover {
    text-decoration: underline !important;
}

/* Arrows appear only when the track is wider than the section. */
.np-carousel__arrow {
    align-items: center;
    background: #fff;
    border: 1px solid var(--np-line);
    border-radius: 50%;
    color: var(--np-ink);
    cursor: pointer;
    display: none;
    height: 40px;
    justify-content: center;
    padding: 0;
    transition: border-color .2s ease, color .2s ease, opacity .2s ease;
    width: 40px;
}

.np-home-guides.is-scrollable .np-carousel__arrow {
    display: inline-flex;
}

.np-carousel__arrow:hover:not(:disabled) {
    border-color: var(--np-accent);
    color: var(--np-accent-strong);
}

.np-carousel__arrow:disabled {
    cursor: default;
    opacity: .35;
}

.np-home-guides__topics {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
}

.np-home-guides__topics li {
    margin: 0;
}

.np-home-guides__topics .np-tag {
    min-height: 34px;
}

/* Three cards per view on desktop, a peek of the next card on smaller screens. */
.np-carousel__track {
    display: grid;
    gap: 20px;
    grid-auto-columns: calc((100% - 40px) / 3);
    grid-auto-flow: column;
    margin: -6px -4px -12px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding: 6px 4px 12px;
    scroll-behavior: smooth;
    scroll-padding: 0 4px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.np-carousel__track::-webkit-scrollbar {
    display: none;
}

.np-carousel__track > * {
    scroll-snap-align: start;
}

.np-carousel__track:focus-visible {
    outline: 2px solid var(--np-accent);
    outline-offset: 2px;
}

.np-home-guides__cards .np-card {
    border-color: transparent;
}

.np-home-guides__cards .np-card:hover {
    transform: none;
}

.np-home-guides__cards .np-card__body {
    gap: 8px;
    padding: 18px 20px 20px;
}

.np-home-guides__cards .np-card__title {
    font-size: 18px;
}

.np-home-guides__cards .np-card__excerpt {
    -webkit-line-clamp: 2;
    font-size: 14px;
}

.np-home-guides__cards .np-card__tags {
    display: none;
}

/*
 * Compact list under the cards: small white rows in the cards' style. Every size is fixed (64 px thumbnail, two
 * title lines at most, line heights in px), so a late web font cannot move anything below (no layout shift).
 */
.np-home-compact {
    border-top: 1px solid var(--np-line);
    margin: 22px 0 0;
    padding: 18px 0 0;
}

.np-home-compact__title {
    color: var(--np-ink);
    font-family: var(--np-font);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .07em;
    line-height: 16px;
    margin: 0 0 12px;
    text-transform: uppercase;
}

.np-home-compact__list {
    display: grid;
    gap: 12px 20px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    list-style: none;
    margin: 0;
    padding: 0;
}

.np-home-compact__item {
    margin: 0;
    min-width: 0;
}

.np-home-compact__item--no-desktop {
    display: none;
}

.np-home-compact__link {
    align-items: center;
    background: #fff;
    border: 1px solid transparent;
    border-radius: var(--np-radius-small);
    box-sizing: border-box;
    color: var(--np-ink) !important;
    display: flex;
    gap: 12px;
    height: 80px;
    padding: 8px 12px 8px 8px;
    text-decoration: none !important;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.np-home-compact__link:hover {
    border-color: #d5dade;
    box-shadow: var(--np-shadow);
}

.np-home-compact__link:focus-visible {
    outline: 2px solid var(--np-accent);
    outline-offset: 2px;
}

.np-home-compact__thumb {
    background: var(--np-surface);
    border-radius: 6px;
    flex: 0 0 64px;
    height: 64px;
    overflow: hidden;
    width: 64px;
}

.np-home-compact__thumb img {
    display: block;
    height: 64px;
    object-fit: cover;
    width: 64px;
}

.np-home-compact__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.np-home-compact__topic {
    color: var(--np-accent);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .07em;
    line-height: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.np-home-compact__name {
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    display: -webkit-box;
    font-family: var(--np-heading-font);
    font-size: 15px;
    font-weight: 500;
    line-height: 20px;
    max-height: 40px;
    overflow: hidden;
}

.np-home-compact__link:hover .np-home-compact__name {
    color: var(--np-accent-strong);
}

@media (max-width: 1023px) {
    .np-carousel__track {
        grid-auto-columns: calc((100% - 20px) / 2.15);
    }

    .np-home-compact__list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .np-home-guides {
        border-radius: 0;
        margin: 28px -15px 36px;
        padding: 24px 0;
    }

    .np-home-guides__head,
    .np-home-guides__topics {
        padding: 0 15px;
    }

    .np-home-guides__head {
        align-items: flex-start;
        flex-direction: column;
    }

    .np-home-guides__all {
        margin-left: 0;
    }

    .np-home-guides .np-carousel__arrow {
        display: none;
    }

    /* One swipeable line of topics instead of a tall wall of chips. */
    .np-home-guides__topics {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .np-home-guides__topics::-webkit-scrollbar {
        display: none;
    }

    .np-home-guides__topics li {
        flex: 0 0 auto;
    }

    .np-carousel__track {
        gap: 14px;
        grid-auto-columns: 80%;
        margin: 0;
        padding: 4px 15px 10px;
        scroll-padding: 0 15px;
    }

    .np-home-compact {
        margin: 16px 15px 0;
        padding: 16px 0 0;
    }

    .np-home-compact__list {
        gap: 10px;
        grid-template-columns: minmax(0, 1fr);
    }

    /* The phone count is its own setting: show what the desktop hides, hide past the phone count. */
    .np-home-compact__item--no-desktop {
        display: block;
    }

    .np-home-compact__item--no-phone {
        display: none;
    }
}

/* Footer link and widgets ------------------------------------------------- */

.np-blog-footer-link {
    padding: 0 0 16px;
    text-align: center;
}

.np-blog-footer-link a {
    color: var(--footer-links-color, #666);
    font-weight: 500;
}

.np-blog-widget__grid {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

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

.np-blog-comments { border-top: 1px solid var(--np-line); margin-top: 48px; padding-top: 32px; }
.np-blog-comments__list { list-style: none; margin: 0 0 32px; padding: 0; }
.np-blog-comments__list li { border-bottom: 1px solid var(--np-line); padding: 16px 0; }
.np-blog-comments__list time { color: var(--np-muted); font-size: 13px; margin-left: 12px; }
.np-blog-comments__form { display: grid; gap: 16px; max-width: 700px; }
.np-blog-comments__form input,
.np-blog-comments__form textarea { box-sizing: border-box; width: 100%; }
.np-blog-comments__honeypot { height: 1px; left: -10000px; overflow: hidden; position: absolute; width: 1px; }

/* Responsive -------------------------------------------------------------- */

@media (max-width: 1199px) {
    .np-post--with-toc .np-post-layout {
        column-gap: 36px;
        grid-template-columns: 220px minmax(0, 760px);
    }
}

@media (max-width: 1023px) {
    .np-post-hero__media img {
        aspect-ratio: 16 / 9;
    }

    .np-blog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .np-blog-featured__grid {
        grid-template-columns: 1fr;
    }

    .np-blog-featured__side {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: none;
    }

    .np-blog-featured__side .np-card--row {
        display: flex;
    }

    .np-blog-featured__side .np-card--row .np-card__media {
        aspect-ratio: 16 / 9;
        height: auto;
        min-height: 0;
    }

    .np-blog-hubs__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .np-post--with-toc .np-post-layout {
        grid-template-areas: "hero" "aside" "body";
        grid-template-columns: minmax(0, 760px);
        grid-template-rows: none;
        justify-content: center;
    }

    .np-post-hero {
        margin-bottom: 28px;
    }

    .np-post-aside {
        margin: 0 0 32px;
    }

    .np-toc {
        max-height: none;
        overflow: visible;
        position: static;
    }

    .np-toc__details {
        background: var(--np-surface);
        border: 1px solid var(--np-line);
        border-radius: var(--np-radius);
        padding: 16px 20px;
    }

    .np-toc__summary {
        margin: 0;
    }

    .np-toc__details[open] .np-toc__summary {
        margin-bottom: 10px;
    }

    .np-toc__summary::after {
        content: '+';
        float: right;
        font-size: 18px;
        line-height: 1;
    }

    .np-toc__details[open] .np-toc__summary::after {
        content: '−';
    }

    .np-product-guides__list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .np-blog {
        font-size: 16px;
    }

    /* The H1 repeats the current page; keep the trail to one short line. */
    .np-blog-page--post .breadcrumbs .items > .item:last-child {
        display: none;
    }

    .np-blog-page--post .breadcrumbs .items > .item:nth-last-child(2)::after {
        display: none;
    }

    .np-blog-hero {
        border-radius: 14px;
        margin-left: -4px;
        margin-right: -4px;
    }

    .np-blog-hero__intro {
        font-size: 16px;
    }

    .np-chips {
        margin: 0 -15px 24px;
        overflow-x: auto;
        padding: 2px 15px 6px;
        scrollbar-width: none;
    }

    .np-chips::-webkit-scrollbar {
        display: none;
    }

    .np-blog-toolbar .np-chips {
        margin: 0 -15px;
        padding: 2px 15px 6px;
    }

    .np-chips__list {
        flex-wrap: nowrap;
    }

    .np-blog-grid,
    .np-blog-hubs__grid,
    .np-blog-featured__side {
        grid-template-columns: 1fr;
    }

    .np-card--row {
        grid-template-columns: 112px 1fr;
    }

    .np-card--row .np-card__media {
        min-height: 100%;
    }

    .np-card--row .np-card__body {
        padding: 14px 16px;
    }

    .np-card--row .np-card__title {
        font-size: 16px;
    }

    .np-card--row .np-card__excerpt,
    .np-card--row .np-card__meta time {
        display: none;
    }

    .np-card--row .np-card__meta > * + *::before {
        display: none;
    }

    .np-blog-featured__side .np-card--row {
        display: grid;
    }

    .np-blog-featured__side .np-card--row .np-card__media {
        aspect-ratio: auto;
        height: 100%;
    }

    .np-post-hero__text {
        text-align: left;
    }

    .np-post-meta {
        justify-content: flex-start;
    }

    .np-post-hero__media {
        border-radius: 12px;
        margin: 0 -4px;
    }

    .np-post-content {
        font-size: 16px;
        line-height: 1.7;
    }

    .np-article .np-lead {
        font-size: 18px;
    }

    .np-post-content th,
    .np-post-content td {
        min-width: 140px;
        padding: 10px 12px;
    }

    .np-article .np-flow {
        align-items: stretch;
        flex-direction: column;
    }

    .np-article .np-flow__arrow {
        line-height: 1;
        text-align: center;
        transform: rotate(90deg);
    }

    .np-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .np-product-card__body {
        padding: 12px;
    }

    .np-product-card__name {
        font-size: 14px;
    }

    .np-product-card__price .price {
        font-size: 16px;
    }

    .np-resistor-calculator__controls { grid-template-columns: 1fr; }
    .np-resistor-calculator__lead { width: 10vw; }
    .np-resistor-calculator__body { gap: 8px; height: 68px; padding: 0 20px; width: 68vw; }
    .np-actuator-calculator__presets, .np-actuator-calculator__workspace, .np-actuator-calculator__result-grid, .np-actuator-calculator__curve { grid-template-columns: 1fr; }
    .np-actuator-calculator__motion { grid-template-columns: 1fr; }
    .np-actuator-calculator__grab-body { transform: scale(1.6); }
    .np-actuator-calculator__animate { width: 100%; }
}

/* Magazine landing ------------------------------------------------------- */

.np-quick-tags {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.np-quick-tags__label {
    color: var(--np-muted);
    font-size: 13px;
    margin-right: 2px;
}

.np-chip--small {
    font-size: 14px;
    min-height: 34px;
    padding: 5px 12px;
}

.np-row {
    margin: 0 0 52px;
}

.np-row__head {
    align-items: end;
    display: flex;
    gap: 12px 24px;
    justify-content: space-between;
    margin-bottom: 18px;
}

.np-row__titles .np-section-title {
    margin: 0;
}

.np-row__titles .np-section-title a {
    color: inherit !important;
    text-decoration: none !important;
}

.np-row__titles .np-section-title a:hover {
    color: var(--np-accent) !important;
}

.np-row__eyebrow {
    color: var(--np-accent);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .08em;
    margin: 0 0 4px;
    text-transform: uppercase;
}

.np-row__intro {
    color: var(--np-text);
    font-size: 15px;
    margin: 6px 0 0;
    max-width: 680px;
}

.np-row__more {
    color: var(--np-ink) !important;
    flex: 0 0 auto;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none !important;
    white-space: nowrap;
}

.np-row__more::after {
    content: ' →';
    color: var(--np-accent);
}

.np-row__more:hover {
    color: var(--np-accent) !important;
}

.np-row__track {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.np-row--tag {
    background: var(--np-surface);
    border-radius: 18px;
    padding: 28px;
}

.np-row--tag .np-card {
    border-color: transparent;
}

.np-row .np-card__excerpt {
    -webkit-line-clamp: 2;
    font-size: 14px;
}

.np-row .np-card__title {
    font-size: 18px;
}

.np-row .np-card__body {
    padding: 16px 18px 18px;
}

.np-hub__link {
    align-items: center;
    flex-direction: row;
    gap: 16px;
    padding: 14px 44px 14px 14px;
}

.np-hub__media {
    border-radius: 10px;
    flex: 0 0 96px;
    height: 72px;
    overflow: hidden;
}

.np-hub__media img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.np-hub__body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.np-hub__link::after {
    top: 50%;
    transform: translateY(-50%);
}

.np-hub__link:hover::after {
    transform: translate(3px, -50%);
}

.np-hub__title {
    padding-right: 0;
}

.np-blog-cta {
    align-items: center;
    background: var(--np-ink);
    border-radius: 18px;
    color: #fff;
    display: flex;
    flex-wrap: wrap;
    gap: 16px 32px;
    justify-content: space-between;
    margin: 8px 0 56px;
    padding: 28px 32px;
}

.np-blog-cta__title {
    color: #fff;
    font-size: 22px;
    font-weight: 500;
    margin: 0 0 4px;
}

.np-blog-cta__text {
    color: rgba(255, 255, 255, .75);
    margin: 0;
}

.np-blog-cta .np-button {
    background: #fff;
    border-color: #fff;
    color: var(--np-ink) !important;
}

.np-blog-cta .np-button:hover {
    background: var(--np-accent);
    border-color: var(--np-accent);
    color: #fff !important;
}

.np-blog-featured--single .np-blog-featured__grid {
    grid-template-columns: minmax(0, 1fr);
}

.np-blog-featured--single .np-card--lead {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
}

@media (max-width: 1199px) {
    .np-row__track {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .np-row__track > :nth-child(n+4) {
        display: none;
    }
}

@media (max-width: 1023px) {
    .np-row__track {
        grid-auto-columns: minmax(260px, 42%);
        grid-auto-flow: column;
        grid-template-columns: none;
        margin: 0 -15px;
        overflow-x: auto;
        padding: 0 15px 8px;
        scroll-padding: 0 15px;
        scroll-snap-type: x mandatory;
        scrollbar-width: thin;
    }

    .np-row__track > * {
        scroll-snap-align: start;
    }

    .np-row__track > :nth-child(n+4) {
        display: flex;
    }

    .np-row--tag {
        padding: 22px 15px;
        margin-left: -15px;
        margin-right: -15px;
        border-radius: 0;
    }

    .np-row--tag .np-row__track {
        margin: 0 -15px;
    }
}

@media (max-width: 767px) {
    .np-row__track {
        grid-auto-columns: 78%;
        gap: 14px;
    }

    .np-row__head {
        align-items: start;
        flex-direction: column;
        gap: 6px;
    }

    .np-hub__media {
        flex-basis: 72px;
        height: 56px;
    }

    .np-blog-cta {
        padding: 22px;
    }

    .np-blog-featured--single .np-card--lead {
        display: flex;
    }
}

/* Topic graph: shop links ------------------------------------------------ */

.np-topic-shop {
    border-top: 1px solid var(--np-line);
    margin: 0 0 52px;
    padding-top: 36px;
}

.np-topic-shop__categories {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    list-style: none;
    margin: 0 0 24px;
    padding: 0;
}

.np-topic-shop__category {
    align-content: center;
    background: var(--np-accent-soft);
    border: 1px solid #e3e3e3;
    border-radius: var(--np-radius);
    display: grid;
    gap: 2px 12px;
    grid-template-columns: 1fr auto;
    height: 100%;
    padding: 14px 18px;
    text-decoration: none !important;
    transition: background-color .2s ease, border-color .2s ease;
}

.np-topic-shop__category::after {
    align-self: center;
    color: var(--np-accent);
    content: '→';
    font-size: 18px;
    grid-column: 2;
    grid-row: 1 / span 2;
}

.np-topic-shop__category:hover {
    background: #e4e9ec;
    border-color: var(--np-accent);
}

.np-topic-shop__name {
    color: var(--np-ink);
    font-size: 16px;
    font-weight: 500;
    grid-column: 1;
    line-height: 1.3;
}

.np-topic-shop__count {
    color: var(--np-muted);
    font-size: 13px;
    grid-column: 1;
}

.np-product-grid--four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.np-shop-links {
    align-items: center;
    background: var(--np-accent-soft);
    border-radius: var(--np-radius);
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    margin: 24px 0 0;
    padding: 16px 20px;
}

.np-shop-links__label {
    color: var(--np-ink);
    font-size: 15px;
    font-weight: 600;
    margin: 0;
}

.np-shop-links__list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.np-shop-link {
    align-items: center;
    background: #fff;
    border: 1px solid #dcdfe1;
    border-radius: 999px;
    color: var(--np-ink) !important;
    display: inline-flex;
    font-size: 14px;
    font-weight: 500;
    gap: 8px;
    padding: 6px 14px;
    text-decoration: none !important;
}

.np-shop-link:hover {
    border-color: var(--np-accent);
}

.np-shop-link__count {
    color: var(--np-muted);
    font-size: 12px;
    font-weight: 400;
}

.np-category-guides {
    clear: both;
    margin: 48px 0 24px;
}

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

@media (max-width: 1023px) {
    .np-product-grid--four {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .np-row__track--three {
        grid-template-columns: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .np-card,
    .np-card__media img,
    .np-hub__link::after {
        transition: none;
    }

    .np-card:hover,
    .np-card:hover .np-card__media img {
        transform: none;
    }

    .np-carousel__track {
        scroll-behavior: auto;
    }
}

/*
 * Build guides: project card, parts list, expected output, result figures, cards, foldouts and
 * hands-on tools (docs/EDITORIAL-GUIDE.md section 5b). Everything reads without JavaScript except the
 * tools themselves, which keep a <noscript> route to the formulas.
 */
.np-article .np-project-card {
    background: #fff;
    border: 1px solid var(--np-line);
    border-radius: var(--np-radius);
    box-shadow: var(--np-shadow);
    display: grid;
    gap: 2px;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    margin: 1.8em 0;
    overflow: hidden;
    padding: 0;
}

.np-article .np-project-card > div {
    background: var(--np-surface);
    margin: 0;
    padding: 14px 16px;
}

/* Two columns on a phone: an odd last item fills its row instead of leaving an empty cell. */
@media (max-width: 480px) {
    .np-article .np-project-card > div:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }
}

.np-article .np-project-card dt {
    color: var(--np-muted);
    font-size: 13px;
    font-weight: 600;
    margin: 0 0 2px;
}

.np-article .np-project-card dd {
    color: var(--np-ink);
    font-weight: 700;
    margin: 0;
}

.np-article .np-parts {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    list-style: none;
    margin: 1.4em 0 1.8em;
    padding: 0;
}

.np-article .np-parts > li {
    align-items: center;
    background: #fff;
    border: 1px solid var(--np-line);
    border-radius: var(--np-radius-small);
    display: grid;
    gap: 12px;
    grid-template-columns: 64px minmax(0, 1fr);
    margin: 0;
    padding: 10px 12px;
}

.np-article .np-parts img {
    border-radius: 6px;
    display: block;
    height: 64px;
    object-fit: contain;
    width: 64px;
}

.np-article .np-parts strong {
    color: var(--np-ink);
    display: block;
    font-size: 15px;
    line-height: 1.3;
}

.np-article .np-parts small {
    color: var(--np-muted);
    display: block;
    font-size: 13px;
    line-height: 1.35;
    margin-top: 2px;
}

.np-article .np-terminal {
    background: #14191d;
    border-radius: var(--np-radius-small);
    color: #d6f5d6;
    font-family: Menlo, Consolas, "Courier New", monospace;
    font-size: 14px;
    line-height: 1.5;
    margin: 1em 0 1.6em;
    overflow-x: auto;
    padding: 40px 16px 14px;
    position: relative;
    white-space: pre;
}

.np-article .np-terminal::before {
    background: #262d33;
    border-radius: var(--np-radius-small) var(--np-radius-small) 0 0;
    color: #c6ced4;
    content: attr(data-title);
    font-family: var(--np-font);
    font-size: 13px;
    left: 0;
    padding: 5px 16px;
    position: absolute;
    right: 0;
    top: 0;
}

.np-article .np-figure--result {
    background: #fff;
    border: 1px solid var(--np-line);
    border-radius: var(--np-radius);
    padding: 12px 12px 4px;
}

.np-article .np-figure-row {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    margin: 1.8em 0;
}

.np-article .np-figure-row > figure {
    margin: 0;
}

.np-article .np-cards {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    margin: 1.6em 0;
}

.np-article .np-card {
    background: #fff;
    border: 1px solid var(--np-line);
    border-radius: var(--np-radius);
    border-top: 4px solid var(--np-accent);
    padding: 16px 18px;
}

.np-article .np-card > strong {
    color: var(--np-ink);
    display: block;
    font-size: 17px;
    margin-bottom: 6px;
}

.np-article .np-card > p {
    margin: 0 0 .6em;
}

.np-article .np-card > p:last-child {
    margin-bottom: 0;
}

.np-article .np-fold {
    background: #fff;
    border: 1px solid var(--np-line);
    border-radius: var(--np-radius-small);
    margin: 10px 0;
}

.np-article .np-fold > summary {
    color: var(--np-ink);
    cursor: pointer;
    font-weight: 600;
    list-style: none;
    padding: 12px 40px 12px 16px;
    position: relative;
}

.np-article .np-fold > summary::-webkit-details-marker {
    display: none;
}

.np-article .np-fold > summary::after {
    color: var(--np-accent);
    content: "+";
    font-size: 22px;
    line-height: 1;
    position: absolute;
    right: 16px;
    top: 12px;
}

.np-article .np-fold[open] > summary::after {
    content: "\2212";
}

.np-article .np-fold > summary:focus-visible {
    outline: 2px solid var(--np-accent);
    outline-offset: 2px;
}

.np-article .np-fold > :not(summary) {
    margin: 0 16px 12px;
}

.np-article .np-fold--quiz {
    background: var(--np-accent-soft);
    border-color: #d5dee3;
}

.np-article .np-widget {
    background: var(--np-surface);
    border-radius: var(--np-radius);
    margin: 1.8em 0;
    padding: 18px 20px 20px;
}

.np-article .np-widget__title {
    margin: 0 0 10px;
}

.np-article .np-widget__hint {
    margin: 0 0 12px;
}

.np-article .np-widget__form {
    display: grid;
    gap: 10px 16px;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    margin: 0 0 14px;
}

.np-article .np-widget__field {
    align-items: center;
    display: grid;
    gap: 4px 8px;
    grid-template-columns: minmax(0, 1fr) 42px;
    margin: 0;
}

.np-article .np-widget__label {
    color: var(--np-ink);
    font-size: 14px;
    font-weight: 600;
    grid-column: 1 / -1;
}

.np-article .np-widget__field input {
    background: #fff;
    border: 1px solid #c7ccd1;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 16px;
    height: 40px;
    min-width: 0;
    padding: 0 10px;
    width: 100%;
}

.np-article .np-widget__field input[type="text"] {
    font-family: Menlo, Consolas, "Courier New", monospace;
    grid-column: 1 / -1;
}

.np-article .np-widget__unit {
    color: var(--np-muted);
    font-size: 13px;
}

.np-article .np-widget__result {
    background: #fff;
    border-radius: var(--np-radius-small);
    padding: 12px 14px;
}

.np-article .np-widget__row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    justify-content: space-between;
    margin: 0 0 6px;
}

.np-article .np-widget__note {
    margin: 8px 0 0;
}

.np-article .np-widget__warning {
    color: #9a3412;
    font-weight: 600;
    margin: 0;
}

.np-article .np-widget__presets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0;
}

.np-article .np-widget__preset {
    background: #fff;
    border: 1px solid #c7ccd1;
    border-radius: 18px;
    color: var(--np-ink);
    cursor: pointer;
    font-size: 14px;
    min-height: 36px;
    padding: 4px 14px;
}

.np-article .np-microbit-grid {
    background: #1c2226;
    border-radius: 14px;
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(5, 40px);
    justify-content: center;
    margin: 0 auto;
    max-width: 280px;
    padding: 18px;
}

.np-article .np-microbit-grid__led {
    background: #3b2326;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    height: 40px;
    padding: 0;
    width: 40px;
}

.np-article .np-microbit-grid__led[aria-pressed="true"] {
    background: #ff3b30;
    box-shadow: 0 0 12px 3px rgba(255, 59, 48, .65);
}

.np-article .np-microbit-grid__led:focus-visible,
.np-article .np-widget__preset:focus-visible {
    outline: 3px solid #7cc0e0;
    outline-offset: 2px;
}

.np-article .np-lcd {
    background: #1b3fae;
    border: 8px solid #20262b;
    border-radius: 8px;
    margin: 0 0 16px;
    max-width: 100%;
    overflow-x: auto;
    padding: 10px;
}

.np-article .np-lcd__row {
    display: flex;
    gap: 2px;
    justify-content: center;
    margin: 2px 0;
}

.np-article .np-lcd__cell {
    background: #2450cc;
    color: #eef4ff;
    display: inline-block;
    flex: 0 0 auto;
    font-family: Menlo, Consolas, "Courier New", monospace;
    font-size: 17px;
    height: 26px;
    line-height: 26px;
    text-align: center;
    width: 17px;
}

.np-article .np-lcd__cell--bad {
    background: #ffb020;
}

@media (max-width: 480px) {
    .np-article .np-lcd__cell {
        font-size: 13px;
        height: 22px;
        line-height: 22px;
        width: 13px;
    }

    .np-article .np-microbit-grid {
        gap: 6px;
        grid-template-columns: repeat(5, 36px);
        padding: 14px;
    }

    .np-article .np-microbit-grid__led {
        height: 36px;
        width: 36px;
    }

    .np-article .np-widget {
        padding: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .np-article .np-microbit-grid__led[aria-pressed="true"] {
        box-shadow: none;
    }
}

.np-article .np-parts > li:not(:has(img)) {
    grid-template-columns: minmax(0, 1fr);
}

/* The drawing needs the full article width to stay readable; the inputs sit under it in two columns. */
.np-actuator-calculator__workspace {
    grid-template-columns: minmax(0, 1fr);
}

.np-actuator-calculator__visual svg {
    display: block;
    height: auto;
    width: 100%;
}

@media (min-width: 720px) {
    .np-actuator-calculator__controls {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/*
 * Calculator card on a shop category page (Block/CalculatorTeaser.php). Two copies in the HTML: the side column has
 * room for it from 991 px, narrower screens and pages without a side column show the copy under the products.
 * Light blue head and darker blue button (owner's choice 2026-11-02): lighter than the dark navy of the first draft.
 */
.np-calc-teaser {
    --np-calc-line: #d5e5ee;
    --np-calc-accent: #1f5374;
    --np-calc-button: #24557a;
    --np-calc-button-strong: #1c4463;
    --np-calc-title: #222;
    background: #fff;
    border: 1px solid var(--np-calc-line);
    border-radius: 12px;
    color: #3a3f45;
    font-size: 14px;
    line-height: 1.45;
    overflow: hidden;
}

.np-calc-teaser__head {
    align-items: center;
    background: #f1f7fb;
    border-bottom: 1px solid var(--np-calc-line);
    display: flex;
    gap: 8px;
    justify-content: space-between;
    padding: 14px 12px 13px 14px;
}

.np-calc-teaser .np-calc-teaser__eyebrow {
    color: var(--np-calc-accent);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .08em;
    line-height: 1.45;
    margin: 0 0 2px;
    text-transform: uppercase;
}

.np-calc-teaser .np-calc-teaser__title {
    color: var(--np-calc-title);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.25;
    margin: 0;
}

.np-calc-teaser__draw {
    flex: 0 0 38px;
    height: 54px;
    margin-right: 4px;
    width: 38px;
}

.np-calc-teaser__case {
    fill: var(--np-calc-accent);
}

.np-calc-teaser__body {
    padding: 14px 14px 16px;
}

.np-calc-teaser .np-calc-teaser__lead {
    margin: 0 0 16px;
}

.np-calc-teaser__row {
    align-items: center;
    color: var(--np-calc-title);
    display: flex;
    font-weight: 500;
    gap: 6px;
    justify-content: space-between;
    margin: 0 0 12px;
}

.np-calc-teaser__unit {
    align-items: center;
    background: #fff;
    border: 1px solid #c6d6e0;
    border-radius: 9px;
    box-sizing: border-box;
    display: inline-flex;
    flex: 0 0 82px;
    height: 36px;
    padding: 0 8px 0 0;
    width: 82px;
}

.np-calc-teaser__unit:focus-within {
    border-color: var(--np-calc-accent);
    box-shadow: 0 0 0 2px rgba(31, 83, 116, .2);
}

/* 16 px keeps iOS from zooming into the field; the theme styles every input, hence !important. */
.np-calc-teaser__unit input {
    -moz-appearance: textfield;
    appearance: textfield;
    background: transparent;
    border: 0 !important;
    box-shadow: none !important;
    color: var(--np-calc-title);
    flex: 1 1 auto;
    font-size: 16px;
    font-weight: 600;
    height: 34px !important;
    margin: 0;
    min-width: 0;
    outline: 0;
    padding: 0 2px 0 9px !important;
    width: 100%;
}

.np-calc-teaser__unit input::-webkit-outer-spin-button,
.np-calc-teaser__unit input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.np-calc-teaser__unit i {
    color: #6b7280;
    font-size: 13px;
    font-style: normal;
}

.np-calc-teaser .np-button {
    background: var(--np-calc-button);
    border-color: var(--np-calc-button);
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    margin-top: 8px;
    padding-left: 8px;
    padding-right: 8px;
    width: 100%;
}

.np-calc-teaser .np-button:hover,
.np-calc-teaser .np-button:focus-visible {
    background: var(--np-calc-button-strong);
    border-color: var(--np-calc-button-strong);
}

.np-calc-teaser .np-calc-teaser__note {
    color: #5a6670;
    font-size: 12.5px;
    line-height: 1.4;
    margin: 14px 0 0;
}

.np-calc-teaser__note strong {
    color: var(--np-calc-title);
    font-weight: 600;
}

.np-blog a.np-calc-teaser__more {
    color: var(--np-calc-accent);
    display: inline-block;
    font-size: 13px;
    font-weight: 500;
    margin-top: 10px;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.sidebar-main .np-calc-teaser {
    display: none;
    margin: 6px 15px 26px 0;
}

.column.main > .np-calc-teaser {
    font-size: 15px;
    margin: 32px 0 0;
}

.column.main > .np-calc-teaser .np-calc-teaser__title {
    font-size: 19px;
}

.column.main > .np-calc-teaser .np-calc-teaser__draw {
    flex-basis: 48px;
    height: 68px;
    width: 48px;
}

.column.main > .np-calc-teaser .np-calc-teaser__unit {
    flex-basis: 110px;
    height: 44px;
    width: 110px;
}

.column.main > .np-calc-teaser .np-calc-teaser__unit input {
    height: 42px !important;
}

@media (min-width: 991px) {
    .sidebar-main .np-calc-teaser {
        display: block;
    }

    .page-layout-2columns-left .column.main > .np-calc-teaser {
        display: none;
    }
}

.np-actuator-calculator__landed {
    background: #f1f7fb;
    border: 1px solid #d5e5ee;
    border-left: 4px solid #24557a;
    border-radius: 10px;
    color: #222;
    font-size: 15px;
    line-height: 1.45;
    margin: 0 0 14px;
    padding: 10px 14px;
}

/* Products inside guides (0.8.0, Model/BuyBox) ------------------------------
 * Phone first: a reader from social media sees price, stock and a buy button
 * where the text names the product. The theme's list styles for
 * .product-item-info are neutralised here; the class stays for GA4 items. */

.np-article .np-buy {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    margin: 0;
    max-width: none;
    padding: 0;
    width: auto;
}

.np-article .np-buy .price-box {
    margin: 0;
}

.np-article .np-buy__price .price {
    color: var(--np-ink);
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
}

.np-article .np-buy__price .old-price .price {
    color: var(--np-muted);
    font-size: 13px;
    font-weight: 400;
}

.np-article .np-buy__stock {
    color: var(--np-muted);
    font-size: 13px;
    white-space: nowrap;
}

.np-article .np-buy__stock::before {
    border-radius: 50%;
    content: '';
    display: inline-block;
    height: 8px;
    margin-right: 5px;
    width: 8px;
}

.np-article .np-buy__stock.is-in-stock::before {
    background: #1e9e5a;
}

.np-article .np-buy__stock.is-out-of-stock::before {
    background: #c9a227;
}

.np-article .np-buy__action {
    margin-left: auto;
}

.np-article .np-buy__action form {
    margin: 0;
}

.np-article .np-buy__button.action.primary {
    border-radius: var(--np-radius-small);
    font-size: 14px;
    line-height: 1.2;
    min-height: 40px;
    padding: 9px 14px;
    white-space: nowrap;
}

.np-article .np-buy__link {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

/* Row in a parts list: below the part, across the whole item. */
.np-article .np-parts > li > .np-buy {
    border-top: 1px solid var(--np-line);
    grid-column: 1 / -1;
    padding-top: 8px;
}

/* Row in a "Velg ... hvis" card. */
.np-article .np-card > .np-buy {
    border-top: 1px solid var(--np-line);
    margin-top: 10px;
    padding-top: 10px;
}

/* Card between sections and in an editorial box. */
.np-article .np-buy-inline {
    margin: 1.6em 0;
}

.np-article .np-buy--card {
    background: #fff;
    border: 1px solid var(--np-line);
    border-radius: var(--np-radius);
    display: grid;
    gap: 4px 14px;
    grid-template-areas:
        "media name name"
        "media price stock"
        "action action action";
    grid-template-columns: 88px auto minmax(0, 1fr);
    padding: 12px 14px;
}

.np-article .np-buy--card .np-buy__media {
    align-self: start;
    grid-area: media;
}

.np-article .np-buy--card .np-buy__media img,
.np-article .np-buy--card .product-image-photo {
    display: block;
    height: 88px;
    object-fit: contain;
    position: static;
    width: 88px;
}

.np-article .np-buy--card .product-image-container {
    display: block;
    width: 88px !important;
}

.np-article .np-buy--card .product-image-wrapper {
    height: 88px;
    padding-bottom: 0 !important;
}

.np-article .np-buy--card .np-buy__name {
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    color: var(--np-ink);
    display: -webkit-box;
    font-size: 15px;
    font-weight: 500;
    grid-area: name;
    line-height: 1.35;
    overflow: hidden;
    text-decoration: none;
}

.np-article .np-buy--card .np-buy__price {
    align-self: center;
    grid-area: price;
}

.np-article .np-buy--card .np-buy__stock {
    align-self: center;
    grid-area: stock;
}

.np-article .np-buy--card .np-buy__action {
    grid-area: action;
    margin: 6px 0 0;
}

.np-article .np-buy--card .np-buy__button.action.primary {
    width: 100%;
}

@media (min-width: 640px) {
    .np-article .np-buy--card {
        grid-template-areas:
            "media name name action"
            "media price stock action";
        grid-template-columns: 88px auto minmax(0, 1fr) auto;
    }

    .np-article .np-buy--card .np-buy__action {
        align-self: center;
        margin: 0;
    }

    .np-article .np-buy--card .np-buy__button.action.primary {
        width: auto;
    }
}

.np-article .np-buy-box {
    background: var(--np-accent-soft);
    border-radius: var(--np-radius);
    margin: 1.6em 0;
    padding: 16px;
}

.np-article .np-buy-box > p:first-child {
    margin-top: 0;
}

.np-article .np-buy-box__items {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

/* Two products in one choice card: each row names its product. */
.np-article .np-buy--named .np-buy__name {
    color: var(--np-ink);
    flex-basis: 100%;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
}

.np-article .np-card > .np-buy--named + .np-buy--named {
    margin-top: 0;
}

/* Morse calculator (js/morse-calculator.js, docs/MORSE-CALCULATOR.md). One dot = one unit: a dash is three units,
 * the gap inside a letter one, between letters three and between words seven, so the drawing shows the rhythm. */
.np-article .np-morse-calculator {
    --np-morse-unit: 12px;
    background: var(--np-surface);
    border: 1px solid var(--np-line);
    border-radius: 14px;
    margin: 1.8em 0 2.2em;
    padding: clamp(16px, 4vw, 28px);
}

.np-article .np-morse-calculator h3 {
    margin-top: 0;
}

.np-article .np-morse-calculator h4 {
    margin: 0 0 10px;
}

.np-article .np-morse-calculator [hidden] {
    display: none !important;
}

.np-article .np-morse-calculator__field {
    color: var(--np-ink);
    display: grid;
    font-size: 14px;
    font-weight: 600;
    gap: 7px;
    line-height: 1.4;
}

.np-article .np-morse-calculator__field input {
    background: #fff;
    border: 1px solid #aebfc5;
    border-radius: 8px;
    box-sizing: border-box;
    color: var(--np-ink);
    font: 600 20px/1.3 var(--np-font);
    min-height: 48px;
    padding: 8px 12px;
    width: 100%;
}

.np-article .np-morse-calculator__field input[data-np-morse-text] {
    letter-spacing: .04em;
    text-transform: uppercase;
}

.np-article .np-morse-calculator__field input[data-np-morse-input] {
    font-family: Menlo, Consolas, "Courier New", monospace;
    letter-spacing: .12em;
}

.np-article .np-morse-calculator__examples {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 0;
}

.np-article .np-morse-calculator__example {
    background: #fff;
    border: 1px solid #aebfc5;
    border-radius: 22px;
    color: var(--np-ink);
    cursor: pointer;
    font: 600 15px/1.2 var(--np-font);
    min-height: 44px;
    padding: 6px 16px;
}

.np-article .np-morse-calculator__stage {
    align-items: center;
    background: #fff;
    border: 1px solid var(--np-line);
    border-radius: var(--np-radius);
    display: grid;
    gap: 16px;
    grid-template-columns: auto minmax(0, 1fr);
    margin: 20px 0 10px;
    padding: 18px;
}

.np-article .np-morse-calculator__lamp {
    background: #3a4046;
    border: 3px solid #20262b;
    border-radius: 50%;
    box-sizing: border-box;
    display: block;
    height: 48px;
    width: 48px;
}

.np-article .np-morse-calculator__lamp.is-on {
    background: #ffd23f;
    border-color: #a87f00;
    box-shadow: 0 0 18px 6px rgba(255, 210, 63, .65);
}

.np-article .np-morse-calculator__visual {
    align-items: flex-start;
    column-gap: calc(var(--np-morse-unit) * 7);
    display: flex;
    flex-wrap: wrap;
    min-height: calc(var(--np-morse-unit) + 28px);
    min-width: 0;
    row-gap: 16px;
}

.np-article .np-morse-calculator__word {
    column-gap: calc(var(--np-morse-unit) * 3);
    display: flex;
    flex-wrap: wrap;
    row-gap: 16px;
}

.np-article .np-morse-calculator__letter {
    align-items: center;
    display: inline-flex;
    flex-direction: column;
    gap: 8px;
}

.np-article .np-morse-calculator__signals {
    align-items: center;
    display: flex;
    gap: var(--np-morse-unit);
    height: var(--np-morse-unit);
    min-width: var(--np-morse-unit);
}

.np-article .np-morse-calculator__dot,
.np-article .np-morse-calculator__dash {
    background: var(--np-ink);
    border-radius: calc(var(--np-morse-unit) / 2);
    display: block;
    flex: 0 0 auto;
    height: var(--np-morse-unit);
    width: var(--np-morse-unit);
}

.np-article .np-morse-calculator__dash {
    width: calc(var(--np-morse-unit) * 3);
}

.np-article :is(.np-morse-calculator__dot, .np-morse-calculator__dash).is-on {
    background: var(--np-accent);
    box-shadow: 0 0 0 4px rgba(38, 87, 118, .22);
}

.np-article .np-morse-calculator__char {
    color: var(--np-ink);
    font: 700 17px/1 var(--np-font);
}

.np-article .np-morse-calculator__letter.is-current .np-morse-calculator__char {
    color: var(--np-accent);
    text-decoration: underline 2px;
    text-underline-offset: 4px;
}

.np-article .np-morse-calculator__letter--skipped .np-morse-calculator__signals {
    border: 1px dashed var(--np-muted);
    border-radius: 4px;
    box-sizing: border-box;
    width: calc(var(--np-morse-unit) * 2);
}

.np-article .np-morse-calculator__letter--skipped .np-morse-calculator__char {
    color: var(--np-muted);
}

.np-article .np-morse-calculator__code,
.np-article .np-morse-calculator__decoded {
    color: var(--np-ink);
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 6px;
}

.np-article .np-morse-calculator__code output,
.np-article .np-morse-calculator__decoded output {
    font-size: 20px;
    overflow-wrap: anywhere;
}

.np-article .np-morse-calculator__code output {
    font-family: Menlo, Consolas, "Courier New", monospace;
    letter-spacing: .1em;
    /* Break between letters only, never inside one letter's code. */
    overflow-wrap: normal;
    word-break: normal;
}

.np-article :is(.np-morse-calculator__timing, .np-morse-calculator__skipped, .np-morse-calculator__hint, .np-morse-calculator__help) {
    color: var(--np-muted);
    font-size: 15px;
    margin: 0 0 8px;
}

.np-article .np-morse-calculator__player {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    margin: 14px 0 0;
}

.np-article .np-morse-calculator__speed {
    align-items: center;
    color: var(--np-ink);
    display: flex;
    flex: 1 1 100%;
    flex-wrap: wrap;
    font-size: 14px;
    font-weight: 600;
    gap: 6px 12px;
}

.np-article .np-morse-calculator__speed input[type="range"] {
    flex: 1 1 180px;
    max-width: 320px;
    min-height: 44px;
}

.np-article .np-morse-calculator__sound {
    align-items: center;
    color: var(--np-ink);
    display: inline-flex;
    font-size: 15px;
    gap: 8px;
    min-height: 44px;
}

.np-article .np-morse-calculator__sound input {
    height: 20px;
    margin: 0;
    width: 20px;
}

.np-article .np-morse-calculator__status {
    color: var(--np-muted);
    flex: 1 1 100%;
    font-size: 14px;
    min-height: 1.4em;
}

.np-article .np-morse-calculator button:disabled {
    cursor: not-allowed;
    opacity: .55;
}

.np-article .np-morse-calculator__decoder {
    border-top: 1px solid var(--np-line);
    margin-top: 22px;
    padding-top: 20px;
}

.np-article .np-morse-calculator__decoder .np-morse-calculator__field {
    margin-bottom: 12px;
}

.np-article .np-morse-calculator__key {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    background: #fff;
    border: 2px solid var(--np-ink);
    border-radius: 16px;
    color: var(--np-ink);
    cursor: pointer;
    display: block;
    font: 700 20px/1.2 var(--np-font);
    margin: 14px 0 8px;
    min-height: 88px;
    padding: 12px 18px;
    touch-action: none;
    user-select: none;
    width: 100%;
}

.np-article .np-morse-calculator__key.is-down {
    background: var(--np-ink);
    color: #fff;
    transform: translateY(2px);
}

@media (max-width: 480px) {
    .np-article .np-morse-calculator {
        --np-morse-unit: 9px;
    }

    .np-article .np-morse-calculator__stage {
        gap: 14px;
        grid-template-columns: minmax(0, 1fr);
        justify-items: center;
        padding: 14px;
    }

    .np-article .np-morse-calculator__visual {
        justify-content: center;
    }

    .np-article .np-morse-calculator__lamp {
        height: 40px;
        width: 40px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .np-article .np-morse-calculator__lamp.is-on,
    .np-article :is(.np-morse-calculator__dot, .np-morse-calculator__dash).is-on {
        box-shadow: none;
    }

    .np-article .np-morse-calculator__key.is-down {
        transform: none;
    }
}
