/*
 * nr-plan-grid — modern conversion-focused plan listing.
 *
 * Uses the existing brand tokens (--primary, --secondary, --graylight,
 * --black_light, --masterfont) and 2026 polish tokens (--nr-shadow-*,
 * --nr-motion-*, --nr-easing-*). All-in additive — palette, typography
 * and existing layout rules are untouched.
 */

.nr-plan-grid {
    --nr-pg-gap:           clamp(16px, 2.4vw, 28px);
    --nr-pg-card-pad:      clamp(20px, 2.4vw, 32px);
    /* Tighter, more architectural radii — Latitude/Vultr aesthetic.
       Was 18px / 10px / 999px-pill, now 4-6px on everything except
       the focus/hover rings + comparison-drawer pill. */
    --nr-pg-radius:        6px;
    --nr-pg-radius-sm:     4px;
    --nr-pg-radius-pill:   4px;
    --nr-pg-ink:           #263238;
    --nr-pg-ink-soft:      #5f5f5f;
    --nr-pg-line:          #e6ecef;
    --nr-pg-bg:            #ffffff;
    --nr-pg-bg-soft:       #f7fafc;
    --nr-pg-amd:           #e63946;
    --nr-pg-intel:         #0071c5;
    --nr-pg-shell:         1280px;

    font-family: var(--masterfont, "Mulish", system-ui, sans-serif);
    color: var(--nr-pg-ink);
    margin: 0 auto;
    padding: clamp(48px, 6vw, 88px) clamp(16px, 4vw, 32px) clamp(28px, 5vw, 56px);
    max-width: var(--nr-pg-shell);
    /* Full-bleed white background that hard-cuts against the dark sections
     * above and below — same pattern as .nr-pricing on /pricing/. The
     * ::before extends 100vw via the 50%/translateX trick so the white
     * reaches the viewport edges while the inner content stays
     * constrained to --nr-pg-shell. */
    position: relative;
    isolation: isolate;
}
.nr-plan-grid::before {
    content: "";
    position: absolute;
    top: 0; bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    z-index: -1;
    background: var(--nr-pg-bg, #ffffff);
    pointer-events: none;
}
/* When nested inside .nr-industry (industry pages), the parent shell
   already provides the max-width + horizontal padding — drop ours so
   we don't double-pad. */
.nr-industry .nr-plan-grid {
    max-width: none;
    padding-inline: 0;
    margin-inline: 0;
}

/* ── Lede ──────────────────────────────────────────────────────────── */
.nr-plan-grid__lede h2 {
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 24px;
    color: var(--nr-pg-ink);
}

/* ── Trust strip ──────────────────────────────────────────────────── */
.nr-plan-grid__trust {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    list-style: none;
    margin: 0 0 28px;
    padding: 0;
    background: var(--nr-pg-line);
    border: 1px solid var(--nr-pg-line);
    border-radius: var(--nr-pg-radius);
    overflow: hidden;
}
.nr-plan-grid__trust li {
    background: var(--nr-pg-bg);
    padding: 18px 16px;
    text-align: center;
}
.nr-plan-grid__trust-num {
    display: block;
    font-size: clamp(20px, 2.6vw, 28px);
    font-weight: 700;
    color: var(--primary, #14bb60);
    letter-spacing: -0.02em;
}
.nr-plan-grid__trust-label {
    display: block;
    font-size: 12px;
    margin-top: 4px;
    color: var(--nr-pg-ink-soft);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
@media (max-width: 720px) {
    .nr-plan-grid__trust { grid-template-columns: repeat(2, 1fr); }
}

/* ── Filter Bar (.nr-fb) ──────────────────────────────────────────
 * 2026-05-04 redesign — single-row dropdown bar.
 * Most-used filters (Brand, Region) render as inline chip clusters;
 * everything else opens a popover panel. Sort lives at the right.
 * Sticky on scroll, collapses to a "Filter" button + bottom-sheet on
 * mobile (<768px). Active filters render as pills in a band beneath
 * the row; result count + Bill toggle + View toggle in a bottom bar.
 *
 * Sticky offset is provided by --nr-sticky-offset (top menu height).
 */
.nr-fb {
    /* Sticky note: must sit above .nr-header.sticky-header which is
     * z-index:100. We use 110. Top offset is the on-scroll header height
     * (~64px) + a small breath of air. Page content can scroll the
     * toolbar past the top of the viewport because no ancestor in this
     * shortcode enforces overflow:hidden — the wpautop <p> wrapper used
     * to break sticky in some browsers, but mu-plugins/nr-content-cleanup
     * unwraps it. */
    position: sticky;
    top: calc(var(--nr-sticky-offset, 64px) + 8px);
    z-index: 110;
    margin-bottom: 18px;
    background: var(--nr-pg-bg);
    border: 1px solid var(--nr-pg-line);
    border-radius: var(--nr-pg-radius);
    box-shadow: 0 1px 0 rgba(38,50,56,.02), 0 8px 16px -8px rgba(38,50,56,.06);
    backdrop-filter: saturate(140%) blur(6px);
}

/* Filter row — chips + dropdown triggers + sort right-aligned */
.nr-fb__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 10px 12px;
    min-height: 56px;
}

/* Chip cluster — contiguous group (Brand, Region) */
.nr-fb__cluster {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0 6px 0 0;
    margin-right: 2px;
    border-right: 1px solid var(--nr-pg-line);
}
.nr-fb__cluster:last-child { border-right: 0; }

.nr-fb__chip {
    appearance: none;
    border: 1px solid var(--nr-pg-line);
    background: var(--nr-pg-bg);
    color: var(--nr-pg-ink);
    border-radius: var(--nr-pg-radius-pill);
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--nr-motion-fast, 150ms) var(--nr-easing-out, ease-out);
    line-height: 1.2;
}
.nr-fb__chip:hover { border-color: var(--primary, #14bb60); color: var(--primary, #14bb60); }
.nr-fb__chip[aria-pressed="true"] {
    background: var(--primary, #14bb60);
    border-color: var(--primary, #14bb60);
    color: #fff;
    box-shadow: 0 4px 10px rgba(20,187,96,.25);
}
/* Brand-coloured pressed states (Intel blue / AMD red) */
.nr-fb__chip--brand[aria-pressed="true"][data-nr-brand="amd"]   { background: var(--nr-pg-amd);   border-color: var(--nr-pg-amd);   box-shadow: 0 4px 10px rgba(230,57,70,.25); }
.nr-fb__chip--brand[aria-pressed="true"][data-nr-brand="intel"] { background: var(--nr-pg-intel); border-color: var(--nr-pg-intel); box-shadow: 0 4px 10px rgba(0,113,197,.25); }

/* Dropdown trigger — flat button with optional count badge */
.nr-fb__field {
    position: relative;
    display: inline-flex;
    align-items: stretch;
}
.nr-fb__field--right { margin-left: auto; }

.nr-fb__trigger {
    appearance: none;
    background: var(--nr-pg-bg);
    border: 1px solid var(--nr-pg-line);
    border-radius: var(--nr-pg-radius-sm);
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    color: var(--nr-pg-ink);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 1.25;
    transition: all var(--nr-motion-fast, 150ms) var(--nr-easing-out, ease-out);
}
.nr-fb__trigger:hover { border-color: var(--nr-pg-ink-soft); }
.nr-fb__trigger[aria-expanded="true"] {
    border-color: var(--primary, #14bb60);
    box-shadow: 0 0 0 3px rgba(20,187,96,.15);
}
.nr-fb__trigger.is-active {
    border-color: var(--primary, #14bb60);
    color: var(--primary, #14bb60);
}
.nr-fb__trigger-count {
    background: var(--primary, #14bb60);
    color: #fff;
    border-radius: 999px;
    padding: 1px 7px;
    font-size: 11px;
    font-weight: 700;
    min-width: 18px;
    text-align: center;
    line-height: 1.4;
}
.nr-fb__trigger-mini {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.10em;
    color: var(--nr-pg-ink-soft);
}
.nr-fb__trigger-chev { color: var(--nr-pg-ink-soft); font-size: 10px; }
.nr-fb__trigger--sort { padding-right: 14px; }

/* Active-filter pill band — slides between filter row and bottom bar */
.nr-fb__active {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 10px;
    padding: 10px 14px;
    border-top: 1px solid var(--nr-pg-line);
    background: rgba(20, 187, 96, 0.04);
}
.nr-fb__active[hidden] { display: none; }
.nr-fb__active-title {
    font: 700 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--primary, #14bb60);
}
.nr-fb__pills { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; min-width: 0; }
.nr-fb__clear {
    appearance: none;
    background: transparent;
    border: 0;
    color: var(--nr-pg-ink-soft);
    font: 600 12px/1 inherit;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all var(--nr-motion-fast, 150ms);
}
.nr-fb__clear:hover { color: var(--nr-pg-amd); background: rgba(230,57,70,.08); }

/* Bottom action bar — count + Bill + View */
.nr-fb__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 10px 14px;
    border-top: 1px solid var(--nr-pg-line);
    background: var(--nr-pg-bg-soft);
    border-radius: 0 0 var(--nr-pg-radius) var(--nr-pg-radius);
}
.nr-fb__count { font-size: 13px; color: var(--nr-pg-ink-soft); }
.nr-fb__count strong { color: var(--nr-pg-ink); font-size: 14px; font-weight: 700; margin-right: 4px; }
.nr-fb__count-of { font-size: 12px; }
.nr-fb__bottom-right {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.nr-fb__bill-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.10em;
    color: var(--nr-pg-ink-soft);
}
.nr-fb__view {
    display: inline-flex;
    background: var(--nr-pg-bg);
    border: 1px solid var(--nr-pg-line);
    border-radius: var(--nr-pg-radius-sm);
    padding: 3px;
    gap: 2px;
}
.nr-view-btn {
    appearance: none;
    background: transparent;
    border: 0;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--nr-pg-ink-soft);
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    transition: all var(--nr-motion-base, 220ms) var(--nr-easing-out, ease-out);
}
.nr-view-btn.is-active {
    background: var(--nr-pg-bg-soft);
    color: var(--nr-pg-ink);
    box-shadow: 0 1px 3px rgba(38,50,56,.08);
}

/* Hidden but kept for legacy sort JS hookup */
select#nr-plan-grid-sort[hidden] { display: none !important; }

/* Mobile collapse — single "Filters" button + sheet
 * <768 px the filter row collapses behind a single "Filters · N" button.
 * Tapping it slides the sheet up from the bottom. The bottom bar stays
 * visible (count + view) but Bill toggle wraps below. */
@media (max-width: 767px) {
    /* Mobile sticky-header is also fixed at top:0, ~56px tall. Toolbar
     * must clear it AND beat its z-index. */
    .nr-fb { position: sticky; top: var(--nr-sticky-offset-mobile, 60px); z-index: 110; }
    .nr-fb__row {
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 16px;
        max-height: 70vh;
        overflow-y: auto;
    }
    .nr-fb.is-sheet-open .nr-fb__row { display: flex; }
    .nr-fb__cluster {
        flex-wrap: wrap;
        border-right: 0;
        padding: 0;
        border-bottom: 1px solid var(--nr-pg-line);
        padding-bottom: 10px;
    }
    .nr-fb__field, .nr-fb__field--right { width: 100%; margin-left: 0; }
    .nr-fb__trigger { width: 100%; justify-content: space-between; }
    .nr-fb__sheet-toggle {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 9px 14px;
        margin: 10px 12px;
        background: var(--nr-pg-bg);
        border: 1px solid var(--nr-pg-line);
        border-radius: var(--nr-pg-radius-sm);
        font: 600 13px/1.2 inherit;
        color: var(--nr-pg-ink);
        cursor: pointer;
    }
    .nr-fb__sheet-toggle .nr-fb__sheet-toggle-count {
        background: var(--primary, #14bb60);
        color: #fff;
        border-radius: 999px;
        padding: 1px 7px;
        font-size: 11px;
        font-weight: 700;
        min-width: 18px;
        text-align: center;
    }
    .nr-fb__sheet-close {
        position: sticky;
        top: 0;
        align-self: flex-end;
        background: transparent;
        border: 0;
        font-size: 18px;
        color: var(--nr-pg-ink-soft);
        cursor: pointer;
        padding: 4px 8px;
        z-index: 1;
    }
}
@media (min-width: 768px) {
    .nr-fb__sheet-toggle, .nr-fb__sheet-close { display: none; }
}

/* ── Popover panel (shared by all dropdown filters) ───────────────── */
.nr-popover {
    position: absolute;
    z-index: 50;
    top: calc(100% + 6px);
    left: 0;
    margin-top: 0;
    min-width: 260px;
    max-width: 90vw;
    background: var(--nr-pg-bg);
    border: 1px solid var(--nr-pg-line);
    border-radius: var(--nr-pg-radius-sm);
    box-shadow: 0 16px 48px rgba(38,50,56,.15), 0 4px 8px rgba(38,50,56,.08);
    overflow: hidden;
    animation: nr-pop-in var(--nr-motion-base, 220ms) var(--nr-easing-out, ease-out);
}
.nr-fb__field--right .nr-popover { left: auto; right: 0; min-width: 220px; }
@keyframes nr-pop-in {
    from { opacity: 0; transform: translateY(-4px) scale(.98); }
    to   { opacity: 1; transform: translateY(0)    scale(1); }
}

/* ── Popover panel ───────────────────────────────────────────────── */
.nr-popover {
    position: absolute;
    z-index: 50;
    margin-top: 6px;
    min-width: 320px;
    max-width: 90vw;
    background: var(--nr-pg-bg);
    border: 1px solid var(--nr-pg-line);
    border-radius: var(--nr-pg-radius-sm);
    box-shadow: 0 16px 48px rgba(38,50,56,.15), 0 4px 8px rgba(38,50,56,.08);
    overflow: hidden;
    animation: nr-pop-in var(--nr-motion-base, 220ms) var(--nr-easing-out, ease-out);
}
@keyframes nr-pop-in {
    from { opacity: 0; transform: translateY(-4px) scale(.98); }
    to   { opacity: 1; transform: translateY(0)    scale(1); }
}
.nr-popover__search {
    padding: 12px;
    border-bottom: 1px solid var(--nr-pg-line);
    background: var(--nr-pg-bg-soft);
}
.nr-popover__search input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--nr-pg-line);
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
    background: var(--nr-pg-bg);
}
.nr-popover__search input:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px rgba(20,187,96,.15); }
.nr-popover__list {
    max-height: 320px;
    overflow-y: auto;
    padding: 6px 0;
}
.nr-popover__group { margin-bottom: 4px; }
.nr-popover__group-title {
    margin: 12px 14px 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.10em;
    color: var(--nr-pg-ink-soft);
}
.nr-popover__group-title span { opacity: .4; margin: 0 4px; }
.nr-popover__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 14px;
    cursor: pointer;
    font-size: 13.5px;
    color: var(--nr-pg-ink);
    transition: background var(--nr-motion-fast, 150ms);
}
.nr-popover__item:hover { background: var(--nr-pg-bg-soft); }
.nr-popover__item input { accent-color: var(--primary, #14bb60); cursor: pointer; }
.nr-popover__item-label { flex: 1; }
.nr-popover__item-cc {
    font-size: 10px;
    font-weight: 700;
    background: var(--nr-pg-bg-soft);
    color: var(--nr-pg-ink-soft);
    padding: 2px 6px;
    border-radius: 4px;
}
.nr-popover__item--hidden { display: none; }
.nr-popover__group--hidden { display: none; }
.nr-popover__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-top: 1px solid var(--nr-pg-line);
    background: var(--nr-pg-bg-soft);
    font-size: 12px;
    color: var(--nr-pg-ink-soft);
}
.nr-popover__hint kbd {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 10px;
    background: var(--nr-pg-bg);
    border: 1px solid var(--nr-pg-line);
    border-radius: 3px;
    padding: 1px 5px;
    box-shadow: 0 1px 0 var(--nr-pg-line);
}
.nr-link-btn {
    appearance: none;
    background: transparent;
    border: 0;
    color: var(--primary, #14bb60);
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
}
.nr-link-btn:hover { text-decoration: underline; }

/* ── Brand chip variants ─────────────────────────────────────────── */
.nr-chip--brand[aria-pressed="true"][data-nr-brand="amd"]   { background: var(--nr-pg-amd);   border-color: var(--nr-pg-amd);   box-shadow: 0 4px 10px rgba(230,57,70,.25); }
.nr-chip--brand[aria-pressed="true"][data-nr-brand="intel"] { background: var(--nr-pg-intel); border-color: var(--nr-pg-intel); box-shadow: 0 4px 10px rgba(0,113,197,.25); }

/* ── Price range slider (dual-thumb, no JS lib) ──────────────────── */
.nr-plan-grid__facet--price { min-width: 220px; flex: 1 1 220px; }
.nr-price-range {
    position: relative;
    height: 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}
.nr-price-range input[type="range"] {
    position: absolute;
    top: 12px;
    left: 0;
    width: 100%;
    height: 4px;
    background: transparent;
    appearance: none;
    pointer-events: none;
    margin: 0;
}
.nr-price-range::before {
    content: "";
    position: absolute;
    top: 12px; left: 0; right: 0;
    height: 4px;
    background: var(--nr-pg-line);
    border-radius: 2px;
}
.nr-price-range input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: var(--primary, #14bb60);
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(20,187,96,.40);
    cursor: pointer;
    pointer-events: auto;
    transition: transform var(--nr-motion-fast, 150ms);
}
.nr-price-range input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.15); }
.nr-price-range input[type="range"]::-moz-range-thumb {
    width: 16px; height: 16px;
    border-radius: 50%;
    background: var(--primary, #14bb60);
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(20,187,96,.40);
    cursor: pointer;
    pointer-events: auto;
}
.nr-price-range__readout {
    margin-top: 22px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--nr-pg-ink-soft);
    font-weight: 600;
}

/* ── Active-filter pills band ─────────────────────────────────────
 * Sits between the toolbar and the cards. Tinted brand-green so it's
 * clearly an "active state" band — at-a-glance signal that filters
 * are narrowing the result set. Always present in the DOM; toggled
 * visible via .is-active by JS when the user clicks any filter chip. */
.nr-plan-grid__status {
    display: none;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 14px;
    padding: 12px 16px;
    background: rgba(20, 187, 96, 0.05);
    border: 1px solid rgba(20, 187, 96, 0.18);
    border-radius: var(--nr-pg-radius-sm);
    margin-bottom: 16px;
}
.nr-plan-grid__status.is-active { display: flex; }
.nr-plan-grid__status::before {
    content: "Active";
    font: 700 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--primary, #14bb60);
    margin-right: 4px;
}
.nr-plan-grid__pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
    min-width: 0;
}
.nr-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--nr-pg-bg);
    border: 1px solid var(--nr-pg-line);
    border-radius: var(--nr-pg-radius-sm);
    padding: 3px 4px 3px 10px;
    font-size: 12px;
    color: var(--nr-pg-ink);
    line-height: 1.4;
}
.nr-pill__remove {
    appearance: none;
    background: var(--nr-pg-bg-soft);
    border: 0;
    width: 18px; height: 18px;
    border-radius: 999px;
    color: var(--nr-pg-ink-soft);
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
    transition: all var(--nr-motion-fast, 150ms);
}
.nr-pill__remove:hover { background: var(--nr-pg-amd); color: #fff; }
.nr-plan-grid__counts {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 12px;
    color: var(--nr-pg-ink-soft);
}
.nr-plan-grid__count { font-weight: 700; color: var(--nr-pg-ink); font-size: 14px; }

/* ── Card grid ────────────────────────────────────────────────────── */
.nr-plan-grid__cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--nr-pg-gap);
}

