.nx-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    font-family: inherit;
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    line-height: 1;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
    white-space: nowrap;
}

.nx-btn:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

.nx-btn-lg {
    padding: var(--space-4) var(--space-7);
    font-size: var(--font-size-lg);
}

.nx-btn-primary {
    background: var(--gradient-brand);
    color: var(--color-white);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.nx-btn-primary:hover {
    color: var(--color-white);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.35);
}

.nx-btn-primary:active {
    transform: translateY(0);
}

.nx-btn-secondary {
    background: var(--color-white);
    color: var(--color-navy-deep);
    border-color: var(--color-border-strong);
}

.nx-btn-secondary:hover {
    color: var(--color-navy-deep);
    background: var(--color-bg-alt);
    border-color: var(--color-navy);
}

.nx-btn-ghost {
    background: transparent;
    color: var(--color-navy-deep);
}

.nx-btn-ghost:hover {
    background: var(--color-bg-alt);
    color: var(--color-navy-deep);
}

.nx-btn-on-dark {
    background: var(--color-white);
    color: var(--color-navy-deep);
}

.nx-btn-on-dark:hover {
    color: var(--color-navy-deep);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.nx-btn-outline-on-dark {
    background: transparent;
    color: var(--color-white);
    border-color: rgba(255, 255, 255, 0.4);
}

.nx-btn-outline-on-dark:hover {
    color: var(--color-white);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.7);
}

.nx-btn-group {
    display: inline-flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    justify-content: center;
}

.nx-card {
    background: var(--color-white);
    border-radius: var(--radius-xl);
    padding: var(--space-7);
    border: 1px solid var(--color-border);
    transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}

.nx-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-accent-light);
}

.nx-card-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    background: var(--gradient-brand-soft);
    color: var(--color-accent-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-5);
}

.nx-card-icon svg {
    width: 28px;
    height: 28px;
}

.nx-card-title {
    font-size: var(--font-size-xl);
    margin-bottom: var(--space-3);
}

.nx-card-text {
    color: var(--color-text-muted);
    margin-bottom: 0;
}

.nx-cta-strip {
    background: var(--gradient-hero);
    color: var(--color-text-on-dark);
    padding-block: var(--section-padding-y);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.nx-cta-strip h2 {
    color: var(--color-white);
    margin-bottom: var(--space-4);
}

.nx-cta-strip p {
    color: var(--color-text-on-dark-muted);
    font-size: var(--font-size-lg);
    max-width: 56ch;
    margin: 0 auto var(--space-7);
}

.nx-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
}

.nx-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
}

.nx-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-6);
}

@media (max-width: 992px) {
    .nx-grid-3,
    .nx-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .nx-grid-2,
    .nx-grid-3,
    .nx-grid-4 {
        grid-template-columns: 1fr;
    }
}

.nx-stack-sm > * + * { margin-top: var(--space-3); }
.nx-stack-md > * + * { margin-top: var(--space-5); }
.nx-stack-lg > * + * { margin-top: var(--space-8); }

.nx-divider {
    height: 1px;
    background: var(--color-border);
    border: 0;
    margin-block: var(--space-8);
}

.nx-text-muted {
    color: var(--color-text-muted);
}

.nx-text-on-dark {
    color: var(--color-text-on-dark);
}

.nx-text-on-dark-muted {
    color: var(--color-text-on-dark-muted);
}

/* Section header (eyebrow + title + subtitle, centered or start-aligned) */
.nx-section-header {
    text-align: center;
    max-width: 720px;
    margin-inline: auto;
    margin-bottom: var(--space-9);
}

.nx-section-header-title {
    margin-bottom: var(--space-3);
}

.nx-section-header-subtitle {
    color: var(--color-text-muted);
    font-size: var(--font-size-lg);
    line-height: var(--line-height-relaxed);
    margin-bottom: 0;
}

