/* =========================================================================
   ModularSolution — Public site design system
   Layered on top of Bootstrap 5.3. Tokens first, then Bootstrap overrides,
   then components. Docs pages load this file too, so everything here must
   be safe for long-form content.
   ========================================================================= */

/* -------------------------------------------------------------------------
   1. Tokens
   ---------------------------------------------------------------------- */
:root {
    /* Brand */
    --ms-brand-50:  #eef2ff;
    --ms-brand-100: #e0e7ff;
    --ms-brand-200: #c7d2fe;
    --ms-brand-400: #818cf8;
    --ms-brand-500: #6366f1;
    --ms-brand-600: #4f46e5;
    --ms-brand-700: #4338ca;
    --ms-violet-600: #7c3aed;

    /* Neutrals */
    --ms-ink:      #0d1425;
    --ms-ink-soft: #26304a;
    --ms-muted:    #5b6478;
    --ms-faint:    #8a93a6;
    --ms-line:     #e6eaf2;
    --ms-line-soft:#eff2f7;
    --ms-surface:  #ffffff;
    --ms-canvas:   #f7f9fc;
    --ms-canvas-2: #f1f4fa;

    /* Accents */
    --ms-success: #10b981;
    --ms-warning: #f59e0b;
    --ms-danger:  #ef4444;
    --ms-info:    #0ea5e9;

    /* Elevation — soft and low-contrast, never the Bootstrap default slabs */
    --ms-shadow-xs: 0 1px 2px rgba(13, 20, 37, .04);
    --ms-shadow-sm: 0 1px 3px rgba(13, 20, 37, .05), 0 1px 2px rgba(13, 20, 37, .03);
    --ms-shadow-md: 0 4px 12px rgba(13, 20, 37, .06), 0 1px 3px rgba(13, 20, 37, .04);
    --ms-shadow-lg: 0 12px 32px rgba(13, 20, 37, .08), 0 2px 8px rgba(13, 20, 37, .04);
    --ms-shadow-xl: 0 24px 56px rgba(13, 20, 37, .12), 0 4px 12px rgba(13, 20, 37, .05);
    --ms-shadow-brand: 0 8px 24px rgba(79, 70, 229, .22);

    /* Radii */
    --ms-r-sm: 8px;
    --ms-r:    12px;
    --ms-r-lg: 16px;
    --ms-r-xl: 22px;
    --ms-r-pill: 999px;

    /* Layout */
    --ms-nav-h: 68px;

    /* Motion */
    --ms-ease: cubic-bezier(.22, .61, .36, 1);
}

/* -------------------------------------------------------------------------
   2. Bootstrap variable overrides
   Re-points Bootstrap's own components (incl. every docs page) at the tokens.
   ---------------------------------------------------------------------- */
:root {
    --bs-primary: var(--ms-brand-600);
    --bs-primary-rgb: 79, 70, 229;
    --bs-link-color: var(--ms-brand-600);
    --bs-link-color-rgb: 79, 70, 229;
    --bs-link-hover-color: var(--ms-brand-700);
    --bs-link-hover-color-rgb: 67, 56, 202;

    --bs-success: var(--ms-success);
    --bs-success-rgb: 16, 185, 129;
    --bs-warning: var(--ms-warning);
    --bs-warning-rgb: 245, 158, 11;
    --bs-danger: var(--ms-danger);
    --bs-danger-rgb: 239, 68, 68;
    --bs-info: var(--ms-info);
    --bs-info-rgb: 14, 165, 233;

    --bs-body-color: var(--ms-ink-soft);
    --bs-body-color-rgb: 38, 48, 74;
    --bs-body-bg: var(--ms-surface);
    --bs-secondary-color: var(--ms-muted);
    --bs-border-color: var(--ms-line);
    --bs-border-radius: var(--ms-r);
    --bs-border-radius-sm: var(--ms-r-sm);
    --bs-border-radius-lg: var(--ms-r-lg);
    --bs-body-font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --bs-emphasis-color: var(--ms-ink);
}

/* -------------------------------------------------------------------------
   3. Base
   ---------------------------------------------------------------------- */
html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--ms-nav-h) + 16px);
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--bs-body-font-family);
    color: var(--ms-ink-soft);
    background: var(--ms-surface);
    font-size: 1rem;
    line-height: 1.65;
    letter-spacing: -0.005em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    color: var(--ms-ink);
    font-weight: 700;
    line-height: 1.18;
    letter-spacing: -0.025em;
    text-wrap: balance;
}

