.osf-header .header-lower:has(.nds-primary) { flex-wrap: wrap; gap: .35rem .8rem; }
.osf-header .nds-primary { margin-inline-end: auto; }
.osf-header .nds-primary .ext-mega-panel { inset-block-start: 100%; }
.osf-header .nds-utility { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.osf-header .nds-link {
    display: inline-flex; align-items: center; min-height: 2.5rem; padding: .45rem .8rem;
    border: 1px solid var(--border-subtle); border-radius: 999px;
    color: var(--text-primary); background: var(--bg-elevated); font-weight: 700; font-size: .85rem;
}
.osf-header .nds-link:hover { color: var(--accent-primary); background: var(--accent-glow); }
.fp-stage #hero:is(:has(.nds), [data-studio-hero]) { grid-template-columns: minmax(0, 1fr); align-content: start; gap: 1.4rem; padding-block: 2rem 3rem; }
.nds-heading { text-align: left; }
.nds-heading .nds-kicker { font-size: .85rem; letter-spacing: .06em; }
.nds-heading :is(h1, #osf-hero-title) { margin: .45rem 0; font-size: clamp(2.1rem, 5vw, 4.3rem); }
.nds-heading > p:last-child { max-width: 64ch; margin: .65rem 0 0; }
.nds { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 1rem; text-align: left; }
.nds [hidden] { display: none !important; }
.nds-interview, .nds-preview {
    min-width: 0; border: 1px solid var(--border-subtle); border-radius: 1rem;
    background: var(--bg-surface-solid); color: var(--text-primary); padding: 1.25rem;
}
.nds-team, .nds-preview-label, .nds-actions, .nds-checks { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem; }
.nds-team, .nds-preview-label { justify-content: space-between; padding-bottom: .8rem; border-bottom: 1px solid var(--border-subtle); }
.nds-team span, .nds-preview-label a { font-size: .875rem; color: var(--text-secondary); }
.nds fieldset { display: grid; gap: .6rem; margin: 1rem 0; padding: 0; border: 0; min-width: 0; }
.nds legend { padding: 0 0 .55rem; font-size: 1.15rem; font-weight: 700; }
.nds-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .55rem; }
.nds label { display: grid; gap: .25rem; min-width: 0; font-size: .875rem; }
.nds :is(input,select,textarea):not([type=checkbox]) {
    width: 100%; min-width: 0; min-height: 2.45rem; background: var(--bg-elevated);
    color: var(--text-primary); border: 1px solid var(--border-subtle); border-radius: .5rem; padding: .4rem .55rem;
}
.nds textarea { resize: vertical; }
.nds input[type=color] { cursor: pointer; }
.nds-checks label { display: inline-flex; align-items: center; }
.nds button {
    min-height: 2.5rem; padding: .45rem .75rem; border-radius: .55rem; cursor: pointer;
    border: 1px solid var(--border-subtle); background: var(--bg-elevated); color: var(--text-primary);
}
.nds button:hover { background: var(--accent-glow); }
.nds button.nds-main { background: var(--text-primary); color: var(--bg-surface-solid); }
.nds :focus-visible { outline: 2px solid var(--accent-primary); outline-offset: 3px; }
.nds-store { margin-top: .85rem; overflow: hidden; border-radius: .65rem; background: #fff; color: #172033; font-family: var(--nds-font, system-ui, sans-serif); }
.nds-brand { display: block; padding: .8rem 1rem; overflow-wrap: anywhere; }
.nds-store nav { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; background: #f2f4f8; padding: .35rem .8rem; }
.nds-store nav span, .nds-store nav button { font-size: .875rem; }
.nds-store nav button { background: #fff; color: #172033; border: 1px solid #8b94a6; }
.nds-panel { padding: .85rem; background: #eef1f5; border-top: 3px solid var(--nds-primary,#172033); }
.nds-panel[data-background=glass] { background: linear-gradient(135deg, #f5f7fc, color-mix(in srgb, white 82%, var(--nds-accent))); }
.nds-panel[data-background=glow] { background: radial-gradient(ellipse at 95% 0%,var(--nds-accent),transparent 80%),var(--nds-primary); }
.osf-hero .nds-tabs { color: #172033; background: white; padding: .3rem .5rem; margin-bottom: .5rem; font-size: .875rem; }
.nds-tabs span { margin-inline-start: .65rem; }
.nds-categories { display: grid; grid-template-columns: repeat(var(--nds-columns,3),minmax(0,1fr)); gap: .45rem; }
.nds-panel[data-layout=list] .nds-categories { grid-template-columns: 1fr; }
.nds-panel[data-layout=sidebar] .nds-categories { grid-template-columns: minmax(0,1fr) minmax(0,1.8fr); }
.nds-panel[data-layout=sidebar] .nds-categories article:first-child { grid-row: span 2; }
.nds-categories article { background: #fff; border: 1px solid #d9dfe9; border-radius: .35rem; padding: .55rem; overflow-wrap: anywhere; }
.nds-categories small { display: block; margin-top: .15rem; color: #46516a; }
.nds-promo { display: grid; gap: .15rem; margin-top: .5rem; padding: .55rem; background: #fff; border-radius: .35rem; font-size: .875rem; }
.nds-promo img { max-width: 100%; max-height: 140px; object-fit: contain; }
.osf-hero .nds p { font-size: .875rem; margin: .45rem 0; }
.nds-exports { margin-top: .8rem; }
.nds-exports textarea { min-height: 7rem; }
@media (max-width: 840px) {
    .nds { grid-template-columns: 1fr; }
    .osf-header .nds-utility { order: 3; }
    .fp-stage #hero:is(:has(.nds), [data-studio-hero]) { scroll-margin-top: 9rem; }
}
@media (max-width: 420px) {
    .nds-interview, .nds-preview { padding: .75rem; }
    .nds-panel[data-layout=grid] .nds-categories { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
.nds-type { min-height: 1.5em; margin-top: .7rem; font-size: .9rem; color: var(--text-secondary); }
.nds-type-active::after {
    content: ""; display: inline-block; width: 1px; height: 1em; margin-inline-start: 3px;
    vertical-align: -.12em; background: linear-gradient(transparent,#87a4ff); box-shadow: 0 0 6px #87a4ff;
}
.nds-contact { display: inline-block; margin-top: .45rem; font-size: .875rem; text-decoration: underline; }

/* The Studio uses its own palette so the store's theme selector still controls the rest of the site. */
.fp-stage #hero:is(:has(.nds), [data-studio-hero]) {
    isolation: isolate;
    --studio-ice: #b7d7ff;
    --studio-light: #edf5ff;
    --studio-muted: #a5b7d1;
    --studio-line: #35496d;
    --studio-surface: #101b31;
    --studio-accent: #8abaff;
    padding-block: clamp(2.5rem, 5vw, 4.5rem) 3rem;
    gap: clamp(1.25rem, 3vw, 2.25rem);
}
.fp-stage #hero:is(:has(.nds), [data-studio-hero])::before {
    position: absolute;
    z-index: -1;
    inset: 0 -2vw;
    pointer-events: none;
    content: "";
    background:
        radial-gradient(ellipse at 76% 19%, #22458480, transparent 52%),
        radial-gradient(ellipse at 18% 54%, #32277850, transparent 53%),
        repeating-linear-gradient(90deg, #9fbaff14 0 1px, transparent 1px 54px),
        repeating-linear-gradient(0deg, #9fbaff14 0 1px, transparent 1px 54px),
        #070c18;
    mask-image: linear-gradient(transparent, black 8%, black 83%, transparent);
}
.nds-heading {
    position: relative;
    isolation: isolate;
    color: var(--studio-light);
    padding-inline: clamp(.3rem, 2vw, 1.6rem);
}
.nds-logo-case {
    position: absolute;
    z-index: -1;
    inset: 0 3% 0 auto;
    width: min(29%, 18rem);
    display: grid;
    place-items: center;
    perspective: 850px;
    pointer-events: none;
    background: radial-gradient(ellipse at center, #4aaaff4a, transparent 69%);
}
.nds-logo-glass {
    width: 74%;
    aspect-ratio: 1.22;
    position: relative;
    border-radius: .9rem;
    transform: rotateX(9deg) rotateY(-19deg) rotateZ(-6deg);
    transform-style: preserve-3d;
    border: 1px solid #a8d7ffbd;
    background:
        url("nopcommerce-logomark.png") center / 55% auto no-repeat,
        linear-gradient(144deg, #233d62, #091627 65%, #1e344d);
    box-shadow: inset 0 0 1.4rem #9ddcff38, 0 0 2.2rem #48a9ff48;
}
.nds-logo-glass::before, .nds-logo-glass::after {
    content: "";
    position: absolute;
    inset: -.6rem;
    border-radius: 1.25rem;
    border: 1px solid #6dc8ff82;
}
.nds-logo-glass::before {
    transform: translateZ(-26px);
    background: #173855;
    box-shadow: 0 1rem 2.25rem #020614, inset 0 0 1.25rem #5abfff75;
}
.nds-logo-glass::after {
    transform: translateZ(14px);
    background: linear-gradient(145deg, #bceaff30, transparent 38%, transparent 68%, #70c2ff1a);
}
.osf-hero .nds-heading .nds-kicker {
    color: var(--studio-ice);
    font-size: .8rem;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.osf-hero .nds-heading :is(h1, #osf-hero-title) {
    max-width: 16ch;
    margin-block: .5rem .85rem;
    color: var(--studio-light);
    font-size: clamp(2.65rem, 6.5vw, 6rem);
    line-height: .96;
    text-shadow: 0 0 2.75rem #8abaff35;
}
.osf-hero .nds-heading > p:last-of-type { color: var(--studio-muted); }
.nds-heading .nds-type { color: var(--studio-ice); }
.nds { gap: clamp(.75rem, 2vw, 1.6rem); }
.nds-interview, .nds-preview {
    position: relative;
    color: var(--studio-light);
    border: 1px solid var(--studio-line);
    border-radius: 1.1rem;
    background: linear-gradient(155deg, #182747, #0a111f 60%);
    box-shadow: 0 1.1rem 3.5rem #01050c85, inset 0 1px #b1d5ff33;
    padding: clamp(.8rem, 2vw, 1.4rem);
}
.nds-interview::before, .nds-preview::before {
    position: absolute;
    content: "";
    inset: 0 15% auto;
    height: 1px;
    background: linear-gradient(90deg, transparent, #95c9ff, transparent);
    box-shadow: 0 0 1rem #8abaff;
}
.nds-team, .nds-preview-label { border-bottom-color: var(--studio-line); }
.nds-team span, .nds-preview-label a, .osf-hero .nds p { color: var(--studio-muted); }
.nds-team span { font-family: 'JetBrains Mono', monospace; }
.nds :is(input,select,textarea):not([type=checkbox]), .nds button {
    color: var(--studio-light);
    background: var(--studio-surface);
    border-color: var(--studio-line);
    color-scheme: dark;
}
.nds button:hover { background: #253d65; }
.nds button.nds-main {
    background: linear-gradient(115deg,#d1e7ff,#93bfff);
    color: #071225;
    border-color: #c7deff;
    font-weight: 700;
    box-shadow: 0 0 1.4rem #6c9bff55;
}
.nds button.nds-main:hover { background: #e8f3ff; }
.nds :focus-visible { outline-color: var(--studio-accent); }
.nds-preview-label a, .nds-contact { color: var(--studio-ice); }
.nds-store { border: 1px solid #a0c6ff9c; box-shadow: 0 0 1.6rem #669bff2e; }
.nds-store nav button { color: #172033; background: #fff; border-color: #8b94a6; }
.nds-store nav button:hover { background: #e5edff; }
.nds [type=checkbox] { accent-color: var(--studio-accent); }
.osf-header .nds-link { border-color: #5576ad; box-shadow: inset 0 0 .8rem #7cb5ff20; }
@media (max-width: 840px) {
    .fp-stage #hero:is(:has(.nds), [data-studio-hero])::before { inset-inline: 0; }
    .nds-logo-case { inset: .8rem 0 auto auto; width: clamp(4.2rem, 16%, 8rem); aspect-ratio: 1; }
    .osf-hero .nds-heading :is(h1, #osf-hero-title) { max-width: min(16ch, 82%); }
    .nds-logo-glass::before, .nds-logo-glass::after { inset: -.2rem; border-radius: .55rem; }
    .nds-logo-glass { border-radius: .4rem; }
    .nds-logo-glass::before { transform: translateZ(-9px); }
    .nds-logo-glass::after { transform: translateZ(5px); }
}
.osf-hero .nds .nds-tabs { color: #172033; }

.nds-preview {
    background:
        radial-gradient(ellipse at 50% 40%, #1e427256, transparent 68%),
        linear-gradient(155deg, #182747, #0a111f 60%);
    box-shadow: 0 1.1rem 3.5rem #01050c85, inset 0 0 2.3rem #8abaff16, inset 0 1px #b1d5ff33;
}
.nds-preview .nds-store {
    border: 1px solid #a5d9ff;
    box-shadow: 0 0 0 .28rem #8bbfff1f, 0 .85rem 1.8rem #020919c0, 0 0 2.1rem #5baaff49;
}

.fp-stage #hero:is(:has(.nds), [data-studio-hero]) {
    --studio-accent: #4ab2f1;
    --studio-active-accent: #4ab2f1;
}
.fp-stage #hero:is(:has(.nds), [data-studio-hero])::before {
    background:
        radial-gradient(circle, #d1edffb0 0 1px, transparent 1.5px) 9px 12px / 123px 107px,
        radial-gradient(circle, #99bfff65 0 1px, transparent 1.5px) 28px 31px / 79px 83px,
        radial-gradient(ellipse at 76% 19%, #22458480, transparent 52%),
        radial-gradient(ellipse at 18% 54%, #32277850, transparent 53%),
        repeating-linear-gradient(90deg, #9fbaff14 0 1px, transparent 1px 54px),
        repeating-linear-gradient(0deg, #9fbaff14 0 1px, transparent 1px 54px),
        #070c18;
}
.nds-orbit, .nds-wire { position: absolute; pointer-events: none; }
.nds-orbit {
    width: 113%; aspect-ratio: 2.8; border: 1px solid var(--studio-active-accent);
    border-radius: 50%; transform: rotate(-24deg) translateY(14%);
    box-shadow: 0 0 1rem color-mix(in srgb, var(--studio-active-accent), transparent 45%);
    opacity: .65; z-index: -1;
}
.nds-wire {
    width: 23%; aspect-ratio: 1; right: 0; top: 10%;
    border: 1px solid var(--studio-active-accent); box-shadow: inset 0 0 1rem #4ab2f126;
    transform: rotateX(27deg) rotateY(-25deg) rotateZ(25deg); opacity: .62;
}
.nds-wire::before, .nds-wire::after {
    position: absolute; content: ""; inset: 0; border: inherit;
    transform: translate(21%, -21%);
}
.nds-wire::after { transform: translate(-18%, 18%); }
@media (prefers-reduced-motion: no-preference) {
    html:not(.fp-motion-reduced) .nds-wire { animation: nds-wire-spin 16s linear infinite; }
}
@keyframes nds-wire-spin {
    from { transform: rotateX(27deg) rotateY(-25deg) rotateZ(25deg); }
    to { transform: rotateX(27deg) rotateY(335deg) rotateZ(25deg); }
}
.osf-hero .nds-offer, .osf-hero .nds .nds-offer {
    display: inline-block; color: #c9edff; border: 1px solid #4ab2f180; border-radius: 999px;
    background: #122a42; font-weight: 700; font-size: .875rem; padding: .35rem .75rem; margin-top: .85rem;
}
.nds-steps, .nds-preview-controls { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .8rem; }
.nds-steps button { flex: 1 1 auto; font-size: .875rem; }
.nds-steps button[aria-pressed=true] { border-color: #4ab2f1; background: #1a3d5b; }
.nds-preview-controls { align-items: center; justify-content: space-between; }
.nds-preview-controls label { display: flex; align-items: center; gap: .45rem; }
.nds-preview-controls select { width: auto !important; }
.nds-preview[data-tilt=true] .nds-store { transform: perspective(1000px) rotateX(3deg) rotateY(-4deg); }
.nds-panel[data-background=white] { background: #fff; }
.nds-panel[data-background=slate] { background: #f8fafc; }
.nds-panel[data-background=cream] { background: #faf8f5; }
.nds-panel[data-background=nebula] { background: radial-gradient(ellipse at 80% 0, var(--nds-accent), transparent 95%), #0f172a; }
.nds-categories article { border-color: #bed2e4; }
.nds-categories a { color: #172033; text-decoration: none; }
.nds-panel[data-underline=true] .nds-categories a:is(:hover,:focus-visible) { text-decoration: underline; text-underline-offset: .22em; }
.nds-keys { overflow-wrap: anywhere; }
.nds-keys code { color: #bce5ff; }
.nds-export-dialog {
    position: fixed; inset: 0; margin: auto; max-height: 85dvh; overflow: auto;
    width: min(38rem, calc(100% - 1.5rem)); padding: 1.4rem; border: 1px solid #4ab2f1;
    border-radius: 1rem; color: #edf5ff; background: #0d1830; box-shadow: 0 0 3rem #4ab2f14a;
}
.nds-export-dialog::backdrop { background: #030610bb; }
.nds-export-dialog [data-export-close] { float: right; }
.nds-export-dialog textarea { min-height: 12rem; margin-top: .65rem; }
.nds-utility label { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; color: var(--text-primary); font-size: .8rem; }
.nds-utility select { min-height: 2.2rem; color: var(--text-primary); background: var(--bg-elevated); border: 1px solid var(--border-subtle); border-radius: .5rem; }
@media (max-width: 600px) {
    .nds-preview[data-tilt=true] .nds-store { transform: perspective(1000px) rotateX(2deg); }
    .nds-utility { width: 100%; }
}

.nds-starfield {
    position: absolute;
    z-index: -1;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    mask-image: linear-gradient(transparent, #000 9%, #000 87%, transparent);
}
.osf-hero .nds-heading .nds-intake-note { font-size: .9rem; }
.nds-dampers { display: inline-flex; align-items: center; gap: .45rem; color: var(--studio-ice); margin: .65rem 0 0; }
.nds-dampers input { accent-color: var(--studio-accent); }
.osf-hero .nds-heading > p:not(.nds-offer) { color: var(--studio-muted); }
.osf-hero .nds-heading .nds-kicker { color: var(--studio-ice); }

.nds-map { gap: 1.3rem; text-align: left; }
.nds-map h2 { font-size: clamp(2rem, 5vw, 3.6rem); margin-bottom: .4rem; }
.nds-map-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 1rem; }
.nds-map-controls, .nds-map-demo { border: 1px solid #425779; border-radius: 1rem; overflow: hidden; }
.nds-map-controls { display: grid; align-content: start; gap: .8rem; padding: 1.2rem; background: #10192c; color: #eaf4ff; }
.nds-map-controls label { display: grid; gap: .35rem; }
.nds-map-controls :is(button, select) { background: #17294a; border: 1px solid #526c96; border-radius: .5rem; color: #fafcff; padding: .55rem .7rem; min-height: 2.55rem; }
.nds-map-controls :focus-visible { outline: 2px solid #83ccff; outline-offset: 3px; }
.nds-map-controls code { color: #a9ddff; overflow-wrap: anywhere; }
.nds-map-note { font-size: .875rem; color: #adbfda; }
.nds-map-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.nds-map-demo { background: #fff; color: #142134; align-self: start; }
.nds-map-brand, .nds-map-nav, .nds-map-panel { padding: .8rem 1rem; }
.nds-map-brand { font-size: 1.35rem; font-weight: 700; }
.nds-map-nav { background: #e6edf5; word-spacing: .65rem; border-bottom: 2px solid #4ab2f1; }
.nds-map-tabs { margin-bottom: .65rem; border-bottom: 1px solid #a7b6cd; padding-bottom: .45rem; }
.nds-map-tabs span { margin-inline-start: .65rem; }
.nds-map-layout { display: flex; gap: .6rem; }
.nds-map-layout aside, .nds-map-cards article { padding: .55rem; background: #f3f7fb; border: 1px solid #c4d4e4; border-radius: .45rem; overflow-wrap: anywhere; }
.nds-map-cards { flex: 1; min-width: 0; display: grid; grid-template-columns: repeat(var(--map-columns, 2), minmax(0, 1fr)); gap: .5rem; }
.nds-map-cards article > * { display: block; }
.nds-map-cards article > span { color: #125999; font-size: 1.5rem; }
.nds-map [hidden] { display: none !important; }
@media (max-width: 730px) {
    .nds-map-grid { grid-template-columns: 1fr; }
    .nds-map-cards article { padding: .4rem; }
}