/* Hero (home page) */
.nx-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--color-bg) 0%, #EEF2FF 100%);
    padding-block: var(--space-12) var(--space-16);
    border-bottom: 1px solid var(--color-border);
}

.nx-hero-pattern {
    position: absolute;
    inset: 0;
    color: var(--color-accent);
    pointer-events: none;
    z-index: 0;
}

.nx-hero-pattern svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nx-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin-inline: auto;
    text-align: center;
}

.nx-hero-eyebrow {
    color: var(--color-accent-dark);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: var(--space-4);
    display: inline-block;
}

.nx-hero-title {
    color: var(--color-navy-deep);
    margin-bottom: var(--space-5);
    font-size: clamp(var(--font-size-4xl), 5vw, var(--font-size-6xl));
    line-height: 1.08;
    letter-spacing: -0.025em;
}

.nx-hero-subtitle {
    font-size: var(--font-size-lg);
    line-height: var(--line-height-relaxed);
    color: var(--color-text-muted);
    margin: 0 auto var(--space-8);
    max-width: 60ch;
}

.nx-hero-cta-group {
    display: inline-flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    justify-content: center;
}

/* Services overview cards (more elaborate than .nx-card) */
.nx-service-card {
    position: relative;
    background: var(--color-white);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    border: 1px solid var(--color-border);
    transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
    display: flex;
    flex-direction: column;
}

.nx-service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-accent-light);
}

.nx-service-card-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-lg);
    background: var(--gradient-brand-soft);
    color: var(--color-accent-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-6);
    border: 1px solid rgba(59, 130, 246, 0.18);
}

.nx-service-card-icon svg {
    width: 32px;
    height: 32px;
}

.nx-service-card-title {
    font-size: var(--font-size-2xl);
    margin-bottom: var(--space-3);
}

.nx-service-card-description {
    color: var(--color-text-muted);
    margin-bottom: var(--space-6);
    line-height: var(--line-height-relaxed);
}

.nx-service-card-bullets {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--space-7) 0;
    display: grid;
    gap: var(--space-3);
}

.nx-service-card-bullets li {
    display: flex;
    gap: var(--space-3);
    align-items: flex-start;
    color: var(--color-text);
    font-weight: var(--font-weight-medium);
    line-height: var(--line-height-snug);
}

.nx-service-card-bullets li::before {
    content: '';
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    margin-top: 8px;
    background: var(--gradient-brand);
    border-radius: var(--radius-full);
}

.nx-service-card-link {
    margin-top: auto;
    color: var(--color-accent-dark);
    font-weight: var(--font-weight-semibold);
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    text-decoration: none;
}

.nx-service-card-link svg {
    width: 16px;
    height: 16px;
    transition: transform var(--transition-fast);
}

.nx-service-card-link:hover {
    color: var(--color-navy-deep);
}

.nx-service-card-link:hover svg {
    transform: translateX(4px);
}

/* Detail variant — no trailing link, so bullets shouldn't reserve link space. */
.nx-service-card--detail .nx-service-card-bullets {
    margin-bottom: 0;
}

/* Sections used as in-page anchor targets need clearance under the sticky navbar. */
section[id] {
    scroll-margin-top: 100px;
}

html[dir="rtl"] .nx-service-card-link svg {
    transform: scaleX(-1);
}

html[dir="rtl"] .nx-service-card-link:hover svg {
    transform: scaleX(-1) translateX(4px);
}

/* Approach track — 4 steps connected by an animated line */
.nx-approach-track {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-6);
}

.nx-approach-track::before {
    content: '';
    position: absolute;
    top: 28px;
    inset-inline-start: 28px;
    inset-inline-end: 28px;
    height: 2px;
    background-image: linear-gradient(90deg, var(--color-accent) 0%, var(--color-accent-light) 50%, var(--color-accent) 100%);
    opacity: 0.45;
    z-index: 0;
    transform: scaleX(0);
    transform-origin: 0 50%;
    transition: transform 1500ms cubic-bezier(0.22, 1, 0.36, 1) 400ms;
}

