/* ============================================================
   State-Wise Study — Modern UI design system
   Shared by public state/district pages and the admin backend.
   ============================================================ */
:root {
    --brand: #6d28d9;
    --brand-2: #8b5cf6;
    --brand-soft: #ede9fe;
    --brand-grad: linear-gradient(135deg, #6d28d9 0%, #8b5cf6 55%, #a78bfa 100%);
    --ink: #0f172a;
    --ink-2: #334155;
    --muted: #64748b;
    --line: #e7e9f0;
    --bg: #f6f7fb;
    --card: #ffffff;
    --radius: 18px;
    --radius-sm: 12px;
    --shadow: 0 1px 2px rgba(16,24,40,.04), 0 8px 24px rgba(16,24,40,.06);
    --shadow-lg: 0 12px 40px rgba(76,29,149,.16);

    /* theme accents for sections */
    --c-geo: #2563eb;     --c-geo-bg: #eff6ff;
    --c-nature: #059669;  --c-nature-bg: #ecfdf5;
    --c-heritage: #b45309;--c-heritage-bg: #fffbeb;
    --c-culture: #db2777; --c-culture-bg: #fdf2f8;
    --c-economy: #0d9488; --c-economy-bg: #f0fdfa;
    --c-people: #7c3aed;  --c-people-bg: #f5f3ff;
    --c-history: #c2410c; --c-history-bg: #fff7ed;
}

* { box-sizing: border-box; }

.sw {
    background: var(--bg);
    color: var(--ink);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
}
.sw-wrap { max-width: 1120px; margin: 0 auto; padding: 0 18px; }

/* ---- Breadcrumb ---- */
.sw-crumb { display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    font-size: .85rem; color: var(--muted); padding: 18px 0 4px; }
.sw-crumb a { color: var(--muted); text-decoration: none; }
.sw-crumb a:hover { color: var(--brand); }
.sw-crumb svg { width: 14px; height: 14px; opacity: .5; }
.sw-crumb .cur { color: var(--ink); font-weight: 600; }

/* ---- Hero ---- */
.sw-hero {
    position: relative; overflow: hidden;
    background: var(--brand-grad);
    border-radius: var(--radius);
    color: #fff; padding: 34px 32px; margin: 12px 0 26px;
    box-shadow: var(--shadow-lg);
}
.sw-hero::after {
    content: ""; position: absolute; right: -60px; top: -60px;
    width: 280px; height: 280px; border-radius: 50%;
    background: radial-gradient(circle at center, rgba(255,255,255,.18), transparent 70%);
}
.sw-hero__eyebrow { display: inline-flex; align-items: center; gap: 6px;
    font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
    background: rgba(255,255,255,.18); padding: 5px 12px; border-radius: 999px; }
.sw-hero h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); margin: 14px 0 6px; font-weight: 800; letter-spacing: -.02em; }
.sw-hero__sub { font-size: 1rem; opacity: .92; max-width: 640px; }
.sw-hero__stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; position: relative; z-index: 1; }
.sw-stat { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.18);
    backdrop-filter: blur(4px); border-radius: 14px; padding: 10px 16px; min-width: 120px; }
.sw-stat b { display: block; font-size: 1.25rem; font-weight: 800; line-height: 1.2; }
.sw-stat span { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; opacity: .85; }

/* ---- Quick facts ---- */
.sw-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px,1fr));
    gap: 14px; margin-bottom: 28px; }
.sw-fact { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm);
    padding: 15px 16px; box-shadow: var(--shadow); display: flex; gap: 12px; align-items: flex-start; }