/* Type scale — fluid, replaces Bootstrap's fixed display sizes */
.display-1, .display-2, .display-3, .display-4 {
    font-size: clamp(2.5rem, 1.4rem + 4.4vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.06;
}

.display-5 {
    font-size: clamp(2rem, 1.3rem + 3vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.display-6 {
    font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.5rem);
    font-weight: 750;
    letter-spacing: -0.028em;
    line-height: 1.15;
}

.lead {
    font-size: clamp(1.0625rem, 1rem + .35vw, 1.25rem);
    font-weight: 400;
    line-height: 1.6;
    color: var(--ms-muted);
    text-wrap: pretty;
}

p { text-wrap: pretty; }

.text-muted { color: var(--ms-muted) !important; }
.text-faint { color: var(--ms-faint) !important; }

a { text-underline-offset: 3px; }

::selection {
    background: var(--ms-brand-100);
    color: var(--ms-brand-700);
}

:focus-visible {
    outline: 2px solid var(--ms-brand-500);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Skip link for keyboard users */
.skip-link {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translate(-50%, -120%);
    z-index: 2000;
    padding: .625rem 1.25rem;
    background: var(--ms-ink);
    color: #fff;
    border-radius: 0 0 var(--ms-r) var(--ms-r);
    font-weight: 600;
    text-decoration: none;
    transition: transform .18s var(--ms-ease);
}

.skip-link:focus {
    transform: translate(-50%, 0);
    color: #fff;
}

/* -------------------------------------------------------------------------
   4. Layout helpers
   ---------------------------------------------------------------------- */
.section {
    padding-block: clamp(3.5rem, 2rem + 6vw, 6.5rem);
}

.section-tight { padding-block: clamp(2.5rem, 1.5rem + 4vw, 4.5rem); }

.section-canvas { background: var(--ms-canvas); }

.section-line { border-top: 1px solid var(--ms-line); }

.stack-sm > * + * { margin-top: .5rem; }
.stack   > * + * { margin-top: 1rem; }

.measure { max-width: 44ch; }
.measure-wide { max-width: 62ch; }

.section-head {
    max-width: 46rem;
    margin-inline: auto;
    text-align: center;
    margin-bottom: clamp(2.5rem, 1.5rem + 3vw, 4rem);
}

.section-head .lead { margin-bottom: 0; }

/* Eyebrow label above section headings */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: .8125rem;
    font-weight: 650;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--ms-brand-600);
    margin-bottom: .875rem;
}

.eyebrow::before {
    content: "";
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    opacity: .55;
}

.eyebrow-center { justify-content: center; }
.eyebrow-center::before { display: none; }

/* -------------------------------------------------------------------------
   5. Navigation
   ---------------------------------------------------------------------- */
.ms-nav {
    height: var(--ms-nav-h);
    background: rgba(255, 255, 255, .82);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color .25s var(--ms-ease), box-shadow .25s var(--ms-ease), background .25s var(--ms-ease);
}

.ms-nav.scrolled {
    border-bottom-color: var(--ms-line);
    box-shadow: var(--ms-shadow-sm);
    background: rgba(255, 255, 255, .92);
}

.ms-nav .navbar-brand {
    font-weight: 750;
    font-size: 1.125rem;
    letter-spacing: -0.03em;
    color: var(--ms-ink);
    display: inline-flex;
    align-items: center;
    gap: .625rem;
}

.ms-nav .navbar-brand:hover { color: var(--ms-ink); }

.brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    display: inline-grid;
    place-items: center;
    background: linear-gradient(135deg, var(--ms-brand-500), var(--ms-violet-600));
    color: #fff;
    font-size: 1rem;
    box-shadow: var(--ms-shadow-brand);
    flex: 0 0 auto;
}

.ms-nav .nav-link {
    font-size: .9375rem;
    font-weight: 550;
    color: var(--ms-muted);
    padding: .5rem .875rem !important;
    border-radius: var(--ms-r-sm);
    transition: color .16s var(--ms-ease), background .16s var(--ms-ease);
}

.ms-nav .nav-link:hover,
.ms-nav .nav-link:focus-visible {
    color: var(--ms-ink);
    background: var(--ms-canvas-2);
}

.ms-nav .nav-link.active {
    color: var(--ms-brand-600);
    font-weight: 650;
}