html[dir="rtl"] .nx-approach-track::before {
    transform-origin: 100% 50%;
}

.nx-approach-track.is-visible::before {
    transform: scaleX(1);
}

.nx-approach-step {
    position: relative;
    z-index: 1;
    text-align: start;
    transition: transform var(--transition-base);
}

.nx-approach-step:hover {
    transform: translateY(-3px);
}

.nx-approach-step-number {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-full);
    background: var(--gradient-brand);
    color: var(--color-white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--font-weight-bold);
    font-size: var(--font-size-lg);
    margin-bottom: var(--space-5);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.28);
    border: 4px solid var(--color-bg-alt);
    font-feature-settings: "tnum";
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.nx-approach-step:hover .nx-approach-step-number {
    transform: scale(1.06);
    box-shadow: 0 10px 22px rgba(59, 130, 246, 0.4);
}

.nx-approach-step-title {
    font-size: var(--font-size-xl);
    margin-bottom: var(--space-2);
}

.nx-approach-step-description {
    color: var(--color-text-muted);
    line-height: var(--line-height-relaxed);
    margin: 0;
}

@media (max-width: 992px) {
    .nx-approach-track {
        grid-template-columns: 1fr;
        gap: var(--space-7);
    }
    .nx-approach-track::before {
        display: none;
    }
}

/* About preview section */
.nx-about-preview-inner {
    max-width: 760px;
    margin-inline: auto;
    text-align: center;
}

.nx-about-preview-body {
    font-size: var(--font-size-lg);
    line-height: var(--line-height-relaxed);
    color: var(--color-text);
    margin-bottom: var(--space-6);
}

.nx-arrow-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--color-accent-dark);
    font-weight: var(--font-weight-semibold);
    text-decoration: none;
}

.nx-arrow-link svg {
    width: 16px;
    height: 16px;
    transition: transform var(--transition-fast);
}

.nx-arrow-link:hover {
    color: var(--color-navy-deep);
}

.nx-arrow-link:hover svg {
    transform: translateX(4px);
}

html[dir="rtl"] .nx-arrow-link svg {
    transform: scaleX(-1);
}

html[dir="rtl"] .nx-arrow-link:hover svg {
    transform: scaleX(-1) translateX(4px);
}

/* Inner-page header — dark navy treatment, contrasts the light home hero. */
.nx-page-header {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--color-navy-deep) 0%, var(--color-navy) 55%, #1E40AF 100%);
    padding-block: clamp(var(--space-12), 12vw, var(--space-20));
    text-align: center;
}

.nx-page-header-pattern {
    position: absolute;
    inset: 0;
    color: var(--color-accent-light);
    pointer-events: none;
}

.nx-page-header-pattern svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nx-page-header .container {
    position: relative;
    z-index: 1;
}

.nx-page-header-inner {
    max-width: 800px;
    margin-inline: auto;
}

.nx-page-header-eyebrow {
    display: block;
    color: var(--color-accent-light);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: var(--space-3);
}

.nx-page-header-title {
    color: var(--color-white);
    font-size: clamp(var(--font-size-3xl), 4vw, var(--font-size-5xl));
    line-height: var(--line-height-tight);
    margin-bottom: var(--space-5);
}

.nx-page-header-lead {
    font-size: var(--font-size-lg);
    line-height: var(--line-height-relaxed);
    color: var(--color-text-on-dark-muted);
    margin-bottom: 0;
}

/* Compare grid — problem-vs-answer cards with a directional divider. */
.nx-compare-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: var(--space-5);
    align-items: stretch;
    max-width: 1080px;
    margin-inline: auto;
}

.nx-compare-card {
    border-radius: var(--radius-lg);
    padding: var(--space-7);
    display: flex;
    flex-direction: column;
}