.sw-fact__ic { flex: 0 0 38px; width: 38px; height: 38px; border-radius: 10px;
    display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.sw-fact__ic svg { width: 19px; height: 19px; }
.sw-fact__k { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.sw-fact__v { font-size: .98rem; font-weight: 700; color: var(--ink); margin-top: 2px; word-break: break-word; }

/* ---- Section cards ---- */
.sw-sections { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 800px){ .sw-sections { grid-template-columns: 1fr; } }
.sw-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow); overflow: hidden; }
.sw-card.full { grid-column: 1 / -1; }
.sw-card__head { display: flex; align-items: center; gap: 12px; padding: 16px 20px;
    border-bottom: 1px solid var(--line); }
.sw-card__ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; }
.sw-card__ic svg { width: 21px; height: 21px; }
.sw-card__head h2 { font-size: 1.08rem; font-weight: 800; margin: 0; letter-spacing: -.01em; }
.sw-card__head p { margin: 1px 0 0; font-size: .78rem; color: var(--muted); }
.sw-card__body { padding: 6px 20px 18px; }

/* theme tints */
.t-geo .sw-card__ic{background:var(--c-geo-bg);color:var(--c-geo)} .t-geo .sw-tag{background:var(--c-geo-bg);color:var(--c-geo)}
.t-nature .sw-card__ic{background:var(--c-nature-bg);color:var(--c-nature)} .t-nature .sw-tag{background:var(--c-nature-bg);color:var(--c-nature)}
.t-heritage .sw-card__ic{background:var(--c-heritage-bg);color:var(--c-heritage)} .t-heritage .sw-tag{background:var(--c-heritage-bg);color:var(--c-heritage)}
.t-culture .sw-card__ic{background:var(--c-culture-bg);color:var(--c-culture)} .t-culture .sw-tag{background:var(--c-culture-bg);color:var(--c-culture)}
.t-economy .sw-card__ic{background:var(--c-economy-bg);color:var(--c-economy)} .t-economy .sw-tag{background:var(--c-economy-bg);color:var(--c-economy)}
.t-people .sw-card__ic{background:var(--c-people-bg);color:var(--c-people)} .t-people .sw-tag{background:var(--c-people-bg);color:var(--c-people)}
.t-history .sw-card__ic{background:var(--c-history-bg);color:var(--c-history)} .t-history .sw-tag{background:var(--c-history-bg);color:var(--c-history)}

/* a data row inside a section */
.sw-row { padding: 12px 0; border-bottom: 1px dashed var(--line); }
.sw-row:last-child { border-bottom: 0; }
.sw-row__k { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em;
    color: var(--muted); font-weight: 700; margin-bottom: 7px; display:flex; align-items:center; gap:7px; }
.sw-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.sw-tag { background: var(--brand-soft); color: var(--brand); font-size: .82rem; font-weight: 600;
    padding: 4px 11px; border-radius: 999px; }
.sw-list { margin: 0; padding-left: 0; list-style: none; display: grid; gap: 6px; }
.sw-list li { position: relative; padding-left: 18px; font-size: .92rem; color: var(--ink-2); }
.sw-list li::before { content: ""; position: absolute; left: 2px; top: 9px; width: 6px; height: 6px;
    border-radius: 50%; background: currentColor; opacity: .45; }
.sw-prose { font-size: .94rem; color: var(--ink-2); }
.sw-prose p { margin: 0 0 10px; }
.sw-prose a { color: var(--brand); }

/* ---- Districts grid ---- */
.sw-dist-head { display: flex; align-items: end; justify-content: space-between; margin: 36px 0 16px; flex-wrap: wrap; gap: 10px; }
.sw-dist-head h2 { font-size: 1.5rem; font-weight: 800; margin: 0; letter-spacing: -.02em; }
.sw-dist-head p { margin: 4px 0 0; color: var(--muted); font-size: .9rem; }
.sw-dist-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px,1fr)); gap: 14px; }
.sw-dist {
    display: flex; align-items: center; gap: 12px; text-decoration: none;
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm);
    padding: 14px 15px; box-shadow: var(--shadow); transition: .18s ease; color: var(--ink);
}
.sw-dist:hover { transform: translateY(-3px); border-color: var(--brand-2); box-shadow: var(--shadow-lg); }
.sw-dist__ic { width: 40px; height: 40px; border-radius: 11px; flex: 0 0 40px;
    background: var(--brand-grad); color: #fff; display: grid; place-items: center; font-weight: 800; }
.sw-dist__n { font-weight: 700; font-size: .96rem; }
.sw-dist__m { font-size: .76rem; color: var(--muted); }
.sw-dist__arrow { margin-left: auto; color: var(--muted); transition: .18s; }
.sw-dist:hover .sw-dist__arrow { color: var(--brand); transform: translateX(3px); }

/* ---- Empty / coming soon ---- */
.sw-empty { background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius);
    padding: 40px 24px; text-align: center; color: var(--muted); }