.ms-nav .navbar-toggler {
    border: 1px solid var(--ms-line);
    border-radius: var(--ms-r-sm);
    padding: .4rem .6rem;
}

.ms-nav .navbar-toggler:focus { box-shadow: none; }

@media (max-width: 991.98px) {
    .ms-nav .navbar-collapse {
        background: var(--ms-surface);
        margin: .75rem -.75rem 0;
        padding: 1rem .75rem 1.25rem;
        border: 1px solid var(--ms-line);
        border-radius: var(--ms-r-lg);
        box-shadow: var(--ms-shadow-lg);
    }

    .ms-nav .nav-link { padding: .625rem .75rem !important; }

    .ms-nav .nav-actions {
        margin-top: .75rem;
        padding-top: .875rem;
        border-top: 1px solid var(--ms-line-soft);
    }

    .ms-nav .nav-actions .btn { width: 100%; }
}

/* -------------------------------------------------------------------------
   6. Buttons
   ---------------------------------------------------------------------- */
.btn {
    --bs-btn-focus-box-shadow: 0 0 0 3px rgba(79, 70, 229, .18);
    border-radius: var(--ms-r-sm);
    font-weight: 600;
    font-size: .9375rem;
    letter-spacing: -0.01em;
    padding: .5625rem 1.125rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    transition: transform .14s var(--ms-ease), box-shadow .2s var(--ms-ease),
                background-color .16s var(--ms-ease), border-color .16s var(--ms-ease), color .16s var(--ms-ease);
}

.btn-lg {
    padding: .8125rem 1.5rem;
    font-size: 1rem;
    border-radius: var(--ms-r);
}

.btn-sm { padding: .375rem .75rem; font-size: .875rem; }

.btn:active { transform: translateY(1px); }

.btn i { font-size: 1.05em; line-height: 1; }

/* Primary — gradient brand */
.btn-primary,
.btn-brand {
    background: linear-gradient(135deg, var(--ms-brand-600), var(--ms-violet-600));
    border: none;
    color: #fff;
    box-shadow: var(--ms-shadow-brand);
}

.btn-primary:hover, .btn-brand:hover,
.btn-primary:focus-visible, .btn-brand:focus-visible {
    background: linear-gradient(135deg, var(--ms-brand-700), #6d28d9);
    color: #fff;
    box-shadow: 0 10px 28px rgba(79, 70, 229, .3);
    transform: translateY(-1px);
}

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

.btn-primary:disabled, .btn-brand:disabled {
    background: var(--ms-brand-200);
    box-shadow: none;
    color: #fff;
}

/* Secondary — quiet outline that still reads as clickable */
.btn-outline-primary,
.btn-ghost {
    background: var(--ms-surface);
    border: 1px solid var(--ms-line);
    color: var(--ms-ink);
    box-shadow: var(--ms-shadow-xs);
}

.btn-outline-primary:hover, .btn-ghost:hover,
.btn-outline-primary:focus-visible, .btn-ghost:focus-visible {
    background: var(--ms-surface);
    border-color: var(--ms-brand-400);
    color: var(--ms-brand-700);
    box-shadow: var(--ms-shadow-md);
    transform: translateY(-1px);
}

.btn-outline-secondary {
    border-color: var(--ms-line);
    color: var(--ms-muted);
}

.btn-outline-secondary:hover {
    background: var(--ms-canvas-2);
    border-color: var(--ms-line);
    color: var(--ms-ink);
}

.btn-dark {
    background: var(--ms-ink);
    border-color: var(--ms-ink);
}

.btn-dark:hover {
    background: #1a2440;
    border-color: #1a2440;
    transform: translateY(-1px);
}

/* On dark/tinted backgrounds */
.btn-on-dark {
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .28);
    color: #fff;
    backdrop-filter: blur(8px);
}

.btn-on-dark:hover, .btn-on-dark:focus-visible {
    background: rgba(255, 255, 255, .18);
    border-color: rgba(255, 255, 255, .45);
    color: #fff;
    transform: translateY(-1px);
}

.btn-white {
    background: #fff;
    color: var(--ms-brand-700);
    border: none;
    box-shadow: var(--ms-shadow-lg);
}

.btn-white:hover, .btn-white:focus-visible {
    background: #fff;
    color: var(--ms-brand-700);
    transform: translateY(-1px);
    box-shadow: var(--ms-shadow-xl);
}

