@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;600;700&display=swap');

/* --- Preflight (subset Tailwind) --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    border-width: 0;
    border-style: solid;
    border-color: #e5e7eb;
}

html {
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    line-height: inherit;
    font-family: 'DM Sans', sans-serif;
    background-color: #f7f9fc;
}

h2,
h3,
p {
    margin: 0;
    font-size: inherit;
    font-weight: inherit;
}

button,
input {
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    color: inherit;
    margin: 0;
    padding: 0;
}

button {
    cursor: pointer;
    background-color: transparent;
    background-image: none;
    text-transform: none;
}

/* --- Layout --- */
.block {
    display: block;
}

.hidden {
    display: none;
}

.grid {
    display: grid;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.gap-6 {
    gap: 1.5rem;
}

.gap-8 {
    gap: 2rem;
}

.w-full {
    width: 100%;
}

.text-center {
    text-align: center;
}

.space-y-4 > :not([hidden]) ~ :not([hidden]) {
    margin-top: 1rem;
}

/* --- Spacing --- */
.p-3 {
    padding: 0.75rem;
}

.p-4 {
    padding: 1rem;
}

.p-6 {
    padding: 1.5rem;
}

.pb-2 {
    padding-bottom: 0.5rem;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.mb-3 {
    margin-bottom: 0.75rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mb-10 {
    margin-bottom: 2.5rem;
}

.mt-1 {
    margin-top: 0.25rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-8 {
    margin-top: 2rem;
}

.mt-20 {
    margin-top: 5rem;
}

/* --- Borders --- */
.border {
    border-width: 1px;
}

.border-b {
    border-bottom-width: 1px;
}

.border-b-4 {
    border-bottom-width: 4px;
}

.border-gray-200 {
    border-color: #e5e7eb;
}

.border-gray-300 {
    border-color: #d1d5db;
}

.border-blue-200 {
    border-color: #bfdbfe;
}

.border-red-400 {
    border-color: #f87171;
}

.border-red-600 {
    border-color: #dc2626;
}

.border-green-600 {
    border-color: #16a34a;
}

.rounded-lg {
    border-radius: 0.5rem;
}

.rounded-xl {
    border-radius: 0.75rem;
}

/* --- Backgrounds --- */
.bg-white {
    background-color: #fff;
}

.bg-gray-50 {
    background-color: #f9fafb;
}

.bg-gray-100 {
    background-color: #f3f4f6;
}

.bg-blue-50 {
    background-color: #eff6ff;
}

.bg-red-50 {
    background-color: #fef2f2;
}

.bg-red-100 {
    background-color: #fee2e2;
}

.bg-green-100 {
    background-color: #dcfce7;
}

/* --- Typography --- */
.text-xs {
    font-size: 0.75rem;
    line-height: 1rem;
}

.text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
}

.text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
}

.text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
}

.font-medium {
    font-weight: 500;
}

.font-semibold {
    font-weight: 600;
}

.font-bold {
    font-weight: 700;
}

.text-gray-500 {
    color: #6b7280;
}

.text-gray-600 {
    color: #4b5563;
}

.text-gray-700 {
    color: #374151;
}

.text-red-600 {
    color: #dc2626;
}

.text-red-700 {
    color: #b91c1c;
}

.text-blue-600 {
    color: #2563eb;
}

.text-blue-700 {
    color: #1d4ed8;
}

.text-green-700 {
    color: #15803d;
}

/* --- Focus --- */
.focus\:border-red-500:focus {
    border-color: #ef4444;
}

.focus\:border-blue-500:focus {
    border-color: #3b82f6;
}

.focus\:ring-red-500:focus {
    --tw-ring-opacity: 1;
    --tw-ring-color: rgb(239 68 68 / var(--tw-ring-opacity));
}

.focus\:ring-blue-500:focus {
    --tw-ring-opacity: 1;
    --tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity));
}

/* --- Shadows --- */
.shadow-md {
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.shadow-lg {
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

/* --- Responsive --- */
@media (min-width: 640px) {
    .sm\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 768px) {
    .md\:p-10 {
        padding: 2.5rem;
    }

    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* --- Custom --- */
.btn-primary {
    padding: 12px 16px;
    border-radius: 6px;
    border: 1px solid #00ab82;
    background-color: #00ab82;
    font-weight: 600;
    color: #fff;
    margin-top: 12px;
}

.btn-primary:hover {
    border: 1px solid #038364;
    background-color: #038364;
    color: #fff;
}

.analysis-title {
    font-size: 48px;
    font-weight: 600;
    letter-spacing: 0;
    color: #033C8D;
}

.card {
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
}

@media (max-width: 768px) {
    .analysis-title {
        font-size: 2.5rem;
    }
}