.sw-empty svg { width: 46px; height: 46px; color: var(--brand-2); opacity: .6; margin-bottom: 10px; }
.sw-empty h3 { color: var(--ink); margin: 0 0 6px; font-size: 1.1rem; }

/* ---- Back / actions ---- */
.sw-back { display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
    color: var(--brand); font-weight: 700; font-size: .9rem; padding: 10px 18px;
    border: 1px solid var(--brand-soft); border-radius: 999px; background: var(--card); transition: .18s; }
.sw-back:hover { background: var(--brand-soft); }
.sw-foot-actions { margin: 34px 0 60px; display: flex; gap: 12px; flex-wrap: wrap; }

/* ---- District hero figure ---- */
.sw-figure { width: 100%; max-height: 360px; object-fit: cover; border-radius: var(--radius);
    margin: 0 0 24px; box-shadow: var(--shadow); display:block; }

/* ============================================================
   Map landing page (learn-indian-map)
   ============================================================ */
.sw-map-layout { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 24px; align-items: start; margin-bottom: 30px; }
@media (max-width: 900px){ .sw-map-layout { grid-template-columns: 1fr; } }

.sw-map-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 18px; position: sticky; top: 16px; }
@media (max-width: 900px){ .sw-map-card { position: static; } }
.sw-map-card__hint { display: flex; align-items: center; justify-content: center; gap: 8px;
    margin-top: 8px; font-size: .82rem; color: var(--muted); }
.sw-map-card__hint b { color: var(--brand); font-weight: 700; }

.map-svg-india { width: 100%; height: auto; display: block; }
.map-svg-india path { fill: #e6e2f8; stroke: #fff; stroke-width: .8; cursor: pointer;
    transition: fill .16s ease; }
.map-svg-india path:hover, .map-svg-india path.hl { fill: #8b5cf6; }
.map-svg-india path.active { fill: #6d28d9; }

/* states panel (right column) */
.sw-panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow); overflow: hidden; }
.sw-panel__head { padding: 16px 18px 12px; border-bottom: 1px solid var(--line); }
.sw-panel__head h2 { margin: 0 0 3px; font-size: 1.1rem; font-weight: 800; letter-spacing: -.01em; }
.sw-panel__head p { margin: 0; font-size: .82rem; color: var(--muted); }
.sw-search { position: relative; margin-top: 12px; }
.sw-search input { width: 100%; padding: 10px 13px 10px 38px; border: 1px solid var(--line);
    border-radius: 10px; font-family: inherit; font-size: .9rem; color: var(--ink); }
.sw-search input:focus { outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 3px var(--brand-soft); }
.sw-search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); }