/* Text link with arrow */
.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: .375rem;
    font-weight: 600;
    font-size: .9375rem;
    color: var(--ms-brand-600);
    text-decoration: none;
}

.link-arrow i { transition: transform .18s var(--ms-ease); }
.link-arrow:hover { color: var(--ms-brand-700); }
.link-arrow:hover i { transform: translateX(3px); }

/* -------------------------------------------------------------------------
   7. Cards & surfaces
   ---------------------------------------------------------------------- */
.card {
    border-radius: var(--ms-r-lg);
    border: 1px solid var(--ms-line);
    background: var(--ms-surface);
    box-shadow: none;
}

/* Neutralise Bootstrap's stock shadows so cards stay in one visual family */
.card.shadow-sm { box-shadow: var(--ms-shadow-sm) !important; }
.card.shadow    { box-shadow: var(--ms-shadow-md) !important; }
.card.shadow-lg { box-shadow: var(--ms-shadow-lg) !important; }

.card-soft {
    border: 1px solid var(--ms-line);
    border-radius: var(--ms-r-lg);
    background: var(--ms-surface);
    box-shadow: var(--ms-shadow-sm);
    transition: transform .22s var(--ms-ease), box-shadow .22s var(--ms-ease), border-color .22s var(--ms-ease);
}

.card-hover:hover,
.hover-shadow:hover {
    transform: translateY(-3px);
    box-shadow: var(--ms-shadow-lg) !important;
    border-color: var(--ms-brand-200);
}

.hover-shadow { transition: transform .22s var(--ms-ease), box-shadow .22s var(--ms-ease), border-color .22s var(--ms-ease); }

/* Icon tile used across feature/module/app cards */
.icon-tile {
    width: 46px;
    height: 46px;
    border-radius: var(--ms-r);
    display: inline-grid;
    place-items: center;
    font-size: 1.35rem;
    background: var(--ms-brand-50);
    color: var(--ms-brand-600);
    flex: 0 0 auto;
}

.icon-tile-lg { width: 60px; height: 60px; font-size: 1.75rem; border-radius: var(--ms-r-lg); }

