:root {
    --teal: #1d4845;
    --ink: #102b36;
    --muted: #586871;
    --orange: #e78039;
    --line: #e0e8e9;
    --soft: #e8f3f2;
    --bs-body-font-family: Arial, "Nirmala UI",
        "Kohinoor Devanagari", sans-serif;
    --bs-body-color: var(--ink);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 24px;
}

body {
    margin: 0;
    background: #fbfaf7;
    color: var(--ink);
    font-size: 15px;
}

.page-width {
    width: calc(100% - 112px);
    max-width: 1424px;
    margin-inline: auto;
}

/* Header */

.site-header {
    background: #fff8ee;
    border-bottom: 1px solid #e8ddcd;
}

.header-inner {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 17px;
    color: var(--teal);
    text-decoration: none;
    font-size: 23px;
    font-weight: 700;
    white-space: nowrap;
}

.brand-logo {
    display: block;
    width: 250px;
    max-width: 100%;
    height: auto;
    padding: 6px 10px;
    margin: 6px 0;
    background: transparent;
}

.lotus {
    width: 62px;
    height: 52px;
    color: #edb067;
}

.header-actions,
.top-nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.top-nav > a,
.top-nav > button {
    border: 0;
    background: none;
    color: var(--teal);
    text-decoration: none;
    font-size: 14px;
    padding: 24px 0 23px;
    position: relative;
    white-space: nowrap;
    cursor: pointer;
}

.top-nav .active::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: #f1b36b;
    border-radius: 2px 2px 0 0;
}

/* Language toggle */

.language-switch {
    display: flex;
    flex-shrink: 0;
    padding: 3px;
    border: 1px solid #c9d5cf;
    border-radius: 7px;
    gap: 2px;
    background: #fff8ee;
}

.language-switch button {
    font-size: 12px;
    min-width: 47px;
    padding: 5px 8px;
    border: 0;
    border-radius: 4px;
    color: #1d4845;
    background: #f5e8d5;
    font-weight: 600;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        color 0.2s ease;
}

.language-switch button[aria-pressed="false"]:hover {
    color: #1d4845;
    background: #edd4af;
}

.language-switch button[aria-pressed="true"] {
    background: #1d4845;
    color: #ffffff;
    font-weight: 700;
}

.language-switch button[aria-pressed="true"]:hover {
    background: #153b38;
}

/* Introduction */

.intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 34px 14px 25px;
}

.eyebrow {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.7px;
    color: var(--orange);
    margin: 0 0 7px;
}

h1 {
    font-size: clamp(25px, 2.8vw, 43px);
    font-weight: 750;
    letter-spacing: -1.25px;
    line-height: 1.17;
    margin: 0 0 8px;
}

.subtitle {
    font-size: 19px;
    color: #50616b;
    margin: 0;
}

/* Summary */

.stats {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    min-width: 253px;
    padding: 16px 10px;
    background: #edf5f3;
    border-radius: 8px;
}

.stats > div {
    display: flex;
    align-items: center;
    flex-direction: column;
    min-width: 113px;
    padding: 0 12px;
}

.stats > div + div {
    border-left: 1px solid #cbd9d7;
}

.stats strong {
    font-size: 32px;
    line-height: 1.2;
}

.stats span {
    font-size: 14px;
    margin-top: 4px;
    white-space: nowrap;
}

/* Directory and filters */

.directory-panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 13px;
    padding: 16px 23px 18px;
    box-shadow: 0 5px 21px #18393307;
}

.form-label {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 8px;
}

.form-control,
.form-select,
.btn-reset {
    height: 41px;
    font-size: 14px;
    border-color: #ccd7dc;
    border-radius: 5px;
    color: #344b59;
}

.form-select {
    padding-right: 32px;
}

.form-control:focus,
.form-select:focus {
    border-color: #47807a;
    box-shadow: 0 0 0 3px #1d48451a;
}

.form-control::placeholder {
    color: #8a97a3;
}

.search-wrap {
    position: relative;
}

.search-wrap svg {
    position: absolute;
    left: 14px;
    top: 12px;
    width: 18px;
    height: 18px;
    fill: none;
    stroke: #425766;
    stroke-width: 1.7;
    pointer-events: none;
}