.sw-slist { max-height: 560px; overflow-y: auto; padding: 8px; }
.sw-slist::-webkit-scrollbar { width: 8px; }
.sw-slist::-webkit-scrollbar-thumb { background: #d9d6ea; border-radius: 8px; }
.sw-srow { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 11px;
    text-decoration: none; color: var(--ink); transition: background .14s; }
.sw-srow:hover, .sw-srow.hl { background: var(--brand-soft); }
.sw-srow__ic { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 9px; display: grid; place-items: center;
    background: var(--brand-grad); color: #fff; font-weight: 800; font-size: .9rem; }
.sw-srow__n { font-weight: 650; font-size: .94rem; flex: 1; }
.sw-srow__a { color: var(--muted); transition: .14s; }
.sw-srow:hover .sw-srow__a, .sw-srow.hl .sw-srow__a { color: var(--brand); transform: translateX(2px); }
.sw-slist__none { padding: 26px; text-align: center; color: var(--muted); font-size: .88rem; }

/* feature strip under hero */
.sw-feats { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin: -8px 0 26px; }
@media (max-width: 760px){ .sw-feats { grid-template-columns: repeat(2,1fr); } }
.sw-feat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm);
    padding: 14px; box-shadow: var(--shadow); display: flex; gap: 11px; align-items: center; }
.sw-feat__ic { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 10px; display: grid; place-items: center; }
.sw-feat__ic svg { width: 19px; height: 19px; }
.sw-feat__t { font-weight: 700; font-size: .9rem; line-height: 1.2; }
.sw-feat__d { font-size: .76rem; color: var(--muted); }

/* ---- Map caption (replaces oversized hint) ---- */
.sw-map-cap { text-align: center; margin: 14px 0 2px; font-size: .84rem; color: var(--muted); }
.sw-map-cap b { color: var(--brand); }

/* ---- Section headings on landing ---- */
.sw-sec-title { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; margin: 36px 0 6px; }
.sw-sec-sub { color: var(--muted); font-size: .92rem; margin: 0 0 18px; }

/* ---- Study guidelines (numbered steps) ---- */
.sw-guide { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin: 0 0 14px; }
@media (max-width: 760px){ .sw-guide { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 440px){ .sw-guide { grid-template-columns: 1fr; } }
.sw-step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm);
    padding: 18px; box-shadow: var(--shadow); }
.sw-step__n { width: 34px; height: 34px; border-radius: 10px; background: var(--brand-grad); color: #fff;
    font-weight: 800; display: grid; place-items: center; margin-bottom: 11px; }
.sw-step__t { font-weight: 700; font-size: .96rem; margin: 0 0 4px; }
.sw-step__d { font-size: .84rem; color: var(--muted); margin: 0; line-height: 1.55; }

/* ---- SEO prose + FAQ ---- */
.sw-seo { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 26px 28px; margin-bottom: 26px; }
.sw-seo h2 { font-size: 1.35rem; font-weight: 800; margin: 0 0 12px; letter-spacing: -.02em; }
.sw-seo h3 { font-size: 1.05rem; font-weight: 700; margin: 20px 0 8px; }
.sw-seo p { color: var(--ink-2); font-size: .95rem; margin: 0 0 12px; line-height: 1.75; }
.sw-seo a { color: var(--brand); font-weight: 600; }
.sw-seo strong { color: var(--ink); }

.sw-faq details { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px;
    overflow: hidden; background: #fff; box-shadow: var(--shadow); }
.sw-faq summary { cursor: pointer; padding: 15px 18px; font-weight: 700; font-size: .95rem;
    list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--ink); }
.sw-faq summary::-webkit-details-marker { display: none; }
.sw-faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--brand); font-weight: 400; transition: transform .2s; }
.sw-faq details[open] summary::after { transform: rotate(45deg); }
.sw-faq__a { padding: 0 18px 16px; color: var(--ink-2); font-size: .92rem; line-height: 1.7; }
.sw-faq__a a { color: var(--brand); font-weight: 600; }

/* ============================================================
   Icon sizing safety net + mobile polish
   ============================================================ */
/* Hero eyebrow icon (was rendering oversized with no width/height) */
.sw-hero__eyebrow svg { width: 14px; height: 14px; flex: 0 0 auto; }
/* Catch-all: any inline icon in these chips/captions stays small */
.sw-map-cap svg, .sw-sec-sub svg, .sw-step svg { width: 16px; height: 16px; }