.icon-tile-brand   { background: var(--ms-brand-50);       color: var(--ms-brand-600); }
.icon-tile-success { background: rgba(16, 185, 129, .1);   color: #059669; }
.icon-tile-warning { background: rgba(245, 158, 11, .12);  color: #d97706; }
.icon-tile-info    { background: rgba(14, 165, 233, .1);   color: #0284c7; }
.icon-tile-violet  { background: rgba(124, 58, 237, .1);   color: var(--ms-violet-600); }
.icon-tile-ink     { background: var(--ms-canvas-2);       color: var(--ms-ink); }

/* Soft pill badge */
.badge-soft {
    display: inline-flex;
    align-items: center;
    gap: .375rem;
    padding: .3125rem .75rem;
    border-radius: var(--ms-r-pill);
    font-size: .8125rem;
    font-weight: 600;
    letter-spacing: -0.005em;
    background: var(--ms-brand-50);
    color: var(--ms-brand-700);
    border: 1px solid var(--ms-brand-100);
}

.badge-soft-success { background: rgba(16, 185, 129, .1);  color: #047857; border-color: rgba(16, 185, 129, .2); }
.badge-soft-warning { background: rgba(245, 158, 11, .12); color: #b45309; border-color: rgba(245, 158, 11, .22); }
.badge-soft-muted   { background: var(--ms-canvas-2);      color: var(--ms-muted); border-color: var(--ms-line); }

/* Feature checklist */
.check-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.check-list li {
    position: relative;
    padding-left: 1.75rem;
    margin-bottom: .625rem;
    color: var(--ms-muted);
    font-size: .9375rem;
}

.check-list li::before {
    content: "\F26E"; /* bi-check-lg */
    font-family: "bootstrap-icons";
    position: absolute;
    left: 0;
    top: .05em;
    color: var(--ms-success);
    font-weight: 700;
}

.check-list-tight li { margin-bottom: .375rem; }

/* -------------------------------------------------------------------------
   8. Hero
   ---------------------------------------------------------------------- */
.hero {
    position: relative;
    padding-top: clamp(3.5rem, 2rem + 6vw, 6rem);
    padding-bottom: clamp(3.5rem, 2rem + 6vw, 6rem);
    background: linear-gradient(180deg, var(--ms-brand-50) 0%, rgba(238, 242, 255, .35) 45%, var(--ms-surface) 100%);
    overflow: hidden;
    isolation: isolate;
}

/* Soft colour blooms behind the hero content */
.hero::before,
.hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    z-index: -1;
    pointer-events: none;
}

.hero::before {
    width: 620px;
    height: 620px;
    top: -320px;
    left: -180px;
    background: radial-gradient(circle, rgba(99, 102, 241, .3), transparent 68%);
}

.hero::after {
    width: 560px;
    height: 560px;
    top: -180px;
    right: -220px;
    background: radial-gradient(circle, rgba(124, 58, 237, .22), transparent 68%);
}

/* Faint grid texture */
.hero-grid {
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(13, 20, 37, .028) 1px, transparent 1px),
        linear-gradient(90deg, rgba(13, 20, 37, .028) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 30%, transparent 78%);
    -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 30%, transparent 78%);
    pointer-events: none;
}

.hero h1 { margin-bottom: 1.25rem; }

.hero .lead { max-width: 34rem; }

.text-gradient {
    background: linear-gradient(120deg, var(--ms-brand-600) 10%, var(--ms-violet-600) 55%, #db2777 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* Trust strip under hero CTAs */
.trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin-top: 1.5rem;
    font-size: .875rem;
    color: var(--ms-muted);
}

.trust-row span {
    display: inline-flex;
    align-items: center;
    gap: .4375rem;
}

.trust-row i { color: var(--ms-success); font-size: 1rem; }

/* Framed app screenshot */
.app-frame {
    position: relative;
    border-radius: var(--ms-r-xl);
    background: var(--ms-surface);
    border: 1px solid var(--ms-line);
    box-shadow: var(--ms-shadow-xl);
    overflow: hidden;
}

.app-frame-bar {
    display: flex;
    align-items: center;
    gap: .375rem;
    padding: .75rem 1rem;
    border-bottom: 1px solid var(--ms-line-soft);
    background: var(--ms-canvas);
}

.app-frame-bar span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--ms-line);
}

.app-frame-bar span:nth-child(1) { background: #ff5f57; }
.app-frame-bar span:nth-child(2) { background: #febc2e; }
.app-frame-bar span:nth-child(3) { background: #28c840; }

.app-frame img { display: block; width: 100%; height: auto; }

/* -------------------------------------------------------------------------
   9. Stats
   ---------------------------------------------------------------------- */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1px;
    background: var(--ms-line);
    border: 1px solid var(--ms-line);
    border-radius: var(--ms-r-lg);
    overflow: hidden;
}

.stat {
    background: var(--ms-surface);
    padding: 1.5rem 1.25rem;
    text-align: center;
}

.stat-value {
    display: block;
    font-size: clamp(1.5rem, 1.2rem + 1.1vw, 2rem);
    font-weight: 750;
    letter-spacing: -0.03em;
    color: var(--ms-ink);
    line-height: 1.1;
}

.stat-label {
    display: block;
    margin-top: .25rem;
    font-size: .8125rem;
    color: var(--ms-muted);
}

/* -------------------------------------------------------------------------
   10. Module / pricing cards
   ---------------------------------------------------------------------- */
.module-card {
    position: relative;
    cursor: pointer;
    border: 1px solid var(--ms-line);
    border-radius: var(--ms-r-lg);
    background: var(--ms-surface);
    box-shadow: var(--ms-shadow-xs);
    transition: border-color .18s var(--ms-ease), box-shadow .18s var(--ms-ease), transform .18s var(--ms-ease);
}

.module-card:hover {
    border-color: var(--ms-brand-400);
    box-shadow: var(--ms-shadow-md);
    transform: translateY(-2px);
}

.module-card.selected {
    border-color: var(--ms-brand-600);
    box-shadow: 0 0 0 1px var(--ms-brand-600), var(--ms-shadow-md);
    background: linear-gradient(180deg, var(--ms-brand-50), var(--ms-surface) 70%);
}

.module-card .form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    border-color: var(--ms-line);
    cursor: pointer;
}

.price-tag {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--ms-brand-600);
    letter-spacing: -0.02em;
}

.price-tag small { font-weight: 500; color: var(--ms-faint); font-size: .8125rem; }

/* Estimate panel */
.estimate-card {
    border: 1px solid var(--ms-line);
    border-radius: var(--ms-r-lg);
    box-shadow: var(--ms-shadow-lg);
    overflow: hidden;
    background: var(--ms-surface);
}

.estimate-head {
    background: var(--ms-ink);
    color: #fff;
    padding: 1.125rem 1.5rem;
    font-weight: 650;
    letter-spacing: -0.015em;
}

.estimate-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    font-size: .9375rem;
    margin-bottom: .625rem;
    color: var(--ms-muted);
}

