/* ============================================
   TECHenya Solutions — Design System
   Centralized design tokens + premium components.
   All brand colors flow from :root CSS vars.
   Profile vars from color-profiles.css override these.
   ============================================ */

/* ─── Design Tokens ─────────────────────────────── */
:root {
    /* Brand Colors */
    --te-blue: #0a66c2;
    --te-blue-light: #2d8bda;
    --te-blue-dark: #084e96;
    --te-blue-50: rgba(10, 102, 194, 0.06);
    --te-blue-100: rgba(10, 102, 194, 0.12);

    --te-navy: #0f172a;
    --te-navy-light: #1e293b;
    --te-navy-dark: #020617;
    --te-navy-50: rgba(15, 23, 42, 0.06);
    --te-navy-100: rgba(15, 23, 42, 0.12);

    --te-orange: #ff6b35;
    --te-orange-light: #ff8f66;
    --te-orange-dark: #e0541e;
    --te-orange-50: rgba(255, 107, 53, 0.08);

    --te-teal: #2d8bda;
    --te-teal-dark: #0a66c2;
    --te-teal-50: rgba(10, 102, 194, 0.08);

    /* Neutrals (slate-tinted for premium feel) */
    --te-gray-50: #f8fafc;
    --te-gray-100: #f1f5f9;
    --te-gray-200: #e2e8f0;
    --te-gray-300: #cbd5e1;
    --te-gray-400: #94a3b8;
    --te-gray-500: #64748b;
    --te-gray-600: #475569;
    --te-gray-700: #334155;
    --te-gray-800: #1e293b;
    --te-gray-900: #0f172a;

    /* Functional */
    --te-success: #10b981;
    --te-success-bg: #ecfdf5;
    --te-error: #ef4444;
    --te-error-bg: #fef2f2;
    --te-warning: var(--te-orange);
    --te-info: var(--te-blue);

    /* Shadows (depth system) */
    --te-shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.05);
    --te-shadow-sm: 0 2px 6px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
    --te-shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08), 0 2px 4px rgba(15, 23, 42, 0.04);
    --te-shadow-lg: 0 10px 30px rgba(15, 23, 42, 0.10), 0 4px 8px rgba(15, 23, 42, 0.04);
    --te-shadow-xl: 0 20px 50px rgba(15, 23, 42, 0.14), 0 8px 16px rgba(15, 23, 42, 0.06);
    --te-shadow-blue: 0 8px 30px rgba(10, 102, 194, 0.25);
    --te-shadow-orange: 0 8px 30px rgba(255, 107, 53, 0.25);

    /* Radius */
    --te-radius-sm: 0.5rem;
    --te-radius-md: 0.75rem;
    --te-radius-lg: 1rem;
    --te-radius-xl: 1.5rem;
    --te-radius-full: 9999px;

    /* Spacing */
    --te-section-padding: clamp(2.5rem, 5vw, 4rem);

    /* Transitions */
    --te-ease: cubic-bezier(0.4, 0, 0.2, 1);
    --te-ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --te-duration: 0.3s;
    --te-duration-slow: 0.5s;

    /* Gradients */
    --te-gradient-hero: linear-gradient(135deg, var(--te-navy) 0%, var(--te-blue) 100%);
    --te-gradient-primary: linear-gradient(135deg, var(--te-blue), var(--te-navy));
    --te-gradient-cta: linear-gradient(135deg, var(--te-orange), var(--te-orange-dark));
    --te-gradient-dark: linear-gradient(135deg, var(--te-navy), var(--te-navy-dark));
    --te-gradient-surface: linear-gradient(135deg, var(--te-gray-50) 0%, var(--te-gray-100) 100%);
}

/* ─── Typography ────────────────────────────────── */
body {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: var(--te-text-body);
    background: var(--te-bg-body);
    font-size: 1rem;
    line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6,
.font-heading {
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    color: var(--te-text-heading);
    line-height: 1.15;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2.25rem, 5vw, 3.75rem);
    font-weight: 800;
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 700;
}

h3 {
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    font-weight: 700;
}

h4 {
    font-size: clamp(1.1rem, 2vw, 1.375rem);
    font-weight: 600;
}

h5 {
    font-size: 1.125rem;
    font-weight: 600;
}

h6 {
    font-size: 1rem;
    font-weight: 600;
}

a {
    transition: color var(--te-duration) var(--te-ease);
}

/* ─── Buttons ───────────────────────────────────── */
.te-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8125rem 2rem;
    border-radius: var(--te-radius-full);
    font-weight: 600;
    font-size: 0.9375rem;
    font-family: 'Inter', sans-serif;
    line-height: 1.4;
    cursor: pointer;
    border: none;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    transition: all var(--te-duration) var(--te-ease);
}

.te-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 0;
    transition: opacity var(--te-duration) var(--te-ease);
    z-index: -1;
}

.te-btn:hover {
    transform: translateY(-2px);
}

.te-btn:active {
    transform: translateY(0);
}

/* Primary — accent gradient */
.te-btn-primary {
    background: var(--te-gradient-accent);
    color: var(--te-text-on-accent);
    box-shadow: var(--te-shadow-accent);
}

.te-btn-primary::after {
    background: rgba(255, 255, 255, 0.1);
}

.te-btn-primary:hover::after {
    opacity: 1;
}

.te-btn-primary:hover {
    box-shadow: var(--te-shadow-accent);
    filter: brightness(1.08);
}

/* Secondary — CTA gradient */
.te-btn-secondary {
    background: var(--te-gradient-cta);
    color: var(--te-text-on-accent);
    box-shadow: var(--te-secondary-glow);
}

.te-btn-secondary::after {
    background: rgba(255, 255, 255, 0.12);
}

.te-btn-secondary:hover::after {
    opacity: 1;
}

.te-btn-secondary:hover {
    box-shadow: var(--te-secondary-glow);
    filter: brightness(1.08);
}

/* Outline — accent border */
.te-btn-outline {
    background: transparent;
    color: var(--te-accent);
    border: 2px solid var(--te-accent);
}

.te-btn-outline:hover {
    background: var(--te-accent);
    color: var(--te-text-on-accent);
    box-shadow: var(--te-shadow-accent);
}

/* White — glass */
.te-btn-white {
    background: var(--te-bg-raised);
    color: var(--te-text-heading);
    box-shadow: var(--te-shadow-md);
}

.te-btn-white:hover {
    box-shadow: var(--te-shadow-lg);
}

/* ─── Inline Lead Capture Form ─── */
.te-inline-lead-form .flex {
    border-radius: 9999px;
    overflow: hidden;
    box-shadow: var(--te-shadow-lg);
    background: var(--te-bg-raised);
    max-width: 100%;
}