.nx-compare-card--problem {
    background-color: var(--color-white);
    border: 1px solid var(--color-border);
    border-left: 4px solid var(--color-slate-light);
}

.nx-compare-card--problem .nx-compare-card-icon {
    color: var(--color-slate);
}

.nx-compare-card--problem .nx-compare-card-label {
    color: var(--color-slate-dark);
}

.nx-compare-card--answer {
    background: linear-gradient(180deg, var(--color-white) 0%, rgba(59, 130, 246, 0.04) 100%);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-left: 4px solid var(--color-accent);
    box-shadow: var(--shadow-md);
}

.nx-compare-card--answer .nx-compare-card-icon {
    color: var(--color-accent);
}

.nx-compare-card--answer .nx-compare-card-label {
    color: var(--color-accent-dark);
}

.nx-compare-card-icon {
    width: 48px;
    height: 48px;
    margin-bottom: var(--space-5);
}

.nx-compare-card-icon svg {
    width: 100%;
    height: 100%;
}

.nx-compare-card-label {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: var(--space-2);
}

.nx-compare-card-title {
    color: var(--color-navy-deep);
    font-size: var(--font-size-2xl);
    line-height: var(--line-height-snug);
    margin-bottom: var(--space-4);
}

.nx-compare-card-body {
    color: var(--color-text);
    line-height: var(--line-height-relaxed);
    margin-bottom: 0;
}

.nx-compare-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-accent);
    width: 32px;
    flex-shrink: 0;
}

.nx-compare-divider svg {
    width: 28px;
    height: 28px;
}

html[dir="rtl"] .nx-compare-divider svg {
    transform: scaleX(-1);
}

@media (max-width: 880px) {
    .nx-compare-grid {
        grid-template-columns: 1fr;
    }

    .nx-compare-divider {
        width: auto;
        height: 32px;
        transform: rotate(90deg);
    }

    html[dir="rtl"] .nx-compare-divider svg {
        transform: none;
    }
}

/* Principle card — icon + body with oversized faded numeral background. */
.nx-principle-card {
    position: relative;
    overflow: hidden;
    background-color: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-6) var(--space-6) var(--space-6) var(--space-6);
    transition: border-color var(--transition-base), box-shadow var(--transition-base), transform var(--transition-base);
}

.nx-principle-card:hover {
    border-color: var(--color-accent);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.nx-principle-card-numeral {
    position: absolute;
    top: var(--space-3);
    inset-inline-end: var(--space-4);
    font-size: 6rem;
    font-weight: var(--font-weight-bold);
    line-height: 1;
    color: rgba(59, 130, 246, 0.08);
    pointer-events: none;
    user-select: none;
    letter-spacing: -0.04em;
}

.nx-principle-card-icon {
    position: relative;
    width: 44px;
    height: 44px;
    color: var(--color-accent);
    margin-bottom: var(--space-5);
}

.nx-principle-card-icon svg {
    width: 100%;
    height: 100%;
}

.nx-principle-card-title {
    position: relative;
    color: var(--color-navy-deep);
    font-size: var(--font-size-xl);
    margin-bottom: var(--space-3);
}

.nx-principle-card-description {
    position: relative;
    color: var(--color-text-muted);
    line-height: var(--line-height-relaxed);
    margin-bottom: 0;
}

/* Contact page — channels rail beside form card. */
.nx-contact-section {
    padding-block: var(--section-padding-y);
}

.nx-contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-8);
    align-items: start;
}

@media (min-width: 992px) {
    .nx-contact-grid {
        grid-template-columns: minmax(280px, 360px) 1fr;
        gap: var(--space-9);
    }
}

.nx-contact-channels {
    position: relative;
}

.nx-contact-channels-title {
    color: var(--color-navy-deep);
    font-size: var(--font-size-2xl);
    margin-block: var(--space-3) var(--space-3);
}

.nx-contact-channels-body {
    color: var(--color-text-muted);
    line-height: var(--line-height-relaxed);
    margin-bottom: var(--space-7);
}