.estimate-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    font-size: 1.375rem;
    font-weight: 750;
    letter-spacing: -0.025em;
    color: var(--ms-ink);
}

.estimate-total small { font-size: .8125rem; font-weight: 500; color: var(--ms-faint); }

/* Billing toggle */
.billing-switch {
    display: inline-flex;
    align-items: center;
    gap: .875rem;
    padding: .375rem .5rem;
    border: 1px solid var(--ms-line);
    border-radius: var(--ms-r-pill);
    background: var(--ms-surface);
    box-shadow: var(--ms-shadow-xs);
}

.billing-switch .form-check-input {
    width: 2.75rem;
    height: 1.5rem;
    margin: 0;
    cursor: pointer;
    background-color: var(--ms-line);
    border-color: var(--ms-line);
}

.billing-switch .form-check-input:checked {
    background-color: var(--ms-brand-600);
    border-color: var(--ms-brand-600);
}

.billing-switch label {
    font-size: .9375rem;
    font-weight: 600;
    color: var(--ms-muted);
    cursor: pointer;
    margin: 0;
}

.billing-switch label.is-active { color: var(--ms-ink); }

/* -------------------------------------------------------------------------
   11. Forms
   ---------------------------------------------------------------------- */
.form-label {
    font-size: .875rem;
    font-weight: 600;
    color: var(--ms-ink);
    margin-bottom: .4375rem;
}

.form-control, .form-select {
    border-radius: var(--ms-r-sm);
    border: 1px solid var(--ms-line);
    padding: .625rem .875rem;
    font-size: .9375rem;
    color: var(--ms-ink);
    background-color: var(--ms-surface);
    transition: border-color .16s var(--ms-ease), box-shadow .16s var(--ms-ease);
}

.form-control::placeholder { color: var(--ms-faint); }

.form-control:focus, .form-select:focus {
    border-color: var(--ms-brand-500);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, .14);
}

.form-control.is-invalid, .form-select.is-invalid { border-color: var(--ms-danger); }

.form-control.is-invalid:focus { box-shadow: 0 0 0 3px rgba(239, 68, 68, .14); }

.input-group-text {
    background: var(--ms-canvas);
    border-color: var(--ms-line);
    color: var(--ms-muted);
    border-radius: var(--ms-r-sm);
}

.form-text { font-size: .8125rem; color: var(--ms-faint); }

.form-check-input:checked {
    background-color: var(--ms-brand-600);
    border-color: var(--ms-brand-600);
}

.form-check-input:focus {
    border-color: var(--ms-brand-500);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, .14);
}

/* Form panel used by trial / contact pages */
.form-panel {
    border: 1px solid var(--ms-line);
    border-radius: var(--ms-r-xl);
    background: var(--ms-surface);
    box-shadow: var(--ms-shadow-lg);
    padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
}

/* Selectable module tile inside forms */
.pick-tile {
    display: flex;
    align-items: flex-start;
    gap: .875rem;
    padding: 1rem;
    border: 1px solid var(--ms-line);
    border-radius: var(--ms-r);
    background: var(--ms-surface);
    cursor: pointer;
    transition: border-color .16s var(--ms-ease), background .16s var(--ms-ease), box-shadow .16s var(--ms-ease);
    height: 100%;
}

.pick-tile:hover { border-color: var(--ms-brand-400); box-shadow: var(--ms-shadow-sm); }

.pick-tile:has(input:checked) {
    border-color: var(--ms-brand-600);
    background: var(--ms-brand-50);
    box-shadow: 0 0 0 1px var(--ms-brand-600);
}

.pick-tile input { margin-top: .2rem; flex: 0 0 auto; }

/* -------------------------------------------------------------------------
   12. Alerts
   ---------------------------------------------------------------------- */
.alert {
    border-radius: var(--ms-r);
    border: 1px solid transparent;
    font-size: .9375rem;
    padding: 1rem 1.125rem;
}