.te-inline-lead-input {
    flex: 1;
    min-width: 0;
    padding: 0.85rem 1.25rem;
    border: 2px solid rgba(15, 23, 42, 0.15);
    outline: none;
    font-size: 0.95rem;
    color: var(--te-text-heading);
    background: rgba(255, 255, 255, 0.95);
    transition: border-color 0.2s ease;
}

.te-inline-lead-input:focus {
    border-color: var(--te-accent);
}

.te-inline-lead-input::placeholder {
    color: var(--te-text-muted, #64748b);
    font-size: 0.875rem;
}

.te-inline-lead-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.85rem 1.5rem;
    background: var(--te-secondary);
    color: #fff;
    font-weight: 700;
    font-size: 0.875rem;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

.te-inline-lead-btn:hover {
    background: #c65d1a;
}

.te-inline-lead-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.te-inline-lead-msg {
    font-size: 0.75rem;
    padding-left: 1.25rem;
}

.te-inline-lead-msg.text-green-500 {
    color: #48bb78;
}

.te-inline-lead-msg.text-red-400 {
    color: #fc8181;
}

/* Dark variant — on navy background */
.te-inline-lead-form--dark .flex {
    background: transparent;
    border: none;
}

.te-inline-lead-form--dark .te-inline-lead-input {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.25);
}

.te-inline-lead-form--dark .te-inline-lead-input:focus {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.2);
}

.te-inline-lead-form--dark .te-inline-lead-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

/* Ghost — text button */
.te-btn-ghost {
    background: transparent;
    color: var(--te-accent-text);
    padding: 0.5rem 1rem;
}

.te-btn-ghost:hover {
    background: var(--te-accent-subtle);
    transform: none;
}

/* ─── Cards ─────────────────────────────────────── */
.te-card {
    background: var(--te-bg-raised);
    border-radius: var(--te-radius-lg);
    box-shadow: var(--te-shadow-sm);
    border: 1px solid var(--te-border-light);
    overflow: hidden;
    transition: all var(--te-duration) var(--te-ease);
}

.te-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--te-shadow-xl);
    border-color: var(--te-border);
}

.te-card-glass {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: var(--te-radius-lg);
}

.te-card-flat {
    background: var(--te-bg-sunken);
    border-radius: var(--te-radius-lg);
    border: 1px solid var(--te-border-light);
    transition: all var(--te-duration) var(--te-ease);
}

.te-card-flat:hover {
    background: var(--te-bg-raised);
    box-shadow: var(--te-shadow-md);
}

/* ─── Sections ──────────────────────────────────── */
.te-section {
    position: relative;
    overflow: hidden;
}

.te-section-dark {
    background: var(--te-dark-bg);
    color: var(--te-dark-text);
}

.te-section-blue {
    background: linear-gradient(135deg, var(--te-blue), var(--te-blue-dark));
    color: #fff;
}

.te-section-light {
    background: var(--te-bg-section-alt);
}

.te-section-gradient {
    background: var(--te-gradient-surface);
}

/* ─── Container ─────────────────────────────────── */
.te-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

@media (min-width: 1024px) {
    .te-container {
        padding: 0 2rem;
    }
}

/* ─── Forms ─────────────────────────────────────── */
.te-input,
.te-textarea,
.te-select {
    width: 100%;
    padding: 0.8125rem 1.125rem;
    border: 2px solid var(--te-border-input);
    border-radius: var(--te-radius-md);
    font-size: 0.9375rem;
    font-family: 'Inter', sans-serif;
    background: var(--te-bg-sunken);
    color: var(--te-text-body);
    transition: border-color var(--te-duration) var(--te-ease),
        box-shadow var(--te-duration) var(--te-ease);
}

.te-input:focus,
.te-textarea:focus,
.te-select:focus {
    outline: none;
    border-color: var(--te-border-input-focus);
    box-shadow: 0 0 0 4px var(--te-accent-subtle);
}

.te-input::placeholder,
.te-textarea::placeholder {
    color: var(--te-text-subtle);
}

.te-textarea {
    min-height: 120px;
    resize: vertical;
}

/* ─── Select dropdown fix ─── */
select.te-input option {
    color: #1a1a2e;
    background: #fff;
}

/* ─── Dark form theme (on navy/gradient backgrounds) ─── */
.te-form-dark .te-input,
.te-form-dark .te-textarea,
.te-form-dark select.te-input {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.te-form-dark .te-input::placeholder,
.te-form-dark .te-textarea::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

.te-form-dark .te-input:focus,
.te-form-dark .te-textarea:focus,
.te-form-dark select.te-input:focus {
    border-color: var(--te-accent);
    box-shadow: 0 0 0 4px var(--te-accent-subtle);
}

/* ─── SVG icon wrapper for cards ─── */
.te-icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: var(--te-radius-md);
    background: var(--te-accent-subtle);
    margin-bottom: 0.75rem;
    flex-shrink: 0;
}

.te-icon-wrap svg {
    width: 1.5rem;
    height: 1.5rem;
    stroke-width: 1.75;
}

.te-icon-wrap--dark {
    background: rgba(255, 255, 255, 0.1);
}

.te-icon-wrap--orange {
    background: rgba(231, 111, 36, 0.1);
}

.te-icon-wrap--teal {
    background: rgba(56, 178, 172, 0.1);
}

.te-label {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--te-text-body);
    margin-bottom: 0.375rem;
}

/* ─── Hero Sections ─────────────────────────────── */
.te-hero {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.te-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(35, 44, 101, 0.92) 0%, rgba(31, 116, 172, 0.85) 100%);
    z-index: 1;
}

.te-hero-content {
    position: relative;
    z-index: 2;
}

