:root {
    --ink: #172033;
    --muted: #667085;
    --line: #d9e1ea;
    --paper: #ffffff;
    --soft: #f5f8fb;
    --saffron: #f59e0b;
    --teal: #0f766e;
    --violet: #6d5bd0;
    --green: #15803d;
    --shadow: 0 14px 35px rgba(23, 32, 51, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: "Noto Sans Devanagari", "Nirmala UI", "Segoe UI", system-ui, sans-serif;
    color: var(--ink);
    background: var(--soft);
    line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 14px clamp(16px, 4vw, 56px);
    background: rgba(255, 255, 255, .94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(16px);
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}
.brand-mark {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: var(--ink);
    color: #fff;
    font-weight: 800;
    font-size: 24px;
}
.brand strong { display: block; font-size: 18px; }
.brand small { display: block; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 54vw; }
.nav { display: flex; align-items: center; gap: 8px; }
.nav a {
    padding: 10px 12px;
    border-radius: 8px;
    color: #344054;
    font-weight: 700;
}
.nav a:hover { background: #eef4ff; color: var(--violet); }
.menu-button { display: none; border: 1px solid var(--line); background: #fff; border-radius: 8px; width: 42px; height: 42px; font-size: 20px; }

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
    gap: clamp(24px, 5vw, 56px);
    align-items: center;
    padding: clamp(36px, 7vw, 82px) clamp(16px, 5vw, 72px) 38px;
    background: #fff;
    border-bottom: 1px solid var(--line);
}
.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 5px 9px;
    border: 1px solid rgba(15, 118, 110, .25);
    border-radius: 8px;
    color: var(--teal);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}
h1, h2, h3, p { margin-top: 0; }
.hero h1 {
    margin: 16px 0 14px;
    max-width: 780px;
    font-size: clamp(34px, 6vw, 68px);
    line-height: 1.45;
}
.hero p { max-width: 640px; color: var(--muted); font-size: 19px; }
.search {
    display: flex;
    gap: 10px;
    max-width: 620px;
    margin-top: 26px;
}
.search input {
    flex: 1;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px 16px;
    font: inherit;
    background: #fff;
}
.search button {
    border: 0;
    border-radius: 8px;
    padding: 0 22px;
    background: var(--violet);
    color: #fff;
    font-weight: 800;
    font: inherit;
}
.hero-gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    min-height: 400px;
}
.hero-gallery a {
    position: relative;
    overflow: hidden;
    min-height: 180px;
    border-radius: 8px;
    background: #dfe7ef;
    box-shadow: var(--shadow);
}
.hero-gallery a:first-child { grid-row: span 2; }
.hero-gallery img { width: 100%; height: 100%; object-fit: cover; }
.hero-gallery span {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    padding: 9px 10px;
    border-radius: 8px;
    background: rgba(23, 32, 51, .78);
    color: #fff;
    font-weight: 800;
}

.stats-strip {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    max-width: 1180px;
    margin: 18px auto 0;
    padding: 0 16px;
}
.stats-strip div {
    padding: 18px;
    background: #fff;
    border: 1px solid var(--line);
}
.stats-strip div:first-child { border-radius: 8px 0 0 8px; }
.stats-strip div:last-child { border-radius: 0 8px 8px 0; }
.stats-strip strong { display: block; font-size: 26px; line-height: 1; }
.stats-strip span { color: var(--muted); font-size: 13px; }

.section {
    max-width: 1180px;
    margin: 0 auto;
    padding: 42px 16px;
}
.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}
.section-head h2 { margin: 0; font-size: clamp(24px, 3vw, 36px); }
.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    font-weight: 800;
}
.chip span {
    min-width: 28px;
    padding: 1px 7px;
    border-radius: 999px;
    background: #ecfdf3;
    color: var(--green);
    text-align: center;
    font-size: 12px;
}
.grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}
.card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    box-shadow: 0 8px 20px rgba(23, 32, 51, .04);
}
.card-image {
    display: block;
    height: 190px;
    background: #e8eef5;
}
.card-image img { width: 100%; height: 100%; object-fit: cover; }
.image-fallback {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    background: var(--ink);
    color: #fff;
    font-size: 28px;
    font-weight: 800;
}
.card-body { padding: 16px; }
.pill {
    display: inline-flex;
    padding: 4px 8px;
    border-radius: 8px;
    background: #fff7ed;
    color: #b45309;
    font-size: 12px;
    font-weight: 800;
}
.card h2 {
    margin: 10px 0 8px;
    font-size: 20px;
    line-height: 1.3;
}
.card p { color: var(--muted); font-size: 14px; }
.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 12px;
}
.card-meta span { color: #b45309; font-weight: 800; }
.muted { color: var(--muted); }
.center { text-align: center; }

.page-hero {
    padding: 54px clamp(16px, 5vw, 72px);
    background: #fff;
    border-bottom: 1px solid var(--line);
}
.page-hero.compact h1 {
    margin: 14px 0 8px;
    font-size: clamp(32px, 5vw, 54px);
}
.category-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}
.category-card {
    display: grid;
    gap: 10px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}
