:root {
    --primary-color: #ab183d;
    --primary-hover: #8f1332;
    --secondary-color: #4f46e5;
    --accent-color: #f59e0b;
    --bg-color: #f9fafb;
    --text-main: #111827;
    --text-muted: #4b5563;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    /* System font stack for performance and consistency */
    --font-stack: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: var(--font-stack);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.5;
    margin: 0;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Layout */
.page-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    margin-right: auto;
    margin-left: auto;
    padding-right: 1rem;
    padding-left: 1rem;
}

@media (min-width: 640px) {
    .container {
        max-width: 640px;
        padding-right: 1.5rem;
        padding-left: 1.5rem;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 768px;
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: 1024px;
        padding-right: 2rem;
        padding-left: 2rem;
    }
}

@media (min-width: 1280px) {
    .container {
        max-width: 1280px;
    }
}

.container--wide {
    max-width: 100%;
}

.section {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

.section--sm {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

/* Grid Utilities */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.grid-4 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 640px) {
    .grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .grid-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Components */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.5rem;
    border-radius: var(--radius-lg);
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
    text-decoration: none;
    border: none;
    font-size: 1rem;
}

.btn--primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn--primary:hover {
    background-color: var(--primary-hover);
}

.btn--outline {
    background-color: transparent;
    border: 2px solid var(--white);
    color: var(--white);
}

.btn--outline:hover {
    background-color: var(--white);
    color: var(--secondary-color);
}

.btn--full {
    width: 100%;
}

.tool-card {
    background-color: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    overflow: hidden;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.card-header {
    position: relative;
    height: 12rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
}

.card-content {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.card-text {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* Forms */
.input-group {
    margin-bottom: 1.25rem;
}

.input-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-main);
    font-size: 0.95rem;
}

.input-field {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: var(--radius-lg);
    outline: none;
    transition: all 0.2s;
    font-size: 1rem;
    background-color: #fff;
}

.input-field:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(171, 24, 61, 0.15);
}

/* Header & Footer Helpers */
.nav-link {
    color: var(--text-muted);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--secondary-color);
}

/* Typography Helpers */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.font-bold {
    font-weight: 700;
}

.text-xs {
    font-size: 0.75rem;
}

.text-sm {
    font-size: 0.875rem;
}

.text-lg {
    font-size: 1.125rem;
}

.text-xl {
    font-size: 1.25rem;
}

.text-2xl {
    font-size: 1.5rem;
}

.text-3xl {
    font-size: 1.875rem;
}

.text-gradient {
    background: var(--primary-color);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: var(--primary-color);
    /* Fallback */
}

/* Alias for compatibility */
.gradient-text {
    background: var(--primary-color);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: var(--primary-color);
}

/* Utilities */
.hidden {
    display: none !important;
}