@media (max-width: 640px) {
    .te-hero {
        min-height: auto;
        padding-top: 80px;
    }

    /* Stats: 2 cols on mobile instead of 4 */
    .te-hero .grid-cols-4 {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Lead form: stack vertically on small screens */
    .te-inline-lead-form .flex {
        flex-direction: column;
        border-radius: 12px;
    }

    .te-inline-lead-btn {
        border-radius: 0 0 12px 12px;
        width: 100%;
        justify-content: center;
    }

    .te-inline-lead-input {
        border-radius: 12px 12px 0 0;
        width: 100%;
    }
}

/* ─── Gradient Text ─────────────────────────────── */
.te-gradient-text {
    background: var(--te-gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.te-gradient-text-blue {
    background: linear-gradient(135deg, var(--te-blue-light), var(--te-navy));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.te-gradient-text-cta {
    background: linear-gradient(135deg, var(--te-orange), var(--te-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.te-gradient-text-teal {
    background: linear-gradient(135deg, var(--te-blue-light), var(--te-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ─── Parallax Background ──────────────────────── */
.te-parallax-bg {
    will-change: transform;
    transition: transform 0.1s linear;
}

/* ─── Badge / Tag ───────────────────────────────── */
.te-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: var(--te-radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: all var(--te-duration) var(--te-ease);
}

.te-badge-blue {
    background: var(--te-accent-subtle);
    color: var(--te-accent-text);
    border: 1px solid var(--te-accent-muted);
}

.te-badge-orange {
    background: var(--te-orange-50);
    color: var(--te-orange-dark);
    border: 1px solid rgba(244, 160, 64, 0.15);
}

.te-badge-green {
    background: rgba(16, 185, 129, 0.08);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.15);
}

.te-badge-gray {
    background: var(--te-gray-50);
    color: var(--te-gray-600);
    border: 1px solid var(--te-gray-200);
}

.te-badge-navy {
    background: var(--te-navy-50);
    color: var(--te-navy);
    border: 1px solid var(--te-navy-100);
}

/* ─── Dividers ──────────────────────────────────── */
.te-divider-wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.te-divider-wave svg {
    position: relative;
    display: block;
    width: 100%;
    height: 80px;
}

/* ─── Stretched Link ────────────────────────────── */
.stretched-link::after {
    position: absolute;
    inset: 0;
    z-index: 1;
    content: '';
}

/* ─── Line Clamp ────────────────────────────────── */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    line-clamp: 3;
    overflow: hidden;
}

/* ─── WordPress Pagination ──────────────────────── */
.te-pagination {
    display: flex;
    justify-content: center;
}

.te-pagination .nav-links {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.te-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    border-radius: var(--te-radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--te-gray-600);
    background: var(--te-gray-50);
    border: 1px solid var(--te-gray-100);
    text-decoration: none;
    transition: all var(--te-duration) var(--te-ease);
}

.te-pagination .page-numbers:hover,
.te-pagination .page-numbers.current {
    background: var(--te-accent);
    color: var(--te-text-on-accent);
    border-color: var(--te-accent);
    box-shadow: var(--te-shadow-accent);
}

/* ─── Scrollbar ─────────────────────────────────── */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--te-bg-sunken);
}

::-webkit-scrollbar-thumb {
    background: var(--te-scrollbar);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--te-scrollbar-hover);
}

/* ─── Loading Spinner ───────────────────────────── */
.te-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: te-spin 0.6s linear infinite;
}

.te-spinner-blue {
    border-color: var(--te-blue-100);
    border-top-color: var(--te-blue);
}

@keyframes te-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ─── Toast Notification ────────────────────────── */
.te-toast {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 10000;
    padding: 1rem 1.5rem;
    border-radius: var(--te-radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: var(--te-shadow-xl);
    transform: translateX(120%);
    transition: transform 0.4s var(--te-ease);
    max-width: 400px;
    backdrop-filter: blur(10px);
}

.te-toast.show {
    transform: translateX(0);
}

.te-toast-success {
    background: var(--te-success-bg);
    color: #065f46;
    border-left: 4px solid var(--te-success);
}

.te-toast-error {
    background: var(--te-error-bg);
    color: #991b1b;
    border-left: 4px solid var(--te-error);
}

/* ─── Modal / Popup System ──────────────────────── */
.te-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: var(--te-bg-overlay);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--te-duration-slow) var(--te-ease),
        visibility var(--te-duration-slow) var(--te-ease);
}

.te-modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.te-modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 9999;
    transform: translate(-50%, -50%) scale(0.92);
    opacity: 0;
    visibility: hidden;
    transition: all var(--te-duration-slow) var(--te-ease-bounce);
}

.te-modal-content.active {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    visibility: visible;
}

/* ─── Accordion (FAQ details/summary) ───────────── */
details.te-card {
    cursor: default;
}

details.te-card summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    user-select: none;
}

details.te-card summary::-webkit-details-marker {
    display: none;
}

details.te-card summary::after {
    content: '+';
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--te-accent-text);
    flex-shrink: 0;
    width: 1.75rem;
    height: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--te-radius-full);
    background: var(--te-accent-subtle);
    transition: all var(--te-duration) var(--te-ease);
}

details[open].te-card summary::after {
    content: '−';
    background: var(--te-accent);
    color: #fff;
    transform: rotate(180deg);
}

details.te-card>div,
details.te-card>p {
    animation: te-accordion-open 0.3s var(--te-ease);
}