.nr-plan-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--nr-pg-bg);
    border: 1px solid var(--nr-pg-line);
    border-radius: var(--nr-pg-radius);
    padding: var(--nr-pg-card-pad);
    transition: all var(--nr-motion-base, 220ms) var(--nr-easing-out, ease-out);
    box-shadow: var(--nr-shadow-xs, 0 1px 2px rgba(38,50,56,.04));
    overflow: hidden;
}
.nr-plan-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary, #14bb60) 0%, var(--secondary, #52a7ff) 100%);
    opacity: 0;
    transition: opacity var(--nr-motion-base, 220ms);
}
.nr-plan-card:hover {
    transform: translateY(-3px);
    border-color: transparent;
    box-shadow: var(--nr-shadow-lg, 0 12px 28px rgba(38,50,56,.10));
}
.nr-plan-card:hover::before { opacity: 1; }

.nr-plan-card.is-popular {
    border: 1px solid var(--primary, #14bb60);
    box-shadow: 0 0 0 4px rgba(20,187,96,.10);
}
.nr-plan-card.is-popular::before { opacity: 1; }

/* Compact corner badge instead of the diagonal ribbon — sharper, less
   skeuomorphic, lets the card border keep clean square corners. */
.nr-plan-card__ribbon {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--primary, #14bb60);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 0 var(--nr-pg-radius) 0 var(--nr-pg-radius-sm);
}

.nr-plan-card__brand {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #fff;
    background: var(--nr-pg-ink-soft);
    padding: 3px 8px;
    border-radius: 4px;
    margin: 0 0 10px;
}
.nr-plan-card__brand--amd   { background: var(--nr-pg-amd); }
.nr-plan-card__brand--intel { background: var(--nr-pg-intel); }

.nr-plan-card__title {
    font-size: 19px;
    font-weight: 700;
    margin: 0;
    color: var(--nr-pg-ink);
    letter-spacing: -0.01em;
    line-height: 1.25;
}
.nr-plan-card__chassis {
    margin: 4px 0 0;
    font-size: 13px;
    color: var(--nr-pg-ink-soft);
}

.nr-plan-card__specs {
    list-style: none;
    margin: 18px 0;
    padding: 16px 0;
    border-top: 1px solid var(--nr-pg-line);
    border-bottom: 1px solid var(--nr-pg-line);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 16px;
}
.nr-plan-card__specs li { font-size: 13px; line-height: 1.4; }
.nr-plan-card__spec--wide { grid-column: 1 / -1; }
.nr-plan-card__spec-k {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--nr-pg-ink-soft);
    margin-bottom: 2px;
}
.nr-plan-card__spec-v { color: var(--nr-pg-ink); font-weight: 600; }