.nx-contact-channel-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.nx-contact-channel {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: var(--space-4);
    align-items: start;
}

.nx-contact-channel-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background-color: rgba(59, 130, 246, 0.08);
    color: var(--color-accent);
    display: flex;
    align-items: center;
    justify-content: center;
}

.nx-contact-channel-icon svg {
    width: 22px;
    height: 22px;
}

.nx-contact-channel-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.nx-contact-channel-label {
    color: var(--color-slate);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.nx-contact-channel-value {
    color: var(--color-navy-deep);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    word-break: break-word;
}

a.nx-contact-channel-value {
    color: var(--color-accent-dark);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a.nx-contact-channel-value:hover {
    color: var(--color-accent);
    text-decoration: underline;
}

.nx-contact-channel-hint {
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
    line-height: var(--line-height-snug);
}

/* Contact form card. */
.nx-contact-form-card {
    background-color: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    padding: var(--space-7);
}

@media (min-width: 768px) {
    .nx-contact-form-card {
        padding: var(--space-8);
    }
}

.nx-contact-form-header {
    margin-bottom: var(--space-7);
}

.nx-contact-form-title {
    color: var(--color-navy-deep);
    font-size: var(--font-size-2xl);
    margin-block: var(--space-3) var(--space-3);
}

.nx-contact-form-subtitle {
    color: var(--color-text-muted);
    line-height: var(--line-height-relaxed);
    margin-bottom: 0;
}

/* Form primitives. */
.nx-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.nx-form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-5);
}

@media (min-width: 640px) {
    .nx-form-row {
        grid-template-columns: 1fr 1fr;
    }
}

.nx-form-field {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.nx-form-label {
    color: var(--color-navy-deep);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    display: flex;
    align-items: baseline;
    gap: var(--space-2);
}

.nx-form-label-meta {
    color: var(--color-slate);
    font-weight: var(--font-weight-regular);
    font-size: var(--font-size-xs);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.nx-form-input {
    width: 100%;
    background-color: var(--color-white);
    color: var(--color-text);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-4);
    font: inherit;
    line-height: var(--line-height-snug);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.nx-form-input::placeholder {
    color: var(--color-slate-light);
}

.nx-form-input:hover {
    border-color: var(--color-slate);
}

.nx-form-input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.nx-form-textarea {
    resize: vertical;
    min-height: 140px;
}

.nx-form-select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%236B7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='1,1 6,6 11,1'/></svg>");
    background-repeat: no-repeat;
    background-position: right var(--space-4) center;
    padding-inline-end: var(--space-9);
}

html[dir="rtl"] .nx-form-select {
    background-position: left var(--space-4) center;
}

.nx-form-honeypot {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.nx-form-footer {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    margin-top: var(--space-3);
}

@media (min-width: 640px) {
    .nx-form-footer {
        flex-direction: row;
        align-items: center;
        gap: var(--space-5);
    }

    .nx-form-footer .nx-btn {
        flex: 0 0 auto;
    }
}

.nx-form-privacy-note {
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
    line-height: var(--line-height-snug);
    margin-bottom: 0;
}

/* Validation. Server-rendered via asp-validation-for / asp-validation-summary. */
.nx-form-error {
    color: #B91C1C;
    font-size: var(--font-size-sm);
    line-height: var(--line-height-snug);
    margin-top: 2px;
    display: block;
}

.nx-form-error:empty {
    display: none;
}

.nx-form-summary {
    border: 1px solid rgba(185, 28, 28, 0.25);
    background-color: rgba(185, 28, 28, 0.06);
    color: #991B1B;
    border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-4);
    font-size: var(--font-size-sm);
    line-height: var(--line-height-snug);
}

.nx-form-summary:empty,
.nx-form-summary.validation-summary-valid {
    display: none;
}

.nx-form-summary ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nx-form-input.input-validation-error {
    border-color: #DC2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

/* Confirmation page — single centered card with icon, copy, and CTAs. */
.nx-confirm-section {
    padding-block: var(--section-padding-y-lg);
}

.nx-confirm-card {
    background-color: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    padding: var(--space-9) var(--space-7);
    text-align: center;
}

@media (min-width: 768px) {
    .nx-confirm-card {
        padding: var(--space-10) var(--space-9);
    }
}

.nx-confirm-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto var(--space-6);
    color: var(--color-accent);
    background-color: rgba(59, 130, 246, 0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nx-confirm-icon svg {
    width: 44px;
    height: 44px;
}

.nx-confirm-title {
    color: var(--color-navy-deep);
    font-size: var(--font-size-3xl);
    margin-block: var(--space-3) var(--space-5);
}

.nx-confirm-body {
    color: var(--color-text-muted);
    line-height: var(--line-height-relaxed);
    margin-bottom: var(--space-7);
}

.nx-confirm-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    justify-content: center;
}

/* Cookie consent banner — fixed bottom bar, dark navy on light pages, visible above content. */
.nx-cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: var(--z-cookie);
    background-color: var(--color-navy-darker);
    color: var(--color-text-on-dark);
    box-shadow: 0 -8px 24px rgba(15, 45, 92, 0.18);
    padding-block: var(--space-5);
}

.nx-cookie-banner[hidden] {
    display: none;
}

.nx-cookie-banner-inner {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    align-items: stretch;
}

@media (min-width: 768px) {
    .nx-cookie-banner-inner {
        flex-direction: row;
        align-items: center;
        gap: var(--space-6);
    }
}

.nx-cookie-banner-body {
    flex: 1 1 auto;
    min-width: 0;
}

.nx-cookie-banner-title {
    color: var(--color-text-on-dark);
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-base);
    margin: 0 0 var(--space-2);
}