@keyframes te-accordion-open {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─── Counter Animation ─────────────────────────── */
.te-counter {
    font-variant-numeric: tabular-nums;
    transition: all 0.05s linear;
}

/* ─── Image Placeholder ─────────────────────────── */
.te-img-placeholder {
    background: var(--te-gradient-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--te-gray-400);
    font-size: 0.75rem;
    text-align: center;
}

/* ─── Prose Overrides (WP content) ──────────────── */
.prose a {
    color: var(--te-text-link);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color var(--te-duration) var(--te-ease);
}

.prose a:hover {
    color: var(--te-text-link-hover);
}

.prose h1 {
    color: var(--te-text-heading);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 800;
    font-size: 2rem;
    line-height: 1.25;
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
}

.prose h2 {
    color: var(--te-text-heading);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 800;
    font-size: 1.625rem;
    line-height: 1.3;
    margin-top: 2.25rem;
    margin-bottom: 0.75rem;
}

.prose h3 {
    color: var(--te-text-heading);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.375rem;
    line-height: 1.35;
    margin-top: 2rem;
    margin-bottom: 0.625rem;
}

.prose h4 {
    color: var(--te-text-heading);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.125rem;
    line-height: 1.4;
    margin-top: 1.75rem;
    margin-bottom: 0.5rem;
}

.prose h5,
.prose h6 {
    color: var(--te-text-heading);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

/* First heading after article start should not have extra top margin */
.prose > h1:first-child,
.prose > h2:first-child,
.prose > h3:first-child {
    margin-top: 0;
}

/* Paragraph spacing */
.prose p {
    margin-top: 0;
    margin-bottom: 1.25rem;
    line-height: 1.8;
}

.prose p + p {
    margin-top: 1.25rem;
}

/* Lists */
.prose ul,
.prose ol {
    margin-top: 1rem;
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

.prose li {
    margin-bottom: 0.375rem;
    line-height: 1.7;
}

/* Images inside prose */
.prose img {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Horizontal rules */
.prose hr {
    margin-top: 2rem;
    margin-bottom: 2rem;
    border-color: var(--te-gray-200, #e2e8f0);
}

.prose blockquote {
    border-left-color: var(--te-accent);
    background: var(--te-accent-subtle);
    padding: 1rem 1.5rem;
    border-radius: 0 var(--te-radius-md) var(--te-radius-md) 0;
}

.prose code {
    background: var(--te-gray-100);
    color: var(--te-navy);
    padding: 0.2em 0.4em;
    border-radius: var(--te-radius-sm);
    font-size: 0.875em;
}

/* ─── Utility Classes ───────────────────────────── */
.te-bg-dots {
    background-color: var(--te-bg-sunken, #eef1f8);
    background-image: radial-gradient(#c5c9d9 1px, transparent 1px);
    background-size: 24px 24px;
}

.te-bg-grid {
    background-image:
        linear-gradient(var(--te-gray-100) 1px, transparent 1px),
        linear-gradient(90deg, var(--te-gray-100) 1px, transparent 1px);
    background-size: 40px 40px;
}

.te-glow-blue {
    box-shadow: 0 0 40px rgba(31, 116, 172, 0.15);
}

.te-glow-orange {
    box-shadow: 0 0 40px rgba(244, 160, 64, 0.15);
}

/* ─── Selection ─────────────────────────────────── */
::selection {
    background: var(--te-selection-bg);
    color: var(--te-selection-text);
}

/* ─── Focus Visible ─────────────────────────────── */
:focus-visible {
    outline: 2px solid var(--te-focus-ring);
    outline-offset: 2px;
}

/* ─── Smooth scroll ─────────────────────────────── */
html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ═══════════════════════════════════════════════
   SINGLE POST — 3-Column Layout (TOC | Content | Sidebar)
   Grid: 15% / 65% / 20% on desktop
   ═══════════════════════════════════════════════ */

/* Reading progress bar */
.te-sp-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: var(--te-gradient-cta);
    z-index: 60;
    transition: width 50ms linear;
}

/* 3-col grid */
.te-sp-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 1024px) {
    .te-sp-grid {
        grid-template-columns: 200px 1fr 280px;
        gap: 2.5rem;
        padding: 0 2rem;
    }
}

@media (min-width: 1280px) {
    .te-sp-grid {
        grid-template-columns: 220px 1fr 300px;
        gap: 3rem;
    }
}

/* Left TOC sidebar — hidden on mobile, sticky on desktop */
.te-sp-toc {
    display: none;
}

@media (min-width: 1024px) {
    .te-sp-toc {
        display: block;
        position: sticky;
        top: 100px;
        max-height: calc(100vh - 120px);
        overflow-y: auto;
        align-self: start;
        scrollbar-width: thin;
        scrollbar-color: var(--te-border) transparent;
    }

    .te-sp-toc::-webkit-scrollbar { width: 3px; }
    .te-sp-toc::-webkit-scrollbar-thumb { background: var(--te-border); border-radius: 3px; }
}

.te-sp-toc-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--te-text-muted);
    padding: 0 0.75rem 0.75rem;
    border-bottom: 1px solid var(--te-border-light);
    margin-bottom: 0.5rem;
}

.te-sp-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.te-sp-toc-link {
    display: block;
    padding: 6px 12px;
    font-size: 13px;
    line-height: 1.4;
    color: var(--te-text-muted);
    text-decoration: none;
    border-left: 2px solid transparent;
    border-radius: 0 6px 6px 0;
    transition: all 0.2s ease;
}

.te-sp-toc-link:hover {
    color: var(--te-accent);
    background: var(--te-accent-subtle);
}

.te-sp-toc-link--active {
    color: var(--te-accent);
    border-left-color: var(--te-accent);
    background: var(--te-accent-subtle);
    font-weight: 600;
}

.te-sp-toc-link--h3 {
    padding-left: 24px;
    font-size: 12px;
}

/* Center content column */
.te-sp-content {
    min-width: 0;
}

/* Right sidebar — sticky on desktop */
.te-sp-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media (min-width: 1024px) {
    .te-sp-sidebar {
        position: sticky;
        top: 100px;
        max-height: calc(100vh - 120px);
        overflow-y: auto;
        align-self: start;
        scrollbar-width: thin;
        scrollbar-color: var(--te-border) transparent;
    }

    .te-sp-sidebar::-webkit-scrollbar { width: 3px; }
    .te-sp-sidebar::-webkit-scrollbar-thumb { background: var(--te-border); border-radius: 3px; }
}

/* Sidebar section headings */
.te-sp-sidebar-heading {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--te-text-muted);
    margin-bottom: 0.75rem;
}

/* Sidebar mini post card */
.te-sp-mini-post {
    display: flex;
    gap: 0.75rem;
    padding: 0.5rem 0;
    text-decoration: none;
    transition: opacity 0.2s;
}

.te-sp-mini-post:hover { opacity: 0.8; }

.te-sp-mini-post-thumb {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--te-bg-sunken);
}

.te-sp-mini-post-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--te-text-heading);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.te-sp-mini-post-meta {
    font-size: 11px;
    color: var(--te-text-subtle);
    margin-top: 2px;
}

/* Sidebar "view all" link */
.te-sp-view-all {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--te-accent);
    text-decoration: none;
    margin-top: 0.5rem;
    transition: gap 0.2s;
}

.te-sp-view-all:hover { gap: 8px; }

/* ─── Mobile TOC Drawer ───────────────────────── */
.te-sp-toc-fab {
    display: flex;
    position: fixed;
    bottom: 80px;
    left: 16px;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--te-accent);
    color: white;
    align-items: center;
    justify-content: center;
    box-shadow: var(--te-shadow-lg);
    z-index: 40;
    border: none;
    cursor: pointer;
    transition: transform 0.2s;
}

.te-sp-toc-fab:hover { transform: scale(1.08); }

@media (min-width: 1024px) {
    .te-sp-toc-fab { display: none; }
}

.te-sp-toc-drawer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 60vh;
    background: var(--te-bg-raised);
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.15);
    z-index: 45;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    padding: 1.25rem;
}

.te-sp-toc-drawer.te-sp-toc-drawer--open {
    transform: translateY(0);
}

.te-sp-toc-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 44;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.te-sp-toc-drawer-overlay--visible {
    opacity: 1;
    pointer-events: auto;
}

/* ─── AEO/GEO Feature Boxes ──────────────────── */
.te-sp-key-takeaways {
    background: var(--te-accent-subtle);
    border: 1px solid var(--te-accent);
    border-left: 4px solid var(--te-accent);
    border-radius: 0 var(--te-radius-lg) var(--te-radius-lg) 0;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
}

.te-sp-key-takeaways h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--te-accent);
    margin: 0 0 0.75rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.te-sp-key-takeaways ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.te-sp-key-takeaways li {
    position: relative;
    padding: 4px 0 4px 20px;
    font-size: 14px;
    line-height: 1.55;
    color: var(--te-text-body);
}

.te-sp-key-takeaways li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--te-accent);
    font-weight: 700;
}

/* FAQ section for AEO */
.te-sp-faq {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--te-border-light);
}

.te-sp-faq-heading {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--te-text-heading);
    margin-bottom: 1.5rem;
}

.te-sp-faq details {
    border: 1px solid var(--te-border-light);
    border-radius: var(--te-radius-md);
    margin-bottom: 0.75rem;
    overflow: hidden;
    background: var(--te-bg-raised);
}

.te-sp-faq summary {
    padding: 1rem 1.25rem;
    font-weight: 600;
    font-size: 15px;
    color: var(--te-text-heading);
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.2s;
}

