        /* Heading Bengali: Noto Serif Bengali — loaded via Google Fonts <link> */

        /* ── CSS Custom Properties (Design Tokens) ─────────────── */
        :root {
            --clr-royal: #1E3A8A;
            --clr-royal-light: #2563EB;
            --clr-gold: #F59E0B;
            --clr-gold-light: #FCD34D;
            --clr-bg-primary: #FFFFFF;
            --clr-bg-section: #F8FAFC;
            --clr-text-primary: #0F172A;
            --clr-text-secondary: #475569;
            --clr-glass-bg: rgba(255, 255, 255, 0.72);
            --clr-glass-border: rgba(255, 255, 255, 0.3);
            --nav-height: 72px;
            --reading-width: 75ch;
            --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        /* ── Fix A: bg-slate-bg (missing Tailwind arbitrary → CSS class) ── */
        .bg-slate-bg { background-color: var(--clr-bg-section); }

        /* ── Fluid Typography (clamp) ─────────────────────────── */
        html {
            font-size: clamp(15px, 1.1vw, 18px);
            scroll-behavior: smooth;
            scroll-padding-top: calc(var(--nav-height) + 24px); /* FIX #16: nav + breathing room */
        }

        body {
            font-family: 'Inter', 'Noto Sans Bengali', system-ui, sans-serif;
            font-size: 16px; /* 12pt */
            line-height: 1.45;
            color: var(--clr-text-primary);
            background: var(--clr-bg-primary);
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
        }
        .font-body {
            font-family: 'Inter', 'Noto Sans Bengali', system-ui, sans-serif !important;
            line-height: 1.5 !important;
        }
        .font-heading {
            font-family: 'Source Serif 4', 'Noto Serif Bengali', 'Noto Sans Bengali', serif !important;
            line-height: 1.25 !important;
            font-weight: 700 !important;
        }
        h1 {
            font-family: 'Source Serif 4', 'Noto Serif Bengali', 'Noto Sans Bengali', serif;
            font-size: 2rem !important;
            line-height: 1.25;
            font-weight: 700 !important;
        }
        h2 {
            font-family: 'Source Serif 4', 'Noto Serif Bengali', 'Noto Sans Bengali', serif;
            font-size: 1.6rem !important;
            line-height: 1.3;
            font-weight: 700 !important;
        }
        h3 {
            font-family: 'Source Serif 4', 'Noto Serif Bengali', 'Noto Sans Bengali', serif;
            font-size: 1.35rem !important;
            line-height: 1.3;
            font-weight: 700 !important;
        }
        h4 {
            font-family: 'Source Serif 4', 'Noto Serif Bengali', 'Noto Sans Bengali', serif;
            font-size: 1.2rem !important;
            line-height: 1.3;
            font-weight: 700 !important;
        }
        h5 {
            font-family: 'Source Serif 4', 'Noto Serif Bengali', 'Noto Sans Bengali', serif;
            font-size: 1.08rem !important;
            line-height: 1.3;
            font-weight: 700 !important;
        }
        h6 {
            font-family: 'Source Serif 4', 'Noto Serif Bengali', 'Noto Sans Bengali', serif;
            font-size: 1rem !important;
            line-height: 1.3;
            font-weight: 700 !important;
        }
        p {
            line-height: 1.6;
            margin-bottom: 1.15em;
        }
        .hero-subtitle {
            word-break: normal;
            overflow-wrap: normal;
            hyphens: none;
            overflow-wrap: anywhere;
        }
        html[lang="bn"] .hero-subtitle {
            word-break: keep-all;
            overflow-wrap: normal;
        }
        .bn-keep-phrase {
            white-space: nowrap;
            display: inline-block;
        }
        .bn-lock-word {
            white-space: nowrap;
            display: inline-block;
        }
        .bn-lock-word[lang="bn"] {
            font-family: 'Noto Serif Bengali' !important;
            font-weight: 700 !important;
            letter-spacing: 0 !important;
        }
        .bn-subtitle-phrase {
            font-family: 'Noto Serif Bengali', 'Noto Sans Bengali', serif !important;
            font-weight: 700 !important;
            letter-spacing: 0 !important;
            white-space: nowrap;
            display: inline-block;
        }
        /* Bengali shaping: force Bengali headings/subheadings to Noto Serif Bengali */
        html[lang="bn"] .font-heading,
        html[lang="bn"] h1,
        html[lang="bn"] h2,
        html[lang="bn"] h3,
        html[lang="bn"] h4,
        html[lang="bn"] h5,
        html[lang="bn"] h6,
        html[lang="bn"] .hero-subtitle,
        html[lang="bn"] .bn-keep-phrase,
        html[lang="bn"] .bn-subtitle-phrase {
            font-family: 'Noto Serif Bengali', 'Noto Sans Bengali', serif !important;
            letter-spacing: 0 !important;
        }
        html[lang="bn"] .bn-keep-phrase {
            font-weight: 700 !important;
        }
        html[lang="bn"] .bn-lock-word {
            font-family: 'Noto Serif Bengali' !important;
            font-weight: 700 !important;
            letter-spacing: 0 !important;
        }
        /* Readability measure: keep line length in a comfortable band */
        .max-w-reading {
            max-width: min(100%, 72ch) !important;
        }
        .max-w-reading p,
        .max-w-reading li {
            max-width: 70ch;
            overflow-wrap: anywhere;
        }

        /* Render-cost optimization: only for non-interactive long sections.
           Using contain-intrinsic-size: auto 1200px lets the browser cache the
           real rendered height to avoid scroll-position jumps (C1 scroll-lock fix). */
        @supports (content-visibility: auto) {
            .cv-auto {
                content-visibility: auto;
                contain-intrinsic-size: auto 1200px;
            }
        }

        /* overflow-x wrapper  -  overflow:hidden বা overflow:clip দিলে scroll container তৈরি হয়,
           যা position:sticky ভেঙে দেয়। তাই শুধু overflow-x:clip ব্যবহার করি।
           clip = hidden-এর মতো কাজ করে কিন্তু নতুন scroll container তৈরি করে না। */
        #page-overflow-wrapper {
            overflow-x: clip;
        }

        /* ── Glassmorphism Navigation ─────────────────────────── */
        .glass-nav {
            background: var(--clr-glass-bg);
            -webkit-backdrop-filter: blur(20px) saturate(180%);
            backdrop-filter: blur(20px) saturate(180%);
            border-bottom: 1px solid var(--clr-glass-border);
            transition: all var(--transition-base);
        }

        .glass-nav.scrolled {
            background: rgba(255, 255, 255, 0.92);
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 12px rgba(0, 0, 0, 0.04);
        }

        /* ── Bento Grid Cards ─────────────────────────────────── */
        .bento-card {
            background: var(--clr-bg-primary);
            border: 1px solid #E2E8F0;
            border-radius: 16px;
            padding: 1.5rem;
            transition: all var(--transition-base);
            position: relative;
            overflow: hidden;
        }

        .bento-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 3px;
            background: linear-gradient(90deg, var(--clr-royal), var(--clr-royal-light));
            opacity: 0;
            transition: opacity var(--transition-base);
        }

        .bento-card:hover {
            transform: translateY(-4px);
            box-shadow: 0 12px 40px rgba(30, 58, 138, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
            border-color: rgba(30, 58, 138, 0.15);
        }

        .bento-card:hover::before {
            opacity: 1;
        }

        .bento-card.gold-accent::before {
            background: linear-gradient(90deg, var(--clr-gold), var(--clr-gold-light));
        }

        .bento-card.alert-accent::before {
            background: linear-gradient(90deg, #EF4444, #F87171);
        }

        .bento-card.green-accent::before {
            background: linear-gradient(90deg, #059669, #34D399);
        }

        /* ── KPI Value Animation ──────────────────────────────── */
        .kpi-value {
            font-family: 'Source Serif 4', Georgia, serif;
            font-weight: 700;
            line-height: 1.1;
            letter-spacing: -0.02em;
        }

        .kpi-badge {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            padding: 3px 10px;
            border-radius: 100px;
            font-size: 0.75rem;
            font-weight: 600;
            letter-spacing: 0.01em;
        }

        .kpi-badge.up { background: #ECFDF5; color: #059669; }
        .kpi-badge.down { background: #FEF2F2; color: #DC2626; }
        .kpi-badge.neutral { background: #FEF3C7; color: #D97706; }

        /* ── Mini Sparkline Canvas ─────────────────────────────── */
        .sparkline-container {
            height: 48px;
            margin-top: 0.75rem;
            opacity: 0.8;
        }

        /* ── Focus Mode: see comprehensive rules in Phase 3.3 block below ── */

        .focus-exit-bar {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            z-index: 9999;
            background: var(--clr-text-primary);
            color: white;
            padding: 12px 24px;
            justify-content: space-between;
            align-items: center;
            font-size: 0.875rem;
        }

        /* ── Language Toggle Pill ──────────────────────────────── */
        .lang-toggle {
            display: inline-flex;
            background: #F1F5F9;
            border-radius: 100px;
            padding: 3px;
            gap: 2px;
        }

        .lang-toggle button {
            padding: 6px 16px;
            border-radius: 100px;
            font-size: 0.8rem;
            font-weight: 600;
            border: none;
            cursor: pointer;
            transition: all var(--transition-base);
            background: transparent;
            color: var(--clr-text-secondary);
        }

        .lang-toggle button.active {
            background: var(--clr-royal);
            color: white;
            box-shadow: 0 1px 4px rgba(30, 58, 138, 0.3);
        }

        /* ── Language-Stable Navbar Layout ────────────────────────
           Problem: Bengali nav labels are ~2x wider than English.
           With flex justify-between, the center nav shifts ~60-70px
           horizontally when switching languages.
           Fix: 3-column CSS grid anchors left/center/right in place.
        ─────────────────────────────────────────────────────────── */
        #main-nav .max-w-7xl > .flex {
            display: grid;
            grid-template-columns: 1fr auto 1fr;
            height: 72px;
            align-items: center;
        }
        #main-nav .max-w-7xl > .flex > *:last-child {
            justify-self: end;
        }
        /* Prevent nav link text from wrapping on language switch */
        .nav-link {
            white-space: nowrap;
        }

        /* ── Language-Stable Heading Line-Heights ──────────────────
           Noto Serif Bengali has larger line-gap than Source Serif 4.
           Normalizing line-height prevents heading blocks from being
           different heights when switching between languages.
        ─────────────────────────────────────────────────────────── */
        html[lang="bn"] h1 { line-height: 1.25 !important; }
        html[lang="bn"] h2 { line-height: 1.3 !important; }
        html[lang="bn"] h3 { line-height: 1.3 !important; }
        html[lang="bn"] h4 { line-height: 1.3 !important; }
        html[lang="bn"] h5 { line-height: 1.3 !important; }
        html[lang="bn"] h6 { line-height: 1.3 !important; }
        html[lang="bn"] .hero-subtitle { line-height: 1.6 !important; }

        /* ── Hero: radial spotlight behind title ─────────────────── */
        header#top {
            background-image:
                radial-gradient(ellipse 80% 60% at 50% 0%, rgba(30,58,138,0.04) 0%, transparent 70%);
        }

        /* ── Hero: centered content column ───────────────────────
           max-w-7xl wrapper stays full-width for bg/grid.
           hero-content-col is the actual readable zone:
           centered, 720px wide — comfortable, not cramped.
        ─────────────────────────────────────────────────────────── */
        .hero-content-col {
            max-width: 720px;
            margin: 0 auto;
            text-align: center;
        }
        .hero-content-col p {
            text-align: left;
        }
        .hero-content-col .hero-subtitle {
            text-align: center;
        }

        /* ── Hero: badge with subtle border tint ────────────────── */
        .hero-badge { background-color: rgba(30,58,138,0.055); }

        /* ── Fix A: Hero → KPI section visual separator ───────────
           A shadow-gradient at the hero's bottom edge signals
           the transition from white hero to slate-50 KPI section.
        ─────────────────────────────────────────────────────────── */
        header#top::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            height: 1px;
            background: linear-gradient(90deg,
                transparent 0%,
                rgba(30, 58, 138, 0.12) 20%,
                rgba(30, 58, 138, 0.18) 50%,
                rgba(30, 58, 138, 0.12) 80%,
                transparent 100%);
            pointer-events: none;
        }

        /* ── Fix A: Scroll indicator (animated chevron) ────────── */
        .scroll-indicator {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 4px;
            margin-top: 2rem;
            opacity: 0.45;
            animation: scroll-bounce 2.4s ease-in-out infinite;
        }
        .scroll-indicator span {
            display: block;
            width: 18px;
            height: 18px;
            border-right: 2px solid var(--clr-royal);
            border-bottom: 2px solid var(--clr-royal);
            transform: rotate(45deg);
            animation: scroll-fade 2.4s ease-in-out infinite;
        }
        .scroll-indicator span:nth-child(2) { animation-delay: 0.2s; }
        .scroll-indicator span:nth-child(3) { animation-delay: 0.4s; }
        @keyframes scroll-bounce {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(6px); }
        }
        @keyframes scroll-fade {
            0%, 100% { opacity: 0.3; }
            50% { opacity: 0.85; }
        }
        @media (prefers-reduced-motion: reduce) {
            .scroll-indicator { animation: none; }
            .scroll-indicator span { animation: none; }
        }

        /* ── Fix D: h5/h6 type scale — more distinct levels ───── */
        h5 { font-size: 1.15rem !important; }
        h6 { font-size: 1.05rem !important; }

        /* ── Fix D: KPI card subtle background tints ────────────── */
        .bento-card.gold-accent  { background: linear-gradient(160deg, rgba(245,158,11,0.04) 0%, #fff 60%) !important; }
        .bento-card.green-accent { background: linear-gradient(160deg, rgba(5,150,105,0.04) 0%, #fff 60%) !important; }
        .bento-card.alert-accent { background: linear-gradient(160deg, rgba(239,68,68,0.04) 0%, #fff 60%) !important; }

        /* ── Fix B: WCAG minimum text sizes ─────────────────────────
           0.65rem ≈ 10.4px  →  bump to 0.72rem ≈ 11.5px
           0.7rem  ≈ 11.2px  →  bump to 0.75rem = 12px (AA minimum)
        ─────────────────────────────────────────────────────────── */
        .text-\[0\.65rem\] { font-size: 0.72rem !important; }
        .text-\[0\.7rem\]  { font-size: 0.75rem !important; }

        /* ── Hero Section Pattern ─────────────────────────────── */
        .hero-pattern {
            position: absolute;
            inset: 0;
            background-image:
                radial-gradient(circle at 20% 50%, rgba(30, 58, 138, 0.03) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.03) 0%, transparent 50%);
            pointer-events: none;
        }

        .hero-grid-lines {
            position: absolute;
            inset: 0;
            background-image:
                linear-gradient(rgba(30, 58, 138, 0.035) 1px, transparent 1px),
                linear-gradient(90deg, rgba(30, 58, 138, 0.035) 1px, transparent 1px);
            background-size: 48px 48px;
            pointer-events: none;
            -webkit-mask-image: radial-gradient(ellipse 60% 80% at 50% 40%, black 0%, transparent 85%);
            mask-image: radial-gradient(ellipse 60% 80% at 50% 40%, black 0%, transparent 85%);
        }

        /* ── Accessibility: Reduced Motion ────────────────────── */
        @media (prefers-reduced-motion: reduce) {
            *, *::before, *::after {
                animation-duration: 0.01ms !important;
                animation-iteration-count: 1 !important;
                transition-duration: 0.01ms !important;
            }
        }

        /* ── Scrollbar styling ────────────────────────────────── */
        ::-webkit-scrollbar { width: 8px; }
        ::-webkit-scrollbar-track { background: #F8FAFC; }
        ::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 4px; }
        ::-webkit-scrollbar-thumb:hover { background: #94A3B8; }

        /* ── Sidebar ToC Active Link (ScrollSpy) ─────────────── */
        .toc-link.active {
            color: var(--clr-royal);
            border-left-color: var(--clr-royal);
            font-weight: 600;
            background: rgba(30, 58, 138, 0.04);
        }

        /* ── Timeline Node Animation (Feature #9) ────────────── */
        .timeline-node[data-animate] {
            transition: opacity 0.6s ease-out, transform 0.6s ease-out;
        }
        .timeline-node[data-animate].in-view {
            opacity: 1 !important;
            transform: translateY(0) !important;
        }

        /* ── Glossary Term Styling (Feature #4) ──────────────── */
        .glossary-term {
            text-decoration: underline;
            text-decoration-style: dashed;
            text-decoration-color: rgba(37, 99, 235, 0.5);
            text-underline-offset: 3px;
            cursor: help;
            transition: background 0.2s ease;
        }
        .glossary-term:hover {
            background: rgba(37, 99, 235, 0.08);
            border-radius: 3px;
        }

        /* ── Scrollytelling Triggers  -  no active effect per design ── */
        .scrolly-trigger { opacity: 1; }
        /* Scrolly grid  -  chart col must be a block-level stacking context,
           NOT overflow hidden/auto. items-start ensures left col drives height. */
        #scrolly-grid {
            align-items: start;
        }
        /* .scrolly-chart-col intentionally has no explicit overflow property;
           this preserves sticky behavior for its children. */
        /* Mobile: show text col without grid */
        @media (max-width: 1023px) {
            .scrolly-text-col { display: block; }
            .max-w-reading {
                max-width: min(100%, 66ch) !important;
            }
            .max-w-reading p,
            .max-w-reading li {
                max-width: 65ch;
            }
        }

        /* ── Citation Modal ───────────────────────────────────── */
        #citation-modal.show { display: flex; }

        /* Ask Modal */
        #ask-modal.show { display: flex; }
        @keyframes slideUp { from { transform: translateY(40px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
        .animate-slide-up { animation: slideUp 0.3s ease-out; }

        /* Flood zone pulse */
        @keyframes pulse-zone { 0%,100% { opacity: 0.7; } 50% { opacity: 1; } }
        .flood-zone-active { animation: pulse-zone 2s ease-in-out infinite; }

        /* Ask result highlight */
        .ask-result-card { transition: all 0.2s ease; }
        .ask-result-card:hover { transform: translateX(4px); }

        /* ── Phase 3.4: anchor offset  -  handled by :root scroll-padding-top above ── */
        /* FIX #16: Removed duplicate `html { scroll-padding-top: 100px }` that
           was overriding the CSS-variable-based value set in the base html rule.
           scroll-padding-top: calc(var(--nav-height) + 24px) is set above. */

        /* ── Phase 3.3: Focus Mode  -  true Kindle/Medium reading ─ */
        /* FIX #1 + #5: focus-exit-bar must show when focus-mode is active */
        body.focus-mode .focus-exit-bar { display: flex !important; }

        body.focus-mode .glass-nav,
        body.focus-mode .sidebar-toc,
        body.focus-mode .bento-section,
        body.focus-mode header#top,
        body.focus-mode footer,
        body.focus-mode #ask-fab,
        body.focus-mode #back-to-top-fab,
        body.focus-mode #print-fab,
        body.focus-mode .no-print { display: none !important; }

        /* FIX #7: Fix grid context conflict in focus mode  - 
           The main content sits inside a lg:grid column. In focus mode we
           must collapse the grid wrapper so max-width:720px works correctly */
        body.focus-mode .layout-grid {
            display: block !important;
        }
        body.focus-mode main {
            max-width: 720px;
            margin: 0 auto;
            /* Top padding accounts for focus-exit-bar height (~46px) + breathing room */
            padding: 3.5rem 1.5rem 2rem;
            width: 100%;
        }
        /* Focus mode: hide chart, collapse scrolly grid to single col */
        body.focus-mode .scrolly-chart-col { display: none !important; }
        body.focus-mode #scrolly-grid { grid-template-columns: 1fr !important; }
        body.focus-mode .scrolly-text-col { width: 100% !important; }
        /* Keep citation controls available in focus mode for research workflows */
        /* Focus mode: fix main layout grid collapse */
        body.focus-mode .lg\:grid { display: block !important; }
        body.focus-mode .sidebar-toc { display: none !important; }
        body.focus-mode #main-content { max-width: 720px; margin: 0 auto; }

        /* ── Phase 4.4: Premium Range Slider ──────────────────── */
        input[type="range"] { -webkit-appearance: none; appearance: none; height: 6px; border-radius: 999px; background: linear-gradient(to right, #1E3A8A 0%, #1E3A8A var(--slider-pct, 50%), #E2E8F0 var(--slider-pct, 50%), #E2E8F0 100%); outline: none; }
        input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 22px; height: 22px; border-radius: 50%; background: #F59E0B; border: 3px solid white; box-shadow: 0 2px 8px rgba(245,158,11,0.4); cursor: pointer; transition: transform 0.15s ease; }
        input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.15); }
        input[type="range"]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #F59E0B; border: 3px solid white; box-shadow: 0 2px 8px rgba(245,158,11,0.4); cursor: pointer; }

        /* ── Phase 4.1: Timeline alternating cards (desktop) ──── */
        @media (min-width: 768px) {
        /* Timeline alternating handled by new glassmorphism layout */
        }

        /* ── Phase 4.5: Back-to-top FAB ───────────────────────── */
        #back-to-top-fab { opacity: 0; pointer-events: none; transition: opacity 0.3s ease, transform 0.3s ease; transform: translateY(12px); }
        #back-to-top-fab.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }

        /* ── Phase 5.2: Chart.js custom tooltip override ──────── */
        .chartjs-tooltip { background: rgba(255,255,255,0.95) !important; backdrop-filter: blur(12px); border: 1px solid #E2E8F0; border-radius: 10px; padding: 8px 12px; box-shadow: 0 4px 16px rgba(0,0,0,0.08); font-family: 'Inter', sans-serif !important; color: #1E293B !important; }

        /* ── Phase 3.5: Print Stylesheet ──────────────────────── */
        @media print {
            .cv-auto {
                content-visibility: visible !important;
                contain: none !important;
            }
            /* ── Hide interactive/nav elements ── */
            /* NOTE: .bento-section intentionally NOT hidden — it contains the KPI charts */
            .glass-nav, .sidebar-toc, .no-print, #ask-fab, #back-to-top-fab, #print-fab,
            .cite-btn, .ask-chip, button, input[type="range"],
            #citation-modal, #ask-modal, footer,
            .focus-exit-bar, #bd-leaflet-map,
            #bd-leaflet-map + *, .leaflet-container { display: none !important; }
            /* Restore KPI dashboard — hidden above by button rule on its children only */
            .bento-section { display: block !important; }
            .bento-card { display: block !important; }
            /* Sparkline canvases and chart canvases are inside bento-cards, not buttons */

            /* ── Base print styles ── */
            html, body {
                background: white !important;
                color: #0F172A !important;
                font-size: 10.5pt !important;
                -webkit-print-color-adjust: exact !important;
                print-color-adjust: exact !important;
                margin: 0 !important; padding: 0 !important;
            }
            * { box-shadow: none !important; text-shadow: none !important; border-radius: 4px !important; }

            /* ── Layout: collapse LAYOUT grids (sidebar+content) to single column ── */
            /* Only collapse .lg:grid (the sidebar wrapper), not content grids like lg:grid-cols-4 */
            .lg\:grid { display: block !important; }
            main, #main-content { max-width: 178mm !important; margin: 0 auto !important; padding: 0.4cm 0 !important; }
            #scrolly-grid { display: block !important; }
            .max-w-reading, .max-w-reading p, .max-w-reading li { max-width: 68ch !important; }
            /* Bento grid: allow 2-col layout in print for KPI cards */
            .bento-section .grid { display: grid !important; grid-template-columns: repeat(2, 1fr) !important; gap: 0.75rem !important; }

            /* ── Typography ── */
            h1 { font-size: 18pt !important; page-break-after: avoid; }
            h2 { font-size: 14pt !important; page-break-after: avoid; }
            h3 { font-size: 12pt !important; page-break-after: avoid; }
            p, li { font-size: 10pt !important; line-height: 1.6 !important; }

            /* ── Section breaks ── */
            .scroll-section {
                page-break-inside: avoid;
                margin-bottom: 1.5rem !important;
                padding-bottom: 0.5rem !important;
                border-bottom: 1px solid #E2E8F0;
            }

            /* ── Charts: force visible + sized correctly ──
               beforeprint event in JS will call chart.resize() 
               These rules ensure containers have explicit height */
            canvas {
                display: block !important;
                width: 100% !important;
                height: 220px !important;
                max-height: 220px !important;
                page-break-inside: avoid !important;
            }
            [style*="height"] { height: auto !important; min-height: 220px !important; overflow: visible !important; }
            .relative[style*="height: 3"] { height: 220px !important; }
            .relative[style*="height: 4"] { height: 220px !important; }

            /* Prefer desktop chart panel in print to avoid duplicate canvases */
            .scrolly-chart-col { display: block !important; }
            .lg\:hidden { display: none !important; }

            /* ── Tables ── */
            table { width: 100% !important; border-collapse: collapse !important; }
            th, td { border: 1px solid #CBD5E1 !important; padding: 4px 8px !important; font-size: 9pt !important; }

            /* ── Links ── */
            a { color: #1E3A8A !important; text-decoration: underline; }
            a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 7.5pt; color: #64748B; }

            /* ── Map fallback ── */
            #bd-leaflet-map::before {
                content: "[ ইন্টারেক্টিভ মানচিত্র  -  অনলাইনে দেখুন: iamnaime.info.bd/index.html ]";
                display: block; padding: 12px; font-size: 9pt; color: #64748B;
                border: 1px dashed #CBD5E1; text-align: center;
            }
        }

        /* ── Leaflet Map Overrides ──────────────────────────────── */
        #bd-leaflet-map {
            height: 420px;
            border-radius: 12px;
            z-index: 0;
        }
        @media (max-width: 640px) {
            #bd-leaflet-map { height: 300px; }
        }
        .leaflet-popup-content-wrapper {
            border-radius: 12px !important;
            box-shadow: 0 8px 32px rgba(0,0,0,0.12) !important;
            font-family: 'Noto Sans Bengali','Inter',sans-serif !important;
        }
        .leaflet-popup-content { font-size: 0.78rem; line-height: 1.6; }
        .flood-tooltip {
            background: rgba(255,255,255,0.97) !important;
            border: 1px solid #E2E8F0 !important;
            border-radius: 10px !important;
            padding: 8px 12px !important;
            box-shadow: 0 4px 16px rgba(0,0,0,0.1) !important;
            font-family: 'Noto Sans Bengali','Inter',sans-serif !important;
            font-size: 0.75rem !important;
        }
        .leaflet-control-attribution { font-size: 9px !important; }
        .flood-zone-layer { transition: opacity 0.6s ease; }
        /* ── Sidebar Thin Scrollbar ───────────────────────────── */
        .scrollbar-thin::-webkit-scrollbar { width: 3px; }
        .scrollbar-thin::-webkit-scrollbar-thumb { background: #E2E8F0; border-radius: 2px; }

        /* ── FIX H-FAB: Stack 3 FABs vertically on mobile so they don't overlap ── */
        @media (max-width: 639px) {
            /* Ask FAB: bottom-right anchor */
            #ask-fab       { bottom: 1.25rem; right: 1rem; width: 48px; height: 48px; }
            /* Print FAB: one step above ask fab */
            #print-fab     { bottom: 4.5rem; right: 1.25rem; width: 40px; height: 40px; }
            /* Back-to-top FAB: one step above print */
            #back-to-top-fab { bottom: 7.75rem; right: 1.25rem; width: 40px; height: 40px; }
        }

        /* ── FIX H-SPARK: Prevent sparkline canvas from being clipped on mobile ── */
        @media (max-width: 639px) {
            .sparkline-container { overflow: visible; height: 44px; }
            .sparkline-container canvas { display: block !important; }
        }

        /* ── FIX M-TIMELINE: Timeline dot color legend indicator ────────── */
        .timeline-legend { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 1rem; }
        .timeline-legend-item { display: flex; align-items: center; gap: 6px; font-size: 0.72rem; color: var(--clr-text-secondary); }
        .timeline-legend-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }

        /* ── FIX M-METHODOLOGY: Responsive table on mobile ─────────────── */
        @media (max-width: 639px) {
            .methodology-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
            .methodology-table-wrap table { min-width: 540px; }
        }

        /* ── FIX L-TIMELINE: Make timeline connector line fully visible ─── */
        .relative.border-l-2 { border-left-color: rgba(30,58,138,0.25) !important; }

        /* ── FIX L-COPYRIGHT: Improve copyright text contrast in footer ─── */
        footer .text-\[0\.72rem\] { color: #9CA3AF !important; }
        footer .text-\[0\.72rem\] a { color: #34D399 !important; }

        /* ── FIX M-MOBILE-CHART: Ensure mobile macro chart minimum height ── */
        @media (max-width: 1023px) {
            #mobile-macro-chart { min-height: 240px; }
        }

        /* ── FIX H-SCROLLY-TRIGGER: Better visual separation on mobile ─── */
        @media (max-width: 1023px) {
            .scrolly-trigger { border-bottom: 1px solid rgba(30,58,138,0.08); padding-bottom: 1.5rem !important; }
            .scrolly-trigger:last-child { border-bottom: none; }
        }

        /* ── FIX M-NAV-ACTIVE: Active nav link indicator ──────────────── */
        .nav-link.active { color: var(--clr-royal) !important; background: rgba(30,58,138,0.06) !important; }
        .toc-link.active { color: var(--clr-royal) !important; border-left-color: var(--clr-royal) !important; font-weight: 600; }

        /* HTML cleanup utility classes (migrated from inline styles) */
        .ad-010 { animation-delay: 0.1s; }
        .ad-020 { animation-delay: 0.2s; }
        .ad-028 { animation-delay: 0.28s; }
        .ad-035 { animation-delay: 0.35s; }
        .hero-title-fluid { font-size: clamp(2rem, 4.5vw, 3.4rem); line-height: 1.1; }
        .hero-subtitle-fluid { font-size: clamp(1rem, 1.6vw, 1.2rem); }
        .bg-royal-soft-03 { background: rgba(30, 58, 138, 0.03); }
        .bg-royal-soft-08 { background: rgba(30, 58, 138, 0.08); }
        .scrolly-self-start { align-self: start; }
        /* Section-bound sticky chart col: col stretches with text col so sticky
           panel stays within section bounds and auto-unsticks at section end */
        #scrolly-chart-wrapper {
            align-self: stretch;
        }
        #scrolly-chart-wrapper.chart-at-end .scrolly-sticky-panel {
            position: relative;
            top: auto;
        }
        .scrolly-sticky-panel {
            top: calc(var(--nav-height) + 16px);
            max-height: calc(100vh - var(--nav-height) - 32px);
            overflow: visible;
        }
        .h-360 { height: 360px; }
        .chart-wrap-280 { position: relative; height: 280px; width: 100%; }
        .flag-thumb { width: 24px; height: 16px; }
        .h-220 { height: 220px; }
        .h-300 { height: 300px; }
        .h-240 { height: 240px; }
        .h-280 { height: 280px; }
        .flood-legend-extreme { background: rgba(220, 38, 38, 0.75); border: 1px solid #DC2626; }
        .flood-legend-high { background: rgba(234, 88, 12, 0.65); border: 1px solid #EA580C; }
        .flood-legend-medium { background: rgba(251, 146, 60, 0.45); border: 1px solid #F97316; }
        .flood-legend-low { background: rgba(251, 191, 36, 0.35); border: 1px solid #FBBF24; }
        .terminal-glow {
            box-shadow: 0 0 12px rgba(16, 185, 129, 0.15), inset 0 0 12px rgba(16, 185, 129, 0.05);
        }