.category-card span { color: var(--teal); font-weight: 800; font-size: 13px; }
.category-card strong { font-size: 24px; }

.article {
    max-width: 880px;
    margin: 0 auto;
    padding: 42px 16px;
}
.article-head h1 {
    margin: 14px 0 10px;
    font-size: clamp(32px, 5vw, 58px);
    line-height: 1.5;
}
.article-head p { color: var(--muted); font-size: 18px; }
.article-image {
    width: 100%;
    max-height: 520px;
    object-fit: cover;
    border-radius: 8px;
    margin: 28px 0;
    border: 1px solid var(--line);
}
.article-body {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    font-size: 18px;
}
.article-body h2, .article-body h3 { margin-top: 1.5em; }
.recovery-note {
    border-left: 5px solid var(--saffron);
    padding-left: 18px;
}
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}
.two-col > div {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 24px;
}
.not-found {
    min-height: 60vh;
    display: grid;
    place-content: center;
    text-align: center;
    padding: 40px 16px;
}
.footer {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 28px clamp(16px, 5vw, 72px);
    background: var(--ink);
    color: #fff;
}
.footer p { margin: 6px 0 0; color: #cbd5e1; }
.footer-links { display: flex; gap: 14px; align-items: center; }

@media (max-width: 900px) {
    .hero { grid-template-columns: 1fr; }
    .hero-gallery { min-height: 320px; }
    .grid, .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stats-strip { grid-template-columns: repeat(2, 1fr); }
    .stats-strip div, .stats-strip div:first-child, .stats-strip div:last-child { border-radius: 8px; }
}

@media (max-width: 640px) {
    .site-header { align-items: flex-start; }
    .menu-button { display: grid; place-items: center; }
    .nav {
        display: none;
        position: absolute;
        top: 73px;
        left: 16px;
        right: 16px;
        flex-direction: column;
        align-items: stretch;
        padding: 10px;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: #fff;
        box-shadow: var(--shadow);
    }
    .nav.open { display: flex; }
    .hero { padding-top: 28px; }
    .hero h1 { font-size: 36px; }
    .search { flex-direction: column; }
    .search button { padding: 12px 18px; }
    .hero-gallery { grid-template-columns: 1fr; }
    .hero-gallery a:first-child { grid-row: auto; }
    .stats-strip, .grid, .category-grid, .two-col { grid-template-columns: 1fr; }
    .section-head { display: block; }
    .article-body { padding: 20px; font-size: 16px; }
    .footer { flex-direction: column; }
}

/* Reading and keyboard navigation */
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid #6d5bd0; outline-offset: 4px; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 100; padding: 12px 18px; background: #fff; border: 2px solid #6d5bd0; }
.skip-link:focus { top: 12px; }
.brand-mark { flex-shrink: 0; }
.hero { padding-top: 38px; padding-bottom: 38px; }
.hero h1 { font-size: clamp(2.25rem, 4.5vw, 3.6rem); }
.hero-gallery { height: 360px; min-height: 0; }
.hero-gallery a { min-height: 0; }
.hero-gallery img { position: absolute; inset: 0; }
.eyebrow, .pill, .chip span, .category-card span, .stats-strip span { font-size: .875rem; }
.card h2 { line-height: 1.6; }
.card p { font-size: 1rem; line-height: 1.8; }
.article-body { line-height: 1.95; overflow-wrap: anywhere; }
.article-body a { color: #4b399f; text-decoration: underline; }
.article-body table { display: block; overflow-x: auto; max-width: 100%; border-collapse: collapse; }
.article-body td, .article-body th { border: 1px solid var(--line); padding: 8px; }
.article-image { object-fit: contain; background: white; }
.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 20px; margin-top: 32px; }
.pagination a, .empty-state a { padding: 12px 18px; background: #5844b5; color: #fff; border-radius: 8px; }
.empty-state { padding: 24px; text-align: center; }
.empty-state a { display: inline-block; }
@media (max-width: 640px) {
    .site-header { flex-wrap: wrap; align-items: center; gap: 12px; }
    .brand strong { font-size: 1rem; }
    .brand small { max-width: 59vw; }
    .nav { top: calc(100% + 1px); }
    html:not(.js) .nav { display: flex; position: static; flex-basis: 100%; }
    html:not(.js) .menu-button { display: none; }
    .hero-gallery { display: none; }
    .stats-strip { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .hero h1 { font-size: 2.25rem; }
    .article-head h1 { font-size: 2rem; }
    .article-body { padding: 18px; font-size: 1.125rem; }
    .footer-links { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