.te-sp-faq summary:hover {
    background: var(--te-bg-sunken);
}

.te-sp-faq summary::after {
    content: '+';
    font-size: 18px;
    font-weight: 700;
    color: var(--te-accent);
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--te-accent-subtle);
    transition: transform 0.2s;
}

.te-sp-faq details[open] summary::after {
    content: '−';
    transform: rotate(180deg);
}

.te-sp-faq summary::-webkit-details-marker { display: none; }

.te-sp-faq details > div {
    padding: 0 1.25rem 1rem;
    font-size: 14px;
    line-height: 1.7;
    color: var(--te-text-body);
    animation: te-accordion-open 0.3s ease;
}

/* Breadcrumbs */
.te-sp-breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    margin-bottom: 1rem;
}

.te-sp-breadcrumbs a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: color 0.2s;
}

.te-sp-breadcrumbs a:hover {
    color: white;
}

.te-sp-breadcrumbs span {
    color: rgba(255, 255, 255, 0.65);
}

.te-sp-breadcrumbs .te-sp-breadcrumbs-current {
    color: rgba(255, 255, 255, 0.9);
}

/* ─── Hardcoded Gradients (Tailwind CDN can't compile custom te-* colors in gradients) ─── */
.bg-gradient-te-hero {
    background: var(--te-gradient-hero) !important;
}

.bg-gradient-te-primary {
    background: var(--te-gradient-accent) !important;
}

.bg-gradient-te-cta {
    background: var(--te-gradient-cta) !important;
}

.bg-gradient-te-reversed {
    background: var(--te-gradient-hero) !important;
}

.bg-gradient-te-hero-nav {
    background: var(--te-gradient-hero) !important;
}

/* ═══════════════════════════════════════════════
   PROFILE-AWARE TEXT CONTRAST OVERRIDES
   Remap Tailwind gray utilities to CSS vars so
   they adapt to light/dark profiles automatically.
   ═══════════════════════════════════════════════ */