/* Location chip grid — 3 columns, equal-width tiles. Switching from
 * flex-wrap with content-sized chips to a 3-up grid keeps the locations
 * row tidy as cities are added: rows always read as a clean 3 × N matrix
 * instead of a ragged "3 + 2" or "5 wide" depending on label length.
 * Slightly tighter padding + truncating overflow keeps long city names
 * (e.g. "Hong Kong", "New York") from breaking the layout. */
.nr-plan-card__locs {
    list-style: none;
    margin: 0 0 18px;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}
.nr-plan-card__loc {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    background: var(--nr-pg-bg-soft);
    border: 1px solid var(--nr-pg-line);
    border-radius: 4px;
    padding: 3px 8px;
    color: var(--nr-pg-ink-soft);
    min-width: 0;          /* allow flex children to shrink inside the grid track */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.nr-plan-card__loc-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}
.nr-plan-card__loc-cc { font-weight: 700; color: var(--nr-pg-ink); font-size: 10px; }

.nr-plan-card__footer {
    /* The semantic <footer> element inside the card. Defensively reset
       the theme-wide `footer { background:#051F38; padding:80px 0;
       color:var(--white) }` rule from main.css:681 — that rule was
       written for the page-level <footer> and bleeds into nested ones. */
    background: transparent;
    padding: 6px 0 0;
    color: inherit;
    margin-top: auto;
}
.nr-plan-card__footer h6,
.nr-plan-card__footer a,
.nr-plan-card__footer p { color: inherit; }
.nr-plan-card__price {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 14px;
}
.nr-plan-card__price-from { font-size: 12px; color: var(--nr-pg-ink-soft); text-transform: uppercase; letter-spacing: 0.06em; }
.nr-plan-card__price-amount { font-size: clamp(26px, 3vw, 32px); font-weight: 800; color: var(--nr-pg-ink); letter-spacing: -0.02em; }
.nr-plan-card__price-unit { font-size: 14px; color: var(--nr-pg-ink-soft); }
/* Strike-through "was X" pre-discount price — JS unhides + fills when
 * the user toggles to /qtr or /yr. Hidden on /mo (no discount).
 * Also reused inside the table view + compare modal cells.
 *
 * Visual treatment: red + bold + sized to read at a glance against the
 * larger discounted-price digits. Subtle enough not to compete with the
 * actual price, loud enough that the savings are obvious. */