.search-wrap input {
    padding-left: 43px;
}

.btn-reset {
    color: var(--teal);
    font-weight: 600;
    background: #fff;
}

.btn-reset:hover {
    background: var(--soft);
    border-color: #6b9590;
    color: var(--teal);
}

.table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 22px 0 12px;
    gap: 16px;
}

.table-toolbar h2 {
    font-size: 19px;
    font-weight: 700;
    margin: 0;
}

.table-toolbar > span {
    font-size: 13px;
    color: var(--muted);
}

.table-toolbar strong {
    color: var(--teal);
    font-weight: 600;
}

/* Table */

.table-responsive {
    border: 1px solid var(--line);
    border-radius: 6px;
    overflow: auto;
}

.directory-table {
    margin: 0;
    table-layout: fixed;
    min-width: 735px;
    --bs-table-color: var(--ink);
    --bs-table-bg: transparent;
    --bs-table-border-color: var(--line);
}

.col-serial {
    width: 5.5%;
}

.col-district {
    width: 20.8%;
}

.col-location {
    width: 57.9%;
}

.col-total {
    width: 15.8%;
}

.directory-table thead {
    background: #e5f1ef;
}

.directory-table th {
    padding: 11px 17px;
    font-size: 13px;
    vertical-align: middle;
    font-weight: 600;
    color: #204b4c;
    border-bottom: 0;
}

.directory-table td {
    padding: 9px 17px;
    font-size: 14px;
    vertical-align: top;
    line-height: 1.48;
}

.directory-table th + th,
.directory-table td + td {
    border-left: 1px solid var(--line);
}

.directory-table th:first-child,
.directory-table td:first-child {
    text-align: center;
    padding-inline: 8px;
}

.directory-table td:first-child {
    font-weight: 600;
    padding-top: 13px;
}

.directory-table td.district-cell {
    font-size: 16px;
    font-weight: 700;
    padding-top: 13px;
}

.directory-table th:last-child {
    text-align: center;
    white-space: normal;
}

.directory-table td:last-child {
    vertical-align: middle;
    text-align: center;
}

.directory-table tbody tr:last-child td {
    border-bottom: 0;
}

.pond-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 47px;
    height: 34px;
    background: #e6f2f0;
    border-radius: 24px;
    font-size: 16px;
    font-weight: 700;
}

.location-group + .location-group {
    margin-top: 6px;
}

.group-heading {
    font-weight: 700;
    margin: 0 0 1px;
    font-size: 14px;
}

.location-line {
    margin: 0;
    overflow-wrap: anywhere;
}

.source-note {
    margin: 7px 0 0;
    font-size: 12px;
    color: #66756f;
    line-height: 1.5;
}

/* Pagination */

.table-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 16px;
}

.table-bottom > p {
    font-size: 13px;
    color: #536774;
    margin: 0;
}

.pagination {
    margin: 0;
    gap: 7px;
}

.page-link {
    padding: 0;
    width: 36px;
    height: 37px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 5px !important;
    border-color: #d5e0e4;
    color: #1c464a;
    font-size: 14px;
    background: #fff;
}

.page-link:hover {
    color: var(--teal);
    background: var(--soft);
}

.page-item.active .page-link {
    background: var(--teal);
    border-color: var(--teal);
    color: #fff;
}

.page-item.disabled .page-link {
    opacity: 0.45;
    background: #f7f9f8;
}

.page-link:focus-visible,
button:focus-visible,
a:focus-visible {
    outline: 3px solid #e9ad60;
    outline-offset: 3px;
    box-shadow: none;
}

.filter-note {
    font-size: 12px;
    color: #64756e;
    margin: 12px 0 0;
}

.empty-state {
    text-align: center !important;
    padding: 45px !important;
    color: var(--muted);
}

/* Footer and modal */

footer {
    font-size: 11px;
    padding: 14px;
    color: #53616a;
}

footer span {
    font-weight: 700;
}

.modal-content {
    border: 0;
    border-radius: 12px;
}

.modal-header {
    background: var(--soft);
}