.text-gray-300 { color: var(--te-text-subtle, #cbd5e1) !important; }
.text-gray-400 { color: var(--te-text-subtle, #94a3b8) !important; }
.text-gray-500 { color: var(--te-text-muted, #64748b) !important; }
.text-gray-600 { color: var(--te-text-body, #475569) !important; }
.text-gray-700 { color: var(--te-text-body, #334155) !important; }
.text-gray-800 { color: var(--te-text-heading, #1e293b) !important; }

/* ═══════════════════════════════════════════════
   PROFILE-AWARE BACKGROUND OVERRIDES
   Remap Tailwind bg utilities to CSS vars.
   ═══════════════════════════════════════════════ */
.bg-white { background-color: var(--te-bg-raised, #ffffff) !important; }
.bg-gray-50 { background-color: var(--te-bg-sunken, #f8fafc) !important; }
.bg-gray-100 { background-color: var(--te-bg-section-alt, #f1f5f9) !important; }
.bg-gray-200 { background-color: var(--te-border, #e2e8f0) !important; }
.border-gray-100 { border-color: var(--te-border-light, #f1f5f9) !important; }
.border-gray-200 { border-color: var(--te-border, #e2e8f0) !important; }
.hover\:bg-gray-100:hover { background-color: var(--te-bg-sunken, #f1f5f9) !important; }
.hover\:bg-gray-50:hover { background-color: var(--te-bg-sunken, #f8fafc) !important; }
.placeholder-gray-500::placeholder { color: var(--te-text-muted, #64748b) !important; }

/* ═══════════════════════════════════════════════
   PROFILE-AWARE UTILITY CLASSES
   New utilities mapping directly to CSS vars.
   Use in new code instead of Tailwind grays.
   ═══════════════════════════════════════════════ */
.te-bg-body { background-color: var(--te-bg-body); }
.te-bg-raised { background-color: var(--te-bg-raised); }
.te-bg-sunken { background-color: var(--te-bg-sunken); }
.te-bg-section-alt { background-color: var(--te-bg-section-alt); }
.te-bg-modal { background-color: var(--te-bg-modal); }
.te-text-heading { color: var(--te-text-heading); }
.te-text-body { color: var(--te-text-body); }
.te-text-muted { color: var(--te-text-muted); }
.te-text-subtle { color: var(--te-text-subtle); }
.te-text-inverse { color: var(--te-text-inverse); }
.te-text-link { color: var(--te-text-link); }
.te-text-success { color: var(--te-success); }
.te-text-error { color: var(--te-error); }
.te-text-warning { color: var(--te-warning); }
.te-bg-success { background-color: var(--te-success-subtle); }
.te-bg-error { background-color: var(--te-error-subtle); }
.te-bg-warning { background-color: var(--te-warning-subtle); }
.te-border { border-color: var(--te-border); }
.te-border-light { border-color: var(--te-border-light); }
.te-border-strong { border-color: var(--te-border-strong); }
.te-shadow-sm { box-shadow: var(--te-shadow-sm); }
.te-shadow-md { box-shadow: var(--te-shadow-md); }
.te-shadow-lg { box-shadow: var(--te-shadow-lg); }

/* ═══════════════════════════════════════════════
   SEMANTIC STATUS COLORS (green/red/yellow → vars)
   ═══════════════════════════════════════════════ */
.text-green-500, .text-green-600, .text-green-700 { color: var(--te-success, #16a34a) !important; }
.text-red-500, .text-red-600, .text-red-700 { color: var(--te-error, #dc2626) !important; }
.text-yellow-500, .text-yellow-600 { color: var(--te-warning, #d97706) !important; }
.bg-green-500 { background-color: var(--te-success, #16a34a) !important; }
.bg-green-50 { background-color: var(--te-success-subtle, rgba(22, 163, 74, 0.08)) !important; }
.bg-red-500 { background-color: var(--te-error, #dc2626) !important; }
.bg-red-50 { background-color: var(--te-error-subtle, rgba(220, 38, 38, 0.08)) !important; }
.bg-yellow-50 { background-color: var(--te-warning-subtle, rgba(217, 119, 6, 0.08)) !important; }
.border-green-200 { border-color: var(--te-success, #16a34a) !important; }
.border-red-200 { border-color: var(--te-error, #dc2626) !important; }

/* ═══════════════════════════════════════════════
   OFF-BRAND TEAL → ACCENT ALIAS
   ═══════════════════════════════════════════════ */
.text-te-teal { color: var(--te-accent) !important; }
.te-teal { color: var(--te-accent); }

/* ═══════════════════════════════════════════════
   DARK SECTION BACKGROUNDS (CSS fallback)
   ═══════════════════════════════════════════════ */
#te-hero-section { background: var(--te-gradient-hero) !important; }
#te-funnel-section { background: var(--te-gradient-hero) !important; }
#te-thought-section { background: var(--te-gradient-hero) !important; }
#te-cta-card { background: var(--te-gradient-hero) !important; }

#te-footer {
    background-color: var(--te-bg-footer) !important;
    color: var(--te-text-inverse);
}

/* Dark-context text boost (hero, footer, CTA, navy sections) */
.bg-te-navy .text-gray-300,
[class*="bg-gradient-te-"] .text-gray-300,
[class*="from-te-navy"] .text-gray-300,
#te-footer .text-gray-300 {
    color: #e2e8f0 !important;
}

.bg-te-navy .text-gray-400,
[class*="bg-gradient-te-"] .text-gray-400,
[class*="from-te-navy"] .text-gray-400,
#te-footer .text-gray-400 {
    color: #cbd5e1 !important;
}

.bg-te-navy .text-gray-500,
[class*="bg-gradient-te-"] .text-gray-500 {
    color: #94a3b8 !important;
}

.bg-te-navy .text-gray-600,
[class*="bg-gradient-te-"] .text-gray-600 {
    color: #cbd5e1 !important;
}

/* Dark-context bg-white stays translucent in dark sections */
.bg-te-navy .bg-white,
[class*="bg-gradient-te-"] .bg-white,
#te-footer .bg-white {
    background-color: rgba(255, 255, 255, 0.08) !important;
}

/* Dark-context border overrides */
.bg-te-navy .border-gray-100,
[class*="bg-gradient-te-"] .border-gray-100,
#te-footer .border-gray-100 {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* ─── Tool Shimmer Skeleton ─────────────────────────── */
.te-shimmer {
    background: linear-gradient(90deg, #eef1f8 25%, #dce1ef 50%, #eef1f8 75%);
    background-size: 200% 100%;
    animation: te-shimmer 1.5s infinite ease-in-out;
}

@keyframes te-shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.te-pulse-text {
    animation: te-pulse-text 2s infinite ease-in-out;
}

@keyframes te-pulse-text {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* ─── Payment UI — Profile-Aware ───────────────────── */
/* NOTE: Main modal styles are above (.te-modal-backdrop / .te-modal-content) */

/* Payment-specific modal uses display:flex approach for centering */
.te-payment-modal.te-modal-backdrop {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 1;
    visibility: visible;
}

.te-payment-modal.te-modal-backdrop.hidden {
    display: none;
    opacity: 0;
    visibility: hidden;
}

.te-payment-modal .te-modal-content {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    max-height: 90vh;
    overflow-y: auto;
    animation: te-modal-enter 0.3s ease-out;
}

@keyframes te-modal-enter {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* Payment card container */
.tep-card {
    background: var(--te-bg-modal);
    color: var(--te-text-body);
    border: 1px solid var(--te-border);
    border-radius: var(--te-radius-lg);
    padding: 1rem 1.25rem;
}

.tep-section { margin-bottom: 0.75rem; }

.tep-label {
    display: block;
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--te-text-muted);
    margin-bottom: 0.4rem;
}

.tep-row { display: flex; gap: 0.5rem; }

/* Currency toggle pills */
.tep-currency {
    padding: 0.375rem 0.85rem;
    border-radius: var(--te-radius-sm);
    border: 2px solid var(--te-border);
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--te-text-body);
    background: transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.tep-currency:hover { border-color: var(--te-accent); }

.tep-currency.active {
    border-color: var(--te-accent);
    color: var(--te-accent-text);
    background: var(--te-accent-subtle);
}

/* Payment method grid (flex adapts to 2 or 3 items) */
.tep-methods {
    display: flex;
    gap: 0.5rem;
}

.tep-method {
    flex: 1;
    padding: 0.5rem 0.375rem;
    border-radius: var(--te-radius-md);
    border: 2px solid var(--te-border);
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
}

.tep-method:hover:not(:disabled) { border-color: var(--te-accent); }

.tep-method.active {
    border-color: var(--te-accent);
    background: var(--te-accent-subtle);
}

.tep-method.disabled,
.tep-method:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
    border-color: var(--te-border);
    background: transparent;
}

.tep-method__logo { margin-bottom: 0.1rem; line-height: 0; }
.tep-method__name { font-weight: 600; font-size: 0.8rem; color: var(--te-text-heading); }
.tep-method__sub  { font-size: 0.65rem; color: var(--te-text-muted); }

/* Payment form area */
.tep-form {
    margin-top: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: var(--te-radius-md);
    border: 1px solid var(--te-border-light);
    background: var(--te-bg-sunken);
}

.tep-form h4 {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--te-text-heading);
    margin: 0 0 0.15rem;
}

.tep-form p {
    font-size: 0.8rem;
    color: var(--te-text-muted);
    margin: 0 0 0.625rem;
}

/* Brand-colored left accents */
.tep-form--mpesa   { border-left: 3px solid #43B02A; }
.tep-form--pesapal { border-left: 3px solid #0066B3; }
.tep-form--paypal  { border-left: 3px solid #003087; }

.tep-field { margin-bottom: 0.5rem; }
.tep-field .tep-label { margin-bottom: 0.25rem; }
.tep-pay-btn { width: 100%; margin-top: 0.25rem; }
.tep-status { margin-top: 0.5rem; font-size: 0.85rem; }

/* Wrap methods on narrow screens */
@media (max-width: 400px) {
    .tep-methods { flex-wrap: wrap; }
    .tep-method { flex: 1 1 40%; min-width: 0; }
}

/* ─── Transparent → Sticky Header ──────────────────── */
/* Critical positioning in CSS (not relying on Tailwind CDN async load) */
.te-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 50;
    background: transparent;
    padding-bottom: 0;
    transition: all 0.3s ease;
    max-width: 100vw;
}

#te-header-inner {
    gap: clamp(0.5rem, 3vw, 1.5rem);
}

.te-header .te-header-logo {
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    transition: all 0.3s ease;
    height: 60px;
}

.te-header.te-header--scrolled {
    background: var(--te-bg-header);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding-bottom: 0;
}

.te-header.te-header--scrolled #te-header-inner {
    height: 70px;
}

.te-header.te-header--scrolled .te-header-logo {
    height: 60px;
}

/* Burger lines: white with shadow → dark on scroll */
.te-header .te-burger-line {
    background-color: #ffffff;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.te-header.te-header--scrolled .te-burger-line {
    background-color: var(--te-text-heading);
    filter: none;
}

/* Menu label: white with shadow → dark on scroll */
.te-header .te-menu-label {
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.te-header.te-header--scrolled .te-menu-label {
    color: var(--te-text-heading);
    text-shadow: none;
}

/* Hover state for burger button when scrolled */
.te-header.te-header--scrolled .te-header--scrolled-hover:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Logo: original on scroll, slightly reduced */
.te-header.te-header--scrolled .te-header-logo {
    filter: none;
    height: 60px;
    max-width: 100%;
}

/* Logo container styling for transparent header - white bg with orange accents */
.te-header:not(.te-header--scrolled) .te-header-logo {
    background: rgba(255, 255, 255, 0.95);
    padding: 2px 4px;
    border-radius: 4px;
    border-top: 2px solid var(--te-orange);
    border-bottom: 2px solid var(--te-orange);
    filter: none;
    height: 60px;
}

@media (max-width: 640px) {
    /* Transparent header only: allow logo to shrink slightly to prevent overflow */
    .te-header:not(.te-header--scrolled):not(.te-header--solid) .te-header-logo-link {
        flex-shrink: 1;
        min-width: 0;
    }

    .te-header:not(.te-header--scrolled):not(.te-header--solid) .te-header-logo {
        padding: 2px 4px;
        height: 50px;
    }

    /* Scrolled/sticky header on mobile */
    .te-header.te-header--scrolled .te-header-logo-link,
    .te-header.te-header--solid .te-header-logo-link {
        flex-shrink: 0;
    }

    .te-header.te-header--scrolled .te-header-logo,
    .te-header.te-header--solid .te-header-logo {
        height: 35px;
    }

    /* Tighten gaps only on transparent header */
    .te-header:not(.te-header--scrolled):not(.te-header--solid) #te-header-inner {
        padding-left: 12px;
        padding-right: 12px;
        gap: 8px;
    }

    .te-header:not(.te-header--scrolled):not(.te-header--solid) .te-header-left {
        gap: 6px;
    }

    .te-header:not(.te-header--scrolled):not(.te-header--solid) .te-header-actions {
        gap: 4px;
    }
}

/* Solid header state for non-homepage pages */
.te-header.te-header--solid {
    background: var(--te-bg-header);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding-bottom: 0;
}

.te-header.te-header--solid #te-header-inner {
    height: 70px;
}

.te-header.te-header--solid .te-burger-line {
    background-color: var(--te-text-heading);
    filter: none;
}

.te-header.te-header--solid .te-menu-label {
    color: var(--te-text-heading);
    text-shadow: none;
}

.te-header.te-header--solid .te-header-cta {
    background: var(--te-accent);
    border-color: transparent;
    color: var(--te-text-on-accent);
    text-shadow: none;
    box-shadow: none;
}

.te-header.te-header--solid .te-header-cta:hover {
    box-shadow: var(--te-shadow-accent);
}

.te-header.te-header--solid .te-header-logo {
    background: transparent;
    padding: 0;
    border: none;
    height: 60px;
}

/* CTA button: default state for transparent header (white outline) */
.te-header .te-header-cta {
    border: 2px solid #fff;
    color: #fff;
    background: transparent;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.te-header .te-header-cta:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* CTA button: accent on scroll */
.te-header.te-header--scrolled .te-header-cta {
    background: var(--te-accent);
    border-color: transparent;
    color: var(--te-text-on-accent);
    text-shadow: none;
    box-shadow: none;
}

.te-header.te-header--scrolled .te-header-cta:hover {
    box-shadow: var(--te-shadow-accent);
}

@media (max-width: 640px) {
    #te-header-inner {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        height: 60px;
        gap: clamp(1.25rem, 7vw, 3rem);
    }

    .te-header.te-header--scrolled #te-header-inner,
    .te-header.te-header--solid #te-header-inner {
        height: 60px;
    }

    .te-header-toggle {
        justify-self: start;
    }

    .te-header-logo-link {
        position: static;
        transform: none;
        justify-self: start;
        max-width: 160px;
        padding-right: 10px;
    }

    .te-header.te-header--scrolled .te-header-logo-link,
    .te-header.te-header--solid .te-header-logo-link {
        max-width: 150px;
    }

    .te-header-logo-link .te-header-logo {
        width: auto;
        height: auto;
        max-height: 38px;
    }

    .te-header-actions {
        justify-self: end;
        gap: 4px;
        flex-shrink: 0;
    }

    .te-header-left {
        min-width: 0;
    }

    .te-header-actions > * {
        flex-shrink: 0;
    }

    .te-header-cta {
        padding: 6px 10px;
        font-size: 12px;
    }

    .te-header-cta svg {
        display: none;
    }

    .te-header-actions .te-lang-current {
        padding: 4px 8px;
        font-size: 11px;
        gap: 4px;
    }

    .te-header-actions .te-lang-flag {
        width: 16px;
        height: 12px;
    }

    .te-header-actions .te-lang-arrow {
        width: 10px;
        height: 10px;
    }

    #te-header-spacer {
        height: 60px;
    }
}

/* On pages with light hero backgrounds, hide spacer if header overlaps */
.te-hero+#te-header-spacer,
[data-te-fx="hero-dark"]~#te-header-spacer {
    display: none;
}

/* Reduce hero top padding on pages with solid header (non-homepage) */
/* The spacer already provides 70px, so hero only needs minimal top padding */
body:not(.home) main > section:first-child,
body:not(.home) main > article > section:first-child {
    padding-top: 2rem !important; /* 32px - consistent across all pages */
}

@media (min-width: 1024px) {
    body:not(.home) main > section:first-child,
    body:not(.home) main > article > section:first-child {
        padding-top: 2.5rem !important; /* 40px on desktop */
    }
}

/* ─── Mega Menu ─────────────────────────────────────── */
.te-mega-overlay {
    position: fixed;
    inset: 0;
    z-index: 40;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--te-duration) var(--te-ease),
        visibility var(--te-duration) var(--te-ease);
}

.te-mega-overlay.active {
    opacity: 1;
    visibility: visible;
}

.te-mega-panel {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 60;
    width: 100%;
    max-width: 100%;
    height: 100vh;
    background: var(--te-bg-modal);
    transform: translateX(-100%);
    transition: transform 0.4s var(--te-ease);
    overflow-y: auto;
    box-shadow: var(--te-shadow-xl);
}

.te-mega-panel.active {
    transform: translateX(0);
}

@media (min-width: 1024px) {
    .te-mega-panel {
        max-width: 860px;
    }
}

/* ═══════ Animated Background Effects ═══════ */

/* Container for all particles within a section */
.te-fx-container {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

/* Individual particle */
.te-fx-particle {
    position: absolute;
    will-change: transform, opacity;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
    animation-fill-mode: both;
}

/* ─── Shape variants ─────────────────────────── */
.te-fx-particle--circle {
    border-radius: 50%;
}

.te-fx-particle--hexagon {
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

.te-fx-particle--triangle {
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

.te-fx-particle--diamond {
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}

.te-fx-particle--ring {
    border-radius: 50%;
    background: transparent !important;
    border: 2px solid currentColor;
}

.te-fx-particle--cross {
    clip-path: polygon(35% 0%, 65% 0%, 65% 35%, 100% 35%, 100% 65%, 65% 65%, 65% 100%, 35% 100%, 35% 65%, 0% 65%, 0% 35%, 35% 35%);
}

.te-fx-particle--dot {
    border-radius: 50%;
}

/* ─── Drift path keyframes ───────────────────── */
@keyframes teFxDrift1 {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    50% {
        transform: translate(60px, -80px) rotate(180deg);
    }
}

@keyframes teFxDrift2 {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    50% {
        transform: translate(-40px, -120px) rotate(-90deg);
    }
}

@keyframes teFxDrift3 {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg) scale(0.8);
        opacity: 0;
    }

    10% {
        opacity: 0.8;
    }

    90% {
        opacity: 0.8;
    }

    50% {
        transform: translate(80px, -60px) rotate(120deg) scale(1.2);
    }
}

@keyframes teFxDrift4 {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0;
    }

    15% {
        opacity: 0.6;
    }

    85% {
        opacity: 0.6;
    }

    50% {
        transform: translate(-70px, -100px) rotate(270deg);
    }
}

@keyframes teFxDrift5 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
        opacity: 0;
    }

    10% {
        opacity: 0.5;
    }

    90% {
        opacity: 0.5;
    }

    33% {
        transform: translate(40px, -50px) scale(1.1);
    }

    66% {
        transform: translate(-30px, -90px) scale(0.9);
    }
}

@keyframes teFxPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.3;
    }

    50% {
        transform: scale(1.5);
        opacity: 0.7;
    }
}

@keyframes teFxSpin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes teFxFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .te-fx-particle {
        animation: none !important;
        opacity: 0.15 !important;
    }
}

/* ─── Archive CTA Info Box ──────────────────────── */
.te-archive-cta-box {
    position: relative;
    background: linear-gradient(135deg, rgba(31, 116, 172, 0.08), rgba(35, 44, 101, 0.06));
    border: 1px solid rgba(31, 116, 172, 0.2);
    border-radius: var(--te-radius-lg, 12px);
    padding: 1.5rem;
    margin: 2rem auto 0;
    max-width: 56rem;
}

.te-archive-cta-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: none;
    border: none;
    color: var(--te-gray-400, #9ca3af);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
    line-height: 0;
}

.te-archive-cta-close:hover {
    color: var(--te-gray-600, #4b5563);
    background: rgba(0, 0, 0, 0.05);
}

.te-archive-cta-inner {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.te-archive-cta-heading {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: var(--te-text-heading, #0f172a);
    margin: 0 0 0.25rem;
}

.te-archive-cta-desc {
    font-size: 0.8125rem;
    color: var(--te-gray-500, #64748b);
    line-height: 1.5;
    margin: 0;
    max-width: 38rem;
}

.te-archive-cta-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.te-archive-cta-input {
    flex: 1 1 140px;
    min-width: 0;
    height: 2.5rem;
    padding: 0 0.75rem;
    border: 1px solid var(--te-gray-200, #e2e8f0);
    border-radius: var(--te-radius-md, 8px);
    font-size: 0.8125rem;
    background: #fff;
    color: var(--te-text-body, #334155);
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.te-archive-cta-input:focus {
    outline: none;
    border-color: var(--te-accent, #1f74ac);
    box-shadow: 0 0 0 3px rgba(31, 116, 172, 0.1);
}

.te-archive-cta-btn {
    flex-shrink: 0;
    height: 2.5rem;
    padding: 0 1.25rem;
    background: var(--te-accent, #1f74ac);
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 600;
    border: none;
    border-radius: var(--te-radius-md, 8px);
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
    box-sizing: border-box;
}

.te-archive-cta-btn:hover {
    background: var(--te-navy, #232c65);
}

.te-archive-cta-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.te-archive-cta-msg {
    font-size: 0.75rem;
    margin-top: 0.25rem;
    padding: 0.25rem 0;
}

/* Hero-variant: white text when inside gradient hero */
.bg-gradient-te-hero .te-archive-cta-box {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.bg-gradient-te-hero .te-archive-cta-heading {
    color: #fff;
}

.bg-gradient-te-hero .te-archive-cta-desc {
    color: rgba(255, 255, 255, 0.85);
}

.bg-gradient-te-hero .te-archive-cta-close {
    color: rgba(255, 255, 255, 0.7);
}

.bg-gradient-te-hero .te-archive-cta-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 640px) {
    .te-archive-cta-box {
        padding: 1rem;
        margin-left: 0.5rem;
        margin-right: 0.5rem;
    }

    .te-archive-cta-heading {
        padding-right: 2rem;
        font-size: 0.9375rem;
    }

    .te-archive-cta-desc {
        font-size: 0.875rem;
    }

    .te-archive-cta-fields {
        flex-direction: column;
        align-items: stretch;
    }

    .te-archive-cta-input,
    .te-archive-cta-btn {
        width: 100%;
        flex: none;
        height: 2.5rem;
        font-size: 0.9375rem;
        padding: 0 0.75rem;
        box-sizing: border-box;
    }

    .te-archive-cta-btn {
        line-height: 2.5rem;
        text-align: center;
    }
}

@media (max-width: 380px) {
    .te-archive-cta-box {
        padding: 0.75rem;
        margin-left: 0.25rem;
        margin-right: 0.25rem;
    }

    .te-archive-cta-heading {
        font-size: 0.875rem;
    }
}

/* ─── Taxonomy Inline CTA ───────────────────────── */
.te-tax-cta {
    margin-top: 1.5rem;
    max-width: 48rem;
    margin-left: auto;
    margin-right: auto;
}

.te-tax-cta-label {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.625rem;
    text-align: center;
}

.te-tax-cta-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.te-tax-cta-input {
    flex: 1 1 0;
    min-width: 0;
    height: 2.5rem;
    padding: 0 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--te-radius-md, 8px);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 0.8125rem;
    line-height: 2.5rem;
    box-sizing: border-box;
    transition: border-color 0.2s, background 0.2s;
}

.te-tax-cta-input::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

.te-tax-cta-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.12);
}

.te-tax-cta-btn {
    flex-shrink: 0;
    padding: 0.5625rem 1.25rem;
    background: var(--te-orange, #f97316);
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 600;
    border: none;
    border-radius: var(--te-radius-md, 8px);
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.te-tax-cta-btn:hover {
    background: #ea580c;
}

.te-tax-cta-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.te-tax-cta-msg {
    text-align: center;
    font-size: 0.75rem;
    margin-top: 0.5rem;
}

@media (max-width: 640px) {
    .te-tax-cta-row {
        flex-direction: column;
        align-items: stretch;
    }

    .te-tax-cta-input,
    .te-tax-cta-btn {
        width: 100%;
        flex: none;
        height: 2.5rem;
    }

    .te-tax-cta-btn {
        line-height: 2.5rem;
        padding-top: 0;
        padding-bottom: 0;
    }
}