.nx-cookie-banner-text {
    color: var(--color-text-on-dark-muted);
    font-size: var(--font-size-sm);
    line-height: var(--line-height-snug);
    margin: 0;
}

.nx-cookie-banner-link {
    color: var(--color-accent-light);
    text-decoration: underline;
    text-underline-offset: 2px;
    white-space: nowrap;
    margin-inline-start: var(--space-1);
}

.nx-cookie-banner-link:hover {
    color: var(--color-white);
}

.nx-cookie-banner-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    flex: 0 0 auto;
}

@media (max-width: 767px) {
    .nx-cookie-banner-actions .nx-btn {
        flex: 1 1 0;
    }
}

/* Footer "Cookie preferences" trigger styled as a link. */
.nx-footer-bottom-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3) var(--space-5);
    align-items: center;
}

.nx-footer-bottom-link-button {
    background: none;
    border: none;
    padding: 0;
    color: inherit;
    font: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.nx-footer-bottom-link-button:hover {
    color: var(--color-accent-light);
    text-decoration: underline;
}

/* Process steps — three numbered cards for "what happens next". */
.nx-process-steps {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-6);
    counter-reset: nx-process;
}

@media (min-width: 768px) {
    .nx-process-steps {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-7);
    }
}

.nx-process-step {
    position: relative;
    overflow: hidden;
    background-color: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    transition: border-color var(--transition-base), box-shadow var(--transition-base), transform var(--transition-base);
}

