/* MRSMART guide system v1 — one palette, existing semantic classes.
 * Scope is guides ONLY (article + its related products). No PDP/listing/checkout restyling.
 * Technical diagrams, resistor bands and safety states retain their meaning.
 */
.np-article,
.np-blog-page--post .np-post-products {
    --guide-brand: var(--theme__color__primary, #265776);
    --guide-brand-hover: #2c4d5f;
    --guide-icon: #396177;
    --guide-ink: #222222;
    --guide-text: #333333;
    --guide-muted: #555b61;
    --guide-paper: #ffffff;
    --guide-soft: #f2f2f2;
    --guide-line: #dce1e5;
    --guide-radius: 16px;
    --guide-control-radius: 8px;
    --np-accent: var(--guide-brand);
    --np-accent-strong: var(--guide-brand-hover);
    --np-accent-soft: var(--guide-soft);
    --np-ink: var(--guide-ink);
    --np-text: var(--guide-text);
    --np-muted: var(--guide-muted);
    --np-line: var(--guide-line);
    --np-surface: var(--guide-soft);
    color: var(--guide-text);
    color-scheme: light;
    overflow-wrap: break-word;
    min-width: 0;
}
.np-article :is(h2, h3, h4, h5, h6) { color: var(--guide-ink); }
.np-article a { color: var(--guide-brand); }
.np-article a:hover { color: var(--guide-brand-hover); }
.np-article :is(a, button, input, select, summary):focus-visible {
    outline: 2px solid var(--guide-brand);
    outline-offset: 3px;
}
.np-article .np-cards {
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
    align-items: stretch;
}
.np-article .np-card {
    background: var(--guide-paper);
    color: var(--guide-text);
    border: 1px solid var(--guide-line);
    border-radius: var(--guide-radius);
    box-shadow: none;
    padding: 20px;
    min-width: 0;
    transform: none;
    display: flex;
    flex-direction: column;
}
.np-article .np-card:hover { box-shadow: none; transform: none; border-color: var(--guide-line); }
.np-article .np-card > :is(strong, h3, h4) { color: var(--guide-ink); line-height: 1.35; }
.np-article .np-card > p { color: var(--guide-text); }
.np-article .np-card > p:last-child:has(> .np-shop-link, > .np-button) { margin-top: auto; padding-top: 14px; }
.np-article .np-card > :is(.np-shop-link, .np-button) { margin-top: auto; }
.np-article .np-card :is(.fa, .fab, .fas, .fa-brands, .fa-solid) { color: var(--guide-icon); }
/* .np-shop-link is a category chip. Compatibility only for old article cards;
 * new download/action links use np-button np-button--ghost. */
.np-article :is(.np-button, .np-guide-action, .action.primary),
.np-article .np-card .np-shop-link {
    align-items: center;
    justify-content: center;
    display: inline-flex;
    gap: 8px;
    min-height: 44px;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    border: 1px solid var(--guide-brand);
    border-radius: var(--guide-control-radius);
    padding: 10px 16px;
    font: 500 15px/1.4 var(--np-font);
    background: var(--guide-brand);
    color: var(--guide-paper) !important;
    text-decoration: none !important;
    box-shadow: none;
}
.np-article :is(.np-button--ghost, .np-guide-action--secondary),
.np-article .np-card .np-shop-link {
    background: var(--guide-paper);
    color: var(--guide-brand) !important;
    border-color: var(--guide-line);
}
.np-article :is(.np-button, .np-guide-action, .action.primary):hover {
    background: var(--guide-brand-hover);
    border-color: var(--guide-brand-hover);
    color: var(--guide-paper) !important;
}
.np-article :is(.np-button--ghost, .np-guide-action--secondary):hover,
.np-article .np-card .np-shop-link:hover {
    background: var(--guide-soft);
    border-color: var(--guide-brand);
    color: var(--guide-brand) !important;
}
/* Explicit foreground/background pairs prevent inherited white-on-white. */
.np-article .np-table-wrap { border: 1px solid var(--guide-line); border-radius: 12px; background: var(--guide-paper); }
.np-article table { background: var(--guide-paper); color: var(--guide-text); }
.np-article table :is(thead, tbody, tr) { color: var(--guide-text); }
.np-article table th { background: var(--guide-soft); color: var(--guide-ink); border-color: var(--guide-line); }
.np-article table td { background: var(--guide-paper); color: var(--guide-text); border-color: var(--guide-line); }
.np-article table :is(th, td) { border: 0; border-bottom: 1px solid var(--guide-line); padding: 14px 16px; overflow-wrap: break-word; }
.np-article table tr:last-child td { border-bottom: 0; }
.np-article table :is(th, td) a { color: var(--guide-brand); }
.np-article :is(.np-guide-note, .np-quick-answer, .np-callout, .np-widget) {
    color: var(--guide-text);
    background: var(--guide-soft);
    border: 1px solid var(--guide-line);
    border-radius: var(--guide-radius);
    box-shadow: none;
}
.np-article .np-quick-answer::before { display: none; }
.np-article .np-guide-note .np-guide-note__icon { background: var(--guide-paper); color: var(--guide-icon); border-radius: 10px; }
.np-article .np-callout--warning { background: #fff7eb; border-left: 4px solid #a65c12; }
.np-article .np-fold { border-color: var(--guide-line); border-radius: 12px; background: var(--guide-paper); color: var(--guide-text); }
.np-article .np-fold > summary { min-height: 48px; color: var(--guide-ink); }
.np-article .np-fold--quiz { background: var(--guide-soft); }
.np-article .np-widget__form { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.np-article :is(.np-widget__field input, .np-widget select) {
    color: var(--guide-ink); background: var(--guide-paper); border-color: var(--guide-line);
    border-radius: var(--guide-control-radius); min-height: 44px;
}
.np-article .np-widget__preset {
    background: var(--guide-paper); color: var(--guide-brand); border-color: var(--guide-line);
    border-radius: var(--guide-control-radius); min-height: 44px;
}
.np-article .np-widget__preset:hover { border-color: var(--guide-brand); }
/* Author display:grid/block rules must not expose the optional fifth band. */
.np-article .np-resistor-calculator [hidden] { display: none !important; }
.np-article :not(pre) > code { white-space: normal; overflow-wrap: anywhere; }
.np-article .np-code-block { background: var(--guide-soft); border: 1px solid var(--guide-line); border-radius: 12px; max-width: 100%; }
.np-article .np-code { background: var(--guide-soft); color: var(--guide-text); max-width: 100%; }
.np-article .np-code-bar { background: var(--guide-soft); color: var(--guide-ink); border-color: var(--guide-line); flex-wrap: wrap; min-width: 0; }
.np-article .np-code-bar > span { min-width: 0; overflow-wrap: anywhere; }
.np-article .np-code-copy { background: var(--guide-paper); color: var(--guide-brand); border-color: var(--guide-line); border-radius: var(--guide-control-radius); min-height: 44px; flex-shrink: 0; }
.np-article .np-code-copy:hover { background: var(--guide-paper); color: var(--guide-brand); border-color: var(--guide-brand); }
.np-article .np-code-copy.is-copied { color: #245d32; border-color: #245d32; }
.np-article .np-code-copy.is-failed { color: #92341b; border-color: #92341b; }
.np-article .np-actuator-calculator {
    background: var(--guide-soft); color: var(--guide-text);
    border-color: var(--guide-line); border-radius: var(--guide-radius); box-shadow: none;
}
.np-article .np-actuator-calculator__header { background: var(--guide-brand); color: var(--guide-paper); }
.np-article .np-actuator-calculator__header :is(h3, p) { color: var(--guide-paper); }
.np-article :is(.np-actuator-calculator__preset, .np-actuator-calculator__animate) {
    background: var(--guide-paper); color: var(--guide-brand); border-color: var(--guide-line);
    border-radius: var(--guide-control-radius);
}
.np-article :is(.np-actuator-calculator__preset, .np-actuator-calculator__animate):is(:hover, :focus-visible) {
    border-color: var(--guide-brand); box-shadow: none;
}
.np-article .np-actuator-calculator input[type="range"] { accent-color: var(--guide-brand); }
.np-article :is(.np-actuator-calculator__visual, .np-actuator-calculator__controls, .np-actuator-calculator__results) {
    background: var(--guide-paper); border-color: var(--guide-line); border-radius: 12px;
}
.np-article .np-actuator-calculator__visual svg { background: var(--guide-soft); }
.np-article :is(.np-actuator-calculator__controls legend, .np-actuator-calculator__control > span, .np-actuator-calculator__metric dd) { color: var(--guide-ink); }
.np-article .np-actuator-calculator__control input[type="number"] { color: var(--guide-ink); border-color: var(--guide-line); min-height: 44px; }
.np-article .np-actuator-calculator__metric { background: var(--guide-soft); }
.np-article .np-actuator-calculator__metric dt { color: var(--guide-muted); }
@media (max-width: 480px) {
    .np-article .np-card { padding: 18px; }
    .np-article table :is(th, td) { padding: 12px; }
}

/* Editorial product recommendations: shared by the BuyBox renderer, not
 * authored per guide. A comparison with products is a reading list, not a
 * row of tall shopping tiles. No content, prices, links or form semantics
 * are changed; regular non-shopping tool cards keep their existing grid. */
.np-article .np-cards:has(> .np-card > .np-buy) {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
}
.np-article .np-cards:has(> .np-card > .np-buy) > .np-card {
    display: block;
    padding: 24px 0;
    border: 0;
    border-bottom: 1px solid var(--guide-line);
    border-radius: 0;
}
.np-article .np-cards:has(> .np-card > .np-buy) > .np-card:first-child { padding-top: 0; }
.np-article .np-cards:has(> .np-card > .np-buy) > .np-card:last-child { border-bottom: 0; }
.np-article .np-cards:has(> .np-card > .np-buy) > .np-card > p { max-width: 72ch; margin: 10px 0 0; }
.np-article .np-buy {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr) auto;
    grid-template-areas: "name name name" "price stock action";
    gap: 8px 16px;
    align-items: center;
    min-width: 0;
    color: var(--guide-text);
}
.np-article .np-buy--row { grid-template-areas: "price stock action"; }
.np-article .np-buy > .np-buy__price { grid-area: price; min-width: 0; }
.np-article .np-buy > .np-buy__stock { grid-area: stock; font-size: 12px; white-space: normal; }
.np-article .np-buy > .np-buy__action { grid-area: action; margin: 0; justify-self: end; }
.np-article .np-buy > .np-buy__name {
    grid-area: name;
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
    color: var(--guide-brand);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    text-decoration: none;
    overflow-wrap: anywhere;
}
.np-article .np-buy > .np-buy__name:hover { text-decoration: underline; }
.np-article .np-buy > .np-buy__name[hidden] { display: none !important; }
.np-article .np-buy .np-buy__price .price { font-size: 16px; line-height: 1.4; color: var(--guide-ink); }
.np-article .np-buy .np-buy__price .old-price .price { font-size: 12px; color: var(--guide-muted); }
.np-article .np-buy .np-buy__button.action.primary,
.np-article .np-buy .np-buy__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    width: auto;
    max-width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--guide-brand);
    border-radius: var(--guide-control-radius);
    background: var(--guide-paper);
    color: var(--guide-brand) !important;
    font: 500 14px/1.4 var(--np-font);
    white-space: normal;
    text-decoration: none !important;
    box-shadow: none;
}
.np-article .np-buy :is(.np-buy__button.action.primary, .np-buy__link):hover {
    background: var(--guide-soft);
    border-color: var(--guide-brand);
    color: var(--guide-brand-hover) !important;
}
.np-article .np-card > .np-buy {
    background: var(--guide-soft);
    border: 0;
    border-radius: 10px;
    padding: 14px 16px;
    margin-top: 16px;
}
.np-article .np-card > .np-buy + .np-buy { margin-top: 8px; }
.np-article .np-parts > li > .np-buy { padding-top: 12px; }
.np-article .np-parts > li > .np-buy--row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "price stock" "action action";
}
.np-article .np-parts > li > .np-buy--row > .np-buy__stock {
    justify-self: end;
    text-align: right;
    white-space: nowrap;
}
.np-article .np-parts > li > .np-buy--row > .np-buy__action { justify-self: stretch; }
.np-article .np-parts > li > .np-buy--row :is(.np-buy__button.action.primary, .np-buy__link) {
    min-width: 120px;
    width: 100%;
}
.np-article .np-buy--card {
    grid-template-columns: 72px max-content minmax(0, 1fr) auto;
    grid-template-areas: "media name name action" "media price stock action";
    padding: 16px;
    border: 1px solid var(--guide-line);
    border-radius: 12px;
    background: var(--guide-paper);
}
.np-article .np-buy--card .np-buy__media { grid-area: media; align-self: center; }
.np-article .np-buy--card :is(.np-buy__media img, .product-image-photo, .product-image-wrapper) { width: 72px; height: 72px; }
.np-article .np-buy--card .product-image-container { width: 72px !important; }
.np-article .np-buy-box { background: var(--guide-soft); border: 1px solid var(--guide-line); border-radius: 12px; }
@media (max-width: 639px) {
    .np-article .np-buy { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name name" "price stock" "action action"; }
    .np-article .np-buy--row { grid-template-areas: "price stock" "action action"; }
    .np-article .np-buy > .np-buy__stock { justify-self: end; text-align: right; }
    .np-article .np-buy > .np-buy__action { justify-self: stretch; }
    .np-article .np-buy :is(.np-buy__button.action.primary, .np-buy__link) { width: 100%; }
    .np-article .np-buy--card { grid-template-columns: 64px minmax(0, 1fr) auto; grid-template-areas: "media name name" "media price stock" "action action action"; padding: 14px; gap: 10px; }
    .np-article .np-buy--card :is(.np-buy__media img, .product-image-photo, .product-image-wrapper) { width: 64px; height: 64px; }
    .np-article .np-buy--card .product-image-container { width: 64px !important; }
}

/* Related products sit outside article. The route + component double scope
 * prevents these secondary controls from affecting any storefront grid. */
.np-blog-page--post .np-post-products .np-product-card { border-color: var(--guide-line); border-radius: 12px; box-shadow: none; }
.np-blog-page--post .np-post-products .np-product-card__body { min-width: 0; }
.np-blog-page--post .np-post-products .np-product-card__name a {
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
    color: var(--guide-brand) !important;
    font-size: 15px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}
.np-blog-page--post .np-post-products .np-product-card__price { margin-top: auto; padding-top: 12px; }
.np-blog-page--post .np-post-products .np-product-card__price .price { font-size: 16px; }
.np-blog-page--post .np-post-products .np-product-card__stock { color: var(--guide-muted); }
.np-blog-page--post .np-post-products .np-product-card__actions { margin-top: 0; }
.np-blog-page--post .np-post-products .np-product-card__actions :is(.action.primary, .np-button) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--guide-brand);
    border-radius: var(--guide-control-radius);
    background: var(--guide-paper);
    color: var(--guide-brand) !important;
    font: 500 14px/1.4 var(--np-font);
    white-space: normal;
    text-decoration: none !important;
    box-shadow: none;
}
.np-blog-page--post .np-post-products .np-product-card__actions :is(.action.primary, .np-button):hover { background: var(--guide-soft); border-color: var(--guide-brand); color: var(--guide-brand-hover) !important; }
.np-blog-page--post .np-post-products :is(a, button):focus-visible { outline: 2px solid var(--guide-brand); outline-offset: 3px; }