@media (max-width: 640px) {
    .sw-wrap { padding: 0 14px; }

    .sw-hero { padding: 24px 18px; border-radius: 16px; margin: 10px 0 20px; }
    .sw-hero h1 { font-size: 1.7rem; }
    .sw-hero__sub { font-size: .94rem; }
    .sw-hero__eyebrow { font-size: .66rem; }
    .sw-hero::after { width: 180px; height: 180px; }

    /* stats: two compact tiles per row */
    .sw-hero__stats { gap: 8px; margin-top: 18px; }
    .sw-stat { min-width: 0; flex: 1 1 calc(50% - 8px); padding: 9px 12px; }
    .sw-stat b { font-size: 1.05rem; }
    .sw-stat span { font-size: .68rem; }

    .sw-feats { gap: 10px; margin: 0 0 22px; }
    .sw-feat { padding: 12px; }

    .sw-map-card { padding: 12px; }
    .sw-map-layout { gap: 16px; }

    .sw-panel__head { padding: 14px 14px 10px; }
    .sw-slist { max-height: none; }

    .sw-sec-title { font-size: 1.25rem; margin-top: 28px; }
    .sw-guide { gap: 10px; }
    .sw-step { padding: 15px; }

    .sw-seo { padding: 20px 16px; }
    .sw-seo h2 { font-size: 1.18rem; }
    .sw-seo h3 { font-size: 1rem; }
    .sw-seo p { font-size: .92rem; }
    .sw-faq summary { padding: 13px 15px; font-size: .9rem; }

    /* public state/district pages */
    .sw-facts { grid-template-columns: 1fr 1fr; gap: 10px; }
    .sw-fact { padding: 12px; flex-direction: column; gap: 8px; }
    .sw-dist-head h2 { font-size: 1.25rem; }
}

@media (max-width: 380px) {
    .sw-facts { grid-template-columns: 1fr; }
    .sw-stat { flex: 1 1 100%; }
}

/* ============================================================
   Compact, app-like hero on mobile (overrides earlier rules)
   ============================================================ */
@media (max-width: 640px) {
    .sw-hero { padding: 20px 16px; border-radius: 16px; }
    .sw-hero h1 { font-size: 1.5rem; line-height: 1.18; margin: 11px 0 6px; }
    .sw-hero__sub { font-size: .88rem; line-height: 1.55; }
    .sw-hero__eyebrow { padding: 4px 10px; }

    /* stats become a single row of small pills, not big tiles */
    .sw-hero__stats { gap: 7px; margin-top: 14px; flex-wrap: wrap; }
    .sw-stat {
        flex: 0 0 auto; min-width: 0;
        display: inline-flex; align-items: baseline; gap: 5px;
        padding: 6px 12px; border-radius: 999px;
        background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.22);
    }
    .sw-stat b { display: inline; font-size: .85rem; }
    .sw-stat span { display: none; font-size: .62rem; }
    .sw-stat:first-child span { display: inline; }  /* keep "States & UTs" on the count pill */
}

/* ============================================================
   Study-friendly in-page navigation (jump tabs + scrollspy)
   ============================================================ */
html { scroll-behavior: smooth; }