.nx-process-step:hover {
    border-color: var(--color-accent);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.nx-process-step-numeral {
    position: absolute;
    top: var(--space-3);
    inset-inline-end: var(--space-4);
    font-size: 5rem;
    font-weight: var(--font-weight-bold);
    line-height: 1;
    color: rgba(59, 130, 246, 0.08);
    pointer-events: none;
    user-select: none;
    letter-spacing: -0.04em;
}

.nx-process-step-icon {
    position: relative;
    width: 40px;
    height: 40px;
    color: var(--color-accent);
    margin-bottom: var(--space-5);
}

.nx-process-step-icon svg {
    width: 100%;
    height: 100%;
}

.nx-process-step-title {
    position: relative;
    color: var(--color-navy-deep);
    font-size: var(--font-size-lg);
    margin-bottom: var(--space-3);
}

.nx-process-step-body {
    position: relative;
    color: var(--color-text-muted);
    line-height: var(--line-height-relaxed);
    margin-bottom: 0;
}

/* Legal pages — Privacy, Terms. Narrow prose column with TOC + numbered sections. */
.nx-legal-section {
    padding-block: var(--section-padding-y);
}

.nx-legal-meta {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-6);
}

.nx-legal-updated {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    background-color: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.18);
    border-radius: var(--radius-full);
    padding: var(--space-2) var(--space-4);
    font-size: var(--font-size-sm);
}

.nx-legal-updated-label {
    color: var(--color-slate);
    font-weight: var(--font-weight-medium);
}

.nx-legal-updated-value {
    color: var(--color-navy-deep);
    font-weight: var(--font-weight-semibold);
}

.nx-legal-toc {
    background-color: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-5) var(--space-6);
    margin-bottom: var(--space-9);
}

.nx-legal-toc-label {
    display: block;
    color: var(--color-slate);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: var(--space-3);
}

.nx-legal-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-4);
}

.nx-legal-toc-list a {
    color: var(--color-accent-dark);
    text-decoration: none;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    transition: color var(--transition-fast), background-color var(--transition-fast);
}

.nx-legal-toc-list a:hover {
    color: var(--color-accent);
    background-color: rgba(59, 130, 246, 0.08);
    text-decoration: none;
}

.nx-legal-body {
    display: flex;
    flex-direction: column;
    gap: var(--space-9);
}

.nx-legal-section-block {
    scroll-margin-top: 100px;
}

.nx-legal-section-title {
    display: flex;
    align-items: baseline;
    gap: var(--space-4);
    color: var(--color-navy-deep);
    font-size: var(--font-size-2xl);
    margin-bottom: var(--space-5);
    padding-bottom: var(--space-3);
    border-bottom: 1px solid var(--color-border);
}

.nx-legal-section-number {
    color: var(--color-accent);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-bold);
    letter-spacing: 0.08em;
    flex: 0 0 auto;
}

.nx-legal-prose {
    color: var(--color-text);
    line-height: var(--line-height-relaxed);
}

.nx-legal-prose p {
    margin-block: 0 var(--space-4);
}

.nx-legal-prose p:last-child {
    margin-bottom: 0;
}

.nx-legal-prose ul {
    list-style: none;
    padding: 0;
    margin-block: 0 var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.nx-legal-prose ul:last-child {
    margin-bottom: 0;
}

.nx-legal-prose li {
    position: relative;
    padding-inline-start: var(--space-5);
    color: var(--color-text);
}

.nx-legal-prose li::before {
    content: "";
    position: absolute;
    inset-inline-start: 4px;
    top: 0.65em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--color-accent);
}

.nx-legal-prose strong {
    color: var(--color-navy-deep);
    font-weight: var(--font-weight-semibold);
}

.nx-legal-prose a {
    color: var(--color-accent-dark);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.nx-legal-prose a:hover {
    color: var(--color-accent);
}

.nx-legal-contact-card {
    margin-top: var(--space-9);
    background: var(--gradient-brand-soft);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--space-7);
}

@media (min-width: 768px) {
    .nx-legal-contact-card {
        padding: var(--space-8);
    }
}

.nx-legal-contact-card-title {
    color: var(--color-navy-deep);
    font-size: var(--font-size-2xl);
    margin-block: var(--space-3) var(--space-3);
}

.nx-legal-contact-card-body {
    color: var(--color-text-muted);
    line-height: var(--line-height-relaxed);
    margin-bottom: var(--space-6);
}

.nx-legal-contact-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
}