.overview-table {
    font-size: 14px;
}

.overview-table th {
    color: var(--teal);
}

/* Accessibility and Hindi typography */

.skip-link {
    position: absolute;
    left: 15px;
    top: -100px;
    z-index: 2000;
    padding: 10px;
    background: #fff;
}

.skip-link:focus {
    top: 5px;
}

html[lang="hi"] h1 {
    letter-spacing: 0;
    line-height: 1.35;
    font-size: clamp(25px, 2.6vw, 39px);
}

html[lang="hi"] .location-line {
    line-height: 1.7;
}

/* Large screens */

@media (min-width: 1450px) {
    .intro {
        padding-top: 36px;
        padding-bottom: 26px;
    }

    .directory-panel {
        padding-top: 18px;
    }

    .directory-table td {
        line-height: 1.52;
    }
}

/* Small desktops */

@media (max-width: 1150px) {
    .page-width {
        width: calc(100% - 48px);
    }

    .brand {
        font-size: 19px;
        gap: 10px;
    }

    .header-actions,
    .top-nav {
        gap: 20px;
    }

    .stats {
        min-width: 205px;
    }

    .stats > div {
        min-width: 94px;
        padding-inline: 8px;
    }

    .stats span {
        font-size: 12px;
    }

    .intro {
        padding-inline: 4px;
    }

    .subtitle {
        font-size: 16px;
    }

    .lotus {
        width: 46px;
    }
}

/* Tablets */

@media (max-width: 850px) {
    .header-inner {
        flex-wrap: wrap;
        gap: 0;
        padding-top: 8px;
    }

    .header-actions {
        width: 100%;
        justify-content: space-between;
    }

    .top-nav > a,
    .top-nav > button {
        padding: 14px 0;
    }

    .brand {
        font-size: 20px;
    }

    .intro {
        align-items: flex-start;
    }

    .stats {
        min-width: 175px;
        padding: 12px 4px;
    }

    .stats > div {
        min-width: 80px;
    }

    .stats strong {
        font-size: 26px;
    }

    .stats span {
        font-size: 11px;
    }

    .intro h1 {
        letter-spacing: -0.5px;
    }

    .directory-panel {
        padding: 18px;
    }

    .table-toolbar {
        margin-top: 20px;
    }
}

/* Mobile */

@media (max-width: 575px) {
    .page-width {
        width: calc(100% - 28px);
    }

    .header-inner {
        padding: 6px 0 0;
    }

    .brand {
        font-size: 19px;
    }

    .brand-logo {
        width: 210px;
    }

    .header-actions {
        gap: 10px;
    }

    .top-nav {
        gap: 18px;
    }

    .top-nav > a,
    .top-nav > button {
        font-size: 12px;
    }

    .language-switch button {
        font-size: 11px;
        padding: 4px 6px;
        min-width: 36px;
    }

    .intro {
        padding: 24px 0 20px;
        flex-direction: column;
        gap: 17px;
    }

    .eyebrow {
        font-size: 12px;
    }

    h1 {
        font-size: 29px;
        max-width: 370px;
    }

    .subtitle {
        font-size: 15px;
        line-height: 1.5;
    }

    .stats {
        width: 100%;
        padding: 11px;
    }

    .stats > div {
        width: 50%;
    }

    .stats strong {
        font-size: 27px;
    }

    .stats span {
        font-size: 13px;
    }

    .directory-panel {
        padding: 15px 12px;
        border-radius: 10px;
    }

    .table-toolbar h2 {
        font-size: 17px;
    }

    .table-toolbar > span {
        font-size: 11px;
    }

    .table-bottom {
        align-items: flex-start;
        flex-direction: column;
        gap: 13px;
    }

    .table-bottom nav {
        align-self: flex-end;
    }

    .form-label {
        font-size: 12px;
    }

    .form-control,
    .form-select {
        font-size: 13px;
    }

    footer {
        padding: 13px 0;
        font-size: 10px;
    }

    .directory-table td {
        font-size: 13px;
    }

    .directory-table td.district-cell {
        font-size: 14px;
    }
}

/* Reduced motion */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    * {
        transition: none !important;
    }
}