.sw-tabs {
    position: sticky; top: var(--hdr-h, 60px); z-index: 40;
    display: flex; gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch;
    padding: 12px 0 11px; margin: 0 0 22px;
    background: linear-gradient(var(--bg), var(--bg) 72%, rgba(246,247,251,0));
    scrollbar-width: none;
}
.sw-tabs::-webkit-scrollbar { display: none; }
.sw-tab {
    flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px;
    padding: 8px 15px; border-radius: 999px; font-size: .85rem; font-weight: 650;
    color: var(--ink-2); background: var(--card); border: 1px solid var(--line);
    text-decoration: none; white-space: nowrap; transition: .15s; box-shadow: var(--shadow);
}
.sw-tab svg { width: 15px; height: 15px; }
.sw-tab:hover { color: var(--brand); border-color: var(--brand-2); }
.sw-tab.active { background: var(--brand-grad); color: #fff; border-color: transparent; box-shadow: 0 5px 14px rgba(109,40,217,.28); }

/* offset anchors so the sticky tabs/header never cover a heading */
[id^="sec-"] { scroll-margin-top: calc(var(--hdr-h, 60px) + 64px); }

/* district filter box */
.sw-dfilter { position: relative; max-width: 300px; margin: 0 0 16px; }
.sw-dfilter input { width: 100%; padding: 10px 13px 10px 37px; border: 1px solid var(--line);
    border-radius: 10px; font-family: inherit; font-size: .9rem; background: #fff; }
.sw-dfilter input:focus { outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 3px var(--brand-soft); }
.sw-dfilter svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); }

@media (max-width: 640px) {
    .sw-tabs { top: var(--hdr-h, 56px); padding: 10px 0; gap: 6px; }
    .sw-tab { padding: 7px 12px; font-size: .8rem; }
}

/* ============================================================
   Redesign: color-coded section headers + page-nav buttons
   ============================================================ */
/* Tinted, color-coded section headers (more scannable for study) */
.sw-card__head { background: #fbfbfe; }
.t-geo  .sw-card__head { background: var(--c-geo-bg); }      .t-geo  .sw-card__head h2 { color: var(--c-geo); }
.t-nature .sw-card__head { background: var(--c-nature-bg); } .t-nature .sw-card__head h2 { color: var(--c-nature); }
.t-heritage .sw-card__head { background: var(--c-heritage-bg); } .t-heritage .sw-card__head h2 { color: var(--c-heritage); }
.t-culture .sw-card__head { background: var(--c-culture-bg); } .t-culture .sw-card__head h2 { color: var(--c-culture); }
.t-economy .sw-card__head { background: var(--c-economy-bg); } .t-economy .sw-card__head h2 { color: var(--c-economy); }
.t-people .sw-card__head { background: var(--c-people-bg); } .t-people .sw-card__head h2 { color: var(--c-people); }
.t-history .sw-card__head { background: var(--c-history-bg); } .t-history .sw-card__head h2 { color: var(--c-history); }
.sw-card__ic { box-shadow: 0 1px 3px rgba(16,24,40,.08); }

/* Page navigation buttons (replace chunky pills) */
.sw-pagenav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 38px 0 64px; }
@media (max-width: 560px) { .sw-pagenav { grid-template-columns: 1fr; } }
.sw-navbtn { display: flex; align-items: center; gap: 14px; padding: 15px 18px; border-radius: 14px;
    background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
    text-decoration: none; color: var(--ink); transition: .16s ease; }
