:root {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --accent: #f97316;
    --accent-dark: #ea580c;
    --danger: #ef4444;
    --success: #22c55e;
    --warning: #eab308;

    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    color: var(--slate-700);
    line-height: 1.6;
    background-color: var(--slate-50);
    -webkit-font-smoothing: antialiased;
    padding-bottom: 120px;
    /* Prevent sticky CTA overlap on mobile */
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--slate-900);
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    font-size: 2.5rem;
    letter-spacing: -0.025em;
}

h2 {
    font-size: 2rem;
    letter-spacing: -0.025em;
}

h3 {
    font-size: 1.5rem;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-dark);
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
.report-header {
    background: linear-gradient(135deg, var(--slate-900) 0%, var(--slate-800) 100%);
    color: white;
    padding: 4rem 0 6rem;
    position: relative;
    overflow: hidden;
}

.report-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: var(--slate-50);
    border-radius: 40px 40px 0 0;
}

.report-header h1 {
    color: white;
    margin-bottom: 1rem;
    margin-top: 1rem;
}

.report-header .subtitle {
    font-size: 1.25rem;
    color: var(--slate-300);
    max-width: 700px;
}

.badge-market {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    backdrop-filter: blur(4px);
}

/* Breadcrumbs */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--slate-500);
    margin-bottom: 2rem;
    overflow-x: auto;
    white-space: nowrap;
}

.breadcrumbs a {
    color: var(--slate-500);
}

.breadcrumbs a:hover {
    color: var(--primary);
}

.breadcrumbs .separator {
    color: var(--slate-300);
}

.breadcrumbs .current {
    color: var(--slate-900);
    font-weight: 600;
}

/* Bento Grid */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.bento-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--slate-100);
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
}

.bento-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.span-12 {
    grid-column: span 12;
}

.span-8 {
    grid-column: span 8;
}

.span-6 {
    grid-column: span 6;
}

.span-4 {
    grid-column: span 4;
}

@media (max-width: 1024px) {
    .span-8 {
        grid-column: span 12;
    }

    .span-4 {
        grid-column: span 6;
    }
}

@media (max-width: 900px) {
    .report-header {
        padding: 3rem 0 4rem;
    }

    .report-header::after {
        height: 20px;
        border-radius: 20px 20px 0 0;
    }

    .span-6,
    .span-4,
    .span-8,
    .span-12 {
        grid-column: span 12 !important;
    }

    /* Prevent overflow on long city names */
    h1 {
        font-size: 1.75rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }

    h2 {
        font-size: 1.5rem;
    }

    .bento-grid {
        gap: 1.5rem;
    }

    .bento-card {
        padding: 1.5rem;
    }

    .breadcrumbs {
        white-space: normal;
        overflow-x: visible;
        flex-wrap: wrap;
        row-gap: 0.35rem;
    }

    .breadcrumbs .current {
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .stat-val {
        font-size: 2rem;
    }

    /* Risk Row mobile stack */
    .risk-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .risk-cost {
        text-align: left;
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding-top: 0.75rem;
        border-top: 1px dashed var(--slate-100);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .report-header h1 {
        font-size: 1.5rem;
    }

    .stat-banner {
        grid-template-columns: 1fr;
        /* Stack stats vertically on small phones */
        gap: 1.5rem;
    }

    .stat-val {
        font-size: 2.25rem;
    }

    /* Safer Sticky CTA (Slim Version) */
    .sticky-cta {
        width: calc(100% - 2rem);
        bottom: 1.5rem;
        left: 0;
        right: 0;
        max-width: 400px;
        /* Prevent too wide on larger phones */
    }

    .cta-floater {
        padding: 0.5rem 0.85rem;
        /* Reduced padding for slim look */
        font-size: 0.85rem;
        justify-content: space-between;
        flex-wrap: nowrap;
        /* Prevent wrapping (fatness) */
        gap: 0.75rem;
    }

    .cta-floater span {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: block;
        flex: 1;
        /* Allow taking available space */
        min-width: 0;
        /* Enable flex truncation */
        font-size: 0.8rem;
    }

    .cta-floater .btn-sm {
        flex-shrink: 0;
        /* Don't shrink button */
        padding: 0.4rem 0.75rem;
        font-size: 0.75rem;
    }
}

/* Stats Banner (Top Card) */
.stat-banner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-val {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.5rem;
    color: var(--slate-900);
}

.stat-label {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--slate-500);
}

/* Timeline */
.timeline-box {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.timeline-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.timeline-item .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-top: 6px;
    flex-shrink: 0;
}

/* Regional Insight */
.insight-card {
    background: linear-gradient(to right, var(--slate-50), white);
    border-color: var(--slate-200);
}

.insight-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.insight-icon {
    font-size: 1.5rem;
}

/* Risk List */
.risk-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--slate-100);
}

.risk-row:last-child {
    border-bottom: none;
}

.risk-info h4 {
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
}

.risk-info p {
    color: var(--slate-500);
    font-size: 0.95rem;
}

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

.risk-cost .amount {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--slate-900);
}

.risk-cost .action-link {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--primary);
}

/* Buttons & CTA */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary);
    color: white;
    font-weight: 600;
    padding: 1rem 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: all 0.2s;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
    color: white;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    border: 2px solid var(--slate-200);
    color: var(--slate-700);
    font-weight: 600;
    padding: 0.8rem 1.5rem;
    border-radius: var(--radius-lg);
    transition: all 0.2s;
}

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

/* Sticky CTA */
.sticky-cta {
    margin: 2rem auto;
    width: min(calc(100% - 2rem), 420px);
    max-width: 420px;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

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

.cta-floater {
    background: var(--slate-900);
    color: white;
    width: 100%;
    padding: 0.5rem 0.85rem;
    border-radius: 100px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cta-floater span {
    font-weight: 500;
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    flex: 1;
    min-width: 0;
}

.cta-floater .btn-sm {
    background: var(--accent);
    color: white;
    padding: 0.4rem 0.85rem;
    border-radius: 100px;
    font-weight: 700;
    font-size: 0.8rem;
    flex-shrink: 0;
}

/* FAQ */
.faq-item {
    background: white;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.faq-question {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    color: var(--slate-900);
    display: flex;
    gap: 0.75rem;
}

.faq-icon {
    color: var(--primary);
}

.faq-answer {
    color: var(--slate-600);
    padding-left: 2rem;
}

/* Footer */
.cta-footer {
    background: var(--slate-900);
    color: white;
    text-align: center;
    padding: 6rem 1.5rem;
    margin-top: 4rem;
}

.cta-footer h2 {
    color: white;
    margin-bottom: 1.5rem;
}

/* Utility */
.text-accent {
    color: var(--accent);
}

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

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

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

.border {
    border: 1px solid var(--slate-200);
}