.nr-plan-card__price-strike,
.nr-tbl-price__strike,
.nr-cmp-price__strike {
    font-size: 17px;
    color: var(--nr-pg-amd, #e63946);
    text-decoration: line-through;
    text-decoration-thickness: 1.5px;
    text-decoration-color: var(--nr-pg-amd, #e63946);
    margin-right: 6px;
    font-weight: 700;
    letter-spacing: -0.01em;
}
/* Compare modal cells are smaller — nudge the strike down to match. */
.nr-cmp-price__strike { font-size: 14px; margin-right: 4px; }
/* Table-view price cells are tighter still. */
.nr-tbl-price__strike { font-size: 13px; margin-right: 3px; }
.nr-plan-card__price-strike[hidden],
.nr-tbl-price__strike[hidden] { display: none; }

.nr-plan-card__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.nr-plan-card__compare {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--nr-pg-ink-soft);
    cursor: pointer;
    user-select: none;
}
.nr-plan-card__compare input { accent-color: var(--primary, #14bb60); cursor: pointer; }

/* ── Buttons (scoped) ─────────────────────────────────────────────
 * These rules used to be unscoped — they leaked out of the plan
 * grid and clobbered site-wide button styling, including the brand
 * green which fails WCAG AA contrast (#14bb60 = 2.92:1 with white).
 * The canonical button styling lives in nr-site-polish.css; this
 * file only customises buttons that appear INSIDE the plan grid
 * (compact size, plan-grid colour tokens). Scoped with .nr-plan-grid
 * parent selector to prevent the global leak. */
.nr-plan-grid .nr-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: var(--nr-pg-radius);    /* sharper, Latitude/Vultr-style */
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    background: var(--nr-pg-bg);
    color: var(--nr-pg-ink);
    transition: all var(--nr-motion-fast, 150ms) var(--nr-easing-out, ease-out);
    font-family: inherit;
}
.nr-plan-grid .nr-btn--small { padding: 6px 12px; font-size: 12px; }
.nr-plan-grid .nr-btn--primary {
    background: #0c8b48;       /* 5.69:1 with #fff — WCAG AA pass */
    color: #fff;
    box-shadow: 0 4px 12px rgba(12, 139, 72, 0.30);
}
.nr-plan-grid .nr-btn--primary:hover {
    background: #0a763d;       /* 6.99:1 — AAA */
    box-shadow: 0 8px 20px rgba(12, 139, 72, 0.45);
    transform: translateY(-1px);
    color: #fff;
}
.nr-plan-grid .nr-btn--ghost {
    border-color: var(--nr-pg-line);
    color: var(--nr-pg-ink-soft);
}
.nr-plan-grid .nr-btn--ghost:hover { color: var(--nr-pg-ink); border-color: var(--nr-pg-ink-soft); }

/* ── Table view ───────────────────────────────────────────────────── */
.nr-plan-grid__table {
    background: var(--nr-pg-bg);
    border: 1px solid var(--nr-pg-line);
    border-radius: var(--nr-pg-radius);
    overflow: auto;
    box-shadow: var(--nr-shadow-sm, 0 2px 4px rgba(38,50,56,.04));
}
.nr-plan-grid__table table { width: 100%; border-collapse: collapse; font-size: 13px; }
.nr-plan-grid__table th {
    background: var(--nr-pg-bg-soft);
    text-align: left;
    padding: 14px 16px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--nr-pg-ink-soft);
    border-bottom: 1px solid var(--nr-pg-line);
    white-space: nowrap;
}
.nr-plan-grid__table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--nr-pg-line);
    color: var(--nr-pg-ink);
    vertical-align: middle;
}
.nr-plan-grid__table tbody tr { transition: background var(--nr-motion-fast, 150ms); }
.nr-plan-grid__table tbody tr:hover { background: var(--nr-pg-bg-soft); }
.nr-tbl-name small { color: var(--nr-pg-ink-soft); font-weight: 400; }
.nr-tbl-brand { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: 0.10em; color: #fff; background: var(--nr-pg-ink-soft); padding: 2px 6px; border-radius: 3px; }
.nr-tbl-brand--amd   { background: var(--nr-pg-amd); }
.nr-tbl-brand--intel { background: var(--nr-pg-intel); }
.nr-tbl-price strong { font-size: 16px; font-weight: 800; letter-spacing: -0.01em; }

/* ── Empty state ──────────────────────────────────────────────────── */
.nr-plan-grid__empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--nr-pg-ink-soft);
    font-size: 15px;
    background: var(--nr-pg-bg-soft);
    border: 1px dashed var(--nr-pg-line);
    border-radius: var(--nr-pg-radius);
    margin: 0;
}