.alert-info    { background: rgba(14, 165, 233, .07);  border-color: rgba(14, 165, 233, .2);  color: #075985; }
.alert-success { background: rgba(16, 185, 129, .08);  border-color: rgba(16, 185, 129, .22); color: #065f46; }
.alert-warning { background: rgba(245, 158, 11, .09);  border-color: rgba(245, 158, 11, .24); color: #92400e; }
.alert-danger  { background: rgba(239, 68, 68, .07);   border-color: rgba(239, 68, 68, .2);   color: #991b1b; }

/* -------------------------------------------------------------------------
   13. CTA band
   ---------------------------------------------------------------------- */
.cta-band {
    position: relative;
    background: linear-gradient(135deg, var(--ms-brand-700) 0%, var(--ms-brand-600) 45%, var(--ms-violet-600) 100%);
    color: #fff;
    overflow: hidden;
    isolation: isolate;
}

.cta-band::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse 60% 80% at 15% 0%, rgba(255, 255, 255, .18), transparent 60%),
        radial-gradient(ellipse 50% 70% at 90% 100%, rgba(219, 39, 119, .3), transparent 62%);
}

.cta-band h2, .cta-band .h2 { color: #fff; }
.cta-band .lead { color: rgba(255, 255, 255, .82); }

/* -------------------------------------------------------------------------
   14. Footer
   ---------------------------------------------------------------------- */
.ms-footer {
    background: var(--ms-ink);
    color: rgba(255, 255, 255, .68);
    padding-top: clamp(3rem, 2rem + 3vw, 4.5rem);
    padding-bottom: 2rem;
    font-size: .9375rem;
}

.ms-footer h6 {
    color: #fff;
    font-size: .8125rem;
    font-weight: 650;
    letter-spacing: .06em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.ms-footer .navbar-brand,
.ms-footer .footer-brand {
    color: #fff;
    font-weight: 750;
    font-size: 1.125rem;
    letter-spacing: -0.03em;
    display: inline-flex;
    align-items: center;
    gap: .625rem;
    text-decoration: none;
}

.ms-footer ul { list-style: none; padding: 0; margin: 0; }

.ms-footer li { margin-bottom: .5rem; }

.ms-footer a {
    color: rgba(255, 255, 255, .68);
    text-decoration: none;
    transition: color .16s var(--ms-ease);
}

.ms-footer a:hover { color: #fff; }

.ms-footer hr {
    border-color: rgba(255, 255, 255, .12);
    opacity: 1;
    margin-block: 2.5rem 1.5rem;
}

.footer-social {
    display: inline-flex;
    gap: .5rem;
}

.footer-social a {
    width: 36px;
    height: 36px;
    border-radius: var(--ms-r-sm);
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, .07);
    color: rgba(255, 255, 255, .72);
    font-size: 1rem;
    transition: background .16s var(--ms-ease), color .16s var(--ms-ease), transform .16s var(--ms-ease);
}

.footer-social a:hover {
    background: rgba(255, 255, 255, .15);
    color: #fff;
    transform: translateY(-2px);
}

.footer-meta { font-size: .875rem; color: rgba(255, 255, 255, .5); }

/* -------------------------------------------------------------------------
   15. Utilities
   ---------------------------------------------------------------------- */
.bg-canvas { background: var(--ms-canvas) !important; }
.border-soft { border-color: var(--ms-line) !important; }
.rounded-xl { border-radius: var(--ms-r-xl) !important; }
.shadow-soft { box-shadow: var(--ms-shadow-md) !important; }
.fw-650 { font-weight: 650 !important; }

.divider-fade {
    height: 1px;
    border: 0;
    background: linear-gradient(90deg, transparent, var(--ms-line) 20%, var(--ms-line) 80%, transparent);
    opacity: 1;
}

/* Entrance animation — opt-in, and disabled for reduced-motion users */
@keyframes ms-rise {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

.animate-rise,
.animate-fade-in-up {
    animation: ms-rise .55s var(--ms-ease) both;
}

.delay-1 { animation-delay: .07s; }
.delay-2 { animation-delay: .14s; }
.delay-3 { animation-delay: .21s; }

/* Loading overlay (used by site.js) */
.spinner-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, .82);
    backdrop-filter: blur(2px);
    display: grid;
    place-items: center;
    z-index: 9999;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }

    .btn:hover, .card-hover:hover, .hover-shadow:hover,
    .module-card:hover, .footer-social a:hover { transform: none; }
}