.sw-navbtn:hover { border-color: var(--brand-2); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.sw-navbtn__ic { width: 42px; height: 42px; flex: 0 0 42px; border-radius: 12px; display: grid; place-items: center;
    background: var(--brand-soft); color: var(--brand); }
.sw-navbtn__ic svg { width: 20px; height: 20px; }
.sw-navbtn:hover .sw-navbtn__ic { background: var(--brand-grad); color: #fff; }
.sw-navbtn small { display: block; font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.sw-navbtn b { font-size: .98rem; font-weight: 700; line-height: 1.25; }
.sw-navbtn--next { text-align: right; flex-direction: row-reverse; }

/* ============================================================
   Hover state-shape popup + zigzag connector (desktop only)
   ============================================================ */
.sw-connector { position: fixed; inset: 0; width: 100vw; height: 100vh;
    pointer-events: none; z-index: 60; display: none; }
.sw-connector.show { display: block; }

.sw-statepop {
    position: fixed; z-index: 61; width: 244px; padding: 14px;
    background: #fff; border: 1px solid var(--line); border-radius: 18px;
    box-shadow: 0 20px 54px rgba(76,29,149,.28);
    pointer-events: none; display: none; opacity: 0; transform: scale(.95);
    transition: opacity .14s ease, transform .14s ease;
}
.sw-statepop.show { display: block; opacity: 1; transform: scale(1); }
.sw-statepop__map { height: 176px; border-radius: 13px; padding: 14px;
    background: radial-gradient(circle at 50% 30%, #f5f3ff, #ede9fe);
    display: grid; place-items: center; }
.sw-statepop__map svg { width: 100%; height: 100%; }
.sw-statepop__map svg path { fill: #7c3aed; stroke: #fff; stroke-width: .7;
    filter: drop-shadow(0 5px 10px rgba(109,40,217,.35)); }
.sw-statepop__meta { display: flex; align-items: center; justify-content: space-between;
    gap: 8px; margin-top: 12px; }
.sw-statepop__name { font-weight: 800; font-size: 1.02rem; color: var(--ink); letter-spacing: -.01em; }
.sw-statepop__hint { font-size: .74rem; color: var(--brand); font-weight: 700; white-space: nowrap; }

/* highlight the hovered state on the map while popup is open */
.map-svg-india path.peek { fill: #6d28d9 !important; }

@media (max-width: 900px) {
    .sw-statepop, .sw-connector { display: none !important; }
}

/* ============================================================
   District page — map + quick-facts side-by-side layout
   ============================================================ */
.sw-district-overview {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 20px;
    align-items: start;
    margin: 0 0 28px;
}
@media (max-width: 820px) {
    .sw-district-overview { grid-template-columns: 1fr; }
}

/* Map figure card */
.sw-map-figure {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin: 0;
    position: sticky;
    top: calc(var(--hdr-h, 60px) + 12px);
}
@media (max-width: 820px) { .sw-map-figure { position: static; } }

.sw-map-figure__hd {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 14px;
    border-bottom: 1px solid var(--line);
    background: var(--brand-soft);
    font-size: .8rem;
    font-weight: 700;
    color: var(--brand);
    text-transform: uppercase;
    letter-spacing: .07em;
}
.sw-map-figure__hd svg { width: 15px; height: 15px; flex-shrink: 0; }
.sw-map-figure__hd span { flex: 1; }

.sw-map-figure__exp {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--brand);
    border-radius: 6px;
    display: flex;
    align-items: center;
    transition: background .15s;
}
.sw-map-figure__exp:hover { background: rgba(109,40,217,.12); }
.sw-map-figure__exp svg { width: 15px; height: 15px; }

.sw-map-figure__img-wrap {
    overflow: hidden;
    max-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f8fc;
}
.sw-map-figure__img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform .3s ease;
}
.sw-map-figure:hover .sw-map-figure__img-wrap img { transform: scale(1.02); }

.sw-map-figure__cap {
    font-size: .75rem;
    color: var(--muted);
    text-align: center;
    padding: 8px 12px;
    border-top: 1px solid var(--line);
    margin: 0;
    background: #fafbff;
}

/* Compact facts stack (right column, no grid) */
.sw-facts--compact {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 0;
}
.sw-facts--compact .sw-fact {
    width: 100%;
}

/* Lightbox / expanded map overlay */
.sw-map-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.75);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.sw-map-overlay.show { display: flex; }
.sw-map-overlay__inner {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    max-width: 900px;
    width: 100%;
    box-shadow: 0 30px 80px rgba(0,0,0,.4);
    position: relative;
}
.sw-map-overlay__inner img { width: 100%; height: auto; display: block; max-height: 80vh; object-fit: contain; }
.sw-map-overlay__close {
    position: absolute;
    top: 10px; right: 10px;
    background: rgba(0,0,0,.55);
    border: none; border-radius: 8px;
    color: #fff; cursor: pointer;
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; line-height: 1;
    transition: background .15s;
}
.sw-map-overlay__close:hover { background: rgba(0,0,0,.8); }