/* ── Compare drawer (sticky bottom) ───────────────────────────────── */
.nr-compare-drawer {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(0);
    z-index: 1000;
    width: max-content;
    max-width: min(92vw, 760px);
    background: var(--nr-pg-ink);
    color: #fff;
    border-radius: 999px;
    padding: 10px 14px 10px 22px;
    box-shadow: 0 20px 50px rgba(0,0,0,.35), 0 4px 12px rgba(0,0,0,.20);
    display: none;
    align-items: center;
    gap: 14px;
    font-family: var(--masterfont, "Mulish", system-ui, sans-serif);
}
/* JS toggles `.is-shown` when ≥2 plans are checked. Class-based show/hide
   replaces the previous `[hidden]` attribute + CSS transition combo,
   which had a viewport-dependent bug where transitions occasionally got
   stuck with currentTime: 0 (drawer parked at translateY(140%) opacity:0
   and never animated in). Class toggle is bulletproof. */
.nr-compare-drawer.is-shown {
    display: flex;
    /* Subtle entry — keyframe-based, not transition-based, so it always
       fires when the class is added. */
    animation: nr-compare-drawer-in 220ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes nr-compare-drawer-in {
    from { transform: translateX(-50%) translateY(140%); opacity: 0; }
    to   { transform: translateX(-50%) translateY(0);    opacity: 1; }
}
.nr-compare-drawer__items {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}
.nr-compare-drawer__chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,.10);
    color: #fff;
    border-radius: var(--nr-pg-radius-sm);
    padding: 4px 10px 4px 8px;
    font-size: 12px;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.nr-compare-drawer__chip-x {
    width: 18px; height: 18px;
    border: 0;
    background: rgba(255,255,255,.15);
    color: #fff;
    border-radius: 999px;
    font-size: 14px; line-height: 1;
    cursor: pointer;
    transition: background var(--nr-motion-fast, 150ms);
}
.nr-compare-drawer__chip-x:hover { background: rgba(255,255,255,.30); }
.nr-compare-drawer__actions { display: flex; gap: 6px; align-items: center; }
.nr-compare-drawer .nr-btn--ghost {
    background: transparent;            /* defeat the white inherited from .nr-btn base */
    color: rgba(255,255,255,.75);
    border-color: rgba(255,255,255,.18);
}
.nr-compare-drawer .nr-btn--ghost:hover {
    background: rgba(255,255,255,.08);
    color: #fff;
    border-color: rgba(255,255,255,.40);
}

/* ── Compare modal ───────────────────────────────────────────────── */
/* Use the canonical `inset:0; margin:auto` recipe — works because
   <dialog> shown via showModal() is in the top layer where this gives
   exact viewport centring. The previous `top:50%; left:50%; inset:auto`
   combo had a bug: inset shorthand declared after top/left wins and
   resets every side to auto, killing the centring. */
.nr-compare-modal {
    position: fixed !important;
    inset: 0 !important;
    margin: auto !important;
    border: 0;
    border-radius: var(--nr-pg-radius);
    padding: 0;
    width: min(96vw, 1100px);
    height: max-content;
    max-height: min(90vh, 820px);
    box-shadow: 0 24px 60px rgba(0,0,0,.30);
    color: var(--nr-pg-ink);
    background: #fff;
    font-family: var(--masterfont, "Mulish", system-ui, sans-serif);
}
.nr-compare-modal::backdrop { background: rgba(0,0,0,.50); backdrop-filter: blur(4px); }
.nr-compare-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--nr-pg-line);
}
.nr-compare-modal__header h2 { margin: 0; font-size: 20px; font-weight: 700; }
.nr-compare-modal__close {
    appearance: none;
    background: transparent;
    border: 0;
    width: 36px; height: 36px;
    border-radius: 50%;
    font-size: 22px;
    cursor: pointer;
    color: var(--nr-pg-ink-soft);
    transition: all var(--nr-motion-fast, 150ms);
}
.nr-compare-modal__close:hover { background: var(--nr-pg-bg-soft); color: var(--nr-pg-ink); }
.nr-compare-modal__body { padding: 24px; overflow: auto; max-height: 70vh; }
.nr-compare-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.nr-compare-table th { text-align: left; padding: 12px 14px; background: var(--nr-pg-bg-soft); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--nr-pg-ink-soft); border-bottom: 1px solid var(--nr-pg-line); }
.nr-compare-table td { padding: 14px; border-bottom: 1px solid var(--nr-pg-line); }
.nr-compare-table .nr-cmp-best { background: rgba(20,187,96,.06); font-weight: 700; }
.nr-compare-table .nr-cmp-row-key { font-weight: 600; color: var(--nr-pg-ink-soft); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; width: 140px; }

/* ── Reduced motion ──────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .nr-plan-card, .nr-plan-card:hover,
    .nr-btn, .nr-btn:hover,
    .nr-chip, .nr-compare-drawer,
    .nr-plan-card::before {
        transition: none !important;
        transform: none !important;
        animation: none !important;
    }
}

/* ── Feature badges (Instant deploy, Free DDoS) ───────────────────── */
.nr-plan-card__head-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}
.nr-plan-card__brand {
    margin: 0;
}
.nr-plan-card__badges {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: flex-end;
}
.nr-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 3px 7px;
    border-radius: 3px;
    line-height: 1;
    cursor: default;
    white-space: nowrap;
}
.nr-badge svg { flex-shrink: 0; }
.nr-badge--instant {
    background: rgba(255, 184, 0, .14);
    color: #b87a00;
    border: 1px solid rgba(255, 184, 0, .35);
}
.nr-badge--ddos {
    background: rgba(20, 187, 96, .12);
    color: #0a8a4d;
    border: 1px solid rgba(20, 187, 96, .35);
}
/* Feature filter chips reuse the chip component but show their own
   color when pressed (Instant = amber, DDoS = green). */