.block {
    display: block;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.my-4 {
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-6 {
    margin-top: 1.5rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.p-4 {
    padding: 1rem;
}

.p-6 {
    padding: 1.5rem;
}

.p-8 {
    padding: 2rem;
}

.pl-8 {
    padding-left: 2rem;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-4 {
    gap: 1rem;
}

.w-full {
    width: 100%;
}

.w-auto {
    width: auto !important;
}

.max-w-md {
    max-width: 28rem;
}

.max-w-lg {
    max-width: 32rem;
}

.max-w-xl {
    max-width: 36rem;
}

.max-w-2xl {
    max-width: 42rem;
}

.bg-white {
    background-color: var(--white);
}

.bg-light {
    background-color: #f3f4f6;
}

.rounded-xl {
    border-radius: var(--radius-xl);
}

.rounded-lg {
    border-radius: var(--radius-lg);
}

.shadow-lg {
    box-shadow: var(--shadow-lg);
}

.opacity-90 {
    opacity: 0.9;
}

.text-white {
    color: var(--white);
}

.text-danger {
    color: #dc2626;
}

.text-success {
    color: #16a34a;
}

.text-primary {
    color: var(--primary-color);
}

.border-primary {
    border: 2px solid var(--primary-color);
}

/* Complex Grids */
.grid-sidebar {
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr;
}

@media (min-width: 1024px) {
    .grid-sidebar {
        grid-template-columns: 2fr 1fr;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.float-animation {
    animation: float 6s ease-in-out infinite;
}

/* Accessibility Helpers */
.skip-link {
    position: absolute;
    top: -999px;
    left: 1rem;
    z-index: 10000;
    padding: 1rem;
    background: var(--white);
    color: var(--primary-color);
    font-weight: 700;
    text-decoration: none;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    box-shadow: var(--shadow-lg);
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 0;
    outline: 2px solid var(--primary-color);
}

:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Tailwind Compatibility Layer for Index.html */
.max-w-4xl {
    max-width: 56rem;
}

.max-w-7xl {
    max-width: 80rem;
}

.flex-shrink-0 {
    flex-shrink: 0;
}

.flex-1 {
    flex: 1 1 0%;
}

/* Colors */
.bg-gray-50 {
    background-color: #f9fafb;
}

.bg-gray-900 {
    background-color: #111827;
}

.text-gray-400 {
    color: #9ca3af;
}

.text-gray-600 {
    color: #4b5563;
}

.text-gray-700 {
    color: #374151;
}

.text-gray-800 {
    color: #1f2937;
}

.text-gray-900 {
    color: #111827;
}

.bg-indigo-600 {
    background-color: #4f46e5;
}

.text-indigo-600 {
    color: #4f46e5;
}

.bg-blue-600 {
    background-color: #2563eb;
}

.hover\:bg-blue-500:hover {
    background-color: #3b82f6;
}

.hover\:bg-pink-700:hover {
    background-color: #be185d;
}

.hover\:bg-blue-800:hover {
    background-color: #1e40af;
}



.text-blue-400 {
    color: #60a5fa;
}

.bg-blue-400 {
    background-color: #60a5fa;
}

.bg-blue-500 {
    background-color: #3b82f6;
}

.text-pink-600 {
    color: #db2777;
}

.bg-pink-600 {
    background-color: #db2777;
}

.bg-pink-700 {
    background-color: #be185d;
}

.text-blue-700 {
    color: #1d4ed8;
}

.bg-blue-700 {
    background-color: #1d4ed8;
}

.bg-blue-800 {
    background-color: #1e40af;
}

.bg-blue-100 {
    background-color: #dbeafe;
}

.bg-pink-100 {
    background-color: #fce7f3;
}

.text-green-600 {
    color: #16a34a;
}

.text-purple-600 {
    color: #9333ea;
}

.text-yellow-600 {
    color: #ca8a04;
}

.bg-indigo-50 {
    background-color: #eef2ff;
}

.bg-blue-50 {
    background-color: #eff6ff;
}

.bg-green-50 {
    background-color: #f0fdf4;
}

.bg-purple-50 {
    background-color: #faf5ff;
}

.bg-yellow-50 {
    background-color: #fefce8;
}

.bg-blue-100 {
    background-color: #dbeafe;
}

.bg-indigo-100 {
    background-color: #e0e7ff;
}

.bg-purple-100 {
    background-color: #f3e8ff;
}

.bg-green-100 {
    background-color: #dcfce7;
}

.bg-yellow-100 {
    background-color: #fef9c3;
}

/* Grid Columns */
.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (min-width: 640px) {
    .sm\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sm\:flex-row {
        flex-direction: row;
    }
}

@media (min-width: 768px) {
    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .md\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .md\:grid-cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .md\:flex-row {
        flex-direction: row;
    }

    .md\:mb-0 {
        margin-bottom: 0;
    }

    .md\:mr-8 {
        margin-right: 2rem;
    }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .lg\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .lg\:grid-cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* Sizing */
.w-12 {
    width: 3rem;
}

.h-12 {
    height: 3rem;
}

.w-14 {
    width: 3.5rem;
}

.h-14 {
    height: 3.5rem;
}

.w-16 {
    width: 4rem;
}

.h-16 {
    height: 4rem;
}

.w-6 {
    width: 1.5rem;
}

.h-6 {
    height: 1.5rem;
}

.w-7 {
    width: 1.75rem;
}

.h-7 {
    height: 1.75rem;
}

/* Extended Tailwind Compatibility for Gradient & Shapes */
.bg-gradient-to-r {
    background-image: linear-gradient(to right, var(--tw-gradient-stops));
}

.bg-gradient-to-br {
    background-image: linear-gradient(to bottom right, var(--tw-gradient-stops));
}

.from-indigo-600 {
    --tw-gradient-from: #4f46e5;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(79, 70, 229, 0));
}

.to-purple-600 {
    --tw-gradient-to: #9333ea;
}

.from-yellow-50 {
    --tw-gradient-from: #fefce8;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(254, 252, 232, 0));
}

.to-yellow-100 {
    --tw-gradient-to: #fef9c3;
}

.from-red-50 {
    --tw-gradient-from: #fef2f2;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(254, 242, 242, 0));
}

.to-red-100 {
    --tw-gradient-to: #fee2e2;
}

.from-indigo-50 {
    --tw-gradient-from: #eef2ff;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(238, 242, 255, 0));
}

.to-indigo-100 {
    --tw-gradient-to: #e0e7ff;
}

/* Text Colors */
.text-indigo-100 {
    color: #e0e7ff;
}

.text-red-600 {
    color: #dc2626;
}

.text-yellow-600 {
    color: #ca8a04;
}

/* Backgrounds */
.bg-red-600 {
    background-color: #dc2626;
}

.bg-yellow-600 {
    background-color: #ca8a04;
}

.bg-transparent {
    background-color: transparent;
}

/* Borders */
.border-2 {
    border-width: 2px;
}

.border-white {
    border-color: #ffffff;
}

/* Spacing */
.gap-12 {
    gap: 3rem;
}

.mb-12 {
    margin-bottom: 3rem;
}

.mb-16 {
    margin-bottom: 4rem;
}

.mt-16 {
    margin-top: 4rem;
}

.p-12 {
    padding: 3rem;
}

.md\:p-12 {
    padding: 3rem;
}

/* Radius & Shadow */
.rounded-2xl {
    border-radius: 1rem;
}

.shadow-xl {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.shadow-2xl {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Visibility */
.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.-bottom-6 {
    bottom: -1.5rem;
}

.-left-6 {
    left: -1.5rem;
}

/* Legacy Button Alias for 404 */
.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: var(--radius-lg);
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

/* Footer Fix Override */
.bg-gray-900 {
    background-color: #111827 !important;
}

.text-gray-400 {
    color: #9ca3af !important;
}

/* =========================================
   CRITICAL MISSING UTILITIES
   ========================================= */

/* Display Utilities (Found Missing) */
.flex {
    display: flex;
}

.grid {
    display: grid;
}

.block {
    display: block;
}

.inline-block {
    display: inline-block;
}

.inline-flex {
    display: inline-flex;
}

.hidden {
    display: none;
}

/* Flexbox Alignment */
.flex-col {
    flex-direction: column;
}

.flex-row {
    flex-direction: row;
}

.flex-wrap {
    flex-wrap: wrap;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-end {
    justify-content: flex-end;
}

.justify-start {
    justify-content: flex-start;
}

/* Missing Colors for Features & Tools */
.bg-green-600 {
    background-color: #16a34a;
}

.bg-purple-600 {
    background-color: #9333ea;
}

.bg-cyan-600 {
    background-color: #0891b2;
}

.bg-teal-50 {
    background-color: #f0fdfa;
}

.bg-cyan-100 {
    background-color: #cffafe;
}

.bg-indigo-50 {
    background-color: #eef2ff;
}

/* Missing Text Colors */
.text-cyan-600 {
    color: #0891b2;
}

.text-green-600 {
    color: #16a34a;
}

.text-purple-600 {
    color: #9333ea;
}

.text-white {
    color: #ffffff;
}

/* Missing Gradients (Feature Cards) */
.from-green-50 {
    --tw-gradient-from: #f0fdf4;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(240, 253, 244, 0));
}

.to-green-100 {
    --tw-gradient-to: #dcfce7;
}

.from-purple-50 {
    --tw-gradient-from: #faf5ff;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(250, 245, 255, 0));
}

.to-purple-100 {
    --tw-gradient-to: #f3e8ff;
}

.from-cyan-100 {
    --tw-gradient-from: #cffafe;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(207, 250, 254, 0));
}

.to-teal-50 {
    --tw-gradient-to: #f0fdfa;
}

/* Fix SVG Icon Colors inside cards */
.feature-card svg,
.tool-card svg {
    color: white;
    /* Ensure icons are white on colored backgrounds */
}

.text-white {
    color: white !important;
}