.nr-chip--feature {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.nr-chip--feature[data-nr-feat="instant"][aria-pressed="true"] {
    background: #ffb800; border-color: #ffb800; color: #2a1d00;
    box-shadow: 0 4px 10px rgba(255, 184, 0, .30);
}
.nr-chip--feature[data-nr-feat="ddos"][aria-pressed="true"] {
    background: var(--primary, #14bb60); border-color: var(--primary, #14bb60); color: #fff;
}

/* ── Country flag chips inside cards ──────────────────────────────── */
.nr-plan-card__loc-flag {
    font-size: 14px;
    line-height: 1;
}
/* Replace the previous lower-case nation badge with the flag emoji.
   Hide the old .nr-plan-card__loc-cc element if any prior render emits it. */
.nr-plan-card__loc-cc { display: none; }

/* ── Dense table — split CPU/RAM/Storage/Network/BW columns ───────── */
.nr-plan-grid__table-dense {
    font-size: 13px;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}
.nr-plan-grid__table-dense th,
.nr-plan-grid__table-dense td {
    padding: 10px 10px;
    vertical-align: middle;
    line-height: 1.4;
}
/* Killing the table's :hover row colour — that was causing the
   "stuck-highlight on first row" effect that read as a bug. */
.nr-plan-grid__table-dense tbody tr:hover { background: transparent; }
.nr-plan-grid__table-dense tbody tr + tr td { border-top: 1px solid var(--nr-pg-line); }

.nr-plan-grid__table-dense .nr-tbl-name {
    min-width: 220px;
    max-width: 320px;
}
.nr-plan-grid__table-dense .nr-tbl-name .nr-tbl-brand { display: inline-block; margin-right: 6px; vertical-align: middle; }
.nr-plan-grid__table-dense .nr-tbl-name strong       { display: inline-block; vertical-align: middle; font-weight: 700; color: var(--nr-pg-ink); }
.nr-plan-grid__table-dense .nr-tbl-name small        { display: block; color: var(--nr-pg-ink-soft); margin-top: 2px; font-weight: 400; font-size: 11px; }

.nr-plan-grid__table-dense .nr-tbl-col-cpu,
.nr-plan-grid__table-dense .nr-tbl-col-storage,
.nr-plan-grid__table-dense .nr-tbl-col-network { white-space: normal; }
.nr-plan-grid__table-dense .nr-tbl-col-cpu     { min-width: 170px; max-width: 220px; }
.nr-plan-grid__table-dense .nr-tbl-col-storage { min-width: 140px; max-width: 200px; }
.nr-plan-grid__table-dense .nr-tbl-col-feat,
.nr-plan-grid__table-dense .nr-tbl-feat        { white-space: normal; }
.nr-plan-grid__table-dense .nr-tbl-feat .nr-badge { margin-right: 4px; margin-bottom: 2px; }

.nr-plan-grid__table-dense .nr-tbl-flag {
    display: inline-block;
    font-size: 16px;
    line-height: 1;
    margin-right: 4px;
    vertical-align: middle;
}
.nr-plan-grid__table-dense .nr-tbl-col-locs   { white-space: normal; min-width: 90px; max-width: 160px; }
.nr-plan-grid__table-dense .nr-tbl-col-price,
.nr-plan-grid__table-dense .nr-tbl-price       { text-align: right; white-space: nowrap; }
.nr-plan-grid__table-dense .nr-tbl-col-cta     { width: 110px; }

/* Responsive column hiding — keep the table fitting the screen
   without horizontal scroll. The Configure CTA must always be visible
   (it's the action). The CTA cell now hosts 3 region buttons (≈180 px
   wide), so we drop columns one breakpoint earlier than before to make
   room. Sacrifice order: Network → BW → Features → Locations → Storage. */
@media (max-width: 1400px) {
    .nr-plan-grid__table-dense .nr-tbl-col-network,
    .nr-plan-grid__table-dense td:nth-of-type(6) { display: none; }
}
@media (max-width: 1200px) {
    .nr-plan-grid__table-dense .nr-tbl-col-bw,
    .nr-plan-grid__table-dense td:nth-of-type(7) { display: none; }
}
@media (max-width: 920px) {
    .nr-plan-grid__table-dense .nr-tbl-col-feat,
    .nr-plan-grid__table-dense td:nth-of-type(9) { display: none; }
}
@media (max-width: 760px) {
    .nr-plan-grid__table-dense .nr-tbl-col-locs,
    .nr-plan-grid__table-dense td:nth-of-type(8) { display: none; }
    .nr-plan-grid__table-dense .nr-tbl-col-storage,
    .nr-plan-grid__table-dense td:nth-of-type(5) { display: none; }
}
/* Below this width the cards view is the better experience. */
@media (max-width: 600px) {
    .nr-plan-grid__view [data-nr-view="table"] { display: none; }
}

/* ── Billing toggle inside the toolbar (Mo / Qtr / Yr) ────────────── */
.nr-pg-billing {
    display: inline-flex;
    background: var(--nr-pg-bg-soft);
    border: 1px solid var(--nr-pg-line);
    border-radius: var(--nr-pg-radius-sm);
    padding: 2px;
    gap: 1px;
}
.nr-pg-bill {
    appearance: none;
    background: transparent;
    border: 0;
    padding: 5px 10px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--nr-pg-ink-soft);
    cursor: pointer;
    border-radius: 3px;
    transition: all var(--nr-motion-fast, 150ms) var(--nr-easing-out, ease-out);
}
.nr-pg-bill:hover { color: var(--nr-pg-ink); }
.nr-pg-bill.is-active {
    background: var(--nr-pg-bg);
    color: var(--primary, #14bb60);
    box-shadow: 0 1px 3px rgba(15,28,46,.08);
}

/* Unmetered chip — bold accent, the "no limits" semantic. */
.nr-chip--unmetered {
    background: linear-gradient(135deg, var(--primary, #14bb60), #11a655);
    border-color: transparent;
    color: #fff;
    font-weight: 700;
}
.nr-chip--unmetered[aria-pressed="true"] {
    box-shadow: 0 0 0 3px rgba(20, 187, 96, .25);
}

/* Pricing chip — visual emphasis ($, $$, $$$, $$$$ become bigger/bolder) */
.nr-chip--price {
    font-weight: 700;
    letter-spacing: 0.04em;
    min-width: 42px;
    justify-content: center;
}

/* Empty Pro Features cell in dense table */
.nr-tbl-feat-empty {
    color: var(--nr-pg-line);
    font-weight: 400;
}

/* Better facet alignment — equal min-height so all facets settle */
.nr-plan-grid__facet { min-height: 64px; }

/* ── Billing toggle: percentage micro-pills (+10% red / +5% red / best green) */
.nr-pg-bill {
    gap: 6px;
}
.nr-pg-bill__pct {
    display: inline-block;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 1px 4px;
    border-radius: 3px;
    line-height: 1.3;
    text-transform: lowercase;
}
.nr-pg-bill__pct--up   { background: rgba(230, 57, 70, .12); color: #c73340; }
.nr-pg-bill__pct--best { background: rgba(20, 187, 96, .14); color: var(--primary, #14bb60); }

/* ── ESC pill in popover (replaces <kbd> which CSS-resets sometimes hide) */
.nr-kbd {
    display: inline-block;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 10px;
    font-weight: 700;
    background: var(--nr-pg-bg);
    border: 1px solid var(--nr-pg-line);
    border-radius: 3px;
    padding: 1px 5px;
    box-shadow: 0 1px 0 var(--nr-pg-line);
    color: var(--nr-pg-ink-soft);
}

/* ── Card: SKU mono-tag in the head row, marketing name as title */
.nr-plan-card__sku {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 10px;
    color: var(--nr-pg-ink-soft);
    background: var(--nr-pg-bg-soft);
    padding: 1px 6px;
    border-radius: 3px;
    margin-left: auto;
    align-self: center;
}
.nr-plan-card__spec-up { display: inline-block; font-size: 10px; color: var(--nr-pg-ink-soft); font-weight: 500; margin-left: 2px; }

/* ── Pro feature pills (per-type semantic) ──
 * Equal-width 3-column grid, matching the location-chip layout below.
 * Pills always lay out as a clean N × 3 matrix and never wrap into
 * ragged 2-then-1 rows when the badge count isn't a multiple of three. */
.nr-plan-card__pro {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
}
.nr-pro {
    display: inline-flex;
    align-items: center;
    justify-content: center;     /* centre label inside each grid cell */
    text-align: center;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 4px 6px;
    border-radius: 3px;
    line-height: 1.1;
    background: var(--nr-pg-bg-soft);
    border: 1px solid var(--nr-pg-line);
    color: var(--nr-pg-ink-soft);
    cursor: default;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.nr-pro--instant       { background: rgba(255,184,0,.12); color: #b87a00; border-color: rgba(255,184,0,.30); }
.nr-pro--ddos          { background: rgba(20,187,96,.10); color: #0a8a4d; border-color: rgba(20,187,96,.28); }
.nr-pro--ha            { background: rgba(82,167,255,.12); color: #1e6cc4; border-color: rgba(82,167,255,.28); }
.nr-pro--backups       { background: rgba(82,167,255,.10); color: #1e6cc4; border-color: rgba(82,167,255,.24); }
.nr-pro--dedicated-cpu { background: rgba(15,28,46,.07); color: #0f1c2e; border-color: rgba(15,28,46,.18); }
.nr-pro--shared-cpu    { background: rgba(95,95,95,.08); color: #5f5f5f; border-color: rgba(95,95,95,.20); }
.nr-pro--best-value    { background: rgba(240,134,8,.12); color: #b86706; border-color: rgba(240,134,8,.28); }
/* HI-DENSITY (colocation): bold red — fires on plans whose power
 * density meets the threshold (default 8 kW). Visually loud on purpose;
 * for HPC / GPU buyers scanning the colo grid this is the differentiator. */
.nr-pro--hi-density    {
    background: rgba(230,57,70,.10);
    color: #c92a3b;
    border-color: rgba(230,57,70,.42);
    font-weight: 800;
}
.nr-pro--guarantee     {
    background: linear-gradient(135deg, rgba(20,187,96,.18), rgba(82,167,255,.14));
    color: #0a6f3f;
    border-color: rgba(20,187,96,.30);
    font-weight: 800;
}

/* ── Series badges (replace the old INTEL/AMD/OTHER brand badge).
   Color-coded per product-family so you can scan a card grid and
   pick the right tier at a glance. */
.nr-plan-card__series {
    display: inline-block;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.14em;
    color: #fff;
    background: #5f5f5f;          /* fallback */
    padding: 4px 9px;
    border-radius: 3px;
    margin: 0;
    line-height: 1.2;
    text-transform: uppercase;
}
.nr-plan-card__series--edge        { background: #f08608; }            /* clock-speed orange */
.nr-plan-card__series--memory      { background: #0071c5; }            /* high-RAM blue */
.nr-plan-card__series--compute     { background: #14bb60; }            /* many-core green */
.nr-plan-card__series--frontier    { background: #4b3a8b; }            /* flagship purple */
.nr-plan-card__series--flex        { background: #06aaa6; }            /* flexible / value teal — shared-CPU cloud */
.nr-plan-card__series--dedicated   { background: #0f5e6a; }            /* premium deep teal — dedicated-CPU cloud (Optimized Cloud) */
.nr-plan-card__series--starter     { background: #8a8a8a; }            /* entry grey */
.nr-plan-card__series--accelerator { background: #e63946; }            /* GPU red */
.nr-plan-card__series--rack        { background: #8b6f47; }            /* colocation brown — full / private rack */
.nr-plan-card__series--shared      { background: #6b7d8c; }            /* shared-colo slate — sub-rack / multi-tenant */
.nr-plan-card__series--secured     { background: #3a5f8a; }            /* secured-colo steel blue — private cabinets, up to ~20 kW */
.nr-plan-card__series--express     { background: #ff8b00; }            /* express-colo orange — 24h delivery, urgency cue */
.nr-plan-card__series--hi-density  { background: #c92a3b; }            /* HD red — high-power colocation footprints (≥ 8 kW) */
.nr-plan-card__series--unmetered   { background: #0a8a4d; }            /* deep brand-green — unmetered-bandwidth bare-metal line */
.nr-plan-card__series--bandwidth   { background: #2a7fc4; }            /* network blue */

/* Compact "mini" pro-feature pills for table view — single character
   or 2-letter abbreviation keeps the Features column tight and rows
   aligned (was stacking 3+ full-text pills vertically and ruining
   row baseline). */
.nr-pro--mini {
    /* Fixed-size square badge so all features icons line up the same
     * width/height, no matter how many letters the abbreviation is. */
    width: 22px;
    height: 22px;
    padding: 0;
    font-size: 11px;
    line-height: 1;
    letter-spacing: 0;
    margin: 0 3px 2px 0;
    justify-content: center;
    display: inline-flex;
    align-items: center;
    box-sizing: border-box;
    flex-shrink: 0;
}
.nr-tbl-feat {
    white-space: normal;
    line-height: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    align-items: center;
}

/* ─────────────────────────────────────────────────────────────────────
 * Regional order buttons + availability states (2026-05-04 — round 4)
 *
 * Three buttons per plan: EU / Americas / APAC. Available regions
 * render as the brand-green CTA; regions where order_url_<region> is
 * empty render as a greyed-out non-clickable variant. The whole block
 * branches by availability state (handled in PHP — see
 * nr_plan_grid_render_order_block()):
 *   - available   → 3 buttons, greyed where URL absent
 *   - low_stock   → 3 buttons + amber status ribbon
 *   - sold_out    → all 3 buttons greyed + "Notify when available" CTA
 *   - custom_quote→ replaces all 3 with one wide "Open Live Chat" CTA
 * ───────────────────────────────────────────────────────────────────── */
.nr-order-block { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.nr-order-block__label {
    font: 700 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
    letter-spacing: 0.10em; text-transform: uppercase;
    color: var(--nr-pg-ink-soft);
}
.nr-order-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}
.nr-order-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 5px;
    padding: 11px 8px;
    border-radius: var(--nr-pg-radius);
    font-size: 13px; font-weight: 600;
    text-decoration: none;
    border: 1px solid transparent;
    transition: all var(--nr-motion-fast, 150ms) var(--nr-easing-out, ease-out);
    line-height: 1; text-align: center; min-width: 0;
    font-family: inherit;
}
.nr-order-btn--available {
    background: linear-gradient(135deg, var(--primary, #14bb60), #10a153);
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 12px rgba(20, 187, 96, 0.30), inset 0 1px 0 rgba(255, 255, 255, 0.20);
}
.nr-order-btn--available:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(20, 187, 96, 0.40), inset 0 1px 0 rgba(255, 255, 255, 0.20);
}
.nr-order-btn--unavailable {
    background: #eef1f4 !important; color: #9aa6b2 !important;
    border-color: rgba(15, 28, 46, 0.10);
    cursor: not-allowed; pointer-events: none;
    box-shadow: none;
}
.nr-order-btn__region { font-weight: 700; }
.nr-order-btn__arrow  { opacity: 0.85; }

/* Custom-quote CTA — single wide purple button replacing the three
   regional buttons. Fires Tawk_API.toggle() via the site-wide
   [data-nr-open-livechat] handler in nr-geo-cta.js. */
.nr-order-quote-cta {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%;
    padding: 14px 20px;
    border-radius: 8px;
    background: linear-gradient(135deg, #6347bf, #8062d3);
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 14px; font-weight: 700; text-decoration: none;
    box-shadow: 0 4px 14px rgba(99, 71, 191, 0.30), inset 0 1px 0 rgba(255, 255, 255, 0.20);
    cursor: pointer; appearance: none; font-family: inherit;
    transition: all var(--nr-motion-fast, 150ms) var(--nr-easing-out, ease-out);
}
.nr-order-quote-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(99, 71, 191, 0.40), inset 0 1px 0 rgba(255, 255, 255, 0.20);
    color: #fff !important;
}
.nr-order-quote-cta__icon { width: 18px; height: 18px; flex-shrink: 0; }
.nr-order-quote-secondary {
    display: flex; align-items: center; justify-content: center; gap: 4px;
    margin: 4px 0 0;
    color: var(--nr-pg-ink-soft); font-size: 12px;
}
.nr-order-quote-secondary a { color: #6347bf; text-decoration: none; font-weight: 600; }
.nr-order-quote-secondary a:hover { text-decoration: underline; }

/* "Notify me when available" CTA on sold-out cards — black, modest */
.nr-order-notify-cta {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 16px; border-radius: var(--nr-pg-radius);
    background: var(--nr-pg-ink, #263238);
    color: #fff !important;
    border: 0; font-size: 13px; font-weight: 600; text-decoration: none;
    transition: all var(--nr-motion-fast, 150ms) var(--nr-easing-out, ease-out);
    cursor: pointer; appearance: none; font-family: inherit; width: 100%;
    margin-top: 4px;
}
.nr-order-notify-cta:hover { background: #1a2940; transform: translateY(-1px); color: #fff !important; }

/* Availability status ribbon — top-right of card */
.nr-plan-card { position: relative; }
.nr-plan-card__status {
    position: absolute; top: 0; right: 24px;
    padding: 5px 10px;
    font: 700 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
    letter-spacing: 0.10em; text-transform: uppercase;
    border-radius: 0 0 4px 4px;
    z-index: 2;
}
.nr-plan-card__status--sold_out      { background: var(--nr-pg-ink, #263238); color: #fff; }
.nr-plan-card__status--custom_quote  { background: linear-gradient(135deg, #6347bf, #8062d3); color: #fff; }
.nr-plan-card__status--low_stock     { background: linear-gradient(135deg, #d97706, #f59e0b); color: #fff; }

/* Per-state card frame tweaks */
.nr-plan-card--sold_out      { background: linear-gradient(180deg, #fafbfc 0%, #f5f7fa 100%); }
.nr-plan-card--custom_quote  { border-color: rgba(99, 71, 191, 0.30); box-shadow: 0 4px 20px rgba(99, 71, 191, 0.08); }
.nr-plan-card--low_stock     { border-color: rgba(217, 119, 6, 0.35); }

/* Per-state price treatments */
.nr-plan-card__price--sold_out .nr-plan-card__price-amount { text-decoration: line-through; opacity: 0.6; }
.nr-plan-card--sold_out .nr-plan-card__title { opacity: 0.75; }
.nr-plan-card__price-amount--quote {
    font-size: 16px !important; font-weight: 700; color: #6347bf;
    letter-spacing: 0; line-height: 1.3;
}

/* Compact variants for table view + compare modal.
   Table cell is constrained to ~170px so all 3 region buttons fit
   on one line at the same height, no horizontal overflow. */
.nr-order-block--table { gap: 0; }
.nr-order-row--mini {
    gap: 3px;
    grid-template-columns: repeat(3, 1fr);
}
.nr-order-btn--mini {
    padding: 6px 4px;
    font-size: 11px;
    border-radius: 3px;
    line-height: 1;
    min-width: 0;
    box-shadow: none; /* mini variant: no shadow, keeps the row visually quiet */
}
.nr-order-btn--mini:hover { transform: none; box-shadow: 0 2px 6px rgba(20,187,96,0.30); }
.nr-order-btn--mini .nr-order-btn__region { font-size: 11px; font-weight: 700; }
.nr-order-quote-cta--mini { padding: 7px 10px; font-size: 11px; gap: 5px; box-shadow: none; }
.nr-order-quote-cta--mini .nr-order-quote-cta__icon { width: 14px; height: 14px; }

/* Table CTA column — fits 3 mini buttons on one line. */
.nr-plan-grid__table-dense .nr-tbl-col-cta,
.nr-plan-grid__table-dense .nr-tbl-cta { width: 180px; min-width: 160px; max-width: 180px; padding-right: 12px; }
.nr-plan-grid__table-dense .nr-tbl-cta .nr-order-block { width: 100%; }

/* Pricing-table dense column matches plan-grid */
.nr-pricing__td--cta { width: 180px; min-width: 160px; max-width: 180px; }
.nr-pricing__td--cta .nr-order-block { gap: 4px; width: 100%; }
.nr-pricing__td--cta .nr-order-block__label { display: none; } /* implied by column header */

.nr-tbl-price--quote { color: #6347bf; font-size: 13px; }
.nr-tbl-price--sold  { color: var(--nr-pg-ink-soft); text-decoration: line-through; opacity: 0.65; }

/* ─── Flags (rectangle images, replacing emoji) ──────────────────── */
.nr-flag {
    display: inline-block;
    vertical-align: middle;
    width: 20px;
    height: 15px;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(15, 28, 46, 0.10);
    object-fit: cover;
    margin-right: 4px;
}
/* Card-loc + table-flag wrappers were sized for emoji glyphs — let
 * the .nr-flag rules drive the actual flag dimensions instead. */
.nr-plan-card__loc-flag .nr-flag,
.nr-tbl-flag .nr-flag,
.nr-pricing__flag .nr-flag { margin: 0; }
.nr-plan-card__loc-flag,
.nr-tbl-flag,
.nr-pricing__flag {
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

/* Flag wrapper in the table view — wraps to multi-row instead of
 * forcing the Locations column wide on global-footprint plans. The
 * max-width caps each row at ~5 flags before wrapping; tweak to taste
 * if your fleet grows past that. Same wrapper applies to the
 * standalone /pricing/ table (.nr-pricing__flags), which uses the
 * same flag dedupe logic in shortcode-pricing-table.php. */
.nr-tbl-flags,
.nr-pricing__flags {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    max-width: 140px;
    align-items: center;
}

/* ─── Table compare column — make the checkbox visible + clickable ─ */
.nr-plan-grid__table-dense .nr-tbl-col-x,
.nr-plan-grid__table-dense td:first-child {
    width: 36px;
    min-width: 36px;
    padding-left: 12px;
    padding-right: 4px;
}
.nr-plan-grid__table-dense .nr-plan-card__compare {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}
.nr-plan-grid__table-dense .nr-plan-card__compare input { margin: 0; }


/* ── Mobile fixes: chat-widget vs compare drawer + tight order CTAs ─
 *
 * 1. The Tawk live-chat bubble lives bottom-right at z-index ~1e6 and
 *    overlaps the right-hand actions of our compare drawer (Clear /
 *    Compare) on phones. When 2+ plans are queued for comparison we
 *    add `body.nr-comparing` (set in nr-plan-grid.js); on small screens
 *    we then translate Tawk's bubble UP so both UIs stay reachable.
 *    Tawk's iframe carries varying titles across versions, so target
 *    a couple of common patterns. transform:translate plays nicely
 *    with the iframe — bottom override needs !important to win against
 *    Tawk's inline styles. Desktop layout has plenty of room — only
 *    nudge below 768 px.
 *
 * 2. Order-button arrows clip against the tight cells in the compare
 *    modal + table-view on phones (see screenshot — "EU →US →AP →"
 *    overflowing). Drop the arrow from the mini variant on small
 *    screens; the buttons are still clearly clickable from the
 *    rectangular shape + green fill. */
@media (max-width: 768px) {
    /* Primary path is JS calling Tawk_API.hideWidget() in nr-plan-grid.js,
     * which fully removes the bubble while comparing. This CSS fallback
     * fires when Tawk_API isn't loaded (ad-blocker, late CDN, dev) — we
     * try to hide the widget by targeting both Tawk's own wrapper div
     * (which carries position:fixed; bottom:20px; right:20px) and the
     * inner iframes. visibility:hidden + pointer-events:none keeps the
     * compare drawer's right-side actions tappable. */
    body.nr-comparing iframe[title*="chat" i],
    body.nr-comparing iframe[id*="tawk" i],
    body.nr-comparing iframe[name*="tawk" i],
    body.nr-comparing div[id*="tawk" i],
    body.nr-comparing [class*="tawk-min-container"],
    body.nr-comparing [class*="tawk-chat-panel"] {
        visibility: hidden !important;
        pointer-events: none !important;
        transition: visibility 0s linear 100ms;
    }

    .nr-order-btn--mini .nr-order-btn__arrow { display: none; }
    .nr-order-btn--mini { gap: 0; }
}
